mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
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:
parent
a1c835e073
commit
4fe4faf422
@ -9,8 +9,10 @@
|
||||
|
||||
// Comment
|
||||
|
||||
COMMENT: /\/\*([^*]|\*+[^*\/])*\*+\//
|
||||
%ignore COMMENT
|
||||
SINGLE_LINE_COMMENT: /\/\/[^\n]*/
|
||||
MULTI_LINE_COMMENT: /\/\*([^*]|\*+[^*\/])*\*+\//
|
||||
%ignore SINGLE_LINE_COMMENT
|
||||
%ignore MULTI_LINE_COMMENT
|
||||
|
||||
// Boolean
|
||||
|
||||
|
||||
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -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>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -3,18 +3,29 @@
|
||||
## Before release
|
||||
|
||||
- Add `// SPDX-License-Identifier: GPL-3.0-only` and `// SPDX-License-Identifier: Apache-2.0` to individual files in the project
|
||||
- Change ButtonControl to work with interrupts and xQueue
|
||||
- TCA9534 keyboards should use interrupts
|
||||
- GT911 drivers should use interrupts if it's stable
|
||||
- Elecrow Basic & Advance 3.5" memory issue: not enough memory for App Hub
|
||||
- App Hub crashes if you close it while an app is being installed
|
||||
- Fix glitches when installing app via App Hub with 4.3" Waveshare
|
||||
- Calculator bugs (see GitHub issue)
|
||||
- Try out speed optimizations: https://docs.espressif.com/projects/esp-faq/en/latest/software-framework/peripherals/lcd.html
|
||||
(relates to CONFIG_ESP32S3_DATA_CACHE_LINE_64B that is in use for RGB displays via the `device.properties` fix/workaround)
|
||||
|
||||
## Higher Priority
|
||||
|
||||
- Add kernel listening mechanism so that the root device init can be notified when a device becomes available:
|
||||
Callback for device/start stop with filtering on device type:
|
||||
- on_before_start: e.g. to do the CS pin hack for SD card on a shared bus
|
||||
- on_after_start: e.g. to initialize an I2S device via its I2C connection, once I2C becomes available
|
||||
- on_before_stop: e.g. to stop using a device that was started before
|
||||
- on_after_stop: ?
|
||||
- DTS: support for #defines
|
||||
- DTS: support for aliases
|
||||
- SPI kernel driver
|
||||
- iomux kernel driver
|
||||
- Kernel concepts for ELF loading (generic approach for GUI apps, console apps, libraries).
|
||||
- Fix glitches when installing app via App Hub with 4.3" Waveshare
|
||||
- TCA9534 keyboards should use interrupts
|
||||
- GT911 drivers should use interrupts if it's stable
|
||||
- Change ButtonControl to work with interrupts and xQueue
|
||||
- Fix Cardputer (original): use LV_KEY_NEXT and _PREV in keyboard mapping instead of encoder driver hack (and check GPIO app if it then hangs too)
|
||||
- Logging with a function that uses std::format
|
||||
- Expose http::download() and main dispatcher to TactiltyC.
|
||||
@ -35,6 +46,8 @@
|
||||
|
||||
## Medium Priority
|
||||
|
||||
- Filtering for apps in App Hub:
|
||||
- apps that only work on a specific device
|
||||
- Diceware app has large "+" and "-' buttons on Cardputer. It should be smaller.
|
||||
- Create PwmRgbLedDevice class and implement it for all CYD devices
|
||||
- TactilityTool: Make API compatibility table (and check for compatibility in the tool itself)
|
||||
@ -77,6 +90,8 @@
|
||||
- `UiScale` implementation for devices like the CYD 2432S032C
|
||||
- Bug: CYD 2432S032C screen rotation fails due to touch driver issue
|
||||
- Calculator app should show regular text input field on non-touch devices that have a keyboard (Cardputer, T-Lora Pager)
|
||||
- Allow for WSAD keys to navigate LVGL (this is extra nice for cardputer, but just handy in general)
|
||||
- Create a "How to" app for a device. It could explain things like keyboard navigation on first start.
|
||||
|
||||
# Nice-to-haves
|
||||
|
||||
@ -115,29 +130,8 @@
|
||||
- Display touch calibration
|
||||
- RSS reader
|
||||
- Static file web server (with option to specify path and port)
|
||||
- Diceware
|
||||
- Port TamaFi https://github.com/cifertech/TamaFi
|
||||
|
||||
# App Store
|
||||
|
||||
- Register user
|
||||
- Name
|
||||
- Company
|
||||
- Email
|
||||
- Password
|
||||
- Create/destroy session
|
||||
- List apps
|
||||
- Install app
|
||||
- App ID
|
||||
- App version
|
||||
- Add/remove API key
|
||||
- Upload app
|
||||
- Category
|
||||
- File
|
||||
- Name
|
||||
- Description
|
||||
- List apps
|
||||
|
||||
# Notes on firmware size
|
||||
|
||||
- adding esp_http_client (with esp_event) added about 100kB
|
||||
Loading…
x
Reference in New Issue
Block a user