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 brcm,bcm2835-gpio to DT schema

Convert the Broadcom BCM2835 GPIO (and pinmux) controller binding to DT
schema format.

The structure of the child nodes wasn't well defined. The schema is
based on the .dts users. The legacy binding is a single level of child
nodes while the standard binding is 2 levels of child nodes.

The "all banks" interrupt is treated as optional following actual users.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/20250812203337.731648-1-robh@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Rob Herring (Arm) and committed by
Linus Walleij
2b31c1c7 d8c2a9ed

+120 -99
-99
Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
··· 1 - Broadcom BCM2835 GPIO (and pinmux) controller 2 - 3 - The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt 4 - controller, and pinmux/control device. 5 - 6 - Required properties: 7 - - compatible: "brcm,bcm2835-gpio" 8 - - compatible: should be one of: 9 - "brcm,bcm2835-gpio" - BCM2835 compatible pinctrl 10 - "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl 11 - "brcm,bcm2711-gpio" - BCM2711 compatible pinctrl 12 - "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl 13 - - reg: Should contain the physical address of the GPIO module's registers. 14 - - gpio-controller: Marks the device node as a GPIO controller. 15 - - #gpio-cells : Should be two. The first cell is the pin number and the 16 - second cell is used to specify optional parameters: 17 - - bit 0 specifies polarity (0 for normal, 1 for inverted) 18 - - interrupts : The interrupt outputs from the controller. One interrupt per 19 - individual bank followed by the "all banks" interrupt. For BCM7211, an 20 - additional set of per-bank interrupt line and an "all banks" wake-up 21 - interrupt may be specified. 22 - - interrupt-controller: Marks the device node as an interrupt controller. 23 - - #interrupt-cells : Should be 2. 24 - The first cell is the GPIO number. 25 - The second cell is used to specify flags: 26 - bits[3:0] trigger type and level flags: 27 - 1 = low-to-high edge triggered. 28 - 2 = high-to-low edge triggered. 29 - 4 = active high level-sensitive. 30 - 8 = active low level-sensitive. 31 - Valid combinations are 1, 2, 3, 4, 8. 32 - 33 - Please refer to ../gpio/gpio.txt for a general description of GPIO bindings. 34 - 35 - Please refer to pinctrl-bindings.txt in this directory for details of the 36 - common pinctrl bindings used by client devices, including the meaning of the 37 - phrase "pin configuration node". 38 - 39 - Each pin configuration node lists the pin(s) to which it applies, and one or 40 - more of the mux function to select on those pin(s), and pull-up/down 41 - configuration. Each subnode only affects those parameters that are explicitly 42 - listed. In other words, a subnode that lists only a mux function implies no 43 - information about any pull configuration. Similarly, a subnode that lists only 44 - a pul parameter implies no information about the mux function. 45 - 46 - The BCM2835 pin configuration and multiplexing supports the generic bindings. 47 - For details on each properties, you can refer to ./pinctrl-bindings.txt. 48 - 49 - Required sub-node properties: 50 - - pins 51 - - function 52 - 53 - Optional sub-node properties: 54 - - bias-disable 55 - - bias-pull-up 56 - - bias-pull-down 57 - - output-high 58 - - output-low 59 - 60 - Legacy pin configuration and multiplexing binding: 61 - *** (Its use is deprecated, use generic multiplexing and configuration 62 - bindings instead) 63 - 64 - Required subnode-properties: 65 - - brcm,pins: An array of cells. Each cell contains the ID of a pin. Valid IDs 66 - are the integer GPIO IDs; 0==GPIO0, 1==GPIO1, ... 53==GPIO53. 67 - 68 - Optional subnode-properties: 69 - - brcm,function: Integer, containing the function to mux to the pin(s): 70 - 0: GPIO in 71 - 1: GPIO out 72 - 2: alt5 73 - 3: alt4 74 - 4: alt0 75 - 5: alt1 76 - 6: alt2 77 - 7: alt3 78 - - brcm,pull: Integer, representing the pull-down/up to apply to the pin(s): 79 - 0: none 80 - 1: down 81 - 2: up 82 - 83 - Each of brcm,function and brcm,pull may contain either a single value which 84 - will be applied to all pins in brcm,pins, or 1 value for each entry in 85 - brcm,pins. 86 - 87 - Example: 88 - 89 - gpio: gpio { 90 - compatible = "brcm,bcm2835-gpio"; 91 - reg = <0x2200000 0xb4>; 92 - interrupts = <2 17>, <2 19>, <2 18>, <2 20>; 93 - 94 - gpio-controller; 95 - #gpio-cells = <2>; 96 - 97 - interrupt-controller; 98 - #interrupt-cells = <2>; 99 - };
+120
Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.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/brcm,bcm2835-gpio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Broadcom BCM2835 GPIO (and pinmux) controller 8 + 9 + maintainers: 10 + - Florian Fainelli <f.fainelli@gmail.com> 11 + 12 + description: > 13 + The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt 14 + controller, and pinmux/control device. 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - brcm,bcm2835-gpio 20 + - brcm,bcm2711-gpio 21 + - brcm,bcm7211-gpio 22 + 23 + reg: 24 + maxItems: 1 25 + 26 + '#gpio-cells': 27 + const: 2 28 + 29 + gpio-controller: true 30 + gpio-ranges: true 31 + gpio-line-names: true 32 + 33 + interrupts: 34 + description: > 35 + Interrupt outputs: one per bank, then the combined “all banks” line. 36 + BCM7211 may specify up to four per-bank wake-up lines and one combined 37 + wake-up interrupt. 38 + minItems: 4 39 + maxItems: 10 40 + 41 + '#interrupt-cells': 42 + const: 2 43 + 44 + interrupt-controller: true 45 + 46 + additionalProperties: 47 + oneOf: 48 + - type: object 49 + additionalProperties: false 50 + 51 + patternProperties: 52 + '^pins?-': 53 + type: object 54 + allOf: 55 + - $ref: /schemas/pinctrl/pincfg-node.yaml# 56 + - $ref: /schemas/pinctrl/pinmux-node.yaml# 57 + additionalProperties: false 58 + 59 + properties: 60 + pins: true 61 + function: true 62 + bias-disable: true 63 + bias-pull-up: true 64 + bias-pull-down: true 65 + output-high: true 66 + output-low: true 67 + 68 + required: 69 + - pins 70 + - function 71 + 72 + - type: object 73 + additionalProperties: false 74 + deprecated: true 75 + 76 + properties: 77 + brcm,pins: 78 + description: 79 + GPIO pin numbers for legacy configuration. 80 + $ref: /schemas/types.yaml#/definitions/uint32-array 81 + 82 + brcm,function: 83 + description: 84 + Legacy mux function for the pins (0=input, 1=output, 2–7=alt functions). 85 + $ref: /schemas/types.yaml#/definitions/uint32-array 86 + maximum: 7 87 + 88 + brcm,pull: 89 + description: > 90 + Legacy pull setting for the pins (0=none, 1=pull-down, 2=pull-up). 91 + $ref: /schemas/types.yaml#/definitions/uint32-array 92 + maximum: 2 93 + 94 + required: 95 + - brcm,pins 96 + 97 + allOf: 98 + - if: 99 + properties: 100 + compatible: 101 + contains: 102 + enum: 103 + - brcm,bcm2835-gpio 104 + - brcm,bcm2711-gpio 105 + then: 106 + properties: 107 + interrupts: 108 + maxItems: 5 109 + 110 + examples: 111 + - | 112 + gpio@2200000 { 113 + compatible = "brcm,bcm2835-gpio"; 114 + reg = <0x2200000 0xb4>; 115 + interrupts = <2 17>, <2 19>, <2 18>, <2 20>, <2 21>; 116 + #gpio-cells = <2>; 117 + gpio-controller; 118 + #interrupt-cells = <2>; 119 + interrupt-controller; 120 + };