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 7title: Broadcom BCM2835 GPIO (and pinmux) controller 8 9maintainers: 10 - Florian Fainelli <f.fainelli@gmail.com> 11 12description: > 13 The BCM2835 GPIO module is a combined GPIO controller, (GPIO) interrupt 14 controller, and pinmux/control device. 15 16properties: 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 46additionalProperties: 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 97allOf: 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 110examples: 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 }; 121