Skip to contentSkip to conversation

Assortment of fixes for TBS A711 Tablet

PATCH In review Ondrej Jirman 4 participants 13 messages Feb 22, 2020 – Feb 24, 2020

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

cover Assortment of fixes for TBS A711 Tablet

This series fixes some issues with camera overvolting, USB-OTG/charging, and WiFi OOB interrupt being stuck.

Please take a look.

thank you and regards,
Ondrej Jirman

Ondrej Jirman (4):
ARM: dts: sun8i-a83t-tbs-a711: OOB WiFi interrupt doesn't work
ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage
ARM: dts: sun8i-a83t-tbs-a711: Fix USB OTG mode detection
ARM: dts: sun8i-a83t-tbs-a711: Drop superfluous dr_mode

 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/4 ARM: dts: sun8i-a83t-tbs-a711: OOB WiFi interrupt doesn't work

It just causes a constant rate of 5000 interrupts per second for both GPIO and MMC, even if nothing is happening. Rely on in-band interrupts instead.

Fixes 0e23372080def7bb ("arm: dts: sun8i: Add the TBS A711 tablet devicetree")
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +0 -3
index 2fd31a0a0b344..ee5ce3556b2ad 100644
@@ -214,9 +214,6 @@ &mmc1 {
 	brcmf: wifi@1 {
 		reg = <1>;
 		compatible = "brcm,bcm4329-fmac";
-		interrupt-parent = <&r_pio>;
-		interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
-		interrupt-names = "host-wake";
 	};
 };
 
Signature · 1 line
2.25.1
#2 lore raw

Re: [linux-sunxi] [PATCH 1/4] ARM: dts: sun8i-a83t-tbs-a711: OOB WiFi interrupt doesn't work

Hi,

Quoted 7 lines · Ondrej Jirman

It just causes a constant rate of 5000 interrupts per second for both GPIO and MMC, even if nothing is happening. Rely on in-band interrupts instead.

Fixes 0e23372080def7bb ("arm: dts: sun8i: Add the TBS A711 tablet devicetree")

What WiFi chip/module does this use? It might be worth asking Broadcom people to help with this and fix the driver.

ChenYu

Quoted 25 lines
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +0 -4
index 2fd31a0a0b344..ee5ce3556b2ad 100644
@@ -214,9 +214,6 @@ &mmc1 {
        brcmf: wifi@1 {
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
-               interrupt-parent = <&r_pio>;
-               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
-               interrupt-names = "host-wake";
        };
 };
 
--

2.25.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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200222223154.221632-2-megous%40megous.com.

#3 lore raw

Re: [linux-sunxi] [PATCH 1/4] ARM: dts: sun8i-a83t-tbs-a711: OOB WiFi interrupt doesn't work

Quoted 10 lines · Chen-Yu Tsai

Hi,

Quoted 5 lines · Ondrej Jirman

It just causes a constant rate of 5000 interrupts per second for both GPIO and MMC, even if nothing is happening. Rely on in-band interrupts instead.

Quoted 5 lines
Quoted 2 lines
Fixes 0e23372080def7bb ("arm: dts: sun8i: Add the TBS A711 tablet devicetree")

What WiFi chip/module does this use? It might be worth asking Broadcom people to help with this and fix the driver.

Based on the comments in the device tree file, it uses an AP6210, which is a BCM43362 inside for SDIO-based WiFi. There is a recent fix in 5.6-rc1 for this,

8c8e60fb86a9 brcmfmac: sdio: Fix OOB interrupt initialization on brcm43362

which seems to fix things for me. Could you try it on your end?

ChenYu

Quoted 27 lines

ChenYu

Quoted 25 lines
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +0 -4
index 2fd31a0a0b344..ee5ce3556b2ad 100644
@@ -214,9 +214,6 @@ &mmc1 {
        brcmf: wifi@1 {
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
-               interrupt-parent = <&r_pio>;
-               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
-               interrupt-names = "host-wake";
        };
 };
 
--

2.25.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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200222223154.221632-2-megous%40megous.com.

#4 lore raw

Re: [linux-sunxi] [PATCH 1/4] ARM: dts: sun8i-a83t-tbs-a711: OOB WiFi interrupt doesn't work

Quoted 17 lines · Chen-Yu Tsai
Quoted 10 lines · Chen-Yu Tsai

Hi,

Quoted 5 lines · Ondrej Jirman

It just causes a constant rate of 5000 interrupts per second for both GPIO and MMC, even if nothing is happening. Rely on in-band interrupts instead.

Quoted 5 lines
Quoted 2 lines
Fixes 0e23372080def7bb ("arm: dts: sun8i: Add the TBS A711 tablet devicetree")

What WiFi chip/module does this use? It might be worth asking Broadcom people to help with this and fix the driver.

Quoted 7 lines

Based on the comments in the device tree file, it uses an AP6210, which is a BCM43362 inside for SDIO-based WiFi. There is a recent fix in 5.6-rc1 for this,

8c8e60fb86a9 brcmfmac: sdio: Fix OOB interrupt initialization on brcm43362

which seems to fix things for me. Could you try it on your end?

Interesting, thanks for finding out! I'll test it.

I think it will work, since my tablet started having overheating issue recently, and I tracked it down to this.

regards,

	o.
Quoted 30 lines

ChenYu

Quoted 27 lines

ChenYu

Quoted 25 lines
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +0 -4
index 2fd31a0a0b344..ee5ce3556b2ad 100644
@@ -214,9 +214,6 @@ &mmc1 {
        brcmf: wifi@1 {
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
-               interrupt-parent = <&r_pio>;
-               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
-               interrupt-names = "host-wake";
        };
 };
 
--

2.25.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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200222223154.221632-2-megous%40megous.com.

#5 lore raw

Re: [linux-sunxi] [PATCH 1/4] ARM: dts: sun8i-a83t-tbs-a711: OOB WiFi interrupt doesn't work

In reply to Chen-Yu Tsai

Hello,

Quoted 17 lines · Chen-Yu Tsai
Quoted 10 lines · Chen-Yu Tsai

Hi,

Quoted 5 lines · Ondrej Jirman

It just causes a constant rate of 5000 interrupts per second for both GPIO and MMC, even if nothing is happening. Rely on in-band interrupts instead.

Quoted 5 lines
Quoted 2 lines
Fixes 0e23372080def7bb ("arm: dts: sun8i: Add the TBS A711 tablet devicetree")

What WiFi chip/module does this use? It might be worth asking Broadcom people to help with this and fix the driver.

Quoted 7 lines

Based on the comments in the device tree file, it uses an AP6210, which is a BCM43362 inside for SDIO-based WiFi. There is a recent fix in 5.6-rc1 for this,

8c8e60fb86a9 brcmfmac: sdio: Fix OOB interrupt initialization on brcm43362

which seems to fix things for me. Could you try it on your end?

I can confirm that it works as you say (on linus/master). 5.5 still doesn't have the patch, so it's broken there, which confused me I guess.

Please ignore this patch.

thank you,
Ondrej

Quoted 30 lines

ChenYu

Quoted 27 lines

ChenYu

Quoted 25 lines
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ---
 1 file changed, 3 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +0 -4
index 2fd31a0a0b344..ee5ce3556b2ad 100644
@@ -214,9 +214,6 @@ &mmc1 {
        brcmf: wifi@1 {
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
-               interrupt-parent = <&r_pio>;
-               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
-               interrupt-names = "host-wake";
        };
 };
 
--

2.25.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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200222223154.221632-2-megous%40megous.com.

#6 lore raw

Re: [linux-sunxi] [PATCH 1/4] ARM: dts: sun8i-a83t-tbs-a711: OOB WiFi interrupt doesn't work

Quoted 24 lines · Ondřej Jirman

Hello,

Quoted 21 lines · Chen-Yu Tsai
Quoted 10 lines · Chen-Yu Tsai

Hi,

Quoted 5 lines · Ondrej Jirman

It just causes a constant rate of 5000 interrupts per second for both GPIO and MMC, even if nothing is happening. Rely on in-band interrupts instead.

Quoted 5 lines
Quoted 2 lines
Fixes 0e23372080def7bb ("arm: dts: sun8i: Add the TBS A711 tablet devicetree")

What WiFi chip/module does this use? It might be worth asking Broadcom people to help with this and fix the driver.

Based on the comments in the device tree file, it uses an AP6210, which is a BCM43362 inside for SDIO-based WiFi. There is a recent fix in 5.6-rc1 for this,

Quoted 6 lines
Quoted 3 lines

8c8e60fb86a9 brcmfmac: sdio: Fix OOB interrupt initialization on brcm43362

which seems to fix things for me. Could you try it on your end?

I can confirm that it works as you say (on linus/master). 5.5 still doesn't have the patch, so it's broken there, which confused me I guess.

Hi Ondrej,

I have seen emails from GregKH including this patch in 5.5 stable so it will also land there eventually.

Regards,
Arend

Quoted 36 lines

Please ignore this patch.

thank you,
Ondrej

Quoted 30 lines

ChenYu

Quoted 27 lines

ChenYu

Quoted 25 lines

---
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ---

1 file changed, 3 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +0 -4
index 2fd31a0a0b344..ee5ce3556b2ad 100644
@@ -214,9 +214,6 @@ &mmc1 {
   brcmf: wifi@1 {
           reg = <1>;
           compatible = "brcm,bcm4329-fmac";
-               interrupt-parent = <&r_pio>;
-               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
-               interrupt-names = "host-wake";
   };
 };
 
--

2.25.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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200222223154.221632-2-megous%40megous.com.

#7 lore raw

PATCH 2/4 ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage

In reply to Ondrej Jirman

Lowering the voltage solves the quick image degradation over time (minutes), that was probably caused by overheating.

---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +2 -2
index ee5ce3556b2ad..ae1fd2ee3bcce 100644
@@ -371,8 +371,8 @@ &reg_dldo2 {
 };
 
 &reg_dldo3 {
-	regulator-min-microvolt = <2800000>;
-	regulator-max-microvolt = <2800000>;
+	regulator-min-microvolt = <1800000>;
+	regulator-max-microvolt = <1800000>;
 	regulator-name = "vdd-csi";
 };
 
Signature · 1 line
2.25.1
Acked-by on v1 2/4
#8 lore raw

Re: [linux-sunxi] [PATCH 2/4] ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage

Quoted 5 lines · Ondrej Jirman

Lowering the voltage solves the quick image degradation over time (minutes), that was probably caused by overheating.

Makes sense. A lot of camera sensors run their digital parts off 1.8V. This one is no different.

The whole CSI stuff isn't enabled in the device tree yet though, and there are a lot of regulators with CSI in their names. Will this get worked on?

ChenYu

Quoted 26 lines
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +2 -3
index ee5ce3556b2ad..ae1fd2ee3bcce 100644
@@ -371,8 +371,8 @@ &reg_dldo2 {
 };
 
 &reg_dldo3 {
-       regulator-min-microvolt = <2800000>;
-       regulator-max-microvolt = <2800000>;
+       regulator-min-microvolt = <1800000>;
+       regulator-max-microvolt = <1800000>;
        regulator-name = "vdd-csi";
 };
 
--

2.25.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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200222223154.221632-3-megous%40megous.com.

#9 lore raw

Re: [linux-sunxi] [PATCH 2/4] ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage

Hello,

Quoted 7 lines · Chen-Yu Tsai
Quoted 5 lines · Ondrej Jirman

Lowering the voltage solves the quick image degradation over time (minutes), that was probably caused by overheating.

Quoted 8 lines

Makes sense. A lot of camera sensors run their digital parts off 1.8V. This one is no different.

The whole CSI stuff isn't enabled in the device tree yet though, and there are a lot of regulators with CSI in their names. Will this get worked on?

Yes, I'm preparing support for both cameras in this branch:

https://megous.com/git/linux/log/?h=cam-5.6

Both already work quite well. I'm just sending some fixes early.

Both cameras work best at 1.8V for the digital part.

regards,

	o.
Quoted 28 lines

ChenYu

Quoted 26 lines
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +2 -3
index ee5ce3556b2ad..ae1fd2ee3bcce 100644
@@ -371,8 +371,8 @@ &reg_dldo2 {
 };
 
 &reg_dldo3 {
-       regulator-min-microvolt = <2800000>;
-       regulator-max-microvolt = <2800000>;
+       regulator-min-microvolt = <1800000>;
+       regulator-max-microvolt = <1800000>;
        regulator-name = "vdd-csi";
 };
 
--

2.25.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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20200222223154.221632-3-megous%40megous.com.

#10 lore raw

PATCH 3/4 ARM: dts: sun8i-a83t-tbs-a711: Fix USB OTG mode detection

In reply to Ondrej Jirman

USB-ID signal has a pullup on the schematic, but in reality it's not pulled up, so add a GPIO pullup. And we also need a usb0_vbus_power-supply for VBUS detection.

This fixes OTG mode detection and charging issues on TBS A711 tablet. The issues came from ID pin reading 0, causing host mode to be enabled, when it should not be, leading to DRVVBUS being enabled, which disabled the charger.

Fixes f2f221c7810b824e ("ARM: dts: sun8i: a711: Enable USB OTG")
---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +2 -1
index ae1fd2ee3bcce..32fa64a44d8b4 100644
@@ -495,7 +495,8 @@ &usb_otg {
 };
 
 &usbphy {
-	usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
+	usb0_id_det-gpios = <&pio 7 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH11 */
+	usb0_vbus_power-supply = <&usb_power_supply>;
 	usb0_vbus-supply = <&reg_drivevbus>;
 	usb1_vbus-supply = <&reg_vmain>;
 	usb2_vbus-supply = <&reg_vmain>;
Signature · 1 line
2.25.1
#11 lore raw

PATCH 4/4 ARM: dts: sun8i-a83t-tbs-a711: Drop superfluous dr_mode

In reply to Ondrej Jirman

Property dr_mode = "otg" is the default in sun8i-a83t.dtsi

---
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +0 -1
index 32fa64a44d8b4..267653775203e 100644
@@ -490,7 +490,6 @@ gnss {
 };
 
 &usb_otg {
-	dr_mode = "otg";
 	status = "okay";
 };
 
Signature · 1 line
2.25.1
#12 lore raw
In reply to Ondrej Jirman
Quoted 4 lines · Ondrej Jirman

This series fixes some issues with camera overvolting, USB-OTG/charging, and WiFi OOB interrupt being stuck.

Please take a look.

Applied 2,3 and 4

Maxime