All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms+renesas@verge.net.au>
To: linux-renesas-soc@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms+renesas@verge.net.au>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH 07/31] ARM: dts: alt: use demuxer for I2C4
Date: Wed, 23 Nov 2016 21:14:14 +0100	[thread overview]
Message-ID: <e60a19f03cdb5a16fdad72d0776a1ede10fd2a57.1479931686.git.horms+renesas@verge.net.au> (raw)
In-Reply-To: <cover.1479931686.git.horms+renesas@verge.net.au>

Make it possible to fallback to GPIO for I2C4 on the EXIO-B 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>
---
 arch/arm/boot/dts/r8a7794-alt.dts | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index a3e74684289b..7270d4224b1a 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -18,6 +18,8 @@
 
 	aliases {
 		serial0 = &scif2;
+		i2c10 = &gpioi2c4;
+		i2c12 = &i2cexio4;
 	};
 
 	chosen {
@@ -135,6 +137,29 @@
 		#clock-cells = <0>;
 		clock-frequency = <148500000>;
 	};
+
+	gpioi2c4: i2c-10 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "i2c-gpio";
+		status = "disabled";
+		gpios = <&gpio4 9 GPIO_ACTIVE_HIGH /* sda */
+			 &gpio4 8 GPIO_ACTIVE_HIGH /* scl */
+			>;
+		i2c-gpio,delay-us = <5>;
+	};
+
+	/*
+	 * I2C4 is routed to EXIO connector B, pins 73 (SCL) + 74 (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 {
@@ -194,6 +219,11 @@
 		function = "i2c1";
 	};
 
+	i2c4_pins: i2c4 {
+		groups = "i2c4";
+		function = "i2c4";
+	};
+
 	vin0_pins: vin0 {
 		groups = "vin0_data8", "vin0_clk";
 		function = "vin0";
@@ -314,6 +344,11 @@
 	};
 };
 
+&i2c4 {
+	pinctrl-0 = <&i2c4_pins>;
+	pinctrl-names = "i2c-exio4";
+};
+
 &vin0 {
 	status = "okay";
 	pinctrl-0 = <&vin0_pins>;
-- 
2.7.0.rc3.207.g0ac5344

WARNING: multiple messages have this Message-ID (diff)
From: horms+renesas@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/31] ARM: dts: alt: use demuxer for I2C4
Date: Wed, 23 Nov 2016 21:14:14 +0100	[thread overview]
Message-ID: <e60a19f03cdb5a16fdad72d0776a1ede10fd2a57.1479931686.git.horms+renesas@verge.net.au> (raw)
In-Reply-To: <cover.1479931686.git.horms+renesas@verge.net.au>

Make it possible to fallback to GPIO for I2C4 on the EXIO-B 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>
---
 arch/arm/boot/dts/r8a7794-alt.dts | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index a3e74684289b..7270d4224b1a 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -18,6 +18,8 @@
 
 	aliases {
 		serial0 = &scif2;
+		i2c10 = &gpioi2c4;
+		i2c12 = &i2cexio4;
 	};
 
 	chosen {
@@ -135,6 +137,29 @@
 		#clock-cells = <0>;
 		clock-frequency = <148500000>;
 	};
+
+	gpioi2c4: i2c-10 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "i2c-gpio";
+		status = "disabled";
+		gpios = <&gpio4 9 GPIO_ACTIVE_HIGH /* sda */
+			 &gpio4 8 GPIO_ACTIVE_HIGH /* scl */
+			>;
+		i2c-gpio,delay-us = <5>;
+	};
+
+	/*
+	 * I2C4 is routed to EXIO connector B, pins 73 (SCL) + 74 (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 {
@@ -194,6 +219,11 @@
 		function = "i2c1";
 	};
 
+	i2c4_pins: i2c4 {
+		groups = "i2c4";
+		function = "i2c4";
+	};
+
 	vin0_pins: vin0 {
 		groups = "vin0_data8", "vin0_clk";
 		function = "vin0";
@@ -314,6 +344,11 @@
 	};
 };
 
+&i2c4 {
+	pinctrl-0 = <&i2c4_pins>;
+	pinctrl-names = "i2c-exio4";
+};
+
 &vin0 {
 	status = "okay";
 	pinctrl-0 = <&vin0_pins>;
-- 
2.7.0.rc3.207.g0ac5344

  parent reply	other threads:[~2016-11-23 20:15 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 20:14 [GIT PULL v2] Second Round of Renesas ARM Based SoC DT Updates for v4.10 Simon Horman
2016-11-23 20:14 ` Simon Horman
2016-11-23 20:14 ` [PATCH 01/31] ARM: dts: alt: Fix PFC names for DU Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 02/31] ARM: dts: r8a7794: Correct hsusb parent clock Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 03/31] ARM: dts: r8a7794: Use SYSC "always-on" PM Domain for sound Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 04/31] ARM: dts: lager: rename and reindex i2cexio Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 05/31] ARM: dts: lager: use demuxer for IIC1/I2C1 Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 06/31] ARM: dts: koelsch: use demuxer for I2C1 Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` Simon Horman [this message]
2016-11-23 20:14   ` [PATCH 07/31] ARM: dts: alt: use demuxer for I2C4 Simon Horman
2016-11-23 20:14 ` [PATCH 08/31] ARM: dts: lager: Enable UHS-I SDR-104 Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 09/31] ARM: dts: koelsch: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 10/31] ARM: dts: alt: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 11/31] ARM: dts: r8a7743: initial SoC device tree Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 12/31] ARM: dts: r8a7743: add SYS-DMAC support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 13/31] ARM: dts: r8a7743: add [H]SCIF{A|B} support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 14/31] ARM: dts: r8a7743: add Ether support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 15/31] ARM: dts: r8a7743: add IRQC support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 16/31] ARM: dts: sk-rzg1m: initial device tree Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 17/31] ARM: dts: sk-rzg1m: add Ether support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 18/31] ARM: dts: r8a7745: initial SoC device tree Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 19/31] ARM: dts: r8a7745: add SYS-DMAC support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 20/31] ARM: dts: r8a7745: add [H]SCIF{|A|B} support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 21/31] ARM: dts: r8a7745: add Ether support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 22/31] ARM: dts: r8a7745: add IRQC support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 23/31] ARM: dts: sk-rzg1e: initial device tree Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 24/31] ARM: dts: sk-rzg1e: add Ether support Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 25/31] ARM: dts: r8a73a4: Add device node for PRR Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 26/31] ARM: dts: r8a7779: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 27/31] ARM: dts: r8a7790: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 28/31] ARM: dts: r8a7791: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 29/31] ARM: dts: r8a7792: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 30/31] ARM: dts: r8a7793: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-23 20:14 ` [PATCH 31/31] ARM: dts: r8a7794: " Simon Horman
2016-11-23 20:14   ` Simon Horman
2016-11-30 15:45 ` [GIT PULL v2] Second Round of Renesas ARM Based SoC DT Updates for v4.10 Arnd Bergmann
2016-11-30 15:45   ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2016-11-17 14:11 [GIT PULL] " Simon Horman
2016-11-17 14:11 ` [PATCH 07/31] ARM: dts: alt: use demuxer for I2C4 Simon Horman
2016-11-17 14:11   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e60a19f03cdb5a16fdad72d0776a1ede10fd2a57.1479931686.git.horms+renesas@verge.net.au \
    --to=horms+renesas@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.