Devicetree updates (#481)

* **New Features**
  * Added I2S audio support (i2s0) for LilyGO TLora Pager, M5Stack Cardputer (standard & Adv), M5Stack Core2, M5Stack CoreS3, and Guition JC1060P; moved i2s0 entry in LilyGO TDeck.

* **Chores**
  * Device-tree grammar now separately recognizes and ignores line (//) and block (/* */) comments.
  * Added reference docs to severa DTS files

* **Documentation**
  * Reworked ideas/roadmap
This commit is contained in:
Ken Van Hoeylandt
2026-02-05 19:31:47 +01:00
committed by GitHub
parent a1c835e073
commit 4fe4faf422
10 changed files with 124 additions and 37 deletions
@@ -4,6 +4,7 @@
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
// Reference: https://github.com/bigtreetech/PandaTouch_PlatformIO/blob/master/docs/PINOUT.md
/ {
compatible = "root";
model = "BigTreeTech Panda Touch";
@@ -3,7 +3,16 @@
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_i2s.h>
/**
* For future reference:
* - ES8311 on I2C with PA PIN at GPIO 11
* - Built-in led at GPIO 26
* - Boot button at GPIO 21
* - LCD reset: GPIO 27
* - LCD backlight: GPIO 23
*/
/ {
compatible = "root";
model = "Guition JC1060P470C-I-W-Y";
@@ -22,4 +31,14 @@
pin-sda-pullup;
pin-scl-pullup;
};
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <12>;
pin-ws = <10>;
pin-data-out = <9>;
pin-data-in = <48>;
pin-mclk = <13>;
};
};
+11 -10
View File
@@ -5,6 +5,7 @@
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_i2s.h>
// Reference: https://wiki.lilygo.cc/get_started/en/Wearable/T-Deck-Plus/T-Deck-Plus.html#Pin-Overview
/ {
compatible = "root";
model = "LilyGO T-Deck";
@@ -14,16 +15,6 @@
gpio-count = <49>;
};
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <7>;
pin-ws = <5>;
pin-data-out = <6>;
pin-data-in = <GPIO_PIN_NONE>;
pin-mclk = <GPIO_PIN_NONE>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
@@ -39,4 +30,14 @@
pin-sda = <43>;
pin-scl = <44>;
};
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <7>;
pin-ws = <5>;
pin-data-out = <6>;
pin-data-in = <GPIO_PIN_NONE>;
pin-mclk = <GPIO_PIN_NONE>;
};
};
@@ -3,7 +3,9 @@
#include <bindings/tlora_pager.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_i2s.h>
// Reference: https://wiki.lilygo.cc/get_started/en/LoRa_GPS/T-LoraPager/T-LoraPager.html#Pin-Overview
/ {
compatible = "lilygo,tlora-pager";
model = "LilyGO T-Lora Pager";
@@ -20,4 +22,15 @@
pin-sda = <3>;
pin-scl = <2>;
};
// ES8311 (also connected to I2C bus)
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <11>;
pin-ws = <18>;
pin-data-out = <45>;
pin-data-in = <17>;
pin-mclk = <10>;
};
};
@@ -3,7 +3,9 @@
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_i2s.h>
// Reference: https://docs.m5stack.com/en/core/Cardputer-Adv
/ {
compatible = "root";
model = "M5Stack Cardputer Adv";
@@ -32,4 +34,15 @@
pin-sda-pullup;
pin-scl-pullup;
};
// Speaker and microphone (ES8311)
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <41>;
pin-ws = <43>;
pin-data-out = <42>;
pin-data-in = <46>;
pin-mclk = <GPIO_PIN_NONE>;
};
};
@@ -3,7 +3,9 @@
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_i2s.h>
// Reference: https://docs.m5stack.com/en/core/Cardputer
/ {
compatible = "root";
model = "M5Stack Cardputer";
@@ -22,4 +24,16 @@
pin-sda-pullup;
pin-scl-pullup;
};
// Speaker and microphone
// TODO: Microphone I2C init code from https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L936
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <41>;
pin-ws = <43>;
pin-data-out = <42>;
pin-data-in = <46>;
pin-mclk = <GPIO_PIN_NONE>;
};
};
+14
View File
@@ -3,7 +3,9 @@
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_i2s.h>
// Reference: https://docs.m5stack.com/en/core/Core2
/ {
compatible = "root";
model = "M5Stack Core2";
@@ -32,4 +34,16 @@
pin-sda-pullup;
pin-scl-pullup;
};
// NS4168: Speaker and microphone
// TODO: Init microphone via I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L391C19-L391C44
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <12>;
pin-ws = <0>;
pin-data-out = <2>;
pin-data-in = <34>;
pin-mclk = <GPIO_PIN_NONE>;
};
};
+16
View File
@@ -3,7 +3,9 @@
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
#include <tactility/bindings/esp32_i2s.h>
// Reference: https://docs.m5stack.com/en/core/CoreS3
/ {
compatible = "root";
model = "M5Stack CoreS3";
@@ -52,4 +54,18 @@
sda-pullup;
scl-pullup;
};
// TODO: Enable speaker via I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L417
// TODO: Enable microphone via I2C: https://github.com/m5stack/M5Unified/blob/a6256725481f1bc366655fa48cf03b6095e30ad1/src/M5Unified.cpp#L616
i2s0 {
// Note: M5Unified sets the following for speaker: magnification = 2, oversampling = 1
// Note: M5Unified sets the following for microphone: magnification = 4
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <34>;
pin-ws = <33>;
pin-data-out = <13>;
pin-data-in = <14>;
pin-mclk = <0>;
};
};