1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/ingenic,pinctrl.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Ingenic SoCs pin controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotdescription: > 10c66ec88fSEmmanuel Vadot Please refer to pinctrl-bindings.txt in this directory for details of the 11c66ec88fSEmmanuel Vadot common pinctrl bindings used by client devices, including the meaning of the 12c66ec88fSEmmanuel Vadot phrase "pin configuration node". 13c66ec88fSEmmanuel Vadot 14c66ec88fSEmmanuel Vadot For the Ingenic SoCs, pin control is tightly bound with GPIO ports. All pins 15c66ec88fSEmmanuel Vadot may be used as GPIOs, multiplexed device functions are configured within the 16c66ec88fSEmmanuel Vadot GPIO port configuration registers and it is typical to refer to pins using the 17c66ec88fSEmmanuel Vadot naming scheme "PxN" where x is a character identifying the GPIO port with 18c66ec88fSEmmanuel Vadot which the pin is associated and N is an integer from 0 to 31 identifying the 19c66ec88fSEmmanuel Vadot pin within that GPIO port. For example PA0 is the first pin in GPIO port A, 202eb4d8dcSEmmanuel Vadot and PB31 is the last pin in GPIO port B. The JZ4730, the JZ4740, the JZ4725B, 212eb4d8dcSEmmanuel Vadot the X1000 and the X1830 contains 4 GPIO ports, PA to PD, for a total of 128 22354d7675SEmmanuel Vadot pins. The X2000 and the X2100 contains 5 GPIO ports, PA to PE, for a total of 23354d7675SEmmanuel Vadot 160 pins. The JZ4750, the JZ4755 the JZ4760, the JZ4770 and the JZ4780 contains 24354d7675SEmmanuel Vadot 6 GPIO ports, PA to PF, for a total of 192 pins. The JZ4775 contains 7 GPIO 25354d7675SEmmanuel Vadot ports, PA to PG, for a total of 224 pins. 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadotmaintainers: 28c66ec88fSEmmanuel Vadot - Paul Cercueil <paul@crapouillou.net> 29c66ec88fSEmmanuel Vadot 30c66ec88fSEmmanuel Vadotproperties: 31c66ec88fSEmmanuel Vadot compatible: 32c66ec88fSEmmanuel Vadot oneOf: 33c66ec88fSEmmanuel Vadot - enum: 342eb4d8dcSEmmanuel Vadot - ingenic,jz4730-pinctrl 35c66ec88fSEmmanuel Vadot - ingenic,jz4740-pinctrl 36c66ec88fSEmmanuel Vadot - ingenic,jz4725b-pinctrl 372eb4d8dcSEmmanuel Vadot - ingenic,jz4750-pinctrl 382eb4d8dcSEmmanuel Vadot - ingenic,jz4755-pinctrl 39c66ec88fSEmmanuel Vadot - ingenic,jz4760-pinctrl 40c66ec88fSEmmanuel Vadot - ingenic,jz4770-pinctrl 412eb4d8dcSEmmanuel Vadot - ingenic,jz4775-pinctrl 42c66ec88fSEmmanuel Vadot - ingenic,jz4780-pinctrl 43c66ec88fSEmmanuel Vadot - ingenic,x1000-pinctrl 44c66ec88fSEmmanuel Vadot - ingenic,x1500-pinctrl 45c66ec88fSEmmanuel Vadot - ingenic,x1830-pinctrl 462eb4d8dcSEmmanuel Vadot - ingenic,x2000-pinctrl 47354d7675SEmmanuel Vadot - ingenic,x2100-pinctrl 48c66ec88fSEmmanuel Vadot - items: 49c66ec88fSEmmanuel Vadot - const: ingenic,jz4760b-pinctrl 50c66ec88fSEmmanuel Vadot - const: ingenic,jz4760-pinctrl 51c66ec88fSEmmanuel Vadot - items: 52c66ec88fSEmmanuel Vadot - const: ingenic,x1000e-pinctrl 53c66ec88fSEmmanuel Vadot - const: ingenic,x1000-pinctrl 542eb4d8dcSEmmanuel Vadot - items: 552eb4d8dcSEmmanuel Vadot - const: ingenic,x2000e-pinctrl 562eb4d8dcSEmmanuel Vadot - const: ingenic,x2000-pinctrl 57c66ec88fSEmmanuel Vadot 58c66ec88fSEmmanuel Vadot reg: 59c66ec88fSEmmanuel Vadot maxItems: 1 60c66ec88fSEmmanuel Vadot 61c66ec88fSEmmanuel Vadot "#address-cells": 62c66ec88fSEmmanuel Vadot const: 1 63c66ec88fSEmmanuel Vadot 64c66ec88fSEmmanuel Vadot "#size-cells": 65c66ec88fSEmmanuel Vadot const: 0 66c66ec88fSEmmanuel Vadot 67c66ec88fSEmmanuel VadotpatternProperties: 68c66ec88fSEmmanuel Vadot "^gpio@[0-9]$": 69c66ec88fSEmmanuel Vadot type: object 70c66ec88fSEmmanuel Vadot properties: 71c66ec88fSEmmanuel Vadot compatible: 72c66ec88fSEmmanuel Vadot enum: 732eb4d8dcSEmmanuel Vadot - ingenic,jz4730-gpio 74c66ec88fSEmmanuel Vadot - ingenic,jz4740-gpio 75c66ec88fSEmmanuel Vadot - ingenic,jz4725b-gpio 762eb4d8dcSEmmanuel Vadot - ingenic,jz4750-gpio 772eb4d8dcSEmmanuel Vadot - ingenic,jz4755-gpio 78c66ec88fSEmmanuel Vadot - ingenic,jz4760-gpio 79c66ec88fSEmmanuel Vadot - ingenic,jz4770-gpio 802eb4d8dcSEmmanuel Vadot - ingenic,jz4775-gpio 81c66ec88fSEmmanuel Vadot - ingenic,jz4780-gpio 82c66ec88fSEmmanuel Vadot - ingenic,x1000-gpio 83c66ec88fSEmmanuel Vadot - ingenic,x1500-gpio 84c66ec88fSEmmanuel Vadot - ingenic,x1830-gpio 852eb4d8dcSEmmanuel Vadot - ingenic,x2000-gpio 86354d7675SEmmanuel Vadot - ingenic,x2100-gpio 87c66ec88fSEmmanuel Vadot 88c66ec88fSEmmanuel Vadot reg: 89c66ec88fSEmmanuel Vadot items: 90c66ec88fSEmmanuel Vadot - description: The GPIO bank number 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel Vadot gpio-controller: true 93c66ec88fSEmmanuel Vadot 94c66ec88fSEmmanuel Vadot "#gpio-cells": 95c66ec88fSEmmanuel Vadot const: 2 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot gpio-ranges: 98c66ec88fSEmmanuel Vadot maxItems: 1 99c66ec88fSEmmanuel Vadot 100c66ec88fSEmmanuel Vadot interrupt-controller: true 101c66ec88fSEmmanuel Vadot 102c66ec88fSEmmanuel Vadot "#interrupt-cells": 103c66ec88fSEmmanuel Vadot const: 2 104c66ec88fSEmmanuel Vadot description: 105c66ec88fSEmmanuel Vadot Refer to ../interrupt-controller/interrupts.txt for more details. 106c66ec88fSEmmanuel Vadot 107c66ec88fSEmmanuel Vadot interrupts: 108c66ec88fSEmmanuel Vadot maxItems: 1 109c66ec88fSEmmanuel Vadot 110c66ec88fSEmmanuel Vadot required: 111c66ec88fSEmmanuel Vadot - compatible 112c66ec88fSEmmanuel Vadot - reg 113c66ec88fSEmmanuel Vadot - gpio-controller 114c66ec88fSEmmanuel Vadot - "#gpio-cells" 115c66ec88fSEmmanuel Vadot - interrupts 116c66ec88fSEmmanuel Vadot - interrupt-controller 117c66ec88fSEmmanuel Vadot - "#interrupt-cells" 118c66ec88fSEmmanuel Vadot 119c66ec88fSEmmanuel Vadot additionalProperties: false 120c66ec88fSEmmanuel Vadot 121e67e8565SEmmanuel VadotallOf: 122*fac71e4eSEmmanuel Vadot - $ref: pinctrl.yaml# 123e67e8565SEmmanuel Vadot 124c66ec88fSEmmanuel Vadotrequired: 125c66ec88fSEmmanuel Vadot - compatible 126c66ec88fSEmmanuel Vadot - reg 127c66ec88fSEmmanuel Vadot - "#address-cells" 128c66ec88fSEmmanuel Vadot - "#size-cells" 129c66ec88fSEmmanuel Vadot 130c66ec88fSEmmanuel VadotadditionalProperties: 131c66ec88fSEmmanuel Vadot anyOf: 132c66ec88fSEmmanuel Vadot - type: object 133c66ec88fSEmmanuel Vadot allOf: 134c66ec88fSEmmanuel Vadot - $ref: pincfg-node.yaml# 135c66ec88fSEmmanuel Vadot - $ref: pinmux-node.yaml# 136c66ec88fSEmmanuel Vadot 137c66ec88fSEmmanuel Vadot properties: 138c66ec88fSEmmanuel Vadot phandle: true 139c66ec88fSEmmanuel Vadot function: true 140c66ec88fSEmmanuel Vadot groups: true 141c66ec88fSEmmanuel Vadot pins: true 142c66ec88fSEmmanuel Vadot bias-disable: true 143c66ec88fSEmmanuel Vadot bias-pull-up: true 144c66ec88fSEmmanuel Vadot bias-pull-down: true 145c66ec88fSEmmanuel Vadot output-low: true 146c66ec88fSEmmanuel Vadot output-high: true 147c66ec88fSEmmanuel Vadot additionalProperties: false 148c66ec88fSEmmanuel Vadot 149c66ec88fSEmmanuel Vadot - type: object 150c66ec88fSEmmanuel Vadot properties: 151c66ec88fSEmmanuel Vadot phandle: true 152c66ec88fSEmmanuel Vadot additionalProperties: 153c66ec88fSEmmanuel Vadot type: object 154c66ec88fSEmmanuel Vadot allOf: 155c66ec88fSEmmanuel Vadot - $ref: pincfg-node.yaml# 156c66ec88fSEmmanuel Vadot - $ref: pinmux-node.yaml# 157c66ec88fSEmmanuel Vadot 158c66ec88fSEmmanuel Vadot properties: 159c66ec88fSEmmanuel Vadot phandle: true 160c66ec88fSEmmanuel Vadot function: true 161c66ec88fSEmmanuel Vadot groups: true 162c66ec88fSEmmanuel Vadot pins: true 163c66ec88fSEmmanuel Vadot bias-disable: true 164c66ec88fSEmmanuel Vadot bias-pull-up: true 165c66ec88fSEmmanuel Vadot bias-pull-down: true 166c66ec88fSEmmanuel Vadot output-low: true 167c66ec88fSEmmanuel Vadot output-high: true 168c66ec88fSEmmanuel Vadot additionalProperties: false 169c66ec88fSEmmanuel Vadot 170c66ec88fSEmmanuel Vadotexamples: 171c66ec88fSEmmanuel Vadot - | 172e67e8565SEmmanuel Vadot pinctrl@10010000 { 173c66ec88fSEmmanuel Vadot compatible = "ingenic,jz4770-pinctrl"; 174c66ec88fSEmmanuel Vadot reg = <0x10010000 0x600>; 175c66ec88fSEmmanuel Vadot 176c66ec88fSEmmanuel Vadot #address-cells = <1>; 177c66ec88fSEmmanuel Vadot #size-cells = <0>; 178c66ec88fSEmmanuel Vadot 179c66ec88fSEmmanuel Vadot gpio@0 { 180c66ec88fSEmmanuel Vadot compatible = "ingenic,jz4770-gpio"; 181c66ec88fSEmmanuel Vadot reg = <0>; 182c66ec88fSEmmanuel Vadot 183c66ec88fSEmmanuel Vadot gpio-controller; 184c66ec88fSEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 32>; 185c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 186c66ec88fSEmmanuel Vadot 187c66ec88fSEmmanuel Vadot interrupt-controller; 188c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 189c66ec88fSEmmanuel Vadot 190c66ec88fSEmmanuel Vadot interrupt-parent = <&intc>; 191c66ec88fSEmmanuel Vadot interrupts = <17>; 192c66ec88fSEmmanuel Vadot }; 193c66ec88fSEmmanuel Vadot }; 194