Skip to contentSkip to conversation

arm: dts: sync the Rockhip 3399 SoCs from Linux

PATCH In review Peter Robinson 2 participants 7 messages Jul 22, 2021 – Aug 12, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm: dts: sync the Rockhip 3399 SoCs from Linux

Sync the rk3399 DTs and associated bits from 5.14-rc1.

---
 arch/arm/dts/rk3399-evb.dts                   |   4 +
 arch/arm/dts/rk3399-ficus.dts                 |  29 +-
 arch/arm/dts/rk3399-firefly.dts               | 178 ++++++++++--
 arch/arm/dts/rk3399-gru.dtsi                  |  14 +-
 arch/arm/dts/rk3399-khadas-edge.dtsi          |  40 ++-
 arch/arm/dts/rk3399-leez-p710.dts             |  14 +-
 arch/arm/dts/rk3399-nanopc-t4.dts             |   1 +
 arch/arm/dts/rk3399-nanopi-r4s.dts            | 135 +++++----
 arch/arm/dts/rk3399-nanopi4.dtsi              |  18 +-
 arch/arm/dts/rk3399-opp.dtsi                  |  40 +--
 arch/arm/dts/rk3399-orangepi.dts              |  72 ++++-
 arch/arm/dts/rk3399-pinebook-pro.dts          | 120 +++++---
 arch/arm/dts/rk3399-puma-haikou.dts           |  10 +-
 arch/arm/dts/rk3399-puma.dtsi                 |  61 +---
 arch/arm/dts/rk3399-roc-pc-mezzanine.dts      |  22 +-
 arch/arm/dts/rk3399-roc-pc.dtsi               |  59 +++-
 arch/arm/dts/rk3399-rock-pi-4.dtsi            |  29 +-
 arch/arm/dts/rk3399-rock-pi-4a.dts            |   2 +-
 arch/arm/dts/rk3399-rock-pi-4b.dts            |   6 +-
 arch/arm/dts/rk3399-rock-pi-4c.dts            |   6 +-
 arch/arm/dts/rk3399-rock960.dts               |  82 ++----
 arch/arm/dts/rk3399-rock960.dtsi              |  10 +-
 arch/arm/dts/rk3399-rockpro64.dtsi            |  95 ++++++-
 arch/arm/dts/rk3399.dtsi                      | 269 +++++++++++-------
 arch/arm/dts/rk3399pro-vmarc-som.dtsi         |  22 +-
 .../dts/rockchip-radxa-dalang-carrier.dtsi    |  21 ++
 26 files changed, 897 insertions(+), 462 deletions(-)
arch/arm/dts/rk3399-evb.dts +4 -0
index 694b0d08d6..7b717ebec8 100644
@@ -11,6 +11,10 @@
 	model = "Rockchip RK3399 Evaluation Board";
 	compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdhci;
+	};
+
 	backlight: backlight {
 		compatible = "pwm-backlight";
 		brightness-levels = <
arch/arm/dts/rk3399-ficus.dts +15 -14
index ebe2ee77ba..1ce85a5816 100644
@@ -27,42 +27,43 @@
 	leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
-		pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
-			    <&user_led4>, <&wlan_led>, <&bt_led>;
+		pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>,
+			    <&user_led3_pin>, <&user_led4_pin>,
+			    <&wlan_led_pin>, <&bt_led_pin>;
 
-		user_led1 {
+		user_led1: led-1 {
 			label = "red:user1";
 			gpios = <&gpio4 25 0>;
 			linux,default-trigger = "heartbeat";
 		};
 
-		user_led2 {
+		user_led2: led-2 {
 			label = "red:user2";
 			gpios = <&gpio4 26 0>;
 			linux,default-trigger = "mmc0";
 		};
 
-		user_led3 {
+		user_led3: led-3 {
 			label = "red:user3";
 			gpios = <&gpio4 30 0>;
 			linux,default-trigger = "mmc1";
 		};
 
-		user_led4 {
+		user_led4: led-4 {
 			label = "red:user4";
 			gpios = <&gpio1 0 0>;
 			panic-indicator;
 			linux,default-trigger = "none";
 		};
 
-		wlan_active_led {
+		wlan_active_led: led-5 {
 			label = "red:wlan";
 			gpios = <&gpio1 1 0>;
 			linux,default-trigger = "phy0tx";
 			default-state = "off";
 		};
 
-		bt_active_led {
+		bt_active_led: led-6 {
 			label = "red:bt";
 			gpios = <&gpio1 4 0>;
 			linux,default-trigger = "hci0-power";
@@ -114,32 +115,32 @@
 	};
 
 	leds {
-		user_led1: user_led1 {
+		user_led1_pin: user-led1-pin {
 			rockchip,pins =
 				<4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 
-		user_led2: user_led2 {
+		user_led2_pin: user-led2-pin {
 			rockchip,pins =
 				<4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 
-		user_led3: user_led3 {
+		user_led3_pin: user-led3-pin {
 			rockchip,pins =
 				<4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 
-		user_led4: user_led4 {
+		user_led4_pin: user-led4-pin {
 			rockchip,pins =
 				<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 
-		wlan_led: wlan_led {
+		wlan_led_pin: wlan-led-pin {
 			rockchip,pins =
 				<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 
-		bt_led: bt_led {
+		bt_led_pin: bt-led-pin {
 			rockchip,pins =
 				<1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
arch/arm/dts/rk3399-firefly.dts +154 -24

273 lines not on this page · raw message

arch/arm/dts/rk3399-gru.dtsi +10 -4
index f9c5bb607b..b80f19066b 100644
@@ -10,6 +10,11 @@
 #include "rk3399-op1-opp.dtsi"
 
 / {
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
 	chosen {
 		stdout-path = "serial2:115200n8";
 	};
@@ -247,8 +252,8 @@
 		enable-active-high;
 		enable-gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
-		states = <1800000 0x1
-			  3000000 0x0>;
+		states = <1800000 0x1>,
+			 <3000000 0x0>;
 
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <3000000>;
@@ -342,6 +347,7 @@
 	cpu-supply = <&ppvar_bigcpu>;
 };
 
+
 &cru {
 	assigned-clocks =
 		<&cru PLL_GPLL>, <&cru PLL_CPLL>,
@@ -515,7 +521,7 @@ ap_i2c_audio: &i2c8 {
 	 * configured as SDMMC and not JTAG.
 	 */
 	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_gpio
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_pin
 		     &sdmmc_bus4>;
 
 	bus-width = <4>;
@@ -766,7 +772,7 @@ ap_i2c_audio: &i2c8 {
 		};
 
 		/* This is where we actually hook up CD; has external pull */
-		sdmmc_cd_gpio: sdmmc-cd-gpio {
+		sdmmc_cd_pin: sdmmc-cd-pin {
 			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
arch/arm/dts/rk3399-khadas-edge.dtsi +35 -5
index e87a044774..d5c7648c84 100644
@@ -11,6 +11,12 @@
 #include "rk3399-opp.dtsi"
 
 / {
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
@@ -138,18 +144,26 @@
 		};
 	};
 
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
+		linux,rc-map-name = "rc-khadas";
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_rx>;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
-		pinctrl-0 = <&sys_led_gpio>, <&user_led_gpio>;
+		pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
 
-		sys-led {
+		sys_led: led-0 {
 			label = "sys_led";
 			linux,default-trigger = "heartbeat";
 			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
 		};
 
-		user-led {
+		user_led: led-1 {
 			label = "user_led";
 			default-state = "off";
 			gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
@@ -585,12 +599,18 @@
 		};
 	};
 
+	ir {
+		ir_rx: ir-rx {
+		    rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	leds {
-		sys_led_gpio: sys_led-gpio {
+		sys_led_pin: sys-led-pin {
 			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 
-		user_led_gpio: user_led-gpio {
+		user_led_pin: user-led-pin {
 			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
@@ -690,6 +710,16 @@
 	status = "okay";
 };
 
+&spi1 {
+	status = "okay";
+
+	spiflash: flash@0 {
+		compatible = "winbond,w25q128fw", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <104000000>;
+	};
+};
+
 &tcphy0 {
 	status = "okay";
 };
arch/arm/dts/rk3399-leez-p710.dts +10 -4
index 73be38a537..7c93f840bc 100644
@@ -13,6 +13,12 @@
 	model = "Leez RK3399 P710";
 	compatible = "leez,p710", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
@@ -341,7 +347,7 @@
 		reg = <0x40>;
 		fcs,suspend-voltage-selector = <1>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&vsel1_gpio>;
+		pinctrl-0 = <&vsel1_pin>;
 		regulator-name = "vdd_cpu_b";
 		regulator-min-microvolt = <712500>;
 		regulator-max-microvolt = <1500000>;
@@ -360,7 +366,7 @@
 		reg = <0x41>;
 		fcs,suspend-voltage-selector = <1>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&vsel2_gpio>;
+		pinctrl-0 = <&vsel2_pin>;
 		regulator-name = "vdd_gpu";
 		regulator-min-microvolt = <712500>;
 		regulator-max-microvolt = <1500000>;
@@ -447,11 +453,11 @@
 			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
 			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
 			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
 	};
arch/arm/dts/rk3399-nanopc-t4.dts +1 -0
index e0d75617bb..452728b82e 100644
@@ -95,6 +95,7 @@
 };
 
 &pcie0 {
+	ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
 	num-lanes = <4>;
 	vpcie3v3-supply = <&vcc3v3_sys>;
 };
arch/arm/dts/rk3399-nanopi-r4s.dts +65 -70

188 lines not on this page · raw message

arch/arm/dts/rk3399-nanopi4.dtsi +11 -7
index c88018a0ef..8c0ff6c96e 100644
@@ -17,6 +17,12 @@
 #include "rk3399-opp.dtsi"
 
 / {
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
@@ -117,9 +123,9 @@
 	leds: gpio-leds {
 		compatible = "gpio-leds";
 		pinctrl-names = "default";
-		pinctrl-0 = <&leds_gpio>;
+		pinctrl-0 = <&status_led_pin>;
 
-		status {
+		status_led: led-0 {
 			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
 			label = "status_led";
 			linux,default-trigger = "heartbeat";
@@ -182,7 +188,7 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		rtl8211e: phy@1 {
+		rtl8211e: ethernet-phy@1 {
 			reg = <1>;
 			interrupt-parent = <&gpio3>;
 			interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
@@ -504,8 +510,6 @@
 };
 
 &pcie0 {
-	ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
-	max-link-speed = <2>;
 	num-lanes = <2>;
 	vpcie0v9-supply = <&vcca0v9_s3>;
 	vpcie1v8-supply = <&vcca1v8_s3>;
@@ -520,12 +524,12 @@
 	};
 
 	gpio-leds {
-		leds_gpio: leds-gpio {
+		status_led_pin: status-led-pin {
 			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
 
-	phy {
+	gmac {
 		phy_intb: phy-intb {
 			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
arch/arm/dts/rk3399-opp.dtsi +20 -20
index d6f1095abb..da41cd81eb 100644
@@ -10,28 +10,28 @@
 
 		opp00 {
 			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 			clock-latency-ns = <40000>;
 		};
 		opp01 {
 			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 		};
 		opp02 {
 			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <850000>;
+			opp-microvolt = <850000 850000 1250000>;
 		};
 		opp03 {
 			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <925000>;
+			opp-microvolt = <925000 925000 1250000>;
 		};
 		opp04 {
 			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <1000000>;
+			opp-microvolt = <1000000 1000000 1250000>;
 		};
 		opp05 {
 			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1125000>;
+			opp-microvolt = <1125000 1125000 1250000>;
 		};
 	};
 
@@ -41,36 +41,36 @@
 
 		opp00 {
 			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 			clock-latency-ns = <40000>;
 		};
 		opp01 {
 			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 		};
 		opp02 {
 			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1250000>;
 		};
 		opp03 {
 			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <875000>;
+			opp-microvolt = <875000 875000 1250000>;
 		};
 		opp04 {
 			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <950000>;
+			opp-microvolt = <950000 950000 1250000>;
 		};
 		opp05 {
 			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1025000>;
+			opp-microvolt = <1025000 1025000 1250000>;
 		};
 		opp06 {
 			opp-hz = /bits/ 64 <1608000000>;
-			opp-microvolt = <1100000>;
+			opp-microvolt = <1100000 1100000 1250000>;
 		};
 		opp07 {
 			opp-hz = /bits/ 64 <1800000000>;
-			opp-microvolt = <1200000>;
+			opp-microvolt = <1200000 1200000 1250000>;
 		};
 	};
 
@@ -79,27 +79,27 @@
 
 		opp00 {
 			opp-hz = /bits/ 64 <200000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1150000>;
 		};
 		opp01 {
 			opp-hz = /bits/ 64 <297000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1150000>;
 		};
 		opp02 {
 			opp-hz = /bits/ 64 <400000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1150000>;
 		};
 		opp03 {
 			opp-hz = /bits/ 64 <500000000>;
-			opp-microvolt = <875000>;
+			opp-microvolt = <875000 875000 1150000>;
 		};
 		opp04 {
 			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <925000>;
+			opp-microvolt = <925000 925000 1150000>;
 		};
 		opp05 {
 			opp-hz = /bits/ 64 <800000000>;
-			opp-microvolt = <1100000>;
+			opp-microvolt = <1100000 1100000 1150000>;
 		};
 	};
 };
arch/arm/dts/rk3399-orangepi.dts +69 -3

120 lines not on this page · raw message

arch/arm/dts/rk3399-pinebook-pro.dts +75 -45

351 lines not on this page · raw message

arch/arm/dts/rk3399-puma-haikou.dts +7 -3
index d80d6b7268..292bb7e80c 100644
@@ -10,14 +10,18 @@
 	model = "Theobroma Systems RK3399-Q7 SoM";
 	compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399";
 
+	aliases {
+		mmc1 = &sdmmc;
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
 	leds {
-		pinctrl-0 = <&led_pin_module>, <&led_sd_haikou>;
+		pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
 
-		sd-card-led {
+		sd_card_led: led-1 {
 			label = "sd_card_led";
 			gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "mmc0";
@@ -179,7 +183,7 @@
 	};
 
 	leds {
-		led_sd_haikou: led-sd-gpio {
+		sd_card_led_pin: sd-card-led-pin {
 			rockchip,pins =
 			  <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
arch/arm/dts/rk3399-puma.dtsi +7 -54

83 lines not on this page · raw message

arch/arm/dts/rk3399-roc-pc-mezzanine.dts +20 -2
index 2acb3d500f..9447c8724b 100644
@@ -11,6 +11,20 @@
 	model = "Firefly ROC-RK3399-PC Mezzanine Board";
 	compatible = "firefly,roc-rk3399-pc-mezzanine", "rockchip,rk3399";
 
+	aliases {
+		mmc2 = &sdio0;
+	};
+
+	/* MP8009 PoE PD */
+	poe_12v: poe-12v {
+		compatible = "regulator-fixed";
+		regulator-name = "poe_12v";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+	};
+
 	vcc3v3_ngff: vcc3v3-ngff {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc3v3_ngff";
@@ -22,7 +36,7 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
-		vin-supply = <&dc_12v>;
+		vin-supply = <&sys_12v>;
 	};
 
 	vcc3v3_pcie: vcc3v3-pcie {
@@ -34,10 +48,14 @@
 		pinctrl-0 = <&vcc3v3_pcie_en>;
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
-		vin-supply = <&dc_12v>;
+		vin-supply = <&sys_12v>;
 	};
 };
 
+&sys_12v {
+	vin-supply = <&poe_12v>;
+};
+
 &pcie_phy {
 	status = "okay";
 };
arch/arm/dts/rk3399-roc-pc.dtsi +44 -15

155 lines not on this page · raw message

arch/arm/dts/rk3399-rock-pi-4.dtsi +13 -16
index 1c55a4645b..b28888ea92 100644
@@ -11,6 +11,11 @@
 #include "rk3399-opp.dtsi"
 
 / {
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
@@ -111,10 +116,6 @@
 		regulator-boot-on;
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
-
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
 	};
 
 	vdd_log: vdd-log {
@@ -362,8 +363,6 @@
 				regulator-name = "vcc_cam";
 				regulator-always-on;
 				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
 				regulator-state-mem {
 					regulator-off-in-suspend;
 				};
@@ -373,8 +372,6 @@
 				regulator-name = "vcc_mipi";
 				regulator-always-on;
 				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
 				regulator-state-mem {
 					regulator-off-in-suspend;
 				};
@@ -387,7 +384,7 @@
 		reg = <0x40>;
 		fcs,suspend-voltage-selector = <1>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&vsel1_gpio>;
+		pinctrl-0 = <&vsel1_pin>;
 		regulator-name = "vdd_cpu_b";
 		regulator-min-microvolt = <712500>;
 		regulator-max-microvolt = <1500000>;
@@ -406,7 +403,7 @@
 		reg = <0x41>;
 		fcs,suspend-voltage-selector = <1>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&vsel2_gpio>;
+		pinctrl-0 = <&vsel2_pin>;
 		regulator-name = "vdd_gpu";
 		regulator-min-microvolt = <712500>;
 		regulator-max-microvolt = <1500000>;
@@ -440,8 +437,9 @@
 };
 
 &i2s0 {
-	rockchip,playback-channels = <8>;
-	rockchip,capture-channels = <8>;
+	pinctrl-0 = <&i2s0_2ch_bus>;
+	rockchip,capture-channels = <2>;
+	rockchip,playback-channels = <2>;
 	status = "okay";
 };
 
@@ -476,7 +474,6 @@
 
 &pcie0 {
 	ep-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
-	max-link-speed = <2>;
 	num-lanes = <4>;
 	pinctrl-0 = <&pcie_clkreqnb_cpm>;
 	pinctrl-names = "default";
@@ -529,11 +526,11 @@
 			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
 			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
 			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
 	};
@@ -680,7 +677,7 @@
 
 &usbdrd_dwc3_0 {
 	status = "okay";
-	dr_mode = "otg";
+	dr_mode = "host";
 };
 
 &usbdrd3_1 {
arch/arm/dts/rk3399-rock-pi-4a.dts +1 -1
index d96dd3ebd3..89f2af5e11 100644
@@ -9,5 +9,5 @@
 
 / {
 	model = "Radxa ROCK Pi 4A";
-	compatible = "radxa,rockpi4", "rockchip,rk3399";
+	compatible = "radxa,rockpi4a", "radxa,rockpi4", "rockchip,rk3399";
 };
arch/arm/dts/rk3399-rock-pi-4b.dts +5 -1
index 4ca970acac..6c63e61706 100644
@@ -9,7 +9,11 @@
 
 / {
 	model = "Radxa ROCK Pi 4B";
-	compatible = "radxa,rockpi4", "rockchip,rk3399";
+	compatible = "radxa,rockpi4b", "radxa,rockpi4", "rockchip,rk3399";
+
+	aliases {
+		mmc2 = &sdio0;
+	};
 };
 
 &sdio0 {
arch/arm/dts/rk3399-rock-pi-4c.dts +5 -1
index 9d07ebd1ec..99169bcd51 100644
@@ -10,7 +10,11 @@
 
 / {
 	model = "Radxa ROCK Pi 4C";
-	compatible = "radxa,rockpi4", "rockchip,rk3399";
+	compatible = "radxa,rockpi4c", "radxa,rockpi4", "rockchip,rk3399";
+
+	aliases {
+		mmc2 = &sdio0;
+	};
 };
 
 &sdio0 {
arch/arm/dts/rk3399-rock960.dts +29 -53

154 lines not on this page · raw message

arch/arm/dts/rk3399-rock960.dtsi +8 -2
index ba7c75c9f2..25dc61c26a 100644
@@ -9,6 +9,12 @@
 #include "rk3399-opp.dtsi"
 
 / {
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
 	sdio_pwrseq: sdio-pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		clocks = <&rk808 1>;
@@ -470,12 +476,12 @@
 				<1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
 			rockchip,pins =
 				<1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
 			rockchip,pins =
 				<1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
arch/arm/dts/rk3399-rockpro64.dtsi +84 -11

184 lines not on this page · raw message

arch/arm/dts/rk3399.dtsi +163 -106

619 lines not on this page · raw message

arch/arm/dts/rk3399pro-vmarc-som.dtsi +21 -1
index 5d087be04a..01d1a75c8b 100644
@@ -12,6 +12,11 @@
 / {
 	compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
 
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
 	vcc3v3_pcie: vcc-pcie-regulator {
 		compatible = "regulator-fixed";
 		enable-active-high;
@@ -324,7 +329,6 @@
 
 &pcie0 {
 	ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
-	max-link-speed = <2>;
 	num-lanes = <4>;
 	pinctrl-0 = <&pcie_clkreqnb_cpm>;
 	pinctrl-names = "default";
@@ -353,6 +357,12 @@
 		};
 	};
 
+	sdio-pwrseq {
+		wifi_enable_h: wifi-enable-h {
+			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	vbus_host {
 		usb1_en_oc: usb1-en-oc {
 			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -371,6 +381,16 @@
 	pmu1830-supply = <&vcc_1v8>;
 };
 
+&sdio_pwrseq {
+	/*
+	 * On the module itself this is one of these (depending
+	 * on the actual card populated):
+	 * - SDIO_RESET_L_WL_REG_ON
+	 * - PDN (power down when low)
+	 */
+	reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
+};
+
 &sdhci {
 	bus-width = <8>;
 	mmc-hs400-1_8v;
arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi +21 -0
index 26b53eac47..da1d548b73 100644
@@ -15,6 +15,14 @@
 		#clock-cells = <0>;
 	};
 
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&hym8563>;
+		clock-names = "ext_clock";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_enable_h>;
+	};
+
 	vcc12v_dcin: vcc12v-dcin-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc12v_dcin";
@@ -78,6 +86,19 @@
 	status = "okay";
 };
 
+&sdio0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+	sd-uhs-sdr104;
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/3 arm: dts: sync the Rockhip 3328 SoCs from Linux

Sync the rk3328 DTs and associated bits from 5.14-rc1.

---
 arch/arm/dts/rk3328-evb.dts                |  23 +-
 arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |   2 +-
 arch/arm/dts/rk3328-nanopi-r2s.dts         |  51 ++-
 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi     |   2 +-
 arch/arm/dts/rk3328-roc-cc.dts             |  41 +-
 arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi  |   4 +-
 arch/arm/dts/rk3328-rock-pi-e.dts          | 439 +++++++++++++--------
 arch/arm/dts/rk3328-rock64-u-boot.dtsi     |   2 +-
 arch/arm/dts/rk3328-rock64.dts             |  72 ++--
 arch/arm/dts/rk3328.dtsi                   | 109 ++---
 10 files changed, 487 insertions(+), 258 deletions(-)
arch/arm/dts/rk3328-evb.dts +20 -3
index 6abc6f4a86..ff6b466e0e 100644
@@ -10,6 +10,12 @@
 	model = "Rockchip RK3328 EVB";
 	compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
 
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdio;
+		mmc2 = &emmc;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
@@ -41,7 +47,7 @@
 		compatible = "regulator-fixed";
 		gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
-		pinctrl-0 = <&sdmmc0m1_gpio>;
+		pinctrl-0 = <&sdmmc0m1_pin>;
 		regulator-name = "vcc_sd";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
@@ -70,6 +76,18 @@
 	cpu-supply = <&vdd_arm>;
 };
 
+&cpu1 {
+	cpu-supply = <&vdd_arm>;
+};
+
+&cpu2 {
+	cpu-supply = <&vdd_arm>;
+};
+
+&cpu3 {
+	cpu-supply = <&vdd_arm>;
+};
+
 &emmc {
 	bus-width = <8>;
 	cap-mmc-highspeed;
@@ -82,11 +100,10 @@
 &gmac2phy {
 	phy-supply = <&vcc_phy>;
 	clock_in_out = "output";
-	assigned-clocks = <&cru SCLK_MAC2PHY_SRC>;
 	assigned-clock-rate = <50000000>;
 	assigned-clocks = <&cru SCLK_MAC2PHY>;
 	assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
-
+	status = "okay";
 };
 
 &i2c1 {
arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi +1 -1
index 9e2ced1541..8db5e55af6 100644
@@ -20,7 +20,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-nanopi-r2s.dts +45 -6

111 lines not on this page · raw message

arch/arm/dts/rk3328-roc-cc-u-boot.dtsi +1 -1
index 08806dfc0f..20a62134a0 100644
@@ -40,7 +40,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-roc-cc.dts +36 -5

95 lines not on this page · raw message

arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi +2 -2
index 4fc055eacb..9d557eb988 100644
@@ -37,7 +37,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
@@ -46,7 +46,7 @@
 };
 
 &usb_host0_xhci {
-	vbus-supply = <&vcc5v0_host_xhci>;
+	vbus-supply = <&vcc_host_5v>;
 	status = "okay";
 };
 
arch/arm/dts/rk3328-rock-pi-e.dts +281 -158

532 lines not on this page · raw message

arch/arm/dts/rk3328-rock64-u-boot.dtsi +1 -1
index 2af32aea05..3c3b1370e3 100644
@@ -40,7 +40,7 @@
 	u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-rock64.dts +37 -35

135 lines not on this page · raw message

arch/arm/dts/rk3328.dtsi +63 -46

262 lines not on this page · raw message

Signature · 1 line
2.31.1
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] arm: dts: sync the Rockhip 3328 SoCs from Linux

Quoted 4 lines · Peter Robinson <[email protected]> 于2021年7月22日周四 下午11:21写道:

Sync the rk3328 DTs and associated bits from 5.14-rc1.

Thanks,
- Kever

Quoted 1,339 lines
---
 arch/arm/dts/rk3328-evb.dts                |  23 +-
 arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi |   2 +-
 arch/arm/dts/rk3328-nanopi-r2s.dts         |  51 ++-
 arch/arm/dts/rk3328-roc-cc-u-boot.dtsi     |   2 +-
 arch/arm/dts/rk3328-roc-cc.dts             |  41 +-
 arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi  |   4 +-
 arch/arm/dts/rk3328-rock-pi-e.dts          | 439 +++++++++++++--------
 arch/arm/dts/rk3328-rock64-u-boot.dtsi     |   2 +-
 arch/arm/dts/rk3328-rock64.dts             |  72 ++--
 arch/arm/dts/rk3328.dtsi                   | 109 ++---
 10 files changed, 487 insertions(+), 258 deletions(-)
arch/arm/dts/rk3328-evb.dts +20 -3
index 6abc6f4a86..ff6b466e0e 100644
@@ -10,6 +10,12 @@
        model = "Rockchip RK3328 EVB";
        compatible = "rockchip,rk3328-evb", "rockchip,rk3328";
 
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &sdio;
+               mmc2 = &emmc;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -41,7 +47,7 @@
                compatible = "regulator-fixed";
                gpio = <&gpio0 30 GPIO_ACTIVE_LOW>;
                pinctrl-names = "default";
-               pinctrl-0 = <&sdmmc0m1_gpio>;
+               pinctrl-0 = <&sdmmc0m1_pin>;
                regulator-name = "vcc_sd";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
@@ -70,6 +76,18 @@
        cpu-supply = <&vdd_arm>;
 };
 
+&cpu1 {
+       cpu-supply = <&vdd_arm>;
+};
+
+&cpu2 {
+       cpu-supply = <&vdd_arm>;
+};
+
+&cpu3 {
+       cpu-supply = <&vdd_arm>;
+};
+
 &emmc {
        bus-width = <8>;
        cap-mmc-highspeed;
@@ -82,11 +100,10 @@
 &gmac2phy {
        phy-supply = <&vcc_phy>;
        clock_in_out = "output";
-       assigned-clocks = <&cru SCLK_MAC2PHY_SRC>;
        assigned-clock-rate = <50000000>;
        assigned-clocks = <&cru SCLK_MAC2PHY>;
        assigned-clock-parents = <&cru SCLK_MAC2PHY_SRC>;
-
+       status = "okay";
 };
 
 &i2c1 {
arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi +1 -1
index 9e2ced1541..8db5e55af6 100644
@@ -20,7 +20,7 @@
        u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
        u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-nanopi-r2s.dts +45 -6
index 5445c5cb3d..3857d487ab 100644
@@ -13,6 +13,11 @@
        model = "FriendlyElec NanoPi R2S";
        compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328";
 
+       aliases {
+               ethernet1 = &rtl8153;
+               mmc0 = &sdmmc;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -50,6 +55,7 @@
                sys_led: led-1 {
                        gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
                        label = "nanopi-r2s:red:sys";
+                       default-state = "on";
                };
 
                wan_led: led-2 {
@@ -71,15 +77,15 @@
                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>;
        };
 
        vcc_sd: sdmmc-regulator {
                compatible = "regulator-fixed";
                gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
-               pinctrl-0 = <&sdmmc0m1_gpio>;
+               pinctrl-0 = <&sdmmc0m1_pin>;
                pinctrl-names = "default";
                regulator-name = "vcc_sd";
                regulator-boot-on;
@@ -96,6 +102,18 @@
                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 {
@@ -114,6 +132,10 @@
        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>;
@@ -134,8 +156,6 @@
                #size-cells = <0>;
 
                rtl8211e: ethernet-phy@1 {
-                       compatible = "ethernet-phy-id001c.c915",
-                                    "ethernet-phy-ieee802.3-c22";
                        reg = <1>;
                        pinctrl-0 = <&eth_phy_reset_pin>;
                        pinctrl-names = "default";
@@ -282,7 +302,7 @@
                };
        };
 
-       ethernet-phy {
+       gmac2io {
                eth_phy_reset_pin: eth-phy-reset-pin {
                        rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
                };
@@ -302,6 +322,12 @@
                };
        };
 
+       lan {
+               lan_vdd_pin: lan-vdd-pin {
+                       rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        pmic {
                pmic_int_l: pmic-int-l {
                        rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -361,6 +387,19 @@
        dr_mode = "host";
 };
 
+&usbdrd3 {
+       dr_mode = "host";
+       status = "okay";
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       /* Second port is for USB 3.0 */
+       rtl8153: device@2 {
+               compatible = "usbbda,8153";
+               reg = <2>;
+       };
+};
+
 &usb_host0_ehci {
        status = "okay";
 };
arch/arm/dts/rk3328-roc-cc-u-boot.dtsi +1 -1
index 08806dfc0f..20a62134a0 100644
@@ -40,7 +40,7 @@
        u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
        u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-roc-cc.dts +36 -5
index 8d553c9218..aa22a0c222 100644
@@ -10,6 +10,11 @@
        model = "Firefly roc-rk3328-cc";
        compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
 
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &emmc;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -34,7 +39,7 @@
                compatible = "regulator-fixed";
                gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
                pinctrl-names = "default";
-               pinctrl-0 = <&sdmmc0m1_gpio>;
+               pinctrl-0 = <&sdmmc0m1_pin>;
                regulator-boot-on;
                regulator-name = "vcc_sd";
                regulator-min-microvolt = <3300000>;
@@ -45,8 +50,8 @@
        vcc_sdio: sdmmcio-regulator {
                compatible = "regulator-gpio";
                gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
-               states = <1800000 0x1
-                         3300000 0x0>;
+               states = <1800000 0x1>,
+                        <3300000 0x0>;
                regulator-name = "vcc_sdio";
                regulator-type = "voltage";
                regulator-min-microvolt = <1800000>;
@@ -86,7 +91,7 @@
        leds {
                compatible = "gpio-leds";
 
-               power {
+               power_led: led-0 {
                        label = "firefly:blue:power";
                        linux,default-trigger = "heartbeat";
                        gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
@@ -94,7 +99,7 @@
                        mode = <0x23>;
                };
 
-               user {
+               user_led: led-1 {
                        label = "firefly:yellow:user";
                        linux,default-trigger = "mmc1";
                        gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
@@ -104,6 +109,14 @@
        };
 };
 
+&analog_sound {
+       status = "okay";
+};
+
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&vdd_arm>;
 };
@@ -161,6 +174,10 @@
        status = "okay";
 };
 
+&hdmi_sound {
+       status = "okay";
+};
+
 &i2c1 {
        status = "okay";
 
@@ -270,6 +287,14 @@
        };
 };
 
+&i2s0 {
+       status = "okay";
+};
+
+&i2s1 {
+       status = "okay";
+};
+
 &io_domains {
        status = "okay";
 
@@ -334,6 +359,12 @@
 };
 
 &usb20_otg {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbdrd3 {
+       dr_mode = "host";
        status = "okay";
 };
 
arch/arm/dts/rk3328-rock-pi-e-u-boot.dtsi +2 -2
index 4fc055eacb..9d557eb988 100644
@@ -37,7 +37,7 @@
        u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
        u-boot,dm-spl;
 };
 
@@ -46,7 +46,7 @@
 };
 
 &usb_host0_xhci {
-       vbus-supply = <&vcc5v0_host_xhci>;
+       vbus-supply = <&vcc_host_5v>;
        status = "okay";
 };
 
arch/arm/dts/rk3328-rock-pi-e.dts +281 -158
index 4b9f9a8248..018a3a5075 100644
@@ -1,58 +1,118 @@
-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * (C) Copyright 2020 Radxa
+ * (C) Copyright 2020 Chen-Yu Tsai <[email protected]>
+ *
+ * Based on ./rk3328-rock64.dts, which is
+ *
+ * Copyright (c) 2017 PINE64
  */
 
 /dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+
 #include "rk3328.dtsi"
 
 / {
-       model = "Radxa Rockpi E";
-       compatible = "radxa,rock-pi-e", "rockchip,rk3328";
+       model = "Radxa ROCK Pi E";
+       compatible = "radxa,rockpi-e", "rockchip,rk3328";
+
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &emmc;
+       };
 
        chosen {
-       stdout-path = "serial2:1500000n8";
+               stdout-path = "serial2:1500000n8";
+       };
+
+       adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 0>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1750000>;
+
+               /* This button is unpopulated out of the factory. */
+               button-recovery {
+                       label = "Recovery";
+                       linux,code = <KEY_VENDOR>;
+                       press-threshold-microvolt = <10000>;
+               };
        };
 
        gmac_clkin: external-gmac-clock {
-       compatible = "fixed-clock";
-       clock-frequency = <125000000>;
-       clock-output-names = "gmac_clkin";
-       #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "gmac_clkin";
+               #clock-cells = <0>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-0 = <&led_pin>;
+               pinctrl-names = "default";
+
+               led-0 {
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
        };
 
        vcc_sd: sdmmc-regulator {
-       compatible = "regulator-fixed";
-       gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&sdmmc0m1_gpio>;
-       regulator-name = "vcc_sd";
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-min-microvolt = <3300000>;
-       regulator-max-microvolt = <3300000>;
-       vin-supply = <&vcc_io>;
+               compatible = "regulator-fixed";
+               gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdmmc0m1_pin>;
+               regulator-name = "vcc_sd";
+               regulator-boot-on;
+               vin-supply = <&vcc_io>;
        };
 
-       vcc5v0_host_xhci: vcc5v0-host-xhci-drv {
-       compatible = "regulator-fixed";
-       enable-active-high;
-       regulator-name = "vcc5v0_host_xhci";
-       gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
-       regulator-min-microvolt = <5000000>;
-       regulator-max-microvolt = <5000000>;
+       vcc_host_5v: vcc-host-5v-regulator {
+               compatible = "regulator-fixed";
+               gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&usb30_host_drv>;
+               enable-active-high;
+               regulator-name = "vcc_host_5v";
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc_sys>;
        };
 
        vcc_sys: vcc-sys {
-       compatible = "regulator-fixed";
-       regulator-name = "vcc_sys";
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-min-microvolt = <5000000>;
-       regulator-max-microvolt = <5000000>;
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       vcc_wifi: vcc-wifi-regulator {
+               compatible = "regulator-fixed";
+               gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_en>;
+               regulator-name = "vcc_wifi";
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc_io>;
        };
 };
 
+&analog_sound {
+       status = "okay";
+};
+
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&vdd_arm>;
 };
@@ -72,13 +132,11 @@
 &emmc {
        bus-width = <8>;
        cap-mmc-highspeed;
+       mmc-ddr-1_8v;
        mmc-hs200-1_8v;
-       supports-emmc;
-       disable-wp;
        non-removable;
-       num-slots = <1>;
        pinctrl-names = "default";
-       pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
+       pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
        vmmc-supply = <&vcc_io>;
        vqmmc-supply = <&vcc18_emmc>;
        status = "okay";
@@ -88,180 +146,245 @@
        assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
        assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
        clock_in_out = "input";
-       phy-supply = <&vcc_io>;
+       phy-handle = <&rtl8211e>;
        phy-mode = "rgmii";
+       phy-supply = <&vcc_io>;
        pinctrl-names = "default";
        pinctrl-0 = <&rgmiim1_pins>;
-       snps,force_thresh_dma_mode;
-       snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
-       snps,reset-active-low;
-       snps,reset-delays-us = <0 10000 50000>;
+       snps,aal;
+       snps,rxpbl = <0x4>;
+       snps,txpbl = <0x4>;
        tx_delay = <0x26>;
        rx_delay = <0x11>;
        status = "okay";
+
+       mdio {
+               compatible = "snps,dwmac-mdio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               rtl8211e: ethernet-phy@1 {
+                       reg = <1>;
+                       pinctrl-0 = <&eth_phy_int_pin>, <&eth_phy_reset_pin>;
+                       pinctrl-names = "default";
+                       interrupt-parent = <&gpio1>;
+                       interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <50000>;
+                       reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
-&i2c1 {
+&gmac2phy {
        status = "okay";
+};
 
-       rk805: rk805@18 {
-       compatible = "rockchip,rk805";
+&i2c1 {
        status = "okay";
-       reg = <0x18>;
-       interrupt-parent = <&gpio2>;
-       interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
-       #clock-cells = <1>;
-       clock-output-names = "xin32k", "rk805-clkout2";
-       pinctrl-names = "default";
-       pinctrl-0 = <&pmic_int_l>;
-       rockchip,system-power-controller;
-       wakeup-source;
-
-       vcc1-supply = <&vcc_sys>;
-       vcc2-supply = <&vcc_sys>;
-       vcc3-supply = <&vcc_sys>;
-       vcc4-supply = <&vcc_sys>;
-       vcc5-supply = <&vcc_io>;
-       vcc6-supply = <&vcc_sys>;
-
-       regulators {
-       vdd_logic: DCDC_REG1 {
-       regulator-name = "vdd_logic";
-       regulator-min-microvolt = <712500>;
-       regulator-max-microvolt = <1450000>;
-       regulator-ramp-delay = <12500>;
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-state-mem {
-       regulator-on-in-suspend;
-       regulator-suspend-microvolt = <1000000>;
-       };
-       };
-
-       vdd_arm: DCDC_REG2 {
-       regulator-name = "vdd_arm";
-       regulator-min-microvolt = <712500>;
-       regulator-max-microvolt = <1450000>;
-       regulator-ramp-delay = <12500>;
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-state-mem {
-       regulator-on-in-suspend;
-       regulator-suspend-microvolt = <950000>;
-       };
-       };
 
-       vcc_ddr: DCDC_REG3 {
-       regulator-name = "vcc_ddr";
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-state-mem {
-       regulator-on-in-suspend;
-       };
-       };
-
-       vcc_io: DCDC_REG4 {
-       regulator-name = "vcc_io";
-       regulator-min-microvolt = <3300000>;
-       regulator-max-microvolt = <3300000>;
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-state-mem {
-       regulator-on-in-suspend;
-       regulator-suspend-microvolt = <3300000>;
-       };
-       };
-
-       vcc_18: LDO_REG1 {
-       regulator-name = "vcc_18";
-       regulator-min-microvolt = <1800000>;
-       regulator-max-microvolt = <1800000>;
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-state-mem {
-       regulator-on-in-suspend;
-       regulator-suspend-microvolt = <1800000>;
-       };
-       };
-
-       vcc18_emmc: LDO_REG2 {
-       regulator-name = "vcc18_emmc";
-       regulator-min-microvolt = <1800000>;
-       regulator-max-microvolt = <1800000>;
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-state-mem {
-       regulator-on-in-suspend;
-       regulator-suspend-microvolt = <1800000>;
-       };
-       };
-
-       vdd_10: LDO_REG3 {
-       regulator-name = "vdd_10";
-       regulator-min-microvolt = <1000000>;
-       regulator-max-microvolt = <1000000>;
-       regulator-always-on;
-       regulator-boot-on;
-       regulator-state-mem {
-       regulator-on-in-suspend;
-       regulator-suspend-microvolt = <1000000>;
-       };
-       };
-       };
+       rk805: pmic@18 {
+               compatible = "rockchip,rk805";
+               reg = <0x18>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
+               #clock-cells = <1>;
+               clock-output-names = "xin32k", "rk805-clkout2";
+               gpio-controller;
+               #gpio-cells = <2>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_int_l>;
+               rockchip,system-power-controller;
+               wakeup-source;
+
+               vcc1-supply = <&vcc_sys>;
+               vcc2-supply = <&vcc_sys>;
+               vcc3-supply = <&vcc_sys>;
+               vcc4-supply = <&vcc_sys>;
+               vcc5-supply = <&vcc_io>;
+               vcc6-supply = <&vcc_sys>;
+
+               regulators {
+                       vdd_log: DCDC_REG1 {
+                               regulator-name = "vdd_log";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <712500>;
+                               regulator-max-microvolt = <1450000>;
+                               regulator-ramp-delay = <12500>;
+
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vdd_arm: DCDC_REG2 {
+                               regulator-name = "vdd_arm";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <712500>;
+                               regulator-max-microvolt = <1450000>;
+                               regulator-ramp-delay = <12500>;
+
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <950000>;
+                               };
+                       };
+
+                       vcc_ddr: DCDC_REG3 {
+                               regulator-name = "vcc_ddr";
+                               regulator-always-on;
+                               regulator-boot-on;
+
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_io: DCDC_REG4 {
+                               regulator-name = "vcc_io";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcc_18: LDO_REG1 {
+                               regulator-name = "vcc_18";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcc18_emmc: LDO_REG2 {
+                               regulator-name = "vcc18_emmc";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vdd_10: LDO_REG3 {
+                               regulator-name = "vdd_10";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+               };
        };
 };
 
-&io_domains {
+&i2s1 {
        status = "okay";
+};
 
+&io_domains {
+       pmuio-supply = <&vcc_io>;
        vccio1-supply = <&vcc_io>;
        vccio2-supply = <&vcc18_emmc>;
        vccio3-supply = <&vcc_io>;
        vccio4-supply = <&vcc_io>;
        vccio5-supply = <&vcc_io>;
        vccio6-supply = <&vcc_io>;
-       pmuio-supply = <&vcc_io>;
+       status = "okay";
 };
 
 &pinctrl {
+       ephy {
+               eth_phy_int_pin: eth-phy-int-pin {
+                       rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+
+               eth_phy_reset_pin: eth-phy-reset-pin {
+                       rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
+
+       leds {
+               led_pin: led-pin {
+                       rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        pmic {
-       pmic_int_l: pmic-int-l {
-       rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
+               pmic_int_l: pmic-int-l {
+                       rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
        };
+
+       usb3 {
+               usb30_host_drv: usb30-host-drv {
+                       rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       wifi {
+               wifi_en: wifi-en {
+                       rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
        };
 };
 
 &sdmmc {
        bus-width = <4>;
-       cap-mmc-highspeed;
        cap-sd-highspeed;
-       card-detect-delay = <200>;
        disable-wp;
-       max-frequency = <150000000>;
-       num-slots = <1>;
        pinctrl-names = "default";
-       pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
-       supports-sd;
+       pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
        vmmc-supply = <&vcc_sd>;
        status = "okay";
 };
 
 &saradc {
+       vref-supply = <&vcc_18>;
        status = "okay";
 };
 
-&uart2 {
+&tsadc {
        status = "okay";
 };
 
-&usb20_otg {
+&u2phy {
        status = "okay";
 };
 
-&usb_host0_ehci {
+&u2phy_host {
        status = "okay";
 };
 
-&usb_host0_ohci {
+&uart2 {
+       status = "okay";
+};
+
+&usbdrd3 {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usb_host0_ehci {
        status = "okay";
 };
arch/arm/dts/rk3328-rock64-u-boot.dtsi +1 -1
index 2af32aea05..3c3b1370e3 100644
@@ -40,7 +40,7 @@
        u-boot,dm-spl;
 };
 
-&sdmmc0m1_gpio {
+&sdmmc0m1_pin {
        u-boot,dm-spl;
 };
 
arch/arm/dts/rk3328-rock64.dts +37 -35
index ebf3eb222e..1b0f7e4551 100644
@@ -10,6 +10,11 @@
        model = "Pine64 Rock64";
        compatible = "pine64,rock64", "rockchip,rk3328";
 
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &emmc;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -25,7 +30,7 @@
                compatible = "regulator-fixed";
                gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
                pinctrl-names = "default";
-               pinctrl-0 = <&sdmmc0m1_gpio>;
+               pinctrl-0 = <&sdmmc0m1_pin>;
                regulator-name = "vcc_sd";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
@@ -73,45 +78,43 @@
        leds {
                compatible = "gpio-leds";
 
-               power {
+               power_led: led-0 {
                        gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "mmc0";
                };
 
-               standby {
+               standby_led: led-1 {
                        gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "heartbeat";
                };
        };
 
-       sound {
-               compatible = "audio-graph-card";
-               label = "rockchip,rk3328";
-               dais = <&i2s1_p0
-                       &spdif_p0>;
+       spdif_sound: spdif-sound {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "SPDIF";
+
+               simple-audio-card,cpu {
+                       sound-dai = <&spdif>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&spdif_dit>;
+               };
        };
 
-       spdif-dit {
+       spdif_dit: spdif-dit {
                compatible = "linux,spdif-dit";
                #sound-dai-cells = <0>;
-
-               port {
-                       dit_p0_0: endpoint {
-                               remote-endpoint = <&spdif_p0_0>;
-                       };
-               };
        };
 };
 
+&analog_sound {
+       status = "okay";
+};
+
 &codec {
        mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
        status = "okay";
-
-       port@0 {
-               codec_p0_0: endpoint {
-                       remote-endpoint = <&i2s1_p0_0>;
-               };
-       };
 };
 
 &cpu0 {
@@ -163,6 +166,10 @@
        status = "okay";
 };
 
+&hdmi_sound {
+       status = "okay";
+};
+
 &hdmiphy {
        status = "okay";
 };
@@ -278,16 +285,12 @@
        };
 };
 
-&i2s1 {
+&i2s0 {
        status = "okay";
+};
 
-       i2s1_p0: port {
-               i2s1_p0_0: endpoint {
-                       dai-format = "i2s";
-                       mclk-fs = <256>;
-                       remote-endpoint = <&codec_p0_0>;
-               };
-       };
+&i2s1 {
+       status = "okay";
 };
 
 &io_domains {
@@ -337,12 +340,6 @@
 &spdif {
        pinctrl-0 = <&spdifm0_tx>;
        status = "okay";
-
-       spdif_p0: port {
-               spdif_p0_0: endpoint {
-                       remote-endpoint = <&dit_p0_0>;
-               };
-       };
 };
 
 &spi0 {
@@ -384,6 +381,11 @@
        status = "okay";
 };
 
+&usbdrd3 {
+       dr_mode = "host";
+       status = "okay";
+};
+
 &usb_host0_ehci {
        status = "okay";
 };
arch/arm/dts/rk3328.dtsi +63 -47
index 945387e579..27e45d5886 100644
@@ -142,23 +142,6 @@
                };
        };
 
-       amba: bus {
-               compatible = "simple-bus";
-               #address-cells = <2>;
-               #size-cells = <2>;
-               ranges;
-
-               dmac: dmac@ff1f0000 {
-                       compatible = "arm,pl330", "arm,primecell";
-                       reg = <0x0 0xff1f0000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cru ACLK_DMAC>;
-                       clock-names = "apb_pclk";
-                       #dma-cells = <1>;
-               };
-       };
-
        analog_sound: analog-sound {
                compatible = "simple-audio-card";
                simple-audio-card,format = "i2s";
@@ -305,7 +288,7 @@
                        status = "disabled";
                };
 
-               grf_gpio: grf-gpio {
+               grf_gpio: gpio {
                        compatible = "rockchip,rk3328-grf-gpio";
                        gpio-controller;
                        #gpio-cells = <2>;
@@ -317,15 +300,18 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       pd_hevc@RK3328_PD_HEVC {
+                       power-domain@RK3328_PD_HEVC {
                                reg = <RK3328_PD_HEVC>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_video@RK3328_PD_VIDEO {
+                       power-domain@RK3328_PD_VIDEO {
                                reg = <RK3328_PD_VIDEO>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_vpu@RK3328_PD_VPU {
+                       power-domain@RK3328_PD_VPU {
                                reg = <RK3328_PD_VPU>;
                                clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
+                               #power-domain-cells = <0>;
                        };
                };
 
@@ -452,7 +438,7 @@
        };
 
        wdt: watchdog@ff1a0000 {
-               compatible = "snps,dw-wdt";
+               compatible = "rockchip,rk3328-wdt", "snps,dw-wdt";
                reg = <0x0 0xff1a0000 0x0 0x100>;
                interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&cru PCLK_WDT>;
@@ -503,6 +489,17 @@
                status = "disabled";
        };
 
+       dmac: dmac@ff1f0000 {
+               compatible = "arm,pl330", "arm,primecell";
+               reg = <0x0 0xff1f0000 0x0 0x4000>;
+               interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+               arm,pl330-periph-burst;
+               clocks = <&cru ACLK_DMAC>;
+               clock-names = "apb_pclk";
+               #dma-cells = <1>;
+       };
+
        thermal-zones {
                soc_thermal: soc-thermal {
                        polling-delay-passive = <20>;
@@ -552,9 +549,9 @@
                clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
                clock-names = "tsadc", "apb_pclk";
                pinctrl-names = "init", "default", "sleep";
-               pinctrl-0 = <&otp_gpio>;
+               pinctrl-0 = <&otp_pin>;
                pinctrl-1 = <&otp_out>;
-               pinctrl-2 = <&otp_gpio>;
+               pinctrl-2 = <&otp_pin>;
                resets = <&cru SRST_TSADC>;
                reset-names = "tsadc-apb";
                rockchip,grf = <&grf>;
@@ -822,7 +819,7 @@
                #address-cells = <1>;
                #size-cells = <1>;
 
-               u2phy: usb2-phy@100 {
+               u2phy: usb2phy@100 {
                        compatible = "rockchip,rk3328-usb2phy";
                        reg = <0x100 0x10>;
                        clocks = <&xin24m>;
@@ -922,11 +919,12 @@
                              "mac_clk_tx", "clk_mac_ref",
                              "aclk_mac", "pclk_mac",
                              "clk_macphy";
-               resets = <&cru SRST_GMAC2PHY_A>, <&cru SRST_MACPHY>;
-               reset-names = "stmmaceth", "mac-phy";
+               resets = <&cru SRST_GMAC2PHY_A>;
+               reset-names = "stmmaceth";
                phy-mode = "rmii";
                phy-handle = <&phy>;
                snps,txpbl = <0x4>;
+               clock_in_out = "output";
                status = "disabled";
 
                mdio {
@@ -934,7 +932,7 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       phy: phy@0 {
+                       phy: ethernet-phy@0 {
                                compatible = "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22";
                                reg = <0>;
                                clocks = <&cru SCLK_MAC2PHY_OUT>;
@@ -966,6 +964,25 @@
                status = "disabled";
        };
 
+       usbdrd3: usb@ff600000 {
+               compatible = "rockchip,rk3328-dwc3", "snps,dwc3";
+               reg = <0x0 0xff600000 0x0 0x100000>;
+               interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>,
+                        <&cru ACLK_USB3OTG>;
+               clock-names = "ref_clk", "suspend_clk",
+                             "bus_clk";
+               dr_mode = "otg";
+               phy_type = "utmi_wide";
+               snps,dis-del-phy-power-chg-quirk;
+               snps,dis_enblslpm_quirk;
+               snps,dis-tx-ipgap-linecheck-quirk;
+               snps,dis-u2-freeclk-exists-quirk;
+               snps,dis_u2_susphy_quirk;
+               snps,dis_u3_susphy_quirk;
+               status = "disabled";
+       };
+
        /*
         * U-boot Specific Change
         *
@@ -1163,7 +1180,7 @@
                                rockchip,pins = <0 RK_PA5 2 &pcfg_pull_none>,
                                                <0 RK_PA6 2 &pcfg_pull_none>;
                        };
-                       i2c3_gpio: i2c3-gpio {
+                       i2c3_pins: i2c3-pins {
                                rockchip,pins =
                                        <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>,
                                        <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -1234,7 +1251,7 @@
                };
 
                tsadc {
-                       otp_gpio: otp-gpio {
+                       otp_pin: otp-pin {
                                rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
                        };
 
@@ -1245,8 +1262,8 @@
 
                uart0 {
                        uart0_xfer: uart0-xfer {
-                               rockchip,pins = <1 RK_PB1 1 &pcfg_pull_up>,
-                                               <1 RK_PB0 1 &pcfg_pull_none>;
+                               rockchip,pins = <1 RK_PB1 1 &pcfg_pull_none>,
+                                               <1 RK_PB0 1 &pcfg_pull_up>;
                        };
 
                        uart0_cts: uart0-cts {
@@ -1257,15 +1274,15 @@
                                rockchip,pins = <1 RK_PB2 1 &pcfg_pull_none>;
                        };
 
-                       uart0_rts_gpio: uart0-rts-gpio {
+                       uart0_rts_pin: uart0-rts-pin {
                                rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
                        };
                };
 
                uart1 {
                        uart1_xfer: uart1-xfer {
-                               rockchip,pins = <3 RK_PA4 4 &pcfg_pull_up>,
-                                               <3 RK_PA6 4 &pcfg_pull_none>;
+                               rockchip,pins = <3 RK_PA4 4 &pcfg_pull_none>,
+                                               <3 RK_PA6 4 &pcfg_pull_up>;
                        };
 
                        uart1_cts: uart1-cts {
@@ -1276,22 +1293,22 @@
                                rockchip,pins = <3 RK_PA5 4 &pcfg_pull_none>;
                        };
 
-                       uart1_rts_gpio: uart1-rts-gpio {
+                       uart1_rts_pin: uart1-rts-pin {
                                rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
                        };
                };
 
                uart2-0 {
                        uart2m0_xfer: uart2m0-xfer {
-                               rockchip,pins = <1 RK_PA0 2 &pcfg_pull_up>,
-                                               <1 RK_PA1 2 &pcfg_pull_none>;
+                               rockchip,pins = <1 RK_PA0 2 &pcfg_pull_none>,
+                                               <1 RK_PA1 2 &pcfg_pull_up>;
                        };
                };
 
                uart2-1 {
                        uart2m1_xfer: uart2m1-xfer {
-                               rockchip,pins = <2 RK_PA0 1 &pcfg_pull_up>,
-                                               <2 RK_PA1 1 &pcfg_pull_none>;
+                               rockchip,pins = <2 RK_PA0 1 &pcfg_pull_none>,
+                                               <2 RK_PA1 1 &pcfg_pull_up>;
                        };
                };
 
@@ -1502,7 +1519,7 @@
                                rockchip,pins = <2 RK_PA7 1 &pcfg_pull_up_4ma>;
                        };
 
-                       sdmmc0m0_gpio: sdmmc0m0-gpio {
+                       sdmmc0m0_pin: sdmmc0m0-pin {
                                rockchip,pins = <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up_4ma>;
                        };
                };
@@ -1512,7 +1529,7 @@
                                rockchip,pins = <0 RK_PD6 3 &pcfg_pull_up_4ma>;
                        };
 
-                       sdmmc0m1_gpio: sdmmc0m1-gpio {
+                       sdmmc0m1_pin: sdmmc0m1-pin {
                                rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up_4ma>;
                        };
                };
@@ -1545,7 +1562,7 @@
                                                <1 RK_PA3 1 &pcfg_pull_up_8ma>;
                        };
 
-                       sdmmc0_gpio: sdmmc0-gpio {
+                       sdmmc0_pins: sdmmc0-pins {
                                rockchip,pins =
                                        <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
                                        <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
@@ -1587,7 +1604,7 @@
                                        <3 RK_PA7 3 &pcfg_pull_up_4ma>;
                        };
 
-                       sdmmc0ext_gpio: sdmmc0ext-gpio {
+                       sdmmc0ext_pins: sdmmc0ext-pins {
                                rockchip,pins =
                                        <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
                                        <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
@@ -1632,7 +1649,7 @@
                                                <1 RK_PC1 1 &pcfg_pull_up_8ma>;
                        };
 
-                       sdmmc1_gpio: sdmmc1-gpio {
+                       sdmmc1_pins: sdmmc1-pins {
                                rockchip,pins =
                                        <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
                                        <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
@@ -1826,7 +1843,7 @@
                        tsadc_int: tsadc-int {
                                rockchip,pins = <2 RK_PB5 2 &pcfg_pull_none>;
                        };
-                       tsadc_gpio: tsadc-gpio {
+                       tsadc_pin: tsadc-pin {
                                rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
                        };
                };
--

2.31.1

#3 lore raw

PATCH 3/3 arm: dts: sync the Rockhip 3368 SoCs from Linux

In reply to Peter Robinson

Sync the rk3368 DTs and associated bits from 5.14-rc1.

---
 arch/arm/dts/rk3368-geekbox.dts     |  70 +++--------
 arch/arm/dts/rk3368-lion-haikou.dts |   4 +
 arch/arm/dts/rk3368-lion.dtsi       |  21 +---
 arch/arm/dts/rk3368-px5-evb.dts     | 178 +++++++++++-----------------
 arch/arm/dts/rk3368.dtsi            |  65 +++++-----
 5 files changed, 118 insertions(+), 220 deletions(-)
arch/arm/dts/rk3368-geekbox.dts +16 -54
index 46cdddfcea..62aa97a0b8 100644
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016 Andreas Färber
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
@@ -48,6 +11,10 @@
 	model = "GeekBox";
 	compatible = "geekbuying,geekbox", "rockchip,rk3368";
 
+	aliases {
+		mmc0 = &emmc;
+	};
+
 	chosen {
 		stdout-path = "serial2:115200n8";
 	};
@@ -66,7 +33,7 @@
 
 	ir: ir-receiver {
 		compatible = "gpio-ir-receiver";
-		gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
+		gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&ir_int>;
 	};
@@ -77,7 +44,7 @@
 		pinctrl-0 = <&pwr_key>;
 
 		power {
-			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
 			label = "GPIO Power";
 			linux,code = <KEY_POWER>;
 			wakeup-source;
@@ -87,14 +54,14 @@
 	leds: gpio-leds {
 		compatible = "gpio-leds";
 
-		blue {
-			gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+		blue_led: led-0 {
+			gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
 			label = "geekbox:blue:led";
 			default-state = "on";
 		};
 
-		red {
-			gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
+		red_led: led-1 {
+			gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
 			label = "geekbox:red:led";
 			default-state = "off";
 		};
@@ -115,10 +82,7 @@
 	bus-width = <8>;
 	cap-mmc-highspeed;
 	clock-frequency = <150000000>;
-	disable-wp;
-	keep-power-in-suspend;
 	non-removable;
-	num-slots = <1>;
 	vmmc-supply = <&vcc_io>;
 	vqmmc-supply = <&vcc18_flash>;
 	pinctrl-names = "default";
@@ -147,7 +111,7 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
 		interrupt-parent = <&gpio0>;
-		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+		interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
 		rockchip,system-power-controller;
 		vcc1-supply = <&vcc_sys>;
 		vcc2-supply = <&vcc_sys>;
@@ -258,8 +222,6 @@
 			};
 
 			vcc_sd: SWITCH_REG1 {
-				regulator-always-on;
-				regulator-boot-on;
 				regulator-name = "vcc_sd";
 			};
 
@@ -275,23 +237,23 @@
 &pinctrl {
 	ir {
 		ir_int: ir-int {
-			rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_none>;
+			rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
 
 	keys {
 		pwr_key: pwr-key {
-			rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_none>;
+			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
 
 	pmic {
 		pmic_sleep: pmic-sleep {
-			rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
+			rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>;
 		};
 
 		pmic_int: pmic-int {
-			rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
 		};
 	};
 };
arch/arm/dts/rk3368-lion-haikou.dts +4 -0
index 7fcb1eacea..cae01d35b9 100644
@@ -10,6 +10,10 @@
 	model = "Theobroma Systems RK3368-uQ7 Baseboard";
 	compatible = "tsd,rk3368-lion-haikou", "rockchip,rk3368";
 
+	aliases {
+		mmc1 = &sdmmc;
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
arch/arm/dts/rk3368-lion.dtsi +4 -17
index 532e6a6828..bcd7977fb0 100644
@@ -7,6 +7,10 @@
 #include "rk3368.dtsi"
 
 / {
+	aliases {
+		mmc0 = &emmc;
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
@@ -150,7 +154,6 @@
 	assigned-clocks = <&cru SCLK_MAC>;
 	assigned-clock-parents = <&ext_gmac>;
 	clock_in_out = "input";
-	phy-handle = <&phy0>;
 	phy-supply = <&vcc33_io>;
 	phy-mode = "rgmii";
 	pinctrl-names = "default";
@@ -161,22 +164,6 @@
 	tx_delay = <0x10>;
 	rx_delay = <0x10>;
 	status = "okay";
-
-	mdio {
-		compatible = "snps,dwmac-mdio";
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		/* Microsemi VSC8531-02 */
-		phy0: phy@0 {
-		compatible = "ethernet-phy-id0007.0570";
-			reg = <0>;
-			vsc8531,clk-out-frequency = <125000000>;
-			vsc8531,edge-slowdown = <7>;
-			vsc8531,led-0-mode = <1>;
-			vsc8531,led-1-mode = <2>;
-		};
-	};
 };
 
 &i2c0 {
arch/arm/dts/rk3368-px5-evb.dts +66 -112

274 lines not on this page · raw message

arch/arm/dts/rk3368.dtsi +28 -37

120 lines not on this page · raw message

Signature · 1 line
2.31.1
Reviewed-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] arm: dts: sync the Rockhip 3368 SoCs from Linux

Quoted 4 lines · Peter Robinson <[email protected]> 于2021年7月22日周四 下午11:21写道:

Sync the rk3368 DTs and associated bits from 5.14-rc1.

Thanks,
- Kever

Quoted 645 lines
---
 arch/arm/dts/rk3368-geekbox.dts     |  70 +++--------
 arch/arm/dts/rk3368-lion-haikou.dts |   4 +
 arch/arm/dts/rk3368-lion.dtsi       |  21 +---
 arch/arm/dts/rk3368-px5-evb.dts     | 178 +++++++++++-----------------
 arch/arm/dts/rk3368.dtsi            |  65 +++++-----
 5 files changed, 118 insertions(+), 220 deletions(-)
arch/arm/dts/rk3368-geekbox.dts +16 -54
index 46cdddfcea..62aa97a0b8 100644
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
  * Copyright (c) 2016 Andreas Färber
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /dts-v1/;
@@ -48,6 +11,10 @@
        model = "GeekBox";
        compatible = "geekbuying,geekbox", "rockchip,rk3368";
 
+       aliases {
+               mmc0 = &emmc;
+       };
+
        chosen {
                stdout-path = "serial2:115200n8";
        };
@@ -66,7 +33,7 @@
 
        ir: ir-receiver {
                compatible = "gpio-ir-receiver";
-               gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
+               gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
                pinctrl-names = "default";
                pinctrl-0 = <&ir_int>;
        };
@@ -77,7 +44,7 @@
                pinctrl-0 = <&pwr_key>;
 
                power {
-                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
                        label = "GPIO Power";
                        linux,code = <KEY_POWER>;
                        wakeup-source;
@@ -87,14 +54,14 @@
        leds: gpio-leds {
                compatible = "gpio-leds";
 
-               blue {
-                       gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+               blue_led: led-0 {
+                       gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
                        label = "geekbox:blue:led";
                        default-state = "on";
                };
 
-               red {
-                       gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
+               red_led: led-1 {
+                       gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
                        label = "geekbox:red:led";
                        default-state = "off";
                };
@@ -115,10 +82,7 @@
        bus-width = <8>;
        cap-mmc-highspeed;
        clock-frequency = <150000000>;
-       disable-wp;
-       keep-power-in-suspend;
        non-removable;
-       num-slots = <1>;
        vmmc-supply = <&vcc_io>;
        vqmmc-supply = <&vcc18_flash>;
        pinctrl-names = "default";
@@ -147,7 +111,7 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
                interrupt-parent = <&gpio0>;
-               interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
+               interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
                rockchip,system-power-controller;
                vcc1-supply = <&vcc_sys>;
                vcc2-supply = <&vcc_sys>;
@@ -258,8 +222,6 @@
                        };
 
                        vcc_sd: SWITCH_REG1 {
-                               regulator-always-on;
-                               regulator-boot-on;
                                regulator-name = "vcc_sd";
                        };
 
@@ -275,23 +237,23 @@
 &pinctrl {
        ir {
                ir_int: ir-int {
-                       rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_none>;
+                       rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        keys {
                pwr_key: pwr-key {
-                       rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_none>;
+                       rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        pmic {
                pmic_sleep: pmic-sleep {
-                       rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
+                       rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>;
                };
 
                pmic_int: pmic-int {
-                       rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 };
arch/arm/dts/rk3368-lion-haikou.dts +4 -0
index 7fcb1eacea..cae01d35b9 100644
@@ -10,6 +10,10 @@
        model = "Theobroma Systems RK3368-uQ7 Baseboard";
        compatible = "tsd,rk3368-lion-haikou", "rockchip,rk3368";
 
+       aliases {
+               mmc1 = &sdmmc;
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
arch/arm/dts/rk3368-lion.dtsi +4 -17
index 532e6a6828..bcd7977fb0 100644
@@ -7,6 +7,10 @@
 #include "rk3368.dtsi"
 
 / {
+       aliases {
+               mmc0 = &emmc;
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
@@ -150,7 +154,6 @@
        assigned-clocks = <&cru SCLK_MAC>;
        assigned-clock-parents = <&ext_gmac>;
        clock_in_out = "input";
-       phy-handle = <&phy0>;
        phy-supply = <&vcc33_io>;
        phy-mode = "rgmii";
        pinctrl-names = "default";
@@ -161,22 +164,6 @@
        tx_delay = <0x10>;
        rx_delay = <0x10>;
        status = "okay";
-
-       mdio {
-               compatible = "snps,dwmac-mdio";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               /* Microsemi VSC8531-02 */
-               phy0: phy@0 {
-               compatible = "ethernet-phy-id0007.0570";
-                       reg = <0>;
-                       vsc8531,clk-out-frequency = <125000000>;
-                       vsc8531,edge-slowdown = <7>;
-                       vsc8531,led-0-mode = <1>;
-                       vsc8531,led-1-mode = <2>;
-               };
-       };
 };
 
 &i2c0 {
arch/arm/dts/rk3368-px5-evb.dts +66 -112
index e9c5ebad47..5ccaa5f7a3 100644
@@ -1,43 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Copyright (c) 2017 Rockchip Electronics Co., Ltd
- *
- * This file is dual-licensed: you can use it either under the terms
- * of the GPL or the X11 license, at your option. Note that this dual
- * licensing only applies to this file, and not this project as a
- * whole.
- *
- *  a) This file is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License as
- *     published by the Free Software Foundation; either version 2 of the
- *     License, or (at your option) any later version.
- *
- *     This file is distributed in the hope that it will be useful,
- *     but WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *     GNU General Public License for more details.
- *
- * Or, alternatively,
- *
- *  b) Permission is hereby granted, free of charge, to any person
- *     obtaining a copy of this software and associated documentation
- *     files (the "Software"), to deal in the Software without
- *     restriction, including without limitation the rights to use,
- *     copy, modify, merge, publish, distribute, sublicense, and/or
- *     sell copies of the Software, and to permit persons to whom the
- *     Software is furnished to do so, subject to the following
- *     conditions:
- *
- *     The above copyright notice and this permission notice shall be
- *     included in all copies or substantial portions of the Software.
- *
- *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- *     OTHER DEALINGS IN THE SOFTWARE.
+ * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
  */
 
 /dts-v1/;
@@ -45,30 +8,21 @@
 #include <dt-bindings/input/input.h>
 
 / {
-       model = "PX5 EVB";
+       model = "Rockchip PX5 EVB";
        compatible = "rockchip,px5-evb", "rockchip,px5", "rockchip,rk3368";
 
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &emmc;
+       };
+
        chosen {
                stdout-path = "serial4:115200n8";
        };
 
        memory@0 {
-               device_type = "memory";
                reg = <0x0 0x0 0x0 0x40000000>;
-       };
-
-       ext_gmac: gmac-clk {
-               compatible = "fixed-clock";
-               clock-frequency = <125000000>;
-               clock-output-names = "ext_gmac";
-               #clock-cells = <0>;
-       };
-
-       ir: ir-receiver {
-               compatible = "gpio-ir-receiver";
-               gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;
-               pinctrl-names = "default";
-               pinctrl-0 = <&ir_int>;
+               device_type = "memory";
        };
 
        keys: gpio-keys {
@@ -77,29 +31,13 @@
                pinctrl-0 = <&pwr_key>;
 
                power {
-                       gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+                       gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
                        label = "GPIO Power";
                        linux,code = <KEY_POWER>;
                        wakeup-source;
                };
        };
 
-       leds: gpio-leds {
-               compatible = "gpio-leds";
-
-               blue {
-                       gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
-                       label = "geekbox:blue:led";
-                       default-state = "on";
-               };
-
-               red {
-                       gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
-                       label = "geekbox:red:led";
-                       default-state = "off";
-               };
-       };
-
        vcc_sys: vcc-sys-regulator {
                compatible = "regulator-fixed";
                regulator-name = "vcc_sys";
@@ -115,27 +53,14 @@
        bus-width = <8>;
        cap-mmc-highspeed;
        clock-frequency = <150000000>;
-       disable-wp;
-       keep-power-in-suspend;
+       mmc-hs200-1_8v;
+       no-sdio;
+       no-sd;
        non-removable;
-       num-slots = <1>;
-       vmmc-supply = <&vcc_io>;
-       vqmmc-supply = <&vcc18_flash>;
        pinctrl-names = "default";
        pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
-};
-
-&gmac {
-       status = "okay";
-       phy-supply = <&vcc_lan>;
-       phy-mode = "rgmii";
-       clock_in_out = "input";
-       assigned-clocks = <&cru SCLK_MAC>;
-       assigned-clock-parents = <&ext_gmac>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&rgmii_pins>;
-       tx_delay = <0x30>;
-       rx_delay = <0x10>;
+       vmmc-supply = <&vcc_io>;
+       vqmmc-supply = <&vcc18_flash>;
 };
 
 &i2c0 {
@@ -144,10 +69,10 @@
        rk808: pmic@1b {
                compatible = "rockchip,rk808";
                reg = <0x1b>;
+               interrupt-parent = <&gpio0>;
+               interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
                pinctrl-names = "default";
                pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
-               interrupt-parent = <&gpio0>;
-               interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
                rockchip,system-power-controller;
                vcc1-supply = <&vcc_sys>;
                vcc2-supply = <&vcc_sys>;
@@ -202,12 +127,12 @@
                                regulator-name = "vcc18_flash";
                        };
 
-                       vcc33_lcd: LDO_REG2 {
+                       vcca_33: LDO_REG2 {
                                regulator-always-on;
                                regulator-boot-on;
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-name = "vcc33_lcd";
+                               regulator-name = "vcca_33";
                        };
 
                        vdd_10: LDO_REG3 {
@@ -218,11 +143,10 @@
                                regulator-name = "vdd_10";
                        };
 
-                       vcca_18: LDO_REG4 {
-                               regulator-boot-on;
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-name = "vcca_18";
+                       avdd_33: LDO_REG4 {
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "avdd_33";
                        };
 
                        vccio_sd: LDO_REG5 {
@@ -258,46 +182,76 @@
                        };
 
                        vcc_sd: SWITCH_REG1 {
-                               regulator-always-on;
-                               regulator-boot-on;
                                regulator-name = "vcc_sd";
                        };
 
-                       vcc_lan: SWITCH_REG2 {
+                       vcc33_lcd: SWITCH_REG2 {
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-name = "vcc_lan";
+                               regulator-name = "vcc33_lcd";
                        };
                };
        };
 };
 
-&pinctrl {
-       ir {
-               ir_int: ir-int {
-                       rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_none>;
-               };
+&i2c1 {
+       status = "okay";
+
+       accelerometer@18 {
+               compatible = "bosch,bma250";
+               reg = <0x18>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <RK_PC1 IRQ_TYPE_LEVEL_LOW>;
        };
+};
 
+&i2c2 {
+       status = "okay";
+
+       gsl1680: touchscreen@40 {
+               compatible = "silead,gsl1680";
+               reg = <0x40>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <RK_PD4 IRQ_TYPE_EDGE_FALLING>;
+               power-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
+               touchscreen-size-x = <800>;
+               touchscreen-size-y = <1280>;
+               silead,max-fingers = <5>;
+       };
+};
+
+&pinctrl {
        keys {
                pwr_key: pwr-key {
-                       rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_none>;
+                       rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        pmic {
                pmic_sleep: pmic-sleep {
-                       rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
+                       rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>;
                };
 
                pmic_int: pmic-int {
-                       rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+                       rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 };
 
-&saradc {
+&sdmmc {
        status = "okay";
+       bus-width = <4>;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       card-detect-delay = <200>;
+       no-sdio;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_bus4>, <&sdmmc_cd>;
+       rockchip,default-sample-phase = <90>;
+       vmmc-supply = <&vcc_sd>;
+       vqmmc-supply = <&vccio_sd>;
 };
 
 &tsadc {
arch/arm/dts/rk3368.dtsi +28 -38
index cd2c322071..4c64fbefb4 100644
@@ -136,37 +136,6 @@
                };
        };
 
-       amba: bus {
-               compatible = "simple-bus";
-               #address-cells = <2>;
-               #size-cells = <2>;
-               ranges;
-
-               dmac_peri: dma-controller@ff250000 {
-                       compatible = "arm,pl330", "arm,primecell";
-                       reg = <0x0 0xff250000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
-                       #dma-cells = <1>;
-                       arm,pl330-broken-no-flushp;
-                       arm,pl330-periph-burst;
-                       clocks = <&cru ACLK_DMAC_PERI>;
-                       clock-names = "apb_pclk";
-               };
-
-               dmac_bus: dma-controller@ff600000 {
-                       compatible = "arm,pl330", "arm,primecell";
-                       reg = <0x0 0xff600000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
-                       #dma-cells = <1>;
-                       arm,pl330-broken-no-flushp;
-                       arm,pl330-periph-burst;
-                       clocks = <&cru ACLK_DMAC_BUS>;
-                       clock-names = "apb_pclk";
-               };
-       };
-
        arm-pmu {
                compatible = "arm,armv8-pmuv3";
                interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
@@ -399,8 +368,20 @@
                status = "disabled";
        };
 
+       dmac_peri: dma-controller@ff250000 {
+               compatible = "arm,pl330", "arm,primecell";
+               reg = <0x0 0xff250000 0x0 0x4000>;
+               interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+               #dma-cells = <1>;
+               arm,pl330-broken-no-flushp;
+               arm,pl330-periph-burst;
+               clocks = <&cru ACLK_DMAC_PERI>;
+               clock-names = "apb_pclk";
+       };
+
        thermal-zones {
-               cpu {
+               cpu_thermal: cpu-thermal {
                        polling-delay-passive = <100>; /* milliseconds */
                        polling-delay = <5000>; /* milliseconds */
 
@@ -444,7 +425,7 @@
                        };
                };
 
-               gpu {
+               gpu_thermal: gpu-thermal {
                        polling-delay-passive = <100>; /* milliseconds */
                        polling-delay = <5000>; /* milliseconds */
 
@@ -532,6 +513,18 @@
                status = "disabled";
        };
 
+       dmac_bus: dma-controller@ff600000 {
+               compatible = "arm,pl330", "arm,primecell";
+               reg = <0x0 0xff600000 0x0 0x4000>;
+               interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+               #dma-cells = <1>;
+               arm,pl330-broken-no-flushp;
+               arm,pl330-periph-burst;
+               clocks = <&cru ACLK_DMAC_BUS>;
+               clock-names = "apb_pclk";
+       };
+
        i2c0: i2c@ff650000 {
                compatible = "rockchip,rk3368-i2c", "rockchip,rk3288-i2c";
                reg = <0x0 0xff650000 0x0 0x1000>;
@@ -565,7 +558,6 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pwm0_pin>;
                clocks = <&cru PCLK_PWM1>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -576,7 +568,6 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pwm1_pin>;
                clocks = <&cru PCLK_PWM1>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -585,7 +576,6 @@
                reg = <0x0 0xff680020 0x0 0x10>;
                #pwm-cells = <3>;
                clocks = <&cru PCLK_PWM1>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -596,7 +586,6 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pwm3_pin>;
                clocks = <&cru PCLK_PWM1>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -675,6 +664,8 @@
                compatible = "rockchip,rk3368-timer", "rockchip,rk3288-timer";
                reg = <0x0 0xff810000 0x0 0x20>;
                interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER00>;
+               clock-names = "pclk", "timer";
        };
 
        spdif: spdif@ff880000 {
--

2.31.1

Reviewed-by on v1 1/3
#5 lore raw
In reply to Peter Robinson
Quoted 4 lines · Peter Robinson <[email protected]> 于2021年7月22日周四 下午11:21写道:

Sync the rk3399 DTs and associated bits from 5.14-rc1.

Thanks,
- Kever

Quoted 3,141 lines
---
 arch/arm/dts/rk3399-evb.dts                   |   4 +
 arch/arm/dts/rk3399-ficus.dts                 |  29 +-
 arch/arm/dts/rk3399-firefly.dts               | 178 ++++++++++--
 arch/arm/dts/rk3399-gru.dtsi                  |  14 +-
 arch/arm/dts/rk3399-khadas-edge.dtsi          |  40 ++-
 arch/arm/dts/rk3399-leez-p710.dts             |  14 +-
 arch/arm/dts/rk3399-nanopc-t4.dts             |   1 +
 arch/arm/dts/rk3399-nanopi-r4s.dts            | 135 +++++----
 arch/arm/dts/rk3399-nanopi4.dtsi              |  18 +-
 arch/arm/dts/rk3399-opp.dtsi                  |  40 +--
 arch/arm/dts/rk3399-orangepi.dts              |  72 ++++-
 arch/arm/dts/rk3399-pinebook-pro.dts          | 120 +++++---
 arch/arm/dts/rk3399-puma-haikou.dts           |  10 +-
 arch/arm/dts/rk3399-puma.dtsi                 |  61 +---
 arch/arm/dts/rk3399-roc-pc-mezzanine.dts      |  22 +-
 arch/arm/dts/rk3399-roc-pc.dtsi               |  59 +++-
 arch/arm/dts/rk3399-rock-pi-4.dtsi            |  29 +-
 arch/arm/dts/rk3399-rock-pi-4a.dts            |   2 +-
 arch/arm/dts/rk3399-rock-pi-4b.dts            |   6 +-
 arch/arm/dts/rk3399-rock-pi-4c.dts            |   6 +-
 arch/arm/dts/rk3399-rock960.dts               |  82 ++----
 arch/arm/dts/rk3399-rock960.dtsi              |  10 +-
 arch/arm/dts/rk3399-rockpro64.dtsi            |  95 ++++++-
 arch/arm/dts/rk3399.dtsi                      | 269 +++++++++++-------
 arch/arm/dts/rk3399pro-vmarc-som.dtsi         |  22 +-
 .../dts/rockchip-radxa-dalang-carrier.dtsi    |  21 ++
 26 files changed, 897 insertions(+), 462 deletions(-)
arch/arm/dts/rk3399-evb.dts +4 -0
index 694b0d08d6..7b717ebec8 100644
@@ -11,6 +11,10 @@
        model = "Rockchip RK3399 Evaluation Board";
        compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
 
+       aliases {
+               mmc0 = &sdhci;
+       };
+
        backlight: backlight {
                compatible = "pwm-backlight";
                brightness-levels = <
arch/arm/dts/rk3399-ficus.dts +15 -14
index ebe2ee77ba..1ce85a5816 100644
@@ -27,42 +27,43 @@
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
-                           <&user_led4>, <&wlan_led>, <&bt_led>;
+               pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>,
+                           <&user_led3_pin>, <&user_led4_pin>,
+                           <&wlan_led_pin>, <&bt_led_pin>;
 
-               user_led1 {
+               user_led1: led-1 {
                        label = "red:user1";
                        gpios = <&gpio4 25 0>;
                        linux,default-trigger = "heartbeat";
                };
 
-               user_led2 {
+               user_led2: led-2 {
                        label = "red:user2";
                        gpios = <&gpio4 26 0>;
                        linux,default-trigger = "mmc0";
                };
 
-               user_led3 {
+               user_led3: led-3 {
                        label = "red:user3";
                        gpios = <&gpio4 30 0>;
                        linux,default-trigger = "mmc1";
                };
 
-               user_led4 {
+               user_led4: led-4 {
                        label = "red:user4";
                        gpios = <&gpio1 0 0>;
                        panic-indicator;
                        linux,default-trigger = "none";
                };
 
-               wlan_active_led {
+               wlan_active_led: led-5 {
                        label = "red:wlan";
                        gpios = <&gpio1 1 0>;
                        linux,default-trigger = "phy0tx";
                        default-state = "off";
                };
 
-               bt_active_led {
+               bt_active_led: led-6 {
                        label = "red:bt";
                        gpios = <&gpio1 4 0>;
                        linux,default-trigger = "hci0-power";
@@ -114,32 +115,32 @@
        };
 
        leds {
-               user_led1: user_led1 {
+               user_led1_pin: user-led1-pin {
                        rockchip,pins =
                                <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               user_led2: user_led2 {
+               user_led2_pin: user-led2-pin {
                        rockchip,pins =
                                <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               user_led3: user_led3 {
+               user_led3_pin: user-led3-pin {
                        rockchip,pins =
                                <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               user_led4: user_led4 {
+               user_led4_pin: user-led4-pin {
                        rockchip,pins =
                                <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               wlan_led: wlan_led {
+               wlan_led_pin: wlan-led-pin {
                        rockchip,pins =
                                <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               bt_led: bt_led {
+               bt_led_pin: bt-led-pin {
                        rockchip,pins =
                                <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
                };
arch/arm/dts/rk3399-firefly.dts +154 -24
index d63faf38cc..c4dd2a6b48 100644
@@ -6,6 +6,7 @@
 /dts-v1/;
 #include <dt-bindings/input/linux-event-codes.h>
 #include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/usb/pd.h>
 #include "rk3399.dtsi"
 #include "rk3399-opp.dtsi"
 
@@ -13,6 +14,12 @@
        model = "Firefly-RK3399 Board";
        compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
 
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -88,18 +95,25 @@
                };
        };
 
+       ir-receiver {
+               compatible = "gpio-ir-receiver";
+               gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+               pinctrl-0 = <&ir_int>;
+               pinctrl-names = "default";
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
+               pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
 
-               work-led {
+               work_led: led-0 {
                        label = "work";
                        default-state = "on";
                        gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
                };
 
-               diy-led {
+               diy_led: led-1 {
                        label = "diy";
                        default-state = "off";
                        gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
@@ -145,6 +159,23 @@
                reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
        };
 
+       sound-dit {
+               compatible = "audio-graph-card";
+               label = "SPDIF";
+               dais = <&spdif_p0>;
+       };
+
+       spdif-dit {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+
+               port {
+                       dit_p0_0: endpoint {
+                               remote-endpoint = <&spdif_p0_0>;
+                       };
+               };
+       };
+
        /* switched by pmic_sleep */
        vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
                compatible = "regulator-fixed";
@@ -190,6 +221,17 @@
                vin-supply = <&vcc_sys>;
        };
 
+       vcc5v0_typec: vcc5v0-typec-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vcc5v0_typec_en>;
+               regulator-name = "vcc5v0_typec";
+               regulator-always-on;
+               vin-supply = <&vcc_sys>;
+       };
+
        vcc_sys: vcc-sys {
                compatible = "regulator-fixed";
                regulator-name = "vcc_sys";
@@ -515,6 +557,53 @@
        i2c-scl-falling-time-ns = <20>;
        status = "okay";
 
+       fusb0: typec-portc@22 {
+               compatible = "fcs,fusb302";
+               reg = <0x22>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&fusb0_int>;
+               vbus-supply = <&vcc5v0_typec>;
+               status = "okay";
+
+               connector {
+                       compatible = "usb-c-connector";
+                       data-role = "host";
+                       label = "USB-C";
+                       op-sink-microwatt = <1000000>;
+                       power-role = "dual";
+                       sink-pdos =
+                               <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
+                       source-pdos =
+                               <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
+                       try-power-role = "sink";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+
+                                       usbc_hs: endpoint {
+                                               remote-endpoint =
+                                                       <&u2phy0_typec_hs>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+
+                                       usbc_ss: endpoint {
+                                               remote-endpoint =
+                                                       <&tcphy0_typec_ss>;
+                                       };
+                               };
+                       };
+               };
+       };
+
        accelerometer@68 {
                compatible = "invensense,mpu6500";
                reg = <0x68>;
@@ -572,12 +661,34 @@
                };
        };
 
+       fusb302x {
+               fusb0_int: fusb0-int {
+                       rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       ir {
+               ir_int: ir-int {
+                       rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        lcd-panel {
                lcd_panel_reset: lcd-panel-reset {
                        rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
+       leds {
+               work_led_pin: work-led-pin {
+                       rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               diy_led_pin: diy-led-pin {
+                       rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        pcie {
                pcie_pwr_en: pcie-pwr-en {
                        rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -589,18 +700,16 @@
        };
 
        pmic {
-               vsel1_gpio: vsel1-gpio {
-                       rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
+               pmic_int_l: pmic-int-l {
+                       rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               vsel2_gpio: vsel2-gpio {
-                       rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
+               vsel1_pin: vsel1-pin {
+                       rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
                };
-       };
 
-       sdio-pwrseq {
-               wifi_enable_h: wifi-enable-h {
-                       rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+               vsel2_pin: vsel2-pin {
+                       rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
        };
 
@@ -610,9 +719,15 @@
                };
        };
 
-       pmic {
-               pmic_int_l: pmic-int-l {
-                       rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+       sdio-pwrseq {
+               wifi_enable_h: wifi-enable-h {
+                       rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       usb-typec {
+               vcc5v0_typec_en: vcc5v0_typec_en {
+                       rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
@@ -627,16 +742,6 @@
                        rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
-
-       leds {
-               work_led_gpio: work_led-gpio {
-                       rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
-               };
-
-               diy_led_gpio: diy_led-gpio {
-                       rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
-               };
-       };
 };
 
 &pwm0 {
@@ -704,10 +809,29 @@
        status = "okay";
 };
 
+&spdif {
+       pinctrl-0 = <&spdif_bus_1>;
+       status = "okay";
+
+       spdif_p0: port {
+               spdif_p0_0: endpoint {
+                       remote-endpoint = <&dit_p0_0>;
+               };
+       };
+};
+
 &tcphy0 {
        status = "okay";
 };
 
+&tcphy0_usb3 {
+       port {
+               tcphy0_typec_ss: endpoint {
+                       remote-endpoint = <&usbc_ss>;
+               };
+       };
+};
+
 &tcphy1 {
        status = "okay";
 };
@@ -731,6 +855,12 @@
                phy-supply = <&vcc5v0_host>;
                status = "okay";
        };
+
+       port {
+               u2phy0_typec_hs: endpoint {
+                       remote-endpoint = <&usbc_hs>;
+               };
+       };
 };
 
 &u2phy1 {
arch/arm/dts/rk3399-gru.dtsi +10 -4
index f9c5bb607b..b80f19066b 100644
@@ -10,6 +10,11 @@
 #include "rk3399-op1-opp.dtsi"
 
 / {
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:115200n8";
        };
@@ -247,8 +252,8 @@
                enable-active-high;
                enable-gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
                gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
-               states = <1800000 0x1
-                         3000000 0x0>;
+               states = <1800000 0x1>,
+                        <3000000 0x0>;
 
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <3000000>;
@@ -342,6 +347,7 @@
        cpu-supply = <&ppvar_bigcpu>;
 };
 
+
 &cru {
        assigned-clocks =
                <&cru PLL_GPLL>, <&cru PLL_CPLL>,
@@ -515,7 +521,7 @@ ap_i2c_audio: &i2c8 {
         * configured as SDMMC and not JTAG.
         */
        pinctrl-names = "default";
-       pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_gpio
+       pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_pin
                     &sdmmc_bus4>;
 
        bus-width = <4>;
@@ -766,7 +772,7 @@ ap_i2c_audio: &i2c8 {
                };
 
                /* This is where we actually hook up CD; has external pull */
-               sdmmc_cd_gpio: sdmmc-cd-gpio {
+               sdmmc_cd_pin: sdmmc-cd-pin {
                        rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
arch/arm/dts/rk3399-khadas-edge.dtsi +35 -5
index e87a044774..d5c7648c84 100644
@@ -11,6 +11,12 @@
 #include "rk3399-opp.dtsi"
 
 / {
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -138,18 +144,26 @@
                };
        };
 
+       ir-receiver {
+               compatible = "gpio-ir-receiver";
+               gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
+               linux,rc-map-name = "rc-khadas";
+               pinctrl-names = "default";
+               pinctrl-0 = <&ir_rx>;
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&sys_led_gpio>, <&user_led_gpio>;
+               pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
 
-               sys-led {
+               sys_led: led-0 {
                        label = "sys_led";
                        linux,default-trigger = "heartbeat";
                        gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
                };
 
-               user-led {
+               user_led: led-1 {
                        label = "user_led";
                        default-state = "off";
                        gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
@@ -585,12 +599,18 @@
                };
        };
 
+       ir {
+               ir_rx: ir-rx {
+                   rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        leds {
-               sys_led_gpio: sys_led-gpio {
+               sys_led_pin: sys-led-pin {
                        rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               user_led_gpio: user_led-gpio {
+               user_led_pin: user-led-pin {
                        rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
@@ -690,6 +710,16 @@
        status = "okay";
 };
 
+&spi1 {
+       status = "okay";
+
+       spiflash: flash@0 {
+               compatible = "winbond,w25q128fw", "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <104000000>;
+       };
+};
+
 &tcphy0 {
        status = "okay";
 };
arch/arm/dts/rk3399-leez-p710.dts +10 -4
index 73be38a537..7c93f840bc 100644
@@ -13,6 +13,12 @@
        model = "Leez RK3399 P710";
        compatible = "leez,p710", "rockchip,rk3399";
 
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -341,7 +347,7 @@
                reg = <0x40>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel1_gpio>;
+               pinctrl-0 = <&vsel1_pin>;
                regulator-name = "vdd_cpu_b";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
@@ -360,7 +366,7 @@
                reg = <0x41>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel2_gpio>;
+               pinctrl-0 = <&vsel2_pin>;
                regulator-name = "vdd_gpu";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
@@ -447,11 +453,11 @@
                        rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               vsel1_gpio: vsel1-gpio {
+               vsel1_pin: vsel1-pin {
                        rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
                };
 
-               vsel2_gpio: vsel2-gpio {
+               vsel2_pin: vsel2-pin {
                        rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
        };
arch/arm/dts/rk3399-nanopc-t4.dts +1 -0
index e0d75617bb..452728b82e 100644
@@ -95,6 +95,7 @@
 };
 
 &pcie0 {
+       ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
        num-lanes = <4>;
        vpcie3v3-supply = <&vcc3v3_sys>;
 };
arch/arm/dts/rk3399-nanopi-r4s.dts +65 -70
index 6f2cf17bf1..cef4d18b59 100644
@@ -1,13 +1,15 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
+ * FriendlyElec NanoPC-T4 board device tree source
  *
- * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
+ * Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd.
  * (http://www.friendlyarm.com)
  *
  * Copyright (c) 2018 Collabora Ltd.
- * Copyright (c) 2019 Arm Ltd.
- * Copyright (C) 2020 Xiaobo <[email protected]>
+ *
+ * Copyright (c) 2020 Jensen Huang <[email protected]>
+ * Copyright (c) 2020 Marty Jones <[email protected]>
+ * Copyright (c) 2021 Tianling Shen <[email protected]>
  */
 
 /dts-v1/;
@@ -17,94 +19,87 @@
        model = "FriendlyElec NanoPi R4S";
        compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
 
-       aliases {
-               ethernet1 = &r8169;
-       };
+       /delete-node/ display-subsystem;
 
-       vdd_5v: vdd-5v {
-               compatible = "regulator-fixed";
-               regulator-name = "vdd_5v";
-               regulator-always-on;
-               regulator-boot-on;
-       };
+       gpio-leds {
+               pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
 
-       fan: pwm-fan {
-               compatible = "pwm-fan";
-               cooling-levels = <0 12 18 255>;
-               #cooling-cells = <2>;
-               fan-supply = <&vdd_5v>;
-               pwms = <&pwm1 0 50000 0>;
-       };
-};
+               /delete-node/ led-0;
 
-&cpu_thermal {
-       trips {
-               cpu_warm: cpu_warm {
-                       temperature = <55000>;
-                       hysteresis = <2000>;
-                       type = "active";
+               lan_led: led-lan {
+                       gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
+                       label = "green:lan";
                };
 
-               cpu_hot: cpu_hot {
-                       temperature = <65000>;
-                       hysteresis = <2000>;
-                       type = "active";
+               sys_led: led-sys {
+                       gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
+                       label = "red:power";
+                       default-state = "on";
                };
-       };
 
-       cooling-maps {
-               map2 {
-                       trip = <&cpu_warm>;
-                       cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+               wan_led: led-wan {
+                       gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+                       label = "green:wan";
                };
+       };
+
+       gpio-keys {
+               pinctrl-0 = <&reset_button_pin>;
+
+               /delete-node/ power;
 
-               map3 {
-                       trip = <&cpu_hot>;
-                       cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
+               reset {
+                       debounce-interval = <50>;
+                       gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
+                       label = "reset";
+                       linux,code = <KEY_RESTART>;
                };
        };
+
+       vdd_5v: vdd-5v {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_5v";
+               regulator-always-on;
+               regulator-boot-on;
+       };
 };
 
 &emmc_phy {
        status = "disabled";
 };
 
-&fusb0 {
+&i2c4 {
        status = "disabled";
 };
 
-&leds {
-       lan_led: led-1 {
-               gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
-               label = "nanopi-r4s:green:lan";
-       };
-
-       wan_led: led-2 {
-               gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
-               label = "nanopi-r4s:green:wan";
-       };
-};
-
-&leds_gpio {
-       rockchip,pins =
-               <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
-               <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,
-               <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
-};
-
 &pcie0 {
        max-link-speed = <1>;
        num-lanes = <1>;
        vpcie3v3-supply = <&vcc3v3_sys>;
+};
 
-       pcie@0 {
-               reg = <0x00000000 0 0 0 0>;
-               #address-cells = <3>;
-               #size-cells = <2>;
+&pinctrl {
+       gpio-leds {
+               /delete-node/ status-led-pin;
 
-               r8169: pcie@0,0 {
-                       reg = <0x000000 0 0 0 0>;
-                       local-mac-address = [ 00 00 00 00 00 00 ];
+               lan_led_pin: lan-led-pin {
+                       rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               sys_led_pin: sys-led-pin {
+                       rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               wan_led_pin: wan-led-pin {
+                       rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       rockchip-key {
+               /delete-node/ power-key;
+
+               reset_button_pin: reset-button-pin {
+                       rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 };
@@ -117,10 +112,6 @@
        status = "disabled";
 };
 
-&sdmmc {
-       host-index-min = <1>;
-};
-
 &u2phy0_host {
        phy-supply = <&vdd_5v>;
 };
@@ -129,6 +120,10 @@
        status = "disabled";
 };
 
+&uart0 {
+       status = "disabled";
+};
+
 &usbdrd_dwc3_0 {
        dr_mode = "host";
 };
arch/arm/dts/rk3399-nanopi4.dtsi +11 -7
index c88018a0ef..8c0ff6c96e 100644
@@ -17,6 +17,12 @@
 #include "rk3399-opp.dtsi"
 
 / {
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -117,9 +123,9 @@
        leds: gpio-leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&leds_gpio>;
+               pinctrl-0 = <&status_led_pin>;
 
-               status {
+               status_led: led-0 {
                        gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
                        label = "status_led";
                        linux,default-trigger = "heartbeat";
@@ -182,7 +188,7 @@
                #address-cells = <1>;
                #size-cells = <0>;
 
-               rtl8211e: phy@1 {
+               rtl8211e: ethernet-phy@1 {
                        reg = <1>;
                        interrupt-parent = <&gpio3>;
                        interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
@@ -504,8 +510,6 @@
 };
 
 &pcie0 {
-       ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
-       max-link-speed = <2>;
        num-lanes = <2>;
        vpcie0v9-supply = <&vcca0v9_s3>;
        vpcie1v8-supply = <&vcca1v8_s3>;
@@ -520,12 +524,12 @@
        };
 
        gpio-leds {
-               leds_gpio: leds-gpio {
+               status_led_pin: status-led-pin {
                        rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
-       phy {
+       gmac {
                phy_intb: phy-intb {
                        rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
                };
arch/arm/dts/rk3399-opp.dtsi +20 -20
index d6f1095abb..da41cd81eb 100644
@@ -10,28 +10,28 @@
 
                opp00 {
                        opp-hz = /bits/ 64 <408000000>;
-                       opp-microvolt = <800000>;
+                       opp-microvolt = <825000 825000 1250000>;
                        clock-latency-ns = <40000>;
                };
                opp01 {
                        opp-hz = /bits/ 64 <600000000>;
-                       opp-microvolt = <800000>;
+                       opp-microvolt = <825000 825000 1250000>;
                };
                opp02 {
                        opp-hz = /bits/ 64 <816000000>;
-                       opp-microvolt = <850000>;
+                       opp-microvolt = <850000 850000 1250000>;
                };
                opp03 {
                        opp-hz = /bits/ 64 <1008000000>;
-                       opp-microvolt = <925000>;
+                       opp-microvolt = <925000 925000 1250000>;
                };
                opp04 {
                        opp-hz = /bits/ 64 <1200000000>;
-                       opp-microvolt = <1000000>;
+                       opp-microvolt = <1000000 1000000 1250000>;
                };
                opp05 {
                        opp-hz = /bits/ 64 <1416000000>;
-                       opp-microvolt = <1125000>;
+                       opp-microvolt = <1125000 1125000 1250000>;
                };
        };
 
@@ -41,36 +41,36 @@
 
                opp00 {
                        opp-hz = /bits/ 64 <408000000>;
-                       opp-microvolt = <800000>;
+                       opp-microvolt = <825000 825000 1250000>;
                        clock-latency-ns = <40000>;
                };
                opp01 {
                        opp-hz = /bits/ 64 <600000000>;
-                       opp-microvolt = <800000>;
+                       opp-microvolt = <825000 825000 1250000>;
                };
                opp02 {
                        opp-hz = /bits/ 64 <816000000>;
-                       opp-microvolt = <825000>;
+                       opp-microvolt = <825000 825000 1250000>;
                };
                opp03 {
                        opp-hz = /bits/ 64 <1008000000>;
-                       opp-microvolt = <875000>;
+                       opp-microvolt = <875000 875000 1250000>;
                };
                opp04 {
                        opp-hz = /bits/ 64 <1200000000>;
-                       opp-microvolt = <950000>;
+                       opp-microvolt = <950000 950000 1250000>;
                };
                opp05 {
                        opp-hz = /bits/ 64 <1416000000>;
-                       opp-microvolt = <1025000>;
+                       opp-microvolt = <1025000 1025000 1250000>;
                };
                opp06 {
                        opp-hz = /bits/ 64 <1608000000>;
-                       opp-microvolt = <1100000>;
+                       opp-microvolt = <1100000 1100000 1250000>;
                };
                opp07 {
                        opp-hz = /bits/ 64 <1800000000>;
-                       opp-microvolt = <1200000>;
+                       opp-microvolt = <1200000 1200000 1250000>;
                };
        };
 
@@ -79,27 +79,27 @@
 
                opp00 {
                        opp-hz = /bits/ 64 <200000000>;
-                       opp-microvolt = <800000>;
+                       opp-microvolt = <825000 825000 1150000>;
                };
                opp01 {
                        opp-hz = /bits/ 64 <297000000>;
-                       opp-microvolt = <800000>;
+                       opp-microvolt = <825000 825000 1150000>;
                };
                opp02 {
                        opp-hz = /bits/ 64 <400000000>;
-                       opp-microvolt = <825000>;
+                       opp-microvolt = <825000 825000 1150000>;
                };
                opp03 {
                        opp-hz = /bits/ 64 <500000000>;
-                       opp-microvolt = <875000>;
+                       opp-microvolt = <875000 875000 1150000>;
                };
                opp04 {
                        opp-hz = /bits/ 64 <600000000>;
-                       opp-microvolt = <925000>;
+                       opp-microvolt = <925000 925000 1150000>;
                };
                opp05 {
                        opp-hz = /bits/ 64 <800000000>;
-                       opp-microvolt = <1100000>;
+                       opp-microvolt = <1100000 1100000 1150000>;
                };
        };
 };
arch/arm/dts/rk3399-orangepi.dts +69 -3
index f9f7246d4d..04b54abea3 100644
@@ -7,6 +7,7 @@
 
 #include "dt-bindings/pwm/pwm.h"
 #include "dt-bindings/input/input.h"
+#include "dt-bindings/usb/pd.h"
 #include "rk3399.dtsi"
 #include "rk3399-opp.dtsi"
 
@@ -14,6 +15,12 @@
        model = "Orange Pi RK3399 Board";
        compatible = "rockchip,rk3399-orangepi", "rockchip,rk3399";
 
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -214,7 +221,7 @@
                #address-cells = <1>;
                #size-cells = <0>;
 
-               rtl8211e: phy@1 {
+               rtl8211e: ethernet-phy@1 {
                        reg = <1>;
                        interrupt-parent = <&gpio3>;
                        interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
@@ -531,6 +538,43 @@
                pinctrl-names = "default";
                pinctrl-0 = <&chg_cc_int_l>;
                vbus-supply = <&vbus_typec>;
+
+               typec_con: connector {
+                       compatible = "usb-c-connector";
+                       data-role = "host";
+                       label = "USB-C";
+                       op-sink-microwatt = <1000000>;
+                       power-role = "dual";
+                       sink-pdos =
+                               <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
+                       source-pdos =
+                               <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
+                       try-power-role = "sink";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       typec_hs: endpoint {
+                                               remote-endpoint = <&u2phy0_typec_hs>;
+                                       };
+                               };
+                               port@1 {
+                                       reg = <1>;
+                                       typec_ss: endpoint {
+                                               remote-endpoint = <&tcphy0_typec_ss>;
+                                       };
+                               };
+                               port@2 {
+                                       reg = <2>;
+                                       typec_dp: endpoint {
+                                               remote-endpoint = <&tcphy0_typec_dp>;
+                                       };
+                               };
+                       };
+               };
        };
 };
 
@@ -554,7 +598,7 @@
                };
        };
 
-       phy {
+       gmac {
                phy_intb: phy-intb {
                        rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
                };
@@ -717,6 +761,22 @@
        status = "okay";
 };
 
+&tcphy0_dp {
+       port {
+               tcphy0_typec_dp: endpoint {
+                       remote-endpoint = <&typec_dp>;
+               };
+       };
+};
+
+&tcphy0_usb3 {
+       port {
+               tcphy0_typec_ss: endpoint {
+                       remote-endpoint = <&typec_ss>;
+               };
+       };
+};
+
 &tcphy1 {
        status = "okay";
 };
@@ -739,6 +799,12 @@
                phy-supply = <&vcc5v0_host>;
                status = "okay";
        };
+
+       port {
+               u2phy0_typec_hs: endpoint {
+                       remote-endpoint = <&typec_hs>;
+               };
+       };
 };
 
 &u2phy1 {
@@ -799,7 +865,7 @@
 
 &usbdrd_dwc3_0 {
        status = "okay";
-       dr_mode = "otg";
+       dr_mode = "host";
 };
 
 &usbdrd3_1 {
arch/arm/dts/rk3399-pinebook-pro.dts +75 -45
index 294d21bf45..2b5f001ff4 100644
@@ -18,6 +18,12 @@
        model = "Pine64 Pinebook Pro";
        compatible = "pine64,pinebook-pro", "rockchip,rk3399";
 
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -28,12 +34,19 @@
                pwms = <&pwm0 0 740740 0>;
        };
 
+       bat: battery {
+               compatible = "simple-battery";
+               charge-full-design-microamp-hours = <9800000>;
+               voltage-max-design-microvolt = <4350000>;
+               voltage-min-design-microvolt = <3000000>;
+       };
+
        edp_panel: edp-panel {
                compatible = "boe,nv140fhmn49";
                backlight = <&backlight>;
                enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
-               pinctrl-0 = <&panel_en_gpio>;
+               pinctrl-0 = <&panel_en_pin>;
                power-supply = <&vcc3v3_panel>;
 
                ports {
@@ -60,7 +73,7 @@
        gpio-key-lid {
                compatible = "gpio-keys";
                pinctrl-names = "default";
-               pinctrl-0 = <&lidbtn_gpio>;
+               pinctrl-0 = <&lidbtn_pin>;
 
                lid {
                        debounce-interval = <20>;
@@ -76,7 +89,7 @@
        gpio-key-power {
                compatible = "gpio-keys";
                pinctrl-names = "default";
-               pinctrl-0 = <&pwrbtn_gpio>;
+               pinctrl-0 = <&pwrbtn_pin>;
 
                power {
                        debounce-interval = <20>;
@@ -90,9 +103,9 @@
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&pwrled_gpio &slpled_gpio>;
+               pinctrl-0 = <&pwr_led_pin &slp_led_pin>;
 
-               green-led {
+               green_led: led-0 {
                        color = <LED_COLOR_ID_GREEN>;
                        default-state = "on";
                        function = LED_FUNCTION_POWER;
@@ -100,7 +113,7 @@
                        label = "green:power";
                };
 
-               red-led {
+               red_led: led-1 {
                        color = <LED_COLOR_ID_RED>;
                        default-state = "off";
                        function = LED_FUNCTION_STANDBY;
@@ -117,7 +130,7 @@
                clocks = <&rk808 1>;
                clock-names = "ext_clock";
                pinctrl-names = "default";
-               pinctrl-0 = <&wifi_enable_h_gpio>;
+               pinctrl-0 = <&wifi_enable_h_pin>;
                post-power-on-delay-ms = <100>;
                power-off-delay-us = <500000>;
 
@@ -129,7 +142,7 @@
        es8316-sound {
                compatible = "simple-audio-card";
                pinctrl-names = "default";
-               pinctrl-0 = <&hp_det_gpio>;
+               pinctrl-0 = <&hp_det_pin>;
                simple-audio-card,name = "rockchip,es8316-codec";
                simple-audio-card,format = "i2s";
                simple-audio-card,mclk-fs = <256>;
@@ -213,7 +226,7 @@
                enable-active-high;
                gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
-               pinctrl-0 = <&pwr_5v_gpio>;
+               pinctrl-0 = <&pwr_5v_pin>;
                regulator-name = "vcc5v0_usb";
                regulator-always-on;
                regulator-min-microvolt = <5000000>;
@@ -270,7 +283,7 @@
                enable-active-high;
                gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
-               pinctrl-0 = <&sdmmc0_pwr_h_gpio>;
+               pinctrl-0 = <&sdmmc0_pwr_h_pin>;
                regulator-name = "vcc3v0_sd";
                regulator-always-on;
                regulator-min-microvolt = <3000000>;
@@ -288,7 +301,7 @@
                enable-active-high;
                gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
-               pinctrl-0 = <&lcdvcc_en_gpio>;
+               pinctrl-0 = <&lcdvcc_en_pin>;
                regulator-name = "vcc3v3_panel";
                regulator-always-on;
                regulator-min-microvolt = <3300000>;
@@ -317,7 +330,7 @@
                enable-active-high;
                gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vcc5v0_host_en_gpio>;
+               pinctrl-0 = <&vcc5v0_host_en_pin>;
                regulator-name = "vcc5v0_otg";
                regulator-always-on;
                regulator-min-microvolt = <5000000>;
@@ -336,7 +349,7 @@
                enable-active-high;
                gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vcc5v0_typec0_en_gpio>;
+               pinctrl-0 = <&vcc5v0_typec0_en_pin>;
                regulator-name = "vbus_5vout";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
@@ -368,7 +381,7 @@
 
                /* Also triggered by USB charger */
                pinctrl-names = "default";
-               pinctrl-0 = <&dc_det_gpio>;
+               pinctrl-0 = <&dc_det_pin>;
        };
 };
 
@@ -447,7 +460,7 @@
                interrupt-parent = <&gpio3>;
                interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
                pinctrl-names = "default";
-               pinctrl-0 = <&pmic_int_l_gpio>;
+               pinctrl-0 = <&pmic_int_l_pin>;
                rockchip,system-power-controller;
                wakeup-source;
 
@@ -627,7 +640,7 @@
                reg = <0x40>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel1_gpio>;
+               pinctrl-0 = <&vsel1_pin>;
                regulator-name = "vdd_cpu_b";
                regulator-always-on;
                regulator-boot-on;
@@ -646,7 +659,7 @@
                reg = <0x41>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel2_gpio>;
+               pinctrl-0 = <&vsel2_pin>;
                regulator-name = "vdd_gpu";
                regulator-always-on;
                regulator-boot-on;
@@ -690,9 +703,10 @@
        fusb0: fusb30x@22 {
                compatible = "fcs,fusb302";
                reg = <0x22>;
-               fcs,int_n = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
                pinctrl-names = "default";
-               pinctrl-0 = <&fusb0_int_gpio>;
+               pinctrl-0 = <&fusb0_int_pin>;
                vbus-supply = <&vbus_typec>;
 
                connector {
@@ -740,12 +754,29 @@
                        };
                };
        };
+
+       cw2015@62 {
+               compatible = "cellwise,cw2015";
+               reg = <0x62>;
+               cellwise,battery-profile = /bits/ 8 <
+                       0x17 0x67 0x80 0x73 0x6E 0x6C 0x6B 0x63
+                       0x77 0x51 0x5C 0x58 0x50 0x4C 0x48 0x36
+                       0x15 0x0C 0x0C 0x19 0x5B 0x7D 0x6F 0x69
+                       0x69 0x5B 0x0C 0x29 0x20 0x40 0x52 0x59
+                       0x57 0x56 0x54 0x4F 0x3B 0x1F 0x7F 0x17
+                       0x06 0x1A 0x30 0x5A 0x85 0x93 0x96 0x2D
+                       0x48 0x77 0x9C 0xB3 0x80 0x52 0x94 0xCB
+                       0x2F 0x00 0x64 0xA5 0xB5 0x11 0xF0 0x11
+               >;
+               cellwise,monitor-interval-ms = <5000>;
+               monitored-battery = <&bat>;
+               power-supplies = <&mains_charger>, <&fusb0>;
+       };
 };
 
 &i2s1 {
-       #sound-dai-cells = <0>;
        pinctrl-names = "default";
-       pinctrl-0 = <&i2s_8ch_mclk_gpio>, <&i2s1_2ch_bus>;
+       pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>;
        rockchip,capture-channels = <8>;
        rockchip,playback-channels = <8>;
        status = "okay";
@@ -765,7 +796,6 @@
 &pcie0 {
        bus-scan-delay-ms = <1000>;
        ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
-       max-link-speed = <2>;
        num-lanes = <4>;
        pinctrl-names = "default";
        pinctrl-0 = <&pcie_clkreqn_cpm>;
@@ -777,116 +807,116 @@
 
 &pinctrl {
        buttons {
-               pwrbtn_gpio: pwrbtn-gpio {
+               pwrbtn_pin: pwrbtn-pin {
                        rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               lidbtn_gpio: lidbtn-gpio {
+               lidbtn_pin: lidbtn-pin {
                        rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        dc-charger {
-               dc_det_gpio: dc-det-gpio {
+               dc_det_pin: dc-det-pin {
                        rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        es8316 {
-               hp_det_gpio: hp-det-gpio {
+               hp_det_pin: hp-det-pin {
                        rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        fusb302x {
-               fusb0_int_gpio: fusb0-int-gpio {
+               fusb0_int_pin: fusb0-int-pin {
                        rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        i2s1 {
-               i2s_8ch_mclk_gpio: i2s-8ch-mclk-gpio {
+               i2s_8ch_mclk_pin: i2s-8ch-mclk-pin {
                        rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
                };
        };
 
        lcd-panel {
-               lcdvcc_en_gpio: lcdvcc-en-gpio {
+               lcdvcc_en_pin: lcdvcc-en-pin {
                        rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               panel_en_gpio: panel-en-gpio {
+               panel_en_pin: panel-en-pin {
                        rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               lcd_panel_reset_gpio: lcd-panel-reset-gpio {
+               lcd_panel_reset_pin: lcd-panel-reset-pin {
                        rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        leds {
-               pwrled_gpio: pwrled_gpio {
+               pwr_led_pin: pwr-led-pin {
                        rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               slpled_gpio: slpled_gpio {
+               slp_led_pin: slp-led-pin {
                        rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        pmic {
-               pmic_int_l_gpio: pmic-int-l-gpio {
+               pmic_int_l_pin: pmic-int-l-pin {
                        rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               vsel1_gpio: vsel1-gpio {
+               vsel1_pin: vsel1-pin {
                        rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
                };
 
-               vsel2_gpio: vsel2-gpio {
+               vsel2_pin: vsel2-pin {
                        rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
        };
 
        sdcard {
-               sdmmc0_pwr_h_gpio: sdmmc0-pwr-h-gpio {
+               sdmmc0_pwr_h_pin: sdmmc0-pwr-h-pin {
                        rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
        };
 
        sdio-pwrseq {
-               wifi_enable_h_gpio: wifi-enable-h-gpio {
+               wifi_enable_h_pin: wifi-enable-h-pin {
                        rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        usb-typec {
-               vcc5v0_typec0_en_gpio: vcc5v0-typec0-en-gpio {
+               vcc5v0_typec0_en_pin: vcc5v0-typec0-en-pin {
                        rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
                };
        };
 
        usb2 {
-               pwr_5v_gpio: pwr-5v-gpio {
+               pwr_5v_pin: pwr-5v-pin {
                        rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               vcc5v0_host_en_gpio: vcc5v0-host-en-gpio {
+               vcc5v0_host_en_pin: vcc5v0-host-en-pin {
                        rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        wireless-bluetooth {
-               bt_wake_gpio: bt-wake-gpio {
+               bt_wake_pin: bt-wake-pin {
                        rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               bt_host_wake_gpio: bt-host-wake-gpio {
+               bt_host_wake_pin: bt-host-wake-pin {
                        rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               bt_reset_gpio: bt-reset-gpio {
+               bt_reset_pin: bt-reset-pin {
                        rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
@@ -1034,7 +1064,7 @@
                host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
                max-speed = <1500000>;
                pinctrl-names = "default";
-               pinctrl-0 = <&bt_host_wake_gpio &bt_wake_gpio &bt_reset_gpio>;
+               pinctrl-0 = <&bt_host_wake_pin &bt_wake_pin &bt_reset_pin>;
                shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
                vbat-supply = <&wifi_bat>;
                vddio-supply = <&vcc_wl>;
arch/arm/dts/rk3399-puma-haikou.dts +7 -3
index d80d6b7268..292bb7e80c 100644
@@ -10,14 +10,18 @@
        model = "Theobroma Systems RK3399-Q7 SoM";
        compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399";
 
+       aliases {
+               mmc1 = &sdmmc;
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 
        leds {
-               pinctrl-0 = <&led_pin_module>, <&led_sd_haikou>;
+               pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
 
-               sd-card-led {
+               sd_card_led: led-1 {
                        label = "sd_card_led";
                        gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "mmc0";
@@ -179,7 +183,7 @@
        };
 
        leds {
-               led_sd_haikou: led-sd-gpio {
+               sd_card_led_pin: sd-card-led-pin {
                        rockchip,pins =
                          <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
arch/arm/dts/rk3399-puma.dtsi +7 -54
index 72c06abd27..fb67db4619 100644
@@ -8,12 +8,16 @@
 #include "rk3399-opp.dtsi"
 
 / {
+       aliases {
+               mmc0 = &sdhci;
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&led_pin_module>;
+               pinctrl-0 = <&module_led_pin>;
 
-               module-led {
+               module_led: led-0 {
                        label = "module_led";
                        gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "heartbeat";
@@ -21,57 +25,6 @@
                };
        };
 
-       /*
-        * Overwrite the opp-table for CPUB as this board uses a different
-        * regulator (FAN53555) that only allows 10mV steps and therefore
-        * can't reach the operation point target voltages from rk3399-opp.dtsi
-        */
-       /delete-node/ opp-table1;
-       cluster1_opp: opp-table1 {
-               compatible = "operating-points-v2";
-               opp-shared;
-
-               opp00 {
-                       opp-hz = /bits/ 64 <408000000>;
-                       opp-microvolt = <800000>;
-                       clock-latency-ns = <40000>;
-               };
-               opp01 {
-                       opp-hz = /bits/ 64 <600000000>;
-                       opp-microvolt = <800000>;
-               };
-               opp02 {
-                       opp-hz = /bits/ 64 <816000000>;
-                       opp-microvolt = <830000>;
-                       opp-suspend;
-               };
-               opp03 {
-                       opp-hz = /bits/ 64 <1008000000>;
-                       opp-microvolt = <880000>;
-               };
-               opp04 {
-                       opp-hz = /bits/ 64 <1200000000>;
-                       opp-microvolt = <950000>;
-               };
-               opp05 {
-                       opp-hz = /bits/ 64 <1416000000>;
-                       opp-microvolt = <1030000>;
-               };
-               opp06 {
-                       opp-hz = /bits/ 64 <1608000000>;
-                       opp-microvolt = <1100000>;
-               };
-               opp07 {
-                       opp-hz = /bits/ 64 <1800000000>;
-                       opp-microvolt = <1200000>;
-               };
-               opp08 {
-                       opp-hz = /bits/ 64 <1992000000>;
-                       opp-microvolt = <1230000>;
-                       turbo-mode;
-               };
-       };
-
        clkin_gmac: external-gmac-clock {
                compatible = "fixed-clock";
                clock-frequency = <125000000>;
@@ -450,7 +403,7 @@
        };
 
        leds {
-               led_pin_module: led-module-gpio {
+               module_led_pin: module-led-pin {
                        rockchip,pins =
                          <2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
                };
arch/arm/dts/rk3399-roc-pc-mezzanine.dts +20 -2
index 2acb3d500f..9447c8724b 100644
@@ -11,6 +11,20 @@
        model = "Firefly ROC-RK3399-PC Mezzanine Board";
        compatible = "firefly,roc-rk3399-pc-mezzanine", "rockchip,rk3399";
 
+       aliases {
+               mmc2 = &sdio0;
+       };
+
+       /* MP8009 PoE PD */
+       poe_12v: poe-12v {
+               compatible = "regulator-fixed";
+               regulator-name = "poe_12v";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+       };
+
        vcc3v3_ngff: vcc3v3-ngff {
                compatible = "regulator-fixed";
                regulator-name = "vcc3v3_ngff";
@@ -22,7 +36,7 @@
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 
        vcc3v3_pcie: vcc3v3-pcie {
@@ -34,10 +48,14 @@
                pinctrl-0 = <&vcc3v3_pcie_en>;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 };
 
+&sys_12v {
+       vin-supply = <&poe_12v>;
+};
+
 &pcie_phy {
        status = "okay";
 };
arch/arm/dts/rk3399-roc-pc.dtsi +44 -15
index 9f225e9c3d..d1aaf8e833 100644
@@ -13,6 +13,11 @@
        model = "Firefly ROC-RK3399-PC Board";
        compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
 
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -58,30 +63,37 @@
                };
        };
 
+       ir-receiver {
+               compatible = "gpio-ir-receiver";
+               gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ir_int>;
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>, <&yellow_led_gpio>;
+               pinctrl-0 = <&work_led_pin>, <&diy_led_pin>, <&yellow_led_pin>;
 
-               work-led {
+               work_led: led-0 {
                        label = "green:work";
                        gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                        linux,default-trigger = "heartbeat";
                };
 
-               diy-led {
+               diy_led: led-1 {
                        label = "red:diy";
                        gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
                        default-state = "off";
-                       linux,default-trigger = "mmc1";
+                       linux,default-trigger = "mmc2";
                };
 
-               yellow-led {
+               yellow_led: led-2 {
                        label = "yellow:yellow-led";
                        gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
                        default-state = "off";
-                       linux,default-trigger = "mmc0";
+                       linux,default-trigger = "mmc1";
                };
        };
 
@@ -110,6 +122,14 @@
                regulator-max-microvolt = <5000000>;
        };
 
+       sys_12v: sys-12v {
+               compatible = "regulator-fixed";
+               regulator-name = "sys_12v";
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&dc_12v>;
+       };
+
        /* switched by pmic_sleep */
        vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
                compatible = "regulator-fixed";
@@ -141,7 +161,7 @@
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 
        vcca_0v9: vcca-0v9 {
@@ -186,7 +206,7 @@
                regulator-boot-on;
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
-               vin-supply = <&dc_12v>;
+               vin-supply = <&sys_12v>;
        };
 
        vdd_log: vdd-log {
@@ -376,6 +396,7 @@
 
                        vcc_sdio: LDO_REG4 {
                                regulator-name = "vcc_sdio";
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <3000000>;
@@ -456,7 +477,7 @@
                reg = <0x40>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel1_gpio>;
+               pinctrl-0 = <&vsel1_pin>;
                regulator-name = "vdd_cpu_b";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
@@ -475,11 +496,13 @@
                reg = <0x41>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel2_gpio>;
+               pinctrl-0 = <&vsel2_pin>;
                regulator-name = "vdd_gpu";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
                regulator-ramp-delay = <1000>;
+               regulator-always-on;
+               regulator-boot-on;
                vin-supply = <&vcc3v3_sys>;
 
                regulator-state-mem {
@@ -588,6 +611,12 @@
                };
        };
 
+       ir {
+               ir_int: ir-int {
+                       rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        lcd-panel {
                lcd_panel_reset: lcd-panel-reset {
                        rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -595,25 +624,25 @@
        };
 
        leds {
-               diy_led_gpio: diy_led-gpio {
+               diy_led_pin: diy-led-pin {
                        rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               work_led_gpio: work_led-gpio {
+               work_led_pin: work-led-pin {
                        rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               yellow_led_gpio: yellow_led-gpio {
+               yellow_led_pin: yellow-led-pin {
                        rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
        pmic {
-               vsel1_gpio: vsel1-gpio {
+               vsel1_pin: vsel1-pin {
                        rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
                };
 
-               vsel2_gpio: vsel2-gpio {
+               vsel2_pin: vsel2-pin {
                        rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
        };
arch/arm/dts/rk3399-rock-pi-4.dtsi +13 -16
index 1c55a4645b..b28888ea92 100644
@@ -11,6 +11,11 @@
 #include "rk3399-opp.dtsi"
 
 / {
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -111,10 +116,6 @@
                regulator-boot-on;
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-
-               regulator-state-mem {
-                       regulator-off-in-suspend;
-               };
        };
 
        vdd_log: vdd-log {
@@ -362,8 +363,6 @@
                                regulator-name = "vcc_cam";
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
                                regulator-state-mem {
                                        regulator-off-in-suspend;
                                };
@@ -373,8 +372,6 @@
                                regulator-name = "vcc_mipi";
                                regulator-always-on;
                                regulator-boot-on;
-                               regulator-min-microvolt = <3300000>;
-                               regulator-max-microvolt = <3300000>;
                                regulator-state-mem {
                                        regulator-off-in-suspend;
                                };
@@ -387,7 +384,7 @@
                reg = <0x40>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel1_gpio>;
+               pinctrl-0 = <&vsel1_pin>;
                regulator-name = "vdd_cpu_b";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
@@ -406,7 +403,7 @@
                reg = <0x41>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel2_gpio>;
+               pinctrl-0 = <&vsel2_pin>;
                regulator-name = "vdd_gpu";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
@@ -440,8 +437,9 @@
 };
 
 &i2s0 {
-       rockchip,playback-channels = <8>;
-       rockchip,capture-channels = <8>;
+       pinctrl-0 = <&i2s0_2ch_bus>;
+       rockchip,capture-channels = <2>;
+       rockchip,playback-channels = <2>;
        status = "okay";
 };
 
@@ -476,7 +474,6 @@
 
 &pcie0 {
        ep-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
-       max-link-speed = <2>;
        num-lanes = <4>;
        pinctrl-0 = <&pcie_clkreqnb_cpm>;
        pinctrl-names = "default";
@@ -529,11 +526,11 @@
                        rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               vsel1_gpio: vsel1-gpio {
+               vsel1_pin: vsel1-pin {
                        rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
                };
 
-               vsel2_gpio: vsel2-gpio {
+               vsel2_pin: vsel2-pin {
                        rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
        };
@@ -680,7 +677,7 @@
 
 &usbdrd_dwc3_0 {
        status = "okay";
-       dr_mode = "otg";
+       dr_mode = "host";
 };
 
 &usbdrd3_1 {
arch/arm/dts/rk3399-rock-pi-4a.dts +1 -1
index d96dd3ebd3..89f2af5e11 100644
@@ -9,5 +9,5 @@
 
 / {
        model = "Radxa ROCK Pi 4A";
-       compatible = "radxa,rockpi4", "rockchip,rk3399";
+       compatible = "radxa,rockpi4a", "radxa,rockpi4", "rockchip,rk3399";
 };
arch/arm/dts/rk3399-rock-pi-4b.dts +5 -1
index 4ca970acac..6c63e61706 100644
@@ -9,7 +9,11 @@
 
 / {
        model = "Radxa ROCK Pi 4B";
-       compatible = "radxa,rockpi4", "rockchip,rk3399";
+       compatible = "radxa,rockpi4b", "radxa,rockpi4", "rockchip,rk3399";
+
+       aliases {
+               mmc2 = &sdio0;
+       };
 };
 
 &sdio0 {
arch/arm/dts/rk3399-rock-pi-4c.dts +5 -1
index 9d07ebd1ec..99169bcd51 100644
@@ -10,7 +10,11 @@
 
 / {
        model = "Radxa ROCK Pi 4C";
-       compatible = "radxa,rockpi4", "rockchip,rk3399";
+       compatible = "radxa,rockpi4c", "radxa,rockpi4", "rockchip,rk3399";
+
+       aliases {
+               mmc2 = &sdio0;
+       };
 };
 
 &sdio0 {
arch/arm/dts/rk3399-rock960.dts +29 -53
index 437a75f31a..1a23e8f3cd 100644
@@ -17,42 +17,43 @@
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
-                           <&user_led4>, <&wlan_led>, <&bt_led>;
+               pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>,
+                           <&user_led3_pin>, <&user_led4_pin>,
+                           <&wlan_led_pin>, <&bt_led_pin>;
 
-               user_led1 {
+               user_led1: led-1 {
                        label = "green:user1";
                        gpios = <&gpio4 RK_PC2 0>;
                        linux,default-trigger = "heartbeat";
                };
 
-               user_led2 {
+               user_led2: led-2 {
                        label = "green:user2";
                        gpios = <&gpio4 RK_PC6 0>;
                        linux,default-trigger = "mmc0";
                };
 
-               user_led3 {
+               user_led3: led-3 {
                        label = "green:user3";
                        gpios = <&gpio4 RK_PD0 0>;
                        linux,default-trigger = "mmc1";
                };
 
-               user_led4 {
+               user_led4: led-4 {
                        label = "green:user4";
                        gpios = <&gpio4 RK_PD4 0>;
                        panic-indicator;
                        linux,default-trigger = "none";
                };
 
-               wlan_active_led {
+               wlan_active_led: led-5 {
                        label = "yellow:wlan";
                        gpios = <&gpio4 RK_PD5 0>;
                        linux,default-trigger = "phy0tx";
                        default-state = "off";
                };
 
-               bt_active_led {
+               bt_active_led: led-6 {
                        label = "blue:bt";
                        gpios = <&gpio4 RK_PD6 0>;
                        linux,default-trigger = "hci0-power";
@@ -62,38 +63,52 @@
 
 };
 
+&cpu_alert0 {
+       temperature = <65000>;
+};
+
+&cpu_thermal {
+       sustainable-power = <1550>;
+
+       cooling-maps {
+               map0 {
+                       trip = <&cpu_alert1>;
+               };
+       };
+};
+
 &pcie0 {
        ep-gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
 };
 
 &pinctrl {
        leds {
-               user_led1: user_led1 {
+               user_led1_pin: user-led1-pin {
                        rockchip,pins =
                                <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               user_led2: user_led2 {
+               user_led2_pin: user-led2-pin {
                        rockchip,pins =
                                <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               user_led3: user_led3 {
+               user_led3_pin: user-led3-pin {
                        rockchip,pins =
                                <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               user_led4: user_led4 {
+               user_led4_pin: user-led4-pin {
                        rockchip,pins =
                                <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               wlan_led: wlan_led {
+               wlan_led_pin: wlan-led-pin {
                        rockchip,pins =
                                <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               bt_led: bt_led {
+               bt_led_pin: bt-led-pin {
                        rockchip,pins =
                                <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
                };
@@ -124,45 +139,6 @@
        status = "okay";
 };
 
-&thermal_zones {
-       cpu_thermal: cpu {
-               polling-delay-passive = <100>;
-               polling-delay = <1000>;
-               thermal-sensors = <&tsadc 0>;
-               sustainable-power = <1550>;
-
-               trips {
-                       cpu_alert0: cpu_alert0 {
-                                   temperature = <65000>;
-                                   hysteresis = <2000>;
-                                   type = "passive";
-                       };
-
-                       cpu_alert1: cpu_alert1 {
-                                   temperature = <75000>;
-                                   hysteresis = <2000>;
-                                   type = "passive";
-                       };
-
-                       cpu_crit: cpu_crit {
-                                 temperature = <95000>;
-                                 hysteresis = <2000>;
-                                 type = "critical";
-                       };
-               };
-
-               cooling-maps {
-                            map0 {
-
-                            trip = <&cpu_alert1>;
-                            cooling-device =
-                                       <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-                                       <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                       };
-               };
-       };
-};
-
 &usbdrd_dwc3_0 {
        dr_mode = "otg";
 };
arch/arm/dts/rk3399-rock960.dtsi +8 -2
index ba7c75c9f2..25dc61c26a 100644
@@ -9,6 +9,12 @@
 #include "rk3399-opp.dtsi"
 
 / {
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        sdio_pwrseq: sdio-pwrseq {
                compatible = "mmc-pwrseq-simple";
                clocks = <&rk808 1>;
@@ -470,12 +476,12 @@
                                <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               vsel1_gpio: vsel1-gpio {
+               vsel1_pin: vsel1-pin {
                        rockchip,pins =
                                <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
                };
 
-               vsel2_gpio: vsel2-gpio {
+               vsel2_pin: vsel2-pin {
                        rockchip,pins =
                                <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
arch/arm/dts/rk3399-rockpro64.dtsi +84 -11
index 9bca258012..6bff8db7d3 100644
@@ -10,6 +10,12 @@
 #include "rk3399-opp.dtsi"
 
 / {
+       aliases {
+               mmc0 = &sdio0;
+               mmc1 = &sdmmc;
+               mmc2 = &sdhci;
+       };
+
        chosen {
                stdout-path = "serial2:1500000n8";
        };
@@ -36,18 +42,25 @@
                };
        };
 
+       ir-receiver {
+               compatible = "gpio-ir-receiver";
+               gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+               pinctrl-0 = <&ir_int>;
+               pinctrl-names = "default";
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
+               pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
 
-               work-led {
+               work_led: led-0 {
                        label = "work";
                        default-state = "on";
                        gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
                };
 
-               diy-led {
+               diy_led: led-1 {
                        label = "diy";
                        default-state = "off";
                        gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
@@ -72,10 +85,27 @@
 
        sound {
                compatible = "audio-graph-card";
-               label = "rockchip,rk3399";
+               label = "Analog";
                dais = <&i2s1_p0>;
        };
 
+       sound-dit {
+               compatible = "audio-graph-card";
+               label = "SPDIF";
+               dais = <&spdif_p0>;
+       };
+
+       spdif-dit {
+               compatible = "linux,spdif-dit";
+               #sound-dai-cells = <0>;
+
+               port {
+                       dit_p0_0: endpoint {
+                               remote-endpoint = <&spdif_p0_0>;
+                       };
+               };
+       };
+
        vcc12v_dcin: vcc12v-dcin {
                compatible = "regulator-fixed";
                regulator-name = "vcc12v_dcin";
@@ -96,6 +126,24 @@
                vin-supply = <&vcc_1v8>;
        };
 
+       /* micro SD card power */
+       vcc3v0_sd: vcc3v0-sd {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdmmc0_pwr_h>;
+               regulator-name = "vcc3v0_sd";
+               regulator-always-on;
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+               vin-supply = <&vcc3v3_sys>;
+
+               regulator-state-mem {
+                       regulator-off-in-suspend;
+               };
+       };
+
        vcc3v3_pcie: vcc3v3-pcie-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
@@ -427,7 +475,7 @@
                reg = <0x40>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel1_gpio>;
+               pinctrl-0 = <&vsel1_pin>;
                regulator-name = "vdd_cpu_b";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
@@ -446,7 +494,7 @@
                reg = <0x41>;
                fcs,suspend-voltage-selector = <1>;
                pinctrl-names = "default";
-               pinctrl-0 = <&vsel2_gpio>;
+               pinctrl-0 = <&vsel2_pin>;
                regulator-name = "vdd_gpu";
                regulator-min-microvolt = <712500>;
                regulator-max-microvolt = <1500000>;
@@ -569,12 +617,18 @@
                };
        };
 
+       ir {
+               ir_int: ir-int {
+                       rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        leds {
-               work_led_gpio: work_led-gpio {
+               work_led_pin: work-led-pin {
                        rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
-               diy_led_gpio: diy_led-gpio {
+               diy_led_pin: diy-led-pin {
                        rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
@@ -594,15 +648,22 @@
                        rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               vsel1_gpio: vsel1-gpio {
+               vsel1_pin: vsel1-pin {
                        rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
                };
 
-               vsel2_gpio: vsel2-gpio {
+               vsel2_pin: vsel2-pin {
                        rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
                };
        };
 
+       sdcard {
+               sdmmc0_pwr_h: sdmmc0-pwr-h {
+                       rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+       };
+
        sdio-pwrseq {
                wifi_enable_h: wifi-enable-h {
                        rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -661,6 +722,8 @@
        max-frequency = <150000000>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+       vmmc-supply = <&vcc3v0_sd>;
+       vqmmc-supply = <&vcc_sdio>;
        status = "okay";
 };
 
@@ -671,6 +734,16 @@
        status = "okay";
 };
 
+&spdif {
+       pinctrl-0 = <&spdif_bus_1>;
+
+       spdif_p0: port {
+               spdif_p0_0: endpoint {
+                       remote-endpoint = <&dit_p0_0>;
+               };
+       };
+};
+
 &spi1 {
        status = "okay";
 
@@ -768,7 +841,7 @@
 
 &usbdrd_dwc3_0 {
        status = "okay";
-       dr_mode = "otg";
+       dr_mode = "host";
 };
 
 &usbdrd3_1 {
arch/arm/dts/rk3399.dtsi +163 -106
index 74f2c3d490..3871c7fd83 100644
@@ -197,38 +197,12 @@
                #clock-cells = <0>;
        };
 
-       amba: bus {
-               compatible = "simple-bus";
-               #address-cells = <2>;
-               #size-cells = <2>;
-               ranges;
-
-               dmac_bus: dma-controller@ff6d0000 {
-                       compatible = "arm,pl330", "arm,primecell";
-                       reg = <0x0 0xff6d0000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>,
-                                    <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
-                       #dma-cells = <1>;
-                       clocks = <&cru ACLK_DMAC0_PERILP>;
-                       clock-names = "apb_pclk";
-               };
-
-               dmac_peri: dma-controller@ff6e0000 {
-                       compatible = "arm,pl330", "arm,primecell";
-                       reg = <0x0 0xff6e0000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>,
-                                    <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
-                       #dma-cells = <1>;
-                       clocks = <&cru ACLK_DMAC1_PERILP>;
-                       clock-names = "apb_pclk";
-               };
-       };
-
        pcie0: pcie@f8000000 {
                compatible = "rockchip,rk3399-pcie";
                reg = <0x0 0xf8000000 0x0 0x2000000>,
                      <0x0 0xfd000000 0x0 0x1000000>;
                reg-names = "axi-base", "apb-base";
+               device_type = "pci";
                #address-cells = <3>;
                #size-cells = <2>;
                #interrupt-cells = <1>;
@@ -247,15 +221,14 @@
                                <0 0 0 2 &pcie0_intc 1>,
                                <0 0 0 3 &pcie0_intc 2>,
                                <0 0 0 4 &pcie0_intc 3>;
-               linux,pci-domain = <0>;
                max-link-speed = <1>;
                msi-map = <0x0 &its 0x0 0x1000>;
                phys = <&pcie_phy 0>, <&pcie_phy 1>,
                       <&pcie_phy 2>, <&pcie_phy 3>;
                phy-names = "pcie-phy-0", "pcie-phy-1",
                            "pcie-phy-2", "pcie-phy-3";
-               ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x1e00000
-                         0x81000000 0x0 0xfbe00000 0x0 0xfbe00000 0x0 0x100000>;
+               ranges = <0x82000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x1e00000>,
+                        <0x81000000 0x0 0xfbe00000 0x0 0xfbe00000 0x0 0x100000>;
                resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
                         <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>,
                         <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>,
@@ -326,7 +299,7 @@
                status = "disabled";
        };
 
-       sdhci: sdhci@fe330000 {
+       sdhci: mmc@fe330000 {
                compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1";
                reg = <0x0 0xfe330000 0x0 0x10000>;
                interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -403,7 +376,7 @@
                reset-names = "usb3-otg";
                status = "disabled";
 
-               usbdrd_dwc3_0: dwc3 {
+               usbdrd_dwc3_0: usb@fe800000 {
                        compatible = "snps,dwc3";
                        reg = <0x0 0xfe800000 0x0 0x100000>;
                        interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -439,7 +412,7 @@
                reset-names = "usb3-otg";
                status = "disabled";
 
-               usbdrd_dwc3_1: dwc3 {
+               usbdrd_dwc3_1: usb@fe900000 {
                        compatible = "snps,dwc3";
                        reg = <0x0 0xfe900000 0x0 0x100000>;
                        interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -759,7 +732,7 @@
        };
 
        thermal_zones: thermal-zones {
-               cpu_thermal: cpu {
+               cpu_thermal: cpu-thermal {
                        polling-delay-passive = <100>;
                        polling-delay = <1000>;
 
@@ -803,7 +776,7 @@
                        };
                };
 
-               gpu_thermal: gpu {
+               gpu_thermal: gpu-thermal {
                        polling-delay-passive = <100>;
                        polling-delay = <1000>;
 
@@ -845,135 +818,135 @@
                rockchip,grf = <&grf>;
                rockchip,hw-tshut-temp = <95000>;
                pinctrl-names = "init", "default", "sleep";
-               pinctrl-0 = <&otp_gpio>;
+               pinctrl-0 = <&otp_pin>;
                pinctrl-1 = <&otp_out>;
-               pinctrl-2 = <&otp_gpio>;
+               pinctrl-2 = <&otp_pin>;
                #thermal-sensor-cells = <1>;
                status = "disabled";
        };
 
        qos_emmc: qos@ffa58000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa58000 0x0 0x20>;
        };
 
        qos_gmac: qos@ffa5c000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa5c000 0x0 0x20>;
        };
 
        qos_pcie: qos@ffa60080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa60080 0x0 0x20>;
        };
 
        qos_usb_host0: qos@ffa60100 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa60100 0x0 0x20>;
        };
 
        qos_usb_host1: qos@ffa60180 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa60180 0x0 0x20>;
        };
 
        qos_usb_otg0: qos@ffa70000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa70000 0x0 0x20>;
        };
 
        qos_usb_otg1: qos@ffa70080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa70080 0x0 0x20>;
        };
 
        qos_sd: qos@ffa74000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa74000 0x0 0x20>;
        };
 
        qos_sdioaudio: qos@ffa76000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa76000 0x0 0x20>;
        };
 
        qos_hdcp: qos@ffa90000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa90000 0x0 0x20>;
        };
 
        qos_iep: qos@ffa98000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffa98000 0x0 0x20>;
        };
 
        qos_isp0_m0: qos@ffaa0000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffaa0000 0x0 0x20>;
        };
 
        qos_isp0_m1: qos@ffaa0080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffaa0080 0x0 0x20>;
        };
 
        qos_isp1_m0: qos@ffaa8000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffaa8000 0x0 0x20>;
        };
 
        qos_isp1_m1: qos@ffaa8080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffaa8080 0x0 0x20>;
        };
 
        qos_rga_r: qos@ffab0000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffab0000 0x0 0x20>;
        };
 
        qos_rga_w: qos@ffab0080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffab0080 0x0 0x20>;
        };
 
        qos_video_m0: qos@ffab8000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffab8000 0x0 0x20>;
        };
 
        qos_video_m1_r: qos@ffac0000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffac0000 0x0 0x20>;
        };
 
        qos_video_m1_w: qos@ffac0080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffac0080 0x0 0x20>;
        };
 
        qos_vop_big_r: qos@ffac8000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffac8000 0x0 0x20>;
        };
 
        qos_vop_big_w: qos@ffac8080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffac8080 0x0 0x20>;
        };
 
        qos_vop_little: qos@ffad0000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffad0000 0x0 0x20>;
        };
 
        qos_perihp: qos@ffad8080 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffad8080 0x0 0x20>;
        };
 
        qos_gpu: qos@ffae0000 {
-               compatible = "syscon";
+               compatible = "rockchip,rk3399-qos", "syscon";
                reg = <0x0 0xffae0000 0x0 0x20>;
        };
 
@@ -995,126 +968,146 @@
                        #size-cells = <0>;
 
                        /* These power domains are grouped by VD_CENTER */
-                       pd_iep@RK3399_PD_IEP {
+                       power-domain@RK3399_PD_IEP {
                                reg = <RK3399_PD_IEP>;
                                clocks = <&cru ACLK_IEP>,
                                         <&cru HCLK_IEP>;
                                pm_qos = <&qos_iep>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_rga@RK3399_PD_RGA {
+                       power-domain@RK3399_PD_RGA {
                                reg = <RK3399_PD_RGA>;
                                clocks = <&cru ACLK_RGA>,
                                         <&cru HCLK_RGA>;
                                pm_qos = <&qos_rga_r>,
                                         <&qos_rga_w>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_vcodec@RK3399_PD_VCODEC {
+                       power-domain@RK3399_PD_VCODEC {
                                reg = <RK3399_PD_VCODEC>;
                                clocks = <&cru ACLK_VCODEC>,
                                         <&cru HCLK_VCODEC>;
                                pm_qos = <&qos_video_m0>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_vdu@RK3399_PD_VDU {
+                       power-domain@RK3399_PD_VDU {
                                reg = <RK3399_PD_VDU>;
                                clocks = <&cru ACLK_VDU>,
                                         <&cru HCLK_VDU>;
                                pm_qos = <&qos_video_m1_r>,
                                         <&qos_video_m1_w>;
+                               #power-domain-cells = <0>;
                        };
 
                        /* These power domains are grouped by VD_GPU */
-                       pd_gpu@RK3399_PD_GPU {
+                       power-domain@RK3399_PD_GPU {
                                reg = <RK3399_PD_GPU>;
                                clocks = <&cru ACLK_GPU>;
                                pm_qos = <&qos_gpu>;
+                               #power-domain-cells = <0>;
                        };
 
                        /* These power domains are grouped by VD_LOGIC */
-                       pd_edp@RK3399_PD_EDP {
+                       power-domain@RK3399_PD_EDP {
                                reg = <RK3399_PD_EDP>;
                                clocks = <&cru PCLK_EDP_CTRL>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_emmc@RK3399_PD_EMMC {
+                       power-domain@RK3399_PD_EMMC {
                                reg = <RK3399_PD_EMMC>;
                                clocks = <&cru ACLK_EMMC>;
                                pm_qos = <&qos_emmc>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_gmac@RK3399_PD_GMAC {
+                       power-domain@RK3399_PD_GMAC {
                                reg = <RK3399_PD_GMAC>;
                                clocks = <&cru ACLK_GMAC>,
                                         <&cru PCLK_GMAC>;
                                pm_qos = <&qos_gmac>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_sd@RK3399_PD_SD {
+                       power-domain@RK3399_PD_SD {
                                reg = <RK3399_PD_SD>;
                                clocks = <&cru HCLK_SDMMC>,
                                         <&cru SCLK_SDMMC>;
                                pm_qos = <&qos_sd>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_sdioaudio@RK3399_PD_SDIOAUDIO {
+                       power-domain@RK3399_PD_SDIOAUDIO {
                                reg = <RK3399_PD_SDIOAUDIO>;
                                clocks = <&cru HCLK_SDIO>;
                                pm_qos = <&qos_sdioaudio>;
+                               #power-domain-cells = <0>;
+                       };
+                       power-domain@RK3399_PD_TCPD0 {
+                               reg = <RK3399_PD_TCPD0>;
+                               clocks = <&cru SCLK_UPHY0_TCPDCORE>,
+                                        <&cru SCLK_UPHY0_TCPDPHY_REF>;
+                               #power-domain-cells = <0>;
+                       };
+                       power-domain@RK3399_PD_TCPD1 {
+                               reg = <RK3399_PD_TCPD1>;
+                               clocks = <&cru SCLK_UPHY1_TCPDCORE>,
+                                        <&cru SCLK_UPHY1_TCPDPHY_REF>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_usb3@RK3399_PD_USB3 {
+                       power-domain@RK3399_PD_USB3 {
                                reg = <RK3399_PD_USB3>;
                                clocks = <&cru ACLK_USB3>;
                                pm_qos = <&qos_usb_otg0>,
                                         <&qos_usb_otg1>;
+                               #power-domain-cells = <0>;
                        };
-                       pd_vio@RK3399_PD_VIO {
+                       power-domain@RK3399_PD_VIO {
                                reg = <RK3399_PD_VIO>;
+                               #power-domain-cells = <1>;
                                #address-cells = <1>;
                                #size-cells = <0>;
 
-                               pd_hdcp@RK3399_PD_HDCP {
+                               power-domain@RK3399_PD_HDCP {
                                        reg = <RK3399_PD_HDCP>;
                                        clocks = <&cru ACLK_HDCP>,
                                                 <&cru HCLK_HDCP>,
                                                 <&cru PCLK_HDCP>;
                                        pm_qos = <&qos_hdcp>;
+                                       #power-domain-cells = <0>;
                                };
-                               pd_isp0@RK3399_PD_ISP0 {
+                               power-domain@RK3399_PD_ISP0 {
                                        reg = <RK3399_PD_ISP0>;
                                        clocks = <&cru ACLK_ISP0>,
                                                 <&cru HCLK_ISP0>;
                                        pm_qos = <&qos_isp0_m0>,
                                                 <&qos_isp0_m1>;
+                                       #power-domain-cells = <0>;
                                };
-                               pd_isp1@RK3399_PD_ISP1 {
+                               power-domain@RK3399_PD_ISP1 {
                                        reg = <RK3399_PD_ISP1>;
                                        clocks = <&cru ACLK_ISP1>,
                                                 <&cru HCLK_ISP1>;
                                        pm_qos = <&qos_isp1_m0>,
                                                 <&qos_isp1_m1>;
+                                       #power-domain-cells = <0>;
                                };
-                               pd_tcpc0@RK3399_PD_TCPC0 {
-                                       reg = <RK3399_PD_TCPD0>;
-                                       clocks = <&cru SCLK_UPHY0_TCPDCORE>,
-                                                <&cru SCLK_UPHY0_TCPDPHY_REF>;
-                               };
-                               pd_tcpc1@RK3399_PD_TCPC1 {
-                                       reg = <RK3399_PD_TCPD1>;
-                                       clocks = <&cru SCLK_UPHY1_TCPDCORE>,
-                                                <&cru SCLK_UPHY1_TCPDPHY_REF>;
-                               };
-                               pd_vo@RK3399_PD_VO {
+                               power-domain@RK3399_PD_VO {
                                        reg = <RK3399_PD_VO>;
+                                       #power-domain-cells = <1>;
                                        #address-cells = <1>;
                                        #size-cells = <0>;
 
-                                       pd_vopb@RK3399_PD_VOPB {
+                                       power-domain@RK3399_PD_VOPB {
                                                reg = <RK3399_PD_VOPB>;
                                                clocks = <&cru ACLK_VOP0>,
                                                         <&cru HCLK_VOP0>;
                                                pm_qos = <&qos_vop_big_r>,
                                                         <&qos_vop_big_w>;
+                                               #power-domain-cells = <0>;
                                        };
-                                       pd_vopl@RK3399_PD_VOPL {
+                                       power-domain@RK3399_PD_VOPL {
                                                reg = <RK3399_PD_VOPL>;
                                                clocks = <&cru ACLK_VOP1>,
                                                         <&cru HCLK_VOP1>;
                                                pm_qos = <&qos_vop_little>;
+                                               #power-domain-cells = <0>;
                                        };
                                };
                        };
@@ -1124,8 +1117,6 @@
        pmugrf: syscon@ff320000 {
                compatible = "rockchip,rk3399-pmugrf", "syscon", "simple-mfd";
                reg = <0x0 0xff320000 0x0 0x1000>;
-               #address-cells = <1>;
-               #size-cells = <1>;
 
                pmu_io_domains: io-domains {
                        compatible = "rockchip,rk3399-pmu-io-voltage-domain";
@@ -1211,7 +1202,6 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pwm0_pin>;
                clocks = <&pmucru PCLK_RKPWM_PMU>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -1222,7 +1212,6 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pwm1_pin>;
                clocks = <&pmucru PCLK_RKPWM_PMU>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -1233,7 +1222,6 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pwm2_pin>;
                clocks = <&pmucru PCLK_RKPWM_PMU>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -1244,7 +1232,6 @@
                pinctrl-names = "default";
                pinctrl-0 = <&pwm3a_pin>;
                clocks = <&pmucru PCLK_RKPWM_PMU>;
-               clock-names = "pwm";
                status = "disabled";
        };
 
@@ -1271,6 +1258,17 @@
                power-domains = <&power RK3399_PD_VCODEC>;
        };
 
+       vdec: video-codec@ff660000 {
+               compatible = "rockchip,rk3399-vdec";
+               reg = <0x0 0xff660000 0x0 0x400>;
+               interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
+                        <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
+               clock-names = "axi", "ahb", "cabac", "core";
+               iommus = <&vdec_mmu>;
+               power-domains = <&power RK3399_PD_VDU>;
+       };
+
        vdec_mmu: iommu@ff660480 {
                compatible = "rockchip,iommu";
                reg = <0x0 0xff660480 0x0 0x40>, <0x0 0xff6604c0 0x0 0x40>;
@@ -1278,8 +1276,8 @@
                interrupt-names = "vdec_mmu";
                clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
                clock-names = "aclk", "iface";
+               power-domains = <&power RK3399_PD_VDU>;
                #iommu-cells = <0>;
-               status = "disabled";
        };
 
        iep_mmu: iommu@ff670800 {
@@ -1336,6 +1334,28 @@
                };
        };
 
+       dmac_bus: dma-controller@ff6d0000 {
+               compatible = "arm,pl330", "arm,primecell";
+               reg = <0x0 0xff6d0000 0x0 0x4000>;
+               interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
+               #dma-cells = <1>;
+               arm,pl330-periph-burst;
+               clocks = <&cru ACLK_DMAC0_PERILP>;
+               clock-names = "apb_pclk";
+       };
+
+       dmac_peri: dma-controller@ff6e0000 {
+               compatible = "arm,pl330", "arm,primecell";
+               reg = <0x0 0xff6e0000 0x0 0x4000>;
+               interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
+               #dma-cells = <1>;
+               arm,pl330-periph-burst;
+               clocks = <&cru ACLK_DMAC1_PERILP>;
+               clock-names = "apb_pclk";
+       };
+
        pmucru: pmu-clock-controller@ff750000 {
                compatible = "rockchip,rk3399-pmucru";
                reg = <0x0 0xff750000 0x0 0x1000>;
@@ -1387,7 +1407,18 @@
                        status = "disabled";
                };
 
-               u2phy0: usb2-phy@e450 {
+               mipi_dphy_rx0: mipi-dphy-rx0 {
+                       compatible = "rockchip,rk3399-mipi-dphy-rx0";
+                       clocks = <&cru SCLK_MIPIDPHY_REF>,
+                                <&cru SCLK_DPHY_RX0_CFG>,
+                                <&cru PCLK_VIO_GRF>;
+                       clock-names = "dphy-ref", "dphy-cfg", "grf";
+                       power-domains = <&power RK3399_PD_VIO>;
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               u2phy0: usb2phy@e450 {
                        compatible = "rockchip,rk3399-usb2phy";
                        reg = <0xe450 0x10>;
                        clocks = <&cru SCLK_USB2PHY0_REF>;
@@ -1414,7 +1445,7 @@
                        };
                };
 
-               u2phy1: usb2-phy@e460 {
+               u2phy1: usb2phy@e460 {
                        compatible = "rockchip,rk3399-usb2phy";
                        reg = <0xe460 0x10>;
                        clocks = <&cru SCLK_USB2PHY1_REF>;
@@ -1513,7 +1544,7 @@
        };
 
        watchdog@ff848000 {
-               compatible = "snps,dw-wdt";
+               compatible = "rockchip,rk3399-wdt", "snps,dw-wdt";
                reg = <0x0 0xff848000 0x0 0x100>;
                clocks = <&cru PCLK_WDT>;
                interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -1700,6 +1731,32 @@
                status = "disabled";
        };
 
+       isp0: isp0@ff910000 {
+               compatible = "rockchip,rk3399-cif-isp";
+               reg = <0x0 0xff910000 0x0 0x4000>;
+               interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+               clocks = <&cru SCLK_ISP0>,
+                        <&cru ACLK_ISP0_WRAPPER>,
+                        <&cru HCLK_ISP0_WRAPPER>;
+               clock-names = "isp", "aclk", "hclk";
+               iommus = <&isp0_mmu>;
+               phys = <&mipi_dphy_rx0>;
+               phy-names = "dphy";
+               power-domains = <&power RK3399_PD_ISP0>;
+               status = "disabled";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                       };
+               };
+       };
+
        isp0_mmu: iommu@ff914000 {
                compatible = "rockchip,iommu";
                reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
@@ -1883,10 +1940,10 @@
        gpu: gpu@ff9a0000 {
                compatible = "rockchip,rk3399-mali", "arm,mali-t860";
                reg = <0x0 0xff9a0000 0x0 0x10000>;
-               interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>,
-                            <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>,
-                            <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
-               interrupt-names = "gpu", "job", "mmu";
+               interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>,
+                            <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>;
+               interrupt-names = "job", "mmu", "gpu";
                clocks = <&cru ACLK_GPU>;
                #cooling-cells = <2>;
                power-domains = <&power RK3399_PD_GPU>;
@@ -2317,7 +2374,7 @@
                        };
                };
 
-               sleep {
+               suspend {
                        ap_pwroff: ap-pwroff {
                                rockchip,pins = <1 RK_PA5 1 &pcfg_pull_none>;
                        };
@@ -2475,7 +2532,7 @@
                };
 
                tsadc {
-                       otp_gpio: otp-gpio {
+                       otp_pin: otp-pin {
                                rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
                        };
 
arch/arm/dts/rk3399pro-vmarc-som.dtsi +21 -1
index 5d087be04a..01d1a75c8b 100644
@@ -12,6 +12,11 @@
 / {
        compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
 
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &sdhci;
+       };
+
        vcc3v3_pcie: vcc-pcie-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
@@ -324,7 +329,6 @@
 
 &pcie0 {
        ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
-       max-link-speed = <2>;
        num-lanes = <4>;
        pinctrl-0 = <&pcie_clkreqnb_cpm>;
        pinctrl-names = "default";
@@ -353,6 +357,12 @@
                };
        };
 
+       sdio-pwrseq {
+               wifi_enable_h: wifi-enable-h {
+                       rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        vbus_host {
                usb1_en_oc: usb1-en-oc {
                        rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -371,6 +381,16 @@
        pmu1830-supply = <&vcc_1v8>;
 };
 
+&sdio_pwrseq {
+       /*
+        * On the module itself this is one of these (depending
+        * on the actual card populated):
+        * - SDIO_RESET_L_WL_REG_ON
+        * - PDN (power down when low)
+        */
+       reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
+};
+
 &sdhci {
        bus-width = <8>;
        mmc-hs400-1_8v;
arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi +21 -1
index 26b53eac47..da1d548b73 100644
@@ -15,6 +15,14 @@
                #clock-cells = <0>;
        };
 
+       sdio_pwrseq: sdio-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&hym8563>;
+               clock-names = "ext_clock";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_enable_h>;
+       };
+
        vcc12v_dcin: vcc12v-dcin-regulator {
                compatible = "regulator-fixed";
                regulator-name = "vcc12v_dcin";
@@ -78,6 +86,19 @@
        status = "okay";
 };
 
+&sdio0 {
+       bus-width = <4>;
+       cap-sd-highspeed;
+       cap-sdio-irq;
+       keep-power-in-suspend;
+       mmc-pwrseq = <&sdio_pwrseq>;
+       non-removable;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+       sd-uhs-sdr104;
+       status = "okay";
+};
+
 &sdmmc {
        bus-width = <4>;
        cap-mmc-highspeed;
--

2.31.1

#6 lore raw
In reply to Peter Robinson
Quoted 3,107 lines · Peter Robinson

Sync the rk3399 DTs and associated bits from 5.14-rc1.

---
  arch/arm/dts/rk3399-evb.dts                   |   4 +
  arch/arm/dts/rk3399-ficus.dts                 |  29 +-
  arch/arm/dts/rk3399-firefly.dts               | 178 ++++++++++--
  arch/arm/dts/rk3399-gru.dtsi                  |  14 +-
  arch/arm/dts/rk3399-khadas-edge.dtsi          |  40 ++-
  arch/arm/dts/rk3399-leez-p710.dts             |  14 +-
  arch/arm/dts/rk3399-nanopc-t4.dts             |   1 +
  arch/arm/dts/rk3399-nanopi-r4s.dts            | 135 +++++----
  arch/arm/dts/rk3399-nanopi4.dtsi              |  18 +-
  arch/arm/dts/rk3399-opp.dtsi                  |  40 +--
  arch/arm/dts/rk3399-orangepi.dts              |  72 ++++-
  arch/arm/dts/rk3399-pinebook-pro.dts          | 120 +++++---
  arch/arm/dts/rk3399-puma-haikou.dts           |  10 +-
  arch/arm/dts/rk3399-puma.dtsi                 |  61 +---
  arch/arm/dts/rk3399-roc-pc-mezzanine.dts      |  22 +-
  arch/arm/dts/rk3399-roc-pc.dtsi               |  59 +++-
  arch/arm/dts/rk3399-rock-pi-4.dtsi            |  29 +-
  arch/arm/dts/rk3399-rock-pi-4a.dts            |   2 +-
  arch/arm/dts/rk3399-rock-pi-4b.dts            |   6 +-
  arch/arm/dts/rk3399-rock-pi-4c.dts            |   6 +-
  arch/arm/dts/rk3399-rock960.dts               |  82 ++----
  arch/arm/dts/rk3399-rock960.dtsi              |  10 +-
  arch/arm/dts/rk3399-rockpro64.dtsi            |  95 ++++++-
  arch/arm/dts/rk3399.dtsi                      | 269 +++++++++++-------
  arch/arm/dts/rk3399pro-vmarc-som.dtsi         |  22 +-
  .../dts/rockchip-radxa-dalang-carrier.dtsi    |  21 ++
  26 files changed, 897 insertions(+), 462 deletions(-)
arch/arm/dts/rk3399-evb.dts +4 -0
index 694b0d08d6..7b717ebec8 100644
@@ -11,6 +11,10 @@
  	model = "Rockchip RK3399 Evaluation Board";
  	compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdhci;
+	};
+
  	backlight: backlight {
  		compatible = "pwm-backlight";
  		brightness-levels = <
arch/arm/dts/rk3399-ficus.dts +15 -14
index ebe2ee77ba..1ce85a5816 100644
@@ -27,42 +27,43 @@
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
-			    <&user_led4>, <&wlan_led>, <&bt_led>;
+		pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>,
+			    <&user_led3_pin>, <&user_led4_pin>,
+			    <&wlan_led_pin>, <&bt_led_pin>;
 
-		user_led1 {
+		user_led1: led-1 {
  			label = "red:user1";
  			gpios = <&gpio4 25 0>;
  			linux,default-trigger = "heartbeat";
  		};
 
-		user_led2 {
+		user_led2: led-2 {
  			label = "red:user2";
  			gpios = <&gpio4 26 0>;
  			linux,default-trigger = "mmc0";
  		};
 
-		user_led3 {
+		user_led3: led-3 {
  			label = "red:user3";
  			gpios = <&gpio4 30 0>;
  			linux,default-trigger = "mmc1";
  		};
 
-		user_led4 {
+		user_led4: led-4 {
  			label = "red:user4";
  			gpios = <&gpio1 0 0>;
  			panic-indicator;
  			linux,default-trigger = "none";
  		};
 
-		wlan_active_led {
+		wlan_active_led: led-5 {
  			label = "red:wlan";
  			gpios = <&gpio1 1 0>;
  			linux,default-trigger = "phy0tx";
  			default-state = "off";
  		};
 
-		bt_active_led {
+		bt_active_led: led-6 {
  			label = "red:bt";
  			gpios = <&gpio1 4 0>;
  			linux,default-trigger = "hci0-power";
@@ -114,32 +115,32 @@
  	};
 
  	leds {
-		user_led1: user_led1 {
+		user_led1_pin: user-led1-pin {
  			rockchip,pins =
  				<4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		user_led2: user_led2 {
+		user_led2_pin: user-led2-pin {
  			rockchip,pins =
  				<4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		user_led3: user_led3 {
+		user_led3_pin: user-led3-pin {
  			rockchip,pins =
  				<4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		user_led4: user_led4 {
+		user_led4_pin: user-led4-pin {
  			rockchip,pins =
  				<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		wlan_led: wlan_led {
+		wlan_led_pin: wlan-led-pin {
  			rockchip,pins =
  				<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		bt_led: bt_led {
+		bt_led_pin: bt-led-pin {
  			rockchip,pins =
  				<1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
arch/arm/dts/rk3399-firefly.dts +154 -24
index d63faf38cc..c4dd2a6b48 100644
@@ -6,6 +6,7 @@
  /dts-v1/;
  #include <dt-bindings/input/linux-event-codes.h>
  #include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/usb/pd.h>
  #include "rk3399.dtsi"
  #include "rk3399-opp.dtsi"
 
@@ -13,6 +14,12 @@
  	model = "Firefly-RK3399 Board";
  	compatible = "firefly,firefly-rk3399", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -88,18 +95,25 @@
  		};
  	};
 
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+		pinctrl-0 = <&ir_int>;
+		pinctrl-names = "default";
+	};
+
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
+		pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
 
-		work-led {
+		work_led: led-0 {
  			label = "work";
  			default-state = "on";
  			gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
  		};
 
-		diy-led {
+		diy_led: led-1 {
  			label = "diy";
  			default-state = "off";
  			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
@@ -145,6 +159,23 @@
  		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
  	};
 
+	sound-dit {
+		compatible = "audio-graph-card";
+		label = "SPDIF";
+		dais = <&spdif_p0>;
+	};
+
+	spdif-dit {
+		compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+
+		port {
+			dit_p0_0: endpoint {
+				remote-endpoint = <&spdif_p0_0>;
+			};
+		};
+	};
+
  	/* switched by pmic_sleep */
  	vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
  		compatible = "regulator-fixed";
@@ -190,6 +221,17 @@
  		vin-supply = <&vcc_sys>;
  	};
 
+	vcc5v0_typec: vcc5v0-typec-regulator {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vcc5v0_typec_en>;
+		regulator-name = "vcc5v0_typec";
+		regulator-always-on;
+		vin-supply = <&vcc_sys>;
+	};
+
  	vcc_sys: vcc-sys {
  		compatible = "regulator-fixed";
  		regulator-name = "vcc_sys";
@@ -515,6 +557,53 @@
  	i2c-scl-falling-time-ns = <20>;
  	status = "okay";
 
+	fusb0: typec-portc@22 {
+		compatible = "fcs,fusb302";
+		reg = <0x22>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&fusb0_int>;
+		vbus-supply = <&vcc5v0_typec>;
+		status = "okay";
+
+		connector {
+			compatible = "usb-c-connector";
+			data-role = "host";
+			label = "USB-C";
+			op-sink-microwatt = <1000000>;
+			power-role = "dual";
+			sink-pdos =
+				<PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
+			source-pdos =
+				<PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
+			try-power-role = "sink";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					usbc_hs: endpoint {
+						remote-endpoint =
+							<&u2phy0_typec_hs>;
+					};
+				};
+
+				port@1 {
+					reg = <1>;
+
+					usbc_ss: endpoint {
+						remote-endpoint =
+							<&tcphy0_typec_ss>;
+					};
+				};
+			};
+		};
+	};
+
  	accelerometer@68 {
  		compatible = "invensense,mpu6500";
  		reg = <0x68>;
@@ -572,12 +661,34 @@
  		};
  	};
 
+	fusb302x {
+		fusb0_int: fusb0-int {
+			rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
+	ir {
+		ir_int: ir-int {
+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	lcd-panel {
  		lcd_panel_reset: lcd-panel-reset {
  			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
+	leds {
+		work_led_pin: work-led-pin {
+			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		diy_led_pin: diy-led-pin {
+			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	pcie {
  		pcie_pwr_en: pcie-pwr-en {
  			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -589,18 +700,16 @@
  	};
 
  	pmic {
-		vsel1_gpio: vsel1-gpio {
-			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
+		pmic_int_l: pmic-int-l {
+			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
 
-		vsel2_gpio: vsel2-gpio {
-			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
+		vsel1_pin: vsel1-pin {
+			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
-	};
 
-	sdio-pwrseq {
-		wifi_enable_h: wifi-enable-h {
-			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+		vsel2_pin: vsel2-pin {
+			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
  	};
 
@@ -610,9 +719,15 @@
  		};
  	};
 
-	pmic {
-		pmic_int_l: pmic-int-l {
-			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+	sdio-pwrseq {
+		wifi_enable_h: wifi-enable-h {
+			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	usb-typec {
+		vcc5v0_typec_en: vcc5v0_typec_en {
+			rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
@@ -627,16 +742,6 @@
  			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
-
-	leds {
-		work_led_gpio: work_led-gpio {
-			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-
-		diy_led_gpio: diy_led-gpio {
-			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
-		};
-	};
  };
 
  &pwm0 {
@@ -704,10 +809,29 @@
  	status = "okay";
  };
 
+&spdif {
+	pinctrl-0 = <&spdif_bus_1>;
+	status = "okay";
+
+	spdif_p0: port {
+		spdif_p0_0: endpoint {
+			remote-endpoint = <&dit_p0_0>;
+		};
+	};
+};
+
  &tcphy0 {
  	status = "okay";
  };
 
+&tcphy0_usb3 {
+	port {
+		tcphy0_typec_ss: endpoint {
+			remote-endpoint = <&usbc_ss>;
+		};
+	};
+};
+
  &tcphy1 {
  	status = "okay";
  };
@@ -731,6 +855,12 @@
  		phy-supply = <&vcc5v0_host>;
  		status = "okay";
  	};
+
+	port {
+		u2phy0_typec_hs: endpoint {
+			remote-endpoint = <&usbc_hs>;
+		};
+	};
  };
 
  &u2phy1 {
arch/arm/dts/rk3399-gru.dtsi +10 -4
index f9c5bb607b..b80f19066b 100644
@@ -10,6 +10,11 @@
  #include "rk3399-op1-opp.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:115200n8";
  	};
@@ -247,8 +252,8 @@
  		enable-active-high;
  		enable-gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
  		gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
-		states = <1800000 0x1
-			  3000000 0x0>;
+		states = <1800000 0x1>,
+			 <3000000 0x0>;
 
  		regulator-min-microvolt = <1800000>;
  		regulator-max-microvolt = <3000000>;
@@ -342,6 +347,7 @@
  	cpu-supply = <&ppvar_bigcpu>;
  };
 
+
  &cru {
  	assigned-clocks =
  		<&cru PLL_GPLL>, <&cru PLL_CPLL>,
@@ -515,7 +521,7 @@ ap_i2c_audio: &i2c8 {
  	 * configured as SDMMC and not JTAG.
  	 */
  	pinctrl-names = "default";
-	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_gpio
+	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_pin
  		     &sdmmc_bus4>;
 
  	bus-width = <4>;
@@ -766,7 +772,7 @@ ap_i2c_audio: &i2c8 {
  		};
 
  		/* This is where we actually hook up CD; has external pull */
-		sdmmc_cd_gpio: sdmmc-cd-gpio {
+		sdmmc_cd_pin: sdmmc-cd-pin {
  			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
arch/arm/dts/rk3399-khadas-edge.dtsi +35 -5
index e87a044774..d5c7648c84 100644
@@ -11,6 +11,12 @@
  #include "rk3399-opp.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -138,18 +144,26 @@
  		};
  	};
 
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
+		linux,rc-map-name = "rc-khadas";
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_rx>;
+	};
+
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&sys_led_gpio>, <&user_led_gpio>;
+		pinctrl-0 = <&sys_led_pin>, <&user_led_pin>;
 
-		sys-led {
+		sys_led: led-0 {
  			label = "sys_led";
  			linux,default-trigger = "heartbeat";
  			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
  		};
 
-		user-led {
+		user_led: led-1 {
  			label = "user_led";
  			default-state = "off";
  			gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
@@ -585,12 +599,18 @@
  		};
  	};
 
+	ir {
+		ir_rx: ir-rx {
+		    rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	leds {
-		sys_led_gpio: sys_led-gpio {
+		sys_led_pin: sys-led-pin {
  			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		user_led_gpio: user_led-gpio {
+		user_led_pin: user-led-pin {
  			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
@@ -690,6 +710,16 @@
  	status = "okay";
  };
 
+&spi1 {
+	status = "okay";
+
+	spiflash: flash@0 {
+		compatible = "winbond,w25q128fw", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <104000000>;
+	};
+};
+
  &tcphy0 {
  	status = "okay";
  };
arch/arm/dts/rk3399-leez-p710.dts +10 -4
index 73be38a537..7c93f840bc 100644
@@ -13,6 +13,12 @@
  	model = "Leez RK3399 P710";
  	compatible = "leez,p710", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -341,7 +347,7 @@
  		reg = <0x40>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel1_gpio>;
+		pinctrl-0 = <&vsel1_pin>;
  		regulator-name = "vdd_cpu_b";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
@@ -360,7 +366,7 @@
  		reg = <0x41>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel2_gpio>;
+		pinctrl-0 = <&vsel2_pin>;
  		regulator-name = "vdd_gpu";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
@@ -447,11 +453,11 @@
  			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
  			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
  			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
  	};
arch/arm/dts/rk3399-nanopc-t4.dts +1 -0
index e0d75617bb..452728b82e 100644
@@ -95,6 +95,7 @@
  };
 
  &pcie0 {
+	ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
  	num-lanes = <4>;
  	vpcie3v3-supply = <&vcc3v3_sys>;
  };
arch/arm/dts/rk3399-nanopi-r4s.dts +65 -70
index 6f2cf17bf1..cef4d18b59 100644
@@ -1,13 +1,15 @@
  // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  /*
- * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
+ * FriendlyElec NanoPC-T4 board device tree source
   *
- * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
+ * Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd.
   * (http://www.friendlyarm.com)
   *
   * Copyright (c) 2018 Collabora Ltd.
- * Copyright (c) 2019 Arm Ltd.
- * Copyright (C) 2020 Xiaobo <[email protected]>
+ *
+ * Copyright (c) 2020 Jensen Huang <[email protected]>
+ * Copyright (c) 2020 Marty Jones <[email protected]>
+ * Copyright (c) 2021 Tianling Shen <[email protected]>
   */
 
  /dts-v1/;
@@ -17,94 +19,87 @@
  	model = "FriendlyElec NanoPi R4S";
  	compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
 
-	aliases {
-		ethernet1 = &r8169;
-	};
+	/delete-node/ display-subsystem;
 
-	vdd_5v: vdd-5v {
-		compatible = "regulator-fixed";
-		regulator-name = "vdd_5v";
-		regulator-always-on;
-		regulator-boot-on;
-	};
+	gpio-leds {
+		pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
 
-	fan: pwm-fan {
-		compatible = "pwm-fan";
-		cooling-levels = <0 12 18 255>;
-		#cooling-cells = <2>;
-		fan-supply = <&vdd_5v>;
-		pwms = <&pwm1 0 50000 0>;
-	};
-};
+		/delete-node/ led-0;
 
-&cpu_thermal {
-	trips {
-		cpu_warm: cpu_warm {
-			temperature = <55000>;
-			hysteresis = <2000>;
-			type = "active";
+		lan_led: led-lan {
+			gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
+			label = "green:lan";
  		};
 
-		cpu_hot: cpu_hot {
-			temperature = <65000>;
-			hysteresis = <2000>;
-			type = "active";
+		sys_led: led-sys {
+			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
+			label = "red:power";
+			default-state = "on";
  		};
-	};
 
-	cooling-maps {
-		map2 {
-			trip = <&cpu_warm>;
-			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+		wan_led: led-wan {
+			gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+			label = "green:wan";
  		};
+	};
+
+	gpio-keys {
+		pinctrl-0 = <&reset_button_pin>;
+
+		/delete-node/ power;
 
-		map3 {
-			trip = <&cpu_hot>;
-			cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
+		reset {
+			debounce-interval = <50>;
+			gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
+			label = "reset";
+			linux,code = <KEY_RESTART>;
  		};
  	};
+
+	vdd_5v: vdd-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "vdd_5v";
+		regulator-always-on;
+		regulator-boot-on;
+	};
  };
 
  &emmc_phy {
  	status = "disabled";
  };
 
-&fusb0 {
+&i2c4 {
  	status = "disabled";
  };
 
-&leds {
-	lan_led: led-1 {
-		gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
-		label = "nanopi-r4s:green:lan";
-	};
-
-	wan_led: led-2 {
-		gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
-		label = "nanopi-r4s:green:wan";
-	};
-};
-
-&leds_gpio {
-	rockchip,pins =
-		<0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
-		<1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>,
-		<1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
-};
-
  &pcie0 {
  	max-link-speed = <1>;
  	num-lanes = <1>;
  	vpcie3v3-supply = <&vcc3v3_sys>;
+};
 
-	pcie@0 {
-		reg = <0x00000000 0 0 0 0>;
-		#address-cells = <3>;
-		#size-cells = <2>;
+&pinctrl {
+	gpio-leds {
+		/delete-node/ status-led-pin;
 
-		r8169: pcie@0,0 {
-			reg = <0x000000 0 0 0 0>;
-			local-mac-address = [ 00 00 00 00 00 00 ];
+		lan_led_pin: lan-led-pin {
+			rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		sys_led_pin: sys-led-pin {
+			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		wan_led_pin: wan-led-pin {
+			rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	rockchip-key {
+		/delete-node/ power-key;
+
+		reset_button_pin: reset-button-pin {
+			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
  };
@@ -117,10 +112,6 @@
  	status = "disabled";
  };
 
-&sdmmc {
-	host-index-min = <1>;
-};
-
  &u2phy0_host {
  	phy-supply = <&vdd_5v>;
  };
@@ -129,6 +120,10 @@
  	status = "disabled";
  };
 
+&uart0 {
+	status = "disabled";
+};
+
  &usbdrd_dwc3_0 {
  	dr_mode = "host";
  };
arch/arm/dts/rk3399-nanopi4.dtsi +11 -7
index c88018a0ef..8c0ff6c96e 100644
@@ -17,6 +17,12 @@
  #include "rk3399-opp.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -117,9 +123,9 @@
  	leds: gpio-leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&leds_gpio>;
+		pinctrl-0 = <&status_led_pin>;
 
-		status {
+		status_led: led-0 {
  			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
  			label = "status_led";
  			linux,default-trigger = "heartbeat";
@@ -182,7 +188,7 @@
  		#address-cells = <1>;
  		#size-cells = <0>;
 
-		rtl8211e: phy@1 {
+		rtl8211e: ethernet-phy@1 {
  			reg = <1>;
  			interrupt-parent = <&gpio3>;
  			interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
@@ -504,8 +510,6 @@
  };
 
  &pcie0 {
-	ep-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>;
-	max-link-speed = <2>;
  	num-lanes = <2>;
  	vpcie0v9-supply = <&vcca0v9_s3>;
  	vpcie1v8-supply = <&vcca1v8_s3>;
@@ -520,12 +524,12 @@
  	};
 
  	gpio-leds {
-		leds_gpio: leds-gpio {
+		status_led_pin: status-led-pin {
  			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
 
-	phy {
+	gmac {
  		phy_intb: phy-intb {
  			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
arch/arm/dts/rk3399-opp.dtsi +20 -20
index d6f1095abb..da41cd81eb 100644
@@ -10,28 +10,28 @@
 
  		opp00 {
  			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
  			clock-latency-ns = <40000>;
  		};
  		opp01 {
  			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
  		};
  		opp02 {
  			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <850000>;
+			opp-microvolt = <850000 850000 1250000>;
  		};
  		opp03 {
  			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <925000>;
+			opp-microvolt = <925000 925000 1250000>;
  		};
  		opp04 {
  			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <1000000>;
+			opp-microvolt = <1000000 1000000 1250000>;
  		};
  		opp05 {
  			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1125000>;
+			opp-microvolt = <1125000 1125000 1250000>;
  		};
  	};
 
@@ -41,36 +41,36 @@
 
  		opp00 {
  			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
  			clock-latency-ns = <40000>;
  		};
  		opp01 {
  			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
  		};
  		opp02 {
  			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1250000>;
  		};
  		opp03 {
  			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <875000>;
+			opp-microvolt = <875000 875000 1250000>;
  		};
  		opp04 {
  			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <950000>;
+			opp-microvolt = <950000 950000 1250000>;
  		};
  		opp05 {
  			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1025000>;
+			opp-microvolt = <1025000 1025000 1250000>;
  		};
  		opp06 {
  			opp-hz = /bits/ 64 <1608000000>;
-			opp-microvolt = <1100000>;
+			opp-microvolt = <1100000 1100000 1250000>;
  		};
  		opp07 {
  			opp-hz = /bits/ 64 <1800000000>;
-			opp-microvolt = <1200000>;
+			opp-microvolt = <1200000 1200000 1250000>;
  		};
  	};
 
@@ -79,27 +79,27 @@
 
  		opp00 {
  			opp-hz = /bits/ 64 <200000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1150000>;
  		};
  		opp01 {
  			opp-hz = /bits/ 64 <297000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1150000>;
  		};
  		opp02 {
  			opp-hz = /bits/ 64 <400000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1150000>;
  		};
  		opp03 {
  			opp-hz = /bits/ 64 <500000000>;
-			opp-microvolt = <875000>;
+			opp-microvolt = <875000 875000 1150000>;
  		};
  		opp04 {
  			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <925000>;
+			opp-microvolt = <925000 925000 1150000>;
  		};
  		opp05 {
  			opp-hz = /bits/ 64 <800000000>;
-			opp-microvolt = <1100000>;
+			opp-microvolt = <1100000 1100000 1150000>;
  		};
  	};
  };
arch/arm/dts/rk3399-orangepi.dts +69 -3
index f9f7246d4d..04b54abea3 100644
@@ -7,6 +7,7 @@
 
  #include "dt-bindings/pwm/pwm.h"
  #include "dt-bindings/input/input.h"
+#include "dt-bindings/usb/pd.h"
  #include "rk3399.dtsi"
  #include "rk3399-opp.dtsi"
 
@@ -14,6 +15,12 @@
  	model = "Orange Pi RK3399 Board";
  	compatible = "rockchip,rk3399-orangepi", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -214,7 +221,7 @@
  		#address-cells = <1>;
  		#size-cells = <0>;
 
-		rtl8211e: phy@1 {
+		rtl8211e: ethernet-phy@1 {
  			reg = <1>;
  			interrupt-parent = <&gpio3>;
  			interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
@@ -531,6 +538,43 @@
  		pinctrl-names = "default";
  		pinctrl-0 = <&chg_cc_int_l>;
  		vbus-supply = <&vbus_typec>;
+
+		typec_con: connector {
+			compatible = "usb-c-connector";
+			data-role = "host";
+			label = "USB-C";
+			op-sink-microwatt = <1000000>;
+			power-role = "dual";
+			sink-pdos =
+				<PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
+			source-pdos =
+				<PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
+			try-power-role = "sink";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					typec_hs: endpoint {
+						remote-endpoint = <&u2phy0_typec_hs>;
+					};
+				};
+				port@1 {
+					reg = <1>;
+					typec_ss: endpoint {
+						remote-endpoint = <&tcphy0_typec_ss>;
+					};
+				};
+				port@2 {
+					reg = <2>;
+					typec_dp: endpoint {
+						remote-endpoint = <&tcphy0_typec_dp>;
+					};
+				};
+			};
+		};
  	};
  };
 
@@ -554,7 +598,7 @@
  		};
  	};
 
-	phy {
+	gmac {
  		phy_intb: phy-intb {
  			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
@@ -717,6 +761,22 @@
  	status = "okay";
  };
 
+&tcphy0_dp {
+	port {
+		tcphy0_typec_dp: endpoint {
+			remote-endpoint = <&typec_dp>;
+		};
+	};
+};
+
+&tcphy0_usb3 {
+	port {
+		tcphy0_typec_ss: endpoint {
+			remote-endpoint = <&typec_ss>;
+		};
+	};
+};
+
  &tcphy1 {
  	status = "okay";
  };
@@ -739,6 +799,12 @@
  		phy-supply = <&vcc5v0_host>;
  		status = "okay";
  	};
+
+	port {
+		u2phy0_typec_hs: endpoint {
+			remote-endpoint = <&typec_hs>;
+		};
+	};
  };
 
  &u2phy1 {
@@ -799,7 +865,7 @@
 
  &usbdrd_dwc3_0 {
  	status = "okay";
-	dr_mode = "otg";
+	dr_mode = "host";
  };
 
  &usbdrd3_1 {
arch/arm/dts/rk3399-pinebook-pro.dts +75 -45
index 294d21bf45..2b5f001ff4 100644
@@ -18,6 +18,12 @@
  	model = "Pine64 Pinebook Pro";
  	compatible = "pine64,pinebook-pro", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -28,12 +34,19 @@
  		pwms = <&pwm0 0 740740 0>;
  	};
 
+	bat: battery {
+		compatible = "simple-battery";
+		charge-full-design-microamp-hours = <9800000>;
+		voltage-max-design-microvolt = <4350000>;
+		voltage-min-design-microvolt = <3000000>;
+	};
+
  	edp_panel: edp-panel {
  		compatible = "boe,nv140fhmn49";
  		backlight = <&backlight>;
  		enable-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&panel_en_gpio>;
+		pinctrl-0 = <&panel_en_pin>;
  		power-supply = <&vcc3v3_panel>;
 
  		ports {
@@ -60,7 +73,7 @@
  	gpio-key-lid {
  		compatible = "gpio-keys";
  		pinctrl-names = "default";
-		pinctrl-0 = <&lidbtn_gpio>;
+		pinctrl-0 = <&lidbtn_pin>;
 
  		lid {
  			debounce-interval = <20>;
@@ -76,7 +89,7 @@
  	gpio-key-power {
  		compatible = "gpio-keys";
  		pinctrl-names = "default";
-		pinctrl-0 = <&pwrbtn_gpio>;
+		pinctrl-0 = <&pwrbtn_pin>;
 
  		power {
  			debounce-interval = <20>;
@@ -90,9 +103,9 @@
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&pwrled_gpio &slpled_gpio>;
+		pinctrl-0 = <&pwr_led_pin &slp_led_pin>;
 
-		green-led {
+		green_led: led-0 {
  			color = <LED_COLOR_ID_GREEN>;
  			default-state = "on";
  			function = LED_FUNCTION_POWER;
@@ -100,7 +113,7 @@
  			label = "green:power";
  		};
 
-		red-led {
+		red_led: led-1 {
  			color = <LED_COLOR_ID_RED>;
  			default-state = "off";
  			function = LED_FUNCTION_STANDBY;
@@ -117,7 +130,7 @@
  		clocks = <&rk808 1>;
  		clock-names = "ext_clock";
  		pinctrl-names = "default";
-		pinctrl-0 = <&wifi_enable_h_gpio>;
+		pinctrl-0 = <&wifi_enable_h_pin>;
  		post-power-on-delay-ms = <100>;
  		power-off-delay-us = <500000>;
 
@@ -129,7 +142,7 @@
  	es8316-sound {
  		compatible = "simple-audio-card";
  		pinctrl-names = "default";
-		pinctrl-0 = <&hp_det_gpio>;
+		pinctrl-0 = <&hp_det_pin>;
  		simple-audio-card,name = "rockchip,es8316-codec";
  		simple-audio-card,format = "i2s";
  		simple-audio-card,mclk-fs = <256>;
@@ -213,7 +226,7 @@
  		enable-active-high;
  		gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&pwr_5v_gpio>;
+		pinctrl-0 = <&pwr_5v_pin>;
  		regulator-name = "vcc5v0_usb";
  		regulator-always-on;
  		regulator-min-microvolt = <5000000>;
@@ -270,7 +283,7 @@
  		enable-active-high;
  		gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&sdmmc0_pwr_h_gpio>;
+		pinctrl-0 = <&sdmmc0_pwr_h_pin>;
  		regulator-name = "vcc3v0_sd";
  		regulator-always-on;
  		regulator-min-microvolt = <3000000>;
@@ -288,7 +301,7 @@
  		enable-active-high;
  		gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&lcdvcc_en_gpio>;
+		pinctrl-0 = <&lcdvcc_en_pin>;
  		regulator-name = "vcc3v3_panel";
  		regulator-always-on;
  		regulator-min-microvolt = <3300000>;
@@ -317,7 +330,7 @@
  		enable-active-high;
  		gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vcc5v0_host_en_gpio>;
+		pinctrl-0 = <&vcc5v0_host_en_pin>;
  		regulator-name = "vcc5v0_otg";
  		regulator-always-on;
  		regulator-min-microvolt = <5000000>;
@@ -336,7 +349,7 @@
  		enable-active-high;
  		gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vcc5v0_typec0_en_gpio>;
+		pinctrl-0 = <&vcc5v0_typec0_en_pin>;
  		regulator-name = "vbus_5vout";
  		regulator-min-microvolt = <5000000>;
  		regulator-max-microvolt = <5000000>;
@@ -368,7 +381,7 @@
 
  		/* Also triggered by USB charger */
  		pinctrl-names = "default";
-		pinctrl-0 = <&dc_det_gpio>;
+		pinctrl-0 = <&dc_det_pin>;
  	};
  };
 
@@ -447,7 +460,7 @@
  		interrupt-parent = <&gpio3>;
  		interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&pmic_int_l_gpio>;
+		pinctrl-0 = <&pmic_int_l_pin>;
  		rockchip,system-power-controller;
  		wakeup-source;
 
@@ -627,7 +640,7 @@
  		reg = <0x40>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel1_gpio>;
+		pinctrl-0 = <&vsel1_pin>;
  		regulator-name = "vdd_cpu_b";
  		regulator-always-on;
  		regulator-boot-on;
@@ -646,7 +659,7 @@
  		reg = <0x41>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel2_gpio>;
+		pinctrl-0 = <&vsel2_pin>;
  		regulator-name = "vdd_gpu";
  		regulator-always-on;
  		regulator-boot-on;
@@ -690,9 +703,10 @@
  	fusb0: fusb30x@22 {
  		compatible = "fcs,fusb302";
  		reg = <0x22>;
-		fcs,int_n = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&fusb0_int_gpio>;
+		pinctrl-0 = <&fusb0_int_pin>;
  		vbus-supply = <&vbus_typec>;
 
  		connector {
@@ -740,12 +754,29 @@
  			};
  		};
  	};
+
+	cw2015@62 {
+		compatible = "cellwise,cw2015";
+		reg = <0x62>;
+		cellwise,battery-profile = /bits/ 8 <
+			0x17 0x67 0x80 0x73 0x6E 0x6C 0x6B 0x63
+			0x77 0x51 0x5C 0x58 0x50 0x4C 0x48 0x36
+			0x15 0x0C 0x0C 0x19 0x5B 0x7D 0x6F 0x69
+			0x69 0x5B 0x0C 0x29 0x20 0x40 0x52 0x59
+			0x57 0x56 0x54 0x4F 0x3B 0x1F 0x7F 0x17
+			0x06 0x1A 0x30 0x5A 0x85 0x93 0x96 0x2D
+			0x48 0x77 0x9C 0xB3 0x80 0x52 0x94 0xCB
+			0x2F 0x00 0x64 0xA5 0xB5 0x11 0xF0 0x11
+		>;
+		cellwise,monitor-interval-ms = <5000>;
+		monitored-battery = <&bat>;
+		power-supplies = <&mains_charger>, <&fusb0>;
+	};
  };
 
  &i2s1 {
-	#sound-dai-cells = <0>;
  	pinctrl-names = "default";
-	pinctrl-0 = <&i2s_8ch_mclk_gpio>, <&i2s1_2ch_bus>;
+	pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>;
  	rockchip,capture-channels = <8>;
  	rockchip,playback-channels = <8>;
  	status = "okay";
@@ -765,7 +796,6 @@
  &pcie0 {
  	bus-scan-delay-ms = <1000>;
  	ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
-	max-link-speed = <2>;
  	num-lanes = <4>;
  	pinctrl-names = "default";
  	pinctrl-0 = <&pcie_clkreqn_cpm>;
@@ -777,116 +807,116 @@
 
  &pinctrl {
  	buttons {
-		pwrbtn_gpio: pwrbtn-gpio {
+		pwrbtn_pin: pwrbtn-pin {
  			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
 
-		lidbtn_gpio: lidbtn-gpio {
+		lidbtn_pin: lidbtn-pin {
  			rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
  	dc-charger {
-		dc_det_gpio: dc-det-gpio {
+		dc_det_pin: dc-det-pin {
  			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
  	es8316 {
-		hp_det_gpio: hp-det-gpio {
+		hp_det_pin: hp-det-pin {
  			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
  	fusb302x {
-		fusb0_int_gpio: fusb0-int-gpio {
+		fusb0_int_pin: fusb0-int-pin {
  			rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
  	i2s1 {
-		i2s_8ch_mclk_gpio: i2s-8ch-mclk-gpio {
+		i2s_8ch_mclk_pin: i2s-8ch-mclk-pin {
  			rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
  		};
  	};
 
  	lcd-panel {
-		lcdvcc_en_gpio: lcdvcc-en-gpio {
+		lcdvcc_en_pin: lcdvcc-en-pin {
  			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		panel_en_gpio: panel-en-gpio {
+		panel_en_pin: panel-en-pin {
  			rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		lcd_panel_reset_gpio: lcd-panel-reset-gpio {
+		lcd_panel_reset_pin: lcd-panel-reset-pin {
  			rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
  	leds {
-		pwrled_gpio: pwrled_gpio {
+		pwr_led_pin: pwr-led-pin {
  			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		slpled_gpio: slpled_gpio {
+		slp_led_pin: slp-led-pin {
  			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
 
  	pmic {
-		pmic_int_l_gpio: pmic-int-l-gpio {
+		pmic_int_l_pin: pmic-int-l-pin {
  			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
  			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
  			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
  	};
 
  	sdcard {
-		sdmmc0_pwr_h_gpio: sdmmc0-pwr-h-gpio {
+		sdmmc0_pwr_h_pin: sdmmc0-pwr-h-pin {
  			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
  	};
 
  	sdio-pwrseq {
-		wifi_enable_h_gpio: wifi-enable-h-gpio {
+		wifi_enable_h_pin: wifi-enable-h-pin {
  			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
 
  	usb-typec {
-		vcc5v0_typec0_en_gpio: vcc5v0-typec0-en-gpio {
+		vcc5v0_typec0_en_pin: vcc5v0-typec0-en-pin {
  			rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
  	};
 
  	usb2 {
-		pwr_5v_gpio: pwr-5v-gpio {
+		pwr_5v_pin: pwr-5v-pin {
  			rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		vcc5v0_host_en_gpio: vcc5v0-host-en-gpio {
+		vcc5v0_host_en_pin: vcc5v0-host-en-pin {
  			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
 
  	wireless-bluetooth {
-		bt_wake_gpio: bt-wake-gpio {
+		bt_wake_pin: bt-wake-pin {
  			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		bt_host_wake_gpio: bt-host-wake-gpio {
+		bt_host_wake_pin: bt-host-wake-pin {
  			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		bt_reset_gpio: bt-reset-gpio {
+		bt_reset_pin: bt-reset-pin {
  			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
@@ -1034,7 +1064,7 @@
  		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
  		max-speed = <1500000>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&bt_host_wake_gpio &bt_wake_gpio &bt_reset_gpio>;
+		pinctrl-0 = <&bt_host_wake_pin &bt_wake_pin &bt_reset_pin>;
  		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
  		vbat-supply = <&wifi_bat>;
  		vddio-supply = <&vcc_wl>;
arch/arm/dts/rk3399-puma-haikou.dts +7 -3
index d80d6b7268..292bb7e80c 100644
@@ -10,14 +10,18 @@
  	model = "Theobroma Systems RK3399-Q7 SoM";
  	compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399";
 
+	aliases {
+		mmc1 = &sdmmc;
+	};
+
  	chosen {
  		stdout-path = "serial0:115200n8";
  	};
 
  	leds {
-		pinctrl-0 = <&led_pin_module>, <&led_sd_haikou>;
+		pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
 
-		sd-card-led {
+		sd_card_led: led-1 {
  			label = "sd_card_led";
  			gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
  			linux,default-trigger = "mmc0";
@@ -179,7 +183,7 @@
  	};
 
  	leds {
-		led_sd_haikou: led-sd-gpio {
+		sd_card_led_pin: sd-card-led-pin {
  			rockchip,pins =
  			  <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
arch/arm/dts/rk3399-puma.dtsi +7 -54
index 72c06abd27..fb67db4619 100644
@@ -8,12 +8,16 @@
  #include "rk3399-opp.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdhci;
+	};
+
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&led_pin_module>;
+		pinctrl-0 = <&module_led_pin>;
 
-		module-led {
+		module_led: led-0 {
  			label = "module_led";
  			gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;
  			linux,default-trigger = "heartbeat";
@@ -21,57 +25,6 @@
  		};
  	};
 
-	/*
-	 * Overwrite the opp-table for CPUB as this board uses a different
-	 * regulator (FAN53555) that only allows 10mV steps and therefore
-	 * can't reach the operation point target voltages from rk3399-opp.dtsi
-	 */
-	/delete-node/ opp-table1;
-	cluster1_opp: opp-table1 {
-		compatible = "operating-points-v2";
-		opp-shared;
-
-		opp00 {
-			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
-			clock-latency-ns = <40000>;
-		};
-		opp01 {
-			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
-		};
-		opp02 {
-			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <830000>;
-			opp-suspend;
-		};
-		opp03 {
-			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <880000>;
-		};
-		opp04 {
-			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <950000>;
-		};
-		opp05 {
-			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1030000>;
-		};
-		opp06 {
-			opp-hz = /bits/ 64 <1608000000>;
-			opp-microvolt = <1100000>;
-		};
-		opp07 {
-			opp-hz = /bits/ 64 <1800000000>;
-			opp-microvolt = <1200000>;
-		};
-		opp08 {
-			opp-hz = /bits/ 64 <1992000000>;
-			opp-microvolt = <1230000>;
-			turbo-mode;
-		};
-	};
-
  	clkin_gmac: external-gmac-clock {
  		compatible = "fixed-clock";
  		clock-frequency = <125000000>;
@@ -450,7 +403,7 @@
  	};
 
  	leds {
-		led_pin_module: led-module-gpio {
+		module_led_pin: module-led-pin {
  			rockchip,pins =
  			  <2 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
arch/arm/dts/rk3399-roc-pc-mezzanine.dts +20 -2
index 2acb3d500f..9447c8724b 100644
@@ -11,6 +11,20 @@
  	model = "Firefly ROC-RK3399-PC Mezzanine Board";
  	compatible = "firefly,roc-rk3399-pc-mezzanine", "rockchip,rk3399";
 
+	aliases {
+		mmc2 = &sdio0;
+	};
+
+	/* MP8009 PoE PD */
+	poe_12v: poe-12v {
+		compatible = "regulator-fixed";
+		regulator-name = "poe_12v";
+		regulator-always-on;
+		regulator-boot-on;
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+	};
+
  	vcc3v3_ngff: vcc3v3-ngff {
  		compatible = "regulator-fixed";
  		regulator-name = "vcc3v3_ngff";
@@ -22,7 +36,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <3300000>;
  		regulator-max-microvolt = <3300000>;
-		vin-supply = <&dc_12v>;
+		vin-supply = <&sys_12v>;
  	};
 
  	vcc3v3_pcie: vcc3v3-pcie {
@@ -34,10 +48,14 @@
  		pinctrl-0 = <&vcc3v3_pcie_en>;
  		regulator-min-microvolt = <3300000>;
  		regulator-max-microvolt = <3300000>;
-		vin-supply = <&dc_12v>;
+		vin-supply = <&sys_12v>;
  	};
  };
 
+&sys_12v {
+	vin-supply = <&poe_12v>;
+};
+
  &pcie_phy {
  	status = "okay";
  };
arch/arm/dts/rk3399-roc-pc.dtsi +44 -15
index 9f225e9c3d..d1aaf8e833 100644
@@ -13,6 +13,11 @@
  	model = "Firefly ROC-RK3399-PC Board";
  	compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
 
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -58,30 +63,37 @@
  		};
  	};
 
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_int>;
+	};
+
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>, <&yellow_led_gpio>;
+		pinctrl-0 = <&work_led_pin>, <&diy_led_pin>, <&yellow_led_pin>;
 
-		work-led {
+		work_led: led-0 {
  			label = "green:work";
  			gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
  			default-state = "on";
  			linux,default-trigger = "heartbeat";
  		};
 
-		diy-led {
+		diy_led: led-1 {
  			label = "red:diy";
  			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
  			default-state = "off";
-			linux,default-trigger = "mmc1";
+			linux,default-trigger = "mmc2";
  		};
 
-		yellow-led {
+		yellow_led: led-2 {
  			label = "yellow:yellow-led";
  			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
  			default-state = "off";
-			linux,default-trigger = "mmc0";
+			linux,default-trigger = "mmc1";
  		};
  	};
 
@@ -110,6 +122,14 @@
  		regulator-max-microvolt = <5000000>;
  	};
 
+	sys_12v: sys-12v {
+		compatible = "regulator-fixed";
+		regulator-name = "sys_12v";
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&dc_12v>;
+	};
+
  	/* switched by pmic_sleep */
  	vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
  		compatible = "regulator-fixed";
@@ -141,7 +161,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <3300000>;
  		regulator-max-microvolt = <3300000>;
-		vin-supply = <&dc_12v>;
+		vin-supply = <&sys_12v>;
  	};
 
  	vcca_0v9: vcca-0v9 {
@@ -186,7 +206,7 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <5000000>;
  		regulator-max-microvolt = <5000000>;
-		vin-supply = <&dc_12v>;
+		vin-supply = <&sys_12v>;
  	};
 
  	vdd_log: vdd-log {
@@ -376,6 +396,7 @@
 
  			vcc_sdio: LDO_REG4 {
  				regulator-name = "vcc_sdio";
+				regulator-always-on;
  				regulator-boot-on;
  				regulator-min-microvolt = <1800000>;
  				regulator-max-microvolt = <3000000>;
@@ -456,7 +477,7 @@
  		reg = <0x40>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel1_gpio>;
+		pinctrl-0 = <&vsel1_pin>;
  		regulator-name = "vdd_cpu_b";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
@@ -475,11 +496,13 @@
  		reg = <0x41>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel2_gpio>;
+		pinctrl-0 = <&vsel2_pin>;
  		regulator-name = "vdd_gpu";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
  		regulator-ramp-delay = <1000>;
+		regulator-always-on;
+		regulator-boot-on;
  		vin-supply = <&vcc3v3_sys>;
 
  		regulator-state-mem {
@@ -588,6 +611,12 @@
  		};
  	};
 
+	ir {
+		ir_int: ir-int {
+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	lcd-panel {
  		lcd_panel_reset: lcd-panel-reset {
  			rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -595,25 +624,25 @@
  	};
 
  	leds {
-		diy_led_gpio: diy_led-gpio {
+		diy_led_pin: diy-led-pin {
  			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		work_led_gpio: work_led-gpio {
+		work_led_pin: work-led-pin {
  			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		yellow_led_gpio: yellow_led-gpio {
+		yellow_led_pin: yellow-led-pin {
  			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
 
  	pmic {
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
  			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
  			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
  	};
arch/arm/dts/rk3399-rock-pi-4.dtsi +13 -16
index 1c55a4645b..b28888ea92 100644
@@ -11,6 +11,11 @@
  #include "rk3399-opp.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -111,10 +116,6 @@
  		regulator-boot-on;
  		regulator-min-microvolt = <3300000>;
  		regulator-max-microvolt = <3300000>;
-
-		regulator-state-mem {
-			regulator-off-in-suspend;
-		};
  	};
 
  	vdd_log: vdd-log {
@@ -362,8 +363,6 @@
  				regulator-name = "vcc_cam";
  				regulator-always-on;
  				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
  				regulator-state-mem {
  					regulator-off-in-suspend;
  				};
@@ -373,8 +372,6 @@
  				regulator-name = "vcc_mipi";
  				regulator-always-on;
  				regulator-boot-on;
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
  				regulator-state-mem {
  					regulator-off-in-suspend;
  				};
@@ -387,7 +384,7 @@
  		reg = <0x40>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel1_gpio>;
+		pinctrl-0 = <&vsel1_pin>;
  		regulator-name = "vdd_cpu_b";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
@@ -406,7 +403,7 @@
  		reg = <0x41>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel2_gpio>;
+		pinctrl-0 = <&vsel2_pin>;
  		regulator-name = "vdd_gpu";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
@@ -440,8 +437,9 @@
  };
 
  &i2s0 {
-	rockchip,playback-channels = <8>;
-	rockchip,capture-channels = <8>;
+	pinctrl-0 = <&i2s0_2ch_bus>;
+	rockchip,capture-channels = <2>;
+	rockchip,playback-channels = <2>;
  	status = "okay";
  };
 
@@ -476,7 +474,6 @@
 
  &pcie0 {
  	ep-gpios = <&gpio4 RK_PD3 GPIO_ACTIVE_HIGH>;
-	max-link-speed = <2>;
  	num-lanes = <4>;
  	pinctrl-0 = <&pcie_clkreqnb_cpm>;
  	pinctrl-names = "default";
@@ -529,11 +526,11 @@
  			rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
  			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
  			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
  	};
@@ -680,7 +677,7 @@
 
  &usbdrd_dwc3_0 {
  	status = "okay";
-	dr_mode = "otg";
+	dr_mode = "host";
  };
 
  &usbdrd3_1 {
arch/arm/dts/rk3399-rock-pi-4a.dts +1 -1
index d96dd3ebd3..89f2af5e11 100644
@@ -9,5 +9,5 @@
 
  / {
  	model = "Radxa ROCK Pi 4A";
-	compatible = "radxa,rockpi4", "rockchip,rk3399";
+	compatible = "radxa,rockpi4a", "radxa,rockpi4", "rockchip,rk3399";
  };
arch/arm/dts/rk3399-rock-pi-4b.dts +5 -1
index 4ca970acac..6c63e61706 100644
@@ -9,7 +9,11 @@
 
  / {
  	model = "Radxa ROCK Pi 4B";
-	compatible = "radxa,rockpi4", "rockchip,rk3399";
+	compatible = "radxa,rockpi4b", "radxa,rockpi4", "rockchip,rk3399";
+
+	aliases {
+		mmc2 = &sdio0;
+	};
  };
 
  &sdio0 {
arch/arm/dts/rk3399-rock-pi-4c.dts +5 -1
index 9d07ebd1ec..99169bcd51 100644
@@ -10,7 +10,11 @@
 
  / {
  	model = "Radxa ROCK Pi 4C";
-	compatible = "radxa,rockpi4", "rockchip,rk3399";
+	compatible = "radxa,rockpi4c", "radxa,rockpi4", "rockchip,rk3399";
+
+	aliases {
+		mmc2 = &sdio0;
+	};
  };
 
  &sdio0 {
arch/arm/dts/rk3399-rock960.dts +29 -53
index 437a75f31a..1a23e8f3cd 100644
@@ -17,42 +17,43 @@
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&user_led1>, <&user_led2>, <&user_led3>,
-			    <&user_led4>, <&wlan_led>, <&bt_led>;
+		pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>,
+			    <&user_led3_pin>, <&user_led4_pin>,
+			    <&wlan_led_pin>, <&bt_led_pin>;
 
-		user_led1 {
+		user_led1: led-1 {
  			label = "green:user1";
  			gpios = <&gpio4 RK_PC2 0>;
  			linux,default-trigger = "heartbeat";
  		};
 
-		user_led2 {
+		user_led2: led-2 {
  			label = "green:user2";
  			gpios = <&gpio4 RK_PC6 0>;
  			linux,default-trigger = "mmc0";
  		};
 
-		user_led3 {
+		user_led3: led-3 {
  			label = "green:user3";
  			gpios = <&gpio4 RK_PD0 0>;
  			linux,default-trigger = "mmc1";
  		};
 
-		user_led4 {
+		user_led4: led-4 {
  			label = "green:user4";
  			gpios = <&gpio4 RK_PD4 0>;
  			panic-indicator;
  			linux,default-trigger = "none";
  		};
 
-		wlan_active_led {
+		wlan_active_led: led-5 {
  			label = "yellow:wlan";
  			gpios = <&gpio4 RK_PD5 0>;
  			linux,default-trigger = "phy0tx";
  			default-state = "off";
  		};
 
-		bt_active_led {
+		bt_active_led: led-6 {
  			label = "blue:bt";
  			gpios = <&gpio4 RK_PD6 0>;
  			linux,default-trigger = "hci0-power";
@@ -62,38 +63,52 @@
 
  };
 
+&cpu_alert0 {
+	temperature = <65000>;
+};
+
+&cpu_thermal {
+	sustainable-power = <1550>;
+
+	cooling-maps {
+		map0 {
+			trip = <&cpu_alert1>;
+		};
+	};
+};
+
  &pcie0 {
  	ep-gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
  };
 
  &pinctrl {
  	leds {
-		user_led1: user_led1 {
+		user_led1_pin: user-led1-pin {
  			rockchip,pins =
  				<4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		user_led2: user_led2 {
+		user_led2_pin: user-led2-pin {
  			rockchip,pins =
  				<4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		user_led3: user_led3 {
+		user_led3_pin: user-led3-pin {
  			rockchip,pins =
  				<4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		user_led4: user_led4 {
+		user_led4_pin: user-led4-pin {
  			rockchip,pins =
  				<4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		wlan_led: wlan_led {
+		wlan_led_pin: wlan-led-pin {
  			rockchip,pins =
  				<4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		bt_led: bt_led {
+		bt_led_pin: bt-led-pin {
  			rockchip,pins =
  				<4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
@@ -124,45 +139,6 @@
  	status = "okay";
  };
 
-&thermal_zones {
-	cpu_thermal: cpu {
-		polling-delay-passive = <100>;
-		polling-delay = <1000>;
-		thermal-sensors = <&tsadc 0>;
-		sustainable-power = <1550>;
-
-		trips {
-			cpu_alert0: cpu_alert0 {
-				    temperature = <65000>;
-				    hysteresis = <2000>;
-				    type = "passive";
-			};
-
-			cpu_alert1: cpu_alert1 {
-				    temperature = <75000>;
-				    hysteresis = <2000>;
-				    type = "passive";
-			};
-
-			cpu_crit: cpu_crit {
-				  temperature = <95000>;
-				  hysteresis = <2000>;
-				  type = "critical";
-			};
-		};
-
-		cooling-maps {
-			     map0 {
-
-			     trip = <&cpu_alert1>;
-			     cooling-device =
-					<&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-					<&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-			};
-		};
-	};
-};
-
  &usbdrd_dwc3_0 {
  	dr_mode = "otg";
  };
arch/arm/dts/rk3399-rock960.dtsi +8 -2
index ba7c75c9f2..25dc61c26a 100644
@@ -9,6 +9,12 @@
  #include "rk3399-opp.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	sdio_pwrseq: sdio-pwrseq {
  		compatible = "mmc-pwrseq-simple";
  		clocks = <&rk808 1>;
@@ -470,12 +476,12 @@
  				<1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
  			rockchip,pins =
  				<1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
  			rockchip,pins =
  				<1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
arch/arm/dts/rk3399-rockpro64.dtsi +84 -11
index 9bca258012..6bff8db7d3 100644
@@ -10,6 +10,12 @@
  #include "rk3399-opp.dtsi"
 
  / {
+	aliases {
+		mmc0 = &sdio0;
+		mmc1 = &sdmmc;
+		mmc2 = &sdhci;
+	};
+
  	chosen {
  		stdout-path = "serial2:1500000n8";
  	};
@@ -36,18 +42,25 @@
  		};
  	};
 
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+		pinctrl-0 = <&ir_int>;
+		pinctrl-names = "default";
+	};
+
  	leds {
  		compatible = "gpio-leds";
  		pinctrl-names = "default";
-		pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>;
+		pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
 
-		work-led {
+		work_led: led-0 {
  			label = "work";
  			default-state = "on";
  			gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
  		};
 
-		diy-led {
+		diy_led: led-1 {
  			label = "diy";
  			default-state = "off";
  			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
@@ -72,10 +85,27 @@
 
  	sound {
  		compatible = "audio-graph-card";
-		label = "rockchip,rk3399";
+		label = "Analog";
  		dais = <&i2s1_p0>;
  	};
 
+	sound-dit {
+		compatible = "audio-graph-card";
+		label = "SPDIF";
+		dais = <&spdif_p0>;
+	};
+
+	spdif-dit {
+		compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+
+		port {
+			dit_p0_0: endpoint {
+				remote-endpoint = <&spdif_p0_0>;
+			};
+		};
+	};
+
  	vcc12v_dcin: vcc12v-dcin {
  		compatible = "regulator-fixed";
  		regulator-name = "vcc12v_dcin";
@@ -96,6 +126,24 @@
  		vin-supply = <&vcc_1v8>;
  	};
 
+	/* micro SD card power */
+	vcc3v0_sd: vcc3v0-sd {
+		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sdmmc0_pwr_h>;
+		regulator-name = "vcc3v0_sd";
+		regulator-always-on;
+		regulator-min-microvolt = <3000000>;
+		regulator-max-microvolt = <3000000>;
+		vin-supply = <&vcc3v3_sys>;
+
+		regulator-state-mem {
+			regulator-off-in-suspend;
+		};
+	};
+
  	vcc3v3_pcie: vcc3v3-pcie-regulator {
  		compatible = "regulator-fixed";
  		enable-active-high;
@@ -427,7 +475,7 @@
  		reg = <0x40>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel1_gpio>;
+		pinctrl-0 = <&vsel1_pin>;
  		regulator-name = "vdd_cpu_b";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
@@ -446,7 +494,7 @@
  		reg = <0x41>;
  		fcs,suspend-voltage-selector = <1>;
  		pinctrl-names = "default";
-		pinctrl-0 = <&vsel2_gpio>;
+		pinctrl-0 = <&vsel2_pin>;
  		regulator-name = "vdd_gpu";
  		regulator-min-microvolt = <712500>;
  		regulator-max-microvolt = <1500000>;
@@ -569,12 +617,18 @@
  		};
  	};
 
+	ir {
+		ir_int: ir-int {
+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	leds {
-		work_led_gpio: work_led-gpio {
+		work_led_pin: work-led-pin {
  			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
 
-		diy_led_gpio: diy_led-gpio {
+		diy_led_pin: diy-led-pin {
  			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
  		};
  	};
@@ -594,15 +648,22 @@
  			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
  		};
 
-		vsel1_gpio: vsel1-gpio {
+		vsel1_pin: vsel1-pin {
  			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
 
-		vsel2_gpio: vsel2-gpio {
+		vsel2_pin: vsel2-pin {
  			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
  		};
  	};
 
+	sdcard {
+		sdmmc0_pwr_h: sdmmc0-pwr-h {
+			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+	};
+
  	sdio-pwrseq {
  		wifi_enable_h: wifi-enable-h {
  			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -661,6 +722,8 @@
  	max-frequency = <150000000>;
  	pinctrl-names = "default";
  	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+	vmmc-supply = <&vcc3v0_sd>;
+	vqmmc-supply = <&vcc_sdio>;
  	status = "okay";
  };
 
@@ -671,6 +734,16 @@
  	status = "okay";
  };
 
+&spdif {
+	pinctrl-0 = <&spdif_bus_1>;
+
+	spdif_p0: port {
+		spdif_p0_0: endpoint {
+			remote-endpoint = <&dit_p0_0>;
+		};
+	};
+};
+
  &spi1 {
  	status = "okay";
 
@@ -768,7 +841,7 @@
 
  &usbdrd_dwc3_0 {
  	status = "okay";
-	dr_mode = "otg";
+	dr_mode = "host";
  };
 
  &usbdrd3_1 {
arch/arm/dts/rk3399.dtsi +163 -106
index 74f2c3d490..3871c7fd83 100644
@@ -197,38 +197,12 @@
  		#clock-cells = <0>;
  	};
 
-	amba: bus {
-		compatible = "simple-bus";
-		#address-cells = <2>;
-		#size-cells = <2>;
-		ranges;
-
-		dmac_bus: dma-controller@ff6d0000 {
-			compatible = "arm,pl330", "arm,primecell";
-			reg = <0x0 0xff6d0000 0x0 0x4000>;
-			interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>,
-				     <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
-			#dma-cells = <1>;
-			clocks = <&cru ACLK_DMAC0_PERILP>;
-			clock-names = "apb_pclk";
-		};
-
-		dmac_peri: dma-controller@ff6e0000 {
-			compatible = "arm,pl330", "arm,primecell";
-			reg = <0x0 0xff6e0000 0x0 0x4000>;
-			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>,
-				     <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
-			#dma-cells = <1>;
-			clocks = <&cru ACLK_DMAC1_PERILP>;
-			clock-names = "apb_pclk";
-		};
-	};
-
  	pcie0: pcie@f8000000 {
  		compatible = "rockchip,rk3399-pcie";
  		reg = <0x0 0xf8000000 0x0 0x2000000>,
  		      <0x0 0xfd000000 0x0 0x1000000>;
  		reg-names = "axi-base", "apb-base";
+		device_type = "pci";
  		#address-cells = <3>;
  		#size-cells = <2>;
  		#interrupt-cells = <1>;
@@ -247,15 +221,14 @@
  				<0 0 0 2 &pcie0_intc 1>,
  				<0 0 0 3 &pcie0_intc 2>,
  				<0 0 0 4 &pcie0_intc 3>;
-		linux,pci-domain = <0>;
  		max-link-speed = <1>;
  		msi-map = <0x0 &its 0x0 0x1000>;
  		phys = <&pcie_phy 0>, <&pcie_phy 1>,
  		       <&pcie_phy 2>, <&pcie_phy 3>;
  		phy-names = "pcie-phy-0", "pcie-phy-1",
  			    "pcie-phy-2", "pcie-phy-3";
-		ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x1e00000
-			  0x81000000 0x0 0xfbe00000 0x0 0xfbe00000 0x0 0x100000>;
+		ranges = <0x82000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x1e00000>,
+			 <0x81000000 0x0 0xfbe00000 0x0 0xfbe00000 0x0 0x100000>;
  		resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
  			 <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE>,
  			 <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>,
@@ -326,7 +299,7 @@
  		status = "disabled";
  	};
 
-	sdhci: sdhci@fe330000 {
+	sdhci: mmc@fe330000 {
  		compatible = "rockchip,rk3399-sdhci-5.1", "arasan,sdhci-5.1";
  		reg = <0x0 0xfe330000 0x0 0x10000>;
  		interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -403,7 +376,7 @@
  		reset-names = "usb3-otg";
  		status = "disabled";
 
-		usbdrd_dwc3_0: dwc3 {
+		usbdrd_dwc3_0: usb@fe800000 {
  			compatible = "snps,dwc3";
  			reg = <0x0 0xfe800000 0x0 0x100000>;
  			interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -439,7 +412,7 @@
  		reset-names = "usb3-otg";
  		status = "disabled";
 
-		usbdrd_dwc3_1: dwc3 {
+		usbdrd_dwc3_1: usb@fe900000 {
  			compatible = "snps,dwc3";
  			reg = <0x0 0xfe900000 0x0 0x100000>;
  			interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -759,7 +732,7 @@
  	};
 
  	thermal_zones: thermal-zones {
-		cpu_thermal: cpu {
+		cpu_thermal: cpu-thermal {
  			polling-delay-passive = <100>;
  			polling-delay = <1000>;
 
@@ -803,7 +776,7 @@
  			};
  		};
 
-		gpu_thermal: gpu {
+		gpu_thermal: gpu-thermal {
  			polling-delay-passive = <100>;
  			polling-delay = <1000>;
 
@@ -845,135 +818,135 @@
  		rockchip,grf = <&grf>;
  		rockchip,hw-tshut-temp = <95000>;
  		pinctrl-names = "init", "default", "sleep";
-		pinctrl-0 = <&otp_gpio>;
+		pinctrl-0 = <&otp_pin>;
  		pinctrl-1 = <&otp_out>;
-		pinctrl-2 = <&otp_gpio>;
+		pinctrl-2 = <&otp_pin>;
  		#thermal-sensor-cells = <1>;
  		status = "disabled";
  	};
 
  	qos_emmc: qos@ffa58000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa58000 0x0 0x20>;
  	};
 
  	qos_gmac: qos@ffa5c000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa5c000 0x0 0x20>;
  	};
 
  	qos_pcie: qos@ffa60080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa60080 0x0 0x20>;
  	};
 
  	qos_usb_host0: qos@ffa60100 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa60100 0x0 0x20>;
  	};
 
  	qos_usb_host1: qos@ffa60180 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa60180 0x0 0x20>;
  	};
 
  	qos_usb_otg0: qos@ffa70000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa70000 0x0 0x20>;
  	};
 
  	qos_usb_otg1: qos@ffa70080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa70080 0x0 0x20>;
  	};
 
  	qos_sd: qos@ffa74000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa74000 0x0 0x20>;
  	};
 
  	qos_sdioaudio: qos@ffa76000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa76000 0x0 0x20>;
  	};
 
  	qos_hdcp: qos@ffa90000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa90000 0x0 0x20>;
  	};
 
  	qos_iep: qos@ffa98000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffa98000 0x0 0x20>;
  	};
 
  	qos_isp0_m0: qos@ffaa0000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffaa0000 0x0 0x20>;
  	};
 
  	qos_isp0_m1: qos@ffaa0080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffaa0080 0x0 0x20>;
  	};
 
  	qos_isp1_m0: qos@ffaa8000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffaa8000 0x0 0x20>;
  	};
 
  	qos_isp1_m1: qos@ffaa8080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffaa8080 0x0 0x20>;
  	};
 
  	qos_rga_r: qos@ffab0000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffab0000 0x0 0x20>;
  	};
 
  	qos_rga_w: qos@ffab0080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffab0080 0x0 0x20>;
  	};
 
  	qos_video_m0: qos@ffab8000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffab8000 0x0 0x20>;
  	};
 
  	qos_video_m1_r: qos@ffac0000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffac0000 0x0 0x20>;
  	};
 
  	qos_video_m1_w: qos@ffac0080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffac0080 0x0 0x20>;
  	};
 
  	qos_vop_big_r: qos@ffac8000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffac8000 0x0 0x20>;
  	};
 
  	qos_vop_big_w: qos@ffac8080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffac8080 0x0 0x20>;
  	};
 
  	qos_vop_little: qos@ffad0000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffad0000 0x0 0x20>;
  	};
 
  	qos_perihp: qos@ffad8080 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffad8080 0x0 0x20>;
  	};
 
  	qos_gpu: qos@ffae0000 {
-		compatible = "syscon";
+		compatible = "rockchip,rk3399-qos", "syscon";
  		reg = <0x0 0xffae0000 0x0 0x20>;
  	};
 
@@ -995,126 +968,146 @@
  			#size-cells = <0>;
 
  			/* These power domains are grouped by VD_CENTER */
-			pd_iep@RK3399_PD_IEP {
+			power-domain@RK3399_PD_IEP {
  				reg = <RK3399_PD_IEP>;
  				clocks = <&cru ACLK_IEP>,
  					 <&cru HCLK_IEP>;
  				pm_qos = <&qos_iep>;
+				#power-domain-cells = <0>;
  			};
-			pd_rga@RK3399_PD_RGA {
+			power-domain@RK3399_PD_RGA {
  				reg = <RK3399_PD_RGA>;
  				clocks = <&cru ACLK_RGA>,
  					 <&cru HCLK_RGA>;
  				pm_qos = <&qos_rga_r>,
  					 <&qos_rga_w>;
+				#power-domain-cells = <0>;
  			};
-			pd_vcodec@RK3399_PD_VCODEC {
+			power-domain@RK3399_PD_VCODEC {
  				reg = <RK3399_PD_VCODEC>;
  				clocks = <&cru ACLK_VCODEC>,
  					 <&cru HCLK_VCODEC>;
  				pm_qos = <&qos_video_m0>;
+				#power-domain-cells = <0>;
  			};
-			pd_vdu@RK3399_PD_VDU {
+			power-domain@RK3399_PD_VDU {
  				reg = <RK3399_PD_VDU>;
  				clocks = <&cru ACLK_VDU>,
  					 <&cru HCLK_VDU>;
  				pm_qos = <&qos_video_m1_r>,
  					 <&qos_video_m1_w>;
+				#power-domain-cells = <0>;
  			};
 
  			/* These power domains are grouped by VD_GPU */
-			pd_gpu@RK3399_PD_GPU {
+			power-domain@RK3399_PD_GPU {
  				reg = <RK3399_PD_GPU>;
  				clocks = <&cru ACLK_GPU>;
  				pm_qos = <&qos_gpu>;
+				#power-domain-cells = <0>;
  			};
 
  			/* These power domains are grouped by VD_LOGIC */
-			pd_edp@RK3399_PD_EDP {
+			power-domain@RK3399_PD_EDP {
  				reg = <RK3399_PD_EDP>;
  				clocks = <&cru PCLK_EDP_CTRL>;
+				#power-domain-cells = <0>;
  			};
-			pd_emmc@RK3399_PD_EMMC {
+			power-domain@RK3399_PD_EMMC {
  				reg = <RK3399_PD_EMMC>;
  				clocks = <&cru ACLK_EMMC>;
  				pm_qos = <&qos_emmc>;
+				#power-domain-cells = <0>;
  			};
-			pd_gmac@RK3399_PD_GMAC {
+			power-domain@RK3399_PD_GMAC {
  				reg = <RK3399_PD_GMAC>;
  				clocks = <&cru ACLK_GMAC>,
  					 <&cru PCLK_GMAC>;
  				pm_qos = <&qos_gmac>;
+				#power-domain-cells = <0>;
  			};
-			pd_sd@RK3399_PD_SD {
+			power-domain@RK3399_PD_SD {
  				reg = <RK3399_PD_SD>;
  				clocks = <&cru HCLK_SDMMC>,
  					 <&cru SCLK_SDMMC>;
  				pm_qos = <&qos_sd>;
+				#power-domain-cells = <0>;
  			};
-			pd_sdioaudio@RK3399_PD_SDIOAUDIO {
+			power-domain@RK3399_PD_SDIOAUDIO {
  				reg = <RK3399_PD_SDIOAUDIO>;
  				clocks = <&cru HCLK_SDIO>;
  				pm_qos = <&qos_sdioaudio>;
+				#power-domain-cells = <0>;
+			};
+			power-domain@RK3399_PD_TCPD0 {
+				reg = <RK3399_PD_TCPD0>;
+				clocks = <&cru SCLK_UPHY0_TCPDCORE>,
+					 <&cru SCLK_UPHY0_TCPDPHY_REF>;
+				#power-domain-cells = <0>;
+			};
+			power-domain@RK3399_PD_TCPD1 {
+				reg = <RK3399_PD_TCPD1>;
+				clocks = <&cru SCLK_UPHY1_TCPDCORE>,
+					 <&cru SCLK_UPHY1_TCPDPHY_REF>;
+				#power-domain-cells = <0>;
  			};
-			pd_usb3@RK3399_PD_USB3 {
+			power-domain@RK3399_PD_USB3 {
  				reg = <RK3399_PD_USB3>;
  				clocks = <&cru ACLK_USB3>;
  				pm_qos = <&qos_usb_otg0>,
  					 <&qos_usb_otg1>;
+				#power-domain-cells = <0>;
  			};
-			pd_vio@RK3399_PD_VIO {
+			power-domain@RK3399_PD_VIO {
  				reg = <RK3399_PD_VIO>;
+				#power-domain-cells = <1>;
  				#address-cells = <1>;
  				#size-cells = <0>;
 
-				pd_hdcp@RK3399_PD_HDCP {
+				power-domain@RK3399_PD_HDCP {
  					reg = <RK3399_PD_HDCP>;
  					clocks = <&cru ACLK_HDCP>,
  						 <&cru HCLK_HDCP>,
  						 <&cru PCLK_HDCP>;
  					pm_qos = <&qos_hdcp>;
+					#power-domain-cells = <0>;
  				};
-				pd_isp0@RK3399_PD_ISP0 {
+				power-domain@RK3399_PD_ISP0 {
  					reg = <RK3399_PD_ISP0>;
  					clocks = <&cru ACLK_ISP0>,
  						 <&cru HCLK_ISP0>;
  					pm_qos = <&qos_isp0_m0>,
  						 <&qos_isp0_m1>;
+					#power-domain-cells = <0>;
  				};
-				pd_isp1@RK3399_PD_ISP1 {
+				power-domain@RK3399_PD_ISP1 {
  					reg = <RK3399_PD_ISP1>;
  					clocks = <&cru ACLK_ISP1>,
  						 <&cru HCLK_ISP1>;
  					pm_qos = <&qos_isp1_m0>,
  						 <&qos_isp1_m1>;
+					#power-domain-cells = <0>;
  				};
-				pd_tcpc0@RK3399_PD_TCPC0 {
-					reg = <RK3399_PD_TCPD0>;
-					clocks = <&cru SCLK_UPHY0_TCPDCORE>,
-						 <&cru SCLK_UPHY0_TCPDPHY_REF>;
-				};
-				pd_tcpc1@RK3399_PD_TCPC1 {
-					reg = <RK3399_PD_TCPD1>;
-					clocks = <&cru SCLK_UPHY1_TCPDCORE>,
-						 <&cru SCLK_UPHY1_TCPDPHY_REF>;
-				};
-				pd_vo@RK3399_PD_VO {
+				power-domain@RK3399_PD_VO {
  					reg = <RK3399_PD_VO>;
+					#power-domain-cells = <1>;
  					#address-cells = <1>;
  					#size-cells = <0>;
 
-					pd_vopb@RK3399_PD_VOPB {
+					power-domain@RK3399_PD_VOPB {
  						reg = <RK3399_PD_VOPB>;
  						clocks = <&cru ACLK_VOP0>,
  							 <&cru HCLK_VOP0>;
  						pm_qos = <&qos_vop_big_r>,
  							 <&qos_vop_big_w>;
+						#power-domain-cells = <0>;
  					};
-					pd_vopl@RK3399_PD_VOPL {
+					power-domain@RK3399_PD_VOPL {
  						reg = <RK3399_PD_VOPL>;
  						clocks = <&cru ACLK_VOP1>,
  							 <&cru HCLK_VOP1>;
  						pm_qos = <&qos_vop_little>;
+						#power-domain-cells = <0>;
  					};
  				};
  			};
@@ -1124,8 +1117,6 @@
  	pmugrf: syscon@ff320000 {
  		compatible = "rockchip,rk3399-pmugrf", "syscon", "simple-mfd";
  		reg = <0x0 0xff320000 0x0 0x1000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
 
  		pmu_io_domains: io-domains {
  			compatible = "rockchip,rk3399-pmu-io-voltage-domain";
@@ -1211,7 +1202,6 @@
  		pinctrl-names = "default";
  		pinctrl-0 = <&pwm0_pin>;
  		clocks = <&pmucru PCLK_RKPWM_PMU>;
-		clock-names = "pwm";
  		status = "disabled";
  	};
 
@@ -1222,7 +1212,6 @@
  		pinctrl-names = "default";
  		pinctrl-0 = <&pwm1_pin>;
  		clocks = <&pmucru PCLK_RKPWM_PMU>;
-		clock-names = "pwm";
  		status = "disabled";
  	};
 
@@ -1233,7 +1222,6 @@
  		pinctrl-names = "default";
  		pinctrl-0 = <&pwm2_pin>;
  		clocks = <&pmucru PCLK_RKPWM_PMU>;
-		clock-names = "pwm";
  		status = "disabled";
  	};
 
@@ -1244,7 +1232,6 @@
  		pinctrl-names = "default";
  		pinctrl-0 = <&pwm3a_pin>;
  		clocks = <&pmucru PCLK_RKPWM_PMU>;
-		clock-names = "pwm";
  		status = "disabled";
  	};
 
@@ -1271,6 +1258,17 @@
  		power-domains = <&power RK3399_PD_VCODEC>;
  	};
 
+	vdec: video-codec@ff660000 {
+		compatible = "rockchip,rk3399-vdec";
+		reg = <0x0 0xff660000 0x0 0x400>;
+		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>,
+			 <&cru SCLK_VDU_CA>, <&cru SCLK_VDU_CORE>;
+		clock-names = "axi", "ahb", "cabac", "core";
+		iommus = <&vdec_mmu>;
+		power-domains = <&power RK3399_PD_VDU>;
+	};
+
  	vdec_mmu: iommu@ff660480 {
  		compatible = "rockchip,iommu";
  		reg = <0x0 0xff660480 0x0 0x40>, <0x0 0xff6604c0 0x0 0x40>;
@@ -1278,8 +1276,8 @@
  		interrupt-names = "vdec_mmu";
  		clocks = <&cru ACLK_VDU>, <&cru HCLK_VDU>;
  		clock-names = "aclk", "iface";
+		power-domains = <&power RK3399_PD_VDU>;
  		#iommu-cells = <0>;
-		status = "disabled";
  	};
 
  	iep_mmu: iommu@ff670800 {
@@ -1336,6 +1334,28 @@
  		};
  	};
 
+	dmac_bus: dma-controller@ff6d0000 {
+		compatible = "arm,pl330", "arm,primecell";
+		reg = <0x0 0xff6d0000 0x0 0x4000>;
+		interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH 0>;
+		#dma-cells = <1>;
+		arm,pl330-periph-burst;
+		clocks = <&cru ACLK_DMAC0_PERILP>;
+		clock-names = "apb_pclk";
+	};
+
+	dmac_peri: dma-controller@ff6e0000 {
+		compatible = "arm,pl330", "arm,primecell";
+		reg = <0x0 0xff6e0000 0x0 0x4000>;
+		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH 0>;
+		#dma-cells = <1>;
+		arm,pl330-periph-burst;
+		clocks = <&cru ACLK_DMAC1_PERILP>;
+		clock-names = "apb_pclk";
+	};
+
  	pmucru: pmu-clock-controller@ff750000 {
  		compatible = "rockchip,rk3399-pmucru";
  		reg = <0x0 0xff750000 0x0 0x1000>;
@@ -1387,7 +1407,18 @@
  			status = "disabled";
  		};
 
-		u2phy0: usb2-phy@e450 {
+		mipi_dphy_rx0: mipi-dphy-rx0 {
+			compatible = "rockchip,rk3399-mipi-dphy-rx0";
+			clocks = <&cru SCLK_MIPIDPHY_REF>,
+				 <&cru SCLK_DPHY_RX0_CFG>,
+				 <&cru PCLK_VIO_GRF>;
+			clock-names = "dphy-ref", "dphy-cfg", "grf";
+			power-domains = <&power RK3399_PD_VIO>;
+			#phy-cells = <0>;
+			status = "disabled";
+		};
+
+		u2phy0: usb2phy@e450 {
  			compatible = "rockchip,rk3399-usb2phy";
  			reg = <0xe450 0x10>;
  			clocks = <&cru SCLK_USB2PHY0_REF>;
@@ -1414,7 +1445,7 @@
  			};
  		};
 
-		u2phy1: usb2-phy@e460 {
+		u2phy1: usb2phy@e460 {
  			compatible = "rockchip,rk3399-usb2phy";
  			reg = <0xe460 0x10>;
  			clocks = <&cru SCLK_USB2PHY1_REF>;
@@ -1513,7 +1544,7 @@
  	};
 
  	watchdog@ff848000 {
-		compatible = "snps,dw-wdt";
+		compatible = "rockchip,rk3399-wdt", "snps,dw-wdt";
  		reg = <0x0 0xff848000 0x0 0x100>;
  		clocks = <&cru PCLK_WDT>;
  		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH 0>;
@@ -1700,6 +1731,32 @@
  		status = "disabled";
  	};
 
+	isp0: isp0@ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "isp", "aclk", "hclk";
+		iommus = <&isp0_mmu>;
+		phys = <&mipi_dphy_rx0>;
+		phy-names = "dphy";
+		power-domains = <&power RK3399_PD_ISP0>;
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+		};
+	};
+
  	isp0_mmu: iommu@ff914000 {
  		compatible = "rockchip,iommu";
  		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
@@ -1883,10 +1940,10 @@
  	gpu: gpu@ff9a0000 {
  		compatible = "rockchip,rk3399-mali", "arm,mali-t860";
  		reg = <0x0 0xff9a0000 0x0 0x10000>;
-		interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>,
-			     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>,
-			     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>;
-		interrupt-names = "gpu", "job", "mmu";
+		interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>;
+		interrupt-names = "job", "mmu", "gpu";
  		clocks = <&cru ACLK_GPU>;
  		#cooling-cells = <2>;
  		power-domains = <&power RK3399_PD_GPU>;
@@ -2317,7 +2374,7 @@
  			};
  		};
 
-		sleep {
+		suspend {
  			ap_pwroff: ap-pwroff {
  				rockchip,pins = <1 RK_PA5 1 &pcfg_pull_none>;
  			};
@@ -2475,7 +2532,7 @@
  		};
 
  		tsadc {
-			otp_gpio: otp-gpio {
+			otp_pin: otp-pin {
  				rockchip,pins = <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
  			};
 
arch/arm/dts/rk3399pro-vmarc-som.dtsi +21 -1
index 5d087be04a..01d1a75c8b 100644
@@ -12,6 +12,11 @@
  / {
  	compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
 
+	aliases {
+		mmc0 = &sdmmc;
+		mmc1 = &sdhci;
+	};
+
  	vcc3v3_pcie: vcc-pcie-regulator {
  		compatible = "regulator-fixed";
  		enable-active-high;
@@ -324,7 +329,6 @@
 
  &pcie0 {
  	ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
-	max-link-speed = <2>;
  	num-lanes = <4>;
  	pinctrl-0 = <&pcie_clkreqnb_cpm>;
  	pinctrl-names = "default";
@@ -353,6 +357,12 @@
  		};
  	};
 
+	sdio-pwrseq {
+		wifi_enable_h: wifi-enable-h {
+			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	vbus_host {
  		usb1_en_oc: usb1-en-oc {
  			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
@@ -371,6 +381,16 @@
  	pmu1830-supply = <&vcc_1v8>;
  };
 
+&sdio_pwrseq {
+	/*
+	 * On the module itself this is one of these (depending
+	 * on the actual card populated):
+	 * - SDIO_RESET_L_WL_REG_ON
+	 * - PDN (power down when low)
+	 */
+	reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
+};
+
  &sdhci {
  	bus-width = <8>;
  	mmc-hs400-1_8v;
arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi +0 -0
index 26b53eac47..da1d548b73 100644

arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi line 24

Quoted 10 lines
arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi +7 -0
@@ -15,6 +15,14 @@
  		#clock-cells = <0>;
  	};
 
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&hym8563>;
+		clock-names = "ext_clock";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_enable_h>;
+	};

This file is also used by rk3288, 'hym8563 ' and 'wifi_enable_h' are no defined in rk3288 platform.

I will remove this part and apply others.

Thanks,

- Kever

Quoted 24 lines
arch/arm/dts/rockchip-radxa-dalang-carrier.dtsi +14 -0
+
  	vcc12v_dcin: vcc12v-dcin-regulator {
  		compatible = "regulator-fixed";
  		regulator-name = "vcc12v_dcin";
@@ -78,6 +86,19 @@
  	status = "okay";
  };
 
+&sdio0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+	sd-uhs-sdr104;
+	status = "okay";
+};
+
  &sdmmc {
  	bus-width = <4>;
  	cap-mmc-highspeed;