* [PATCH 0/2] ARM: berlin: BG2Q I2C support
@ 2014-06-03 7:33 Antoine Ténart
2014-06-03 7:33 ` [PATCH 1/2] ARM: dts: berlin: add I2C nodes for BG2Q Antoine Ténart
2014-06-03 7:33 ` [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2 Antoine Ténart
0 siblings, 2 replies; 9+ messages in thread
From: Antoine Ténart @ 2014-06-03 7:33 UTC (permalink / raw)
To: linux-arm-kernel
This series adds the I2C nodes for the Marvell Berlin BG2Q SoC. It also
enables I2C0 and I2C2 for the BG2Q DMP.
The Marvell Berlin BG2Q has 4 TWSI compatible with the Synopsys
DesignWare I2C driver.
Antoine T?nart (2):
ARM: dts: berlin: add I2C nodes for BG2Q
ARM: dts: berlin: enable i2c0 and i2c1
arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 8 ++++
arch/arm/boot/dts/berlin2q.dtsi | 72 ++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+)
--
1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] ARM: dts: berlin: add I2C nodes for BG2Q
2014-06-03 7:33 [PATCH 0/2] ARM: berlin: BG2Q I2C support Antoine Ténart
@ 2014-06-03 7:33 ` Antoine Ténart
2014-06-16 11:22 ` Sebastian Hesselbarth
2014-06-03 7:33 ` [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2 Antoine Ténart
1 sibling, 1 reply; 9+ messages in thread
From: Antoine Ténart @ 2014-06-03 7:33 UTC (permalink / raw)
To: linux-arm-kernel
The Marvell Berlin BG2Q has 4 TWSI compatible with the Synopsys
DesignWare I2C driver. Add the corresponding nodes.
The pin-muxing setup is also done here, since there cannot be another
muxing setup if I2C{0,1,2,3} are enabled.
Signed-off-by: Antoine T?nart <antoine.tenart@free-electrons.com>
---
arch/arm/boot/dts/berlin2q.dtsi | 72 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
index 635a16a64cb4..0624868e36e3 100644
--- a/arch/arm/boot/dts/berlin2q.dtsi
+++ b/arch/arm/boot/dts/berlin2q.dtsi
@@ -191,6 +191,32 @@
};
};
+ i2c0: i2c at 1400 {
+ compatible = "snps,designware-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1400 0x100>;
+ interrupt-parent = <&aic>;
+ interrupts = <4>;
+ clocks = <&chip CLKID_CFG>;
+ pinctrl-0 = <&twsi0_pmux>;
+ pinctrl-names = "default";
+ status = "disabled";
+ };
+
+ i2c1: i2c at 1800 {
+ compatible = "snps,designware-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1800 0x100>;
+ interrupt-parent = <&aic>;
+ interrupts = <5>;
+ clocks = <&chip CLKID_CFG>;
+ pinctrl-0 = <&twsi1_pmux>;
+ pinctrl-names = "default";
+ status = "disabled";
+ };
+
timer0: timer at 2c00 {
compatible = "snps,dw-apb-timer";
reg = <0x2c00 0x14>;
@@ -301,6 +327,16 @@
reg = <0xea0000 0x400>, <0xdd0170 0x10>;
clocks = <&refclk>;
clock-names = "refclk";
+
+ twsi0_pmux: twsi0-pmux {
+ groups = "G6";
+ function = "twsi0";
+ };
+
+ twsi1_pmux: twsi1-pmux {
+ groups = "G7";
+ function = "twsi1";
+ };
};
apb at fc0000 {
@@ -311,6 +347,32 @@
ranges = <0 0xfc0000 0x10000>;
interrupt-parent = <&sic>;
+ i2c2: i2c at 7000 {
+ compatible = "snps,designware-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x7000 0x100>;
+ interrupt-parent = <&sic>;
+ interrupts = <6>;
+ clocks = <&refclk>;
+ pinctrl-0 = <&twsi2_pmux>;
+ pinctrl-names = "default";
+ status = "disabled";
+ };
+
+ i2c3: i2c at 8000 {
+ compatible = "snps,designware-i2c";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x8000 0x100>;
+ interrupt-parent = <&sic>;
+ interrupts = <7>;
+ clocks = <&refclk>;
+ pinctrl-0 = <&twsi3_pmux>;
+ pinctrl-names = "default";
+ status = "disabled";
+ };
+
uart0: uart at 9000 {
compatible = "snps,dw-apb-uart";
reg = <0x9000 0x100>;
@@ -348,6 +410,16 @@
groups = "GSM14";
function = "uart1";
};
+
+ twsi2_pmux: twsi2-pmux {
+ groups = "GSM13";
+ function = "twsi2";
+ };
+
+ twsi3_pmux: twsi3-pmux {
+ groups = "GSM14";
+ function = "twsi3";
+ };
};
sic: interrupt-controller at e000 {
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2
2014-06-03 7:33 [PATCH 0/2] ARM: berlin: BG2Q I2C support Antoine Ténart
2014-06-03 7:33 ` [PATCH 1/2] ARM: dts: berlin: add I2C nodes for BG2Q Antoine Ténart
@ 2014-06-03 7:33 ` Antoine Ténart
2014-06-03 8:05 ` Andrew Lunn
2014-06-16 11:23 ` Sebastian Hesselbarth
1 sibling, 2 replies; 9+ messages in thread
From: Antoine Ténart @ 2014-06-03 7:33 UTC (permalink / raw)
To: linux-arm-kernel
Enable the I2C0 and I2C2 for the Marvell Berlin BG2G DMP. I2C1 and I2C3
are also working on this board, but no devices seemed to be there.
Signed-off-by: Antoine T?nart <antoine.tenart@free-electrons.com>
---
arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
index 995150f93795..a357ce02a64e 100644
--- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
+++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
@@ -34,6 +34,14 @@
status = "okay";
};
+&i2c0 {
+ status = "okay";
+};
+
+&i2c2 {
+ status = "okay";
+};
+
&uart0 {
status = "okay";
};
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2
2014-06-03 7:33 ` [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2 Antoine Ténart
@ 2014-06-03 8:05 ` Andrew Lunn
2014-06-04 16:48 ` Antoine Ténart
2014-06-16 11:23 ` Sebastian Hesselbarth
1 sibling, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2014-06-03 8:05 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 03, 2014 at 09:33:10AM +0200, Antoine T?nart wrote:
> Enable the I2C0 and I2C2 for the Marvell Berlin BG2G DMP. I2C1 and I2C3
> are also working on this board, but no devices seemed to be there.
Hi Antoine
Does this mean that IC0 and I2C2 have devices on them? Could you also
add nodes for the devices?
Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2
2014-06-03 8:05 ` Andrew Lunn
@ 2014-06-04 16:48 ` Antoine Ténart
2014-06-04 17:03 ` Andrew Lunn
0 siblings, 1 reply; 9+ messages in thread
From: Antoine Ténart @ 2014-06-04 16:48 UTC (permalink / raw)
To: linux-arm-kernel
Hi Andrew,
On Tue, Jun 03, 2014 at 10:05:22AM +0200, Andrew Lunn wrote:
> On Tue, Jun 03, 2014 at 09:33:10AM +0200, Antoine T?nart wrote:
> > Enable the I2C0 and I2C2 for the Marvell Berlin BG2G DMP. I2C1 and I2C3
> > are also working on this board, but no devices seemed to be there.
>
> Does this mean that IC0 and I2C2 have devices on them? Could you also
> add nodes for the devices?
No devices I can add for now. I you prefer we can drop this patch, keep
the other one and enable i2c nodes for the BG2Q DMP when they will be
needed.
Antoine
--
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2
2014-06-04 16:48 ` Antoine Ténart
@ 2014-06-04 17:03 ` Andrew Lunn
2014-06-04 17:37 ` Antoine Ténart
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2014-06-04 17:03 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 04, 2014 at 06:48:41PM +0200, Antoine T?nart wrote:
> Hi Andrew,
>
> On Tue, Jun 03, 2014 at 10:05:22AM +0200, Andrew Lunn wrote:
> > On Tue, Jun 03, 2014 at 09:33:10AM +0200, Antoine T?nart wrote:
> > > Enable the I2C0 and I2C2 for the Marvell Berlin BG2G DMP. I2C1 and I2C3
> > > are also working on this board, but no devices seemed to be there.
> >
> > Does this mean that IC0 and I2C2 have devices on them? Could you also
> > add nodes for the devices?
>
> No devices I can add for now. I you prefer we can drop this patch, keep
> the other one and enable i2c nodes for the BG2Q DMP when they will be
> needed.
Hi Antoine
I was just wondering how you tested it, without having any devices?
Is it that the devices on the bus don't have mainline drivers?
I don't see a reason not to commit both. At least it allows i2c-detect
to work and see what is on the bus, even if we cannot drive them.
Thanks
Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2
2014-06-04 17:03 ` Andrew Lunn
@ 2014-06-04 17:37 ` Antoine Ténart
0 siblings, 0 replies; 9+ messages in thread
From: Antoine Ténart @ 2014-06-04 17:37 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 04, 2014 at 07:03:40PM +0200, Andrew Lunn wrote:
> On Wed, Jun 04, 2014 at 06:48:41PM +0200, Antoine T?nart wrote:
> >
> > On Tue, Jun 03, 2014 at 10:05:22AM +0200, Andrew Lunn wrote:
> > > On Tue, Jun 03, 2014 at 09:33:10AM +0200, Antoine T?nart wrote:
> > > > Enable the I2C0 and I2C2 for the Marvell Berlin BG2G DMP. I2C1 and I2C3
> > > > are also working on this board, but no devices seemed to be there.
> > >
> > > Does this mean that IC0 and I2C2 have devices on them? Could you also
> > > add nodes for the devices?
> >
> > No devices I can add for now. I you prefer we can drop this patch, keep
> > the other one and enable i2c nodes for the BG2Q DMP when they will be
> > needed.
>
> I was just wondering how you tested it, without having any devices?
I tested with the i2ctools. I could see one device on each bus at the
address it should be. I also tested the pin muxing configurations.
I don't have lots of information on these I2C buses, at least my test
results match what I know.
> Is it that the devices on the bus don't have mainline drivers?
Not with I2C support.
Antoine
--
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/2] ARM: dts: berlin: add I2C nodes for BG2Q
2014-06-03 7:33 ` [PATCH 1/2] ARM: dts: berlin: add I2C nodes for BG2Q Antoine Ténart
@ 2014-06-16 11:22 ` Sebastian Hesselbarth
0 siblings, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-06-16 11:22 UTC (permalink / raw)
To: linux-arm-kernel
On 06/03/2014 09:33 AM, Antoine T?nart wrote:
> The Marvell Berlin BG2Q has 4 TWSI compatible with the Synopsys
> DesignWare I2C driver. Add the corresponding nodes.
>
> The pin-muxing setup is also done here, since there cannot be another
> muxing setup if I2C{0,1,2,3} are enabled.
>
> Signed-off-by: Antoine T?nart <antoine.tenart@free-electrons.com>
Applied to berlin/dt.
Thanks!
> ---
> arch/arm/boot/dts/berlin2q.dtsi | 72 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
> index 635a16a64cb4..0624868e36e3 100644
> --- a/arch/arm/boot/dts/berlin2q.dtsi
> +++ b/arch/arm/boot/dts/berlin2q.dtsi
> @@ -191,6 +191,32 @@
> };
> };
>
> + i2c0: i2c at 1400 {
> + compatible = "snps,designware-i2c";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x1400 0x100>;
> + interrupt-parent = <&aic>;
> + interrupts = <4>;
> + clocks = <&chip CLKID_CFG>;
> + pinctrl-0 = <&twsi0_pmux>;
> + pinctrl-names = "default";
> + status = "disabled";
> + };
> +
> + i2c1: i2c at 1800 {
> + compatible = "snps,designware-i2c";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x1800 0x100>;
> + interrupt-parent = <&aic>;
> + interrupts = <5>;
> + clocks = <&chip CLKID_CFG>;
> + pinctrl-0 = <&twsi1_pmux>;
> + pinctrl-names = "default";
> + status = "disabled";
> + };
> +
> timer0: timer at 2c00 {
> compatible = "snps,dw-apb-timer";
> reg = <0x2c00 0x14>;
> @@ -301,6 +327,16 @@
> reg = <0xea0000 0x400>, <0xdd0170 0x10>;
> clocks = <&refclk>;
> clock-names = "refclk";
> +
> + twsi0_pmux: twsi0-pmux {
> + groups = "G6";
> + function = "twsi0";
> + };
> +
> + twsi1_pmux: twsi1-pmux {
> + groups = "G7";
> + function = "twsi1";
> + };
> };
>
> apb at fc0000 {
> @@ -311,6 +347,32 @@
> ranges = <0 0xfc0000 0x10000>;
> interrupt-parent = <&sic>;
>
> + i2c2: i2c at 7000 {
> + compatible = "snps,designware-i2c";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x7000 0x100>;
> + interrupt-parent = <&sic>;
> + interrupts = <6>;
> + clocks = <&refclk>;
> + pinctrl-0 = <&twsi2_pmux>;
> + pinctrl-names = "default";
> + status = "disabled";
> + };
> +
> + i2c3: i2c at 8000 {
> + compatible = "snps,designware-i2c";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x8000 0x100>;
> + interrupt-parent = <&sic>;
> + interrupts = <7>;
> + clocks = <&refclk>;
> + pinctrl-0 = <&twsi3_pmux>;
> + pinctrl-names = "default";
> + status = "disabled";
> + };
> +
> uart0: uart at 9000 {
> compatible = "snps,dw-apb-uart";
> reg = <0x9000 0x100>;
> @@ -348,6 +410,16 @@
> groups = "GSM14";
> function = "uart1";
> };
> +
> + twsi2_pmux: twsi2-pmux {
> + groups = "GSM13";
> + function = "twsi2";
> + };
> +
> + twsi3_pmux: twsi3-pmux {
> + groups = "GSM14";
> + function = "twsi3";
> + };
> };
>
> sic: interrupt-controller at e000 {
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2
2014-06-03 7:33 ` [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2 Antoine Ténart
2014-06-03 8:05 ` Andrew Lunn
@ 2014-06-16 11:23 ` Sebastian Hesselbarth
1 sibling, 0 replies; 9+ messages in thread
From: Sebastian Hesselbarth @ 2014-06-16 11:23 UTC (permalink / raw)
To: linux-arm-kernel
On 06/03/2014 09:33 AM, Antoine T?nart wrote:
> Enable the I2C0 and I2C2 for the Marvell Berlin BG2G DMP. I2C1 and I2C3
> are also working on this board, but no devices seemed to be there.
>
> Signed-off-by: Antoine T?nart <antoine.tenart@free-electrons.com>
Applied to berlin/dt with Andrew's Reviewed-by.
Thanks!
> ---
> arch/arm/boot/dts/berlin2q-marvell-dmp.dts | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> index 995150f93795..a357ce02a64e 100644
> --- a/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> +++ b/arch/arm/boot/dts/berlin2q-marvell-dmp.dts
> @@ -34,6 +34,14 @@
> status = "okay";
> };
>
> +&i2c0 {
> + status = "okay";
> +};
> +
> +&i2c2 {
> + status = "okay";
> +};
> +
> &uart0 {
> status = "okay";
> };
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-06-16 11:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03 7:33 [PATCH 0/2] ARM: berlin: BG2Q I2C support Antoine Ténart
2014-06-03 7:33 ` [PATCH 1/2] ARM: dts: berlin: add I2C nodes for BG2Q Antoine Ténart
2014-06-16 11:22 ` Sebastian Hesselbarth
2014-06-03 7:33 ` [PATCH 2/2] ARM: dts: berlin: enable i2c0 and i2c2 Antoine Ténart
2014-06-03 8:05 ` Andrew Lunn
2014-06-04 16:48 ` Antoine Ténart
2014-06-04 17:03 ` Andrew Lunn
2014-06-04 17:37 ` Antoine Ténart
2014-06-16 11:23 ` Sebastian Hesselbarth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).