* [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
@ 2022-05-24 7:30 Alexander Shiyan
2022-05-24 9:03 ` Marco Felsch
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Alexander Shiyan @ 2022-05-24 7:30 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
For the correct work of GPIO driver, we need to define aliases.
Let's add them to the devicetree.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
arch/arm/dts/am335x-myirtech-myd.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
index 6ec65e533d..1ea0f2a440 100644
--- a/arch/arm/dts/am335x-myirtech-myd.dts
+++ b/arch/arm/dts/am335x-myirtech-myd.dts
@@ -6,6 +6,13 @@
#include <arm/am335x-myirtech-myd.dts>
/ {
+ aliases {
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ gpio2 = &gpio2;
+ gpio3 = &gpio3;
+ };
+
chosen {
environment {
compatible = "barebox,environment";
--
2.32.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-24 7:30 [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases Alexander Shiyan
@ 2022-05-24 9:03 ` Marco Felsch
2022-05-24 9:21 ` Alexander Shiyan
2022-05-24 12:28 ` Ahmad Fatoum
2022-05-30 6:55 ` Sascha Hauer
2 siblings, 1 reply; 11+ messages in thread
From: Marco Felsch @ 2022-05-24 9:03 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On 22-05-24, Alexander Shiyan wrote:
> For the correct work of GPIO driver, we need to define aliases.
> Let's add them to the devicetree.
>
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
> arch/arm/dts/am335x-myirtech-myd.dts | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
> index 6ec65e533d..1ea0f2a440 100644
> --- a/arch/arm/dts/am335x-myirtech-myd.dts
> +++ b/arch/arm/dts/am335x-myirtech-myd.dts
> @@ -6,6 +6,13 @@
> #include <arm/am335x-myirtech-myd.dts>
>
> / {
> + aliases {
> + gpio0 = &gpio0;
> + gpio1 = &gpio1;
> + gpio2 = &gpio2;
> + gpio3 = &gpio3;
> + };
Out of curiousity, are those aliases not defined in the "upstream" linux
device-tree? If not, wouldn't it be better to defined it there?
Regards,
Marco
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-24 9:03 ` Marco Felsch
@ 2022-05-24 9:21 ` Alexander Shiyan
2022-05-24 12:03 ` Marco Felsch
0 siblings, 1 reply; 11+ messages in thread
From: Alexander Shiyan @ 2022-05-24 9:21 UTC (permalink / raw)
To: Marco Felsch; +Cc: Barebox List
вт, 24 мая 2022 г. в 12:03, Marco Felsch <m.felsch@pengutronix.de>:
> On 22-05-24, Alexander Shiyan wrote:
> > For the correct work of GPIO driver, we need to define aliases.
> > Let's add them to the devicetree.
...
> > + aliases {
> > + gpio0 = &gpio0;
> > + gpio1 = &gpio1;
> > + gpio2 = &gpio2;
> > + gpio3 = &gpio3;
> > + };
>
> Out of curiousity, are those aliases not defined in the "upstream" linux
> device-tree? If not, wouldn't it be better to defined it there?
Hello.
The linux gpio-omap driver does not use aliases, it would be hard for
me to explain the need to make such changes to the linux dts tree :)
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-24 9:21 ` Alexander Shiyan
@ 2022-05-24 12:03 ` Marco Felsch
0 siblings, 0 replies; 11+ messages in thread
From: Marco Felsch @ 2022-05-24 12:03 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: Barebox List
On 22-05-24, Alexander Shiyan wrote:
> вт, 24 мая 2022 г. в 12:03, Marco Felsch <m.felsch@pengutronix.de>:
> > On 22-05-24, Alexander Shiyan wrote:
> > > For the correct work of GPIO driver, we need to define aliases.
> > > Let's add them to the devicetree.
> ...
> > > + aliases {
> > > + gpio0 = &gpio0;
> > > + gpio1 = &gpio1;
> > > + gpio2 = &gpio2;
> > > + gpio3 = &gpio3;
> > > + };
> >
> > Out of curiousity, are those aliases not defined in the "upstream" linux
> > device-tree? If not, wouldn't it be better to defined it there?
>
> Hello.
>
> The linux gpio-omap driver does not use aliases, it would be hard for
> me to explain the need to make such changes to the linux dts tree :)
Ah.. Thanks for the explanation, of course this would be a bit hard to
explain. So everything fine from pov :)
Regards,
Marco
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-24 7:30 [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases Alexander Shiyan
2022-05-24 9:03 ` Marco Felsch
@ 2022-05-24 12:28 ` Ahmad Fatoum
2022-05-25 6:23 ` Marco Felsch
2022-05-25 6:27 ` Alexander Shiyan
2022-05-30 6:55 ` Sascha Hauer
2 siblings, 2 replies; 11+ messages in thread
From: Ahmad Fatoum @ 2022-05-24 12:28 UTC (permalink / raw)
To: Alexander Shiyan, barebox
Hi,
On 24.05.22 09:30, Alexander Shiyan wrote:
> For the correct work of GPIO driver, we need to define aliases.
> Let's add them to the devicetree.
>
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
> arch/arm/dts/am335x-myirtech-myd.dts | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
> index 6ec65e533d..1ea0f2a440 100644
> --- a/arch/arm/dts/am335x-myirtech-myd.dts
> +++ b/arch/arm/dts/am335x-myirtech-myd.dts
> @@ -6,6 +6,13 @@
> #include <arm/am335x-myirtech-myd.dts>
Other boards do #include "am33xx.dtsi", which takes care of these
aliases. It's probably better you include that too.
Cheers,
Ahmad
>
> / {
> + aliases {
> + gpio0 = &gpio0;
> + gpio1 = &gpio1;
> + gpio2 = &gpio2;
> + gpio3 = &gpio3;
> + };
> +
> chosen {
> environment {
> compatible = "barebox,environment";
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-24 12:28 ` Ahmad Fatoum
@ 2022-05-25 6:23 ` Marco Felsch
2022-05-25 6:27 ` Alexander Shiyan
1 sibling, 0 replies; 11+ messages in thread
From: Marco Felsch @ 2022-05-25 6:23 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Alexander Shiyan, barebox
On 22-05-24, Ahmad Fatoum wrote:
> Hi,
>
> On 24.05.22 09:30, Alexander Shiyan wrote:
> > For the correct work of GPIO driver, we need to define aliases.
> > Let's add them to the devicetree.
> >
> > Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> > ---
> > arch/arm/dts/am335x-myirtech-myd.dts | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
> > index 6ec65e533d..1ea0f2a440 100644
> > --- a/arch/arm/dts/am335x-myirtech-myd.dts
> > +++ b/arch/arm/dts/am335x-myirtech-myd.dts
> > @@ -6,6 +6,13 @@
> > #include <arm/am335x-myirtech-myd.dts>
>
> Other boards do #include "am33xx.dtsi", which takes care of these
> aliases. It's probably better you include that too.
+1 :)
Regards,
Marco
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-24 12:28 ` Ahmad Fatoum
2022-05-25 6:23 ` Marco Felsch
@ 2022-05-25 6:27 ` Alexander Shiyan
2022-05-25 8:16 ` Ahmad Fatoum
1 sibling, 1 reply; 11+ messages in thread
From: Alexander Shiyan @ 2022-05-25 6:27 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Barebox List
Hello.
вт, 24 мая 2022 г. в 15:28, Ahmad Fatoum <a.fatoum@pengutronix.de>:
> On 24.05.22 09:30, Alexander Shiyan wrote:
> > For the correct work of GPIO driver, we need to define aliases.
> > Let's add them to the devicetree.
...
> > diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
> > index 6ec65e533d..1ea0f2a440 100644
> > --- a/arch/arm/dts/am335x-myirtech-myd.dts
> > +++ b/arch/arm/dts/am335x-myirtech-myd.dts
> > @@ -6,6 +6,13 @@
> > #include <arm/am335x-myirtech-myd.dts>
>
> Other boards do #include "am33xx.dtsi", which takes care of these
> aliases. It's probably better you include that too.
Including this file results in an error.
Changed to:
#include "am33xx.dtsi"
#include <arm/am335x-myirtech-myd.dts>
Output:
DTC arch/arm/dts/am335x-myirtech-myd.dtb
Error: /home/ARM/barebox/dts/src/arm/am335x-myirtech-myd.dts:6.1-9 syntax error
FATAL ERROR: Unable to parse input tree
Most likely this is the result of double inclusion of the file arm/am33xx.dtsi,
first time from "am33xx.dtsi" and second from arm/am335x-myirtech-myd.dts.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-25 6:27 ` Alexander Shiyan
@ 2022-05-25 8:16 ` Ahmad Fatoum
2022-05-25 8:33 ` Alexander Shiyan
0 siblings, 1 reply; 11+ messages in thread
From: Ahmad Fatoum @ 2022-05-25 8:16 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: Barebox List
On 25.05.22 08:27, Alexander Shiyan wrote:
> Hello.
>
> вт, 24 мая 2022 г. в 15:28, Ahmad Fatoum <a.fatoum@pengutronix.de>:
>> On 24.05.22 09:30, Alexander Shiyan wrote:
>>> For the correct work of GPIO driver, we need to define aliases.
>>> Let's add them to the devicetree.
> ...
>>> diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
>>> index 6ec65e533d..1ea0f2a440 100644
>>> --- a/arch/arm/dts/am335x-myirtech-myd.dts
>>> +++ b/arch/arm/dts/am335x-myirtech-myd.dts
>>> @@ -6,6 +6,13 @@
>>> #include <arm/am335x-myirtech-myd.dts>
>>
>> Other boards do #include "am33xx.dtsi", which takes care of these
>> aliases. It's probably better you include that too.
>
> Including this file results in an error.
>
> Changed to:
> #include "am33xx.dtsi"
> #include <arm/am335x-myirtech-myd.dts>
>
> Output:
> DTC arch/arm/dts/am335x-myirtech-myd.dtb
> Error: /home/ARM/barebox/dts/src/arm/am335x-myirtech-myd.dts:6.1-9 syntax error
> FATAL ERROR: Unable to parse input tree
>
> Most likely this is the result of double inclusion of the file arm/am33xx.dtsi,
> first time from "am33xx.dtsi" and second from arm/am335x-myirtech-myd.dts.
Hi, you need to include if after the upstream DT. That's why it doesn't have
a /dts-v1/;
Cheers,
Ahmad
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-25 8:16 ` Ahmad Fatoum
@ 2022-05-25 8:33 ` Alexander Shiyan
2022-05-25 8:52 ` Ahmad Fatoum
0 siblings, 1 reply; 11+ messages in thread
From: Alexander Shiyan @ 2022-05-25 8:33 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Barebox List
ср, 25 мая 2022 г. в 11:16, Ahmad Fatoum <a.fatoum@pengutronix.de>:
> On 25.05.22 08:27, Alexander Shiyan wrote:
> > вт, 24 мая 2022 г. в 15:28, Ahmad Fatoum <a.fatoum@pengutronix.de>:
> >> On 24.05.22 09:30, Alexander Shiyan wrote:
> >>> For the correct work of GPIO driver, we need to define aliases.
> >>> Let's add them to the devicetree.
> > ...
> >>> diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
> >>> index 6ec65e533d..1ea0f2a440 100644
> >>> --- a/arch/arm/dts/am335x-myirtech-myd.dts
> >>> +++ b/arch/arm/dts/am335x-myirtech-myd.dts
> >>> @@ -6,6 +6,13 @@
> >>> #include <arm/am335x-myirtech-myd.dts>
> >>
> >> Other boards do #include "am33xx.dtsi", which takes care of these
> >> aliases. It's probably better you include that too.
> >
> > Including this file results in an error.
> >
> > Changed to:
> > #include "am33xx.dtsi"
> > #include <arm/am335x-myirtech-myd.dts>
> >
> > Output:
> > DTC arch/arm/dts/am335x-myirtech-myd.dtb
> > Error: /home/ARM/barebox/dts/src/arm/am335x-myirtech-myd.dts:6.1-9 syntax error
> > FATAL ERROR: Unable to parse input tree
> >
> > Most likely this is the result of double inclusion of the file arm/am33xx.dtsi,
> > first time from "am33xx.dtsi" and second from arm/am335x-myirtech-myd.dts.
>
> Hi, you need to include if after the upstream DT. That's why it doesn't have
> a /dts-v1/;
Yes, if "am33xx.dtsi" is after <arm/am335x-myirtech-myd.dts>, it compiles fine.
But in this case, upstreaming <arm/am33xx.dtsi> (from local
am33xx.dtsi) overwrites
any binding changes from the board file.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-25 8:33 ` Alexander Shiyan
@ 2022-05-25 8:52 ` Ahmad Fatoum
0 siblings, 0 replies; 11+ messages in thread
From: Ahmad Fatoum @ 2022-05-25 8:52 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: Barebox List
Hello Alexander,
On 25.05.22 10:33, Alexander Shiyan wrote:
>>> Most likely this is the result of double inclusion of the file arm/am33xx.dtsi,
>>> first time from "am33xx.dtsi" and second from arm/am335x-myirtech-myd.dts.
>>
>> Hi, you need to include if after the upstream DT. That's why it doesn't have
>> a /dts-v1/;
>
> Yes, if "am33xx.dtsi" is after <arm/am335x-myirtech-myd.dts>, it compiles fine.
> But in this case, upstreaming <arm/am33xx.dtsi> (from local
> am33xx.dtsi) overwrites
> any binding changes from the board file.
Argh. Other platforms (e.g. imx6q.dtsi) intentionally skip dts/ includes to avoid
just that... One could remedy that at the cost of annoying out-of-tree users, but
that's not something that you need to do IMO.
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cheers,
Ahmad
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases
2022-05-24 7:30 [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases Alexander Shiyan
2022-05-24 9:03 ` Marco Felsch
2022-05-24 12:28 ` Ahmad Fatoum
@ 2022-05-30 6:55 ` Sascha Hauer
2 siblings, 0 replies; 11+ messages in thread
From: Sascha Hauer @ 2022-05-30 6:55 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Tue, May 24, 2022 at 10:30:48AM +0300, Alexander Shiyan wrote:
> For the correct work of GPIO driver, we need to define aliases.
> Let's add them to the devicetree.
>
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
> arch/arm/dts/am335x-myirtech-myd.dts | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/dts/am335x-myirtech-myd.dts b/arch/arm/dts/am335x-myirtech-myd.dts
> index 6ec65e533d..1ea0f2a440 100644
> --- a/arch/arm/dts/am335x-myirtech-myd.dts
> +++ b/arch/arm/dts/am335x-myirtech-myd.dts
> @@ -6,6 +6,13 @@
> #include <arm/am335x-myirtech-myd.dts>
>
> / {
> + aliases {
> + gpio0 = &gpio0;
> + gpio1 = &gpio1;
> + gpio2 = &gpio2;
> + gpio3 = &gpio3;
> + };
> +
> chosen {
> environment {
> compatible = "barebox,environment";
> --
> 2.32.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-05-30 6:57 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24 7:30 [PATCH] ARM: DTS: myir-x335x: Add GPIO aliases Alexander Shiyan
2022-05-24 9:03 ` Marco Felsch
2022-05-24 9:21 ` Alexander Shiyan
2022-05-24 12:03 ` Marco Felsch
2022-05-24 12:28 ` Ahmad Fatoum
2022-05-25 6:23 ` Marco Felsch
2022-05-25 6:27 ` Alexander Shiyan
2022-05-25 8:16 ` Ahmad Fatoum
2022-05-25 8:33 ` Alexander Shiyan
2022-05-25 8:52 ` Ahmad Fatoum
2022-05-30 6:55 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox