|
| 1 | +/* |
| 2 | + * Copyright (c) 2022 Felipe Neves. |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +/dts-v1/; |
| 8 | + |
| 9 | +#include <espressif/esp32s2.dtsi> |
| 10 | +#include "esp32s2_franzininho-pinctrl.dtsi" |
| 11 | + |
| 12 | +/ { |
| 13 | + model = "esp32s2_franzininho"; |
| 14 | + compatible = "espressif,esp32s2"; |
| 15 | + |
| 16 | + aliases { |
| 17 | + led0 = &user_led_0; |
| 18 | + led1 = &user_led_1; |
| 19 | + i2c-0 = &i2c0; |
| 20 | + watchdog0 = &wdt0; |
| 21 | + }; |
| 22 | + |
| 23 | + chosen { |
| 24 | + zephyr,sram = &sram0; |
| 25 | + zephyr,console = &uart0; |
| 26 | + zephyr,shell-uart = &uart0; |
| 27 | + zephyr,flash = &flash0; |
| 28 | + }; |
| 29 | + |
| 30 | + leds { |
| 31 | + compatible = "gpio-leds"; |
| 32 | + |
| 33 | + user_led_0: led_0 { |
| 34 | + gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; |
| 35 | + label = "User - LED0"; |
| 36 | + }; |
| 37 | + |
| 38 | + user_led_1: led_1 { |
| 39 | + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; |
| 40 | + label = "User - LED1"; |
| 41 | + }; |
| 42 | + }; |
| 43 | +}; |
| 44 | + |
| 45 | +&cpu0 { |
| 46 | + clock-frequency = <ESP32_CLK_CPU_240M>; |
| 47 | +}; |
| 48 | + |
| 49 | +&uart0 { |
| 50 | + status = "okay"; |
| 51 | + current-speed = <115200>; |
| 52 | + pinctrl-0 = <&uart0_default>; |
| 53 | + pinctrl-names = "default"; |
| 54 | +}; |
| 55 | + |
| 56 | +&gpio0 { |
| 57 | + status = "okay"; |
| 58 | +}; |
| 59 | + |
| 60 | +&gpio1 { |
| 61 | + status = "okay"; |
| 62 | +}; |
| 63 | + |
| 64 | +&timer0 { |
| 65 | + status = "okay"; |
| 66 | +}; |
| 67 | + |
| 68 | +&timer1 { |
| 69 | + status = "okay"; |
| 70 | +}; |
| 71 | + |
| 72 | +&timer2 { |
| 73 | + status = "okay"; |
| 74 | +}; |
| 75 | + |
| 76 | +&timer3 { |
| 77 | + status = "okay"; |
| 78 | +}; |
| 79 | + |
| 80 | +&i2c0 { |
| 81 | + status = "okay"; |
| 82 | + clock-frequency = <I2C_BITRATE_STANDARD>; |
| 83 | + pinctrl-0 = <&i2c0_default>; |
| 84 | + pinctrl-names = "default"; |
| 85 | +}; |
| 86 | + |
| 87 | +&i2c1 { |
| 88 | + clock-frequency = <I2C_BITRATE_STANDARD>; |
| 89 | + pinctrl-0 = <&i2c1_default>; |
| 90 | + pinctrl-names = "default"; |
| 91 | +}; |
| 92 | + |
| 93 | +&trng0 { |
| 94 | + status = "okay"; |
| 95 | +}; |
| 96 | + |
| 97 | +&spi2 { |
| 98 | + #address-cells = <1>; |
| 99 | + #size-cells = <0>; |
| 100 | + status = "okay"; |
| 101 | + pinctrl-0 = <&spim2_default>; |
| 102 | + pinctrl-names = "default"; |
| 103 | +}; |
| 104 | + |
| 105 | +&spi3 { |
| 106 | + #address-cells = <1>; |
| 107 | + #size-cells = <0>; |
| 108 | + status = "okay"; |
| 109 | + pinctrl-0 = <&spim3_default>; |
| 110 | + pinctrl-names = "default"; |
| 111 | +}; |
| 112 | + |
| 113 | +&flash0 { |
| 114 | + status = "okay"; |
| 115 | + partitions { |
| 116 | + compatible = "fixed-partitions"; |
| 117 | + #address-cells = <1>; |
| 118 | + #size-cells = <1>; |
| 119 | + |
| 120 | + /* Reserve 60kB for the bootloader */ |
| 121 | + boot_partition: partition@1000 { |
| 122 | + label = "mcuboot"; |
| 123 | + reg = <0x00001000 0x0000F000>; |
| 124 | + read-only; |
| 125 | + }; |
| 126 | + |
| 127 | + /* Reserve 1024kB for the application in slot 0 */ |
| 128 | + slot0_partition: partition@10000 { |
| 129 | + label = "image-0"; |
| 130 | + reg = <0x00010000 0x00100000>; |
| 131 | + }; |
| 132 | + |
| 133 | + /* Reserve 1024kB for the application in slot 1 */ |
| 134 | + slot1_partition: partition@110000 { |
| 135 | + label = "image-1"; |
| 136 | + reg = <0x00110000 0x00100000>; |
| 137 | + }; |
| 138 | + |
| 139 | + /* Reserve 256kB for the scratch partition */ |
| 140 | + scratch_partition: partition@210000 { |
| 141 | + label = "image-scratch"; |
| 142 | + reg = <0x00210000 0x00040000>; |
| 143 | + }; |
| 144 | + |
| 145 | + storage_partition: partition@250000 { |
| 146 | + label = "storage"; |
| 147 | + reg = <0x00250000 0x00006000>; |
| 148 | + }; |
| 149 | + }; |
| 150 | +}; |
| 151 | + |
| 152 | +&wdt0 { |
| 153 | + status = "okay"; |
| 154 | +}; |
0 commit comments