Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: pinctrl: Convert marvell,armada-3710-(sb|nb)-pinctrl to DT schema

Convert the marvell,armada3710-(sb|nb)-pinctrl binding to DT schema
format. The binding includes the "marvell,armada-3700-xtal-clock"
subnode which is simple enough to include here.

Mark interrupt-controller/#interrupt-cells as required as the users have
them and the h/w is either capable of interrupts or not.

As this syscon has 2 register ranges, syscon-common.yaml needs to be
updated to drop the restriction of 1 register entry.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Rob Herring (Arm) and committed by
Linus Walleij
c1c9641a d51093cf

+124 -227
-29
Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt
··· 1 - * Xtal Clock bindings for Marvell Armada 37xx SoCs 2 - 3 - Marvell Armada 37xx SoCs allow to determine the xtal clock frequencies by 4 - reading the gpio latch register. 5 - 6 - This node must be a subnode of the node exposing the register address 7 - of the GPIO block where the gpio latch is located. 8 - See Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt 9 - 10 - Required properties: 11 - - compatible : shall be one of the following: 12 - "marvell,armada-3700-xtal-clock" 13 - - #clock-cells : from common clock binding; shall be set to 0 14 - 15 - Optional properties: 16 - - clock-output-names : from common clock binding; allows overwrite default clock 17 - output names ("xtal") 18 - 19 - Example: 20 - pinctrl_nb: pinctrl-nb@13800 { 21 - compatible = "armada3710-nb-pinctrl", "syscon", "simple-mfd"; 22 - reg = <0x13800 0x100>, <0x13C00 0x20>; 23 - 24 - xtalclk: xtal-clk { 25 - compatible = "marvell,armada-3700-xtal-clock"; 26 - clock-output-names = "xtal"; 27 - #clock-cells = <0>; 28 - }; 29 - };
-3
Documentation/devicetree/bindings/mfd/syscon-common.yaml
··· 35 35 minItems: 2 36 36 maxItems: 5 # Should be enough 37 37 38 - reg: 39 - maxItems: 1 40 - 41 38 reg-io-width: 42 39 description: 43 40 The size (in bytes) of the IO accesses that should be performed
-195
Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt
··· 1 - * Marvell Armada 37xx SoC pin and gpio controller 2 - 3 - Each Armada 37xx SoC come with two pin and gpio controller one for the 4 - south bridge and the other for the north bridge. 5 - 6 - Inside this set of register the gpio latch allows exposing some 7 - configuration of the SoC and especially the clock frequency of the 8 - xtal. Hence, this node is a represent as syscon allowing sharing the 9 - register between multiple hardware block. 10 - 11 - GPIO and pin controller: 12 - ------------------------ 13 - 14 - Main node: 15 - 16 - Refer to pinctrl-bindings.txt in this directory for details of the 17 - common pinctrl bindings used by client devices, including the meaning 18 - of the phrase "pin configuration node". 19 - 20 - Required properties for pinctrl driver: 21 - 22 - - compatible: "marvell,armada3710-sb-pinctrl", "syscon, "simple-mfd" 23 - for the south bridge 24 - "marvell,armada3710-nb-pinctrl", "syscon, "simple-mfd" 25 - for the north bridge 26 - - reg: The first set of register are for pinctrl/gpio and the second 27 - set for the interrupt controller 28 - - interrupts: list of the interrupt use by the gpio 29 - 30 - Available groups and functions for the North bridge: 31 - 32 - group: jtag 33 - - pins 20-24 34 - - functions jtag, gpio 35 - 36 - group sdio0 37 - - pins 8-10 38 - - functions sdio, gpio 39 - 40 - group emmc_nb 41 - - pins 27-35 42 - - functions emmc, gpio 43 - 44 - group pwm0 45 - - pin 11 (GPIO1-11) 46 - - functions pwm, led, gpio 47 - 48 - group pwm1 49 - - pin 12 50 - - functions pwm, led, gpio 51 - 52 - group pwm2 53 - - pin 13 54 - - functions pwm, led, gpio 55 - 56 - group pwm3 57 - - pin 14 58 - - functions pwm, led, gpio 59 - 60 - group pmic1 61 - - pin 7 62 - - functions pmic, gpio 63 - 64 - group pmic0 65 - - pin 6 66 - - functions pmic, gpio 67 - 68 - group i2c2 69 - - pins 2-3 70 - - functions i2c, gpio 71 - 72 - group i2c1 73 - - pins 0-1 74 - - functions i2c, gpio 75 - 76 - group spi_cs1 77 - - pin 17 78 - - functions spi, gpio 79 - 80 - group spi_cs2 81 - - pin 18 82 - - functions spi, gpio 83 - 84 - group spi_cs3 85 - - pin 19 86 - - functions spi, gpio 87 - 88 - group onewire 89 - - pin 4 90 - - functions onewire, gpio 91 - 92 - group uart1 93 - - pins 25-26 94 - - functions uart, gpio 95 - 96 - group spi_quad 97 - - pins 15-16 98 - - functions spi, gpio 99 - 100 - group uart2 101 - - pins 9-10 and 18-19 102 - - functions uart, gpio 103 - 104 - Available groups and functions for the South bridge: 105 - 106 - group usb32_drvvbus0 107 - - pin 36 108 - - functions drvbus, gpio 109 - 110 - group usb2_drvvbus1 111 - - pin 37 112 - - functions drvbus, gpio 113 - 114 - group sdio_sb 115 - - pins 60-65 116 - - functions sdio, gpio 117 - 118 - group rgmii 119 - - pins 42-53 120 - - functions mii, gpio 121 - 122 - group pcie1 123 - - pins 39 124 - - functions pcie, gpio 125 - 126 - group pcie1_clkreq 127 - - pins 40 128 - - functions pcie, gpio 129 - 130 - group pcie1_wakeup 131 - - pins 41 132 - - functions pcie, gpio 133 - 134 - group smi 135 - - pins 54-55 136 - - functions smi, gpio 137 - 138 - group ptp 139 - - pins 56 140 - - functions ptp, gpio 141 - 142 - group ptp_clk 143 - - pin 57 144 - - functions ptp, mii 145 - 146 - group ptp_trig 147 - - pin 58 148 - - functions ptp, mii 149 - 150 - group mii_col 151 - - pin 59 152 - - functions mii, mii_err 153 - 154 - GPIO subnode: 155 - 156 - Please refer to gpio.txt in this directory for details of gpio-ranges property 157 - and the common GPIO bindings used by client devices. 158 - 159 - Required properties for gpio driver under the gpio subnode: 160 - - interrupts: List of interrupt specifier for the controllers interrupt. 161 - - gpio-controller: Marks the device node as a gpio controller. 162 - - #gpio-cells: Should be 2. The first cell is the GPIO number and the 163 - second cell specifies GPIO flags, as defined in 164 - <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and 165 - GPIO_ACTIVE_LOW flags are supported. 166 - - gpio-ranges: Range of pins managed by the GPIO controller. 167 - 168 - Xtal Clock bindings for Marvell Armada 37xx SoCs 169 - ------------------------------------------------ 170 - 171 - see Documentation/devicetree/bindings/clock/armada3700-xtal-clock.txt 172 - 173 - 174 - Example: 175 - pinctrl_sb: pinctrl-sb@18800 { 176 - compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd"; 177 - reg = <0x18800 0x100>, <0x18C00 0x20>; 178 - gpio { 179 - #gpio-cells = <2>; 180 - gpio-ranges = <&pinctrl_sb 0 0 29>; 181 - gpio-controller; 182 - interrupts = 183 - <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 184 - <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>, 185 - <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>, 186 - <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, 187 - <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; 188 - }; 189 - 190 - rgmii_pins: mii-pins { 191 - groups = "rgmii"; 192 - function = "mii"; 193 - }; 194 - 195 - };
+124
Documentation/devicetree/bindings/pinctrl/marvell,armada3710-xb-pinctrl.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/pinctrl/marvell,armada3710-xb-pinctrl.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell Armada 37xx SoC pin and gpio controller 8 + 9 + maintainers: 10 + - Gregory CLEMENT <gregory.clement@bootlin.com> 11 + - Marek Behún <kabel@kernel.org> 12 + - Miquel Raynal <miquel.raynal@bootlin.com> 13 + 14 + description: > 15 + Each Armada 37xx SoC come with two pin and gpio controller one for the south 16 + bridge and the other for the north bridge. 17 + 18 + Inside this set of register the gpio latch allows exposing some configuration 19 + of the SoC and especially the clock frequency of the xtal. Hence, this node is 20 + a represent as syscon allowing sharing the register between multiple hardware 21 + block. 22 + 23 + properties: 24 + compatible: 25 + items: 26 + - enum: 27 + - marvell,armada3710-sb-pinctrl 28 + - marvell,armada3710-nb-pinctrl 29 + - const: syscon 30 + - const: simple-mfd 31 + 32 + reg: 33 + items: 34 + - description: pinctrl and GPIO controller registers 35 + - description: interrupt controller registers 36 + 37 + gpio: 38 + description: GPIO controller subnode 39 + type: object 40 + additionalProperties: false 41 + 42 + properties: 43 + '#gpio-cells': 44 + const: 2 45 + 46 + gpio-controller: true 47 + 48 + gpio-ranges: 49 + description: Range of pins managed by the GPIO controller 50 + 51 + '#interrupt-cells': 52 + const: 2 53 + 54 + interrupt-controller: true 55 + 56 + interrupts: 57 + description: List of interrupt specifiers for the GPIO controller 58 + 59 + required: 60 + - '#gpio-cells' 61 + - gpio-ranges 62 + - gpio-controller 63 + - '#interrupt-cells' 64 + - interrupt-controller 65 + - interrupts 66 + 67 + xtal-clk: 68 + type: object 69 + additionalProperties: false 70 + 71 + properties: 72 + compatible: 73 + const: marvell,armada-3700-xtal-clock 74 + 75 + '#clock-cells': 76 + const: 0 77 + 78 + clock-output-names: true 79 + 80 + patternProperties: 81 + '-pins$': 82 + $ref: pinmux-node.yaml# 83 + additionalProperties: false 84 + 85 + properties: 86 + groups: 87 + enum: [ emmc_nb, i2c1, i2c2, jtag, mii_col, onewire, pcie1, 88 + pcie1_clkreq, pcie1_wakeup, pmic0, pmic1, ptp, ptp_clk, 89 + ptp_trig, pwm0, pwm1, pwm2, pwm3, rgmii, sdio0, sdio_sb, smi, 90 + spi_cs1, spi_cs2, spi_cs3, spi_quad, uart1, uart2, 91 + usb2_drvvbus1, usb32_drvvbus ] 92 + 93 + function: 94 + enum: [ drvbus, emmc, gpio, i2c, jtag, led, mii, mii_err, onewire, 95 + pcie, pmic, ptp, pwm, sdio, smi, spi, uart ] 96 + 97 + required: 98 + - compatible 99 + - reg 100 + 101 + additionalProperties: false 102 + 103 + examples: 104 + - | 105 + #include <dt-bindings/interrupt-controller/arm-gic.h> 106 + 107 + pinctrl_sb: pinctrl@18800 { 108 + compatible = "marvell,armada3710-sb-pinctrl", "syscon", "simple-mfd"; 109 + reg = <0x18800 0x100>, <0x18C00 0x20>; 110 + 111 + gpio { 112 + #gpio-cells = <2>; 113 + gpio-ranges = <&pinctrl_sb 0 0 29>; 114 + gpio-controller; 115 + #interrupt-cells = <2>; 116 + interrupt-controller; 117 + interrupts = 118 + <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 119 + <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>, 120 + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>, 121 + <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>, 122 + <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; 123 + }; 124 + };