2014-04-16 07:46:42

by Antoine Tenart

[permalink] [raw]
Subject: [PATCH v2 0/2] ARM: berlin: add GPIO support for the BG2Q

This series add the support for the GPIOs of the Berlin BG2Q. We use the
newly integrated dwapb GPIO driver here.

This applies on top of Alexandre's BG2Q symbol introduction[1] and the dwapb
gpio patch fixing IRQ initialization[2].

[1] https://patchwork.kernel.org/patch/3876141/
[2] https://lkml.org/lkml/2014/4/7/96

Changes since v1:
- s/gpio-controller@/gpio-port@/ in device tree
- moved ARCH_REQUIRE_GPIOLIB to ARCH_BERLIN in Kconfig

Antoine Ténart (2):
ARM: berlin: add the LIBGPIO as a dependency for the BG2Q
ARM: dts: berlin: add GPIO nodes for the BG2Q

arch/arm/boot/dts/berlin2q.dtsi | 102 ++++++++++++++++++++++++++++++++++++++++
arch/arm/mach-berlin/Kconfig | 1 +
2 files changed, 103 insertions(+)

--
1.8.3.2


2014-04-16 07:46:41

by Antoine Tenart

[permalink] [raw]
Subject: [PATCH v2 1/2] ARM: berlin: add the LIBGPIO as a dependency for the BG2Q

The BG2Q has GPIOs driven by the dwapb GPIO driver. Add the LIBGPIO as a
dependency to be able to support them.

Signed-off-by: Antoine Ténart <[email protected]>
---
arch/arm/mach-berlin/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig
index 291f1cac6c3d..150fda8fe110 100644
--- a/arch/arm/mach-berlin/Kconfig
+++ b/arch/arm/mach-berlin/Kconfig
@@ -1,5 +1,6 @@
config ARCH_BERLIN
bool "Marvell Berlin SoCs" if ARCH_MULTI_V7
+ select ARCH_REQUIRE_GPIOLIB
select ARM_GIC
select GENERIC_IRQ_CHIP
select DW_APB_ICTL
--
1.8.3.2

2014-04-16 07:47:31

by Antoine Tenart

[permalink] [raw]
Subject: [PATCH v2 2/2] ARM: dts: berlin: add GPIO nodes for the BG2Q

The Marvell Berlin BG2Q has 6 GPIO ports compatible with the snps,dw-apb-gpio
driver. This patch add the corresponding device tree nodes.

Signed-off-by: Antoine Ténart <[email protected]>
---
arch/arm/boot/dts/berlin2q.dtsi | 102 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 102 insertions(+)

diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
index e6e556055dfc..82bf6910e227 100644
--- a/arch/arm/boot/dts/berlin2q.dtsi
+++ b/arch/arm/boot/dts/berlin2q.dtsi
@@ -109,6 +109,78 @@
ranges = <0 0xe80000 0x10000>;
interrupt-parent = <&aic>;

+ gpio0: gpio@0400 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x0400 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ porta: gpio-port@0 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ snps,nr-gpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <0>;
+ };
+ };
+
+ gpio1: gpio@0800 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x0800 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ portb: gpio-port@1 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ snps,nr-gpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <1>;
+ };
+ };
+
+ gpio2: gpio@0c00 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x0c00 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ portc: gpio-port@2 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ snps,nr-gpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <2>;
+ };
+ };
+
+ gpio3: gpio@1000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x1000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ portd: gpio-port@3 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ snps,nr-gpios = <32>;
+ reg = <0>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <3>;
+ };
+ };
+
timer0: timer@2c00 {
compatible = "snps,dw-apb-timer";
reg = <0x2c00 0x14>;
@@ -181,6 +253,36 @@
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
};
+
+ gpio4: gpio@5000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0x5000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ porte: gpio-port@4 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ snps,nr-gpios = <32>;
+ reg = <0>;
+ };
+ };
+
+ gpio5: gpio@c000 {
+ compatible = "snps,dw-apb-gpio";
+ reg = <0xc000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ portf: gpio-port@5 {
+ compatible = "snps,dw-apb-gpio-port";
+ gpio-controller;
+ #gpio-cells = <2>;
+ snps,nr-gpios = <32>;
+ reg = <0>;
+ };
+ };
};

pinctrl: pinctrl@0 {
--
1.8.3.2

2014-04-16 09:14:28

by Jisheng Zhang

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ARM: berlin: add GPIO support for the BG2Q

On Wed, 16 Apr 2014 00:46:33 -0700
Antoine Ténart <[email protected]> wrote:

> This series add the support for the GPIOs of the Berlin BG2Q. We use the
> newly integrated dwapb GPIO driver here.
>
> This applies on top of Alexandre's BG2Q symbol introduction[1] and the dwapb
> gpio patch fixing IRQ initialization[2].
>
> [1] https://patchwork.kernel.org/patch/3876141/
> [2] https://lkml.org/lkml/2014/4/7/96
>
> Changes since v1:
> - s/gpio-controller@/gpio-port@/ in device tree
> - moved ARCH_REQUIRE_GPIOLIB to ARCH_BERLIN in Kconfig
>
> Antoine Ténart (2):
> ARM: berlin: add the LIBGPIO as a dependency for the BG2Q
> ARM: dts: berlin: add GPIO nodes for the BG2Q
>
> arch/arm/boot/dts/berlin2q.dtsi | 102
> ++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-berlin/Kconfig
> | 1 + 2 files changed, 103 insertions(+)
>

All the two patches look good

Thanks very much

2014-04-16 19:21:32

by Sebastian Hesselbarth

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ARM: berlin: add GPIO support for the BG2Q

On 04/16/2014 11:11 AM, Jisheng Zhang wrote:
> On Wed, 16 Apr 2014 00:46:33 -0700
> Antoine Ténart <[email protected]> wrote:
>
>> This series add the support for the GPIOs of the Berlin BG2Q. We use the
>> newly integrated dwapb GPIO driver here.
>>
>> This applies on top of Alexandre's BG2Q symbol introduction[1] and the dwapb
>> gpio patch fixing IRQ initialization[2].
>>
>> [1] https://patchwork.kernel.org/patch/3876141/
>> [2] https://lkml.org/lkml/2014/4/7/96
>>
>> Changes since v1:
>> - s/gpio-controller@/gpio-port@/ in device tree
>> - moved ARCH_REQUIRE_GPIOLIB to ARCH_BERLIN in Kconfig
>>
>> Antoine Ténart (2):
>> ARM: berlin: add the LIBGPIO as a dependency for the BG2Q
>> ARM: dts: berlin: add GPIO nodes for the BG2Q
>>
>> arch/arm/boot/dts/berlin2q.dtsi | 102
>> ++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-berlin/Kconfig
>> | 1 + 2 files changed, 103 insertions(+)
>>
>
> All the two patches look good

Patch 1 applied to berlin/soc,
Patch 2 applied to berlin/dt,

both with Jisheng's Reviewed-by.

Thanks!