*** SUBJECT HERE ***
Subsystems (3)
cover *** SUBJECT HERE ***
From: Ken Ma <[email protected]>
The below patches fix new pinctrl driver issues and remove old obsolete pinctrl implementation for Armada 37xx.
Ken Ma (13):
arm64: a37xx: dts: add gpio head file including
arm64: a37xx: defconfig: Enable PINCTRL and GPIO support for
ESPRESSOBin board
arm64: a37xx: dts: Add pinctrl configuration for ESPRESSOBin board
arm64: a37xx: dts: Add additional pinctrl definition
arm64: a37xx: pinctrl: Fix number of pin in south bridge
arm64: a37xx: dts: Fix the number of GPIO on south bridge
arm64: a37xx: pinctrl: Fix the pin 23 on south bridge
arm64: a37xx: pinctrl: Fix gpio pin offset in register
arm64: a37xx: pinctrl: Correct mpp definitions
arm64: a37xx: dts: Correct mpp definitions
doc: a37xx: Introduce pinctrl device tree binding Revert "arm64: a37xx: dts: Add pin control nodes to DT"
arm64: a37xx: remove old pinctrl implementation
arch/arm/dts/armada-3720-db.dts | 6 +- arch/arm/dts/armada-3720-espressobin.dts | 8 + arch/arm/dts/armada-37xx.dtsi | 36 ++-- board/Marvell/mvebu_armada-37xx/board.c | 23 --- configs/mvebu_espressobin-88f3720_defconfig | 4 + .../pinctrl/marvell,armada-37xx-pinctrl.txt | 186 +++++++++++++++++++++ drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 52 +++--- 7 files changed, 256 insertions(+), 59 deletions(-) create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-37xx-pinctrl.txt
Signature · 1 line
1.9.1
PATCH 1/13 arm64: a37xx: dts: add gpio head file including
From: Ken Ma <[email protected]>
--- arch/arm/dts/armada-37xx.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/armada-37xx.dtsi +1 -0
@@ -46,6 +46,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/comphy/comphy_data.h> +#include <dt-bindings/gpio/gpio.h> / { model = "Marvell Armada 37xx SoC";
Signature · 1 line
1.9.1
PATCH 1/13 arm64: a37xx: dts: add gpio head file including
Quoted 15 lines · make at marvell.com
From: Ken Ma <[email protected]>
Cc Simon Glass <[email protected]>Cc Stefan Roese <[email protected]>Signed-off-by Ken Ma <[email protected]>--- arch/arm/dts/armada-37xx.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/armada-37xx.dtsi +0
-0
arch/arm/dts/armada-37xx.dtsi line 52
Quoted 7 lines
arch/arm/dts/armada-37xx.dtsi +1
-0@@ -46,6 +46,7 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/comphy/comphy_data.h> +#include <dt-bindings/gpio/gpio.h> / { model = "Marvell Armada 37xx SoC";
Complete series applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH 2/13 arm64: a37xx: defconfig: Enable PINCTRL and GPIO support for ESPRESSOBin board
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
This patch enable the PINCTRL and GPIO support, including the GPIO command on the Armada 3720 espressobin board.
Reviewed-on: http://vgitil04.il.marvell.com:8080/40746
--- configs/mvebu_espressobin-88f3720_defconfig | 4 ++++ 1 file changed, 4 insertions(+)
configs/mvebu_espressobin-88f3720_defconfig +4 -0
@@ -14,6 +14,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_ARCH_EARLY_INIT_R=y CONFIG_BOARD_EARLY_INIT_F=y # CONFIG_CMD_FLASH is not set +CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_SF=y
@@ -29,6 +30,7 @@ CONFIG_MAC_PARTITION=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SCSI_AHCI=y CONFIG_BLOCK_CACHE=y +CONFIG_DM_GPIO=y CONFIG_DM_I2C=y CONFIG_MISC=y CONFIG_DM_MMC=y
@@ -43,6 +45,8 @@ CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHYLIB=y CONFIG_PHY_GIGE=y CONFIG_MVEBU_COMPHY_SUPPORT=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_ARMADA_37XX=y # CONFIG_SPL_SERIAL_PRESENT is not set CONFIG_DEBUG_MVEBU_A3700_UART=y CONFIG_DEBUG_UART_BASE=0xd0012000
Signature · 1 line
1.9.1
PATCH 3/13 arm64: a37xx: dts: Add pinctrl configuration for ESPRESSOBin board
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
Reviewed-on: http://vgitil04.il.marvell.com:8080/40913
--- arch/arm/dts/armada-3720-espressobin.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/dts/armada-3720-espressobin.dts +8 -0
@@ -89,6 +89,8 @@ ð0 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; phy-mode = "rgmii"; phy_addr = <0x1>; fixed-link {
@@ -98,6 +100,8 @@ }; &i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; status = "okay"; };
@@ -108,6 +112,8 @@ &spi0 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spi_quad_pins>; spi-flash at 0 { #address-cells = <1>;
@@ -121,6 +127,8 @@ /* Exported on the micro USB connector CON32 through an FTDI */ &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; status = "okay"; };
Signature · 1 line
1.9.1
PATCH 4/13 arm64: a37xx: dts: Add additional pinctrl definition
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
Add mmc pins, pcie pins and sdio pins definition and do these pins' configuration for DB board and espressobin board;
Add uart2 pins configuration for DB board.
Reviewed-on: http://vgitil04.il.marvell.com:8080/40914
--- arch/arm/dts/armada-3720-db.dts | 4 ++++ arch/arm/dts/armada-37xx.dtsi | 14 ++++++++++++++ 2 files changed, 18 insertions(+)
arch/arm/dts/armada-3720-db.dts +4 -0
@@ -100,6 +100,8 @@ &sdhci0 { bus-width = <4>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio_pins>; status = "okay"; };
@@ -109,6 +111,8 @@ mmc-ddr-1_8v; mmc-hs400-1_8v; marvell,pad-type = "fixed-1-8v"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc_pins>; status = "okay"; #address-cells = <1>;
arch/arm/dts/armada-37xx.dtsi +14 -0
@@ -155,6 +155,11 @@ groups = "uart2"; function = "uart"; }; + + mmc_pins: mmc-pins { + groups = "emmc_nb"; + function = "emmc"; + }; }; pinctrl_sb: pinctrl-sb at 18800 {
@@ -178,6 +183,15 @@ function = "mii"; }; + sdio_pins: sdio-pins { + groups = "sdio_sb"; + function = "sdio"; + }; + + pcie_pins: pcie-pins { + groups = "pcie1"; + function = "pcie"; + }; }; usb3: usb at 58000 {
Signature · 1 line
1.9.1
PATCH 5/13 arm64: a37xx: pinctrl: Fix number of pin in south bridge
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
On the south bridge we have pin from 0 to 29, so it gives 30 pins (and not 29).
Reviewed-on: http://vgitil04.il.marvell.com:8080/43285
--- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +1 -1
@@ -189,7 +189,7 @@ const struct armada_37xx_pin_data armada_37xx_pin_nb = { };const struct armada_37xx_pin_data armada_37xx_pin_sb = { - .nr_pins =29 , + .nr_pins =30 , .name ="GPIO2" , .groups = armada_37xx_sb_groups, .ngroups =ARRAY_SIZE (armada_37xx_sb_groups),
Signature · 1 line
1.9.1
PATCH 6/13 arm64: a37xx: dts: Fix the number of GPIO on south bridge
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
The number of pins in South Bridge is 30 and not 29. There is a fix for the driver for the pinctrl, but a fix is also need at device tree level for the GPIO.
Reviewed-on: http://vgitil04.il.marvell.com:8080/43286
--- arch/arm/dts/armada-37xx.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/armada-37xx.dtsi +1 -1
@@ -168,7 +168,7 @@ reg = <0x18800 0x100>, <0x18C00 0x20>; gpiosb: gpiosb { #gpio-cells = <2>; - gpio-ranges = <&pinctrl_sb 0 0 29>; + gpio-ranges = <&pinctrl_sb 0 0 30>; gpio-controller; interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
1.9.1
PATCH 7/13 arm64: a37xx: pinctrl: Fix the pin 23 on south bridge
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
Pin 23 on South bridge does not belong to the rgmii group. It belongs to a separate group which can have 3 functions.
Due to this the fix also have to update the way the functions are managed. Until now each groups used NB_FUNCS(which was 2) functions. For the mpp23, 3 functions are available but it is the only group which needs it, so on the loop involving NB_FUNCS an extra test was added to handle only the functions added.
The bug was visible when the gpio regulator used the gpio 23, the whole rgmii group was setup to gpio which broke the Ethernet support on the Armada 3720 DB board. Thanks to this patch, the UHS SD cards (which need the vqmmc) _and_ the Ethernet work again.
Reviewed-on: http://vgitil04.il.marvell.com:8080/43284
--- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +16 -5
@@ -44,7 +44,7 @@ DECLARE_GLOBAL_DATA_PTR;#define IRQ_STATUS 0x10#define IRQ_WKUP 0x18 -#define NB_FUNCS 2 +#define NB_FUNCS 3#define GPIO_PER_REG 32/**
@@ -128,6 +128,16 @@ struct armada_37xx_pinctrl { .funcs = {_func1, "gpio"} \ } +#define PIN_GRP_GPIO_3 (_name, _start, _nr, _mask, _v1, _v2, _v3, _f1, _f2) \ + { \ + .name = _name, \ + .start_pin = _start, \ + .npins = _nr, \ + .reg_mask = _mask, \ + .val = {_v1, _v2, _v3}, \ + .funcs = {_f1, _f2, "gpio"} \ + } +#define PIN_GRP_EXTRA (_name, _start, _nr, _mask, _v1, _v2, _start2, _nr2, \ _f1, _f2) \ { \
@@ -178,7 +188,8 @@ static struct armada_37xx_pin_group armada_37xx_sb_groups[] = {PIN_GRP_GPIO ("ptp" ,20 ,3 ,BIT (5 ),"ptp" ),PIN_GRP ("ptp_clk" ,21 ,1 ,BIT (6 ),"ptp" ,"mii" ),PIN_GRP ("ptp_trig" ,22 ,1 ,BIT (7 ),"ptp" ,"mii" ), - PIN_GRP("mii_col", 23, 1, BIT(8), "mii", "mii_err"), +PIN_GRP_GPIO_3 ("mii_col" ,23 ,1 ,BIT (8 ) |BIT (14 ),0 ,BIT (8 ),BIT (14 ), + "mii", "mii_err"), }; const struct armada_37xx_pin_data armada_37xx_pin_nb = {
@@ -210,7 +221,7 @@ static int armada_37xx_get_func_reg(struct armada_37xx_pin_group *grp, {int f; -for (f =0 ; f <NB_FUNCS ; f++) +for (f =0 ; (f <NB_FUNCS ) && grp->funcs[f]; f++)if (!strcmp (grp->funcs[f], func))return f;
@@ -352,7 +363,7 @@ static int armada_37xx_fill_group(struct armada_37xx_pinctrl *info)for (j =0 ; j < grp->extra_npins; j++) grp->pins[i+j] = grp->extra_pin + j; -for (f =0 ; f <NB_FUNCS ; f++) { +for (f =0 ; (f <NB_FUNCS ) && grp->funcs[f]; f++) {int ret;/* check for unique functions and count groups */ ret = armada_37xx_add_function(info->funcs, &funcsize,
@@ -404,7 +415,7 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info)struct armada_37xx_pin_group *gp = &info->groups[g];int f; -for (f =0 ; f <NB_FUNCS ; f++) { +for (f =0 ; (f <NB_FUNCS ) && gp->funcs[f]; f++) {if (strcmp (gp->funcs[f], name) ==0 ) { *groups = gp->name; groups++;
Signature · 1 line
1.9.1
PATCH 8/13 arm64: a37xx: pinctrl: Fix gpio pin offset in register
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
For armada_37xx_update_reg(), the parameter offset should be pointer so that it can be updated, otherwise offset will keep old value, and then when offset is larger than or equal to 32 the mask calculated by "BIT(offset)" will be 0 in gpio chip hook functions, it's an error, this patch set offset parameter of armada_37xx_update_reg() as pointer.
Reviewed-on: http://vgitil04.il.marvell.com:8080/43287
--- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +8 -8
@@ -207,11 +207,11 @@ const struct armada_37xx_pin_data armada_37xx_pin_sb = { };static inline void armada_37xx_update_reg (unsigned int *reg, -unsigned int offset) +unsigned int *offset) {/* We never have more than 2 registers */ -if (offset >=GPIO_PER_REG ) { - offset -=GPIO_PER_REG ; +if (*offset >=GPIO_PER_REG ) { + *offset -=GPIO_PER_REG ; *reg +=sizeof (u32); } }
@@ -432,7 +432,7 @@ static int armada_37xx_gpio_get(struct udevice *dev, unsigned int offset)unsigned int reg =INPUT_VAL ;unsigned int val, mask; -armada_37xx_update_reg (®, offset); +armada_37xx_update_reg (®, &offset); mask =BIT (offset); val =readl (info->base + reg);
@@ -447,7 +447,7 @@ static int armada_37xx_gpio_set(struct udevice *dev, unsigned int offset,unsigned int reg =OUTPUT_VAL ;unsigned int mask, val; -armada_37xx_update_reg (®, offset); +armada_37xx_update_reg (®, &offset); mask =BIT (offset); val = value ? mask :0 ;
@@ -463,7 +463,7 @@ static int armada_37xx_gpio_get_direction(struct udevice *dev,unsigned int reg =OUTPUT_EN ;unsigned int val, mask; -armada_37xx_update_reg (®, offset); +armada_37xx_update_reg (®, &offset); mask =BIT (offset); val =readl (info->base + reg);
@@ -480,7 +480,7 @@ static int armada_37xx_gpio_direction_input(struct udevice *dev,unsigned int reg =OUTPUT_EN ;unsigned int mask; -armada_37xx_update_reg (®, offset); +armada_37xx_update_reg (®, &offset); mask =BIT (offset);clrbits_le32 (info->base + reg, mask);
@@ -495,7 +495,7 @@ static int armada_37xx_gpio_direction_output(struct udevice *dev,unsigned int reg =OUTPUT_EN ;unsigned int mask; -armada_37xx_update_reg (®, offset); +armada_37xx_update_reg (®, &offset); mask =BIT (offset);setbits_le32 (info->base + reg, mask);
Signature · 1 line
1.9.1
PATCH 9/13 arm64: a37xx: pinctrl: Correct mpp definitions
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
This patch corrects below mpp definitions:
- The sdio_sb group is composed of 6 pins and not 5;
- The rgmii group contains pins mpp2[17:6] and not mpp2[19:6];
- Pin of group "pmic0" is mpp1[6] but not mpp1[16];
- Pin of group "pmic1" is mpp1[7] but not mpp1[17];
- A new group "smi" is added in A0 with 2 pins - mpp2[19:18], its bitmask is bit4;
- Group "pcie1" has 3 pins in A0 - mpp2[5:3], its bit mask is bit5 | bit9 | bit10 but not bit4;
- Group "ptp" has 3 pins in A0 as Z1, but its bitmask is changed to bit11 | bit12 | bit13.
Reviewed-on: http://vgitil04.il.marvell.com:8080/43288
--- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +7 -6
@@ -159,8 +159,8 @@ static struct armada_37xx_pin_group armada_37xx_nb_groups[] = {PIN_GRP_GPIO ("pwm1" ,12 ,1 ,BIT (4 ),"pwm" ),PIN_GRP_GPIO ("pwm2" ,13 ,1 ,BIT (5 ),"pwm" ),PIN_GRP_GPIO ("pwm3" ,14 ,1 ,BIT (6 ),"pwm" ), -PIN_GRP_GPIO ("pmic1" ,17 ,1 ,BIT (7 ),"pmic" ), -PIN_GRP_GPIO ("pmic0" ,16 ,1 ,BIT (8 ),"pmic" ), +PIN_GRP_GPIO ("pmic1" ,7 ,1 ,BIT (7 ),"pmic" ), +PIN_GRP_GPIO ("pmic0" ,6 ,1 ,BIT (8 ),"pmic" ),PIN_GRP_GPIO ("i2c2" ,2 ,2 ,BIT (9 ),"i2c" ),PIN_GRP_GPIO ("i2c1" ,0 ,2 ,BIT (10 ),"i2c" ), PIN_GRP_GPIO("spi_cs1", 17, 1, BIT(12), "spi"),
@@ -182,10 +182,11 @@ static struct armada_37xx_pin_group armada_37xx_nb_groups[] = {static struct armada_37xx_pin_group armada_37xx_sb_groups[] = {PIN_GRP_GPIO ("usb32_drvvbus0" ,0 ,1 ,BIT (0 ),"drvbus" ),PIN_GRP_GPIO ("usb2_drvvbus1" ,1 ,1 ,BIT (1 ),"drvbus" ), -PIN_GRP_GPIO ("sdio_sb" ,24 ,5 ,BIT (2 ),"sdio" ), -PIN_GRP_EXTRA ("rgmii" ,6 ,14 ,BIT (3 ),0 ,BIT (3 ),23 ,1 ,"mii" ,"gpio" ), -PIN_GRP_GPIO ("pcie1" ,3 ,2 ,BIT (4 ),"pcie" ), -PIN_GRP_GPIO ("ptp" ,20 ,3 ,BIT (5 ),"ptp" ), +PIN_GRP_GPIO ("sdio_sb" ,24 ,6 ,BIT (2 ),"sdio" ), +PIN_GRP_GPIO ("rgmii" ,6 ,12 ,BIT (3 ),"mii" ), +PIN_GRP_GPIO ("smi" ,18 ,2 ,BIT (4 ),"smi" ), +PIN_GRP_GPIO ("pcie1" ,3 ,3 ,BIT (5 ) |BIT (9 ) |BIT (10 ),"pcie" ), +PIN_GRP_GPIO ("ptp" ,20 ,3 ,BIT (11 ) |BIT (12 ) |BIT (13 ),"ptp" ),PIN_GRP ("ptp_clk" ,21 ,1 ,BIT (6 ),"ptp" ,"mii" ),PIN_GRP ("ptp_trig" ,22 ,1 ,BIT (7 ),"ptp" ,"mii" ), PIN_GRP_GPIO_3("mii_col", 23, 1, BIT(8) | BIT(14), 0, BIT(8), BIT(14),
Signature · 1 line
1.9.1
PATCH 10/13 arm64: a37xx: dts: Correct mpp definitions
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
This patch corrects below mpp definitions for armada 3720 DB board and ESPRESSOBin board:
- "smi" pins group is added and "smi" function is set for eth0;
- Now pcie pins are used as gpio to implement PCIe function in hardware, so "pcie" group function is changed to "gpio".
Reviewed-on: http://vgitil04.il.marvell.com:8080/43287
--- arch/arm/dts/armada-3720-db.dts | 2 +- arch/arm/dts/armada-3720-espressobin.dts | 2 +- arch/arm/dts/armada-37xx.dtsi | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-)
arch/arm/dts/armada-3720-db.dts +1 -1
@@ -82,7 +82,7 @@ ð0 { pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; + pinctrl-0 = <&rgmii_pins>, <&smi_pins>; status = "okay"; phy-mode = "rgmii"; };
arch/arm/dts/armada-3720-espressobin.dts +1 -1
@@ -90,7 +90,7 @@ ð0 { status = "okay"; pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; + pinctrl-0 = <&rgmii_pins>, <&smi_pins>; phy-mode = "rgmii"; phy_addr = <0x1>; fixed-link {
arch/arm/dts/armada-37xx.dtsi +6 -1
@@ -183,6 +183,11 @@ function = "mii"; }; + smi_pins: smi-pins { + groups = "smi"; + function = "smi"; + }; + sdio_pins: sdio-pins { groups = "sdio_sb"; function = "sdio";
@@ -190,7 +195,7 @@ pcie_pins: pcie-pins { groups = "pcie1"; - function = "pcie"; + function = "gpio"; }; };
Signature · 1 line
1.9.1
PATCH 11/13 doc: a37xx: Introduce pinctrl device tree binding
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
Reviewed-on: http://vgitil04.il.marvell.com:8080/43289
--- .../pinctrl/marvell,armada-37xx-pinctrl.txt | 186 +++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 doc/device-tree-bindings/pinctrl/marvell,armada-37xx-pinctrl.txt
doc/device-tree-bindings/pinctrl/marvell,armada-37xx-pinctrl.txt new file +186 -0
@@ -0,0 +1,186 @@ +* Marvell Armada 37xx SoC pin and GPIO controller + +Each Armada 37xx SoC comes with two pin and GPIO controllers, one for the +South Bridge and the other for the North Bridge. + +GPIO and pin controller: +------------------------ + +Main node: + +Refer to pinctrl-bindings.txt in this directory for details of the +common pinctrl bindings used by client devices, including the meaning +of the phrase "pin configuration node". + +Required properties for pinctrl driver: + +- compatible: "marvell,armada3710-sb-pinctrl", "syscon, "simple-mfd" + for the South Bridge + "marvell,armada3710-nb-pinctrl", "syscon, "simple-mfd" + for the North Bridge +- reg: The first set of registers is for pinctrl/GPIO and the second + set is for the interrupt controller +- interrupts: list of interrupts used by the GPIO + +Available groups and functions for the North Bridge: + +group: jtag + - pins 20-24 + - functions jtag, gpio + +group sdio0 + - pins 8-10 + - functions sdio, gpio + +group emmc_nb + - pins 27-35 + - functions emmc, gpio + +group pwm0 + - pin 11 (GPIO1-11) + - functions pwm, gpio + +group pwm1 + - pin 12 + - functions pwm, gpio + +group pwm2 + - pin 13 + - functions pwm, gpio + +group pwm3 + - pin 14 + - functions pwm, gpio + +group pmic1 + - pin 7 + - functions pmic, gpio + +group pmic0 + - pin 6 + - functions pmic, gpio + +group i2c2 + - pins 2-3 + - functions i2c, gpio + +group i2c1 + - pins 0-1 + - functions i2c, gpio + +group spi_cs1 + - pin 17 + - functions spi, gpio + +group spi_cs2 + - pin 18 + - functions spi, gpio + +group spi_cs3 + - pin 19 + - functions spi, gpio + +group onewire + - pin 4 + - functions onewire, gpio + +group uart1 + - pins 25-26 + - functions uart, gpio + +group spi_quad + - pins 15-16 + - functions spi, gpio + +group uart_2 + - pins 9-10 + - functions uart, gpio + +Available groups and functions for the South Bridge: + +group usb32_drvvbus0 + - pin 36 + - functions drvbus, gpio + +group usb2_drvvbus1 + - pin 37 + - functions drvbus, gpio + +group sdio_sb + - pins 60-65 + - functions sdio, gpio + +group rgmii + - pins 42-53 + - functions mii, gpio + +group pcie1 + - pins 39-41 + - functions pcie, gpio + +group smi + - pins 54-55 + - functions smi, gpio + +group ptp + - pins 56-58 + - functions ptp, gpio + +group ptp_clk + - pin 57 + - functions ptp, mii + +group ptp_trig + - pin 58 + - functions ptp, mii + +group mii_col + - pin 59 + - functions mii, mii_err + +GPIO subnode: + +Please refer to gpio.txt in "gpio" directory for details of gpio-ranges property +and the common GPIO bindings used by client devices. + +Required properties for the GPIO driver under the gpio subnode: +- interrupts: List of interrupt specifiers for the controllers interrupt. +- gpio-controller: Marks the device node as a GPIO controller. +- #gpio-cells: Should be 2. The first cell is the GPIO number and the + second cell specifies GPIO flags, as defined in + <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and + GPIO_ACTIVE_LOW flags are supported. +- gpio-ranges: Range of pins managed by the GPIO controller. + +Example: +pinctrl_sb: pinctrl-sb at 18800 { + compatible = "marvell,armada3710-sb-pinctrl", + "syscon", "simple-mfd"; + reg = <0x18800 0x100>, <0x18C00 0x20>; + gpiosb: gpiosb { + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_sb 0 0 30>; + gpio-controller; + interrupts = + <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; + }; + + rgmii_pins: mii-pins { + groups = "rgmii"; + function = "mii"; + }; + + sdio_pins: sdio-pins { + groups = "sdio_sb"; + function = "sdio"; + }; + + pcie_pins: pcie-pins { + groups = "pcie1"; + function = "pcie"; + }; +};
Signature · 1 line
1.9.1
PATCH 12/13 Revert "arm64: a37xx: dts: Add pin control nodes to DT"
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
The commit "arm64: mvebu: Add pinctrl nodes for Armada 3700" has added new pinctrl nodes.
This reverts commit f7cab0f95b05ec6a66fe4796b9ad44406d0cc864.
--- arch/arm/dts/armada-37xx.dtsi | 14 -------------- 1 file changed, 14 deletions(-)
arch/arm/dts/armada-37xx.dtsi +0 -14
@@ -286,20 +286,6 @@ status = "disabled"; }; - pinctl0: pinctl at 13830 { /* north bridge */ - compatible = "marvell,armada-3700-pinctl"; - bank-name = "armada-3700-nb"; - reg = <0x13830 0x4>; - pin-count = <36>; - }; - - pinctl1: pinctl at 18830 { /* south bridge */ - compatible = "marvell,armada-3700-pinctl"; - bank-name = "armada-3700-sb"; - reg = <0x18830 0x4>; - pin-count = <30>; - }; - comphy: comphy at 18300 { compatible = "marvell,mvebu-comphy", "marvell,comphy-armada-3700"; reg = <0x18300 0x28>,
Signature · 1 line
1.9.1
PATCH 13/13 arm64: a37xx: remove old pinctrl implementation
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
Since the new pinctrl/gpio driver is used, so this patch removes the old board specific pin control settings.
--- board/Marvell/mvebu_armada-37xx/board.c | 23 ----------------------- 1 file changed, 23 deletions(-)
board/Marvell/mvebu_armada-37xx/board.c +0 -23
@@ -50,29 +50,6 @@ DECLARE_GLOBAL_DATA_PTR;int board_early_init_f (void ) { -const void *blob = gd->fdt_blob; -const char *bank_name; -const char *compat ="marvell,armada-3700-pinctl" ; -int off, len; -void __iomem *addr; - -/* FIXME -* Temporary WA for setting correct pin control values -* until the real pin control driver is awailable. -*/ - off =fdt_node_offset_by_compatible (blob,-1 , compat); -while (off != -FDT_ERR_NOTFOUND ) { - bank_name =fdt_getprop (blob, off,"bank-name" , &len); - addr = (void __iomem *)fdtdec_get_addr_size_auto_noparent ( - blob, off,"reg" ,0 ,NULL , true); -if (!strncmp (bank_name,"armada-3700-nb" , len)) -writel (PINCTRL_NB_REG_VALUE , addr); -else if (!strncmp (bank_name,"armada-3700-sb" , len)) -writel (PINCTRL_SB_REG_VALUE , addr); - - off =fdt_node_offset_by_compatible (blob, off, compat); - } -return 0 ; }
Signature · 1 line
1.9.1