Skip to contentSkip to conversation

pinctrl: ocelot: add MSCC Jaguar2 support

PATCH In review Alexandre Belloni 2 participants 3 messages Dec 20, 2018 – Dec 21, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pinctrl: ocelot: add MSCC Jaguar2 support

Jaguar2 has the same register layout as Ocelot but it has 64 pins, meaning that there are 2 registers instead of one.

---
Changes in v2:
- select OF_GPIO to avoid build issues

 .../bindings/pinctrl/mscc,ocelot-pinctrl.txt  |   3 +-
 drivers/pinctrl/Kconfig                       |   5 +-
 drivers/pinctrl/pinctrl-ocelot.c              | 338 ++++++++++++++----
 3 files changed, 282 insertions(+), 64 deletions(-)
Documentation/devicetree/bindings/pinctrl/mscc,ocelot-pinctrl.txt +2 -1
index 24a210e0c59a..32a8a8fa7805 100644
@@ -2,7 +2,8 @@ Microsemi Ocelot pin controller Device Tree Bindings
 ----------------------------------------------------
 
 Required properties:
- - compatible		: Should be "mscc,ocelot-pinctrl"
+ - compatible		: Should be "mscc,ocelot-pinctrl" or
+				"mscc,jaguar2-pinctrl"
  - reg			: Address and length of the register set for the device
  - gpio-controller	: Indicates this device is a GPIO controller
  - #gpio-cells		: Must be 2.
drivers/pinctrl/Kconfig +2 -3
index 4d8c00eac742..bba52f659153 100644
@@ -339,15 +339,14 @@ config PINCTRL_RK805
 	  This selects the pinctrl driver for RK805.
 
 config PINCTRL_OCELOT
-	bool "Pinctrl driver for the Microsemi Ocelot SoCs"
-	default y
+	bool "Pinctrl driver for the Microsemi Ocelot and Jaguar2 SoCs"
 	depends on OF
-	depends on MSCC_OCELOT || COMPILE_TEST
 	select GPIOLIB
 	select GPIOLIB_IRQCHIP
 	select GENERIC_PINCONF
 	select GENERIC_PINCTRL_GROUPS
 	select GENERIC_PINMUX_FUNCTIONS
+	select OF_GPIO
 	select REGMAP_MMIO
 
 source "drivers/pinctrl/actions/Kconfig"
drivers/pinctrl/pinctrl-ocelot.c +278 -60

562 lines not on this page · raw message

Signature · 1 line
2.20.1
#1 lore raw
Quoted 4 lines · Alexandre Belloni

Jaguar2 has the same register layout as Ocelot but it has 64 pins, meaning that there are 2 registers instead of one.

Pulled out v1 and applied this instead.

Yours,
Linus Walleij

#2 lore raw
Quoted 10 lines · Linus Walleij
Quoted 4 lines · Alexandre Belloni

Jaguar2 has the same register layout as Ocelot but it has 64 pins, meaning that there are 2 registers instead of one.

Pulled out v1 and applied this instead.

Thank you Linus.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com