Skip to content

Commit a2df054

Browse files
committed
tests: drivers: gpio: Add nrf54h20dk cpuflpr support
Add nrf54h20dk cpuflpr support to GPIO tests Signed-off-by: Piotr Krzyzanowski <[email protected]>
1 parent f614322 commit a2df054

File tree

7 files changed

+216
-0
lines changed

7 files changed

+216
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
/ {
4+
aliases {
5+
led0 = &led0;
6+
};
7+
8+
leds {
9+
compatible = "gpio-leds";
10+
11+
led0: led_0 {
12+
gpios = <&gpio9 0 GPIO_ACTIVE_HIGH>;
13+
label = "Green LED 0";
14+
};
15+
};
16+
};
17+
18+
&gpiote130 {
19+
status = "okay";
20+
};
21+
22+
&gpio9 {
23+
status = "okay";
24+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
#include "nrf54h20dk_nrf54h20_common.dtsi"
4+
5+
/ {
6+
chosen {
7+
zephyr,console = &uart131;
8+
};
9+
};
10+
11+
&pinctrl {
12+
uart131_default_alt: uart131_default_alt {
13+
group1 {
14+
psels = <NRF_PSEL(UART_TX, 1, 11)>,
15+
<NRF_PSEL(UART_RX, 1, 10)>,
16+
<NRF_PSEL(UART_RTS, 1, 9)>,
17+
<NRF_PSEL(UART_CTS, 1, 7)>;
18+
};
19+
};
20+
21+
uart131_sleep_alt: uart131_sleep_alt {
22+
group1 {
23+
psels = <NRF_PSEL(UART_TX, 1, 6)>,
24+
<NRF_PSEL(UART_RX, 1, 10)>,
25+
<NRF_PSEL(UART_RTS, 1, 9)>,
26+
<NRF_PSEL(UART_CTS, 1, 7)>;
27+
low-power-enable;
28+
};
29+
};
30+
};
31+
32+
&cpuapp_dma_region {
33+
status = "okay";
34+
};
35+
36+
&uart131 {
37+
status = "okay";
38+
memory-regions = <&cpuapp_dma_region>;
39+
pinctrl-0 = <&uart131_default_alt>;
40+
pinctrl-1 = <&uart131_sleep_alt>;
41+
pinctrl-names = "default", "sleep";
42+
current-speed = <115200>;
43+
hw-flow-control;
44+
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
/ {
4+
zephyr,user {
5+
output-high-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
6+
output-low-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
7+
input-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
8+
};
9+
};
10+
11+
&gpio0 {
12+
status = "okay";
13+
14+
hog1 {
15+
gpio-hog;
16+
gpios = <3 GPIO_ACTIVE_LOW>;
17+
output-high;
18+
};
19+
20+
hog2 {
21+
gpio-hog;
22+
gpios = <4 GPIO_ACTIVE_HIGH>;
23+
output-low;
24+
};
25+
26+
hog3 {
27+
gpio-hog;
28+
gpios = <1 GPIO_ACTIVE_LOW>;
29+
input;
30+
};
31+
};
32+
33+
&gpiote130 {
34+
status = "okay";
35+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
#include "nrf54h20dk_nrf54h20_common.dtsi"
4+
5+
/ {
6+
chosen {
7+
zephyr,console = &uart131;
8+
};
9+
};
10+
11+
&pinctrl {
12+
uart131_default_alt: uart131_default_alt {
13+
group1 {
14+
psels = <NRF_PSEL(UART_TX, 1, 11)>,
15+
<NRF_PSEL(UART_RX, 1, 10)>,
16+
<NRF_PSEL(UART_RTS, 1, 9)>,
17+
<NRF_PSEL(UART_CTS, 1, 7)>;
18+
};
19+
};
20+
21+
uart131_sleep_alt: uart131_sleep_alt {
22+
group1 {
23+
psels = <NRF_PSEL(UART_TX, 1, 6)>,
24+
<NRF_PSEL(UART_RX, 1, 10)>,
25+
<NRF_PSEL(UART_RTS, 1, 9)>,
26+
<NRF_PSEL(UART_CTS, 1, 7)>;
27+
low-power-enable;
28+
};
29+
};
30+
};
31+
32+
&cpuapp_dma_region {
33+
status = "okay";
34+
};
35+
36+
&uart131 {
37+
status = "okay";
38+
memory-regions = <&cpuapp_dma_region>;
39+
pinctrl-0 = <&uart131_default_alt>;
40+
pinctrl-1 = <&uart131_sleep_alt>;
41+
pinctrl-names = "default", "sleep";
42+
current-speed = <115200>;
43+
hw-flow-control;
44+
};

tests/drivers/gpio/gpio_hogs/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tests:
1111
- nrf52840dk/nrf52840
1212
- nrf54l15dk/nrf54l15/cpuapp
1313
- nrf54h20dk/nrf54h20/cpuapp
14+
- nrf54h20dk/nrf54h20/cpuflpr
1415
- nrf54h20dk/nrf54h20/cpuppr
1516
- nucleo_g474re
1617
- nrf52_bsim
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
/ {
4+
aliases {
5+
led0 = &led0;
6+
};
7+
8+
leds {
9+
compatible = "gpio-leds";
10+
11+
led0: led_0 {
12+
gpios = <&gpio9 0 GPIO_ACTIVE_HIGH>;
13+
label = "Green LED 0";
14+
};
15+
};
16+
};
17+
18+
&gpiote130 {
19+
status = "okay";
20+
};
21+
22+
&gpio9 {
23+
status = "okay";
24+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
2+
3+
#include "nrf54h20dk_nrf54h20_common.dtsi"
4+
5+
/ {
6+
chosen {
7+
zephyr,console = &uart131;
8+
};
9+
};
10+
11+
&pinctrl {
12+
uart131_default_alt: uart131_default_alt {
13+
group1 {
14+
psels = <NRF_PSEL(UART_TX, 1, 11)>,
15+
<NRF_PSEL(UART_RX, 1, 10)>,
16+
<NRF_PSEL(UART_RTS, 1, 9)>,
17+
<NRF_PSEL(UART_CTS, 1, 7)>;
18+
};
19+
};
20+
21+
uart131_sleep_alt: uart131_sleep_alt {
22+
group1 {
23+
psels = <NRF_PSEL(UART_TX, 1, 6)>,
24+
<NRF_PSEL(UART_RX, 1, 10)>,
25+
<NRF_PSEL(UART_RTS, 1, 9)>,
26+
<NRF_PSEL(UART_CTS, 1, 7)>;
27+
low-power-enable;
28+
};
29+
};
30+
};
31+
32+
&cpuapp_dma_region {
33+
status = "okay";
34+
};
35+
36+
&uart131 {
37+
status = "okay";
38+
memory-regions = <&cpuapp_dma_region>;
39+
pinctrl-0 = <&uart131_default_alt>;
40+
pinctrl-1 = <&uart131_sleep_alt>;
41+
pinctrl-names = "default", "sleep";
42+
current-speed = <115200>;
43+
hw-flow-control;
44+
};

0 commit comments

Comments
 (0)