Skip to content

Move fixups definitions in .fixup files under dts/ #5707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
8 of 9 tasks
erwango opened this issue Jan 17, 2018 · 11 comments
Closed
8 of 9 tasks

Move fixups definitions in .fixup files under dts/ #5707

erwango opened this issue Jan 17, 2018 · 11 comments
Labels
area: Boards area: Devicetree area: optimization Enhancement Changes/Updates/Additions to existing features Good first issue Good for a first time contributor to take

Comments

@erwango
Copy link
Member

erwango commented Jan 17, 2018

extract_dts_includes.dts script allows to gather and merge .fixup files accross the tree.

This allows to factorize most of the definitions in boards///dts.fixup in new arch//.fixup files.
This way, one would not need to bother with dts.fixup when porting new board

@dwagenk
Copy link
Contributor

dwagenk commented Jan 26, 2018

@erwango where do the new dts.fixup files go?
for example moving SPI fixup from boards/arm/nucleo_f091rc to ?
my guess would be a dts.fixup file in arch/arm/soc/st_stm32/stm32f0/dts.fixup, is this correct?
And are there changes needed in the build system somewhere?

@erwango
Copy link
Member Author

erwango commented Jan 26, 2018

Yes, this is under arch, you're right (editing the issue header).
There is nothing you should do to get it working, possibility has been enabled since some time now in the device tree parsing script.
I haven't tested it yet, but it seems galak started to move things in #5828.

@galak
Copy link
Collaborator

galak commented Jan 26, 2018

I added support for multiple -f options to the script in commit aed577a. I added recent cmake support to b452e1b to support an SoC series level fixup.

galak pushed a commit that referenced this issue Jan 28, 2018
This moves and merges the existing board-level dts.fixup files
for STM32 F0 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <[email protected]>
galak pushed a commit that referenced this issue Jan 28, 2018
This moves and merges the existing board-level dts.fixup files
for STM32 F4 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

96b_carbon boards fixup block for Bluetooth HCI device via SPI
stays in board level dts.fixup file, because it is board specific.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <[email protected]>
galak pushed a commit that referenced this issue Jan 28, 2018
This moves and merges the existing board-level dts.fixup files
for STM32 F1 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <[email protected]>
galak pushed a commit that referenced this issue Jan 28, 2018
This moves and merges the existing board-level dts.fixup files
for STM32 F3 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <[email protected]>
galak pushed a commit that referenced this issue Jan 28, 2018
This moves and merges the existing board-level dts.fixup files
for STM32 L4 SOC family into one soc family level dts.fixup file.
No new fixup blocks have been added, only fixup blocks, that were
part of at least one board level dts.fixup file are present in
soc family level dts.fixup file.

disco_l475_iot1 boards fixup blocks for devices connected via SPI
and I2C stay in board level dts.fixup file, because they are board
specific.

Contributes to #5707

Signed-off-by: Daniel Wagenknecht <[email protected]>
@erwango
Copy link
Member Author

erwango commented Jan 29, 2018

fixed by #5859

@erwango erwango closed this as completed Jan 29, 2018
@dwagenk
Copy link
Contributor

dwagenk commented Jan 29, 2018

@erwango does this only effect STM32 (wich is fixed now), or shouldn't it stay open for other SOC Families?

@erwango
Copy link
Member Author

erwango commented Jan 29, 2018

@dwagenk : You're right, this was a generic ticket, let me re-open it.

@erwango erwango reopened this Jan 29, 2018
@nashif nashif added the Enhancement Changes/Updates/Additions to existing features label Feb 6, 2018
@galak
Copy link
Collaborator

galak commented Feb 21, 2018

Moved NXP in PR #6297

@alext-mkrs
Copy link
Contributor

Looking for simple initial stuff (and to get a hang of DTS use in Zephyr) I've come across this one and looks like at least none of the ARC and x86 boards have dts.fixup files - shouldn't those be marked as done in the issue checklist?

Also, @galak mentioned that NXP is done too in #6297 (just a comment above this one) - should it be ticked off as well?

Finally, here's the current list of fixup files under boards/ - I've checked several ones randomly (96b_argonkey, nrf52_pca20020, frdm_k64f) and it seems to me that none of them lend themselves to this "upleveling", as they have real board-specific info. Is that a correct understanding? If not, any pointers as to what else needs to be done here? I'm not that familiar with DTS yet, but it's namely my goal here - learn and help the project at the same time, so I'd be glad to dig into details.

boards/arm/frdm_k64f/dts.fixup
boards/arm/olimexino_stm32/dts.fixup
boards/arm/mps2_an385/dts.fixup
boards/arm/frdm_kw41z/dts.fixup
boards/arm/96b_neonkey/dts.fixup
boards/arm/disco_l475_iot1/dts.fixup
boards/arm/96b_argonkey/dts.fixup
boards/arm/hexiwear_k64/dts.fixup
boards/arm/nrf52_pca20020/dts.fixup
boards/arm/96b_carbon/dts.fixup

@galak
Copy link
Collaborator

galak commented Sep 12, 2018

@erwango can you review this.

@erwango
Copy link
Member Author

erwango commented Sep 12, 2018

Fixup files mentionned by @alext-mkrs are actually board related. They are linked to SPI or I2C devices (sensors and all) which definitions are linked to actual board schematics (instance of I2C/SPI buses). Hence they can't be moved to dts/.

I've performed a check on initial list in this ticket and crossed some cases.
Remains the following to be moved

  • boards/x86/up_squared > Board disapeared. All other x86 are done
  • boards/arm/mps2_an385
  • boards/riscv32/hifive

@erwango
Copy link
Member Author

erwango commented Nov 22, 2018

Only MPS board remains.
Though, since there is no other board using this SoC, there is no code duplication to factorize there.
Let's close ticket right now

@erwango erwango closed this as completed Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Boards area: Devicetree area: optimization Enhancement Changes/Updates/Additions to existing features Good first issue Good for a first time contributor to take
Projects
None yet
Development

No branches or pull requests

5 participants