xref: /linux/Documentation/devicetree/bindings/soc/fsl/cpm_qe/cpm/i2c.txt (revision f26e8817b235d8764363bffcc9cbfc61867371f2)
1*0883c2c0SZhao Qiang* I2C
2*0883c2c0SZhao Qiang
3*0883c2c0SZhao QiangThe I2C controller is expressed as a bus under the CPM node.
4*0883c2c0SZhao Qiang
5*0883c2c0SZhao QiangProperties:
6*0883c2c0SZhao Qiang- compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c"
7*0883c2c0SZhao Qiang- reg : On CPM2 devices, the second resource doesn't specify the I2C
8*0883c2c0SZhao Qiang  Parameter RAM itself, but the I2C_BASE field of the CPM2 Parameter RAM
9*0883c2c0SZhao Qiang  (typically 0x8afc 0x2).
10*0883c2c0SZhao Qiang- #address-cells : Should be one. The cell is the i2c device address with
11*0883c2c0SZhao Qiang  the r/w bit set to zero.
12*0883c2c0SZhao Qiang- #size-cells : Should be zero.
13*0883c2c0SZhao Qiang- clock-frequency : Can be used to set the i2c clock frequency. If
14*0883c2c0SZhao Qiang  unspecified, a default frequency of 60kHz is being used.
15*0883c2c0SZhao QiangThe following two properties are deprecated. They are only used by legacy
16*0883c2c0SZhao Qiangi2c drivers to find the bus to probe:
17*0883c2c0SZhao Qiang- linux,i2c-index : Can be used to hard code an i2c bus number. By default,
18*0883c2c0SZhao Qiang  the bus number is dynamically assigned by the i2c core.
19*0883c2c0SZhao Qiang- linux,i2c-class : Can be used to override the i2c class. The class is used
20*0883c2c0SZhao Qiang  by legacy i2c device drivers to find a bus in a specific context like
21*0883c2c0SZhao Qiang  system management, video or sound. By default, I2C_CLASS_HWMON (1) is
22*0883c2c0SZhao Qiang  being used. The definition of the classes can be found in
23*0883c2c0SZhao Qiang  include/i2c/i2c.h
24*0883c2c0SZhao Qiang
25*0883c2c0SZhao QiangExample, based on mpc823:
26*0883c2c0SZhao Qiang
27*0883c2c0SZhao Qiang	i2c@860 {
28*0883c2c0SZhao Qiang		compatible = "fsl,mpc823-i2c",
29*0883c2c0SZhao Qiang			     "fsl,cpm1-i2c";
30*0883c2c0SZhao Qiang		reg = <0x860 0x20 0x3c80 0x30>;
31*0883c2c0SZhao Qiang		interrupts = <16>;
32*0883c2c0SZhao Qiang		interrupt-parent = <&CPM_PIC>;
33*0883c2c0SZhao Qiang		fsl,cpm-command = <0x10>;
34*0883c2c0SZhao Qiang		#address-cells = <1>;
35*0883c2c0SZhao Qiang		#size-cells = <0>;
36*0883c2c0SZhao Qiang
37*0883c2c0SZhao Qiang		rtc@68 {
38*0883c2c0SZhao Qiang			compatible = "dallas,ds1307";
39*0883c2c0SZhao Qiang			reg = <0x68>;
40*0883c2c0SZhao Qiang		};
41*0883c2c0SZhao Qiang	};
42