Commit graph

25,525 commits

Author SHA1 Message Date
Alberto Escolar Piedras
b3407f04e7 drivers: entropy: fix native_posix driver for more than 3 byte requests
Fix the native_posix fake entropy driver for more than 3 byte requests,
and specially for native_sim//64 builds.

The host random() provides a number between 0 and 2**31-1 (INT_MAX),
so bit 32 was always 0.
So when filling a buffer with more than 3 bytes we would be filling
each 4th byte with a byte which always had its MSbit as 0.

For LP64 native_sim//64 builds, this was even worse, as the driver had
another bug where we assumed random() returned the whole long filled,
and therefore all 4 upper bytes would be 0.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-01-20 20:55:48 +01:00
Aksel Skauge Mellbye
5645adb251 drivers: gpio: gecko: Simplify device support
Simplify the distinction between Series 0/1 and Series 2.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2025-01-20 16:34:50 +01:00
Ryan Erickson
522718d7fd modem: hl7800: optimize socket cleanup on boot
On boot cleanup any restored sockets if they exist.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
8a1336ec87 modem: hl7800: Fix DNS in sleep mode
When sleep modes are used, sockets are restored from NV after boot.
If the network changes IP addresses, restore sockets maintain old network
info in the HL7800 firmware.
On boot, restored sockets should be closed to ensure new sockets
are created with updated network info.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
adffb84329 modem: hl7800: improve AT command API
Update AT command API to return a response.
Add param to set the timeout when waiting for a response.
If the user does not desire a response, the response buffer can
be NULL.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
7b9a0eb237 modem: hl7800: stay awake for firmware update
Ensure the HL7800 stays awake for the entire firmware update.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
c73e164ed5 modem: hl7800: wake before firmware update
Ensure the HL7800 is awake before starting a firmware update.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
5d27c9b298 modem: hl7800: Add new state event
The new state event allows a user to know the overall state of the
HL7800 driver.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
962179286f modem: hl7800: power off should generate events
When powering off the modem, appropriate state events
should be triggered.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
de83072776 modem: hl7800: reset API should be async
All other APIs that need to reset the modem do so in an async way.
Make the rest API async as well.
This fixes issues where modem events related to the reset
were not generated properly.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
39412e26c8 modem: hl7800: fix socket port byte order
Ensure the proper byte order is used for the network socket in the stack.
When sending the AT commands, the port needs to be converted to
host endianess.
TLS handshakes check that the remote address and port match
what is expected.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Samuel Chee
8d6d4de79d boards: arm: mps2: Add support for mps2/an383
Added new mps2 board an383 to enable testing with ARM FVP.
Qualifier to build/run is mps2/an383

Signed-off-by: Samuel Chee <samche01@arm.com>
2025-01-20 11:15:32 +01:00
Toon Stegen
ff76b12287 drivers: wifi: nxp: raise connect result event when failed
In case connection fails, the driver should raise a connect result event
to notify the user.

Signed-off-by: Toon Stegen <toon@toostsolutions.be>
Signed-off-by: Bart De Vos <bart.devos@verhaert.com>
2025-01-20 11:15:17 +01:00
Mulin Chao
47f472aa5c drivers: i2c: npcx: add support to wake up from sleep mode
Add support to wake up from sleep mode by START condition when i2c
is configured to target mode.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2025-01-20 07:05:48 +01:00
Nikola Petrovic
eabef50991 drivers: input: sbus: Fix SBUS parser overflow
SBUS parser discards portion of the received data, this is a result
of SBUS parser intermediate variable overflow. Fix by changing said
variable type to uint32_t.

Signed-off-by: Nikola Petrovic <nikolaptr6@gmail.com>
2025-01-20 02:59:06 +00:00
Raffael Rostagno
fc8119deed drivers: pwm_led: esp32: Add inverted flag
Add inverted flag to bindings, as pwms field is supposed
to be used by application only.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Raffael Rostagno
17752adfd9 drivers: pwm_led: esp32: Clang check
Clang check for formatting.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Raffael Rostagno
10360e1e77 drivers: pwm_led: esp32: Clock management update
Update clock management to better support new devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Raffael Rostagno
56d7dcc121 drivers: pwm_led: esp32: Timer sharing control
Include condition to block pwm_set operation when the same timer
is shared but a different frequency is requested. First set
operation will take precedence.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Raffael Rostagno
0c17da0ebf drivers: pwm_led: esp32: Cleanup and functions organization
Cleanup and functions organization. Clock source selection added
to init to allow proper setting of default level when signal is
inverted.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Raffael Rostagno
9d9ec2dab3 drivers: pwm_led: esp32: Change duty and PWM transitions
Disable PWM output for duty 0% or 100%, to allow using max timers
resolution. Move timer reset to init function in order to ensure
smooth frequency transitions.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Raffael Rostagno
58aef30acb drivers: pwm_led: esp32: Fix frequency config
At driver init channels frequency are unknown, thus timer config
may take place only at set_cycles(). To avoid phase shifts,
timers are only reconfigured if a new frequency is requested.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-18 02:36:05 +01:00
Armin Kessler
2c5b791b26 drivers: pwm_led: esp32: fix 100 percent pwm and init state
Set pwm init state to value defined in flags field.
Furthermore 100 percent is now actually 100 percent and not 99.

Signed-off-by: Armin Kessler <ake@espros.com>
2025-01-18 02:36:05 +01:00
Armin Kessler
babaaa6a19 drivers: pwm_led: esp32: add inverted pwm polarity
This PR enables the PWM to be inverted by making use of the
`PWM_POLARITY_INVERTED` flag.
It also fixes an overflow bug when setting duty-cycle to 100 percent.

Signed-off-by: Armin Kessler <ake@espros.com>
2025-01-18 02:36:05 +01:00
Dat Nguyen Duy
5014a204cf dts: arm: nxp: add support pwm emios for nxp s32z SoC
This adds support PWM EMIOS for NXP S32Z SoC, both PWM pulse
generate and pulse capture are supported

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-01-18 02:32:50 +01:00
Dat Nguyen Duy
e72af321d5 drivers: emios_pwm: do not configure period, duty and polarity at boot
Removing period, duty and polarity configuration from
channel devicetree. At boot time, only minimal setup like
pinctrl, prescaler, etc should be initialized. PWM signal
is produced by using pwm_set* API

Also after this change, PWM period, duty are changed at the
next counter period boundary

Signed-off-by: Dat Nguyen Duy <dat.nguyenduy@nxp.com>
2025-01-18 02:32:50 +01:00
Sven Ginka
e50645468c drivers: ethernet: vsc8541: add basic support for phy
add basic support for the microchip vsc8541 model phy.
as first starter, 1000MBit/s mode is implemented.

Signed-off-by: Sven Ginka <s.ginka@sensry.de>
2025-01-17 23:08:14 +01:00
Michal Piekos
d318726209 drivers: sensor: vl53l0x: Add private channels
Added private channels for metadata associated with
distance measurement according to datasheet and API manual.

Signed-off-by: Michal Piekos <michal.piekos@wp.pl>
2025-01-17 23:07:54 +01:00
Tarang Raval
e338c7a807 drivers: sensor: fxls8974: remove redundant error check
The function fxls8974_get_temp_data always returns zero, indicating
success.Therefore, the error checking if condition is unnecessary and
can be removed.

Signed-off-by: Tarang Raval <tarang.raval@siliconsignals.io>
2025-01-17 23:07:40 +01:00
Igor Knippenberg
a35fee8592 driver: gpio: mcp23xxx: increase reset pin pulse duration
The reset pulse is currently fixed at 1 µs, the minimum required for
the chip. However, a long reset pin trace can increases rise time, making
1 µs potentially insufficient for reliable detection of a reset signal.
Increase the pulse duration to 2 µs

Signed-off-by: Igor Knippenberg <igor.knippenberg@gmail.com>
2025-01-17 20:07:02 +01:00
Michał Stasiak
2c89ed5441 drivers: pwm: nrfx: add global hsfll request for fast PWM
Added clock control api for global hsfll used in fast PWM120 driver.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2025-01-17 20:06:50 +01:00
Måns Ansgariusson
62ddd5fe79 drivers: i2s: Rename struct ring_buf -> struct ring_buffer
The struct ring_buf is renamed to struct ring_buffer to be able to coexist
with the sys/ring_buffer.h header file.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-01-17 19:43:44 +01:00
Måns Ansgariusson
4772bfe710 drivers: ethernet: Rename struct ring_buf -> struct ring_buffer
The struct ring_buf is renamed to struct ring_buffer to be able to coexist
with the sys/ring_buffer.h header file.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2025-01-17 19:43:44 +01:00
Ibrahim Abdalkader
2a6e5902cc drivers: video: gc2145: Add support for a PWDN pin.
Add support for power-down pin. Some modules require this pin
to enable the power supply.

Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
2025-01-17 16:36:22 +01:00
Joakim Andersson
8d04e7e38c drivers: modem: Fix modem_socket returning object for fd zero after init
Fix bug in modem_socket where an unallocated object can be returned
for file descriptor zero before the object has been used one time.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-01-17 13:54:34 +01:00
Joakim Andersson
123adb2d7b drivers: modem: Modem socket does not build without NET_SOCKETS enabled
Modem socket does not build with NET_SOCKETS enabled.
Referencing socket_data in struct net_context.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2025-01-17 13:54:34 +01:00
Peter Ujfalusi
bc7c717c41 drivers: dai: intel: ssp: Print usable error for poll timeout
Print the register address, mask and value as hexadecimal to be more
intuitive and also print out the actual value from the register to have
some insights.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2025-01-17 13:41:34 +01:00
Peter Ujfalusi
90d8710955 drivers: dai: intel: ssp: Log start for ACE3 and newer
With ACE3 the logging is skipped in dai_ssp_start(), move the code under
the same if cases to preserve them.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2025-01-17 10:42:35 +01:00
Maochen Wang
6c45bdcddb drivers: wifi: nxp: support WPA3 enterprise in scan result
Support setting WPA3 enterprise security mode in scan result, i.e.,
Suite-B, Sute-B-192 and WPA3 enterprise only mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-17 04:26:53 +00:00
Qiang Zhang
cbb6c2886a drivers: drivers/i2s: fix sai issue for support frdm_mcxn497
i2s driver have not suooprt frdm_mcxn947 pll clk set.
  so add macro CONFIG_I2S_HAS_PLL_SETTING to control pll init.

Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
2025-01-17 02:13:01 +01:00
Qiang Zhang
436f3dc65e clock: driver/clock_control: Add sai clock support for syscon.
Add sai clock support for syscon.

Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
2025-01-17 02:13:01 +01:00
Parthiban Veerasooran
5523e43a9a drivers: ethernet: lan865x: add internal PHY driver interface
Add phy driver probing part to activate the internal PHY driver support.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
7cfa5bf6cf drivers: mdio: lan865x: add mdio driver support
Implement lan865x mdio driver to provide interface between lan865x MAC
driver and internal PHY driver phy_microchip_t1s.c. This driver is needed
to support the driver architecture followed.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
757581e43a drivers: ethernet: oa_tc6: add c22/c45 registers read/write mdio APIs
Implement c22/c45 registers mdio read/write APIs for the lan865x mdio
driver to provide interface to the lan865x internal PHY driver.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
edacd99c04 drivers: ethernet: oa_tc6: fix style issue using clang-format
Fix the style formatting of oa_tc6.c and oa_tc6.h files using
clang-format utility.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
0b87a5469c drivers: ethernet: lan865x: remove internal PHY specific initialization
Remove internal PHY initialization part as the phy_microchip_t1s.c
driver will do the internal PHY initialization.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
25edf1b46e drivers: ethernet: lan865x: fix style issue using clang-format
Fix the style formatting of eth_lan865x.c and eth_lan865x_priv.h files
using clang-format utility.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
3bd39c2d1b drivers: ethernet: phy: Add Microchip's LAN867X Rev.C1/C2 PHY support
Add support for LAN8670/1/2 Rev.C2 as per the latest configuration note
AN1699 released (Revision E (DS60001699F - June 2024)) for Rev.C1 is also
applicable for Rev.C2. Refer hardware revisions list in the latest AN1699
Revision E (DS60001699F - June 2024).
https://www.microchip.com/en-us/application-notes/an1699

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
36c7feccf9 drivers: ethernet: phy: Add Microchip's LAN865X Rev.B0/B1 PHY support
Add support for LAN8650/1 Rev.B1. As per the latest configuration note
AN1760 released (Revision F (DS60001760G - June 2024)) for Rev.B0 is also
applicable for Rev.B1. Refer hardware revisions list in the latest AN1760
Revision F (DS60001760G - June 2024).
https://www.microchip.com/en-us/application-notes/an1760

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00
Parthiban Veerasooran
2b8880cc38 drivers: ethernet: phy: Add OPEN Alliance TC14 PLCA generic lib support
10BASE-T1S PHYs can operate in either CSMA/CD or PLCA mode. PLCA mode
needs some set of parameters like node id, node count, max burst count,
burst timer and TO (Transmit Oppertunity) timer to be configured. OPEN
Alliance TC14 specification defined a set of PLCA registers to configure
PLCA mode. The below APIs are implemented for PLCA mode.

genphy_set_plca_cfg() - to configure PLCA settings.
genphy_get_plca_cfg() - to get the configured PLCA settings.
genphy_get_plca_sts() - to get the PLCA status like active or inactive.

These APIs are implemented as generic library so that all 10BASE-T1S
PHYs can use these APIs to configure/access PLCA settings to avoid
duplication of code.

Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
2025-01-16 22:45:03 +01:00