-
Notifications
You must be signed in to change notification settings - Fork 8.2k
dts: nrf: dts.fixup cleanup for nRF series #10377
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
dts: nrf: dts.fixup cleanup for nRF series #10377
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10377 +/- ##
=======================================
Coverage 48.41% 48.41%
=======================================
Files 270 270
Lines 42121 42121
Branches 10139 10139
=======================================
Hits 20394 20394
Misses 17645 17645
Partials 4082 4082Continue to review full report at Codecov.
|
b972865 to
6596261
Compare
galak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the use of non-CONFIG_ defines is something we've been trying to avoid. I guess if we want to go in this direction, we should start create DT_ prefix defines
|
@galak I think we should go in this direction. CONFIG_ prefixes in macros generated from DT entries are confusing since they suggest the values are configured via Kconfig. |
|
Should I use for example DT_NRF_I2C or DT_I2C ? |
|
@Mierunski DT_ is sufficient IMO. We'll have then: Should work. |
As I think about this more, I worry about this since we are using a convention based on aliases, I guess I'd rather us focus our efforts on using code generation to remove dts.fixup and not introduce a new convention related to aliases (I know we do this some already for GPIOs w/LEDs & BUTTONs). |
6596261 to
2537b99
Compare
|
Using code generation will be next step |
2537b99 to
dcc09a2
Compare
|
@Mierunski boards/arm/nrf52840_pca10056/dts.fixup should be also renamed to dts_fixup.h |
dcc09a2 to
e2ea496
Compare
|
@anangl Fixed |
|
@galak can you revisit please? |
5f0e8ea to
d84a8ef
Compare
galak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor cleanups and comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here? We moved wcm14a2a out of the board.dts:
commit edefd7d
Author: Kumar Gala [email protected]
Date: Thu Nov 15 09:58:49 2018 -0600
boards: nrf52840_pca10056: move modem configurtion to overlay
drivers/i2c/i2c_nrfx_twi.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to rebase this once the I2C PRI fix (#11427) goes in.
drivers/i2c/i2c_nrfx_twi.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically I wouldn't change the name right now since sensor drivers still use CONFIG_I2C_x_NAME. But I'm ok if you want to.
soc/arm/nordic_nrf/nrf52/dts_fixup.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this should move to samples/net/lwm2m_client/dts_fixup.h
d84a8ef to
432c29f
Compare
Changed driver to use alias defines instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
432c29f to
42af0bb
Compare
|
You can also add "Fixes #10658" in the PR description. |
42af0bb to
94e2ee9
Compare
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
94e2ee9 to
6a77704
Compare
Changed driver to use defines from aliases instead of fixup. Signed-off-by: Mieszko Mierunski <[email protected]>
6a77704 to
c5bb5f7
Compare
| #define DT_SPI_3_NAME DT_NORDIC_NRF_SPI_SPI_3_LABEL | ||
|
|
||
| #if defined(DT_NORDIC_NRF_CC310_5002A000_BASE_ADDRESS) | ||
| #define DT_CC310_CTL_BASE_ADDR DT_NORDIC_NRF_CC310_5002A000_BASE_ADDRESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems there are no "_NAME" defines for crypto. Is this intentional?
carlescufi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine now.
All dts defines for nRF series are now extracted through aliases instead of dts.fixup files.
I left NAME defines for compatibility with examples and other drivers.
I moved WNCM14A2A dts.fixups to board level, but they should also be replaced with aliases and overlay files at example level.
Fixes #10658