diff mbox

[04/04,v2] ARM: shmobile: Genmai I2C-over-GPIO support

Message ID 20131217050324.727.61701.sendpatchset@w520 (mailing list archive)
State Deferred
Headers show

Commit Message

Magnus Damm Dec. 17, 2013, 5:03 a.m. UTC
From: Magnus Damm <damm@opensource.se>

Add support for the Genmai I2C bus hooked up to P1_5 and P1_4 using
the i2c-gpio driver. On the bus sits a 24c128 EEPRROM.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 Changes since V1:
 - Use compatible string "renesas,12c128" and set pagesize, thanks Wolfram!
 - Use "flash@50", thanks Sergei!

 arch/arm/boot/dts/r7s72100-genmai-reference.dts |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Wolfram Sang Dec. 17, 2013, 4:34 p.m. UTC | #1
On Tue, Dec 17, 2013 at 02:03:24PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Add support for the Genmai I2C bus hooked up to P1_5 and P1_4 using
> the i2c-gpio driver. On the bus sits a 24c128 EEPRROM.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>

Acked-by: Wolfram Sang <wsa@the-dreams.de>
Simon Horman Jan. 8, 2014, 12:41 a.m. UTC | #2
On Tue, Dec 17, 2013 at 05:34:36PM +0100, Wolfram Sang wrote:
> On Tue, Dec 17, 2013 at 02:03:24PM +0900, Magnus Damm wrote:
> > From: Magnus Damm <damm@opensource.se>
> > 
> > Add support for the Genmai I2C bus hooked up to P1_5 and P1_4 using
> > the i2c-gpio driver. On the bus sits a 24c128 EEPRROM.
> > 
> > Signed-off-by: Magnus Damm <damm@opensource.se>
> 
> Acked-by: Wolfram Sang <wsa@the-dreams.de>

Hi Magnus, Hi Wolfram,

could you clarify the status of this patch for me?

I believe it is reverted by "[PATCH V2 4/5] arm: shmobile: genmai: adapt
dts to use native i2c driver".

I'm fine with applying both patches at some point. But perhaps
we can skip some dependencies by just applying a squashed version?

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang Jan. 8, 2014, 11:23 a.m. UTC | #3
> could you clarify the status of this patch for me?
> 
> I believe it is reverted by "[PATCH V2 4/5] arm: shmobile: genmai: adapt
> dts to use native i2c driver".
> 
> I'm fine with applying both patches at some point. But perhaps
> we can skip some dependencies by just applying a squashed version?

If we keep this patch and my one on top of it, we need the PFC series.
If we skip this patch and use my native I2C right from the beginning, we
can skip the PFC series and have i2c support right away. I'd prefer the
latter. I am about to push a branch to my tree that does the latter
these minutes.
Simon Horman Jan. 9, 2014, 4:35 a.m. UTC | #4
On Wed, Jan 08, 2014 at 12:23:59PM +0100, Wolfram Sang wrote:
> 
> > could you clarify the status of this patch for me?
> > 
> > I believe it is reverted by "[PATCH V2 4/5] arm: shmobile: genmai: adapt
> > dts to use native i2c driver".
> > 
> > I'm fine with applying both patches at some point. But perhaps
> > we can skip some dependencies by just applying a squashed version?
> 
> If we keep this patch and my one on top of it, we need the PFC series.
> If we skip this patch and use my native I2C right from the beginning, we
> can skip the PFC series and have i2c support right away. I'd prefer the
> latter. I am about to push a branch to my tree that does the latter
> these minutes.

I think I prefer the latter too.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- 0011/arch/arm/boot/dts/r7s72100-genmai-reference.dts
+++ work/arch/arm/boot/dts/r7s72100-genmai-reference.dts	2013-12-16 20:08:48.000000000 +0900
@@ -39,6 +39,24 @@ 
 			gpios = <&port4 11 GPIO_ACTIVE_LOW>;
 		};
 	};
+
+	i2c@0 {
+		compatible = "i2c-gpio";
+		gpios = <&port1 5 GPIO_ACTIVE_HIGH /* sda */
+			 &port1 4 GPIO_ACTIVE_HIGH /* scl */
+			>;
+		i2c-gpio,sda-open-drain;
+		i2c-gpio,scl-open-drain;
+		i2c-gpio,delay-us = <5>;	/* ~100 kHz */
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		flash@50 {
+			compatible = "renesas,24c128";
+			reg = <0x50>;
+			pagesize = <64>;
+		};
+	};
 };
 
 &pfc {