arm64: dts: orange-pi-zero-plus2 mmc and wifi
Subsystems (2)
cover arm64: dts: orange-pi-zero-plus2 mmc and wifi
This patchset enables WiFi/BT and fixes sdcard on
orange-pi-zero-plus2 board.
Sergey Matyukevich (2):
arm64: dts: orange-pi-zero-plus2: fix sdcard detect
arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT
sun50i-h5-orangepi-zero-plus2.dts | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-)
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1 -1
@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; status = "okay"; };
Signature · 1 line
2.11.0
PATCH 2/2 arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
In reply to Sergey MatyukevichEnable AP6212a WiFi/BT combo chip on orange-pi-zero-plus2 board:
- WiFi SDIO interface is connected to MMC1
- WiFi REG_ON pin connected to gpio PA9: attach to mmc-pwrseq
- WiFi HOST_WAKE pin connected to gpio PL7
- BT is connected to UART1
--- .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +32 -0
@@ -64,6 +64,13 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <200>; + }; }; &mmc0 {
@@ -75,6 +82,25 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>; + interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ + interrupt-names = "host-wake"; + }; +}; + &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>;
@@ -90,3 +116,9 @@ pinctrl-0 = <&uart0_pins_a>; status = "okay"; }; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + status = "okay"; +};
Signature · 1 line
2.11.0
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
In reply to Sergey MatyukevichQuoted 13 lines · Sergey Matyukevich
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +0
-0
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
Was able to detect and do mount with existing dts
Log:
# cat /proc/version Linux version 4.13.7 (root at ubuntu) (gcc version 6.4.0 (Buildroot 2017.11-git-00724-g83af6b3)) #1 SMP PREEMPT Thu Oct 19 00:51:53 CEST 2017 # fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 59 GB, 63483936768 bytes, 123992064 sectors 1937376 cylinders, 4 heads, 16 sectors/track Units: cylinders of 64 * 512 = 32768 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA
Sectors Size Id Type/dev/mmcblk0p1 * 0,15,59 8,56,27 1003 132074
131072 64.0M c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary/dev/mmcblk0p2 8,56,28 15,221,57 132075 254954
122880 60.0M 83 Linux
Partition 2 does not end on cylinder boundary
# mount /dev/mmcblk0p1 /mnt/ # ls /mnt/ Image sun50i-h5-orangepi-zero-plus2.dtb boot.scr # umount /mnt/ # mount /dev/mmcblk0p2 /mnt/ # ls /mnt/ bin lib lost+found opt run tmp dev lib64 media proc sbin usr etc linuxrc mnt root sys var # umount /mnt/
thanks!
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.
Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 14 lines
Hi,
Review
Quoted 9 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 9 lines
index
b6b7a561df8c..a42fd79a62a3100644arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change.
As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc
tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ?
My board is v1.0.
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
In reply to Jagan TekiQuoted 8 lines
Quoted 8 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Regards,
Sergey
Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 9 lines · Sergey Matyukevich
Review
Quoted 9 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
Quoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 9 lines
index
b6b7a561df8c..a42fd79a62a3100644arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
I'm using same v1.0
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 27 lines
Quoted 9 lines
Review
Quoted 9 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dtsQuoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 9 lines
index
b6b7a561df8c..a42fd79a62a3100644arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Quoted 5 lines
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
I'm using same v1.0
Ok, lets skip this patch for now.
I will double check v1.0 schematics and my board behavior. Though I see that mmc0 dts fragment in u-boot for this board also differs from the current kernel one: it uses 'cd-inverted' property.
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 31 lines · Sergey Matyukevich
Quoted 31 lines
Quoted 9 lines
Review
Quoted 9 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dtsQuoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 9 lines
index
b6b7a561df8c..a42fd79a62a3100644arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Quoted 7 lines
Quoted 1 line
I'm using same v1.0
Ok, lets skip this patch for now.
I will double check v1.0 schematics and my board behavior. Though I see that mmc0 dts fragment in u-boot for this board also differs from the current kernel one: it uses 'cd-inverted' property.
Can you shared the hang log.. look like I've seen boot issue with Latest Linux and U-Boot.
[ 1.348668] ALSA device list: [ 1.351649] No soundcards found. [ 1.355388] Waiting for root device /dev/mmcblk0p2... [ 1.371117] mmc1: new high speed MMC card at address 0001 [ 1.376947] mmcblk1: mmc1:0001 8WPD3R 7.28 GiB [ 1.381623] mmcblk1boot0: mmc1:0001 8WPD3R partition 1 4.00 MiB [ 1.387682] mmcblk1boot1: mmc1:0001 8WPD3R partition 2 4.00 MiB [ 1.395036] mmcblk1: p1 p2 p3 < p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 > [ 1.402542] mmcblk1: p1 size 6873088 extends beyond EOD, truncated
<< hang..>>
thanks!
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 43 lines · Jagan Teki
Quoted 31 lines · Sergey Matyukevich
Quoted 31 lines
Quoted 9 lines
Review
Quoted 9 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dtsQuoted 11 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 9 lines
index
b6b7a561df8c..a42fd79a62a3100644arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Quoted 7 lines
Quoted 1 line
I'm using same v1.0
Ok, lets skip this patch for now.
I will double check v1.0 schematics and my board behavior. Though I see that mmc0 dts fragment in u-boot for this board also differs from the current kernel one: it uses 'cd-inverted' property.
Can you shared the hang log.. look like I've seen boot issue with Latest Linux and U-Boot.
Quoted 10 lines
[ 1.348668] ALSA device list: [ 1.351649] No soundcards found. [ 1.355388] Waiting for root device /dev/mmcblk0p2... [ 1.371117] mmc1: new high speed MMC card at address 0001 [ 1.376947] mmcblk1: mmc1:0001 8WPD3R 7.28 GiB [ 1.381623] mmcblk1boot0: mmc1:0001 8WPD3R partition 1 4.00 MiB [ 1.387682] mmcblk1boot1: mmc1:0001 8WPD3R partition 2 4.00 MiB [ 1.395036] mmcblk1: p1 p2 p3 < p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 > [ 1.402542] mmcblk1: p1 size 6873088 extends beyond EOD, truncated
My log is exactly the same. The kernel detects mmcblk1 (emmmc) but can not detect mmcblk0 (sd-card). As a result, it waits according to 'rootwait' option in kernel command line. With this patch applied sd-card is properly detected and boot succeeds. As I mentioned in the commit message, this behavior corresponds to what I see in board schematics.
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
In reply to Sergey MatyukevichQuoted 21 lines · Sergey Matyukevich
Quoted 8 lines
Quoted 8 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Quoted 7 lines
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
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: 801 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171106/3a57e709/attachment.sig>
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Hello Maxime,
Quoted 26 lines
Quoted 26 lines
Quoted 8 lines
Quoted 8 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Quoted 4 lines
Quoted 2 lines
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 28 lines · Sergey Matyukevich
Hello Maxime,
Quoted 26 lines
Quoted 26 lines
Quoted 8 lines
Quoted 8 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Even tried with active LOW and cd-inverted.
[1] https://paste.ubuntu.com/25909064/
thanks!
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 37 lines · Jagan Teki
Quoted 28 lines · Sergey Matyukevich
Hello Maxime,
Quoted 26 lines
Quoted 26 lines
Quoted 8 lines
Quoted 8 lines
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 74
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +1
-1@@ -71,7 +71,7 @@ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; vmmc-supply = <®_vcc3v3>; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;Was able to detect and do mount with existing dts
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
Quoted 6 lines
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Even tried with active LOW and cd-inverted.
Look like something broken for H5 and A64 between v4.14-rc8 to latest
thanks!
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Hi,
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 9 lines
Quoted 7 lines
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
Quoted 8 lines
Quoted 6 lines
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Even tried with active LOW and cd-inverted.
Look like something broken for H5 and A64 between v4.14-rc8 to latest
Both 4.13.7 and 4.14-rc8 (synched today) kernels worked fine for me. DTS behavior is all the same:
- default DTS: sd-card is not detected, kernel is waiting forever
- DTS with 'active low' or 'cd-inverted' fix: sd-card and boot ok
I have been using rootfs from buildroot with your zero-plus2 patches.
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 18 lines · Sergey Matyukevich
Hi,
Quoted 16 lines
Quoted 16 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Even tried with active LOW and cd-inverted.
Look like something broken for H5 and A64 between v4.14-rc8 to latest
Both 4.13.7 and 4.14-rc8 (synched today) kernels worked fine for me. DTS behavior is all the same:
I've tried fresh sync [2] but still see the issue, can you check the Image size of log(suspecting on that area)
[2] https://paste.ubuntu.com/25916951/
thanks!
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH 2/2 arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
In reply to Sergey MatyukevichQuoted 5 lines
Enable AP6212a WiFi/BT combo chip on orange-pi-zero-plus2 board:
- WiFi SDIO interface is connected to MMC1
- WiFiREG_ONpin connected to gpio PA9: attach to mmc-pwrseq
- WiFiHOST_WAKEpin connected to gpio PL7
- BT is connected to UART1
Hi Maxime and all,
Any comments regarding this patch ?
Regards,
Sergey
Maxime Ripard
AppliedPATCH 2/2 arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
In reply to Sergey MatyukevichQuoted 7 lines · Sergey Matyukevich
Enable AP6212a WiFi/BT combo chip on orange-pi-zero-plus2 board:
- WiFi SDIO interface is connected to MMC1
- WiFiREG_ONpin connected to gpio PA9: attach to mmc-pwrseq
- WiFiHOST_WAKEpin connected to gpio PL7
- BT is connected to UART1Signed-off-by Sergey Matyukevich <[email protected]>
Queued for 4.16, 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: 801 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171113/e165f57e/attachment.sig>
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
In reply to Jagan TekiHello Maxime,
Quoted 23 lines · Jagan Teki
Quoted 22 lines · Sergey Matyukevich
Hi,
Quoted 20 lines
Quoted 19 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Even tried with active LOW and cd-inverted.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Look like something broken for H5 and A64 between v4.14-rc8 to latest
Both 4.13.7 and 4.14-rc8 (synched today) kernels worked fine for me. DTS behavior is all the same:
I've tried fresh sync [2] but still see the issue, can you check the Image size of log(suspecting on that area)
Do you plan to accept this patch as well ? Or you would prefer to wait for the confirmation from Jagan as well ?
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Hi Sergey,
Quoted 28 lines · Sergey Matyukevich
Hello Maxime,
Quoted 25 lines · Jagan Teki
Quoted 24 lines · Sergey Matyukevich
Hi,
Quoted 21 lines
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
Quoted 6 lines
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Even tried with active LOW and cd-inverted.
Look like something broken for H5 and A64 between v4.14-rc8 to latest
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Both 4.13.7 and 4.14-rc8 (synched today) kernels worked fine for me. DTS behavior is all the same:
I've tried fresh sync [2] but still see the issue, can you check the Image size of log(suspecting on that area)
Do you plan to accept this patch as well ? Or you would prefer to wait for the confirmation from Jagan as well ?
I'm happy with the patch, but I was under the impression that the discussion had not settled yet. If it did, then yeah I'll merge it :)
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: 801 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171114/ff77368e/attachment.sig>
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Hello Maxime, Jagan,
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 9 lines
Quoted 7 lines
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
Quoted 8 lines
Quoted 6 lines
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Even tried with active LOW and cd-inverted.
Look like something broken for H5 and A64 between v4.14-rc8 to latest
Both 4.13.7 and 4.14-rc8 (synched today) kernels worked fine for me. DTS behavior is all the same:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I've tried fresh sync [2] but still see the issue, can you check the Image size of log(suspecting on that area)
Do you plan to accept this patch as well ? Or you would prefer to wait for the confirmation from Jagan as well ?
I'm happy with the patch, but I was under the impression that the discussion had not settled yet. If it did, then yeah I'll merge it :)
Both schematics and my tests on v1.0 board confirm that this fix is ok. However we haven't yet got the ACK from Jagan, the original submitter of this dts file. FWIW discussion was mostly about the problems with his setup and not about the fix itself.
Jagan,
did you have a chance to resolve the issues with your setup and verify that boot from sd-card is fixed by this patch ?
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
Quoted 36 lines · Sergey Matyukevich
Hello Maxime, Jagan,
Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
Quoted 24 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 9 lines
Quoted 7 lines
Did you try to boot from sdcard ? I am not able to boot my board from sd-card without this change. As I mentioned earlier in my email to buildroot mailing list, with mmc debug enabled I see that mmc tries to init sd-card when I remove it from the slot.
Maybe there is a minor differences between h/w versions or batches ? What is you board version ? I tested on board v1.0.
Looking at the schematics, it definitely looks like it's active low.
Is it ok to merge it then ? Or using 'cd-inverted' property is the preferable option ?
Quoted 8 lines
Quoted 6 lines
W/o any change mainline works unstable for me, it wasn't booting at-all[1] did you find the same?
Even tried with active LOW and cd-inverted.
Look like something broken for H5 and A64 between v4.14-rc8 to latest
Both 4.13.7 and 4.14-rc8 (synched today) kernels worked fine for me. DTS behavior is all the same:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I've tried fresh sync [2] but still see the issue, can you check the Image size of log(suspecting on that area)
Do you plan to accept this patch as well ? Or you would prefer to wait for the confirmation from Jagan as well ?
I'm happy with the patch, but I was under the impression that the discussion had not settled yet. If it did, then yeah I'll merge it :)
Quoted 8 lines
Both schematics and my tests on v1.0 board confirm that this fix is ok. However we haven't yet got the ACK from Jagan, the original submitter of this dts file. FWIW discussion was mostly about the problems with his setup and not about the fix itself.
Jagan,
did you have a chance to resolve the issues with your setup and verify that boot from sd-card is fixed by this patch ?
PATCH 2/2 arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
In reply to Sergey MatyukevichQuoted 41 lines · Sergey Matyukevich
Enable AP6212a WiFi/BT combo chip on orange-pi-zero-plus2 board:
- WiFi SDIO interface is connected to MMC1
- WiFiREG_ONpin connected to gpio PA9: attach to mmc-pwrseq
- WiFiHOST_WAKEpin connected to gpio PL7
- BT is connected to UART1Signed-off-by Sergey Matyukevich <[email protected]>--- .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +15
-0@@ -64,6 +64,13 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <200>; + }; }; &mmc0 {@@ -75,6 +82,25 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable;
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 102
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +10
-0+ status = "okay"; + + brcmf: wifi at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>; + interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ + interrupt-names = "host-wake"; + }; +};
Did you observe this issue, I'm using firmware from buildroot and couldn't find any *.txt from brcm/ I believe we need ass text file for firmware details, did you tried the same from BR?
Log:
[ 1.872235] mmc1: new high speed SDIO card at address 0001 [ 1.880919] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001 [ 1.908802] EXT4-fs (mmcblk0p1): re-mounted. Opts: data=ordered [ 1.927199] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.txt failed with error -2 [ 2.963478] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 3.971888] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):
clkctl 0x50
thanks!
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH 2/2 arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
Quoted 48 lines · Jagan Teki
Quoted 47 lines · Sergey Matyukevich
Enable AP6212a WiFi/BT combo chip on orange-pi-zero-plus2 board:
- WiFi SDIO interface is connected to MMC1
- WiFiREG_ONpin connected to gpio PA9: attach to mmc-pwrseq
- WiFiHOST_WAKEpin connected to gpio PL7
- BT is connected to UART1Signed-off-by Sergey Matyukevich <[email protected]>--- .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +21
-0@@ -64,6 +64,13 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <200>; + }; }; &mmc0 {@@ -75,6 +82,25 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>;
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 102
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +4
-0+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ + interrupt-names = "host-wake"; + }; +};Did you observe this issue, I'm using firmware from buildroot and couldn't find any *.txt from brcm/ I believe we need ass text file for firmware details, did you tried the same from BR?
The text file is not provided as part of the linux-firmware repository. You have to fetch it from your vendor BSP. This is documented not just for sunxi, but also for the raspberry pi 3.
ChenYu
Quoted 19 lines
Log:
[ 1.872235] mmc1: new high speed SDIO card at address 0001 [ 1.880919] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001 [ 1.908802] EXT4-fs (mmcblk0p1): re-mounted. Opts: data=ordered [ 1.927199] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.txt failed with error -2 [ 2.963478] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 3.971888] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000):clkctl
0x50thanks!
--
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
PATCH 2/2 arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
Quoted 58 lines · Chen-Yu Tsai
Quoted 48 lines · Jagan Teki
Quoted 47 lines · Sergey Matyukevich
Enable AP6212a WiFi/BT combo chip on orange-pi-zero-plus2 board:
- WiFi SDIO interface is connected to MMC1
- WiFiREG_ONpin connected to gpio PA9: attach to mmc-pwrseq
- WiFiHOST_WAKEpin connected to gpio PL7
- BT is connected to UART1Signed-off-by Sergey Matyukevich <[email protected]>--- .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +21
-0@@ -64,6 +64,13 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <200>; + }; }; &mmc0 {@@ -75,6 +82,25 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>;Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 102
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +4
-0+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ + interrupt-names = "host-wake"; + }; +};Did you observe this issue, I'm using firmware from buildroot and couldn't find any *.txt from brcm/ I believe we need ass text file for firmware details, did you tried the same from BR?
Quoted 3 lines
The text file is not provided as part of the linux-firmware repository. You have to fetch it from your vendor BSP. This is documented not just for sunxi, but also for the raspberry pi 3.
Yes, took the firmware and txt from [1] and observed the timeout.
# modprobe -a brcmfmac [ 146.376922] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 146.418193] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 146.425801] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 146.434464] cfg80211: failed to load regulatory.db # [ 146.716016] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001 [ 147.781032] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 148.812968] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 149.824945] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[1] https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm80211/brcm
thanks!
Signature · 4 lines
Jagan Teki Senior Linux Kernel Engineer | Amarula Solutions U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH 2/2 arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
Quoted 81 lines · Jagan Teki
Quoted 58 lines · Chen-Yu Tsai
Quoted 48 lines · Jagan Teki
Quoted 47 lines · Sergey Matyukevich
Enable AP6212a WiFi/BT combo chip on orange-pi-zero-plus2 board:
- WiFi SDIO interface is connected to MMC1
- WiFiREG_ONpin connected to gpio PA9: attach to mmc-pwrseq
- WiFiHOST_WAKEpin connected to gpio PL7
- BT is connected to UART1Signed-off-by Sergey Matyukevich <[email protected]>--- .../allwinner/sun50i-h5-orangepi-zero-plus2.dts | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +21
-0@@ -64,6 +64,13 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ + post-power-on-delay-ms = <200>; + }; }; &mmc0 {@@ -75,6 +82,25 @@ status = "okay"; }; +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins_a>; + vmmc-supply = <®_vcc3v3>; + vqmmc-supply = <®_vcc3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>;Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts line 102
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +4
-0+ interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ + interrupt-names = "host-wake"; + }; +};Did you observe this issue, I'm using firmware from buildroot and couldn't find any *.txt from brcm/ I believe we need ass text file for firmware details, did you tried the same from BR?
Quoted 3 lines
The text file is not provided as part of the linux-firmware repository. You have to fetch it from your vendor BSP. This is documented not just for sunxi, but also for the raspberry pi 3.
Yes, took the firmware and txt from [1] and observed the timeout.
# modprobe -a brcmfmac [ 146.376922] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 146.418193] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 146.425801] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 146.434464] cfg80211: failed to load regulatory.db # [ 146.716016] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001 [ 147.781032] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 148.812968] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 149.824945] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
There are several NVRAM file floating around. With some of them I observed the same issue as yours. The NVRAM file from [2] worked fine with AP6212 on my OrangePi Zero Plus2 v1.0. I haven't yet looked into NVRAM differences though...
[2] https://github.com/BPI-SINOVOIP/BPI-files/blob/master/others/brcm/lib/firmware/ap6212/nvram.txt
Regards,
Sergey
PATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
In reply to Jagan TekiHello Maxime,
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines
Quoted 2 lines
Do you plan to accept this patch as well ? Or you would prefer to wait for the confirmation from Jagan as well ?
I'm happy with the patch, but I was under the impression that the discussion had not settled yet. If it did, then yeah I'll merge it :)
Both schematics and my tests on v1.0 board confirm that this fix is ok. However we haven't yet got the ACK from Jagan, the original submitter of this dts file. FWIW discussion was mostly about the problems with his setup and not about the fix itself.
Quoted 5 lines
Quoted 3 lines
Jagan,
did you have a chance to resolve the issues with your setup and verify that boot from sd-card is fixed by this patch ?Acked-by Jagan Teki <[email protected]>
It looks like discussion has finally settled: here is ACK from Jagan. Could you please take this patch.
Regards,
Sergey
Maxime Ripard
AppliedPATCH 1/2 arm64: dts: orange-pi-zero-plus2: fix sdcard detect
In reply to Sergey MatyukevichQuoted 4 lines · Sergey Matyukevich
The sdcard detect pin on orange-pi-zero-plus2 is pulled up. Fix cd-gpio description to enable sdcard detect.
Signed-off-by Sergey Matyukevich <[email protected]>
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: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171205/80662e15/attachment.sig>