Convert gpio driver to use nodelabels to get references to devicetree
nodes using the new devicetree.h macros.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree. Move the prescaler setting
from Kconfig to devicetree as well.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add clock references for ADC and TC devices. Update the bindings for
these devices to require clocks property and update the dtsi files to
have the clock info.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Updating west.yml to point a fix to include proper time.h header in
the HAL. This should fix an issue where clock_gettime() is not
correctly called due to recent change to make it into a system call.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Rename DT_L2_SRAM_* to just L2_SRAM_* and set it using new DT macros.
Do something similar for DT_LP_SRAM_* renamed to LP_SRAM_*
Updated the intel_gna driver as it used the DT_L2_SRAM_* defines.
This change also lets us remove dts_fixup.h on intel_s1000 and
intel_apl_adsp SoCs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree. We update the
atmel,sam0-spi binding for dma to replace the rxdma and txdma
properties with proper 'dmas' property.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree. We update the
atmel,sam0-i2c binding for dma to replace the dma property with
proper 'dmas' property.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Reworked spi_sam driver to utilize new DT_INST macros as part of
this rework we also now get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h
We remove defines from dts_fixup.h and soc_pinmap.h and associated
Kconfig symbols that are no longer needed due to getting all that
information from devicetree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add pinctl support for the SAM SPI device. We update the SPI
binding to have pinctrl-0 bindings that are expected to have
at least phandles for MISO, MOSI, and SPCK, but might also have
various chip selects as well.
The pinctrl nodes will have an 'atmel,pins' property that describes the
GPIO port, pin and periphal configuration for that pin.
We update sam*-pinctrl.dtsi files with all the various pin ctrl
configuration operations supported by the given SoC family. These
files are based on data extracted from the Atmel ASF HAL
(in include/sam<FAMILY>/pio/*.h).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Added ATMEL_SAM_DT_NUM_PINS macro which will return the number of pins
to initialize for "pinctrl-0" devicetree property.
Added ATMEL_SAM_DT_PINS macro which will create an array initializer
with all the pins associated with "pinctrl-0" devicetree property.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit enables the ARM memory protection unit for the SAM 4S
Xplained board, since the `CPU_HAS_ARM_MPU` is now selected by the SoC
Kconfig.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit enables the ARM memory protection unit for the SAM 4E
Xplained Pro board, since the `CPU_HAS_ARM_MPU` is now selected by the
SoC Kconfig.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Rename internal macros to use Z_ prefix instead of _K..
Those macros were missed when we did the global renaming activities.
Fixes#24645
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sort the supported lists alphabetically for some boards. I'm not
trying to do this for all boards, just some DKs I'm using for testing.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add wdt0 node labels for all watchdogs. Keep the existing wdt node
labels in place for backwards compatibility.
Add a wdt1 node to the nRF5340 application core .dtsi, but leave it
disabled. Leave the wdt node's label set to "WDT" on this core for
backwards compatibility also, in case any users are getting it with a
string literal instead of asking the devicetree. This can be changed
later after this round of watchdog changes has been shaken out and
tested more.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
In case of flashing (which is typically used with OpenOCD)
we do reset of the target after programming application binary
in the non-volatile memory.
In case of Elf execution we need to reset the target before
loading Elf sections so that we might be sure our target
is in sane & expected state before we start execution.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Use NODELABEL macros rather than DT_INST as this driver is so far
limited to support of LPTIM1 instance.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Convert the driver to use the new dt macros. As part of this change we
remove a bunch of defines that happened in dts_fixup.h that didn't
belong there. Some of these should be converted to devicetree
properties at some point.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
When notifying the handler that GPIO interrupt has occurred
pass only pins that are associated with this handler.
Fixes: #24634
Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
Tests were failing as they were looking for an alias which didn't exist
Also, because some code in kscan_handlers.c wasn't compilable
Signed-off-by: Mark Olsson <mark@markolsson.se>
Changes dependency for I2C so that it's enabled if kscan is enabled.
This is to allow the kscan_ft5336 sample to run.
Note: LVGL has KSCAN as a dependency.
Applies to the mimxrt10{50,60,64}_evk boards.
Signed-off-by: Mark Olsson <mark@markolsson.se>
Adds device tree nodes, pinmux definitions and configures Kconfig
defaults for the ft5336 touch panel driver on the
stm32f746g_disco board.
Signed-off-by: Mark Olsson <mark@markolsson.se>
The period argument of a k_timer needs an offset of one tick from the
value computed in user code (because periods get reset from within the
ISR, see the comment above this code for an explanation). When the
computed tick value was 1, it would become 0. This is actually
perfectly correct as a k_timeout_t to be passed to z_add_timeout().
BUT: to k_timer's API, K_NO_WAIT means "never" (i.e. the same as
K_FOREVER) and not "as soon as possible", so the period timer would
not be reset. This is sort of a wart, but it's the way the API has
been specified forever.
The upshot is that for the case of calling k_timer_start() with a
minimal period argument (i.e. one that produces "one tick"), the
period would be ignored and the timer would act like a one shot. Fix
the clamp so it can't produce K_NO_WAIT.
This also adds a filter for absolute timeouts, which (while that's
sort of a pathological usage) were getting that one tick offset when
it wasn't appropriate.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Z_IS_ENABLED2 uses true and false, however when we preprocess the linker
scripts we invoke the compiler with `-x assembler-with-cpp` so
_ASMLANGUAGE ends up being defined and thus stdbool.h wouldn't convert
'true' and 'false' to '1' and '0'.
Move the include of stdbool.h outside the #ifndef _ASMLANGUAGE check so
that 'true' and 'false' get converted correctly.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The SAM D5x and E5x series SoCs include the "Cortex-M4F" core, not the
FPU-less "Cortex-M4" core.
This commit fixes the incorrect CPU compatible for the SAM D5x and E5x
SoCs (note that this file is included by `same5x.dtsi`, which is used
as the base device tree header for the SAM E5x series).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM E54 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM E53 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM E51 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM D51 series SoCs include a single-precision FPU; therefore, the
`CPU_HAS_FPU` symbol should be selected.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The SAM D51, E51 and E53 SoC series Kconfig files were missing the
`ARM` architecture symbol selection.
This symbol must be selected at the SoC level; otherwise, build will
fail because the symbol is not selected by anything and other ARM-
specific configurations depend on it.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
User of bt_buf_get_rx may attempt to push their own headers, e.g. ACL
headers, so move the H4 header logic to bt_recv after logging into the
monitor since otherwise the buffer would contain H4 headers which is
not expected by the monitor.
Fixes#24646
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Replace DT_CPU_CLOCK_FREQUENCY with a PATH based reference to cpu@0
(DT_PATH(cpus, cpu_0)) and than getting the clock_frequency property:
DT_CPU_CLOCK_FREQUENCY -> DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)
This lets us remove DT_CPU_CLOCK_FREQUENCY from dts_fixup.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The sensor is on the nrf9160_innblue22 not nrf9160_innblue21. This
causes CI build failures since there is no dts node for the sensor
on the nrf9160_innblue21 board.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>