428 lines
11 KiB
Plaintext
428 lines
11 KiB
Plaintext
/*
|
|
* Copyright (c) 2021 Yonatan Schachter
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <arm/armv6-m.dtsi>
|
|
#include <zephyr/dt-bindings/adc/adc.h>
|
|
#include <zephyr/dt-bindings/gpio/gpio.h>
|
|
#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 <mem.h>
|
|
|
|
#include "rpi_pico_common.dtsi"
|
|
|
|
/ {
|
|
aliases {
|
|
die-temp0 = &die_temp;
|
|
};
|
|
|
|
cpus {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
cpu0: cpu@0 {
|
|
compatible = "arm,cortex-m0+";
|
|
reg = <0>;
|
|
};
|
|
|
|
cpu1: cpu@1 {
|
|
compatible = "arm,cortex-m0+";
|
|
reg = <1>;
|
|
};
|
|
};
|
|
|
|
clocks {
|
|
clk_gpout0: clk-gpout0 {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_sys>;
|
|
clock-names = "pll_sys";
|
|
clock-frequency = <125000000>;
|
|
#clock-cells = <0>;
|
|
#address-cells = <0>;
|
|
};
|
|
|
|
clk_gpout1: clk-gpout1 {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_sys>;
|
|
clock-names = "pll_sys";
|
|
clock-frequency = <125000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_gpout2: clk-gpout2 {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_sys>;
|
|
clock-names = "pll_sys";
|
|
clock-frequency = <125000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_gpout3: clk-gpout3 {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_sys>;
|
|
clock-names = "pll_sys";
|
|
clock-frequency = <125000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_ref: clk-ref {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&xosc>;
|
|
clock-names = "xosc";
|
|
clock-frequency = <12000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_sys: clk-sys {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_sys>;
|
|
clock-names = "pll_sys";
|
|
clock-frequency = <125000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_usb: clk-usb {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_usb>;
|
|
clock-names = "pll_usb";
|
|
clock-frequency = <48000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_adc: clk-adc {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_usb>;
|
|
clock-names = "pll_usb";
|
|
clock-frequency = <48000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_rtc: clk-rtc {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&pll_usb>;
|
|
clock-names = "pll_usb";
|
|
clock-frequency = <46875>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
clk_peri: clk-peri {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clocks = <&clk_sys>;
|
|
clock-names = "clk_sys";
|
|
clock-frequency = <125000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
pll_sys: pll-sys {
|
|
compatible = "raspberrypi,pico-pll";
|
|
clocks = <&xosc>;
|
|
clock-names = "xosc";
|
|
clock-div= <1>;
|
|
fb-div= <125>;
|
|
post-div1 = <6>;
|
|
post-div2 = <2>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
pll_usb: pll-usb {
|
|
compatible = "raspberrypi,pico-pll";
|
|
clocks = <&xosc>;
|
|
clock-names = "xosc";
|
|
clock-div= <1>;
|
|
fb-div = <100>;
|
|
post-div1 = <5>;
|
|
post-div2 = <5>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
rosc: rosc {
|
|
compatible = "raspberrypi,pico-rosc";
|
|
clock-frequency = <6500000>;
|
|
range = <RPI_PICO_ROSC_RANGE_RESET>;
|
|
stage-drive-strength = <0>, <0>, <0>, <0>, <0>, <0>, <0>, <0>;
|
|
clock-div = <16>;
|
|
phase = <0>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
rosc_ph: rosc-ph {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clock-frequency = <6500000>;
|
|
clocks = <&rosc>;
|
|
clock-names = "rosc";
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
xosc: xosc {
|
|
compatible = "raspberrypi,pico-clock";
|
|
clock-frequency = <12000000>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
gpin0: gpin0 {
|
|
compatible = "raspberrypi,pico-clock";
|
|
status = "disabled";
|
|
clock-frequency = <0>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
gpin1: gpin1 {
|
|
compatible = "raspberrypi,pico-clock";
|
|
status = "disabled";
|
|
clock-frequency = <0>;
|
|
#clock-cells = <0>;
|
|
};
|
|
};
|
|
|
|
soc {
|
|
compatible = "raspberrypi,rp2040", "simple-bus";
|
|
|
|
sram0: memory@20000000 {
|
|
compatible = "mmio-sram";
|
|
reg = <0x20000000 DT_SIZE_K(264)>;
|
|
};
|
|
|
|
ssi: flash-controller@18000000 {
|
|
compatible = "raspberrypi,pico-flash-controller";
|
|
reg = <0x18000000 0xfc>;
|
|
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
flash0: flash@10000000 {
|
|
compatible = "soc-nv-flash";
|
|
write-block-size = <1>;
|
|
erase-block-size = <DT_SIZE_K(4)>;
|
|
};
|
|
};
|
|
|
|
reset: reset-controller@4000c000 {
|
|
compatible = "raspberrypi,pico-reset";
|
|
reg = <0x4000c000 DT_SIZE_K(4)>;
|
|
reg-width = <4>;
|
|
active-low = <0>;
|
|
#reset-cells = <1>;
|
|
};
|
|
|
|
clocks: clock-controller@40008000 {
|
|
compatible = "raspberrypi,pico-clock-controller";
|
|
reg = <0x40008000 DT_SIZE_K(4)
|
|
0x40024000 DT_SIZE_K(4)
|
|
0x40028000 DT_SIZE_K(4)
|
|
0x4002c000 DT_SIZE_K(4)
|
|
0x40060000 DT_SIZE_K(4)>;
|
|
reg-names = "clocks", "xosc", "pll_sys", "pll_usb", "rosc";
|
|
#clock-cells = <1>;
|
|
status = "okay";
|
|
clocks = <&clk_gpout0>, <&clk_gpout1>, <&clk_gpout2>, <&clk_gpout3>,
|
|
<&clk_ref>, <&clk_sys>, <&clk_peri>,
|
|
<&clk_usb>, <&clk_adc>, <&clk_rtc>,
|
|
<&pll_sys>, <&pll_usb>, <&xosc>, <&rosc>, <&rosc_ph>,
|
|
<&gpin0>, <&gpin1>;
|
|
clock-names = "clk_gpout0", "clk_gpout1", "clk_gpout2", "clk_gpout3",
|
|
"clk_ref", "clk_sys", "clk_peri",
|
|
"clk_usb", "clk_adc", "clk_rtc",
|
|
"pll_sys", "pll_usb", "xosc", "rosc", "rosc_ph",
|
|
"gpin0", "gpin1";
|
|
};
|
|
|
|
gpio0: gpio@40014000 {
|
|
compatible = "raspberrypi,pico-gpio";
|
|
reg = <0x40014000 DT_SIZE_K(4)>;
|
|
interrupts = <13 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
status = "disabled";
|
|
ngpios = <30>;
|
|
};
|
|
|
|
uart0: uart@40034000 {
|
|
compatible = "raspberrypi,pico-uart", "arm,pl011";
|
|
reg = <0x40034000 DT_SIZE_K(4)>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_PERI>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_UART0>;
|
|
interrupts = <20 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "uart0";
|
|
status = "disabled";
|
|
};
|
|
|
|
uart1: uart@40038000 {
|
|
compatible = "raspberrypi,pico-uart", "arm,pl011";
|
|
reg = <0x40038000 DT_SIZE_K(4)>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_PERI>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_UART1>;
|
|
interrupts = <21 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "uart1";
|
|
status = "disabled";
|
|
};
|
|
|
|
spi0: spi@4003c000 {
|
|
compatible = "raspberrypi,pico-spi", "arm,pl022";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0x4003c000 DT_SIZE_K(4)>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_PERI>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_SPI0>;
|
|
interrupts = <18 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "spi0";
|
|
status = "disabled";
|
|
};
|
|
|
|
spi1: spi@40040000 {
|
|
compatible = "raspberrypi,pico-spi", "arm,pl022";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0x40040000 DT_SIZE_K(4)>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_SPI1>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_PERI>;
|
|
interrupts = <19 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "spi1";
|
|
status = "disabled";
|
|
};
|
|
|
|
adc: adc@4004c000 {
|
|
compatible = "raspberrypi,pico-adc";
|
|
reg = <0x4004c000 DT_SIZE_K(4)>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_ADC>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_ADC>;
|
|
interrupts = <22 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "adc0";
|
|
status = "disabled";
|
|
#io-channel-cells = <1>;
|
|
};
|
|
|
|
i2c0: i2c@40044000 {
|
|
compatible = "raspberrypi,pico-i2c", "snps,designware-i2c";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0x40044000 DT_SIZE_K(4)>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_I2C0>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>;
|
|
interrupts = <23 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "i2c0";
|
|
status = "disabled";
|
|
};
|
|
|
|
i2c1: i2c@40048000 {
|
|
compatible = "raspberrypi,pico-i2c", "snps,designware-i2c";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0x40048000 DT_SIZE_K(4)>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_I2C1>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>;
|
|
interrupts = <24 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "i2c1";
|
|
status = "disabled";
|
|
};
|
|
|
|
wdt0: watchdog@40058000 {
|
|
compatible = "raspberrypi,pico-watchdog";
|
|
reg = <0x40058000 DT_SIZE_K(4)>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_REF>;
|
|
status = "disabled";
|
|
};
|
|
|
|
usbd: usbd@50100000 {
|
|
compatible = "raspberrypi,pico-usbd";
|
|
reg = <0x50100000 0x10000>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_USBCTRL>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_USB>;
|
|
interrupts = <5 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "usbctrl";
|
|
num-bidir-endpoints = <16>;
|
|
status = "disabled";
|
|
};
|
|
|
|
pwm: pwm@40050000 {
|
|
compatible = "raspberrypi,pico-pwm";
|
|
reg = <0x40050000 DT_SIZE_K(4)>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_PWM>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>;
|
|
interrupts = <4 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "PWM_IRQ_WRAP";
|
|
status = "disabled";
|
|
#pwm-cells = <3>;
|
|
};
|
|
|
|
timer: timer@40054000 {
|
|
compatible = "raspberrypi,pico-timer";
|
|
reg = <0x40054000 DT_SIZE_K(4)>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_TIMER>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_REF>;
|
|
interrupts = <0 RPI_PICO_DEFAULT_IRQ_PRIORITY>,
|
|
<1 RPI_PICO_DEFAULT_IRQ_PRIORITY>,
|
|
<2 RPI_PICO_DEFAULT_IRQ_PRIORITY>,
|
|
<3 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "TIMER_IRQ_0",
|
|
"TIMER_IRQ_1",
|
|
"TIMER_IRQ_2",
|
|
"TIMER_IRQ_3";
|
|
status = "disabled";
|
|
};
|
|
|
|
dma: dma@50000000 {
|
|
compatible = "raspberrypi,pico-dma";
|
|
reg = <0x50000000 DT_SIZE_K(64)>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_DMA>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>;
|
|
interrupts = <11 RPI_PICO_DEFAULT_IRQ_PRIORITY>,
|
|
<12 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "dma0", "dma1";
|
|
dma-channels = <12>;
|
|
status = "disabled";
|
|
#dma-cells = <3>;
|
|
};
|
|
|
|
vreg: vreg@40064000 {
|
|
compatible = "raspberrypi,core-supply-regulator";
|
|
reg = <0x40064000 1>;
|
|
status = "okay";
|
|
raspberrypi,brown-out-detection;
|
|
raspberrypi,brown-out-threshold = <860000>;
|
|
};
|
|
|
|
pio0: pio@50200000 {
|
|
compatible = "raspberrypi,pico-pio";
|
|
reg = <0x50200000 DT_SIZE_K(4)>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_PIO0>;
|
|
status = "disabled";
|
|
};
|
|
|
|
pio1: pio@50300000 {
|
|
compatible = "raspberrypi,pico-pio";
|
|
reg = <0x50300000 DT_SIZE_K(4)>;
|
|
clocks = <&clocks RPI_PICO_CLKID_CLK_SYS>;
|
|
resets = <&reset RPI_PICO_RESETS_RESET_PIO1>;
|
|
status = "disabled";
|
|
};
|
|
|
|
rtc: rtc@4005c000 {
|
|
compatible = "raspberrypi,pico-rtc";
|
|
reg = <0x4005c000 DT_SIZE_K(4)>;
|
|
interrupts = <25 RPI_PICO_DEFAULT_IRQ_PRIORITY>;
|
|
interrupt-names = "rtc";
|
|
resets = <&reset RPI_PICO_RESETS_RESET_RTC>;
|
|
alarms-count = <1>;
|
|
status = "disabled";
|
|
};
|
|
};
|
|
|
|
pinctrl: pin-controller {
|
|
compatible = "raspberrypi,pico-pinctrl";
|
|
};
|
|
|
|
die_temp: dietemp {
|
|
compatible = "raspberrypi,pico-temp";
|
|
io-channels = <&adc 4>;
|
|
status = "disabled";
|
|
};
|
|
};
|
|
|
|
&nvic {
|
|
arm,num-irq-priority-bits = <2>;
|
|
};
|