All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: orange-pi-zero-plus2 mmc and wifi
@ 2017-11-03 19:58 ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-03 19:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jagan Teki

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(-)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 0/2] arm64: dts: orange-pi-zero-plus2 mmc and wifi
@ 2017-11-03 19:58 ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-03 19:58 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-03 19:58 ` Sergey Matyukevich
@ 2017-11-03 19:58     ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-03 19:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jagan Teki,
	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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index b6b7a561df8c..a42fd79a62a3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -71,7 +71,7 @@
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
-	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
 
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-03 19:58     ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-03 19:58 UTC (permalink / raw)
  To: linux-arm-kernel

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 <geomatsi@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index b6b7a561df8c..a42fd79a62a3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -71,7 +71,7 @@
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
-	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
  2017-11-03 19:58 ` Sergey Matyukevich
@ 2017-11-03 19:58     ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-03 19:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jagan Teki,
	Sergey Matyukevich

Enable 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

Signed-off-by: Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index a42fd79a62a3..d415b7b67cce 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -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 = <&reg_vcc3v3>;
+	vqmmc-supply = <&reg_vcc3v3>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+
+	brcmf: wifi@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";
+};
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
@ 2017-11-03 19:58     ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-03 19:58 UTC (permalink / raw)
  To: linux-arm-kernel

Enable 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

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
index a42fd79a62a3..d415b7b67cce 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
@@ -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 = <&reg_vcc3v3>;
+	vqmmc-supply = <&reg_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";
+};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-03 19:58     ` Sergey Matyukevich
@ 2017-11-04 12:03         ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-04 12:03 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> index b6b7a561df8c..a42fd79a62a3 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> @@ -71,7 +71,7 @@
>         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>         vmmc-supply = <&reg_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@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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-04 12:03         ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-04 12:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> 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 <geomatsi@gmail.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> index b6b7a561df8c..a42fd79a62a3 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> @@ -71,7 +71,7 @@
>         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>         vmmc-supply = <&reg_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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-04 12:03         ` Jagan Teki
  (?)
@ 2017-11-04 15:39         ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-04 15:39 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

> Hi,
>


> > 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 <geomatsi@gmail.com>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > index b6b7a561df8c..a42fd79a62a3 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > @@ -71,7 +71,7 @@
> >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> >         vmmc-supply = <&reg_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

[-- Attachment #2: Type: text/html, Size: 2159 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-04 12:03         ` Jagan Teki
@ 2017-11-04 15:42             ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-04 15:42 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

> > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > index b6b7a561df8c..a42fd79a62a3 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > @@ -71,7 +71,7 @@
> >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> >         vmmc-supply = <&reg_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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-04 15:42             ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-04 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

> > 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 <geomatsi@gmail.com>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > index b6b7a561df8c..a42fd79a62a3 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > @@ -71,7 +71,7 @@
> >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> >         vmmc-supply = <&reg_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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-04 15:42             ` Sergey Matyukevich
  (?)
@ 2017-11-04 15:47             ` Jagan Teki
       [not found]               ` <CAMty3ZCxXUaBf3t=3d7D+RU6rp83oJw8BHADU3TYDeM4Vx_k-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  -1 siblings, 1 reply; 54+ messages in thread
From: Jagan Teki @ 2017-11-04 15:47 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

On 04-Nov-2017 9:12 PM, "Sergey Matyukevich" <geomatsi@gmail.com> wrote:

> > 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 <geomatsi@gmail.com>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > index b6b7a561df8c..a42fd79a62a3 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > @@ -71,7 +71,7 @@
> >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> >         vmmc-supply = <&reg_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

[-- Attachment #2: Type: text/html, Size: 2465 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-04 15:47             ` Jagan Teki
@ 2017-11-04 16:22                   ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-04 16:22 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

> > > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > ---
> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > index b6b7a561df8c..a42fd79a62a3 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > @@ -71,7 +71,7 @@
> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> > >         vmmc-supply = <&reg_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

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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-04 16:22                   ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-04 16:22 UTC (permalink / raw)
  To: linux-arm-kernel

> > > 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 <geomatsi@gmail.com>
> > > ---
> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > index b6b7a561df8c..a42fd79a62a3 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > @@ -71,7 +71,7 @@
> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> > >         vmmc-supply = <&reg_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

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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-04 16:22                   ` Sergey Matyukevich
@ 2017-11-06 10:28                       ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-06 10:28 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Sat, Nov 4, 2017 at 9:52 PM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> > > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> > > ---
>> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>> > >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > >
>> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > index b6b7a561df8c..a42fd79a62a3 100644
>> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > @@ -71,7 +71,7 @@
>> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>> > >         vmmc-supply = <&reg_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
>
> 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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-06 10:28                       ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-06 10:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Nov 4, 2017 at 9:52 PM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
>> > > 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 <geomatsi@gmail.com>
>> > > ---
>> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>> > >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > >
>> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > index b6b7a561df8c..a42fd79a62a3 100644
>> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > @@ -71,7 +71,7 @@
>> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>> > >         vmmc-supply = <&reg_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
>
> 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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-06 10:28                       ` Jagan Teki
@ 2017-11-06 11:25                           ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 11:25 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Mon, Nov 06, 2017 at 03:58:15PM +0530, Jagan Teki wrote:
> On Sat, Nov 4, 2017 at 9:52 PM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >> > > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> > > ---
> >> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> >> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> > >
> >> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> > > index b6b7a561df8c..a42fd79a62a3 100644
> >> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> > > @@ -71,7 +71,7 @@
> >> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> >> > >         vmmc-supply = <&reg_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
> >
> > 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

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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-06 11:25                           ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 11:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 06, 2017 at 03:58:15PM +0530, Jagan Teki wrote:
> On Sat, Nov 4, 2017 at 9:52 PM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> >> > > 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 <geomatsi@gmail.com>
> >> > > ---
> >> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> >> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> > >
> >> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> > > index b6b7a561df8c..a42fd79a62a3 100644
> >> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >> > > @@ -71,7 +71,7 @@
> >> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> >> > >         vmmc-supply = <&reg_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
> >
> > 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

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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-04 15:42             ` Sergey Matyukevich
@ 2017-11-06 12:26                 ` Maxime Ripard
  -1 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-11-06 12:26 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Jagan Teki, Chen-Yu Tsai, Rob Herring, Mark Rutland, devicetree,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

On Sat, Nov 04, 2017 at 06:42:21PM +0300, Sergey Matyukevich wrote:
> > > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > ---
> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > index b6b7a561df8c..a42fd79a62a3 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > @@ -71,7 +71,7 @@
> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> > >         vmmc-supply = <&reg_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.

Looking at the schematics, it definitely looks like it's active low.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-06 12:26                 ` Maxime Ripard
  0 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-11-06 12:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Nov 04, 2017 at 06:42:21PM +0300, Sergey Matyukevich wrote:
> > > 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 <geomatsi@gmail.com>
> > > ---
> > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > index b6b7a561df8c..a42fd79a62a3 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > @@ -71,7 +71,7 @@
> > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> > >         vmmc-supply = <&reg_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.

Looking at the schematics, it definitely looks like it's active low.

Maxime

-- 
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>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-06 12:26                 ` Maxime Ripard
@ 2017-11-06 16:13                   ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 16:13 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Jagan Teki, Chen-Yu Tsai, Rob Herring, Mark Rutland, devicetree,
	linux-arm-kernel

Hello Maxime,

> > > > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > > ---
> > > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > > index b6b7a561df8c..a42fd79a62a3 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > > @@ -71,7 +71,7 @@
> > > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> > > >         vmmc-supply = <&reg_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.
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-06 16:13                   ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-06 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Maxime,

> > > > 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 <geomatsi@gmail.com>
> > > > ---
> > > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > > index b6b7a561df8c..a42fd79a62a3 100644
> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> > > > @@ -71,7 +71,7 @@
> > > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
> > > >         vmmc-supply = <&reg_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.
> 
> 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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-06 16:13                   ` Sergey Matyukevich
@ 2017-11-07  7:42                       ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-07  7:42 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Mon, Nov 6, 2017 at 9:43 PM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello Maxime,
>
>> > > > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> > > > ---
>> > > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > > >
>> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > > index b6b7a561df8c..a42fd79a62a3 100644
>> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > > @@ -71,7 +71,7 @@
>> > > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>> > > >         vmmc-supply = <&reg_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.
>>
>> 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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-07  7:42                       ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-07  7:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 6, 2017 at 9:43 PM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> Hello Maxime,
>
>> > > > 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 <geomatsi@gmail.com>
>> > > > ---
>> > > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > > >
>> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > > index b6b7a561df8c..a42fd79a62a3 100644
>> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> > > > @@ -71,7 +71,7 @@
>> > > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>> > > >         vmmc-supply = <&reg_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.
>>
>> 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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-07  7:42                       ` Jagan Teki
@ 2017-11-07 17:17                           ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-07 17:17 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Tue, Nov 7, 2017 at 1:12 PM, Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> On Mon, Nov 6, 2017 at 9:43 PM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Hello Maxime,
>>
>>> > > > 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> > > > ---
>>> > > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>>> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
>>> > > >
>>> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> > > > index b6b7a561df8c..a42fd79a62a3 100644
>>> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> > > > @@ -71,7 +71,7 @@
>>> > > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>>> > > >         vmmc-supply = <&reg_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.
>>>
>>> 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/

Look like something broken for H5 and A64 between v4.14-rc8 to latest

thanks!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-07 17:17                           ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-07 17:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Nov 7, 2017 at 1:12 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Mon, Nov 6, 2017 at 9:43 PM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
>> Hello Maxime,
>>
>>> > > > 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 <geomatsi@gmail.com>
>>> > > > ---
>>> > > >  arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 2 +-
>>> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
>>> > > >
>>> > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> > > > index b6b7a561df8c..a42fd79a62a3 100644
>>> > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> > > > @@ -71,7 +71,7 @@
>>> > > >         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
>>> > > >         vmmc-supply = <&reg_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.
>>>
>>> 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/

Look like something broken for H5 and A64 between v4.14-rc8 to latest

thanks!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-07 17:17                           ` Jagan Teki
@ 2017-11-07 20:12                               ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-07 20:12 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

Hi,

> >>> > 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 ?
> >
> > 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/
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-07 20:12                               ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-07 20:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

> >>> > 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 ?
> >
> > 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/
> 
> 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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-07 20:12                               ` Sergey Matyukevich
@ 2017-11-08 11:25                                   ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-08 11:25 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Wed, Nov 8, 2017 at 1:42 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
>> >>> > 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 ?
>> >
>> > 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/
>>
>> 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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-08 11:25                                   ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-08 11:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 8, 2017 at 1:42 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> Hi,
>
>> >>> > 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 ?
>> >
>> > 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/
>>
>> 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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
  2017-11-03 19:58     ` Sergey Matyukevich
@ 2017-11-12 20:22         ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-12 20:22 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jagan Teki

> Enable 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

Hi Maxime and all,

Any comments regarding this patch ?

Regards,
Sergey
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
@ 2017-11-12 20:22         ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-12 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

> Enable 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

Hi Maxime and all,

Any comments regarding this patch ?

Regards,
Sergey

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
  2017-11-03 19:58     ` Sergey Matyukevich
@ 2017-11-13  9:25         ` Maxime Ripard
  -1 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-11-13  9:25 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jagan Teki

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

On Fri, Nov 03, 2017 at 10:58:55PM +0300, Sergey Matyukevich wrote:
> Enable 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
> 
> Signed-off-by: Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Queued for 4.16, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
@ 2017-11-13  9:25         ` Maxime Ripard
  0 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-11-13  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 03, 2017 at 10:58:55PM +0300, Sergey Matyukevich wrote:
> Enable 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
> 
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>

Queued for 4.16, thanks!
Maxime

-- 
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>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-08 11:25                                   ` Jagan Teki
@ 2017-11-13 19:24                                       ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-13 19:24 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Jagan Teki, Chen-Yu Tsai, Rob Herring, Mark Rutland, devicetree,
	linux-arm-kernel

Hello Maxime,

On Wed, Nov 08, 2017 at 04:55:32PM +0530, Jagan Teki wrote:
> On Wed, Nov 8, 2017 at 1:42 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Hi,
> >
> >> >>> > 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 ?
> >> >
> >> > 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/
> >>
> >> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-13 19:24                                       ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-13 19:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Maxime,

On Wed, Nov 08, 2017 at 04:55:32PM +0530, Jagan Teki wrote:
> On Wed, Nov 8, 2017 at 1:42 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> > Hi,
> >
> >> >>> > 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 ?
> >> >
> >> > 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/
> >>
> >> 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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-13 19:24                                       ` Sergey Matyukevich
@ 2017-11-14 14:39                                           ` Maxime Ripard
  -1 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-11-14 14:39 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Jagan Teki, Chen-Yu Tsai, Rob Herring, Mark Rutland, devicetree,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]

Hi Sergey,

On Mon, Nov 13, 2017 at 10:24:11PM +0300, Sergey Matyukevich wrote:
> Hello Maxime,
> 
> On Wed, Nov 08, 2017 at 04:55:32PM +0530, Jagan Teki wrote:
> > On Wed, Nov 8, 2017 at 1:42 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > Hi,
> > >
> > >> >>> > 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 ?
> > >> >
> > >> > 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/
> > >>
> > >> 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 ?

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

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-14 14:39                                           ` Maxime Ripard
  0 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-11-14 14:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sergey,

On Mon, Nov 13, 2017 at 10:24:11PM +0300, Sergey Matyukevich wrote:
> Hello Maxime,
> 
> On Wed, Nov 08, 2017 at 04:55:32PM +0530, Jagan Teki wrote:
> > On Wed, Nov 8, 2017 at 1:42 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> > > Hi,
> > >
> > >> >>> > 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 ?
> > >> >
> > >> > 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/
> > >>
> > >> 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 ?

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

-- 
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>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-14 14:39                                           ` Maxime Ripard
@ 2017-11-14 18:53                                               ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-14 18:53 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Jagan Teki, Chen-Yu Tsai, Rob Herring, Mark Rutland, devicetree,
	linux-arm-kernel

Hello Maxime, Jagan,

> > > >> >>> > 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 ?
> > > >> >
> > > >> > 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/
> > > >>
> > > >> 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 ?
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-14 18:53                                               ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-14 18:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Maxime, Jagan,

> > > >> >>> > 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 ?
> > > >> >
> > > >> > 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/
> > > >>
> > > >> 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 ?
> 
> 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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-14 18:53                                               ` Sergey Matyukevich
@ 2017-11-21 13:41                                                   ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-21 13:41 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Wed, Nov 15, 2017 at 12:23 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello Maxime, Jagan,
>
>> > > >> >>> > 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 ?
>> > > >> >
>> > > >> > 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/
>> > > >>
>> > > >> 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 ?
>>
>> 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 ?

Acked-by: Jagan Teki <jagan-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-11-21 13:41                                                   ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-21 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 15, 2017 at 12:23 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> Hello Maxime, Jagan,
>
>> > > >> >>> > 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 ?
>> > > >> >
>> > > >> > 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/
>> > > >>
>> > > >> 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 ?
>>
>> 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 ?

Acked-by: Jagan Teki <jagan@openedev.com>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
  2017-11-03 19:58     ` Sergey Matyukevich
@ 2017-11-29 13:53         ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-29 13:53 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Enable 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
>
> Signed-off-by: Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> index a42fd79a62a3..d415b7b67cce 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> @@ -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 = <&reg_vcc3v3>;
> +       vqmmc-supply = <&reg_vcc3v3>;
> +       mmc-pwrseq = <&wifi_pwrseq>;
> +       bus-width = <4>;
> +       non-removable;
> +       status = "okay";
> +
> +       brcmf: wifi@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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
@ 2017-11-29 13:53         ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-29 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> Enable 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
>
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> ---
>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> index a42fd79a62a3..d415b7b67cce 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> @@ -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 = <&reg_vcc3v3>;
> +       vqmmc-supply = <&reg_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";
> +       };
> +};

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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
  2017-11-29 13:53         ` Jagan Teki
@ 2017-11-29 14:22             ` Chen-Yu Tsai
  -1 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-11-29 14:22 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Sergey Matyukevich, Maxime Ripard, Chen-Yu Tsai, Rob Herring,
	Mark Rutland, devicetree, linux-arm-kernel

On Wed, Nov 29, 2017 at 9:53 PM, Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> Enable 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
>>
>> Signed-off-by: Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> ---
>>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> index a42fd79a62a3..d415b7b67cce 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> @@ -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 = <&reg_vcc3v3>;
>> +       vqmmc-supply = <&reg_vcc3v3>;
>> +       mmc-pwrseq = <&wifi_pwrseq>;
>> +       bus-width = <4>;
>> +       non-removable;
>> +       status = "okay";
>> +
>> +       brcmf: wifi@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?

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

>
> 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!
> --
> Jagan Teki
> Senior Linux Kernel Engineer | Amarula Solutions
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
@ 2017-11-29 14:22             ` Chen-Yu Tsai
  0 siblings, 0 replies; 54+ messages in thread
From: Chen-Yu Tsai @ 2017-11-29 14:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 29, 2017 at 9:53 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
>> Enable 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
>>
>> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
>> ---
>>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> index a42fd79a62a3..d415b7b67cce 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>> @@ -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 = <&reg_vcc3v3>;
>> +       vqmmc-supply = <&reg_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";
>> +       };
>> +};
>
> 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

>
> 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!
> --
> Jagan Teki
> Senior Linux Kernel Engineer | Amarula Solutions
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
  2017-11-29 14:22             ` Chen-Yu Tsai
@ 2017-11-29 18:09                 ` Jagan Teki
  -1 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-29 18:09 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Sergey Matyukevich, Maxime Ripard, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Wed, Nov 29, 2017 at 7:52 PM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote:
> On Wed, Nov 29, 2017 at 9:53 PM, Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
>> On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>> Enable 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
>>>
>>> Signed-off-by: Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> ---
>>>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
>>>  1 file changed, 32 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> index a42fd79a62a3..d415b7b67cce 100644
>>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> @@ -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 = <&reg_vcc3v3>;
>>> +       vqmmc-supply = <&reg_vcc3v3>;
>>> +       mmc-pwrseq = <&wifi_pwrseq>;
>>> +       bus-width = <4>;
>>> +       non-removable;
>>> +       status = "okay";
>>> +
>>> +       brcmf: wifi@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?
>
> 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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
@ 2017-11-29 18:09                 ` Jagan Teki
  0 siblings, 0 replies; 54+ messages in thread
From: Jagan Teki @ 2017-11-29 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 29, 2017 at 7:52 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> On Wed, Nov 29, 2017 at 9:53 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
>> On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
>>> Enable 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
>>>
>>> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
>>> ---
>>>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
>>>  1 file changed, 32 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> index a42fd79a62a3..d415b7b67cce 100644
>>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
>>> @@ -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 = <&reg_vcc3v3>;
>>> +       vqmmc-supply = <&reg_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";
>>> +       };
>>> +};
>>
>> 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.

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!
-- 
Jagan Teki
Senior Linux Kernel Engineer | Amarula Solutions
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
  2017-11-29 18:09                 ` Jagan Teki
@ 2017-11-29 18:21                     ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-29 18:21 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Chen-Yu Tsai, Maxime Ripard, Rob Herring, Mark Rutland,
	devicetree, linux-arm-kernel

On Wed, Nov 29, 2017 at 11:39:35PM +0530, Jagan Teki wrote:
> On Wed, Nov 29, 2017 at 7:52 PM, Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> wrote:
> > On Wed, Nov 29, 2017 at 9:53 PM, Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> wrote:
> >> On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>> Enable 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
> >>>
> >>> Signed-off-by: Sergey Matyukevich <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >>> ---
> >>>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
> >>>  1 file changed, 32 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >>> index a42fd79a62a3..d415b7b67cce 100644
> >>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >>> @@ -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 = <&reg_vcc3v3>;
> >>> +       vqmmc-supply = <&reg_vcc3v3>;
> >>> +       mmc-pwrseq = <&wifi_pwrseq>;
> >>> +       bus-width = <4>;
> >>> +       non-removable;
> >>> +       status = "okay";
> >>> +
> >>> +       brcmf: wifi@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?
> >
> > 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


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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo
@ 2017-11-29 18:21                     ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-11-29 18:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 29, 2017 at 11:39:35PM +0530, Jagan Teki wrote:
> On Wed, Nov 29, 2017 at 7:52 PM, Chen-Yu Tsai <wens@csie.org> wrote:
> > On Wed, Nov 29, 2017 at 9:53 PM, Jagan Teki <jagan@amarulasolutions.com> wrote:
> >> On Sat, Nov 4, 2017 at 1:28 AM, Sergey Matyukevich <geomatsi@gmail.com> wrote:
> >>> Enable 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
> >>>
> >>> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> >>> ---
> >>>  .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 32 ++++++++++++++++++++++
> >>>  1 file changed, 32 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >>> index a42fd79a62a3..d415b7b67cce 100644
> >>> --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts
> >>> @@ -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 = <&reg_vcc3v3>;
> >>> +       vqmmc-supply = <&reg_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";
> >>> +       };
> >>> +};
> >>
> >> 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.
> 
> 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


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

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-21 13:41                                                   ` Jagan Teki
@ 2017-12-03 20:13                                                       ` Sergey Matyukevich
  -1 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-12-03 20:13 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Jagan Teki, Chen-Yu Tsai, Rob Herring, Mark Rutland, devicetree,
	linux-arm-kernel

Hello Maxime,

> >> > 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 ?
> 
> Acked-by: Jagan Teki <jagan-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org>

It looks like discussion has finally settled: here is ACK from Jagan.
Could you please take this patch.

Regards,
Sergey
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-12-03 20:13                                                       ` Sergey Matyukevich
  0 siblings, 0 replies; 54+ messages in thread
From: Sergey Matyukevich @ 2017-12-03 20:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Maxime,

> >> > 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 ?
> 
> Acked-by: Jagan Teki <jagan@openedev.com>

It looks like discussion has finally settled: here is ACK from Jagan.
Could you please take this patch.

Regards,
Sergey

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
  2017-11-03 19:58     ` Sergey Matyukevich
@ 2017-12-05  9:15         ` Maxime Ripard
  -1 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-12-05  9:15 UTC (permalink / raw)
  To: Sergey Matyukevich
  Cc: Chen-Yu Tsai, Rob Herring, Mark Rutland,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jagan Teki

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

On Fri, Nov 03, 2017 at 10:58:54PM +0300, Sergey Matyukevich wrote:
> 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 <geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect
@ 2017-12-05  9:15         ` Maxime Ripard
  0 siblings, 0 replies; 54+ messages in thread
From: Maxime Ripard @ 2017-12-05  9:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 03, 2017 at 10:58:54PM +0300, Sergey Matyukevich wrote:
> 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 <geomatsi@gmail.com>

Applied, thanks!
Maxime

-- 
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>

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2017-12-05  9:15 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 19:58 [PATCH 0/2] arm64: dts: orange-pi-zero-plus2 mmc and wifi Sergey Matyukevich
2017-11-03 19:58 ` Sergey Matyukevich
     [not found] ` <20171103195855.15283-1-geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-03 19:58   ` [PATCH 1/2] arm64: dts: orange-pi-zero-plus2: fix sdcard detect Sergey Matyukevich
2017-11-03 19:58     ` Sergey Matyukevich
     [not found]     ` <20171103195855.15283-2-geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-04 12:03       ` Jagan Teki
2017-11-04 12:03         ` Jagan Teki
2017-11-04 15:39         ` Sergey Matyukevich
     [not found]         ` <CAMty3ZCs8kq1vUGLOi0ZghY7n0iXgUQ1E=ngBO6Y4wm7wMLF7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-04 15:42           ` Sergey Matyukevich
2017-11-04 15:42             ` Sergey Matyukevich
2017-11-04 15:47             ` Jagan Teki
     [not found]               ` <CAMty3ZCxXUaBf3t=3d7D+RU6rp83oJw8BHADU3TYDeM4Vx_k-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-04 16:22                 ` Sergey Matyukevich
2017-11-04 16:22                   ` Sergey Matyukevich
     [not found]                   ` <20171104162206.gowih7h7og3fk7rk-tVm4GcgtBpsfMUw/CLfKLg@public.gmane.org>
2017-11-06 10:28                     ` Jagan Teki
2017-11-06 10:28                       ` Jagan Teki
     [not found]                       ` <CAMty3ZBi1pscPLQyc4S075pvzyh-2wsSPnqqEuQgDFQ_c5oyFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-06 11:25                         ` Sergey Matyukevich
2017-11-06 11:25                           ` Sergey Matyukevich
     [not found]             ` <20171104154221.ao7kkcwqhnja3cxe-tVm4GcgtBpsfMUw/CLfKLg@public.gmane.org>
2017-11-06 12:26               ` Maxime Ripard
2017-11-06 12:26                 ` Maxime Ripard
2017-11-06 16:13                 ` Sergey Matyukevich
2017-11-06 16:13                   ` Sergey Matyukevich
     [not found]                   ` <20171106161306.tq6yeq6bq36ridj3-tVm4GcgtBpsfMUw/CLfKLg@public.gmane.org>
2017-11-07  7:42                     ` Jagan Teki
2017-11-07  7:42                       ` Jagan Teki
     [not found]                       ` <CAMty3ZCYQx0MfiJnOZPtO4nSAtOrGicOzw_x_AznTiEW8h2sLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-07 17:17                         ` Jagan Teki
2017-11-07 17:17                           ` Jagan Teki
     [not found]                           ` <CAMty3ZANhL7cHqYw4VY2Sj_JUZGyqFZ+7pLssc1tniN3BdupOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-07 20:12                             ` Sergey Matyukevich
2017-11-07 20:12                               ` Sergey Matyukevich
     [not found]                               ` <20171107201245.gptgfli54o6eqmrj-tVm4GcgtBpsfMUw/CLfKLg@public.gmane.org>
2017-11-08 11:25                                 ` Jagan Teki
2017-11-08 11:25                                   ` Jagan Teki
     [not found]                                   ` <CAMty3ZB3aXCsd9VkibjxPdA=BXvXr3nMbGJJvtZN_z2SGVUAXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-13 19:24                                     ` Sergey Matyukevich
2017-11-13 19:24                                       ` Sergey Matyukevich
     [not found]                                       ` <20171113192411.kmohcthzickk4n5v-tVm4GcgtBpsfMUw/CLfKLg@public.gmane.org>
2017-11-14 14:39                                         ` Maxime Ripard
2017-11-14 14:39                                           ` Maxime Ripard
     [not found]                                           ` <20171114143941.3qgdlqn4xfarfhql-ZC1Zs529Oq4@public.gmane.org>
2017-11-14 18:53                                             ` Sergey Matyukevich
2017-11-14 18:53                                               ` Sergey Matyukevich
     [not found]                                               ` <20171114185315.gwyacchfct4zvyif-tVm4GcgtBpsfMUw/CLfKLg@public.gmane.org>
2017-11-21 13:41                                                 ` Jagan Teki
2017-11-21 13:41                                                   ` Jagan Teki
     [not found]                                                   ` <CAMty3ZDQqaiZ0RxtngWdX9PCW2+tzXLVB64heHLjRBeVF2-FCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-03 20:13                                                     ` Sergey Matyukevich
2017-12-03 20:13                                                       ` Sergey Matyukevich
2017-12-05  9:15       ` Maxime Ripard
2017-12-05  9:15         ` Maxime Ripard
2017-11-03 19:58   ` [PATCH 2/2] arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo Sergey Matyukevich
2017-11-03 19:58     ` Sergey Matyukevich
     [not found]     ` <20171103195855.15283-3-geomatsi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-12 20:22       ` Sergey Matyukevich
2017-11-12 20:22         ` Sergey Matyukevich
2017-11-13  9:25       ` Maxime Ripard
2017-11-13  9:25         ` Maxime Ripard
2017-11-29 13:53       ` Jagan Teki
2017-11-29 13:53         ` Jagan Teki
     [not found]         ` <CAMty3ZAiDvAG-P-c0J7vKaDyRWQ2CQobLA_xycRva5B20W6SOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29 14:22           ` Chen-Yu Tsai
2017-11-29 14:22             ` Chen-Yu Tsai
     [not found]             ` <CAGb2v66mNeUL0Pk60aB2s98GK2WiSdhk2_QiZJuMz0Rt=NmEyg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29 18:09               ` Jagan Teki
2017-11-29 18:09                 ` Jagan Teki
     [not found]                 ` <CAMty3ZDkM7apyoJESQm0zU1t-pNFdj8ynrZJoTstvgs98Aw6ZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29 18:21                   ` Sergey Matyukevich
2017-11-29 18:21                     ` Sergey Matyukevich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.