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