All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-08-29 21:43 ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-08-29 21:43 UTC (permalink / raw)
  To: Kalle Valo, Rob Herring, Mark Rutland
  Cc: Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard, Chen-Yu Tsai, Antony Antony

Add device tree binding documentation for Broadcom BCM43430
AMPAK AP6212A has this chip.

e.g
compatible = "brcm,bcm43430-fmac";

NanoPi NEO Plus2 has an AMPAK AP6212A WiFi module
with BCM43430 rev=1 inside.
brcmf_chip_recognition found AXI chip: BCM43430, rev=1
brcmf_ops_sdio_probe sdio vendor ID: 0x02d0
brcmf_ops_sdio_probe sdio device ID: 0xa9a6

Signed-off-by: Antony Antony <antony@phenome.org>
---
 Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
 NanoPi Neo Plus2 Kernel DT propsed patch
 https://patchwork.kernel.org/patch/9925387/

diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
index 590f622..9107e1a 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
@@ -6,7 +6,9 @@ connects the device to the system.
 
 Required properties:
 
- - compatible : Should be "brcm,bcm4329-fmac".
+ - compatible : should be one of the following:
+	* "brcm,bcm4329-fmac"
+	* "brcm,bcm43430-fmac"
 
 Optional properties:
  - brcm,drive-strength : drive strength used for SDIO pins on device in mA
-- 
2.9.3

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

* [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-08-29 21:43 ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-08-29 21:43 UTC (permalink / raw)
  To: Kalle Valo, Rob Herring, Mark Rutland
  Cc: Icenowy Zheng, devicetree-u79uwXL29TY76Z2rM5mHXA, Hans de Goede,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA, Maxime Ripard,
	Chen-Yu Tsai, Antony Antony

Add device tree binding documentation for Broadcom BCM43430
AMPAK AP6212A has this chip.

e.g
compatible = "brcm,bcm43430-fmac";

NanoPi NEO Plus2 has an AMPAK AP6212A WiFi module
with BCM43430 rev=1 inside.
brcmf_chip_recognition found AXI chip: BCM43430, rev=1
brcmf_ops_sdio_probe sdio vendor ID: 0x02d0
brcmf_ops_sdio_probe sdio device ID: 0xa9a6

Signed-off-by: Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org>
---
 Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
 NanoPi Neo Plus2 Kernel DT propsed patch
 https://patchwork.kernel.org/patch/9925387/

diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
index 590f622..9107e1a 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
@@ -6,7 +6,9 @@ connects the device to the system.
 
 Required properties:
 
- - compatible : Should be "brcm,bcm4329-fmac".
+ - compatible : should be one of the following:
+	* "brcm,bcm4329-fmac"
+	* "brcm,bcm43430-fmac"
 
 Optional properties:
  - brcm,drive-strength : drive strength used for SDIO pins on device in mA
-- 
2.9.3

--
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] 22+ messages in thread

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-08-30  2:28   ` Chen-Yu Tsai
  0 siblings, 0 replies; 22+ messages in thread
From: Chen-Yu Tsai @ 2017-08-30  2:28 UTC (permalink / raw)
  To: Antony Antony
  Cc: Kalle Valo, Rob Herring, Mark Rutland, Icenowy Zheng, devicetree,
	Hans de Goede, linux-wireless, Maxime Ripard, Chen-Yu Tsai

Hi,

On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org> wrote:
> Add device tree binding documentation for Broadcom BCM43430
> AMPAK AP6212A has this chip.
>
> e.g
> compatible = "brcm,bcm43430-fmac";
>
> NanoPi NEO Plus2 has an AMPAK AP6212A WiFi module
> with BCM43430 rev=1 inside.
> brcmf_chip_recognition found AXI chip: BCM43430, rev=1
> brcmf_ops_sdio_probe sdio vendor ID: 0x02d0
> brcmf_ops_sdio_probe sdio device ID: 0xa9a6
>
> Signed-off-by: Antony Antony <antony@phenome.org>
> ---
>  Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>  NanoPi Neo Plus2 Kernel DT propsed patch
>  https://patchwork.kernel.org/patch/9925387/
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> index 590f622..9107e1a 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> @@ -6,7 +6,9 @@ connects the device to the system.
>
>  Required properties:
>
> - - compatible : Should be "brcm,bcm4329-fmac".
> + - compatible : should be one of the following:
> +       * "brcm,bcm4329-fmac"
> +       * "brcm,bcm43430-fmac"

You updated the bindings, but not the driver. So it's not actually
going to work. More specifically, OOB interrupts won't work.

IIRC, The compatible string for this particular case, as it was
originally proposed, only serves as a placeholder for the driver
to check against. None of the instances in sunxi device trees
match the actual chip model. Actual model matching is done
through SDIO, as you've already seen.

ChenYu


>
>  Optional properties:
>   - brcm,drive-strength : drive strength used for SDIO pins on device in mA
> --
> 2.9.3
>

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-08-30  2:28   ` Chen-Yu Tsai
  0 siblings, 0 replies; 22+ messages in thread
From: Chen-Yu Tsai @ 2017-08-30  2:28 UTC (permalink / raw)
  To: Antony Antony
  Cc: Kalle Valo, Rob Herring, Mark Rutland, Icenowy Zheng, devicetree,
	Hans de Goede, linux-wireless, Maxime Ripard, Chen-Yu Tsai

Hi,

On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org> wrote:
> Add device tree binding documentation for Broadcom BCM43430
> AMPAK AP6212A has this chip.
>
> e.g
> compatible = "brcm,bcm43430-fmac";
>
> NanoPi NEO Plus2 has an AMPAK AP6212A WiFi module
> with BCM43430 rev=1 inside.
> brcmf_chip_recognition found AXI chip: BCM43430, rev=1
> brcmf_ops_sdio_probe sdio vendor ID: 0x02d0
> brcmf_ops_sdio_probe sdio device ID: 0xa9a6
>
> Signed-off-by: Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>  NanoPi Neo Plus2 Kernel DT propsed patch
>  https://patchwork.kernel.org/patch/9925387/
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> index 590f622..9107e1a 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> @@ -6,7 +6,9 @@ connects the device to the system.
>
>  Required properties:
>
> - - compatible : Should be "brcm,bcm4329-fmac".
> + - compatible : should be one of the following:
> +       * "brcm,bcm4329-fmac"
> +       * "brcm,bcm43430-fmac"

You updated the bindings, but not the driver. So it's not actually
going to work. More specifically, OOB interrupts won't work.

IIRC, The compatible string for this particular case, as it was
originally proposed, only serves as a placeholder for the driver
to check against. None of the instances in sunxi device trees
match the actual chip model. Actual model matching is done
through SDIO, as you've already seen.

ChenYu


>
>  Optional properties:
>   - brcm,drive-strength : drive strength used for SDIO pins on device in mA
> --
> 2.9.3
>

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-08-30 12:02     ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-08-30 12:02 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Antony Antony, Kalle Valo, Rob Herring, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

hi,

On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org> wrote:

> > a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > @@ -6,7 +6,9 @@ connects the device to the system.
> >
> >  Required properties:
> >
> > - - compatible : Should be "brcm,bcm4329-fmac".
> > + - compatible : should be one of the following:
> > +       * "brcm,bcm4329-fmac"
> > +       * "brcm,bcm43430-fmac"
> 
> You updated the bindings, but not the driver. So it's not actually
> going to work. More specifically, OOB interrupts won't work.
>

understood, ignore this patch for now. Thanks Chen-Yu.

> IIRC, The compatible string for this particular case, as it was
> originally proposed, only serves as a placeholder for the driver
> to check against. None of the instances in sunxi device trees
> match the actual chip model. Actual model matching is done
> through SDIO, as you've already seen.

yes it seems SDIO driveer code is smarter, once it initialize 
brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate 
firmware file.

I also noticed other boards using bcm4329-fmac in similar situations.
https://patchwork.kernel.org/patch/9739181/

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7

I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where 
it goes. 

regards,
-antony

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-08-30 12:02     ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-08-30 12:02 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Antony Antony, Kalle Valo, Rob Herring, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

hi,

On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org> wrote:

> > a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > @@ -6,7 +6,9 @@ connects the device to the system.
> >
> >  Required properties:
> >
> > - - compatible : Should be "brcm,bcm4329-fmac".
> > + - compatible : should be one of the following:
> > +       * "brcm,bcm4329-fmac"
> > +       * "brcm,bcm43430-fmac"
> 
> You updated the bindings, but not the driver. So it's not actually
> going to work. More specifically, OOB interrupts won't work.
>

understood, ignore this patch for now. Thanks Chen-Yu.

> IIRC, The compatible string for this particular case, as it was
> originally proposed, only serves as a placeholder for the driver
> to check against. None of the instances in sunxi device trees
> match the actual chip model. Actual model matching is done
> through SDIO, as you've already seen.

yes it seems SDIO driveer code is smarter, once it initialize 
brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate 
firmware file.

I also noticed other boards using bcm4329-fmac in similar situations.
https://patchwork.kernel.org/patch/9739181/

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7

I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where 
it goes. 

regards,
-antony
--
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] 22+ messages in thread

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 16:49       ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2017-09-01 16:49 UTC (permalink / raw)
  To: Antony Antony
  Cc: Chen-Yu Tsai, Kalle Valo, Mark Rutland, Icenowy Zheng,
	devicetree, Hans de Goede, linux-wireless, Maxime Ripard

On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
> hi,
> 
> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
> > On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org> wrote:
> 
> > > a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > @@ -6,7 +6,9 @@ connects the device to the system.
> > >
> > >  Required properties:
> > >
> > > - - compatible : Should be "brcm,bcm4329-fmac".
> > > + - compatible : should be one of the following:
> > > +       * "brcm,bcm4329-fmac"
> > > +       * "brcm,bcm43430-fmac"
> > 
> > You updated the bindings, but not the driver. So it's not actually
> > going to work. More specifically, OOB interrupts won't work.
> >
> 
> understood, ignore this patch for now. Thanks Chen-Yu.
> 
> > IIRC, The compatible string for this particular case, as it was
> > originally proposed, only serves as a placeholder for the driver
> > to check against. None of the instances in sunxi device trees
> > match the actual chip model. Actual model matching is done
> > through SDIO, as you've already seen.
> 
> yes it seems SDIO driveer code is smarter, once it initialize 
> brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate 
> firmware file.
> 
> I also noticed other boards using bcm4329-fmac in similar situations.
> https://patchwork.kernel.org/patch/9739181/
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
> 
> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where 
> it goes. 

Adding the compatible or instead of? The former would be better. You 
should still have the actual chip in case you do have some difference to 
handle.

Rob

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 16:49       ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2017-09-01 16:49 UTC (permalink / raw)
  To: Antony Antony
  Cc: Chen-Yu Tsai, Kalle Valo, Mark Rutland, Icenowy Zheng,
	devicetree, Hans de Goede, linux-wireless, Maxime Ripard

On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
> hi,
> 
> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
> > On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org> wrote:
> 
> > > a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > @@ -6,7 +6,9 @@ connects the device to the system.
> > >
> > >  Required properties:
> > >
> > > - - compatible : Should be "brcm,bcm4329-fmac".
> > > + - compatible : should be one of the following:
> > > +       * "brcm,bcm4329-fmac"
> > > +       * "brcm,bcm43430-fmac"
> > 
> > You updated the bindings, but not the driver. So it's not actually
> > going to work. More specifically, OOB interrupts won't work.
> >
> 
> understood, ignore this patch for now. Thanks Chen-Yu.
> 
> > IIRC, The compatible string for this particular case, as it was
> > originally proposed, only serves as a placeholder for the driver
> > to check against. None of the instances in sunxi device trees
> > match the actual chip model. Actual model matching is done
> > through SDIO, as you've already seen.
> 
> yes it seems SDIO driveer code is smarter, once it initialize 
> brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate 
> firmware file.
> 
> I also noticed other boards using bcm4329-fmac in similar situations.
> https://patchwork.kernel.org/patch/9739181/
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
> 
> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where 
> it goes. 

Adding the compatible or instead of? The former would be better. You 
should still have the actual chip in case you do have some difference to 
handle.

Rob
--
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] 22+ messages in thread

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
  2017-09-01 16:49       ` Rob Herring
@ 2017-09-01 19:10         ` Arend van Spriel
  -1 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-01 19:10 UTC (permalink / raw)
  To: Rob Herring, Antony Antony
  Cc: Chen-Yu Tsai, Kalle Valo, Mark Rutland, Icenowy Zheng,
	devicetree, Hans de Goede, linux-wireless, Maxime Ripard

On 01-09-17 18:49, Rob Herring wrote:
> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>> hi,
>>
>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org> wrote:
>>
>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>
>>>>   Required properties:
>>>>
>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>> + - compatible : should be one of the following:
>>>> +       * "brcm,bcm4329-fmac"
>>>> +       * "brcm,bcm43430-fmac"
>>>
>>> You updated the bindings, but not the driver. So it's not actually
>>> going to work. More specifically, OOB interrupts won't work.
>>>
>>
>> understood, ignore this patch for now. Thanks Chen-Yu.
>>
>>> IIRC, The compatible string for this particular case, as it was
>>> originally proposed, only serves as a placeholder for the driver
>>> to check against. None of the instances in sunxi device trees
>>> match the actual chip model. Actual model matching is done
>>> through SDIO, as you've already seen.
>>
>> yes it seems SDIO driveer code is smarter, once it initialize
>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate
>> firmware file.
>>
>> I also noticed other boards using bcm4329-fmac in similar situations.
>> https://patchwork.kernel.org/patch/9739181/
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>
>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where
>> it goes.
> 
> Adding the compatible or instead of? The former would be better. You
> should still have the actual chip in case you do have some difference to
> handle.

Hi Rob,

Actually the Broadcom wifi chips themselves are discoverable. So once 
the driver has access to the register space of the device it can 
determine the actual chip, its revision, and exactly what cores (and 
their revision) are present in the chip. Hence there is a single 
compatible string as there is no need to convey the same information 
through device tree data.

Regards,
Arend

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 19:10         ` Arend van Spriel
  0 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-01 19:10 UTC (permalink / raw)
  To: Rob Herring, Antony Antony
  Cc: Chen-Yu Tsai, Kalle Valo, Mark Rutland, Icenowy Zheng,
	devicetree, Hans de Goede, linux-wireless, Maxime Ripard

On 01-09-17 18:49, Rob Herring wrote:
> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>> hi,
>>
>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org> wrote:
>>
>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>
>>>>   Required properties:
>>>>
>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>> + - compatible : should be one of the following:
>>>> +       * "brcm,bcm4329-fmac"
>>>> +       * "brcm,bcm43430-fmac"
>>>
>>> You updated the bindings, but not the driver. So it's not actually
>>> going to work. More specifically, OOB interrupts won't work.
>>>
>>
>> understood, ignore this patch for now. Thanks Chen-Yu.
>>
>>> IIRC, The compatible string for this particular case, as it was
>>> originally proposed, only serves as a placeholder for the driver
>>> to check against. None of the instances in sunxi device trees
>>> match the actual chip model. Actual model matching is done
>>> through SDIO, as you've already seen.
>>
>> yes it seems SDIO driveer code is smarter, once it initialize
>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate
>> firmware file.
>>
>> I also noticed other boards using bcm4329-fmac in similar situations.
>> https://patchwork.kernel.org/patch/9739181/
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>
>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where
>> it goes.
> 
> Adding the compatible or instead of? The former would be better. You
> should still have the actual chip in case you do have some difference to
> handle.

Hi Rob,

Actually the Broadcom wifi chips themselves are discoverable. So once 
the driver has access to the register space of the device it can 
determine the actual chip, its revision, and exactly what cores (and 
their revision) are present in the chip. Hence there is a single 
compatible string as there is no need to convey the same information 
through device tree data.

Regards,
Arend

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 20:40           ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-09-01 20:40 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Rob Herring, Antony Antony, Chen-Yu Tsai, Kalle Valo,
	Mark Rutland, Icenowy Zheng, devicetree, Hans de Goede,
	linux-wireless, Maxime Ripard

On Fri, Sep 01, 2017 at 09:10:41PM +0200, Arend van Spriel wrote:
> On 01-09-17 18:49, Rob Herring wrote:
> > On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
> > > hi,
> > > 
> > > On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
> > > > On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org> wrote:
> > > 
> > > > > a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > > > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > > > @@ -6,7 +6,9 @@ connects the device to the system.
> > > > > 
> > > > >   Required properties:
> > > > > 
> > > > > - - compatible : Should be "brcm,bcm4329-fmac".
> > > > > + - compatible : should be one of the following:
> > > > > +       * "brcm,bcm4329-fmac"
> > > > > +       * "brcm,bcm43430-fmac"
> > > > 
> > > > You updated the bindings, but not the driver. So it's not actually
> > > > going to work. More specifically, OOB interrupts won't work.
> > > > 
> > > 
> > > understood, ignore this patch for now. Thanks Chen-Yu.
> > > 
> > > > IIRC, The compatible string for this particular case, as it was
> > > > originally proposed, only serves as a placeholder for the driver
> > > > to check against. None of the instances in sunxi device trees
> > > > match the actual chip model. Actual model matching is done
> > > > through SDIO, as you've already seen.
> > > 
> > > yes it seems SDIO driveer code is smarter, once it initialize
> > > brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate
> > > firmware file.
> > > 
> > > I also noticed other boards using bcm4329-fmac in similar situations.
> > > https://patchwork.kernel.org/patch/9739181/
> > > 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
> > > 
> > > I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where
> > > it goes.
> > 
> > Adding the compatible or instead of? The former would be better. You
> > should still have the actual chip in case you do have some difference to
> > handle.
> 
> Hi Rob,
> 
> Actually the Broadcom wifi chips themselves are discoverable. So once the
> driver has access to the register space of the device it can determine the
> actual chip, its revision, and exactly what cores (and their revision) are
> present in the chip. Hence there is a single compatible string as there is
> no need to convey the same information through device tree data.

In my expereince this how it seems to work.

I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.

brcmf: wifi@1 {
	reg = <1>;
	compatible = "brcm";
}; 

This looks better to me. Maxime, Would this work? 

regards,
-antony

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 20:40           ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-09-01 20:40 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Rob Herring, Antony Antony, Chen-Yu Tsai, Kalle Valo,
	Mark Rutland, Icenowy Zheng, devicetree, Hans de Goede,
	linux-wireless, Maxime Ripard

On Fri, Sep 01, 2017 at 09:10:41PM +0200, Arend van Spriel wrote:
> On 01-09-17 18:49, Rob Herring wrote:
> > On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
> > > hi,
> > > 
> > > On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
> > > > On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org> wrote:
> > > 
> > > > > a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > > > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > > > > @@ -6,7 +6,9 @@ connects the device to the system.
> > > > > 
> > > > >   Required properties:
> > > > > 
> > > > > - - compatible : Should be "brcm,bcm4329-fmac".
> > > > > + - compatible : should be one of the following:
> > > > > +       * "brcm,bcm4329-fmac"
> > > > > +       * "brcm,bcm43430-fmac"
> > > > 
> > > > You updated the bindings, but not the driver. So it's not actually
> > > > going to work. More specifically, OOB interrupts won't work.
> > > > 
> > > 
> > > understood, ignore this patch for now. Thanks Chen-Yu.
> > > 
> > > > IIRC, The compatible string for this particular case, as it was
> > > > originally proposed, only serves as a placeholder for the driver
> > > > to check against. None of the instances in sunxi device trees
> > > > match the actual chip model. Actual model matching is done
> > > > through SDIO, as you've already seen.
> > > 
> > > yes it seems SDIO driveer code is smarter, once it initialize
> > > brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate
> > > firmware file.
> > > 
> > > I also noticed other boards using bcm4329-fmac in similar situations.
> > > https://patchwork.kernel.org/patch/9739181/
> > > 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
> > > 
> > > I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where
> > > it goes.
> > 
> > Adding the compatible or instead of? The former would be better. You
> > should still have the actual chip in case you do have some difference to
> > handle.
> 
> Hi Rob,
> 
> Actually the Broadcom wifi chips themselves are discoverable. So once the
> driver has access to the register space of the device it can determine the
> actual chip, its revision, and exactly what cores (and their revision) are
> present in the chip. Hence there is a single compatible string as there is
> no need to convey the same information through device tree data.

In my expereince this how it seems to work.

I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.

brcmf: wifi@1 {
	reg = <1>;
	compatible = "brcm";
}; 

This looks better to me. Maxime, Would this work? 

regards,
-antony

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 21:30             ` Arend van Spriel
  0 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-01 21:30 UTC (permalink / raw)
  To: Antony Antony
  Cc: Rob Herring, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

On 01-09-17 22:40, Antony Antony wrote:
> On Fri, Sep 01, 2017 at 09:10:41PM +0200, Arend van Spriel wrote:
>> On 01-09-17 18:49, Rob Herring wrote:
>>> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>>>> hi,
>>>>
>>>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org> wrote:
>>>>
>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>>>
>>>>>>    Required properties:
>>>>>>
>>>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>>>> + - compatible : should be one of the following:
>>>>>> +       * "brcm,bcm4329-fmac"
>>>>>> +       * "brcm,bcm43430-fmac"
>>>>>
>>>>> You updated the bindings, but not the driver. So it's not actually
>>>>> going to work. More specifically, OOB interrupts won't work.
>>>>>
>>>>
>>>> understood, ignore this patch for now. Thanks Chen-Yu.
>>>>
>>>>> IIRC, The compatible string for this particular case, as it was
>>>>> originally proposed, only serves as a placeholder for the driver
>>>>> to check against. None of the instances in sunxi device trees
>>>>> match the actual chip model. Actual model matching is done
>>>>> through SDIO, as you've already seen.
>>>>
>>>> yes it seems SDIO driveer code is smarter, once it initialize
>>>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate
>>>> firmware file.
>>>>
>>>> I also noticed other boards using bcm4329-fmac in similar situations.
>>>> https://patchwork.kernel.org/patch/9739181/
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>>>
>>>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where
>>>> it goes.
>>>
>>> Adding the compatible or instead of? The former would be better. You
>>> should still have the actual chip in case you do have some difference to
>>> handle.
>>
>> Hi Rob,
>>
>> Actually the Broadcom wifi chips themselves are discoverable. So once the
>> driver has access to the register space of the device it can determine the
>> actual chip, its revision, and exactly what cores (and their revision) are
>> present in the chip. Hence there is a single compatible string as there is
>> no need to convey the same information through device tree data.
> 
> In my expereince this how it seems to work.
> 
> I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.
> 
> brcmf: wifi@1 {
> 	reg = <1>;
> 	compatible = "brcm";
> };
> 
> This looks better to me. Maxime, Would this work?

I have no idea what you are saying here. To what exactly do you apply 
that substitute. In brcmfmac I have:

         if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
             !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
                 return;

In my perception using "brcm" goes against DT compatible naming convention.

Regards,
Arend

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 21:30             ` Arend van Spriel
  0 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-01 21:30 UTC (permalink / raw)
  To: Antony Antony
  Cc: Rob Herring, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

On 01-09-17 22:40, Antony Antony wrote:
> On Fri, Sep 01, 2017 at 09:10:41PM +0200, Arend van Spriel wrote:
>> On 01-09-17 18:49, Rob Herring wrote:
>>> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>>>> hi,
>>>>
>>>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org> wrote:
>>>>
>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>>>
>>>>>>    Required properties:
>>>>>>
>>>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>>>> + - compatible : should be one of the following:
>>>>>> +       * "brcm,bcm4329-fmac"
>>>>>> +       * "brcm,bcm43430-fmac"
>>>>>
>>>>> You updated the bindings, but not the driver. So it's not actually
>>>>> going to work. More specifically, OOB interrupts won't work.
>>>>>
>>>>
>>>> understood, ignore this patch for now. Thanks Chen-Yu.
>>>>
>>>>> IIRC, The compatible string for this particular case, as it was
>>>>> originally proposed, only serves as a placeholder for the driver
>>>>> to check against. None of the instances in sunxi device trees
>>>>> match the actual chip model. Actual model matching is done
>>>>> through SDIO, as you've already seen.
>>>>
>>>> yes it seems SDIO driveer code is smarter, once it initialize
>>>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to locate
>>>> firmware file.
>>>>
>>>> I also noticed other boards using bcm4329-fmac in similar situations.
>>>> https://patchwork.kernel.org/patch/9739181/
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>>>
>>>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see where
>>>> it goes.
>>>
>>> Adding the compatible or instead of? The former would be better. You
>>> should still have the actual chip in case you do have some difference to
>>> handle.
>>
>> Hi Rob,
>>
>> Actually the Broadcom wifi chips themselves are discoverable. So once the
>> driver has access to the register space of the device it can determine the
>> actual chip, its revision, and exactly what cores (and their revision) are
>> present in the chip. Hence there is a single compatible string as there is
>> no need to convey the same information through device tree data.
> 
> In my expereince this how it seems to work.
> 
> I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.
> 
> brcmf: wifi@1 {
> 	reg = <1>;
> 	compatible = "brcm";
> };
> 
> This looks better to me. Maxime, Would this work?

I have no idea what you are saying here. To what exactly do you apply 
that substitute. In brcmfmac I have:

         if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
             !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
                 return;

In my perception using "brcm" goes against DT compatible naming convention.

Regards,
Arend

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 21:38           ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2017-09-01 21:38 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Antony Antony, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

On Fri, Sep 1, 2017 at 2:10 PM, Arend van Spriel
<arend.vanspriel@broadcom.com> wrote:
> On 01-09-17 18:49, Rob Herring wrote:
>>
>> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>>>
>>> hi,
>>>
>>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>>>
>>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org>
>>>> wrote:
>>>
>>>
>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>> +++
>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>>
>>>>>   Required properties:
>>>>>
>>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>>> + - compatible : should be one of the following:
>>>>> +       * "brcm,bcm4329-fmac"
>>>>> +       * "brcm,bcm43430-fmac"
>>>>
>>>>
>>>> You updated the bindings, but not the driver. So it's not actually
>>>> going to work. More specifically, OOB interrupts won't work.
>>>>
>>>
>>> understood, ignore this patch for now. Thanks Chen-Yu.
>>>
>>>> IIRC, The compatible string for this particular case, as it was
>>>> originally proposed, only serves as a placeholder for the driver
>>>> to check against. None of the instances in sunxi device trees
>>>> match the actual chip model. Actual model matching is done
>>>> through SDIO, as you've already seen.
>>>
>>>
>>> yes it seems SDIO driveer code is smarter, once it initialize
>>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to
>>> locate
>>> firmware file.
>>>
>>> I also noticed other boards using bcm4329-fmac in similar situations.
>>> https://patchwork.kernel.org/patch/9739181/
>>>
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>>
>>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see
>>> where
>>> it goes.
>>
>>
>> Adding the compatible or instead of? The former would be better. You
>> should still have the actual chip in case you do have some difference to
>> handle.
>
>
> Hi Rob,
>
> Actually the Broadcom wifi chips themselves are discoverable. So once the
> driver has access to the register space of the device it can determine the
> actual chip, its revision, and exactly what cores (and their revision) are
> present in the chip. Hence there is a single compatible string as there is
> no need to convey the same information through device tree data.

So if a chip has different power on/off sequencing you can discover that?

I realize that most often you don't need it, but a more specific
compatible is there in case you do and so it doesn't require a DTB
update to handle some difference. But you can keep using one
compatible because I can't really enforce any of that.

Rob

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 21:38           ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2017-09-01 21:38 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Antony Antony, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

On Fri, Sep 1, 2017 at 2:10 PM, Arend van Spriel
<arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> wrote:
> On 01-09-17 18:49, Rob Herring wrote:
>>
>> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>>>
>>> hi,
>>>
>>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>>>
>>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org>
>>>> wrote:
>>>
>>>
>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>> +++
>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>>
>>>>>   Required properties:
>>>>>
>>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>>> + - compatible : should be one of the following:
>>>>> +       * "brcm,bcm4329-fmac"
>>>>> +       * "brcm,bcm43430-fmac"
>>>>
>>>>
>>>> You updated the bindings, but not the driver. So it's not actually
>>>> going to work. More specifically, OOB interrupts won't work.
>>>>
>>>
>>> understood, ignore this patch for now. Thanks Chen-Yu.
>>>
>>>> IIRC, The compatible string for this particular case, as it was
>>>> originally proposed, only serves as a placeholder for the driver
>>>> to check against. None of the instances in sunxi device trees
>>>> match the actual chip model. Actual model matching is done
>>>> through SDIO, as you've already seen.
>>>
>>>
>>> yes it seems SDIO driveer code is smarter, once it initialize
>>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to
>>> locate
>>> firmware file.
>>>
>>> I also noticed other boards using bcm4329-fmac in similar situations.
>>> https://patchwork.kernel.org/patch/9739181/
>>>
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>>
>>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see
>>> where
>>> it goes.
>>
>>
>> Adding the compatible or instead of? The former would be better. You
>> should still have the actual chip in case you do have some difference to
>> handle.
>
>
> Hi Rob,
>
> Actually the Broadcom wifi chips themselves are discoverable. So once the
> driver has access to the register space of the device it can determine the
> actual chip, its revision, and exactly what cores (and their revision) are
> present in the chip. Hence there is a single compatible string as there is
> no need to convey the same information through device tree data.

So if a chip has different power on/off sequencing you can discover that?

I realize that most often you don't need it, but a more specific
compatible is there in case you do and so it doesn't require a DTB
update to handle some difference. But you can keep using one
compatible because I can't really enforce any of that.

Rob
--
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] 22+ messages in thread

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 22:01             ` Arend van Spriel
  0 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-01 22:01 UTC (permalink / raw)
  To: Rob Herring
  Cc: Antony Antony, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard



On 01-09-17 23:38, Rob Herring wrote:
> On Fri, Sep 1, 2017 at 2:10 PM, Arend van Spriel
> <arend.vanspriel@broadcom.com> wrote:
>> On 01-09-17 18:49, Rob Herring wrote:
>>>
>>> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>>>>
>>>> hi,
>>>>
>>>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>>>>
>>>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony@phenome.org>
>>>>> wrote:
>>>>
>>>>
>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> +++
>>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>>>
>>>>>>    Required properties:
>>>>>>
>>>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>>>> + - compatible : should be one of the following:
>>>>>> +       * "brcm,bcm4329-fmac"
>>>>>> +       * "brcm,bcm43430-fmac"
>>>>>
>>>>>
>>>>> You updated the bindings, but not the driver. So it's not actually
>>>>> going to work. More specifically, OOB interrupts won't work.
>>>>>
>>>>
>>>> understood, ignore this patch for now. Thanks Chen-Yu.
>>>>
>>>>> IIRC, The compatible string for this particular case, as it was
>>>>> originally proposed, only serves as a placeholder for the driver
>>>>> to check against. None of the instances in sunxi device trees
>>>>> match the actual chip model. Actual model matching is done
>>>>> through SDIO, as you've already seen.
>>>>
>>>>
>>>> yes it seems SDIO driveer code is smarter, once it initialize
>>>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to
>>>> locate
>>>> firmware file.
>>>>
>>>> I also noticed other boards using bcm4329-fmac in similar situations.
>>>> https://patchwork.kernel.org/patch/9739181/
>>>>
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>>>
>>>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see
>>>> where
>>>> it goes.
>>>
>>>
>>> Adding the compatible or instead of? The former would be better. You
>>> should still have the actual chip in case you do have some difference to
>>> handle.
>>
>>
>> Hi Rob,
>>
>> Actually the Broadcom wifi chips themselves are discoverable. So once the
>> driver has access to the register space of the device it can determine the
>> actual chip, its revision, and exactly what cores (and their revision) are
>> present in the chip. Hence there is a single compatible string as there is
>> no need to convey the same information through device tree data.
> 
> So if a chip has different power on/off sequencing you can discover that?
> 
> I realize that most often you don't need it, but a more specific
> compatible is there in case you do and so it doesn't require a DTB
> update to handle some difference. But you can keep using one
> compatible because I can't really enforce any of that.

For SDIO chips the power sequencing is defined by power-seq-* in 
bindings/mmc and handled by the MMC stack itself. So the wifi driver is 
not dealing with that.

Regards,
Arend

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-01 22:01             ` Arend van Spriel
  0 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-01 22:01 UTC (permalink / raw)
  To: Rob Herring
  Cc: Antony Antony, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard



On 01-09-17 23:38, Rob Herring wrote:
> On Fri, Sep 1, 2017 at 2:10 PM, Arend van Spriel
> <arend.vanspriel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> wrote:
>> On 01-09-17 18:49, Rob Herring wrote:
>>>
>>> On Wed, Aug 30, 2017 at 02:02:18PM +0200, Antony Antony wrote:
>>>>
>>>> hi,
>>>>
>>>> On Wed, Aug 30, 2017 at 10:28:20AM +0800, Chen-Yu Tsai wrote:
>>>>>
>>>>> On Wed, Aug 30, 2017 at 5:43 AM, Antony Antony <antony-AVhj06Q78b5AfugRpC6u6w@public.gmane.org>
>>>>> wrote:
>>>>
>>>>
>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> +++
>>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
>>>>>> @@ -6,7 +6,9 @@ connects the device to the system.
>>>>>>
>>>>>>    Required properties:
>>>>>>
>>>>>> - - compatible : Should be "brcm,bcm4329-fmac".
>>>>>> + - compatible : should be one of the following:
>>>>>> +       * "brcm,bcm4329-fmac"
>>>>>> +       * "brcm,bcm43430-fmac"
>>>>>
>>>>>
>>>>> You updated the bindings, but not the driver. So it's not actually
>>>>> going to work. More specifically, OOB interrupts won't work.
>>>>>
>>>>
>>>> understood, ignore this patch for now. Thanks Chen-Yu.
>>>>
>>>>> IIRC, The compatible string for this particular case, as it was
>>>>> originally proposed, only serves as a placeholder for the driver
>>>>> to check against. None of the instances in sunxi device trees
>>>>> match the actual chip model. Actual model matching is done
>>>>> through SDIO, as you've already seen.
>>>>
>>>>
>>>> yes it seems SDIO driveer code is smarter, once it initialize
>>>> brcm,bcm4329-fmac it ignore the DT info and read the chip details to
>>>> locate
>>>> firmware file.
>>>>
>>>> I also noticed other boards using bcm4329-fmac in similar situations.
>>>> https://patchwork.kernel.org/patch/9739181/
>>>>
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts?h=v4.13-rc7
>>>>
>>>> I will resend "NanoPi NEO Plus2" dts with "brcm,bcm4329-fmac" and see
>>>> where
>>>> it goes.
>>>
>>>
>>> Adding the compatible or instead of? The former would be better. You
>>> should still have the actual chip in case you do have some difference to
>>> handle.
>>
>>
>> Hi Rob,
>>
>> Actually the Broadcom wifi chips themselves are discoverable. So once the
>> driver has access to the register space of the device it can determine the
>> actual chip, its revision, and exactly what cores (and their revision) are
>> present in the chip. Hence there is a single compatible string as there is
>> no need to convey the same information through device tree data.
> 
> So if a chip has different power on/off sequencing you can discover that?
> 
> I realize that most often you don't need it, but a more specific
> compatible is there in case you do and so it doesn't require a DTB
> update to handle some difference. But you can keep using one
> compatible because I can't really enforce any of that.

For SDIO chips the power sequencing is defined by power-seq-* in 
bindings/mmc and handled by the MMC stack itself. So the wifi driver is 
not dealing with that.

Regards,
Arend

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-04 14:42               ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-09-04 14:42 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Antony Antony, Rob Herring, Chen-Yu Tsai, Kalle Valo,
	Mark Rutland, Icenowy Zheng, devicetree, Hans de Goede,
	linux-wireless, Maxime Ripard

Hi Arend,

On Fri, Sep 01, 2017 at 11:30:59PM +0200, Arend van Spriel wrote:
> > > Hi Rob,
> > > 
> > > Actually the Broadcom wifi chips themselves are discoverable. So once the
> > > driver has access to the register space of the device it can determine the
> > > actual chip, its revision, and exactly what cores (and their revision) are
> > > present in the chip. Hence there is a single compatible string as there is
> > > no need to convey the same information through device tree data.
> > 
> > In my expereince this how it seems to work.
> > 
> > I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.
> > 
> > brcmf: wifi@1 {
> > 	reg = <1>;
> > 	compatible = "brcm";
> > };
> > 
> > This looks better to me. Maxime, Would this work?
> 
> I have no idea what you are saying here. To what exactly do you apply that
> substitute. In brcmfmac I have: 

Thanks for pointing me to the relevent code. I was asking about DT support I 
submitted. 

> 
>         if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
>             !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
>                 return;
> 
> In my perception using "brcm" goes against DT compatible naming convention.

It seems the driver has a special place holder, bcm4329-fmac.
I am still wondering what is acceptable in the DT. 

compatible = ""brcm,bcm4329-fmac";
or 
compatible = "brcm";

The last one does not generate any warnings.
Here it the DT I am proposing. https://patchwork.kernel.org/patch/9937263/

regards,
-antony

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-04 14:42               ` Antony Antony
  0 siblings, 0 replies; 22+ messages in thread
From: Antony Antony @ 2017-09-04 14:42 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Antony Antony, Rob Herring, Chen-Yu Tsai, Kalle Valo,
	Mark Rutland, Icenowy Zheng, devicetree, Hans de Goede,
	linux-wireless, Maxime Ripard

Hi Arend,

On Fri, Sep 01, 2017 at 11:30:59PM +0200, Arend van Spriel wrote:
> > > Hi Rob,
> > > 
> > > Actually the Broadcom wifi chips themselves are discoverable. So once the
> > > driver has access to the register space of the device it can determine the
> > > actual chip, its revision, and exactly what cores (and their revision) are
> > > present in the chip. Hence there is a single compatible string as there is
> > > no need to convey the same information through device tree data.
> > 
> > In my expereince this how it seems to work.
> > 
> > I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.
> > 
> > brcmf: wifi@1 {
> > 	reg = <1>;
> > 	compatible = "brcm";
> > };
> > 
> > This looks better to me. Maxime, Would this work?
> 
> I have no idea what you are saying here. To what exactly do you apply that
> substitute. In brcmfmac I have: 

Thanks for pointing me to the relevent code. I was asking about DT support I 
submitted. 

> 
>         if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
>             !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
>                 return;
> 
> In my perception using "brcm" goes against DT compatible naming convention.

It seems the driver has a special place holder, bcm4329-fmac.
I am still wondering what is acceptable in the DT. 

compatible = ""brcm,bcm4329-fmac";
or 
compatible = "brcm";

The last one does not generate any warnings.
Here it the DT I am proposing. https://patchwork.kernel.org/patch/9937263/

regards,
-antony

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-04 17:37                 ` Arend van Spriel
  0 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-04 17:37 UTC (permalink / raw)
  To: Antony Antony
  Cc: Rob Herring, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

On 04-09-17 16:42, Antony Antony wrote:
> Hi Arend,
> 
> On Fri, Sep 01, 2017 at 11:30:59PM +0200, Arend van Spriel wrote:
>>>> Hi Rob,
>>>>
>>>> Actually the Broadcom wifi chips themselves are discoverable. So once the
>>>> driver has access to the register space of the device it can determine the
>>>> actual chip, its revision, and exactly what cores (and their revision) are
>>>> present in the chip. Hence there is a single compatible string as there is
>>>> no need to convey the same information through device tree data.
>>>
>>> In my expereince this how it seems to work.
>>>
>>> I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.
>>>
>>> brcmf: wifi@1 {
>>> 	reg = <1>;
>>> 	compatible = "brcm";
>>> };
>>>
>>> This looks better to me. Maxime, Would this work?
>>
>> I have no idea what you are saying here. To what exactly do you apply that
>> substitute. In brcmfmac I have:
> 
> Thanks for pointing me to the relevent code. I was asking about DT support I
> submitted.
> 
>>
>>          if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
>>              !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
>>                  return;
>>
>> In my perception using "brcm" goes against DT compatible naming convention.
> 
> It seems the driver has a special place holder, bcm4329-fmac.
> I am still wondering what is acceptable in the DT.
> 
> compatible = ""brcm,bcm4329-fmac";
> or
> compatible = "brcm";
> 
> The last one does not generate any warnings.

Ok. So what warning do you get when using "brcm,bcm4329-fmac"? Or did 
you really try ""brcm,bcm4329-fmac" as mentioned above?

Regards,
Arend

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

* Re: [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac
@ 2017-09-04 17:37                 ` Arend van Spriel
  0 siblings, 0 replies; 22+ messages in thread
From: Arend van Spriel @ 2017-09-04 17:37 UTC (permalink / raw)
  To: Antony Antony
  Cc: Rob Herring, Chen-Yu Tsai, Kalle Valo, Mark Rutland,
	Icenowy Zheng, devicetree, Hans de Goede, linux-wireless,
	Maxime Ripard

On 04-09-17 16:42, Antony Antony wrote:
> Hi Arend,
> 
> On Fri, Sep 01, 2017 at 11:30:59PM +0200, Arend van Spriel wrote:
>>>> Hi Rob,
>>>>
>>>> Actually the Broadcom wifi chips themselves are discoverable. So once the
>>>> driver has access to the register space of the device it can determine the
>>>> actual chip, its revision, and exactly what cores (and their revision) are
>>>> present in the chip. Hence there is a single compatible string as there is
>>>> no need to convey the same information through device tree data.
>>>
>>> In my expereince this how it seems to work.
>>>
>>> I jsut discovered s/brcm,bcm4329-fmac/brcm/ can load the broadcom driver.
>>>
>>> brcmf: wifi@1 {
>>> 	reg = <1>;
>>> 	compatible = "brcm";
>>> };
>>>
>>> This looks better to me. Maxime, Would this work?
>>
>> I have no idea what you are saying here. To what exactly do you apply that
>> substitute. In brcmfmac I have:
> 
> Thanks for pointing me to the relevent code. I was asking about DT support I
> submitted.
> 
>>
>>          if (!np || bus_type != BRCMF_BUSTYPE_SDIO ||
>>              !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
>>                  return;
>>
>> In my perception using "brcm" goes against DT compatible naming convention.
> 
> It seems the driver has a special place holder, bcm4329-fmac.
> I am still wondering what is acceptable in the DT.
> 
> compatible = ""brcm,bcm4329-fmac";
> or
> compatible = "brcm";
> 
> The last one does not generate any warnings.

Ok. So what warning do you get when using "brcm,bcm4329-fmac"? Or did 
you really try ""brcm,bcm4329-fmac" as mentioned above?

Regards,
Arend

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

end of thread, other threads:[~2017-09-04 17:37 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 21:43 [PATCH] Documentation: dt-binding: net: wireless: add bcm43430-fmac Antony Antony
2017-08-29 21:43 ` Antony Antony
2017-08-30  2:28 ` Chen-Yu Tsai
2017-08-30  2:28   ` Chen-Yu Tsai
2017-08-30 12:02   ` Antony Antony
2017-08-30 12:02     ` Antony Antony
2017-09-01 16:49     ` Rob Herring
2017-09-01 16:49       ` Rob Herring
2017-09-01 19:10       ` Arend van Spriel
2017-09-01 19:10         ` Arend van Spriel
2017-09-01 20:40         ` Antony Antony
2017-09-01 20:40           ` Antony Antony
2017-09-01 21:30           ` Arend van Spriel
2017-09-01 21:30             ` Arend van Spriel
2017-09-04 14:42             ` Antony Antony
2017-09-04 14:42               ` Antony Antony
2017-09-04 17:37               ` Arend van Spriel
2017-09-04 17:37                 ` Arend van Spriel
2017-09-01 21:38         ` Rob Herring
2017-09-01 21:38           ` Rob Herring
2017-09-01 22:01           ` Arend van Spriel
2017-09-01 22:01             ` Arend van Spriel

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.