-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
modules: hal: nordic: Add missing mappings of peripheral base addresses #18937
modules: hal: nordic: Add missing mappings of peripheral base addresses #18937
Conversation
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.
It's more like "dts: nordic: nrf9160: " It seems to be a PR for DTS updates for nRF9160
8f87b63
to
73e6a7e
Compare
I forgot about the aliases for non-secure part. As usual... |
The actual purpose of these changes in dts is to provide data for these mappings of base addresses. That's why I used such title. But indeed, it seems that it will be clearer to use two commits - one with the dts changes and one with the update of west manifest. What you think? |
Yeap, that seems better |
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 as a cleanup, though I second @ulfalizer's recommendation to wait until material currently staged in topic-dts is merged. Also waiting until west.yml references a SHA1 before approving.
One thing I don't understand, which this PR makes very obvious, is why there aliases (e.g. i2c-0
) for every node label (i2c0
) (not the same as the node label
property value "I2C_0"). There are a very small number of situations where an alias is still necessary, primarily for cross-target common resources like sw0
and led1
, which probably should be handled a different way.
In all of Zephyr master there is one driver, three samples, and four tests that reference generated alias symbols.
It's not in scope for this PR, but we should move towards getting rid of those.
73e6a7e
to
8df60b8
Compare
Rebased on master. |
287c170
to
2037a73
Compare
Updated west.yml with the proper revision of the hal_nordic module as zephyrproject-rtos/hal_nordic#3 has been merged. |
What's the issue with the |
@galak The hardware address for the instance is being taken from the devicetree information. |
what do you mean by the hardware address? If it's taken from the DT info, then why do we care about needing to know the specific instance from the HW perspective? The reason DT_INST_ can't be used for various drivers on most SoCs is related to pinmux info. Once we're able to generate pinmux info for a given SoC that should free up the driver to utilize DT_INST_ defines. So I'm trying to understand in the nordic case what prevents to the use of DT_INST_ defines today. |
This isn't my area, but: what If Zephyr's identification of that instance is not the same as the one selected by other systems that Zephyr applications must coordinate with (such as a softdevice blob) things will go very badly wrong. Because |
@anangl where is this mapping happing between the |
Or maybe not, as I don't see it there. I know it was somewhere.... I'm going to stop with this discussion because it's clearly outside my ken, but I still want #18986 to get some love regardless. |
These mappings do not use |
2037a73
to
24f4e97
Compare
Rebased on master and in result skipped the commit modifying west.yml as the needed revision update already went in through #18895. |
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 nits re. new binding stuff.
dts/bindings/arm/nordic,nrf-egu.yaml
Outdated
|
||
properties: | ||
compatible: | ||
constraint: "nordic,nrf-egu" |
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.
Could be replaced with a
compatible: "nordic,nrf-egu"
at the top level now. That avoids a deprecation warning too.
dts/bindings/arm/nordic,nrf-kmu.yaml
Outdated
|
||
properties: | ||
compatible: | ||
constraint: "nordic,nrf-kmu" |
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.
Ditto here.
dts/bindings/arm/nordic,nrf-egu.yaml
Outdated
# Copyright (c) 2019 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# |
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.
Could shorten the header a bit to
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
I changed it to that in a bunch of other files.
dts/bindings/arm/nordic,nrf-kmu.yaml
Outdated
# Copyright (c) 2019 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# |
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.
Ditto here re. header.
|
||
properties: | ||
compatible: | ||
constraint: "nordic,nrf-pdm" |
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.
Ditto here re. compatible
.
dts/bindings/i2s/nordic,nrf-i2s.yaml
Outdated
|
||
properties: | ||
compatible: | ||
constraint: "nordic,nrf-i2s" |
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.
Ditto here re. compatible
.
# Copyright (c) 2019 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# |
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.
Ditto here re. header.
|
||
properties: | ||
compatible: | ||
constraint: "nordic,nrf-regulators" |
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.
Ditto here re. compatible.
# Copyright (c) 2019 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# |
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.
Ditto here re. header.
|
||
properties: | ||
compatible: | ||
constraint: "nordic,nrf-vmc" |
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.
Ditto here re. compatible
.
edtlib prints deprecation warnings that say what needs to be changed btw. |
For quite a few peripherals that are currently supported by nrfx HALs or drivers there are no definitions of corresponding CMSIS-Core peripheral accessing symbols that would provide their base addresses in the proper domain (secure or non-secure), accordingly to the build target. This commits adds devicetree nodes for these peripherals so that their base addresses can be used in definitions of the accessing symbols mentioned above. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
24f4e97
to
5528b44
Compare
@ulfalizer I addressed your 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.
Thanks
For quite a few peripherals that are currently supported by nrfx HALs
or drivers there are no definitions of corresponding CMSIS-Core
peripheral accessing symbols that would provide their base addresses
in the proper domain (secure or non-secure), accordingly to the build
target. This commits adds devicetree nodes for these peripherals and
updates the revision of the hal_nordic module so that it can provide
the missing symbol definitions basing on data from the devicetree.
Requires zephyrproject-rtos/hal_nordic#3 to go in first.