1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/pinctrl/apple,pinctrl.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Apple GPIO controller 8 9maintainers: 10 - Mark Kettenis <kettenis@openbsd.org> 11 12description: | 13 The Apple GPIO controller is a simple combined pin and GPIO 14 controller present on Apple ARM SoC platforms, including various 15 iPhone and iPad devices and the "Apple Silicon" Macs. 16 17properties: 18 compatible: 19 oneOf: 20 - items: 21 - enum: 22 - apple,t6020-pinctrl 23 - apple,t6030-pinctrl 24 - apple,t6031-pinctrl 25 - apple,t8122-pinctrl 26 - const: apple,t8103-pinctrl 27 - items: 28 # Do not add additional SoC to this list. 29 - enum: 30 - apple,s5l8960x-pinctrl 31 - apple,t7000-pinctrl 32 - apple,s8000-pinctrl 33 - apple,t8010-pinctrl 34 - apple,t8015-pinctrl 35 - apple,t8103-pinctrl 36 - apple,t8112-pinctrl 37 - apple,t6000-pinctrl 38 - const: apple,pinctrl 39 40 reg: 41 maxItems: 1 42 43 clocks: 44 maxItems: 1 45 46 gpio-controller: true 47 48 '#gpio-cells': 49 const: 2 50 51 gpio-ranges: 52 maxItems: 1 53 54 apple,npins: 55 $ref: /schemas/types.yaml#/definitions/uint32 56 description: The number of pins in this GPIO controller. 57 58 interrupts: 59 description: One interrupt for each of the (up to 7) interrupt 60 groups supported by the controller sorted by interrupt group 61 number in ascending order. 62 minItems: 1 63 maxItems: 7 64 65 interrupt-controller: true 66 67 '#interrupt-cells': 68 const: 2 69 70 power-domains: 71 maxItems: 1 72 73patternProperties: 74 '-pins$': 75 type: object 76 $ref: pinmux-node.yaml# 77 78 properties: 79 pinmux: 80 description: 81 Values are constructed from pin number and alternate function 82 configuration number using the APPLE_PINMUX() helper macro 83 defined in include/dt-bindings/pinctrl/apple.h. 84 85 required: 86 - pinmux 87 88 additionalProperties: false 89 90allOf: 91 - $ref: pinctrl.yaml# 92 93required: 94 - compatible 95 - reg 96 - gpio-controller 97 - '#gpio-cells' 98 - gpio-ranges 99 - apple,npins 100 101additionalProperties: false 102 103examples: 104 - | 105 #include <dt-bindings/interrupt-controller/apple-aic.h> 106 #include <dt-bindings/pinctrl/apple.h> 107 108 soc { 109 #address-cells = <2>; 110 #size-cells = <2>; 111 112 pinctrl: pinctrl@23c100000 { 113 compatible = "apple,t8103-pinctrl", "apple,pinctrl"; 114 reg = <0x2 0x3c100000 0x0 0x100000>; 115 clocks = <&gpio_clk>; 116 117 gpio-controller; 118 #gpio-cells = <2>; 119 gpio-ranges = <&pinctrl 0 0 212>; 120 apple,npins = <212>; 121 122 interrupt-controller; 123 #interrupt-cells = <2>; 124 interrupt-parent = <&aic>; 125 interrupts = <AIC_IRQ 16 IRQ_TYPE_LEVEL_HIGH>, 126 <AIC_IRQ 17 IRQ_TYPE_LEVEL_HIGH>, 127 <AIC_IRQ 18 IRQ_TYPE_LEVEL_HIGH>, 128 <AIC_IRQ 19 IRQ_TYPE_LEVEL_HIGH>, 129 <AIC_IRQ 20 IRQ_TYPE_LEVEL_HIGH>, 130 <AIC_IRQ 21 IRQ_TYPE_LEVEL_HIGH>, 131 <AIC_IRQ 22 IRQ_TYPE_LEVEL_HIGH>; 132 133 pcie_pins: pcie-pins { 134 pinmux = <APPLE_PINMUX(150, 1)>, 135 <APPLE_PINMUX(151, 1)>, 136 <APPLE_PINMUX(32, 1)>; 137 }; 138 }; 139 }; 140