GNU Linux-libre 5.15.137-gnu
[releases.git] / Documentation / devicetree / bindings / gpio / fairchild,74hc595.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/gpio/fairchild,74hc595.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Generic 8-bit shift register
8
9 maintainers:
10   - Maxime Ripard <mripard@kernel.org>
11
12 properties:
13   compatible:
14     enum:
15       - fairchild,74hc595
16       - nxp,74lvc594
17
18   reg:
19     maxItems: 1
20
21   gpio-controller: true
22
23   '#gpio-cells':
24     description:
25       The second cell is only used to specify the GPIO polarity.
26     const: 2
27
28   registers-number:
29     description: Number of daisy-chained shift registers
30
31   enable-gpios:
32     description: GPIO connected to the OE (Output Enable) pin.
33     maxItems: 1
34
35   spi-max-frequency: true
36
37 patternProperties:
38   "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
39     type: object
40
41     properties:
42       gpio-hog: true
43       gpios: true
44       output-high: true
45       output-low: true
46       line-name: true
47
48     required:
49       - gpio-hog
50       - gpios
51
52     additionalProperties: false
53
54 required:
55   - compatible
56   - reg
57   - gpio-controller
58   - '#gpio-cells'
59   - registers-number
60
61 additionalProperties: false
62
63 examples:
64   - |
65     spi {
66             #address-cells = <1>;
67             #size-cells = <0>;
68
69             gpio5: gpio5@0 {
70                     compatible = "fairchild,74hc595";
71                     reg = <0>;
72                     gpio-controller;
73                     #gpio-cells = <2>;
74                     registers-number = <4>;
75                     spi-max-frequency = <100000>;
76             };
77     };