Skip to content

Commit

Permalink
rockchip:supplement 5.18 to compile other devices normally (coolsnoww…
Browse files Browse the repository at this point in the history
…olf#9718)

* Add files via upload

* Update 900-arm-boot-add-dts-files.patch
  • Loading branch information
DHDAXCW authored Jul 9, 2022
1 parent 1553dbd commit 691504f
Show file tree
Hide file tree
Showing 6 changed files with 808 additions and 913 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2020 David Bauer <[email protected]>
* Copyright (c) 2021 EmbedFire <[email protected]>
*/

/dts-v1/;
Expand All @@ -12,17 +12,14 @@
/ {
model = "EmbedFire DoorNet1";
compatible = "embedfire,doornet1", "rockchip,rk3328";

aliases {
ethernet1 = &rtl8153;
mmc0 = &sdmmc;
};


aliases {
led-boot = &sys_led;
led-failsafe = &sys_led;
led-running = &sys_led;
led-upgrade = &sys_led;
// mmc1 = &sdmmc;
// mmc0 = &emmc;
};

chosen {
Expand All @@ -49,26 +46,42 @@
};
};

vcc_rtl8153: vcc-rtl8153-regulator {
compatible = "regulator-fixed";
gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&rtl8153_en_drv>;
regulator-always-on;
regulator-name = "vcc_rtl8153";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
};

leds {
compatible = "gpio-leds";
pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
pinctrl-names = "default";

lan_led: led-0 {
gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
label = "nanopi-r2s:green:lan";
label = "doornet1:green:lan";
};

sys_led: led-1 {
gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
label = "nanopi-r2s:red:sys";
default-state = "on";
label = "doornet1:red:sys";
};

wan_led: led-2 {
gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
label = "nanopi-r2s:green:wan";
label = "doornet1:green:wan";
};

wifi_enable: wifi_enable {
gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
label = "wifi-enable";
};
};

vcc_io_sdio: sdmmcio-regulator {
Expand All @@ -84,8 +97,8 @@
regulator-settling-time-us = <5000>;
regulator-type = "voltage";
startup-delay-us = <2000>;
states = <1800000 0x1>,
<3300000 0x0>;
states = <1800000 0x1
3300000 0x0>;
vin-supply = <&vcc_io_33>;
};

Expand All @@ -109,18 +122,6 @@
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};

vdd_5v_lan: vdd-5v-lan {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&lan_vdd_pin>;
pinctrl-names = "default";
regulator-name = "vdd_5v_lan";
regulator-always-on;
regulator-boot-on;
vin-supply = <&vdd_5v>;
};
};

&cpu0 {
Expand All @@ -139,38 +140,20 @@
cpu-supply = <&vdd_arm>;
};

&display_subsystem {
status = "disabled";
};

&gmac2io {
assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
clock_in_out = "input";
phy-handle = <&rtl8211e>;
phy-mode = "rgmii";
phy-supply = <&vcc_io_33>;
pinctrl-0 = <&rgmiim1_pins>;
pinctrl-names = "default";
rx_delay = <0x18>;
snps,aal;
tx_delay = <0x24>;
snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
snps,reset-delays-us = <0 1000000 50000>;
snps,reset-active-low;
tx_delay = <0x18>;
rx_delay = <0x24>;
status = "okay";

mdio {
compatible = "snps,dwmac-mdio";
#address-cells = <1>;
#size-cells = <0>;

rtl8211e: ethernet-phy@1 {
reg = <1>;
pinctrl-0 = <&eth_phy_reset_pin>;
pinctrl-names = "default";
reset-assert-us = <10000>;
reset-deassert-us = <50000>;
reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
};
};
};

&i2c1 {
Expand Down Expand Up @@ -202,6 +185,7 @@
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
regulator-init-microvolt = <1075000>;
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1450000>;
regulator-ramp-delay = <12500>;
Expand All @@ -216,6 +200,7 @@
regulator-name = "vdd_arm";
regulator-always-on;
regulator-boot-on;
regulator-init-microvolt = <1225000>;
regulator-min-microvolt = <712500>;
regulator-max-microvolt = <1450000>;
regulator-ramp-delay = <12500>;
Expand Down Expand Up @@ -289,6 +274,11 @@
};
};
};
usb {
rtl8153_en_drv: rtl8153-en-drv {
rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

&io_domains {
Expand All @@ -309,7 +299,7 @@
};
};

gmac2io {
ethernet-phy {
eth_phy_reset_pin: eth-phy-reset-pin {
rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
};
Expand All @@ -327,11 +317,9 @@
wan_led_pin: wan-led-pin {
rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};

lan {
lan_vdd_pin: lan-vdd-pin {
rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
wifi_pin: wifi_pin{
rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
};
};

Expand Down Expand Up @@ -367,6 +355,20 @@
status = "okay";
};

&emmc {
bus-width = <8>;
cap-mmc-highspeed;
max-frequency = <150000000>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
vmmc-supply = <&vcc_io_33>;
vqmmc-supply = <&vcc18_emmc>;
status = "okay";
};

&tsadc {
rockchip,hw-tshut-mode = <0>;
rockchip,hw-tshut-polarity = <0>;
Expand Down Expand Up @@ -394,6 +396,18 @@
dr_mode = "host";
};

&usb_host0_ehci {
status = "okay";
};

&usb_host0_ohci {
status = "okay";
};

&usbdrd3 {
status = "okay";
};

&usbdrd3 {
dr_mode = "host";
status = "okay";
Expand All @@ -404,14 +418,7 @@
rtl8153: device@2 {
compatible = "usbbda,8153";
reg = <2>;

realtek,led-data = <0x87>;
};
};

&usb_host0_ehci {
status = "okay";
};

&usb_host0_ohci {
status = "okay";
};
Loading

0 comments on commit 691504f

Please sign in to comment.