tests: drivers: pwm: add esp32s3_luatos_core
add overlay and conf for esp32s3_luatos_core board Signed-off-by: YuLong Yao <feilongphone@gmail.com>
This commit is contained in:
parent
32fe3619b5
commit
c884d7f0c4
2 changed files with 74 additions and 0 deletions
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pwm/pwm.h>
|
||||
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
|
||||
|
||||
/ {
|
||||
pwm_loopback_0 {
|
||||
compatible = "test-pwm-loopback";
|
||||
/* first index must be a 32-Bit timer */
|
||||
pwms = <&mcpwm0 0 0 PWM_POLARITY_NORMAL>,
|
||||
<&mcpwm0 6 0 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
mcpwm0_default: mcpwm0_default {
|
||||
group1 {
|
||||
pinmux = <MCPWM0_OUT0A_GPIO2>;
|
||||
output-enable;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <MCPWM0_CAP0_GPIO4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mcpwm0 {
|
||||
pinctrl-0 = <&mcpwm0_default>;
|
||||
pinctrl-names = "default";
|
||||
prescale = <255>;
|
||||
prescale-timer0 = <103>;
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pwm/pwm.h>
|
||||
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
|
||||
|
||||
/ {
|
||||
pwm_loopback_0 {
|
||||
compatible = "test-pwm-loopback";
|
||||
/* first index must be a 32-Bit timer */
|
||||
pwms = <&mcpwm0 0 0 PWM_POLARITY_NORMAL>,
|
||||
<&mcpwm0 6 0 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
mcpwm0_default: mcpwm0_default {
|
||||
group1 {
|
||||
pinmux = <MCPWM0_OUT0A_GPIO2>;
|
||||
output-enable;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <MCPWM0_CAP0_GPIO4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mcpwm0 {
|
||||
pinctrl-0 = <&mcpwm0_default>;
|
||||
pinctrl-names = "default";
|
||||
prescale = <255>;
|
||||
prescale-timer0 = <103>;
|
||||
status = "okay";
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue