[PATCH V3] powerpc: Add I2C bus multiplexer node for B4 and T4240QDS

2013-09-08 Thread Jia Hongtao
In both B4 and T4240QDS platform PCA9547 I2C bus multiplexer is used.
The sub-nodes are also reorganized according to right I2C topology.

Signed-off-by: Jia Hongtao 
---
V3 change log:
* change "channel" to "i2c" based on i2c-mux binding.

V2 change log:
* Reorganized the sub-nodes under I2C multiplexer to represent right topology.

 arch/powerpc/boot/dts/b4qds.dtsi   | 51 +---
 arch/powerpc/boot/dts/t4240qds.dts | 69 ++
 2 files changed, 73 insertions(+), 47 deletions(-)

diff --git a/arch/powerpc/boot/dts/b4qds.dtsi b/arch/powerpc/boot/dts/b4qds.dtsi
index e6d2f8f..e2ab6cb 100644
--- a/arch/powerpc/boot/dts/b4qds.dtsi
+++ b/arch/powerpc/boot/dts/b4qds.dtsi
@@ -120,25 +120,38 @@
};
 
i2c@118000 {
-   eeprom@50 {
-   compatible = "at24,24c64";
-   reg = <0x50>;
-   };
-   eeprom@51 {
-   compatible = "at24,24c256";
-   reg = <0x51>;
-   };
-   eeprom@53 {
-   compatible = "at24,24c256";
-   reg = <0x53>;
-   };
-   eeprom@57 {
-   compatible = "at24,24c256";
-   reg = <0x57>;
-   };
-   rtc@68 {
-   compatible = "dallas,ds3232";
-   reg = <0x68>;
+   mux@77 {
+   compatible = "philips,pca9547";
+   reg = <0x77>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   i2c@0 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0>;
+
+   eeprom@50 {
+   compatible = "at24,24c64";
+   reg = <0x50>;
+   };
+   eeprom@51 {
+   compatible = "at24,24c256";
+   reg = <0x51>;
+   };
+   eeprom@53 {
+   compatible = "at24,24c256";
+   reg = <0x53>;
+   };
+   eeprom@57 {
+   compatible = "at24,24c256";
+   reg = <0x57>;
+   };
+   rtc@68 {
+   compatible = "dallas,ds3232";
+   reg = <0x68>;
+   };
+   };
};
};
 
diff --git a/arch/powerpc/boot/dts/t4240qds.dts 
b/arch/powerpc/boot/dts/t4240qds.dts
index 0555976..b354af5 100644
--- a/arch/powerpc/boot/dts/t4240qds.dts
+++ b/arch/powerpc/boot/dts/t4240qds.dts
@@ -118,34 +118,47 @@
};
 
i2c@118000 {
-   eeprom@51 {
-   compatible = "at24,24c256";
-   reg = <0x51>;
-   };
-   eeprom@52 {
-   compatible = "at24,24c256";
-   reg = <0x52>;
-   };
-   eeprom@53 {
-   compatible = "at24,24c256";
-   reg = <0x53>;
-   };
-   eeprom@54 {
-   compatible = "at24,24c256";
-   reg = <0x54>;
-   };
-   eeprom@55 {
-   compatible = "at24,24c256";
-   reg = <0x55>;
-   };
-   eeprom@56 {
-   compatible = "at24,24c256";
-   reg = <0x56>;
-   };
-   rtc@68 {
-   compatible = "dallas,ds3232";
-   reg = <0x68>;
-   interrupts = <0x1 0x1 0 0>;
+   mux@77 {
+   compatible = "philips,pca9547";
+   reg = <0x77>;
+   #address-cell

[PATCH V3] powerpc: Add I2C bus multiplexer node for B4 and T4240QDS

2013-09-09 Thread Jia Hongtao
In both B4 and T4240QDS platform PCA9547 I2C bus multiplexer is used.
The sub-nodes are also reorganized according to right I2C topology.

Signed-off-by: Jia Hongtao 
---
V3 change log:
* Change "channel" to "i2c" based on i2c-mux binding.
* Update vendor from philips to nxp.

V2 change log:
* Reorganized the sub-nodes under I2C multiplexer to represent right topology.

 arch/powerpc/boot/dts/b4qds.dtsi   | 51 +---
 arch/powerpc/boot/dts/t4240qds.dts | 69 ++
 2 files changed, 73 insertions(+), 47 deletions(-)

diff --git a/arch/powerpc/boot/dts/b4qds.dtsi b/arch/powerpc/boot/dts/b4qds.dtsi
index e6d2f8f..8b47edc 100644
--- a/arch/powerpc/boot/dts/b4qds.dtsi
+++ b/arch/powerpc/boot/dts/b4qds.dtsi
@@ -120,25 +120,38 @@
};
 
i2c@118000 {
-   eeprom@50 {
-   compatible = "at24,24c64";
-   reg = <0x50>;
-   };
-   eeprom@51 {
-   compatible = "at24,24c256";
-   reg = <0x51>;
-   };
-   eeprom@53 {
-   compatible = "at24,24c256";
-   reg = <0x53>;
-   };
-   eeprom@57 {
-   compatible = "at24,24c256";
-   reg = <0x57>;
-   };
-   rtc@68 {
-   compatible = "dallas,ds3232";
-   reg = <0x68>;
+   mux@77 {
+   compatible = "nxp,pca9547";
+   reg = <0x77>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   i2c@0 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0>;
+
+   eeprom@50 {
+   compatible = "at24,24c64";
+   reg = <0x50>;
+   };
+   eeprom@51 {
+   compatible = "at24,24c256";
+   reg = <0x51>;
+   };
+   eeprom@53 {
+   compatible = "at24,24c256";
+   reg = <0x53>;
+   };
+   eeprom@57 {
+   compatible = "at24,24c256";
+   reg = <0x57>;
+   };
+   rtc@68 {
+   compatible = "dallas,ds3232";
+   reg = <0x68>;
+   };
+   };
};
};
 
diff --git a/arch/powerpc/boot/dts/t4240qds.dts 
b/arch/powerpc/boot/dts/t4240qds.dts
index 0555976..a35508f 100644
--- a/arch/powerpc/boot/dts/t4240qds.dts
+++ b/arch/powerpc/boot/dts/t4240qds.dts
@@ -118,34 +118,47 @@
};
 
i2c@118000 {
-   eeprom@51 {
-   compatible = "at24,24c256";
-   reg = <0x51>;
-   };
-   eeprom@52 {
-   compatible = "at24,24c256";
-   reg = <0x52>;
-   };
-   eeprom@53 {
-   compatible = "at24,24c256";
-   reg = <0x53>;
-   };
-   eeprom@54 {
-   compatible = "at24,24c256";
-   reg = <0x54>;
-   };
-   eeprom@55 {
-   compatible = "at24,24c256";
-   reg = <0x55>;
-   };
-   eeprom@56 {
-   compatible = "at24,24c256";
-   reg = <0x56>;
-   };
-   rtc@68 {
-   compatible = "dallas,ds3232";
-   reg = <0x68>;
-   interrupts = <0x1 0x1 0 0>;
+   mux@77 {
+   compatible = "nxp,pca9547";
+   reg = <0x77>;
+