tests: drivers: add flexio pwm and spi support for ke17z
pwm: pwm_api: update testcase.yaml and add new overlay configuration to support flexio pwm driver. spi: spi_loopback: update testcase.yaml and add new overlay configuration to support flexio spi driver. Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
This commit is contained in:
parent
594bf682e1
commit
59655d4e08
4 changed files with 102 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright 2024 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
pwm-0 = &flexio0_pwm;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&flexio {
|
||||
status = "okay";
|
||||
flexio0_pwm: flexio0_pwm {
|
||||
compatible = "nxp,flexio-pwm";
|
||||
#pwm-cells = <3>;
|
||||
status = "okay";
|
||||
pinctrl-0 = <&flexio_pwm_default>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
pwm_0 {
|
||||
pin-id = <3>;
|
||||
prescaler = <1>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -8,3 +8,16 @@ tests:
|
|||
or dt_alias_exists("pwm-3") or dt_compat_enabled("st,stm32-pwm")
|
||||
or dt_compat_enabled("intel,blinky-pwm") or dt_compat_enabled("nordic,nrf-pwm")
|
||||
depends_on: pwm
|
||||
drivers.pwm.ke1xz_pwm_flexio:
|
||||
tags:
|
||||
- drivers
|
||||
- pwm
|
||||
- userspace
|
||||
extra_args: DTC_OVERLAY_FILE="boards/frdm_ke1xz_flexio_pwm.overlay"
|
||||
platform_allow:
|
||||
- frdm_ke17z
|
||||
- frdm_ke17z512
|
||||
filter: (dt_alias_exists("pwm-0") or dt_alias_exists("pwm-1") or dt_alias_exists("pwm-2")
|
||||
or dt_alias_exists("pwm-3")) and CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and
|
||||
CONFIG_DT_HAS_NXP_FLEXIO_PWM_ENABLED
|
||||
depends_on: pwm
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2024 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/* To test this sample, connect
|
||||
* SDO(J2-3) --> SDI(J2-4)
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
pinmux_flexio_spi0: pinmux_flexio_spi0 {
|
||||
group0 {
|
||||
pinmux = <FXIO_D6_PTA8>, /* cs */
|
||||
<FXIO_D4_PTB8>, /* sck */
|
||||
<FXIO_D7_PTC3>, /* sdo */
|
||||
<FXIO_D1_PTB11>; /* sdi */
|
||||
drive-strength = "low";
|
||||
slew-rate = "slow";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&flexio {
|
||||
status = "okay";
|
||||
|
||||
flexio_spi0: flexio_spi0 {
|
||||
compatible = "nxp,flexio-spi";
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
cs-gpios = <&gpioa 8 GPIO_ACTIVE_LOW>;
|
||||
sdo-pin = <7>;
|
||||
sdi-pin = <1>;
|
||||
sck-pin = <4>;
|
||||
pinctrl-0 = <&pinmux_flexio_spi0>;
|
||||
pinctrl-names = "default";
|
||||
slow@0 {
|
||||
status = "okay";
|
||||
compatible = "test-spi-loopback-slow";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <500000>;
|
||||
};
|
||||
fast@0 {
|
||||
compatible = "test-spi-loopback-fast";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <4000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpioa {
|
||||
status = "okay";
|
||||
};
|
|
@ -182,3 +182,10 @@ tests:
|
|||
extra_args: DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
|
||||
platform_allow:
|
||||
- nrf54h20dk/nrf54h20/cpuapp
|
||||
drivers.spi.ke1xz_flexio_spi.loopback:
|
||||
extra_args: DTC_OVERLAY_FILE="boards/frdm_ke1xz_flexio_spi.overlay"
|
||||
filter: CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and
|
||||
CONFIG_DT_HAS_NXP_FLEXIO_SPI_ENABLED
|
||||
platform_allow:
|
||||
- frdm_ke17z
|
||||
- frdm_ke17z512
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue