diff mbox

[v2,2/4] ARM: dts: r8a7790: lager: use demuxer for IIC1/I2C1

Message ID 1465370066-8450-3-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Horman June 8, 2016, 7:14 a.m. UTC
Make it possible to select which I2C1 IP core you want to run on the
EXIO-A connector.

This is based on reference work for the I2C0 core of the lager by Wolfram Sang.

Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7790-lager.dts | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

Comments

Wolfram Sang June 13, 2016, 2:33 p.m. UTC | #1
On Wed, Jun 08, 2016 at 04:14:24PM +0900, Simon Horman wrote:
> Make it possible to select which I2C1 IP core you want to run on the
> EXIO-A connector.
> 
> This is based on reference work for the I2C0 core of the lager by Wolfram Sang.
> 
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Given the PFC problem gets solved, why can't you switch to GP1_16 and
GP1_17 for those?
Simon Horman June 15, 2016, 4:12 a.m. UTC | #2
On Mon, Jun 13, 2016 at 04:33:04PM +0200, Wolfram Sang wrote:
> On Wed, Jun 08, 2016 at 04:14:24PM +0900, Simon Horman wrote:
> > Make it possible to select which I2C1 IP core you want to run on the
> > EXIO-A connector.
> > 
> > This is based on reference work for the I2C0 core of the lager by Wolfram Sang.
> > 
> > Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Given the PFC problem gets solved, why can't you switch to GP1_16 and
> GP1_17 for those?

Thanks, I missed that. I will see about making it so.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 71d62ca282ea..20abb1470f91 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -51,6 +51,7 @@ 
 		serial0 = &scif0;
 		serial1 = &scifa1;
 		i2c8 = "i2cexio0";
+		i2c9 = "i2cexio1";
 	};
 
 	chosen {
@@ -270,6 +271,18 @@ 
 		#address-cells = <1>;
 		#size-cells = <0>;
 	};
+
+	/*
+	 * IIC1/I2C1 is routed to EXIO connector A, pins 78 (SCL) + 80 (SDA).
+	 * For further notes see i2cexio0.
+	 */
+	i2cexio1: i2c-9 {
+		compatible = "i2c-demux-pinctrl";
+		i2c-parent = <&iic1>, <&i2c1>;
+		i2c-bus-name = "i2c-exio1";
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
 };
 
 &du {
@@ -392,6 +405,11 @@ 
 		function = "iic0";
 	};
 
+	i2c1_pins: i2c1 {
+		groups = "i2c1";
+		function = "i2c1";
+	};
+
 	iic1_pins: iic1 {
 		groups = "iic1";
 		function = "iic1";
@@ -588,10 +606,14 @@ 
 	pinctrl-names = "i2c-exio0";
 };
 
+&i2c1	{
+	pinctrl-0 = <&i2c1_pins>;
+	pinctrl-names = "i2c-exio1";
+};
+
 &iic1	{
-	status = "okay";
 	pinctrl-0 = <&iic1_pins>;
-	pinctrl-names = "default";
+	pinctrl-names = "i2c-exio1";
 };
 
 &iic2	{