* [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller
@ 2018-05-21 22:00 Daniel Mack
2018-05-21 22:00 ` [PATCH 2/2] ARM: pxa: dts: add pin definitions for extended GPIOs Daniel Mack
2018-05-22 19:19 ` [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller Robert Jarzmik
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Mack @ 2018-05-21 22:00 UTC (permalink / raw)
To: robert.jarzmik, haojian.zhuang
Cc: devicetree, robh+dt, Daniel Mack, linux-arm-kernel
The PXA GPIO driver calls out to the pinctrl driver for claiming pins
unless the config has CONFIG_PINCTRL unset. IOW, if a pinctrl driver is
active, it must be visible to the GPIO driver.
Signed-off-by: Daniel Mack <daniel@zonque.org>
---
arch/arm/boot/dts/pxa3xx.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
index 982d1a62661d..a13ac52e4fd2 100644
--- a/arch/arm/boot/dts/pxa3xx.dtsi
+++ b/arch/arm/boot/dts/pxa3xx.dtsi
@@ -148,6 +148,7 @@
compatible = "intel,pxa3xx-gpio";
reg = <0x40e00000 0x10000>;
clocks = <&clks CLK_GPIO>;
+ gpio-ranges = <&pinctrl 0 0 128>;
interrupt-names = "gpio0", "gpio1", "gpio_mux";
interrupts = <8 9 10>;
gpio-controller;
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: pxa: dts: add pin definitions for extended GPIOs
2018-05-21 22:00 [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller Daniel Mack
@ 2018-05-21 22:00 ` Daniel Mack
2018-05-22 19:34 ` Robert Jarzmik
2018-05-22 19:19 ` [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller Robert Jarzmik
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Mack @ 2018-05-21 22:00 UTC (permalink / raw)
To: robert.jarzmik, haojian.zhuang
Cc: devicetree, robh+dt, Daniel Mack, linux-arm-kernel
The PXA3xx series features some extended GPIO banks which are named GPIO0_2,
GPIO1_2 etc. The PXA300, PXA310 and PXA320 have different numbers of such
pins, and they also have variant-specific register offsets.
Signed-off-by: Daniel Mack <daniel@zonque.org>
---
arch/arm/boot/dts/pxa3xx.dtsi | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
index a13ac52e4fd2..446e612688c0 100644
--- a/arch/arm/boot/dts/pxa3xx.dtsi
+++ b/arch/arm/boot/dts/pxa3xx.dtsi
@@ -8,6 +8,13 @@
(gpio <= 98) ? (0x0400 + 4 * (gpio - 27)) : \
(gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
0)
+#define MFP_PIN_PXA300_0_2 0x674
+#define MFP_PIN_PXA300_1_2 0x678
+#define MFP_PIN_PXA300_2_2 0x2dc
+#define MFP_PIN_PXA300_3_2 0x2e0
+#define MFP_PIN_PXA300_4_2 0x2e4
+#define MFP_PIN_PXA300_5_2 0x2e8
+#define MFP_PIN_PXA300_6_2 0x2ec
#define MFP_PIN_PXA310(gpio) \
((gpio <= 2) ? (0x00b4 + 4 * gpio) : \
@@ -18,6 +25,17 @@
(gpio <= 262) ? 0 : \
(gpio <= 268) ? (0x052c + 4 * (gpio - 263)) : \
0)
+#define MFP_PIN_PXA310_0_2 0x674
+#define MFP_PIN_PXA310_1_2 0x678
+#define MFP_PIN_PXA310_2_2 0x2dc
+#define MFP_PIN_PXA310_3_2 0x2e0
+#define MFP_PIN_PXA310_4_2 0x2e4
+#define MFP_PIN_PXA310_5_2 0x2e8
+#define MFP_PIN_PXA310_6_2 0x2ec
+#define MFP_PIN_PXA310_7_2 0x52c
+#define MFP_PIN_PXA310_8_2 0x530
+#define MFP_PIN_PXA310_9_2 0x534
+#define MFP_PIN_PXA310_10_2 0x538
#define MFP_PIN_PXA320(gpio) \
((gpio <= 4) ? (0x0124 + 4 * gpio) : \
@@ -30,6 +48,12 @@
(gpio <= 98) ? (0x04f0 + 4 * (gpio - 74)) : \
(gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
0)
+#define MFP_PIN_PXA320_0_2 0x674
+#define MFP_PIN_PXA320_1_2 0x678
+#define MFP_PIN_PXA320_2_2 0x67c
+#define MFP_PIN_PXA320_3_2 0x680
+#define MFP_PIN_PXA320_4_2 0x284
+#define MFP_PIN_PXA320_5_2 0x28c
/*
* MFP Alternate functions for pins having a gpio.
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller
2018-05-21 22:00 [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller Daniel Mack
2018-05-21 22:00 ` [PATCH 2/2] ARM: pxa: dts: add pin definitions for extended GPIOs Daniel Mack
@ 2018-05-22 19:19 ` Robert Jarzmik
1 sibling, 0 replies; 5+ messages in thread
From: Robert Jarzmik @ 2018-05-22 19:19 UTC (permalink / raw)
To: Daniel Mack; +Cc: devicetree, robh+dt, linux-arm-kernel, haojian.zhuang
Daniel Mack <daniel@zonque.org> writes:
> The PXA GPIO driver calls out to the pinctrl driver for claiming pins
> unless the config has CONFIG_PINCTRL unset. IOW, if a pinctrl driver is
> active, it must be visible to the GPIO driver.
>
> Signed-off-by: Daniel Mack <daniel@zonque.org>
Applied to pxa/dt, thanks.
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ARM: pxa: dts: add pin definitions for extended GPIOs
2018-05-21 22:00 ` [PATCH 2/2] ARM: pxa: dts: add pin definitions for extended GPIOs Daniel Mack
@ 2018-05-22 19:34 ` Robert Jarzmik
2018-05-22 19:46 ` Daniel Mack
0 siblings, 1 reply; 5+ messages in thread
From: Robert Jarzmik @ 2018-05-22 19:34 UTC (permalink / raw)
To: Daniel Mack; +Cc: devicetree, robh+dt, linux-arm-kernel, haojian.zhuang
Daniel Mack <daniel@zonque.org> writes:
> The PXA3xx series features some extended GPIO banks which are named GPIO0_2,
> GPIO1_2 etc. The PXA300, PXA310 and PXA320 have different numbers of such
> pins, and they also have variant-specific register offsets.
>
> Signed-off-by: Daniel Mack <daniel@zonque.org>
> ---
> arch/arm/boot/dts/pxa3xx.dtsi | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
> index a13ac52e4fd2..446e612688c0 100644
> --- a/arch/arm/boot/dts/pxa3xx.dtsi
> +++ b/arch/arm/boot/dts/pxa3xx.dtsi
> @@ -8,6 +8,13 @@
> (gpio <= 98) ? (0x0400 + 4 * (gpio - 27)) : \
> (gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
> 0)
> +#define MFP_PIN_PXA300_0_2 0x674
> +#define MFP_PIN_PXA300_1_2 0x678
> +#define MFP_PIN_PXA300_2_2 0x2dc
> +#define MFP_PIN_PXA300_3_2 0x2e0
> +#define MFP_PIN_PXA300_4_2 0x2e4
> +#define MFP_PIN_PXA300_5_2 0x2e8
> +#define MFP_PIN_PXA300_6_2 0x2ec
To be consistent with the previous items, could it be something like :
#define MFP_PIN_PXA300_2(gpio) \
... etc ...
And so on for the others.
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ARM: pxa: dts: add pin definitions for extended GPIOs
2018-05-22 19:34 ` Robert Jarzmik
@ 2018-05-22 19:46 ` Daniel Mack
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Mack @ 2018-05-22 19:46 UTC (permalink / raw)
To: Robert Jarzmik; +Cc: devicetree, robh+dt, linux-arm-kernel, haojian.zhuang
On Tuesday, May 22, 2018 09:34 PM, Robert Jarzmik wrote:
> Daniel Mack <daniel@zonque.org> writes:
>
>> The PXA3xx series features some extended GPIO banks which are named GPIO0_2,
>> GPIO1_2 etc. The PXA300, PXA310 and PXA320 have different numbers of such
>> pins, and they also have variant-specific register offsets.
>>
>> Signed-off-by: Daniel Mack <daniel@zonque.org>
>> ---
>> arch/arm/boot/dts/pxa3xx.dtsi | 24 ++++++++++++++++++++++++
>> 1 file changed, 24 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
>> index a13ac52e4fd2..446e612688c0 100644
>> --- a/arch/arm/boot/dts/pxa3xx.dtsi
>> +++ b/arch/arm/boot/dts/pxa3xx.dtsi
>> @@ -8,6 +8,13 @@
>> (gpio <= 98) ? (0x0400 + 4 * (gpio - 27)) : \
>> (gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
>> 0)
>> +#define MFP_PIN_PXA300_0_2 0x674
>> +#define MFP_PIN_PXA300_1_2 0x678
>> +#define MFP_PIN_PXA300_2_2 0x2dc
>> +#define MFP_PIN_PXA300_3_2 0x2e0
>> +#define MFP_PIN_PXA300_4_2 0x2e4
>> +#define MFP_PIN_PXA300_5_2 0x2e8
>> +#define MFP_PIN_PXA300_6_2 0x2ec
>
> To be consistent with the previous items, could it be something like :
> #define MFP_PIN_PXA300_2(gpio) \
> ... etc ...
>
Ah, yes. Much nicer. Will resend!
Thanks,
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-05-22 19:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-21 22:00 [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller Daniel Mack
2018-05-21 22:00 ` [PATCH 2/2] ARM: pxa: dts: add pin definitions for extended GPIOs Daniel Mack
2018-05-22 19:34 ` Robert Jarzmik
2018-05-22 19:46 ` Daniel Mack
2018-05-22 19:19 ` [PATCH 1/2] ARM: pxa: dts: add gpio-ranges to gpio controller Robert Jarzmik
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).