Skip to content

rpi_pico: Fix DTC warnings #53431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards/arm/rpi_pico/rpi_pico.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,flash-controller = &flash_controller;
zephyr,flash-controller = &ssi;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,code-partition = &code_partition;
Expand Down
7 changes: 4 additions & 3 deletions drivers/flash/flash_rpi_pico.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ LOG_MODULE_REGISTER(flash_rpi_pico, CONFIG_FLASH_LOG_LEVEL);
#define DT_DRV_COMPAT raspberrypi_pico_flash_controller

#define PAGE_SIZE 256
#define SECTOR_SIZE DT_PROP(DT_CHILD(DT_NODELABEL(flash_controller), flash_0), erase_block_size)
#define SECTOR_SIZE DT_PROP(DT_CHOSEN(zephyr_flash), erase_block_size)
#define ERASE_VALUE 0xff
#define FLASH_SIZE KB(CONFIG_FLASH_SIZE)
#define FLASH_BASE DT_REG_ADDR(DT_NODELABEL(flash_controller))
#define FLASH_BASE CONFIG_FLASH_BASE_ADDRESS
#define SSI_BASE_ADDRESS DT_REG_ADDR(DT_CHOSEN(zephyr_flash_controller))

static const struct flash_parameters flash_rpi_parameters = {
.write_block_size = 1,
Expand All @@ -56,7 +57,7 @@ enum outover {
OUTOVER_HIGH
};

static ssi_hw_t *const ssi = (ssi_hw_t *)XIP_SSI_BASE;
static ssi_hw_t *const ssi = (ssi_hw_t *)SSI_BASE_ADDRESS;
static uint32_t boot2_copyout[BOOT2_SIZE_WORDS];
static bool boot2_copyout_valid;

Expand Down
17 changes: 7 additions & 10 deletions dts/arm/rpi_pico/rp2040.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@
reg = <0x20000000 DT_SIZE_K(264)>;
};

flash_controller: flash-controller@10000000 {
ssi: flash-controller@18000000 {
compatible = "raspberrypi,pico-flash-controller";
reg = <0x10000000 DT_SIZE_K(4)>;
interrupts = <15 0>;
reg = <0x18000000 0xfc>;

#address-cells = <1>;
#size-cells = <1>;

flash0: flash@0 {
flash0: flash@10000000 {
compatible = "soc-nv-flash";
write-block-size = <1>;
erase-block-size = <DT_SIZE_K(4)>;
Expand All @@ -68,12 +67,6 @@
#reset-cells = <1>;
};

pinctrl: pin-controller@40014000 {
compatible = "raspberrypi,pico-pinctrl";
reg = <0x40014000 DT_SIZE_K(4)>;
status = "okay";
};

gpio0: gpio@40014000 {
compatible = "raspberrypi,pico-gpio";
reg = <0x40014000 DT_SIZE_K(4)>;
Expand Down Expand Up @@ -188,6 +181,10 @@
#pwm-cells = <3>;
};
};

pinctrl: pin-controller {
compatible = "raspberrypi,pico-pinctrl";
};
};

&nvic {
Expand Down