Fix definition condition for APB1 and APB2.
These were not visible until now as defaulted
in Kconfig.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
These were missing but not visible since value was defaulted
in Kconfig.
With Kconfig deprecation this breaks compilation.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In prts of the code, we use rcc node "clocks" property to testify the
use of device tree for clocks configuration.
This doesn't work in case of stm32h7 m4 targets as for those,
"upstream rcc" clock configuration, such as sysclk source selection,
is done on m7 core and hence rcc node doesn't have a "clocks"
property.
To work around this, use alternate "d1cpre" property in case of
stm32h7 targets.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Cortex-M4 stm32mp1 zephyr relies on chip Cortex-A for clock
configuration.
No change is then required for conversion to dts based clocks
configuration, but we do need to exclude use of newly deprecated
Kconfig symbols.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add new symbol CLOCK_CONTROL_STM32_HAS_DTS to exclude definition
of other CLOCK_CONTROL_STM32_* symbols when dts based configuration
is in use.
CLOCK_CONTROL_STM32_HAS_DTS is defined based on availability of
"clocks" property in rcc node.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Symbol CLOCK_STM32_HSE_CLOCK will remain in use in context of stm32
clock_control configuration using device tree, cf commit
a7989f64a3.
In preparation for next change, separate it from the others symbols
definition. Also make it non dependent from other Kconfig symbols.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Following introduction of dts based driver configuration (cf #34120,
#32609 and #34701), deprecate Kconfig symbols by generating a warning
when one of these symbols is used.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add extra check for the LwM2M client state, to allow triggering of the
Registration Update message only when registered.
This fixes an issue, when the `trigger_update` flag could be set during
the bootstrap procedure (when the value of the Lifetime resource was
set), which resulted in an uneccessary Registration Update message just
after the successful registration.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit implements the OpenThread APIs to configure a radio
reception slot at a specific time. This is needed for the correct
functioning of a CSL receiver.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
Get the correct flash device from the storage partition node.
The current code is relying on the invalid assumption that the
chosen zephyr,flash-controller node is the device which contains
the storage partition.
Reported-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add a real README, convert the device getter to DEVICE_DT_GET_ANY,
and enable assertions to make debugging easier on new users.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use a gpio_dt_spec, dropping device_get_binding. This in turn lets us
write everything in a single main() without sacrificing readability
since the LED is optional.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Replace DT_CHOSEN_ZEPHYR_CAN_PRIMARY_LABEL with DEVICE_DT_GET on the
chosen node itself.
This is causing a build error in CI for the waveshare_open103z board
because it disables CAN by default in favor of USB. Throw in an
overlay reversing that decision for the sake of this sample to keep
things building. (Though the build previously succeeded, the
device_get_binding() call would simply have failed.)
Replace the LED access with GPIO_DT_SPEC_GET_OR. This changes the
semantics slightly so that the simulated LED implemented via printk()
is run if either the node is missing or the pin cannot be configured,
instead of just running when the node is missing. An unready LED port
when the node is defined still returns early from main.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Replace device_get_binding with DEVICE_DT_GET(). Fix and clean up
error handling and debug printing during initialization.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Require board overlays to configure the sample in the /zephyr,user
node, and access the device with DEVICE_DT_GET instead of
device_get_binding(). Update the documentation and move existing board
configuration to overlays.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Use the new GPIO_DT_SPEC_GET_OR() macro to clean up the node detection
code by eliminating conditional compilation. This increases code
coverage on platforms where not all the devicetree nodes are
available.
Clean up some whitespace while we're at it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Just a bit of future-proofing so we can continue to link to the right
place in case we ever want to move the /zephyr,user docs out of the
'inferred bindings' section in the DT guide.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
These helper macros avoid boilerplate when constructing a gpio_dt_spec
structure from optional devicetree properties.
Update the release notes while we're here.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
If modem receives an IPv6 address, buffer overrun
would occur. Fix this by checking string length to
ensure what type of IP address needs to be parsed.
Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
device_pm_control_nop has been marked deprecated so we get a CI
build error due to its use. Replace with NULL to fix the issue.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Extend the steps taken in tox.ini by type checking the 'devicetree'
package. This will make it easier for callers to type-check code that
uses the low level DT module's public APIs, since they can rely on
the type checker a bit more.
It will also help avoid bugs by adding some type checking for future
changes to this module.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Mypy is complaining about this line for some reason I didn't have time
to figure out. Just shut it up for now; I'll look into this when I get
around to type annotating edtlib.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Now that all the other code it depends on is annotated, we can finish
up the type annotation of this module in the main DT class.
It's not worth it to try to annotate the private methods (the ones
that begin with '_'). Most of these are low level lexing helpers that
aren't particularly amenable to static type checking, because the type
of a token's value is often dependent on the token ID in ways that
static type annotations are not well equipped to capture.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>