arm64: mvebu: pinctrl: Add pin control driver for A8K family
Subsystems (3)
PATCH v3 3/6 arm64: mvebu: pinctrl: Add pin control driver for A8K family
From: Konstantin Porotchkin <[email protected]>
Add a DM port of Marvell pin control driver.
The A8K SoC family contains several silicone dies interconnected in a single package. Every die is normally equipped with its own pin controller unit.
There are 2 pin controllers in A70x0 SoC and 3 in A80x0 SoC.
Changes for v3:
- Extend the Kconfig help for pin control driver
--- arch/arm/include/asm/arch-armada8k/soc-info.h | 17 ++ .../pinctrl/marvell,armada-apn806-pinctrl.txt | 25 ++ .../pinctrl/marvell,armada-cp110-pinctrl.txt | 270 +++++++++++++++++++++ .../pinctrl/marvell,mvebu-pinctrl.txt | 113 +++++++++ drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/mvebu/Kconfig | 16 ++ drivers/pinctrl/mvebu/Makefile | 7 + drivers/pinctrl/mvebu/pinctrl-mvebu.c | 179 ++++++++++++++ drivers/pinctrl/mvebu/pinctrl-mvebu.h | 31 +++ 10 files changed, 660 insertions(+) create mode 100644 arch/arm/include/asm/arch-armada8k/soc-info.h create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt create mode 100644 doc/device-tree-bindings/pinctrl/marvell,mvebu-pinctrl.txt create mode 100644 drivers/pinctrl/mvebu/Kconfig create mode 100644 drivers/pinctrl/mvebu/Makefile create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.c create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.h
arch/arm/include/asm/arch-armada8k/soc-info.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Copyright (C) 2016 Marvell International Ltd. +* +* SPDX-License-Identifier: GPL-2.0 +* https://spdx.org/licenses +*/ + +#ifndef _SOC_INFO_H_ +#define _SOC_INFO_H_ + +/* Pin Ctrl driver definitions */ +#define BITS_PER_PIN 4 +#define PIN_FUNC_MASK ((1 << BITS_PER_PIN) - 1) +#define PIN_REG_SHIFT 3 +#define PIN_FIELD_MASK ((1 << PIN_REG_SHIFT) - 1) + +#endif /* _SOC_INFO_H_ */
doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt new file +25 -0
@@ -0,0 +1,25 @@ + Functions of Armada APN806 pin controller + Function 0x0 for any MPP ID activates GPIO pin mode +---------------------------------------------------------------------- +MPP# 0x1 0x2 0x3 0x4 +---------------------------------------------------------------------- +0 SDIO_CLK - SPI0_CLK - +1 SDIO_CMD - SPI0_MISO - +2 SDIO_D[0] - SPI0_MOSI - +3 SDIO_D[1] - SPI0_CS0n - +4 SDIO_D[2] - I2C0_SDA SPI0_CS1n +5 SDIO_D[3] - I2C0_SCK - +6 SDIO_DS - - - +7 SDIO_D[4] - UART1_RXD - +8 SDIO_D[5] - UART1_TXD - +9 SDIO_D[6] - SPI0_CS1n - +10 SDIO_D[7] - - - +11 - - UART0_TXD - +12 SDIO_CARD_PW_OFF SDIO_HW_RST - - +13 - - - - +14 - - - - +15 - - - - +16 - - - - +17 - - - - +18 - - - - +19 - - UART0_RXD -
doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt new file +270 -0
270 lines not on this page · raw message
doc/device-tree-bindings/pinctrl/marvell,mvebu-pinctrl.txt new file +113 -0
113 lines not on this page · raw message
drivers/pinctrl/Kconfig +1 -0
@@ -181,5 +181,6 @@ source "drivers/pinctrl/meson/Kconfig" source "drivers/pinctrl/nxp/Kconfig" source "drivers/pinctrl/uniphier/Kconfig" source "drivers/pinctrl/exynos/Kconfig" +source "drivers/pinctrl/mvebu/Kconfig" endmenu
drivers/pinctrl/Makefile +1 -0
@@ -15,3 +15,4 @@ obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/ obj-$(CONFIG_PIC32_PINCTRL) += pinctrl_pic32.o obj-$(CONFIG_PINCTRL_EXYNOS) += exynos/ obj-$(CONFIG_PINCTRL_MESON) += meson/ +obj-$(CONFIG_PINCTRL_MVEBU) += mvebu/
drivers/pinctrl/mvebu/Kconfig new file +16 -0
@@ -0,0 +1,16 @@ +config PINCTRL_MVEBU + depends on ARCH_MVEBU + bool + default y + help + Support pin multiplexing and pin configuration control on + Marvell's Armada-8K SoC. The pin control driver allows setting + the pin mode (function) according to DTS configuration for every + multi-purpose pin (MPP) that is connected to the SoC pin controllers, + which are located on AP (north bridge with CPU cluster) or CP + (south bridge with mode IO). + For details about available pin function please refer to the + documentation included in device-tree-binding/pinctrl folder. + The driver allows all-pins configuration upon pin controller device + probe and setting specific pin functions for enabling some interface + functionality, for instance UART, SPI. I2C, etc.
drivers/pinctrl/mvebu/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# Copyright (C) 2016 Marvell International Ltd. +# +# SPDX-License-Identifier: GPL-2.0 +# https://spdx.org/licenses + +obj-$(CONFIG_PINCTRL_MVEBU) += pinctrl-mvebu.o
drivers/pinctrl/mvebu/pinctrl-mvebu.c new file +179 -0
179 lines not on this page · raw message
drivers/pinctrl/mvebu/pinctrl-mvebu.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Copyright (C) 2016 Marvell International Ltd. +* +* SPDX-License-Identifier: GPL-2.0 +* https://spdx.org/licenses +*/ + +#ifndef __PINCTRL_MVEBU_H_ +#define __PINCTRL_MVEBU_H_ + +#define MVEBU_MAX_PINCTL_BANKS 4 +#define MVEBU_MAX_PINS_PER_BANK 100 +#define MVEBU_MAX_FUNC 0xF + +/* +* struct mvebu_pin_bank_data: mvebu-pinctrl bank data +* @base_reg: controller base address for this bank +* @pin_cnt: number of pins included in this bank +* @max_func: maximum configurable function value for pins in this bank +* @reg_direction: +* @bank_name: the pin's bank name +*/ +struct mvebu_pinctrl_priv { +void *base_reg; +uint pin_cnt; +uint max_func; +int reg_direction; +const char *bank_name; +}; + +#endif /* __PINCTRL_MVEBU_H_ */
Signature · 1 line
2.7.4
PATCH v3 3/6 arm64: mvebu: pinctrl: Add pin control driver for A8K family
Quoted 32 lines · On 5 December 2016 at 05:16, <[email protected]> wrote:
From: Konstantin Porotchkin <[email protected]>
Add a DM port of Marvell pin control driver.
The A8K SoC family contains several silicone dies interconnected in a single package. Every die is normally equipped with its own pin controller unit.
There are 2 pin controllers in A70x0 SoC and 3 in A80x0 SoC.Changes for v3:
- Extend theKconfighelp for pin control driverSigned-off-by Konstantin Porotchkin <[email protected]>Cc Simon Glass <[email protected]>Cc Stefan Roese <[email protected]>Cc Nadav Haklai <[email protected]>Cc Neta Zur Hershkovits <[email protected]>Cc Omri Itach <[email protected]>Cc Igal Liberman <[email protected]>Cc Haim Boot <[email protected]>Cc Hanna Hawa <[email protected]>--- arch/arm/include/asm/arch-armada8k/soc-info.h | 17 ++ .../pinctrl/marvell,armada-apn806-pinctrl.txt | 25 ++ .../pinctrl/marvell,armada-cp110-pinctrl.txt | 270 +++++++++++++++++++++ .../pinctrl/marvell,mvebu-pinctrl.txt | 113 +++++++++ drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/mvebu/Kconfig | 16 ++ drivers/pinctrl/mvebu/Makefile | 7 + drivers/pinctrl/mvebu/pinctrl-mvebu.c | 179 ++++++++++++++ drivers/pinctrl/mvebu/pinctrl-mvebu.h | 31 +++ 10 files changed, 660 insertions(+)
Quoted 9 lines
create mode 100644 arch/arm/include/asm/arch-armada8k/soc-info.h create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt create mode 100644 doc/device-tree-bindings/pinctrl/marvell,mvebu-pinctrl.txt create mode 100644 drivers/pinctrl/mvebu/Kconfig create mode 100644 drivers/pinctrl/mvebu/Makefile create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.c create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.h
I think I already reviewed this, but just in case:
PATCH v3 3/6 arm64: mvebu: pinctrl: Add pin control driver for A8K family
Hello, Simon,
Thank you very much for your review.
Yes, this patch was only adding some help to Kconfig (as you requested), no other changes from the previous version. I have to re-send the entire series one more time for moving the change log from commit messages to comment sections. Some changes will be done on other patches, but this one will remain the same as v3.
Best Regards
Kosta
________________________________________
From: [email protected] <[email protected]> on behalf of Simon Glass <[email protected]>
Sent: Wednesday, December 7, 2016 05:47
To: Kostya Porotchkin
Cc: U-Boot Mailing List; Stefan Roese; Nadav Haklai; Neta Zur Hershkovits; Omri Itach; Igal Liberman; Haim Boot; Hanna Hawa
Subject: Re: [PATCH v3 3/6] arm64: mvebu: pinctrl: Add pin control driver for A8K family
----------------------------------------------------------------------
Quoted 32 lines · On 5 December 2016 at 05:16, <[email protected]> wrote:
From: Konstantin Porotchkin <[email protected]>
Add a DM port of Marvell pin control driver.
The A8K SoC family contains several silicone dies interconnected in a single package. Every die is normally equipped with its own pin controller unit.
There are 2 pin controllers in A70x0 SoC and 3 in A80x0 SoC.Changes for v3:
- Extend theKconfighelp for pin control driverSigned-off-by Konstantin Porotchkin <[email protected]>Cc Simon Glass <[email protected]>Cc Stefan Roese <[email protected]>Cc Nadav Haklai <[email protected]>Cc Neta Zur Hershkovits <[email protected]>Cc Omri Itach <[email protected]>Cc Igal Liberman <[email protected]>Cc Haim Boot <[email protected]>Cc Hanna Hawa <[email protected]>--- arch/arm/include/asm/arch-armada8k/soc-info.h | 17 ++ .../pinctrl/marvell,armada-apn806-pinctrl.txt | 25 ++ .../pinctrl/marvell,armada-cp110-pinctrl.txt | 270 +++++++++++++++++++++ .../pinctrl/marvell,mvebu-pinctrl.txt | 113 +++++++++ drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/mvebu/Kconfig | 16 ++ drivers/pinctrl/mvebu/Makefile | 7 + drivers/pinctrl/mvebu/pinctrl-mvebu.c | 179 ++++++++++++++ drivers/pinctrl/mvebu/pinctrl-mvebu.h | 31 +++ 10 files changed, 660 insertions(+)
Quoted 9 lines
create mode 100644 arch/arm/include/asm/arch-armada8k/soc-info.h create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-apn806-pinctrl.txt create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-cp110-pinctrl.txt create mode 100644 doc/device-tree-bindings/pinctrl/marvell,mvebu-pinctrl.txt create mode 100644 drivers/pinctrl/mvebu/Kconfig create mode 100644 drivers/pinctrl/mvebu/Makefile create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.c create mode 100644 drivers/pinctrl/mvebu/pinctrl-mvebu.h
I think I already reviewed this, but just in case:
PATCH v3 3/6 arm64: mvebu: pinctrl: Add pin control driver for A8K family
Hi,
Quoted 7 lines · Kostya Porotchkin
Hello, Simon,
Thank you very much for your review.
Yes, this patch was only adding some help toKconfig(as you requested), no other changes from the previous version. I have to re-send the entire series one more time for moving the change log from commit messages to comment sections. Some changes will be done on other patches, but this one will remain the same as v3.
OK, please add my review tag for anything I have reviewed, when you resend it. It saves me needing to review again.
Thanks,
Simon