xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/pisosr-gpio.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*833e5d42SEmmanuel Vadot%YAML 1.2
3*833e5d42SEmmanuel Vadot---
4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/pisosr-gpio.yaml#
5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*833e5d42SEmmanuel Vadot
7*833e5d42SEmmanuel Vadottitle: Generic Parallel-in/Serial-out Shift Register GPIO Driver
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadotdescription:
10*833e5d42SEmmanuel Vadot  This binding describes generic parallel-in/serial-out shift register
11*833e5d42SEmmanuel Vadot  devices that can be used for GPI (General Purpose Input). This includes
12*833e5d42SEmmanuel Vadot  SN74165 serial-out shift registers and the SN65HVS88x series of
13*833e5d42SEmmanuel Vadot  industrial serializers.
14*833e5d42SEmmanuel Vadot
15*833e5d42SEmmanuel Vadotmaintainers:
16*833e5d42SEmmanuel Vadot  - Frank Li <Frank.Li@nxp.com>
17*833e5d42SEmmanuel Vadot
18*833e5d42SEmmanuel Vadotproperties:
19*833e5d42SEmmanuel Vadot  compatible:
20*833e5d42SEmmanuel Vadot    enum:
21*833e5d42SEmmanuel Vadot      - pisosr-gpio
22*833e5d42SEmmanuel Vadot
23*833e5d42SEmmanuel Vadot  gpio-controller: true
24*833e5d42SEmmanuel Vadot
25*833e5d42SEmmanuel Vadot  '#gpio-cells':
26*833e5d42SEmmanuel Vadot    const: 2
27*833e5d42SEmmanuel Vadot
28*833e5d42SEmmanuel Vadot  ngpios:
29*833e5d42SEmmanuel Vadot    maximum: 32
30*833e5d42SEmmanuel Vadot    default: 8
31*833e5d42SEmmanuel Vadot
32*833e5d42SEmmanuel Vadot  load-gpios:
33*833e5d42SEmmanuel Vadot    description:
34*833e5d42SEmmanuel Vadot      GPIO pin specifier attached to load enable, this
35*833e5d42SEmmanuel Vadot      pin is pulsed before reading from the device to
36*833e5d42SEmmanuel Vadot      load input pin values into the device.
37*833e5d42SEmmanuel Vadot
38*833e5d42SEmmanuel Vadot  spi-cpol: true
39*833e5d42SEmmanuel Vadot
40*833e5d42SEmmanuel Vadotrequired:
41*833e5d42SEmmanuel Vadot  - compatible
42*833e5d42SEmmanuel Vadot  - gpio-controller
43*833e5d42SEmmanuel Vadot  - '#gpio-cells'
44*833e5d42SEmmanuel Vadot
45*833e5d42SEmmanuel VadotallOf:
46*833e5d42SEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml#
47*833e5d42SEmmanuel Vadot
48*833e5d42SEmmanuel VadotunevaluatedProperties: false
49*833e5d42SEmmanuel Vadot
50*833e5d42SEmmanuel Vadotexamples:
51*833e5d42SEmmanuel Vadot  - |
52*833e5d42SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
53*833e5d42SEmmanuel Vadot
54*833e5d42SEmmanuel Vadot    spi {
55*833e5d42SEmmanuel Vadot        #address-cells = <1>;
56*833e5d42SEmmanuel Vadot        #size-cells = <0>;
57*833e5d42SEmmanuel Vadot
58*833e5d42SEmmanuel Vadot        gpio@0 {
59*833e5d42SEmmanuel Vadot            compatible = "pisosr-gpio";
60*833e5d42SEmmanuel Vadot            reg = <0>;
61*833e5d42SEmmanuel Vadot            gpio-controller;
62*833e5d42SEmmanuel Vadot            #gpio-cells = <2>;
63*833e5d42SEmmanuel Vadot            load-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
64*833e5d42SEmmanuel Vadot            spi-max-frequency = <1000000>;
65*833e5d42SEmmanuel Vadot            spi-cpol;
66*833e5d42SEmmanuel Vadot        };
67*833e5d42SEmmanuel Vadot    };
68