Commit Graph

5996 Commits

Author SHA1 Message Date
liuhongchao fb37391ea6 drivers/input: enable touch/kbd/mouse for virtio input
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-19 20:08:50 +08:00
meijian 580f7387a1 [driver][bcm43xxx] reset tx_seq of sido-bus when ifdown wlan-if
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 19:56:40 +08:00
Windrow14 5c8adefc67 drivers/mmcsd/Kconfig|mmcsd_sdio.c: check ready without sleep
If per tick is set to 10ms, it will cause nxsig_usleep(1000) in the
sdio driver to sleep for 19ms, which is much longer than the
expected 1ms, resulting in very low write performance. Add option to
reduce CPU hogging by using sched_yield(), though it may also affect
write performance when the CPU is busy.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 c96a33a12f drivers/mmcsd/mmcsd_sdio.c: enable clock before issue CMD0
In mmcsd_cardidentify(), the clock is not enabled before issuing
CMD0, and the clock has been disabled in mmcsd_removed(). It makes
no sense to enable the clock after issuing CMD0, because when CMD0
is issued, it will exit with error due to the clock is not enabled.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 d07e73e684 drivers/mmcsd/mmcsd_sdio.c: show eMMC information after initialization is completed
Prompts for capacity, speed mode and bus width after eMMC
initialization is completed.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 49cbcfb5e6 drivers/mmcsd/mmcsd.h|mmcsd_sdio.c|mmcsd_sdio.h: support MMC high speed SDR mode
According to the eMMC specification, in Backwards Compatibility
with legacy MMC card mode, the frequency of the SD clock must be
0-26 MHZ; in high speed SDR mode, it must be 0-52MHZ. So we should
switch to high speed SDR mode if the clock frequency is higher than
26MHZ.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 08ce36d292 drivers/mmcsd/mmcsd_sdio.c|h: optimize macros for setting EXT_CSD
CMD6 can use these macros to set any writable EXT_CSD field, not
just the bus width, so optimize these macro definitions to make
them general.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
Windrow14 4f7f751d2a drivers/mmcsd/mmcsd_sdio.c: fix unable to switch eMMC device to 4-bit bus width mode
All eMMC devices support 4-bit bus width, so we should mark the
device as supporting 4-bit bus width after detecting that the
device type is eMMC.

Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-08-19 19:52:39 +08:00
cuiziwei 6071102c90 nuttx/note:fix missing the last character when printing custom labels.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 14:04:50 +08:00
jianglianfang db78cc9c0f input: fix goldfish input and lvgl input device name mismatch problem
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-19 14:03:32 +08:00
rongyichang 1676206651 drivers/input: enable touch/kbd/mouse for goldfish event
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2024-08-18 10:54:22 -03:00
liuhongchao 0b541be56a drivers/input: Fix build goldfish events warning
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-18 10:54:22 -03:00
liuhongchao 7495014b17 drivers/input: Add goldfish events driver
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-18 10:54:22 -03:00
rongyichang 8c3872b919 drivers/video: add goldfish gpu fb
In order to better use the Android goldfish emulator,
a GPU FB driver has been added. This allows the goldfish
emulator  side to achieve more flexible display effects,
such as UI skins.

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2024-08-18 10:15:00 +08:00
Saurav Pal daa3168cfb fs/mnemofs: Fix journal log rw issue, read size issue
Fixes the journal log read and write size and overlap issues, along with read return value issue.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-08-17 09:10:04 -03:00
buxiasen 9d396bf89e pm: add debug_assert for cb register/unregister api
avoid the register/unregister API access wrong memory

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-17 14:30:49 +08:00
buxiasen 94e34d0020 clk: fix reg operation not compatible with 64bit
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-17 00:05:18 +08:00
Zhe Weng 504af7a1fa drivers/virtio-net: Support VIRTIO_F_ANY_LAYOUT
According to Virtual I/O Spec:
When using legacy interfaces, transitional drivers which have not negotiated VIRTIO_F_ANY_LAYOUT MUST use a single descriptor for the struct virtio_net_hdr on both transmit and receive, with the network data in the following descriptors.

https://docs.oasis-open.org/virtio/virtio/v1.2/cs01/virtio-v1.2-cs01.html#x1-2280006 (Section 5.1.6.6)

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-08-16 21:15:31 +08:00
chenxiaoyi 538582ede1 convert pointer string to number in base 16
Co-authored-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
Co-authored-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-14 22:36:57 +08:00
zhangshuai39 a1f9a6624e net/tun:Remove unused variables in read & write
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2024-08-13 16:34:14 +08:00
Rodrigo Sim 208b8e084f arm/stm32f401rc-rs485: Add support to BMP280 sensor
Signed-off-by: Rodrigo Sim <rcsim10@gmail.com>
2024-08-11 03:09:14 +08:00
Saurav Pal 0be6dfb552 fs/mnemofs: Refactor path logic, direntry size bug fix, open free bug fix
Refactoring path logic to prevent logic flaws, direntry size bug fix to allow proper direntry traversal, open free bug fix to prevent memory leak after close.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-08-09 09:00:17 +02:00
rongyichang bb29c39d50 drivers/touchscreen: add grab for touchscreen
Providing the capability for applications to exclusively
handle touch events

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2024-08-08 18:30:32 +08:00
Shoukui Zhang 75fa94af02 i2c_slave: add poll waiters array
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang 4e6f3e9360 I2c slave: Add POLLOUT event for notifie slave write success
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang 2093038315 add setup and shutdown for i2c master and slave
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang 1ea19e7c54 fix i2c slave register failed
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang f4a234613e Add I2C Slave driver
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang 6114c0b948 i2c: Remove useless restrictions
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang 2bf13ffbb0 spi: Optimize access to private data
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang a6cea0d82e Restriction declaration spi_slave_unlink function
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Shoukui Zhang 9ffac12465 spi: Remove useless restrictions
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-07 12:13:38 -03:00
Huang Qi e09a79ece9 driver/ssd1680: Add support for 1.54 inch e-paper display
Add configuration and driver support for the SSD1681 1.54 inch e-paper display,
including the necessary waveforms and settings for proper operation. This extends
the existing SSD1680 e-paper driver to accommodate the new display module.

The changes involve updates to the Kconfig file for additional configuration options,
modifications to the driver implementation in ssd1680.c to include SSD1681 specific
logic, and updates to the header file ssd1680.h to reflect the added support.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-08-04 23:14:55 +08:00
Lwazi Dube f3ddb3ffac drivers/serial: Make the 16550 rx trigger level configurable
To avoid breaking other configs, the default value 2 is equal to the original
hard coded value.
2024-08-03 10:31:36 +08:00
Tiago Medicci c755218295 drivers/audio/es8311: Fix setting sample rate and bits per sample
When setting the sample rate (`es8311_setsamplerate`) and the bits
per sample (`es8311_setbitspersample`), check their return value in
`es8311_configure`. Also, this commit ensures that these functions
are called after `es8311_reset` to avoid these values to be set to
the default values.
2024-08-01 16:04:53 +08:00
Denis Ryndine c2127c0b88 w25c: add W25_DEBUG sub-menu config option and update debug traces.
- Allows optionally to separate traces from potentially irrelevant fs
   syslog traces it would go with currently.
2024-07-30 18:22:02 +08:00
Denis Ryndine 522cec4db9 mtd/Kconfig: fix W25_SLOWREAD menu item.
- There was no comment and the option wouldn't be displayed in menu.
2024-07-30 12:56:17 +08:00
raiden00pl 2bcba4d85e drivers/drivers_initialize.c: check if only one console is selected
Check if only one driver is used as console to avoid a non-working console
because a different one is selected and has higher priority than the one we wanted
2024-07-29 00:31:24 +08:00
Huang Qi 78743e4055 Fix some style issues
Modified files:
- boards/arm/cxd56xx/spresense/src/cxd56_clock.c
- boards/arm/sama5/giant-board/include/board.h
- boards/arm/stm32l4/b-l475e-iot01a/include/board.h
- boards/risc-v/esp32c3-legacy/esp32c3-devkit-rust-1/src/esp32c3-devkit-rust-1.h
- boards/sim/sim/sim/src/dummy.c
- drivers/wireless/spirit/lib/spirit_radio.c
- include/nuttx/modem/u-blox.h

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-07-27 22:57:32 +08:00
Yanfeng Liu 3fecf46097 virtio/serial: initial CONSOLE support
This adds DRIVERS_VIRTIO_SERIAL_CONSOLE config and related logic to
virtio serial so that it can be used as console device. Note that
due to its dependency on OS services, this console is available late
so it is not proper for debugging too early booting issues.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-26 12:01:29 +08:00
Matteo Golin 1fba2ec0df Add support for the Sensirion SHT4x temperature and humidity sensor family.
This driver implements `read`, `write`, `open`, `close` and `ioctl`
interfaces to the SHT4X temperature and humidity sensor on an I2C bus.
The read implementation is that of a character driver for easy
debugging, while `ioctl` provides an interface to the sensor's raw data
collection and heating functionality.
2024-07-22 14:24:20 -03:00
zhaoxingyu1 fa31c1c21b usbdev: delete unsigned comparison with 0
The unsigned type is always greater than or equal to 0

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2024-07-22 23:44:18 +08:00
zhaoxingyu1 b706891fc7 NVS: fix align size
when update for powerloss data write, data_wra should move NVS_ALIGN_SIZE

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2024-07-18 16:36:23 -03:00
chenwen@espressif.com e0b99216b0 driver/net/lan9250: Add lan9250_ioctl and lan9250_uninitialize APIs
- use 'lan9250_ioctl' to set and get the value of lan9250 phy register
    - use `lan9250_uninitialize` to un-initialize the ethernet driver

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-07-15 19:41:15 +08:00
hujun5 a4fece3450 spin_lock: inline spin_lock
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
2024-07-15 02:29:30 +08:00
simbit18 f12c4e05cc Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs
2024-07-12 06:37:59 +08:00
Saurav Pal 6f0daf08eb fs/mnemofs: Adds Block Allocator
Adds Block Allocator logic to mnemofs.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-07-10 18:40:47 -03:00
Michal Lenc 816b1b28a0 can: enhance API to allow better CAN FD handling
This commit moves can_bytes2dlc and can_dlc2bytes from kernel internal
functions to API. These functions are necessary to convert bytes to
dlc for CAN FD frames and has to be accessible from the application
since can_hdr_s does not store message length in bytes but directly in
dlc.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-07-10 11:33:03 -03:00
xuxingliang bbc31d70f4 drivers: add API for drivers early initialization
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-07-09 16:05:59 +08:00
xuxingliang ae03313473 drivers/segger: upgrade to v3.54
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-07-03 17:31:23 +08:00