diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2016-11-06 21:20:23 +0100 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2016-11-23 20:52:22 +0100 |
commit | 6723438b3b98ba8434655fa13fc6d5153f70ee98 (patch) | |
tree | 4188a1a0a146b05c0dfd4189e41f7af8c525a7db /arch/arm/boot/dts/r8a7791-koelsch.dts | |
parent | b2f15ca697a11c8df64ac6c8086ababc5c9e6060 (diff) | |
download | blackbird-obmc-linux-6723438b3b98ba8434655fa13fc6d5153f70ee98.tar.gz blackbird-obmc-linux-6723438b3b98ba8434655fa13fc6d5153f70ee98.zip |
ARM: dts: koelsch: use demuxer for I2C1
Make it possible to fallback to GPIO for I2C1 on the EXIO-C connector.
This is based on reference work for the I2C0 core of the lager/r8a7790
by Wolfram Sang.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
[wsa: rebased and fixed aliases]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'arch/arm/boot/dts/r8a7791-koelsch.dts')
-rw-r--r-- | arch/arm/boot/dts/r8a7791-koelsch.dts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts index c457b43deb7d..d5c80e6bff22 100644 --- a/arch/arm/boot/dts/r8a7791-koelsch.dts +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts @@ -50,6 +50,8 @@ aliases { serial0 = &scif0; serial1 = &scif1; + i2c9 = &gpioi2c1; + i2c12 = &i2cexio1; }; chosen { @@ -298,6 +300,29 @@ #clock-cells = <0>; clock-frequency = <148500000>; }; + + gpioi2c1: i2c-9 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + status = "disabled"; + gpios = <&gpio7 16 GPIO_ACTIVE_HIGH /* sda */ + &gpio7 15 GPIO_ACTIVE_HIGH /* scl */ + >; + i2c-gpio,delay-us = <5>; + }; + + /* + * I2C1 is routed to EXIO connector B, pins 64 (SCL) + 66 (SDA). + * A fallback to GPIO is provided. + */ + i2cexio1: i2c-12 { + compatible = "i2c-demux-pinctrl"; + i2c-parent = <&i2c1>, <&gpioi2c1>; + i2c-bus-name = "i2c-exio1"; + #address-cells = <1>; + #size-cells = <0>; + }; }; &du { @@ -333,6 +358,11 @@ pinctrl-0 = <&scif_clk_pins>; pinctrl-names = "default"; + i2c1_pins: i2c1 { + groups = "i2c1"; + function = "i2c1"; + }; + i2c2_pins: i2c2 { groups = "i2c2"; function = "i2c2"; @@ -581,6 +611,11 @@ }; }; +&i2c1 { + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "i2c-exio1"; +}; + &i2c2 { pinctrl-0 = <&i2c2_pins>; pinctrl-names = "default"; |