|
| 1 | +/* |
| 2 | + * Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | +#include <mem.h> |
| 7 | +#include <xtensa/xtensa.dtsi> |
| 8 | +#include <zephyr/dt-bindings/gpio/gpio.h> |
| 9 | +#include <zephyr/dt-bindings/clock/esp32s3_clock.h> |
| 10 | +#include <zephyr/dt-bindings/interrupt-controller/esp32s3-xtensa-intmux.h> |
| 11 | +#include <dt-bindings/pinctrl/esp32s3-pinctrl.h> |
| 12 | + |
| 13 | +/ { |
| 14 | + chosen { |
| 15 | + zephyr,flash-controller = &flash; |
| 16 | + }; |
| 17 | + |
| 18 | + cpus { |
| 19 | + #address-cells = <1>; |
| 20 | + #size-cells = <0>; |
| 21 | + |
| 22 | + cpu0: cpu@0 { |
| 23 | + device_type = "cpu"; |
| 24 | + compatible = "cdns,tensilica-xtensa-lx7"; |
| 25 | + reg = <0>; |
| 26 | + }; |
| 27 | + |
| 28 | + cpu1: cpu@1 { |
| 29 | + device_type = "cpu"; |
| 30 | + compatible = "cdns,tensilica-xtensa-lx7"; |
| 31 | + reg = <1>; |
| 32 | + }; |
| 33 | + |
| 34 | + }; |
| 35 | + |
| 36 | + pinctrl: pin-controller { |
| 37 | + compatible = "espressif,esp32-pinctrl"; |
| 38 | + status = "okay"; |
| 39 | + }; |
| 40 | + |
| 41 | + soc { |
| 42 | + #address-cells = <1>; |
| 43 | + #size-cells = <1>; |
| 44 | + compatible = "simple-bus"; |
| 45 | + ranges; |
| 46 | + |
| 47 | + sram0: memory@3fc88000 { |
| 48 | + compatible = "mmio-sram"; |
| 49 | + reg = <0x3fc88000 0x77FFF>; |
| 50 | + }; |
| 51 | + |
| 52 | + intc: interrupt-controller@600c2000 { |
| 53 | + #interrupt-cells = <1>; |
| 54 | + compatible = "espressif,esp32-intc"; |
| 55 | + interrupt-controller; |
| 56 | + reg = <0x600c2000 0x1000>; |
| 57 | + status = "okay"; |
| 58 | + }; |
| 59 | + |
| 60 | + rtc: rtc@60021000 { |
| 61 | + compatible = "espressif,esp32-rtc"; |
| 62 | + reg = <0x60021000 0x2000>; |
| 63 | + xtal-freq = <ESP32_CLK_XTAL_40M>; |
| 64 | + #clock-cells = <1>; |
| 65 | + status = "okay"; |
| 66 | + |
| 67 | + rtc_timer: rtc_timer { |
| 68 | + compatible = "espressif,esp32-rtc-timer"; |
| 69 | + slow-clk-freq = <ESP32_RTC_SLOW_CLK_FREQ_150K>; |
| 70 | + interrupts = <RTC_CORE_INTR_SOURCE>; |
| 71 | + interrupt-parent = <&intc>; |
| 72 | + status = "okay"; |
| 73 | + }; |
| 74 | + }; |
| 75 | + |
| 76 | + flash: flash-controller@60002000 { |
| 77 | + compatible = "espressif,esp32-flash-controller"; |
| 78 | + reg = <0x60002000 0x1000>; |
| 79 | + /* interrupts = <3 0>; */ |
| 80 | + |
| 81 | + #address-cells = <1>; |
| 82 | + #size-cells = <1>; |
| 83 | + |
| 84 | + flash0: flash@0 { |
| 85 | + compatible = "soc-nv-flash"; |
| 86 | + reg = <0 0x800000>; |
| 87 | + erase-block-size = <4096>; |
| 88 | + write-block-size = <4>; |
| 89 | + }; |
| 90 | + }; |
| 91 | + |
| 92 | + uart0: uart@60000000 { |
| 93 | + compatible = "espressif,esp32-uart"; |
| 94 | + reg = <0x60000000 0x1000>; |
| 95 | + interrupts = <UART0_INTR_SOURCE>; |
| 96 | + interrupt-parent = <&intc>; |
| 97 | + clocks = <&rtc ESP32_UART0_MODULE>; |
| 98 | + status = "disabled"; |
| 99 | + }; |
| 100 | + |
| 101 | + uart1: uart@60010000 { |
| 102 | + compatible = "espressif,esp32-uart"; |
| 103 | + reg = <0x60010000 0x1000>; |
| 104 | + interrupts = <UART1_INTR_SOURCE>; |
| 105 | + interrupt-parent = <&intc>; |
| 106 | + clocks = <&rtc ESP32_UART1_MODULE>; |
| 107 | + status = "disabled"; |
| 108 | + }; |
| 109 | + |
| 110 | + uart2: uart@6002e000 { |
| 111 | + compatible = "espressif,esp32-uart"; |
| 112 | + reg = <0x6002e000 0x1000>; |
| 113 | + interrupts = <UART2_INTR_SOURCE>; |
| 114 | + interrupt-parent = <&intc>; |
| 115 | + clocks = <&rtc ESP32_UART2_MODULE>; |
| 116 | + status = "disabled"; |
| 117 | + }; |
| 118 | + |
| 119 | + gpio: gpio { |
| 120 | + compatible = "simple-bus"; |
| 121 | + gpio-map-mask = <0xffffffe0 0xffffffc0>; |
| 122 | + gpio-map-pass-thru = <0x1f 0x3f>; |
| 123 | + gpio-map = < |
| 124 | + 0x00 0x0 &gpio0 0x0 0x0 |
| 125 | + 0x20 0x0 &gpio1 0x0 0x0 |
| 126 | + >; |
| 127 | + #gpio-cells = <2>; |
| 128 | + #address-cells = <1>; |
| 129 | + #size-cells = <1>; |
| 130 | + ranges; |
| 131 | + |
| 132 | + gpio0: gpio@60004000 { |
| 133 | + compatible = "espressif,esp32-gpio"; |
| 134 | + gpio-controller; |
| 135 | + #gpio-cells = <2>; |
| 136 | + reg = <0x60004000 0x800>; |
| 137 | + interrupts = <GPIO_INTR_SOURCE>; |
| 138 | + interrupt-parent = <&intc>; |
| 139 | + ngpios = <32>; |
| 140 | + }; |
| 141 | + |
| 142 | + gpio1: gpio@60004800 { |
| 143 | + compatible = "espressif,esp32-gpio"; |
| 144 | + gpio-controller; |
| 145 | + #gpio-cells = <2>; |
| 146 | + reg = <0x60004800 0x800>; |
| 147 | + interrupts = <GPIO_INTR_SOURCE>; |
| 148 | + interrupt-parent = <&intc>; |
| 149 | + ngpios = <13>; |
| 150 | + }; |
| 151 | + }; |
| 152 | + |
| 153 | + }; |
| 154 | +}; |
0 commit comments