All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] wifi: brcmfmac: add DT property for trivial ccode mapping
@ 2022-07-11 12:30 Alvin Šipraga
  2022-07-11 12:30 ` [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial Alvin Šipraga
  2022-07-11 12:30 ` [PATCH 2/2] wifi: brcmfmac: support brcm,ccode-map-trivial DT property Alvin Šipraga
  0 siblings, 2 replies; 7+ messages in thread
From: Alvin Šipraga @ 2022-07-11 12:30 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Arend van Spriel,
	Franky Lin, Hante Meuleman, van Spriel
  Cc: Ahmad Fatoum, Alvin Šipraga, linux-wireless, netdev,
	devicetree, linux-kernel, brcm80211-dev-list.pdl,
	SHA-cyfmac-dev-list

From: Alvin Šipraga <alsi@bang-olufsen.dk>

Previous commits introduced a fallback mechanism for translating the
in-kernel ISO3166 country code to the in-firmware country code +
revision pair. The mechanism is dependent on the common chip core ID and
enabled only for a few specific chipsets.

But the in-firmware country code/revision is actually a function of the CLM
blob, not the chip core. Indeed, while it was reported that the fallback
mechanism causes regressions on a board with a chip identified by the
driver as BCM4359, we too have such a board with a BCM4359-identified
chip, and in our case we really do want to use this fallback mechanism.
Put another way, our CLM blob is using ISO3166 country codes, and the
revision is always 0.

Since this is evidently a property of the firmware, it would be nice to
be able to specify this in the device tree, since the driver has no
general mechanism for finding out based on the hardware type alone. This
series adds such a property: brcm,ccode-map-trivial.


Alvin Šipraga (2):
  dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial
  wifi: brcmfmac: support brcm,ccode-map-trivial DT property

 .../bindings/net/wireless/brcm,bcm4329-fmac.yaml       | 10 ++++++++++
 .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c    |  3 +++
 .../net/wireless/broadcom/brcm80211/brcmfmac/common.h  |  2 ++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c  |  6 ++++++
 4 files changed, 21 insertions(+)

-- 
2.37.0


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

* [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial
  2022-07-11 12:30 [PATCH 0/2] wifi: brcmfmac: add DT property for trivial ccode mapping Alvin Šipraga
@ 2022-07-11 12:30 ` Alvin Šipraga
  2022-07-14 15:21   ` Ahmad Fatoum
                     ` (2 more replies)
  2022-07-11 12:30 ` [PATCH 2/2] wifi: brcmfmac: support brcm,ccode-map-trivial DT property Alvin Šipraga
  1 sibling, 3 replies; 7+ messages in thread
From: Alvin Šipraga @ 2022-07-11 12:30 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Arend van Spriel,
	Franky Lin, Hante Meuleman, van Spriel
  Cc: Ahmad Fatoum, Alvin Šipraga, linux-wireless, netdev,
	devicetree, linux-kernel, brcm80211-dev-list.pdl,
	SHA-cyfmac-dev-list

From: Alvin Šipraga <alsi@bang-olufsen.dk>

The bindings already offer a brcm,ccode-map property to describe the
mapping between the kernel's ISO3166 alpha 2 country code string and the
firmware's country code string and revision number. This is a
board-specific property and determined by the CLM blob firmware provided
by the hardware vendor.

However, in some cases the firmware will also use ISO3166 country codes
internally, and the revision will always be zero. This implies a trivial
mapping: cc -> { cc, 0 }.

For such cases, add an optional property brcm,ccode-map-trivial which
obviates the need to describe every trivial country code mapping in the
device tree with the existing brcm,ccode-map property. The new property
is subordinate to the more explicit brcm,ccode-map property.

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
---
 .../bindings/net/wireless/brcm,bcm4329-fmac.yaml       | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
index c11f23b20c4c..53b4153d9bfc 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
@@ -75,6 +75,16 @@ properties:
     items:
       pattern: '^[A-Z][A-Z]-[A-Z][0-9A-Z]-[0-9]+$'
 
+  brcm,ccode-map-trivial:
+    description: |
+      Use a trivial mapping of ISO3166 country codes to brcmfmac firmware
+      country code and revision: cc -> { cc, 0 }. In other words, assume that
+      the CLM blob firmware uses ISO3166 country codes as well, and that all
+      revisions are zero. This property is mutually exclusive with
+      brcm,ccode-map. If both properties are specified, then brcm,ccode-map
+      takes precedence.
+    type: boolean
+
 required:
   - compatible
   - reg
-- 
2.37.0


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

* [PATCH 2/2] wifi: brcmfmac: support brcm,ccode-map-trivial DT property
  2022-07-11 12:30 [PATCH 0/2] wifi: brcmfmac: add DT property for trivial ccode mapping Alvin Šipraga
  2022-07-11 12:30 ` [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial Alvin Šipraga
@ 2022-07-11 12:30 ` Alvin Šipraga
  2022-07-14 15:22   ` Ahmad Fatoum
  1 sibling, 1 reply; 7+ messages in thread
From: Alvin Šipraga @ 2022-07-11 12:30 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Arend van Spriel,
	Franky Lin, Hante Meuleman, van Spriel
  Cc: Ahmad Fatoum, Alvin Šipraga, linux-wireless, netdev,
	devicetree, linux-kernel, brcm80211-dev-list.pdl,
	SHA-cyfmac-dev-list

From: Alvin Šipraga <alsi@bang-olufsen.dk>

Commit a21bf90e927f ("brcmfmac: use ISO3166 country code and 0 rev as
fallback on some devices") introduced a fallback mechanism whereby a
trivial mapping from ISO3166 country codes to firmware country code and
revision is used on some devices. This fallback operates on the device
level, so it is enabled only for certain supported chipsets.

In general though, the firmware country codes are determined by the CLM
blob, which is board-specific and may vary despite the underlying
chipset being the same.

The aforementioned commit is actually a refinement of a previous commit
that was reverted in commit 151a7c12c4fc ("Revert "brcmfmac: use ISO3166
country code and 0 rev as fallback"") due to regressions with a BCM4359
device. The refinement restricted the fallback mechanism to specific
chipsets such as the BCM4345.

We use a chipset - CYW88359 - that the driver identifies as a BCM4359
too. But in our case, the CLM blob uses ISO3166 country codes
internally, and all with revision 0. So the trivial mapping is exactly
what is needed in order for the driver to sync the kernel regulatory
domain to the firmware. This is just a matter of how the CLM blob was
prepared by the hardware vendor. The same could hold for other boards
too.

Although the brcm,ccode-map device tree property is useful for cases
where the mapping is more complex, the trivial case invites a much
simpler specification. This patch adds support for parsing the
brcm,ccode-map-trivial device tree property. Subordinate to the more
specific brcm,ccode-map property, this new proprety simply informs the
driver that the fallback method should be used in every case.

In the absence of the new property in the device tree, expect no
functional change.

Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h   | 2 ++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c       | 6 ++++++
 3 files changed, 11 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 3ae6779fe153..db45da33adfd 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -7481,6 +7481,9 @@ int brcmf_cfg80211_wait_vif_event(struct brcmf_cfg80211_info *cfg,
 
 static bool brmcf_use_iso3166_ccode_fallback(struct brcmf_pub *drvr)
 {
+	if (drvr->settings->trivial_ccode_map)
+		return true;
+
 	switch (drvr->bus_if->chip) {
 	case BRCM_CC_4345_CHIP_ID:
 	case BRCM_CC_43602_CHIP_ID:
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
index 15accc88d5c0..fe717cce5d55 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
@@ -38,6 +38,7 @@ extern struct brcmf_mp_global_t brcmf_mp_global;
  * @fcmode: FWS flow control.
  * @roamoff: Firmware roaming off?
  * @ignore_probe_fail: Ignore probe failure.
+ * @trivial_ccode_map: Assume firmware uses ISO3166 country codes with rev 0
  * @country_codes: If available, pointer to struct for translating country codes
  * @bus: Bus specific platform data. Only SDIO at the mmoment.
  */
@@ -48,6 +49,7 @@ struct brcmf_mp_device {
 	bool		roamoff;
 	bool		iapp;
 	bool		ignore_probe_fail;
+	bool		trivial_ccode_map;
 	struct brcmfmac_pd_cc *country_codes;
 	const char	*board_type;
 	unsigned char	mac[ETH_ALEN];
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index 083ac58f466d..1add942462f8 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -24,6 +24,12 @@ static int brcmf_of_get_country_codes(struct device *dev,
 
 	count = of_property_count_strings(np, "brcm,ccode-map");
 	if (count < 0) {
+		/* If no explicit country code map is specified, check whether
+		 * the trivial map should be used.
+		 */
+		settings->trivial_ccode_map =
+			of_property_read_bool(np, "brcm,ccode-map-trivial");
+
 		/* The property is optional, so return success if it doesn't
 		 * exist. Otherwise propagate the error code.
 		 */
-- 
2.37.0


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

* Re: [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial
  2022-07-11 12:30 ` [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial Alvin Šipraga
@ 2022-07-14 15:21   ` Ahmad Fatoum
  2022-07-18 18:43   ` Rob Herring
  2022-07-28  9:58   ` Kalle Valo
  2 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2022-07-14 15:21 UTC (permalink / raw)
  To: Alvin Šipraga, Kalle Valo, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Arend van Spriel, Franky Lin, Hante Meuleman, van Spriel
  Cc: Alvin Šipraga, linux-wireless, netdev, devicetree,
	linux-kernel, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
	Pengutronix Kernel Team

On 11.07.22 14:30, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> The bindings already offer a brcm,ccode-map property to describe the
> mapping between the kernel's ISO3166 alpha 2 country code string and the
> firmware's country code string and revision number. This is a
> board-specific property and determined by the CLM blob firmware provided
> by the hardware vendor.
> 
> However, in some cases the firmware will also use ISO3166 country codes
> internally, and the revision will always be zero. This implies a trivial
> mapping: cc -> { cc, 0 }.
> 
> For such cases, add an optional property brcm,ccode-map-trivial which
> obviates the need to describe every trivial country code mapping in the
> device tree with the existing brcm,ccode-map property. The new property
> is subordinate to the more explicit brcm,ccode-map property.
> 
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  .../bindings/net/wireless/brcm,bcm4329-fmac.yaml       | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> index c11f23b20c4c..53b4153d9bfc 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> @@ -75,6 +75,16 @@ properties:
>      items:
>        pattern: '^[A-Z][A-Z]-[A-Z][0-9A-Z]-[0-9]+$'
>  
> +  brcm,ccode-map-trivial:
> +    description: |
> +      Use a trivial mapping of ISO3166 country codes to brcmfmac firmware
> +      country code and revision: cc -> { cc, 0 }. In other words, assume that
> +      the CLM blob firmware uses ISO3166 country codes as well, and that all
> +      revisions are zero. This property is mutually exclusive with
> +      brcm,ccode-map. If both properties are specified, then brcm,ccode-map
> +      takes precedence.
> +    type: boolean
> +
>  required:
>    - compatible
>    - reg


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 2/2] wifi: brcmfmac: support brcm,ccode-map-trivial DT property
  2022-07-11 12:30 ` [PATCH 2/2] wifi: brcmfmac: support brcm,ccode-map-trivial DT property Alvin Šipraga
@ 2022-07-14 15:22   ` Ahmad Fatoum
  0 siblings, 0 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2022-07-14 15:22 UTC (permalink / raw)
  To: Alvin Šipraga, Kalle Valo, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Arend van Spriel, Franky Lin, Hante Meuleman, van Spriel
  Cc: Alvin Šipraga, linux-wireless, netdev, devicetree,
	linux-kernel, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
	Pengutronix Kernel Team

On 11.07.22 14:30, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> Commit a21bf90e927f ("brcmfmac: use ISO3166 country code and 0 rev as
> fallback on some devices") introduced a fallback mechanism whereby a
> trivial mapping from ISO3166 country codes to firmware country code and
> revision is used on some devices. This fallback operates on the device
> level, so it is enabled only for certain supported chipsets.
> 
> In general though, the firmware country codes are determined by the CLM
> blob, which is board-specific and may vary despite the underlying
> chipset being the same.
> 
> The aforementioned commit is actually a refinement of a previous commit
> that was reverted in commit 151a7c12c4fc ("Revert "brcmfmac: use ISO3166
> country code and 0 rev as fallback"") due to regressions with a BCM4359
> device. The refinement restricted the fallback mechanism to specific
> chipsets such as the BCM4345.
> 
> We use a chipset - CYW88359 - that the driver identifies as a BCM4359
> too. But in our case, the CLM blob uses ISO3166 country codes
> internally, and all with revision 0. So the trivial mapping is exactly
> what is needed in order for the driver to sync the kernel regulatory
> domain to the firmware. This is just a matter of how the CLM blob was
> prepared by the hardware vendor. The same could hold for other boards
> too.
> 
> Although the brcm,ccode-map device tree property is useful for cases
> where the mapping is more complex, the trivial case invites a much
> simpler specification. This patch adds support for parsing the
> brcm,ccode-map-trivial device tree property. Subordinate to the more
> specific brcm,ccode-map property, this new proprety simply informs the
> driver that the fallback method should be used in every case.
> 
> In the absence of the new property in the device tree, expect no
> functional change.
> 
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +++
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h   | 2 ++
>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c       | 6 ++++++
>  3 files changed, 11 insertions(+)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> index 3ae6779fe153..db45da33adfd 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> @@ -7481,6 +7481,9 @@ int brcmf_cfg80211_wait_vif_event(struct brcmf_cfg80211_info *cfg,
>  
>  static bool brmcf_use_iso3166_ccode_fallback(struct brcmf_pub *drvr)
>  {
> +	if (drvr->settings->trivial_ccode_map)
> +		return true;
> +
>  	switch (drvr->bus_if->chip) {
>  	case BRCM_CC_4345_CHIP_ID:
>  	case BRCM_CC_43602_CHIP_ID:
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
> index 15accc88d5c0..fe717cce5d55 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h
> @@ -38,6 +38,7 @@ extern struct brcmf_mp_global_t brcmf_mp_global;
>   * @fcmode: FWS flow control.
>   * @roamoff: Firmware roaming off?
>   * @ignore_probe_fail: Ignore probe failure.
> + * @trivial_ccode_map: Assume firmware uses ISO3166 country codes with rev 0
>   * @country_codes: If available, pointer to struct for translating country codes
>   * @bus: Bus specific platform data. Only SDIO at the mmoment.
>   */
> @@ -48,6 +49,7 @@ struct brcmf_mp_device {
>  	bool		roamoff;
>  	bool		iapp;
>  	bool		ignore_probe_fail;
> +	bool		trivial_ccode_map;
>  	struct brcmfmac_pd_cc *country_codes;
>  	const char	*board_type;
>  	unsigned char	mac[ETH_ALEN];
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
> index 083ac58f466d..1add942462f8 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
> @@ -24,6 +24,12 @@ static int brcmf_of_get_country_codes(struct device *dev,
>  
>  	count = of_property_count_strings(np, "brcm,ccode-map");
>  	if (count < 0) {
> +		/* If no explicit country code map is specified, check whether
> +		 * the trivial map should be used.
> +		 */
> +		settings->trivial_ccode_map =
> +			of_property_read_bool(np, "brcm,ccode-map-trivial");
> +
>  		/* The property is optional, so return success if it doesn't
>  		 * exist. Otherwise propagate the error code.
>  		 */


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial
  2022-07-11 12:30 ` [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial Alvin Šipraga
  2022-07-14 15:21   ` Ahmad Fatoum
@ 2022-07-18 18:43   ` Rob Herring
  2022-07-28  9:58   ` Kalle Valo
  2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2022-07-18 18:43 UTC (permalink / raw)
  To: Alvin Šipraga
  Cc: brcm80211-dev-list.pdl, Krzysztof Kozlowski, Hante Meuleman,
	Eric Dumazet, David S. Miller, SHA-cyfmac-dev-list, linux-kernel,
	Jakub Kicinski, linux-wireless, van Spriel, Paolo Abeni,
	Kalle Valo, Alvin Šipraga, Franky Lin, netdev, Rob Herring,
	Ahmad Fatoum, Arend van Spriel, devicetree

On Mon, 11 Jul 2022 14:30:03 +0200, Alvin Šipraga wrote:
> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> The bindings already offer a brcm,ccode-map property to describe the
> mapping between the kernel's ISO3166 alpha 2 country code string and the
> firmware's country code string and revision number. This is a
> board-specific property and determined by the CLM blob firmware provided
> by the hardware vendor.
> 
> However, in some cases the firmware will also use ISO3166 country codes
> internally, and the revision will always be zero. This implies a trivial
> mapping: cc -> { cc, 0 }.
> 
> For such cases, add an optional property brcm,ccode-map-trivial which
> obviates the need to describe every trivial country code mapping in the
> device tree with the existing brcm,ccode-map property. The new property
> is subordinate to the more explicit brcm,ccode-map property.
> 
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> ---
>  .../bindings/net/wireless/brcm,bcm4329-fmac.yaml       | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial
  2022-07-11 12:30 ` [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial Alvin Šipraga
  2022-07-14 15:21   ` Ahmad Fatoum
  2022-07-18 18:43   ` Rob Herring
@ 2022-07-28  9:58   ` Kalle Valo
  2 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2022-07-28  9:58 UTC (permalink / raw)
  To: Alvin Šipraga
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Arend van Spriel, Franky Lin,
	Hante Meuleman, van Spriel, Ahmad Fatoum, Alvin Šipraga,
	linux-wireless, netdev, devicetree, linux-kernel,
	brcm80211-dev-list.pdl, SHA-cyfmac-dev-list

Alvin Šipraga <alvin@pqrs.dk> wrote:

> From: Alvin Šipraga <alsi@bang-olufsen.dk>
> 
> The bindings already offer a brcm,ccode-map property to describe the
> mapping between the kernel's ISO3166 alpha 2 country code string and the
> firmware's country code string and revision number. This is a
> board-specific property and determined by the CLM blob firmware provided
> by the hardware vendor.
> 
> However, in some cases the firmware will also use ISO3166 country codes
> internally, and the revision will always be zero. This implies a trivial
> mapping: cc -> { cc, 0 }.
> 
> For such cases, add an optional property brcm,ccode-map-trivial which
> obviates the need to describe every trivial country code mapping in the
> device tree with the existing brcm,ccode-map property. The new property
> is subordinate to the more explicit brcm,ccode-map property.
> 
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Acked-by: Rob Herring <robh@kernel.org>

2 patches applied to wireless-next.git, thanks.

8406993a891f dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial
5c54ab24377b wifi: brcmfmac: support brcm,ccode-map-trivial DT property

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220711123005.3055300-2-alvin@pqrs.dk/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

end of thread, other threads:[~2022-07-28  9:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 12:30 [PATCH 0/2] wifi: brcmfmac: add DT property for trivial ccode mapping Alvin Šipraga
2022-07-11 12:30 ` [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial Alvin Šipraga
2022-07-14 15:21   ` Ahmad Fatoum
2022-07-18 18:43   ` Rob Herring
2022-07-28  9:58   ` Kalle Valo
2022-07-11 12:30 ` [PATCH 2/2] wifi: brcmfmac: support brcm,ccode-map-trivial DT property Alvin Šipraga
2022-07-14 15:22   ` Ahmad Fatoum

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