|
| 1 | +/* |
| 2 | + * Copyright (c) 2025 Chen Xingyu <hi@xingrz.me> |
| 3 | + * SPDX-License-Identifier: Apache-2.0 |
| 4 | + */ |
| 5 | +/dts-v1/; |
| 6 | + |
| 7 | +#include <espressif/esp32s3/esp32s3_wroom_n16r8.dtsi> |
| 8 | +#include <espressif/partitions_0x0_amp_16M.dtsi> |
| 9 | +#include <zephyr/dt-bindings/input/input-event-codes.h> |
| 10 | +#include "dnesp32s3b-pinctrl.dtsi" |
| 11 | + |
| 12 | +/ { |
| 13 | + model = "DNESP32S3B PROCPU"; |
| 14 | + compatible = "alientek,dnesp32s3b"; |
| 15 | + |
| 16 | + aliases { |
| 17 | + led0 = &ledb; |
| 18 | + led1 = &ledr; |
| 19 | + sw0 = &b0; |
| 20 | + sw1 = &k1; |
| 21 | + sw2 = &k2; |
| 22 | + watchdog0 = &wdt0; |
| 23 | + }; |
| 24 | + |
| 25 | + chosen { |
| 26 | + zephyr,sram = &sram1; |
| 27 | + zephyr,console = &uart0; |
| 28 | + zephyr,shell-uart = &uart0; |
| 29 | + zephyr,flash = &flash0; |
| 30 | + zephyr,code-partition = &slot0_partition; |
| 31 | + zephyr,bt-hci = &esp32_bt_hci; |
| 32 | + }; |
| 33 | + |
| 34 | + leds { |
| 35 | + compatible = "gpio-leds"; |
| 36 | + |
| 37 | + ledb: led_blue { |
| 38 | + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; |
| 39 | + label = "LEDB"; |
| 40 | + }; |
| 41 | + |
| 42 | + ledr: led_red { |
| 43 | + gpios = <&io_expander 8 GPIO_ACTIVE_LOW>; |
| 44 | + label = "LEDR"; |
| 45 | + }; |
| 46 | + }; |
| 47 | + |
| 48 | + buttons { |
| 49 | + compatible = "gpio-keys"; |
| 50 | + |
| 51 | + b0: button_b0 { |
| 52 | + gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; |
| 53 | + label = "BOOT"; |
| 54 | + zephyr,code = <INPUT_KEY_0>; |
| 55 | + }; |
| 56 | + |
| 57 | + k1: button_k1 { |
| 58 | + gpios = <&io_expander 4 GPIO_ACTIVE_LOW>; |
| 59 | + label = "KEY1"; |
| 60 | + zephyr,code = <INPUT_KEY_1>; |
| 61 | + }; |
| 62 | + |
| 63 | + k2: button_k2 { |
| 64 | + gpios = <&io_expander 3 GPIO_ACTIVE_LOW>; |
| 65 | + label = "KEY2"; |
| 66 | + zephyr,code = <INPUT_KEY_2>; |
| 67 | + }; |
| 68 | + }; |
| 69 | +}; |
| 70 | + |
| 71 | +&usb_serial { |
| 72 | + status = "disabled"; |
| 73 | +}; |
| 74 | + |
| 75 | +&uart0 { |
| 76 | + status = "okay"; |
| 77 | + pinctrl-0 = <&uart0_default>; |
| 78 | + pinctrl-names = "default"; |
| 79 | + |
| 80 | + current-speed = <115200>; |
| 81 | +}; |
| 82 | + |
| 83 | +&gpio0 { |
| 84 | + status = "okay"; |
| 85 | +}; |
| 86 | + |
| 87 | +&gpio1 { |
| 88 | + status = "okay"; |
| 89 | +}; |
| 90 | + |
| 91 | +&i2c0 { |
| 92 | + status = "okay"; |
| 93 | + pinctrl-0 = <&i2c0_default>; |
| 94 | + pinctrl-names = "default"; |
| 95 | + |
| 96 | + clock-frequency = <I2C_BITRATE_STANDARD>; |
| 97 | + |
| 98 | + io_expander: xl9555@20 { |
| 99 | + compatible = "nxp,pca9555"; |
| 100 | + reg = <0x20>; |
| 101 | + gpio-controller; |
| 102 | + #gpio-cells = <2>; |
| 103 | + ngpios = <16>; |
| 104 | + int-gpios = <&gpio0 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; |
| 105 | + }; |
| 106 | +}; |
| 107 | + |
| 108 | +&trng0 { |
| 109 | + status = "okay"; |
| 110 | +}; |
| 111 | + |
| 112 | +&wdt0 { |
| 113 | + status = "okay"; |
| 114 | +}; |
| 115 | + |
| 116 | +&esp32_bt_hci { |
| 117 | + status = "okay"; |
| 118 | +}; |
0 commit comments