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 53patternProperties: 54 '-pins$': 55 type: object 56 $ref: pinmux-node.yaml# 57 58 properties: 59 pinmux: 60 description: 61 Values are constructed from pin number and alternate function 62 configuration number using the APPLE_PINMUX() helper macro 63 defined in include/dt-bindings/pinctrl/apple.h. 64 65 required: 66 - pinmux 67 68 additionalProperties: false 69 70required: 71 - compatible 72 - reg 73 - gpio-controller 74 - '#gpio-cells' 75 - gpio-ranges 76 - apple,npins 77 78additionalProperties: false 79 80examples: 81 - | 82 #include <dt-bindings/interrupt-controller/apple-aic.h> 83 #include <dt-bindings/pinctrl/apple.h> 84 85 soc { 86 #address-cells = <2>; 87 #size-cells = <2>; 88 89 pinctrl: pinctrl@23c100000 { 90 compatible = "apple,t8103-pinctrl", "apple,pinctrl"; 91 reg = <0x2 0x3c100000 0x0 0x100000>; 92 clocks = <&gpio_clk>; 93 94 gpio-controller; 95 #gpio-cells = <2>; 96 gpio-ranges = <&pinctrl 0 0 212>; 97 apple,npins = <212>; 98 99 interrupt-controller; 100 #interrupt-cells = <2>; 101 interrupt-parent = <&aic>; 102 interrupts = <AIC_IRQ 16 IRQ_TYPE_LEVEL_HIGH>, 103 <AIC_IRQ 17 IRQ_TYPE_LEVEL_HIGH>, 104 <AIC_IRQ 18 IRQ_TYPE_LEVEL_HIGH>, 105 <AIC_IRQ 19 IRQ_TYPE_LEVEL_HIGH>, 106 <AIC_IRQ 20 IRQ_TYPE_LEVEL_HIGH>, 107 <AIC_IRQ 21 IRQ_TYPE_LEVEL_HIGH>, 108 <AIC_IRQ 22 IRQ_TYPE_LEVEL_HIGH>; 109 110 pcie_pins: pcie-pins { 111 pinmux = <APPLE_PINMUX(150, 1)>, 112 <APPLE_PINMUX(151, 1)>, 113 <APPLE_PINMUX(32, 1)>; 114 }; 115 }; 116 }; 117