Skip to contentSkip to conversation

ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

PATCH New Hans de Goede 2 participants 17 messages Jul 9, 2016 – Sep 3, 2016

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

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

There is a new Orange Pi PC Plus available now, rather then adding yet another dts file for this variant, extend the existing Orange Pi PC to support the sdio wifi and emmc found on this variant.

Downside of this approach is the following messages in dmesg when run on the non Plus Orange Pi PC:

sunxi-mmc 1c10000.mmc: fatal err update clk timeout sunxi-mmc 1c11000.mmc: smc 2 err, cmd 8, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 1, RTO !!

Note these are completely harmless and there is no adverse effect to the functioning of the non Plus Orange Pi PC.

---
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 40 +++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +39 -1
index b8340f7..f9bf260 100644
@@ -49,11 +49,13 @@
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-	model = "Xunlong Orange Pi PC";
+	model = "Xunlong Orange Pi PC / PC Plus";
 	compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
 
 	aliases {
 		serial0 = &uart0;
+		/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+		ethernet1 = &rtl8189ftv;
 	};
 
 	chosen {
@@ -118,6 +120,42 @@
 	status = "okay";
 };
 
+/* Note only present on orangepi pc *plus* */
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	/*
+	 * Explicitly define the sdio device, so that we can add an ethernet
+	 * alias for it (which e.g. makes u-boot set a mac-address).
+	 */
+	rtl8189ftv: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};
+
+/* Note only present on orangepi pc *plus* */
+&mmc2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc2_8bit_pins>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <8>;
+	non-removable;
+	cap-mmc-hw-reset;
+	status = "okay";
+};
+
+&mmc2_8bit_pins {
+	/* Increase drive strength for DDR modes */
+	allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+	/* eMMC is missing pull-ups */
+	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
 &ohci1 {
 	status = "okay";
 };
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/4 ARM: dts: sun8i: Extend Orange Pi Plus dt to also handle the Plus 2E

There is a new Orange Pi Plus 2E available now, rather then adding yet another dts file for this variant, extend the existing Plus / Plus2 dt to also support this variant.

The 2E goes from 4 to 3 USB ports and drops the sata connector, so it no longer has a USB hub or an USB <-> sata bridge on the board.

This commit enables all 3 ehci and ohci controllers to support the 3 USB connectors which are now directly connected to the SoC.

Downside of this approach is 4 unused USB busses now showing up on the original Plus / Plus 2.

---
 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts +17 -1
index b0cb417..28f74f6 100644
@@ -44,7 +44,7 @@
 #include "sun8i-h3-orangepi-2.dts"
 
 / {
-	model = "Xunlong Orange Pi Plus";
+	model = "Xunlong Orange Pi Plus / Plus 2 / Plus 2E";
 	compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
 
 	reg_usb3_vbus: usb3-vbus {
@@ -60,6 +60,10 @@
 	};
 };
 
+&ehci2 {
+	status = "okay";
+};
+
 &ehci3 {
 	status = "okay";
 };
@@ -81,6 +85,18 @@
 	allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
 
+&ohci1 {
+	status = "okay";
+};
+
+&ohci2 {
+	status = "okay";
+};
+
+&ohci3 {
+	status = "okay";
+};
+
 &pio {
 	usb3_vbus_pin_a: usb3_vbus_pin at 0 {
 		allwinner,pins = "PG11";
Signature · 1 line
2.7.4
#2 lore raw

PATCH 3/4 ARM: dts: sun8i: Add ethernet1 alias to Orange Pi 2 dts

In reply to Hans de Goede

This will allow u-boot to fill in a mac-address for Orange Pi 2 variants which use an sdio wifi without an eeprom for the mac.

---
 arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts +10 -0
index f93f5d1..f89fe00 100644
@@ -54,6 +54,8 @@
 
 	aliases {
 		serial0 = &uart0;
+		/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+		ethernet1 = &rtl8189;
 	};
 
 	chosen {
@@ -131,6 +133,14 @@
 	bus-width = <4>;
 	non-removable;
 	status = "okay";
+
+	/*
+	 * Explicitly define the sdio device, so that we can add an ethernet
+	 * alias for it (which e.g. makes u-boot set a mac-address).
+	 */
+	rtl8189: sdio_wifi at 1 {
+		reg = <1>;
+	};
 };
 
 &pio {
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/4 ARM: dts: sun8i: Add ethernet1 alias to Orange Pi 2 dts

Quoted 4 lines · Hans de Goede

This will allow u-boot to fill in a mac-address for Orange Pi 2 variants which use an sdio wifi without an eeprom for the mac.

Applied, thanks!
Maxime

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

PATCH 4/4 ARM: dts: sun8i: Add dts file for the Orange Pi Lite SBC

In reply to Hans de Goede

The Orange Pi Lite SBC is a small H3 based SBC, with 512MB RAM, micro-sd slot, HDMI out, 2 USB-A connectors, 1 micro-USB connector, sdio attached rtl8189ftv wifi and an ir receiver.

---
 arch/arm/boot/dts/Makefile                   |   1 +
 arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts | 178 +++++++++++++++++++++++++++
 2 files changed, 179 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts
arch/arm/boot/dts/Makefile +1 -0
index 92eb004..0d60794 100644
@@ -767,6 +767,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
 	sun8i-a83t-allwinner-h8homlet-v2.dtb \
 	sun8i-a83t-cubietruck-plus.dtb \
 	sun8i-h3-orangepi-2.dtb \
+	sun8i-h3-orangepi-lite.dtb \
 	sun8i-h3-orangepi-one.dtb \
 	sun8i-h3-orangepi-pc.dtb \
 	sun8i-h3-orangepi-plus.dtb \
arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts new file +178 -0

178 lines not on this page · raw message

Signature · 1 line
2.7.4
#5 lore raw

PATCH 4/4 ARM: dts: sun8i: Add dts file for the Orange Pi Lite SBC

Hi,

arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts line 57

Quoted 3 lines · Hans de Goede
arch/arm/boot/dts/sun8i-h3-orangepi-lite.dts new file +3 -0
+	aliases {
+		/* The H3 emac is not used so the wifi is ethernet0 */
+		ethernet1 = &rtl8189ftv;

There's a mismatch between your comment and what you did here.

The rest is fine though.

Thanks!
Maxime

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

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

In reply to Hans de Goede
Quoted 53 lines · Hans de Goede

There is a new Orange Pi PC Plus available now, rather then adding yet another dts file for this variant, extend the existing Orange Pi PC to support the sdio wifi and emmc found on this variant.

Downside of this approach is the following messages in dmesg when run on the non Plus Orange Pi PC:

sunxi-mmc 1c10000.mmc: fatal err update clk timeout sunxi-mmc 1c11000.mmc: smc 2 err, cmd 8, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 1, RTO !!

Note these are completely harmless and there is no adverse effect to the functioning of the non Plus Orange Pi PC.

---
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 40 +++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -1
index b8340f7..f9bf260 100644
@@ -49,11 +49,13 @@
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-	model = "Xunlong Orange Pi PC";
+	model = "Xunlong Orange Pi PC / PC Plus";
 	compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
 
 	aliases {
 		serial0 = &uart0;
+		/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+		ethernet1 = &rtl8189ftv;
 	};
 
 	chosen {
@@ -118,6 +120,42 @@
 	status = "okay";
 };
 
+/* Note only present on orangepi pc *plus* */
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	non-removable;

arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts line 139

Quoted 10 lines
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -0
+	status = "okay";
+
+	/*
+	 * Explicitly define the sdio device, so that we can add an ethernet
+	 * alias for it (which e.g. makes u-boot set a mac-address).
+	 */
+	rtl8189ftv: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

Maxime

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

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi,

Quoted 68 lines · Maxime Ripard
Quoted 53 lines · Hans de Goede

There is a new Orange Pi PC Plus available now, rather then adding yet another dts file for this variant, extend the existing Orange Pi PC to support the sdio wifi and emmc found on this variant.

Downside of this approach is the following messages in dmesg when run on the non Plus Orange Pi PC:

sunxi-mmc 1c10000.mmc: fatal err update clk timeout sunxi-mmc 1c11000.mmc: smc 2 err, cmd 8, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 1, RTO !!

Note these are completely harmless and there is no adverse effect to the functioning of the non Plus Orange Pi PC.

---
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 40 +++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -1
index b8340f7..f9bf260 100644
@@ -49,11 +49,13 @@
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-	model = "Xunlong Orange Pi PC";
+	model = "Xunlong Orange Pi PC / PC Plus";
 	compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
 
 	aliases {
 		serial0 = &uart0;
+		/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+		ethernet1 = &rtl8189ftv;
 	};
 
 	chosen {
@@ -118,6 +120,42 @@
 	status = "okay";
 };
 
+/* Note only present on orangepi pc *plus* */
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	non-removable;

arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts line 139

Quoted 10 lines
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -0
+	status = "okay";
+
+	/*
+	 * Explicitly define the sdio device, so that we can add an ethernet
+	 * alias for it (which e.g. makes u-boot set a mac-address).
+	 */
+	rtl8189ftv: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

Quoted 2 lines

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Regards,

Hans

#8 lore raw

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi,

Quoted 71 lines · Hans de Goede

Hi,

Quoted 68 lines · Maxime Ripard
Quoted 53 lines · Hans de Goede

There is a new Orange Pi PC Plus available now, rather then adding yet another dts file for this variant, extend the existing Orange Pi PC to support the sdio wifi and emmc found on this variant.

Downside of this approach is the following messages in dmesg when run on the non Plus Orange Pi PC:

sunxi-mmc 1c10000.mmc: fatal err update clk timeout sunxi-mmc 1c11000.mmc: smc 2 err, cmd 8, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 1, RTO !!

Note these are completely harmless and there is no adverse effect to the functioning of the non Plus Orange Pi PC.

---
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 40 +++++++++++++++++++++++++++++-

1 file changed, 39 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -1
index b8340f7..f9bf260 100644
@@ -49,11 +49,13 @@
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-	model = "Xunlong Orange Pi PC";
+	model = "Xunlong Orange Pi PC / PC Plus";
 	compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
 
 	aliases {
 		serial0 = &uart0;
+		/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+		ethernet1 = &rtl8189ftv;
 	};
 
 	chosen {
@@ -118,6 +120,42 @@
 	status = "okay";
 };
 
+/* Note only present on orangepi pc *plus* */
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	non-removable;

arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts line 139

Quoted 10 lines
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -0
+	status = "okay";
+
+	/*
+	 * Explicitly define the sdio device, so that we can add an ethernet
+	 * alias for it (which e.g. makes u-boot set a mac-address).
+	 */
+	rtl8189ftv: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

Quoted 7 lines
Quoted 2 lines

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Still, registering devices that are not present on the board is not an option.

Maxime

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

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi,

Quoted 77 lines · Maxime Ripard

Hi,

Quoted 74 lines · Hans de Goede

Hi,

Quoted 70 lines · Maxime Ripard
Quoted 53 lines · Hans de Goede

There is a new Orange Pi PC Plus available now, rather then adding yet another dts file for this variant, extend the existing Orange Pi PC to support the sdio wifi and emmc found on this variant.

Downside of this approach is the following messages in dmesg when run on the non Plus Orange Pi PC:

sunxi-mmc 1c10000.mmc: fatal err update clk timeout sunxi-mmc 1c11000.mmc: smc 2 err, cmd 8, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 1, RTO !!

Note these are completely harmless and there is no adverse effect to the functioning of the non Plus Orange Pi PC.

---
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 40 +++++++++++++++++++++++++++++-

1 file changed, 39 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -1
index b8340f7..f9bf260 100644
@@ -49,11 +49,13 @@
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-	model = "Xunlong Orange Pi PC";
+	model = "Xunlong Orange Pi PC / PC Plus";
 	compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
 
 	aliases {
 		serial0 = &uart0;
+		/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+		ethernet1 = &rtl8189ftv;
 	};
 
 	chosen {
@@ -118,6 +120,42 @@
 	status = "okay";
 };
 
+/* Note only present on orangepi pc *plus* */
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	non-removable;

arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts line 139

Quoted 10 lines
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -0
+	status = "okay";
+
+	/*
+	 * Explicitly define the sdio device, so that we can add an ethernet
+	 * alias for it (which e.g. makes u-boot set a mac-address).
+	 */
+	rtl8189ftv: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

Quoted 7 lines
Quoted 4 lines

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Still, registering devices that are not present on the board is not an option.

Ok, I'll send a new patch which adds a separate dts file for the Orange Pi PC Plus.

Regards,

Hans

#10 lore raw

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

In reply to Maxime Ripard

Hi,

Quoted 77 lines · Maxime Ripard

Hi,

Quoted 74 lines · Hans de Goede

Hi,

Quoted 70 lines · Maxime Ripard
Quoted 53 lines · Hans de Goede

There is a new Orange Pi PC Plus available now, rather then adding yet another dts file for this variant, extend the existing Orange Pi PC to support the sdio wifi and emmc found on this variant.

Downside of this approach is the following messages in dmesg when run on the non Plus Orange Pi PC:

sunxi-mmc 1c10000.mmc: fatal err update clk timeout sunxi-mmc 1c11000.mmc: smc 2 err, cmd 8, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 55, RTO !! sunxi-mmc 1c11000.mmc: smc 2 err, cmd 1, RTO !!

Note these are completely harmless and there is no adverse effect to the functioning of the non Plus Orange Pi PC.

---
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 40 +++++++++++++++++++++++++++++-

1 file changed, 39 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -1
index b8340f7..f9bf260 100644
@@ -49,11 +49,13 @@
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
 / {
-	model = "Xunlong Orange Pi PC";
+	model = "Xunlong Orange Pi PC / PC Plus";
 	compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
 
 	aliases {
 		serial0 = &uart0;
+		/* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+		ethernet1 = &rtl8189ftv;
 	};
 
 	chosen {
@@ -118,6 +120,42 @@
 	status = "okay";
 };
 
+/* Note only present on orangepi pc *plus* */
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins_a>;
+	vmmc-supply = <&reg_vcc3v3>;
+	bus-width = <4>;
+	non-removable;

arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts line 139

Quoted 10 lines
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +10 -0
+	status = "okay";
+
+	/*
+	 * Explicitly define the sdio device, so that we can add an ethernet
+	 * alias for it (which e.g. makes u-boot set a mac-address).
+	 */
+	rtl8189ftv: sdio_wifi at 1 {
+		reg = <1>;
+	};
+};

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

Quoted 7 lines
Quoted 4 lines

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Still, registering devices that are not present on the board is not an option.

Ok, new version send.

What about the other 3 patches in this series ?

Regards,

Hans

#11 lore raw

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi Hans,

Quoted 11 lines · Hans de Goede
Quoted 11 lines
Quoted 10 lines
Quoted 5 lines

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Quoted 6 lines
Quoted 2 lines

Still, registering devices that are not present on the board is not an option.

Ok, new version send.

What about the other 3 patches in this series ?

I guess the same comment applies for patch 2.

I'll look at the two others.

Maxime

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

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi,

Quoted 14 lines · Maxime Ripard

Hi Hans,

Quoted 11 lines · Hans de Goede
Quoted 11 lines
Quoted 10 lines
Quoted 5 lines

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Still, registering devices that are not present on the board is not an option.

Ok, new version send.

What about the other 3 patches in this series ?

I guess the same comment applies for patch 2.

The difference is that there really is no harm at all from enabling the extra usb controllers used on the plus 2e on the plus and plus 2 as well, no errors, no nothing, they just sit their as usb controllers without an usb device plugged in. But if you insist I can do a separate dts + u-boot defconfig for the plus 2e as well (but I would rather not).

Regards,

Hans

#13 lore raw

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi,

Quoted 24 lines · Hans de Goede

Hi,

Quoted 21 lines · Maxime Ripard

Hi Hans,

Quoted 17 lines · Hans de Goede
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

Quoted 7 lines
Quoted 4 lines

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Still, registering devices that are not present on the board is not an option.

Ok, new version send.

What about the other 3 patches in this series ?

Quoted 8 lines
Quoted 1 line

I guess the same comment applies for patch 2.

The difference is that there really is no harm at all from enabling the extra usb controllers used on the plus 2e on the plus and plus 2 as well, no errors, no nothing, they just sit their as usb controllers without an usb device plugged in. But if you insist I can do a separate dts + u-boot defconfig for the plus 2e as well (but I would rather not).

Ping, what is the verdict on this, are you ok with the patch or do you want me to create a separate dts file for the Orange Pi Plus 2E, note that doing so is going to be highly confusing to users, there are 3 plus boards:

Orange Pi Plus
Orange Pi Plus 2 (same as the original plus but with 2G RAM, uses same u-boot defconfig / dts file)
Orange Pi Plus 2E (drops the USB-hub instead using all 3 host controllers)

So if you insist on a separate dts for the 2E, we get a case where the user with the "2" needs to guess which config to use, sure we can document this, but who is going to read the docs ?

Regards,

Hans

#14 lore raw

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi,

Quoted 41 lines · Hans de Goede

Hi,

Quoted 24 lines · Hans de Goede

Hi,

Quoted 21 lines · Maxime Ripard

Hi Hans,

Quoted 17 lines · Hans de Goede
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

Quoted 7 lines
Quoted 4 lines

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Still, registering devices that are not present on the board is not an option.

Ok, new version send.

What about the other 3 patches in this series ?

Quoted 8 lines
Quoted 1 line

I guess the same comment applies for patch 2.

The difference is that there really is no harm at all from enabling the extra usb controllers used on the plus 2e on the plus and plus 2 as well, no errors, no nothing, they just sit their as usb controllers without an usb device plugged in. But if you insist I can do a separate dts + u-boot defconfig for the plus 2e as well (but I would rather not).

Ping, what is the verdict on this, are you ok with the patch or do you want me to create a separate dts file for the Orange Pi Plus 2E, note that doing so is going to be highly confusing to users, there are 3 plus boards:

Quoted 7 lines

Orange Pi Plus
Orange Pi Plus 2 (same as the original plus but with 2G RAM, uses same u-boot defconfig / dts file)
Orange Pi Plus 2E (drops the USB-hub instead using all 3 host controllers)

So if you insist on a separate dts for the 2E, we get a case where the user with the "2" needs to guess which config to use, sure we can document this, but who is going to read the docs ?

Ping can you please make a call on this, I'm ok with doing this either way (*), but please lets just make a call and move forward.

Regards,

Hans

*) With a preference for a single dts file for all plus boards as explained in my previous email

Quoted 4 lines

Regards,

Hans

#15 lore raw

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

In reply to Hans de Goede

Hi Hans,

Sorry for the slow response, it was burried in my inbox.

Quoted 36 lines · Hans de Goede

Hi,

Quoted 24 lines · Hans de Goede

Hi,

Quoted 21 lines · Maxime Ripard

Hi Hans,

Quoted 17 lines · Hans de Goede
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

Quoted 7 lines
Quoted 4 lines

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Still, registering devices that are not present on the board is not an option.

Ok, new version send.

What about the other 3 patches in this series ?

Quoted 8 lines
Quoted 1 line

I guess the same comment applies for patch 2.

The difference is that there really is no harm at all from enabling the extra usb controllers used on the plus 2e on the plus and plus 2 as well, no errors, no nothing, they just sit their as usb controllers without an usb device plugged in. But if you insist I can do a separate dts + u-boot defconfig for the plus 2e as well (but I would rather not).

Quoted 4 lines

Ping, what is the verdict on this, are you ok with the patch or do you want me to create a separate dts file for the Orange Pi Plus 2E, note that doing so is going to be highly confusing to users, there are 3 plus boards:

I still believe that enabling clocks, regulators, claiming pins for device that are entirely unused on the board is not ok.

Quoted 2 lines

Orange Pi Plus
Orange Pi Plus 2 (same as the original plus but with 2G RAM, uses same u-boot defconfig / dts file)

Yes, that makes sense.

Quoted 1 line

Orange Pi Plus 2E (drops the USB-hub instead using all 3 host controllers)

However, I'm really worried about this one. If we go this way, there's essentially no going back. If for some reason we want to have a separate DT in the future (some unforeseen quirk to apply, pin to setup that conflicts on another board, etc.), we will be completely screwed because our users will be expecting to use the common DT, while it wouldn't be wise anymore.

The other way around is much easier to deal with.

Maxime

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

PATCH 1/4 ARM: dts: sun8i: Extend Orange Pi PC dt to also handle the PC Plus

Hi,

Quoted 56 lines · Maxime Ripard

Hi Hans,

Sorry for the slow response, it was burried in my inbox.

Quoted 36 lines · Hans de Goede

Hi,

Quoted 24 lines · Hans de Goede

Hi,

Quoted 21 lines · Maxime Ripard

Hi Hans,

Quoted 17 lines · Hans de Goede
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

Nothing prevents you from including the orange pi pc dts, from the orange pi plus dts.

It prevents the duplication you were trying to avoid, and it doesn't create all those spurious errors and devices.

Quoted 7 lines
Quoted 4 lines

That would solve the copy paste problem on the kernel side, but that would still mean adding a new u-boot defconfig for this, which means that all the distro's which ship with prebuild u-boot binaries need to build for yet another board, something which I would like to avoid.

Still, registering devices that are not present on the board is not an option.

Ok, new version send.

What about the other 3 patches in this series ?

Quoted 8 lines
Quoted 1 line

I guess the same comment applies for patch 2.

The difference is that there really is no harm at all from enabling the extra usb controllers used on the plus 2e on the plus and plus 2 as well, no errors, no nothing, they just sit their as usb controllers without an usb device plugged in. But if you insist I can do a separate dts + u-boot defconfig for the plus 2e as well (but I would rather not).

Quoted 4 lines

Ping, what is the verdict on this, are you ok with the patch or do you want me to create a separate dts file for the Orange Pi Plus 2E, note that doing so is going to be highly confusing to users, there are 3 plus boards:

I still believe that enabling clocks, regulators, claiming pins for device that are entirely unused on the board is not ok.

Quoted 2 lines

Orange Pi Plus
Orange Pi Plus 2 (same as the original plus but with 2G RAM, uses same u-boot defconfig / dts file)

Yes, that makes sense.

Quoted 1 line

Orange Pi Plus 2E (drops the USB-hub instead using all 3 host controllers)

Quoted 8 lines

However, I'm really worried about this one. If we go this way, there's essentially no going back. If for some reason we want to have a separate DT in the future (some unforeseen quirk to apply, pin to setup that conflicts on another board, etc.), we will be completely screwed because our users will be expecting to use the common DT, while it wouldn't be wise anymore.

The other way around is much easier to deal with.

OK, fair enough, one patch to add a separate dts file for the plus 2e coming up.

Regards,

Hans