xref: /freebsd-src/sys/contrib/device-tree/Bindings/i2c/st,nomadik-i2c.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/st,nomadik-i2c.yaml#
5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6b97ee269SEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: ST Microelectronics Nomadik I2C
8b97ee269SEmmanuel Vadot
9b97ee269SEmmanuel Vadotdescription: The Nomadik I2C host controller began its life in the ST
10b97ee269SEmmanuel Vadot  Microelectronics STn8800 SoC, and was then inherited into STn8810 and
11b97ee269SEmmanuel Vadot  STn8815. It was part of the prototype STn8500 which then became ST-Ericsson
12b97ee269SEmmanuel Vadot  DB8500 after the merge of these two companies wireless divisions.
13b97ee269SEmmanuel Vadot
14b97ee269SEmmanuel Vadotmaintainers:
15b97ee269SEmmanuel Vadot  - Linus Walleij <linus.walleij@linaro.org>
16b97ee269SEmmanuel Vadot
17b97ee269SEmmanuel Vadot# Need a custom select here or 'arm,primecell' will match on lots of nodes
18b97ee269SEmmanuel Vadotselect:
19b97ee269SEmmanuel Vadot  properties:
20b97ee269SEmmanuel Vadot    compatible:
21b97ee269SEmmanuel Vadot      contains:
22b97ee269SEmmanuel Vadot        enum:
23b97ee269SEmmanuel Vadot          - st,nomadik-i2c
24*01950c46SEmmanuel Vadot          - mobileye,eyeq5-i2c
25b97ee269SEmmanuel Vadot  required:
26b97ee269SEmmanuel Vadot    - compatible
27b97ee269SEmmanuel Vadot
28b97ee269SEmmanuel Vadotproperties:
29b97ee269SEmmanuel Vadot  compatible:
30b97ee269SEmmanuel Vadot    oneOf:
31b97ee269SEmmanuel Vadot      - items:
32b97ee269SEmmanuel Vadot          - const: st,nomadik-i2c
33b97ee269SEmmanuel Vadot          - const: arm,primecell
34b97ee269SEmmanuel Vadot      - items:
35b97ee269SEmmanuel Vadot          - const: stericsson,db8500-i2c
36b97ee269SEmmanuel Vadot          - const: st,nomadik-i2c
37b97ee269SEmmanuel Vadot          - const: arm,primecell
38*01950c46SEmmanuel Vadot      - items:
39*01950c46SEmmanuel Vadot          - const: mobileye,eyeq5-i2c
40*01950c46SEmmanuel Vadot          - const: arm,primecell
41b97ee269SEmmanuel Vadot
42b97ee269SEmmanuel Vadot  reg:
43b97ee269SEmmanuel Vadot    maxItems: 1
44b97ee269SEmmanuel Vadot
45b97ee269SEmmanuel Vadot  interrupts:
46b97ee269SEmmanuel Vadot    maxItems: 1
47b97ee269SEmmanuel Vadot
48b97ee269SEmmanuel Vadot  clocks:
49b97ee269SEmmanuel Vadot    maxItems: 2
50b97ee269SEmmanuel Vadot
51b97ee269SEmmanuel Vadot  clock-names:
52b97ee269SEmmanuel Vadot    oneOf:
53b97ee269SEmmanuel Vadot      # Clock name in STn8815
54b97ee269SEmmanuel Vadot      - items:
55b97ee269SEmmanuel Vadot          - const: mclk
56b97ee269SEmmanuel Vadot          - const: apb_pclk
57*01950c46SEmmanuel Vadot      # Clock name in DB8500 or EyeQ5
58b97ee269SEmmanuel Vadot      - items:
59b97ee269SEmmanuel Vadot          - const: i2cclk
60b97ee269SEmmanuel Vadot          - const: apb_pclk
61b97ee269SEmmanuel Vadot
62b97ee269SEmmanuel Vadot  power-domains:
63b97ee269SEmmanuel Vadot    maxItems: 1
64b97ee269SEmmanuel Vadot
65b97ee269SEmmanuel Vadot  resets:
66b97ee269SEmmanuel Vadot    maxItems: 1
67b97ee269SEmmanuel Vadot
68b97ee269SEmmanuel Vadot  clock-frequency:
69b97ee269SEmmanuel Vadot    minimum: 1
70b97ee269SEmmanuel Vadot    maximum: 400000
71b97ee269SEmmanuel Vadot
72*01950c46SEmmanuel Vadot  mobileye,olb:
73*01950c46SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
74*01950c46SEmmanuel Vadot    items:
75*01950c46SEmmanuel Vadot      - items:
76*01950c46SEmmanuel Vadot          - description: Phandle to OLB system controller node.
77*01950c46SEmmanuel Vadot          - description: Platform-wide controller ID (integer starting from zero).
78*01950c46SEmmanuel Vadot    description:
79*01950c46SEmmanuel Vadot      The phandle pointing to OLB system controller node, with the I2C
80*01950c46SEmmanuel Vadot      controller index.
81*01950c46SEmmanuel Vadot
82b97ee269SEmmanuel Vadotrequired:
83b97ee269SEmmanuel Vadot  - compatible
84b97ee269SEmmanuel Vadot  - reg
85b97ee269SEmmanuel Vadot  - interrupts
86b97ee269SEmmanuel Vadot  - clocks
87b97ee269SEmmanuel Vadot  - clock-names
88b97ee269SEmmanuel Vadot
89b97ee269SEmmanuel VadotunevaluatedProperties: false
90b97ee269SEmmanuel Vadot
91*01950c46SEmmanuel VadotallOf:
92*01950c46SEmmanuel Vadot  - $ref: /schemas/i2c/i2c-controller.yaml#
93*01950c46SEmmanuel Vadot  - if:
94*01950c46SEmmanuel Vadot      properties:
95*01950c46SEmmanuel Vadot        compatible:
96*01950c46SEmmanuel Vadot          contains:
97*01950c46SEmmanuel Vadot            const: mobileye,eyeq5-i2c
98*01950c46SEmmanuel Vadot    then:
99*01950c46SEmmanuel Vadot      required:
100*01950c46SEmmanuel Vadot        - mobileye,olb
101*01950c46SEmmanuel Vadot    else:
102*01950c46SEmmanuel Vadot      properties:
103*01950c46SEmmanuel Vadot        mobileye,olb: false
104*01950c46SEmmanuel Vadot
105b97ee269SEmmanuel Vadotexamples:
106b97ee269SEmmanuel Vadot  - |
107b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
108b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
109b97ee269SEmmanuel Vadot    #include <dt-bindings/reset/stericsson,db8500-prcc-reset.h>
110b97ee269SEmmanuel Vadot    #include <dt-bindings/arm/ux500_pm_domains.h>
111b97ee269SEmmanuel Vadot    i2c@80004000 {
112b97ee269SEmmanuel Vadot      compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
113b97ee269SEmmanuel Vadot      reg = <0x80004000 0x1000>;
114b97ee269SEmmanuel Vadot      interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
115b97ee269SEmmanuel Vadot
116b97ee269SEmmanuel Vadot      #address-cells = <1>;
117b97ee269SEmmanuel Vadot      #size-cells = <0>;
118b97ee269SEmmanuel Vadot
119b97ee269SEmmanuel Vadot      clock-frequency = <400000>;
120b97ee269SEmmanuel Vadot      clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>;
121b97ee269SEmmanuel Vadot      clock-names = "i2cclk", "apb_pclk";
122b97ee269SEmmanuel Vadot      power-domains = <&pm_domains DOMAIN_VAPE>;
123b97ee269SEmmanuel Vadot      resets = <&prcc_reset DB8500_PRCC_3 DB8500_PRCC_3_RESET_I2C0>;
124b97ee269SEmmanuel Vadot    };
125b97ee269SEmmanuel Vadot
126b97ee269SEmmanuel Vadot    i2c@101f8000 {
127b97ee269SEmmanuel Vadot      compatible = "st,nomadik-i2c", "arm,primecell";
128b97ee269SEmmanuel Vadot      reg = <0x101f8000 0x1000>;
129b97ee269SEmmanuel Vadot      interrupt-parent = <&vica>;
130b97ee269SEmmanuel Vadot      interrupts = <20>;
131b97ee269SEmmanuel Vadot      clock-frequency = <100000>;
132b97ee269SEmmanuel Vadot      #address-cells = <1>;
133b97ee269SEmmanuel Vadot      #size-cells = <0>;
134b97ee269SEmmanuel Vadot      clocks = <&i2c0clk>, <&pclki2c0>;
135b97ee269SEmmanuel Vadot      clock-names = "mclk", "apb_pclk";
136b97ee269SEmmanuel Vadot    };
137*01950c46SEmmanuel Vadot  - |
138*01950c46SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/mips-gic.h>
139*01950c46SEmmanuel Vadot    i2c@300000 {
140*01950c46SEmmanuel Vadot      compatible = "mobileye,eyeq5-i2c", "arm,primecell";
141*01950c46SEmmanuel Vadot      reg = <0x300000 0x1000>;
142*01950c46SEmmanuel Vadot      interrupt-parent = <&gic>;
143*01950c46SEmmanuel Vadot      interrupts = <GIC_SHARED 1 IRQ_TYPE_LEVEL_HIGH>;
144*01950c46SEmmanuel Vadot      clock-frequency = <400000>;
145*01950c46SEmmanuel Vadot      #address-cells = <1>;
146*01950c46SEmmanuel Vadot      #size-cells = <0>;
147*01950c46SEmmanuel Vadot      clocks = <&i2c_ser_clk>, <&i2c_clk>;
148*01950c46SEmmanuel Vadot      clock-names = "i2cclk", "apb_pclk";
149*01950c46SEmmanuel Vadot      mobileye,olb = <&olb 0>;
150*01950c46SEmmanuel Vadot    };
151b97ee269SEmmanuel Vadot
152b97ee269SEmmanuel Vadot...
153