Commit graph

14176 commits

Author SHA1 Message Date
Gerson Fernando Budke 3bc47d77b2 drivers: dac: sam: Update to use clock control
This update Atmel SAM dac driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 41ab680a4f drivers: can: sam: Update to use clock control
This update Atmel SAM can driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 4f59d50441 drivers: spi: sam: Update to use clock control
This update Atmel SAM spi driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 91e219c644 drivers: entropy: sam/sam0: Update to use clock control
This update Atmel SAM trng driver to use clock control driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke c4f1d98ef6 drivers: i2c: sam: Update to use clock control
This update Atmel SAM twi, twihs and twim drivers to use clock control
driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 6d4c0da459 drivers: hwinfo: sam: Make compatible whole series
This update devicetree entries and Kconfig definition to allow use of
reset cause on all SAM series.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 08015c8f57 drivers: hwinfo: sam: Update to use clock control
This update Atmel SAM hwinfo reset cause driver to use clock control
driver.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke eb2c6d7e2c drivers: timer: sam: Update to use clock control
This update Atmel SAM timer driver to use clock control drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 3c7988c52a drivers: eth: sam: Update to use clock control
This update Atmel SAM ethernet driver to use clock control drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke c77c1cc197 drivers: gpio: sam: Update to use clock control
This update Atmel SAM gpio and pinctrl drivers to use clock control
drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke f21c936d49 drivers: serial: sam: Update to use clock control
This update Atmel SAM uart and usart  drivers to use clock control
drivers.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Gerson Fernando Budke 88cedcf5c5 drivers: clock: Add Atmel SAM PMC driver
Add initial version of clock control for Atmel SAM SoC series. This add
support to Power Management which allows control peripherals clock.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2023-03-21 14:12:25 -07:00
Tomasz Leman fbe930ad0e driver: gpdma: balance the pm usage
Because the DMA driver allows multiple start and stop calls for the same
instance and the same channel, we cannot rely on the error codes
returned by these functions to notify the device's power manager that a
device is still in use.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-03-21 18:10:41 +00:00
Anisetti Avinash Krishna 00991e4720 drivers: serial: ns16550: Moved PCIe probe to init function
Moved PCIe probe from configure function to init function
because whenever uart_configure api is called MMIO address
is getting updated.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-03-21 18:10:12 +00:00
Anisetti Avinash Krishna 712dab4f04 drivers: serial: ns16550: Fixed set_baud_rate usage in line ctrl set
Added pclk parameter to set_baud_rate function in line_ctrl_set api
which was missed during update of set_baud_rate function definition
update.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-03-21 18:10:12 +00:00
Kai Vehmanen e40859f787 Revert "dma: dw: Do not program SAR/DAR and CTL_HI/LO when using HW LLI"
Failures are seen with SOF digital mic capture test cases on Intel cAVS2.5
platforms if the SAR/DAR/CTL writes are skipped.

This reverts commit 08d9efb202.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2023-03-21 13:50:08 -04:00
Ramesh Babu B 3d44508c38 drivers: spi: Add Intel SPI penwell driver
Added support for intel pch penwell spi driver.

Signed-off-by: Ramesh Babu B <ramesh.babu.b@intel.com>
2023-03-21 13:39:33 +01:00
Vinayak Kariappa Chettimada 643723479f drivers: flash: nRF: Move sync ticker to Subsys Bluetooth Controller
Move the SoC Flash nRF sync ticker implementation into
Bluetooth Controller Subsystem folder, as internal headers
are included.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-03-21 12:33:32 +01:00
Benjamin Björnsson a52bd0d2e9 drivers: pwm: pwm_stm32: Add PWM support on STM32C0-seris
Add support for PWM on the STM32C0-series.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-21 09:38:25 +01:00
Marc Desvaux 0548584d4d drivers: gpio/exti: stm32: Use st,stm32g0-exti compatible
remove all #ifdef CONFIG_SOC_SERIES_STM32xx
before to add a st,stm32g0-exti compatible
added to the matching targets:
C0/G0/U5/L5/MP1:

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-03-21 09:37:30 +01:00
Jeppe Odgaard 4d57f64193 drivers: watchdog: Add TI TPS382x driver
Add support for the TI TPS382x series. The IC has an input pin which
should be toggled by the processor and a output pin which should be
connected to the RESET input of the processor. The timeout is not
configurable.

This device can be used by devices which does not have any internal
hardware watchdog device.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-03-21 09:35:58 +01:00
Evgeniy Paltsev d4d0907ede ARC: SMP: simplify CPU mask generation with BIT_MASK
Simplify CPU mask generation by replacing GENMASK with BIT_MASK.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-03-21 08:56:41 +01:00
Evgeniy Paltsev 16e9362ba0 ARC: SMP: fix IDU mask setup
Fix IDU mask setup:
 * fix GENMASK usage to avoid generating mask to one extra cpu (which
   doesn't exist in configuration)
 * use arch_num_cpus() instead of CONFIG_MP_NUM_CPUS to allow having
   some cpu's disabled (with detection in runtime)

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-03-21 08:56:41 +01:00
Krzysztof Chruscinski 9a73b9c80d hal_nordic: Change scheme for RTC and TIMER reservation
In general, RTC and TIMER driver implements counter API but there
are exception when those peripherals are used in a custom way
(e.g. for system timer or bluetooth). In that case, system must
prevent using counter based on a reserved instance. Previously,
it was managed by Kconfig options but that cannot be maintained
when switching to devicetree configuration of the counter driver.

A new approach removes Kconfig options and instead adds static
asserts in the files which are using direct peripherals. Those
asserts check if given node is not enabled in the device tree.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Krzysztof Chruscinski 656b0e6426 drivers: counter: Adapt to use device tree
Modifying counter drivers (rtc and timer) to rely completely on
device tree and not on Kconfig of MDK flags.

Adapting dtsi for all SoCs and adapting test configuration.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:59:40 +01:00
Krzysztof Chruscinski 93619d7b73 drivers: counter: nrfx_rtc: Use clock control when driver enabled
RTC shall enabled LF clock only if CLOCK_CONTROL driver is enabled.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2023-03-20 16:49:50 +01:00
Zack Cornelius a3288252ff drivers: flash: nrf_qspi_nor: Add runtime PM
Add PM_DEVICE_RUNTIME support to nordic QSPI NOR flash driver, putting
the QSPI peripheral and flash ship into DPD if available

Signed-off-by: Zack Cornelius <zcornelius@securityesys.com>
2023-03-20 16:29:47 +01:00
Hein Wessels a2dd232410 drivers: adc: stm32: dma support
Sampling multiple adc channels at once using dma

Only verified to be working on nucleo_h743zi

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-03-20 16:29:24 +01:00
Jamie McCrae 5bae23b891 drivers: retained_mem: Add RAM driver
Adds a non-initialised RAM-based retained memory driver.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 15:02:09 +01:00
Jamie McCrae 9bda013e5d drivers: retained_mem: Add nRF GPREGRET driver
Adds a driver for the Nordic nRF GPREGRET registers and adds
entries to the SoCs for this peripheral.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 15:02:09 +01:00
Jamie McCrae 2fedb306f7 drivers: Add retained memory driver interface
Adds a new driver interface for retained memory devices which
can be used to store data and have it retained whilst the device is
powered thorugh different application execution states (though this
data may be lost in low power states).

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-20 15:02:09 +01:00
Benjamin Björnsson db193332fa drivers: clock_control: correct enable / disable of backup domain on STM32
The U5-series was missed when adding if-defs around enable / disable
of the backup domain access, this patch makes sure the U5-series
is handled correctly.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-20 14:02:02 +00:00
Marcin Niestroj a2e5d1dcd2 drivers: wifi: esp32: register rxcb after wifi init
Move esp_wifi_internal_reg_rxcb() after esp_wifi_init(), so that
wifi_connect() is successful.

Fixes: 690f65dbd9 ("drivers: wifi: esp32: fix possible interface null
  pointer")
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-03-20 11:43:49 +01:00
Benjamin Björnsson b308d83d45 drivers: watchdog: add watchdog support on STM32C0-series
Add support for independent watchdog and window watchdog
on the STM32C0-series.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-20 10:19:29 +00:00
Maciej Baczmanski bcf1e8150b drivers: ieee802154: Fix csl_rx_time overflow issue for NRF5 and
clean up redundant static functions

convert `csl_rx_time` to uint32_t and remove redundant `nrf5_schedule_rx`
`nrf5_config_csl_period` and `nrf5_receive_at` static functions.

`csl_rx_time` has been passed as uint32. It is compared to uint64 value
returned by `nrf_802154_sl_timer_current_time_get` in
`nrf_802154_ie_writer.c` which leads to wrong calculation of phase in CSL.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-03-20 10:47:33 +01:00
Armin Brauns 01e8b3445e drivers: gpio: mcp23xxx: add support for reset pin
This allows the device to be reset to a known state before initialization.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-20 10:43:12 +01:00
Armin Brauns 07af23c1c6 drivers: gpio: mcp23xxx: support single-edge interrupts
An interrupt is triggered for every edge, but only the desired edges cause
a callback to be called.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-20 10:43:12 +01:00
Armin Brauns 0db9785892 drivers: gpio: mcp23xxx: support pin interrupts
No single-edge interrupts for now, since they are not supported in
hardware.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-20 10:43:12 +01:00
Armin Brauns 1a566e6a7f drivers: gpio: mcp23xxx: fix typo
Should be the Output LATch register. "IK" is one key away from "OL" on
QWERTY keyboards.

This define wasn't actually used anywhere.

Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2023-03-20 10:43:12 +01:00
Robert Hancock 86e1740cfc serial: xilinx: uartlite: Fix infinite spin in xlnx_uartlite_fifo_read
The xlnx_uartlite_fifo_read function would spin indefinitely if there
was less data available in the RX FIFO than the size of the passed-in
buffer. This call is supposed to be non-blocking.

Fixed to break out of the loop if there are no more bytes left in the RX
FIFO.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2023-03-20 10:21:37 +01:00
Benjamin Björnsson c02688a308 drivers: counter: add support for rtc in STM32C0-series
This commit extends the rtc counter driver to work on
the STM32C0-series.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-20 09:53:49 +01:00
Benjamin Björnsson 6c8ef27a77 drivers: counter: stm32_rtc: enable backup domain only when supported
The STM32C0-series does not have a backup domain, this patch
enables us to extend this driver to the C0-series.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-03-20 09:53:49 +01:00
Georges Oates_Larsen 3c6b7dc35a net: dummy L2 for offloaded ifaces
Adds dummy link layer for offloaded ifaces, allowing
ifaces to directly receive l2_enable calls

Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
2023-03-20 09:53:25 +01:00
Henrik Brix Andersen 37b3a11d72 drivers: can: shell: add debug log for calculated timing parameters
Add debug logs for the timing parameters calculated by the shell commands.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-20 09:53:14 +01:00
Henrik Brix Andersen 1c7feb3fd4 drivers: can: shell: show min/max timing parameters
Include the minimum/maximum timing parameters when showing details about a
CAN controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-20 09:53:14 +01:00
Henrik Brix Andersen 3c89bbf876 drivers: can: reset statistics when starting the CAN controller
Reset CAN controller statistics when starting the CAN controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-03-20 09:52:50 +01:00
Maureen Helm b079316b4e drivers: sensor: iis2mdc: Store sensor trigger as a pointer
Fixes the iis2mdc sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2023-03-20 09:52:35 +01:00
Maureen Helm 99f9ef36af drivers: sensor: iis2iclx: Store sensor trigger as a pointer
Fixes the iis2iclx sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2023-03-20 09:52:35 +01:00
Maureen Helm 7b4ea85a0b drivers: sensor: iis2dlpc: Store sensor trigger as a pointer
Fixes the iis2dlpc sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2023-03-20 09:52:35 +01:00
Maureen Helm e0e4fa5d43 drivers: sensor: iis2dh: Store sensor trigger as a pointer
Fixes the iis2dh sensor driver to store the user-supplied sensor
trigger as a pointer rather than a copy. This enables the trigger
handler to use CONTAINER_OF to retrieve a context pointer when the
trigger is embedded in a larger struct.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2023-03-20 09:52:35 +01:00