Alin Jerpelea
4e26e39ffe
arch: xtensa: Espressif Systems: update licenses to Apache
...
Espressif Systems has submitted the SGA and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-04-01 12:13:12 -05:00
Matias N
8ed2bb8eb5
esp32: remove unneeded "INFO" and "ERROR" prefixes to syslog calls
2021-03-31 07:37:18 -03:00
Matias N
a5a435e98f
esp32: remove extra initial newline on syslog call
2021-03-31 10:04:42 +01:00
Gustavo Henrique Nihei
77c5995f93
xtensa/esp32: Use essential boolean expressions on condition statements
2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
5e8eb420b7
xtensa/esp32: Fix MISO/MOSI data length field configuration
...
Both fields were being configured with the total number of remaining
bytes instead of the number of bytes actually bound to DMA descriptors.
2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
b4dbae1b10
xtensa/esp32: Commit setbits configuration before SPI transaction
...
The motivation is to avoid consistency issues when using Mixed Mode
(i.e. Polling and Interrupt/DMA transfers being used interchangeably)
2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
4d877abf3f
xtensa/esp32: Avoid incrementing a NULL pointer for RX buffer
2021-03-30 01:23:02 -05:00
Gustavo Henrique Nihei
a27d5b1063
xtensa/esp32: Remove useless pointer check in SPI DMA exchange
2021-03-30 01:23:02 -05:00
Brennan Ashton
0a3b20e546
syslog: Drop extra carriage return from syslog calls
2021-03-28 21:24:00 -05:00
Gustavo Henrique Nihei
96037f01d5
xtensa/esp32: Clean up unused include headers from DMA driver
2021-03-26 23:40:44 -05:00
Gustavo Henrique Nihei
d3342795a8
xtensa/esp32: Fix wrong math round operation on DMA init
2021-03-26 23:40:44 -05:00
Gustavo Henrique Nihei
eb505ed866
xtensa/esp32: Fix DMA burst mode being unintendedly disabled
2021-03-26 23:39:53 -05:00
Sara Souza
59313c86d1
xtensa/esp32: Adds oneshot timer driver.
2021-03-24 16:01:26 -03:00
chenwen
f54aef9977
xtensa/esp32: Support esp32 wireless ioctl cmd
2021-03-23 16:29:52 -03:00
Abdelatif Guettouche
fcafacb9a3
esp32_allocateheap.c: Adjust the region of the heap coming from the
...
external memory when a BSS section is allowed to reside there.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-23 16:39:01 +09:00
Abdelatif Guettouche
cc23bdeca4
boards/xtensa/esp32: Add a section in external memory to hold some BSS
...
data.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-23 16:39:01 +09:00
YAMAMOTO Takashi
37300a43a5
esp32_part_ioctl: Return -ENOTTY for unknown commands
...
It's traditional to use ENOTTY for this purpose.
Littlefs seems to rely on this behavior for BIOC_FLUSH.
Also, drop the log level.
2021-03-22 19:49:27 -07:00
Gustavo Henrique Nihei
e4efa9dfa7
xtensa/esp32: Fix interrupt flag configuration for DMA transfers
...
Previously SPI interrupts were enabled on DMA initialization. But since
the addition of SPI Mixed mode it created a side-effect, breaking
polling transfers. So now interrupts are enabled before the DMA
transactions and disabled once they are finished.
Furthermore, the transaction done flag is also cleared before a new
transaction starts.
2021-03-21 00:16:59 -07:00
Gustavo Henrique Nihei
20d24fe148
xtensa/esp32: Fix esp32_spi_setbits for Polling when DMA is also enabled
...
Commit 6382b2ba introduced the possibility of using SPI in Mixed mode,
i.e. performing SPI transfers via both polling and interrupts. However,
setbits was only applying the configuration if DMA was not enabled.
2021-03-21 00:16:59 -07:00
Gustavo Henrique Nihei
27e2da33b4
xtensa/esp32: Fix buffer size word-alignment for DMA transfers
2021-03-20 19:23:44 -07:00
Gustavo Henrique Nihei
bfc551484a
xtensa/esp32: Clean up esp32_dma_init code
...
Removed "isrx" parameter whose only purpose is to trigger an assertion
on DEBUG builds. Also performed a minor refactor.
2021-03-20 19:23:44 -07:00
Gustavo Henrique Nihei
dc7a0b0a5c
xtensa/esp32: Use Polling instead of DMA for transfers below threshold
...
Also refactored code to remove a confusing duplicate "dma_chan" field
which had the same purpose of the "use_dma" boolean.
2021-03-19 23:13:32 -07:00
Abdelatif Guettouche
27d5c9340a
esp32_allocateheap.c: Don't allocate the ROM CPU regions the same way in
...
QEMU, the image is different.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-18 11:28:36 +09:00
Jiuzhu Dong
e96c8b9283
fs: allocate file/socket dynamically
...
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
Dong Heng
b2f5031e96
xtensa/esp32: Refactor ESP32 WiFi driver to support station and softAP coexistence
2021-03-16 10:20:59 -03:00
Abdelatif Guettouche
28160823b6
arch/xtensa/esp32: ~6KB of memory at address 0x3ffae6f0 is not used by
...
the ROM bootloader, add that to the heap as well.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-16 16:22:08 +09:00
Abdelatif Guettouche
8389e83742
esp32/memory_layout.h: Update the layout taking under consideration the
...
changes to the heap regions and to the internal heap.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-16 16:22:08 +09:00
Abdelatif Guettouche
9cfc30fa85
memory_layout.h: Fix the start of region2 when a QEMU image generation
...
is enabled.
That region is technically part of the PRO CPU and we should be able to
allocate it early. However, QEMU uses a slightly different bootloader
image that uses the same part for both CPU. So, when APP CPU starts
during the SMP bring up it will corrupt some data.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-16 16:22:08 +09:00
Abdelatif Guettouche
7fbc350589
xtensa/esp32: Warn about unused memory regions.
...
In case CONFIG_MM_REGIONS doesn't include all the available memory
regions the user will have a warning to increase it.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-16 16:22:08 +09:00
Abdelatif Guettouche
5c7d041b91
arch/xtensa/esp32: In SMP case move the internal memory to region 3.
...
Region 2 is only 15KB in SMP, so we don't have enough memory to play
with.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-16 16:22:08 +09:00
Abdelatif Guettouche
cba44928d2
arch/xtensa/esp32: Part of the ROM regions in middle of DRAM are not
...
used, retrieve them as heap.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-16 16:22:08 +09:00
Abdelatif Guettouche
a68a39c785
xtensa/esp32: Move internal heap to the beginning of region 2.
...
Internal heap was occupying the region straight after .data up to
HEAP_REGION1. The issue with this is if static allocation is large,
we'll end up with too little memory left for the internal heap.
Moving it to the beginning of region 2 gives us more room to play with.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-16 16:22:08 +09:00
Sara Souza
4ca0c6e3c8
xtensa/esp32: timer driver refactor
2021-03-14 20:22:36 -03:00
Alin Jerpelea
bd94263a33
arch: Makefile: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-13 05:56:43 -08:00
Abdelatif Guettouche
7d406c9f9f
xtensa_backtrace.S: Fix the file header.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-03-11 21:24:01 +08:00
YAMAMOTO Takashi
16d3e787de
xtensa hostfs: Make host_stat populate st_size
...
A clumsy implementation using lseek.
This would allow more applications to use hostfs directly.
Tested lightly with CONFIG_EXAMPLES_STAT.
2021-03-10 14:15:24 +08:00
Gustavo Henrique Nihei
330eff36d7
sourcefiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
Gustavo Henrique Nihei
47cb41c92f
makefiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
Dong Heng
2f4e1c02de
xtensa/esp32: Add WPA2 Enterprise and WPA3 support
2021-03-09 11:20:34 -03:00
YAMAMOTO Takashi
e05762c488
esp32/memory_layout.h: Replace Gregory Nutt's copyright notice
...
The old copyright notice was inherited from esp32_allocateheap.c.
The new copyright notice was copy-and-pasted from sched_getcpu.c.
2021-03-05 10:15:52 +00:00
YAMAMOTO Takashi
3857d7491f
esp32: Extract memory layout definitions to a separate header
2021-03-05 10:15:52 +00:00
Gustavo Henrique Nihei
cd02fd1700
xtensa/esp32: Add support for I2C tracing
2021-03-04 22:09:37 +00:00
Gustavo Henrique Nihei
1aebe47c71
xtensa/esp32: Use OR operation when configuring pin driver
2021-03-04 16:36:48 +00:00
Gustavo Henrique Nihei
23f0d8c17b
xtensa/esp32: Fix default GPIO function when no option is provided
2021-03-04 16:36:48 +00:00
Gustavo Henrique Nihei
9c366aad94
xtensa/esp32: Allow pin to be configured as Input and Output simultaneously
2021-03-04 16:36:48 +00:00
Gustavo Henrique Nihei
210a77de93
xtensa/esp32: Configure GPIO as INPUT only when required
2021-03-04 16:36:48 +00:00
Gustavo Henrique Nihei
f5342d00fc
xtensa/esp32: Fix Kconfig file formatting
2021-03-04 16:31:51 +00:00
Gustavo Henrique Nihei
984e0f0ec9
xtensa/esp32: Add missing option for I2C reset
2021-03-04 16:31:51 +00:00
Gustavo Henrique Nihei
79ea96a1d0
xtensa/esp32: Fix ESP32_I2C option bringing the char driver
2021-03-04 16:31:51 +00:00
Gustavo Henrique Nihei
5e9e2bec32
xtensa/esp32: Change I2C SCL default pin to a valid one
...
Current default pin for I2C SCL is not available for mapping with IOMUX
peripheral.
2021-03-03 19:00:15 -08:00