Message ID | 20210313215302.4076765-1-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | dt-bindings: Convert the BCM4329 bindings to YAML and extend | expand |
Hi Linus, On Sun, Mar 14, 2021 at 9:00 AM Linus Walleij <linus.walleij@linaro.org> wrote: > > This converts the BCM4329 family bindings to YAML schema, and > extends and fixes the bindings like this: > > - Name the bindings after the first chip (BCM4329) since > wildcards like 43xx are nowadays frowned upon by the DT > binding reviewers. We call this the "BCM4329 family" > - Add compatible strings for all the variants that seem to > exist in the wild. (Derived from firmware listings.) > - Add required reg property (SDIO function number) > - Add reset-gpios property (some systems wire this to a GPIO > line). > - I have only listed Arend as maintainer for now, volunteers > can be added. > > Cc: Arend van Spriel <aspriel@gmail.com> > Cc: Franky Lin <franky.lin@broadcom.com> > Cc: Hante Meuleman <hante.meuleman@broadcom.com> > Cc: Chi-hsien Lin <chi-hsien.lin@infineon.com> > Cc: Wright Feng <wright.feng@infineon.com> > Cc: Chung-hsien Hsu <chung-hsien.hsu@infineon.com> > Cc: brcm80211-dev-list.pdl@broadcom.com > Cc: SHA-cyfmac-dev-list@infineon.com > Cc: linux-mmc@vger.kernel.org > Cc: devicetree@vger.kernel.org > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > .../net/wireless/brcm,bcm4329-fmac.yaml | 98 +++++++++++++++++++ > .../net/wireless/brcm,bcm43xx-fmac.txt | 38 ------- > 2 files changed, 98 insertions(+), 38 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml > delete mode 100644 Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt > > diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml > new file mode 100644 > index 000000000000..d172ee486cf6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml > @@ -0,0 +1,98 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/wireless/brcm,bcm4329-fmac.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Broadcom BCM4329 family fullmac wireless SDIO devices > + > +maintainers: > + - Arend van Spriel <arend@broadcom.com> > + > +description: > + The Broadcom Single chip MAC part for the BCM4329 family and > + later Cypress chips in the same family named CYW4373 and similar. > + These chips also have a Bluetooth portion described in a separate > + binding. > + > +properties: > + compatible: > + items: > + - enum: > + - brcm,bcm43143-fmac > + - brcm,bcm4341b0-fmac > + - brcm,bcm4341b4-fmac > + - brcm,bcm4341b5-fmac > + - brcm,bcm4329-fmac > + - brcm,bcm4330-fmac > + - brcm,bcm4334-fmac > + - brcm,bcm43340-fmac > + - brcm,bcm4335-fmac > + - brcm,bcm43362-fmac > + - brcm,bcm4339-fmac > + - brcm,bcm43430a0-fmac > + - brcm,bcm43430a1-fmac > + - brcm,bcm43455-fmac > + - brcm,bcm43456-fmac > + - brcm,bcm4354-fmac > + - brcm,bcm4356-fmac > + - brcm,bcm4359-fmac > + - cypress,cyw4373-fmac > + - cypress,cyw43012-fmac I don't know if this is necessary for SDIO, but should the non-4329 compatibles have the 4329 compatible as an alternative? Thanks,
On Sun, Mar 14, 2021 at 1:05 AM Julian Calaby <julian.calaby@gmail.com> wrote: > I don't know if this is necessary for SDIO, but should the non-4329 > compatibles have the 4329 compatible as an alternative? I can, and I guess I should add it, as I grep:ed and saw this: arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; So from more to less specific. Yours, Linus Walleij
Hi Linus, On Mon, Mar 15, 2021 at 10:43 AM Linus Walleij <linus.walleij@linaro.org> wrote: > > On Sun, Mar 14, 2021 at 1:05 AM Julian Calaby <julian.calaby@gmail.com> wrote: > > > I don't know if this is necessary for SDIO, but should the non-4329 > > compatibles have the 4329 compatible as an alternative? > > I can, and I guess I should add it, as I grep:ed and saw this: > > arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts > compatible = "brcm,bcm4339-fmac", "brcm,bcm4329-fmac"; > > So from more to less specific. > > Yours, > Linus Walleij If it helps, the pattern I've seen before for this is: oneOf: - const: vendor,specific-device-1234 - items: - enum: - vendor,compatible-device-2345 - vendor,compatible-device-3456 - const: vendor,specific-device-1234 See https://elixir.bootlin.com/linux/v5.12-rc3/source/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml for an example. Thanks,
By the way, here is a question to the broadcom folks: On Sat, Mar 13, 2021 at 10:53 PM Linus Walleij <linus.walleij@linaro.org> wrote: > + - brcm,bcm43143-fmac > + - brcm,bcm4341b0-fmac > + - brcm,bcm4341b4-fmac > + - brcm,bcm4341b5-fmac > + - brcm,bcm4329-fmac > + - brcm,bcm4330-fmac > + - brcm,bcm4334-fmac > + - brcm,bcm43340-fmac > + - brcm,bcm4335-fmac > + - brcm,bcm43362-fmac > + - brcm,bcm4339-fmac > + - brcm,bcm43430a0-fmac > + - brcm,bcm43430a1-fmac > + - brcm,bcm43455-fmac > + - brcm,bcm43456-fmac > + - brcm,bcm4354-fmac > + - brcm,bcm4356-fmac > + - brcm,bcm4359-fmac > + - cypress,cyw4373-fmac > + - cypress,cyw43012-fmac Here the "-fmac" suffix is added to distinguish the function from other functions in a combochip, usually WLAN + Bluetooth. Are there some of these that are just WLAN and not combochips? In that case they shall not have the "-fmac" suffix. Yours, Linus Walleij
diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml new file mode 100644 index 000000000000..d172ee486cf6 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/wireless/brcm,bcm4329-fmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM4329 family fullmac wireless SDIO devices + +maintainers: + - Arend van Spriel <arend@broadcom.com> + +description: + The Broadcom Single chip MAC part for the BCM4329 family and + later Cypress chips in the same family named CYW4373 and similar. + These chips also have a Bluetooth portion described in a separate + binding. + +properties: + compatible: + items: + - enum: + - brcm,bcm43143-fmac + - brcm,bcm4341b0-fmac + - brcm,bcm4341b4-fmac + - brcm,bcm4341b5-fmac + - brcm,bcm4329-fmac + - brcm,bcm4330-fmac + - brcm,bcm4334-fmac + - brcm,bcm43340-fmac + - brcm,bcm4335-fmac + - brcm,bcm43362-fmac + - brcm,bcm4339-fmac + - brcm,bcm43430a0-fmac + - brcm,bcm43430a1-fmac + - brcm,bcm43455-fmac + - brcm,bcm43456-fmac + - brcm,bcm4354-fmac + - brcm,bcm4356-fmac + - brcm,bcm4359-fmac + - cypress,cyw4373-fmac + - cypress,cyw43012-fmac + + reg: + description: SDIO function number for the device, for most cases + this will be 1. + + interrupts: + maxItems: 1 + description: Out-of-band (OOB) IRQ line for waking up the host + in response to WLAN activity. This corresponds to the HOST_WAKE + line into the chip. + + interrupt-names: + description: Name for the OOB IRQ, this must be set to "host-wake". + const: host-wake + + brcm,drive-strength: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Drive strength used for the SDIO pins on the device in mA. + minimum: 0 + maximum: 32 + + reset-gpios: + maxItems: 1 + description: A GPIO line connected to the WL_RST line, if present + this shall be flagged as active low. + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/gpio/gpio.h> + mmc@80118000 { + compatible = "arm,pl18x", "arm,primecell"; + reg = <0x80118000 0x1000>; + clocks = <&clk 0>, <&clk 1>; + clock-names = "mclk", "apb_pclk"; + interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>; + bus-width = <4>; + non-removable; + vmmc-supply = <&wl_bt_reg>; + #address-cells = <1>; + #size-cells = <0>; + + wifi@1 { + compatible = "brcm,bcm4329-fmac"; + reg = <1>; + interrupt-parent = <&gpio>; + interrupts = <24 IRQ_TYPE_EDGE_FALLING>; + interrupt-names = "host-wake"; + reset-gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + }; + }; diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt deleted file mode 100644 index cffb2d6876e3..000000000000 --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt +++ /dev/null @@ -1,38 +0,0 @@ -Broadcom BCM43xx Fullmac wireless SDIO devices - -This node provides properties for controlling the Broadcom wireless device. The -node is expected to be specified as a child node to the SDIO controller that -connects the device to the system. - -Required properties: - - - compatible : Should be "brcm,bcm4329-fmac". - -Optional properties: - - brcm,drive-strength : drive strength used for SDIO pins on device in mA - (default = 6). - - interrupts : specifies attributes for the out-of-band interrupt (host-wake). - When not specified the device will use in-band SDIO interrupts. - - interrupt-names : name of the out-of-band interrupt, which must be set - to "host-wake". - -Example: - -mmc3: mmc@1c12000 { - #address-cells = <1>; - #size-cells = <0>; - - pinctrl-names = "default"; - pinctrl-0 = <&mmc3_pins_a>; - vmmc-supply = <®_vmmc3>; - bus-width = <4>; - non-removable; - - brcmf: wifi@1 { - reg = <1>; - compatible = "brcm,bcm4329-fmac"; - interrupt-parent = <&pio>; - interrupts = <10 8>; /* PH10 / EINT10 */ - interrupt-names = "host-wake"; - }; -};
This converts the BCM4329 family bindings to YAML schema, and extends and fixes the bindings like this: - Name the bindings after the first chip (BCM4329) since wildcards like 43xx are nowadays frowned upon by the DT binding reviewers. We call this the "BCM4329 family" - Add compatible strings for all the variants that seem to exist in the wild. (Derived from firmware listings.) - Add required reg property (SDIO function number) - Add reset-gpios property (some systems wire this to a GPIO line). - I have only listed Arend as maintainer for now, volunteers can be added. Cc: Arend van Spriel <aspriel@gmail.com> Cc: Franky Lin <franky.lin@broadcom.com> Cc: Hante Meuleman <hante.meuleman@broadcom.com> Cc: Chi-hsien Lin <chi-hsien.lin@infineon.com> Cc: Wright Feng <wright.feng@infineon.com> Cc: Chung-hsien Hsu <chung-hsien.hsu@infineon.com> Cc: brcm80211-dev-list.pdl@broadcom.com Cc: SHA-cyfmac-dev-list@infineon.com Cc: linux-mmc@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- .../net/wireless/brcm,bcm4329-fmac.yaml | 98 +++++++++++++++++++ .../net/wireless/brcm,bcm43xx-fmac.txt | 38 ------- 2 files changed, 98 insertions(+), 38 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml delete mode 100644 Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt