Commit graph

23353 commits

Author SHA1 Message Date
Declan Snyder
6300dc6aa7 soc: nxp: mcx: Do not use family level config
Move all dependencies of the family config to series level,
and put a disclaimer saying not to use the family config.

Change all occurrences of the family config in code to the
MCXNX4X series config.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
3c5df36dda soc: nxp: Move flexspi log level change to driver
Single point of control over this kconfig's effect.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Declan Snyder
57d777b640 drivers: flash/memc: Source logging kconfig last
Some flash/memc drivers like flexspi will want to default the
value of the log level to off to avoid RWW hazard while XIP,
to do this, the logging template must be sourced after the driver
kconfig files so that the default value from the driver is able
to be checked, since logging template introduces an unconditional
default otherwise.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-08-22 09:14:24 +02:00
Pisit Sawangvonganan
6718ba6841 drivers: gpio: renesas_ra_ioport: improve device instantiation macro
Introduced `GPIO_DEVICE_INIT_RA_IF_OKAY` which utilizes `COND_CODE_1`
to reduce the chain of #if DT_NODE_HAS_STATUS(...) #endif

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-22 09:12:52 +02:00
Tom Burdick
f880b0164b i2c: Fix build failure with i2c_mcux_rtio driver
Build was failing due to const variable being passed as function param
accepting non-const variable discarding const qualifier. Explicitly cast
to fix the build issue.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-08-22 09:10:52 +02:00
Laurentiu Mihalcea
e0be5801cd drivers: dai: esai: don't reset ESAI on init
The ESAI is already reset during the config_set() function
so no need to also reset it during init().

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-22 09:10:18 +02:00
Fabio Baltieri
fba0a47b0e input: pmw3610: add soft reset when no reset pin is available
The reset pin on the chip is optional, add a soft reset call when the
reset pin is not specified for the device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-21 21:06:50 -04:00
Jakub Topic
b824e41bf3 drivers: rtc: rv3028: adjust timing of EEPROM requests
Removes calling k_busy_wait() and uses k_msleep().

Updates polling rate of EEPROM busy status after read request to 1 ms, as
recommended by the app note.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-08-21 16:51:02 -04:00
Jakub Topic
7ff72ee55e drivers: rtc: rv3028: fix minutes alarm
Use correct value for Minutes Alarm register when disabling this alarm.

Signed-off-by: Jakub Topic <jakub.topic@anitra.cz>
2024-08-21 16:51:02 -04:00
Armando Visconti
45ae08a379 modules/hal_st: Align sensor drivers to stmemsc HAL i/f v2.6
Align all sensor drivers that are using stmemsc (STdC) HAL i/f
to new APIs of stmemsc v2.6

Requires https://github.com/zephyrproject-rtos/hal_st/pull/21

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-08-21 18:27:28 +01:00
Jordan Yates
b3a4b15e4b sdhc: sdhc_spi: handle PM on SPI bus
Handle SPI buses that have device runtime PM enabled.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-21 18:26:37 +01:00
Mark Wang
0c0c420424 drivers: udc: mcux: set high_bandwidth
set high_bandwidth and use the cfg->mps to set
ep_init.maxPacketSize because NXP MCUX controller
driver supports additional transaction bits in
maxPacketSize.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-08-21 18:25:30 +01:00
Johann Fischer
8617e46849 drivers: udc: do not use the MPS value directly for the endpoint size
Instead, use the helper to get the size field from the MPS value.
MPS value may contain information about additional transaction
per microframe (bits 12..11).

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
07bd625196 drivers: udc_dwc2: Support High-Bandwidth endpoints
Make driver aware of High-Bandwidth endpoints both in Completer and
Buffer DMA mode. In Completer mode TxFIFO must be able to hold all
packets for microframe, while in Buffer DMA mode space enough for two
packets is sufficient.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
07ea4aa155 drivers: udc_dwc2: Allow larger TxFIFO writes
DMA is capable of packetizing transfers on its own and the driver
doesn't need to check available TxFIFO size when scheduling DMA
transfer.

Split packets on DWORD boundary when writing more than one packet to
TxFIFO in completer mode.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tomasz Moń
b7664f27c8 usb: device_next: Make stack High-Bandwidth aware
Add macros for converting between Max Packet Size and total payload
length. Allow drivers specify whether endpoint supports high-bandwidth
interrupt and high-bandwidth isochronous transfers.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-21 18:25:30 +01:00
Tu Nguyen Van
ee6620e15f dts: arm: nxp: add Flexcan support for S32Z27x
Add FlexCan nodes to S32Z27x devices

Signed-off-by: Tu Nguyen Van <tu.nguyenvan@nxp.com>
2024-08-21 11:03:44 +02:00
Ha Duong Quang
78214543d5 drivers: nxp_s32_canxl: support rxfifo on new SoC version s32ze
The received messages are put into the FIFO one by one in the
order, the hardware will return the queue index for current
message. So use the index instead of reading always from 0.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-21 11:03:34 +02:00
Gerard Koskamp
6f9d3bda5d drivers: mdio: shell: add support for stm32 mdio
Add support for access mdio registers with the mdio shell on stm32.

Signed-off-by: Gerard Koskamp <gerardgit@outlook.com>
2024-08-21 08:58:29 +02:00
Jordan Yates
cc84a87e4b sdhc: sdhc_spi: log message on power state change
Add a basic log message when power is applied or removed from the SDHC
card.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-20 19:42:37 -04:00
Jordan Yates
2c52f9ee6e disk: sdmmc: power off card in DISK_IOCTL_CTRL_DEINIT
Power off the SD card in `DISK_IOCTL_CTRL_DEINIT`, instead of only
waiting for the card to be idle then doing nothing. This is a safer
state for `DISK_IOCTL_CTRL_DEINIT`, which is documented as preparing the
disk to be removed from the system. It also has the advantage of
lowering power consumption while de-initialized.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-20 19:42:37 -04:00
Chaitanya Tata
2e52f0d154 drivers: wifi: Fix build error with conn_mgr
Fix the binding to the connection manager.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-20 18:58:08 -04:00
Ricardo Rivera-Matos
04dae3acbf drivers: haptics: drv2605: Hard codes open loop mode for LRA mode
Enables open loop operation when initializing into LRA mode. Open loop
operation is enabled by default for ERM mode. This is hard coded for LRA
mode because calibration is currently unsupported.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
6825fc3a9d drivers: haptics: drv2605: Introduces overdrive clamp prop
Adds "vib-overdrive-mv" device tree property to configure the overdrive
clamp at initialization.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
38b827d18d drivers: haptics: drv2605: Introduces rated voltage prop
Adds support for boot time configuration of the rated voltage at
initialization via "vib-rated-mv" devicetree property.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
857b9df26e drivers: haptics: drv2605: Pick up property defaults from DT
Adds the default value for the existing properties to the device tree
and fall back on those values at initialization if necessary.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
51340b879c drivers: haptics: drv2605: Drops unused drv2605_pm_state
Removes an unused enum defining the DRV2605 power states. This enum is
dead code so it is being removed.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Ricardo Rivera-Matos
d5134ef0e3 drivers: haptics: drv2605: Drops ti prefix from DT props
Removes the "ti_" prefix form the the device tree properties.

Signed-off-by: Ricardo Rivera-Matos <rriveram@opensource.cirrus.com>
2024-08-20 14:52:32 -04:00
Francois Ramu
103f3b04f3 drivers: flash: stm32 qspi driver sends the reset cmd
Use the define to send the reset cmd at quad-flash init :
SPI_NOR_CMD_RESET_EN followed by SPI_NOR_CMD_RESET_MEM
when the st,stm32-qspi-nor has the <reset-cmd> property set.
Reports the jedecID correctly.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-08-20 14:52:14 -04:00
Fabrice DJIATSA
fe82353b82 drivers: display: use zephyr reset api for diyplay
Replace direct HAL api by zephyr reset api framework for display
peripheral block reset.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-08-20 14:50:57 -04:00
Henrik Brix Andersen
e60da1bd64 drivers: can: fake: install default core clock delegate at driver init
Install the default delegate for reporting the CAN core clock frequency at
driver instance initialization. This allows using the default clock
configuration when not using ztest.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-08-20 10:34:07 +02:00
Pisit Sawangvonganan
1bcae0ea9f style: drivers: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Dino Li
b9d8e9a634 it8xxx2/espi: disable IBF interrupt by calling interrupt controller API
Disable input buffer full interrupt for 60h/64h and 62h/66 ports by
calling interrupt controller API. The API has barrier mechanism to
ensure that a thread's requirement to disable peripheral interrupt
takes effect before enabling CPU interrupt. Therefore, the disabling
operation does not occur in ISR and results in interrupt 0 symptom.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2024-08-20 10:33:19 +02:00
Zhengwei Wang
4a7adb3d9d drivers: spi: pm: Add power management support for Ambiq Apollo3 SoCs SPI
Add power management support for Apollo3/Apollo3P SPI, and
automatically enables device runtime power management

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-08-20 10:32:52 +02:00
Zhengwei Wang
2cbf3b9365 drivers: i2c: pm: Add power management support for Ambiq Apollo3 SoCs I2C
Add power management support for Apollo3/Apollo3P I2C, and
automatically enables device runtime power management

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-08-20 10:32:52 +02:00
Zhengwei Wang
03a1fe6cd7 drivers: serial: pm: Add power management support for Apollo3 SoCs UART
Add power management support for Apollo3/Apollo3P UART, and
automatically enables device runtime power management

Signed-off-by: Zhengwei Wang <zwang@ambiq.com>
2024-08-20 10:32:52 +02:00
Ha Duong Quang
0135e7433b drivers: nxp_s32_netc_psi_vsi: update to RTD 2.0.0
Config to enable VLAN promiscuous and untagged.

Config to enable SI message interrupt.

Fix the build warning.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
3bff3168f5 drivers: spi_nxp_s32: update to RTD 2.0.0
Update to use rtd function to upadte Keep CS asserted
after the next transfer.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
b000ac7cf6 drivers: can_nxp_s32_canxl: Update to RTD 2.0.0
Create the set FD mode function because the old
RTD function is updated to static.

Fix the build warning by update the type of buffidx
and u32SysStatus arguments in the callback function
to uint32_t.

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Ha Duong Quang
dcc4b9c5ec drivers: uart_nxp_s32_linflexed: update to RTD 2.0.0
Update user_data pointer to 'const void (*)' type

Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
2024-08-20 10:32:32 +02:00
Daniel Kampert
e5d4b66b93 drivers: rtc: Wrong alarm mask in rtc_alarm_get_time
Fixing 3 issues:

1. The mask can be wrong if the alarm register is
set to a MAX value because the alarm bit is the
highest in the alarm register. The mask is now
generated by checking the AE_x bits in the time
registers.

2. Fixing possible NULL pointer exception in
alarm_set_time API. timeptr can be set to NULL
with mask 0 in the alarm_set_time function.
The regs variable for the I2C communication
is written with the correct value from timeptr
only when the right bit in the mask is set.

3. rv8263c8_alarm_set_time() now resets the
alarm status.

4. Interrupts are now enabled by using
rv8263c8_alarm_set_time() rather than when
setting an alarm callback.

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-20 10:32:06 +02:00
Thao Luong
4cebe5354f drivers: adc: initialize to add ADC driver
Add minimal ADC driver code for EK-RA8M1 board

Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
Signed-off-by: Tri Nguyen <tri.nguyen.wj@bp.renesas.com>
Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
2024-08-20 10:31:43 +02:00
Benedikt Schmidt
d7fa28bf72 drivers: gpio: improve logging of PCAL64XXA
Improve logging of the driver for the port expander PCAL64XXA.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2024-08-20 10:31:27 +02:00
Ioannis Damigos
782967a1e3 gpio_smartbond: Fix port_set_masked_raw
Writing directly to Px_DATA_REG modifies pins which are not
indicated by mask, causing gpio_basic_api test to fail.

Use Px_SET_DATA_REG and Px_RESET_DATA_REG to modify only
pins indicated by mask.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Ioannis Damigos
82d17f1f2c gpio_smartbond: Remove pdc entry only if it exists
Remove pdc entry only if index exists when CONFIG_PM
is set.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Ioannis Damigos
df86860319 gpio_smartbond: Set pin to input when it is configured as GPIO_DISCONNECTED
Set pin to input with no resistors selected when it is configured as
GPIO_DISCONNECTED.

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Ioannis Damigos
bacd6c31d6 entropy_smartbond: Clear pending interrupts after disabling TRNG
Clear pending interrupts after disabling TRNG to avoid
smartbond_trng_isr getting called with TRNG disabled

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-08-19 17:23:18 -04:00
Farah Fliss
ad254b06c8 drivers: input: gt911: Add support for multitouch events
The gt911 can recognize up to 5 touch points at a time.
Add code to support these multi-touch events.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-08-19 15:25:51 -04:00
Farah Fliss
bd658642e1 drivers: input: gt911: Fix coding style
Coding style was incorrect. Fix it.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
2024-08-19 15:25:51 -04:00
Farah Fliss
70664a0320 drivers: input: gt911: Run clang-format
Ran clang-format on the gt911 driver file  before
making any changes.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
2024-08-19 15:25:51 -04:00