1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2b97ee269SEmmanuel Vadot%YAML 1.2 3b97ee269SEmmanuel Vadot--- 4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/gpio-mvebu.yaml# 5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6b97ee269SEmmanuel Vadot 7b97ee269SEmmanuel Vadottitle: Marvell EBU GPIO controller 8b97ee269SEmmanuel Vadot 9b97ee269SEmmanuel Vadotmaintainers: 10b97ee269SEmmanuel Vadot - Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 11b97ee269SEmmanuel Vadot - Andrew Lunn <andrew@lunn.ch> 12b97ee269SEmmanuel Vadot 13b97ee269SEmmanuel Vadotproperties: 14b97ee269SEmmanuel Vadot compatible: 15b97ee269SEmmanuel Vadot oneOf: 16b97ee269SEmmanuel Vadot - enum: 17b97ee269SEmmanuel Vadot - marvell,armada-8k-gpio 18b97ee269SEmmanuel Vadot - marvell,orion-gpio 19b97ee269SEmmanuel Vadot 20b97ee269SEmmanuel Vadot - items: 21b97ee269SEmmanuel Vadot - enum: 22b97ee269SEmmanuel Vadot - marvell,mv78200-gpio 23b97ee269SEmmanuel Vadot - marvell,armada-370-gpio 24b97ee269SEmmanuel Vadot - const: marvell,orion-gpio 25b97ee269SEmmanuel Vadot 26b97ee269SEmmanuel Vadot - description: Deprecated binding 27b97ee269SEmmanuel Vadot items: 28b97ee269SEmmanuel Vadot - const: marvell,armadaxp-gpio 29b97ee269SEmmanuel Vadot - const: marvell,orion-gpio 30b97ee269SEmmanuel Vadot deprecated: true 31b97ee269SEmmanuel Vadot 32b97ee269SEmmanuel Vadot reg: 33b97ee269SEmmanuel Vadot description: | 34b97ee269SEmmanuel Vadot Address and length of the register set for the device. Not used for 35b97ee269SEmmanuel Vadot marvell,armada-8k-gpio. 36b97ee269SEmmanuel Vadot 37b97ee269SEmmanuel Vadot A second entry can be provided, for the PWM function using the GPIO Blink 38b97ee269SEmmanuel Vadot Counter on/off registers. 39b97ee269SEmmanuel Vadot minItems: 1 40b97ee269SEmmanuel Vadot maxItems: 2 41b97ee269SEmmanuel Vadot 42b97ee269SEmmanuel Vadot reg-names: 43b97ee269SEmmanuel Vadot items: 44b97ee269SEmmanuel Vadot - const: gpio 45b97ee269SEmmanuel Vadot - const: pwm 46b97ee269SEmmanuel Vadot minItems: 1 47b97ee269SEmmanuel Vadot 48b97ee269SEmmanuel Vadot offset: 49b97ee269SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 50b97ee269SEmmanuel Vadot description: Offset in the register map for the gpio registers (in bytes) 51b97ee269SEmmanuel Vadot 52b97ee269SEmmanuel Vadot interrupts: 53b97ee269SEmmanuel Vadot description: | 54b97ee269SEmmanuel Vadot The list of interrupts that are used for all the pins managed by this 55b97ee269SEmmanuel Vadot GPIO bank. There can be more than one interrupt (example: 1 interrupt 56b97ee269SEmmanuel Vadot per 8 pins on Armada XP, which means 4 interrupts per bank of 32 57b97ee269SEmmanuel Vadot GPIOs). 58b97ee269SEmmanuel Vadot minItems: 1 59b97ee269SEmmanuel Vadot maxItems: 4 60b97ee269SEmmanuel Vadot 61b97ee269SEmmanuel Vadot interrupt-controller: true 62b97ee269SEmmanuel Vadot 63b97ee269SEmmanuel Vadot "#interrupt-cells": 64b97ee269SEmmanuel Vadot const: 2 65b97ee269SEmmanuel Vadot 66b97ee269SEmmanuel Vadot gpio-controller: true 67b97ee269SEmmanuel Vadot 68b97ee269SEmmanuel Vadot ngpios: 69b97ee269SEmmanuel Vadot minimum: 1 70b97ee269SEmmanuel Vadot maximum: 32 71b97ee269SEmmanuel Vadot 72b97ee269SEmmanuel Vadot "#gpio-cells": 73b97ee269SEmmanuel Vadot const: 2 74b97ee269SEmmanuel Vadot 75b97ee269SEmmanuel Vadot marvell,pwm-offset: 76b97ee269SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 77b97ee269SEmmanuel Vadot description: Offset in the register map for the pwm registers (in bytes) 78b97ee269SEmmanuel Vadot 79b97ee269SEmmanuel Vadot "#pwm-cells": 80b97ee269SEmmanuel Vadot description: 81b97ee269SEmmanuel Vadot The first cell is the GPIO line number. The second cell is the period 82b97ee269SEmmanuel Vadot in nanoseconds. 83b97ee269SEmmanuel Vadot const: 2 84b97ee269SEmmanuel Vadot 85b97ee269SEmmanuel Vadot clocks: 86b97ee269SEmmanuel Vadot description: 87b97ee269SEmmanuel Vadot Clock(s) used for PWM function. 88b97ee269SEmmanuel Vadot items: 89b97ee269SEmmanuel Vadot - description: Core clock 90b97ee269SEmmanuel Vadot - description: AXI bus clock 91b97ee269SEmmanuel Vadot minItems: 1 92b97ee269SEmmanuel Vadot 93b97ee269SEmmanuel Vadot clock-names: 94b97ee269SEmmanuel Vadot items: 95b97ee269SEmmanuel Vadot - const: core 96b97ee269SEmmanuel Vadot - const: axi 97b97ee269SEmmanuel Vadot minItems: 1 98b97ee269SEmmanuel Vadot 99b97ee269SEmmanuel Vadotrequired: 100b97ee269SEmmanuel Vadot - compatible 101b97ee269SEmmanuel Vadot - gpio-controller 102b97ee269SEmmanuel Vadot - ngpios 103b97ee269SEmmanuel Vadot - "#gpio-cells" 104b97ee269SEmmanuel Vadot 105b97ee269SEmmanuel VadotallOf: 106b97ee269SEmmanuel Vadot - if: 107b97ee269SEmmanuel Vadot properties: 108b97ee269SEmmanuel Vadot compatible: 109b97ee269SEmmanuel Vadot contains: 110b97ee269SEmmanuel Vadot const: marvell,armada-8k-gpio 111b97ee269SEmmanuel Vadot then: 112b97ee269SEmmanuel Vadot required: 113b97ee269SEmmanuel Vadot - offset 114b97ee269SEmmanuel Vadot else: 115b97ee269SEmmanuel Vadot required: 116b97ee269SEmmanuel Vadot - reg 117b97ee269SEmmanuel Vadot 118*01950c46SEmmanuel VadotunevaluatedProperties: false 119b97ee269SEmmanuel Vadot 120b97ee269SEmmanuel Vadotexamples: 121b97ee269SEmmanuel Vadot - | 122b97ee269SEmmanuel Vadot gpio@d0018100 { 123b97ee269SEmmanuel Vadot compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio"; 124b97ee269SEmmanuel Vadot reg = <0xd0018100 0x40>, <0xd0018800 0x30>; 125b97ee269SEmmanuel Vadot ngpios = <32>; 126b97ee269SEmmanuel Vadot gpio-controller; 127b97ee269SEmmanuel Vadot #gpio-cells = <2>; 128b97ee269SEmmanuel Vadot interrupt-controller; 129b97ee269SEmmanuel Vadot #interrupt-cells = <2>; 130b97ee269SEmmanuel Vadot interrupts = <16>, <17>, <18>, <19>; 131b97ee269SEmmanuel Vadot }; 132b97ee269SEmmanuel Vadot 133b97ee269SEmmanuel Vadot - | 134b97ee269SEmmanuel Vadot gpio@18140 { 135b97ee269SEmmanuel Vadot compatible = "marvell,armada-370-gpio", "marvell,orion-gpio"; 136b97ee269SEmmanuel Vadot reg = <0x18140 0x40>, <0x181c8 0x08>; 137b97ee269SEmmanuel Vadot reg-names = "gpio", "pwm"; 138b97ee269SEmmanuel Vadot ngpios = <17>; 139b97ee269SEmmanuel Vadot gpio-controller; 140b97ee269SEmmanuel Vadot #gpio-cells = <2>; 141b97ee269SEmmanuel Vadot #pwm-cells = <2>; 142b97ee269SEmmanuel Vadot interrupt-controller; 143b97ee269SEmmanuel Vadot #interrupt-cells = <2>; 144b97ee269SEmmanuel Vadot interrupts = <87>, <88>, <89>; 145b97ee269SEmmanuel Vadot clocks = <&coreclk 0>; 146b97ee269SEmmanuel Vadot }; 147