Skip to content

Commit 219e04c

Browse files
committed
[nrf fromlist] samples: sensor: qdec: Enable sample on nRF54L20pdk
Add overlay required to run the sample on nRF54L20pdk. Upstream PR #: 85734 Signed-off-by: Sebastian Głąb <[email protected]>
1 parent 34a2fa8 commit 219e04c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright 2024 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/* Test requires following loopbacks:
7+
* - P1.00 - P1.01
8+
* - P1.02 - P1.03
9+
*/
10+
11+
/ {
12+
aliases {
13+
qdec0 = &qdec20;
14+
qenca = &phase_a;
15+
qencb = &phase_b;
16+
};
17+
18+
encoder-emulate {
19+
compatible = "gpio-leds";
20+
phase_a: phase_a {
21+
gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
22+
};
23+
phase_b: phase_b {
24+
gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
25+
};
26+
};
27+
};
28+
29+
&pinctrl {
30+
qdec_pinctrl: qdec_pinctrl {
31+
group1 {
32+
psels = <NRF_PSEL(QDEC_A, 1, 1)>,
33+
<NRF_PSEL(QDEC_B, 1, 3)>;
34+
};
35+
};
36+
};
37+
38+
&gpio1 {
39+
status = "okay";
40+
};
41+
42+
&qdec20 {
43+
status = "okay";
44+
pinctrl-0 = <&qdec_pinctrl>;
45+
pinctrl-names = "default";
46+
steps = <120>;
47+
led-pre = <500>;
48+
};

0 commit comments

Comments
 (0)