1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*8bab661aSEmmanuel Vadot%YAML 1.2 3*8bab661aSEmmanuel Vadot--- 4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/gpio-latch.yaml# 5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8bab661aSEmmanuel Vadot 7*8bab661aSEmmanuel Vadottitle: GPIO latch controller 8*8bab661aSEmmanuel Vadot 9*8bab661aSEmmanuel Vadotmaintainers: 10*8bab661aSEmmanuel Vadot - Sascha Hauer <s.hauer@pengutronix.de> 11*8bab661aSEmmanuel Vadot 12*8bab661aSEmmanuel Vadotdescription: | 13*8bab661aSEmmanuel Vadot This binding describes a GPIO multiplexer based on latches connected to 14*8bab661aSEmmanuel Vadot other GPIOs, like this: 15*8bab661aSEmmanuel Vadot 16*8bab661aSEmmanuel Vadot CLK0 ----------------------. ,--------. 17*8bab661aSEmmanuel Vadot CLK1 -------------------. `--------|> #0 | 18*8bab661aSEmmanuel Vadot | | | 19*8bab661aSEmmanuel Vadot OUT0 ----------------+--|-----------|D0 Q0|-----|< 20*8bab661aSEmmanuel Vadot OUT1 --------------+-|--|-----------|D1 Q1|-----|< 21*8bab661aSEmmanuel Vadot OUT2 ------------+-|-|--|-----------|D2 Q2|-----|< 22*8bab661aSEmmanuel Vadot OUT3 ----------+-|-|-|--|-----------|D3 Q3|-----|< 23*8bab661aSEmmanuel Vadot OUT4 --------+-|-|-|-|--|-----------|D4 Q4|-----|< 24*8bab661aSEmmanuel Vadot OUT5 ------+-|-|-|-|-|--|-----------|D5 Q5|-----|< 25*8bab661aSEmmanuel Vadot OUT6 ----+-|-|-|-|-|-|--|-----------|D6 Q6|-----|< 26*8bab661aSEmmanuel Vadot OUT7 --+-|-|-|-|-|-|-|--|-----------|D7 Q7|-----|< 27*8bab661aSEmmanuel Vadot | | | | | | | | | `--------' 28*8bab661aSEmmanuel Vadot | | | | | | | | | 29*8bab661aSEmmanuel Vadot | | | | | | | | | ,--------. 30*8bab661aSEmmanuel Vadot | | | | | | | | `-----------|> #1 | 31*8bab661aSEmmanuel Vadot | | | | | | | | | | 32*8bab661aSEmmanuel Vadot | | | | | | | `--------------|D0 Q0|-----|< 33*8bab661aSEmmanuel Vadot | | | | | | `----------------|D1 Q1|-----|< 34*8bab661aSEmmanuel Vadot | | | | | `------------------|D2 Q2|-----|< 35*8bab661aSEmmanuel Vadot | | | | `--------------------|D3 Q3|-----|< 36*8bab661aSEmmanuel Vadot | | | `----------------------|D4 Q4|-----|< 37*8bab661aSEmmanuel Vadot | | `------------------------|D5 Q5|-----|< 38*8bab661aSEmmanuel Vadot | `--------------------------|D6 Q6|-----|< 39*8bab661aSEmmanuel Vadot `----------------------------|D7 Q7|-----|< 40*8bab661aSEmmanuel Vadot `--------' 41*8bab661aSEmmanuel Vadot 42*8bab661aSEmmanuel Vadot The number of clk-gpios and latched-gpios is not fixed. The actual number 43*8bab661aSEmmanuel Vadot of number of latches and the number of inputs per latch is derived from 44*8bab661aSEmmanuel Vadot the number of GPIOs given in the corresponding device tree properties. 45*8bab661aSEmmanuel Vadot 46*8bab661aSEmmanuel Vadotproperties: 47*8bab661aSEmmanuel Vadot compatible: 48*8bab661aSEmmanuel Vadot const: gpio-latch 49*8bab661aSEmmanuel Vadot "#gpio-cells": 50*8bab661aSEmmanuel Vadot const: 2 51*8bab661aSEmmanuel Vadot 52*8bab661aSEmmanuel Vadot clk-gpios: 53*8bab661aSEmmanuel Vadot description: Array of GPIOs to be used to clock a latch 54*8bab661aSEmmanuel Vadot 55*8bab661aSEmmanuel Vadot latched-gpios: 56*8bab661aSEmmanuel Vadot description: Array of GPIOs to be used as inputs per latch 57*8bab661aSEmmanuel Vadot 58*8bab661aSEmmanuel Vadot setup-duration-ns: 59*8bab661aSEmmanuel Vadot description: Delay in nanoseconds to wait after the latch inputs have been 60*8bab661aSEmmanuel Vadot set up 61*8bab661aSEmmanuel Vadot 62*8bab661aSEmmanuel Vadot clock-duration-ns: 63*8bab661aSEmmanuel Vadot description: Delay in nanoseconds to wait between clock output changes 64*8bab661aSEmmanuel Vadot 65*8bab661aSEmmanuel Vadot gpio-controller: true 66*8bab661aSEmmanuel Vadot 67*8bab661aSEmmanuel Vadot gpio-line-names: true 68*8bab661aSEmmanuel Vadot 69*8bab661aSEmmanuel Vadotrequired: 70*8bab661aSEmmanuel Vadot - compatible 71*8bab661aSEmmanuel Vadot - "#gpio-cells" 72*8bab661aSEmmanuel Vadot - gpio-controller 73*8bab661aSEmmanuel Vadot - clk-gpios 74*8bab661aSEmmanuel Vadot - latched-gpios 75*8bab661aSEmmanuel Vadot 76*8bab661aSEmmanuel VadotadditionalProperties: false 77*8bab661aSEmmanuel Vadot 78*8bab661aSEmmanuel Vadotexamples: 79*8bab661aSEmmanuel Vadot - | 80*8bab661aSEmmanuel Vadot gpio-latch { 81*8bab661aSEmmanuel Vadot #gpio-cells = <2>; 82*8bab661aSEmmanuel Vadot pinctrl-names = "default"; 83*8bab661aSEmmanuel Vadot pinctrl-0 = <&pinctrl_di_do_leds>; 84*8bab661aSEmmanuel Vadot compatible = "gpio-latch"; 85*8bab661aSEmmanuel Vadot gpio-controller; 86*8bab661aSEmmanuel Vadot setup-duration-ns = <100>; 87*8bab661aSEmmanuel Vadot clock-duration-ns = <100>; 88*8bab661aSEmmanuel Vadot 89*8bab661aSEmmanuel Vadot clk-gpios = <&gpio3 7 0>, <&gpio3 8 0>; 90*8bab661aSEmmanuel Vadot latched-gpios = <&gpio3 21 0>, <&gpio3 22 0>, 91*8bab661aSEmmanuel Vadot <&gpio3 23 0>, <&gpio3 24 0>, 92*8bab661aSEmmanuel Vadot <&gpio3 25 0>, <&gpio3 26 0>, 93*8bab661aSEmmanuel Vadot <&gpio3 27 0>, <&gpio3 28 0>; 94*8bab661aSEmmanuel Vadot }; 95