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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Added private channels for metadata associated with
distance measurement according to datasheet and API manual.
Signed-off-by: Michal Piekos <michal.piekos@wp.pl>
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>
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>
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>
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>
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>
Modem socket does not build with NET_SOCKETS enabled.
Referencing socket_data in struct net_context.
Signed-off-by: Joakim Andersson <joerchan@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>