kopia lustrzana https://github.com/OpenRTX/OpenRTX
212 wiersze
3.9 KiB
Plaintext
212 wiersze
3.9 KiB
Plaintext
/*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
/dts-v1/;
|
|
|
|
#include <espressif/esp32s3/esp32s3_wroom_n16r8.dtsi>
|
|
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
|
|
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
|
|
#include <dt-bindings/input/input-event-codes.h>
|
|
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h>
|
|
#include <zephyr/dt-bindings/led/led.h>
|
|
|
|
/ {
|
|
model = "ttwrplus";
|
|
compatible = "espressif,esp32s3";
|
|
|
|
aliases {
|
|
i2c-0 = &i2c0;
|
|
watchdog0 = &wdt0;
|
|
radio = &uart0;
|
|
qdec0 = &pcnt;
|
|
};
|
|
|
|
chosen {
|
|
zephyr,sram = &sram0;
|
|
zephyr,console = &usb_serial;
|
|
zephyr,shell-uart = &usb_serial;
|
|
zephyr,flash = &flash0;
|
|
zephyr,display = &ssd1306;
|
|
};
|
|
|
|
buttons: buttons {
|
|
compatible = "zephyr,gpio-keys";
|
|
|
|
button_boot: button_0 {
|
|
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
|
|
zephyr,code = <INPUT_KEY_VOLUMEDOWN>;
|
|
label = "BOOT Button";
|
|
};
|
|
|
|
button_user: button_1 {
|
|
gpios = <&gpio0 21 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
|
zephyr,code = <INPUT_BTN_START>;
|
|
label = "Encoder Button";
|
|
};
|
|
|
|
button_ptt: button_2 {
|
|
gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
|
zephyr,code = <INPUT_BTN_SELECT>;
|
|
label = "PTT Button";
|
|
};
|
|
};
|
|
};
|
|
|
|
&cpu0 {
|
|
clock-frequency = <ESP32_CLK_CPU_240M>;
|
|
};
|
|
|
|
&cpu1 {
|
|
clock-frequency = <ESP32_CLK_CPU_240M>;
|
|
};
|
|
|
|
&usb_serial {
|
|
status = "okay";
|
|
};
|
|
|
|
&uart0 {
|
|
status = "okay";
|
|
current-speed = <9600>;
|
|
pinctrl-0 = <&uart0_default>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
&i2c0 {
|
|
status = "okay";
|
|
clock-frequency = <I2C_BITRATE_FAST>;
|
|
pinctrl-0 = <&i2c0_default>;
|
|
pinctrl-names = "default";
|
|
|
|
ssd1306: ssd1306@3c {
|
|
compatible = "solomon,ssd1306fb";
|
|
reg = <0x3c>;
|
|
|
|
width = <128>;
|
|
height = <64>;
|
|
|
|
segment-offset = <2>;
|
|
page-offset = <0>;
|
|
display-offset = <0>;
|
|
multiplex-ratio = <63>;
|
|
prechargep = <0x22>;
|
|
|
|
segment-remap;
|
|
com-invdir;
|
|
};
|
|
};
|
|
|
|
&pcnt {
|
|
pinctrl-0 = <&pcnt_default>;
|
|
pinctrl-names = "default";
|
|
status = "okay";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
unit0@0 {
|
|
reg = <0>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
filter = <100>;
|
|
channelA@0 {
|
|
reg = <0>;
|
|
sig-pos-mode = <2>;
|
|
sig-neg-mode = <1>;
|
|
ctrl-h-mode = <0>;
|
|
ctrl-l-mode = <1>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&timer0 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&timer1 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&timer2 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&timer3 {
|
|
status = "disabled";
|
|
};
|
|
|
|
&wdt0 {
|
|
status = "okay";
|
|
};
|
|
|
|
&trng0 {
|
|
status = "okay";
|
|
};
|
|
|
|
&pinctrl {
|
|
uart0_default: uart0_default {
|
|
group1 {
|
|
pinmux = <UART0_TX_GPIO39>;
|
|
output-high;
|
|
};
|
|
group2 {
|
|
pinmux = <UART0_RX_GPIO48>;
|
|
bias-pull-up;
|
|
};
|
|
};
|
|
|
|
i2c0_default: i2c0_default {
|
|
group1 {
|
|
pinmux = <I2C0_SDA_GPIO8>,
|
|
<I2C0_SCL_GPIO9>;
|
|
bias-pull-up;
|
|
drive-open-drain;
|
|
output-high;
|
|
};
|
|
};
|
|
|
|
pcnt_default: pcnt_default {
|
|
group1 {
|
|
pinmux = <PCNT0_CH0SIG_GPIO46>,
|
|
<PCNT0_CH0CTRL_GPIO47>;
|
|
bias-pull-up;
|
|
};
|
|
};
|
|
};
|
|
|
|
&flash0 {
|
|
status = "okay";
|
|
partitions {
|
|
compatible = "fixed-partitions";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
/* Reserve 64kB for the bootloader */
|
|
boot_partition: partition@0 {
|
|
label = "mcuboot";
|
|
reg = <0x00000000 0x00010000>;
|
|
read-only;
|
|
};
|
|
|
|
/* Reserve 1024kB for the application in slot 0 */
|
|
slot0_partition: partition@10000 {
|
|
label = "image-0";
|
|
reg = <0x00010000 0x00100000>;
|
|
};
|
|
|
|
/* Reserve 1024kB for the application in slot 1 */
|
|
slot1_partition: partition@110000 {
|
|
label = "image-1";
|
|
reg = <0x00110000 0x00100000>;
|
|
};
|
|
|
|
/* Reserve 256kB for the scratch partition */
|
|
scratch_partition: partition@210000 {
|
|
label = "image-scratch";
|
|
reg = <0x00210000 0x00040000>;
|
|
};
|
|
|
|
storage_partition: partition@250000 {
|
|
label = "storage";
|
|
reg = <0x00250000 0x00006000>;
|
|
};
|
|
};
|
|
};
|