1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/display/tegra/nvidia,tegra124-dpaux.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NVIDIA Tegra DisplayPort AUX Interface
8
9maintainers:
10  - Thierry Reding <thierry.reding@gmail.com>
11  - Jon Hunter <jonathanh@nvidia.com>
12
13description: |
14  The Tegra Display Port Auxiliary (DPAUX) pad controller manages two
15  pins which can be assigned to either the DPAUX channel or to an I2C
16  controller.
17
18  When configured for DisplayPort AUX operation, the DPAUX controller
19  can also be used to communicate with a DisplayPort device using the
20  AUX channel.
21
22properties:
23  $nodename:
24    pattern: "^dpaux@[0-9a-f]+$"
25
26  compatible:
27    oneOf:
28      - enum:
29          - nvidia,tegra124-dpaux
30          - nvidia,tegra210-dpaux
31          - nvidia,tegra186-dpaux
32          - nvidia,tegra194-dpaux
33
34      - items:
35          - const: nvidia,tegra132-dpaux
36          - const: nvidia,tegra124-dpaux
37
38  reg:
39    maxItems: 1
40
41  interrupts:
42    maxItems: 1
43
44  clocks:
45    items:
46      - description: clock input for the DPAUX hardware
47      - description: reference clock
48
49  clock-names:
50    items:
51      - const: dpaux
52      - const: parent
53
54  resets:
55    items:
56      - description: module reset
57
58  reset-names:
59    items:
60      - const: dpaux
61
62  power-domains:
63    maxItems: 1
64
65  i2c-bus:
66    description: Subnode where I2C slave devices are listed. This
67      subnode must be always present. If there are no I2C slave
68      devices, an empty node should be added. See ../../i2c/i2c.yaml
69      for more information.
70    type: object
71
72  aux-bus:
73    $ref: /schemas/display/dp-aux-bus.yaml#
74
75  vdd-supply:
76    description: phandle of a supply that powers the DisplayPort
77      link
78
79patternProperties:
80  "^pinmux-[a-z0-9]+$":
81    description:
82      Since only three configurations are possible, only three child
83      nodes are needed to describe the pin mux'ing options for the
84      DPAUX pads. Furthermore, given that the pad functions are only
85      applicable to a single set of pads, the child nodes only need
86      to describe the pad group the functions are being applied to
87      rather than the individual pads.
88    type: object
89    properties:
90      groups:
91        const: dpaux-io
92
93      function:
94        enum:
95          - aux
96          - i2c
97          - off
98
99    additionalProperties: false
100
101    required:
102      - groups
103      - function
104
105additionalProperties: false
106
107required:
108  - compatible
109  - reg
110  - interrupts
111  - clocks
112  - clock-names
113  - resets
114  - reset-names
115
116examples:
117  - |
118    #include <dt-bindings/clock/tegra210-car.h>
119    #include <dt-bindings/interrupt-controller/arm-gic.h>
120
121    dpaux: dpaux@545c0000 {
122        compatible = "nvidia,tegra210-dpaux";
123        reg = <0x545c0000 0x00040000>;
124        interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
125        clocks = <&tegra_car TEGRA210_CLK_DPAUX>,
126                 <&tegra_car TEGRA210_CLK_PLL_DP>;
127        clock-names = "dpaux", "parent";
128        resets = <&tegra_car 181>;
129        reset-names = "dpaux";
130        power-domains = <&pd_sor>;
131
132        state_dpaux_aux: pinmux-aux {
133            groups = "dpaux-io";
134            function = "aux";
135        };
136
137        state_dpaux_i2c: pinmux-i2c {
138            groups = "dpaux-io";
139            function = "i2c";
140        };
141
142        state_dpaux_off: pinmux-off {
143            groups = "dpaux-io";
144            function = "off";
145        };
146
147        i2c-bus {
148            #address-cells = <1>;
149            #size-cells = <0>;
150        };
151    };
152