Re: [PATCH 00/12] arm: xea: Provide support for different XEA board HW versions

2024-03-27 Thread Lukasz Majewski
Hi Fabio,

> Hi Lukasz,
> 
> On Mon, Mar 25, 2024 at 5:48 AM Lukasz Majewski  wrote:
> 
> > The case here is that I'm modifying the *-u-boot.dts{i} files only.
> > In  
> 
> The diff below shows that you are creating imx28-xea-1.dts and
> imx28-xea-2.dts for U-Boot consumption and renaming the upstream
> imx28-xea.dts to imx28-xea.dts.
> 
> create mode 100644 arch/arm/dts/imx28-xea-1.dts
> create mode 100644 arch/arm/dts/imx28-xea-2-u-boot.dtsi
> create mode 100644 arch/arm/dts/imx28-xea-2.dts
> rename arch/arm/dts/{imx28-xea.dts => imx28-xea.dtsi} (100%)
> 
> > other words, u-boot will not support features described in Linux
> > DTS.  
> 
> That's OK and this happens frequently.
> 
> For example, upstream devicetree may describes audio codec,
> but U-Boot does not support audio playback.
> 
> Devicetree should be OS agnostic.
> 
> In U-Boot, we want to re-use the upstream Linux devicetree files
> 'as-is'.
> 
> Adding -u-boot.dtsi files is OK though.
> 
> Can you convert the imx28-xea board to OF_UPSTREAM available in the
> U-Boot next branch?
> 
> > Hence, the rename of files (which would be in sync with Linux at
> > some point) looks like not related to Linux DTS (as even after
> > re-sync with upstream Linux those changes will not be in Linux
> > DTS).  
> 
> I did not understand this part, do you mean that Linux will also do
> the imx28-xea.dts => imx28-xea.dtsi rename and will also have the new
> imx28-xea-1.dts and imx28-xea-2.dts?
> 

Just a small update - the Linux kernel's imx28-xea.dts [1] doesn't have
switch/phy properties as the earlier attempts to add L2 switch support
for Linux mainline were not accepted by the network stack community.

Hence, the decision to omit those properties (and there is no decision
if another attempt for L2 switch support upstreaming will be done in the
near future).

In u-boot the -u-boot.dts[i] files were used to add functionality not
(yet) supported in Linux kernel.

To sum up - I cannot create imx28-xea-1.dts and imx28-xea-2.dts in Linux
as properties which are different in those two revisions are not present
in the current Linux dts description. I cannot say when all XEA
functionality will be added to Linux.

Links:

[1] -
https://elixir.bootlin.com/linux/v6.9-rc1/source/arch/arm/boot/dts/nxp/mxs/imx28-xea.dts

> Regards,
> 
> Fabio Estevam




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpKSWujHsiAO.pgp
Description: OpenPGP digital signature


Re: [PATCH 00/12] arm: xea: Provide support for different XEA board HW versions

2024-03-26 Thread Lukasz Majewski
Hi Fabio,

> Hi Lukasz,
> 
> On Mon, Mar 25, 2024 at 5:48 AM Lukasz Majewski  wrote:
> 
> > The case here is that I'm modifying the *-u-boot.dts{i} files only.
> > In  
> 
> The diff below shows that you are creating imx28-xea-1.dts and
> imx28-xea-2.dts for U-Boot consumption and renaming the upstream
> imx28-xea.dts to imx28-xea.dts.
> 
> create mode 100644 arch/arm/dts/imx28-xea-1.dts
> create mode 100644 arch/arm/dts/imx28-xea-2-u-boot.dtsi
> create mode 100644 arch/arm/dts/imx28-xea-2.dts
> rename arch/arm/dts/{imx28-xea.dts => imx28-xea.dtsi} (100%)
> 

Yes, exactly.

> > other words, u-boot will not support features described in Linux
> > DTS.  
> 
> That's OK and this happens frequently.
> 
> For example, upstream devicetree may describes audio codec,
> but U-Boot does not support audio playback.
> 
> Devicetree should be OS agnostic.
> 

Ok.

> In U-Boot, we want to re-use the upstream Linux devicetree files
> 'as-is'.
> 

Yes, I'm fully aware of this. However, the U-Boot size increases
rapidly...

> Adding -u-boot.dtsi files is OK though.
> 

Yes, this is a good way (with /delete-node) to reduce the size.

> Can you convert the imx28-xea board to OF_UPSTREAM available in the
> U-Boot next branch?

I will check if XEA can be moved to OF_UPSTREAM.

> 
> > Hence, the rename of files (which would be in sync with Linux at
> > some point) looks like not related to Linux DTS (as even after
> > re-sync with upstream Linux those changes will not be in Linux
> > DTS).  
> 
> I did not understand this part, do you mean that Linux will also do
> the imx28-xea.dts => imx28-xea.dtsi rename and will also have the new
> imx28-xea-1.dts and imx28-xea-2.dts?

Yes. Exactly. I started the conversion from u-boot. Updating Linux DTS
will be next.

> 
> Regards,
> 
> Fabio Estevam




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgppYXgAbZoRO.pgp
Description: OpenPGP digital signature


Re: [PATCH 00/12] arm: xea: Provide support for different XEA board HW versions

2024-03-26 Thread Fabio Estevam
Hi Lukasz,

On Mon, Mar 25, 2024 at 5:48 AM Lukasz Majewski  wrote:

> The case here is that I'm modifying the *-u-boot.dts{i} files only. In

The diff below shows that you are creating imx28-xea-1.dts and imx28-xea-2.dts
for U-Boot consumption and renaming the upstream imx28-xea.dts to imx28-xea.dts.

create mode 100644 arch/arm/dts/imx28-xea-1.dts
create mode 100644 arch/arm/dts/imx28-xea-2-u-boot.dtsi
create mode 100644 arch/arm/dts/imx28-xea-2.dts
rename arch/arm/dts/{imx28-xea.dts => imx28-xea.dtsi} (100%)

> other words, u-boot will not support features described in Linux DTS.

That's OK and this happens frequently.

For example, upstream devicetree may describes audio codec,
but U-Boot does not support audio playback.

Devicetree should be OS agnostic.

In U-Boot, we want to re-use the upstream Linux devicetree files 'as-is'.

Adding -u-boot.dtsi files is OK though.

Can you convert the imx28-xea board to OF_UPSTREAM available in the
U-Boot next branch?

> Hence, the rename of files (which would be in sync with Linux at some
> point) looks like not related to Linux DTS (as even after re-sync with
> upstream Linux those changes will not be in Linux DTS).

I did not understand this part, do you mean that Linux will also do the
imx28-xea.dts => imx28-xea.dtsi rename and will also have the new
imx28-xea-1.dts and imx28-xea-2.dts?

Regards,

Fabio Estevam


Re: [PATCH 00/12] arm: xea: Provide support for different XEA board HW versions

2024-03-25 Thread Lukasz Majewski
Hi Fabio,

> Hi Lukasz,
> 
> On Fri, Mar 22, 2024 at 8:43 AM Lukasz Majewski  wrote:
> 
> >  arch/arm/dts/Makefile |  3 +-
> >  arch/arm/dts/imx28-xea-1-u-boot.dtsi  | 11 
> >  arch/arm/dts/imx28-xea-1.dts  |  8 +++
> >  arch/arm/dts/imx28-xea-2-u-boot.dtsi  | 11 
> >  arch/arm/dts/imx28-xea-2.dts  |  8 +++
> >  arch/arm/dts/imx28-xea-u-boot.dtsi|  1 -
> >  .../arm/dts/{imx28-xea.dts => imx28-xea.dtsi} |  0  
> 
> This rename deviates from the upstream devicetree name.
> 
> Ideally, we should convert to OF_UPSTREAM available in U-Boot next.
> 
> >  board/liebherr/xea/spl_xea.c  | 21 +++---
> >  board/liebherr/xea/xea.c  | 65
> > +++ board/liebherr/xea/xea.env|
> >  4 +- configs/imx28_xea_defconfig   |  5 +-
> >  configs/imx28_xea_sb_defconfig|  5 +-
> >  12 files changed, 128 insertions(+), 14 deletions(-)
> >  create mode 100644 arch/arm/dts/imx28-xea-1-u-boot.dtsi  
> 
> >  create mode 100644 arch/arm/dts/imx28-xea-1.dts
> >  create mode 100644 arch/arm/dts/imx28-xea-2-u-boot.dtsi
> >  create mode 100644 arch/arm/dts/imx28-xea-2.dts
> >  rename arch/arm/dts/{imx28-xea.dts => imx28-xea.dtsi} (100%)  
> 
> You should upstream imx28-xea-1.dts and imx28-xea-2.dts first.

The case here is that I'm modifying the *-u-boot.dts{i} files only. In
other words, u-boot will not support features described in Linux DTS.

Hence, the rename of files (which would be in sync with Linux at some
point) looks like not related to Linux DTS (as even after re-sync with
upstream Linux those changes will not be in Linux DTS).


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpj33eMp5EwM.pgp
Description: OpenPGP digital signature


Re: [PATCH 00/12] arm: xea: Provide support for different XEA board HW versions

2024-03-22 Thread Fabio Estevam
Hi Lukasz,

On Fri, Mar 22, 2024 at 8:43 AM Lukasz Majewski  wrote:

>  arch/arm/dts/Makefile |  3 +-
>  arch/arm/dts/imx28-xea-1-u-boot.dtsi  | 11 
>  arch/arm/dts/imx28-xea-1.dts  |  8 +++
>  arch/arm/dts/imx28-xea-2-u-boot.dtsi  | 11 
>  arch/arm/dts/imx28-xea-2.dts  |  8 +++
>  arch/arm/dts/imx28-xea-u-boot.dtsi|  1 -
>  .../arm/dts/{imx28-xea.dts => imx28-xea.dtsi} |  0

This rename deviates from the upstream devicetree name.

Ideally, we should convert to OF_UPSTREAM available in U-Boot next.

>  board/liebherr/xea/spl_xea.c  | 21 +++---
>  board/liebherr/xea/xea.c  | 65 +++
>  board/liebherr/xea/xea.env|  4 +-
>  configs/imx28_xea_defconfig   |  5 +-
>  configs/imx28_xea_sb_defconfig|  5 +-
>  12 files changed, 128 insertions(+), 14 deletions(-)
>  create mode 100644 arch/arm/dts/imx28-xea-1-u-boot.dtsi

>  create mode 100644 arch/arm/dts/imx28-xea-1.dts
>  create mode 100644 arch/arm/dts/imx28-xea-2-u-boot.dtsi
>  create mode 100644 arch/arm/dts/imx28-xea-2.dts
>  rename arch/arm/dts/{imx28-xea.dts => imx28-xea.dtsi} (100%)

You should upstream imx28-xea-1.dts and imx28-xea-2.dts first.


[PATCH 00/12] arm: xea: Provide support for different XEA board HW versions

2024-03-22 Thread Lukasz Majewski


This patch set provides support for different XEA board revisions.
Due to very limited SPL size, the board's switch DTB decision is
performed very early in u-boot proper; before driver model is set.

Adjustments for DTS between revisions are for the u-boot adjustment code
(i.e. tweaks due to functionality not supported in u-boot), hence
there is no need to update them from Linux upstream DTS.


Lukasz Majewski (12):
  arm: spl: xea: Remove I2S pins configuration from early initialization
  arm: xea: Add support for reading SoM (CPU) and base board HW revision
  arm: xea: Rename imx28-xea.dts to imx28-xea-1.dts
  dts: xea: Move phy-reset-gpios property to version specific DTS file
  dts: xea: Remove outdated comment
  arm: xea: Add support for multiple dtbs in u-boot
  dts: xea: Add device tree description for XEA HW rev. 2
  arm: spl: Add definition for PHY reset GPIO for XEA HW rev. 2
  arm: config: xea: Enable support for multiple DTBs for XEA board
  config: xea: Enable late board initialization to set revision variable
  arm: xea: Print information about XEA's SoM HW revision
  arm: env: Add support for booting different HW revisions of XEA boards

 arch/arm/dts/Makefile |  3 +-
 arch/arm/dts/imx28-xea-1-u-boot.dtsi  | 11 
 arch/arm/dts/imx28-xea-1.dts  |  8 +++
 arch/arm/dts/imx28-xea-2-u-boot.dtsi  | 11 
 arch/arm/dts/imx28-xea-2.dts  |  8 +++
 arch/arm/dts/imx28-xea-u-boot.dtsi|  1 -
 .../arm/dts/{imx28-xea.dts => imx28-xea.dtsi} |  0
 board/liebherr/xea/spl_xea.c  | 21 +++---
 board/liebherr/xea/xea.c  | 65 +++
 board/liebherr/xea/xea.env|  4 +-
 configs/imx28_xea_defconfig   |  5 +-
 configs/imx28_xea_sb_defconfig|  5 +-
 12 files changed, 128 insertions(+), 14 deletions(-)
 create mode 100644 arch/arm/dts/imx28-xea-1-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx28-xea-1.dts
 create mode 100644 arch/arm/dts/imx28-xea-2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx28-xea-2.dts
 rename arch/arm/dts/{imx28-xea.dts => imx28-xea.dtsi} (100%)

-- 
2.39.2