All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: sun4i: Sync from Linux v5.18-rc1
@ 2022-05-26  3:26 Samuel Holland
  2022-06-27  0:11 ` Andre Przywara
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Holland @ 2022-05-26  3:26 UTC (permalink / raw)
  To: u-boot, Jagan Teki, Andre Przywara; +Cc: Tom Rini, Samuel Holland

Copy the devicetree source for the A10 SoC and all existing boards
verbatim from the Linux v5.18-rc1 tag.

The previous version of this change was only partially applied.

Fixes: 4746694cba74 ("ARM: dts: sun4i: Sync from Linux v5.18-rc1")
Signed-off-by: Samuel Holland <samuel@sholland.org>
---

Changes in v2:
 - Rebased. The commit that was sent in Andre's PR only contained
   changes from one file -- the one with the character set change.

 arch/arm/dts/Makefile                         |   3 +-
 arch/arm/dts/axp209.dtsi                      |   6 +-
 arch/arm/dts/sun4i-a10-a1000.dts              |  31 ++-
 arch/arm/dts/sun4i-a10-ba10-tvbox.dts         |   2 +-
 arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts    |  20 +-
 arch/arm/dts/sun4i-a10-cubieboard.dts         |  16 +-
 arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts   |  21 +-
 arch/arm/dts/sun4i-a10-hackberry.dts          |   2 +-
 arch/arm/dts/sun4i-a10-hyundai-a7hd.dts       |  20 +-
 arch/arm/dts/sun4i-a10-inet1.dts              |  21 +-
 arch/arm/dts/sun4i-a10-inet9f-rev03.dts       |  74 ++----
 .../dts/sun4i-a10-itead-iteaduino-plus.dts    |   2 +-
 arch/arm/dts/sun4i-a10-jesurun-q5.dts         |   4 +-
 arch/arm/dts/sun4i-a10-marsboard.dts          |  22 +-
 arch/arm/dts/sun4i-a10-olinuxino-lime.dts     |  33 +--
 arch/arm/dts/sun4i-a10-pcduino.dts            |  20 +-
 arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts   |  21 +-
 arch/arm/dts/sun4i-a10-topwise-a721.dts       | 242 ++++++++++++++++++
 arch/arm/dts/sun4i-a10.dtsi                   | 135 +++++++++-
 19 files changed, 459 insertions(+), 236 deletions(-)
 create mode 100644 arch/arm/dts/sun4i-a10-topwise-a721.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 0a2713c06a3c..1bceae78c3c1 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -539,7 +539,8 @@ dtb-$(CONFIG_MACH_SUN4I) += \
 	sun4i-a10-olinuxino-lime.dtb \
 	sun4i-a10-pcduino.dtb \
 	sun4i-a10-pcduino2.dtb \
-	sun4i-a10-pov-protab2-ips9.dtb
+	sun4i-a10-pov-protab2-ips9.dtb \
+	sun4i-a10-topwise-a721.dtb
 dtb-$(CONFIG_MACH_SUN5I) += \
 	sun5i-a10s-auxtek-t003.dtb \
 	sun5i-a10s-auxtek-t004.dtb \
diff --git a/arch/arm/dts/axp209.dtsi b/arch/arm/dts/axp209.dtsi
index 0d9ff12bdf28..ca240cd6f6c3 100644
--- a/arch/arm/dts/axp209.dtsi
+++ b/arch/arm/dts/axp209.dtsi
@@ -53,7 +53,7 @@
 	interrupt-controller;
 	#interrupt-cells = <1>;
 
-	ac_power_supply: ac-power-supply {
+	ac_power_supply: ac-power {
 		compatible = "x-powers,axp202-ac-power-supply";
 		status = "disabled";
 	};
@@ -69,7 +69,7 @@
 		#gpio-cells = <2>;
 	};
 
-	battery_power_supply: battery-power-supply {
+	battery_power_supply: battery-power {
 		compatible = "x-powers,axp209-battery-power-supply";
 		status = "disabled";
 	};
@@ -112,7 +112,7 @@
 		};
 	};
 
-	usb_power_supply: usb-power-supply {
+	usb_power_supply: usb-power {
 		compatible = "x-powers,axp202-usb-power-supply";
 		status = "disabled";
 	};
diff --git a/arch/arm/dts/sun4i-a10-a1000.dts b/arch/arm/dts/sun4i-a10-a1000.dts
index 6c254ec4c85b..20f9ed244851 100644
--- a/arch/arm/dts/sun4i-a10-a1000.dts
+++ b/arch/arm/dts/sun4i-a10-a1000.dts
@@ -60,15 +60,26 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
-		red {
+		led-0 {
 			label = "a1000:red:usr";
 			gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>;
 		};
 
-		blue {
+		led-1 {
 			label = "a1000:blue:pwr";
 			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
@@ -125,7 +136,7 @@
 };
 
 &emac {
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
@@ -133,6 +144,20 @@
 	status = "okay";
 };
 
+&de {
+	status = "okay";
+};
+
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &i2c0 {
 	status = "okay";
 
diff --git a/arch/arm/dts/sun4i-a10-ba10-tvbox.dts b/arch/arm/dts/sun4i-a10-ba10-tvbox.dts
index 38a2c4134952..816d534ac093 100644
--- a/arch/arm/dts/sun4i-a10-ba10-tvbox.dts
+++ b/arch/arm/dts/sun4i-a10-ba10-tvbox.dts
@@ -68,7 +68,7 @@
 };
 
 &emac {
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
diff --git a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
index cf7b392dff31..74262988881c 100644
--- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
+++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
@@ -131,20 +131,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-		pins = "PH5";
-		function = "gpio_in";
-		bias-pull-down;
-	};
-};
-
 &reg_usb0_vbus {
 	status = "okay";
 };
@@ -165,10 +151,8 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-cubieboard.dts b/arch/arm/dts/sun4i-a10-cubieboard.dts
index 197a1f2b75ff..0645d6064235 100644
--- a/arch/arm/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/dts/sun4i-a10-cubieboard.dts
@@ -75,12 +75,12 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&led_pins_cubieboard>;
 
-		blue {
+		led-0 {
 			label = "cubieboard:blue:usr";
 			gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */
 		};
 
-		green {
+		led-1 {
 			label = "cubieboard:green:usr";
 			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
 			linux,default-trigger = "heartbeat";
@@ -114,7 +114,7 @@
 };
 
 &emac {
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
@@ -184,12 +184,6 @@
 		function = "gpio_out";
 		drive-strength = <20>;
 	};
-
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
 };
 
 &reg_ahci_5v {
@@ -254,9 +248,7 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts b/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts
index 896e27a08727..63e77c05bfda 100644
--- a/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts
+++ b/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts
@@ -62,6 +62,7 @@
 		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
 		default-brightness-level = <8>;
 		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+		power-supply = <&reg_vcc3v3>;
 	};
 
 	chosen {
@@ -158,20 +159,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-		pins = "PH5";
-		function = "gpio_in";
-		bias-pull-down;
-	};
-};
-
 &pwm {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pwm0_pin>;
@@ -223,10 +210,8 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-hackberry.dts b/arch/arm/dts/sun4i-a10-hackberry.dts
index cc988ccd5ca7..47dea0922501 100644
--- a/arch/arm/dts/sun4i-a10-hackberry.dts
+++ b/arch/arm/dts/sun4i-a10-hackberry.dts
@@ -80,7 +80,7 @@
 };
 
 &emac {
-	phy = <&phy0>;
+	phy-handle = <&phy0>;
 	status = "okay";
 };
 
diff --git a/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts b/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts
index f63767cddd8e..bf2044bac42f 100644
--- a/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts
+++ b/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts
@@ -86,20 +86,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-		pins = "PH5";
-		function = "gpio_in";
-		bias-pull-down;
-	};
-};
-
 &reg_usb0_vbus {
 	status = "okay";
 };
@@ -121,10 +107,8 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-inet1.dts b/arch/arm/dts/sun4i-a10-inet1.dts
index 26d0c1d6a02b..60e432a0ef1c 100644
--- a/arch/arm/dts/sun4i-a10-inet1.dts
+++ b/arch/arm/dts/sun4i-a10-inet1.dts
@@ -62,6 +62,7 @@
 		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
 		default-brightness-level = <8>;
 		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+		power-supply = <&reg_vcc3v3>;
 	};
 
 	chosen {
@@ -164,20 +165,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-		pins = "PH5";
-		function = "gpio_in";
-		bias-pull-down;
-	};
-};
-
 &pwm {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pwm0_pin>;
@@ -233,10 +220,8 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
index 221acd10f6c8..0a562b2cc5bc 100644
--- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
+++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
@@ -61,10 +61,6 @@
 
 	gpio-keys {
 		compatible = "gpio-keys-polled";
-		pinctrl-names = "default";
-		pinctrl-0 = <&key_pins_inet9f>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		poll-interval = <20>;
 
 		left-joystick-left {
@@ -72,7 +68,7 @@
 			linux,code = <ABS_X>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <0xffffffff>; /* -1 */
-			gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
+			gpios = <&pio 0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA6 */
 		};
 
 		left-joystick-right {
@@ -80,7 +76,7 @@
 			linux,code = <ABS_X>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <1>;
-			gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
+			gpios = <&pio 0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA5 */
 		};
 
 		left-joystick-up {
@@ -88,7 +84,7 @@
 			linux,code = <ABS_Y>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <0xffffffff>; /* -1 */
-			gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
+			gpios = <&pio 0 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA8 */
 		};
 
 		left-joystick-down {
@@ -96,7 +92,7 @@
 			linux,code = <ABS_Y>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <1>;
-			gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
+			gpios = <&pio 0 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA9 */
 		};
 
 		right-joystick-left {
@@ -104,7 +100,7 @@
 			linux,code = <ABS_Z>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <0xffffffff>; /* -1 */
-			gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
+			gpios = <&pio 0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA1 */
 		};
 
 		right-joystick-right {
@@ -112,7 +108,7 @@
 			linux,code = <ABS_Z>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <1>;
-			gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
+			gpios = <&pio 0 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA0 */
 		};
 
 		right-joystick-up {
@@ -120,7 +116,7 @@
 			linux,code = <ABS_RZ>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <0xffffffff>; /* -1 */
-			gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
+			gpios = <&pio 0 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA3 */
 		};
 
 		right-joystick-down {
@@ -128,7 +124,7 @@
 			linux,code = <ABS_RZ>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <1>;
-			gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
+			gpios = <&pio 0 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA4 */
 		};
 
 		dpad-left {
@@ -136,7 +132,7 @@
 			linux,code = <ABS_HAT0X>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <0xffffffff>; /* -1 */
-			gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
+			gpios = <&pio 7 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH23 */
 		};
 
 		dpad-right {
@@ -144,7 +140,7 @@
 			linux,code = <ABS_HAT0X>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <1>;
-			gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
+			gpios = <&pio 7 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH24 */
 		};
 
 		dpad-up {
@@ -152,7 +148,7 @@
 			linux,code = <ABS_HAT0Y>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <0xffffffff>; /* -1 */
-			gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
+			gpios = <&pio 7 25 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH25 */
 		};
 
 		dpad-down {
@@ -160,55 +156,55 @@
 			linux,code = <ABS_HAT0Y>;
 			linux,input-type = <EV_ABS>;
 			linux,input-value = <1>;
-			gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
+			gpios = <&pio 7 26 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH26 */
 		};
 
 		x {
 			label = "Button X";
 			linux,code = <BTN_X>;
-			gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
+			gpios = <&pio 0 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA16 */
 		};
 
 		y {
 			label = "Button Y";
 			linux,code = <BTN_Y>;
-			gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
+			gpios = <&pio 0 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA14 */
 		};
 
 		a {
 			label = "Button A";
 			linux,code = <BTN_A>;
-			gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
+			gpios = <&pio 0 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA17 */
 		};
 
 		b {
 			label = "Button B";
 			linux,code = <BTN_B>;
-			gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
+			gpios = <&pio 0 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA15 */
 		};
 
 		select {
 			label = "Select Button";
 			linux,code = <BTN_SELECT>;
-			gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
+			gpios = <&pio 0 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA11 */
 		};
 
 		start {
 			label = "Start Button";
 			linux,code = <BTN_START>;
-			gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
+			gpios = <&pio 0 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA12 */
 		};
 
 		top-left {
 			label = "Top Left Button";
 			linux,code = <BTN_TL>;
-			gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
+			gpios = <&pio 7 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH22 */
 		};
 
 		top-right {
 			label = "Top Right Button";
 			linux,code = <BTN_TR>;
-			gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
+			gpios = <&pio 0 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA13 */
 		};
 	};
 };
@@ -308,30 +304,6 @@
 	status = "okay";
 };
 
-&pio {
-	key_pins_inet9f: key-pins {
-		pins = "PA0", "PA1", "PA3", "PA4",
-		       "PA5", "PA6", "PA8", "PA9",
-		       "PA11", "PA12", "PA13",
-		       "PA14", "PA15", "PA16", "PA17",
-		       "PH22", "PH23", "PH24", "PH25", "PH26";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-		pins = "PH5";
-		function = "gpio_in";
-		bias-pull-down;
-	};
-};
-
 &reg_dcdc2 {
 	regulator-always-on;
 	regulator-min-microvolt = <1000000>;
@@ -377,10 +349,8 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
index 80ecd78247ac..d4e319d16aae 100644
--- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
+++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
@@ -58,7 +58,7 @@
 &emac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&emac_pins>;
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
diff --git a/arch/arm/dts/sun4i-a10-jesurun-q5.dts b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
index 247fa27ef717..1aeb0bd5519e 100644
--- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts
+++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
@@ -63,7 +63,7 @@
 	leds {
 		compatible = "gpio-leds";
 
-		green {
+		led {
 			label = "q5:green:usr";
 			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;  /* PH20 */
 		};
@@ -94,7 +94,7 @@
 };
 
 &emac {
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
diff --git a/arch/arm/dts/sun4i-a10-marsboard.dts b/arch/arm/dts/sun4i-a10-marsboard.dts
index 0dbf69576512..81fdb217d339 100644
--- a/arch/arm/dts/sun4i-a10-marsboard.dts
+++ b/arch/arm/dts/sun4i-a10-marsboard.dts
@@ -62,22 +62,22 @@
 	leds {
 		compatible = "gpio-leds";
 
-		red1 {
+		led-0 {
 			label = "marsboard:red1:usr";
 			gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>;
 		};
 
-		red2 {
+		led-1 {
 			label = "marsboard:red2:usr";
 			gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>;
 		};
 
-		red3 {
+		led-2 {
 			label = "marsboard:red3:usr";
 			gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
 		};
 
-		red4 {
+		led-3 {
 			label = "marsboard:red4:usr";
 			gpios = <&pio 1 8 GPIO_ACTIVE_HIGH>;
 		};
@@ -105,7 +105,7 @@
 };
 
 &emac {
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
@@ -148,14 +148,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-};
-
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -183,9 +175,7 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
index b74a61496537..83d283cf6633 100644
--- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
+++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
@@ -74,7 +74,7 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&led_pins_olinuxinolime>;
 
-		green {
+		led {
 			label = "a10-olinuxino-lime:green:usr";
 			gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
@@ -91,12 +91,11 @@
 	/*
 	 * The A10-Lime is known to be unstable when running at 1008 MHz
 	 */
-	operating-points = <
-		/* kHz    uV */
-		912000  1350000
-		864000  1300000
-		624000  1250000
-		>;
+	operating-points =
+		/* kHz	  uV */
+		<912000	1350000>,
+		<864000	1300000>,
+		<624000	1250000>;
 };
 
 &de {
@@ -112,7 +111,7 @@
 };
 
 &emac {
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
@@ -186,18 +185,6 @@
 		function = "gpio_out";
 		drive-strength = <20>;
 	};
-
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-		pins = "PH5";
-		function = "gpio_in";
-		bias-pull-down;
-	};
 };
 
 &reg_ahci_5v {
@@ -229,10 +216,8 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio   = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH5 */
 	usb0_vbus-supply   = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
diff --git a/arch/arm/dts/sun4i-a10-pcduino.dts b/arch/arm/dts/sun4i-a10-pcduino.dts
index b97a0f2f20b9..1ac82376baef 100644
--- a/arch/arm/dts/sun4i-a10-pcduino.dts
+++ b/arch/arm/dts/sun4i-a10-pcduino.dts
@@ -63,12 +63,12 @@
 	leds {
 		compatible = "gpio-leds";
 
-		tx {
+		led-0 {
 			label = "pcduino:green:tx";
 			gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
 		};
 
-		rx {
+		led-1 {
 			label = "pcduino:green:rx";
 			gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
 		};
@@ -76,8 +76,6 @@
 
 	gpio-keys {
 		compatible = "gpio-keys";
-		#address-cells = <1>;
-		#size-cells = <0>;
 
 		back {
 			label = "Key Back";
@@ -112,7 +110,7 @@
 };
 
 &emac {
-	phy = <&phy1>;
+	phy-handle = <&phy1>;
 	status = "okay";
 };
 
@@ -156,14 +154,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-};
-
 #include "axp209.dtsi"
 
 &reg_dcdc2 {
@@ -203,9 +193,7 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
 	usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
 	usb2_vbus-supply = <&reg_vcc5v0>; /* USB2 VBUS is always on */
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
index 84b25be1ac94..c32596947647 100644
--- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
+++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
@@ -62,6 +62,7 @@
 		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
 		default-brightness-level = <8>;
 		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+		power-supply = <&reg_vcc3v3>;
 	};
 
 	chosen {
@@ -146,20 +147,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0-id-detect-pin {
-		pins = "PH4";
-		function = "gpio_in";
-		bias-pull-up;
-	};
-
-	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
-		pins = "PH5";
-		function = "gpio_in";
-		bias-pull-down;
-	};
-};
-
 &pwm {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pwm0_pin>;
@@ -211,10 +198,8 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
-	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
-	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
 	usb0_vbus-supply = <&reg_usb0_vbus>;
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	status = "okay";
diff --git a/arch/arm/dts/sun4i-a10-topwise-a721.dts b/arch/arm/dts/sun4i-a10-topwise-a721.dts
new file mode 100644
index 000000000000..3628f12d2521
--- /dev/null
+++ b/arch/arm/dts/sun4i-a10-topwise-a721.dts
@@ -0,0 +1,242 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2020 Pascal Roeleven <dev@pascalroeleven.nl>
+ */
+
+/dts-v1/;
+#include "sun4i-a10.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+	model = "Topwise A721";
+	compatible = "topwise,a721", "allwinner,sun4i-a10";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm 0 100000 PWM_POLARITY_INVERTED>;
+		power-supply = <&reg_vbat>;
+		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+		brightness-levels = <0 30 40 50 60 70 80 90 100>;
+		default-brightness-level = <8>;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	panel {
+		compatible = "starry,kr070pe2t";
+		backlight = <&backlight>;
+		power-supply = <&reg_lcd_power>;
+
+		port {
+			panel_input: endpoint {
+				remote-endpoint = <&tcon0_out_panel>;
+			};
+		};
+	};
+
+	reg_lcd_power: reg-lcd-power {
+		compatible = "regulator-fixed";
+		regulator-name = "reg-lcd-power";
+		gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
+		enable-active-high;
+	};
+
+	reg_vbat: reg-vbat {
+		compatible = "regulator-fixed";
+		regulator-name = "vbat";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+	};
+
+};
+
+&codec {
+	status = "okay";
+};
+
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&de {
+	status = "okay";
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&ehci1 {
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+
+	axp209: pmic@34 {
+		reg = <0x34>;
+		interrupts = <0>;
+	};
+};
+
+#include "axp209.dtsi"
+
+&ac_power_supply {
+	status = "okay";
+};
+
+&battery_power_supply {
+	status = "okay";
+};
+
+&i2c1 {
+	status = "okay";
+
+	accelerometer@4c {
+		compatible = "fsl,mma7660";
+		reg = <0x4c>;
+	};
+};
+
+&i2c2 {
+	status = "okay";
+
+	touchscreen@38 {
+		compatible = "edt,edt-ft5406";
+		reg = <0x38>;
+		interrupt-parent = <&pio>;
+		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
+		touchscreen-size-x = <800>;
+		touchscreen-size-y = <480>;
+		vcc-supply = <&reg_vcc3v3>;
+	};
+};
+
+&lradc {
+	vref-supply = <&reg_ldo2>;
+	status = "okay";
+
+	button-571 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <571428>;
+	};
+
+	button-761 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <761904>;
+	};
+};
+
+&mmc0 {
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
+	status = "okay";
+};
+
+&ohci0 {
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&otg_sram {
+	status = "okay";
+};
+
+&pio {
+	vcc-pb-supply = <&reg_vcc3v3>;
+	vcc-pf-supply = <&reg_vcc3v3>;
+	vcc-ph-supply = <&reg_vcc3v3>;
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm0_pin>;
+	status = "okay";
+};
+
+&reg_dcdc2 {
+	regulator-always-on;
+	regulator-min-microvolt = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+	regulator-always-on;
+	regulator-min-microvolt = <1250000>;
+	regulator-max-microvolt = <1250000>;
+	regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
+&reg_usb0_vbus {
+	status = "okay";
+};
+
+&reg_usb1_vbus {
+	status = "okay";
+};
+
+&reg_usb2_vbus {
+	status = "okay";
+};
+
+&tcon0_out {
+	tcon0_out_panel: endpoint@0 {
+		reg = <0>;
+		remote-endpoint = <&panel_input>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pb_pins>;
+	status = "okay";
+};
+
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
+&usb_power_supply {
+	status = "okay";
+};
+
+&usbphy {
+	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
+	usb0_vbus-supply = <&reg_usb0_vbus>;
+	usb1_vbus-supply = <&reg_usb1_vbus>;
+	usb2_vbus-supply = <&reg_usb2_vbus>;
+	status = "okay";
+};
diff --git a/arch/arm/dts/sun4i-a10.dtsi b/arch/arm/dts/sun4i-a10.dtsi
index 3a1c6b45c9a1..51a6464aab9a 100644
--- a/arch/arm/dts/sun4i-a10.dtsi
+++ b/arch/arm/dts/sun4i-a10.dtsi
@@ -115,13 +115,12 @@
 			reg = <0x0>;
 			clocks = <&ccu CLK_CPU>;
 			clock-latency = <244144>; /* 8 32k periods */
-			operating-points = <
+			operating-points =
 				/* kHz	  uV */
-				1008000 1400000
-				912000	1350000
-				864000	1300000
-				624000	1250000
-				>;
+				<1008000 1400000>,
+				<912000	1350000>,
+				<864000	1300000>,
+				<624000	1250000>;
 			#cooling-cells = <2>;
 		};
 	};
@@ -143,7 +142,7 @@
 			trips {
 				cpu_alert0: cpu-alert0 {
 					/* milliCelsius */
-					temperature = <850000>;
+					temperature = <85000>;
 					hysteresis = <2000>;
 					type = "passive";
 				};
@@ -184,14 +183,34 @@
 		status = "disabled";
 	};
 
+	pmu {
+		compatible = "arm,cortex-a8-pmu";
+		interrupts = <3>;
+	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		/* Address must be kept in the lower 256 MiBs of DRAM for VE. */
+		default-pool {
+			compatible = "shared-dma-pool";
+			size = <0x6000000>;
+			alloc-ranges = <0x40000000 0x10000000>;
+			reusable;
+			linux,cma-default;
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
 		ranges;
 
-		sram-controller@1c00000 {
-			compatible = "allwinner,sun4i-a10-sram-controller";
+		system-control@1c00000 {
+			compatible = "allwinner,sun4i-a10-system-control";
 			reg = <0x01c00000 0x30>;
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -224,6 +243,19 @@
 					status = "disabled";
 				};
 			};
+
+			sram_c: sram@1d00000 {
+				compatible = "mmio-sram";
+				reg = <0x01d00000 0xd0000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				ranges = <0 0x01d00000 0xd0000>;
+
+				ve_sram: sram-section@0 {
+					compatible = "allwinner,sun4i-a10-sram-c1";
+					reg = <0x000000 0x80000>;
+				};
+			};
 		};
 
 		dma: dma-controller@1c02000 {
@@ -234,7 +266,7 @@
 			#dma-cells = <2>;
 		};
 
-		nfc: nand@1c03000 {
+		nfc: nand-controller@1c03000 {
 			compatible = "allwinner,sun4i-a10-nand";
 			reg = <0x01c03000 0x1000>;
 			interrupts = <37>;
@@ -309,6 +341,7 @@
 				      "tcon-ch0",
 				      "tcon-ch1";
 			clock-output-names = "tcon0-pixel-clock";
+			#clock-cells = <0>;
 			dmas = <&dma SUN4I_DMA_DEDICATED 14>;
 
 			ports {
@@ -358,6 +391,7 @@
 				      "tcon-ch0",
 				      "tcon-ch1";
 			clock-output-names = "tcon1-pixel-clock";
+			#clock-cells = <0>;
 			dmas = <&dma SUN4I_DMA_DEDICATED 15>;
 
 			ports {
@@ -394,6 +428,17 @@
 			};
 		};
 
+		video-codec@1c0e000 {
+			compatible = "allwinner,sun4i-a10-video-engine";
+			reg = <0x01c0e000 0x1000>;
+			clocks = <&ccu CLK_AHB_VE>, <&ccu CLK_VE>,
+				 <&ccu CLK_DRAM_VE>;
+			clock-names = "ahb", "mod", "ram";
+			resets = <&ccu RST_VE>;
+			interrupts = <53>;
+			allwinner,sram = <&ve_sram 1>;
+		};
+
 		mmc0: mmc@1c0f000 {
 			compatible = "allwinner,sun4i-a10-mmc";
 			reg = <0x01c0f000 0x1000>;
@@ -450,13 +495,14 @@
 			phy-names = "usb";
 			extcon = <&usbphy 0>;
 			allwinner,sram = <&otg_sram 1>;
+			dr_mode = "otg";
 			status = "disabled";
 		};
 
 		usbphy: phy@1c13400 {
 			#phy-cells = <1>;
 			compatible = "allwinner,sun4i-a10-usb-phy";
-			reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>;
+			reg = <0x01c13400 0x10>, <0x01c14800 0x4>, <0x01c1c800 0x4>;
 			reg-names = "phy_ctrl", "pmu1", "pmu2";
 			clocks = <&ccu CLK_USB_PHY>;
 			clock-names = "usb_phy";
@@ -530,8 +576,6 @@
 				};
 
 				hdmi_out: port@1 {
-					#address-cells = <1>;
-					#size-cells = <0>;
 					reg = <1>;
 				};
 			};
@@ -579,6 +623,16 @@
 			status = "disabled";
 		};
 
+		csi1: csi@1c1d000 {
+			compatible = "allwinner,sun4i-a10-csi1";
+			reg = <0x01c1d000 0x1000>;
+			interrupts = <43>;
+			clocks = <&ccu CLK_AHB_CSI1>, <&ccu CLK_DRAM_CSI1>;
+			clock-names = "bus", "ram";
+			resets = <&ccu RST_CSI1>;
+			status = "disabled";
+		};
+
 		spi3: spi@1c1f000 {
 			compatible = "allwinner,sun4i-a10-spi";
 			reg = <0x01c1f000 0x1000>;
@@ -625,6 +679,31 @@
 				function = "can";
 			};
 
+			/omit-if-no-ref/
+			csi1_8bits_pg_pins: csi1-8bits-pg-pins {
+				pins = "PG0", "PG2", "PG3", "PG4", "PG5",
+				       "PG6", "PG7", "PG8", "PG9", "PG10",
+				       "PG11";
+				function = "csi1";
+			};
+
+			/omit-if-no-ref/
+			csi1_24bits_ph_pins: csi1-24bits-ph-pins {
+				pins = "PH0", "PH1", "PH2", "PH3", "PH4",
+				       "PH5", "PH6", "PH7", "PH8", "PH9",
+				       "PH10", "PH11", "PH12", "PH13", "PH14",
+				       "PH15", "PH16", "PH17", "PH18", "PH19",
+				       "PH20", "PH21", "PH22", "PH23", "PH24",
+				       "PH25", "PH26", "PH27";
+				function = "csi1";
+			};
+
+			/omit-if-no-ref/
+			csi1_clk_pg_pin: csi1-clk-pg-pin {
+				pins = "PG1";
+				function = "csi1";
+			};
+
 			emac_pins: emac0-pins {
 				pins = "PA0", "PA1", "PA2",
 				       "PA3", "PA4", "PA5", "PA6",
@@ -762,13 +841,20 @@
 		timer@1c20c00 {
 			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0x90>;
-			interrupts = <22>;
+			interrupts = <22>,
+				     <23>,
+				     <24>,
+				     <25>,
+				     <67>,
+				     <68>;
 			clocks = <&osc24M>;
 		};
 
 		wdt: watchdog@1c20c90 {
 			compatible = "allwinner,sun4i-a10-wdt";
 			reg = <0x01c20c90 0x10>;
+			interrupts = <24>;
+			clocks = <&osc24M>;
 		};
 
 		rtc: rtc@1c20d00 {
@@ -1001,6 +1087,27 @@
 			status = "disabled";
 		};
 
+		mali: gpu@1c40000 {
+			compatible = "allwinner,sun4i-a10-mali", "arm,mali-400";
+			reg = <0x01c40000 0x10000>;
+			interrupts = <69>,
+				     <70>,
+				     <71>,
+				     <72>,
+				     <73>;
+			interrupt-names = "gp",
+					  "gpmmu",
+					  "pp0",
+					  "ppmmu0",
+					  "pmu";
+			clocks = <&ccu CLK_AHB_GPU>, <&ccu CLK_GPU>;
+			clock-names = "bus", "core";
+			resets = <&ccu RST_GPU>;
+
+			assigned-clocks = <&ccu CLK_GPU>;
+			assigned-clock-rates = <384000000>;
+		};
+
 		fe0: display-frontend@1e00000 {
 			compatible = "allwinner,sun4i-a10-display-frontend";
 			reg = <0x01e00000 0x20000>;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ARM: dts: sun4i: Sync from Linux v5.18-rc1
  2022-05-26  3:26 [PATCH v2] ARM: dts: sun4i: Sync from Linux v5.18-rc1 Samuel Holland
@ 2022-06-27  0:11 ` Andre Przywara
  0 siblings, 0 replies; 2+ messages in thread
From: Andre Przywara @ 2022-06-27  0:11 UTC (permalink / raw)
  To: Samuel Holland; +Cc: u-boot, Jagan Teki, Tom Rini

On Wed, 25 May 2022 22:26:02 -0500
Samuel Holland <samuel@sholland.org> wrote:

Hi,

> Copy the devicetree source for the A10 SoC and all existing boards
> verbatim from the Linux v5.18-rc1 tag.
> 
> The previous version of this change was only partially applied.

Oops, indeed. Patchwork didn't pick this one patch up, and I misapplied
this to the tree I sent the other PR from.
Thanks for noticing and the patch!

> Fixes: 4746694cba74 ("ARM: dts: sun4i: Sync from Linux v5.18-rc1")
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Applied to sunxi/master, for v2022.07.

Cheers,
Andre

> ---
> 
> Changes in v2:
>  - Rebased. The commit that was sent in Andre's PR only contained
>    changes from one file -- the one with the character set change.
> 
>  arch/arm/dts/Makefile                         |   3 +-
>  arch/arm/dts/axp209.dtsi                      |   6 +-
>  arch/arm/dts/sun4i-a10-a1000.dts              |  31 ++-
>  arch/arm/dts/sun4i-a10-ba10-tvbox.dts         |   2 +-
>  arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts    |  20 +-
>  arch/arm/dts/sun4i-a10-cubieboard.dts         |  16 +-
>  arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts   |  21 +-
>  arch/arm/dts/sun4i-a10-hackberry.dts          |   2 +-
>  arch/arm/dts/sun4i-a10-hyundai-a7hd.dts       |  20 +-
>  arch/arm/dts/sun4i-a10-inet1.dts              |  21 +-
>  arch/arm/dts/sun4i-a10-inet9f-rev03.dts       |  74 ++----
>  .../dts/sun4i-a10-itead-iteaduino-plus.dts    |   2 +-
>  arch/arm/dts/sun4i-a10-jesurun-q5.dts         |   4 +-
>  arch/arm/dts/sun4i-a10-marsboard.dts          |  22 +-
>  arch/arm/dts/sun4i-a10-olinuxino-lime.dts     |  33 +--
>  arch/arm/dts/sun4i-a10-pcduino.dts            |  20 +-
>  arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts   |  21 +-
>  arch/arm/dts/sun4i-a10-topwise-a721.dts       | 242 ++++++++++++++++++
>  arch/arm/dts/sun4i-a10.dtsi                   | 135 +++++++++-
>  19 files changed, 459 insertions(+), 236 deletions(-)
>  create mode 100644 arch/arm/dts/sun4i-a10-topwise-a721.dts
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 0a2713c06a3c..1bceae78c3c1 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -539,7 +539,8 @@ dtb-$(CONFIG_MACH_SUN4I) += \
>  	sun4i-a10-olinuxino-lime.dtb \
>  	sun4i-a10-pcduino.dtb \
>  	sun4i-a10-pcduino2.dtb \
> -	sun4i-a10-pov-protab2-ips9.dtb
> +	sun4i-a10-pov-protab2-ips9.dtb \
> +	sun4i-a10-topwise-a721.dtb
>  dtb-$(CONFIG_MACH_SUN5I) += \
>  	sun5i-a10s-auxtek-t003.dtb \
>  	sun5i-a10s-auxtek-t004.dtb \
> diff --git a/arch/arm/dts/axp209.dtsi b/arch/arm/dts/axp209.dtsi
> index 0d9ff12bdf28..ca240cd6f6c3 100644
> --- a/arch/arm/dts/axp209.dtsi
> +++ b/arch/arm/dts/axp209.dtsi
> @@ -53,7 +53,7 @@
>  	interrupt-controller;
>  	#interrupt-cells = <1>;
>  
> -	ac_power_supply: ac-power-supply {
> +	ac_power_supply: ac-power {
>  		compatible = "x-powers,axp202-ac-power-supply";
>  		status = "disabled";
>  	};
> @@ -69,7 +69,7 @@
>  		#gpio-cells = <2>;
>  	};
>  
> -	battery_power_supply: battery-power-supply {
> +	battery_power_supply: battery-power {
>  		compatible = "x-powers,axp209-battery-power-supply";
>  		status = "disabled";
>  	};
> @@ -112,7 +112,7 @@
>  		};
>  	};
>  
> -	usb_power_supply: usb-power-supply {
> +	usb_power_supply: usb-power {
>  		compatible = "x-powers,axp202-usb-power-supply";
>  		status = "disabled";
>  	};
> diff --git a/arch/arm/dts/sun4i-a10-a1000.dts b/arch/arm/dts/sun4i-a10-a1000.dts
> index 6c254ec4c85b..20f9ed244851 100644
> --- a/arch/arm/dts/sun4i-a10-a1000.dts
> +++ b/arch/arm/dts/sun4i-a10-a1000.dts
> @@ -60,15 +60,26 @@
>  		stdout-path = "serial0:115200n8";
>  	};
>  
> +	hdmi-connector {
> +		compatible = "hdmi-connector";
> +		type = "a";
> +
> +		port {
> +			hdmi_con_in: endpoint {
> +				remote-endpoint = <&hdmi_out_con>;
> +			};
> +		};
> +	};
> +
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		red {
> +		led-0 {
>  			label = "a1000:red:usr";
>  			gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>;
>  		};
>  
> -		blue {
> +		led-1 {
>  			label = "a1000:blue:pwr";
>  			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
>  			default-state = "on";
> @@ -125,7 +136,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> @@ -133,6 +144,20 @@
>  	status = "okay";
>  };
>  
> +&de {
> +	status = "okay";
> +};
> +
> +&hdmi {
> +	status = "okay";
> +};
> +
> +&hdmi_out {
> +	hdmi_out_con: endpoint {
> +		remote-endpoint = <&hdmi_con_in>;
> +	};
> +};
> +
>  &i2c0 {
>  	status = "okay";
>  
> diff --git a/arch/arm/dts/sun4i-a10-ba10-tvbox.dts b/arch/arm/dts/sun4i-a10-ba10-tvbox.dts
> index 38a2c4134952..816d534ac093 100644
> --- a/arch/arm/dts/sun4i-a10-ba10-tvbox.dts
> +++ b/arch/arm/dts/sun4i-a10-ba10-tvbox.dts
> @@ -68,7 +68,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
> index cf7b392dff31..74262988881c 100644
> --- a/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
> +++ b/arch/arm/dts/sun4i-a10-chuwi-v7-cw0825.dts
> @@ -131,20 +131,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
> -		pins = "PH5";
> -		function = "gpio_in";
> -		bias-pull-down;
> -	};
> -};
> -
>  &reg_usb0_vbus {
>  	status = "okay";
>  };
> @@ -165,10 +151,8 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> -	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
>  	usb0_vbus-supply = <&reg_usb0_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-cubieboard.dts b/arch/arm/dts/sun4i-a10-cubieboard.dts
> index 197a1f2b75ff..0645d6064235 100644
> --- a/arch/arm/dts/sun4i-a10-cubieboard.dts
> +++ b/arch/arm/dts/sun4i-a10-cubieboard.dts
> @@ -75,12 +75,12 @@
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&led_pins_cubieboard>;
>  
> -		blue {
> +		led-0 {
>  			label = "cubieboard:blue:usr";
>  			gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */
>  		};
>  
> -		green {
> +		led-1 {
>  			label = "cubieboard:green:usr";
>  			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
>  			linux,default-trigger = "heartbeat";
> @@ -114,7 +114,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> @@ -184,12 +184,6 @@
>  		function = "gpio_out";
>  		drive-strength = <20>;
>  	};
> -
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
>  };
>  
>  &reg_ahci_5v {
> @@ -254,9 +248,7 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
>  	usb1_vbus-supply = <&reg_usb1_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts b/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts
> index 896e27a08727..63e77c05bfda 100644
> --- a/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts
> +++ b/arch/arm/dts/sun4i-a10-dserve-dsrv9703c.dts
> @@ -62,6 +62,7 @@
>  		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
>  		default-brightness-level = <8>;
>  		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
> +		power-supply = <&reg_vcc3v3>;
>  	};
>  
>  	chosen {
> @@ -158,20 +159,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
> -		pins = "PH5";
> -		function = "gpio_in";
> -		bias-pull-down;
> -	};
> -};
> -
>  &pwm {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pwm0_pin>;
> @@ -223,10 +210,8 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> -	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
>  	usb0_vbus-supply = <&reg_usb0_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-hackberry.dts b/arch/arm/dts/sun4i-a10-hackberry.dts
> index cc988ccd5ca7..47dea0922501 100644
> --- a/arch/arm/dts/sun4i-a10-hackberry.dts
> +++ b/arch/arm/dts/sun4i-a10-hackberry.dts
> @@ -80,7 +80,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy0>;
> +	phy-handle = <&phy0>;
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts b/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts
> index f63767cddd8e..bf2044bac42f 100644
> --- a/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts
> +++ b/arch/arm/dts/sun4i-a10-hyundai-a7hd.dts
> @@ -86,20 +86,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
> -		pins = "PH5";
> -		function = "gpio_in";
> -		bias-pull-down;
> -	};
> -};
> -
>  &reg_usb0_vbus {
>  	status = "okay";
>  };
> @@ -121,10 +107,8 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> -	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
>  	usb0_vbus-supply = <&reg_usb0_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-inet1.dts b/arch/arm/dts/sun4i-a10-inet1.dts
> index 26d0c1d6a02b..60e432a0ef1c 100644
> --- a/arch/arm/dts/sun4i-a10-inet1.dts
> +++ b/arch/arm/dts/sun4i-a10-inet1.dts
> @@ -62,6 +62,7 @@
>  		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
>  		default-brightness-level = <8>;
>  		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
> +		power-supply = <&reg_vcc3v3>;
>  	};
>  
>  	chosen {
> @@ -164,20 +165,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
> -		pins = "PH5";
> -		function = "gpio_in";
> -		bias-pull-down;
> -	};
> -};
> -
>  &pwm {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pwm0_pin>;
> @@ -233,10 +220,8 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> -	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
>  	usb0_vbus-supply = <&reg_usb0_vbus>;
>  	usb1_vbus-supply = <&reg_usb1_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
> diff --git a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
> index 221acd10f6c8..0a562b2cc5bc 100644
> --- a/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
> +++ b/arch/arm/dts/sun4i-a10-inet9f-rev03.dts
> @@ -61,10 +61,6 @@
>  
>  	gpio-keys {
>  		compatible = "gpio-keys-polled";
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&key_pins_inet9f>;
> -		#address-cells = <1>;
> -		#size-cells = <0>;
>  		poll-interval = <20>;
>  
>  		left-joystick-left {
> @@ -72,7 +68,7 @@
>  			linux,code = <ABS_X>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <0xffffffff>; /* -1 */
> -			gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
> +			gpios = <&pio 0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA6 */
>  		};
>  
>  		left-joystick-right {
> @@ -80,7 +76,7 @@
>  			linux,code = <ABS_X>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <1>;
> -			gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
> +			gpios = <&pio 0 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA5 */
>  		};
>  
>  		left-joystick-up {
> @@ -88,7 +84,7 @@
>  			linux,code = <ABS_Y>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <0xffffffff>; /* -1 */
> -			gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
> +			gpios = <&pio 0 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA8 */
>  		};
>  
>  		left-joystick-down {
> @@ -96,7 +92,7 @@
>  			linux,code = <ABS_Y>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <1>;
> -			gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
> +			gpios = <&pio 0 9 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA9 */
>  		};
>  
>  		right-joystick-left {
> @@ -104,7 +100,7 @@
>  			linux,code = <ABS_Z>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <0xffffffff>; /* -1 */
> -			gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
> +			gpios = <&pio 0 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA1 */
>  		};
>  
>  		right-joystick-right {
> @@ -112,7 +108,7 @@
>  			linux,code = <ABS_Z>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <1>;
> -			gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
> +			gpios = <&pio 0 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA0 */
>  		};
>  
>  		right-joystick-up {
> @@ -120,7 +116,7 @@
>  			linux,code = <ABS_RZ>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <0xffffffff>; /* -1 */
> -			gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
> +			gpios = <&pio 0 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA3 */
>  		};
>  
>  		right-joystick-down {
> @@ -128,7 +124,7 @@
>  			linux,code = <ABS_RZ>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <1>;
> -			gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
> +			gpios = <&pio 0 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA4 */
>  		};
>  
>  		dpad-left {
> @@ -136,7 +132,7 @@
>  			linux,code = <ABS_HAT0X>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <0xffffffff>; /* -1 */
> -			gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
> +			gpios = <&pio 7 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH23 */
>  		};
>  
>  		dpad-right {
> @@ -144,7 +140,7 @@
>  			linux,code = <ABS_HAT0X>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <1>;
> -			gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
> +			gpios = <&pio 7 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH24 */
>  		};
>  
>  		dpad-up {
> @@ -152,7 +148,7 @@
>  			linux,code = <ABS_HAT0Y>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <0xffffffff>; /* -1 */
> -			gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
> +			gpios = <&pio 7 25 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH25 */
>  		};
>  
>  		dpad-down {
> @@ -160,55 +156,55 @@
>  			linux,code = <ABS_HAT0Y>;
>  			linux,input-type = <EV_ABS>;
>  			linux,input-value = <1>;
> -			gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
> +			gpios = <&pio 7 26 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH26 */
>  		};
>  
>  		x {
>  			label = "Button X";
>  			linux,code = <BTN_X>;
> -			gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
> +			gpios = <&pio 0 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA16 */
>  		};
>  
>  		y {
>  			label = "Button Y";
>  			linux,code = <BTN_Y>;
> -			gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
> +			gpios = <&pio 0 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA14 */
>  		};
>  
>  		a {
>  			label = "Button A";
>  			linux,code = <BTN_A>;
> -			gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
> +			gpios = <&pio 0 17 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA17 */
>  		};
>  
>  		b {
>  			label = "Button B";
>  			linux,code = <BTN_B>;
> -			gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
> +			gpios = <&pio 0 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA15 */
>  		};
>  
>  		select {
>  			label = "Select Button";
>  			linux,code = <BTN_SELECT>;
> -			gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
> +			gpios = <&pio 0 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA11 */
>  		};
>  
>  		start {
>  			label = "Start Button";
>  			linux,code = <BTN_START>;
> -			gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
> +			gpios = <&pio 0 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA12 */
>  		};
>  
>  		top-left {
>  			label = "Top Left Button";
>  			linux,code = <BTN_TL>;
> -			gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
> +			gpios = <&pio 7 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PH22 */
>  		};
>  
>  		top-right {
>  			label = "Top Right Button";
>  			linux,code = <BTN_TR>;
> -			gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
> +			gpios = <&pio 0 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* PA13 */
>  		};
>  	};
>  };
> @@ -308,30 +304,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	key_pins_inet9f: key-pins {
> -		pins = "PA0", "PA1", "PA3", "PA4",
> -		       "PA5", "PA6", "PA8", "PA9",
> -		       "PA11", "PA12", "PA13",
> -		       "PA14", "PA15", "PA16", "PA17",
> -		       "PH22", "PH23", "PH24", "PH25", "PH26";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
> -		pins = "PH5";
> -		function = "gpio_in";
> -		bias-pull-down;
> -	};
> -};
> -
>  &reg_dcdc2 {
>  	regulator-always-on;
>  	regulator-min-microvolt = <1000000>;
> @@ -377,10 +349,8 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> -	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
>  	usb0_vbus-supply = <&reg_usb0_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
> index 80ecd78247ac..d4e319d16aae 100644
> --- a/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
> +++ b/arch/arm/dts/sun4i-a10-itead-iteaduino-plus.dts
> @@ -58,7 +58,7 @@
>  &emac {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&emac_pins>;
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm/dts/sun4i-a10-jesurun-q5.dts b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
> index 247fa27ef717..1aeb0bd5519e 100644
> --- a/arch/arm/dts/sun4i-a10-jesurun-q5.dts
> +++ b/arch/arm/dts/sun4i-a10-jesurun-q5.dts
> @@ -63,7 +63,7 @@
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		green {
> +		led {
>  			label = "q5:green:usr";
>  			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;  /* PH20 */
>  		};
> @@ -94,7 +94,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm/dts/sun4i-a10-marsboard.dts b/arch/arm/dts/sun4i-a10-marsboard.dts
> index 0dbf69576512..81fdb217d339 100644
> --- a/arch/arm/dts/sun4i-a10-marsboard.dts
> +++ b/arch/arm/dts/sun4i-a10-marsboard.dts
> @@ -62,22 +62,22 @@
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		red1 {
> +		led-0 {
>  			label = "marsboard:red1:usr";
>  			gpios = <&pio 1 5 GPIO_ACTIVE_HIGH>;
>  		};
>  
> -		red2 {
> +		led-1 {
>  			label = "marsboard:red2:usr";
>  			gpios = <&pio 1 6 GPIO_ACTIVE_HIGH>;
>  		};
>  
> -		red3 {
> +		led-2 {
>  			label = "marsboard:red3:usr";
>  			gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
>  		};
>  
> -		red4 {
> +		led-3 {
>  			label = "marsboard:red4:usr";
>  			gpios = <&pio 1 8 GPIO_ACTIVE_HIGH>;
>  		};
> @@ -105,7 +105,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> @@ -148,14 +148,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -};
> -
>  &reg_usb1_vbus {
>  	status = "okay";
>  };
> @@ -183,9 +175,7 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
>  	usb1_vbus-supply = <&reg_usb1_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
> index b74a61496537..83d283cf6633 100644
> --- a/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
> +++ b/arch/arm/dts/sun4i-a10-olinuxino-lime.dts
> @@ -74,7 +74,7 @@
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&led_pins_olinuxinolime>;
>  
> -		green {
> +		led {
>  			label = "a10-olinuxino-lime:green:usr";
>  			gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
>  			default-state = "on";
> @@ -91,12 +91,11 @@
>  	/*
>  	 * The A10-Lime is known to be unstable when running at 1008 MHz
>  	 */
> -	operating-points = <
> -		/* kHz    uV */
> -		912000  1350000
> -		864000  1300000
> -		624000  1250000
> -		>;  
> +	operating-points =
> +		/* kHz	  uV */
> +		<912000	1350000>,
> +		<864000	1300000>,
> +		<624000	1250000>;
>  };
>  
>  &de {
> @@ -112,7 +111,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> @@ -186,18 +185,6 @@
>  		function = "gpio_out";
>  		drive-strength = <20>;
>  	};
> -
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
> -		pins = "PH5";
> -		function = "gpio_in";
> -		bias-pull-down;
> -	};
>  };
>  
>  &reg_ahci_5v {
> @@ -229,10 +216,8 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> -	usb0_id_det-gpio   = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> -	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH5 */
>  	usb0_vbus-supply   = <&reg_usb0_vbus>;
>  	usb1_vbus-supply = <&reg_usb1_vbus>;
>  	usb2_vbus-supply = <&reg_usb2_vbus>;
> diff --git a/arch/arm/dts/sun4i-a10-pcduino.dts b/arch/arm/dts/sun4i-a10-pcduino.dts
> index b97a0f2f20b9..1ac82376baef 100644
> --- a/arch/arm/dts/sun4i-a10-pcduino.dts
> +++ b/arch/arm/dts/sun4i-a10-pcduino.dts
> @@ -63,12 +63,12 @@
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		tx {
> +		led-0 {
>  			label = "pcduino:green:tx";
>  			gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
>  		};
>  
> -		rx {
> +		led-1 {
>  			label = "pcduino:green:rx";
>  			gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
>  		};
> @@ -76,8 +76,6 @@
>  
>  	gpio-keys {
>  		compatible = "gpio-keys";
> -		#address-cells = <1>;
> -		#size-cells = <0>;
>  
>  		back {
>  			label = "Key Back";
> @@ -112,7 +110,7 @@
>  };
>  
>  &emac {
> -	phy = <&phy1>;
> +	phy-handle = <&phy1>;
>  	status = "okay";
>  };
>  
> @@ -156,14 +154,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -};
> -
>  #include "axp209.dtsi"
>  
>  &reg_dcdc2 {
> @@ -203,9 +193,7 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
>  	usb1_vbus-supply = <&reg_vcc5v0>; /* USB1 VBUS is always on */
>  	usb2_vbus-supply = <&reg_vcc5v0>; /* USB2 VBUS is always on */
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
> index 84b25be1ac94..c32596947647 100644
> --- a/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
> +++ b/arch/arm/dts/sun4i-a10-pov-protab2-ips9.dts
> @@ -62,6 +62,7 @@
>  		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
>  		default-brightness-level = <8>;
>  		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
> +		power-supply = <&reg_vcc3v3>;
>  	};
>  
>  	chosen {
> @@ -146,20 +147,6 @@
>  	status = "okay";
>  };
>  
> -&pio {
> -	usb0_id_detect_pin: usb0-id-detect-pin {
> -		pins = "PH4";
> -		function = "gpio_in";
> -		bias-pull-up;
> -	};
> -
> -	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
> -		pins = "PH5";
> -		function = "gpio_in";
> -		bias-pull-down;
> -	};
> -};
> -
>  &pwm {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pwm0_pin>;
> @@ -211,10 +198,8 @@
>  };
>  
>  &usbphy {
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
> -	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> -	usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
>  	usb0_vbus-supply = <&reg_usb0_vbus>;
>  	usb1_vbus-supply = <&reg_usb1_vbus>;
>  	status = "okay";
> diff --git a/arch/arm/dts/sun4i-a10-topwise-a721.dts b/arch/arm/dts/sun4i-a10-topwise-a721.dts
> new file mode 100644
> index 000000000000..3628f12d2521
> --- /dev/null
> +++ b/arch/arm/dts/sun4i-a10-topwise-a721.dts
> @@ -0,0 +1,242 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2020 Pascal Roeleven <dev@pascalroeleven.nl>
> + */
> +
> +/dts-v1/;
> +#include "sun4i-a10.dtsi"
> +#include "sunxi-common-regulators.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/pwm/pwm.h>
> +
> +/ {
> +	model = "Topwise A721";
> +	compatible = "topwise,a721", "allwinner,sun4i-a10";
> +
> +	aliases {
> +		serial0 = &uart0;
> +	};
> +
> +	backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&pwm 0 100000 PWM_POLARITY_INVERTED>;
> +		power-supply = <&reg_vbat>;
> +		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
> +		brightness-levels = <0 30 40 50 60 70 80 90 100>;
> +		default-brightness-level = <8>;
> +	};
> +
> +	chosen {
> +		stdout-path = "serial0:115200n8";
> +	};
> +
> +	panel {
> +		compatible = "starry,kr070pe2t";
> +		backlight = <&backlight>;
> +		power-supply = <&reg_lcd_power>;
> +
> +		port {
> +			panel_input: endpoint {
> +				remote-endpoint = <&tcon0_out_panel>;
> +			};
> +		};
> +	};
> +
> +	reg_lcd_power: reg-lcd-power {
> +		compatible = "regulator-fixed";
> +		regulator-name = "reg-lcd-power";
> +		gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
> +		enable-active-high;
> +	};
> +
> +	reg_vbat: reg-vbat {
> +		compatible = "regulator-fixed";
> +		regulator-name = "vbat";
> +		regulator-min-microvolt = <3700000>;
> +		regulator-max-microvolt = <3700000>;
> +	};
> +
> +};
> +
> +&codec {
> +	status = "okay";
> +};
> +
> +&cpu0 {
> +	cpu-supply = <&reg_dcdc2>;
> +};
> +
> +&de {
> +	status = "okay";
> +};
> +
> +&ehci0 {
> +	status = "okay";
> +};
> +
> +&ehci1 {
> +	status = "okay";
> +};
> +
> +&i2c0 {
> +	status = "okay";
> +
> +	axp209: pmic@34 {
> +		reg = <0x34>;
> +		interrupts = <0>;
> +	};
> +};
> +
> +#include "axp209.dtsi"
> +
> +&ac_power_supply {
> +	status = "okay";
> +};
> +
> +&battery_power_supply {
> +	status = "okay";
> +};
> +
> +&i2c1 {
> +	status = "okay";
> +
> +	accelerometer@4c {
> +		compatible = "fsl,mma7660";
> +		reg = <0x4c>;
> +	};
> +};
> +
> +&i2c2 {
> +	status = "okay";
> +
> +	touchscreen@38 {
> +		compatible = "edt,edt-ft5406";
> +		reg = <0x38>;
> +		interrupt-parent = <&pio>;
> +		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
> +		touchscreen-size-x = <800>;
> +		touchscreen-size-y = <480>;
> +		vcc-supply = <&reg_vcc3v3>;
> +	};
> +};
> +
> +&lradc {
> +	vref-supply = <&reg_ldo2>;
> +	status = "okay";
> +
> +	button-571 {
> +		label = "Volume Up";
> +		linux,code = <KEY_VOLUMEUP>;
> +		channel = <0>;
> +		voltage = <571428>;
> +	};
> +
> +	button-761 {
> +		label = "Volume Down";
> +		linux,code = <KEY_VOLUMEDOWN>;
> +		channel = <0>;
> +		voltage = <761904>;
> +	};
> +};
> +
> +&mmc0 {
> +	vmmc-supply = <&reg_vcc3v3>;
> +	bus-width = <4>;
> +	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
> +	status = "okay";
> +};
> +
> +&ohci0 {
> +	status = "okay";
> +};
> +
> +&ohci1 {
> +	status = "okay";
> +};
> +
> +&otg_sram {
> +	status = "okay";
> +};
> +
> +&pio {
> +	vcc-pb-supply = <&reg_vcc3v3>;
> +	vcc-pf-supply = <&reg_vcc3v3>;
> +	vcc-ph-supply = <&reg_vcc3v3>;
> +};
> +
> +&pwm {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pwm0_pin>;
> +	status = "okay";
> +};
> +
> +&reg_dcdc2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1400000>;
> +	regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc3 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1250000>;
> +	regulator-max-microvolt = <1250000>;
> +	regulator-name = "vdd-int-dll";
> +};
> +
> +&reg_ldo1 {
> +	regulator-name = "vdd-rtc";
> +};
> +
> +&reg_ldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3000000>;
> +	regulator-max-microvolt = <3000000>;
> +	regulator-name = "avcc";
> +};
> +
> +&reg_usb0_vbus {
> +	status = "okay";
> +};
> +
> +&reg_usb1_vbus {
> +	status = "okay";
> +};
> +
> +&reg_usb2_vbus {
> +	status = "okay";
> +};
> +
> +&tcon0_out {
> +	tcon0_out_panel: endpoint@0 {
> +		reg = <0>;
> +		remote-endpoint = <&panel_input>;
> +	};
> +};
> +
> +&uart0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&uart0_pb_pins>;
> +	status = "okay";
> +};
> +
> +&usb_otg {
> +	dr_mode = "otg";
> +	status = "okay";
> +};
> +
> +&usb_power_supply {
> +	status = "okay";
> +};
> +
> +&usbphy {
> +	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> +	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
> +	usb0_vbus-supply = <&reg_usb0_vbus>;
> +	usb1_vbus-supply = <&reg_usb1_vbus>;
> +	usb2_vbus-supply = <&reg_usb2_vbus>;
> +	status = "okay";
> +};
> diff --git a/arch/arm/dts/sun4i-a10.dtsi b/arch/arm/dts/sun4i-a10.dtsi
> index 3a1c6b45c9a1..51a6464aab9a 100644
> --- a/arch/arm/dts/sun4i-a10.dtsi
> +++ b/arch/arm/dts/sun4i-a10.dtsi
> @@ -115,13 +115,12 @@
>  			reg = <0x0>;
>  			clocks = <&ccu CLK_CPU>;
>  			clock-latency = <244144>; /* 8 32k periods */
> -			operating-points = <
> +			operating-points =
>  				/* kHz	  uV */
> -				1008000 1400000
> -				912000	1350000
> -				864000	1300000
> -				624000	1250000
> -				>;  
> +				<1008000 1400000>,
> +				<912000	1350000>,
> +				<864000	1300000>,
> +				<624000	1250000>;
>  			#cooling-cells = <2>;
>  		};
>  	};
> @@ -143,7 +142,7 @@
>  			trips {
>  				cpu_alert0: cpu-alert0 {
>  					/* milliCelsius */
> -					temperature = <850000>;
> +					temperature = <85000>;
>  					hysteresis = <2000>;
>  					type = "passive";
>  				};
> @@ -184,14 +183,34 @@
>  		status = "disabled";
>  	};
>  
> +	pmu {
> +		compatible = "arm,cortex-a8-pmu";
> +		interrupts = <3>;
> +	};
> +
> +	reserved-memory {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +
> +		/* Address must be kept in the lower 256 MiBs of DRAM for VE. */
> +		default-pool {
> +			compatible = "shared-dma-pool";
> +			size = <0x6000000>;
> +			alloc-ranges = <0x40000000 0x10000000>;
> +			reusable;
> +			linux,cma-default;
> +		};
> +	};
> +
>  	soc {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
>  		#size-cells = <1>;
>  		ranges;
>  
> -		sram-controller@1c00000 {
> -			compatible = "allwinner,sun4i-a10-sram-controller";
> +		system-control@1c00000 {
> +			compatible = "allwinner,sun4i-a10-system-control";
>  			reg = <0x01c00000 0x30>;
>  			#address-cells = <1>;
>  			#size-cells = <1>;
> @@ -224,6 +243,19 @@
>  					status = "disabled";
>  				};
>  			};
> +
> +			sram_c: sram@1d00000 {
> +				compatible = "mmio-sram";
> +				reg = <0x01d00000 0xd0000>;
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				ranges = <0 0x01d00000 0xd0000>;
> +
> +				ve_sram: sram-section@0 {
> +					compatible = "allwinner,sun4i-a10-sram-c1";
> +					reg = <0x000000 0x80000>;
> +				};
> +			};
>  		};
>  
>  		dma: dma-controller@1c02000 {
> @@ -234,7 +266,7 @@
>  			#dma-cells = <2>;
>  		};
>  
> -		nfc: nand@1c03000 {
> +		nfc: nand-controller@1c03000 {
>  			compatible = "allwinner,sun4i-a10-nand";
>  			reg = <0x01c03000 0x1000>;
>  			interrupts = <37>;
> @@ -309,6 +341,7 @@
>  				      "tcon-ch0",
>  				      "tcon-ch1";
>  			clock-output-names = "tcon0-pixel-clock";
> +			#clock-cells = <0>;
>  			dmas = <&dma SUN4I_DMA_DEDICATED 14>;
>  
>  			ports {
> @@ -358,6 +391,7 @@
>  				      "tcon-ch0",
>  				      "tcon-ch1";
>  			clock-output-names = "tcon1-pixel-clock";
> +			#clock-cells = <0>;
>  			dmas = <&dma SUN4I_DMA_DEDICATED 15>;
>  
>  			ports {
> @@ -394,6 +428,17 @@
>  			};
>  		};
>  
> +		video-codec@1c0e000 {
> +			compatible = "allwinner,sun4i-a10-video-engine";
> +			reg = <0x01c0e000 0x1000>;
> +			clocks = <&ccu CLK_AHB_VE>, <&ccu CLK_VE>,
> +				 <&ccu CLK_DRAM_VE>;
> +			clock-names = "ahb", "mod", "ram";
> +			resets = <&ccu RST_VE>;
> +			interrupts = <53>;
> +			allwinner,sram = <&ve_sram 1>;
> +		};
> +
>  		mmc0: mmc@1c0f000 {
>  			compatible = "allwinner,sun4i-a10-mmc";
>  			reg = <0x01c0f000 0x1000>;
> @@ -450,13 +495,14 @@
>  			phy-names = "usb";
>  			extcon = <&usbphy 0>;
>  			allwinner,sram = <&otg_sram 1>;
> +			dr_mode = "otg";
>  			status = "disabled";
>  		};
>  
>  		usbphy: phy@1c13400 {
>  			#phy-cells = <1>;
>  			compatible = "allwinner,sun4i-a10-usb-phy";
> -			reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>;
> +			reg = <0x01c13400 0x10>, <0x01c14800 0x4>, <0x01c1c800 0x4>;
>  			reg-names = "phy_ctrl", "pmu1", "pmu2";
>  			clocks = <&ccu CLK_USB_PHY>;
>  			clock-names = "usb_phy";
> @@ -530,8 +576,6 @@
>  				};
>  
>  				hdmi_out: port@1 {
> -					#address-cells = <1>;
> -					#size-cells = <0>;
>  					reg = <1>;
>  				};
>  			};
> @@ -579,6 +623,16 @@
>  			status = "disabled";
>  		};
>  
> +		csi1: csi@1c1d000 {
> +			compatible = "allwinner,sun4i-a10-csi1";
> +			reg = <0x01c1d000 0x1000>;
> +			interrupts = <43>;
> +			clocks = <&ccu CLK_AHB_CSI1>, <&ccu CLK_DRAM_CSI1>;
> +			clock-names = "bus", "ram";
> +			resets = <&ccu RST_CSI1>;
> +			status = "disabled";
> +		};
> +
>  		spi3: spi@1c1f000 {
>  			compatible = "allwinner,sun4i-a10-spi";
>  			reg = <0x01c1f000 0x1000>;
> @@ -625,6 +679,31 @@
>  				function = "can";
>  			};
>  
> +			/omit-if-no-ref/
> +			csi1_8bits_pg_pins: csi1-8bits-pg-pins {
> +				pins = "PG0", "PG2", "PG3", "PG4", "PG5",
> +				       "PG6", "PG7", "PG8", "PG9", "PG10",
> +				       "PG11";
> +				function = "csi1";
> +			};
> +
> +			/omit-if-no-ref/
> +			csi1_24bits_ph_pins: csi1-24bits-ph-pins {
> +				pins = "PH0", "PH1", "PH2", "PH3", "PH4",
> +				       "PH5", "PH6", "PH7", "PH8", "PH9",
> +				       "PH10", "PH11", "PH12", "PH13", "PH14",
> +				       "PH15", "PH16", "PH17", "PH18", "PH19",
> +				       "PH20", "PH21", "PH22", "PH23", "PH24",
> +				       "PH25", "PH26", "PH27";
> +				function = "csi1";
> +			};
> +
> +			/omit-if-no-ref/
> +			csi1_clk_pg_pin: csi1-clk-pg-pin {
> +				pins = "PG1";
> +				function = "csi1";
> +			};
> +
>  			emac_pins: emac0-pins {
>  				pins = "PA0", "PA1", "PA2",
>  				       "PA3", "PA4", "PA5", "PA6",
> @@ -762,13 +841,20 @@
>  		timer@1c20c00 {
>  			compatible = "allwinner,sun4i-a10-timer";
>  			reg = <0x01c20c00 0x90>;
> -			interrupts = <22>;
> +			interrupts = <22>,
> +				     <23>,
> +				     <24>,
> +				     <25>,
> +				     <67>,
> +				     <68>;
>  			clocks = <&osc24M>;
>  		};
>  
>  		wdt: watchdog@1c20c90 {
>  			compatible = "allwinner,sun4i-a10-wdt";
>  			reg = <0x01c20c90 0x10>;
> +			interrupts = <24>;
> +			clocks = <&osc24M>;
>  		};
>  
>  		rtc: rtc@1c20d00 {
> @@ -1001,6 +1087,27 @@
>  			status = "disabled";
>  		};
>  
> +		mali: gpu@1c40000 {
> +			compatible = "allwinner,sun4i-a10-mali", "arm,mali-400";
> +			reg = <0x01c40000 0x10000>;
> +			interrupts = <69>,
> +				     <70>,
> +				     <71>,
> +				     <72>,
> +				     <73>;
> +			interrupt-names = "gp",
> +					  "gpmmu",
> +					  "pp0",
> +					  "ppmmu0",
> +					  "pmu";
> +			clocks = <&ccu CLK_AHB_GPU>, <&ccu CLK_GPU>;
> +			clock-names = "bus", "core";
> +			resets = <&ccu RST_GPU>;
> +
> +			assigned-clocks = <&ccu CLK_GPU>;
> +			assigned-clock-rates = <384000000>;
> +		};
> +
>  		fe0: display-frontend@1e00000 {
>  			compatible = "allwinner,sun4i-a10-display-frontend";
>  			reg = <0x01e00000 0x20000>;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-27  0:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26  3:26 [PATCH v2] ARM: dts: sun4i: Sync from Linux v5.18-rc1 Samuel Holland
2022-06-27  0:11 ` Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.