xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/fairchild,74hc595.yaml (revision a03411e84728e9b267056fd31c7d1d9d1dc1b01e)
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
7title: Generic 8-bit shift register
8
9maintainers:
10  - Maxime Ripard <mripard@kernel.org>
11
12properties:
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    $ref: /schemas/types.yaml#/definitions/uint32
30    description: Number of daisy-chained shift registers
31
32  enable-gpios:
33    description: GPIO connected to the OE (Output Enable) pin.
34    maxItems: 1
35
36patternProperties:
37  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
38    type: object
39
40    properties:
41      gpio-hog: true
42      gpios: true
43      output-high: true
44      output-low: true
45      line-name: true
46
47    required:
48      - gpio-hog
49      - gpios
50
51    additionalProperties: false
52
53required:
54  - compatible
55  - reg
56  - gpio-controller
57  - '#gpio-cells'
58  - registers-number
59
60allOf:
61  - $ref: /schemas/spi/spi-peripheral-props.yaml#
62
63unevaluatedProperties: false
64
65examples:
66  - |
67    spi {
68            #address-cells = <1>;
69            #size-cells = <0>;
70
71            gpio5: gpio5@0 {
72                    compatible = "fairchild,74hc595";
73                    reg = <0>;
74                    gpio-controller;
75                    #gpio-cells = <2>;
76                    registers-number = <4>;
77                    spi-max-frequency = <100000>;
78            };
79    };
80