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 <tarang.raval@siliconsignals.io>
This commit is contained in:
parent
9863dc9fd8
commit
31eee15fcd
3 changed files with 16 additions and 5 deletions
7
dts/arm/rpi_pico/override.dtsi
Normal file
7
dts/arm/rpi_pico/override.dtsi
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/*
|
||||
* File intentionally left blank. Will be used when there is no other
|
||||
* higher-priority override.dtsi file in use.
|
||||
*/
|
||||
|
|
@ -10,9 +10,17 @@
|
|||
#include <zephyr/dt-bindings/clock/rpi_pico_clock.h>
|
||||
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||
#include <zephyr/dt-bindings/regulator/rpi_pico.h>
|
||||
#include <zephyr/dt-bindings/reset/rpi_pico_reset.h>
|
||||
#include <mem.h>
|
||||
|
||||
#include "rpi_pico_common.dtsi"
|
||||
#include <arm/rpi_pico/override.dtsi>
|
||||
/*
|
||||
* This value can be overridden at the board level or in an application specific
|
||||
* override.dtsi file.
|
||||
*/
|
||||
#ifndef RPI_PICO_DEFAULT_IRQ_PRIORITY
|
||||
#define RPI_PICO_DEFAULT_IRQ_PRIORITY 3
|
||||
#endif
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef RPI_PICO_DEFAULT_IRQ_PRIORITY
|
||||
#define RPI_PICO_DEFAULT_IRQ_PRIORITY 3
|
||||
#endif
|
||||
|
||||
#define RPI_PICO_RESETS_RESET_ADC 0
|
||||
#define RPI_PICO_RESETS_RESET_BUSCTRL 1
|
||||
#define RPI_PICO_RESETS_RESET_DMA 2
|
||||
Loading…
Reference in a new issue