Commit Graph

52821 Commits

Author SHA1 Message Date
Almir Okato
d098c1dc87 esp32s3: add simple boot support
The Simple Boot feature for Espressif chips is a method of booting
that doesn't depend on a 2nd stage bootloader. Its not the
intention to replace a 2nd stage bootloader such as MCUboot and
ESP-IDF bootloader, but to have a minimal and straight-forward way
of booting, and also simplify the building.

This commit also removes deprecated code and makes this bootloader
configuration as default for esp32s3 targets and removes the need
for running 'make bootloader' command for it.

Other related fix, but not directly to Simple Boot:
- Instrumentation is required to run from IRAM to support it during
initialization. `is_eco0` function also needs to run from IRAM.
- `rtc.data` section placement was fixed.
- Provide arch-defined interfaces for efuses, in order to decouple
board config level from arch-defined values.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-17 19:43:05 +08:00
Alan Carvalho de Assis
9009cd6f2d boards: Move DS1307 initialization to stm32/common
The DS1307 was used as board specific, but it is better move it to
stm32/common to be easily used by other boards as well.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-04-17 19:28:56 +08:00
Alan Carvalho de Assis
96dd39ba2e board/stm32f4discovery: Fix ds1307.c initialization
The ds1307 doesn't need to call i2c_register() because it is done
inside stm32_bringup.c

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-04-17 19:28:56 +08:00
Jukka Laitinen
58f0ee6364 arch/arm64/src/imx9: Add a more capable uart driver
Add an uart driver supporting LPUART1-8, dma, flow control, tc etc.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-17 00:10:10 +08:00
Almir Okato
f4bbe276e1 esp32[c3|c6|h2]: Fix simple boot map_rom_segments
Currently Simple Boot image have fixed 2 ROM segments and
2 RAM segments, then the parsing iterator must stop when all
ROM segments are found.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-04-17 00:09:58 +08:00
Ville Juven
4a82838be7 imx9_iomux.h: Fix issues with the header file
- Add missing include guard
- Add missing C++ guard
- Fix the initialization ordering in IOMUX_PADCFG macro. Why ? Becaused of:

imx9_iomuxc.h:54:3: error: designator order for field 'iomux_padcfg_s::dsyreg' does not match declaration order in 'iomux_padcfg_s'
   54 |   }
      |
2024-04-16 10:56:33 -03:00
Jukka Laitinen
9beb73d0f0 boards/arm64/imx9/imx93-evk/src/imx9_pwm.c: Fix initialization of TPM PWM registration
Fix typo causing TPM PWM not initializing on EVK board

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-16 10:47:35 -03:00
Ville Juven
f8c5b91522 arm64/imx9: Add LPI2C driver 2024-04-16 19:14:43 +08:00
Ville Juven
8e32a3ce24 imx93_gpioirq: Fix the GPIO interrupt source names
The original assumption was that the interrupt numbers are divided
so that 16 pins from 1 port are handled by a single interrupt source.

So source 0 would handle pins 0-15 and source 1 would handle pins 16-31.
This assumption is wrong, each pin has two sources, thus there are two
interrupt lines for each pin.

The driver uses source 0, and leaves source 1 disabled.
2024-04-16 19:11:31 +08:00
Yanfeng Liu
ae38e4a50d tools/uncrustify: disable leading space removal for block comment
This disables the leading spaces removal for block comments to
avoid changing well-formatted blocks.

Based on test with uncrusity 0.72.0+dfsg1-2 on Ubuntu 22.04, the
leading spaces of block comment lines are unexpectedly removed by
current version w/o this patch.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-16 19:10:08 +08: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
Alan Carvalho de Assis
a5572d8281 Documentation: Add NuttX Logo page
This commit add a page where users can find the NuttX Logos in
PNG and SVG format.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-04-16 11:25:08 +08:00
simbit18
b0504f1e5e fix nxstyle
fix Relative file path does not match actual file.
2024-04-15 15:33:17 -03:00
Ville Juven
2e638f6f19 arch/arm64: Add atomic modifyregXX
These are needed by drivers
2024-04-15 11:53:13 -03:00
Jorge Guzman
5e3cbd1165 stm32h7/linum-stm32h753bi: Add support to littlefs and nxffs with flash mem. via quadspi
Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2024-04-15 13:24:55 +08:00
Xiang Xiao
81c8f902b6 video: Move video_format_s from video.h to v4l2_cap.c
since it is only used in v4l2_cap.c.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-04-14 12:08:30 -03:00
hujun5
f41f0324a5 qemu/trustzone: add secure memory config
According to the qemu source code, hw/arm/virt.c.
The secure memory of the ARM Virt board is [0xe000000~0xf000000]
and the non-secure memory is configured as [0x40000000~0xffffffff].
We made the following adjustments based on the above virt board configuration

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-14 12:07:59 -03:00
Simon Filgis
cb0e8454d7 enable support for multible devices of mcp48xx
Instead of one static dev and priv, allocate a dedicated one each time
the init is invoked.
2024-04-14 22:10:58 +08:00
Yanfeng Liu
200424e59d arch/risc-v: fix RV32 up_addrenv_destroy
This patch fixes the issue/12122 for RV32, where the scanning should be
limited to user space only.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-14 14:49:36 +08:00
Yanfeng Liu
6d7355b929 arch/kconfig: minor revision for KMAP_NPAGES
Adds missing dependency to MM_KMAP, revises comments.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-14 14:48:23 +08:00
TimJTi
df7650af71 Improvements relating to SAMA5 TSD driver 2024-04-14 14:47:53 +08:00
Yanfeng Liu
3451330000 tools/configure.sh: support listing configs for board
This patch supports listing configs for a given board like

- `tools/configure.sh -L sama5`
- `tools/configure.sh -L rv-virt`
- `tools/configure.sh -L virt`

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-14 14:44:48 +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
Jakub Janousek
23c6b5b07d drivers/spi: Add support for FPGA iCE40 bitstream loading.
Tested on ICE-V-Wireless board.

Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>
2024-04-12 10:19:58 -03:00
Zhe Weng
932c41debb net/nat: Remove unnecessary logic in inbound logic
Finish https://github.com/apache/nuttx/pull/12116#discussion_r1560880897

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-12 14:39:01 +02:00
Zhe Weng
17584eaa4f net/nat: Rename struct ipv*_nat_entry to ipv*_nat_entry_t
I found `struct ipv*_nat_entry` is missing `_s` suffix, but the name is too long in some cases, so maybe `ipv*_nat_entry_t` could be better.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-12 14:39:01 +02:00
jianglianfang
62a4799409 video/vnc: add vnc_fb_register
To optimize the initialization of vnc, change it to vnc_fb_register.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-04-12 17:42:49 +08:00
hujun5
82acf6e6a7 irq: All irq_cpu_locked is called in the critical_section, and the parameter is the current cpu id.
so it must return false, We can safely delete.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-12 17:40:23 +08:00
hujun5
1b068b0d4b sched/irq: remove scheduling check in csection
1. The critical section does not prevent task scheduling
2. If the critical section is in sched_lock, there is no need to check,
   scheduling is not going to happen
3. If sched_lock is in the critical section, sched_unlock will also
   trigger scheduling without waiting for the exit of the critical section
4. After exiting the critical section, if there is an interrupt,
   the scheduling will be automatically triggered

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-12 16:15:42 +08:00
Zhe Weng
e543a8086e net: Optimize TCP/UDP port selection
Optimize TCP/UDP port selection, and fix possibly dead loop.

Finish discussion in https://github.com/apache/nuttx/pull/12116#discussion_r1560851977

Note:
Linux also uses EADDRINUSE for failing in finding a portno, according to https://man7.org/linux/man-pages/man2/bind.2.html

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-12 15:46:29 +08:00
dependabot[bot]
b5f4e1a1ae build(deps): bump idna from 3.4 to 3.7 in /Documentation
Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 10:05:14 +08:00
Zhe Weng
4eddf84a76 net/nat: Optimize port selection
And fix possibly dead loop.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-11 22:23:29 +08:00
Zhe Weng
f3b34c84c2 net/nat: Support IPv6 Masquerading (NAT66)
Notes:
1. This version of NAT66 is a stateful one like NAT44, corresponding to Linux's MASQUERADE target of ip6tables.  We can support stateless NAT66 & NPTv6 later by slightly modify the address & port selection logic (maybe just match the rules and skip the entry find).
2. We're using same flag `IFF_NAT` for both NAT44 & NAT66 to make control easier.  Which means, if we enable NAT, both NAT44 & NAT66 will be enabled.  If we don't want one of them, we can just disable that one in Kconfig.
3. Maybe we can accelerate the checksum adjustment by pre-calculate a difference of checksum, and apply it to each packet, instead of calling `net_chksum_adjust` each time.  Just a thought, maybe do it later.
4. IP fragment segments on NAT66 connections are not supported yet.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-11 22:23:29 +08:00
Zhe Weng
676826cb7c net/utils: Add net_ipv6_payload to get IPv6 L4 payload
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-11 22:23:29 +08:00
Zhe Weng
f2ff5cee03 net/nat: Make some IPv4 NAT functions as common
To prepare for future IPv6 NAT functions.
- Rename common ipv4_nat_xxx to nat_xxx
- Move some common definitions into header

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-11 22:23:29 +08:00
Inochi Amaoto
412d2ce113 arch/riscv: add T-HEAD CSR mapping
Add T-HEAD CSR mapping file.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-04-11 22:20:39 +08:00
chao an
23e9489345 sched/mqueue: correct list parameter
1. correct list parameter
2. move global data to bss

Signed-off-by: chao an <anchao@lixiang.com>
2024-04-11 22:19:34 +08:00
vela-mib
9a4afbcb62 add drivertest test cases on sim for CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-04-11 10:33:15 -03:00
Yanfeng Liu
24df2cc177 mm/map: minor reformating
This is for easier grep searching.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-11 14:15:57 +08:00
hujun5
638716504d fdcheck: update fdcheck impl
1 store fd in the high position
2 removing the pid information , as the tag information is sufficient.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-11 10:45:44 +08:00
hujun5
6c24ff95d4 timer: use spin_lock_irqsave protect g_alloctimers
all other g_alloctimers being protect by spin_lock_irqsave

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-11 10:45:34 +08:00
Inochi Amaoto
bae686e127 arch/riscv: force using encoding macro for CSR access
Using CSR name depends on compiler support heavily, but CSR
encoding does not have this problem. It also make it easy to
add new CSR support even if the compiler does not support.

Unify CSR access by using the CSR encoding macro.

Signed-off-by: Inochi Amaoto <inochiama@outlook.com>
2024-04-11 10:43:48 +08:00
Emmanuel Ferdman
4847587cf2 Documentation: update broken links 2024-04-10 15:17:53 -03:00
wangjianyu3
f0590eeaf0 drivers/power/pm: Fix warning of type cast
Env: sim (Ubuntu 22.04.3 LTS (x86_64 GNU/Linux)), enable PM
```
power/pm/pm_autoupdate.c: In function ‘pm_auto_updatestate’:
power/pm/pm_autoupdate.c:84:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   84 |                      pm_auto_updatestate_cb, (FAR void *)domain, 0);
      |                                              ^
power/pm/pm_autoupdate.c:89:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   89 |           pm_auto_updatestate_cb((FAR void *)domain);
      |                                  ^
```

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-04-10 22:51:28 +08:00
Huang Qi
9e78b235fe riscv: Add more debug related CSR definitions
This patch adds more debug related CSR definitions
to arch/risc-v/include/csr.h.

These definitions are from the RISC-V Debug Specification
Version 1.0 rc1 (https://github.com/riscv/riscv-debug-spec).

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-04-10 21:10:39 +08:00
Omar
01aeeaeac6 ESP32S3 I2S GPIO selection master/slave hase same range for BCLK,WS pin 2024-04-10 15:00:45 +08:00
Omar
4c744f1c0e ESP32S3 configuring gpio pin 19 or 20 ( USB_D+/- ) for any purposes 2024-04-10 15:00:45 +08:00
Omar
b864522b65 ESP32S3 I2S BCLK, WSPIN, DINPIN, DOUTPIN pin range changed to 0 48 2024-04-10 15:00:45 +08:00
vela-mib
9847c6219d add libuv and cmocka test cases with file system on sim and qemu on CI
Signed-off-by: vela-mib <vela-mib@xiaomi.com>
2024-04-10 14:46:53 +08:00