On 3/8/23 18:10, Rob Herring wrote: > On Mon, Mar 06, 2023 at 02:15:25PM -0500, Sean Anderson wrote: >> This is a generic binding for simple MMIO GPIO controllers. Although we >> have a single driver for these controllers, they were previously spread >> over several files. Consolidate them. The register descriptions are >> adapted from the comments in the source. There is no set order for the >> registers, so I have not specified one. >> >> Signed-off-by: Sean Anderson <sean.anderson@xxxxxxxx> >> --- >> >> Changes in v10: >> - New >> >> .../bindings/gpio/brcm,bcm6345-gpio.yaml | 16 +-- >> .../devicetree/bindings/gpio/gpio-mmio.yaml | 136 ++++++++++++++++++ >> .../bindings/gpio/ni,169445-nand-gpio.txt | 38 ----- >> .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ----- >> 4 files changed, 137 insertions(+), 91 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> delete mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt >> delete mode 100644 Documentation/devicetree/bindings/gpio/wd,mbl-gpio.txt >> >> diff --git a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> index 4d69f79df859..e11f4af49c52 100644 >> --- a/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> +++ b/Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml >> @@ -4,7 +4,7 @@ >> $id: http://devicetree.org/schemas/gpio/brcm,bcm6345-gpio.yaml# >> $schema: http://devicetree.org/meta-schemas/core.yaml# >> >> -title: Broadcom BCM6345 GPIO controller >> +title: Broadcom BCM63xx GPIO controller >> >> maintainers: >> - Álvaro Fernández Rojas <noltari@xxxxxxxxx> >> @@ -18,8 +18,6 @@ description: |+ >> >> BCM6338 have 8-bit data and dirout registers, where GPIO state can be read >> and/or written, and the direction changed from input to output. >> - BCM6345 have 16-bit data and dirout registers, where GPIO state can be read >> - and/or written, and the direction changed from input to output. >> BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268 have 32-bit data >> and dirout registers, where GPIO state can be read and/or written, and the >> direction changed from input to output. >> @@ -29,7 +27,6 @@ properties: >> enum: >> - brcm,bcm6318-gpio >> - brcm,bcm6328-gpio >> - - brcm,bcm6345-gpio >> - brcm,bcm6358-gpio >> - brcm,bcm6362-gpio >> - brcm,bcm6368-gpio >> @@ -63,17 +60,6 @@ required: >> additionalProperties: false >> >> examples: >> - - | >> - gpio@fffe0406 { >> - compatible = "brcm,bcm6345-gpio"; >> - reg-names = "dirout", "dat"; >> - reg = <0xfffe0406 2>, <0xfffe040a 2>; >> - native-endian; >> - >> - gpio-controller; >> - #gpio-cells = <2>; >> - }; >> - >> - | >> gpio@0 { >> compatible = "brcm,bcm63268-gpio"; >> diff --git a/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> new file mode 100644 >> index 000000000000..fd5c7055d542 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/gpio/gpio-mmio.yaml >> @@ -0,0 +1,136 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/gpio/gpio-mmio.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Generic MMIO GPIO >> + >> +maintainers: >> + - Linus Walleij <linus.walleij@xxxxxxxxxx> >> + - Bartosz Golaszewski <brgl@xxxxxxxx> >> + >> +description: | > > Don't need '|' unless you want line endings preserved. Elsewhere too. OK >> + Some simple GPIO controllers may consist of a single data register or a pair >> + of set/clear-bit registers. Such controllers are common for glue logic in >> + FPGAs or ASICs. Commonly, these controllers are accessed over memory-mapped >> + NAND-style parallel busses. >> + >> +properties: >> + big-endian: >> + true > > big-endian: true OK >> + >> + compatible: >> + enum: >> + - brcm,bcm6345-gpio # Broadcom BCM6345 GPIO controller >> + - wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller >> + - ni,169445-nand-gpio # National Instruments 169445 GPIO NAND controller >> + >> + '#gpio-cells': >> + const: 2 >> + >> + gpio-controller: >> + true > > ditto. OK --Sean