Commit Graph

24060 Commits

Author SHA1 Message Date
Kerogit
48585b21b5 arch/avr: fix MCU type for 64 pin chips
Toolchain.defs file was treating all supported chips as AVR128DA28,
which became apparent while testing changes in USART handling.

Signed-off-by: Kerogit <kr.git@kerogit.eu>
2025-11-29 09:48:11 -05:00
Eren Terzioglu
d4c76b1f60 arch/risc-v/esp32[-c3|-c6|-h2]: Add deep sleep support
Add deep sleep support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-11-29 14:35:34 +08:00
Eren Terzioglu
8417cf0c83 arch/risc-v/esp32[-c3|-c6|-h2]: Add PM support
Add PM support for esp32[-c3|-c6|-h2]

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-11-29 14:35:34 +08:00
Michal Lenc
5743edd0e9 arch/arm/src/samv7/sam_qspi_spi.c: add support for SPI_SETDELAY
This commit adds support for SPI_SETDELAY operation on SAMv7 QSPI
peripheral running in SPI mode. The logic is the same as for standard
SPI peripheral, just different registers. The change allows to set
custom delays between transfers, chip selects and so on.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-11-27 22:46:03 +08:00
Vlad Pruteanu
70455f1890 xtensa/esp32: Add support for hardware accelerated HMAC-SHA
This add support for using the cryptographic accelerator
within the ESP32 for HMAC-SHA operations. The supported
algorithms are: SHA1 and SHA512.

Signed-off-by: Vlad Pruteanu <pruteanuvlad1611@yahoo.com>
2025-11-27 03:38:09 +08:00
Max Kriegleder
a9ecff5f1c arch/arm/{nrf52|nrf53|nrf91}/i2c: fix I2C bus getting stuck during read
During I2C read, one-too-many byte is read, which can lead to the I2C bus
getting stuck. This is likely due to the STOP condition being set at the
wrong time or being missed completely. The chip offers a shortcut, such
that the STOP condition is set automatically after the last byte is being
written/read.

Signed-off-by: Max Kriegleder <max.kriegleder@gmail.com>
2025-11-24 14:57:10 +01:00
ouyangxiangzhen
a923cfe4ed arch/riscv: Fix bl602 start_absolute.
This commit fix bl602 start_absolute.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
b540618e9f driver/timers: Simplify the up_timer_initialize.
This commit simplified the up_timer_initialize.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
b1dd15e6e5 arch/riscv: Remove kmalloc.h for mtime driver.
This commit removed kmalloc.h for mtime driver.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
ee32bd44e0 arch/risc-v: Add clkdev drivers for esp32 timers.
This commit added clkdev drivers for esp32 timers.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
882c663a4f arch/riscv: Add clkdev driver for esp32c3-legacy.
This commit added clkdev driver for esp32c3-legacy.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
f9e894e490 arch/riscv: Add clkdev driver for bl602 timer.
This commit added clkdev driver for bl602 timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
a5e64a0a5c arch/riscv: Add CONFIG_ONESHOT condition for riscv_mtimer.c.
This commit added CONFIG_ONESHOT condition for riscv_mtimer.c

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
2227f232f0 arch/risc-v: Add clkdev driver for mtime.
This commit added clkdev driver for risc-v machine timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
b2fc959e40 risc-v/bl602: Fix boot issue caused by atomic instructions.
Since the bl602 do not support the atomic extention, we should compile
it with `-march=rv32imfc`, or it will fail to boot when executing the
`lr.w` instruction.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
fd4d93e928 arch/risc-v: Ensure the timer setting atomicity on 32-bit platforms.
This commit guaranteed the timer setting atomicity on 32-bit platforms.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
f2585f3042 arch/intel64: Added clkdev driver for oneshot_lower.
This commit addedd clkdev driver for oneshot_lower.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
c8c9dbd127 arch/intel64: Added clkdev driver for TSC-deadline.
This commit added clkdev driver for TSC-deadline.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
chenxiaoyi
6308167c45 arch/sim: fix oneshot driver to work with both signal and sleep
This commit fixed oneshot driver to work with both signal and sleep.

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
29bf45c371 arch/sim: Add clkdev driver for sim.
This commit added clkdev driver for sim.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
buxiasen
8cb0e654a3 arch/armv8-r/timer: fix the UINT64_MAX mask cause tick mode no isr
When TICKLESS not enabled, up_alarm_set_lowerhalf will call start, if we
overwrite the compare register will cause TICK mode no longer isr.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-11-24 19:43:07 +08:00
husong1
482de93342 arch/arm: Fix the arm timer's maximum delay to be a 64-bit integer.
This commit fixed the arm generic timer's maximum delay.

Signed-off-by: husong1 <husong1@xiaomi.com>
2025-11-24 19:43:07 +08:00
husong1
80463c8b06 arch/armv7r: Add armv7r clkdev timer driver.
This commit added armv7r clkdev timer driver.

Signed-off-by: husong1 <husong1@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
996f110925 arch/arm: Add clkdev driver for generic timer.
This commit added clkdev driver for arm generic timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
d335cce43a arch/arm64: Add clkdev driver for generic timer.
This commit added clkdev driver for arm64 generic timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
SPRESENSE
b2b045252d arch: cxd56xx: Fix failure to get RTC time in multi-core environment
In multi-core environment where NuttX runs on each core, if one core
sets the RTC time, the RTC value gotten on other cores is incorrect.

This is caused by clock_gettime(CLOCK_MONOTONIC) function used to get
elapsed time, which uses a core-specific global varaiable g_basetime
as the base time.

To fix this, update the g_basetime from the backup SRAM that can be
shared between cores in setting/getting the RTC time.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-11-20 20:56:05 +08:00
Jukka Laitinen
f641298d9e arch/imx9: Enable manual control for LPSPI PCS signals
Add a function imx9_lpspi_select_cs to assert CS at the start of
an SPI transfer and keep it asserted until called again to
de-assert it. This can be called by board-provided imx9_lpspi_select,
in case the CS needs to be controlled via the LPSPI block and not
GPIO.

The TCR register CONT (continue) bit is asserted to prevent CS toggling
during the transfer, and the PCS bits are set to mark the correct CS

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-11-19 12:28:32 -03:00
Jukka Laitinen
fbd27c045b arch/imx9: Correct LPSPI TCR register PCS bit definitions
According to the TRM, only bits 24-25 are reserved for chip select, and
the maximum number of internal chip selects is 3 (on LPSPI4 bus only).

Fix the TCR_PCS_MASK and remove extra definitions.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-11-19 12:28:32 -03:00
ouyangxiangzhen
ff5944d8fc arch/tricore: Add the clkdev driver for tricore.
Some checks failed
Build Documentation / build-html (push) Has been cancelled
This commit added the clkdev driver for tricore.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-19 12:24:56 +08:00
v-tangmeng
a221df7175 arch/xtensa/esp32[-s2|-s3]: add USE_NXTMPDIR_ESP_REPO_DIRECTLY
Directly downloading the Git repository is inconvenient for local debugging.
This will allow to automatically download external packages from the Internet.
If not set, the repo need to be download will need to provide them manually,
otherwise an error will occur and the build will be aborted.

Add `USE_NXTMPDIR_ESP_REPO_DIRECTLY`, with this we can use
`USE_NXTMPDIR_ESP_REPO_DIRECTLY=y make` which can directly use esp-hal-3rdparty
under nxtmpdir without CLONE, CHECK_COMMITSHA, reset, checkout and update. Just
`cp -rf nxtmpdir/esp-hal-3rdparty chip/$(ESP_HAL_3RDPARTY_REPO)`.

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2025-11-18 21:46:50 +08:00
ouyangxiangzhen
7e7828b3f6 timers/oneshot: Remove oneshot tick API.
This commit removed all oneshot tick API for new clkdev API.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
fc28b93224 timers/oneshot: Remove all callback and args.
This commit remove all callback and args in the APIs.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
5c113f79b7 timers/oneshot: Remove all private callback.
This commit removed all private callback and handle it on the upperhalf
of oneshot.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
f70ec7384b arch/risc-v: revert oneshot drivers to timespec API.
This commit reverted oneshot drivers to timespec API.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
b53141049d arch/arm: revert oneshot drivers to timespec API.
This commit reverted oneshot drivers to timespec API.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
ec45923cbe arch/arm64: revert oneshot drivers to timespec API.
This commit reverted oneshot drivers to timespec API.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
leocafonso
2667f51c82 arch/ra4: Add PWM driver support for RA4M1
- Added PWM driver support for the RA4M1 microcontroller using the GPT timer.
- This driver supports Saw-wave mode and one of the two output channels (A or B).
- Added necessary configurations in CMakeLists.txt, Kconfig, and Make.defs.
- Created new header file for GPT.

Signed-off-by: leocafonso <leocafonso@gmail.com>
2025-11-17 09:01:31 -03:00
ouyangxiangzhen
d322bdb1ee arch/arm: Simplify arm_cpu_boot.
This commit simplified arm_cpu_boot.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
b2f1d2fee0 arch/arm: Simplify ARM generic timer drivers.
This commit simplified ARM generic timer drivers.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
44aac0c3db arm/armv8-r: Rename arm_arch_timer to arm_timer.
This commit renamed arm_arch_timer to arm_timer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
c9f9e1e35f arch/intel64: add timer initialization for the secondary CPUs.
This commit added timer initialization for the secondary CPUs.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
liwenxiang1
27959044c3 arch/intel64: Change the name of the global TSC variable.
This commit changed the name of the global TSC variable.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-11-17 10:25:37 +08:00
liwenxiang1
5697e4fabb arch/intel64: Macro definition use positive check
This commit added macro definition using positive checking.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-11-17 10:25:37 +08:00
liwenxiang1
62a2f5c2f6 arch/intel64: Add TSC adjust setting for SMP
This commmit added TSC adjust setting for SMP.

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
946ac39c7a arch/intel64: Fix updating MSR_IA32_TSC_ADJUST.
If the initial value of the MSR_IA32_TSC_ADJUST register is not 0 (may be modified by BIOS or bootloader), it may cause timing errors. This commit addressed the issue.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
7185f41356 arch/intel64: Support MSR_IA32_TSC_ADJUST.
On newer x86 CPUs, the MSR_IA32_TSC_ADJUST register is utilized to fine-tune the offset of the Time Stamp Counter (TSC). This commit introduces support for MSR_IA32_TSC_ADJUST and enhances the TSC tickless
driver, optimizing its performance.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
8957740117 arch/intel64: Disable set_pcid if CPU does not support.
This commit disabled `set_pcid` function if CPU does not support.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
9364d0aa37 arch/risc-v: simplify mtimer driver.
This commit simplified RISC-V mtimer driver.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
932f890267 arch/arm64: add timer initialization for the secondary CPUs.
This commit added timer initialization for the secondary CPUs.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00
ouyangxiangzhen
0b34c167e5 arch/arm64: tick alignment work-around for the generic timer.
This commit aligned the arm64 generic timer count to the tick boundary. Notice that this is just a work-around. We should pass both the current system ticks and the delay ticks as input parameters. But we only have the delay tick here due to the oneshot interfaces.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-17 10:25:37 +08:00