aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2013-01-01 01:26:45 -0500
committerStephen Warren <swarren@wwwdotorg.org>2013-01-14 23:47:09 -0500
commit232fed4825e832c89b1d47a24c7836918063fb3e (patch)
tree2574ab574e31faaf19e2dc9aa6c4de4ebc0bc356
parent5186bf287aa4393b78c36f548d9b06001046b65e (diff)
ARM: bcm2835: add I2C controllers to DT
The BCM2835 has 3 identical I2C controllers. Instantiate them all in the SoC .dtsi file, and enable the relevant two in the Raspberry Pi board .dts file. Note that on the Raspberry Pi Model B revision 1, I2C0 is connected to the general-purpose expansion header, and I2C1 is connected to the camera connector. Revision 2 of the board swaps these assignments:-( Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
-rw-r--r--arch/arm/boot/dts/bcm2835-rpi-b.dts10
-rw-r--r--arch/arm/boot/dts/bcm2835.dtsi22
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index 0544ef860623..aafda174a605 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -25,6 +25,16 @@
25 }; 25 };
26}; 26};
27 27
28&i2c0 {
29 status = "okay";
30 clock-frequency = <100000>;
31};
32
33&i2c1 {
34 status = "okay";
35 clock-frequency = <100000>;
36};
37
28&sdhci { 38&sdhci {
29 status = "okay"; 39 status = "okay";
30 bus-width = <4>; 40 bus-width = <4>;
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index 1d7e4f5c0b1e..c69a591631b8 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -64,6 +64,22 @@
64 #interrupt-cells = <2>; 64 #interrupt-cells = <2>;
65 }; 65 };
66 66
67 i2c0: i2c@20205000 {
68 compatible = "brcm,bcm2835-i2c";
69 reg = <0x7e205000 0x1000>;
70 interrupts = <2 21>;
71 clocks = <&clk_i2c>;
72 status = "disabled";
73 };
74
75 i2c1: i2c@20804000 {
76 compatible = "brcm,bcm2835-i2c";
77 reg = <0x7e804000 0x1000>;
78 interrupts = <2 21>;
79 clocks = <&clk_i2c>;
80 status = "disabled";
81 };
82
67 sdhci: sdhci { 83 sdhci: sdhci {
68 compatible = "brcm,bcm2835-sdhci"; 84 compatible = "brcm,bcm2835-sdhci";
69 reg = <0x7e300000 0x100>; 85 reg = <0x7e300000 0x100>;
@@ -73,6 +89,12 @@
73 }; 89 };
74 }; 90 };
75 91
92 clk_i2c: clock {
93 compatible = "fixed-clock";
94 #clock-cells = <0>;
95 clock-frequency = <150000000>;
96 };
97
76 clk_mmc: clock { 98 clk_mmc: clock {
77 compatible = "fixed-clock"; 99 compatible = "fixed-clock";
78 #clock-cells = <0>; 100 #clock-cells = <0>;