Support short relative and late alarms for NXP System Timer Module
counter driver. The late alarm detection algorithm applied, is based on
existing counter drivers.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Instead of forcing users to provide this setting, allow to describe
which signals require CLOCKPIN enablement at device nodes. This is later
captured by the pinctrl macros and applied in the pinctrl driver. Note
that name has been adjusted to nordic,clockpin-enable to avoid confusion
with clock related settings.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Code size can significantly reduced (220 bytes per instance) if data
structure (stored in RAM) is not initilized (can be moved to .bss).
Data for asynchronous API had two fields which can easily be moved
to the configuration structure (which is in ROM) because they do not
change duing runtime.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
When runtime configuration is not enable then we can determine at
compile time what are the hardware settings. Function which
translates zephyr values to nRF register values is not needed as
macros can do that at compile time.
This optimization saves almost 400 bytes of code.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
gcc 13 produces a build warning (see below), as it seems to
believe the number of read bytes may overflow the frame_size
type.
Let's increase the frame_size bitwidth to avoid this.
(Any 32bit type, signed or unsigned, avoids this warning)
The build warning:
```
In file included from /usr/include/features.h:502,
from bits/libc-header-start.h:33,
from /usr/include/stdint.h:26,
from include/stdint.h:9,
from zephyr/include/zephyr/types.h:11,
from zephyr/include/zephyr/kernel_includes.h:21,
from zephyr/include/zephyr/kernel.h:17,
from zephyr/drivers/bluetooth/hci/userchan.c:9:
In function ‘read’,
inlined from ‘rx_thread’ at drivers/bluetooth/hci/userchan.c:201:9:
/usr/include/i386-linux-gnu/bits/unistd.h:28:10: warning: ‘__read_alias’
specified size between 4294902273 and 4294967295 exceeds maximum object
size 2147483647
[-Wstringop-overflow=]
28 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
drivers/bluetooth/hci/userchan.c: In function ‘rx_thread’:
drivers/bluetooth/hci/userchan.c:187:32: note: destination object allocated
here
187 | static uint8_t frame[512];
| ^~~~~
/usr/include/i386-linux-gnu/bits/unistd-decl.h:29:16: note: in a call to
function
‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’
29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void
| ^~~~~~~~~~~~~~~~~~
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use recommended write API that internally locks RTT usage and checks
if the RTTcontrol block initialization is done.
Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
Print the ISR & its ARG along with the IRQ and Hits in
`plic stats get <intc>` command, i.e.
```CONFIG_SYMTAB=n
uart:~$ plic stats get interrupt-controller@c000000
IRQ Hits ISR(ARG)
10 541 0x800054ee(0x80008170)
```
```CONFIG_SYMTAB=y
uart:~$ plic stats get interrupt-controller@c000000
IRQ Hits ISR(ARG)
10 114 uart_ns16550_isr(0x80008230)
```
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
REG_X_BASEADDR will be removed from all hal files.
This forces the use of the peripheral base address
Define MSPI_PORT macro for chip drivers
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Device tree configuration for USB serial node and clock control
fix for proper device initialization.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Some kind of race condition caused the gpio_keys input module to
occasionally miss an event after boot. This is fixed by initializing the
pin state variable in the input_gpio_keys module.
Related to https://github.com/starcopter/bms-firmware/issues/6
Signed-off-by: Lasse Fröhner <lasse@starcopter.com>
Update i2c_emul.c to support i2c_target_register and i2c_target_unregister
function calls as well as support address forwarding in emulation.
Address forwarding helps us test IPCs in native sim. Instead of having to
emulate 2 separate cores, we can forward read/write requests from one bus
to another bus (effectively creating a loop). This way the same image can
simulate both the controller and the target.
Signed-off-by: Yuval Peress <peress@google.com>
Pin definitions should correctly reflect the actual drive mode of the GPIO
controller, either push-pull or open drain.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This allows getting rid of the ngpios property, which is implicit in the
part number. It also prepares for configuring pins as open-drain on
supporting chips in the next commit.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This chip is handled by the more generic mcp23xxx driver, which will get a
microchip,mcp23s17 compatible binding in the next commit.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
- apply correct order to suspend/resume when using continuous mode
- unset LPEN (low-power-enable) bit on suspend (causing excessive
current draw)
- fix a starting issue which lead to higher power consumption
Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
The NTC thermistor sensor in drivers/sensor/ntc_thermistor/ntc_thermistor.c
cannot work with a 16-bit ADC.
The voltage becomes negative if the ADC raw value is 0x8000 or higher.
To correct this, I changed the types in the
ntc_thermistor_data struct from int16_t to int32_t.
This also corrects a potential problem at line 53
where we transform an int16_t into an int32_t.
Fixes: #75203
Signed-off-by: Robin Carrupt <robincarrupt@gmail.com>
Up till now the size of net buffer chunk was set to only 64B. This
approach was acceptable for IPv4 support as all headers would fit into
64B of allocated continuous memory.
With enabled support for IPv6 one would observe following errors when
Neighbor Discovery [ND] is performed:
net_pkt: Uncontiguous data cannot be linearized
net_ipv6_nd: DROP: NULL NA header
net_icmpv6: ICMPv6 handling failure (-5)
As some IPv6 headers span on multiple 64B net_pkt buffer instances.
To fix this error - the received chunks are stored to large enough single
net_pkt buffer fragment.
Signed-off-by: Stefan Bigler <linux@bigler.io>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
To change mac or enable/disable promiscous mode transmit/receive does not
need to be disabled.
Disabling and enabling again leads to not transmitting anything afterwards.
Signed-off-by: Stefan Bigler <linux@bigler.io>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Up till now the configuration of LAN865x was NOT allowing any
multicast frames to be received.
However, those are required for correct handling of IPv6's Neighbor
Discovery [ND] protocol.
This patch - by setting all bits in hash enable register - allows
all muticast MAC addresses to be recived.
Of course - more granular approach to specify set of addresses to
be allowed would be better and will be added in the future.
Signed-off-by: Stefan Bigler <linux@bigler.io>
[Cleanup + modified comment]
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Add extra information regarding the case when ZAREFE (0b01) combination
is set for RFA in OA_CONFIG0 register.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Introduces a haptics API for use with LRA driver ICs to
create haptic feedback events.
Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
Introduce a Kconfig option to signal whether a HW info driver is
available when HWINFO is enabled.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Use the new `SPI_MOSI_OVERRUN_DT` macro to determine at compile-time
whether the 512 byte array of `sdhc_ones` is required.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Remove address-of operator ('&') when assigning `init_fn`
function pointer in `DEVICE_DT_INST_DEFINE` macro.
This change aims to maintain consistency among the drivers in
`drivers/spi`, ensuring that all function pointer assignments
follow the same pattern.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
After flashed EC image, we needed to manually press the reset button
on it8xxx2_evb. Now, without pressing the button, we can disable
debug mode and trigger a watchdog hard reset for running tests.
After flash EC, running below tests can pass (without pressing the button):
west build -p always -b it8xxx2_evb tests/drivers/watchdog/wdt_basic_api
west build -p always -b it8xxx2_evb tests/kernel/timer/timer_api
west build -p always -b it8xxx2_evb tests/kernel/fatal/exception
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
This update is to support clock API for RA8
Move the clock initialize function into clock driver
Peripheral clock now has 2 more property in clock cell for enable
and disable clock to peripheral module
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
This change adds the device tree property for specifying oe-override
(output-enable override behavior), as well as defines for possible values
of the property.
RP2040 GPIOs can be configured to automatically invert the output-enable
signal from the selected peripheral function. This is useful for tasks like
writing efficient PIO code, such as in the i2c example in the rp2040
datasheet.
Signed-off-by: Yiding Jia <yiding.jia@gmail.com>
According to 5.1.2.2.5 I3C Target Address Restrictions in the I3C
v1.1.1 specification. Certain addresses are not allowed. These are
all marked as reserved in the address map. Print "RS" if they are
reserved and skipped.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
When Wi-Fi utils is enabled it causes build error due to missing rename
in a couple of places.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
The version header is generated during build and generated path included
already has "zephyr" directory.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Add an opaque pointer to store upper layer private data and initialize
it with the USB device context during controller initialization. Use the
pointer in event processing to get the correct context.
Fixes commit 48f2a4bc1a
("usb: device_next: remove initialized state checks in event processing")
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>