Skip to content

Commit 7258aee

Browse files
committed
applications: nrf_desktop: Align DTS configurations to allow using USB next
Change adds USB HID next configuration to DTS configurations. Jira: NCSDK-27014 Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
1 parent 4ef5389 commit 7258aee

File tree

13 files changed

+763
-0
lines changed

13 files changed

+763
-0
lines changed

applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/app.overlay

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
/ {
2+
/* Configure DTS nodes used for USB next HID support. */
3+
hid_dev_0: hid_dev_0 {
4+
compatible = "zephyr,hid-device";
5+
interface-name = "HID0";
6+
protocol-code = "none";
7+
in-polling-rate = <1000>;
8+
in-report-size = <64>;
9+
};
10+
hid_dev_1: hid_dev_1 {
11+
compatible = "zephyr,hid-device";
12+
interface-name = "HID1";
13+
protocol-code = "none";
14+
in-polling-rate = <1000>;
15+
in-report-size = <64>;
16+
};
17+
218
gpioled1 {
319
compatible = "gpio-leds";
420
status = "okay";

applications/nrf_desktop/configuration/nrf52833dk_nrf52820/app.overlay

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
/ {
2+
/* Configure DTS nodes used for USB next HID support. */
3+
hid_dev_0: hid_dev_0 {
4+
compatible = "zephyr,hid-device";
5+
interface-name = "HID0";
6+
protocol-code = "none";
7+
in-polling-rate = <1000>;
8+
in-report-size = <64>;
9+
};
10+
hid_dev_1: hid_dev_1 {
11+
compatible = "zephyr,hid-device";
12+
interface-name = "HID1";
13+
protocol-code = "none";
14+
in-polling-rate = <1000>;
15+
in-report-size = <64>;
16+
};
17+
218
gpioled0 {
319
compatible = "gpio-leds";
420
status = "okay";

applications/nrf_desktop/configuration/nrf52833dk_nrf52833/app.overlay

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
/ {
2+
/* Configure DTS nodes used for USB next HID support. */
3+
hid_dev_0: hid_dev_0 {
4+
compatible = "zephyr,hid-device";
5+
interface-name = "HID0";
6+
protocol-code = "none";
7+
in-polling-rate = <1000>;
8+
in-report-size = <64>;
9+
};
10+
hid_dev_1: hid_dev_1 {
11+
compatible = "zephyr,hid-device";
12+
interface-name = "HID1";
13+
protocol-code = "none";
14+
in-polling-rate = <1000>;
15+
in-report-size = <64>;
16+
};
17+
218
pwmleds1 {
319
compatible = "pwm-leds";
420
status = "okay";

applications/nrf_desktop/configuration/nrf52833dongle_nrf52833/app.overlay

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
/ {
2+
/* Configure DTS nodes used for USB next HID support. */
3+
hid_dev_0: hid_dev_0 {
4+
compatible = "zephyr,hid-device";
5+
interface-name = "HID0";
6+
protocol-code = "none";
7+
in-polling-rate = <1000>;
8+
in-report-size = <64>;
9+
};
10+
hid_dev_1: hid_dev_1 {
11+
compatible = "zephyr,hid-device";
12+
interface-name = "HID1";
13+
protocol-code = "none";
14+
in-polling-rate = <1000>;
15+
in-report-size = <64>;
16+
};
17+
218
pwmleds0 {
319
compatible = "pwm-leds";
420
status = "okay";

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/app.overlay

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
zephyr,entropy = &rng;
1111
};
1212

13+
/* Configure DTS nodes used for USB next HID support. */
14+
hid_dev_0: hid_dev_0 {
15+
compatible = "zephyr,hid-device";
16+
interface-name = "HID0";
17+
protocol-code = "mouse";
18+
in-polling-rate = <1000>;
19+
in-report-size = <64>;
20+
};
21+
1322
pwmleds1 {
1423
compatible = "pwm-leds";
1524
status = "okay";
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
/ {
2+
chosen {
3+
/*
4+
* In some default configurations within the nRF Connect SDK,
5+
* e.g. on nRF52840 and nRF9160, the chosen zephyr,entropy node
6+
* is &cryptocell. This devicetree overlay ensures that default
7+
* is overridden wherever it is set, as this application uses
8+
* the RNG node for entropy exclusively.
9+
*/
10+
zephyr,entropy = &rng;
11+
};
12+
13+
/* Configure DTS nodes used for USB next HID support. */
14+
hid_dev_0: hid_dev_0 {
15+
compatible = "zephyr,hid-device";
16+
interface-name = "HID0";
17+
protocol-code = "keyboard";
18+
in-polling-rate = <1000>;
19+
in-report-size = <64>;
20+
};
21+
hid_dev_1: hid_dev_1 {
22+
compatible = "zephyr,hid-device";
23+
interface-name = "HID1";
24+
protocol-code = "keyboard";
25+
in-polling-rate = <1000>;
26+
in-report-size = <64>;
27+
};
28+
29+
pwmleds1 {
30+
compatible = "pwm-leds";
31+
status = "okay";
32+
33+
pwm_led1: led_pwm_1 {
34+
status = "okay";
35+
pwms = <&pwm1 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
36+
label = "LED Conn State";
37+
};
38+
};
39+
40+
pwmleds2 {
41+
compatible = "pwm-leds";
42+
status = "okay";
43+
44+
pwm_led2: led_pwm_2 {
45+
status = "okay";
46+
pwms = <&pwm2 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
47+
label = "LED Num Lock";
48+
};
49+
};
50+
51+
pwmleds3 {
52+
compatible = "pwm-leds";
53+
status = "okay";
54+
55+
pwm_led3: led_pwm_3 {
56+
status = "okay";
57+
pwms = <&pwm3 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
58+
label = "LED Caps Lock";
59+
};
60+
};
61+
};
62+
63+
&pwm0 {
64+
status = "okay";
65+
pinctrl-0 = <&pwm0_default_alt>;
66+
pinctrl-1 = <&pwm0_sleep_alt>;
67+
pinctrl-names = "default", "sleep";
68+
};
69+
70+
&pwm1 {
71+
status = "okay";
72+
pinctrl-0 = <&pwm1_default_alt>;
73+
pinctrl-1 = <&pwm1_sleep_alt>;
74+
pinctrl-names = "default", "sleep";
75+
};
76+
77+
&pwm2 {
78+
status = "okay";
79+
pinctrl-0 = <&pwm2_default_alt>;
80+
pinctrl-1 = <&pwm2_sleep_alt>;
81+
pinctrl-names = "default", "sleep";
82+
};
83+
84+
&pwm3 {
85+
status = "okay";
86+
pinctrl-0 = <&pwm3_default_alt>;
87+
pinctrl-1 = <&pwm3_sleep_alt>;
88+
pinctrl-names = "default", "sleep";
89+
};
90+
91+
&pwm_led0 {
92+
status = "okay";
93+
pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
94+
label = "LED System State";
95+
};
96+
97+
&pinctrl {
98+
pwm0_default_alt: pwm0_default_alt {
99+
group1 {
100+
psels = <NRF_PSEL(PWM_OUT0, 0, 13)>;
101+
nordic,invert;
102+
};
103+
};
104+
105+
pwm0_sleep_alt: pwm0_sleep_alt {
106+
group1 {
107+
psels = <NRF_PSEL(PWM_OUT0, 0, 13)>;
108+
low-power-enable;
109+
};
110+
};
111+
112+
pwm1_default_alt: pwm1_default_alt {
113+
group1 {
114+
psels = <NRF_PSEL(PWM_OUT0, 0, 14)>;
115+
nordic,invert;
116+
};
117+
};
118+
119+
pwm1_sleep_alt: pwm1_sleep_alt {
120+
group1 {
121+
psels = <NRF_PSEL(PWM_OUT0, 0, 14)>;
122+
low-power-enable;
123+
};
124+
};
125+
126+
pwm2_default_alt: pwm2_default_alt {
127+
group1 {
128+
psels = <NRF_PSEL(PWM_OUT0, 0, 15)>;
129+
nordic,invert;
130+
};
131+
};
132+
133+
pwm2_sleep_alt: pwm2_sleep_alt {
134+
group1 {
135+
psels = <NRF_PSEL(PWM_OUT0, 0, 15)>;
136+
low-power-enable;
137+
};
138+
};
139+
140+
pwm3_default_alt: pwm3_default_alt {
141+
group1 {
142+
psels = <NRF_PSEL(PWM_OUT0, 0, 16)>;
143+
nordic,invert;
144+
};
145+
};
146+
147+
pwm3_sleep_alt: pwm3_sleep_alt {
148+
group1 {
149+
psels = <NRF_PSEL(PWM_OUT0, 0, 16)>;
150+
low-power-enable;
151+
};
152+
};
153+
};

0 commit comments

Comments
 (0)