Device migrations and driver improvements (#576)

This commit is contained in:
Ken Van Hoeylandt
2026-07-22 21:11:12 +02:00
committed by GitHub
parent 2fbc44466a
commit a3fda9ad8f
100 changed files with 707 additions and 3838 deletions
+74 -12
View File
@@ -9,15 +9,19 @@
#include <tactility/bindings/esp32_i2s.h>
#include <tactility/bindings/esp32_spi.h>
#include <tactility/bindings/esp32_uart.h>
#include <bindings/bmi270.h>
#include <bindings/aw88298.h>
#include <bindings/aw9523b.h>
#include <bindings/axp2101.h>
#include <bindings/axp2101_backlight.h>
#include <bindings/bm8563.h>
#include <bindings/bmi270.h>
#include <bindings/es7210.h>
#include <bindings/ft6x36.h>
#include <bindings/ili9341.h>
#include <bindings/ina226.h>
#include <bindings/py32ioexpander.h>
#include <bindings/aw9523b.h>
#include <bindings/aw88298.h>
#include <bindings/es7210.h>
#include <tactility/bindings/esp32_sdspi.h>
#include <tactility/bindings/display_placeholder.h>
#include <tactility/bindings/gpio_hog.h>
// Reference: https://docs.m5stack.com/en/StackChan
/ {
@@ -40,7 +44,7 @@
};
// AW88298 speaker + ES7210 microphone
i2s0: i2s0 {
i2s0 {
compatible = "espressif,esp32-i2s";
port = <I2S_NUM_0>;
pin-bclk = <&gpio0 34 GPIO_FLAG_NONE>;
@@ -77,14 +81,34 @@
compatible = "ti,ina226";
reg = <0x41>;
shunt-milliohms = <10>;
power-supply;
};
// AW9523B pin map (same wiring as CoreS3):
// P0_0 = touch reset, P0_1 = bus-out enable, P0_2 = AW88298 reset,
// P0_4 = SD card switch, P1_1 = LCD reset, P1_7 = boost enable (SY7088)
aw9523b: aw9523b {
aw9523b {
compatible = "awinic,aw9523b";
reg = <0x58>;
// Bus-out enable, AW88298 (audio amp) reset, SD card power switch and boost enable
// (SY7088) are AW9523B pins with no owning peripheral driver yet.
aw9523_bus_out_enable {
compatible = "gpio-hog";
pin = <&aw9523b 1 GPIO_FLAG_NONE>;
mode = <GPIO_HOG_MODE_OUTPUT_HIGH>;
};
aw9523_sdcard_switch {
compatible = "gpio-hog";
pin = <&aw9523b 4 GPIO_FLAG_NONE>;
mode = <GPIO_HOG_MODE_OUTPUT_HIGH>;
};
aw9523_boost_enable {
compatible = "gpio-hog";
pin = <&aw9523b 15 GPIO_FLAG_NONE>;
mode = <GPIO_HOG_MODE_OUTPUT_HIGH>;
};
};
aw88298 {
@@ -94,6 +118,39 @@
pin-reset = <&aw9523b 2 GPIO_FLAG_NONE>;
};
// Same rail assignment as CoreS3: ALDO1=AW88298, ALDO2=ES7210, ALDO3=camera
// (not yet implemented, but harmless to power), ALDO4=TF/SD card. BLDO1/BLDO2 are
// enabled with no specific voltage requirement.
axp2101 {
compatible = "x-powers,axp2101";
reg = <0x34>;
aldo1-millivolt = <1800>;
aldo1-enabled;
aldo2-millivolt = <3300>;
aldo2-enabled;
aldo3-millivolt = <3300>;
aldo3-enabled;
aldo4-millivolt = <3300>;
aldo4-enabled;
bldo1-enabled;
bldo2-enabled;
display_backlight {
compatible = "axp2101-backlight";
ldo = <AXP2101_DLDO1>;
min-millivolt = <2500>;
max-millivolt = <3300>;
};
};
touch {
compatible = "focaltech,ft6x36";
reg = <0x38>;
x-max = <319>;
y-max = <239>;
pin-reset = <&aw9523b 0 GPIO_FLAG_NONE>;
};
es7210 {
compatible = "everest,es7210";
reg = <0x40>;
@@ -109,9 +166,6 @@
input-gain-percent = <400>;
};
// AXP2101 PMIC @ 0x34 — initialized manually in initBoot()
// FT6336U capacitive touch @ 0x38 — used by Display driver (FT6x36 library)
// TODO: Si12T 3-zone head touch @ 0x68 — INT active-low, 10kΩ pull-up to 3.3V; driver not yet implemented
// TODO: GC0308 camera @ 0x21 — requires i2c_master driver, not yet available
// TODO: LTR-553ALS-WA proximity/light @ 0x23 — no driver yet
@@ -167,7 +221,15 @@
pin-sclk = <&gpio0 36 GPIO_FLAG_NONE>;
display@0 {
compatible = "display-placeholder";
compatible = "ilitek,ili9341";
horizontal-resolution = <320>;
vertical-resolution = <240>;
invert-color;
bgr-order;
pixel-clock-hz = <40000000>;
pin-dc = <&gpio0 35 GPIO_FLAG_NONE>;
pin-reset = <&aw9523b 9 GPIO_FLAG_NONE>;
backlight = <&display_backlight>;
};
sdcard@1 {