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