Commit Graph

46262 Commits

Author SHA1 Message Date
Tiago Medicci Serrano
df0604a4be Added default config for lvgl configs based on both fb and lcddev.
In order to better test the lcdddev driver and framebuffer, newer
board configs (for the TTGO T-Display and for the simulator) were
added.

Adjusted references of the sim:lvgl_(fb/lcd) config.
2022-08-13 20:36:45 +08:00
Tiago Medicci Serrano
ab60d0d3fb Framebuffer's callback buffer starts from the area being drawn.
The commit 664d45dcba updated the
behavior of the framebuffer's putarea callback enabling it to be
used to draw a particular area of the display. Previously, putarea
was only used to draw the entire area of the display. Any different
area was drawn, row by row, by putrun. Also, before checking for
which callback to call, the framebuffer driver adjusted the buffer
reference that was going to be used for calling the driver's callback
to point to the init of the relevant data. After that commit, the
framebuffer's buffer reference passed to the driver's putarea now
contains the data to draw the entire display. Unlike the previous
version of that implementation, only the putrun's callback buffer
was being referenced from the address that contains the data that
actually is being drawn.

This commit fixes it by adjusting the reference for the run buffer
passed to the putrun/putarea callback. It always starts from the
beginning of the relevant data that is actually being drawn. That is
necessary because lcddev (which uses the same LCD display driver
callbacks) actually don't allocate a buffer containing the data to
draw the whole display, so the same putarea implementation of the
LCD drivers would'n be able to work for both lcddev and framebuffer.
Also it's necessary to pass the stride argument to the LCD drivers
in order to enable them to do partial writes by calculating the
buffer offset while sending row-by-row. The stride is equal the
width multiplied by the bytes per pixel (may add some padding)
for framebuffer and is equal to the lenght of the row being drawn
(multiplied by the same BPP) for lcddev.

Why this approach?
Other possible approaches would be:
1) modify lcddev driver to translate received buffer data to a
buffer similar to the framebuffer. That wouldn't be efficient
considering memory allocation.
2) Create a new callback function. While possible, it'd be confusing
to create a different callback to draw the whole screen and another
to draw only an area of the screen. Also, these callbacks would
differ themselves only from the way the buffer is filled.
3) Simply reverting 664d45dcba would
break the usage of the putarea callback to draw an area of the
display, which would also be inefficient.

This approach is based on the Zephyr's implementation of the ST7789
driver: the buffer starts from the beginiing of the region that would
be drawn. The display device driver's putarea implementation should
check if the operation refers to a full screen/full row and implement
(if possible) a single operation to send the data to be drawn more
efficiently.

Finally, this approach requires that the drivers which implement
the putarea callback and expects the entire framebuffer buffer
to be modified. They don't need to calculate where the data begins
as the new buffer represents the data from the address that is
actually being drawn. This includes adjusting the LCD drivers
GC9A01 and ST7789 and the driver for APA102-based LED matrix display.
2022-08-13 20:36:45 +08:00
Xiang Xiao
2b37909c9e libc: Move crc8.h, crc16.h and crc32.h from include to include/nuttx
to avoid the conflict with the 3rd party library

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-13 13:28:24 +03:00
Masayuki Ishikawa
b3795daa53 boards: sabre-6quad: Add netknsh_smp/defconfig
Summary:
- This commit adds netknsh_smp/defconfig

Impact:
- None

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-13 10:46:36 +08:00
Alan Carvalho de Assis
9ee18d70aa esp32c3-devkit: Fix /etc/passwd too 2022-08-13 03:02:55 +08:00
Michal Lenc
c7c78972d6 samv7/common: add support for GPIO driver based encoder
This commit adds support for GPIO driver based encoder for SAMv7 boards.
This encoder do not use the microcontroller's dedicated driver but two
GPIO pins with interrupts. The position is calculated based on those
interrupts.

This can be used for boards that do not have pins routed to the dedicated
driver.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2022-08-13 01:10:18 +08:00
Alan Carvalho de Assis
e9aff88882 sim: Fix the /etc/passwd after TEA algo fixing 2022-08-12 19:42:25 +03:00
Masayuki Ishikawa
690c178e4b arch: imx6: Apply the imxrt_enet.c changes to imx_enet.c (4/4)
Summary:
- This commit applies the following imxrt_enet.c changes to imx_enet.c

  commit 0628019c2c
  Author: David Sidrane <David.Sidrane@NscDg.com>
  Date:   Wed Jul 13 11:01:49 2022 -0700

      imxrt:Enet ensure proper dcache for Writeback mode

Impact:
- imx_enet.c

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-12 10:30:48 -04:00
Masayuki Ishikawa
fb8562763a arch: imx6: Apply the imxrt_enet.c changes to imx_enet.c (3/4)
Summary:
- This commit applies the following imxrt_enet.c changes to imx_enet.c

  commit 522a949ed5
  Author: David Sidrane <David.Sidrane@NscDg.com>
  Date:   Wed Jul 13 11:00:11 2022 -0700

      imxrt:enet Better interrupt state handeling

- NOTE: I also fixed typo and compile error in the above commit

Impact:
- imx_enet.c

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-12 10:30:48 -04:00
Masayuki Ishikawa
6dfd01885d arch: imx6: Apply the imxrt_enet.c changes to imx_enet.c (2/4)
Summary:
- This commit applies the following imxrt_enet.c changes to imx_enet.c

  commit 81f03a9151
  Author: David Sidrane <David.Sidrane@NscDg.com>
  Date:   Tue Mar 15 14:27:51 2022 -0700

     imxrt:ETH Add Support for ETH2

Impact:
- imx_enet.c

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-12 10:30:48 -04:00
Masayuki Ishikawa
b317e9058f boards: sabre-6quad: Add CONFIG_NET_GUARDSIZE=4 to defconfigs
Summary:
- This commit adds CONFIG_NET_GUARDSIZE=4 to defconfigs

Impact:
- None

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-12 10:30:48 -04:00
Masayuki Ishikawa
4e4ebba306 arch: imx6: Apply the imxrt_enet.c changes to imx_enet.c (1/4)
Summary:
- This commit applies the following imxrt_enet.c changes to imx_enet.c

  commit 12a515ebb6
  Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
  Date:   Thu Feb 4 11:27:09 2021 +0900

      arch: imxrt: Introduce CONFIG_NET_GUARDSIZE to imxrt_enet.c

Impact:
- imx_enet.c

Testing:
- Tested with qemu-6.2 (defconfig will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-12 10:30:48 -04:00
Robert Middleton
5d12e350da pic32mx: add option to disable JTAG at runtime
Add a new option to optionally disable JTAG at runtime.  Defaults to enabling
JTAG at runtime as that is the state the processor comes up in.
2022-08-11 11:24:41 -03:00
Alan Carvalho de Assis
0b4ef1406d xtensa/esp32s2: Add basic support to SPI 2022-08-11 15:49:55 +03:00
Petro Karashchenko
27fe5a50c6 arch/arm/stm32f7: fix cache invalidation issue in Ethernet RX
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-11 03:40:25 -04:00
Petro Karashchenko
4cd7e33b8d arch/arm/samv7: fix compilation warnings
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-11 10:00:39 +08:00
Petro Karashchenko
49d26e1b50 arch/arm/samv7: get TX DMA running for HSMCI interface
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-11 10:00:39 +08:00
Xiang Xiao
d8cd4d3e48 power/supply: Call regulator_rpmsg_server_init in drivers_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-11 02:08:42 +03:00
Xiang Xiao
e6553fc687 clk/rpmsg: Call clk_rpmsg_server_initialize in drivers_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-11 02:08:42 +03:00
Xiang Xiao
5f93ae9dd2 fs/rpmsg: Move the server initialization to fs_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-11 02:08:42 +03:00
Xiang Xiao
64f0267993 syslog: Move syslog_rpmsg_server_init to syslog_initialize
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-11 02:08:42 +03:00
Ville Juven
b8b541fbf5 mpfs: Remove the ddrstorage section from the OpenSBI package
It is not really needed; g_hart_stacks is only used during SBI init as
a temporary stack area. We can use the scratch area buffers for this, as
the scratch areas define almost 4K of extra space, which is used for
exception stacks anyway.
2022-08-10 10:01:47 +03:00
Xiang Xiao
838690fc9f net/local: Remove the sync preamble from datagram
since pipe is a reliable transport, the sync just waste the space and time

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-10 09:50:25 +03:00
Masayuki Ishikawa
51ffd310a8 boards: sabre-6quad: Add telnetd to netknsh/defconfig
Summary:
- This commit adds telnetd to netknsh/defconfig

Impact:
- None

Testing:
- Tested with qemu-6.2

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-10 09:42:56 +03:00
Jiuzhu Dong
aeec797511 syscall: remove directory syscall
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-10 13:33:08 +08:00
David Sidrane
32c4bdb7a6 s32k1xx:LPI2C Add DMA support 2022-08-10 11:22:38 +08:00
Xiang Xiao
fa2e1897ea libc: Implement memfd on top of tmpfs
https://man7.org/linux/man-pages/man2/memfd_create.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-09 22:13:09 +03:00
raiden00pl
08b8234e9e arch/arm/src/stm32f7: port ADC driver from arch/stm32
This change adds support for the following features:
  - injected channels (default: 0)
  - ADC resolution (default: 12bit)
  - ADC low-level operations
  - ADC external triggers
  - custom ADC interrupts
  - ADC sample time configuration
  - configurable ADC SCAN mode (default on if DMA)
  - configurable ADC DMA mode (default: one shot mode)
  - reset the ADC block only if all ADC instances are closed
2022-08-10 02:03:51 +08:00
Ville Juven
60042fea74 risc-v: Implement riscv_sbi_set_timer
This implements riscv_sbi_set_timer. This requires the OpenSBI companion
software to work (but this is needed by the kernel mode anyways).
2022-08-10 02:02:39 +08:00
David Sidrane
4ee917c14c stm32f7:Serial Fix breakage from #6779 2022-08-09 20:18:23 +03:00
Jiuzhu Dong
4dbf4555eb fs/dir: support fchdir and dirfd
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
fe17f747a7 fs/directory: move private directory information to filesystem
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
90db4daca9 fs/directory: update readdir interface for all filesystem
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
3a70962b7a fs/directory: use file mode to manage directory
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
094e986bbd fcntl/O_CLOEXEC: add O_CLOEXEC map for hostfs
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Ville Juven
31bb362aab risc-v: Fix kernel MMU mapping for L3 table
The L3 table address was calculated incorrectly. For every 2MiB of
mapped memory, an offset of 4KiB is needed from the base of the L3
table. The old calculation failed if paddr was not aligned to a 2MiB
boundary.
2022-08-09 23:14:46 +08:00
David Sidrane
2e7b594bf4 s32k1xx:Add s32k146 DMAMUX 2022-08-09 16:29:21 +03:00
David Sidrane
3813320c31 s32k1xx_edma:Add Looping and cleanup
s32k1xx:EDMA Use aligned_data macros

s32k1xx:EDMA CONFIG_ARCH_CHIP_S32K14x->CONFIG_ARCH_CHIP_S32K14X

s32k1xx:EDMA remove FAR keyword

s32k1xx:EDMA Fix C&P error from Kinetis

s32k1xx:EDMA TCD Alignment of 32 Bytes to support Scatter/Gather

s32k1xx:EDMA Fix access violation

s32k1xx:dmamux fixed missing closing paren
2022-08-09 16:29:21 +03:00
Jiuzhu Dong
c18b5602e8 fs/procfs: add mempool info to proc/mempool
server> cat /proc/mempool
                   total    bsize    nused    nfree   nifree  nwaiter
       hello:        400       20       17        3        0        0

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 15:38:57 +08:00
Jiuzhu Dong
e3bbbfe4d0 mm/mempool: support memory buffer pool
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 15:38:57 +08:00
raiden00pl
a05db5299e arch/arm/src/stm32f7: port PWM driver from arch/stm32
This change adds support for the following features:
  1. PWM complementary outputs
  2. interface for low-level PWM operations
  3. support for all PWM channel modes
  4. support for internal PWM channels (TIM1/TIM8)
  5. support for PWM channel polarity and IDLE state
  6. support for TRGO and BREAK
2022-08-09 12:37:49 +08:00
raiden00pl
fd02855c63 arch/stm32f7: rename PWM complementary output pins from CHxN to CHxNOUT (always output) 2022-08-09 12:37:49 +08:00
David Sidrane
050ce3e0d3 kinetis:spi remove ttype & do cache ops 2022-08-09 10:46:31 +08:00
David Sidrane
22580584d2 kinetis:[lp]serial remove ttype & do cache ops 2022-08-09 10:46:31 +08:00
David Sidrane
7a7a01153b Kinetis:edma Cleanup
Kientis:edma Cleanup

    Kinetis:EDMA Interrupt on last TCD

    Kintis:edma remove dcache operations on passed data

       Data can be chained in TCD and both read and write
       can be in the chain. So the dmach ttype is not
       relevent for all; the TCDs. Therefor we only perform
       dcache operations on internal strutures, The caller
       must perform dcache operations on their data.

kinetis:EDMA TCD Alignment of 32 Bytes to support Scatter/Gather
2022-08-09 10:46:31 +08:00
田昕
20b9cc37d5 net/local:Make local send multi-thread safe
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-08-08 22:45:44 +08:00
Jiuzhu Dong
c4bed9eae9 driver/sensor: rename /dev/sensor -> /dev/uorb
because this directory contains all topics by uorb using, not just sensors.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-08 19:45:52 +08:00
Xiang Xiao
16d858f3ee libc/err: Add _func suffix to avoid the the penitential symbol collision
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-08 07:39:59 -04:00
Xiang Xiao
e26d8759d0 libc: Remove CONFIG_LIBC_ERR
let linker remove the unused object files from the final image

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-08 07:39:59 -04:00
Nathan Hartman
dd718e78f7 Fix typos 2022-08-07 23:33:19 +08:00