Commit Graph

690 Commits

Author SHA1 Message Date
Henry Rovner
a83e7ced77 ox64: Add adc example config 2024-07-05 13:17:02 +08:00
Henry Rovner
8493273c2c risc-v/bl808: Add GPADC character driver
This commit implements a character driver for the general purpose ADC of the BL808, based on the hardware scanning functionality. The driver supports setting different conversion resolutions and the order of channels to be scanned via menuconfig.
2024-07-05 13:17:02 +08:00
Filipe Cavalcanti
0c63840b18 arch/risc-v: add support for capture driver on ESP32C6 and ESP32H2. 2024-07-04 18:24:50 -03:00
Rushabh Gala
ece78993b6 risc-v/ox64: Add LED Driver
- This PR adds the LED Driver for Ox64 Board (User LEDs and Auto LEDs)
- Ox64 LED Driver will be used by the Rust Blinky App for Google Summer of Code
- User LED 1 is configured for GPIO 29. Other User LEDs and Auto LEDs shall be configured by the NuttX Dev.
- The code is derived from NuttX PinePhone LED Driver
2024-07-03 17:54:09 +08:00
Yanfeng Liu
ed099f1cea riscv/k230: revise canmv230:nsbi
This revises ld-nuttsbi.script for easier use. It also adjusts
canmv230/nsbi to fit both k230d and k230 devices.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-06-29 22:39:11 +08:00
Eren Terzioglu
43a4f2fbea esp32[c3|c6|h2]: Add BMP180 sensor support 2024-06-28 17:27:46 +08:00
Eren Terzioglu
dda55419f9 esp32[c3|c6|h2]: Add I2C master support 2024-06-28 17:27:46 +08:00
Henry Rovner
7d2dbc00f6 Revert "Add courier system driver"
This reverts commit 50dd04c0f6832a73a6392c54b6580978e418f727.
2024-06-28 17:23:02 +08:00
Tiago Medicci Serrano
e913828955 espressif: Enable SMP (when applicable) and iPerf for sta_softap
- Enable SMP by default (when the device supports it);
- Increase IOB buffers;
- Enable iPerf;

These changes enable testing the device throughput easily.
2024-06-27 18:09:46 +08:00
Henry Rovner
d5657196d5 ox64:nsh - normalize defconfig after adding UART parameters 2024-06-26 09:06:38 +08:00
Henry Rovner
023bd08faa BL808: Add support for UARTs 0-2 and serial configuration
This commit modifies the existing serial driver to add support for the remaining UARTs on the BL808. It also introduces support for setting baud rate, character length, stop bits, parity, flow control and which serial port acts as the console.
2024-06-26 09:06:38 +08:00
Henry Rovner
210ea76b04 Add courier system driver
This change implements a system for allowing the D0 core (which runs NuttX) to receive forwarded interrupts from the M0 core. This makes it possible for drivers that rely on interrupts to work with peripherals attached to the M0 core.
2024-06-23 11:21:55 +08:00
Lup Yuen Lee
008803865f boards/risc-v: Add support for Milk-V Duo S SBC (SOPHGO SG2000 SoC)
This PR adds support for Milk-V Duo S 64-bit RISC-V SBC, based on SOPHGO SG2000 SoC (T-Head C906 Core). Most of the code is derived from NuttX for Ox64 BL808. The source files are explained in the articles here: https://github.com/lupyuen/nuttx-sg2000

Modified Files:

`boards/Kconfig`: Added Milk-V Duo S board

`arch/risc-v/src/sg2000/sg2000_timerisr.c`: Fixed MTIMER_FREQ for sleep() to work correctly

New Files in boards/risc-v/sg2000/milkv_duos:

`src/sg2000_appinit.c`: Startup Code

`include/board.h`: Milk-V Duo S Definitions

`include/board_memorymap.h`: Memory Map

`src/etc/init.d/rc.sysinit`, `rcS`: Startup Script

`src/.gitignore`: Ignore the tmp filesystem

`scripts/ld.script`: Linker Script

`scripts/Make.defs`: Milk-V Duo S Makefile

`src/Makefile`: Milk-V Duo S Makefile

`Kconfig`: Milk-V Duo S Config

`configs/nsh/defconfig`: Build Config for `milkv_duos:nsh`

Updated Documentation:

`platforms/risc-v/sg2000/index.rst`: New page for SOPHGO SG2000 SoC

`platforms/risc-v/sg2000/boards/milkv_duos/index.rst`: Building and booting NuttX for Milk-V Duo S
2024-06-18 00:13:35 +08:00
Inochi Amaoto
5f1201ede6 boards: rv-virt: Add example S mode flat build config
Add "flats" and "flats64" config to test S mode flat build.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-06-14 19:52:00 +08:00
Inochi Amaoto
e37348aeba arch/risc-v: Add support for S-mode flat build
There is no need to use kernel build for S-mode all the time. As cpu
scratch is supported for non kernel mode build, it is possible to use
flat build for S-mode.

Add flat build support for risc-v S mode.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-06-14 19:52:00 +08:00
Eren Terzioglu
0cf7676aca esp32[c3|c6|h2]: Add SPI Slave support 2024-06-12 22:53:19 -03:00
Eren Terzioglu
99ea8b7832 esp32[c3|c6|h2]: Add gspi master support 2024-06-12 23:35:24 +08:00
Tiago Medicci Serrano
96f83bb03a net: Enable CONFIG_NET_ARP_SEND by default
Enable logic to send ARP requests if the target IP address mapping
does not appear in the ARP table.

Please check the comment in https://github.com/apache/nuttx/issues/12446#issuecomment-2145856778
2024-06-06 02:40:16 +08:00
Eren Terzioglu
24af23e49c esp32[c3]: Add XTWDT support 2024-06-04 17:42:07 -03:00
Ville Juven
74702085f0 defconfigs: Add SCHED_HAVE_PARENT=y to configs with WAITPID && BUILD_KERNEL
The added depencendy broke some of the defconfigs
2024-06-03 18:00:40 +02:00
Stuart Ianna
1f02c05c6d arch/litex/litex_arch_alarm: Support tickless schedular with arch alarm.
This provides an alternate tickless scheduling method, which uses the riscv
mtimer as a timebase, allowing the time and timeh registers to used
throughout an application.

The exiting tickless method, using Litex's timer0 has been left in place, as
it is a more performant option, but currently has the potential issue
identified in #11189.
2024-05-31 10:21:44 +08:00
simbit18
fde641fac9 Fix Kconfig style
correct block name board
Remove extra TABs
Add comments
2024-05-29 17:15:57 -03:00
simbit18
1cacc70f75 boards/risc-v/litex/arty_a7/Kconfig: Added if LITEX_SDIO for common dependency
Added if LITEX_SDIO
2024-05-27 23:24:54 +08:00
simbit18
97836bf3ab board: esp32c3, esp32 and esp32s3 corrected PM block
removed depends on PM from if PM block
2024-05-27 23:24:31 +08:00
Eren Terzioglu
ea9eea4096 esp32[c3|c6|h2]: Add MWDT1 support 2024-05-24 13:59:03 +08:00
Eren Terzioglu
aa0bb55529 esp32[c3|c6|h2]: Add RWDT support 2024-05-24 13:59:03 +08:00
Yanfeng Liu
3bfdb14f4d ci/riscv: fix rv-virt/kfb64 CI issue
This fixes `Linux(risc-v)` CI issue
`section .data LMA [0000000080200000,000000008020046f] overlaps
 section .text LMA [0000000080200000,000000008021b2f3]`

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-22 16:40:13 +08:00
Inochi Amaoto
44bed119f0 boards: rv-virt: Use config to compute memory layout for kernel build
rv-virt support different size of ksram and pgmem region, but the
fixed value in the link script limits this function. As nuttx supports
preprocessing the link script. It is better to use the config value
to compute the memory layout. This also make all kernel build use the
same script.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-20 10:14:14 +08:00
Jukka Laitinen
8b1a388d93 boards/risc-v/mpfs/common/src: Update mpfs_emmcsd.c and mpfs_composite.c
Add partition parsing logic to emmcsd and support for configuring either CDCACM alone or
both CDCACM and USBMCS for composite mode.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-05-17 19:14:06 +08:00
Jukka Laitinen
9257af55f1 risc-v/mpfs: Change linker symbols _ssbi_ddr and _esbi_ddr into _ssbi_ram and _esbi_ram
The original names are confusing; the symbols' addresses point to the start and end of the
sbi executable ram area. This may also reside in l2lim and not in ddr, depending on the
configuration, and this is defined in the linker script.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-05-16 17:14:43 -03:00
simbit18
360c2fc44c fix nxstyle
Remove TABs
fix Relative file path does not match actual file.
2024-05-15 21:53:59 +08:00
Tiago Medicci Serrano
c412dadcb9 esp32c3/wifi: Add support for the Wi-Fi in ESP32-C3
This commit introduces support for both station and softAP modes.
2024-05-14 22:10:45 +08:00
Tiago Medicci Serrano
2c4963dcd6 esp32c6/wifi: Add support for the Wi-Fi in ESP32-C6
This commit introduces support for both station and softAP modes.
2024-05-14 22:10:45 +08:00
Yanfeng Liu
8eadde89f1 riscv/qemu: enable debug features
This enables debug features in `rv-virt/nsh` and `rv-virt/nsh64` to
help debugging with QEMU targets.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-09 17:31:33 +08:00
Inochi Amaoto
f4a38c01df arch/risc-v: Make esp32 SoCs allocate idle stack after ebss
ESP32 SoC use a static allocated array as idle stack. To fit
the existed idle stack allocation, make idle stack allocated
from ebss for the whole esp32 series.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-08 15:43:41 +08:00
Yanfeng Liu
ef15b5296d riscv/virt: M-mode poweroff support
This adds poweroff support to `rv-virt/nsh` and `rv-virt/nsh64`.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-08 15:39:26 +08:00
Yanfeng Liu
c9a2e4a6c5 risc-v/virt: enable gradeful shutdown in kernel build
This enables graceful shutdown via `poweroff` command in `knsh64`
and `knsh32` configs.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-07 21:02:49 +08:00
Inochi Amaoto
04e40182ad arch/risc-v: Make bl602 allocate idle stack after ebss
Although almost all board support allocating idle stack after ebss,
bl602 have a different memory layout for idle stack. To unify them,
make idle stack allocated from ebss for bl602.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-06 15:04:24 -03:00
Yanfeng Liu
339da96469 risc-v/virt: update kfb64 config
This updates `rv-virt/kfb64` to support new S-mode in patch 12178

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-05 22:01:26 +08:00
Yanfeng Liu
03446fb4e3 riscv/rv-virt: fix kernel build booting issue
This patch can boot `rv-virt/knsh64` and `rv-virt/knsh32` reported in
issue #12275 with qemu 6.2 target and OpenSBI v1.0 firmware on Ubuntu
22.04 host.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-04 22:46:32 +08:00
Yanfeng Liu
041ef1d9ea video/fb: kernel build framebuffer support
This supports running fb demo app in kernel build with new
config `rv-virt/kfb64`. The demo shows colored rectangles
in graphic window with the following console logs:

```
nsh> cat /proc/version
NuttX version 12.4.0 1ea10ddacc-dirty May  3 2024 07:03:59 rv-virt/kfb64
nsh> fb
VideoInfo:
      fmt: 13
     xres: 640
     yres: 480
  nplanes: 1
PlaneInfo (plane 0):
    fbmem: 0x80218010
    fblen: 1228800
   stride: 2560
  display: 0
      bpp: 32
Mapped FB: 0xc2000010
 0: (  0,  0) (640,480)
 1: ( 58, 43) (524,394)
 2: (116, 86) (408,308)
 3: (174,129) (292,222)
 4: (232,172) (176,136)
 5: (290,215) ( 60, 50)
Test finished
```

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-03 23:58:39 +08:00
Inochi Amaoto
bd895222eb arch/risc-v: implement sbi_ipi_send
And SBI ipi support.

Fixup: 4f63ca1418 ("arch/risc-v: unfiy IPI access)
Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-05-02 16:08:13 +08:00
Eren Terzioglu
891d67bb5e esp32[c3|h2|c6]: Add support to TWAI/CANBus controller 2024-04-30 10:03:22 +08:00
Xu Xingliang
0db7417dc0 esp32/lvgl: fix lvgl v9 configuration error
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-30 01:45:03 +08:00
Inochi Amaoto
49b3f52db1 arch/riscv/qemu-rv: replace M-mode init code with SBI in kernel build
The qemu-rv use a small init code for M mode in kernel build.
It is hard-coding and is difficult to change. Due to the fact,
introduce a already mature SBI implement (e.g OpenSBI) to
replace existing code is a better choice.

This patch introduce some change for qemu-rv:
1. use SSTC to provide time interrupt in kernel build
2. remove uncessary M mode trap.

For simplicity, this patch does not add support for booting
nuttx for any core, but force boot core to start core 0 and
let core 0 do the initialization.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-04-27 22:09:22 -03:00
Inochi Amaoto
a33313413d arch/risc-v: introduce dynamic stack allocation.
It is misleading to allocate stack from static array and heap,
make all stack allocated from heap area.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-04-27 22:09:22 -03:00
chao an
28044f7d5a arch/risc-v: add support of save/restore vector registers
Reference:
https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc
https://github.com/torvalds/linux/blob/master/arch/riscv/include/asm/vector.h

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-23 16:18:46 -03:00
Yanfeng Liu
7a9690dee7 rv-virt/knsh32: enable debugging options
This enables debugging options for `rv-virt/knsh32` as it is more
convenient for debugging and testing.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-16 19:09:31 +08:00
simbit18
7677f10d3f fix nxstyle
fix Relative file path does not match actual file.
2024-04-16 19:09:12 +08:00
Jakub Janousek
3ce84d1ba0 arch and board esp32c3-legacy: Add optional iCE40 FPGA loading support
Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>
2024-04-12 10:19:58 -03:00