1/* 2 * Copyright (c) 2019 Yannis Damigos 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6/dts-v1/; 7 8#include <espressif/esp32/esp32_wrover_e_n16r4.dtsi> 9#include "odroid_go-pinctrl.dtsi" 10#include <zephyr/dt-bindings/input/input-event-codes.h> 11 12/ { 13 model = "ODROID-GO Game Kit"; 14 compatible = "hardkernel,odroid_go", "espressif,esp32"; 15 16 chosen { 17 zephyr,sram = &sram0; 18 zephyr,console = &uart0; 19 zephyr,shell-uart = &uart0; 20 zephyr,flash = &flash0; 21 zephyr,code-partition = &slot0_partition; 22 zephyr,display = &ili9341; 23 }; 24 25 leds { 26 compatible = "gpio-leds"; 27 blue_led: led { 28 gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; 29 label = "Status Led"; 30 }; 31 }; 32 33 gpio_keys { 34 compatible = "gpio-keys"; 35 menu_button: menu_button { 36 label = "Menu"; 37 gpios = <&gpio0 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 38 zephyr,code = <INPUT_KEY_MENU>; 39 }; 40 volume_button: volume_button { 41 label = "Volume"; 42 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; 43 zephyr,code = <INPUT_KEY_0>; 44 }; 45 select_button: select_button { 46 label = "Select"; 47 gpios = <&gpio0 27 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 48 zephyr,code = <INPUT_BTN_SELECT>; 49 }; 50 a_button: a_button { 51 label = "A"; 52 gpios = <&gpio1 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 53 zephyr,code = <INPUT_KEY_A>; 54 }; 55 b_button: b_button { 56 label = "B"; 57 gpios = <&gpio1 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; 58 zephyr,code = <INPUT_KEY_B>; 59 }; 60 start_button: start_button { 61 label = "Start"; 62 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; 63 zephyr,code = <INPUT_BTN_START>; 64 }; 65 }; 66 67 lcd_backlight_en { 68 compatible = "regulator-fixed"; 69 regulator-name = "lcd_backlight_enable"; 70 enable-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; 71 regulator-boot-on; 72 }; 73 74 aliases { 75 uart-0 = &uart0; 76 led0 = &blue_led; 77 sw0 = &menu_button; 78 watchdog0 = &wdt0; 79 }; 80 81 mipi_dbi { 82 compatible = "zephyr,mipi-dbi-spi"; 83 dc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; 84 spi-dev = <&spi3>; 85 write-only; 86 #address-cells = <1>; 87 #size-cells = <0>; 88 89 ili9341: ili9341@0 { 90 compatible = "ilitek,ili9341"; 91 mipi-max-frequency = <25000000>; 92 pixel-format = <0>; 93 reg = <0>; 94 rotation = <270>; 95 width = <320>; 96 height = <240>; 97 }; 98 }; 99}; 100 101&cpu0 { 102 clock-frequency = <ESP32_CLK_CPU_240M>; 103}; 104 105&cpu1 { 106 clock-frequency = <ESP32_CLK_CPU_240M>; 107}; 108 109&uart0 { 110 status = "okay"; 111 current-speed = <115200>; 112 pinctrl-0 = <&uart0_default>; 113 pinctrl-names = "default"; 114}; 115 116&gpio0 { 117 status = "okay"; 118 119 blue-led-disable { 120 gpio-hog; 121 gpios = <2 GPIO_ACTIVE_HIGH>; 122 output-low; 123 }; 124}; 125 126&gpio1 { 127 status = "okay"; 128}; 129 130&i2c0 { 131 status = "okay"; 132 clock-frequency = <I2C_BITRATE_FAST>; 133 sda-gpios = <&gpio0 4 GPIO_OPEN_DRAIN>; 134 scl-gpios = <&gpio0 15 GPIO_OPEN_DRAIN>; 135 pinctrl-0 = <&i2c0_default>; 136 pinctrl-names = "default"; 137}; 138 139&spi3 { 140 #address-cells = <1>; 141 #size-cells = <0>; 142 status = "okay"; 143 pinctrl-0 = <&spim3_default>; 144 pinctrl-names = "default"; 145 146 sdhc0: sdhc@1 { 147 compatible = "zephyr,sdhc-spi-slot"; 148 reg = <1>; 149 status = "okay"; 150 mmc { 151 compatible = "zephyr,sdmmc-disk"; 152 status = "okay"; 153 }; 154 spi-max-frequency = <20000000>; 155 }; 156}; 157 158&timer0 { 159 status = "okay"; 160}; 161 162&timer1 { 163 status = "okay"; 164}; 165 166&timer2 { 167 status = "okay"; 168}; 169 170&timer3 { 171 status = "okay"; 172}; 173 174&trng0 { 175 status = "okay"; 176}; 177 178&flash0 { 179 status = "okay"; 180 partitions { 181 compatible = "fixed-partitions"; 182 #address-cells = <1>; 183 #size-cells = <1>; 184 185 /* Reserve 60kB for the bootloader */ 186 boot_partition: partition@1000 { 187 label = "mcuboot"; 188 reg = <0x00001000 0x0000F000>; 189 read-only; 190 }; 191 192 /* Reserve 1024kB for the application in slot 0 */ 193 slot0_partition: partition@10000 { 194 label = "image-0"; 195 reg = <0x00010000 0x00100000>; 196 }; 197 198 /* Reserve 1024kB for the application in slot 1 */ 199 slot1_partition: partition@110000 { 200 label = "image-1"; 201 reg = <0x00110000 0x00100000>; 202 }; 203 204 /* Reserve 256kB for the scratch partition */ 205 scratch_partition: partition@210000 { 206 label = "image-scratch"; 207 reg = <0x00210000 0x00040000>; 208 }; 209 210 storage_partition: partition@250000 { 211 label = "storage"; 212 reg = <0x00250000 0x00006000>; 213 }; 214 }; 215}; 216