zephyr_ircam/boards/xtensa/elecrow_esp_terminal/elecrow_esp_terminal.dts
2024-01-06 22:03:44 +01:00

207 lines
No EOL
3.5 KiB
Text

/*
* # Copyright (c) 2024 PM
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <espressif/esp32s3/esp32s3_wroom_n16r8.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <zephyr/dt-bindings/display/ili9xxx.h>
#include "elecrow_esp_terminal-pinctrl.dtsi"
/ {
model = "elecrow_esp_terminal";
compatible = "espressif,esp32s3";
aliases {
i2c-0 = &i2c0;
watchdog0 = &wdt0;
uart-0 = &uart0;
sw0 = &button0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,display = &ili9488;
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "BOOT Button";
zephyr,code = <INPUT_KEY_0>;
};
};
lcd_backlight_en {
compatible = "regulator-fixed";
regulator-name = "lcd_backlight_enable";
enable-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
regulator-boot-on;
};
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&ft5336_touch>;
swap-xy;
};
};
&cpu0 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&cpu1 {
clock-frequency = <ESP32_CLK_CPU_240M>;
};
&usb_serial {
status = "okay";
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&i2c0 {
clock-frequency = <I2C_BITRATE_FAST>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
status = "okay";
ft5336_touch: ft5336@38 {
status = "okay";
compatible = "focaltech,ft5336";
reg = <0x38>;
int-gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
ov2640: ov2640@30 {
status = "okay";
compatible = "ovti,ov2640";
reg = <0x30>;
};
};
&spi2 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-0 = <&spim2_default>;
pinctrl-names = "default";
use-iomux;
dma-enabled;
ili9488: ili9488@0 {
compatible = "ilitek,ili9488";
status = "okay";
spi-max-frequency = <40000000>;
reg = <0>;
cmd-data-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB888>; // ili9488 does NOT work with 565, only 888 (666)
rotation = <270>;
width = <480>;
height = <320>;
};
sdhc0: sdhc@1 {
compatible = "zephyr,sdhc-spi-slot";
reg = <1>;
status = "okay";
mmc {
compatible = "zephyr,sdmmc-disk";
status = "okay";
};
spi-max-frequency = <20000000>;
};
};
&timer0 {
status = "disabled";
};
&timer1 {
status = "disabled";
};
&timer2 {
status = "disabled";
};
&timer3 {
status = "disabled";
};
&wdt0 {
status = "okay";
};
&trng0 {
status = "okay";
};
&usb_serial {
status = "disabled";
};
&flash0 {
status = "okay";
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/* Reserve 64kB for the bootloader */
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 0x00010000>;
read-only;
};
/* Reserve 1024kB for the application in slot 0 */
slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 0x00100000>;
};
/* Reserve 1024kB for the application in slot 1 */
slot1_partition: partition@110000 {
label = "image-1";
reg = <0x00110000 0x00100000>;
};
/* Reserve 256kB for the scratch partition */
scratch_partition: partition@210000 {
label = "image-scratch";
reg = <0x00210000 0x00040000>;
};
storage_partition: partition@250000 {
label = "storage";
reg = <0x00250000 0x00006000>;
};
};
};
// &psram0 {
// status = "okay";
// };