Permalink
Browse files

i2c-bcm2708/BCM270X_DT: Add support for I2C2

The third I2C bus (I2C2) is normally reserved for HDMI use. Careless
use of this bus can break an attached display - use with caution.

It is recommended to disable accesses by VideoCore by setting
hdmi_ignore_edid=1 or hdmi_edid_file=1 in config.txt.

The interface is disabled by default - enable using the
i2c2_iknowwhatimdoing DT parameter.
  • Loading branch information...
pelwell committed Jun 22, 2015
1 parent 5aa6527 commit c6f0998f61b279d47e210b90d645643a6fe7932b
@@ -75,6 +75,10 @@
clock-frequency = <100000>;
};

&i2c2 {
clock-frequency = <100000>;
};

&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
@@ -103,8 +107,10 @@
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2c2_iknowwhatimdoing = <&i2c2>,"status";
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
i2c1_baudrate = <&i2c1>,"clock-frequency:0";
i2c2_baudrate = <&i2c2>,"clock-frequency:0";

act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
@@ -75,6 +75,10 @@
clock-frequency = <100000>;
};

&i2c2 {
clock-frequency = <100000>;
};

&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
@@ -97,8 +101,10 @@
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2c2_iknowwhatimdoing = <&i2c2>,"status";
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
i2c1_baudrate = <&i2c1>,"clock-frequency:0";
i2c2_baudrate = <&i2c2>,"clock-frequency:0";

act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
@@ -65,6 +65,10 @@
clock-frequency = <100000>;
};

&i2c2 {
clock-frequency = <100000>;
};

&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
@@ -79,7 +83,9 @@
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2c2_iknowwhatimdoing = <&i2c2>,"status";
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
i2c1_baudrate = <&i2c1>,"clock-frequency:0";
i2c2_baudrate = <&i2c2>,"clock-frequency:0";
};
};
@@ -20,6 +20,7 @@
uart1 = &uart1;
mmc = &mmc;
i2c1 = &i2c1;
i2c2 = &i2c2;
usb = &usb;
leds = &leds;
fb = &fb;
@@ -183,6 +184,19 @@
status = "disabled";
};

i2c2: i2c@7e805000 {
// Beware - this is shared with the HDMI module.
// Careless use may break (really) your display.
// Caveat emptor.
compatible = "brcm,bcm2708-i2c";
reg = <0x7e805000 0x1000>;
interrupts = <2 21>;
clocks = <&clk_i2c>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};

usb: usb@7e980000 {
compatible = "brcm,bcm2708-usb";
reg = <0x7e980000 0x10000>,
@@ -75,6 +75,10 @@
clock-frequency = <100000>;
};

&i2c2 {
clock-frequency = <100000>;
};

&i2s {
#sound-dai-cells = <0>;
pinctrl-names = "default";
@@ -103,8 +107,10 @@
spi = <&spi0>,"status";
i2c0 = <&i2c0>,"status";
i2c1 = <&i2c1>,"status";
i2c2_iknowwhatimdoing = <&i2c2>,"status";
i2c0_baudrate = <&i2c0>,"clock-frequency:0";
i2c1_baudrate = <&i2c1>,"clock-frequency:0";
i2c2_baudrate = <&i2c2>,"clock-frequency:0";

act_led_gpio = <&act_led>,"gpios:4";
act_led_activelow = <&act_led>,"gpios:8";
@@ -407,8 +407,11 @@ static int bcm2708_i2c_probe(struct platform_device *pdev)
case 1:
adap->class = I2C_CLASS_DDC;
break;
case 2:
adap->class = I2C_CLASS_DDC;
break;
default:
dev_err(&pdev->dev, "can only bind to BSC 0 or 1\n");
dev_err(&pdev->dev, "can only bind to BSC 0, 1 or 2\n");
err = -ENXIO;
goto out_free_bi;
}

0 comments on commit c6f0998

Please sign in to comment.