18c2ecf20Sopenharmony_ci* Marvell Armada 37xx SoC pin and gpio controller
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciEach Armada 37xx SoC come with two pin and gpio controller one for the
48c2ecf20Sopenharmony_cisouth bridge and the other for the north bridge.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciInside this set of register the gpio latch allows exposing some
78c2ecf20Sopenharmony_ciconfiguration of the SoC and especially the clock frequency of the
88c2ecf20Sopenharmony_cixtal. Hence, this node is a represent as syscon allowing sharing the
98c2ecf20Sopenharmony_ciregister between multiple hardware block.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciGPIO and pin controller:
128c2ecf20Sopenharmony_ci------------------------
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciMain node:
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciRefer to pinctrl-bindings.txt in this directory for details of the
178c2ecf20Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning
188c2ecf20Sopenharmony_ciof the phrase "pin configuration node".
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciRequired properties for pinctrl driver:
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci- compatible:	"marvell,armada3710-sb-pinctrl", "syscon, "simple-mfd"
238c2ecf20Sopenharmony_ci		for the south bridge
248c2ecf20Sopenharmony_ci		"marvell,armada3710-nb-pinctrl", "syscon, "simple-mfd"
258c2ecf20Sopenharmony_ci		for the north bridge
268c2ecf20Sopenharmony_ci- reg: The first set of register are for pinctrl/gpio and the second
278c2ecf20Sopenharmony_ci  set for the interrupt controller
288c2ecf20Sopenharmony_ci- interrupts: list of the interrupt use by the gpio
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciAvailable groups and functions for the North bridge:
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_cigroup: jtag
338c2ecf20Sopenharmony_ci - pins 20-24
348c2ecf20Sopenharmony_ci - functions jtag, gpio
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_cigroup sdio0
378c2ecf20Sopenharmony_ci - pins 8-10
388c2ecf20Sopenharmony_ci - functions sdio, gpio
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_cigroup emmc_nb
418c2ecf20Sopenharmony_ci - pins 27-35
428c2ecf20Sopenharmony_ci - functions emmc, gpio
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_cigroup pwm0
458c2ecf20Sopenharmony_ci - pin 11 (GPIO1-11)
468c2ecf20Sopenharmony_ci - functions pwm, led, gpio
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_cigroup pwm1
498c2ecf20Sopenharmony_ci - pin 12
508c2ecf20Sopenharmony_ci - functions pwm, led, gpio
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_cigroup pwm2
538c2ecf20Sopenharmony_ci - pin 13
548c2ecf20Sopenharmony_ci - functions pwm, led, gpio
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_cigroup pwm3
578c2ecf20Sopenharmony_ci - pin 14
588c2ecf20Sopenharmony_ci - functions pwm, led, gpio
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_cigroup pmic1
618c2ecf20Sopenharmony_ci - pin 7
628c2ecf20Sopenharmony_ci - functions pmic, gpio
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_cigroup pmic0
658c2ecf20Sopenharmony_ci - pin 6
668c2ecf20Sopenharmony_ci - functions pmic, gpio
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_cigroup i2c2
698c2ecf20Sopenharmony_ci - pins 2-3
708c2ecf20Sopenharmony_ci - functions i2c, gpio
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_cigroup i2c1
738c2ecf20Sopenharmony_ci - pins 0-1
748c2ecf20Sopenharmony_ci - functions i2c, gpio
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_cigroup spi_cs1
778c2ecf20Sopenharmony_ci - pin 17
788c2ecf20Sopenharmony_ci - functions spi, gpio
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_cigroup spi_cs2
818c2ecf20Sopenharmony_ci - pin 18
828c2ecf20Sopenharmony_ci - functions spi, gpio
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_cigroup spi_cs3
858c2ecf20Sopenharmony_ci - pin 19
868c2ecf20Sopenharmony_ci - functions spi, gpio
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_cigroup onewire
898c2ecf20Sopenharmony_ci - pin 4
908c2ecf20Sopenharmony_ci - functions onewire, gpio
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_cigroup uart1
938c2ecf20Sopenharmony_ci - pins 25-26
948c2ecf20Sopenharmony_ci - functions uart, gpio
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_cigroup spi_quad
978c2ecf20Sopenharmony_ci - pins 15-16
988c2ecf20Sopenharmony_ci - functions spi, gpio
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_cigroup uart2
1018c2ecf20Sopenharmony_ci - pins 9-10 and 18-19
1028c2ecf20Sopenharmony_ci - functions uart, gpio
1038c2ecf20Sopenharmony_ci
1048c2ecf20Sopenharmony_ciAvailable groups and functions for the South bridge:
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_cigroup usb32_drvvbus0
1078c2ecf20Sopenharmony_ci - pin 36
1088c2ecf20Sopenharmony_ci - functions drvbus, gpio
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_cigroup usb2_drvvbus1
1118c2ecf20Sopenharmony_ci - pin 37
1128c2ecf20Sopenharmony_ci - functions drvbus, gpio
1138c2ecf20Sopenharmony_ci
1148c2ecf20Sopenharmony_cigroup sdio_sb
1158c2ecf20Sopenharmony_ci - pins 60-65
1168c2ecf20Sopenharmony_ci - functions sdio, gpio
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_cigroup rgmii
1198c2ecf20Sopenharmony_ci - pins 42-53
1208c2ecf20Sopenharmony_ci - functions mii, gpio
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_cigroup pcie1
1238c2ecf20Sopenharmony_ci - pins 39
1248c2ecf20Sopenharmony_ci - functions pcie, gpio
1258c2ecf20Sopenharmony_ci
1268c2ecf20Sopenharmony_cigroup pcie1_clkreq
1278c2ecf20Sopenharmony_ci - pins 40
1288c2ecf20Sopenharmony_ci - functions pcie, gpio
1298c2ecf20Sopenharmony_ci
1308c2ecf20Sopenharmony_cigroup pcie1_wakeup
1318c2ecf20Sopenharmony_ci - pins 41
1328c2ecf20Sopenharmony_ci - functions pcie, gpio
1338c2ecf20Sopenharmony_ci
1348c2ecf20Sopenharmony_cigroup smi
1358c2ecf20Sopenharmony_ci - pins 54-55
1368c2ecf20Sopenharmony_ci - functions smi, gpio
1378c2ecf20Sopenharmony_ci
1388c2ecf20Sopenharmony_cigroup ptp
1398c2ecf20Sopenharmony_ci - pins 56
1408c2ecf20Sopenharmony_ci - functions ptp, gpio
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_cigroup ptp_clk
1438c2ecf20Sopenharmony_ci - pin 57
1448c2ecf20Sopenharmony_ci - functions ptp, mii
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_cigroup ptp_trig
1478c2ecf20Sopenharmony_ci - pin 58
1488c2ecf20Sopenharmony_ci - functions ptp, mii
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_cigroup mii_col
1518c2ecf20Sopenharmony_ci - pin 59
1528c2ecf20Sopenharmony_ci - functions mii, mii_err
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ciGPIO subnode:
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ciPlease refer to gpio.txt in this directory for details of gpio-ranges property
1578c2ecf20Sopenharmony_ciand the common GPIO bindings used by client devices.
1588c2ecf20Sopenharmony_ci
1598c2ecf20Sopenharmony_ciRequired properties for gpio driver under the gpio subnode:
1608c2ecf20Sopenharmony_ci- interrupts: List of interrupt specifier for the controllers interrupt.
1618c2ecf20Sopenharmony_ci- gpio-controller: Marks the device node as a gpio controller.
1628c2ecf20Sopenharmony_ci- #gpio-cells: Should be 2. The first cell is the GPIO number and the
1638c2ecf20Sopenharmony_ci   second cell specifies GPIO flags, as defined in
1648c2ecf20Sopenharmony_ci   <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and
1658c2ecf20Sopenharmony_ci   GPIO_ACTIVE_LOW flags are supported.
1668c2ecf20Sopenharmony_ci- gpio-ranges: Range of pins managed by the GPIO controller.
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ciXtal Clock bindings for Marvell Armada 37xx SoCs
1698c2ecf20Sopenharmony_ci------------------------------------------------
1708c2ecf20Sopenharmony_ci
1718c2ecf20Sopenharmony_cisee Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_ciExample:
1758c2ecf20Sopenharmony_cipinctrl_sb: pinctrl-sb@18800 {
1768c2ecf20Sopenharmony_ci	compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd";
1778c2ecf20Sopenharmony_ci	reg = <0x18800 0x100>, <0x18C00 0x20>;
1788c2ecf20Sopenharmony_ci	gpio {
1798c2ecf20Sopenharmony_ci		#gpio-cells = <2>;
1808c2ecf20Sopenharmony_ci		gpio-ranges = <&pinctrl_sb 0 0 29>;
1818c2ecf20Sopenharmony_ci		gpio-controller;
1828c2ecf20Sopenharmony_ci		interrupts =
1838c2ecf20Sopenharmony_ci		<GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
1848c2ecf20Sopenharmony_ci		<GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
1858c2ecf20Sopenharmony_ci		<GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
1868c2ecf20Sopenharmony_ci		<GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
1878c2ecf20Sopenharmony_ci		<GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
1888c2ecf20Sopenharmony_ci	};
1898c2ecf20Sopenharmony_ci
1908c2ecf20Sopenharmony_ci	rgmii_pins: mii-pins {
1918c2ecf20Sopenharmony_ci		groups = "rgmii";
1928c2ecf20Sopenharmony_ci		function = "mii";
1938c2ecf20Sopenharmony_ci	};
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci};
196