Skip to content

Commit 41dddd5

Browse files
TikilyTravMurav
authored andcommitted
lk2nd: display: panel : Add hx8389b
1 parent b33a7d4 commit 41dddd5

2 files changed

Lines changed: 247 additions & 0 deletions

File tree

Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
// Copyright (c) 2026 FIXME
3+
// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
4+
// Copyright (c) 2014, The Linux Foundation. All rights reserved. (FIXME)
5+
6+
#ifndef _PANEL_HX8389B_QHD_VIDEO_H_
7+
#define _PANEL_HX8389B_QHD_VIDEO_H_
8+
9+
#include <mipi_dsi.h>
10+
#include <panel_display.h>
11+
#include <panel.h>
12+
#include <string.h>
13+
14+
static struct panel_config hx8389b_qhd_video_panel_data = {
15+
.panel_node_id = "qcom,mdss_dsi_hx8389b_qhd_video",
16+
.panel_controller = "dsi:0:",
17+
.panel_compatible = "qcom,mdss-dsi-panel",
18+
.panel_type = 0,
19+
.panel_destination = "DISPLAY_1",
20+
/* .panel_orientation not supported yet */
21+
.panel_framerate = 60,
22+
.panel_lp11_init = 0,
23+
.panel_init_delay = 0,
24+
};
25+
26+
static struct panel_resolution hx8389b_qhd_video_panel_res = {
27+
.panel_width = 540,
28+
.panel_height = 960,
29+
.hfront_porch = 36,
30+
.hback_porch = 63,
31+
.hpulse_width = 39,
32+
.hsync_skew = 0,
33+
.vfront_porch = 7,
34+
.vback_porch = 15,
35+
.vpulse_width = 3,
36+
/* Borders not supported yet */
37+
};
38+
39+
static struct color_info hx8389b_qhd_video_color = {
40+
.color_format = 24,
41+
.color_order = DSI_RGB_SWAP_RGB,
42+
.underflow_color = 0xff,
43+
/* Borders and pixel packing not supported yet */
44+
};
45+
46+
static char hx8389b_qhd_video_on_cmd_0[] = {
47+
0x04, 0x00, 0x39, 0xc0, 0xb9, 0xff, 0x83, 0x89
48+
};
49+
static char hx8389b_qhd_video_on_cmd_1[] = {
50+
0x08, 0x00, 0x39, 0xc0, 0xba, 0x41, 0x93, 0x00,
51+
0x16, 0xa4, 0x50, 0x18
52+
};
53+
static char hx8389b_qhd_video_on_cmd_2[] = {
54+
0xc6, 0x08, 0x15, 0x80
55+
};
56+
static char hx8389b_qhd_video_on_cmd_3[] = {
57+
0xcc, 0x02, 0x15, 0x80
58+
};
59+
static char hx8389b_qhd_video_on_cmd_4[] = {
60+
0x14, 0x00, 0x39, 0xc0, 0xb1, 0x00, 0x00, 0x07,
61+
0xef, 0x97, 0x10, 0x11, 0x94, 0xf1, 0x26, 0x2e,
62+
0x3f, 0x3f, 0x42, 0x01, 0x32, 0xf7, 0x20, 0x80
63+
};
64+
static char hx8389b_qhd_video_on_cmd_5[] = {
65+
0x04, 0x00, 0x39, 0xc0, 0xde, 0x05, 0x58, 0x10
66+
};
67+
static char hx8389b_qhd_video_on_cmd_6[] = {
68+
0x08, 0x00, 0x39, 0xc0, 0xb2, 0x00, 0x00, 0x78,
69+
0x0f, 0x03, 0x3f, 0x80
70+
};
71+
static char hx8389b_qhd_video_on_cmd_7[] = {
72+
0x18, 0x00, 0x39, 0xc0, 0xb4, 0x80, 0x08, 0x00,
73+
0x32, 0x10, 0x07, 0x32, 0x10, 0x03, 0x32, 0x10,
74+
0x07, 0x27, 0x05, 0x48, 0x0b, 0x37, 0x05, 0x48,
75+
0x14, 0xff, 0x5b, 0x0a
76+
};
77+
static char hx8389b_qhd_video_on_cmd_8[] = {
78+
0x31, 0x00, 0x39, 0xc0, 0xd5, 0x00, 0x00, 0x00,
79+
0x00, 0x01, 0x00, 0x00, 0x01, 0x60, 0x00, 0x99,
80+
0x88, 0x88, 0x88, 0x88, 0x23, 0x88, 0x01, 0x88,
81+
0x67, 0x88, 0x45, 0x01, 0x23, 0x23, 0x45, 0x88,
82+
0x88, 0x88, 0x88, 0x99, 0x88, 0x88, 0x88, 0x54,
83+
0x88, 0x76, 0x88, 0x10, 0x88, 0x32, 0x32, 0x10,
84+
0x88, 0x88, 0x88, 0x88, 0x88, 0xff, 0xff, 0xff
85+
};
86+
static char hx8389b_qhd_video_on_cmd_9[] = {
87+
0x23, 0x00, 0x39, 0xc0, 0xe0, 0x01, 0x17, 0x1c,
88+
0x34, 0x32, 0x3f, 0x2c, 0x4b, 0x06, 0x0b, 0x11,
89+
0x14, 0x16, 0x13, 0x13, 0x1b, 0x1b, 0x01, 0x17,
90+
0x1c, 0x34, 0x32, 0x3f, 0x2c, 0x4b, 0x06, 0x0b,
91+
0x11, 0x14, 0x16, 0x13, 0x13, 0x1b, 0x1b, 0xff
92+
};
93+
static char hx8389b_qhd_video_on_cmd_10[] = {
94+
0x80, 0x00, 0x39, 0xc0, 0xc1, 0x01, 0x00, 0x08,
95+
0x10, 0x18, 0x20, 0x28, 0x30, 0x34, 0x3b, 0x45,
96+
0x4b, 0x52, 0x5a, 0x62, 0x6c, 0x75, 0x7e, 0x84,
97+
0x89, 0x94, 0x9d, 0xa5, 0xac, 0xb7, 0xbc, 0xc3,
98+
0xcb, 0xd1, 0xda, 0xe3, 0xec, 0xf7, 0xff, 0x00,
99+
0x00, 0x41, 0x75, 0x5c, 0x1d, 0xbd, 0x15, 0xc0,
100+
0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x34,
101+
0x3a, 0x43, 0x49, 0x50, 0x58, 0x60, 0x69, 0x71,
102+
0x7b, 0x81, 0x87, 0x90, 0x99, 0xa2, 0xa8, 0xb2,
103+
0xb8, 0xc0, 0xc8, 0xcd, 0xd4, 0xde, 0xe6, 0xf0,
104+
0xf9, 0x00, 0x00, 0x6a, 0x56, 0x63, 0x0c, 0xc5,
105+
0xc2, 0xc0, 0x00, 0x08, 0x10, 0x18, 0x20, 0x28,
106+
0x30, 0x34, 0x3a, 0x43, 0x49, 0x50, 0x58, 0x60,
107+
0x69, 0x71, 0x7b, 0x81, 0x87, 0x90, 0x99, 0xa2,
108+
0xa8, 0xb2, 0xb8, 0xc0, 0xc8, 0xcd, 0xd4, 0xde,
109+
0xe6, 0xf0, 0xf9, 0x00, 0x00, 0x6a, 0x56, 0x63,
110+
0x0c, 0xc5, 0xc2, 0xc0
111+
};
112+
static char hx8389b_qhd_video_on_cmd_11[] = {
113+
0x05, 0x00, 0x39, 0xc0, 0xb6, 0x00, 0x93, 0x00,
114+
0x93, 0xff, 0xff, 0xff
115+
};
116+
static char hx8389b_qhd_video_on_cmd_12[] = {
117+
0x04, 0x00, 0x39, 0xc0, 0xb7, 0x00, 0x00, 0x4d
118+
};
119+
static char hx8389b_qhd_video_on_cmd_13[] = {
120+
0x35, 0x01, 0x15, 0x80
121+
};
122+
static char hx8389b_qhd_video_on_cmd_14[] = {
123+
0x51, 0xff, 0x15, 0x80
124+
};
125+
static char hx8389b_qhd_video_on_cmd_15[] = {
126+
0x53, 0x2c, 0x15, 0x80
127+
};
128+
static char hx8389b_qhd_video_on_cmd_16[] = {
129+
0x55, 0x00, 0x15, 0x80
130+
};
131+
static char hx8389b_qhd_video_on_cmd_17[] = {
132+
0x11, 0x00, 0x05, 0x80
133+
};
134+
static char hx8389b_qhd_video_on_cmd_18[] = {
135+
0x29, 0x00, 0x05, 0x80
136+
};
137+
138+
static struct mipi_dsi_cmd hx8389b_qhd_video_on_command[] = {
139+
{ sizeof(hx8389b_qhd_video_on_cmd_0), hx8389b_qhd_video_on_cmd_0, 1 },
140+
{ sizeof(hx8389b_qhd_video_on_cmd_1), hx8389b_qhd_video_on_cmd_1, 1 },
141+
{ sizeof(hx8389b_qhd_video_on_cmd_2), hx8389b_qhd_video_on_cmd_2, 1 },
142+
{ sizeof(hx8389b_qhd_video_on_cmd_3), hx8389b_qhd_video_on_cmd_3, 1 },
143+
{ sizeof(hx8389b_qhd_video_on_cmd_4), hx8389b_qhd_video_on_cmd_4, 1 },
144+
{ sizeof(hx8389b_qhd_video_on_cmd_5), hx8389b_qhd_video_on_cmd_5, 1 },
145+
{ sizeof(hx8389b_qhd_video_on_cmd_6), hx8389b_qhd_video_on_cmd_6, 1 },
146+
{ sizeof(hx8389b_qhd_video_on_cmd_7), hx8389b_qhd_video_on_cmd_7, 1 },
147+
{ sizeof(hx8389b_qhd_video_on_cmd_8), hx8389b_qhd_video_on_cmd_8, 1 },
148+
{ sizeof(hx8389b_qhd_video_on_cmd_9), hx8389b_qhd_video_on_cmd_9, 1 },
149+
{ sizeof(hx8389b_qhd_video_on_cmd_10), hx8389b_qhd_video_on_cmd_10, 1 },
150+
{ sizeof(hx8389b_qhd_video_on_cmd_11), hx8389b_qhd_video_on_cmd_11, 1 },
151+
{ sizeof(hx8389b_qhd_video_on_cmd_12), hx8389b_qhd_video_on_cmd_12, 1 },
152+
{ sizeof(hx8389b_qhd_video_on_cmd_13), hx8389b_qhd_video_on_cmd_13, 1 },
153+
{ sizeof(hx8389b_qhd_video_on_cmd_14), hx8389b_qhd_video_on_cmd_14, 1 },
154+
{ sizeof(hx8389b_qhd_video_on_cmd_15), hx8389b_qhd_video_on_cmd_15, 1 },
155+
{ sizeof(hx8389b_qhd_video_on_cmd_16), hx8389b_qhd_video_on_cmd_16, 1 },
156+
{ sizeof(hx8389b_qhd_video_on_cmd_17), hx8389b_qhd_video_on_cmd_17, 120 },
157+
{ sizeof(hx8389b_qhd_video_on_cmd_18), hx8389b_qhd_video_on_cmd_18, 50 },
158+
};
159+
160+
static char hx8389b_qhd_video_off_cmd_0[] = {
161+
0x28, 0x00, 0x05, 0x80
162+
};
163+
static char hx8389b_qhd_video_off_cmd_1[] = {
164+
0x10, 0x00, 0x05, 0x80
165+
};
166+
167+
static struct mipi_dsi_cmd hx8389b_qhd_video_off_command[] = {
168+
{ sizeof(hx8389b_qhd_video_off_cmd_0), hx8389b_qhd_video_off_cmd_0, 50 },
169+
{ sizeof(hx8389b_qhd_video_off_cmd_1), hx8389b_qhd_video_off_cmd_1, 120 },
170+
};
171+
172+
static struct command_state hx8389b_qhd_video_state = {
173+
.oncommand_state = 0,
174+
.offcommand_state = 0,
175+
};
176+
177+
static struct commandpanel_info hx8389b_qhd_video_command_panel = {
178+
/* Unused, this is a video mode panel */
179+
};
180+
181+
static struct videopanel_info hx8389b_qhd_video_video_panel = {
182+
.hsync_pulse = 1,
183+
.hfp_power_mode = 0,
184+
.hbp_power_mode = 0,
185+
.hsa_power_mode = 0,
186+
.bllp_eof_power_mode = 1,
187+
.bllp_power_mode = 1,
188+
.traffic_mode = 2,
189+
/* This is bllp_eof_power_mode and bllp_power_mode combined */
190+
.bllp_eof_power = 1 << 3 | 1 << 0,
191+
};
192+
193+
static struct lane_configuration hx8389b_qhd_video_lane_config = {
194+
.dsi_lanes = 2,
195+
.dsi_lanemap = 0,
196+
.lane0_state = 1,
197+
.lane1_state = 1,
198+
.lane2_state = 0,
199+
.lane3_state = 0,
200+
.force_clk_lane_hs = 0,
201+
};
202+
203+
static const uint32_t hx8389b_qhd_video_timings[] = {
204+
0x87, 0x1c, 0x12, 0x00, 0x40, 0x44, 0x16, 0x28, 0x17, 0x03, 0x04, 0x00
205+
};
206+
207+
static struct panel_timing hx8389b_qhd_video_timing_info = {
208+
.tclk_post = 0x04,
209+
.tclk_pre = 0x1b,
210+
};
211+
212+
static struct panel_reset_sequence hx8389b_qhd_video_reset_seq = {
213+
.pin_state = { 1, 0, 1 },
214+
.sleep = { 20, 50, 20 },
215+
.pin_direction = 2,
216+
};
217+
218+
static struct backlight hx8389b_qhd_video_backlight = {
219+
.bl_interface_type = BL_PWM,
220+
.bl_min_level = 1,
221+
.bl_max_level = 255,
222+
};
223+
224+
static inline void panel_hx8389b_qhd_video_select(struct panel_struct *panel,
225+
struct msm_panel_info *pinfo,
226+
struct mdss_dsi_phy_ctrl *phy_db)
227+
{
228+
panel->paneldata = &hx8389b_qhd_video_panel_data;
229+
panel->panelres = &hx8389b_qhd_video_panel_res;
230+
panel->color = &hx8389b_qhd_video_color;
231+
panel->videopanel = &hx8389b_qhd_video_video_panel;
232+
panel->commandpanel = &hx8389b_qhd_video_command_panel;
233+
panel->state = &hx8389b_qhd_video_state;
234+
panel->laneconfig = &hx8389b_qhd_video_lane_config;
235+
panel->paneltiminginfo = &hx8389b_qhd_video_timing_info;
236+
panel->panelresetseq = &hx8389b_qhd_video_reset_seq;
237+
panel->backlightinfo = &hx8389b_qhd_video_backlight;
238+
pinfo->mipi.panel_on_cmds = hx8389b_qhd_video_on_command;
239+
pinfo->mipi.panel_off_cmds = hx8389b_qhd_video_off_command;
240+
pinfo->mipi.num_of_panel_on_cmds = ARRAY_SIZE(hx8389b_qhd_video_on_command);
241+
pinfo->mipi.num_of_panel_off_cmds = ARRAY_SIZE(hx8389b_qhd_video_off_command);
242+
memcpy(phy_db->timing, hx8389b_qhd_video_timings, TIMING_SIZE);
243+
phy_db->regulator_mode = DSI_PHY_REGULATOR_DCDC_MODE;
244+
}
245+
246+
#endif /* _PANEL_HX8389B_QHD_VIDEO_H_ */

lk2nd/display/panel/generated/panels.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "lk_panel_boent35523b_800p_video.h"
88
#include "lk_panel_boe_otm8019a_5p0_fwvga_video.h"
99
#include "lk_panel_boehx8389c_qhd_video.h"
10+
#include "lk_panel_hx8389b_qhd_video.h"
1011
#include "lk_panel_hx8394d_720p_video.h"
1112
#include "lk_panel_ili9806e_boyi_byt45mp41t1m_4p5cpt.h"
1213
#include "lk_panel_ili9806e_fwvga_hsd_hlt_video.h"

0 commit comments

Comments
 (0)