1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/brcm,bcm6345-gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Broadcom BCM6345 GPIO controller
8
9maintainers:
10  - Álvaro Fernández Rojas <noltari@gmail.com>
11  - Jonas Gorski <jonas.gorski@gmail.com>
12
13description: |+
14  Bindings for Broadcom's BCM63xx memory-mapped GPIO controllers.
15
16  These bindings can be used on any BCM63xx SoC. However, BCM6338 and BCM6345
17  are the only ones which don't need a pinctrl driver.
18
19  BCM6338 have 8-bit data and dirout registers, where GPIO state can be read
20  and/or written, and the direction changed from input to output.
21  BCM6345 have 16-bit data and dirout registers, where GPIO state can be read
22  and/or written, and the direction changed from input to output.
23  BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268 have 32-bit data
24  and dirout registers, where GPIO state can be read and/or written, and the
25  direction changed from input to output.
26
27properties:
28  compatible:
29    enum:
30      - brcm,bcm6318-gpio
31      - brcm,bcm6328-gpio
32      - brcm,bcm6345-gpio
33      - brcm,bcm6358-gpio
34      - brcm,bcm6362-gpio
35      - brcm,bcm6368-gpio
36      - brcm,bcm63268-gpio
37
38  gpio-controller: true
39
40  "#gpio-cells":
41    const: 2
42
43  gpio-ranges:
44    maxItems: 1
45
46  native-endian: true
47
48  reg:
49    maxItems: 2
50
51  reg-names:
52    items:
53      - const: dirout
54      - const: dat
55
56required:
57  - compatible
58  - reg
59  - reg-names
60  - gpio-controller
61  - '#gpio-cells'
62
63additionalProperties: false
64
65examples:
66  - |
67    gpio@fffe0406 {
68      compatible = "brcm,bcm6345-gpio";
69      reg-names = "dirout", "dat";
70      reg = <0xfffe0406 2>, <0xfffe040a 2>;
71      native-endian;
72
73      gpio-controller;
74      #gpio-cells = <2>;
75    };
76
77  - |
78    gpio@0 {
79      compatible = "brcm,bcm63268-gpio";
80      reg-names = "dirout", "dat";
81      reg = <0x0 0x8>, <0x8 0x8>;
82
83      gpio-controller;
84      gpio-ranges = <&pinctrl 0 0 52>;
85      #gpio-cells = <2>;
86    };
87