From 7fc73619b4320b484ef4be2c2486d3c7d8de4f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Wed, 18 Sep 2024 15:42:44 +0200 Subject: [PATCH] tests: boards: nrf: qdec: Add common configuration for nrf54l MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add common overlay for nrf54l15pdk targets. Signed-off-by: Krzysztof Chruściński --- .../boards/nrf54l15dk_nrf54l15_cpuapp.overlay | 39 +---------------- .../nrf54l15dk_nrf54l15_cpuflpr.overlay | 39 +---------------- .../boards/nrf54l15pdk_nrf54l15_common.dtsi | 43 +++++++++++++++++++ 3 files changed, 45 insertions(+), 76 deletions(-) create mode 100644 tests/boards/nrf/qdec/boards/nrf54l15pdk_nrf54l15_common.dtsi diff --git a/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuapp.overlay index 538106b38b1..63276a93656 100644 --- a/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuapp.overlay +++ b/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -3,41 +3,4 @@ * SPDX-License-Identifier: Apache-2.0 */ -/ { - aliases { - qdec0 = &qdec20; - qenca = &phase_a; - qencb = &phase_b; - }; - - encoder-emulate { - compatible = "gpio-leds"; - phase_a: phase_a { - gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - }; - phase_b: phase_b { - gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&pinctrl { - qdec_pinctrl: qdec_pinctrl { - group1 { - psels = , - ; - }; - }; -}; - -&gpio1 { - status = "okay"; -}; - -&qdec20 { - status = "okay"; - pinctrl-0 = <&qdec_pinctrl>; - pinctrl-names = "default"; - steps = <127>; - led-pre = <500>; -}; +#include "nrf54l15pdk_nrf54l15_common.dtsi" diff --git a/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuflpr.overlay b/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuflpr.overlay index 538106b38b1..63276a93656 100644 --- a/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuflpr.overlay +++ b/tests/boards/nrf/qdec/boards/nrf54l15dk_nrf54l15_cpuflpr.overlay @@ -3,41 +3,4 @@ * SPDX-License-Identifier: Apache-2.0 */ -/ { - aliases { - qdec0 = &qdec20; - qenca = &phase_a; - qencb = &phase_b; - }; - - encoder-emulate { - compatible = "gpio-leds"; - phase_a: phase_a { - gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - }; - phase_b: phase_b { - gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&pinctrl { - qdec_pinctrl: qdec_pinctrl { - group1 { - psels = , - ; - }; - }; -}; - -&gpio1 { - status = "okay"; -}; - -&qdec20 { - status = "okay"; - pinctrl-0 = <&qdec_pinctrl>; - pinctrl-names = "default"; - steps = <127>; - led-pre = <500>; -}; +#include "nrf54l15pdk_nrf54l15_common.dtsi" diff --git a/tests/boards/nrf/qdec/boards/nrf54l15pdk_nrf54l15_common.dtsi b/tests/boards/nrf/qdec/boards/nrf54l15pdk_nrf54l15_common.dtsi new file mode 100644 index 00000000000..538106b38b1 --- /dev/null +++ b/tests/boards/nrf/qdec/boards/nrf54l15pdk_nrf54l15_common.dtsi @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Nordic Semiconductor ASA + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + aliases { + qdec0 = &qdec20; + qenca = &phase_a; + qencb = &phase_b; + }; + + encoder-emulate { + compatible = "gpio-leds"; + phase_a: phase_a { + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + }; + phase_b: phase_b { + gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pinctrl { + qdec_pinctrl: qdec_pinctrl { + group1 { + psels = , + ; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&qdec20 { + status = "okay"; + pinctrl-0 = <&qdec_pinctrl>; + pinctrl-names = "default"; + steps = <127>; + led-pre = <500>; +};