diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2015-05-27 13:20:21 -0500 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-10-13 14:18:17 +0000 |
commit | 2b74c3f4fe22954d3718afa0120c18a53fa0dde3 (patch) | |
tree | cbb3a7e0c4ebb6aeec18adcdafe1ea6c0995018f | |
parent | 9268e6bf7ba2a6832c0288555bf592a63614a754 (diff) | |
download | linux-2b74c3f4fe22954d3718afa0120c18a53fa0dde3.tar.gz |
rpi2 setup
Fix up device tree and i2c setup for rpi2
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
-rw-r--r-- | arch/arm/boot/dts/bcm2708_common.dtsi | 2 | ||||
-rw-r--r-- | arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 6 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-bcm2708.c | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi index 7eccfeee129e..13055909ef92 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -155,7 +155,7 @@ }; i2c2: i2c@7e805000 { - compatible = "brcm,bcm2835-i2c"; + compatible = "brcm,bcm2708-i2c"; reg = <0x7e805000 0x1000>; interrupts = <2 21>; clocks = <&clk_i2c>; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts index 8aaaf1fb7143..712ca455cc46 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -11,6 +11,7 @@ spi0 = &spi0; i2c0 = &i2c0; i2c1 = &i2c1; + i2c2 = &i2c2; i2s = &i2s; gpio = &gpio; intc = &intc; @@ -94,6 +95,11 @@ clock-frequency = <100000>; }; +&i2c2 { + pinctrl-names = "default"; + clock-frequency = <100000>; +}; + &i2s { #sound-dai-cells = <0>; pinctrl-names = "default"; diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c index 8773203b34eb..2054ff44e744 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -109,6 +109,7 @@ static void bcm2708_i2c_init_pinmode(int id) #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) int pin; + u32 *gpio = ioremap(GPIO_BASE, SZ_16K); BUG_ON(id != 0 && id != 1); @@ -382,7 +383,7 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) goto out_clk_put; } - if (!pdev->dev.of_node) + if (pdev->id < 2) bcm2708_i2c_init_pinmode(pdev->id); bi = kzalloc(sizeof(*bi), GFP_KERNEL); @@ -407,6 +408,9 @@ 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"); err = -ENXIO; |