-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add USB variant config files for esp32c3 boards. Signed-off-by: Raffael Rostagno <[email protected]>
- Loading branch information
Showing
17 changed files
with
282 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&wifi { | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_ADC_ASYNC=n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2022 Wolter HV <[email protected]> | ||
* Copyright (c) 2023 Benjamin Björnsson <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
zephyr,user { | ||
/* adjust channel number according to pinmux in board.dts */ | ||
io-channels = <&adc0 0>, <&adc0 1>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
|
||
channel@1 { | ||
reg = <1>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
}; |
7 changes: 7 additions & 0 deletions
7
tests/drivers/counter/counter_basic_api/socs/esp32c3_usb.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
&timer0 { | ||
status = "okay"; | ||
}; | ||
|
||
&rtc { | ||
slow-clk-src = <ESP32_RTC_SLOW_CLK_SRC_RC_FAST_D256>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CONFIG_DMA_TRANSFER_CHANNEL_NR_0=5 | ||
CONFIG_DMA_TRANSFER_CHANNEL_NR_1=0 | ||
CONFIG_HEAP_MEM_POOL_SIZE=32768 |
11 changes: 11 additions & 0 deletions
11
tests/drivers/dma/chan_blen_transfer/socs/esp32c3_usb.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&dma { | ||
status = "okay"; | ||
}; | ||
|
||
tst_dma0: &dma { }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR=0 | ||
CONFIG_DMA_LOOP_TRANSFER_SIZE=4094 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&dma { | ||
status = "okay"; | ||
}; | ||
|
||
tst_dma0: &dma { }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_HEAP_MEM_POOL_SIZE=16384 |
13 changes: 13 additions & 0 deletions
13
tests/drivers/gpio/gpio_basic_api/socs/esp32c3_usb.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/ { | ||
resources { | ||
compatible = "test-gpio-basic-api"; | ||
out-gpios = <&gpio0 4 0>; | ||
in-gpios = <&gpio0 5 0>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pwm/pwm.h> | ||
|
||
/ { | ||
aliases { | ||
pwm-0 = &ledc0; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
ledc0_default: ledc0_default { | ||
group1 { | ||
pinmux = <LEDC_CH0_GPIO2>; | ||
output-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&ledc0 { | ||
pinctrl-0 = <&ledc0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
channel0@0 { | ||
reg = <0x0>; | ||
timer = <0>; | ||
}; | ||
}; |
48 changes: 48 additions & 0 deletions
48
tests/drivers/pwm/pwm_gpio_loopback/socs/esp32c3_usb.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pwm/pwm.h> | ||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
#include <zephyr/dt-bindings/gpio/espressif-esp32-gpio.h> | ||
|
||
/ { | ||
zephyr,user { | ||
/* GPIO input pins order must match PWM pinctrl config */ | ||
gpios = <&gpio0 2 ESP32_GPIO_PIN_OUT_EN>, | ||
<&gpio0 3 ESP32_GPIO_PIN_OUT_EN>; | ||
|
||
pwms = <&ledc0 0 160000 PWM_POLARITY_NORMAL>, | ||
<&ledc0 5 80000 PWM_POLARITY_INVERTED>; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
ledc0_default: ledc0_default { | ||
group1 { | ||
pinmux = <LEDC_CH0_GPIO2>, | ||
<LEDC_CH5_GPIO3>; | ||
input-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
&ledc0 { | ||
pinctrl-0 = <&ledc0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel0@0 { | ||
reg = <0x0>; | ||
timer = <0>; | ||
}; | ||
|
||
channel5@5 { | ||
reg = <0x5>; | ||
timer = <1>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_SPI_ESP32_INTERRUPT=y | ||
CONFIG_HEAP_MEM_POOL_SIZE=32768 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2022 Kumar Gala <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pinctrl { | ||
spim2_loopback: spim2_loopback { | ||
group1 { | ||
pinmux = <SPIM2_MISO_GPIO2>; | ||
output-enable; /* Enable internal loopback */ | ||
}; | ||
group2 { | ||
pinmux = <SPIM2_MOSI_GPIO2>; | ||
input-enable; /* Enable internal loopback */ | ||
}; | ||
group3 { | ||
pinmux = <SPIM2_SCLK_GPIO6>, | ||
<SPIM2_CSEL_GPIO10>; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi2 { | ||
slow@0 { | ||
compatible = "test-spi-loopback-slow"; | ||
reg = <0>; | ||
spi-max-frequency = <500000>; | ||
}; | ||
fast@0 { | ||
compatible = "test-spi-loopback-fast"; | ||
reg = <0>; | ||
spi-max-frequency = <16000000>; | ||
}; | ||
}; | ||
|
||
&spi2 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
dma-enabled; | ||
pinctrl-0 = <&spim2_loopback>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_HEAP_MEM_POOL_SIZE=32768 | ||
CONFIG_DMA=y |
31 changes: 31 additions & 0 deletions
31
tests/drivers/uart/uart_async_api/socs/esp32c3_usb.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pinctrl { | ||
uart1_test: uart1_test { | ||
group1 { | ||
pinmux = <UART1_TX_GPIO5>; | ||
input-enable; | ||
}; | ||
group2 { | ||
pinmux = <UART1_RX_GPIO5>; | ||
output-enable; | ||
}; | ||
}; | ||
}; | ||
|
||
dut: &uart1 { | ||
status = "okay"; | ||
current-speed = <115200>; | ||
pinctrl-0 = <&uart1_test>; | ||
pinctrl-names = "default"; | ||
dmas = <&dma 0>, <&dma 1>; | ||
dma-names = "rx", "tx"; | ||
}; | ||
|
||
&dma { | ||
status = "okay"; | ||
}; |
28 changes: 28 additions & 0 deletions
28
tests/drivers/uart/uart_elementary/socs/esp32c3_usb.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pinctrl { | ||
uart1_test: uart1_test { | ||
group1 { | ||
pinmux = <UART1_TX_GPIO2>, | ||
<UART1_RTS_GPIO3>; | ||
input-enable; | ||
output-high; | ||
}; | ||
group2 { | ||
pinmux = <UART1_RX_GPIO2>, | ||
<UART1_CTS_GPIO3>; | ||
output-enable; | ||
bias-pull-up; | ||
}; | ||
}; | ||
}; | ||
|
||
dut: &uart1 { | ||
status = "okay"; | ||
pinctrl-0 = <&uart1_test>; | ||
pinctrl-names = "default"; | ||
current-speed = <115200>; | ||
}; |