Skip to contentSkip to conversation

ARM: dts: sunxi: Various sunxi devicetree patches

PATCH New Hans de Goede 2 participants 15 messages Aug 14, 2015 – Aug 20, 2015

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

cover ARM: dts: sunxi: Various sunxi devicetree patches

Hi Maxime,

Here is a bunch of sunxi dts patches which are ready for merging, some are the result of the course I'm teaching during the weekends, some are my own :)

I'm also sitting on another batch, which can go in as soon as the axp209 usb-power-supply driver gets merged, so that we can support otg on boards which use the pmic for vbus-det.

Regards,

Hans

#1 lore raw

PATCH 1/6 ARM: dts: sun5i: Add simplefb node for tvencoder output

Add a simplefb node for tvencoder / composite-video output, such as found on the Auxtek-T003 and the CHIP.

---
 arch/arm/boot/dts/sun5i-a10s.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/sun5i-a10s.dtsi +9 -0
index a6d55f0..3e47b3d 100644
@@ -77,6 +77,15 @@
 			clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
 			status = "disabled";
 		};
+
+		framebuffer at 2 {
+			compatible = "allwinner,simple-framebuffer",
+				     "simple-framebuffer";
+			allwinner,pipeline = "de_be0-lcd0-tve0";
+			clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
+				 <&ahb_gates 44>;
+			status = "disabled";
+		};
 	};
 
 	clocks {
Signature · 1 line
2.4.3
#2 lore raw

PATCH 1/6 ARM: dts: sun5i: Add simplefb node for tvencoder output

Hi,

Quoted 4 lines · Hans de Goede

Add a simplefb node for tvencoder / composite-video output, such as found on the Auxtek-T003 and the CHIP.

Queued, thanks!

I guess the CHIP will have to have the same change for the A13 DTSI.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150820/e5078225/attachment.sig>
#3 lore raw

PATCH 2/6 ARM: dts: sun7i: Enable i2c bus 1 and 2 on the Wits A20 Pro DKT

In reply to Hans de Goede

Enable i2c bus 1 and 2 on the Wits A20 Pro DKT, these are used for the touchscreen resp. the accelerometer.

---
 arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts +12 -0
index da47608..85b500d 100644
@@ -92,6 +92,18 @@
 	};
 };
 
+&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 {
Signature · 1 line
2.4.3
#4 lore raw

PATCH 2/6 ARM: dts: sun7i: Enable i2c bus 1 and 2 on the Wits A20 Pro DKT

Hi Maxime,

Quoted 4 lines · Hans de Goede

Enable i2c bus 1 and 2 on the Wits A20 Pro DKT, these are used for the touchscreen resp. the accelerometer.

Erm, please skip this one it depends on another patch (which adds the sun7i-a20-wits-pro-a20-dkt.dts), which I've not submitted yet as it depends on the axp usb-power-supply driver.

So as said please skip this one, I've squashed it into the patch adding the dts file, which I will submit later.

Regards,

Hans

Quoted 28 lines
---
  arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts | 12 ++++++++++++
  1 file changed, 12 insertions(+)
arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts +12 -0
index da47608..85b500d 100644
@@ -92,6 +92,18 @@
  	};
  };
 
+&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 {
#5 lore raw

PATCH 3/6 ARM: dts: sun7i: Add regulator configuration to the pcduino3 dts file

In reply to Hans de Goede

From: Jelle van der Waa <[email protected]>

Add regulator configuration to the pcduino3 dts file.

---
 arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 39 ++++++++++++++++++++++++++++----
 1 file changed, 35 insertions(+), 4 deletions(-)
arch/arm/boot/dts/sun7i-a20-pcduino3.dts +35 -4
index afc9ece..99e238b 100644
@@ -111,6 +111,10 @@
 	allwinner,pins = "PH2";
 };
 
+&cpu0 {
+	cpu-supply = <&reg_dcdc2>;
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -137,16 +141,14 @@
 	status = "okay";
 
 	axp209: pmic at 34 {
-		compatible = "x-powers,axp209";
 		reg = <0x34>;
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
-		interrupt-controller;
-		#interrupt-cells = <1>;
 	};
 };
 
+#include "axp209.dtsi"
+
 &ir0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ir0_rx_pins_a>;
@@ -192,6 +194,31 @@
 	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 = <1000000>;
+	regulator-max-microvolt = <1400000>;
+	regulator-name = "vdd-int-pll";
+};
+
+&reg_ldo1 {
+	regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
 &reg_usb1_vbus {
 	status = "okay";
 };
@@ -206,6 +233,10 @@
 	status = "okay";
 };
 
+&usb_power_supply {
+	status = "okay";
+};
+
 &usbphy {
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
Signature · 1 line
2.4.3
#6 lore raw

PATCH 3/6 ARM: dts: sun7i: Add regulator configuration to the pcduino3 dts file

Quoted 6 lines · Hans de Goede

From: Jelle van der Waa <[email protected]>

Add regulator configuration to the pcduino3 dts file.

Queued, thanks!

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150820/53c09db3/attachment.sig>
#7 lore raw

PATCH 4/6 ARM: dts: sun7i: Enable USB DRC on pcDuino 3

In reply to Hans de Goede

From: Jelle van der Waa <[email protected]>

Enable the otg/drc usb controller on the pcDuino 3.

Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det.

---
 arch/arm/boot/dts/sun7i-a20-pcduino3.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/sun7i-a20-pcduino3.dts +19 -0
index 99e238b..08cf715 100644
@@ -173,6 +173,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	led_pins_pcduino3: led_pins at 0 {
 		allwinner,pins = "PH15", "PH16";
@@ -187,6 +191,13 @@
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
 };
 
 &reg_ahci_5v {
@@ -237,7 +248,15 @@
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
Signature · 1 line
2.4.3
#8 lore raw

PATCH 4/6 ARM: dts: sun7i: Enable USB DRC on pcDuino 3

Quoted 6 lines · Hans de Goede

From: Jelle van der Waa <[email protected]>

Enable the otg/drc usb controller on the pcDuino 3.

Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det.

Can it do OTG then? If VBUS is tied to the 5v, there's no way for the board to shut it down when acting as peripheral, right?

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150820/b32cc8e0/attachment-0001.sig>
#9 lore raw

[linux-sunxi] Re: [PATCH 4/6] ARM: dts: sun7i: Enable USB DRC on pcDuino 3

Hi,

Quoted 9 lines · Maxime Ripard
Quoted 6 lines · Hans de Goede

From: Jelle van der Waa <[email protected]>

Enable the otg/drc usb controller on the pcDuino 3.

Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det.

Can it do OTG then?

Yes.

Quoted 2 lines

If VBUS is tied to the 5v, there's no way for the board to shut it down when acting as peripheral, right?

Correct, the idea is to power it over otg when using it as a peripheral, or at least power it from a usb port of the machine for which it is a peripheral. Note that the original cubieboard (both A10 and A20 versions) have the same issue.

Regards,

Hans

#10 lore raw

[linux-sunxi] Re: [PATCH 4/6] ARM: dts: sun7i: Enable USB DRC on pcDuino 3

Quoted 15 lines · Hans de Goede

Hi,

Quoted 9 lines · Maxime Ripard
Quoted 6 lines · Hans de Goede

From: Jelle van der Waa <[email protected]>

Enable the otg/drc usb controller on the pcDuino 3.

Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det.

Can it do OTG then?

Yes.

Quoted 8 lines
Quoted 2 lines

If VBUS is tied to the 5v, there's no way for the board to shut it down when acting as peripheral, right?

Correct, the idea is to power it over otg when using it as a peripheral, or at least power it from a usb port of the machine for which it is a peripheral. Note that the original cubieboard (both A10 and A20 versions) have the same issue.

Hmmm, I see. I'll queue your patch then.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150820/ecf37948/attachment.sig>
#11 lore raw

PATCH 5/6 ARM: dts: sun7i: Enable USB DRC on cubieboard2

In reply to Hans de Goede

From: Ralph Benadski <[email protected]>

Enable the otg/drc usb controller on the cubieboard2.

Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det.

---
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts +19 -0
index f35957d..7cbb22b 100644
@@ -207,6 +207,10 @@
 	status = "okay";
 };
 
+&otg_sram {
+	status = "okay";
+};
+
 &pio {
 	led_pins_cubieboard2: led_pins at 0 {
 		allwinner,pins = "PH20", "PH21";
@@ -214,12 +218,24 @@
 		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
+		allwinner,pins = "PH4";
+		allwinner,function = "gpio_in";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+	};
 };
 
 &reg_ahci_5v {
 	status = "okay";
 };
 
+&usb_otg {
+	dr_mode = "otg";
+	status = "okay";
+};
+
 #include "axp209.dtsi"
 
 &reg_dcdc2 {
@@ -262,6 +278,9 @@
 };
 
 &usbphy {
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_id_detect_pin>;
+	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
 	usb1_vbus-supply = <&reg_usb1_vbus>;
 	usb2_vbus-supply = <&reg_usb2_vbus>;
 	status = "okay";
Signature · 1 line
2.4.3
#12 lore raw

PATCH 5/6 ARM: dts: sun7i: Enable USB DRC on cubieboard2

Quoted 9 lines · Hans de Goede

From: Ralph Benadski <[email protected]>

Enable the otg/drc usb controller on the cubieboard2.

Note this board has the otg-vbus connected directly to the 5v-dcc of the board, so there is no vbus0 regulator, nor vbus0-det.

Queued, thanks!

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150820/342e3c86/attachment.sig>
#13 lore raw

PATCH 6/6 ARM: dts: sun8i: Add support for qt90h-v4 tablets

In reply to Hans de Goede

The gt90h is a pcb found in generic 9" tablets with an A23 soc, 1G RAM and 8G nand, rtl8723as usb wifi, 1 micro usb port and 1 micro sd slot.

This commit adds a dts for v4 of the gt90h pcb.

---
 arch/arm/boot/dts/Makefile               |   1 +
 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts | 145 +++++++++++++++++++++++++++++++
 2 files changed, 146 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts
arch/arm/boot/dts/Makefile +1 -0
index d639774..6aa657f 100644
@@ -600,6 +600,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
 	sun7i-a20-wits-pro-a20-dkt.dtb
 dtb-$(CONFIG_MACH_SUN8I) += \
 	sun8i-a23-evb.dtb \
+	sun8i-a23-gt90h-v4.dtb \
 	sun8i-a23-ippo-q8h-v5.dtb \
 	sun8i-a23-ippo-q8h-v1.2.dtb \
 	sun8i-a33-et-q8-v1.6.dtb \
arch/arm/boot/dts/sun8i-a23-gt90h-v4.dts new file +145 -0

145 lines not on this page · raw message

Signature · 1 line
2.4.3
#14 lore raw

PATCH 6/6 ARM: dts: sun8i: Add support for qt90h-v4 tablets

Quoted 6 lines · Hans de Goede

The gt90h is a pcb found in generic 9" tablets with an A23 soc, 1G RAM and 8G nand, rtl8723as usb wifi, 1 micro usb port and 1 micro sd slot.

This commit adds a dts for v4 of the gt90h pcb.

Applied, thanks!

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150820/2ff0c2cc/attachment.sig>