Skip to contentSkip to conversation

socfpga cyclone5 dts

U-Boot Simon Goldschmidt 5 participants 14 messages Oct 18, 2018 – Oct 25, 2018

lore
Share & tools
lore
#0 lore raw

Hi Marek,

I was playing with updating the dts files for cyclone5 (and arria5) from current kernel sources, but I found that the kernel as 4 boards that U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

How should I proceed here? Should I copy new boards from the kernel? Should I keep U-Boot-only boards and try to adjust them to changes (if any)?

Simon

#1 lore raw
Quoted 1 line · Simon Goldschmidt

Hi Marek,

Hi,

Quoted 3 lines

I was playing with updating the dts files for cyclone5 (and arria5) from current kernel sources, but I found that the kernel as 4 boards that U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

And yikes, which boards are where , can you list the problematic ones?

Quoted 3 lines

How should I proceed here? Should I copy new boards from the kernel? Should I keep U-Boot-only boards and try to adjust them to changes (if any)?

I'd say sync as much as possible with kernel and the rest, update. I don't think there are any real board specific things which would prevent the update in those DTs missing in the kernel.

Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

Marek Vasut <[email protected]> schrieb am Do., 18. Okt. 2018, 22:15:

Quoted 14 lines · Simon Goldschmidt
Quoted 1 line

Hi Marek,

Hi,

Quoted 3 lines

I was playing with updating the dts files for cyclone5 (and arria5) from current kernel sources, but I found that the kernel as 4 boards that U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

And yikes, which boards are where , can you list the problematic ones?

Quoted 8 lines
Quoted 3 lines

How should I proceed here? Should I copy new boards from the kernel? Should I keep U-Boot-only boards and try to adjust them to changes (if any)?

I'd say sync as much as possible with kernel and the rest, update. I don't think there are any real board specific things which would prevent the update in those DTs missing in the kernel.

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Simon

#3 lore raw
Quoted 25 lines · Simon Goldschmidt

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
> Hi Marek,

Hi,

> I was playing with updating the dts files for cyclone5 (and arria5) from
> current kernel sources, but I found that the kernel as 4 boards that > U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

And yikes, which boards are where , can you list the problematic ones?

> How should I proceed here? Should I copy new boards from the kernel? > Should I keep U-Boot-only boards and try to adjust them to changes (if > any)?

Quoted 8 lines

I'd say sync as much as possible with kernel and the rest, update. I don't think there are any real board specific things which would prevent the update in those DTs missing in the kernel.

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Sounds good!

Signature · 2 lines
Best regards,
Marek Vasut
#4 lore raw
Quoted 30 lines · Marek Vasut
Quoted 29 lines · Simon Goldschmidt

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
> Hi Marek,

Hi,

> I was playing with updating the dts files for cyclone5 (and arria5) from
> current kernel sources, but I found that the kernel as 4 boards that > U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

And yikes, which boards are where , can you list the problematic ones?

> How should I proceed here? Should I copy new boards from the kernel? > Should I keep U-Boot-only boards and try to adjust them to changes (if > any)?

I'd say sync as much as possible with kernel and the rest, update. I don't think there are any real board specific things which would prevent the update in those DTs missing in the kernel.

Quoted 4 lines
Quoted 3 lines

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Sounds good!

What about the license header? Should we keep the original header for sync'ed device trees or change it to SPDX?

Simon

#5 lore raw
Quoted 37 lines · Simon Goldschmidt
Quoted 36 lines · Marek Vasut
Quoted 35 lines · Simon Goldschmidt

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

     On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
     > Hi Marek,

     Hi,

     > I was playing with updating the dts files for cyclone5 (and arria5) from
     > current kernel sources, but I found that the kernel as 4 boards that
     > U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

     Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

     And yikes, which boards are where , can you list the problematic ones?

     > How should I proceed here? Should I copy new boards from the kernel?
     > Should I keep U-Boot-only boards and try to adjust them to changes (if
     > any)?

     I'd say sync as much as possible with kernel and the rest, update. I
     don't think there are any real board specific things which would prevent
     the update in those DTs missing in the kernel.

Quoted 8 lines
Quoted 5 lines
Quoted 4 lines

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Sounds good!

What about the license header? Should we keep the original header for sync'ed device trees or change it to SPDX?

SPDX please. Even better, fix it in the kernel too :)

Signature · 2 lines
Best regards,
Marek Vasut
#6 lore raw
In reply to Marek Vasut
Quoted 30 lines · Marek Vasut
Quoted 29 lines · Simon Goldschmidt

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
> Hi Marek,

Hi,

> I was playing with updating the dts files for cyclone5 (and arria5) from
> current kernel sources, but I found that the kernel as 4 boards that > U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

And yikes, which boards are where , can you list the problematic ones?

> How should I proceed here? Should I copy new boards from the kernel? > Should I keep U-Boot-only boards and try to adjust them to changes (if > any)?

I'd say sync as much as possible with kernel and the rest, update. I don't think there are any real board specific things which would prevent the update in those DTs missing in the kernel.

Quoted 4 lines
Quoted 3 lines

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Sounds good!

After a short test run, I decided to first ask for the boards before preparing a patch:

Boards in U-Boot but not in Linux (not updated):
- socfpga_cyclone5_dbm_soc1.dts
- socfpga_cyclone5_de0_nano_soc.dts (is this
'socfpga_cyclone5_de0_sockit.dts'?)
- socfpga_cyclone5_de1_soc.dts
- socfpga_cyclone5_de10_nano.dts
- socfpga_cyclone5_is1.dts
- socfpga_cyclone5_sr1500.dts

Boards in Linux but not in U-Boot:
- socfpga_cyclone5_de0_sockit.dts (is this
'socfpga_cyclone5_de0_nano_soc.dts'?)
- socfpga_cyclone5_sodia.dts

Also, Dinh has enabled the watchdog nearly 4 years ago in socfpga_cyclone5.dtsi but U-Boot doesn't. Should we keep it enabled or disable it in the U-Boot specific dts files?

Thanks,
Simon

#7 lore raw
Quoted 40 lines · Simon Goldschmidt

On 18.10.2018 23:04, Marek Vasut wrote:

On 10/18/2018 10:20 PM, Simon Goldschmidt wrote:

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
> Hi Marek,

Hi,

> I was playing with updating the dts files for cyclone5 (and arria5) from
> current kernel sources, but I found that the kernel as 4 boards that > U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

And yikes, which boards are where , can you list the problematic ones?

> How should I proceed here? Should I copy new boards from the kernel? > Should I keep U-Boot-only boards and try to adjust them to changes (if > any)?

I'd say sync as much as possible with kernel and the rest, update. I don't think there are any real board specific things which would prevent the update in those DTs missing in the kernel.

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Sounds good!

Quoted 7 lines

After a short test run, I decided to first ask for the boards before preparing a patch:

Boards in U-Boot but not in Linux (not updated):
- socfpga_cyclone5_dbm_soc1.dts
- socfpga_cyclone5_de0_nano_soc.dts (is this
'socfpga_cyclone5_de0_sockit.dts'?)

Yes, these are the same board.

Quoted 10 lines

- socfpga_cyclone5_de1_soc.dts- socfpga_cyclone5_de10_nano.dts- socfpga_cyclone5_is1.dts- socfpga_cyclone5_sr1500.dts
Boards in Linux but not in U-Boot:- socfpga_cyclone5_de0_sockit.dts (is this 'socfpga_cyclone5_de0_nano_soc.dts'?)- socfpga_cyclone5_sodia.dts Also, Dinh has enabled the watchdog nearly 4 years ago in socfpga_cyclone5.dtsi but U-Boot doesn't. Should we keep it enabled or disable it in the U-Boot specific dts files? Thanks,Simon_______________________________________________U-Boot mailing listU-Boot at lists.denx.dehttps://lists.denx.de/listinfo/u-boot

#8 lore raw
In reply to Simon Goldschmidt
Quoted 41 lines · Simon Goldschmidt
Quoted 40 lines · Marek Vasut
Quoted 39 lines · Simon Goldschmidt

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

     On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
     > Hi Marek,

     Hi,

     > I was playing with updating the dts files for cyclone5 (and arria5) from
     > current kernel sources, but I found that the kernel as 4 boards that
     > U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

     Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

     And yikes, which boards are where , can you list the problematic ones?

     > How should I proceed here? Should I copy new boards from the kernel?
     > Should I keep U-Boot-only boards and try to adjust them to changes (if
     > any)?

     I'd say sync as much as possible with kernel and the rest, update. I
     don't think there are any real board specific things which would prevent
     the update in those DTs missing in the kernel.

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Quoted 7 lines
Quoted 1 line

Sounds good!

After a short test run, I decided to first ask for the boards before preparing a patch:

Boards in U-Boot but not in Linux (not updated):
- socfpga_cyclone5_dbm_soc1.dts

Hum, I should upstream that one.

Quoted 2 lines

- socfpga_cyclone5_de0_nano_soc.dts (is this
'socfpga_cyclone5_de0_sockit.dts'?)

There is no de0-sockit. There is de0-nano-soc and there is sockit , these are two different boards.

Quoted 2 lines

- socfpga_cyclone5_de1_soc.dts
- socfpga_cyclone5_de10_nano.dts

These should be upstream.

Quoted 2 lines

- socfpga_cyclone5_is1.dts
- socfpga_cyclone5_sr1500.dts

CCing Stefan.

Quoted 3 lines

Boards in Linux but not in U-Boot:
- socfpga_cyclone5_de0_sockit.dts (is this
'socfpga_cyclone5_de0_nano_soc.dts'?)

Wasn't this removed to de0-nano-soc in next ?

Quoted 5 lines

- socfpga_cyclone5_sodia.dts

Also, Dinh has enabled the watchdog nearly 4 years ago in socfpga_cyclone5.dtsi but U-Boot doesn't. Should we keep it enabled or disable it in the U-Boot specific dts files?

Disable it in board files to keep the current behavior.

Quoted 2 lines

Thanks,
Simon

Signature · 2 lines
Best regards,
Marek Vasut
#9 lore raw
Quoted 51 lines · Marek Vasut
Quoted 41 lines · Simon Goldschmidt
Quoted 40 lines · Marek Vasut
Quoted 39 lines · Simon Goldschmidt

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
> Hi Marek,

Hi,

> I was playing with updating the dts files for cyclone5 (and arria5) from
> current kernel sources, but I found that the kernel as 4
boards that
> U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

And yikes, which boards are where , can you list the problematic
ones?

> How should I proceed here? Should I copy new boards from the
kernel?
> Should I keep U-Boot-only boards and try to adjust them to
changes (if
> any)?

I'd say sync as much as possible with kernel and the rest,
update. I
don't think there are any real board specific things which would
prevent
the update in those DTs missing in the kernel.

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Quoted 7 lines
Quoted 1 line

Sounds good!

After a short test run, I decided to first ask for the boards before preparing a patch:

Boards in U-Boot but not in Linux (not updated):
- socfpga_cyclone5_dbm_soc1.dts

Quoted 7 lines

Hum, I should upstream that one.

Quoted 2 lines

- socfpga_cyclone5_de0_nano_soc.dts (is this
'socfpga_cyclone5_de0_sockit.dts'?)

There is no de0-sockit. There is de0-nano-soc and there is sockit , these are two different boards.

Fixed in linux-next, I compared 4.19, see below.

Quoted 5 lines
Quoted 3 lines

- socfpga_cyclone5_de1_soc.dts
- socfpga_cyclone5_de10_nano.dts

These should be upstream.

But they aren't? Or did you mean "these should be upstreamed"? By whom?

Quoted 11 lines
Quoted 3 lines

- socfpga_cyclone5_is1.dts
- socfpga_cyclone5_sr1500.dts

CCing Stefan.

Quoted 3 lines

Boards in Linux but not in U-Boot:
- socfpga_cyclone5_de0_sockit.dts (is this
'socfpga_cyclone5_de0_nano_soc.dts'?)

Wasn't this removed to de0-nano-soc in next ?

Yes, sorry, I was comparing v4.19, not linux-next. You're right that this is renamed in linux-next.

Quoted 8 lines
Quoted 6 lines

- socfpga_cyclone5_sodia.dts

Also, Dinh has enabled the watchdog nearly 4 years ago in socfpga_cyclone5.dtsi but U-Boot doesn't. Should we keep it enabled or disable it in the U-Boot specific dts files?

Disable it in board files to keep the current behavior.

Do we enable such things in the "-u-boot.dtsi" "overlay" as well? Because when adding it to the dts, we end up having diffs again...

Simon

#10 lore raw

On 10/23/2018 10:52 AM, Simon Goldschmidt wrote:
[...]

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

- socfpga_cyclone5_de1_soc.dts
- socfpga_cyclone5_de10_nano.dts

These should be upstream.

But they aren't? Or did you mean "these should be upstreamed"? By whom?

CCing Dinh :-)

[...]

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Also, Dinh has enabled the watchdog nearly 4 years ago in socfpga_cyclone5.dtsi but U-Boot doesn't. Should we keep it enabled or disable it in the U-Boot specific dts files?

Disable it in board files to keep the current behavior.

Do we enable such things in the "-u-boot.dtsi" "overlay" as well? Because when adding it to the dts, we end up having diffs again...

Sounds good!

Signature · 2 lines
Best regards,
Marek Vasut
#11 lore raw
Quoted 9 lines · Marek Vasut

On 10/23/2018 10:52 AM, Simon Goldschmidt wrote:
[...]

Quoted 4 lines
Quoted 3 lines
Quoted 2 lines

- socfpga_cyclone5_de1_soc.dts
- socfpga_cyclone5_de10_nano.dts

These should be upstream.

But they aren't? Or did you mean "these should be upstreamed"? By whom?

CCing Dinh :-)

Quoted 8 lines

[...]

Quoted 6 lines
Quoted 4 lines
Quoted 3 lines

Also, Dinh has enabled the watchdog nearly 4 years ago in socfpga_cyclone5.dtsi but U-Boot doesn't. Should we keep it enabled or disable it in the U-Boot specific dts files?

Disable it in board files to keep the current behavior.

Do we enable such things in the "-u-boot.dtsi" "overlay" as well? Because when adding it to the dts, we end up having diffs again...

Sounds good!

To get the Linux devicetree running on the socrates board, I had to add the "clock-frequency" property to the uart(s). What's the status here, socfpga gen5 does not support getting clock rates from the device tree, is that correct?

If so, I'll put the clock-frequency into the "-u-boot.dtsi" files, as well. They can be removed once the clock drivers work.

Also, the gpio controllers are now missing the "bank-name" property, without which they fail to register. Since this property is not even described in device tree bindings, I chose to add a fallback to the driver to use 'fdt_get_name()' to get a name. The downside is that searching a GPIO by bank name might now fail. Is this acceptable? If not, we'll have to add the "bank-name" properties to the "-u-boot.dtsi" files as well. But since most gpio drivers seem to do it that way, I figured it should be OK...

I haven't tested QSPI yet, and I only have access to a SoCrates board, but aside from some "u-boot,dm-pre-reloc" strings, my "-u-boot.dtsi" currently only sets "clock-frequency" for the uarts and disables the watchdog and everything seems to boot fine so far.

Simon

#12 lore raw
Quoted 15 lines · Simon Goldschmidt
Quoted 14 lines · Marek Vasut

On 10/23/2018 10:52 AM, Simon Goldschmidt wrote:
[...]

Quoted 4 lines
Quoted 3 lines
Quoted 2 lines

- socfpga_cyclone5_de1_soc.dts
- socfpga_cyclone5_de10_nano.dts

These should be upstream.

But they aren't? Or did you mean "these should be upstreamed"? By whom?

CCing Dinh :-)

[...]

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

Also, Dinh has enabled the watchdog nearly 4 years ago in socfpga_cyclone5.dtsi but U-Boot doesn't. Should we keep it enabled or disable it in the U-Boot specific dts files?

Disable it in board files to keep the current behavior.

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

Do we enable such things in the "-u-boot.dtsi" "overlay" as well? Because when adding it to the dts, we end up having diffs again...

Sounds good!

To get the Linux devicetree running on the socrates board, I had to add the "clock-frequency" property to the uart(s). What's the status here, socfpga gen5 does not support getting clock rates from the device tree, is that correct?

We don't have a clock driver on Gen5, right.

Quoted 2 lines

If so, I'll put the clock-frequency into the "-u-boot.dtsi" files, as well. They can be removed once the clock drivers work.

This is per-board, so it should go into each boards' -u-boot.dts

Quoted 8 lines

Also, the gpio controllers are now missing the "bank-name" property, without which they fail to register. Since this property is not even described in device tree bindings, I chose to add a fallback to the driver to use 'fdt_get_name()' to get a name. The downside is that searching a GPIO by bank name might now fail. Is this acceptable? If not, we'll have to add the "bank-name" properties to the "-u-boot.dtsi" files as well. But since most gpio drivers seem to do it that way, I figured it should be OK...

Either re-add the bank-name to -u-boot.dtsi or fix the GPIO handling code. I'd prefer the former, since someone might depend on those GPIO bank names in their scripts.

Quoted 4 lines

I haven't tested QSPI yet, and I only have access to a SoCrates board, but aside from some "u-boot,dm-pre-reloc" strings, my "-u-boot.dtsi" currently only sets "clock-frequency" for the uarts and disables the watchdog and everything seems to boot fine so far.

Cool!

Signature · 2 lines
Best regards,
Marek Vasut
#13 lore raw
In reply to Marek Vasut
Quoted 61 lines · Marek Vasut
Quoted 41 lines · Simon Goldschmidt
Quoted 40 lines · Marek Vasut
Quoted 39 lines · Simon Goldschmidt

Marek Vasut <marek.vasut at gmail.com <mailto:[email protected]>> schrieb am Do., 18. Okt. 2018, 22:15:

     On 10/18/2018 09:28 PM, Simon Goldschmidt wrote:
     > Hi Marek,

     Hi,

     > I was playing with updating the dts files for cyclone5 (and arria5) from
     > current kernel sources, but I found that the kernel as 4
boards that
     > U-Boot doesn't have and U-Boot has 6 boards that the kernel doesn't have.

     Thanks for doing this, really appreciated (even though it probably doesn't look that way most of the time).

     And yikes, which boards are where , can you list the problematic
ones?

     > How should I proceed here? Should I copy new boards from the
kernel?
     > Should I keep U-Boot-only boards and try to adjust them to
changes (if
     > any)?

     I'd say sync as much as possible with kernel and the rest,
update. I
     don't think there are any real board specific things which would
prevent
     the update in those DTs missing in the kernel.

Ok, I'll just try and prepare a patch that ports the existing boards and mentions the boards not ported from current kernel sources. I don't want to remove boards from U-Boot, so we'll just have to test those not in Linux.

Quoted 7 lines
Quoted 1 line

Sounds good!

After a short test run, I decided to first ask for the boards before preparing a patch:

Boards in U-Boot but not in Linux (not updated):
- socfpga_cyclone5_dbm_soc1.dts

Hum, I should upstream that one.

Quoted 2 lines

- socfpga_cyclone5_de0_nano_soc.dts (is this
'socfpga_cyclone5_de0_sockit.dts'?)

There is no de0-sockit. There is de0-nano-soc and there is sockit , these are two different boards.

Quoted 2 lines

- socfpga_cyclone5_de1_soc.dts
- socfpga_cyclone5_de10_nano.dts

Quoted 6 lines

These should be upstream.

Quoted 2 lines

- socfpga_cyclone5_is1.dts
- socfpga_cyclone5_sr1500.dts

CCing Stefan.

Thanks. Simon, It would be great, if you could update those 2 dts files.

Thanks,
Stefan