GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / i2c / st,nomadik-i2c.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/i2c/st,nomadik-i2c.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: ST Microelectronics Nomadik I2C Bindings
8
9 description: The Nomadik I2C host controller began its life in the ST
10   Microelectronics STn8800 SoC, and was then inherited into STn8810 and
11   STn8815. It was part of the prototype STn8500 which then became ST-Ericsson
12   DB8500 after the merge of these two companies wireless divisions.
13
14 maintainers:
15   - Linus Walleij <linus.walleij@linaro.org>
16
17 allOf:
18   - $ref: /schemas/i2c/i2c-controller.yaml#
19
20 # Need a custom select here or 'arm,primecell' will match on lots of nodes
21 select:
22   properties:
23     compatible:
24       contains:
25         enum:
26           - st,nomadik-i2c
27   required:
28     - compatible
29
30 properties:
31   compatible:
32     oneOf:
33       # The variant found in STn8815
34       - items:
35           - const: st,nomadik-i2c
36           - const: arm,primecell
37       # The variant found in DB8500
38       - items:
39           - const: stericsson,db8500-i2c
40           - const: st,nomadik-i2c
41           - const: arm,primecell
42
43   reg:
44     maxItems: 1
45
46   interrupts:
47     maxItems: 1
48
49   clocks:
50     maxItems: 2
51
52   clock-names:
53     oneOf:
54       # Clock name in STn8815
55       - items:
56           - const: mclk
57           - const: apb_pclk
58       # Clock name in DB8500
59       - items:
60           - const: i2cclk
61           - const: apb_pclk
62
63   power-domains:
64     maxItems: 1
65
66   resets:
67     maxItems: 1
68
69   clock-frequency:
70     minimum: 1
71     maximum: 400000
72
73 required:
74   - compatible
75   - reg
76   - interrupts
77   - clocks
78   - clock-names
79
80 unevaluatedProperties: false
81
82 examples:
83   - |
84     #include <dt-bindings/interrupt-controller/irq.h>
85     #include <dt-bindings/interrupt-controller/arm-gic.h>
86     #include <dt-bindings/reset/stericsson,db8500-prcc-reset.h>
87     #include <dt-bindings/arm/ux500_pm_domains.h>
88     i2c@80004000 {
89       compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
90       reg = <0x80004000 0x1000>;
91       interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
92
93       #address-cells = <1>;
94       #size-cells = <0>;
95
96       clock-frequency = <400000>;
97       clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>;
98       clock-names = "i2cclk", "apb_pclk";
99       power-domains = <&pm_domains DOMAIN_VAPE>;
100       resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_I2C0>;
101     };
102
103     i2c@101f8000 {
104       compatible = "st,nomadik-i2c", "arm,primecell";
105       reg = <0x101f8000 0x1000>;
106       interrupt-parent = <&vica>;
107       interrupts = <20>;
108       clock-frequency = <100000>;
109       #address-cells = <1>;
110       #size-cells = <0>;
111       clocks = <&i2c0clk>, <&pclki2c0>;
112       clock-names = "mclk", "apb_pclk";
113     };
114
115 ...