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