/* * Copyright (c) 2023 Martin Kiepfer * * SPDX-License-Identifier: Apache-2.0 */ /dts-v1/; #include #include "m5stack_core2-pinctrl.dtsi" #include "grove_connectors.dtsi" #include "m5stack_mbus_connectors.dtsi" #include #include #include / { model = "M5Stack Core2 PROCPU"; compatible = "m5stack,core2"; aliases { pwr-led = &pwr_led; uart-0 = &uart0; i2c-0 = &i2c0; watchdog0 = &wdt0; rtc = &pfc8563_rtc; led0 = &led_pwr; sdhc0 = &sd0; }; chosen { zephyr,sram = &sram1; zephyr,console = &uart0; zephyr,shell-uart = &uart0; zephyr,flash = &flash0; zephyr,display = &ili9342c; zephyr,code-partition = &slot0_partition; zephyr,rtc = &pfc8563_rtc; zephyr,bt-hci = &esp32_bt_hci; zephyr,touch = &ft5336_touch; }; leds { compatible = "gpio-leds"; led_pwr: led_pwr { gpios = <&axp192_gpio 1 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; label = "Power LED"; }; }; lvgl_pointer { compatible = "zephyr,lvgl-pointer-input"; input = <&ft5336_touch>; swap-xy; }; mipi_dbi { compatible = "zephyr,mipi-dbi-spi"; dc-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; reset-gpios = <&axp192_gpio 4 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; spi-dev = <&spi3>; write-only; #address-cells = <1>; #size-cells = <0>; ili9342c: ili9342c@0 { compatible = "ilitek,ili9342c"; mipi-max-frequency = <30000000>; reg = <0>; vin-supply = <&lcd_bg>; pixel-format = ; display-inversion; width = <320>; height = <240>; rotation = <0>; }; }; bus_5v: bus_5v { compatible = "regulator-fixed"; regulator-name = "bus_5v"; enable-gpios = <&axp192_gpio 5 GPIO_ACTIVE_HIGH>; }; }; &flash0 { reg = <0x0 DT_SIZE_M(16)>; }; &psram0 { reg = <0x3f800000 DT_SIZE_M(8)>; status = "disabled"; }; &uart0 { status = "okay"; current-speed = <115200>; pinctrl-0 = <&uart0_tx_gpio1 &uart0_rx_gpio3>; pinctrl-names = "default"; }; &uart1 { status = "disabled"; current-speed = <115200>; pinctrl-0 = <&uart1_rx_gpio33 &uart1_tx_gpio32>; pinctrl-names = "default"; }; &gpio0 { status = "okay"; }; &gpio1 { status = "okay"; }; &i2c0 { status = "okay"; clock-frequency = ; sda-gpios = <&gpio0 21 GPIO_OPEN_DRAIN>; scl-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>; pinctrl-0 = <&i2c0_default>; scl-timeout-us = <0>; pinctrl-names = "default"; pfc8563_rtc: pfc8563@51 { compatible = "nxp,pcf8563"; reg = <0x51>; status = "okay"; }; axp192_pmic: axp192@34 { compatible = "x-powers,axp192"; reg = <0x34>; status = "okay"; axp192_regulator: axp192_regulator { compatible = "x-powers,axp192-regulator"; status = "okay"; vdd_mcu: DCDC1 { regulator-init-microvolt = <3350000>; regulator-min-microvolt = <3200000>; regulator-max-microvolt = <3400000>; regulator-initial-mode = ; regulator-boot-on; regulator-always-on; }; lcd_bg: DCDC3 { regulator-init-microvolt = <2800000>; regulator-min-microvolt = <2500000>; regulator-max-microvolt = <3300000>; regulator-boot-on; }; v_peri: LDO2 { regulator-init-microvolt = <3300000>; regulator-min-microvolt = <3200000>; regulator-max-microvolt = <3300000>; regulator-boot-on; }; vib_motor: LDO3 { regulator-init-microvolt = <2800000>; }; }; axp192_gpio: axp192_gpio { compatible = "x-powers,axp192-gpio"; gpio-controller; #gpio-cells = <2>; ngpios = <6>; status = "okay"; pwr_led: axp192_gpio1 { gpio-hog; gpios = <1 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; output-high; line-name = "pwr-led"; }; bus_pwr_en: axp192_gpio0 { gpio-hog; gpios = <0 0>; output-high; line-name = "bus_pwr_en"; }; }; }; ft5336_touch: ft5336@38 { compatible = "focaltech,ft5336"; reg = <0x38>; int-gpios = <&gpio1 7 0>; }; }; &i2c1 { status = "disabled"; clock-frequency = ; sda-gpios = <&gpio1 0 GPIO_OPEN_DRAIN>; scl-gpios = <&gpio1 1 GPIO_OPEN_DRAIN>; pinctrl-0 = <&i2c1_default>; pinctrl-names = "default"; }; &spi3 { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-0 = <&spim3_default>; pinctrl-names = "default"; dma-enabled; clock-frequency = <20000000>; cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>, <&gpio0 4 GPIO_ACTIVE_LOW>; sd0: sd@1 { compatible = "zephyr,sdhc-spi-slot"; reg = <1>; status = "okay"; spi-max-frequency = <20000000>; mmc { compatible = "zephyr,sdmmc-disk"; disk-name = "SD"; status = "okay"; }; }; }; &timer0 { status = "okay"; }; &timer1 { status = "okay"; }; &timer2 { status = "okay"; }; &timer3 { status = "okay"; }; &trng0 { status = "okay"; }; &esp32_bt_hci { status = "okay"; };