Commit graph

23353 commits

Author SHA1 Message Date
Andriy Gelman
4ffe418253 drivers: rtc: Add RTC driver for Infineon XMC4xxx devices
Adds support for settings/getting RTC time and using alarm/update feature.
The alarm option needs all fields to be set due to a hardware limitation.

RTC shares the same interrupt with the watchdog. Thus shared
interrupts must be enabled when WDT and RTC both need to trigger the ISR.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2024-09-04 09:54:52 +02:00
Maochen Wang
d5a5f072a9 drivers: wifi: nxp: link the library of hostap
When build with the psa_crypto_driver, it will try to include common.h
of mbedtls, but actually include the common.h from hostap, and causes
build error of undefined symbol. Now link the library of hostap to use
the header file in /utils path, to fix the build error.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-09-04 09:53:12 +02:00
chao an
5831d91ad9 arm/gicv3: set routing affinity before enable IRQ
In corner case, the pending ISR will be triggered immediately
after enable the IRQ, this PR will setting CPU affinity first
to avoid routing the unexpected IRQ to other CPUs.

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-04 09:53:04 +02:00
Erwan Gouriou
d13f9d9b9b drivers: stm32: Select PINCTRL when required
Select PINCTRL subsystem by drivers which require it.
Prevent the need from enabling this symbol at board or soc level.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-09-03 14:40:55 +01:00
Ren Chen
1c769c342b usb: it82xx2: fix issue with the unexpected setting of the ready bit
In the IT82xx2 chip, the ready bit is automatically cleared by
hardware. When setting other bits, there is a chance that the ready bit
hasn't been cleared yet, leading to unexpected USB transactions. This
change ensures that the ready bit is always set to '0' when setting the
endpoint control value.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-09-03 14:40:31 +01:00
Ren Chen
d410231c7c usb: it82xx2: enable RESUME interrupt
This commit enables RESUME interrupt mask.

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-09-03 14:40:31 +01:00
Tomasz Moń
9f6b66f162 drivers: udc_dwc2: Enter hibernation during suspend
Save power when the bus is suspended by entering hibernation if
hibernation support is enabled and controller supports hibernation.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-03 14:40:17 +01:00
Tomasz Moń
42f2e1c18b drivers: udc_dwc2: Add power saving related registers
Add Power and clock gating control register to register map and
appropriate bit macros. Add missing GHWCFG4, GLPMCFG and GPWRDN bits.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-03 14:40:17 +01:00
Krzysztof Chruściński
d8c3ae0286 drivers: counter: nrfx_timer: Add barrier when reading CC
Add barrier between triggering Capture task and reading CC as otherwise
it is possible that CC read will occur before task is triggered when
bus is busy.

Add barrier between reading previous CC value and writing the new one.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-03 14:40:10 +01:00
Elias Speinle
022cfdff98 drivers: regulator: add basic mps mpm54304 driver
add driver for Monolithic Power Systems MPM54304 with basic
functionality to enable/disable the buck regulators

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-09-03 14:39:52 +01:00
Lukasz Stepnicki
83e3c2eb78 drivers: watchdog: nrfx wdt without IRQs
Add config option to build nrfx wdt driver with
NRFX_WDT_CONFIG_NO_IRQ enabled.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-09-03 14:39:37 +01:00
Nazar Palamar
7a31df456f drivers: wifi/airoc: Update condition to enable NET_STATISTICS
Updated condition to enable NET_STATISTICS. Changed
CONFIG_NET_STATISTICS_ETHERNET to CONFIG_NET_STATISTICS_WIFI
in airoc_wifi.c

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-03 10:43:10 +02:00
Peter Ujfalusi
9fd2e11944 drivers: dma: intel-adsp-hda: Report total_copied bytes on ACE2/3
With ACE2/3 the HDA DMA includes registers to read the Linear Link
Position.
Previous platforms (CAVS, ACE1) was able to report the LLP for GPDMA. Since
ACE2 all links are handled with HD-DMA, hence the new register has been
added for the firmware to report the LLP to the host.

Set the total_copied to 0 for older ACE1/CAVS platforms and in case of
host DMA on ACE2/3 since the informatiojn is not available.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2024-09-03 10:42:25 +02:00
Jilay Pandya
fda97de253 drivers: stepper: refactor gpio stepper driver
This commit refactors gpio stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Jilay Pandya
28cd1c8439 stepper: fix: introduce step count check in gpio stepper
This commit introduces step count check before updating
actual position.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-09-03 10:42:19 +02:00
Sergio R. Caprile
360522a403 drivers: eth: fix stm32_hal PHY address resolution
Fixes: #77705

Fix wrong macro.
Tested with all the boards mentioned in that issue, build now works.

Signed-off-by: Sergio R. Caprile <scaprile@gmail.com>
2024-09-03 10:42:07 +02:00
Jordan Yates
ae046fe5ea adc: adc_nrfx_saadc: support ADC_ACQ_TIME_MAX
Support the `ADC_ACQ_TIME_MAX` define in addition to
`ADC_ACQ_TIME_DEFAULT`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-09-02 12:31:17 -04:00
Chaitanya Tata
803f59f3e1 drivers: wifi: nrf: Add support for twister CI build
Add a mode to build the driver without FW blobs, this is mainly for
twister to run and catch any build issues without depending on any FW
blobs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Nazar Palamar
eb406f80bc driver/bluetooth / cyw208xx: enable CYW20829_BT_FW_TX10DBM_POWER
Enable CYW20829_BT_FW_TX10DBM_POWER by default to get
best user experience experience out of the box.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
9a112dc474 driver/bluetooth: Add setup of PUBLIC ADDR
Added setup of PUBLIC ADDR

NOTE: By default, the CYW208xx controller sets some
hard-coded static address.

To avoid address duplication, let's always override
the default address by using the HCI command
BT_HCI_VND_OP_SET_LOCAL_DEV_ADDR. So

1. when cyw208xx_setup gets BT_ADDR_ANY from the host,
   it will overwrite the default address, and the host
   will switch to using a random address (set in the hci_init
   function).

2. If user set the static address (by using bt_id_create)
   before bt_enable, cyw208xx_setup will set user defined
   static address.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
5a113ca271 driver/bluetooth / cyw208xx: update condition for select PAwR FW
Select PAwR if enabled following features:
- BT_PER_ADV_RSP
- BT_PER_ADV_SYNC_RSP

Remove dependency BT_AIROC_CUSTOM for AIROC_CUSTOM_FIRMWARE_HCD_BLOB

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Tim Lin
32a19ea28c drivers/espi: it8xxx2: Fix mask when SRAM size not the power of 2
When using the it8xxx2bx chip, because the SRAM size is 60k and
not a power of 2, using (CONFIG_SRAM_SIZE - 1) results in an
incorrect value for the h2ram base address mask.
Therefore, the mask is declared as GEMASK(19, 0) here.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2024-09-02 11:49:52 +02:00
Adrian Bonislawski
b9a4900c30 drivers: dma: intel_adsp_hda: change L1 exit defaults
DMA_INTEL_ADSP_HDA_TIMING_L1_EXIT should be set by default
for all  Intel ACE platforms

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2024-09-02 09:09:07 +02:00
Krystof Sadlik
16cdd5b852 Drivers: Counter: Added flag for counting up
Tmr and dtmr drivers were missing a flag which tells the
counter_is_conting_up function that the counter is counting up. So I've
added the flag

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-09-02 09:07:57 +02:00
Lyle Zhu
5eda8e7136 Driver: hci_nxp_setup: Change log message to LOG_DBG
Due to it is a normal firmware downloading sequence,
it should be a debug log instead of error log.

Change LOG_ERR to LOG_DBG for this case.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-09-02 09:05:34 +02:00
Marcin Wierzbicki
970638371c drivers: adc: adc_mcux_adc12: add API internal reference
Extend the adc_mcux_adc12 adc api to set the ref_internal to
a value of vref-mv property.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Marcin Wierzbicki
53e7a9dd86 drivers: adc: adc_mcux_adc12: enable support for channel>=16 on S32K14X
Enable support for channels >= 16 on devices S32K146 and S32K148.
Channels >= 16 are encoded as 100000b..101111b in SC1[ADCH] field.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Richard Wheatley
cb20e865d6 drivers: adc: format ambiq adc driver
run clang-format on ambiq adc driver

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Richard Wheatley
8561d0285d drivers: adc: update ambiq adc driver
Update Ambiq adc driver to add apollo4
fixed typ of BUMBER to NUMBER
Move buffer size prio to configuring slots
and enabling the ADC
removed #if defined(CONFIG_PM_DEVICE_RUNTIME)

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Chris Ruehl
db5091c9f4 Drivers: Add support for Bosch bmp180 sensor
Add driver support for Bosch bmp180 pressure sensor running on i2c bus.
It pushes the driver files to the bmp180 directory under
drivers/sensor/bosch. The driver implement the Sensor API
and support channel DIE_TEMP and PRESSURE.
Driver had been tested with the NRF5340DK.

V2 fixup
---------
Drivers: Bosch bmp180 fixups for PR v2
fix BMP180 in CMakeLists.txt
rename regControl to ctrlreg
simplify the logic in set_attribute
use BMP180_GET_CMD_TEMP_DELAY

Drivers: Bosch bmp180 use system byteorder macros
To aware of ENDIANESS use the macros from byteorders.h

Drivers: Bosch bmp180 comments added to #endif
Add a comment to the #endif /* CONFIG_FOO */

Drivers: Bosch bmp180 , fix twister run error
twister report an error related to using floor() with a float
fix this using floorf() function.

Drivers: Bosch bmp180, rework review v2
fix code style issues
simplify the structure for bus and i2c.
prepare to remove the empty bmp180_i2c.c

Drivers: Bosch bmp180, remove bmp180_i2c.c
bmp180: update CMakeList.txt remove bmp180_i2c.c
bmp180: remove unused variable

fixups for complient checks

replace homebrew bitshift with byteorder.h macro
sys_get_be16 and sys_get_be24
cleanup remove unused spi.h
change struct reg16/24 to uint8_t[]
remove channel AMBIENT_TEMP
bmp180/Kconfig add missing help text
fix indent issue in bmp180_pm_action
merge BMP180_CONFIG_I2C into BMP180_INST
Move DT_DRV_COMPAT out of the header file
drop LOG_DBG() from read calibration data
remove bus_io implementation and header cleanup
move headers and structs out from bmp180.h
fix typo in comment
apply clang format changes, only if not line lenght violation
fix indent code error after joined lines
conversion from Pa to kPh was wrong, fixed it
Remove default=n from Kconfig, it is the default.
Move the conversion ready test into a function (duplicate code)
and apply retry policy
parameter naming with indicate the usage
change BMP180_INST(inst) to clang format
fix int32_t overflow in convension formular
fix wrong devider in convension formula
move BSWAP_s16 BSWAP_u16 from .h to .c

Signed-off-by: Chris Ruehl <chris@gtsys.com.hk>
2024-08-30 11:46:25 -04:00
Johan Hedberg
c15957e753 Bluetooth: drivers: Add module blobs dependencies to Kconfig
Now that there is an actual Kconfig symbol generated for blobs presence,
take advantage of that and declare appropriate dependencies to it. Also add
helpful CMake output if the blobs are missing by taking advantage of the
zephyr_blobs_verify() CMake function.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-30 11:45:56 -04:00
Jordan Yates
39a582a9ec fuel_gauge: composite analog fuel gauge
Construct a device that implements the fuel-gauge API from a collection
of analog sensing inputs.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-29 16:12:36 -04:00
Marcio Ribeiro
0705aaeb81 drivers: dac: esp32: clock initialization fix
Fixed ESP32 DAC clock initialization

Fixes: #70295

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 16:11:57 -04:00
IBEN EL HADJ MESSAOUD Marwa
2353b9391b drivers: i2s: i2s_ll_stm32: Handle single clock source
Modify the function "i2s_stm32_set_clock" to handle the case where pclk_len
it is not greater then 1 and to ensure that the freq_in
variable is correctly set in both cases.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-29 16:11:30 -04:00
Fin Maaß
235033f4b7 drivers: hwinfo: litex: depend on devicetree
make litex hwinfo dependent of enabled state of device.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-29 16:10:57 -04:00
Marcio Ribeiro
902104d795 drivers: i2s: esp32s3/esp32c3
i2s support added for esp32s3 and esp32c3

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-29 18:06:23 +02:00
Hao Luo
b532a3ea7f boards: ambiq: apollo3: add connector dtsi for apollo3 boards
Added connector dtsi files for apollo3_evb and apollo3p_evb,
and ran gpio_basic_api to test, all cases pass

Signed-off-by: Hao Luo <hluo@ambiq.com>
2024-08-29 18:06:07 +02:00
Peter van der Perk
44f7928ecf clock: mcux_ccm: add flexio clock
Adds flexio1 and flexio2 clock definitions to get the clock rate

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2024-08-29 18:04:56 +02:00
Ha Duong Quang
77968d4dd8 boards: s32z2xxdc2: add support for adc
Add devicetree of adc instances for s32z270.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-29 18:04:36 +02:00
Gang Li
e1d20235d3 drivers: wifi: nxp: change the dormant state
1) After the wifi driver successfully connects to the AP,
the dormant state should be set to OFF.
Once a deauth/disassoc frame is received or link lost occurs,
the dormant state should be set to ON.
2) Enable CONFIG_NET_TC_SKIP_FOR_HIGH_PRIO and CONFIG_NET_CONTEXT_PRIORITY
to push high priority packets directly to network driver.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2024-08-29 18:03:48 +02:00
Lars Jeppesen
8c3790d9b7 drivers: adc: stm32h5x: Set option register for adc1/channel 0
The STM32H5x adc has a special option register that
needs to be set when using channel 0 on adc1.

fixes: #77618

Signed-off-by: Lars Jeppesen <lje@foss.dk>
2024-08-29 18:03:33 +02:00
Fabian Blatz
6ae753f5bd drivers: stepper: Fix missing _driver_api suffix
The gen_kobject_list.py script expects the __subystem declaration to end
with _driver_api. Adjust the stepper api and existing driver implementation
accordingly.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-29 18:03:01 +02:00
Efrain Calderon
40414f72e9 drivers: adc: ads1x1x: add support for RDY pin
Some hardware configuration require rely on the ALERT/RDY
pin to know when and ADC conversion is completed.

The polling thread is left as fallback, when the pin
is not defined.

Signed-off-by: Efrain Calderon <efrain.calderon.estrada@gmail.com>
2024-08-29 15:55:14 +02:00
Vit Stanicek
db1cb43a9d drivers: audio: Add the wm8904 driver
Add driver for the Wolfson WM8904 audio codec.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Vit Stanicek
673b3db80a drivers: clock_control_mcux_syscon: Add I2S MCLK
Add support for the I2S MCLK signal (provided by CLOCK_GetMclkClkFreq).

Signed-off-by: Vit Stanicek <vit.stanicek@nxp.com>
2024-08-29 15:53:26 +02:00
Fin Maaß
4a6dacf01b drivers: adc: tla2021: seperate thread, only when needed
only use the separate thread, when
CONFIG_ADC_ASYNC is enabled.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-29 15:52:46 +02:00
Karol Lasończyk
99d8549a5c drivers: misc: Add support for nRF54L15 SoC
Expand vpr_launcher to support production version of the SoC.

Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
2024-08-29 12:02:35 +02:00
Raffael Rostagno
b4148f17b7 drivers: entropy: esp32c6: Add support
Add support of entropy (TRNG) driver for ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-29 11:38:36 +02:00
Daniel Leung
4cf95b1800 mm: common: reset mappings during simple mapping failures
For mapping operations in sys_mm_drv_simple_map_region() and
sys_mm_drv_simple_map_array(), when there was an error with
mapping any pages, it would simple return an error, leaving
already mapped pages still mapped. This modifies the behavior
where any failure during the whole mapping operation will
unmap the already mapped pages.

This also modifies the remapping and moving functions to
reset mappings when error is encountered.

Fixes #73121

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-28 16:35:43 -04:00
Dominik Lau
4ca2400af6 drivers: input: use generic touch report in stmpe811
Adds the use of generic touch reporting method for stmpe811 driver.

Signed-off-by: Dominik Lau <dlau@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-08-28 14:02:43 -04:00