[PATCH v7 00/22] pinctrl: add BCM63XX pincontrol support

Álvaro Fernández Rojas
2021-03-15T11:43:22Z

First of all, I've based this on the patches sent by Jonas Gorski back in
2016:
https://www.spinics.net/lists/linux-gpio/msg15983.html
http://patchwork.ozlabs.org/project/linux-gpio/patch/1471604025-21575-2-git-send-email-jonas.gorski@gmail.com/

I've tried to address all coments from Linus Walleij, but I know that
this may still need some other modifications

This patchset adds appropriate binding documentation and drivers for
pin controller cores found in the BCM63XX MIPS SoCs currently supported.

While the GPIO part is always the same, the pinmux part varies quite a
lot between different SoCs. Sometimes they have defined groups which
can be muxed into different functions, sometimes each function has a
different group. Sometimes you can mux individual pins. Often it is a
combination of single pins and groups.

Some core versions require the GPIO direction to be set according to the
function, most do not. Sometimes the mux register(s) contain bits for
unrelated other functions.

v7: introduce changes suggested by Rob Herring.
v6: introduce changes suggested by Rob Herring and Andy Shevchenko.
v5: introduce changes suggested by Andy Shevchenko.
v4: fix gpiochip_irqchip_add_domain(), remove IRQ Kconfig selections and add
missing of_node_put().
v3: introduce new files for shared code and add more changes suggested by
Linus Walleij. Also add a new patch needed for properly parsing gpio-ranges.
v2: introduce changes suggested by Linus Walleij and remove interrupts
- In order to use GPIO_REGMAP, the need to get gpio_chip from gpio_regmap
and use it for pinctrl_add_gpio_range() and gpio_chip.direction_input()
and gpio_chip.direction_output().

Álvaro Fernández Rojas (22):
gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP
gpio: regmap: set gpio_chip of_node
dt-bindings: add BCM63XX GPIO binding documentation
pinctrl: bcm: add bcm63xx base code
dt-bindings: add BCM6328 pincontroller binding documentation
dt-bindings: add BCM6328 GPIO sysctl binding documentation
pinctrl: add a pincontrol driver for BCM6328
dt-bindings: add BCM6358 pincontroller binding documentation
dt-bindings: add BCM6358 GPIO sysctl binding documentation
pinctrl: add a pincontrol driver for BCM6358
dt-bindings: add BCM6362 pincontroller binding documentation
dt-bindings: add BCM6362 GPIO sysctl binding documentation
pinctrl: add a pincontrol driver for BCM6362
dt-bindings: add BCM6368 pincontroller binding documentation
dt-bindings: add BCM6368 GPIO sysctl binding documentation
pinctrl: add a pincontrol driver for BCM6368
dt-bindings: add BCM63268 pincontroller binding documentation
dt-bindings: add BCM63268 GPIO sysctl binding documentation
pinctrl: add a pincontrol driver for BCM63268
dt-bindings: add BCM6318 pincontroller binding documentation
dt-bindings: add BCM6318 GPIO sysctl binding documentation
pinctrl: add a pincontrol driver for BCM6318

.../bindings/gpio/brcm,bcm63xx-gpio.yaml | 83 +++
.../mfd/brcm,bcm6318-gpio-sysctl.yaml | 179 +++++
.../mfd/brcm,bcm63268-gpio-sysctl.yaml | 196 ++++++
.../mfd/brcm,bcm6328-gpio-sysctl.yaml | 164 +++++
.../mfd/brcm,bcm6358-gpio-sysctl.yaml | 132 ++++
.../mfd/brcm,bcm6362-gpio-sysctl.yaml | 238 +++++++
.../mfd/brcm,bcm6368-gpio-sysctl.yaml | 248 +++++++
.../pinctrl/brcm,bcm6318-pinctrl.yaml | 148 ++++
.../pinctrl/brcm,bcm63268-pinctrl.yaml | 169 +++++
.../pinctrl/brcm,bcm6328-pinctrl.yaml | 132 ++++
.../pinctrl/brcm,bcm6358-pinctrl.yaml | 98 +++
.../pinctrl/brcm,bcm6362-pinctrl.yaml | 211 ++++++
.../pinctrl/brcm,bcm6368-pinctrl.yaml | 222 ++++++
drivers/gpio/gpio-regmap.c | 2 +
drivers/pinctrl/bcm/Kconfig | 55 ++
drivers/pinctrl/bcm/Makefile | 7 +
drivers/pinctrl/bcm/pinctrl-bcm6318.c | 498 ++++++++++++++
drivers/pinctrl/bcm/pinctrl-bcm63268.c | 643 ++++++++++++++++++
drivers/pinctrl/bcm/pinctrl-bcm6328.c | 404 +++++++++++
drivers/pinctrl/bcm/pinctrl-bcm6358.c | 369 ++++++++++
drivers/pinctrl/bcm/pinctrl-bcm6362.c | 617 +++++++++++++++++
drivers/pinctrl/bcm/pinctrl-bcm6368.c | 523 ++++++++++++++
drivers/pinctrl/bcm/pinctrl-bcm63xx.c | 113 +++
drivers/pinctrl/bcm/pinctrl-bcm63xx.h | 43 ++
include/linux/gpio/driver.h | 9 +
include/linux/gpio/regmap.h | 4 +
26 files changed, 5507 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/brcm,bcm63xx-gpio.yaml
create mode 100644 Documentation/devicetree/bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml
create mode 100644 Documentation/devicetree/bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml
create mode 100644 Documentation/devicetree/bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml
create mode 100644 Documentation/devicetree/bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml
create mode 100644 Documentation/devicetree/bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml
create mode 100644 Documentation/devicetree/bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm63268-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6328-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6362-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6368-pinctrl.yaml
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6318.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm63268.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6328.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6358.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6362.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6368.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm63xx.c
create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm63xx.h

--
2.20.1