Skip to contentSkip to conversation

sunxi: a20/r40: Migrate DM_MMC and DM_SCSI

PATCH New Jagan Teki 2 participants 10 messages Apr 12, 2019 – Apr 16, 2019

Subsystems (4)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

cover sunxi: a20/r40: Migrate DM_MMC and DM_SCSI

This would Migrate DM_MMC, DM_SCSI for A20 and R40 platforms.

Note:
- a20-wits-pro-a20-dkt change would need to send Linux first
- BPI-M2-Berry would break, but will import Linux dts once approved.

Andre Przywara (1):
sunxi: update SATA driver to always use DM_SCSI

Jagan Teki (6):
arm: allwinner: r40: Sync R40 dts(i) files from Linux 5.1-rc2
arm: allwinner: dts: a20: Sync A20 dts(i) files from Linux 5.1-rc2
board: sunxi: Add R40 sata compatible
ARM: dts: a20-m5: Enable AHCI
ARM: dts: a20-wits-pro-a20-dkt: Enable AHCI
arm: sunxi: Enable DM_MMC and DM_SCSI

 arch/arm/Kconfig                              |   2 +
 arch/arm/dts/sun7i-a20-ainol-aw1.dts          |   2 +-
 arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts   |  46 +--
 arch/arm/dts/sun7i-a20-bananapi.dts           |  49 +--
 arch/arm/dts/sun7i-a20-bananapro.dts          |  65 +---
 arch/arm/dts/sun7i-a20-cubieboard2.dts        |  21 +-
 arch/arm/dts/sun7i-a20-cubietruck.dts         |  83 ++--
 arch/arm/dts/sun7i-a20-hummingbird.dts        |  60 +--
 arch/arm/dts/sun7i-a20-i12-tvbox.dts          |  47 +--
 arch/arm/dts/sun7i-a20-icnova-swac.dts        |  10 +-
 arch/arm/dts/sun7i-a20-itead-ibox.dts         |  10 +-
 arch/arm/dts/sun7i-a20-lamobo-r1.dts          |  48 +--
 arch/arm/dts/sun7i-a20-m3.dts                 |  21 +-
 arch/arm/dts/sun7i-a20-m5.dts                 |   8 +-
 arch/arm/dts/sun7i-a20-mk808c.dts             |  26 +-
 .../arm/dts/sun7i-a20-olimex-som-evb-emmc.dts |  35 ++
 arch/arm/dts/sun7i-a20-olimex-som-evb.dts     |  68 +---
 .../dts/sun7i-a20-olimex-som204-evb-emmc.dts  |   2 -
 arch/arm/dts/sun7i-a20-olimex-som204-evb.dts  |  36 +-
 arch/arm/dts/sun7i-a20-olinuxino-lime.dts     |  22 +-
 .../dts/sun7i-a20-olinuxino-lime2-emmc.dts    |  11 -
 arch/arm/dts/sun7i-a20-olinuxino-lime2.dts    |  34 +-
 .../dts/sun7i-a20-olinuxino-micro-emmc.dts    |   2 -
 arch/arm/dts/sun7i-a20-olinuxino-micro.dts    |  54 +--
 arch/arm/dts/sun7i-a20-orangepi-mini.dts      |  52 +--
 arch/arm/dts/sun7i-a20-orangepi.dts           |  44 +--
 arch/arm/dts/sun7i-a20-pcduino3-nano.dts      |  31 +-
 arch/arm/dts/sun7i-a20-pcduino3.dts           |  39 +-
 arch/arm/dts/sun7i-a20-primo73.dts            |   4 +-
 arch/arm/dts/sun7i-a20-wexler-tab7200.dts     |  39 +-
 arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts   |  27 +-
 .../dts/sun7i-a20-yones-toptech-bd1078.dts    |   2 +-
 arch/arm/dts/sun7i-a20.dtsi                   | 209 ++++++----
 arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts  |  91 ++++-
 arch/arm/dts/sun8i-r40.dtsi                   | 364 +++++++++++++++++-
 arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts  |   2 +-
 arch/arm/dts/sunxi-itead-core-common.dtsi     |   6 +-
 arch/arm/mach-sunxi/Kconfig                   |  13 -
 board/sunxi/Makefile                          |   3 -
 drivers/ata/Kconfig                           |   8 +
 drivers/ata/Makefile                          |   1 +
 .../sunxi/ahci.c => drivers/ata/ahci_sunxi.c  |  11 +-
 include/configs/sunxi-common.h                |   6 -
 scripts/config_whitelist.txt                  |   1 -
 44 files changed, 838 insertions(+), 877 deletions(-)
 create mode 100644 arch/arm/dts/sun7i-a20-olimex-som-evb-emmc.dts
 rename board/sunxi/ahci.c => drivers/ata/ahci_sunxi.c (94%)
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#1 lore raw

PATCH 1/7 arm: allwinner: r40: Sync R40 dts(i) files from Linux 5.1-rc2

Sync sun8i-r40 dts(i) files from Linux 5.1-rc2

Linux commit details about the sun8i-r40* sync:
"ARM: dts: sun8i: r40: bananapi-m2-ultra: Add Bluetooth device node" (sha1: 1e5f1db4ccd8348a21da55bff82f4263000879ef)

Linux commit details about the sun8i-v40* sync:
"ARM: dts: sunxi: Fix I2C bus warnings"
(sha1: 0729b4af5753b65aa031f58c435da53dbbf56d19)

Cc Pablo Sebastián Greco <[email protected]>
---
 arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts |  91 ++++-
 arch/arm/dts/sun8i-r40.dtsi                  | 364 ++++++++++++++++++-
 arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts |   2 +-
 3 files changed, 449 insertions(+), 8 deletions(-)
arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts +89 -2
index 25fb048c7d..c488aaacbd 100644
@@ -59,6 +59,17 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	connector {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		port {
+			hdmi_con_in: endpoint {
+				remote-endpoint = <&hdmi_out_con>;
+			};
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -91,9 +102,21 @@
 	wifi_pwrseq: wifi_pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
+		clocks = <&ccu CLK_OUTA>;
+		clock-names = "ext_clock";
 	};
 };
 
+&ahci {
+	ahci-supply = <&reg_dldo4>;
+	phy-supply = <&reg_eldo3>;
+	status = "okay";
+};
+
+&de {
+	status = "okay";
+};
+
 &ehci1 {
 	status = "okay";
 };
@@ -118,6 +141,16 @@
 	};
 };
 
+&hdmi {
+	status = "okay";
+};
+
+&hdmi_out {
+	hdmi_out_con: endpoint {
+		remote-endpoint = <&hdmi_con_in>;
+	};
+};
+
 &i2c0 {
 	status = "okay";
 
@@ -134,8 +167,7 @@
 &mmc0 {
 	vmmc-supply = <&reg_dcdc1>;
 	bus-width = <4>;
-	cd-gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
-	cd-inverted;
+	cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
 	status = "okay";
 };
 
@@ -166,6 +198,11 @@
 	status = "okay";
 };
 
+&pio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&clk_out_a_pin>;
+};
+
 &reg_aldo2 {
 	regulator-always-on;
 	regulator-min-microvolt = <2500000>;
@@ -220,18 +257,68 @@
 	regulator-name = "vcc-wifi-io";
 };
 
+/*
+ * Our WiFi chip needs both DLDO2 and DLDO3 to be powered at the same
+ * time, with the two being in sync, to be able to meet maximum power
+ * consumption during transmits. Since this is not really supported
+ * right now, just use the two as always on, and we will fix it later.
+ */
+
 &reg_dldo2 {
+	regulator-always-on;
 	regulator-min-microvolt = <3300000>;
 	regulator-max-microvolt = <3300000>;
 	regulator-name = "vcc-wifi";
 };
 
+&reg_dldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi-2";
+};
+
+&reg_dldo4 {
+	regulator-min-microvolt = <2500000>;
+	regulator-max-microvolt = <2500000>;
+	regulator-name = "vdd2v5-sata";
+};
+
+&reg_eldo3 {
+	regulator-min-microvolt = <1200000>;
+	regulator-max-microvolt = <1200000>;
+	regulator-name = "vdd1v2-sata";
+};
+
+&tcon_tv0 {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
+&uart3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>;
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		clocks = <&ccu CLK_OUTA>;
+		clock-names = "lpo";
+		vbat-supply = <&reg_dldo2>;
+		vddio-supply = <&reg_dldo1>;
+		device-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
+		/* TODO host wake line connected to PMIC GPIO pins */
+		shutdown-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */
+		max-speed = <1500000>;
+	};
+};
+
 &usbphy {
 	usb1_vbus-supply = <&reg_vcc5v0>;
 	usb2_vbus-supply = <&reg_vcc5v0>;
arch/arm/dts/sun8i-r40.dtsi +359 -5

447 lines not on this page · raw message

arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts +1 -1
index 35859d8f32..bf97f6244c 100644
@@ -95,7 +95,7 @@
 &i2c0 {
 	status = "okay";
 
-	axp22x: pmic at 68 {
+	axp22x: pmic at 34 {
 		compatible = "x-powers,axp221";
 		reg = <0x34>;
 		interrupt-parent = <&nmi_intc>;
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#2 lore raw

PATCH 2/7 arm: allwinner: dts: a20: Sync A20 dts(i) files from Linux 5.1-rc2

In reply to Jagan Teki

Sync sun7i-a20 dts(i) files from Linux 5.1-rc2

Linux commit details about the sun7i-a20* sync:
"ARM: dts: sun7i: bananapi: Add GPIO banks regulators" (sha1: 09c6572290f018d73ec2e812e28bada34d41815f)

Here are U-Boot specific dts changes.

- s/uart0_pins_a/uart0_pb_pins for
sun7i-a20-ainol-aw1.dts
sun7i-a20-m5.dts
sun7i-a20-primo73.dts
sun7i-a20-yones-toptech-bd1078.dts
sunxi-itead-core-common.dtsi
- s/gmac_pins_mii_a/gmac_rgmii_pins for
sun7i-a20-m5.dts
- drop i2c0, i2c1 pins from
sunxi-itead-core-common.dtsi
- drop mmc0 pins from
sun7i-a20-primo73.dts

---
 arch/arm/dts/sun7i-a20-ainol-aw1.dts          |   2 +-
 arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts   |  46 +---
 arch/arm/dts/sun7i-a20-bananapi.dts           |  49 ++--
 arch/arm/dts/sun7i-a20-bananapro.dts          |  65 +-----
 arch/arm/dts/sun7i-a20-cubieboard2.dts        |  21 +-
 arch/arm/dts/sun7i-a20-cubietruck.dts         |  83 +++----
 arch/arm/dts/sun7i-a20-hummingbird.dts        |  60 +----
 arch/arm/dts/sun7i-a20-i12-tvbox.dts          |  47 +---
 arch/arm/dts/sun7i-a20-icnova-swac.dts        |  10 +-
 arch/arm/dts/sun7i-a20-itead-ibox.dts         |  10 +-
 arch/arm/dts/sun7i-a20-lamobo-r1.dts          |  48 +---
 arch/arm/dts/sun7i-a20-m3.dts                 |  21 +-
 arch/arm/dts/sun7i-a20-m5.dts                 |   4 +-
 arch/arm/dts/sun7i-a20-mk808c.dts             |  26 +--
 .../arm/dts/sun7i-a20-olimex-som-evb-emmc.dts |  35 +++
 arch/arm/dts/sun7i-a20-olimex-som-evb.dts     |  68 ++----
 .../dts/sun7i-a20-olimex-som204-evb-emmc.dts  |   2 -
 arch/arm/dts/sun7i-a20-olimex-som204-evb.dts  |  36 ++-
 arch/arm/dts/sun7i-a20-olinuxino-lime.dts     |  22 +-
 .../dts/sun7i-a20-olinuxino-lime2-emmc.dts    |  11 -
 arch/arm/dts/sun7i-a20-olinuxino-lime2.dts    |  34 +--
 .../dts/sun7i-a20-olinuxino-micro-emmc.dts    |   2 -
 arch/arm/dts/sun7i-a20-olinuxino-micro.dts    |  54 ++---
 arch/arm/dts/sun7i-a20-orangepi-mini.dts      |  52 +----
 arch/arm/dts/sun7i-a20-orangepi.dts           |  44 +---
 arch/arm/dts/sun7i-a20-pcduino3-nano.dts      |  31 +--
 arch/arm/dts/sun7i-a20-pcduino3.dts           |  39 +---
 arch/arm/dts/sun7i-a20-primo73.dts            |   4 +-
 arch/arm/dts/sun7i-a20-wexler-tab7200.dts     |  39 +---
 arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts   |  23 +-
 .../dts/sun7i-a20-yones-toptech-bd1078.dts    |   2 +-
 arch/arm/dts/sun7i-a20.dtsi                   | 209 ++++++++++++------
 arch/arm/dts/sunxi-itead-core-common.dtsi     |   6 +-
 33 files changed, 369 insertions(+), 836 deletions(-)
 create mode 100644 arch/arm/dts/sun7i-a20-olimex-som-evb-emmc.dts
arch/arm/dts/sun7i-a20-ainol-aw1.dts +1 -1
index 57fe0066cb..5914c919d4 100644
@@ -23,6 +23,6 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts +3 -43

109 lines not on this page · raw message

arch/arm/dts/sun7i-a20-bananapi.dts +14 -35

125 lines not on this page · raw message

arch/arm/dts/sun7i-a20-bananapro.dts +8 -57

148 lines not on this page · raw message

arch/arm/dts/sun7i-a20-cubieboard2.dts +4 -17
index 942ac9dfd4..200685b0b1 100644
@@ -74,8 +74,6 @@
 
 	leds {
 		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_pins_cubieboard2>;
 
 		blue {
 			label = "cubieboard2:blue:usr";
@@ -116,7 +114,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_mii_a>;
+	pinctrl-0 = <&gmac_mii_pins>;
 	phy = <&phy1>;
 	phy-mode = "mii";
 	status = "okay";
@@ -137,8 +135,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -149,20 +145,16 @@
 };
 
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 };
 
 &ir0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&ir0_rx_pins_a>;
+	pinctrl-0 = <&ir0_rx_pin>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -182,12 +174,7 @@
 };
 
 &pio {
-	led_pins_cubieboard2: led_pins at 0 {
-		pins = "PH20", "PH21";
-		function = "gpio_out";
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+	usb0_id_detect_pin: usb0-id-detect-pin {
 		pins = "PH4";
 		function = "gpio_in";
 		bias-pull-up;
@@ -239,7 +226,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-cubietruck.dts +27 -56

177 lines not on this page · raw message

arch/arm/dts/sun7i-a20-hummingbird.dts +10 -50

161 lines not on this page · raw message

arch/arm/dts/sun7i-a20-i12-tvbox.dts +3 -44

117 lines not on this page · raw message

arch/arm/dts/sun7i-a20-icnova-swac.dts +2 -8
index 926fa194eb..949494730a 100644
@@ -74,7 +74,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_mii_a>;
+	pinctrl-0 = <&gmac_mii_pins>;
 	phy = <&phy1>;
 	phy-mode = "mii";
 	status = "okay";
@@ -85,8 +85,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -97,14 +95,10 @@
 };
 
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 8 5 GPIO_ACTIVE_LOW>; /* PI5 */
@@ -156,7 +150,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-itead-ibox.dts +4 -6
index 1b05ba466e..b90a7607d0 100644
@@ -96,7 +96,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_mii_a>;
+	pinctrl-0 = <&gmac_mii_pins>;
 	phy = <&phy1>;
 	phy-mode = "mii";
 	status = "okay";
@@ -115,13 +115,11 @@
 
 &ir0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&ir0_rx_pins_a>;
+	pinctrl-0 = <&ir0_rx_pin>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -129,7 +127,7 @@
 };
 
 &pio {
-	led_pins_itead_core: led_pins at 0 {
+	led_pins_itead_core: led-pins {
 		pins = "PH20","PH21";
 		function = "gpio_out";
 		drive-strength = <20>;
@@ -142,6 +140,6 @@
 
 &spdif {
 	pinctrl-names = "default";
-	pinctrl-0 = <&spdif_tx_pins_a>;
+	pinctrl-0 = <&spdif_tx_pin>;
 	status = "okay";
 };
arch/arm/dts/sun7i-a20-lamobo-r1.dts +11 -37

127 lines not on this page · raw message

arch/arm/dts/sun7i-a20-m3.dts +3 -18
index e91a209850..b8a1aaaf39 100644
@@ -63,8 +63,6 @@
 
 	leds {
 		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_pins_m3>;
 
 		blue {
 			label = "m3:blue:usr";
@@ -83,7 +81,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_mii_a>;
+	pinctrl-0 = <&gmac_mii_pins>;
 	phy = <&phy1>;
 	phy-mode = "mii";
 	status = "okay";
@@ -94,8 +92,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -111,13 +107,11 @@
 
 &ir0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&ir0_rx_pins_a>;
+	pinctrl-0 = <&ir0_rx_pin>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -125,8 +119,6 @@
 };
 
 &mmc2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc2_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	non-removable;
@@ -141,13 +133,6 @@
 	status = "okay";
 };
 
-&pio {
-	led_pins_m3: led_pins at 0 {
-		pins = "PH20";
-		function = "gpio_out";
-	};
-};
-
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -158,7 +143,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-m5.dts +2 -2
index 00c3ffd323..65930cc6ee 100644
@@ -31,7 +31,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_mii_a>;
+	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy = <&phy1>;
 	phy-mode = "mii";
 	status = "okay";
@@ -51,6 +51,6 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
arch/arm/dts/sun7i-a20-mk808c.dts +2 -24
index 6109f794a9..1491c603f6 100644
@@ -106,8 +106,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -121,20 +119,14 @@
 };
 
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 };
 
 &i2c2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c2_pins_a>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v0>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -153,18 +145,6 @@
 	status = "okay";
 };
 
-&pio {
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
-		pins = "PH4";
-		function = "gpio_in";
-	};
-
-	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
-		pins = "PH5";
-		function = "gpio_in";
-	};
-};
-
 &reg_usb0_vbus {
 	status = "okay";
 };
@@ -179,13 +159,13 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
 &uart2 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart2_pins_a>;
+	pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>;
 	status = "okay";
 };
 
@@ -195,8 +175,6 @@
 };
 
 &usbphy {
-	pinctrl-names = "default";
-	pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
 	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>;
arch/arm/dts/sun7i-a20-olimex-som-evb-emmc.dts new file +35 -0
new file mode 100644
index 0000000000..20bf09b222
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree Source for A20-Olimex-SOM-EVB-eMMC Board
+ *
+ * Copyright (C) 2018 Olimex Ltd.
+ *   Author: Stefan Mavrodiev <[email protected]>
+ */
+
+/dts-v1/;
+#include "sun7i-a20-olimex-som-evb.dts"
+
+/ {
+
+	model = "Olimex A20-Olimex-SOM-EVB-eMMC";
+	compatible = "olimex,a20-olimex-som-evb-emmc", "allwinner,sun7i-a20";
+
+	mmc2_pwrseq: mmc2_pwrseq {
+		compatible = "mmc-pwrseq-emmc";
+		reset-gpios = <&pio 2 18 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&mmc2 {
+	vmmc-supply = <&reg_vcc3v3>;
+	mmc-pwrseq = <&mmc2_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	emmc: emmc at 0 {
+		reg = <0>;
+		compatible = "mmc-card";
+		broken-hpi;
+	};
+};
arch/arm/dts/sun7i-a20-olimex-som-evb.dts +16 -52

195 lines not on this page · raw message

arch/arm/dts/sun7i-a20-olimex-som204-evb-emmc.dts +0 -2
index c56620a8fb..a59755a2e7 100644
@@ -20,8 +20,6 @@
 };
 
 &mmc2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc2_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	mmc-pwrseq = <&mmc2_pwrseq>;
 	bus-width = <4>;
arch/arm/dts/sun7i-a20-olimex-som204-evb.dts +13 -23
index 3d7b5c848f..823aabce04 100644
@@ -78,7 +78,7 @@
 
 &can0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&can0_pins_a>;
+	pinctrl-0 = <&can_ph_pins>;
 	status = "okay";
 };
 
@@ -104,7 +104,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_rgmii_a>;
+	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy = <&phy3>;
 	phy-mode = "rgmii";
 	phy-supply = <&reg_vcc3v3>;
@@ -130,8 +130,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -143,8 +141,6 @@
 
 /* Exposed to UEXT1 */
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 
 	eeprom: eeprom at 50 {
@@ -156,20 +152,16 @@
 
 /* Exposed to UEXT2 */
 &i2c2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c2_pins_a>;
 	status = "okay";
 };
 
 &ir0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&ir0_rx_pins_a>;
+	pinctrl-0 = <&ir0_rx_pin>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>;
@@ -177,8 +169,6 @@
 };
 
 &mmc3 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc3_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	mmc-pwrseq = <&rtl_pwrseq>;
 	bus-width = <4>;
@@ -203,8 +193,8 @@
 };
 
 &pio {
-	bt_uart_pins: bt_uart_pins at 0 {
-		pins = "PG6", "PG7", "PG8";
+	uart3_rts_pin: uart3-rts-pin {
+		pins = "PG8";
 		function = "uart3";
 	};
 };
@@ -274,43 +264,43 @@
 /* Exposed to UEXT1 */
 &spi1 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&spi1_pins_a>,
-		    <&spi1_cs0_pins_a>;
+	pinctrl-0 = <&spi1_pi_pins>,
+		    <&spi1_cs0_pi_pin>;
 	status = "okay";
 };
 
 /* Exposed to UEXT2 */
 &spi2 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&spi2_pins_a>,
-		    <&spi2_cs0_pins_a>;
+	pinctrl-0 = <&spi2_pc_pins>,
+		    <&spi2_cs0_pc_pin>;
 	status = "okay";
 };
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
 /* Used for RTL8723BS bluetooth */
 &uart3 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&bt_uart_pins>;
+	pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_pin>;
 	status = "okay";
 };
 
 /* Exposed to UEXT1 */
 &uart4 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart4_pins_a>;
+	pinctrl-0 = <&uart4_pg_pins>;
 	status = "okay";
 };
 
 /* Exposed to UEXT2 */
 &uart7 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart7_pins_a>;
+	pinctrl-0 = <&uart7_pi_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-olinuxino-lime.dts +5 -17
index d20fd03596..5e411194bf 100644
@@ -105,7 +105,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_mii_a>;
+	pinctrl-0 = <&gmac_mii_pins>;
 	phy = <&phy1>;
 	phy-mode = "mii";
 	status = "okay";
@@ -126,8 +126,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -142,8 +140,6 @@
 };
 
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 
 	eeprom: eeprom at 50 {
@@ -154,8 +150,6 @@
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -175,24 +169,19 @@
 };
 
 &pio {
-	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
-		pins = "PC3";
-		function = "gpio_out";
-	};
-
-	led_pins_olinuxinolime: led_pins at 0 {
+	led_pins_olinuxinolime: led-pins {
 		pins = "PH2";
 		function = "gpio_out";
 		drive-strength = <20>;
 	};
 
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+	usb0_id_detect_pin: usb0-id-detect-pin {
 		pins = "PH4";
 		function = "gpio_in";
 		bias-pull-up;
 	};
 
-	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
 		pins = "PH5";
 		function = "gpio_in";
 		bias-pull-down;
@@ -200,7 +189,6 @@
 };
 
 &reg_ahci_5v {
-	pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
 	gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 };
@@ -219,7 +207,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-olinuxino-lime2-emmc.dts +0 -11
index 81f376f2a4..decb014a38 100644
@@ -48,23 +48,12 @@
 	compatible = "olimex,a20-olinuxino-lime2-emmc", "allwinner,sun7i-a20";
 
 	mmc2_pwrseq: pwrseq {
-		pinctrl-0 = <&mmc2_pins_nrst>;
-		pinctrl-names = "default";
 		compatible = "mmc-pwrseq-emmc";
 		reset-gpios = <&pio 2 16 GPIO_ACTIVE_LOW>;
 	};
 };
 
-&pio {
-	mmc2_pins_nrst: mmc2-rst-pin {
-		pins = "PC16";
-		function = "gpio_out";
-	};
-};
-
 &mmc2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc2_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	vqmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
arch/arm/dts/sun7i-a20-olinuxino-lime2.dts +11 -23
index b828677f33..4e1c590eb0 100644
@@ -110,7 +110,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_rgmii_a>;
+	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy = <&phy1>;
 	phy-mode = "rgmii";
 	status = "okay";
@@ -131,8 +131,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -143,8 +141,6 @@
 };
 
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 
 	eeprom: eeprom at 50 {
@@ -154,9 +150,11 @@
 	};
 };
 
+&lradc {
+	vref-supply = <&reg_vcc3v0>;
+};
+
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -176,37 +174,26 @@
 };
 
 &pio {
-	ahci_pwr_pin_olinuxinolime: ahci_pwr_pin at 1 {
-		pins = "PC3";
-		function = "gpio_out";
-	};
-
-	led_pins_olinuxinolime: led_pins at 0 {
+	led_pins_olinuxinolime: led-pins {
 		pins = "PH2";
 		function = "gpio_out";
 		drive-strength = <20>;
 	};
 
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+	usb0_id_detect_pin: usb0-id-detect-pin {
 		pins = "PH4";
 		function = "gpio_in";
 		bias-pull-up;
 	};
 
-	usb0_vbus_detect_pin: usb0_vbus_detect_pin at 0 {
+	usb0_vbus_detect_pin: usb0-vbus-detect-pin {
 		pins = "PH5";
 		function = "gpio_in";
 		bias-pull-down;
 	};
-
-	usb0_vbus_pin_lime2: usb0_vbus_pin at 0 {
-		pins = "PC17";
-		function = "gpio_out";
-	};
 };
 
 &reg_ahci_5v {
-	pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
 	gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 };
@@ -245,6 +232,8 @@
 	regulator-min-microvolt = <2800000>;
 	regulator-max-microvolt = <2800000>;
 	regulator-name = "vddio-csi0";
+	regulator-soft-start;
+	regulator-ramp-delay = <1600>;
 };
 
 &reg_ldo4 {
@@ -254,7 +243,6 @@
 };
 
 &reg_usb0_vbus {
-	pinctrl-0 = <&usb0_vbus_pin_lime2>;
 	gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 };
@@ -269,7 +257,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-olinuxino-micro-emmc.dts +0 -2
index d99e7b193e..2337b44a88 100644
@@ -54,8 +54,6 @@
 };
 
 &mmc2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc2_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	non-removable;
arch/arm/dts/sun7i-a20-olinuxino-micro.dts +19 -35

178 lines not on this page · raw message

arch/arm/dts/sun7i-a20-orangepi-mini.dts +4 -48

119 lines not on this page · raw message

arch/arm/dts/sun7i-a20-orangepi.dts +4 -40

105 lines not on this page · raw message

arch/arm/dts/sun7i-a20-pcduino3-nano.dts +4 -27
index bfca960b03..538ea15fa3 100644
@@ -71,8 +71,6 @@
 
 	leds {
 		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_pins_pcduino3_nano>;
 
 		/* Marked "LED3" on the PCB. */
 		usr1 {
@@ -115,7 +113,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_rgmii_a>;
+	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy = <&phy1>;
 	phy-mode = "rgmii";
 	status = "okay";
@@ -136,8 +134,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -149,13 +145,11 @@
 
 &ir0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&ir0_rx_pins_a>;
+	pinctrl-0 = <&ir0_rx_pin>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -175,30 +169,14 @@
 };
 
 &pio {
-	ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin at 0 {
-		pins = "PH2";
-		function = "gpio_out";
-	};
-
-	led_pins_pcduino3_nano: led_pins at 0 {
-		pins = "PH16", "PH15";
-		function = "gpio_out";
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+	usb0_id_detect_pin: usb0-id-detect-pin {
 		pins = "PH4";
 		function = "gpio_in";
 		bias-pull-up;
 	};
-
-	usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin at 0 {
-		pins = "PD2";
-		function = "gpio_out";
-	};
 };
 
 &reg_ahci_5v {
-	pinctrl-0 = <&ahci_pwr_pin_pcduino3_nano>;
 	gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
 	status = "okay";
 };
@@ -232,14 +210,13 @@
 
 /* A single regulator (U24) powers both USB host ports. */
 &reg_usb1_vbus {
-	pinctrl-0 = <&usb1_vbus_pin_pcduino3_nano>;
 	gpio = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
 	status = "okay";
 };
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-pcduino3.dts +11 -28
index c576f101fb..a72ed4318d 100644
@@ -63,8 +63,6 @@
 
 	leds {
 		compatible = "gpio-leds";
-		pinctrl-names = "default";
-		pinctrl-0 = <&led_pins_pcduino3>;
 
 		tx {
 			label = "pcduino3:green:tx";
@@ -77,23 +75,22 @@
 		};
 	};
 
-	gpio_keys {
+	gpio-keys {
 		compatible = "gpio-keys";
-		pinctrl-names = "default";
-		pinctrl-0 = <&key_pins_pcduino3>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		button at 0 {
+
+		back {
 			label = "Key Back";
 			linux,code = <KEY_BACK>;
 			gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
 		};
-		button at 1 {
+
+		home {
 			label = "Key Home";
 			linux,code = <KEY_HOME>;
 			gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
 		};
-		button at 2 {
+
+		menu {
 			label = "Key Menu";
 			linux,code = <KEY_MENU>;
 			gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
@@ -124,7 +121,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_mii_a>;
+	pinctrl-0 = <&gmac_mii_pins>;
 	phy = <&phy1>;
 	phy-mode = "mii";
 	status = "okay";
@@ -135,8 +132,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -150,13 +145,11 @@
 
 &ir0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&ir0_rx_pins_a>;
+	pinctrl-0 = <&ir0_rx_pin>;
 	status = "okay";
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -176,17 +169,7 @@
 };
 
 &pio {
-	led_pins_pcduino3: led_pins at 0 {
-		pins = "PH15", "PH16";
-		function = "gpio_out";
-	};
-
-	key_pins_pcduino3: key_pins at 0 {
-		pins = "PH17", "PH18", "PH19";
-		function = "gpio_in";
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+	usb0_id_detect_pin: usb0-id-detect-pin {
 		pins = "PH4";
 		function = "gpio_in";
 		bias-pull-up;
@@ -233,7 +216,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-primo73.dts +1 -3
index b7294e0348..ac0175f795 100644
@@ -67,8 +67,6 @@
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -82,7 +80,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-wexler-tab7200.dts +5 -34
index 8202c87ca6..ffade253d1 100644
@@ -63,8 +63,6 @@
 		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
 		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
 		default-brightness-level = <8>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&bl_enable_pin>;
 		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
 	};
 
@@ -74,8 +72,6 @@
 };
 
 &codec {
-	pinctrl-names = "default";
-	pinctrl-0 = <&codec_pa_pin>;
 	allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
 	status = "okay";
 };
@@ -93,8 +89,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -107,14 +101,10 @@
 #include "axp209.dtsi"
 
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 };
 
 &i2c2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c2_pins_a>;
 	status = "okay";
 
 	gt911: touchscreen at 5d {
@@ -122,8 +112,6 @@
 		reg = <0x5d>;
 		interrupt-parent = <&pio>;
 		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
-		pinctrl-names = "default";
-		pinctrl-0 = <&ts_reset_pin>;
 		irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
 		reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
 		touchscreen-swapped-x-y;
@@ -134,14 +122,14 @@
 	vref-supply = <&reg_vcc3v0>;
 	status = "okay";
 
-	button at 571 {
+	button-571 {
 		label = "Volume Up";
 		linux,code = <KEY_VOLUMEUP>;
 		channel = <0>;
 		voltage = <571428>;
 	};
 
-	button at 761 {
+	button-761 {
 		label = "Volume Down";
 		linux,code = <KEY_VOLUMEDOWN>;
 		channel = <0>;
@@ -150,8 +138,6 @@
 };
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -171,22 +157,7 @@
 };
 
 &pio {
-	bl_enable_pin: bl_enable_pin at 0 {
-		pins = "PH7";
-		function = "gpio_out";
-	};
-
-	codec_pa_pin: codec_pa_pin at 0 {
-		pins = "PH15";
-		function = "gpio_out";
-	};
-
-	ts_reset_pin: ts_reset_pin at 0 {
-		pins = "PB13";
-		function = "gpio_out";
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+	usb0_id_detect_pin: usb0-id-detect-pin {
 		pins = "PH4";
 		function = "gpio_in";
 		bias-pull-up;
@@ -195,7 +166,7 @@
 
 &pwm {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pwm0_pins_a>;
+	pinctrl-0 = <&pwm0_pin>;
 	status = "okay";
 };
 
@@ -238,7 +209,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts +3 -20
index ff5c108658..c27e56091f 100644
@@ -62,8 +62,6 @@
 
 	mmc3_pwrseq: mmc3_pwrseq {
 		compatible = "mmc-pwrseq-simple";
-		pinctrl-names = "default";
-		pinctrl-0 = <&vmmc3_pin_ap6xxx_wl_regon>;
 		reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
 	};
 };
@@ -82,7 +80,7 @@
 
 &gmac {
 	pinctrl-names = "default";
-	pinctrl-0 = <&gmac_pins_rgmii_a>;
+	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy = <&phy1>;
 	phy-mode = "rgmii";
 	status = "okay";
@@ -93,8 +91,6 @@
 };
 
 &i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins_a>;
 	status = "okay";
 
 	axp209: pmic at 34 {
@@ -105,22 +101,16 @@
 };
 
 &i2c1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c1_pins_a>;
 	status = "okay";
 };
 
 &i2c2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c2_pins_a>;
 	status = "okay";
 };
 
 #include "axp209.dtsi"
 
 &mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
@@ -128,8 +118,6 @@
 };
 
 &mmc3 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc3_pins_a>;
 	vmmc-supply = <&reg_vcc3v3>;
 	mmc-pwrseq = <&mmc3_pwrseq>;
 	bus-width = <4>;
@@ -158,12 +146,7 @@
 };
 
 &pio {
-	vmmc3_pin_ap6xxx_wl_regon: vmmc3_pin at 0 {
-		pins = "PH9";
-		function = "gpio_out";
-	};
-
-	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+	usb0_id_detect_pin: usb0-id-detect-pin {
 		pins = "PH4";
 		function = "gpio_in";
 		bias-pull-up;
@@ -209,7 +192,7 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
 
arch/arm/dts/sun7i-a20-yones-toptech-bd1078.dts +1 -1
index f1fb97d3fb..11142ae6e7 100644
@@ -23,6 +23,6 @@
 
 &uart0 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_pins_a>;
+	pinctrl-0 = <&uart0_pb_pins>;
 	status = "okay";
 };
arch/arm/dts/sun7i-a20.dtsi +142 -67

385 lines not on this page · raw message

arch/arm/dts/sunxi-itead-core-common.dtsi +1 -5
index 2565d5137a..0d002f83a2 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.18.0.321.gffc6fa0e3

Part of the diff is not shown here. View the raw message.

author
#3 lore raw

PATCH 3/7 board: sunxi: Add R40 sata compatible

In reply to Jagan Teki

Add sata compatible for R40.

Cc Pablo Sebastián Greco <[email protected]>
---
 board/sunxi/ahci.c | 1 +
 1 file changed, 1 insertion(+)
board/sunxi/ahci.c +1 -0
index a79b80ca1e..9b03013667 100644
@@ -121,6 +121,7 @@ static int sunxi_sata_bind(struct udevice *dev)
 
 static const struct udevice_id sunxi_ahci_ids[] = {
 	{ .compatible = "allwinner,sun4i-a10-ahci" },
+	{ .compatible = "allwinner,sun8i-r40-ahci" },
 	{ }
 };
 
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#4 lore raw

PATCH 4/7 ARM: dts: a20-m5: Enable AHCI

In reply to Jagan Teki

Enable ahci node for sun7i-a20-m5.dts, this would require since we have DM_SCSI enabled on the respective SoC.

No need to send patch to Linux for this change, since this dts is U-Boot specific.

---
 arch/arm/dts/sun7i-a20-m5.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/sun7i-a20-m5.dts +4 -0
index 65930cc6ee..6de52c7c31 100644
@@ -21,6 +21,10 @@
 	};
 };
 
+&ahci {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#5 lore raw

PATCH 5/7 ARM: dts: a20-wits-pro-a20-dkt: Enable AHCI

In reply to Jagan Teki

Enable ahci node for a20-wits-pro-a20-dkt, this would require since we have DM_SCSI enabled on the respective SoC.

Cc Hans de Goede <[email protected]>

---
Note: This change would need to send Linux first.

 arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts +4 -0
index c27e56091f..352fc4040e 100644
@@ -133,6 +133,10 @@
 	};
 };
 
+&ahci {
+	status = "okay";
+};
+
 &ohci0 {
 	status = "okay";
 };
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#6 lore raw

PATCH 5/7 ARM: dts: a20-wits-pro-a20-dkt: Enable AHCI

Hi Hans,

Quoted 8 lines · Jagan Teki

Enable ahci node for a20-wits-pro-a20-dkt, this would require since we have DM_SCSI enabled on the respective SoC.

Cc Hans de Goede <[email protected]>

---
Note: This change would need to send Linux first.

Would you able to do this change for Linux, since I don't have any hardware to do the same?

author
#7 lore raw

PATCH 6/7 arm: sunxi: Enable DM_MMC and DM_SCSI

In reply to Jagan Teki

- Enable DM_MMC if MMC defined
- Enable DM_SCSI if SCSI defined

globally through Allwinner platform, the effected SoC families and boards will make use of MMC and SCSI subsystems in driver-model.

Tested DM_MMC in one board from A64, H6, H5, H3, R40, A83T, A20, A10 SoCs.

Cc Pablo Sebastián Greco <[email protected]>
---
 arch/arm/Kconfig            |  2 ++
 arch/arm/mach-sunxi/Kconfig | 13 -------------
 2 files changed, 2 insertions(+), 13 deletions(-)
arch/arm/Kconfig +2 -0
index 4a23e327df..7deae931b1 100644
@@ -857,6 +857,8 @@ config ARCH_SUNXI
 	select DM_ETH
 	select DM_GPIO
 	select DM_KEYBOARD
+	select DM_MMC if MMC
+	select DM_SCSI if SCSI
 	select DM_SERIAL
 	select DM_USB if DISTRO_DEFAULTS
 	select OF_BOARD_SETUP
arch/arm/mach-sunxi/Kconfig +0 -13
index 8110f23ff6..1669e62a6d 100644
@@ -154,8 +154,6 @@ config MACH_SUN4I
 	bool "sun4i (Allwinner A10)"
 	select CPU_V7A
 	select ARM_CORTEX_CPU_IS_UP
-	select DM_MMC if MMC
-	select DM_SCSI if SCSI
 	select PHY_SUN4I_USB
 	select DRAM_SUN4I
 	select SUNXI_GEN_SUN4I
@@ -165,7 +163,6 @@ config MACH_SUN5I
 	bool "sun5i (Allwinner A13)"
 	select CPU_V7A
 	select ARM_CORTEX_CPU_IS_UP
-	select DM_MMC if MMC
 	select DRAM_SUN4I
 	select PHY_SUN4I_USB
 	select SUNXI_GEN_SUN4I
@@ -178,7 +175,6 @@ config MACH_SUN6I
 	select CPU_V7_HAS_NONSEC
 	select CPU_V7_HAS_VIRT
 	select ARCH_SUPPORT_PSCI
-	select DM_MMC if MMC
 	select DRAM_SUN6I
 	select PHY_SUN4I_USB
 	select SUN6I_P2WI
@@ -205,7 +201,6 @@ config MACH_SUN8I_A23
 	select CPU_V7_HAS_NONSEC
 	select CPU_V7_HAS_VIRT
 	select ARCH_SUPPORT_PSCI
-	select DM_MMC if MMC
 	select DRAM_SUN8I_A23
 	select PHY_SUN4I_USB
 	select SUNXI_GEN_SUN6I
@@ -219,7 +214,6 @@ config MACH_SUN8I_A33
 	select CPU_V7_HAS_NONSEC
 	select CPU_V7_HAS_VIRT
 	select ARCH_SUPPORT_PSCI
-	select DM_MMC if MMC
 	select DRAM_SUN8I_A33
 	select PHY_SUN4I_USB
 	select SUNXI_GEN_SUN6I
@@ -230,7 +224,6 @@ config MACH_SUN8I_A33
 config MACH_SUN8I_A83T
 	bool "sun8i (Allwinner A83T)"
 	select CPU_V7A
-	select DM_MMC if MMC
 	select DRAM_SUN8I_A83T
 	select PHY_SUN4I_USB
 	select SUNXI_GEN_SUN6I
@@ -246,7 +239,6 @@ config MACH_SUN8I_H3
 	select ARCH_SUPPORT_PSCI
 	select MACH_SUNXI_H3_H5
 	select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
-	select DM_MMC if MMC
 
 config MACH_SUN8I_R40
 	bool "sun8i (Allwinner R40)"
@@ -265,7 +257,6 @@ config MACH_SUN8I_V3S
 	select CPU_V7_HAS_NONSEC
 	select CPU_V7_HAS_VIRT
 	select ARCH_SUPPORT_PSCI
-	select DM_MMC if MMC
 	select SUNXI_GEN_SUN6I
 	select SUNXI_DRAM_DW
 	select SUNXI_DRAM_DW_16BIT
@@ -280,13 +271,11 @@ config MACH_SUN9I
 	select SUNXI_GEN_SUN6I
 	select SUN8I_RSB
 	select SUPPORT_SPL
-	select DM_MMC if MMC
 
 config MACH_SUN50I
 	bool "sun50i (Allwinner A64)"
 	select ARM64
 	select DM_I2C
-	select DM_MMC if MMC
 	select PHY_SUN4I_USB
 	select SUN6I_PRCM
 	select SUNXI_DE2
@@ -303,7 +292,6 @@ config MACH_SUN50I_H5
 	bool "sun50i (Allwinner H5)"
 	select ARM64
 	select MACH_SUNXI_H3_H5
-	select DM_MMC if MMC
 	select FIT
 	select SPL_LOAD_FIT
 
@@ -311,7 +299,6 @@ config MACH_SUN50I_H6
 	bool "sun50i (Allwinner H6)"
 	select ARM64
 	select SUPPORT_SPL
-	select DM_MMC if MMC
 	select FIT
 	select SPL_LOAD_FIT
 	select DRAM_SUN50I_H6
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#8 lore raw

PATCH 7/7 sunxi: update SATA driver to always use DM_SCSI

In reply to Jagan Teki

From: Andre Przywara <[email protected]>

It seems like the Allwinner SATA driver is already quite capable of using the driver model, so we can force this on all boards and can remove support for a non-DM_SCSI build.
This removes the warning about boards with SATA ports not being DM_SCSI compliant.

It also takes the opportunity to move the driver out of the board/sunxi directory to join its siblings in drivers/ata, and to make it a proper Kconfig citizen.

The board defconfigs stay untouched.

[jagan: select DM_SCSI separately]
---
 board/sunxi/Makefile                           |  3 ---
 drivers/ata/Kconfig                            |  8 ++++++++
 drivers/ata/Makefile                           |  1 +
 board/sunxi/ahci.c => drivers/ata/ahci_sunxi.c | 10 ----------
 include/configs/sunxi-common.h                 |  6 ------
 scripts/config_whitelist.txt                   |  1 -
 6 files changed, 9 insertions(+), 20 deletions(-)
 rename board/sunxi/ahci.c => drivers/ata/ahci_sunxi.c (94%)
board/sunxi/Makefile +0 -3
index 4d6258d932..c4e13f8c38 100644
@@ -8,9 +8,6 @@
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 obj-y	+= board.o
 obj-$(CONFIG_SUN7I_GMAC)	+= gmac.o
-ifndef CONFIG_SPL_BUILD
-obj-$(CONFIG_SUNXI_AHCI)	+= ahci.o
-endif
 obj-$(CONFIG_MACH_SUN4I)	+= dram_sun4i_auto.o
 obj-$(CONFIG_MACH_SUN5I)	+= dram_sun5i_auto.o
 obj-$(CONFIG_MACH_SUN7I)	+= dram_sun5i_auto.o
drivers/ata/Kconfig +8 -0
index 49a056e941..b7addaf785 100644
@@ -99,6 +99,14 @@ config SATA_SIL3114
 	help
 	  Enable this driver to support the SIL3114 SATA controllers.
 
+config SUNXI_AHCI
+	bool "Enable Allwinner SATA driver support"
+	depends on AHCI
+	default y if ARCH_SUNXI
+	help
+	  Enable this driver to support the SATA controllers found in the
+	  Allwinner A10, A20 and R40 SoCs.
+
 config AHCI_MVEBU
 	bool "Marvell EBU AHCI SATA support"
 	depends on ARCH_MVEBU
drivers/ata/Makefile +1 -0
index 10bed53bb3..a69edb10f7 100644
@@ -18,3 +18,4 @@ obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
 obj-$(CONFIG_SATA_SIL) += sata_sil.o
 obj-$(CONFIG_SANDBOX) += sata_sandbox.o
 obj-$(CONFIG_AHCI_MVEBU) += ahci_mvebu.o
+obj-$(CONFIG_SUNXI_AHCI) += ahci_sunxi.o
drivers/ata/ahci_sunxi.c renamed from board/sunxi/ahci.c +0 -10
similarity index 94%
rename from board/sunxi/ahci.c
rename to drivers/ata/ahci_sunxi.c
index 9b03013667..77b932aa03 100644
@@ -70,15 +70,6 @@ static int sunxi_ahci_phy_init(u8 *reg_base)
 	return 0;
 }
 
-#ifndef CONFIG_DM_SCSI
-void scsi_init(void)
-{
-	if (sunxi_ahci_phy_init((u8 *)SUNXI_SATA_BASE) < 0)
-		return;
-
-	ahci_init((void __iomem *)SUNXI_SATA_BASE);
-}
-#else
 static int sunxi_sata_probe(struct udevice *dev)
 {
 	ulong base;
@@ -132,4 +123,3 @@ U_BOOT_DRIVER(ahci_sunxi_drv) = {
 	.bind		= sunxi_sata_bind,
 	.probe		= sunxi_sata_probe,
 };
-#endif
include/configs/sunxi-common.h +0 -6
index b01d1c3c84..bc30994029 100644
@@ -104,13 +104,7 @@
 #define PHYS_SDRAM_0_SIZE		0x80000000 /* 2 GiB */
 
 #ifdef CONFIG_AHCI
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SUNXI_AHCI
 #define CONFIG_SYS_64BIT_LBA
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-#define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-					 CONFIG_SYS_SCSI_MAX_LUN)
 #endif
 
 #define CONFIG_SETUP_MEMORY_TAGS
scripts/config_whitelist.txt +0 -1
index 8c7c1592a5..c58b964065 100644
@@ -1939,7 +1939,6 @@ CONFIG_STV0991
 CONFIG_STV0991_HZ
 CONFIG_STV0991_HZ_CLOCK
 CONFIG_ST_SMI
-CONFIG_SUNXI_AHCI
 CONFIG_SUNXI_GPIO
 CONFIG_SUNXI_MAX_FB_SIZE
 CONFIG_SUPERH_ON_CHIP_R8A66597
Signature · 1 line
2.18.0.321.gffc6fa0e3
#9 lore raw

cover sunxi: a20/r40: Migrate DM_MMC and DM_SCSI

In reply to Jagan Teki
Quoted 62 lines · Jagan Teki

This would Migrate DM_MMC, DM_SCSI for A20 and R40 platforms.

Note:
- a20-wits-pro-a20-dkt change would need to send Linux first
- BPI-M2-Berry would break, but will import Linux dts once approved.

Andre Przywara (1):
sunxi: update SATA driver to always use DM_SCSI

Jagan Teki (6):
arm: allwinner: r40: Sync R40 dts(i) files from Linux 5.1-rc2
arm: allwinner: dts: a20: Sync A20 dts(i) files from Linux 5.1-rc2
board: sunxi: Add R40 sata compatible
ARM: dts: a20-m5: Enable AHCI
ARM: dts: a20-wits-pro-a20-dkt: Enable AHCI
arm: sunxi: Enable DM_MMC and DM_SCSI

  arch/arm/Kconfig                              |   2 +
  arch/arm/dts/sun7i-a20-ainol-aw1.dts          |   2 +-
  arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts   |  46 +--
  arch/arm/dts/sun7i-a20-bananapi.dts           |  49 +--
  arch/arm/dts/sun7i-a20-bananapro.dts          |  65 +---
  arch/arm/dts/sun7i-a20-cubieboard2.dts        |  21 +-
  arch/arm/dts/sun7i-a20-cubietruck.dts         |  83 ++--
  arch/arm/dts/sun7i-a20-hummingbird.dts        |  60 +--
  arch/arm/dts/sun7i-a20-i12-tvbox.dts          |  47 +--
  arch/arm/dts/sun7i-a20-icnova-swac.dts        |  10 +-
  arch/arm/dts/sun7i-a20-itead-ibox.dts         |  10 +-
  arch/arm/dts/sun7i-a20-lamobo-r1.dts          |  48 +--
  arch/arm/dts/sun7i-a20-m3.dts                 |  21 +-
  arch/arm/dts/sun7i-a20-m5.dts                 |   8 +-
  arch/arm/dts/sun7i-a20-mk808c.dts             |  26 +-
  .../arm/dts/sun7i-a20-olimex-som-evb-emmc.dts |  35 ++
  arch/arm/dts/sun7i-a20-olimex-som-evb.dts     |  68 +---
  .../dts/sun7i-a20-olimex-som204-evb-emmc.dts  |   2 -
  arch/arm/dts/sun7i-a20-olimex-som204-evb.dts  |  36 +-
  arch/arm/dts/sun7i-a20-olinuxino-lime.dts     |  22 +-
  .../dts/sun7i-a20-olinuxino-lime2-emmc.dts    |  11 -
  arch/arm/dts/sun7i-a20-olinuxino-lime2.dts    |  34 +-
  .../dts/sun7i-a20-olinuxino-micro-emmc.dts    |   2 -
  arch/arm/dts/sun7i-a20-olinuxino-micro.dts    |  54 +--
  arch/arm/dts/sun7i-a20-orangepi-mini.dts      |  52 +--
  arch/arm/dts/sun7i-a20-orangepi.dts           |  44 +--
  arch/arm/dts/sun7i-a20-pcduino3-nano.dts      |  31 +-
  arch/arm/dts/sun7i-a20-pcduino3.dts           |  39 +-
  arch/arm/dts/sun7i-a20-primo73.dts            |   4 +-
  arch/arm/dts/sun7i-a20-wexler-tab7200.dts     |  39 +-
  arch/arm/dts/sun7i-a20-wits-pro-a20-dkt.dts   |  27 +-
  .../dts/sun7i-a20-yones-toptech-bd1078.dts    |   2 +-
  arch/arm/dts/sun7i-a20.dtsi                   | 209 ++++++----
  arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts  |  91 ++++-
  arch/arm/dts/sun8i-r40.dtsi                   | 364 +++++++++++++++++-
  arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts  |   2 +-
  arch/arm/dts/sunxi-itead-core-common.dtsi     |   6 +-
  arch/arm/mach-sunxi/Kconfig                   |  13 -
  board/sunxi/Makefile                          |   3 -
  drivers/ata/Kconfig                           |   8 +
  drivers/ata/Makefile                          |   1 +
  .../sunxi/ahci.c => drivers/ata/ahci_sunxi.c  |  11 +-
  include/configs/sunxi-common.h                |   6 -
  scripts/config_whitelist.txt                  |   1 -
  44 files changed, 838 insertions(+), 877 deletions(-)
Quoted 2 lines

create mode 100644 arch/arm/dts/sun7i-a20-olimex-som-evb-emmc.dts rename board/sunxi/ahci.c => drivers/ata/ahci_sunxi.c (94%)

On the r40 bits