Create DTS files for all devices and implement I2C changes (#466)

Devictree changes:
- Create DTS files for all remaining devices
- Update corresponding `devicetree.yaml`
- Remove `i2c` configuration from corresponding `tt::hal::Configuration`

Apps & HAL:
- Removed I2C Settings (we'll make a new one later after I rework that part of the HAL)
- Delete TactilityC GPIO and I2C functionality
- Delete Related SystemEvent types
- Refactor `tt::hal::i2c` to only use `struct Device*` wrapping

Scripting:
- Fix DevicetreeCompiler boolean parsing
- Create `build-all.py`
This commit is contained in:
Ken Van Hoeylandt 2026-01-29 22:01:19 +01:00 committed by GitHub
parent 71f8369377
commit 87ca888bb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
139 changed files with 1226 additions and 1750 deletions

4
.gitignore vendored
View File

@ -3,8 +3,8 @@
build/
buildsim/
build-sim/
cmake-build-*/
build-*/
cmake-*/
CMakeCache.txt
*.cbp
CMakeFiles

View File

@ -33,8 +33,8 @@ class DtsTransformer(Transformer):
return Device(identifier, properties, devices)
def device_property(self, objects: List[object]):
name = objects[0]
if len(objects) == 1:
# Boolean property with no value
# Boolean property has no value as the value is implied to be true
if (len(objects) == 1) or (objects[1] is None):
return DeviceProperty(name, "boolean", True)
if type(objects[1]) is not PropertyValue:
raise Exception(f"Object was not converted to PropertyValue: {objects[1]}")

38
Buildscripts/build-all.py Normal file
View File

@ -0,0 +1,38 @@
import os
import subprocess
import shutil
import time
def build(device: str) -> bool:
print(f"Building {device}...")
shutil.rmtree(os.path.join('Firmware', 'Generated'), ignore_errors=True)
result = subprocess.run(['python', 'device.py', device], capture_output=True, text=True)
if result.returncode != 0:
print(f"Failed to select device {device}")
return False
result = subprocess.run(['idf.py', f"-Bbuild-all-{device}", 'build'], capture_output=True, text=True)
if result.returncode != 0:
print(f"Build failed for {device}:")
print(result.stdout)
print(result.stderr)
return result.returncode == 0
def main():
start_time = time.time()
buildscripts_dir = 'Devices'
if not os.path.exists(buildscripts_dir):
print(f"Directory '{buildscripts_dir}' not found.")
return
for item in os.listdir(buildscripts_dir):
item_path = os.path.join(buildscripts_dir, item)
if os.path.isdir(item_path) and item != 'simulator':
if not build(item):
return
print("All builds succeeded.")
end_time = time.time()
print(f"Elapsed time: {end_time - start_time:.2f} seconds")
if __name__ == "__main__":
main()

View File

@ -27,43 +27,5 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
//Touch
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_2,
.scl_io_num = GPIO_NUM_1,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
//Rear header, JST PH 2.0, SDA IO4 / SCL IO3 / GND / 3.3V
i2c::Configuration {
.name = "External",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_4,
.scl_io_num = GPIO_NUM_3,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
}
.createDevices = createDevices
};

View File

@ -0,0 +1,33 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "BigTreeTech Panda Touch";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <2>;
pin-scl = <1>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_external {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <4>;
pin-scl = <3>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: bigtreetech,panda-touch.dts

View File

@ -29,42 +29,6 @@ static tt::hal::DeviceVector createDevices() {
extern const tt::hal::Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
tt::hal::i2c::Configuration {
.name = "First",
.port = I2C_NUM_0,
.initMode = tt::hal::i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_33,
.scl_io_num = GPIO_NUM_32,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
tt::hal::i2c::Configuration {
.name = "Second",
.port = I2C_NUM_1,
.initMode = tt::hal::i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_NC,
.scl_io_num = GPIO_NUM_NC,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
tt::hal::spi::Configuration {
.device = SPI2_HOST,

View File

@ -0,0 +1,23 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "CYD 2432S024C";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <33>;
pin-scl = <32>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,2432s024c.dts

View File

@ -31,25 +31,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "CN1",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_27,
.scl_io_num = GPIO_NUM_22,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// Display
spi::Configuration {

View File

@ -0,0 +1,23 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "CYD 2432S028R";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c_cn1 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <27>;
pin-scl = <22>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,2432s028r.dts

View File

@ -31,25 +31,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "CN1",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_27,
.scl_io_num = GPIO_NUM_22,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// Display
spi::Configuration {
@ -100,7 +81,6 @@ extern const Configuration hardwareConfiguration = {
.lock = tt::lvgl::getSyncLock() // esp_lvgl_port owns the lock for the display
},
},
.uart {
uart::Configuration {
.name = "P1",

View File

@ -0,0 +1,23 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "CYD 2432S028R v3";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c_cn1 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <27>;
pin-scl = <22>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,2432s028rv3.dts

View File

@ -45,25 +45,6 @@ static tt::hal::DeviceVector createDevices() {
extern const tt::hal::Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
tt::hal::i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = tt::hal::i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_33,
.scl_io_num = GPIO_NUM_32,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// Display
tt::hal::spi::Configuration {

View File

@ -0,0 +1,23 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "CYD 2432S032C";
gpio1 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <33>;
pin-scl = <32>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,2432s032c.dts

View File

@ -22,44 +22,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
//Touch
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_19,
.scl_io_num = GPIO_NUM_45,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
//H1 header,
i2c::Configuration {
.name = "External",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_NC,
.scl_io_num = GPIO_NUM_NC,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// SD Card & display init
spi::Configuration {

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "CYD 4848S040C";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <19>;
pin-scl = <45>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,4848s040c.dts

View File

@ -21,44 +21,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
// Touch
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_19,
.scl_io_num = GPIO_NUM_20,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
// P4 header, JST SH 1.0, GND / 3.3V / IO17 / IO18
i2c::Configuration {
.name = "External",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_17,
.scl_io_num = GPIO_NUM_18,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// SD Card
spi::Configuration {

View File

@ -0,0 +1,33 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "CYD 8048S043C";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <19>;
pin-scl = <20>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_external {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <17>;
pin-scl = <18>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,8048s043c.dts

View File

@ -19,7 +19,6 @@ static tt::hal::DeviceVector createDevices() {
extern const tt::hal::Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {},
.spi = {
tt::hal::spi::Configuration {
.device = SPI2_HOST,

View File

@ -0,0 +1,14 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
/ {
compatible = "root";
model = "CYD E32R28T";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,e32r28t.dts

View File

@ -23,25 +23,6 @@ static tt::hal::DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
tt::hal::i2c::Configuration {
.name = "External",
.port = I2C_NUM_0,
.initMode = tt::hal::i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_32,
.scl_io_num = GPIO_NUM_25,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
},
// Display
.spi = {
tt::hal::spi::Configuration {

View File

@ -0,0 +1,23 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "CYD E32R32P";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c_external {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <32>;
pin-scl = <25>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: cyd,e32r32p.dts

View File

@ -21,27 +21,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
// There is only 1 (internal for touch, and also serves as "I2C-OUT" port)
// Note: You could repurpose 1 or more UART interfaces as I2C interfaces
i2c::Configuration {
.name = "Main",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_15,
.scl_io_num = GPIO_NUM_16,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// Display
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: elecrow,crowpanel-advance-28.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Elecrow CrowPanel Advance 2.8";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <15>;
pin-scl = <16>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -23,27 +23,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
// There is only 1 (internal for touch, and also serves as "I2C-OUT" port)
// Note: You could repurpose 1 or more UART interfaces as I2C interfaces
i2c::Configuration {
.name = "Main",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_15,
.scl_io_num = GPIO_NUM_16,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// Display
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: elecrow,crowpanel-advance-35.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Elecrow CrowPanel Advance 3.5";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <15>;
pin-scl = <16>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -31,27 +31,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
// There is only 1 (internal for touch, and also serves as "I2C-OUT" port)
// Note: You could repurpose 1 or more UART interfaces as I2C interfaces
i2c::Configuration {
.name = "Main",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_15,
.scl_io_num = GPIO_NUM_16,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// SD card
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: elecrow,crowpanel-advance-50.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Elecrow CrowPanel Advance 5.0";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <15>;
pin-scl = <16>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -23,27 +23,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
// There is only 1 (internal for touch, and also serves as "I2C-OUT" port)
// Note: You could repurpose 1 or more UART interfaces as I2C interfaces
i2c::Configuration {
.name = "Main",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_22,
.scl_io_num = GPIO_NUM_21,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// Display
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: elecrow,crowpanel-basic-28.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Elecrow CrowPanel Basic 2.8";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <22>;
pin-scl = <21>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -25,27 +25,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
// There is only 1 (internal for touch, and also serves as "I2C-OUT" port)
// Note: You could repurpose 1 or more UART interfaces as I2C interfaces
i2c::Configuration {
.name = "Main",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_22,
.scl_io_num = GPIO_NUM_21,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// Display
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: elecrow,crowpanel-basic-35.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Elecrow CrowPanel Basic 3.5";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <22>;
pin-scl = <21>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -21,27 +21,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
// There is only 1 (internal for touch, and also serves as "I2C-OUT" port)
// Note: You could repurpose 1 or more UART interfaces as I2C interfaces
i2c::Configuration {
.name = "Main",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_19,
.scl_io_num = GPIO_NUM_20,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
// SD card
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: elecrow,crowpanel-basic-50.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Elecrow CrowPanel Basic 5.0";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <19>;
pin-scl = <20>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: generic,esp32.dts

View File

@ -0,0 +1,15 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Generic ESP32";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: generic,esp32c6.dts

View File

@ -0,0 +1,15 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Generic ESP32 C6";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <31>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: generic,esp32p4.dts

View File

@ -0,0 +1,15 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Generic ESP32 P4";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <57>;
};
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: generic,esp32s3.dts

View File

@ -0,0 +1,15 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Generic ESP32 S3";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
};

View File

@ -16,23 +16,4 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_7,
.scl_io_num = GPIO_NUM_8,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
}
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: guition,jc1060p470ciwy.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Guition JC1060P470C-I-W-Y";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <57>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <7>;
pin-scl = <8>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -31,44 +31,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
//Touch
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_33,
.scl_io_num = GPIO_NUM_32,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
//CN1 header, JST SH 1.25, GND / IO22 / IO21 / 3.3V
i2c::Configuration {
.name = "External",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_21,
.scl_io_num = GPIO_NUM_22,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
//Display
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: guition,jc2432w328c.dts

View File

@ -0,0 +1,32 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Guition JC2432W328C";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <33>;
pin-scl = <32>;
};
/* CN1 header */
i2c_external {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <21>;
pin-scl = <22>;
};
};

View File

@ -20,45 +20,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
//Touch
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_19,
.scl_io_num = GPIO_NUM_20,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
//P4 header, JST SH 1.25, GND / 3.3V / IO17 / IO18 or
//P5 header, JST SH 1.0, GND / 3.3V / IO17 / IO18
i2c::Configuration {
.name = "External",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_17,
.scl_io_num = GPIO_NUM_18,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
//SD Card
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: guition,jc8048w550c.dts

View File

@ -0,0 +1,35 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Guition JC8048W550C";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <19>;
pin-scl = <20>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_external {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <17>;
pin-scl = <18>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -48,24 +48,5 @@ extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.uiScale = UiScale::Smallest,
.createDevices = createDevices,
.i2c = {
tt::hal::i2c::Configuration {
.name = "Internal",
.port = DISPLAY_I2C_PORT,
.initMode = tt::hal::i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = DISPLAY_PIN_SDA,
.scl_io_num = DISPLAY_PIN_SCL,
.sda_pullup_en = GPIO_PULLUP_ENABLE,
.scl_pullup_en = GPIO_PULLUP_ENABLE,
.master = {
.clk_speed = DISPLAY_I2C_SPEED
},
.clk_flags = 0
}
}
},
.spi {},
};

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: heltec,wifi-lora-32-v3.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "Heltec WiFi LoRa 32 V3";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <200000>;
pin-sda = <17>;
pin-scl = <18>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -26,42 +26,6 @@ static std::vector<std::shared_ptr<Device>> createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_18,
.scl_io_num = GPIO_NUM_8,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "External",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_43,
.scl_io_num = GPIO_NUM_44,
.sda_pullup_en = false,
.scl_pullup_en = false,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
spi::Configuration {
.device = SPI2_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: lilygo,tdeck.dts

View File

@ -0,0 +1,31 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "LilyGO T-Deck";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <18>;
pin-scl = <8>;
};
i2c_external {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <43>;
pin-scl = <44>;
};
};

View File

@ -20,7 +20,6 @@ static std::vector<std::shared_ptr<Device>> createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {},
.spi {
spi::Configuration {
.device = SPI2_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: lilygo,tdisplay-s3.dts

View File

@ -0,0 +1,15 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "LilyGO T-Display S3";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
};

View File

@ -22,7 +22,6 @@ extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.uiScale = UiScale::Smallest,
.createDevices = createDevices,
.i2c = {},
.spi {
spi::Configuration {
.device = SPI2_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: lilygo,tdisplay.dts

View File

@ -0,0 +1,15 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "LilyGO T-Display";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
};

View File

@ -21,25 +21,6 @@ extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.uiScale = UiScale::Smallest,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "STEMMA QT",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_44,
.scl_io_num = GPIO_NUM_43,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
spi::Configuration {
.device = SPI3_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: lilygo,tdongle-s3.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "LilyGO T-Dongle S3";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c0 {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <44>;
pin-scl = <43>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -30,42 +30,6 @@ extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.uiScale = UiScale::Smallest,
.createDevices = createDevices,
.i2c {
i2c::Configuration {
.name = "Main",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_8,
.scl_io_num = GPIO_NUM_9,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Port A", // Grove
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_2,
.scl_io_num = GPIO_NUM_1,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
},
.spi {
// Display
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: m5stack,cardputer-adv.dts

View File

@ -0,0 +1,35 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "M5Stack Cardputer Adv";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <8>;
pin-scl = <9>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_port_a {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <2>;
pin-scl = <1>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -28,25 +28,6 @@ extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.uiScale = UiScale::Smallest,
.createDevices = createDevices,
.i2c {
i2c::Configuration {
.name = "Port A", // Grove
.port = I2C_NUM_0,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_2,
.scl_io_num = GPIO_NUM_1,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
},
.spi {
// Display
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: m5stack,cardputer.dts

View File

@ -0,0 +1,25 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "M5Stack Cardputer";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_port_a {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <2>;
pin-scl = <1>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -22,42 +22,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_21,
.scl_io_num = GPIO_NUM_22,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Port A", // Grove
.port = I2C_NUM_1,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_32,
.scl_io_num = GPIO_NUM_33,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
spi::Configuration {
.device = SPI2_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: m5stack,core2.dts

View File

@ -0,0 +1,35 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "M5Stack Core2";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <21>;
pin-scl = <22>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_port_a {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <32>;
pin-scl = <33>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -22,76 +22,6 @@ static DeviceVector createDevices() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_12,
.scl_io_num = GPIO_NUM_11,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Port A", // Grove
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_2,
.scl_io_num = GPIO_NUM_1,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Port B", // Grove
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_9,
.scl_io_num = GPIO_NUM_8,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Port C", // Grove
.port = I2C_NUM_1,
.initMode = i2c::InitMode::Disabled,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_18,
.scl_io_num = GPIO_NUM_17,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
spi::Configuration {
.device = SPI3_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: m5stack,cores3.dts

View File

@ -0,0 +1,55 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "M5Stack CoreS3";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <49>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <12>;
pin-scl = <11>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_port_a {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <2>;
pin-scl = <1>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_port_b {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <9>;
pin-scl = <8>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_port_c {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <18>;
pin-scl = <17>;
sda-pullup;
scl-pullup;
};
};

View File

@ -28,42 +28,6 @@ extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.uiScale = UiScale::Smallest,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_21,
.scl_io_num = GPIO_NUM_22,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Grove",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_32,
.scl_io_num = GPIO_NUM_33,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
spi::Configuration {
.device = SPI2_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: m5stack,stickc-plus.dts

View File

@ -0,0 +1,35 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "M5Stack StickC Plus";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <21>;
pin-scl = <22>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_grove {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <32>;
pin-scl = <33>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -30,42 +30,6 @@ extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.uiScale = UiScale::Smallest,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_21,
.scl_io_num = GPIO_NUM_22,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Grove",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::ByTactility,
.isMutable = true,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_32,
.scl_io_num = GPIO_NUM_33,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi {
spi::Configuration {
.device = SPI2_HOST,

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: m5stack,stickc-plus2.dts

View File

@ -0,0 +1,34 @@
/dts-v1/;
#include <tactility/bindings/root.h>
#include <tactility/bindings/esp32_gpio.h>
#include <tactility/bindings/esp32_i2c.h>
/ {
compatible = "root";
model = "M5Stack StickC Plus2";
gpio0 {
compatible = "espressif,esp32-gpio";
gpio-count = <40>;
};
i2c_internal {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_0>;
clock-frequency = <400000>;
pin-sda = <21>;
pin-scl = <22>;
pin-sda-pullup;
pin-scl-pullup;
};
i2c_grove {
compatible = "espressif,esp32-i2c";
port = <I2C_NUM_1>;
clock-frequency = <400000>;
pin-sda = <32>;
pin-scl = <33>;
pin-sda-pullup;
pin-scl-pullup;
};
};

View File

@ -87,42 +87,6 @@ static bool initBoot() {
extern const Configuration hardwareConfiguration = {
.initBoot = initBoot,
.createDevices = createDevices,
.i2c = {
i2c::Configuration {
.name = "Internal",
.port = I2C_NUM_0,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_31,
.scl_io_num = GPIO_NUM_32,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
},
i2c::Configuration {
.name = "Port A",
.port = I2C_NUM_1,
.initMode = i2c::InitMode::ByTactility,
.isMutable = false,
.config = (i2c_config_t) {
.mode = I2C_MODE_MASTER,
.sda_io_num = GPIO_NUM_53,
.scl_io_num = GPIO_NUM_54,
.sda_pullup_en = true,
.scl_pullup_en = true,
.master = {
.clk_speed = 400000
},
.clk_flags = 0
}
}
},
.spi = {
// SDCard
spi::Configuration {

View File

@ -1,3 +1,3 @@
dependencies:
- TactilityKernel
dts: ../placeholder.dts
- Platforms/PlatformEsp32
dts: m5stack,tab5.dts

Some files were not shown because too many files have changed in this diff Show More