I have an example of ESP32 C3.
esphome:
name: nv3007-test
friendly_name: nv3007 test
esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
spi:
clk_pin: GPIO5
mosi_pin: GPIO4
display:
- platform: mipi_spi
model: custom
cs_pin: GPIO7
dc_pin: GPIO6
reset_pin: GPIO20
dimensions:
height: 428
width: 142
offset_width: 12 # Vendor window starts from X=12, must keep
rotation: 0
color_order: rgb
color_depth: 16
data_rate: 20MHz
init_sequence:
# ========== NV3007 Vendor Specific Configuration Sequence ==========
- [ 0xff, 0xa5] # Vendor specific command mode entry
- [ 0x9a, 0x08] # Vendor specific configuration A
- [ 0x9b, 0x08] # Vendor specific configuration B
- [ 0x9c, 0xb0] # Vendor specific configuration C
- [ 0x9d, 0x17] # Vendor specific configuration D
- [ 0x9e, 0xc2] # Vendor specific configuration E
- [ 0x8f, 0x22, 0x04] # Vendor specific configuration F (dual byte parameter)
- [ 0x84, 0x90] # Vendor specific configuration G
- [ 0x83, 0x7B] # Vendor specific configuration H
- [ 0x85, 0x4F] # Vendor specific configuration I
- [ 0x6e, 0x0f] # Vendor specific configuration J
- [ 0x7e, 0x0f] # Vendor specific configuration K
- [ 0x60, 0x00] # Vendor specific configuration L
- [ 0x70, 0x00] # Vendor specific configuration M
- [ 0x6d, 0x39] # Vendor specific configuration N
- [ 0x7d, 0x31] # Vendor specific configuration O
- [ 0x61, 0x0A] # Vendor specific configuration P
- [ 0x71, 0x0A] # Vendor specific configuration Q
- [ 0x6c, 0x35] # Vendor specific configuration R
- [ 0x7c, 0x29] # Vendor specific configuration S
- [ 0x62, 0x0F] # Vendor specific configuration T
- [ 0x72, 0x0F] # Vendor specific configuration U
- [ 0x68, 0x4f] # Vendor specific configuration V
- [ 0x78, 0x45] # Vendor specific configuration W
- [ 0x66, 0x33] # Vendor specific configuration X
- [ 0x76, 0x33] # Vendor specific configuration Y
- [ 0x6b, 0x14] # Vendor specific configuration Z
- [ 0x7b, 0x14] # Vendor specific configuration AA
- [ 0x63, 0x09] # Vendor specific configuration AB
- [ 0x73, 0x09] # Vendor specific configuration AC
- [ 0x6a, 0x13] # Vendor specific configuration AD
- [ 0x7a, 0x16] # Vendor specific configuration AE
- [ 0x64, 0x08] # Vendor specific configuration AF
- [ 0x74, 0x08] # Vendor specific configuration AG
- [ 0x69, 0x07] # Vendor specific configuration AH
- [ 0x79, 0x0d] # Vendor specific configuration AI
- [ 0x65, 0x05] # Vendor specific configuration AJ
- [ 0x75, 0x05] # Vendor specific configuration AK
- [ 0x67, 0x33] # Vendor specific configuration AL
- [ 0x77, 0x33] # Vendor specific configuration AM
- [ 0x6f, 0x00] # Vendor specific configuration AN
- [ 0x7f, 0x00] # Vendor specific configuration AO
# ========== Timing Parameter Configuration ==========
- [ 0x50, 0x00] # Window start position setting
- [ 0x52, 0xd6] # HBP (Horizontal Back Porch): 214
- [ 0x53, 0x04] # HFP (Horizontal Front Porch): 4
- [ 0x54, 0x04] # VBP (Vertical Back Porch): 4
- [ 0x55, 0x1b] # VFP (Vertical Front Porch): 27
- [ 0x56, 0x1b] # VFP continued: 27
# ========== Display Control Parameters ==========
- [ 0xa0, 0x2a, 0x24, 0x00] # Vendor specific display control A
- [ 0xa1, 0x84] # Vendor specific display control B
- [ 0xa2, 0x85] # Vendor specific display control C
- [ 0xa8, 0x34] # Vendor specific display control D
- [ 0xa9, 0x80] # Vendor specific display control E
- [ 0xaa, 0x73] # Vendor specific display control F
- [ 0xAB, 0x03, 0x61] # Vendor specific display control G (dual byte parameter)
- [ 0xAC, 0x03, 0x65] # Vendor specific display control H (dual byte parameter)
- [ 0xAD, 0x03, 0x60] # Vendor specific display control I (dual byte parameter)
- [ 0xAE, 0x03, 0x64] # Vendor specific display control J (dual byte parameter)
- [ 0xB9, 0x82] # Vendor specific display control K
- [ 0xBA, 0x83] # Vendor specific display control L
- [ 0xBB, 0x80] # Vendor specific display control M
- [ 0xBC, 0x81] # Vendor specific display control N
- [ 0xBD, 0x02] # Vendor specific display control O
- [ 0xBE, 0x01] # Vendor specific display control P
- [ 0xBF, 0x04] # Vendor specific display control Q
- [ 0xC0, 0x03] # Power control A
- [ 0xc4, 0x33] # Power control B
- [ 0xc5, 0x80] # Power control C
- [ 0xc6, 0x73] # Power control D
- [ 0xc7, 0x00] # Power control E
- [ 0xC8, 0x33, 0x33] # Power control F (dual byte parameter)
- [ 0xC9, 0x5b] # Power control G
- [ 0xCA, 0x5a] # Power control H
- [ 0xCB, 0x5d] # Power control I
- [ 0xCC, 0x5c] # Power control J
- [ 0xCD, 0x33, 0x33] # Power control K (dual byte parameter)
- [ 0xCE, 0x5f] # Power control L
- [ 0xCF, 0x5e] # Power control M
- [ 0xD0, 0x61] # Power control N
- [ 0xD1, 0x60] # Power control O
- [ 0xB0, 0x3a, 0x3a, 0x00, 0x00] # Pixel format etc (5 byte parameter)
- [ 0xB6, 0x32] # Display control A
- [ 0xB7, 0x80] # Display control B
- [ 0xB8, 0x73] # Display control C
# ========== Color Correction Parameters ==========
- [ 0xe0, 0x00] # Gamma correction A1
- [ 0xe1, 0x03, 0x0f] # Gamma correction A2 (dual byte parameter)
- [ 0xe2, 0x04] # Gamma correction A3
- [ 0xe3, 0x01] # Gamma correction A4
- [ 0xe4, 0x0e] # Gamma correction A5
- [ 0xe5, 0x01] # Gamma correction A6
- [ 0xe6, 0x19] # Gamma correction A7
- [ 0xe7, 0x10] # Gamma correction A8
- [ 0xe8, 0x10] # Gamma correction A9
- [ 0xe9, 0x21] # Gamma correction A10
- [ 0xea, 0x12] # Gamma correction A11
- [ 0xeb, 0xd0] # Gamma correction A12
- [ 0xec, 0x04] # Gamma correction A13
- [ 0xed, 0x07] # Gamma correction A14
- [ 0xee, 0x07] # Gamma correction A15
- [ 0xef, 0x09] # Gamma correction A16
- [ 0xF0, 0xD0] # Gamma correction B1
- [ 0xF1, 0x0E] # Gamma correction B2
- [ 0xF9, 0x56] # Gamma correction B3
- [ 0xf2, 0x26, 0x1b, 0x0b, 0x20] # Gamma correction B4 (5 byte parameter)
- [ 0xec, 0x04] # Gamma correction B5 (repeated setting)
# ========== Window and Display Control ==========
- [ 0x35, 0x00] # Enable TE (Tearing Effect)
- [ 0x44, 0x00, 0x10] # TE line setting (dual byte parameter)
- [ 0x46, 0x10] # TE mode setting
# ========== Exit Vendor Mode and Enable Display ==========
- [ 0xff, 0x00] # Exit vendor specific mode
- [ 0x11] # Sleep Out (exit sleep mode)
- delay 200ms # Wait for stability
# ========== Vendor provided core window setting (must keep) ==========
- [ 0x2a, 0x00, 0x0c, 0x00, 0x99] # Set column address window: X 12-153 (142 pixels)
- [ 0x2b, 0x00, 0x00, 0x01, 0xab] # Set row address window: Y 0-427 (428 pixels)
- [ 0x29] # Display ON
- delay 150ms # Wait for display stability
lvgl: