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