1/* 2 * Copyright (c) 2021 Yonatan Schachter 3 * Copyright (c) 2022 Peter Johanson 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8/dts-v1/; 9 10#include <rpi_pico/rp2040.dtsi> 11#include "adafruit_kb2040-pinctrl.dtsi" 12#include "sparkfun_pro_micro_connector.dtsi" 13#include <freq.h> 14 15/ { 16 chosen { 17 zephyr,sram = &sram0; 18 zephyr,flash = &flash0; 19 zephyr,flash-controller = &ssi; 20 zephyr,console = &uart0; 21 zephyr,shell-uart = &uart0; 22 zephyr,code-partition = &code_partition; 23 }; 24 25 aliases { 26 watchdog0 = &wdt0; 27 }; 28 29 xtal_clk: xtal-clk { 30 compatible = "fixed-clock"; 31 clock-frequency = <12000000>; 32 #clock-cells = <0>; 33 }; 34}; 35 36&flash0 { 37 reg = <0x10000000 DT_SIZE_M(8)>; 38 39 partitions { 40 compatible = "fixed-partitions"; 41 #address-cells = <1>; 42 #size-cells = <1>; 43 44 /* Reserved memory for the second stage bootloader */ 45 second_stage_bootloader: partition@0 { 46 label = "second_stage_bootloader"; 47 reg = <0x00000000 0x100>; 48 read-only; 49 }; 50 51 /* 52 * Usable flash. Starts at 0x100, after the bootloader. The partition 53 * size is 8MB minus the 0x100 bytes taken by the bootloader. 54 */ 55 code_partition: partition@100 { 56 label = "code"; 57 reg = <0x100 (DT_SIZE_M(8) - 0x100)>; 58 read-only; 59 }; 60 }; 61}; 62 63&uart0 { 64 current-speed = <115200>; 65 status = "okay"; 66 pinctrl-0 = <&uart0_default>; 67 pinctrl-names = "default"; 68}; 69 70&spi0 { 71 status = "okay"; 72 pinctrl-0 = <&spi0_default>; 73 pinctrl-names = "default"; 74 clock-frequency = <DT_FREQ_M(8)>; 75}; 76 77&i2c1 { 78 status = "okay"; 79 pinctrl-0 = <&i2c1_default>; 80 pinctrl-names = "default"; 81 clock-frequency = <I2C_BITRATE_FAST>; 82}; 83 84&gpio0 { 85 status = "okay"; 86}; 87 88&wdt0 { 89 status = "okay"; 90}; 91 92&adc { 93 status = "okay"; 94 pinctrl-0 = <&adc_default>; 95 pinctrl-names = "default"; 96}; 97 98zephyr_udc0: &usbd { 99 status = "okay"; 100}; 101 102&vreg { 103 regulator-always-on; 104 regulator-allowed-modes = <REGULATOR_RPI_PICO_MODE_NORMAL>; 105}; 106