/dts-v1/; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define WAKEUP_BUTTON_FLAGS (GPIO_FLAG_ACTIVE_LOW | GPIO_FLAG_PULL_UP) // Reference: // https://wiki.lilygo.cc/products/t-embed-series/t-embed-cc1101/ // https://github.com/Xinyuan-LilyGO/T-Embed-CC1101 // https://lilygo.cc/products/t-embed-cc1101 / { compatible = "root"; model = "T-Embed CC1101"; wifi0 { compatible = "espressif,esp32-wifi-pinned"; }; ble0 { compatible = "espressif,esp32-ble"; }; gpio0 { compatible = "espressif,esp32-gpio"; gpio-count = <49>; }; // Required to enable peripherals like BQ25896 peripheral-power-hog { compatible = "gpio-hog"; pin = <&gpio0 15 GPIO_FLAG_NONE>; mode = ; }; // Speaker I2S (MAX98357A amplifier) i2s0 { compatible = "espressif,esp32-i2s"; port = ; pin-bclk = <&gpio0 46 GPIO_FLAG_NONE>; pin-ws = <&gpio0 40 GPIO_FLAG_NONE>; pin-data-out = <&gpio0 7 GPIO_FLAG_NONE>; pin-data-in = <&gpio0 42 GPIO_FLAG_NONE>; pin-mclk = <&gpio0 39 GPIO_FLAG_NONE>; }; // MAX98357A class-D speaker amplifier. No I2C. speaker0 { compatible = "maxim,max98357a"; i2s = <&i2s0>; }; mic0 { compatible = "generic,spm1423"; i2s = <&i2s0>; channels = <1>; }; // WS2812 RGB LED Ring // TODO - Sync on/off with DisplayIdle? ledstrip0 { compatible = "espressif,esp32-led-strip"; pin-data = <&gpio0 14 GPIO_FLAG_NONE>; led-count = <8>; }; i2c_internal: i2c0 { compatible = "espressif,esp32-i2c-master"; port = ; clock-frequency = <100000>; pin-sda = <&gpio0 8 GPIO_FLAG_NONE>; pin-scl = <&gpio0 18 GPIO_FLAG_NONE>; bq27220 { compatible = "ti,bq27220"; reg = <0x55>; }; bq25896 { compatible = "ti,bq25896"; reg = <0x6B>; }; // TODO - Add PN532 NFC - IRQ GPIO 17, RES GPIO 45, address 0x24 - driver needed }; display_backlight_pwm { compatible = "espressif,esp32-pwm-ledc"; pin = <&gpio0 21 GPIO_FLAG_NONE>; period-ns = <33333>; ledc-timer = <0>; ledc-channel = <0>; }; display_backlight { compatible = "pwm-backlight"; // Off by default so dispaly power-on won't show the screen from before the last power loss. // The display backlight is turned on during the boot process. status = "disabled"; pwm = <&display_backlight_pwm>; }; spi0 { compatible = "espressif,esp32-spi"; host = ; cs-gpios = <&gpio0 41 GPIO_FLAG_NONE>, // Display <&gpio0 13 GPIO_FLAG_NONE>, // SD card <&gpio0 12 GPIO_FLAG_NONE>; // Radio - CC1101 pin-mosi = <&gpio0 9 GPIO_FLAG_NONE>; pin-miso = <&gpio0 10 GPIO_FLAG_NONE>; pin-sclk = <&gpio0 11 GPIO_FLAG_NONE>; display@0 { compatible = "sitronix,st7789"; horizontal-resolution = <320>; vertical-resolution = <170>; gap-x = <35>; swap-xy; mirror-y; invert-color; pixel-clock-hz = <80000000>; pin-dc = <&gpio0 16 GPIO_FLAG_NONE>; backlight = <&display_backlight>; }; sdcard@1 { compatible = "espressif,esp32-sdspi"; status = "disabled"; frequency-khz = <20000>; }; // CC1101 transceiver: CS/GDO0 = GPIO 12/3. SW1/SW0 (GPIO 47/48) select the // antenna matching network: 315 MHz = 1/0, 433 MHz = 1/1, 868/915 MHz = 0/1. // Module power comes from the peripheral power hog (GPIO 15). radio@2 { compatible = "ti,cc1101"; reg = <2>; pin-gdo0 = <&gpio0 3 GPIO_FLAG_NONE>; pin-band-switch-0 = <&gpio0 48 GPIO_FLAG_NONE>; pin-band-switch-1 = <&gpio0 47 GPIO_FLAG_NONE>; band-switch-low = <2>; band-switch-mid = <3>; band-switch-high = <1>; }; }; encoder { compatible = "tactility,gpio-encoder"; pin-a = <&gpio0 5 GPIO_FLAG_NONE>; pin-b = <&gpio0 4 GPIO_FLAG_NONE>; pin-enter = <&gpio0 0 GPIO_FLAG_NONE>; pulses-per-detent = <2>; pending-capacity = <8>; }; sleep { compatible = "espressif,esp32-sleep"; wakeup-gpios = <&gpio0 6 WAKEUP_BUTTON_FLAGS>; }; usbdevice0 { compatible = "espressif,esp32-usbdevice"; usbdevicemsc0 { compatible = "espressif,esp32-usbdevice-msc"; }; }; };