Tab5 ST7121 variant + fixes (#605)
Added the newest variant to the tab5, St7121. Fixed variant detection reliability Fixed tab5 camera WHO_AM_I failing sometimes Fixed tab5 keyboard live rotation on boot and after stopping/starting lvgl
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#include <tactility/bindings/bindings.h>
|
||||
#include <drivers/st7121.h>
|
||||
|
||||
// The devicetree compiler derives the expected config typedef name from the compatible
|
||||
// string's suffix (e.g. "sitronix,st7121" -> st7121_config_dt), not from the node name or
|
||||
// driver name, so the tag here must match that exactly.
|
||||
DEFINE_DEVICETREE(st7121, struct St7121Config)
|
||||
@@ -0,0 +1,68 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <tactility/device.h>
|
||||
#include <tactility/drivers/gpio.h>
|
||||
|
||||
struct St7121Config {
|
||||
uint16_t horizontal_resolution;
|
||||
uint16_t vertical_resolution;
|
||||
uint8_t bits_per_pixel;
|
||||
bool bgr_order;
|
||||
bool invert_color;
|
||||
bool mirror_x;
|
||||
bool mirror_y;
|
||||
|
||||
// Reset pin for the panel. GPIO_PIN_SPEC_NONE falls back to a software reset sent over the
|
||||
// DBI command interface (see esp_lcd_st7121's panel_st7121_reset()).
|
||||
struct GpioPinSpec pin_reset;
|
||||
|
||||
// LDO channel powering the MIPI DSI PHY - the PHY has no power of its own until this is
|
||||
// acquired, so it must happen before the DSI bus is created. Both fields are int32_t (not
|
||||
// uint32_t) to exactly match esp_ldo_channel_config_t's plain `int` fields - assigning a
|
||||
// uint32_t into that struct's brace-init would be a narrowing conversion (-Werror=narrowing).
|
||||
int32_t ldo_channel;
|
||||
int32_t ldo_voltage_mv;
|
||||
|
||||
uint8_t dsi_bus_id;
|
||||
// Number of MIPI DSI data lanes. 0 falls back to the maximum available.
|
||||
uint8_t num_data_lanes;
|
||||
uint32_t lane_bit_rate_mbps;
|
||||
|
||||
uint32_t dpi_clock_freq_mhz;
|
||||
uint32_t hsync_pulse_width;
|
||||
uint32_t hsync_back_porch;
|
||||
uint32_t hsync_front_porch;
|
||||
uint32_t vsync_pulse_width;
|
||||
uint32_t vsync_back_porch;
|
||||
uint32_t vsync_front_porch;
|
||||
// Number of screen-sized frame buffers the driver allocates (0 or 1 = single-buffered).
|
||||
uint8_t num_fbs;
|
||||
bool use_dma2d;
|
||||
bool disable_lp;
|
||||
|
||||
// See the 'allow-tearing' binding property.
|
||||
bool allow_tearing;
|
||||
|
||||
// Custom vendor init sequence, flattened as bytes: a run of
|
||||
// [cmd, data_len, delay_ms, data_len bytes of data...] entries. NULL/0 falls back to the
|
||||
// ST7121 component's own built-in default sequence (see vendor_specific_init_default in
|
||||
// esp_lcd_st7121.c) - not guaranteed to match any particular panel's actual bring-up
|
||||
// requirements.
|
||||
const uint8_t* init_sequence;
|
||||
uint32_t init_sequence_length;
|
||||
|
||||
// Optional reference to this display's backlight device, NULL if none.
|
||||
struct Device* backlight;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,14 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#pragma once
|
||||
|
||||
#include <tactility/module.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct Module st7121_module;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user