ARM: dts: r8a7790: lager: use demuxer for IIC0/I2C0
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 15 Feb 2016 12:57:49 +0000 (13:57 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Thu, 25 Feb 2016 04:12:32 +0000 (13:12 +0900)
Make it possible to select which I2C IP core you want to run on the
EXIO-A connector. This is the reference how to use this feature. Update
the copyright while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r8a7790-lager.dts

index cdc0414f5f0716dde7bc454cb656173dc418f012..aa6ca92a9485b37278aa0c2a0a5519e5a84b0041 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 2013-2014 Renesas Solutions Corp.
  * Copyright (C) 2014 Cogent Embedded, Inc.
+ * Copyright (C) 2015-2016 Renesas Electronics Corporation
  *
  * This file is licensed under the terms of the GNU General Public License
  * version 2.  This program is licensed "as is" without any warranty of any
@@ -49,6 +50,7 @@
        aliases {
                serial0 = &scif0;
                serial1 = &scifa1;
+               i2c8 = "i2cexio";
        };
 
        chosen {
                #clock-cells = <0>;
                clock-frequency = <148500000>;
        };
+
+       /*
+        * IIC0/I2C0 is routed to EXIO connector A, pins 114 (SCL) + 116 (SDA) only.
+        * We use the I2C demuxer, so the desired IP core can be selected at runtime
+        * depending on the use case (e.g. DMA with IIC0 or slave support with I2C0).
+        * Note: For testing the I2C slave feature, it is convenient to connect this
+        * bus with IIC3 on pins 110 (SCL) + 112 (SDA), select I2C0 at runtime, and
+        * instantiate the slave device at runtime according to the documentation.
+        * You can then communicate with the slave via IIC3.
+        */
+       i2cexio: i2c@8 {
+               compatible = "i2c-demux-pinctrl";
+               i2c-parent = <&iic0>, <&i2c0>;
+               i2c-bus-name = "i2c-exio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
 };
 
 &du {
                renesas,function = "msiof1";
        };
 
+       i2c0_pins: i2c0 {
+               renesas,groups = "i2c0";
+               renesas,function = "i2c0";
+       };
+
        iic0_pins: iic0 {
                renesas,groups = "iic0";
                renesas,function = "iic0";
        cpu0-supply = <&vdd_dvfs>;
 };
 
+&i2c0  {
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "i2c-exio";
+};
+
 &iic0  {
-       status = "okay";
        pinctrl-0 = <&iic0_pins>;
-       pinctrl-names = "default";
+       pinctrl-names = "i2c-exio";
 };
 
 &iic1  {