Path: blob/master/Documentation/devicetree/bindings/gpio/gpio-latch.yaml
26308 views
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/gpio/gpio-latch.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: GPIO latch controller78maintainers:9- Sascha Hauer <s.hauer@pengutronix.de>1011description: |12This binding describes a GPIO multiplexer based on latches connected to13other GPIOs, like this:1415CLK0 ----------------------. ,--------.16CLK1 -------------------. `--------|> #0 |17| | |18OUT0 ----------------+--|-----------|D0 Q0|-----|<19OUT1 --------------+-|--|-----------|D1 Q1|-----|<20OUT2 ------------+-|-|--|-----------|D2 Q2|-----|<21OUT3 ----------+-|-|-|--|-----------|D3 Q3|-----|<22OUT4 --------+-|-|-|-|--|-----------|D4 Q4|-----|<23OUT5 ------+-|-|-|-|-|--|-----------|D5 Q5|-----|<24OUT6 ----+-|-|-|-|-|-|--|-----------|D6 Q6|-----|<25OUT7 --+-|-|-|-|-|-|-|--|-----------|D7 Q7|-----|<26| | | | | | | | | `--------'27| | | | | | | | |28| | | | | | | | | ,--------.29| | | | | | | | `-----------|> #1 |30| | | | | | | | | |31| | | | | | | `--------------|D0 Q0|-----|<32| | | | | | `----------------|D1 Q1|-----|<33| | | | | `------------------|D2 Q2|-----|<34| | | | `--------------------|D3 Q3|-----|<35| | | `----------------------|D4 Q4|-----|<36| | `------------------------|D5 Q5|-----|<37| `--------------------------|D6 Q6|-----|<38`----------------------------|D7 Q7|-----|<39`--------'4041The number of clk-gpios and latched-gpios is not fixed. The actual number42of number of latches and the number of inputs per latch is derived from43the number of GPIOs given in the corresponding device tree properties.4445properties:46compatible:47const: gpio-latch48"#gpio-cells":49const: 25051clk-gpios:52description: Array of GPIOs to be used to clock a latch5354latched-gpios:55description: Array of GPIOs to be used as inputs per latch5657setup-duration-ns:58description: Delay in nanoseconds to wait after the latch inputs have been59set up6061clock-duration-ns:62description: Delay in nanoseconds to wait between clock output changes6364gpio-controller: true6566gpio-line-names: true6768required:69- compatible70- "#gpio-cells"71- gpio-controller72- clk-gpios73- latched-gpios7475additionalProperties: false7677examples:78- |79gpio-latch {80#gpio-cells = <2>;81pinctrl-names = "default";82pinctrl-0 = <&pinctrl_di_do_leds>;83compatible = "gpio-latch";84gpio-controller;85setup-duration-ns = <100>;86clock-duration-ns = <100>;8788clk-gpios = <&gpio3 7 0>, <&gpio3 8 0>;89latched-gpios = <&gpio3 21 0>, <&gpio3 22 0>,90<&gpio3 23 0>, <&gpio3 24 0>,91<&gpio3 25 0>, <&gpio3 26 0>,92<&gpio3 27 0>, <&gpio3 28 0>;93};949596