Commit ec9686c4 authored by Kumar Gala's avatar Kumar Gala

[POWERPC] FSL: I2C device tree cleanups

* Removed device_type = "i2c"
* Added missing second I2C controller on MPC8548 CDS, MPC8544 DS
* Added #address-cells, #size-cells, and cell-index where missing
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 1c1d1672
...@@ -60,7 +60,7 @@ fec00000 fec00000 00300000 /* pci cfg regs */ ...@@ -60,7 +60,7 @@ fec00000 fec00000 00300000 /* pci cfg regs */
i2c@80003000 { i2c@80003000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <80003000 1000>; reg = <80003000 1000>;
interrupts = <5 2>; interrupts = <5 2>;
......
...@@ -60,7 +60,7 @@ fec00000 fec00000 00300000 /* pci cfg regs */ ...@@ -60,7 +60,7 @@ fec00000 fec00000 00300000 /* pci cfg regs */
i2c@80003000 { i2c@80003000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <80003000 1000>; reg = <80003000 1000>;
interrupts = <5 2>; interrupts = <5 2>;
......
...@@ -284,7 +284,8 @@ ata@3a00 { ...@@ -284,7 +284,8 @@ ata@3a00 {
}; };
i2c@3d00 { i2c@3d00 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
compatible = "mpc5200-i2c","fsl-i2c"; compatible = "mpc5200-i2c","fsl-i2c";
cell-index = <0>; cell-index = <0>;
reg = <3d00 40>; reg = <3d00 40>;
...@@ -294,7 +295,8 @@ i2c@3d00 { ...@@ -294,7 +295,8 @@ i2c@3d00 {
}; };
i2c@3d40 { i2c@3d40 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
compatible = "mpc5200-i2c","fsl-i2c"; compatible = "mpc5200-i2c","fsl-i2c";
cell-index = <1>; cell-index = <1>;
reg = <3d40 40>; reg = <3d40 40>;
......
...@@ -300,7 +300,8 @@ ata@3a00 { ...@@ -300,7 +300,8 @@ ata@3a00 {
}; };
i2c@3d00 { i2c@3d00 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
cell-index = <0>; cell-index = <0>;
reg = <3d00 40>; reg = <3d00 40>;
...@@ -310,7 +311,8 @@ i2c@3d00 { ...@@ -310,7 +311,8 @@ i2c@3d00 {
}; };
i2c@3d40 { i2c@3d40 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c";
cell-index = <1>; cell-index = <1>;
reg = <3d40 40>; reg = <3d40 40>;
......
...@@ -52,7 +52,9 @@ wdt@200 { ...@@ -52,7 +52,9 @@ wdt@200 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <e 8>; interrupts = <e 8>;
...@@ -61,7 +63,9 @@ i2c@3000 { ...@@ -61,7 +63,9 @@ i2c@3000 {
}; };
i2c@3100 { i2c@3100 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <f 8>; interrupts = <f 8>;
......
...@@ -59,7 +59,7 @@ wdt@200 { ...@@ -59,7 +59,7 @@ wdt@200 {
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <e 8>; interrupts = <e 8>;
......
...@@ -52,7 +52,9 @@ wdt@200 { ...@@ -52,7 +52,9 @@ wdt@200 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <e 8>; interrupts = <e 8>;
......
...@@ -51,7 +51,9 @@ wdt@200 { ...@@ -51,7 +51,9 @@ wdt@200 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <e 8>; interrupts = <e 8>;
...@@ -60,7 +62,9 @@ i2c@3000 { ...@@ -60,7 +62,9 @@ i2c@3000 {
}; };
i2c@3100 { i2c@3100 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <f 8>; interrupts = <f 8>;
......
...@@ -51,7 +51,9 @@ wdt@200 { ...@@ -51,7 +51,9 @@ wdt@200 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <e 8>; interrupts = <e 8>;
...@@ -60,7 +62,9 @@ i2c@3000 { ...@@ -60,7 +62,9 @@ i2c@3000 {
}; };
i2c@3100 { i2c@3100 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <f 8>; interrupts = <f 8>;
......
...@@ -59,7 +59,7 @@ wdt@200 { ...@@ -59,7 +59,7 @@ wdt@200 {
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <e 8>; interrupts = <e 8>;
...@@ -75,7 +75,7 @@ rtc@68 { ...@@ -75,7 +75,7 @@ rtc@68 {
i2c@3100 { i2c@3100 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <f 8>; interrupts = <f 8>;
......
...@@ -64,7 +64,7 @@ wdt@200 { ...@@ -64,7 +64,7 @@ wdt@200 {
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <e 8>; interrupts = <e 8>;
...@@ -80,7 +80,7 @@ rtc@68 { ...@@ -80,7 +80,7 @@ rtc@68 {
i2c@3100 { i2c@3100 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <f 8>; interrupts = <f 8>;
......
...@@ -63,7 +63,9 @@ l2-cache-controller@20000 { ...@@ -63,7 +63,9 @@ l2-cache-controller@20000 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
......
...@@ -63,7 +63,9 @@ l2-cache-controller@20000 { ...@@ -63,7 +63,9 @@ l2-cache-controller@20000 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
......
...@@ -64,7 +64,9 @@ l2-cache-controller@20000 { ...@@ -64,7 +64,9 @@ l2-cache-controller@20000 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
...@@ -72,6 +74,17 @@ i2c@3000 { ...@@ -72,6 +74,17 @@ i2c@3000 {
dfsrr; dfsrr;
}; };
i2c@3100 {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c";
reg = <3100 100>;
interrupts = <2b 2>;
interrupt-parent = <&mpic>;
dfsrr;
};
mdio@24520 { mdio@24520 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -63,7 +63,9 @@ l2-cache-controller@20000 { ...@@ -63,7 +63,9 @@ l2-cache-controller@20000 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
...@@ -71,6 +73,17 @@ i2c@3000 { ...@@ -71,6 +73,17 @@ i2c@3000 {
dfsrr; dfsrr;
}; };
i2c@3100 {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c";
reg = <3100 100>;
interrupts = <2b 2>;
interrupt-parent = <&mpic>;
dfsrr;
};
mdio@24520 { mdio@24520 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
......
...@@ -63,7 +63,9 @@ l2-cache-controller@20000 { ...@@ -63,7 +63,9 @@ l2-cache-controller@20000 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
......
...@@ -74,7 +74,7 @@ l2-cache-controller@20000 { ...@@ -74,7 +74,7 @@ l2-cache-controller@20000 {
i2c@3000 { i2c@3000 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
...@@ -90,7 +90,7 @@ rtc@68 { ...@@ -90,7 +90,7 @@ rtc@68 {
i2c@3100 { i2c@3100 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
device_type = "i2c"; cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
......
...@@ -69,7 +69,9 @@ l2-cache-controller@20000 { ...@@ -69,7 +69,9 @@ l2-cache-controller@20000 {
}; };
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
...@@ -78,7 +80,9 @@ i2c@3000 { ...@@ -78,7 +80,9 @@ i2c@3000 {
}; };
i2c@3100 { i2c@3100 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
......
...@@ -47,10 +47,10 @@ soc@e0000000 { ...@@ -47,10 +47,10 @@ soc@e0000000 {
bus-frequency = <0>; bus-frequency = <0>;
i2c@3000 { i2c@3000 {
device_type = "i2c";
compatible = "fsl-i2c";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
...@@ -58,10 +58,10 @@ i2c@3000 { ...@@ -58,10 +58,10 @@ i2c@3000 {
}; };
i2c@3100 { i2c@3100 {
device_type = "i2c";
compatible = "fsl-i2c";
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
......
...@@ -69,7 +69,9 @@ soc8641@f8000000 { ...@@ -69,7 +69,9 @@ soc8641@f8000000 {
bus-frequency = <0>; bus-frequency = <0>;
i2c@3000 { i2c@3000 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3000 100>; reg = <3000 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
...@@ -78,7 +80,9 @@ i2c@3000 { ...@@ -78,7 +80,9 @@ i2c@3000 {
}; };
i2c@3100 { i2c@3100 {
device_type = "i2c"; #address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "fsl-i2c"; compatible = "fsl-i2c";
reg = <3100 100>; reg = <3100 100>;
interrupts = <2b 2>; interrupts = <2b 2>;
......
...@@ -390,13 +390,11 @@ static void __init of_register_i2c_devices(struct device_node *adap_node, ...@@ -390,13 +390,11 @@ static void __init of_register_i2c_devices(struct device_node *adap_node,
static int __init fsl_i2c_of_init(void) static int __init fsl_i2c_of_init(void)
{ {
struct device_node *np; struct device_node *np;
unsigned int i; unsigned int i = 0;
struct platform_device *i2c_dev; struct platform_device *i2c_dev;
int ret; int ret;
for (np = NULL, i = 0; for_each_compatible_node(np, NULL, "fsl-i2c") {
(np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
i++) {
struct resource r[2]; struct resource r[2];
struct fsl_i2c_platform_data i2c_data; struct fsl_i2c_platform_data i2c_data;
const unsigned char *flags = NULL; const unsigned char *flags = NULL;
...@@ -432,7 +430,7 @@ static int __init fsl_i2c_of_init(void) ...@@ -432,7 +430,7 @@ static int __init fsl_i2c_of_init(void)
if (ret) if (ret)
goto unreg; goto unreg;
of_register_i2c_devices(np, i); of_register_i2c_devices(np, i++);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment