diff mbox series

ARM: dts: sun8i-h3: Fix wifi in Beelink X2 DT

Message ID 20190516161039.18534-1-jernej.skrabec@siol.net (mailing list archive)
State New, archived
Headers show
Series ARM: dts: sun8i-h3: Fix wifi in Beelink X2 DT | expand

Commit Message

Jernej Škrabec May 16, 2019, 4:10 p.m. UTC
mmc1 node where wifi module is connected doesn't have properly defined
power supplies so wifi module is never powered up. Fix that by
specifying additional power supplies.

Additionally, this STB may have either Realtek or Broadcom based wifi
module. One based on Broadcom module also needs external clock to work
properly. Fix that by adding clock property to wifi_pwrseq node.

Fixes: e582b47a9252 ("ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Maxime Ripard May 17, 2019, 7:30 a.m. UTC | #1
Hi,

On Thu, May 16, 2019 at 06:10:39PM +0200, Jernej Skrabec wrote:
> mmc1 node where wifi module is connected doesn't have properly defined
> power supplies so wifi module is never powered up. Fix that by
> specifying additional power supplies.
>
> Additionally, this STB may have either Realtek or Broadcom based wifi
> module. One based on Broadcom module also needs external clock to work
> properly. Fix that by adding clock property to wifi_pwrseq node.
>
> Fixes: e582b47a9252 ("ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
>  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> index 6277f13f3eb3..6a0ac85b4616 100644
> --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> @@ -89,7 +89,10 @@
>
>  	wifi_pwrseq: wifi_pwrseq {
>  		compatible = "mmc-pwrseq-simple";
> +		pinctrl-names = "default";

pinctrl-names only make sense with another pinctrl-[0-255]
property. Did you forgot something here?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Jernej Škrabec May 18, 2019, 3:07 p.m. UTC | #2
Dne petek, 17. maj 2019 ob 09:30:48 CEST je Maxime Ripard napisal(a):
> Hi,
> 
> On Thu, May 16, 2019 at 06:10:39PM +0200, Jernej Skrabec wrote:
> > mmc1 node where wifi module is connected doesn't have properly defined
> > power supplies so wifi module is never powered up. Fix that by
> > specifying additional power supplies.
> > 
> > Additionally, this STB may have either Realtek or Broadcom based wifi
> > module. One based on Broadcom module also needs external clock to work
> > properly. Fix that by adding clock property to wifi_pwrseq node.
> > 
> > Fixes: e582b47a9252 ("ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB")
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> > 
> >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts index
> > 6277f13f3eb3..6a0ac85b4616 100644
> > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > @@ -89,7 +89,10 @@
> > 
> >  	wifi_pwrseq: wifi_pwrseq {
> >  	
> >  		compatible = "mmc-pwrseq-simple";
> > 
> > +		pinctrl-names = "default";
> 
> pinctrl-names only make sense with another pinctrl-[0-255]
> property. Did you forgot something here?

No, I just took BananaPi M2+ as a example, which has pinctrl-names property 
too and no "pinctrl-*". But digging through history of this DT, it seems that 
this is just leftover which somebody forgot to remove.

I'll send v2.

Best regards,
Jernej
Maxime Ripard May 20, 2019, 7:24 a.m. UTC | #3
On Sat, May 18, 2019 at 05:07:11PM +0200, Jernej Škrabec wrote:
> Dne petek, 17. maj 2019 ob 09:30:48 CEST je Maxime Ripard napisal(a):
> > Hi,
> >
> > On Thu, May 16, 2019 at 06:10:39PM +0200, Jernej Skrabec wrote:
> > > mmc1 node where wifi module is connected doesn't have properly defined
> > > power supplies so wifi module is never powered up. Fix that by
> > > specifying additional power supplies.
> > >
> > > Additionally, this STB may have either Realtek or Broadcom based wifi
> > > module. One based on Broadcom module also needs external clock to work
> > > properly. Fix that by adding clock property to wifi_pwrseq node.
> > >
> > > Fixes: e582b47a9252 ("ARM: dts: sun8i-h3: Add dts for the Beelink X2 STB")
> > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > > ---
> > >
> > >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts index
> > > 6277f13f3eb3..6a0ac85b4616 100644
> > > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > @@ -89,7 +89,10 @@
> > >
> > >  	wifi_pwrseq: wifi_pwrseq {
> > >
> > >  		compatible = "mmc-pwrseq-simple";
> > >
> > > +		pinctrl-names = "default";
> >
> > pinctrl-names only make sense with another pinctrl-[0-255]
> > property. Did you forgot something here?
>
> No, I just took BananaPi M2+ as a example, which has pinctrl-names property
> too and no "pinctrl-*". But digging through history of this DT, it seems that
> this is just leftover which somebody forgot to remove.
>
> I'll send v2.

This should be fixed in 5.2 thanks to the commit 75f9a058838b

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
index 6277f13f3eb3..6a0ac85b4616 100644
--- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
@@ -89,7 +89,10 @@ 
 
 	wifi_pwrseq: wifi_pwrseq {
 		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
 		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+		clocks = <&rtc 1>;
+		clock-names = "ext_clock";
 	};
 
 	sound_spdif {
@@ -155,6 +158,8 @@ 
 
 &mmc1 {
 	vmmc-supply = <&reg_vcc3v3>;
+	vqmmc-supply = <&reg_vcc3v3>;
+	mmc-pwrseq = <&wifi_pwrseq>;
 	bus-width = <4>;
 	non-removable;
 	status = "okay";