diff mbox

[PATCHv4,7/9] ARM: sun5i: dt: Add i2c muxing options

Message ID 1371024438-16631-8-git-send-email-maxime.ripard@free-electrons.com
State Superseded
Headers show

Commit Message

Maxime Ripard June 12, 2013, 8:07 a.m. UTC
The i2c controller found on the Allwinner A13 has only one muxing option
available for each controller. Add them to the dtsi

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 arch/arm/boot/dts/sun5i-a13.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Henrik Nordström June 12, 2013, 8:29 a.m. UTC | #1
ons 2013-06-12 klockan 10:07 +0200 skrev Maxime Ripard:

> +			i2c0_pins_a: i2c0@0 {
> +				allwinner,pins = "PB0", "PB1";
> +				allwinner,function = "i2c0";
> +				allwinner,drive = <0>;
> +				allwinner,pull = <0>;

Is this right? All other use pull = 1.

I guess it's board dependent depending on if there is external pullups
or not on the i2c bus. I have seen Allwinner designs both with and
without external pullups.

It will not work well if there is neither internal or external pullup.
And may stress the i2c components a bit if there is both..

Regards
Henrik

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Maxime Ripard June 12, 2013, 11:20 a.m. UTC | #2
Hi Henrik,

On Wed, Jun 12, 2013 at 10:29:48AM +0200, Henrik Nordström wrote:
> ons 2013-06-12 klockan 10:07 +0200 skrev Maxime Ripard:
> 
> > +			i2c0_pins_a: i2c0@0 {
> > +				allwinner,pins = "PB0", "PB1";
> > +				allwinner,function = "i2c0";
> > +				allwinner,drive = <0>;
> > +				allwinner,pull = <0>;
> 
> Is this right? All other use pull = 1.

Ah, true.

> I guess it's board dependent depending on if there is external pullups
> or not on the i2c bus. I have seen Allwinner designs both with and
> without external pullups.
> 
> It will not work well if there is neither internal or external pullup.
> And may stress the i2c components a bit if there is both..

Yes, but it's a default, so by definition, it won't suit everyone. Yet,
it has to be there. And every board is free to override that default in
its own DT anyway, so it's not really a big issue. But like you pointed
at, we have to be consistent.

I'll disable the pull-ups in the next iteration for every node.

Maxime
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 31ebfd7..bca0af3 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -184,6 +184,27 @@ 
 				allwinner,drive = <0>;
 				allwinner,pull = <0>;
 			};
+
+			i2c0_pins_a: i2c0@0 {
+				allwinner,pins = "PB0", "PB1";
+				allwinner,function = "i2c0";
+				allwinner,drive = <0>;
+				allwinner,pull = <0>;
+			};
+
+			i2c1_pins_a: i2c1@0 {
+				allwinner,pins = "PB15", "PB16";
+				allwinner,function = "i2c1";
+				allwinner,drive = <0>;
+				allwinner,pull = <1>;
+			};
+
+			i2c2_pins_a: i2c2@0 {
+				allwinner,pins = "PB17", "PB18";
+				allwinner,function = "i2c2";
+				allwinner,drive = <0>;
+				allwinner,pull = <1>;
+			};
 		};
 
 		timer@01c20c00 {