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