blob: f5ac9181bc23d4326d7059544b46af9647d1b0c1 [file] [log] [blame]
/*
* Copyright (c) 2021 Yonatan Schachter
* Copyright (c) 2022 Peter Johanson
* Copyright (c) 2025 Jonas Berg
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <raspberrypi/rpi_pico/rp2040.dtsi>
#include <dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/led/led.h>
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
#include "rp2040_geek-pincontrol.dtsi"
/ {
model = "Waveshare RP2040 GEEK";
compatible = "waveshare,rp2040-geek";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,flash-controller = &ssi;
zephyr,code-partition = &code_partition;
zephyr,display = &st7789v_135x240;
uart,passthrough = &uart1;
};
aliases {
watchdog0 = &wdt0;
};
mipi_dbi_st7789v_waveshare_135x240 {
compatible = "zephyr,mipi-dbi-spi";
spi-dev = <&spi1>;
dc-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
write-only;
#address-cells = <1>;
#size-cells = <0>;
st7789v_135x240: st7789v@0 {
/* Values inspired by
* boards/shields/st7789v_generic/st7789v_waveshare_240x240.overlay
*/
compatible = "sitronix,st7789v";
mipi-max-frequency = <20000000>;
reg = <0>;
width = <135>;
height = <240>;
x-offset = <52>;
y-offset = <40>;
vcom = <0x19>;
gctrl = <0x35>;
vrhs = <0x12>;
vdvs = <0x20>;
mdac = <0x00>;
gamma = <0x01>;
colmod = <0x05>;
lcm = <0x2c>;
porch-param = [0c 0c 00 33 33];
cmd2en-param = [5a 69 02 01];
pwctrl1-param = [a4 a1];
pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23];
nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23];
ram-param = [00 F0];
rgb-param = [CD 08 14];
mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE";
};
};
};
&flash0 {
reg = <0x10000000 DT_SIZE_M(4)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserved memory for the second stage bootloader */
second_stage_bootloader: partition@0 {
label = "second_stage_bootloader";
reg = <0x00000000 0x100>;
read-only;
};
/*
* Usable flash. Starts at 0x100, after the bootloader. The partition
* size is 4 MB minus the 0x100 bytes taken by the bootloader.
*/
code_partition: partition@100 {
label = "code-partition";
reg = <0x100 (DT_SIZE_M(4) - 0x100)>;
read-only;
};
};
};
&gpio0 {
status = "okay";
};
&uart1 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};
zephyr_i2c: &i2c0 {
status = "okay";
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_FAST>;
};
&spi0 {
pinctrl-0 = <&spi0_default>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
sdhc0: sdhc@0 {
compatible = "zephyr,sdhc-spi-slot";
reg = <0>;
status = "okay";
spi-max-frequency = <12000000>;
mmc {
compatible = "zephyr,sdmmc-disk";
disk-name = "SD";
status = "okay";
};
};
};
&spi1 {
pinctrl-0 = <&spi1_default>;
pinctrl-names = "default";
status = "okay";
cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
};
&adc {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
};
&timer {
status = "okay";
};
&wdt0 {
status = "okay";
};
zephyr_udc0: &usbd {
status = "okay";
};
&die_temp {
status = "okay";
};
&vreg {
regulator-always-on;
regulator-allowed-modes = <REGULATOR_RPI_PICO_MODE_NORMAL>;
};
&xosc {
startup-delay-multiplier = <64>;
};
#include <../boards/common/usb/cdc_acm_serial.dtsi>