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