/* * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd. * * SPDX-License-Identifier: Apache-2.0 */ #include #include #include #include #include #include #include #include #include / { #address-cells = <1>; #size-cells = <1>; aliases { die-temp0 = &coretemp; }; chosen { zephyr,canbus = &twai; zephyr,entropy = &trng0; zephyr,flash-controller = &flash; }; cpus { #address-cells = <1>; #size-cells = <0>; cpu0: cpu@0 { device_type = "cpu"; compatible = "espressif,xtensa-lx7"; reg = <0>; cpu-power-states = <&light_sleep &deep_sleep>; clock-source = ; clock-frequency = ; xtal-freq = ; }; power-states { light_sleep: light_sleep { compatible = "zephyr,power-state"; power-state-name = "standby"; min-residency-us = <200>; exit-latency-us = <60>; }; deep_sleep: deep_sleep { compatible = "zephyr,power-state"; power-state-name = "soft-off"; min-residency-us = <2000>; exit-latency-us = <212>; }; }; }; wifi: wifi { compatible = "espressif,esp32-wifi"; status = "disabled"; }; esp32_bt_hci: esp32_bt_hci { compatible = "espressif,esp32-bt-hci"; status = "disabled"; }; pinctrl: pin-controller { compatible = "espressif,esp32-pinctrl"; status = "okay"; }; soc { #address-cells = <1>; #size-cells = <1>; compatible = "simple-bus"; ranges; sram0: memory@3ffb0000 { compatible = "zephyr,memory-region", "mmio-sram"; reg = <0x3ffb0000 DT_SIZE_K(32)>; zephyr,memory-region = "SRAM0"; }; sram1: memory@3ffb8000 { compatible = "zephyr,memory-region", "mmio-sram"; reg = <0x3ffb8000 DT_SIZE_K(288)>; zephyr,memory-region = "SRAM1"; }; intc: interrupt-controller@3f4c2000 { #interrupt-cells = <3>; #address-cells = <0>; compatible = "espressif,esp32-intc"; interrupt-controller; reg = <0x3f4c2000 0x114>; status = "okay"; }; rtc: rtc@3f408000 { compatible = "espressif,esp32-rtc"; reg = <0x3f408000 0x0D8>; fast-clk-src = ; slow-clk-src = ; #clock-cells = <1>; status = "okay"; }; xt_wdt: xt_wdt@3f408004 { compatible = "espressif,esp32-xt-wdt"; reg = <0x3f408004 0x4>; clocks = <&rtc ESP32_MODULE_MAX>; interrupts = ; interrupt-parent = <&intc>; status = "disabled"; }; rtc_timer: rtc_timer@3f408004 { reg = <0x3f408004 0xC>; compatible = "espressif,esp32-rtc-timer"; clocks = <&rtc ESP32_MODULE_MAX>; interrupts = ; interrupt-parent = <&intc>; status = "okay"; }; flash: flash-controller@3f402000 { compatible = "espressif,esp32-flash-controller"; reg = <0x3f402000 0x1000>; #address-cells = <1>; #size-cells = <1>; flash0: flash@0 { compatible = "soc-nv-flash"; erase-block-size = <4096>; write-block-size = <4>; /* Flash size is specified in SOC/SIP dtsi */ }; }; psram0: psram@3f500000 { device_type = "memory"; compatible = "mmio-sram"; /* PSRAM size is specified in SOC/SIP dtsi */ reg = <0x3f500000 DT_SIZE_M(2)>; status = "disabled"; }; uart0: uart@3f400000 { compatible = "espressif,esp32-uart"; reg = <0x3f400000 0x400>; status = "disabled"; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_UART0_MODULE>; }; uart1: uart@3f410000 { compatible = "espressif,esp32-uart"; reg = <0x3f410000 0x400>; status = "disabled"; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_UART1_MODULE>; current-speed = <115200>; }; pcnt: pcnt@3f417000 { compatible = "espressif,esp32-pcnt"; reg = <0x3f417000 0x1000>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_PCNT_MODULE>; status = "disabled"; }; ledc0: ledc@3f419000 { compatible = "espressif,esp32-ledc"; pwm-controller; #pwm-cells = <3>; reg = <0x3f419000 0x1000>; clocks = <&rtc ESP32_LEDC_MODULE>; status = "disabled"; }; gpio0: gpio@3f404000 { compatible = "espressif,esp32-gpio"; gpio-controller; #gpio-cells = <2>; reg = <0x3f404000 0x800>; interrupts = ; interrupt-parent = <&intc>; /* Maximum available pins (per port) * Actual occupied pins are specified * on part number dtsi level, using * the `gpio-reserved-ranges` property. */ ngpios = <32>; /* 0..31 */ }; gpio1: gpio@3f404800 { compatible = "espressif,esp32-gpio"; gpio-controller; #gpio-cells = <2>; reg = <0x3f404800 0x800>; interrupts = ; interrupt-parent = <&intc>; ngpios = <22>; /* 32..53 */ }; touch: touch@3f40885c { compatible = "espressif,esp32-touch"; reg = <0x3f40885c 0xc0 0x3f408104 0x18>; interrupts = ; interrupt-parent = <&intc>; status = "disabled"; }; i2c0: i2c@3f413000 { compatible = "espressif,esp32-i2c"; #address-cells = <1>; #size-cells = <0>; reg = <0x3f413000 0x1000>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_I2C0_MODULE>; status = "disabled"; }; i2c1: i2c@3f427000 { compatible = "espressif,esp32-i2c"; #address-cells = <1>; #size-cells = <0>; reg = <0x3f427000 0x1000>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_I2C1_MODULE>; status = "disabled"; }; timer0: counter@3f41f000 { compatible = "espressif,esp32-timer"; reg = <0x3f41f000 DT_SIZE_K(4)>; clocks = <&rtc ESP32_TIMG0_MODULE>; group = <0>; index = <0>; interrupts = ; interrupt-parent = <&intc>; status = "disabled"; }; timer1: counter@3f41f024 { compatible = "espressif,esp32-timer"; reg = <0x3f41f024 DT_SIZE_K(4)>; clocks = <&rtc ESP32_TIMG0_MODULE>; group = <0>; index = <1>; interrupts = ; interrupt-parent = <&intc>; status = "disabled"; }; timer2: counter@3f420000 { compatible = "espressif,esp32-timer"; reg = <0x3f420000 DT_SIZE_K(4)>; clocks = <&rtc ESP32_TIMG1_MODULE>; group = <1>; index = <0>; interrupts = ; interrupt-parent = <&intc>; status = "disabled"; }; timer3: counter@3f420024 { compatible = "espressif,esp32-timer"; reg = <0x3f420024 DT_SIZE_K(4)>; clocks = <&rtc ESP32_TIMG1_MODULE>; group = <1>; index = <1>; interrupts = ; interrupt-parent = <&intc>; }; trng0: trng@3f435110 { compatible = "espressif,esp32-trng"; reg = <0x3f435110 0x4>; status = "disabled"; }; spi2: spi@3f424000 { compatible = "espressif,esp32-spi"; reg = <0x3f424000 DT_SIZE_K(4)>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_FSPI_MODULE>; dma-clk = ; dma-host = <0>; status = "disabled"; }; spi3: spi@3f425000 { compatible = "espressif,esp32-spi"; reg = <0x3f425000 DT_SIZE_K(4)>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_HSPI_MODULE>; dma-clk = ; dma-host = <1>; status = "disabled"; }; wdt0: watchdog@3f41f048 { compatible = "espressif,esp32-watchdog"; reg = <0x3f41f048 0x20>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_TIMG0_MODULE>; status = "disabled"; }; wdt1: watchdog@3f42f048 { compatible = "espressif,esp32-watchdog"; reg = <0x3f42f048 0x20>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_TIMG1_MODULE>; status = "disabled"; }; dac: dac@3f408800 { compatible = "espressif,esp32-dac"; reg = <0x3f408800 0x100>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_PERIPH_SARADC_MODULE>; #io-channel-cells = <1>; }; coretemp: coretemp@3f408800 { compatible = "espressif,esp32-temp"; friendly-name = "coretemp"; reg = <0x3f408800 0x4>; status = "disabled"; }; adc0: adc@3f440018 { compatible = "espressif,esp32-adc"; reg = <0x3f440018 100>; unit = <1>; channel-count = <10>; #io-channel-cells = <1>; status = "disabled"; }; adc1: adc@3f440028 { compatible = "espressif,esp32-adc"; reg = <0x3f440028 100>; unit = <2>; channel-count = <10>; #io-channel-cells = <1>; status = "disabled"; }; twai: can@3f42b000 { compatible = "espressif,esp32-twai"; reg = <0x3f42b000 DT_SIZE_K(4)>; interrupts = ; interrupt-parent = <&intc>; clocks = <&rtc ESP32_TWAI_MODULE>; status = "disabled"; }; }; };