Skip to content

Commit 31eee15

Browse files
Siliconsignalsnashif
authored andcommitted
dts: arm: rpi_pico: remove #define from dts
Removing direct #define usage in the DTSI file and converting these definitions to use a dt-bindings header instead. Relocates the RPI_PICO_DEFAULT_IRQ_PRIORITY definition to a DTSI file and introduces an override.dtsi file. The override file is used when no other override file is present, allowing for better flexibility and compliance with Zephyr’s DTS structure. Fixes: #79719 Signed-off-by: Tarang Raval <[email protected]>
1 parent 9863dc9 commit 31eee15

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

dts/arm/rpi_pico/override.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*/
4+
/*
5+
* File intentionally left blank. Will be used when there is no other
6+
* higher-priority override.dtsi file in use.
7+
*/

dts/arm/rpi_pico/rp2040.dtsi

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@
1010
#include <zephyr/dt-bindings/clock/rpi_pico_clock.h>
1111
#include <zephyr/dt-bindings/i2c/i2c.h>
1212
#include <zephyr/dt-bindings/regulator/rpi_pico.h>
13+
#include <zephyr/dt-bindings/reset/rpi_pico_reset.h>
1314
#include <mem.h>
1415

15-
#include "rpi_pico_common.dtsi"
16+
#include <arm/rpi_pico/override.dtsi>
17+
/*
18+
* This value can be overridden at the board level or in an application specific
19+
* override.dtsi file.
20+
*/
21+
#ifndef RPI_PICO_DEFAULT_IRQ_PRIORITY
22+
#define RPI_PICO_DEFAULT_IRQ_PRIORITY 3
23+
#endif
1624

1725
/ {
1826
aliases {

dts/arm/rpi_pico/rpi_pico_common.dtsi renamed to include/zephyr/dt-bindings/reset/rpi_pico_reset.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#ifndef RPI_PICO_DEFAULT_IRQ_PRIORITY
8-
#define RPI_PICO_DEFAULT_IRQ_PRIORITY 3
9-
#endif
10-
117
#define RPI_PICO_RESETS_RESET_ADC 0
128
#define RPI_PICO_RESETS_RESET_BUSCTRL 1
139
#define RPI_PICO_RESETS_RESET_DMA 2

0 commit comments

Comments
 (0)