Commit Graph

50875 Commits

Author SHA1 Message Date
Alan Carvalho de Assis
4b67e23049 mcp23008 Initial support 2023-09-08 01:33:12 +08:00
trns1997
153137a258 Add userleds and autoleds to the stm32f411e-disco board 2023-09-08 01:30:54 +08:00
yintao
23dee24a7d nuttx/usrsock: fix rpmsg_usrsock memory leak when stop remote
1 0x826037 in host_memalign sim/posix/sim_hostmemory.c:180
2 0x82665a in host_realloc sim/posix/sim_hostmemory.c:222
3 0x6320b8 in mm_realloc sim/sim_heap.c:261
4 0x63201f in mm_malloc sim/sim_heap.c:193
5 0x632124 in mm_zalloc sim/sim_heap.c:296
6 0x62cbd2 in zalloc umm_heap/umm_zalloc.c:70
7 0x5f3548 in usrsock_rpmsg_ns_bind usrsock/usrsock_rpmsg_server.c:977
8 0x5cdb7a in rptun_ns_bind rptun/rptun.c:604
9 0x760a94 in rpmsg_virtio_ns_callback open-amp/lib/rpmsg/rpmsg_virtio.c:676
10 0x75f958 in rpmsg_virtio_rx_callback open-amp/lib/rpmsg/rpmsg_virtio.c:583
11 0x76b2c6 in virtqueue_notification open-amp/lib/virtio/virtqueue.c:711
12 0x756872 in rproc_virtio_notified open-amp/lib/remoteproc/remoteproc_virtio.c:433
13 0x751d2c in remoteproc_get_notification open-amp/lib/remoteproc/remoteproc.c:1005
14 0x5caa15 in rptun_worker rptun/rptun.c:344
15 0x5cabc7 in rptun_thread rptun/rptun.c:380
16 0x5849ca in nxtask_start task/task_start.c:129
17 0x62fd6a in pre_start sim/sim_initialstate.c:52

Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-08 01:15:26 +08:00
Anner J. Bonilla
987afb1924 pinephone pro: add support for board reset 2023-09-08 01:14:49 +08:00
simbit18
74b4672b76 Fix Kconfig style
Remove spaces from Kconfig
Add comments
2023-09-08 01:13:53 +08:00
Michal Lenc
c2bc3dfb12 samv7: add support for SD card detection from CD/DAT3 line
Some SD card connectors do not have separate card detection pin. In that
case card detection has to be done on CD/DAT3 data line. This means
software (i.e. architecture level driver) has to take care of pin
configuration switching (pin has to be set as data pin in case of
transfer and as interrupt card detection pin when there is no action
on data line).

This commit adds CD/DAT3 line card detection support for SAMv7 MCU.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-09-08 01:13:36 +08:00
dongjiuzhu1
ee598b3e21 libc/mallopt: implement dummy mallopt
refs:
https://man.freebsd.org/cgi/man.cgi?query=malloc&apropos=0&sektion=3&manpath=SunOS+4.1.3&format=html

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-07 23:11:10 +08:00
dongjiuzhu1
5e3c1985e7 libc/fopen: support fopen with mode 'm'
refs:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html
This is a fake implementation, in order for fopen to succeed,
Because the complete mmap mapping the entire file will waste a lot of
memory.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-07 23:05:38 +08:00
haopengxiang
3a0e713f2e dirvers/mtd/dhara: add dhara folder in gitignore
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-09-07 23:05:11 +08:00
shizhenghui
6d2ece0c25 libsrc: update version in CMakeLists.txt
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2023-09-07 22:15:48 +08:00
shizhenghui
036127128a libsrc: support for multiple sinc converters
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2023-09-07 22:15:48 +08:00
shizhenghui
6e9cf9af15 libsrc: update version number
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2023-09-07 22:15:48 +08:00
shizhenghui
a9242c5d68 libsrc: fix build warning
CC:  umm_heap/umm_brkaddr.c libsamplerate/src/samplerate.c: In function ‘src_float_to_int_array’:
libsamplerate/src/samplerate.c:468:5: warning: "CPU_CLIPS_POSITIVE" is not defined, evaluates to 0 [-Wundef]
  468 | #if CPU_CLIPS_POSITIVE == 0
      |     ^~~~~~~~~~~~~~~~~~
libsamplerate/src/samplerate.c:474:5: warning: "CPU_CLIPS_NEGATIVE" is not defined, evaluates to 0 [-Wundef]
  474 | #if CPU_CLIPS_NEGATIVE == 0
      |     ^~~~~~~~~~~~~~~~~~

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2023-09-07 22:15:48 +08:00
SPRESENSE
d4fbd7a190 libs/libc: Fix a fatal bug in fread
Fix a bug the destination buffer is not updated.
It is caused by the following commit.
commit 5d8d5bfd73
2023-09-07 17:44:31 +08:00
dongjiuzhu1
bfb0095ec7 driver/syslog: reset syslog buffer when syslog buffer include invalid data
When the machine is cold started, the psram area where the syslog
buffer is located contains some random values, so it will cause
loss of valid log.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-07 11:42:24 +03:00
yinshengkai
7115b6adad libm: ignore git submodules
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-07 11:27:00 +03:00
yinshengkai
3339e4fbc3 drivers/note: fix sched_note declaration inconsistency
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-07 11:25:26 +03:00
yanxiaowei
5c780f6697 sim/framebuffer: fix memory leak
LeakSanitizer: detected memory leaks in XStringListToTextProperty

Signed-off-by: yanxiaowei <yanxiaowei@xiaomi.com>
2023-09-07 11:21:58 +03:00
cuiziwei
ba73272f67 nuttx/sim:add up_irq_enbale function.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-09-06 21:42:42 +03:00
Jukka Laitinen
b750f94896 arch/risc-v/src/mpfs: Generate an unique locally administrated MAC address
Add a function to read PolarFire's serial number from system controller, and use the first five digits as device's mac address

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-09-07 00:53:00 +08:00
Jari Nippula
ef18d2b599 arch/riscv/src/mpfs/mpfs_ethernet.c: discard err rxframe in int work
Workaround to avoid deadlock situation: The RX shall not try to wait for complete
frame in case there is RX errors detected.

In case mpfs_receive is called, it keeps waiting for complete frame and
also keeps the net_lock locked. In the mean while, the TX may run out of free
descriptors, but can not get net_lock mutex lock to be able to release used
descriptors. If there are no free TX descs it disables RX interrupts because
it may require to send response to the received frame.
So, TX side keeps RX interrupts disabled due to lack of free descriptors and
RX blocks TX to release those descs by stubbornly waiting for complete frame.
2023-09-07 00:53:00 +08:00
Petro Karashchenko
47627c5fbd sched/misc: optimize collect_deadlock implementation
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-09-07 00:50:30 +08:00
Xu Xingliang
a2df576ecf kasan: add option to disable read/write checks
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2023-09-07 00:41:43 +08:00
yintao
cb105192c7 nuttx/sim: Sim_rptun support configuring whether the master will automatically boot slave
Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-06 17:05:55 +03:00
dongjiuzhu1
df98320c2c libs/libc: support unlock version for fread/fwrite/fputc/fgetc/...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-06 15:08:24 +03:00
dongjiuzhu1
e8842f59da libs/libc: remove unnecessary flockfile to improve performance
modify lib_wrflush/lib_rdflush/lib_ffulsh to unlocked version

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-09-06 15:08:24 +03:00
zhangyuan21
aa9f15d635 arch_alarm: change tick to g_current_tick
When the system starts up, the hw count may not start counting from 0,
which can cause the processing time of the first oneshot handler to be
too long. Therefore, the current tick value should be set based on the
hw count during initialization.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-06 17:28:26 +08:00
Eero Nurkkala
0152b031a4 risc-v/mpfs: enhance rpmsg throughput
RPMSG is associated with the use of HPWORK / LPWORK queues.
After sending a message to the remote end (Linux), the system
waits for an ack before proceeding. Unfortunately this may
take sometimes more time than one would expect. Ack waiting is
also unnecessary: nothing is done with that information. Even
worse, the net_lock() is also held during the blocked time so
it blocks other network stacks that are unrelated to this.

Also reorganize the mpfs_opensbi_*.S so that the trap
handler is easily relocated in the linker .ld file without
the need to relocate the utils.S. This makes it easier to
separate the files into own segments. The trap file should be
located in the zero device.

Moreover, provide support for simultaneous ACK and message
present handling capabilities in both directions. There are
times when both bits are set but only other is being handled.

In the end, the maximum throughput of the RPMSG bus increases
easily 10-20% or even more.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2023-09-06 14:32:11 +08:00
Seppo Hirvela
67ad63c7a4 risc-v/mpfs: ihc: fix to work with the latest NuttX OpenAMP version 2023-09-06 14:32:11 +08:00
Jani Paalijarvi
a1aebb7a64 risc-v/mpfs: ihc: Minor fixes
Remove unnecessary VQID shifting (16 -> 0).
Give an error if RPTUN init fails.
2023-09-06 14:32:11 +08:00
Jani Paalijarvi
cc5e8222b3 risc-v/mpfs: ihc: Increase RPMSG buffer size
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2023-09-06 14:32:11 +08:00
Jani Paalijarvi
3bd4bd6196 risc-v/mpfs: ihc: Make Vring addresses configurable 2023-09-06 14:32:11 +08:00
Jani Paalijarvi
00cb72bc09 risc-v/mpfs: ihc: Make IHC HSS workaround configurable 2023-09-06 14:32:11 +08:00
likun17
7d7345a620 sensor/bmp180.c:provides work in character device mode and UORB communication mode.
Use the macro CONFIG_SENSORS_BMP180_UORB to enable the uorb feature.

Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-06 08:02:52 +02:00
Philippe Leduc
87cec56154 Handle GPIO IRQs
Add board buttons
2023-09-06 12:30:35 +08:00
Philippe Leduc
5b7c948aef Add GPIO
Add userleds
2023-09-06 12:30:35 +08:00
Jukka Laitinen
7ec3cad5af drivers/timers/pcf85263.c: Fix compilation
Add the missing semicolons

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-09-06 12:20:57 +08:00
Petro Karashchenko
12ea47b10f arch/xtensa/esp32s3: add UART2 support
This commits adds support of UART2 for EPS32S3 and fixes pin mode
assignment for iomux mode

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-09-06 02:40:49 +08:00
zhangyuan21
0efd4d0e12 usbdev: Split usbdev descriptor information
The class device only handles descriptor information specific to the class,
and shared descriptor information is passed through parameters and
handled by the composite driver.

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-06 02:29:32 +08:00
likun17
b5bccbb70e sensor:bmi160.c:Fix the missing items caused by resolving merge conflicts after bmi160 cherry-pick submission. This cherry-pick missing CI check did not detect it.
Signed-off-by: likun17 <likun17@xiaomi.com>
2023-09-06 02:24:35 +08:00
Stuart Ianna
99d630b18d arch/risc-v/litex/litex_sdio: Address race condition in eventwait.
Wraps litex_eventwait in a critical section to handle the case that an event can occur before it's waited on.
2023-09-06 02:23:57 +08:00
Xiang Xiao
a9efeeeebc drivers/clk: Change CLK_SET_RATE_NO_REPARENT to CLK_MUX_SET_RATE_NO_REPARENT
since only mux clk use this flag

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-05 18:05:50 +03:00
Tiago Medicci Serrano
6d724b5003 Documentation: Document I2S support on ESP32-S3-DevKitC-1 board
Add documentation about the I2S peripheral support on ESP32-S3. The
I2S/audio support is demonstrated on the ESP32-S3-DevKitC-1 board.
2023-09-05 13:33:05 +08:00
Tiago Medicci Serrano
c92b3a90ac esp32s3-devkit: Provide audio support for ESP32-S3-DevKitC-1
Provide initial support for audio through the I2S peripheral to the
CS4344 audio codec on ESP32-S3-DevKitC-1 board.

Please check documentation for usage examples.
2023-09-05 13:33:05 +08:00
Tiago Medicci Serrano
8a51534903 esp32s3/i2s: Check compatibility of the current master clock set
The master clock frequency should be multiple of the sample rate
and bit clock at the same time. Then, check if the current master
clock satisfies such a condition and set it accordingly otherwise.
2023-09-05 13:33:05 +08:00
Tiago Medicci Serrano
f1b459347b esp32s3/i2s: Add interface to stop the I2S streams
In order to gracefully stop the I2S stream, add an interface to set
a `streaming` status variable that sets the `AUDIO_APB_FINAL` flag
that will be handled by the upper layers of the audio subsystem.
2023-09-05 13:33:05 +08:00
Alan Carvalho de Assis
5065849ab6 esp32s3/i2s: Add initial support to I2S peripheral
The I2S peripherals are now supported for both receiving and
transmitting controllers.
2023-09-05 13:33:05 +08:00
Tiago Medicci Serrano
45d17551b3 esp32s3/dma: Set the DMA descriptor according to RX or TX operation
According to RX/TX operation, the DMA descriptors (inlink/outlink)
should be set differently. When setting the inlink, the `suc_eof`
field must be cleared by software (it will be set by hardware when
a packet is received). Similarly, the `length` field will be set
by hardware a packet is received.
2023-09-05 13:33:05 +08:00
Tiago Medicci Serrano
e7eeb99139 esp32s3/dma: Define macros on header files to be used by the system
Define macros used to access the registers of the GDMA channels
according to the selected channel in the header file, enabling them
to be used by other drivers.
2023-09-05 13:33:05 +08:00
Tiago Medicci Serrano
a513770fcb esp32s3/dma: Split the setup and load of the DMA descriptors
By splitting into two different functions the setup of the DMA
descriptors and the action of loading it to the GDMA outlink
register, it enables us to "cache" DMA descriptors ready to be send
and, then, just load them whenever we are able to actually send it.
2023-09-05 13:33:05 +08:00