mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-18 16:05:05 +00:00
Implement touch placeholder driver, implement cs-gpios.
This commit is contained in:
parent
9872825f6f
commit
7f574a34b0
@ -27,6 +27,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -38,6 +39,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include <tactility/bindings/esp32_spi.h>
|
||||
#include <tactility/bindings/esp32_sdspi.h>
|
||||
#include <tactility/bindings/display_placeholder.h>
|
||||
#include <tactility/bindings/touch_placeholder.h>
|
||||
#include <tactility/bindings/esp32_uart.h>
|
||||
|
||||
/ {
|
||||
@ -22,10 +23,16 @@
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
|
||||
|
||||
display {
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
@ -34,6 +41,7 @@
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
sdcard {
|
||||
compatible = "espressif,esp32-sdspi";
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <tactility/bindings/esp32_uart.h>
|
||||
#include <tactility/bindings/esp32_sdspi.h>
|
||||
#include <tactility/bindings/display_placeholder.h>
|
||||
#include <tactility/bindings/touch_placeholder.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
@ -28,13 +29,19 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
|
||||
display {
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
@ -43,7 +50,8 @@
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
sdcard {
|
||||
compatible = "espressif,esp32-sdspi";
|
||||
pin-cs = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <tactility/bindings/esp32_spi.h>
|
||||
#include <tactility/bindings/esp32_sdspi.h>
|
||||
#include <tactility/bindings/display_placeholder.h>
|
||||
#include <tactility/bindings/touch_placeholder.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
@ -28,18 +29,25 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
|
||||
display {
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio1 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio1 14 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -38,6 +39,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio1 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio1 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio1 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -48,6 +49,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -31,11 +31,11 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 42 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 47 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 41 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 48 GPIO_FLAG_NONE>;
|
||||
pin-hd = <&gpio0 42 GPIO_FLAG_NONE>;
|
||||
|
||||
|
||||
sdcard {
|
||||
compatible = "espressif,esp32-sdspi";
|
||||
pin-cs = <&gpio0 42 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 10 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
#include <tactility/bindings/esp32_spi.h>
|
||||
#include <tactility/bindings/esp32_sdspi.h>
|
||||
#include <tactility/bindings/display_placeholder.h>
|
||||
#include <tactility/bindings/touch_placeholder.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
@ -18,18 +19,25 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
|
||||
display {
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
#include <tactility/bindings/esp32_spi.h>
|
||||
#include <tactility/bindings/esp32_sdspi.h>
|
||||
#include <tactility/bindings/display_placeholder.h>
|
||||
#include <tactility/bindings/touch_placeholder.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
@ -27,18 +28,25 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
|
||||
display {
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 42 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -44,6 +45,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 7 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 6 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 42 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -44,6 +45,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 7 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 6 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 0 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 6 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <tactility/bindings/esp32_uart.h>
|
||||
#include <tactility/bindings/esp32_sdspi.h>
|
||||
#include <tactility/bindings/display_placeholder.h>
|
||||
#include <tactility/bindings/touch_placeholder.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
@ -28,19 +29,26 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 33 GPIO_FLAG_NONE>; // Touch
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
max-transfer-size = <65536>;
|
||||
|
||||
display {
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <tactility/bindings/esp32_uart.h>
|
||||
#include <tactility/bindings/esp32_sdspi.h>
|
||||
#include <tactility/bindings/display_placeholder.h>
|
||||
#include <tactility/bindings/touch_placeholder.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
@ -28,19 +29,26 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 12 GPIO_FLAG_NONE>; // Touch
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 33 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
max-transfer-size = <65536>;
|
||||
|
||||
display {
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 10 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 15 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -48,6 +49,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -49,11 +49,16 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 45 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 21 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 48 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 47 GPIO_FLAG_NONE>;
|
||||
pin-wp = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
pin-hd = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
|
||||
display {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
|
||||
@ -50,6 +50,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 10 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -44,19 +44,21 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 12 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 39 GPIO_FLAG_NONE>; // SD card
|
||||
pin-mosi = <&gpio0 41 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 38 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
|
||||
sdcard@0 {
|
||||
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
sdcard@1 {
|
||||
compatible = "espressif,esp32-sdspi";
|
||||
pin-cs = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
frequency-khz = <20000>;
|
||||
};
|
||||
|
||||
display@1 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
uart0 {
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
#include <tactility/bindings/root.h>
|
||||
#include <tactility/bindings/esp32_ble.h>
|
||||
#include <tactility/bindings/esp32_gpio.h>
|
||||
#include <tactility/bindings/esp32_i2c.h>
|
||||
#include <tactility/bindings/esp32_spi.h>
|
||||
|
||||
/ {
|
||||
compatible = "root";
|
||||
@ -18,11 +16,4 @@
|
||||
compatible = "espressif,esp32-gpio";
|
||||
gpio-count = <49>;
|
||||
};
|
||||
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
pin-mosi = <&gpio0 7 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 6 GPIO_FLAG_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 4 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 3 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
|
||||
@ -23,9 +23,19 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 6 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 2 GPIO_FLAG_NONE>; // Touch
|
||||
pin-mosi = <&gpio0 3 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 1 GPIO_FLAG_NONE>;
|
||||
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
sdmmc0 {
|
||||
|
||||
@ -27,7 +27,6 @@ static DeviceVector createDevices() {
|
||||
bq27220,
|
||||
std::make_shared<Drv2605>(i2c),
|
||||
power,
|
||||
createTpagerSdCard(),
|
||||
createDisplay(),
|
||||
keyboard,
|
||||
std::make_shared<TpagerEncoder>()
|
||||
|
||||
@ -35,6 +35,8 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 21 GPIO_FLAG_NONE>, // SD card
|
||||
<&gpio0 36 GPIO_FLAG_NONE>; // Display
|
||||
pin-mosi = <&gpio0 34 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 33 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 35 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 37 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 35 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 36 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -63,6 +64,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 37 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 35 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 36 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -49,6 +50,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 14 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -53,6 +53,8 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 4 GPIO_FLAG_NONE>, // SD card
|
||||
<&gpio0 5 GPIO_FLAG_NONE>; // Display
|
||||
pin-mosi = <&gpio0 23 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 38 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -78,6 +78,8 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 4 GPIO_FLAG_NONE>, // SD card
|
||||
<&gpio0 3 GPIO_FLAG_NONE>; // Display
|
||||
pin-mosi = <&gpio0 37 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 35 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 36 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 47 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 38 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -112,16 +112,18 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 4 GPIO_FLAG_NONE>, // SD card
|
||||
<&gpio0 3 GPIO_FLAG_NONE>; // Display
|
||||
pin-mosi = <&gpio0 37 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 35 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 36 GPIO_FLAG_NONE>;
|
||||
|
||||
|
||||
sdcard@0 {
|
||||
compatible = "espressif,esp32-sdspi";
|
||||
pin-cs = <&gpio0 4 GPIO_FLAG_NONE>;
|
||||
frequency-khz = <20000>;
|
||||
};
|
||||
|
||||
|
||||
display@1 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 15 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 15 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 41 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -65,6 +66,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 7 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 6 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 4 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 5 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -82,6 +82,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 42 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 44 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 43 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -31,12 +31,23 @@
|
||||
sdcard_spi: spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 48 GPIO_FLAG_NONE>, // Display
|
||||
<&gpio0 38 GPIO_FLAG_NONE>, // Touch
|
||||
<&gpio0 43 GPIO_FLAG_NONE>; // SD card
|
||||
pin-mosi = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 41 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
max-transfer-size = <65536>;
|
||||
|
||||
sdcard {
|
||||
|
||||
display@0 {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
|
||||
touch@1 {
|
||||
compatible = "touch-placeholder";
|
||||
};
|
||||
|
||||
sdcard@2 {
|
||||
compatible = "espressif,esp32-sdspi";
|
||||
pin-cs = <&gpio0 43 GPIO_FLAG_NONE>;
|
||||
frequency-khz = <20000>;
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 10 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 41 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -50,6 +51,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 17 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 16 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 21 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 9 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 10 GPIO_FLAG_NONE>;
|
||||
@ -51,6 +52,7 @@
|
||||
spi1 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI3_HOST>;
|
||||
cs-gpios = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 16 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 15 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 17 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -32,8 +32,13 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 21 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 38 GPIO_FLAG_NONE>;
|
||||
|
||||
display {
|
||||
compatible = "display-placeholder";
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 10 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 11 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 13 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 12 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
cs-gpios = <&gpio0 41 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <&gpio0 40 GPIO_FLAG_NONE>;
|
||||
pin-miso = <&gpio0 38 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 39 GPIO_FLAG_NONE>;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
#include "tactility/drivers/gpio_descriptor.h"
|
||||
#include <tactility/drivers/esp32_gpio_helpers.h>
|
||||
#include <tactility/drivers/gpio_controller.h>
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
#include <soc/gpio_num.h>
|
||||
@ -117,6 +118,18 @@ static error_t start(Device* device) {
|
||||
return ERROR_RESOURCE;
|
||||
}
|
||||
|
||||
// Deselect all CS pins (drive high) before any SPI communication
|
||||
const GpioPinSpec* cs = dts_config->cs_gpios;
|
||||
while (cs->gpio_controller != nullptr) {
|
||||
GpioDescriptor* desc = gpio_descriptor_acquire(cs->gpio_controller, cs->pin, GPIO_OWNER_SPI);
|
||||
if (desc != nullptr) {
|
||||
gpio_descriptor_set_flags(desc, GPIO_FLAG_DIRECTION_OUTPUT);
|
||||
gpio_descriptor_set_level(desc, true);
|
||||
gpio_descriptor_release(desc);
|
||||
}
|
||||
cs++;
|
||||
}
|
||||
|
||||
data->initialized = true;
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
5
TactilityKernel/bindings/touch-placeholder.yaml
Normal file
5
TactilityKernel/bindings/touch-placeholder.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
description: Touch placeholder
|
||||
|
||||
compatible: "touch-placeholder"
|
||||
|
||||
properties: {}
|
||||
@ -0,0 +1,15 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#include <tactility/bindings/bindings.h>
|
||||
#include <tactility/drivers/touch_placeholder.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
DEFINE_DEVICETREE(touch_placeholder, struct TouchPlaceholderConfig)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
14
TactilityKernel/include/tactility/drivers/touch.h
Normal file
14
TactilityKernel/include/tactility/drivers/touch.h
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <tactility/device.h>
|
||||
|
||||
extern const struct DeviceType TOUCH_TYPE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct TouchPlaceholderConfig {
|
||||
uint8_t _unused;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
10
TactilityKernel/source/drivers/touch.cpp
Normal file
10
TactilityKernel/source/drivers/touch.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#include <tactility/drivers/touch.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
const struct DeviceType TOUCH_TYPE {
|
||||
.name = "touch"
|
||||
};
|
||||
|
||||
}
|
||||
26
TactilityKernel/source/drivers/touch_placeholder.cpp
Normal file
26
TactilityKernel/source/drivers/touch_placeholder.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#include <tactility/drivers/touch_placeholder.h>
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/driver.h>
|
||||
#include <tactility/drivers/touch.h>
|
||||
#include <tactility/module.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
static error_t start(Device*) { return ERROR_NONE; }
|
||||
static error_t stop(Device*) { return ERROR_NONE; }
|
||||
|
||||
extern Module root_module;
|
||||
|
||||
Driver touch_placeholder_driver = {
|
||||
.name = "touch_placeholder",
|
||||
.compatible = (const char*[]) { "touch-placeholder", nullptr },
|
||||
.start_device = start,
|
||||
.stop_device = stop,
|
||||
.api = nullptr,
|
||||
.device_type = &TOUCH_TYPE,
|
||||
.owner = &root_module,
|
||||
.internal = nullptr
|
||||
};
|
||||
|
||||
}
|
||||
@ -16,6 +16,8 @@ static error_t start() {
|
||||
if (driver_construct_add(&root_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
||||
extern Driver display_placeholder_driver;
|
||||
if (driver_construct_add(&display_placeholder_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
||||
extern Driver touch_placeholder_driver;
|
||||
if (driver_construct_add(&touch_placeholder_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
||||
extern Driver spi_peripheral_driver;
|
||||
if (driver_construct_add(&spi_peripheral_driver) != ERROR_NONE) return ERROR_RESOURCE;
|
||||
return ERROR_NONE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user