]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: dts: koelsch: use demuxer for I2C4
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 6 Feb 2018 22:29:53 +0000 (23:29 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 12 Feb 2018 12:50:58 +0000 (13:50 +0100)
Make it possible to fallback to GPIO for I2C4 on the EXIO-E 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, fixed aliases, switched to named GPIOS, fixed pinmux for I2C4]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
arch/arm/boot/dts/r8a7791-koelsch.dts

index 4b20db197de6293e1d5a95ce46dfcaed4eb4cee1..f40321a1c917e7d1c7546176319541a0da37ba08 100644 (file)
@@ -52,8 +52,10 @@ aliases {
                serial1 = &scif1;
                i2c9 = &gpioi2c1;
                i2c10 = &gpioi2c2;
+               i2c11 = &gpioi2c4;
                i2c12 = &i2cexio1;
                i2c13 = &i2chdmi;
+               i2c14 = &i2cexio4;
        };
 
        chosen {
@@ -329,6 +331,16 @@ gpioi2c2: i2c-10 {
                i2c-gpio,delay-us = <5>;
        };
 
+       gpioi2c4: i2c-11 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "i2c-gpio";
+               status = "disabled";
+               scl-gpios = <&gpio7 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               sda-gpios = <&gpio7 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               i2c-gpio,delay-us = <5>;
+       };
+
        /*
         * I2C1 is routed to EXIO connector B, pins 64 (SCL) + 66 (SDA).
         * A fallback to GPIO is provided.
@@ -437,6 +449,18 @@ eeprom@50 {
                        pagesize = <16>;
                };
        };
+
+       /*
+        * I2C4 is routed to EXIO connector E, pins 37 (SCL) + 39 (SDA).
+        * A fallback to GPIO is provided.
+        */
+       i2cexio4: i2c-14 {
+               compatible = "i2c-demux-pinctrl";
+               i2c-parent = <&i2c4>, <&gpioi2c4>;
+               i2c-bus-name = "i2c-exio4";
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
 };
 
 &du {
@@ -480,6 +504,11 @@ i2c2_pins: i2c2 {
                function = "i2c2";
        };
 
+       i2c4_pins: i2c4 {
+               groups = "i2c4_c";
+               function = "i2c4";
+       };
+
        du_pins: du {
                groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
                function = "du";
@@ -735,6 +764,11 @@ &i2c2 {
        clock-frequency = <100000>;
 };
 
+&i2c4 {
+       pinctrl-0 = <&i2c4_pins>;
+       pinctrl-names = "i2c-exio4";
+};
+
 &i2c6 {
        status = "okay";
        clock-frequency = <100000>;