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:
Tarang Raval 2024-11-10 20:09:38 +05:30 committed by Anas Nashif
parent 9863dc9fd8
commit 31eee15fcd
3 changed files with 16 additions and 5 deletions

View 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.
*/

View file

@ -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 {

View file

@ -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