From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 158ADC43334 for ; Thu, 14 Jul 2022 15:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239747AbiGNPVr (ORCPT ); Thu, 14 Jul 2022 11:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232328AbiGNPVp (ORCPT ); Thu, 14 Jul 2022 11:21:45 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA70357246 for ; Thu, 14 Jul 2022 08:21:44 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oC0ef-0004Q5-Lq; Thu, 14 Jul 2022 17:21:29 +0200 Message-ID: <1ba2b493-2ee2-e4b9-b11f-4fbb48473531@pengutronix.de> Date: Thu, 14 Jul 2022 17:21:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 1/2] dt-bindings: bcm4329-fmac: add optional brcm,ccode-map-trivial Content-Language: en-US To: =?UTF-8?Q?Alvin_=c5=a0ipraga?= , 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: =?UTF-8?Q?Alvin_=c5=a0ipraga?= , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, Pengutronix Kernel Team References: <20220711123005.3055300-1-alvin@pqrs.dk> <20220711123005.3055300-2-alvin@pqrs.dk> From: Ahmad Fatoum In-Reply-To: <20220711123005.3055300-2-alvin@pqrs.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 11.07.22 14:30, Alvin Šipraga wrote: > From: Alvin Šipraga > > 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 Reviewed-by: Ahmad Fatoum > --- > .../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 |