linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dtbs: hikey970: add wifi support
@ 2020-08-26  5:57 Mauro Carvalho Chehab
  2020-08-26 12:41 ` Robin Murphy
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2020-08-26  5:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, John Stultz,
	Manivannan Sadhasivam, Wei Xu, linux-arm-kernel, devicetree,
	linux-kernel

The dwmmc2 is used on Hikey 970 for WiFi support. The
hi3670.dtsi adds it, but with status="disabled".

For WiFi to work,it needs to be enabled. While here, add
the missing properties:

	#address-cells = <0x1>;
	#size-cells = <0x0>;

and add
	ti,non-removable

To DT properties, as the WiFi support is on a non-removable slot.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
index f218acceec0b..a2b0d2a1d09d 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
@@ -402,6 +402,7 @@ &sd_clk_cfg_func
 
 &dwmmc2 { /* WIFI */
 	bus-width = <0x4>;
+	ti,non-removable;
 	non-removable;
 	broken-cd;
 	cap-power-off-card;
@@ -409,8 +410,12 @@ &dwmmc2 { /* WIFI */
 	pinctrl-0 = <&sdio_pmx_func
 		     &sdio_clk_cfg_func
 		     &sdio_cfg_func>;
+	status = "ok";
+
 	/* WL_EN */
 	vmmc-supply = <&wlan_en>;
+	#address-cells = <0x1>;
+	#size-cells = <0x0>;
 	status = "ok";
 
 	wlcore: wlcore@2 {
-- 
2.26.2


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

* Re: [PATCH] dtbs: hikey970: add wifi support
  2020-08-26  5:57 [PATCH] dtbs: hikey970: add wifi support Mauro Carvalho Chehab
@ 2020-08-26 12:41 ` Robin Murphy
  2020-08-26 13:58   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Murphy @ 2020-08-26 12:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring
  Cc: devicetree, Manivannan Sadhasivam, linuxarm, Wei Xu,
	linux-kernel, John Stultz, mauro.chehab, linux-arm-kernel

On 2020-08-26 06:57, Mauro Carvalho Chehab wrote:
> The dwmmc2 is used on Hikey 970 for WiFi support. The
> hi3670.dtsi adds it, but with status="disabled".
> 
> For WiFi to work,it needs to be enabled. While here, add
> the missing properties:
> 
> 	#address-cells = <0x1>;
> 	#size-cells = <0x0>;
> 
> and add
> 	ti,non-removable
> 
> To DT properties, as the WiFi support is on a non-removable slot.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
>   arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
> index f218acceec0b..a2b0d2a1d09d 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
> +++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
> @@ -402,6 +402,7 @@ &sd_clk_cfg_func
>   
>   &dwmmc2 { /* WIFI */
>   	bus-width = <0x4>;
> +	ti,non-removable;

Why? This property is only defined for OMAP HSMMC controllers, which 
this isn't, and you've already got the proper generic property right 
there below. Plus in terms of Linux it will have zero effect, since it's 
only parsed by the omap_hsmmc driver anyway.

>   	non-removable;
>   	broken-cd;
>   	cap-power-off-card;
> @@ -409,8 +410,12 @@ &dwmmc2 { /* WIFI */
>   	pinctrl-0 = <&sdio_pmx_func
>   		     &sdio_clk_cfg_func
>   		     &sdio_cfg_func>;
> +	status = "ok";

Have you noticed the context 6 lines below?

> +
>   	/* WL_EN */
>   	vmmc-supply = <&wlan_en>;
> +	#address-cells = <0x1>;
> +	#size-cells = <0x0>;

These are already present in hi3670.dtsi. AFAICS Wifi support was merged 
18 months ago :/

Robin.

>   	status = "ok";
>   
>   	wlcore: wlcore@2 {
>

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

* Re: [PATCH] dtbs: hikey970: add wifi support
  2020-08-26 12:41 ` Robin Murphy
@ 2020-08-26 13:58   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2020-08-26 13:58 UTC (permalink / raw)
  To: Robin Murphy
  Cc: Rob Herring, devicetree, Manivannan Sadhasivam, linuxarm, Wei Xu,
	linux-kernel, John Stultz, mauro.chehab, linux-arm-kernel

Em Wed, 26 Aug 2020 13:41:49 +0100
Robin Murphy <robin.murphy@arm.com> escreveu:

> On 2020-08-26 06:57, Mauro Carvalho Chehab wrote:
> > The dwmmc2 is used on Hikey 970 for WiFi support. The
> > hi3670.dtsi adds it, but with status="disabled".
> > 
> > For WiFi to work,it needs to be enabled. While here, add
> > the missing properties:
> > 
> > 	#address-cells = <0x1>;
> > 	#size-cells = <0x0>;
> > 
> > and add
> > 	ti,non-removable
> > 
> > To DT properties, as the WiFi support is on a non-removable slot.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> >   arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts | 5 +++++
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
> > index f218acceec0b..a2b0d2a1d09d 100644
> > --- a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
> > +++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
> > @@ -402,6 +402,7 @@ &sd_clk_cfg_func
> >   
> >   &dwmmc2 { /* WIFI */
> >   	bus-width = <0x4>;
> > +	ti,non-removable;  
> 
> Why? This property is only defined for OMAP HSMMC controllers, which 
> this isn't, and you've already got the proper generic property right 
> there below. Plus in terms of Linux it will have zero effect, since it's 
> only parsed by the omap_hsmmc driver anyway.
> 
> >   	non-removable;
> >   	broken-cd;
> >   	cap-power-off-card;
> > @@ -409,8 +410,12 @@ &dwmmc2 { /* WIFI */
> >   	pinctrl-0 = <&sdio_pmx_func
> >   		     &sdio_clk_cfg_func  
> >   		     &sdio_cfg_func>;  
> > +	status = "ok";  
> 
> Have you noticed the context 6 lines below?
> 
> > +
> >   	/* WL_EN */
> >   	vmmc-supply = <&wlan_en>;
> > +	#address-cells = <0x1>;
> > +	#size-cells = <0x0>;  
> 
> These are already present in hi3670.dtsi. AFAICS Wifi support was merged 
> 18 months ago :/

My mistake! It seems that I need more caffeine today.
I wrote this patch for an older Kernel version (4.19). 

I ended porting it to 5.8, with also required another patch,
due to a regression between Kernel 5.7 and 5.8:

	https://lore.kernel.org/lkml/f0a2cb7ea606f1a284d4c23cbf983da2954ce9b6.1598420968.git.mchehab+huawei@kernel.org/

Thanks,
Mauro

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

end of thread, other threads:[~2020-08-26 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26  5:57 [PATCH] dtbs: hikey970: add wifi support Mauro Carvalho Chehab
2020-08-26 12:41 ` Robin Murphy
2020-08-26 13:58   ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).