devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] dt-bindings fixup for brcm,bcm4329-fmac.yaml
@ 2024-08-20 10:12 Arend van Spriel
  2024-08-20 10:12 ` [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property Arend van Spriel
  2024-08-20 10:12 ` [PATCH 2/2] arm64: boot: apple: fixup wifi device specification Arend van Spriel
  0 siblings, 2 replies; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 10:12 UTC (permalink / raw)
  To: Kalle Valo, Hector Martin, Krzysztof Kozlowski
  Cc: devicetree, linux-wireless, brcm80211, asahi, Arend van Spriel

Fix to restore the constraint in the json-schema that was lost when
support for the Apple PCIe devices was added in e2e37224e8b3
("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips").
Not sure if the rule of separate patches is the easiest to get
this fixed. If one patch is preferred I can respin.

The patches are based on main branch of the wireless-next repository.

Regards,
Arend

Arend van Spriel (2):
  dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac
    compatible property
  arm64: boot: apple: fixup wifi device specification

 .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
 arch/arm64/boot/dts/apple/t8103-jxxx.dtsi     |  2 +-
 arch/arm64/boot/dts/apple/t8112-j413.dts      |  2 +-
 arch/arm64/boot/dts/apple/t8112-j493.dts      |  2 +-
 4 files changed, 13 insertions(+), 12 deletions(-)


base-commit: daaf0dd0398d5e93b7304f35184ca182ed583681
--
2.32.0


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

* [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 10:12 [PATCH 0/2] dt-bindings fixup for brcm,bcm4329-fmac.yaml Arend van Spriel
@ 2024-08-20 10:12 ` Arend van Spriel
  2024-08-20 11:14   ` Rob Herring (Arm)
  2024-08-20 11:27   ` Krzysztof Kozlowski
  2024-08-20 10:12 ` [PATCH 2/2] arm64: boot: apple: fixup wifi device specification Arend van Spriel
  1 sibling, 2 replies; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 10:12 UTC (permalink / raw)
  To: Kalle Valo, Hector Martin, Krzysztof Kozlowski
  Cc: devicetree, linux-wireless, brcm80211, asahi, Arend van Spriel

When extending the bindings for Apple PCIe devices the compatible property
specification was changed. However, it was changed such that for these
devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
string in the compatible list property as it was before that extension.
This patch restores that constraint.

Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
index e564f20d8f41..47f90446322f 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
 
 maintainers:
-  - Arend van Spriel <arend@broadcom.com>
+  - Arend van Spriel <arend.vanspriel@broadcom.com>
 
 description:
   The Broadcom Single chip MAC part for the BCM4329 family and
@@ -27,7 +27,6 @@ properties:
               - brcm,bcm4341b0-fmac
               - brcm,bcm4341b4-fmac
               - brcm,bcm4341b5-fmac
-              - brcm,bcm4329-fmac
               - brcm,bcm4330-fmac
               - brcm,bcm4334-fmac
               - brcm,bcm43340-fmac
@@ -46,13 +45,15 @@ properties:
               - cypress,cyw43012-fmac
               - infineon,cyw43439-fmac
           - const: brcm,bcm4329-fmac
-      - enum:
-          - brcm,bcm4329-fmac
-          - pci14e4,43dc  # BCM4355
-          - pci14e4,4464  # BCM4364
-          - pci14e4,4488  # BCM4377
-          - pci14e4,4425  # BCM4378
-          - pci14e4,4433  # BCM4387
+    - items:
+          - enum:
+              - pci14e4,43dc  # BCM4355
+              - pci14e4,4464  # BCM4364
+              - pci14e4,4488  # BCM4377
+              - pci14e4,4425  # BCM4378
+              - pci14e4,4433  # BCM4387
+          - const: brcm,bcm4329-fmac
+    - const: brcm,bcm4329-fmac
 
   reg:
     description: SDIO function number for the device (for most cases
-- 
2.32.0


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

* [PATCH 2/2] arm64: boot: apple: fixup wifi device specification
  2024-08-20 10:12 [PATCH 0/2] dt-bindings fixup for brcm,bcm4329-fmac.yaml Arend van Spriel
  2024-08-20 10:12 ` [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property Arend van Spriel
@ 2024-08-20 10:12 ` Arend van Spriel
  2024-08-20 11:30   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 10:12 UTC (permalink / raw)
  To: Kalle Valo, Hector Martin, Krzysztof Kozlowski
  Cc: devicetree, linux-wireless, brcm80211, asahi, Arend van Spriel

Align with the corrected device tree bindings in brcm,bcm4329-fmac.yaml
which imposes a constraint that the compatible should have the string
"brcm,bcm4329-fmac".

Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +-
 arch/arm64/boot/dts/apple/t8112-j413.dts  | 2 +-
 arch/arm64/boot/dts/apple/t8112-j493.dts  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
index 5988a4eb6efa..4b021626d469 100644
--- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
@@ -72,7 +72,7 @@ hpm1: usb-pd@3f {
 &port00 {
 	bus-range = <1 1>;
 	wifi0: network@0,0 {
-		compatible = "pci14e4,4425";
+		compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
 		reg = <0x10000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
 		local-mac-address = [00 00 00 00 00 00];
diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts b/arch/arm64/boot/dts/apple/t8112-j413.dts
index 6f69658623bf..df2a63d8dd5e 100644
--- a/arch/arm64/boot/dts/apple/t8112-j413.dts
+++ b/arch/arm64/boot/dts/apple/t8112-j413.dts
@@ -43,7 +43,7 @@ led-0 {
 &port00 {
 	bus-range = <1 1>;
 	wifi0: wifi@0,0 {
-		compatible = "pci14e4,4433";
+		compatible = "pci14e4,4433", "brcm,bcm4329-fmac";
 		reg = <0x10000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
 		local-mac-address = [00 10 18 00 00 10];
diff --git a/arch/arm64/boot/dts/apple/t8112-j493.dts b/arch/arm64/boot/dts/apple/t8112-j493.dts
index 0ad908349f55..5f3453e109b8 100644
--- a/arch/arm64/boot/dts/apple/t8112-j493.dts
+++ b/arch/arm64/boot/dts/apple/t8112-j493.dts
@@ -43,7 +43,7 @@ led-0 {
 &port00 {
 	bus-range = <1 1>;
 	wifi0: wifi@0,0 {
-		compatible = "pci14e4,4425";
+		compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
 		reg = <0x10000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
 		local-mac-address = [00 00 00 00 00 00];
-- 
2.32.0


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 10:12 ` [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property Arend van Spriel
@ 2024-08-20 11:14   ` Rob Herring (Arm)
  2024-08-20 11:43     ` Arend van Spriel
  2024-08-20 11:27   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 20+ messages in thread
From: Rob Herring (Arm) @ 2024-08-20 11:14 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: devicetree, Krzysztof Kozlowski, linux-wireless, Kalle Valo,
	brcm80211, asahi, Hector Martin


On Tue, 20 Aug 2024 12:12:15 +0200, Arend van Spriel wrote:
> When extending the bindings for Apple PCIe devices the compatible property
> specification was changed. However, it was changed such that for these
> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
> string in the compatible list property as it was before that extension.
> This patch restores that constraint.
> 
> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> ---
>  .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: [error] syntax error: expected <block end>, but found '-' (syntax)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml: ignoring, error parsing file
./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
Documentation/devicetree/bindings/mmc/mmc-controller.example.dtb: /example-0/mmc@1c12000/wifi@1: failed to match any schema with compatible: ['brcm,bcm4329-fmac']
make[2]: *** Deleting file 'Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts'
Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1432: dt_binding_check] Error 2
make: *** [Makefile:224: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240820101216.355012-2-arend.vanspriel@broadcom.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 10:12 ` [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property Arend van Spriel
  2024-08-20 11:14   ` Rob Herring (Arm)
@ 2024-08-20 11:27   ` Krzysztof Kozlowski
  2024-08-20 11:39     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-20 11:27 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
> When extending the bindings for Apple PCIe devices the compatible property
> specification was changed. However, it was changed such that for these
> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
> string in the compatible list property as it was before that extension.

Apart that this was never tested... That statement is not true. Look at
"fixed" commit - it is not doing like that at all.

I don't understand the reasoning.

> This patch restores that constraint.
> 
> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> ---
>  .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> index e564f20d8f41..47f90446322f 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>  title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>  
>  maintainers:
> -  - Arend van Spriel <arend@broadcom.com>
> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>  
>  description:
>    The Broadcom Single chip MAC part for the BCM4329 family and
> @@ -27,7 +27,6 @@ properties:
>                - brcm,bcm4341b0-fmac
>                - brcm,bcm4341b4-fmac
>                - brcm,bcm4341b5-fmac
> -              - brcm,bcm4329-fmac
>                - brcm,bcm4330-fmac
>                - brcm,bcm4334-fmac
>                - brcm,bcm43340-fmac
> @@ -46,13 +45,15 @@ properties:
>                - cypress,cyw43012-fmac
>                - infineon,cyw43439-fmac
>            - const: brcm,bcm4329-fmac
> -      - enum:
> -          - brcm,bcm4329-fmac
> -          - pci14e4,43dc  # BCM4355
> -          - pci14e4,4464  # BCM4364
> -          - pci14e4,4488  # BCM4377
> -          - pci14e4,4425  # BCM4378
> -          - pci14e4,4433  # BCM4387
> +    - items:
> +          - enum:
> +              - pci14e4,43dc  # BCM4355
> +              - pci14e4,4464  # BCM4364
> +              - pci14e4,4488  # BCM4377
> +              - pci14e4,4425  # BCM4378
> +              - pci14e4,4433  # BCM4387
> +          - const: brcm,bcm4329-fmac
> +    - const: brcm,bcm4329-fmac

And this does not make sense... You claim that some constrained was
droppped and you re-add it, but in fact you still add the same code as
it was before.

NAK.

Best regards,
Krzysztof


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

* Re: [PATCH 2/2] arm64: boot: apple: fixup wifi device specification
  2024-08-20 10:12 ` [PATCH 2/2] arm64: boot: apple: fixup wifi device specification Arend van Spriel
@ 2024-08-20 11:30   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-20 11:30 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On Tue, Aug 20, 2024 at 12:12:16PM +0200, Arend van Spriel wrote:
> Align with the corrected device tree bindings in brcm,bcm4329-fmac.yaml
> which imposes a constraint that the compatible should have the string
> "brcm,bcm4329-fmac".

Additionally, please explain why do you think these devices are compatible and
also how this change affects working. Considering that previously these
devices were not matched by brcmf_of_probe() and now they will, this is
significant change.

> 
> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")

No, no bug to fix. Previous code was intentional. If you claim there is
a bug, please explain what exactly is being fixed.

> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 11:27   ` Krzysztof Kozlowski
@ 2024-08-20 11:39     ` Krzysztof Kozlowski
  2024-08-20 12:50       ` Arend van Spriel
  0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-20 11:39 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>> When extending the bindings for Apple PCIe devices the compatible property
>> specification was changed. However, it was changed such that for these
>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>> string in the compatible list property as it was before that extension.
> 
> Apart that this was never tested... That statement is not true. Look at
> "fixed" commit - it is not doing like that at all.
> 
> I don't understand the reasoning.
> 
>> This patch restores that constraint.
>>
>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>> ---
>>  .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>  1 file changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>> index e564f20d8f41..47f90446322f 100644
>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>  title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>  
>>  maintainers:
>> -  - Arend van Spriel <arend@broadcom.com>
>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>  
>>  description:
>>    The Broadcom Single chip MAC part for the BCM4329 family and
>> @@ -27,7 +27,6 @@ properties:
>>                - brcm,bcm4341b0-fmac
>>                - brcm,bcm4341b4-fmac
>>                - brcm,bcm4341b5-fmac
>> -              - brcm,bcm4329-fmac
>>                - brcm,bcm4330-fmac
>>                - brcm,bcm4334-fmac
>>                - brcm,bcm43340-fmac
>> @@ -46,13 +45,15 @@ properties:
>>                - cypress,cyw43012-fmac
>>                - infineon,cyw43439-fmac
>>            - const: brcm,bcm4329-fmac
>> -      - enum:
>> -          - brcm,bcm4329-fmac
>> -          - pci14e4,43dc  # BCM4355
>> -          - pci14e4,4464  # BCM4364
>> -          - pci14e4,4488  # BCM4377
>> -          - pci14e4,4425  # BCM4378
>> -          - pci14e4,4433  # BCM4387
>> +    - items:
>> +          - enum:
>> +              - pci14e4,43dc  # BCM4355
>> +              - pci14e4,4464  # BCM4364
>> +              - pci14e4,4488  # BCM4377
>> +              - pci14e4,4425  # BCM4378
>> +              - pci14e4,4433  # BCM4387
>> +          - const: brcm,bcm4329-fmac
>> +    - const: brcm,bcm4329-fmac
> 
> And this does not make sense... You claim that some constrained was
> droppped and you re-add it, but in fact you still add the same code as
> it was before.
> 
> NAK.

Ah, the last "const" actually makes sense, I missed that.

Commit still however lacks rationale why these devices are compatible.
Plus existing rationale that e2e37224e8b3 changed something is entirely
WRONG. It changed nothing. ZERO. It only added new devices, which was
claimed are not compatible with brcm,bcm4329-fmac.

Now if you claim that original commit which said "these devices are not
compatible with brcm,bcm4329-fmac", then please provide arguments, not
just say "other commit did something". It did nothing...

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 11:14   ` Rob Herring (Arm)
@ 2024-08-20 11:43     ` Arend van Spriel
  2024-08-20 11:50       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 11:43 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: devicetree, Krzysztof Kozlowski, linux-wireless, Kalle Valo,
	brcm80211, asahi, Hector Martin

On 8/20/2024 1:14 PM, Rob Herring (Arm) wrote:
> 
> On Tue, 20 Aug 2024 12:12:15 +0200, Arend van Spriel wrote:
>> When extending the bindings for Apple PCIe devices the compatible property
>> specification was changed. However, it was changed such that for these
>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>> string in the compatible list property as it was before that extension.
>> This patch restores that constraint.
>>
>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>> ---
>>   .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>   1 file changed, 10 insertions(+), 9 deletions(-)
>>
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> yamllint warnings/errors:
> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: [error] syntax error: expected <block end>, but found '-' (syntax)
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml: ignoring, error parsing file
> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
> Documentation/devicetree/bindings/mmc/mmc-controller.example.dtb: /example-0/mmc@1c12000/wifi@1: failed to match any schema with compatible: ['brcm,bcm4329-fmac']
> make[2]: *** Deleting file 'Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts'
> Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
> make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1432: dt_binding_check] Error 2
> make: *** [Makefile:224: __sub-make] Error 2
> 
> doc reference errors (make refcheckdocs):
> 
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240820101216.355012-2-arend.vanspriel@broadcom.com
> 
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
> 
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
> 
> pip3 install dtschema --upgrade
> 
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.

Thanks, Rob

I will have to setup my environment for that. Will take a while to get 
it all working.

Regards,
Arend

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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 11:43     ` Arend van Spriel
@ 2024-08-20 11:50       ` Krzysztof Kozlowski
  2024-08-20 12:08         ` Arend van Spriel
  2024-08-20 19:01         ` Arend van Spriel
  0 siblings, 2 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-20 11:50 UTC (permalink / raw)
  To: Arend van Spriel, Rob Herring (Arm)
  Cc: devicetree, Krzysztof Kozlowski, linux-wireless, Kalle Valo,
	brcm80211, asahi, Hector Martin

On 20/08/2024 13:43, Arend van Spriel wrote:
> On 8/20/2024 1:14 PM, Rob Herring (Arm) wrote:
>>
>> On Tue, 20 Aug 2024 12:12:15 +0200, Arend van Spriel wrote:
>>> When extending the bindings for Apple PCIe devices the compatible property
>>> specification was changed. However, it was changed such that for these
>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>> string in the compatible list property as it was before that extension.
>>> This patch restores that constraint.
>>>
>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>> ---
>>>   .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>   1 file changed, 10 insertions(+), 9 deletions(-)
>>>
>>
>> My bot found errors running 'make dt_binding_check' on your patch:
>>
>> yamllint warnings/errors:
>> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: [error] syntax error: expected <block end>, but found '-' (syntax)
>>
>> dtschema/dtc warnings/errors:
>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml: ignoring, error parsing file
>> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
>> Documentation/devicetree/bindings/mmc/mmc-controller.example.dtb: /example-0/mmc@1c12000/wifi@1: failed to match any schema with compatible: ['brcm,bcm4329-fmac']
>> make[2]: *** Deleting file 'Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts'
>> Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
>> make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1432: dt_binding_check] Error 2
>> make: *** [Makefile:224: __sub-make] Error 2
>>
>> doc reference errors (make refcheckdocs):
>>
>> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240820101216.355012-2-arend.vanspriel@broadcom.com
>>
>> The base for the series is generally the latest rc1. A different dependency
>> should be noted in *this* patch.
>>
>> If you already ran 'make dt_binding_check' and didn't see the above
>> error(s), then make sure 'yamllint' is installed and dt-schema is up to
>> date:
>>
>> pip3 install dtschema --upgrade
>>
>> Please check and re-submit after running the above command yourself. Note
>> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
>> your schema. However, it must be unset to test all examples with your schema.
> 
> Thanks, Rob
> 
> I will have to setup my environment for that. Will take a while to get 
> it all working.

It's just two commands:
pip install
or pix install if you use newer Ubuntu (no magic here, just like every
other Python package)

and then `make dt_bindings_check`, optionally with arguments. There is
no environment needed, you can do all this in the same place you build
and test kernel changes.

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 11:50       ` Krzysztof Kozlowski
@ 2024-08-20 12:08         ` Arend van Spriel
  2024-08-20 19:01         ` Arend van Spriel
  1 sibling, 0 replies; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 12:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring (Arm)
  Cc: devicetree, Krzysztof Kozlowski, linux-wireless, Kalle Valo,
	brcm80211, asahi, Hector Martin

On 8/20/2024 1:50 PM, Krzysztof Kozlowski wrote:
> On 20/08/2024 13:43, Arend van Spriel wrote:
>> On 8/20/2024 1:14 PM, Rob Herring (Arm) wrote:
>>>
>>> On Tue, 20 Aug 2024 12:12:15 +0200, Arend van Spriel wrote:
>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>> specification was changed. However, it was changed such that for these
>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>> string in the compatible list property as it was before that extension.
>>>> This patch restores that constraint.
>>>>
>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>> ---
>>>>    .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>    1 file changed, 10 insertions(+), 9 deletions(-)
>>>>
>>>
>>> My bot found errors running 'make dt_binding_check' on your patch:
>>>
>>> yamllint warnings/errors:
>>> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: [error] syntax error: expected <block end>, but found '-' (syntax)
>>>
>>> dtschema/dtc warnings/errors:
>>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml: ignoring, error parsing file
>>> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
>>> Documentation/devicetree/bindings/mmc/mmc-controller.example.dtb: /example-0/mmc@1c12000/wifi@1: failed to match any schema with compatible: ['brcm,bcm4329-fmac']
>>> make[2]: *** Deleting file 'Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts'
>>> Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
>>> make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts] Error 1
>>> make[2]: *** Waiting for unfinished jobs....
>>> make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1432: dt_binding_check] Error 2
>>> make: *** [Makefile:224: __sub-make] Error 2
>>>
>>> doc reference errors (make refcheckdocs):
>>>
>>> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240820101216.355012-2-arend.vanspriel@broadcom.com
>>>
>>> The base for the series is generally the latest rc1. A different dependency
>>> should be noted in *this* patch.
>>>
>>> If you already ran 'make dt_binding_check' and didn't see the above
>>> error(s), then make sure 'yamllint' is installed and dt-schema is up to
>>> date:
>>>
>>> pip3 install dtschema --upgrade
>>>
>>> Please check and re-submit after running the above command yourself. Note
>>> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
>>> your schema. However, it must be unset to test all examples with your schema.
>>
>> Thanks, Rob
>>
>> I will have to setup my environment for that. Will take a while to get
>> it all working.
> 
> It's just two commands:
> pip install
> or pix install if you use newer Ubuntu (no magic here, just like every
> other Python package)
> 
> and then `make dt_bindings_check`, optionally with arguments. There is
> no environment needed, you can do all this in the same place you build
> and test kernel changes.

That's what you think. I am working on an IT managed RHEL7 server and I 
have to work around their infrastructure. So trust me that it is not 
straightforward on my side of the abyss.

Regards,
Arend

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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 11:39     ` Krzysztof Kozlowski
@ 2024-08-20 12:50       ` Arend van Spriel
  2024-08-20 14:53         ` Arend Van Spriel
  2024-08-20 15:36         ` Krzysztof Kozlowski
  0 siblings, 2 replies; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 12:50 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>> When extending the bindings for Apple PCIe devices the compatible property
>>> specification was changed. However, it was changed such that for these
>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>> string in the compatible list property as it was before that extension.
>>
>> Apart that this was never tested... That statement is not true. Look at
>> "fixed" commit - it is not doing like that at all.
>>
>> I don't understand the reasoning.
>>
>>> This patch restores that constraint.
>>>
>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>> ---
>>>   .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>   1 file changed, 10 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>> index e564f20d8f41..47f90446322f 100644
>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>   title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>   
>>>   maintainers:
>>> -  - Arend van Spriel <arend@broadcom.com>
>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>   
>>>   description:
>>>     The Broadcom Single chip MAC part for the BCM4329 family and
>>> @@ -27,7 +27,6 @@ properties:
>>>                 - brcm,bcm4341b0-fmac
>>>                 - brcm,bcm4341b4-fmac
>>>                 - brcm,bcm4341b5-fmac
>>> -              - brcm,bcm4329-fmac
>>>                 - brcm,bcm4330-fmac
>>>                 - brcm,bcm4334-fmac
>>>                 - brcm,bcm43340-fmac
>>> @@ -46,13 +45,15 @@ properties:
>>>                 - cypress,cyw43012-fmac
>>>                 - infineon,cyw43439-fmac
>>>             - const: brcm,bcm4329-fmac
>>> -      - enum:
>>> -          - brcm,bcm4329-fmac
>>> -          - pci14e4,43dc  # BCM4355
>>> -          - pci14e4,4464  # BCM4364
>>> -          - pci14e4,4488  # BCM4377
>>> -          - pci14e4,4425  # BCM4378
>>> -          - pci14e4,4433  # BCM4387
>>> +    - items:
>>> +          - enum:
>>> +              - pci14e4,43dc  # BCM4355
>>> +              - pci14e4,4464  # BCM4364
>>> +              - pci14e4,4488  # BCM4377
>>> +              - pci14e4,4425  # BCM4378
>>> +              - pci14e4,4433  # BCM4387
>>> +          - const: brcm,bcm4329-fmac
>>> +    - const: brcm,bcm4329-fmac
>>
>> And this does not make sense... You claim that some constrained was
>> droppped and you re-add it, but in fact you still add the same code as
>> it was before.
>>
>> NAK.
> 
> Ah, the last "const" actually makes sense, I missed that.
> 
> Commit still however lacks rationale why these devices are compatible.
> Plus existing rationale that e2e37224e8b3 changed something is entirely
> WRONG. It changed nothing. ZERO. It only added new devices, which was
> claimed are not compatible with brcm,bcm4329-fmac.

So is that claim true? What does it mean that these new devices are not 
compatible. If they are they should be in a separate binding or the 
applicable properties for these devices should be made conditional.

> Now if you claim that original commit which said "these devices are not
> compatible with brcm,bcm4329-fmac", then please provide arguments, not
> just say "other commit did something". It did nothing...

Not entirely true. Indeed new devices were added for which no 
"brcm,bcm4329-fmac" string is required in the compatible property. Also 
the commit added new properties for these new devices. Now in my opinion 
a driver should not use these properties without a "compatible" check. 
Hope we can agree to that. However, the driver patch for supporting the 
binding change does no such thing. So if we leave the binding as it 
currently is the driver will have to check if compatible has any of the 
listed PCI IDs before processing the properties. As all properties old 
and new are marked as optional I can not come up with an argument that 
these new devices are *not* compatible with brcm,bcm4329-fmac.

Regards,
Arend

> Best regards,
> Krzysztof
> 

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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 12:50       ` Arend van Spriel
@ 2024-08-20 14:53         ` Arend Van Spriel
  2024-08-20 15:37           ` Krzysztof Kozlowski
  2024-08-20 15:36         ` Krzysztof Kozlowski
  1 sibling, 1 reply; 20+ messages in thread
From: Arend Van Spriel @ 2024-08-20 14:53 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On August 20, 2024 2:50:24 PM Arend van Spriel 
<arend.vanspriel@broadcom.com> wrote:

> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>> specification was changed. However, it was changed such that for these
>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>> string in the compatible list property as it was before that extension.
>>>
>>> Apart that this was never tested... That statement is not true. Look at
>>> "fixed" commit - it is not doing like that at all.
>>>
>>> I don't understand the reasoning.
>>>
>>>> This patch restores that constraint.
>>>>
>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties 
>>>> & chips")
>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>> ---
>>>> .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>> 1 file changed, 10 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git 
>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml 
>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> index e564f20d8f41..47f90446322f 100644
>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>
>>>> maintainers:
>>>> -  - Arend van Spriel <arend@broadcom.com>
>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>
>>>> description:
>>>> The Broadcom Single chip MAC part for the BCM4329 family and
>>>> @@ -27,7 +27,6 @@ properties:
>>>>          - brcm,bcm4341b0-fmac
>>>>          - brcm,bcm4341b4-fmac
>>>>          - brcm,bcm4341b5-fmac
>>>> -              - brcm,bcm4329-fmac
>>>>          - brcm,bcm4330-fmac
>>>>          - brcm,bcm4334-fmac
>>>>          - brcm,bcm43340-fmac
>>>> @@ -46,13 +45,15 @@ properties:
>>>>          - cypress,cyw43012-fmac
>>>>          - infineon,cyw43439-fmac
>>>>      - const: brcm,bcm4329-fmac
>>>> -      - enum:
>>>> -          - brcm,bcm4329-fmac
>>>> -          - pci14e4,43dc  # BCM4355
>>>> -          - pci14e4,4464  # BCM4364
>>>> -          - pci14e4,4488  # BCM4377
>>>> -          - pci14e4,4425  # BCM4378
>>>> -          - pci14e4,4433  # BCM4387
>>>> +    - items:
>>>> +          - enum:
>>>> +              - pci14e4,43dc  # BCM4355
>>>> +              - pci14e4,4464  # BCM4364
>>>> +              - pci14e4,4488  # BCM4377
>>>> +              - pci14e4,4425  # BCM4378
>>>> +              - pci14e4,4433  # BCM4387
>>>> +          - const: brcm,bcm4329-fmac
>>>> +    - const: brcm,bcm4329-fmac
>>>
>>> And this does not make sense... You claim that some constrained was
>>> droppped and you re-add it, but in fact you still add the same code as
>>> it was before.
>>>
>>> NAK.
>>
>> Ah, the last "const" actually makes sense, I missed that.
>>
>> Commit still however lacks rationale why these devices are compatible.
>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>> claimed are not compatible with brcm,bcm4329-fmac.
>
> So is that claim true? What does it mean that these new devices are not
> compatible. If they are they should be in a separate binding or the
> applicable properties for these devices should be made conditional.
>
>> Now if you claim that original commit which said "these devices are not
>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>> just say "other commit did something". It did nothing...
>
> Not entirely true. Indeed new devices were added for which no
> "brcm,bcm4329-fmac" string is required in the compatible property. Also
> the commit added new properties for these new devices. Now in my opinion
> a driver should not use these properties without a "compatible" check.
> Hope we can agree to that. However, the driver patch for supporting the
> binding change does no such thing. So if we leave the binding as it
> currently is the driver will have to check if compatible has any of the
> listed PCI IDs before processing the properties. As all properties old
> and new are marked as optional I can not come up with an argument that
> these new devices are *not* compatible with brcm,bcm4329-fmac.

Looking at the commit in patchwork I see no claim in the commit message 
that the new devices are not compatible. The patch even adds enum with the 
PCI IDs *and* brcm,bcm4329-fmac. It is anyone's guess what the intent was 
for doing that. My take is that this was a mistake worth fixing.

Regards,
Arend

>
> Regards,
> Arend
>
>> Best regards,
>> Krzysztof




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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 12:50       ` Arend van Spriel
  2024-08-20 14:53         ` Arend Van Spriel
@ 2024-08-20 15:36         ` Krzysztof Kozlowski
  2024-08-20 15:50           ` Krzysztof Kozlowski
  1 sibling, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-20 15:36 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On 20/08/2024 14:50, Arend van Spriel wrote:
> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>> specification was changed. However, it was changed such that for these
>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>> string in the compatible list property as it was before that extension.
>>>
>>> Apart that this was never tested... That statement is not true. Look at
>>> "fixed" commit - it is not doing like that at all.
>>>
>>> I don't understand the reasoning.
>>>
>>>> This patch restores that constraint.
>>>>
>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>> ---
>>>>   .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>   1 file changed, 10 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> index e564f20d8f41..47f90446322f 100644
>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>   title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>   
>>>>   maintainers:
>>>> -  - Arend van Spriel <arend@broadcom.com>
>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>   
>>>>   description:
>>>>     The Broadcom Single chip MAC part for the BCM4329 family and
>>>> @@ -27,7 +27,6 @@ properties:
>>>>                 - brcm,bcm4341b0-fmac
>>>>                 - brcm,bcm4341b4-fmac
>>>>                 - brcm,bcm4341b5-fmac
>>>> -              - brcm,bcm4329-fmac
>>>>                 - brcm,bcm4330-fmac
>>>>                 - brcm,bcm4334-fmac
>>>>                 - brcm,bcm43340-fmac
>>>> @@ -46,13 +45,15 @@ properties:
>>>>                 - cypress,cyw43012-fmac
>>>>                 - infineon,cyw43439-fmac
>>>>             - const: brcm,bcm4329-fmac
>>>> -      - enum:
>>>> -          - brcm,bcm4329-fmac
>>>> -          - pci14e4,43dc  # BCM4355
>>>> -          - pci14e4,4464  # BCM4364
>>>> -          - pci14e4,4488  # BCM4377
>>>> -          - pci14e4,4425  # BCM4378
>>>> -          - pci14e4,4433  # BCM4387
>>>> +    - items:
>>>> +          - enum:
>>>> +              - pci14e4,43dc  # BCM4355
>>>> +              - pci14e4,4464  # BCM4364
>>>> +              - pci14e4,4488  # BCM4377
>>>> +              - pci14e4,4425  # BCM4378
>>>> +              - pci14e4,4433  # BCM4387
>>>> +          - const: brcm,bcm4329-fmac
>>>> +    - const: brcm,bcm4329-fmac
>>>
>>> And this does not make sense... You claim that some constrained was
>>> droppped and you re-add it, but in fact you still add the same code as
>>> it was before.
>>>
>>> NAK.
>>
>> Ah, the last "const" actually makes sense, I missed that.
>>
>> Commit still however lacks rationale why these devices are compatible.
>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>> claimed are not compatible with brcm,bcm4329-fmac.
> 
> So is that claim true? What does it mean that these new devices are not 
> compatible. If they are they should be in a separate binding or the 

Whether binding is separate or not, is just way of organizing things.

> applicable properties for these devices should be made conditional.

Could be if they are not applicable.

> 
>> Now if you claim that original commit which said "these devices are not
>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>> just say "other commit did something". It did nothing...
> 
> Not entirely true. Indeed new devices were added for which no 
> "brcm,bcm4329-fmac" string is required in the compatible property. Also 
> the commit added new properties for these new devices. Now in my opinion 
> a driver should not use these properties without a "compatible" check. 
> Hope we can agree to that. However, the driver patch for supporting the 

Sorry, I don't follow. Why the driver would need to check for compatible?

> binding change does no such thing. So if we leave the binding as it 
> currently is the driver will have to check if compatible has any of the 
> listed PCI IDs before processing the properties. As all properties old

Why driver needs to check it? Are these properties not valid?

> and new are marked as optional I can not come up with an argument that 
> these new devices are *not* compatible with brcm,bcm4329-fmac.

Compatibility is expressed by implementing same programming interfasce
(or its subset) thus being able to bind via fallback and correctly
operate in given SW.

I don't know whether that's the case here, so rephrasing my earlier
comments - the commit msg should focus on this aspect and tell that
devices are fully compatible, thus they should use fallback.

Quick look at drivers told me that not - they are not compatible...

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 14:53         ` Arend Van Spriel
@ 2024-08-20 15:37           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-20 15:37 UTC (permalink / raw)
  To: Arend Van Spriel
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On 20/08/2024 16:53, Arend Van Spriel wrote:
> On August 20, 2024 2:50:24 PM Arend van Spriel 
> <arend.vanspriel@broadcom.com> wrote:
> 
>> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>>> specification was changed. However, it was changed such that for these
>>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>>> string in the compatible list property as it was before that extension.
>>>>
>>>> Apart that this was never tested... That statement is not true. Look at
>>>> "fixed" commit - it is not doing like that at all.
>>>>
>>>> I don't understand the reasoning.
>>>>
>>>>> This patch restores that constraint.
>>>>>
>>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties 
>>>>> & chips")
>>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>> ---
>>>>> .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>> 1 file changed, 10 insertions(+), 9 deletions(-)
>>>>>
>>>>> diff --git 
>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml 
>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>> index e564f20d8f41..47f90446322f 100644
>>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>> title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>>
>>>>> maintainers:
>>>>> -  - Arend van Spriel <arend@broadcom.com>
>>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>
>>>>> description:
>>>>> The Broadcom Single chip MAC part for the BCM4329 family and
>>>>> @@ -27,7 +27,6 @@ properties:
>>>>>          - brcm,bcm4341b0-fmac
>>>>>          - brcm,bcm4341b4-fmac
>>>>>          - brcm,bcm4341b5-fmac
>>>>> -              - brcm,bcm4329-fmac
>>>>>          - brcm,bcm4330-fmac
>>>>>          - brcm,bcm4334-fmac
>>>>>          - brcm,bcm43340-fmac
>>>>> @@ -46,13 +45,15 @@ properties:
>>>>>          - cypress,cyw43012-fmac
>>>>>          - infineon,cyw43439-fmac
>>>>>      - const: brcm,bcm4329-fmac
>>>>> -      - enum:
>>>>> -          - brcm,bcm4329-fmac
>>>>> -          - pci14e4,43dc  # BCM4355
>>>>> -          - pci14e4,4464  # BCM4364
>>>>> -          - pci14e4,4488  # BCM4377
>>>>> -          - pci14e4,4425  # BCM4378
>>>>> -          - pci14e4,4433  # BCM4387
>>>>> +    - items:
>>>>> +          - enum:
>>>>> +              - pci14e4,43dc  # BCM4355
>>>>> +              - pci14e4,4464  # BCM4364
>>>>> +              - pci14e4,4488  # BCM4377
>>>>> +              - pci14e4,4425  # BCM4378
>>>>> +              - pci14e4,4433  # BCM4387
>>>>> +          - const: brcm,bcm4329-fmac
>>>>> +    - const: brcm,bcm4329-fmac
>>>>
>>>> And this does not make sense... You claim that some constrained was
>>>> droppped and you re-add it, but in fact you still add the same code as
>>>> it was before.
>>>>
>>>> NAK.
>>>
>>> Ah, the last "const" actually makes sense, I missed that.
>>>
>>> Commit still however lacks rationale why these devices are compatible.
>>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>>> claimed are not compatible with brcm,bcm4329-fmac.
>>
>> So is that claim true? What does it mean that these new devices are not
>> compatible. If they are they should be in a separate binding or the
>> applicable properties for these devices should be made conditional.
>>
>>> Now if you claim that original commit which said "these devices are not
>>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>>> just say "other commit did something". It did nothing...
>>
>> Not entirely true. Indeed new devices were added for which no
>> "brcm,bcm4329-fmac" string is required in the compatible property. Also
>> the commit added new properties for these new devices. Now in my opinion
>> a driver should not use these properties without a "compatible" check.
>> Hope we can agree to that. However, the driver patch for supporting the
>> binding change does no such thing. So if we leave the binding as it
>> currently is the driver will have to check if compatible has any of the
>> listed PCI IDs before processing the properties. As all properties old
>> and new are marked as optional I can not come up with an argument that
>> these new devices are *not* compatible with brcm,bcm4329-fmac.
> 
> Looking at the commit in patchwork I see no claim in the commit message 
> that the new devices are not compatible. The patch even adds enum with the 
> PCI IDs *and* brcm,bcm4329-fmac. It is anyone's guess what the intent was 

Enum means not compatible. What to add more? You use one fact to deliver
entirely different conclusion.

> for doing that. My take is that this was a mistake worth fixing.
> 

You still did not describe any mistake here.


Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 15:36         ` Krzysztof Kozlowski
@ 2024-08-20 15:50           ` Krzysztof Kozlowski
  2024-08-20 19:29             ` Arend van Spriel
  0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-20 15:50 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On 20/08/2024 17:36, Krzysztof Kozlowski wrote:
> On 20/08/2024 14:50, Arend van Spriel wrote:
>> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>>> specification was changed. However, it was changed such that for these
>>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>>> string in the compatible list property as it was before that extension.
>>>>
>>>> Apart that this was never tested... That statement is not true. Look at
>>>> "fixed" commit - it is not doing like that at all.
>>>>
>>>> I don't understand the reasoning.
>>>>
>>>>> This patch restores that constraint.
>>>>>
>>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>> ---
>>>>>   .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>>   1 file changed, 10 insertions(+), 9 deletions(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>> index e564f20d8f41..47f90446322f 100644
>>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>>   title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>>   
>>>>>   maintainers:
>>>>> -  - Arend van Spriel <arend@broadcom.com>
>>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>   
>>>>>   description:
>>>>>     The Broadcom Single chip MAC part for the BCM4329 family and
>>>>> @@ -27,7 +27,6 @@ properties:
>>>>>                 - brcm,bcm4341b0-fmac
>>>>>                 - brcm,bcm4341b4-fmac
>>>>>                 - brcm,bcm4341b5-fmac
>>>>> -              - brcm,bcm4329-fmac
>>>>>                 - brcm,bcm4330-fmac
>>>>>                 - brcm,bcm4334-fmac
>>>>>                 - brcm,bcm43340-fmac
>>>>> @@ -46,13 +45,15 @@ properties:
>>>>>                 - cypress,cyw43012-fmac
>>>>>                 - infineon,cyw43439-fmac
>>>>>             - const: brcm,bcm4329-fmac
>>>>> -      - enum:
>>>>> -          - brcm,bcm4329-fmac
>>>>> -          - pci14e4,43dc  # BCM4355
>>>>> -          - pci14e4,4464  # BCM4364
>>>>> -          - pci14e4,4488  # BCM4377
>>>>> -          - pci14e4,4425  # BCM4378
>>>>> -          - pci14e4,4433  # BCM4387
>>>>> +    - items:
>>>>> +          - enum:
>>>>> +              - pci14e4,43dc  # BCM4355
>>>>> +              - pci14e4,4464  # BCM4364
>>>>> +              - pci14e4,4488  # BCM4377
>>>>> +              - pci14e4,4425  # BCM4378
>>>>> +              - pci14e4,4433  # BCM4387
>>>>> +          - const: brcm,bcm4329-fmac
>>>>> +    - const: brcm,bcm4329-fmac
>>>>
>>>> And this does not make sense... You claim that some constrained was
>>>> droppped and you re-add it, but in fact you still add the same code as
>>>> it was before.
>>>>
>>>> NAK.
>>>
>>> Ah, the last "const" actually makes sense, I missed that.
>>>
>>> Commit still however lacks rationale why these devices are compatible.
>>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>>> claimed are not compatible with brcm,bcm4329-fmac.
>>
>> So is that claim true? What does it mean that these new devices are not 
>> compatible. If they are they should be in a separate binding or the 
> 
> Whether binding is separate or not, is just way of organizing things.
> 
>> applicable properties for these devices should be made conditional.
> 
> Could be if they are not applicable.
> 
>>
>>> Now if you claim that original commit which said "these devices are not
>>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>>> just say "other commit did something". It did nothing...
>>
>> Not entirely true. Indeed new devices were added for which no 
>> "brcm,bcm4329-fmac" string is required in the compatible property. Also 
>> the commit added new properties for these new devices. Now in my opinion 
>> a driver should not use these properties without a "compatible" check. 
>> Hope we can agree to that. However, the driver patch for supporting the 
> 
> Sorry, I don't follow. Why the driver would need to check for compatible?
> 
>> binding change does no such thing. So if we leave the binding as it 
>> currently is the driver will have to check if compatible has any of the 
>> listed PCI IDs before processing the properties. As all properties old
> 
> Why driver needs to check it? Are these properties not valid?
> 
>> and new are marked as optional I can not come up with an argument that 
>> these new devices are *not* compatible with brcm,bcm4329-fmac.
> 
> Compatibility is expressed by implementing same programming interfasce
> (or its subset) thus being able to bind via fallback and correctly
> operate in given SW.
> 
> I don't know whether that's the case here, so rephrasing my earlier
> comments - the commit msg should focus on this aspect and tell that
> devices are fully compatible, thus they should use fallback.
> 
> Quick look at drivers told me that not - they are not compatible...

Another thing is that calling SDIO and PCI devices compatible is quite a
stretch... Clearly hardware-wise they are very different and Linux does
not use the same interfaces to match/bind them.

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 11:50       ` Krzysztof Kozlowski
  2024-08-20 12:08         ` Arend van Spriel
@ 2024-08-20 19:01         ` Arend van Spriel
  1 sibling, 0 replies; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 19:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Rob Herring (Arm)
  Cc: devicetree, Krzysztof Kozlowski, linux-wireless, Kalle Valo,
	brcm80211, asahi, Hector Martin

On 8/20/2024 1:50 PM, Krzysztof Kozlowski wrote:
> On 20/08/2024 13:43, Arend van Spriel wrote:
>> On 8/20/2024 1:14 PM, Rob Herring (Arm) wrote:
>>>
>>> On Tue, 20 Aug 2024 12:12:15 +0200, Arend van Spriel wrote:
>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>> specification was changed. However, it was changed such that for these
>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>> string in the compatible list property as it was before that extension.
>>>> This patch restores that constraint.
>>>>
>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>> ---
>>>>    .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>    1 file changed, 10 insertions(+), 9 deletions(-)
>>>>
>>>
>>> My bot found errors running 'make dt_binding_check' on your patch:
>>>
>>> yamllint warnings/errors:
>>> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: [error] syntax error: expected <block end>, but found '-' (syntax)
>>>
>>> dtschema/dtc warnings/errors:
>>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml: ignoring, error parsing file
>>> ./Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
>>> Documentation/devicetree/bindings/mmc/mmc-controller.example.dtb: /example-0/mmc@1c12000/wifi@1: failed to match any schema with compatible: ['brcm,bcm4329-fmac']
>>> make[2]: *** Deleting file 'Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts'
>>> Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml:48:5: did not find expected key
>>> make[2]: *** [Documentation/devicetree/bindings/Makefile:26: Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.example.dts] Error 1
>>> make[2]: *** Waiting for unfinished jobs....
>>> make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1432: dt_binding_check] Error 2
>>> make: *** [Makefile:224: __sub-make] Error 2
>>>
>>> doc reference errors (make refcheckdocs):
>>>
>>> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240820101216.355012-2-arend.vanspriel@broadcom.com
>>>
>>> The base for the series is generally the latest rc1. A different dependency
>>> should be noted in *this* patch.
>>>
>>> If you already ran 'make dt_binding_check' and didn't see the above
>>> error(s), then make sure 'yamllint' is installed and dt-schema is up to
>>> date:
>>>
>>> pip3 install dtschema --upgrade
>>>
>>> Please check and re-submit after running the above command yourself. Note
>>> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
>>> your schema. However, it must be unset to test all examples with your schema.
>>
>> Thanks, Rob
>>
>> I will have to setup my environment for that. Will take a while to get
>> it all working.
> 
> It's just two commands:
> pip install
> or pix install if you use newer Ubuntu (no magic here, just like every
> other Python package)
> 
> and then `make dt_bindings_check`, optionally with arguments. There is
> no environment needed, you can do all this in the same place you build
> and test kernel changes.

I could install dtschema, but I had to manually create the console 
scripts listed in entry_points.txt. Now I was able to run 
dt_bindings_check. It took me a while to interpret the error message, 
but it boiled down to indentation errors. After fixing it 
dt_binding_check target completes succesfully.

Regards,
Arend

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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 15:50           ` Krzysztof Kozlowski
@ 2024-08-20 19:29             ` Arend van Spriel
  2024-08-21  6:46               ` Krzysztof Kozlowski
  0 siblings, 1 reply; 20+ messages in thread
From: Arend van Spriel @ 2024-08-20 19:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On August 20, 2024 5:51:03 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:

> On 20/08/2024 17:36, Krzysztof Kozlowski wrote:
>> On 20/08/2024 14:50, Arend van Spriel wrote:
>>> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>>>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>>>> specification was changed. However, it was changed such that for these
>>>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>>>> string in the compatible list property as it was before that extension.
>>>>>
>>>>> Apart that this was never tested... That statement is not true. Look at
>>>>> "fixed" commit - it is not doing like that at all.
>>>>>
>>>>> I don't understand the reasoning.
>>>>>
>>>>>> This patch restores that constraint.
>>>>>>
>>>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties 
>>>>>> & chips")
>>>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>> ---
>>>>>> .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>>> 1 file changed, 10 insertions(+), 9 deletions(-)
>>>>>>
>>>>>> diff --git 
>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml 
>>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>> index e564f20d8f41..47f90446322f 100644
>>>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>>> title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>>>
>>>>>> maintainers:
>>>>>> -  - Arend van Spriel <arend@broadcom.com>
>>>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>>
>>>>>> description:
>>>>>> The Broadcom Single chip MAC part for the BCM4329 family and
>>>>>> @@ -27,7 +27,6 @@ properties:
>>>>>>            - brcm,bcm4341b0-fmac
>>>>>>            - brcm,bcm4341b4-fmac
>>>>>>            - brcm,bcm4341b5-fmac
>>>>>> -              - brcm,bcm4329-fmac
>>>>>>            - brcm,bcm4330-fmac
>>>>>>            - brcm,bcm4334-fmac
>>>>>>            - brcm,bcm43340-fmac
>>>>>> @@ -46,13 +45,15 @@ properties:
>>>>>>            - cypress,cyw43012-fmac
>>>>>>            - infineon,cyw43439-fmac
>>>>>>        - const: brcm,bcm4329-fmac
>>>>>> -      - enum:
>>>>>> -          - brcm,bcm4329-fmac
>>>>>> -          - pci14e4,43dc  # BCM4355
>>>>>> -          - pci14e4,4464  # BCM4364
>>>>>> -          - pci14e4,4488  # BCM4377
>>>>>> -          - pci14e4,4425  # BCM4378
>>>>>> -          - pci14e4,4433  # BCM4387
>>>>>> +    - items:
>>>>>> +          - enum:
>>>>>> +              - pci14e4,43dc  # BCM4355
>>>>>> +              - pci14e4,4464  # BCM4364
>>>>>> +              - pci14e4,4488  # BCM4377
>>>>>> +              - pci14e4,4425  # BCM4378
>>>>>> +              - pci14e4,4433  # BCM4387
>>>>>> +          - const: brcm,bcm4329-fmac
>>>>>> +    - const: brcm,bcm4329-fmac
>>>>>
>>>>> And this does not make sense... You claim that some constrained was
>>>>> droppped and you re-add it, but in fact you still add the same code as
>>>>> it was before.
>>>>>
>>>>> NAK.
>>>>
>>>> Ah, the last "const" actually makes sense, I missed that.
>>>>
>>>> Commit still however lacks rationale why these devices are compatible.
>>>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>>>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>>>> claimed are not compatible with brcm,bcm4329-fmac.
>>>
>>> So is that claim true? What does it mean that these new devices are not
>>> compatible. If they are they should be in a separate binding or the
>>
>> Whether binding is separate or not, is just way of organizing things.
>>
>>> applicable properties for these devices should be made conditional.
>>
>> Could be if they are not applicable.
>>
>>>
>>>> Now if you claim that original commit which said "these devices are not
>>>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>>>> just say "other commit did something". It did nothing...
>>>
>>> Not entirely true. Indeed new devices were added for which no
>>> "brcm,bcm4329-fmac" string is required in the compatible property. Also
>>> the commit added new properties for these new devices. Now in my opinion
>>> a driver should not use these properties without a "compatible" check.
>>> Hope we can agree to that. However, the driver patch for supporting the
>>
>> Sorry, I don't follow. Why the driver would need to check for compatible?
>>
>>> binding change does no such thing. So if we leave the binding as it
>>> currently is the driver will have to check if compatible has any of the
>>> listed PCI IDs before processing the properties. As all properties old
>>
>> Why driver needs to check it? Are these properties not valid?

How would the driver know other than the compatible property? The node 
with properties is delivered by the bus driver. If that comes with 
guarantees about validity than that's great.

>>
>>
>>> and new are marked as optional I can not come up with an argument that
>>> these new devices are *not* compatible with brcm,bcm4329-fmac.
>>
>> Compatibility is expressed by implementing same programming interfasce
>> (or its subset) thus being able to bind via fallback and correctly
>> operate in given SW.

This exactly what I mean to say (and apparently fail to do so ;-s ).

>> I don't know whether that's the case here, so rephrasing my earlier
>> comments - the commit msg should focus on this aspect and tell that
>> devices are fully compatible, thus they should use fallback.
>>
>> Quick look at drivers told me that not - they are not compatible...

Okay. That puts use in different corner of the arena. Can you elaborate 
how you come to that assessment? Is that based on the fact that some of 
the properties are SDIO-only?

>>
> Another thing is that calling SDIO and PCI devices compatible is quite a
> stretch... Clearly hardware-wise they are very different and Linux does
> not use the same interfaces to match/bind them.

These are wifi devices which hardware-wise are 95% the same. If you find 
the block diagram with IP cores for these devices (enough google results 
to find some) you can see they sometimes even have both PCI and SDIO 
block on-chip although only one is used so they can be considered 100% 
the same. In both cases the bus driver will attach the DT node to the 
binding device.

Regards,
Arend



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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-20 19:29             ` Arend van Spriel
@ 2024-08-21  6:46               ` Krzysztof Kozlowski
  2024-08-22  0:26                 ` Julian Calaby
  0 siblings, 1 reply; 20+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-21  6:46 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On 20/08/2024 21:29, Arend van Spriel wrote:
> On August 20, 2024 5:51:03 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 
>> On 20/08/2024 17:36, Krzysztof Kozlowski wrote:
>>> On 20/08/2024 14:50, Arend van Spriel wrote:
>>>> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>>>>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>>>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>>>>> specification was changed. However, it was changed such that for these
>>>>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>>>>> string in the compatible list property as it was before that extension.
>>>>>>
>>>>>> Apart that this was never tested... That statement is not true. Look at
>>>>>> "fixed" commit - it is not doing like that at all.
>>>>>>
>>>>>> I don't understand the reasoning.
>>>>>>
>>>>>>> This patch restores that constraint.
>>>>>>>
>>>>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties 
>>>>>>> & chips")
>>>>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>>> ---
>>>>>>> .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>>>> 1 file changed, 10 insertions(+), 9 deletions(-)
>>>>>>>
>>>>>>> diff --git 
>>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml 
>>>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>>> index e564f20d8f41..47f90446322f 100644
>>>>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>>>> title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>>>>
>>>>>>> maintainers:
>>>>>>> -  - Arend van Spriel <arend@broadcom.com>
>>>>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>>>
>>>>>>> description:
>>>>>>> The Broadcom Single chip MAC part for the BCM4329 family and
>>>>>>> @@ -27,7 +27,6 @@ properties:
>>>>>>>            - brcm,bcm4341b0-fmac
>>>>>>>            - brcm,bcm4341b4-fmac
>>>>>>>            - brcm,bcm4341b5-fmac
>>>>>>> -              - brcm,bcm4329-fmac
>>>>>>>            - brcm,bcm4330-fmac
>>>>>>>            - brcm,bcm4334-fmac
>>>>>>>            - brcm,bcm43340-fmac
>>>>>>> @@ -46,13 +45,15 @@ properties:
>>>>>>>            - cypress,cyw43012-fmac
>>>>>>>            - infineon,cyw43439-fmac
>>>>>>>        - const: brcm,bcm4329-fmac
>>>>>>> -      - enum:
>>>>>>> -          - brcm,bcm4329-fmac
>>>>>>> -          - pci14e4,43dc  # BCM4355
>>>>>>> -          - pci14e4,4464  # BCM4364
>>>>>>> -          - pci14e4,4488  # BCM4377
>>>>>>> -          - pci14e4,4425  # BCM4378
>>>>>>> -          - pci14e4,4433  # BCM4387
>>>>>>> +    - items:
>>>>>>> +          - enum:
>>>>>>> +              - pci14e4,43dc  # BCM4355
>>>>>>> +              - pci14e4,4464  # BCM4364
>>>>>>> +              - pci14e4,4488  # BCM4377
>>>>>>> +              - pci14e4,4425  # BCM4378
>>>>>>> +              - pci14e4,4433  # BCM4387
>>>>>>> +          - const: brcm,bcm4329-fmac
>>>>>>> +    - const: brcm,bcm4329-fmac
>>>>>>
>>>>>> And this does not make sense... You claim that some constrained was
>>>>>> droppped and you re-add it, but in fact you still add the same code as
>>>>>> it was before.
>>>>>>
>>>>>> NAK.
>>>>>
>>>>> Ah, the last "const" actually makes sense, I missed that.
>>>>>
>>>>> Commit still however lacks rationale why these devices are compatible.
>>>>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>>>>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>>>>> claimed are not compatible with brcm,bcm4329-fmac.
>>>>
>>>> So is that claim true? What does it mean that these new devices are not
>>>> compatible. If they are they should be in a separate binding or the
>>>
>>> Whether binding is separate or not, is just way of organizing things.
>>>
>>>> applicable properties for these devices should be made conditional.
>>>
>>> Could be if they are not applicable.
>>>
>>>>
>>>>> Now if you claim that original commit which said "these devices are not
>>>>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>>>>> just say "other commit did something". It did nothing...
>>>>
>>>> Not entirely true. Indeed new devices were added for which no
>>>> "brcm,bcm4329-fmac" string is required in the compatible property. Also
>>>> the commit added new properties for these new devices. Now in my opinion
>>>> a driver should not use these properties without a "compatible" check.
>>>> Hope we can agree to that. However, the driver patch for supporting the
>>>
>>> Sorry, I don't follow. Why the driver would need to check for compatible?
>>>
>>>> binding change does no such thing. So if we leave the binding as it
>>>> currently is the driver will have to check if compatible has any of the
>>>> listed PCI IDs before processing the properties. As all properties old
>>>
>>> Why driver needs to check it? Are these properties not valid?
> 
> How would the driver know other than the compatible property? The node 
> with properties is delivered by the bus driver. If that comes with 
> guarantees about validity than that's great.

I still do not follow what is the problem being addressed by driver
needing to check.

> 
>>>
>>>
>>>> and new are marked as optional I can not come up with an argument that
>>>> these new devices are *not* compatible with brcm,bcm4329-fmac.
>>>
>>> Compatibility is expressed by implementing same programming interfasce
>>> (or its subset) thus being able to bind via fallback and correctly
>>> operate in given SW.
> 
> This exactly what I mean to say (and apparently fail to do so ;-s ).
> 
>>> I don't know whether that's the case here, so rephrasing my earlier
>>> comments - the commit msg should focus on this aspect and tell that
>>> devices are fully compatible, thus they should use fallback.
>>>
>>> Quick look at drivers told me that not - they are not compatible...
> 
> Okay. That puts use in different corner of the arena. Can you elaborate 
> how you come to that assessment? Is that based on the fact that some of 
> the properties are SDIO-only?

The simplest: because they do not use the same match/bind code. Plus PCI
devices never used half of brcmf_of_probe(). Although that's more of a
reason these are significantly different.

> 
>>>
>> Another thing is that calling SDIO and PCI devices compatible is quite a
>> stretch... Clearly hardware-wise they are very different and Linux does
>> not use the same interfaces to match/bind them.
> 
> These are wifi devices which hardware-wise are 95% the same. If you find 
> the block diagram with IP cores for these devices (enough google results 
> to find some) you can see they sometimes even have both PCI and SDIO 
> block on-chip although only one is used so they can be considered 100% 
> the same. In both cases the bus driver will attach the DT node to the 
> binding device.

I understand they are similar, but it does not matter if that is 95% or
even 99% if the interface is different. Linux cannot use these devices
through the same interface. However if you claim it can, then please
write appropriate commit msg.

My entire objection hare started not because I believe these are not
compatible (although based on different buses I believe they are not
compatible), but because the argument was about that other commit. That
argument is not correct to make the change. Correct argument to make the
change could be: These devices are compatible, because of foo and bar.

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-21  6:46               ` Krzysztof Kozlowski
@ 2024-08-22  0:26                 ` Julian Calaby
  2024-08-22  6:29                   ` Arend Van Spriel
  0 siblings, 1 reply; 20+ messages in thread
From: Julian Calaby @ 2024-08-22  0:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Arend van Spriel, Kalle Valo, Hector Martin, Krzysztof Kozlowski,
	devicetree, linux-wireless, brcm80211, asahi

Hi Krzysztof, Arend,

On Wed, Aug 21, 2024 at 4:46 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 20/08/2024 21:29, Arend van Spriel wrote:
> > On August 20, 2024 5:51:03 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> >> On 20/08/2024 17:36, Krzysztof Kozlowski wrote:
> >>> On 20/08/2024 14:50, Arend van Spriel wrote:
> >>>> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
> >>>>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
> >>>>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
> >>>>>>> When extending the bindings for Apple PCIe devices the compatible property
> >>>>>>> specification was changed. However, it was changed such that for these
> >>>>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
> >>>>>>> string in the compatible list property as it was before that extension.
> >>>>>>
> >>>>>> Apart that this was never tested... That statement is not true. Look at
> >>>>>> "fixed" commit - it is not doing like that at all.
> >>>>>>
> >>>>>> I don't understand the reasoning.
> >>>>>>
> >>>>>>> This patch restores that constraint.
> >>>>>>>
> >>>>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties
> >>>>>>> & chips")
> >>>>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> >>>>>>> ---
> >>>>>>> .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
> >>>>>>> 1 file changed, 10 insertions(+), 9 deletions(-)
> >>>>>>>
> >>>>>>> diff --git
> >>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> >>>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> >>>>>>> index e564f20d8f41..47f90446322f 100644
> >>>>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> >>>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> >>>>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
> >>>>>>> title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
> >>>>>>>
> >>>>>>> maintainers:
> >>>>>>> -  - Arend van Spriel <arend@broadcom.com>
> >>>>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
> >>>>>>>
> >>>>>>> description:
> >>>>>>> The Broadcom Single chip MAC part for the BCM4329 family and
> >>>>>>> @@ -27,7 +27,6 @@ properties:
> >>>>>>>            - brcm,bcm4341b0-fmac
> >>>>>>>            - brcm,bcm4341b4-fmac
> >>>>>>>            - brcm,bcm4341b5-fmac
> >>>>>>> -              - brcm,bcm4329-fmac
> >>>>>>>            - brcm,bcm4330-fmac
> >>>>>>>            - brcm,bcm4334-fmac
> >>>>>>>            - brcm,bcm43340-fmac
> >>>>>>> @@ -46,13 +45,15 @@ properties:
> >>>>>>>            - cypress,cyw43012-fmac
> >>>>>>>            - infineon,cyw43439-fmac
> >>>>>>>        - const: brcm,bcm4329-fmac
> >>>>>>> -      - enum:
> >>>>>>> -          - brcm,bcm4329-fmac
> >>>>>>> -          - pci14e4,43dc  # BCM4355
> >>>>>>> -          - pci14e4,4464  # BCM4364
> >>>>>>> -          - pci14e4,4488  # BCM4377
> >>>>>>> -          - pci14e4,4425  # BCM4378
> >>>>>>> -          - pci14e4,4433  # BCM4387
> >>>>>>> +    - items:
> >>>>>>> +          - enum:
> >>>>>>> +              - pci14e4,43dc  # BCM4355
> >>>>>>> +              - pci14e4,4464  # BCM4364
> >>>>>>> +              - pci14e4,4488  # BCM4377
> >>>>>>> +              - pci14e4,4425  # BCM4378
> >>>>>>> +              - pci14e4,4433  # BCM4387
> >>>>>>> +          - const: brcm,bcm4329-fmac
> >>>>>>> +    - const: brcm,bcm4329-fmac
> >>>>>>
> >>>>>> And this does not make sense... You claim that some constrained was
> >>>>>> droppped and you re-add it, but in fact you still add the same code as
> >>>>>> it was before.
> >>>>>>
> >>>>>> NAK.
> >>>>>
> >>>>> Ah, the last "const" actually makes sense, I missed that.
> >>>>>
> >>>>> Commit still however lacks rationale why these devices are compatible.
> >>>>> Plus existing rationale that e2e37224e8b3 changed something is entirely
> >>>>> WRONG. It changed nothing. ZERO. It only added new devices, which was
> >>>>> claimed are not compatible with brcm,bcm4329-fmac.
> >>>>
> >>>> So is that claim true? What does it mean that these new devices are not
> >>>> compatible. If they are they should be in a separate binding or the
> >>>
> >>> Whether binding is separate or not, is just way of organizing things.
> >>>
> >>>> applicable properties for these devices should be made conditional.
> >>>
> >>> Could be if they are not applicable.
> >>>
> >>>>
> >>>>> Now if you claim that original commit which said "these devices are not
> >>>>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
> >>>>> just say "other commit did something". It did nothing...
> >>>>
> >>>> Not entirely true. Indeed new devices were added for which no
> >>>> "brcm,bcm4329-fmac" string is required in the compatible property. Also
> >>>> the commit added new properties for these new devices. Now in my opinion
> >>>> a driver should not use these properties without a "compatible" check.
> >>>> Hope we can agree to that. However, the driver patch for supporting the
> >>>
> >>> Sorry, I don't follow. Why the driver would need to check for compatible?
> >>>
> >>>> binding change does no such thing. So if we leave the binding as it
> >>>> currently is the driver will have to check if compatible has any of the
> >>>> listed PCI IDs before processing the properties. As all properties old
> >>>
> >>> Why driver needs to check it? Are these properties not valid?
> >
> > How would the driver know other than the compatible property? The node
> > with properties is delivered by the bus driver. If that comes with
> > guarantees about validity than that's great.
>
> I still do not follow what is the problem being addressed by driver
> needing to check.
>
> >
> >>>
> >>>
> >>>> and new are marked as optional I can not come up with an argument that
> >>>> these new devices are *not* compatible with brcm,bcm4329-fmac.
> >>>
> >>> Compatibility is expressed by implementing same programming interfasce
> >>> (or its subset) thus being able to bind via fallback and correctly
> >>> operate in given SW.
> >
> > This exactly what I mean to say (and apparently fail to do so ;-s ).
> >
> >>> I don't know whether that's the case here, so rephrasing my earlier
> >>> comments - the commit msg should focus on this aspect and tell that
> >>> devices are fully compatible, thus they should use fallback.
> >>>
> >>> Quick look at drivers told me that not - they are not compatible...
> >
> > Okay. That puts use in different corner of the arena. Can you elaborate
> > how you come to that assessment? Is that based on the fact that some of
> > the properties are SDIO-only?
>
> The simplest: because they do not use the same match/bind code. Plus PCI
> devices never used half of brcmf_of_probe(). Although that's more of a
> reason these are significantly different.
>
> >
> >>>
> >> Another thing is that calling SDIO and PCI devices compatible is quite a
> >> stretch... Clearly hardware-wise they are very different and Linux does
> >> not use the same interfaces to match/bind them.
> >
> > These are wifi devices which hardware-wise are 95% the same. If you find
> > the block diagram with IP cores for these devices (enough google results
> > to find some) you can see they sometimes even have both PCI and SDIO
> > block on-chip although only one is used so they can be considered 100%
> > the same. In both cases the bus driver will attach the DT node to the
> > binding device.
>
> I understand they are similar, but it does not matter if that is 95% or
> even 99% if the interface is different. Linux cannot use these devices
> through the same interface. However if you claim it can, then please
> write appropriate commit msg.
>
> My entire objection hare started not because I believe these are not
> compatible (although based on different buses I believe they are not
> compatible), but because the argument was about that other commit. That
> argument is not correct to make the change. Correct argument to make the
> change could be: These devices are compatible, because of foo and bar.

A way to put it might be something like:

Almost all Broadcom wireless chipsets, some Broadcom ethernet chipsets
and most Broadcom-derived Infineon and Cypress wireless chipsets share
the same rough layout:

System bus -> bus glue logic -> internal bus -> RF chipset(s)

Previous generations had separate drivers for the bus glue logic and
then probed the internal bus for the RF chipset(s), however in the
current generation that separation is mostly just a historical
artifact and abstraction layer.

The firmwares for all WiFi chipsets in this generation also provide
fundamentally identical interfaces with any differences either probed
at runtime or derived from data in the firmware. As such, once the
glue logic is abstracted away, all chipsets of this generation are
fundamentally identical from a software perspective. Therefore the
only data needed to use one of these chipsets is the type of bus to
select the glue logic driver and the firmware to load which is derived
from the vendor and product IDs.

The only real hardware differences between different chipsets are that
some have external interrupt lines or additional clocks and I'm not
sure if hooking those up is actually mandatory.

Thanks,

Julian Calaby



--
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

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

* Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property
  2024-08-22  0:26                 ` Julian Calaby
@ 2024-08-22  6:29                   ` Arend Van Spriel
  0 siblings, 0 replies; 20+ messages in thread
From: Arend Van Spriel @ 2024-08-22  6:29 UTC (permalink / raw)
  To: Julian Calaby, Krzysztof Kozlowski
  Cc: Kalle Valo, Hector Martin, Krzysztof Kozlowski, devicetree,
	linux-wireless, brcm80211, asahi

On August 22, 2024 2:26:27 AM Julian Calaby <julian.calaby@gmail.com> wrote:

> Hi Krzysztof, Arend,
>
> On Wed, Aug 21, 2024 at 4:46 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 20/08/2024 21:29, Arend van Spriel wrote:
>>> On August 20, 2024 5:51:03 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>>
>>>> On 20/08/2024 17:36, Krzysztof Kozlowski wrote:
>>>>> On 20/08/2024 14:50, Arend van Spriel wrote:
>>>>>> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>>>>>>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>>>>>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>>>>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>>>>>>> specification was changed. However, it was changed such that for these
>>>>>>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>>>>>>> string in the compatible list property as it was before that extension.
>>>>>>>>
>>>>>>>> Apart that this was never tested... That statement is not true. Look at
>>>>>>>> "fixed" commit - it is not doing like that at all.
>>>>>>>>
>>>>>>>> I don't understand the reasoning.
>>>>>>>>
>>>>>>>>> This patch restores that constraint.
>>>>>>>>>
>>>>>>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties
>>>>>>>>> & chips")
>>>>>>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>>>>> ---
>>>>>>>>> .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>>>>>> 1 file changed, 10 insertions(+), 9 deletions(-)
>>>>>>>>>
>>>>>>>>> diff --git
>>>>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>>>>> index e564f20d8f41..47f90446322f 100644
>>>>>>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>>>>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>>>>>> title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>>>>>>
>>>>>>>>> maintainers:
>>>>>>>>> -  - Arend van Spriel <arend@broadcom.com>
>>>>>>>>> +  - Arend van Spriel <arend.vanspriel@broadcom.com>
>>>>>>>>>
>>>>>>>>> description:
>>>>>>>>> The Broadcom Single chip MAC part for the BCM4329 family and
>>>>>>>>> @@ -27,7 +27,6 @@ properties:
>>>>>>>>>           - brcm,bcm4341b0-fmac
>>>>>>>>>           - brcm,bcm4341b4-fmac
>>>>>>>>>           - brcm,bcm4341b5-fmac
>>>>>>>>> -              - brcm,bcm4329-fmac
>>>>>>>>>           - brcm,bcm4330-fmac
>>>>>>>>>           - brcm,bcm4334-fmac
>>>>>>>>>           - brcm,bcm43340-fmac
>>>>>>>>> @@ -46,13 +45,15 @@ properties:
>>>>>>>>>           - cypress,cyw43012-fmac
>>>>>>>>>           - infineon,cyw43439-fmac
>>>>>>>>>       - const: brcm,bcm4329-fmac
>>>>>>>>> -      - enum:
>>>>>>>>> -          - brcm,bcm4329-fmac
>>>>>>>>> -          - pci14e4,43dc  # BCM4355
>>>>>>>>> -          - pci14e4,4464  # BCM4364
>>>>>>>>> -          - pci14e4,4488  # BCM4377
>>>>>>>>> -          - pci14e4,4425  # BCM4378
>>>>>>>>> -          - pci14e4,4433  # BCM4387
>>>>>>>>> +    - items:
>>>>>>>>> +          - enum:
>>>>>>>>> +              - pci14e4,43dc  # BCM4355
>>>>>>>>> +              - pci14e4,4464  # BCM4364
>>>>>>>>> +              - pci14e4,4488  # BCM4377
>>>>>>>>> +              - pci14e4,4425  # BCM4378
>>>>>>>>> +              - pci14e4,4433  # BCM4387
>>>>>>>>> +          - const: brcm,bcm4329-fmac
>>>>>>>>> +    - const: brcm,bcm4329-fmac
>>>>>>>>
>>>>>>>> And this does not make sense... You claim that some constrained was
>>>>>>>> droppped and you re-add it, but in fact you still add the same code as
>>>>>>>> it was before.
>>>>>>>>
>>>>>>>> NAK.
>>>>>>>
>>>>>>> Ah, the last "const" actually makes sense, I missed that.
>>>>>>>
>>>>>>> Commit still however lacks rationale why these devices are compatible.
>>>>>>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>>>>>>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>>>>>>> claimed are not compatible with brcm,bcm4329-fmac.
>>>>>>
>>>>>> So is that claim true? What does it mean that these new devices are not
>>>>>> compatible. If they are they should be in a separate binding or the
>>>>>
>>>>> Whether binding is separate or not, is just way of organizing things.
>>>>>
>>>>>> applicable properties for these devices should be made conditional.
>>>>>
>>>>> Could be if they are not applicable.
>>>>>
>>>>>>
>>>>>>> Now if you claim that original commit which said "these devices are not
>>>>>>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>>>>>>> just say "other commit did something". It did nothing...
>>>>>>
>>>>>> Not entirely true. Indeed new devices were added for which no
>>>>>> "brcm,bcm4329-fmac" string is required in the compatible property. Also
>>>>>> the commit added new properties for these new devices. Now in my opinion
>>>>>> a driver should not use these properties without a "compatible" check.
>>>>>> Hope we can agree to that. However, the driver patch for supporting the
>>>>>
>>>>> Sorry, I don't follow. Why the driver would need to check for compatible?
>>>>>
>>>>>> binding change does no such thing. So if we leave the binding as it
>>>>>> currently is the driver will have to check if compatible has any of the
>>>>>> listed PCI IDs before processing the properties. As all properties old
>>>>>
>>>>> Why driver needs to check it? Are these properties not valid?
>>>
>>> How would the driver know other than the compatible property? The node
>>> with properties is delivered by the bus driver. If that comes with
>>> guarantees about validity than that's great.
>>
>> I still do not follow what is the problem being addressed by driver
>> needing to check.
>>
>>>
>>>>>
>>>>>
>>>>>> and new are marked as optional I can not come up with an argument that
>>>>>> these new devices are *not* compatible with brcm,bcm4329-fmac.
>>>>>
>>>>> Compatibility is expressed by implementing same programming interfasce
>>>>> (or its subset) thus being able to bind via fallback and correctly
>>>>> operate in given SW.
>>>
>>> This exactly what I mean to say (and apparently fail to do so ;-s ).
>>>
>>>>> I don't know whether that's the case here, so rephrasing my earlier
>>>>> comments - the commit msg should focus on this aspect and tell that
>>>>> devices are fully compatible, thus they should use fallback.
>>>>>
>>>>> Quick look at drivers told me that not - they are not compatible...
>>>
>>> Okay. That puts use in different corner of the arena. Can you elaborate
>>> how you come to that assessment? Is that based on the fact that some of
>>> the properties are SDIO-only?
>>
>> The simplest: because they do not use the same match/bind code. Plus PCI
>> devices never used half of brcmf_of_probe(). Although that's more of a
>> reason these are significantly different.
>>
>>>
>>>>>
>>>> Another thing is that calling SDIO and PCI devices compatible is quite a
>>>> stretch... Clearly hardware-wise they are very different and Linux does
>>>> not use the same interfaces to match/bind them.
>>>
>>> These are wifi devices which hardware-wise are 95% the same. If you find
>>> the block diagram with IP cores for these devices (enough google results
>>> to find some) you can see they sometimes even have both PCI and SDIO
>>> block on-chip although only one is used so they can be considered 100%
>>> the same. In both cases the bus driver will attach the DT node to the
>>> binding device.
>>
>> I understand they are similar, but it does not matter if that is 95% or
>> even 99% if the interface is different. Linux cannot use these devices
>> through the same interface. However if you claim it can, then please
>> write appropriate commit msg.
>>
>> My entire objection hare started not because I believe these are not
>> compatible (although based on different buses I believe they are not
>> compatible), but because the argument was about that other commit. That
>> argument is not correct to make the change. Correct argument to make the
>> change could be: These devices are compatible, because of foo and bar.
>
> A way to put it might be something like:
>
> Almost all Broadcom wireless chipsets, some Broadcom ethernet chipsets
> and most Broadcom-derived Infineon and Cypress wireless chipsets share
> the same rough layout:
>
> System bus -> bus glue logic -> internal bus -> RF chipset(s)
>
> Previous generations had separate drivers for the bus glue logic and
> then probed the internal bus for the RF chipset(s), however in the
> current generation that separation is mostly just a historical
> artifact and abstraction layer.
>
> The firmwares for all WiFi chipsets in this generation also provide
> fundamentally identical interfaces with any differences either probed
> at runtime or derived from data in the firmware. As such, once the
> glue logic is abstracted away, all chipsets of this generation are
> fundamentally identical from a software perspective. Therefore the
> only data needed to use one of these chipsets is the type of bus to
> select the glue logic driver and the firmware to load which is derived
> from the vendor and product IDs.
>
> The only real hardware differences between different chipsets are that
> some have external interrupt lines or additional clocks and I'm not
> sure if hooking those up is actually mandatory.

Thanks, Julian

I will respin and see what to make of it. Your input is (always) 
appreciated although your clown avatar always scares the shit out of me.

Regards,
Arend



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

end of thread, other threads:[~2024-08-22  6:29 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20 10:12 [PATCH 0/2] dt-bindings fixup for brcm,bcm4329-fmac.yaml Arend van Spriel
2024-08-20 10:12 ` [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property Arend van Spriel
2024-08-20 11:14   ` Rob Herring (Arm)
2024-08-20 11:43     ` Arend van Spriel
2024-08-20 11:50       ` Krzysztof Kozlowski
2024-08-20 12:08         ` Arend van Spriel
2024-08-20 19:01         ` Arend van Spriel
2024-08-20 11:27   ` Krzysztof Kozlowski
2024-08-20 11:39     ` Krzysztof Kozlowski
2024-08-20 12:50       ` Arend van Spriel
2024-08-20 14:53         ` Arend Van Spriel
2024-08-20 15:37           ` Krzysztof Kozlowski
2024-08-20 15:36         ` Krzysztof Kozlowski
2024-08-20 15:50           ` Krzysztof Kozlowski
2024-08-20 19:29             ` Arend van Spriel
2024-08-21  6:46               ` Krzysztof Kozlowski
2024-08-22  0:26                 ` Julian Calaby
2024-08-22  6:29                   ` Arend Van Spriel
2024-08-20 10:12 ` [PATCH 2/2] arm64: boot: apple: fixup wifi device specification Arend van Spriel
2024-08-20 11:30   ` Krzysztof Kozlowski

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