Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.
This change was made running scripts/check_quoted_includes.py script
proposed in https://github.com/zephyrproject-rtos/zephyr/pull/112135
with the Linux shell command below and manually selecting the applicable
changes:
$ find dts/posix -type f -exec ./scripts/check_quoted_includes.py -w {} \;
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.
This change was made running scripts/check_quoted_includes.py script
proposed in https://github.com/zephyrproject-rtos/zephyr/pull/112135
with the Linux shell command below and manually selecting the applicable
changes:
$ find dts/arm64 -type f -exec ./scripts/check_quoted_includes.py -w {} \;
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.
This change was made running scripts/check_quoted_includes.py script
proposed in https://github.com/zephyrproject-rtos/zephyr/pull/112135
with the Linux shell command below and manually selecting the applicable
changes:
$ find dts/arc/ -type f -exec ./scripts/check_quoted_includes.py -w {} \;
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Describe the Time Stamp Timer (TSTMR) instances for the i.MX93, i.MX94x,
i.MX95/952, i.MX8ULP, RT118x, and MCXW7x SoCs. The nodes are left
disabled by default and run off the fixed 1 MHz TSTMR clock.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add a counter driver for the NXP Time Stamp Timer (TSTMR), a 56-bit
free-running, read-only up-counter. The driver exposes it through the
Zephyr counter API (get_value/get_value_64 and get_freq); start/stop,
alarm, and top-value operations are unsupported as the hardware is
free-running with no compare or interrupt capability.
The frequency is SoC-specific and taken from the clock-frequency
devicetree property. A coherent 56-bit read is obtained by sampling the
low/high registers twice under an IRQ lock and handling low-word
rollover.
Add the binding, Kconfig, and build glue.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Add ameba series counter binding and nodes.
Peripherals are sorted by address, with memory kept at the top.
Signed-off-by: minyuan xue <minyuan_xue@realsil.com.cn>
Add the device tree node and the binding file for microchip Ethernet and
MDIO G1 Peripheral.
Signed-off-by: Himanshu Seth <himanshu.seth@microchip.com>
Add a new IPC service backend based on the RPMsg-Lite library.
The backend implements the ipc_service_backend ops (open, close,
register/deregister endpoint, send, send_nocopy, get/drop TX buffer,
hold/release RX buffer) on top of the RPMsg-Lite virtio transport.
A new DT binding (nxp,ipc-rpmsg-lite) is introduced to describe
each RPMsg-Lite link instance: shared memory region, role (host/remote),
link-id, MBOX channels, and per-instance buffer/priority tunables.
Multiple links share a single MBOX channel pair via the
notification-parent property; platform_notify() dispatches the
encoded vector_id to the correct link.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
Remove #address-cells and #size-cells properties from radio node in
STM32WBAxx SOC series DTSI file. These are not needed as reported by
the build warning trace message shown below (that is now addressed):
.../build/zephyr/zephyr.dts:795.25-816.5:
Warning (avoid_unnecessary_addr_size):
/soc/radio@48020000: unnecessary #address-cells/#size-cells
without "ranges", "dma-ranges" or child "reg" property
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add interrupt-driven API support to the esp32 lp_uart driver and make
RTS/CTS hardware flow control optional, enabled only when the device
tree sets hw-flow-control. Add a loopback property that ties TX to RX
inside the peripheral for self-test without external wiring.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Extend the esp32 lp_uart driver to the esp32c5 and esp32p4. On the
esp32p4 the LP UART signals are routed through the LP GPIO matrix and
the controller is clocked from the precise XTAL_D2 source instead of
the uncalibrated RC_FAST, so the baud-rate framing is reliable.
Relax the fixed-pin bindings, describe the lp_uart node pins on the
c5/c6/p4 HP and LP cores, and extend the echo_ulp sample. Update
hal_espressif for the esp32p4 LP GPIO matrix and clock-tree helpers.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
align the devicetree structure
with the recently added more generic
Synopsys ethernet driver, as the esp32
also uses the same IP from Synopsys, so we
can add support for the esp32 in that driver
easier.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
STM32MP133 and upper versions support a second Ethernet
controller IP.
Bring a new STM32MP133 DTSI to make the version
differentiator and add the second port in DTSI.
Signed-off-by: Erwan SZYMANSKI <erwan.szymanski@st.com>
Add DAC0 (LPDAC) support for frdm_mcxa266, frdm_mcxa346, and
frdm_mcxa366 boards.
DTS: add dac0 node to nxp_mcxaxx6_common.dtsi at address
0x400b4000, compatible "nxp,lpdac", IRQ 67.
Board: add pinmux_dac0 (DAC0_OUT_P2_2) to each board pinctrl
dtsi; enable dac0 with pinctrl in board_common.dtsi; set up DAC0
clock in board.c (SPC power-on, divider, attach, gate); add "dac"
to each board yaml supported-features list.
Sample/test: add board overlays for samples/drivers/dac and
tests/drivers/dac/dac_api. Because DAC0 output pin P2_2 conflicts
with LPUART2 TX, the overlays disable lpuart2 and redirect the
console to lpuart3. Add fixture: dac_fixture to testcase.yaml so
CI is aware of the special UART setup. Update the DAC sample README
with build instructions and the CONFIG_DAC_SAMPLE_RUN requirement.
DAC output is available on connector J1 pin 4 (P2_2).
Co-authored-by: Neil Chen <cheng.chen_1@nxp.com>
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.
This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
`grep -rsl "#include \"zephyr/" dts/`
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add a read-only Zephyr OTP driver for the NXP OTPC eFuse controller
found on MCX N SoCs. Only otp_read is implemented; fuse programming is
not supported. The OTP API is byte addressed while the controller reads
32-bit words; the driver handles unaligned offsets and lengths
internally.
Read verified on real hardware on frdm_mcxn236, frdm_mcxn947, mcxn947 evk,
and mcxn547 evk
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
The native_sim counter driver did not implement the counter capture API,
so the capture path could not be exercised on native_sim / in CI. There
was also no software way to inject a capture edge, unlike gpio_emul which
provides gpio_emul_input_set() for emulating GPIO events.
Implement the capture API in the native_sim counter driver and add a
test-only backend, analogous to gpio_emul:
- counter_capture_emul_input_set()/_get() (+ _dt variants) in the new
include/zephyr/drivers/counter/counter_capture_emul.h drive/read an
emulated capture input level. On a configured, enabled and matching
edge the capture callback is invoked synchronously with the current
counter value, honoring single-shot vs continuous mode.
- Supported edges are declared in devicetree via rising-edge/falling-edge
boolean properties and enforced in capture_configure(), mirroring
GPIO_EMUL_INT_CAPS.
The counter_capture test is reworked so the edge trigger is provided by a
small "trigger source" interface (trigger_src.h) with two CMake-selected
backends: gpio_src.c (GPIO loopback on real hardware) and
counter_capture_emul_src.c (emulated input on native_sim). The test body,
edge/single-shot/continuous coverage and assertions are unchanged. A
native_sim overlay and integration platform are added so the suite runs
on native_sim.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add a test_counter_captures ZTEST that exercises the
DT_COUNTER_CAPTURES_* and DT_INST_COUNTER_CAPTURES_* macros against
a synthetic vnd,counter / vnd,phandle-holder fixture, mirroring the
existing test_pwms coverage.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add devicetree reader macros for counter capture. These include
an index for the channel number and default flags. These are
intended to eventually to be used within drivers for timestamp
capturing.
Signed-off-by: Ryan McClelland <rymcclel@gmail.com>
This commit enables hyperbus support for the MAX32650 SoC by adding the
hpb node to the MAX32650 device tree. Also it adds hyperbus support to
the MAX32650EVKIT board device tree and enables memc/ram test for this
board.
Signed-off-by: Sean Harte <sean.harte@analog.com>
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
This commit enables USB support for the MAX32650 SoC by adding the usbhs
node to the MAX32650 device tree. Also it adds USB support to the
MAX32650EVKIT board device tree.
Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
- Adds the clocks/resets properties to the NXP CRC devicetree nodes
so the CRC driver can enable the peripheral clock during
initialization.
- For the MCXL SoC, fixes the reset controller
to nxp,mrcc-reset.
- For frdm_mcxl255, adds missing zephyr,crc chosen entry.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Commit 9945d20760 migrated the ft9001_eval partitions to the
zephyr,mapped-partition binding, but the SoC flash controller and flash
nodes were never given the `ranges` properties that the binding requires
to map partition offsets into the CPU address space.
Without them the offsets are no longer translated onto the 0x10000000
flash base, so the code partition (offset 0x1000) links at 0x1000
instead of 0x10001000 and the image no longer matches the flash the SoC
executes from.
Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
Add missing "package" DTSI file for STM32F777 SoCs which configures the
flash size to the appropriate value.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Refactor RV3032 initialization by configuring Vbackup config in MFD.
Assign PMU/BSM bit at init.
Move trickle-resistor-ohms / trickle-charger-mode to MFD dts node.
Add semaphore lock to mfd_rv3032_update_status since it is a RMW.
Poll EEBUSY at startup to allow for fast start when it is not a POR.
Check EEF flag after EEPROM write.
Adjust I2C poll times for all-byte update and single byte update.
Add function to write single eeprom reg to allow faster poll time.
Use single byte eeprom update for PMU and clock out to skip writing
eeprom when current settings are correct.
Add a k_sem around eeprom operations to protect a future case where
several MFD children are accessing eeprom at same time.
Signed-off-by: Jacob Schloss <jacob.schloss@suburbanmarine.io>
Add a binding for the Microchip IGLOO2 eNVM controller so that
the memory-mapped eNVM can be represented as a child soc-nv-flash
node.
This binding only describes the controller topology and does not
enable a flash controller driver yet.
Signed-off-by: Takumi Ando <takumi@spacecubics.com>
Remove any properties from the Xilinx GEM DT node specification and the
associated header in dt-bindings that relate to the legacy MDIO/PHY
support.
Consistently remove all instances of these properties from the DTs of the
Zynq-7000 and ZynqMP SoCs and from the DT of the qemu_cortex_a9 board.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
As PHY-less use cases such as the GEM being connected to an
Ethernet switch IP core in the FPGA part of the SoC can be
facilitated by declaring a fixed link instead of an actual PHY
in the target board's DT, declare the phy-handle property as
required in the GEM MAC's DT binding in order to prevent
undefined link states and incomplete link speed configuration
in the NWCFG register.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Separate the MDIO functionality from the Xilinx GEM MAC driver
into a separate driver conforming with the standard MDIO API.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Add reg-names property for each GEM controller to enable compatibility with
the DEVICE_MMIO facilities.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Add reg-names property for each GEM controller to enable compatibility with
the DEVICE_MMIO facilities.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Fix configuration of GEM0, GEM1:
- AMBA AHB burst length changed from SINGLE to INCR16
- RX/TX packet buffers in the DMA now fit a full Ethernet frame
This prevents DMA errors and issues with frames that are spread across
multiple buffers.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
Fix configuration of GEM0, GEM1:
- AMBA AHB burst length changed from SINGLE to INCR16
- RX/TX packet buffers in the DMA now fit a full Ethernet frame
This prevents DMA errors and issues with frames that are spread across
multiple buffers.
Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
AXISRAM3/4/5/6 are grandchildren of `peripherals` because they are
subnodes of their corresponding RAMCFG, which is in the peripherals
address range (and thus under `peripherals`). Each RAMCFG node used
a `ranges` property to remap these SRAMs to the correct alias, but
this is quite heavyweight and can be simplified.
By using an empty `ranges;` property on the RAMCFG nodes, but adding
an entry to the top-level `ranges` (i.e., on the `peripherals` node),
the entire hardware "SRAM" region can be remapped to the proper alias
in a much simpler way.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The DMA2D node was outside `peripherals`, so it did not get remapped
when using that to change between secure and non-secure aliases. As
a result, the DMA2D node effectively always retained its secure alias
address, even when building in non-secure context.
Move the DMA2D node in the `peripherals` group to enable its usage in
both secure and non-secure contexts.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
To allow switching addresses of RAM and peripherals between the secure
and non-secure aliases, commit 1d38a4ac04
replaced the `reg` and unit address of all nodes with a "zero-based"
value. This was necessary because the child-bus-address of the added
`ranges` property was zero... but an arbitrary value can be used!
By updating the `ranges` properties, it becomes possible to use "real"
addresses in `reg` and unit addresses of every node which makes the
DTSI much more readable, while still allowing to easily switch between
the secure and non-secure aliases (only the child-bus-address differs).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Increase the size of the MMIO region covered by the `pin-controller`
so that all children nodes fall into it. The previous value of 0x2000
did not cover all ports up to GPIOQ (starting at offset 0x4000, ending
at 0x43FF).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add the STM32MP13 RTC devicetree node and enable it for the
STM32MP135F-DK board.
The RTC is configured to use LSE as its clock source. LSE remains
available in low-power modes and in the backup domain when VBAT is
present, allowing the RTC to keep running and wake the system from
standby.
Tested on STM32MP135F-DK hardware.
Signed-off-by: Mohammed Achraf TAMZIT <mohammed.achraftamzit@gmail.com>
Add devicetree clock nodes for the STM32MP13 internal low-speed
oscillator (LSI) and external low-speed oscillator (LSE).
These nodes allow board devicetrees to reference and enable the
available low-speed clock sources as needed.
Signed-off-by: Mohammed Achraf TAMZIT <mohammed.achraftamzit@gmail.com>
Add a CAN driver for the Espressif TWAI-FD controller used on the
ESP32-C5. The driver implements the full can_driver_api,
supporting Classic CAN and CAN-FD frames.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The ESP32-C5 has TWAI-FD capable controllers that support both
Classic CAN and CAN-FD frames. Update the SoC dtsi to use the new
espressif,esp32-twaifd compatible so the new TWAI-FD driver binds with
it.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>