Skip to contentSkip to conversation

ARM: dts: sun4i: Enable tablet keys on Chuwi V7 CW0825

PATCH New Hans de Goede 3 participants 22 messages Mar 7, 2015 – Mar 9, 2015

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

PATCH 1/7 ARM: dts: sun4i: Enable tablet keys on Chuwi V7 CW0825

Enable the lradc controlled tablet keys on the Chuwi V7 CW0825 tablet.

---
 arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts | 27 +++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm/boot/dts/sun4i-a10-chuwi-v7-cw0825.dts +27 -0
index 58214f2..97fca89 100644
@@ -49,6 +49,7 @@
 #include "sun4i-a10.dtsi"
 #include "sunxi-common-regulators.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Chuwi V7 CW0825";
@@ -74,6 +75,32 @@
 	};
 };
 
+&lradc {
+	vref-supply = <&reg_vcc3v0>;
+	status = "okay";
+
+	button at 800 {
+		label = "Volume Up";
+		linux,code = <KEY_VOLUMEUP>;
+		channel = <0>;
+		voltage = <800000>;
+	};
+
+	button at 1000 {
+		label = "Volume Down";
+		linux,code = <KEY_VOLUMEDOWN>;
+		channel = <0>;
+		voltage = <1000000>;
+	};
+
+	button at 1200 {
+		label = "Back";
+		linux,code = <KEY_BACK>;
+		channel = <0>;
+		voltage = <1200000>;
+	};
+};
+
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
Signature · 1 line
2.3.1
#1 lore raw

PATCH 2/7 ARM: dts: sun5i: Stop using different compatibles for ehci/ohci on a13 vs a10s

The A13 and the A10s use the same die (this has been confirmed by Allwinner), as such there is no need to differentiate between the ehci/ohci parts of both, the only reasons there were different allwinner,sun5i-a*-foo compatible between these 2 parts is costemetically and because we could when we still had 2 completely different dtsi files.

The allwinner,sun5i-a*-foo compatible strings are not used for binding at all, the actual driver binds to the generic-?hci compatible, so we can safely remove this cosmetical difference and simplify the dtsi files.

---
 arch/arm/boot/dts/sun5i-a10s.dtsi | 8 --------
 arch/arm/boot/dts/sun5i-a13.dtsi  | 8 --------
 arch/arm/boot/dts/sun5i.dtsi      | 2 ++
 3 files changed, 2 insertions(+), 16 deletions(-)
arch/arm/boot/dts/sun5i-a10s.dtsi +0 -8
index ef516db..a78c95d 100644
@@ -157,14 +157,6 @@
 	};
 };
 
-&ehci0 {
-	compatible = "allwinner,sun5i-a10s-ehci", "generic-ehci";
-};
-
-&ohci0 {
-	compatible = "allwinner,sun5i-a10s-ohci", "generic-ohci";
-};
-
 &pio {
 	compatible = "allwinner,sun5i-a10s-pinctrl";
 
arch/arm/boot/dts/sun5i-a13.dtsi +0 -8
index 5d9ce84..136158f 100644
@@ -153,14 +153,6 @@
 	cooling-max-level = <6>;
 };
 
-&ehci0 {
-	compatible = "allwinner,sun5i-a13-ehci", "generic-ehci";
-};
-
-&ohci0 {
-	compatible = "allwinner,sun5i-a13-ohci", "generic-ohci";
-};
-
 &pio {
 	compatible = "allwinner,sun5i-a13-pinctrl";
 
arch/arm/boot/dts/sun5i.dtsi +2 -0
index 610ea18..416c4de 100644
@@ -392,6 +392,7 @@
 		};
 
 		ehci0: usb at 01c14000 {
+			compatible = "allwinner,sun5i-a13-ehci", "generic-ehci";
 			reg = <0x01c14000 0x100>;
 			interrupts = <39>;
 			clocks = <&ahb_gates 1>;
@@ -401,6 +402,7 @@
 		};
 
 		ohci0: usb at 01c14400 {
+			compatible = "allwinner,sun5i-a13-ohci", "generic-ohci";
 			reg = <0x01c14400 0x100>;
 			interrupts = <40>;
 			clocks = <&usb_clk 6>, <&ahb_gates 2>;
Signature · 1 line
2.3.1
#2 lore raw

PATCH 2/7 ARM: dts: sun5i: Stop using different compatibles for ehci/ohci on a13 vs a10s

Quoted 11 lines · Hans de Goede

The A13 and the A10s use the same die (this has been confirmed by Allwinner), as such there is no need to differentiate between the ehci/ohci parts of both, the only reasons there were different allwinner,sun5i-a*-foo compatible between these 2 parts is costemetically and because we could when we still had 2 completely different dtsi files.

The allwinner,sun5i-a*-foo compatible strings are not used for binding at all, the actual driver binds to the generic-?hci compatible, so we can safely remove this cosmetical difference and simplify the dtsi files.

Appplied, 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/20150308/e2ce700d/attachment.sig>
#3 lore raw

PATCH 3/7 ARM: dts: sun5i: Add mmc2 pinmux settings

In reply to Hans de Goede

Add A13 mmc2 pinmux settings, note these are for a 8bit bus.

---
 arch/arm/boot/dts/sun5i.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/sun5i.dtsi +9 -0
index 416c4de..244d896 100644
@@ -469,6 +469,15 @@
 				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 			};
+
+			mmc2_pins_a: mmc2 at 0 {
+				allwinner,pins = "PC6", "PC7", "PC8", "PC9",
+					"PC10", "PC11", "PC12", "PC13",
+					"PC14", "PC15";
+				allwinner,function = "mmc2";
+				allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+			};
 		};
 
 		timer at 01c20c00 {
Signature · 1 line
2.3.1
#4 lore raw

PATCH 3/7 ARM: dts: sun5i: Add mmc2 pinmux settings

Quoted 3 lines · Hans de Goede

Add A13 mmc2 pinmux settings, note these are for a 8bit bus.

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/20150308/e7aaf194/attachment.sig>
#5 lore raw

PATCH 4/7 ARM: dts: sun5i: Add new Auxtek-t004 board

In reply to Hans de Goede

The auxtek-t004:
http://www.fasttech.com/products/1110/10004200/1318603-auxtek-t004-allwinner-a10s-single-core-android-ics

Is an Allwinner A10s based hdmi tv stick with with 512M RAM, 4G nand flash, toc9002 (bcm43362) sdio wifi, 1 USB host ports using an USB-A receptacle and a 2 micro-usb receptacles, one for power and one for USB OTG.

The sdio wifi appears to not have an oob irq hooked up, so we rely on sdio-irq support for it.

foo

---
 arch/arm/boot/dts/Makefile                   |   1 +
 arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts | 151 +++++++++++++++++++++++++++
 2 files changed, 152 insertions(+)
 create mode 100644 arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts
arch/arm/boot/dts/Makefile +1 -0
index beac15f..d824336 100644
@@ -525,6 +525,7 @@ dtb-$(CONFIG_MACH_SUN4I) += \
 	sun4i-a10-olinuxino-lime.dtb \
 	sun4i-a10-pcduino.dtb
 dtb-$(CONFIG_MACH_SUN5I) += \
+	sun5i-a10s-auxtek-t004.dtb \
 	sun5i-a10s-mk802.dtb \
 	sun5i-a10s-olinuxino-micro.dtb \
 	sun5i-a10s-r7-tv-dongle.dtb \
arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts new file +151 -0

151 lines not on this page · raw message

Signature · 1 line
2.3.1
#6 lore raw

PATCH 4/7 ARM: dts: sun5i: Add new Auxtek-t004 board

Quoted 7 lines · Hans de Goede

The auxtek-t004:
http://www.fasttech.com/products/1110/10004200/1318603-auxtek-t004-allwinner-a10s-single-core-android-ics

Is an Allwinner A10s based hdmi tv stick with with 512M RAM, 4G nand flash, toc9002 (bcm43362) sdio wifi, 1 USB host ports using an USB-A receptacle and a 2 micro-usb receptacles, one for power and one for USB OTG.

Quoted 6 lines

The sdio wifi appears to not have an oob irq hooked up, so we rely on sdio-irq support for it.

foo

I'm not sure what that foo was about :)

I removed it, and applied the patch, 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/20150308/8a2bc2d5/attachment.sig>
#7 lore raw

PATCH 4/7 ARM: dts: sun5i: Add new Auxtek-t004 board

Hi,

Quoted 8 lines · Maxime Ripard
Quoted 7 lines · Hans de Goede

The auxtek-t004:
http://www.fasttech.com/products/1110/10004200/1318603-auxtek-t004-allwinner-a10s-single-core-android-ics

Is an Allwinner A10s based hdmi tv stick with with 512M RAM, 4G nand flash, toc9002 (bcm43362) sdio wifi, 1 USB host ports using an USB-A receptacle and a 2 micro-usb receptacles, one for power and one for USB OTG.

Quoted 8 lines
Quoted 6 lines

The sdio wifi appears to not have an oob irq hooked up, so we rely on sdio-irq support for it.

foo

I'm not sure what that foo was about :)

Heh, that was the commit message of a fixup commit which I apparently added with a s (squash) rather then a f (fix) when doing a rebase -i leaving the foo in the combined commit msg. So now if you ever see a "foo" in a commit msg from me again you know where it comes from :)

Regards,

Hans

#8 lore raw

PATCH 4/7 ARM: dts: sun5i: Add new Auxtek-t004 board

Quoted 16 lines · Hans de Goede

Hi,

Quoted 13 lines · Maxime Ripard
Quoted 12 lines · Hans de Goede

The auxtek-t004:
http://www.fasttech.com/products/1110/10004200/1318603-auxtek-t004-allwinner-a10s-single-core-android-ics

Is an Allwinner A10s based hdmi tv stick with with 512M RAM, 4G nand flash, toc9002 (bcm43362) sdio wifi, 1 USB host ports using an USB-A receptacle and a 2 micro-usb receptacles, one for power and one for USB OTG.

The sdio wifi appears to not have an oob irq hooked up, so we rely on sdio-irq support for it.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

foo

I'm not sure what that foo was about :)

Heh, that was the commit message of a fixup commit which I apparently added with a s (squash) rather then a f (fix) when doing a rebase -i leaving the foo in the combined commit msg. So now if you ever see a "foo" in a commit msg from me again you know where it comes from :)

Noted :)

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/20150309/e731aa6d/attachment.sig>
#9 lore raw

PATCH 5/7 ARM: dts: sun5i: Add new Utoo P66 board

In reply to Hans de Goede

The UTOO P66 is a 6" A13 tablet / lcd ereader. It features a 6" 480x800 ips lcd screen, 512MB RAM & 4GB emmc.

---
 arch/arm/boot/dts/Makefile               |   3 +-
 arch/arm/boot/dts/sun5i-a13-utoo-p66.dts | 203 +++++++++++++++++++++++++++++++
 2 files changed, 205 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
arch/arm/boot/dts/Makefile +2 -1
index d824336..f97c5d3 100644
@@ -531,7 +531,8 @@ dtb-$(CONFIG_MACH_SUN5I) += \
 	sun5i-a10s-r7-tv-dongle.dtb \
 	sun5i-a13-hsg-h702.dtb \
 	sun5i-a13-olinuxino.dtb \
-	sun5i-a13-olinuxino-micro.dtb
+	sun5i-a13-olinuxino-micro.dtb \
+	sun5i-a13-utoo-p66.dtb
 dtb-$(CONFIG_MACH_SUN6I) += \
 	sun6i-a31-app4-evb1.dtb \
 	sun6i-a31-colombus.dtb \
arch/arm/boot/dts/sun5i-a13-utoo-p66.dts new file +203 -0

203 lines not on this page · raw message

Signature · 1 line
2.3.1
#10 lore raw

PATCH 5/7 ARM: dts: sun5i: Add new Utoo P66 board

Quoted 4 lines · Hans de Goede

The UTOO P66 is a 6" A13 tablet / lcd ereader. It features a 6" 480x800 ips lcd screen, 512MB RAM & 4GB emmc.

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/20150308/c82a25b1/attachment.sig>
#11 lore raw

PATCH 6/7 ARM: dts: sun7i: Add OOB irq support to boards with broadcom sdio wifi

In reply to Hans de Goede
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 11 +++++++++++
 arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts  | 11 +++++++++++
 2 files changed, 22 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +11 -0
index 0c219a4..8111b0c 100644
@@ -167,12 +167,23 @@
 };
 
 &mmc3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc3_pins_a>;
 	vmmc-supply = <&reg_vmmc3>;
 	bus-width = <4>;
 	non-removable;
 	status = "okay";
+
+	brcmf: bcrmf at 1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&pio>;
+		interrupts = <10 8>; /* PH10 / EINT10 */
+		interrupt-names = "host-wake";
+	};
 };
 
 &mmc3_pins_a {
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts +11 -0
index baee563..4a8defd 100644
@@ -164,12 +164,23 @@
 };
 
 &mmc3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc3_pins_a>;
 	vmmc-supply = <&reg_vmmc3>;
 	bus-width = <4>;
 	non-removable;
 	status = "okay";
+
+	brcmf: bcrmf at 1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&pio>;
+		interrupts = <10 8>; /* PH10 / EINT10 */
+		interrupt-names = "host-wake";
+	};
 };
 
 &mmc3_pins_a {
Signature · 1 line
2.3.1
#12 lore raw

PATCH 6/7 ARM: dts: sun7i: Add OOB irq support to boards with broadcom sdio wifi

Hi,

Quoted 19 lines · Hans de Goede
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 11 +++++++++++
 arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts  | 11 +++++++++++
 2 files changed, 22 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +3 -0
index 0c219a4..8111b0c 100644
@@ -167,12 +167,23 @@
 };
 
 &mmc3 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
        pinctrl-names = "default";
        pinctrl-0 = <&mmc3_pins_a>;

arch/arm/boot/dts/sun7i-a20-cubietruck.dts line 184

Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +6 -0
        vmmc-supply = <&reg_vmmc3>;
        bus-width = <4>;
        non-removable;
        status = "okay";
+
+       brcmf: bcrmf at 1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <10 8>; /* PH10 / EINT10 */

^ IRQ_TYPE_LEVEL_LOW?

Quoted 18 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +2 -0
+               interrupt-names = "host-wake";
+       };
 };
 
 &mmc3_pins_a {
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts +3 -0
index baee563..4a8defd 100644
@@ -164,12 +164,23 @@
 };
 
 &mmc3 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
        pinctrl-names = "default";
        pinctrl-0 = <&mmc3_pins_a>;

arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts line 181

Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts +6 -0
        vmmc-supply = <&reg_vmmc3>;
        bus-width = <4>;
        non-removable;
        status = "okay";
+
+       brcmf: bcrmf at 1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <10 8>; /* PH10 / EINT10 */

Same here.

ChenYu

Quoted 5 lines
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts +2 -0
+               interrupt-names = "host-wake";
+       };
 };
 
 &mmc3_pins_a {
#13 lore raw

PATCH 6/7 ARM: dts: sun7i: Add OOB irq support to boards with broadcom sdio wifi

In reply to Hans de Goede
Quoted 21 lines · Hans de Goede
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 11 +++++++++++
 arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts  | 11 +++++++++++
 2 files changed, 22 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +3 -0
index 0c219a4..8111b0c 100644
@@ -167,12 +167,23 @@
 };
 
 &mmc3 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
        pinctrl-names = "default";
        pinctrl-0 = <&mmc3_pins_a>;
        vmmc-supply = <&reg_vmmc3>;
        bus-width = <4>;

arch/arm/boot/dts/sun7i-a20-cubietruck.dts line 186

Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +8 -0
        non-removable;
        status = "okay";
+
+       brcmf: bcrmf at 1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <10 8>; /* PH10 / EINT10 */
+               interrupt-names = "host-wake";
+       };

I gave this a spin on my Cubietruck. (I was running cap-sdio-irq before.)

Ran a few ping tests with a simple
"sudo ping -i 0.1 -I wlan0 -s 65500 192.168.1.1"
After a few runs I got

sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD SBE !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
brcmfmac: brcmf_sdio_readframes: RXHEADER FAILED: -110
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK
brcmfmac: brcmf_sdiod_regrw_helper: failed to write data F1 at 0x0a040, err: -5
brcmfmac: brcmf_sdio_hdparse: seq 226: sequence number error, expect 227 sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
brcmfmac: brcmf_sdiod_regrw_helper: failed to read data F1 at 0x0a020, err: -110
brcmfmac: brcmf_sdio_dpc: failed backplane access over SDIO, halting operation sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command

The chip is pretty much dead afterwards.

With cap-sdio-irq it doesn't happen so soon, but it does. Without either, the response time is bad with packet losses, but at least it doesn't die.

Is this the problem Arend (CC-ed) was looking into?

Regards
ChenYu

Quoted 38 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +0 -0
 };
 
 &mmc3_pins_a {
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts +11 -1
index baee563..4a8defd 100644
@@ -164,12 +164,23 @@
 };
 
 &mmc3 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
        pinctrl-names = "default";
        pinctrl-0 = <&mmc3_pins_a>;
        vmmc-supply = <&reg_vmmc3>;
        bus-width = <4>;
        non-removable;
        status = "okay";
+
+       brcmf: bcrmf at 1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <10 8>; /* PH10 / EINT10 */
+               interrupt-names = "host-wake";
+       };
 };
 
 &mmc3_pins_a {
--

2.3.1

--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com. For more options, visit https://groups.google.com/d/optout.

#14 lore raw

PATCH 6/7 ARM: dts: sun7i: Add OOB irq support to boards with broadcom sdio wifi

Hi,

Quoted 60 lines · Chen-Yu Tsai
Quoted 21 lines · Hans de Goede
---
  arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 11 +++++++++++
  arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts  | 11 +++++++++++
  2 files changed, 22 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +3 -0
index 0c219a4..8111b0c 100644
@@ -167,12 +167,23 @@
  };
 
  &mmc3 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
         pinctrl-names = "default";
         pinctrl-0 = <&mmc3_pins_a>;
         vmmc-supply = <&reg_vmmc3>;
         bus-width = <4>;

arch/arm/boot/dts/sun7i-a20-cubietruck.dts line 186

Quoted 10 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +8 -0
         non-removable;
         status = "okay";
+
+       brcmf: bcrmf at 1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <10 8>; /* PH10 / EINT10 */
+               interrupt-names = "host-wake";
+       };

I gave this a spin on my Cubietruck. (I was running cap-sdio-irq before.)

Ran a few ping tests with a simple
"sudo ping -i 0.1 -I wlan0 -s 65500 192.168.1.1"
After a few runs I got

sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD SBE !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
brcmfmac: brcmf_sdio_readframes: RXHEADER FAILED: -110
brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK
brcmfmac: brcmf_sdiod_regrw_helper: failed to write data F1 at 0x0a040, err: -5
brcmfmac: brcmf_sdio_hdparse: seq 226: sequence number error, expect 227 sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
brcmfmac: brcmf_sdiod_regrw_helper: failed to read data F1 at 0x0a020, err: -110
brcmfmac: brcmf_sdio_dpc: failed backplane access over SDIO, halting operation sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command
sunxi-mmc 1c12000.mmc: smc 1 err, cmd 53, RD DTO !!
sunxi-mmc 1c12000.mmc: data error, sending stop command

Quoted 5 lines

The chip is pretty much dead afterwards.

With cap-sdio-irq it doesn't happen so soon, but it does. Without either, the response time is bad with packet losses, but at least it doesn't die.

That is not true, without either cap-sdio-irq or oob irq it still dies, try doing a scp of a large file, that is a more reliable way to trigger it.

I've been down this road (blaming the irq) mechanism myself, but it is a dead end, the problem you're describing, the CMD 53 SBE error happens with all 3 irq mechanisms.

Quoted 1 line

Is this the problem Arend (CC-ed) was looking into?

Is looking into, yes. He has a Cubietruck now, and he can reproduce it, so hopefully we will see some progress on this soon.

Note that as a workaround (for me at least) you can boot into the linux on the cubietruck nand, then insert an sdcard with upstream kernel, then reboot so that it boots from the sdcard without loosing power, and then the problem seems to be gone.

Regards,

Hans

#15 lore raw

PATCH 6/7 ARM: dts: sun7i: Add OOB irq support to boards with broadcom sdio wifi

In reply to Hans de Goede
Quoted 11 lines · Hans de Goede
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 11 +++++++++++
 arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts  | 11 +++++++++++
 2 files changed, 22 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +0 -0
index 0c219a4..8111b0c 100644

arch/arm/boot/dts/sun7i-a20-cubietruck.dts line 172

Quoted 6 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +3 -0
@@ -167,12 +167,23 @@
 };
 
 &mmc3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+

Aside from Chen-Yu's comments, that should be in the DTSI.

arch/arm/boot/dts/sun7i-a20-cubietruck.dts line 184

Quoted 12 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +6 -0
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc3_pins_a>;
 	vmmc-supply = <&reg_vmmc3>;
 	bus-width = <4>;
 	non-removable;
 	status = "okay";
+
+	brcmf: bcrmf at 1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&pio>;
+		interrupts = <10 8>; /* PH10 / EINT10 */

And you can use interrupts-extented here (not that I really care much, both solutions works for me).

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/20150308/2fc0ca41/attachment-0001.sig>
#16 lore raw

PATCH 6/7 ARM: dts: sun7i: Add OOB irq support to boards with broadcom sdio wifi

Hi,

Quoted 21 lines · Maxime Ripard
Quoted 11 lines · Hans de Goede
---
  arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 11 +++++++++++
  arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts  | 11 +++++++++++
  2 files changed, 22 insertions(+)
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +0 -0
index 0c219a4..8111b0c 100644

arch/arm/boot/dts/sun7i-a20-cubietruck.dts line 172

Quoted 6 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +3 -0
@@ -167,12 +167,23 @@
  };
 
  &mmc3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+

Aside from Chen-Yu's comments, that should be in the DTSI.

Quoted 15 lines

arch/arm/boot/dts/sun7i-a20-cubietruck.dts line 184

Quoted 12 lines
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +6 -0
  	pinctrl-names = "default";
  	pinctrl-0 = <&mmc3_pins_a>;
  	vmmc-supply = <&reg_vmmc3>;
  	bus-width = <4>;
  	non-removable;
  	status = "okay";
+
+	brcmf: bcrmf at 1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		interrupt-parent = <&pio>;
+		interrupts = <10 8>; /* PH10 / EINT10 */

And you can use interrupts-extented here (not that I really care much, both solutions works for me).

What is interrupts-extended / does interrupts-extended do ?

Ah, found it, Documentation/devicetree/bindings/interrupt-controller/interrupts.txt says:

The "interrupts-extended" property is a special form for use when a node needs to reference multiple interrupt parents. Each entry in this property contains both the parent phandle and the interrupt specifier. "interrupts-extended" should only be used when a device has multiple interrupt parents.

   Example:
         interrupts-extended = <&intc1 5 1>, <&intc2 1 0>;

So since we do not need multiple interrupt parents here, "interrupts = " seems to be the better syntax to use, I'll do a new version fixing ChenYu's comments and moving the #foo-cells to the dtsi.

Thanks for merging the other patches, and for the review.

Regards,

Hans

#17 lore raw

PATCH 7/7 ARM: dts: sun7i: Enable cap-sdio-irq for bananapro sdio wifi

In reply to Hans de Goede

The sdio wifi on the Banana Pro does not appear to have an oob irq hooked up, so enable sdio-irq support to avoid unnecessary polling.

---
 arch/arm/boot/dts/sun7i-a20-bananapro.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/sun7i-a20-bananapro.dts +1 -0
index fb89fe7..d0cd78f 100644
@@ -164,6 +164,7 @@
 	vmmc-supply = <&reg_vmmc3>;
 	bus-width = <4>;
 	non-removable;
+	cap-sdio-irq;
 	status = "okay";
 };
 
Signature · 1 line
2.3.1
#18 lore raw

PATCH 7/7 ARM: dts: sun7i: Enable cap-sdio-irq for bananapro sdio wifi

Quoted 2 lines · Hans de Goede

The sdio wifi on the Banana Pro does not appear to have an oob irq hooked up, so enable sdio-irq support to avoid unnecessary polling.

I wonder if this is stable enough to put back into the mmc driver, i.e. declare the capability in the driver itself? IIRC at one point it did.

ChenYu

Quoted 19 lines
---
 arch/arm/boot/dts/sun7i-a20-bananapro.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/sun7i-a20-bananapro.dts +1 -1
index fb89fe7..d0cd78f 100644
@@ -164,6 +164,7 @@
        vmmc-supply = <&reg_vmmc3>;
        bus-width = <4>;
        non-removable;
+       cap-sdio-irq;
        status = "okay";
 };
 
--

2.3.1

#19 lore raw

PATCH 7/7 ARM: dts: sun7i: Enable cap-sdio-irq for bananapro sdio wifi

Hi,

Quoted 6 lines · Chen-Yu Tsai
Quoted 2 lines · Hans de Goede

The sdio wifi on the Banana Pro does not appear to have an oob irq hooked up, so enable sdio-irq support to avoid unnecessary polling.

I wonder if this is stable enough to put back into the mmc driver, i.e. declare the capability in the driver itself? IIRC at one point it did.

That is a good question, I believe strongly that the sdio wifi issues we've been seeing which were the reason to disable cap-sdio-irq in the driver are actually unrelated to the irq delivery mechanism. So IMHO yes we can just enable this for all devices in the driver, and yes that would be a better solution.

Maxime, if I send a patch to enable cal-sdio-irq at the driver level ( as it really is a hardware feature not a board feature), will you ack it ?

If the answer is yet, then please do NOT apply this patch and I'll send a sunxi-mmc.c patch instead.

Regards,

Hans

Quoted 23 lines

ChenYu

Quoted 19 lines
---
  arch/arm/boot/dts/sun7i-a20-bananapro.dts | 1 +
  1 file changed, 1 insertion(+)
arch/arm/boot/dts/sun7i-a20-bananapro.dts +1 -1
index fb89fe7..d0cd78f 100644
@@ -164,6 +164,7 @@
         vmmc-supply = <&reg_vmmc3>;
         bus-width = <4>;
         non-removable;
+       cap-sdio-irq;
         status = "okay";
  };
 
--

2.3.1

#20 lore raw

PATCH 7/7 ARM: dts: sun7i: Enable cap-sdio-irq for bananapro sdio wifi

Quoted 10 lines · Hans de Goede

Hi,

Quoted 6 lines · Chen-Yu Tsai
Quoted 2 lines · Hans de Goede

The sdio wifi on the Banana Pro does not appear to have an oob irq hooked up, so enable sdio-irq support to avoid unnecessary polling.

I wonder if this is stable enough to put back into the mmc driver, i.e. declare the capability in the driver itself? IIRC at one point it did.

Quoted 7 lines

That is a good question, I believe strongly that the sdio wifi issues we've been seeing which were the reason to disable cap-sdio-irq in the driver are actually unrelated to the irq delivery mechanism. So IMHO yes we can just enable this for all devices in the driver, and yes that would be a better solution.

Maxime, if I send a patch to enable cal-sdio-irq at the driver level ( as it really is a hardware feature not a board feature), will you ack it ?

You know a lot more than I do on this, so I fully trust you. If you feel like it's the best solution, go ahead.

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/20150308/a70e052d/attachment-0001.sig>
#21 lore raw

PATCH 1/7 ARM: dts: sun4i: Enable tablet keys on Chuwi V7 CW0825

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

Enable the lradc controlled tablet keys on the Chuwi V7 CW0825 tablet.

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/20150308/7415fc03/attachment.sig>