From 4db075fed24f7cc2b88de82a63149cea5b1253b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20G=C5=82=C4=85b?= Date: Fri, 10 May 2024 12:59:21 +0200 Subject: [PATCH] [nrf fromtree] samples: sensor: qdec: Run sample on nrf54h20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add overlay file that enables sample on nrf54h20 Application core. Signed-off-by: Sebastian Głąb (cherry picked from commit f84e082f73511789eab69577521a16040b8e1fce) --- .../boards/nrf54h20dk_nrf54h20_cpuapp.overlay | 43 +++++++++++++++++++ samples/sensor/qdec/sample.yaml | 2 + 2 files changed, 45 insertions(+) create mode 100644 samples/sensor/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.overlay diff --git a/samples/sensor/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/samples/sensor/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.overlay new file mode 100644 index 00000000000..748e06aef83 --- /dev/null +++ b/samples/sensor/qdec/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Nordic Semiconductor ASA + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + aliases { + qdec0 = &qdec130; + qenca = &phase_a; + qencb = &phase_b; + }; + + encoder-emulate { + compatible = "gpio-leds"; + phase_a: phase_a { + gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; + }; + phase_b: phase_b { + gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pinctrl { + qdec_pinctrl: qdec_pinctrl { + group1 { + psels = , + ; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&qdec130 { + status = "okay"; + pinctrl-0 = <&qdec_pinctrl>; + pinctrl-names = "default"; + steps = <120>; + led-pre = <500>; +}; diff --git a/samples/sensor/qdec/sample.yaml b/samples/sensor/qdec/sample.yaml index 8982dfccd33..52e19e8bb18 100644 --- a/samples/sensor/qdec/sample.yaml +++ b/samples/sensor/qdec/sample.yaml @@ -22,10 +22,12 @@ tests: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp - nrf54l15pdk/nrf54l15/cpuapp + - nrf54h20dk/nrf54h20/cpuapp integration_platforms: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp - nrf54l15pdk/nrf54l15/cpuapp + - nrf54h20dk/nrf54h20/cpuapp harness_config: fixture: gpio_loopback type: multi_line