From 8b89060753c73ff91461d875df14556d650c69c4 Mon Sep 17 00:00:00 2001 From: Raffael Rostagno Date: Tue, 7 Jan 2025 10:01:48 -0300 Subject: [PATCH] tests: drivers: ledc_pwm: Add test cases Add test cases to include coverage for ESP32 HS channels. Signed-off-by: Raffael Rostagno --- .../socs/esp32_procpu.overlay | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/drivers/pwm/pwm_gpio_loopback/socs/esp32_procpu.overlay b/tests/drivers/pwm/pwm_gpio_loopback/socs/esp32_procpu.overlay index 7901b44125ccfe..c7a00f76cc5470 100644 --- a/tests/drivers/pwm/pwm_gpio_loopback/socs/esp32_procpu.overlay +++ b/tests/drivers/pwm/pwm_gpio_loopback/socs/esp32_procpu.overlay @@ -1,7 +1,7 @@ /* * SPDX-License-Identifier: Apache-2.0 * - * Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd. + * Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd. */ #include @@ -12,10 +12,14 @@ 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>; + <&gpio0 3 ESP32_GPIO_PIN_OUT_EN>, + <&gpio0 4 ESP32_GPIO_PIN_OUT_EN>, + <&gpio0 5 ESP32_GPIO_PIN_OUT_EN>; pwms = <&ledc0 0 160000 PWM_POLARITY_NORMAL>, - <&ledc0 5 80000 PWM_POLARITY_INVERTED>; + <&ledc0 5 80000 PWM_POLARITY_INVERTED>, + <&ledc0 9 1000000 PWM_POLARITY_NORMAL>, + <&ledc0 10 1000000 PWM_POLARITY_INVERTED>; }; }; @@ -23,7 +27,9 @@ ledc0_default: ledc0_default { group1 { pinmux = , - ; + , + , + ; input-enable; }; }; @@ -45,4 +51,16 @@ reg = <0x5>; timer = <1>; }; + + /* HS channel */ + channel9@9 { + reg = <0x9>; + timer = <0>; + }; + + /* share same timer with ch9 */ + channel10@10 { + reg = <0xa>; + timer = <0>; + }; };