build/patch/u-boot/v2022.04/board_rk322x-box/dtsi-add-generic-tvbox.patch

231 lines
4.5 KiB
Diff
Raw Normal View History

diff --git a/arch/arm/dts/rk322x-generic-tvbox.dtsi b/arch/arm/dts/rk322x-generic-tvbox.dtsi
new file mode 100644
index 00000000..9328eaf7
--- /dev/null
+++ b/arch/arm/dts/rk322x-generic-tvbox.dtsi
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0+ OR X11
+/*
+ * (C) Copyright 2019 Paolo Sabatino
+ *
+ * Generic rk322x tv box device tree include file.
+ *
+ * This dtsi covers most of the common hardware included in generic tv boxes around the market.
+ * Include this dtsi in your configuration and make the necessary adjustments there for base support.
+ *
+ */
+
+/dts-v1/;
+
+#include "rk322x.dtsi"
+
+/ {
+
+ chosen {
+ u-boot,dm-pre-reloc;
+ stdout-path = &uart2;
+ u-boot,spl-boot-order = "same-as-spl", &emmc, &sdmmc;
+ };
+
+ memory@60000000 {
+ device_type = "memory";
+ reg = <0x60000000 0x40000000>;
+ };
+
+ leds: leds {
+ compatible = "gpio-leds";
+
+ /*
+ Main led is available on all boards.
+ Default state is honoured only if led_default_state() is called inside
+ an early init hook function.
+ */
+ main {
+ label = "heartbeat";
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ linux,default-trigger = "heartbeat";
+ };
+
+ };
+
+ vcc_sys: vcc-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+
+ vcc_phy: vcc-phy-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ regulator-name = "vcc_phy";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vcc_otg_vbus: otg-vbus-regulator {
+ compatible = "regulator-fixed";
+ gpio = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&otg_vbus_drv>;
+ regulator-name = "vcc_otg_vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-boot-on;
+// regulator-always-on;
+ enable-active-high;
+ vin-supply = <&vcc_sys>;
+ };
+
+ vcc_host_vbus: vcc-host-regulator {
+ compatible = "regulator-fixed";
+ gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&host_vbus_drv>;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-name = "vcc_host";
+// regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ vin-supply = <&vcc_sys>;
+ };
+
+
+};
+
+&gmac {
+
+ assigned-clocks = <&cru SCLK_MAC_SRC>;
+ assigned-clock-rates = <50000000>;
+
+ clock_in_out = "output";
+ phy-supply = <&vcc_phy>;
+ phy-mode = "rmii";
+ phy-is-integrated;
+
+ tx_delay = < 0x30 >; // Default is 0x30, but original dts proposes 0x26
+ rx_delay = < 0x10 >; // Default is 0x10, but original dts proposes 0x11
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&phy_pins>;
+
+ status = "okay";
+
+};
+
+&emmc {
+
+ u-boot,dm-spl;
+ clock-frequency = <50000000>;
+ clock-freq-min-max = <400000 50000000>;
+ broken-cd;
+ cap-mmc-highspeed;
+ mmc-hs200-1_8v;
+ supports-emmc;
+ disable-wp;
+ non-removable;
+ /delete-property/ pinctrl-names;
+ /delete-property/ pinctrl-0;
+ status = "okay";
+
+};
+
+&sdmmc {
+
+ u-boot,dm-spl;
+ bus-width = <4>;
+ cap-mmc-highspeed;
+ cap-sd-highspeed;
+ card-detect-delay = <200>;
+ disable-wp;
+ num-slots = <1>;
+ supports-sd;
+
+ status = "okay";
+
+};
+
+&uart2 {
+ u-boot,dm-pre-reloc;
+ status = "okay";
+};
+
+&u2phy0 {
+ status = "okay";
+};
+
+&u2phy0_otg {
+ status = "okay";
+};
+
+&u2phy0_host {
+ status = "okay";
+};
+
+&u2phy1 {
+ status = "okay";
+};
+
+&u2phy1_otg {
+ status = "okay";
+};
+
+&u2phy1_host {
+ status = "okay";
+};
+
+&usb_host0_ehci {
+ vbus-supply = <&vcc_host_vbus>;
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ vbus-supply = <&vcc_host_vbus>;
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ vbus-supply = <&vcc_host_vbus>;
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ vbus-supply = <&vcc_host_vbus>;
+ status = "okay";
+};
+
+&usb_host2_ehci {
+ vbus-supply = <&vcc_host_vbus>;
+ status = "okay";
+};
+
+&usb_host2_ohci {
+ vbus-supply = <&vcc_host_vbus>;
+ status = "okay";
+};
+
+&usb20_otg{
+ vbus-supply = <&vcc_otg_vbus>;
+ status = "okay";
+};
+
+&pinctrl {
+
+ usb {
+ host_vbus_drv: host-vbus-drv {
+ rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+
+ otg_vbus_drv: otg-vbus-drv {
+ rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+
+};