From 20ff7ddff9adacead23ddd623babfcb2359b3e35 Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Tue, 17 Sep 2024 19:48:59 +0900 Subject: [PATCH] tests: drivers: build_all: pwm: Add i2c-devices build test Add build tests for following devices. - maxim,max31790-pwm - nxp,pca9685-pwm Signed-off-by: TOKITA Hiroshi --- .../build_all/pwm/boards/native_sim.overlay | 40 +++++++++++++++++++ tests/drivers/build_all/pwm/testcase.yaml | 5 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tests/drivers/build_all/pwm/boards/native_sim.overlay diff --git a/tests/drivers/build_all/pwm/boards/native_sim.overlay b/tests/drivers/build_all/pwm/boards/native_sim.overlay new file mode 100644 index 00000000000..4fa5f649170 --- /dev/null +++ b/tests/drivers/build_all/pwm/boards/native_sim.overlay @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2024 TOKITA Hiroshi + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + test { + #address-cells = <1>; + #size-cells = <1>; + + test_i2c: i2c@11112222 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "vnd,i2c"; + reg = <0x11112222 0x1000>; + status = "okay"; + clock-frequency = <100000>; + + test_i2c_max31790: max31790@0 { + compatible = "maxim,max31790"; + status = "okay"; + reg = <0x0>; + + max31790_max31790_pwm: max31790_max31790_pwm { + compatible = "maxim,max31790-pwm"; + status = "okay"; + pwm-controller; + #pwm-cells = <2>; + }; + }; + + test_i2c_pca9685: pca9685@1 { + status = "okay"; + compatible = "nxp,pca9685-pwm"; + reg = <0x1>; + #pwm-cells = <2>; + }; + }; + }; +}; diff --git a/tests/drivers/build_all/pwm/testcase.yaml b/tests/drivers/build_all/pwm/testcase.yaml index 64924e4d2f4..d21744a22c5 100644 --- a/tests/drivers/build_all/pwm/testcase.yaml +++ b/tests/drivers/build_all/pwm/testcase.yaml @@ -50,7 +50,10 @@ tests: drivers.pwm.build.xlnx: platform_allow: arty_a7/designstart_fpga_cortex_m1 drivers.pwm.build.test: - platform_allow: qemu_cortex_m3 + platform_allow: + - qemu_cortex_m3 + - native_sim + - native_sim/native/64 drivers.pwm.max31790.build: platform_allow: nucleo_f429zi extra_args: DTC_OVERLAY_FILE=max31790.overlay