* [PATCH] arm64: dts: meson-axg: Fix and enable GPIO interrupt controller
@ 2018-12-01 14:56 Carlo Caione
2018-12-01 15:20 ` Martin Blumenstingl
0 siblings, 1 reply; 3+ messages in thread
From: Carlo Caione @ 2018-12-01 14:56 UTC (permalink / raw)
To: robh+dt, mark.rutland, khilman, devicetree, linux-arm-kernel,
linux-amlogic, jbrunet
Cc: Carlo Caione
The GPIO interrupt controller registers are mapped to the wrong
offset in the DTSI. Fix the offset in the DTSI and enable the interrupt
controller in the DTS of the only AXG board enabled.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 6 ++++++
arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index 18778ada7bd3..c3e4aac75782 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -374,6 +374,12 @@
status = "okay";
};
+&gpio_intc {
+ compatible = "amlogic,meson-gpio-intc",
+ "amlogic,meson-axg-gpio-intc";
+ status = "okay";
+};
+
&ir {
status = "okay";
pinctrl-0 = <&remote_input_ao_pins>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index df017dbd2e57..f1affc12e3e6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -1415,7 +1415,7 @@
gpio_intc: interrupt-controller@f080 {
compatible = "amlogic,meson-gpio-intc";
- reg = <0x0 0xf080 0x0 0x10>;
+ reg = <0x0 0x9880 0x0 0x10>;
interrupt-controller;
#interrupt-cells = <2>;
amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: meson-axg: Fix and enable GPIO interrupt controller
2018-12-01 14:56 [PATCH] arm64: dts: meson-axg: Fix and enable GPIO interrupt controller Carlo Caione
@ 2018-12-01 15:20 ` Martin Blumenstingl
2018-12-01 15:31 ` Carlo Caione
0 siblings, 1 reply; 3+ messages in thread
From: Martin Blumenstingl @ 2018-12-01 15:20 UTC (permalink / raw)
To: ccaione
Cc: mark.rutland, devicetree, khilman, robh+dt, linux-amlogic,
linux-arm-kernel, jbrunet
Hi Carlo,
On Sat, Dec 1, 2018 at 3:56 PM Carlo Caione <ccaione@baylibre.com> wrote:
>
> The GPIO interrupt controller registers are mapped to the wrong
> offset in the DTSI. Fix the offset in the DTSI and enable the interrupt
> controller in the DTS of the only AXG board enabled.
>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> ---
> arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 6 ++++++
> arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 +-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> index 18778ada7bd3..c3e4aac75782 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> @@ -374,6 +374,12 @@
> status = "okay";
> };
>
> +&gpio_intc {
> + compatible = "amlogic,meson-gpio-intc",
> + "amlogic,meson-axg-gpio-intc";
multiple compatible strings should be ordered:
- use the most specific compatible (the AXG one) first
- the the less specific ones
also why did you add the AXG compatible string in the s400 board .dts
instead of meson-axg.dtsi (which makes it available for all AXG
boards)?
> + status = "okay";
> +};
> +
> &ir {
> status = "okay";
> pinctrl-0 = <&remote_input_ao_pins>;
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> index df017dbd2e57..f1affc12e3e6 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> @@ -1415,7 +1415,7 @@
>
> gpio_intc: interrupt-controller@f080 {
unit-address should match the reg property: ...@9880
> compatible = "amlogic,meson-gpio-intc";
> - reg = <0x0 0xf080 0x0 0x10>;
> + reg = <0x0 0x9880 0x0 0x10>;
Amlogic's patched 4.9 buildroot kernel uses 0xf080 - can you add a
short sentence to the description on which board you have tested this
(I assume you used the s400)
Regards
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: meson-axg: Fix and enable GPIO interrupt controller
2018-12-01 15:20 ` Martin Blumenstingl
@ 2018-12-01 15:31 ` Carlo Caione
0 siblings, 0 replies; 3+ messages in thread
From: Carlo Caione @ 2018-12-01 15:31 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: mark.rutland, devicetree, khilman, robh+dt, linux-amlogic,
linux-arm-kernel, jbrunet
On Sat, 2018-12-01 at 16:20 +0100, Martin Blumenstingl wrote:
> Hi Carlo,
Hi Martin,
> On Sat, Dec 1, 2018 at 3:56 PM Carlo Caione <ccaione@baylibre.com>
> wrote:
> > The GPIO interrupt controller registers are mapped to the wrong
> > offset in the DTSI. Fix the offset in the DTSI and enable the
> > interrupt
> > controller in the DTS of the only AXG board enabled.
> >
> > Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> > ---
> > arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 6 ++++++
> > arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 +-
> > 2 files changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > index 18778ada7bd3..c3e4aac75782 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
> > @@ -374,6 +374,12 @@
> > status = "okay";
> > };
> >
> > +&gpio_intc {
> > + compatible = "amlogic,meson-gpio-intc",
> > + "amlogic,meson-axg-gpio-intc";
> multiple compatible strings should be ordered:
> - use the most specific compatible (the AXG one) first
> - the the less specific ones
mindlessly copied and pasted from the GXL.
> also why did you add the AXG compatible string in the s400 board .dts
> instead of meson-axg.dtsi (which makes it available for all AXG
> boards)?
good point.
> > + status = "okay";
> > +};
> > +
> > &ir {
> > status = "okay";
> > pinctrl-0 = <&remote_input_ao_pins>;
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> > b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> > index df017dbd2e57..f1affc12e3e6 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> > +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> > @@ -1415,7 +1415,7 @@
> >
> > gpio_intc: interrupt-controller@f080 {
> unit-address should match the reg property: ...@9880
>
> > compatible = "amlogic,meson-gpio-
> > intc";
> > - reg = <0x0 0xf080 0x0 0x10>;
> > + reg = <0x0 0x9880 0x0 0x10>;
> Amlogic's patched 4.9 buildroot kernel uses 0xf080 - can you add a
> short sentence to the description on which board you have tested this
> (I assume you used the s400)
The datasheet reports a different offset. But I tested again on 0xf080
and it looks like 0xf080 is actually the correct one? Need to test this
better.
I'll follow this up with v2.
Cheers,
--
Carlo Caione
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-01 15:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-01 14:56 [PATCH] arm64: dts: meson-axg: Fix and enable GPIO interrupt controller Carlo Caione
2018-12-01 15:20 ` Martin Blumenstingl
2018-12-01 15:31 ` Carlo Caione
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).