Commit Graph

20237 Commits

Author SHA1 Message Date
Gustavo Henrique Nihei
a4c9da9280 xtensa/esp32: Fix ESP32_SPIRAM_USER_HEAP under Protected mode
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-18 17:41:09 +08:00
Gustavo Henrique Nihei
e451b43798 xtensa/esp32: Improve Wi-Fi driver to support MM_KERNEL_HEAP
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-18 17:41:09 +08:00
Gustavo Henrique Nihei
705e29fb27 xtensa/esp32: Support allocation of userspace heap into External RAM
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-01-18 17:41:09 +08:00
lilei19
fc176addeb add holder for mutex
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-01-18 17:40:58 +08:00
Zhe Weng
1cf3147626 net/netdev: Avoid hardcoded guardsize when using d_iob
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-18 14:41:07 +08:00
Dong Heng
f35f32d4ee xtensa/esp32: Fix SPI bugs
1. Fix SPI master/slave clock init/deinit error
2. Fix SPI slave RX process error
2023-01-18 12:23:08 +08:00
Ville Juven
201a55c7cb arm/addrenv_utils: Don't touch L1 mappings in addrenv_destroy()
This is unnecessary, the address environment is getting wiped anyway,
there is no need to remove the L1 references because they will get
wiped when the page directory is changed
2023-01-18 11:02:19 +08:00
Ville Juven
58b5a0412e riscv/addrenv_shm: Add missing sanity check to up_shmdt()
A missing sanity check, make sure the last level page table actually exists
before trying to clear entries from it.
2023-01-18 02:45:04 +08:00
anjiahao
bc30b294aa mm:add heap args to mm_malloc_size
use malloc_size inside of where used mm_malloc_size

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-17 21:57:37 +08:00
dongjiuzhu1
8101978765 arch/sim: fix compile break when using mallinfo_task with custom mm manager
/usr/bin/ld: nuttx.rel: in function `mallinfo_task':
nuttx/mm/umm_heap/umm_mallinfo.c:67: undefined reference to `mm_mallinfo_task'

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-17 16:48:30 +08:00
luoyong1
a32124879d arch/arm/src/armv7-a/r: fix kconfig error of l2 cache latency
fix the error of the config name and set latency config param bool to int

Signed-off-by: luoyong1 <luoyong1@xiaomi.com>
2023-01-17 12:45:42 +09:00
Xiang Xiao
62c5afe655 Fix warning in file included from chip/sam_clockconfig.c:34:
chip/sam_clockconfig.c: In function 'sam_usbclockconfig':
Error: /github/workspace/sources/nuttx/arch/arm/src/common/arm_internal.h:135:51: error: 'regval' is used uninitialized [-Werror=uninitialized]
  135 | #define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
      |                                                   ^
chip/sam_clockconfig.c:422:12: note: 'regval' was declared here
  422 |   uint32_t regval;
      |            ^~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 18:59:44 -03:00
ligd
fedad91b0d sim/mem: don't let siwtch out when operated the host mem
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:18:03 +08:00
ligd
c08cc01c9d sim/oneshot: don't need sleep_until when open CONFIG_SIM_WALLTIME_SIGNAL
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:18:03 +08:00
Xiang Xiao
f64da13e9b libxx: Add CXX_STANDARD to select -std=c++??
and default to "c++17"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 15:41:57 +02:00
TimJTi
6b4da4ad6e Ensure SFR CKTRIM register correctly set, SAMA5D2/D3 only 2023-01-16 21:40:00 +08:00
Dong Heng
118222ba46 xtensa/esp32: Partition device supports encryption mode 2023-01-16 09:55:44 -03:00
dongjiuzhu1
7cd325f3be mm/mm_heap: remove kasan in MM_ADD_BACKTRACE
do simple copy to instead of memset and memcpy operation because
they have been instrumented, if you access the posion area,
the system will crash.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-16 20:32:17 +08:00
chao an
415a09115d boards/sim/windows: enable custom options
1. boards/sim: enable child status
2. boards/sim/windows: enable custom options
3. sim/windows: enable hostfs

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-16 20:30:39 +08:00
zhangyuan21
806a2a8b8d arch/armv7-ar: flush dcache when addr is not aligned with cache line
When invalidate address is not aligned with cache line,
must align address and flush the cache line.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-16 16:14:32 +08:00
zhangyuan21
4bb155db64 arch/arm: add barrier instruction for cache ops
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-16 16:14:32 +08:00
Xiang Xiao
f783f5c384 arch/arm: Fix typo error in cp15_cacheops.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 16:14:32 +08:00
Xiang Xiao
1ea9db4ebe Fix error: implicit declaration of function 'cp15_invalidate_icache'; did you mean 'cp15_invalidate_dcache'?
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-16 16:14:32 +08:00
chenrun1
c61195bcc9 arch/armv7-a & armv7-r:Add invalidate icache behavior
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-01-16 16:14:32 +08:00
ligd
7e4c5d3daa armv7a/r: cache function should depends on CONFIG_ARCH_XCACHE
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-16 16:14:32 +08:00
Julian Oes
22fa59074f stm32h7: add SMPS PWR option for STM32H7X7
The dual core STM32H747 / STM32H757 there is an additional option to
select SMPS rather than LDO as the power selection.

This commit adds this option to the STM32H747 config and the
stm32h7x7xx source.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-16 13:31:23 +08:00
zhangyuan21
fc623949a3 arch/arm: move hard code macro to kconfig
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-16 13:31:04 +08:00
luoyong1
6975bbb38d arch/arm/src: add pl310 l2cache's kconfig for latency
Signed-off-by: luoyong1 <luoyong1@xiaomi.com>
2023-01-16 13:31:04 +08:00
Alan Carvalho de Assis
97402f9121 esp32: Fix QEnconder reset position and small typo
The PCNT RST bit needs to be set to zeroing the counter and then
this same bit needs to be cleared to returning counting.
2023-01-16 09:41:46 +08:00
Jukka Laitinen
f9c8b4015f Revert "arch: Don't free the context if the reference doesn't equal zero"
struct stm32_i2c_inst_s instance is allocated on every call to
stm32_i2cbus_initialize, and that instance is supposed to be deleted on every
call to stm32_i2cbus_uninitialize.

The "refs" counter just keeps track on when the last one is deleted, and
everything is unregisterd/disabled.

This reverts commit 8098c80338.
2023-01-15 19:52:05 +08:00
ssssenai
077ad5b45f arch: xtensa/esp32: Add esp32_himem_chardev.c
Summary:
- It is applicable to esp32 products and uses the himem part
  of 8M psram by creating character devices.

Impact:
- None

Testing:
- Use esp32-wrover series products for more than 1000 functional verifications.
2023-01-14 14:07:46 +08:00
Janne Rosberg
246a677045 sama5/sam_flexcom_spi: enable DMA support 2023-01-14 13:40:14 +08:00
Janne Rosberg
f6d164bf9d sama5/dmac: add defines for ATSAMA5D2
This allows xdma to be used on SAMA5D2x chips
2023-01-14 13:40:14 +08:00
ptr_b
890f9ad2ed arch/sim: add arch/math.h
To avoid introducing __GLIBC__ symbol which may affect others

Signed-off-by: ptr_b <bijunda1@xiaomi.com>
2023-01-13 23:09:47 +08:00
W-Mai
bcb0abc05d sim/posix/sim_linuxspi.c: fix select not work and incorrect behaviour
Fixed missing `SPI_SELECT` method and incorrect sending behavior in sim_linuxspi

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-01-13 15:32:13 +08:00
Petro Karashchenko
45ed6f657c arch/arm/cxd56xx: do not clear enabled callback event on card insertion
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-13 12:18:36 +08:00
dongjiuzhu1
cf987238c0 sim/hci: add depends on config for SIM_HCISOCKET to fix compile break
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-13 02:21:34 +08:00
Jukka Laitinen
70de321de3 arch/Kconfig: remove virtual memory allocator dependency from MM_SHM
The dependency should be vice versa; the MM_SHM should depend on the
existence of the virtual memory range allocator.

Create a new CONFIG flag CONFIG_ARCH_VMA_MAPPING, which will define that
there is a virtual memory range allocator. Make MM_SHM select that flag

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-13 02:20:13 +08:00
Lucas Saavedra Vaz
674b480198 arch/xtensa/esp32s2: Add initial support for touch pad polling 2023-01-12 22:23:42 +08:00
Lucas Saavedra Vaz
749d0dfe84 arch/xtensa/esp32s2: Add RTC GPIOs configuration functions 2023-01-12 22:23:42 +08:00
Lucas Saavedra Vaz
cdd0787b54 arch/xtensa/esp32: Fix typo and check PU/PD registers 2023-01-12 22:23:42 +08:00
Lucas Saavedra Vaz
3dad6b273e arch/xtensa/esp32s2: Add missing SENS and RTCCNTL registers 2023-01-12 22:23:42 +08:00
xinbingnan
383458c64e sim/Kconfig: move some i2c,spi configs from board to arch
Move `SIM_I2CBUS_ID` and `SIM_SPIDEV_NAME` from board to arch.
This allows you not to rely on board configuration.

Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2023-01-11 17:28:43 +08:00
Lucas Saavedra Vaz
2b7d8981e2 arch/xtensa/esp32s3: Add initial support for touch pad polling 2023-01-11 02:00:41 +08:00
Lucas Saavedra Vaz
24995f6918 arch/xtensa/esp32s3: Add RTC GPIOs configuration functions 2023-01-11 02:00:41 +08:00
Lucas Saavedra Vaz
c8dd4b068d arch/xtensa/esp32s3: Add missing registers and definitions 2023-01-11 02:00:41 +08:00
Dong Heng
07342f7957 xtensa/esp32: SPI support to configure as R/W/RW mode 2023-01-11 01:54:36 +08:00
raiden00pl
88dd705d27 stm32/stm32f7 CANv1: protect TX buffer during CAN error frame generation
Follow up to eb240e0 (PR #8060)
2023-01-11 01:53:49 +08:00
chao an
eef818e51f risc-v/esp32c3: correct receive buffer size
1. correct receive buffer size, d_len should keep the l2 header size
2. fix race condition issue of de/enqueue rx queue

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-10 11:28:06 -03:00
Carlos Sanchez
eb240e014c stm32: protect TX buffer during CAN error frame generation. 2023-01-10 13:33:35 +08:00
Petro Karashchenko
5f92c62874 boards/cxd56xx/spresense: add fs automount driver for SD Card
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-10 10:39:23 +09:00
Carlos Sanchez
78248183aa s32k1xx: reserve MSG_DATA extra space only when needed by config. 2023-01-09 21:06:56 +02:00
Carlos Sanchez
3c6d45fa99 s32k1xx: avoid buffer overflow when CAN time is used for non-FD CAN.
s32k1xx: fix initialization of MAXMB field in MCR.
2023-01-09 21:06:56 +02:00
Dong Heng
67ccee2c4f xtensa/esp32: ESP32 SPI Flash encryption supports 16-bytes align writing 2023-01-10 01:10:10 +08:00
Sergey Nikitenko
e0f99d93ac stm32wb: add i2c driver 2023-01-09 09:27:17 +08:00
chenwen@espressif.com
eed2cce3f2 xtensa/esp32: Optimize WLAN device buffer 2023-01-07 13:46:37 +08:00
chenwen@espressif.com
933d1a0a80 xtensa/esp32: Add Wi-Fi softap event 2023-01-06 12:25:36 -03:00
Dong Heng
f137a7b552 xtensa/esp32: Fix macro "CONFIG_NETDEV_IOCTL" control range error 2023-01-06 20:40:53 +08:00
Dong Heng
7097cfd000 xtensa/esp32: Add option to enable ETH PHY reset pin 2023-01-06 20:40:53 +08:00
Lee Lup Yuen
6d70b91a55 arm64/a64: Fix PIO Interrupt
The current implementation of PIO Interrupt for Allwinner A64 is incomplete. This PR fixes the implementation of PIO Interrupt for all supported PIO Ports (PB, PG and PH).

### Modified Files

`arch/arm64/src/a64/a64_pio.c`, `a64_pio.h`: Add implementation of PIO Interrupt

`arch/arm64/include/a64/irq.h`: Add IRQ for PIO Port PH

`arch/arm64/src/a64/hardware/a64_pio.h`: Fix addresses of PIO Interrupt Registers
2023-01-06 13:43:44 +08:00
yinshengkai
4752dcd12a arch/stm32: Initialize up_perf after system boot
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-06 13:32:12 +08:00
anjiahao
172d467c26 arch:add faultmask register operation to armv7-m & armv8-m
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-05 23:17:43 +02:00
anjiahao
c02fea36d8 arch:change tcbinfo regs num
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-05 23:36:12 +08:00
gaojiawei
1486600d7d sim: Fix make tool doesn't rebuild dependencies of the libboard target
Signed-off-by: gaojiawei <gaojiawei@xiaomi.com>
2023-01-05 22:27:00 +08:00
Xiang Xiao
b0a0ba3ad7 fs: Move mmap callback before truncate in [file|mountpt]_operations
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Xiang Xiao
779a610ca3 Remove the unnecessary NULL fields in global instance definition of file_operations
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:32:13 +02:00
zouboan
7e81dce71c arm64/a64: add driver for Allwinner A64 I2C bus
arm64/a64: add driver for Allwinner A64 I2C bus

arm64/a64: add driver for Allwinner A64 I2C bus

arm64/a64: add driver for Allwinner A64 I2C bus
2023-01-03 01:45:56 +08:00
Jukka Laitinen
f33dc4df3f Change FIOC_MMAP into file operation call
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e Add ftruncate into file operation calls
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Xiang Xiao
d3872e0479 arch/esp32c3: Fix the compiler error in esp32c3_spi.c
which is made by:
commit 87a1f69a3c
Author: Alan Carvalho de Assis <acassis@gmail.com>
Date:   Fri Dec 16 15:23:39 2022 -0300

    Modify the IRQ APIs to be compatible with ESP32/S2/S3

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-31 14:57:47 +02:00
Alan Carvalho de Assis
87a1f69a3c Modify the IRQ APIs to be compatible with ESP32/S2/S3 2022-12-31 12:47:41 +08:00
Peter van der Perk
75631e6169 S32K3XX Progmem fixes and size config 2022-12-29 22:12:19 +02:00
Alan Carvalho de Assis
1b58542dd4 esp32c3: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
Alan Carvalho de Assis
e3748be0e5 esp32s3: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
Alan Carvalho de Assis
e67b968f15 esp32s2: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
Alan Carvalho de Assis
1ab8c1ea01 esp32: Clear the timer interrupt to avoid losing the next one 2022-12-28 09:45:29 +08:00
zhangyuan21
f31ea8af7f arch: add volatile for regs in up_dump_register function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-27 13:34:03 +08:00
Lee Lup Yuen
17639af0a8 arm64/pinephone: Add driver for LCD Panel (Xingbangda XBD599)
This PR adds the driver for Xingbangda XBD599 LCD Panel (based on Sitronix ST7703 LCD Controller) on PINE64 PinePhone. This PR also includes:

- The driver for X-Powers AXP803 Power Mgmt IC, which calls our driver for Allwinner A64's Reduced Serial Bus. The PMIC Driver is needed to power on the MIPI DSI Interface for the LCD Panel.

- A simple Display Driver that renders a Test Pattern on the LCD Display at startup. It calls our Allwinner A64 drivers for Display Engine, Timing Controller TCON0 and MIPI Display Serial Interface.

The NuttX Frame Buffer Driver will be implemented in the next PR.

`arch/arm64/src/a64/a64_de.c`, `a64_de.h`: Changed the Frame Buffer pointer to `const` for Allwinner A64 Display Engine

`arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for PWM, for controlling the PWM Backlight

`boards/arm64/a64/pinephone/src/pinephone_bringup.c`: Call `fb_register()` to start the Display Driver at startup

`boards/arm64/a64/pinephone/src/Makefile`: Added LCD Driver, PMIC Driver and Display Driver to Makefile

`boards/arm64/a64/pinephone/Kconfig`: Added the Kconfig option for "PINE64 PinePhone > LCD Display" (`CONFIG_PINEPHONE_LCD`) which enables the LCD Driver, PMIC Driver and Display Driver

`boards/arm64/a64/pinephone/src/pinephone_lcd.c`, `pinephone_lcd.h`: Driver for Xingbangda XBD599 LCD Panel

`boards/arm64/a64/pinephone/src/pinephone_pmic.c`, `pinephone_pmic.h`: Driver for X-Powers AXP803 Power Mgmt IC

`boards/arm64/a64/pinephone/src/pinephone_display.c`: Simple Display Driver that renders a Test Pattern in `up_fbinitialize()`

`boards/arm64/a64/pinephone/configs/lcd/defconfig`: New PinePhone Board Configuration `pinephone:lcd` that enables the LCD Driver (`CONFIG_PINEPHONE_LCD`)

`platforms/arm/a64/boards/pinephone/index.rst`: Added PinePhone Board Configuration `pinephone:lcd` that enables the LCD Driver
2022-12-27 11:44:17 +08:00
Xiang Xiao
b9d7d00943 arch: Remove the unused arch color function variant
up_check_tcbstack_remain, up_check_stack, up_check_stack_remain and up_check_intstack_remain

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 22:40:52 +02:00
Masayuki Ishikawa
2f80a05eae arch: qemu-rv: Fix qemu_rv_mtimer_interrupt() for BUILD_KERNEL
Summary:
- I noticed that rv-virt:ksmp64 sometimes stops during boot.
- Finally, I found that it posts the Supervisor Software Interrupt
  before the OS finishes hardware initialization.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with QEMU-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-12-24 11:25:39 -03:00
zhangyuan21
45394eb6dc arch: save user context in assert common code
This is the work continue with #7875

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-24 13:02:56 +08:00
Peter van der Perk
aac9eb57e8 S32K3XX Progmem dataflash with littlefs support 2022-12-24 12:03:56 +08:00
Lee Lup Yuen
c8cf27e848 arm64/a64: Add driver for Reduced Serial Bus
This PR adds the driver for Reduced Serial Bus (RSB) on Allwinner A64 SoC. The RSB Driver will be called by the upcoming Power Mgmt IC Driver for PINE64 PinePhone, to power on the LCD Display.

`arch/arm64/src/a64/Kconfig`: Added the Kconfig option for "A64 Peripheral Selection > RSB" (`CONFIG_A64_RSB`), which enables the RSB Driver

`arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for RSB

`arch/arm64/src/a64/Make.defs`: Added the RSB Driver to the Makefile

`arch/arm64/src/a64/a64_de.c`: Increase PLL Timeout for Allwinner A64 Display Engine

`boards/arm64/a64/pinephone/configs/nsh/defconfig`: Set PinePhone Board Config `CONFIG_BOARD_LOOPSPERMSEC` to the value computed by `calib_udelay`

`arch/arm64/src/a64/a64_rsb.c`, `a64_rsb.h`: RSB Driver for Allwinner A64

`platforms/arm/a64/boards/pinephone/index.rst`: Added RSB as supported peripheral for PinePhone
2022-12-24 12:01:46 +08:00
Ville Juven
5fb3a960f5 riscv/addrenv: Test that satp contents make sense
Check that satp (the page directory root) is not 0, which means it has
not been set.
2022-12-23 10:47:04 +08:00
rajvinder kaur
3fd10fd504 s32k1xx\Kconfig: Add config option to enable UART invert setting. 2022-12-23 10:46:27 +08:00
Peter van der Perk
371f81d157 S32K3XX FlexCAN kconfig fix to work in conjunction with EMAC ioctl 2022-12-23 00:32:59 +08:00
Peter van der Perk
7f3cd2d3e8 S32K3XX EMAC MII PHY implementation 2022-12-23 00:32:59 +08:00
Peter van der Perk
7c8f3b4916 LPC17_40 CAN driver SocketCAN enforce TX fifo behaviour
Apply suggestions from code review

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-22 11:55:59 +08:00
TimJTi
e1b8c02f96 Add SAMA5D2 MCAN support
Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update arch/arm/src/sama5/sam_mcan.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 14:51:57 -03:00
ligd
18beaaa480 sim: remove unused variable in sim_saveusercontext()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 17:45:32 +08:00
ligd
ec191d05b6 sim/looper: close interrupt when looper run
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 16:59:56 +09:00
ligd
5744c62443 sim: set timer irq as real timer
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 16:59:56 +09:00
Lee Lup Yuen
64a54d2dfd arm64/a64: Add driver for Display Engine
This PR adds the driver for Display Engine 2.0 on Allwinner A64 SoC. The Display Engine Driver will be called by the upcoming LCD Driver for PINE64 PinePhone.

`arch/arm64/src/a64/Kconfig`: Added the Kconfig option for "A64 Peripheral Selection > DE" (`CONFIG_A64_DE`), which enables the Display Engine Driver

`arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for Display Engine

`arch/arm64/src/a64/Make.defs`: Added the Display Engine Driver to the Makefile

`boards/arm64/a64/pinephone/configs/nsh/defconfig`: Removed Scheduler Debug Info (`CONFIG_DEBUG_SCHED_INFO`) from the PinePhone Board Config, because it garbles the Console Output.

`arch/arm64/src/a64/a64_de.c`, `a64_de.h`: Display Engine Driver for Allwinner A64

`platforms/arm/a64/boards/pinephone/index.rst`: Added Display Engine as supported peripheral for PinePhone
2022-12-21 13:17:34 +08:00
Petro Karashchenko
3e36f40130 compiler.h: rename printflike to printf_like
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 10:56:45 +08:00
Petro Karashchenko
b107e4f417 nuttx: unify MIN, MAX and ABS macro definition across the code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 09:31:28 +08:00
Xiang Xiao
fd0d6a9bf5 compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
align with other macro naming style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:19 +02:00
TimJTi
bc9b476d55 Update sam_mcan.c 2022-12-20 19:49:13 -03:00
ligd
886df37569 sim/fb: remove the lpwork in fb & lcd, merge to looper task
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-21 01:43:37 +08:00
zouboan
60c0184b76 A64/irq.h: Add irq definition of Allwinner A64 interrupts 2022-12-20 23:34:23 +08:00
ligd
2dbfd8e798 sim_uart: fix printf error when use irq mode
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 18:01:54 +08:00
dongjiuzhu1
eb102a668f sim/uart: check if txbuffer is not full before uart write
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 18:01:54 +08:00
David Sidrane
4fa163ade7 s32k3xx:EDMA fix git count 2022-12-20 18:01:21 +08:00
Peter Bee
9f537d7a3f sim/video: fix hang when user temporarily blocks
host_set_fmt should not return error when EBUSY

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-20 17:00:44 +08:00
Peter Bee
a897fe3005 sim/video: rename dq_buf to dqbuf
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-20 17:00:44 +08:00
David Sidrane
d33475d2d4 s32k3xx:Serial add DMA 2022-12-20 13:28:54 +08:00
ligd
f2de1ce930 sim/alsa: don't let siwtch out when open alsa mixer
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 13:28:19 +08:00
ligd
c74627cbec sim/head: don't let switch out when do poweroff
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-12-20 13:28:19 +08:00
TimJTi
e6bfaa14ee SAMA5D2 add Flexcom SPI
Flexcom working, DMA not looked at for SAMA5D2

Update sam_flexcom_spi.c

Update sam_flexcom_spi.h

Update sam_config.h

Update hardware/sam_flexcom_spi.h

pkarashchenko reviews

SAMA5 serial and flexcom serial corrections
2022-12-20 12:20:28 +08:00
David Sidrane
e89e7eab8d s32k1xx:serial:Fix selection of RTS to iflow 2022-12-20 01:51:10 +08:00
David Sidrane
033adeced4 imxrt:serial:Fix selection of RTS to iflow 2022-12-20 01:50:57 +08:00
Lee Lup Yuen
377477a948 arm64/a64: Add driver for TCON0
This PR adds the driver for TCON0 (Timing Controller) on Allwinner A64 SoC. The TCON0 Driver will be used by the upcoming Display Driver for PINE64 PinePhone.

`arch/arm64/src/a64/Kconfig`: Added the Kconfig option for "A64 Peripheral Selection > TCON0" (`CONFIG_A64_TCON0`), which enables the TCON0 Driver

`arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for TCON0

`arch/arm64/src/a64/Make.defs`: Added the TCON0 Driver to the Makefile

`arch/arm64/src/a64/a64_tcon0.c`, `a64_tcon0.h`: TCON0 Driver for Allwinner A64

`platforms/arm/a64/boards/pinephone/index.rst`: Added TCON0 as supported peripheral for PinePhone
2022-12-19 20:10:54 +08:00
Peter van der Perk
b5fd0b2381 S32K3XX MR-CANHUBK3 Add protected knsh support 2022-12-19 20:10:34 +08:00
Xiang Xiao
6e66603da5 arch/sim: Disable interrupt in up_interrupt_context for SMP
like other arch to fix the race condition

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 18:03:27 +02:00
Xiang Xiao
07758d9b58 arch/sim: Rename sim_interruptcontext.c to sim_doirq.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 18:03:27 +02:00
Xiang Xiao
1905a02ddf arch/sim: Change up_interrupt_context to inline function like arm
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 18:03:27 +02:00
Xiang Xiao
b6f1be8e03 arch/sim: Move up_nputs to sim_uart.c
and remove arch/sim/src/sim/sim_nputs.c

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 18:03:27 +02:00
Xiang Xiao
86c692f7a7 arch/sim: Move sim_macho_init.c to posix folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 18:03:27 +02:00
Xiang Xiao
87f3681629 arch/sim: Remove arch/sim/src/sim/sim_romgetc.c
since it's no sense to support it on sim platform

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 18:03:27 +02:00
GD32-MCU
659bd495b0 Add i2c driver for gd32f450 MCU 2022-12-17 17:12:26 +08:00
Petro Karashchenko
cc0ee12092 arch/arm/samv7: add ARCH_RAMVECTORS support
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-17 13:57:03 +08:00
Petro Karashchenko
e28e4fd320 arch/arm: fix typos in start files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-17 13:56:17 +08:00
TimJTi
ad33ccfa53 SAMA5 serial and flexcom serial corrections 2022-12-17 01:09:43 +02:00
Xiang Xiao
7e75c475d4 arch/sim: Move '\n' process from tty_send to up_putc
to avoid this special process happen twice

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 01:04:15 +02:00
Xiang Xiao
4b3ea5b052 arch/sim: Don't need check isconsole in tty_setup and tty_shutdown
since serial framework never call these callbacks in case of console

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-17 01:04:15 +02:00
Xiang Xiao
d5689e070b net/arp: Remove nuttx/net/arp.h
1.move ARPHRD_ETHER to netinet/arp.h
1.move arp_entry_s to net/arp/arp.h
2.move arp_input to nuttx/net/netdev.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:10:59 +02:00
zhangyuan21
453a1a7332 arch: move stack and task dump to common code
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-17 01:59:35 +08:00
Gustavo Henrique Nihei
7114cc2978 risc-v/esp32c3: Revert aes_cypher name change introduced in #6920
"aes_cypher" is a function from NuttX crypto, so better use instead of
defining a new interface in the driver.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-12-16 16:19:47 +02:00
zhangyuan21
632d87ee71 arch: remove up_release_pending function
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2022-12-16 21:29:57 +08:00
Peter van der Perk
19ca5ecbb0 Fix S32K1XX PM which was broken by #7869 2022-12-16 20:37:47 +08:00
Peter Bee
aeed8f5d26 include/nuttx/video: remove validate_buf
Removing validate_buf since it's only locally called in driver

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-16 17:03:35 +08:00
Peter Bee
71c34d6391 sim/video: call validate_buf when set_buf
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-16 17:03:35 +08:00
Lucas Saavedra Vaz
077c790830 arch: Make REG_[GET/SET]_FIELD thread safe for ESP SOCs 2022-12-16 13:32:43 +08:00
David Sidrane
707ac4b8f6 s32k1xx:Apply style changes from code review
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-16 01:06:12 +08:00
David Sidrane
75baa5b932 s32k1xx:LPSPI use DMA 2022-12-16 01:06:12 +08:00
David Sidrane
89f99dceed s32ke3xx:EDMA Usage Clean up 2022-12-15 22:21:32 +08:00
David Sidrane
df4eb4896d s32k3xx:LPSPI register usage cleanup 2022-12-15 22:21:32 +08:00
Petro Karashchenko
949a0d6032 arch/arm: remove FAR from ARM files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-15 11:38:17 +08:00
Petro Karashchenko
e9fe00c573 arch/renesas: remove FAR and apply formatting
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-15 11:38:17 +08:00
Almir Okato
8f3c425067 xtensa/esp32s3: Enable booting from MCUboot bootloader
Add support for booting from MCUboot bootloader on ESP32-S3.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2022-12-15 00:42:13 +08:00
Peter van der Perk
d172d8cd0f S32K FlexCAN don't use a blocking wait in tx avail 2022-12-14 10:45:43 -05:00
Lucas Saavedra Vaz
773e3fad43 arch/xtensa/esp32: Add initial support for touch pad polling 2022-12-14 22:38:10 +08:00
Lucas Saavedra Vaz
b8ef8daef9 arch/xtensa/esp32: Add missing macros to iomux 2022-12-14 22:38:10 +08:00
Lucas Saavedra Vaz
2280b33eea arch/xtensa/esp32: Add functions to get RTC clock 2022-12-14 22:38:10 +08:00
Lucas Saavedra Vaz
f9a9512d3c arch/xtensa/esp32: Fix typo in SENS registers 2022-12-14 22:38:10 +08:00
Lucas Saavedra Vaz
15dadd0099 arch/xtensa/esp32: Remove redundant RTC registers 2022-12-14 22:38:10 +08:00
Lee Lup Yuen
b895207489 arm64/a64: Add driver for MIPI DSI
This PR adds the driver for Allwinner A64's MIPI Display Serial Interface (DSI) and MIPI Display Physical Layer (D-PHY).

This driver will be used by the upcoming Display Driver for PINE64 PinePhone.

- `include/nuttx/crc16.h`: Added 16-bit CRC-CCITT

- `libs/libc/misc/Make.defs`: Added 16-bit CRC-CCITT to Makefile

- `arch/arm64/src/a64/Kconfig`: Added the Kconfig option for "A64 Peripheral Selection > MIPI DSI" (`CONFIG_A64_MIPI_DSI`), which enables the MIPI DSI Driver

- `arch/arm64/src/a64/hardware/a64_memorymap.h`: Added the Base Address for MIPI DSI

- `arch/arm64/src/a64/Make.defs`: Added the MIPI DSI Driver to the Makefile

- `libs/libc/misc/lib_crc16ccitt.c`: Compute 16-bit CRC-CCITT

- `arch/arm64/src/a64/mipi_dsi.c`, `mipi_dsi.h`: Compose MIPI DSI Packets (Long, Short, Short with Parameter)

- `arch/arm64/src/a64/a64_mipi_dsi.c`, `a64_mipi_dsi.h`: MIPI DSI Driver for Allwinner A64

- `arch/arm64/src/a64/a64_mipi_dphy.c`, `a64_mipi_dphy.h`: MIPI D-PHY Driver for Allwinner A64

- `platforms/arm/a64/boards/pinephone/index.rst`: Added MIPI DSI as supported peripheral for PinePhone

Co-Authored-By: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-14 22:37:32 +08:00
David Sidrane
1760057e29 s32k1xx:Apply Style Changes from code review
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-14 21:03:31 +08:00
David Sidrane
592e946bdf 32k1xx:serial:Support GPIO (buffler level) Flow control 2022-12-14 21:03:31 +08:00
David Sidrane
5a948ed3dd 32k1xx:serial fix HW Handshaking 2022-12-14 21:03:31 +08:00
David Sidrane
9bb1226b04 s32k1xx:serial Add EDMA 2022-12-14 21:03:31 +08:00