0% found this document useful (0 votes)
108 views

Quectel SC66 Display Driver Development Guide V1.0

SC66_Display_Driver_Development_Guide_V1.0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Quectel SC66 Display Driver Development Guide V1.0

SC66_Display_Driver_Development_Guide_V1.0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

SC66 Display Driver

Development Guide

Smart Module Series

Rev. SC66_Display_Driver_Development_Guide_V1.0

Date: 2019-10-12

Status: Released

www.quectel.com
Smart Module Series
SC66 Display Driver Development Guide

Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarters:

Quectel Wireless Solutions Co., Ltd.


Building 5, Shanghai Business Park Phase III (Area B), No.1016 Tianlin Road, Minhang District, Shanghai,
China 200233
Tel: +86 21 5108 6236
Email: [email protected]

Or our local office. For more information, please visit:


http://www.quectel.com/support/sales.htm

For technical support, or to report documentation errors, please visit:


http://www.quectel.com/support/technical.htm
Or email to: [email protected]

GENERAL NOTES
QUECTEL OFFERS THE INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION
PROVIDED IS BASED UPON CUSTOMERS’ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT
TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT
MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT
ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR
RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN IS SUBJECT TO
CHANGE WITHOUT PRIOR NOTICE.

COPYRIGHT
THE INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF
QUECTEL WIRELESS SOLUTIONS CO., LTD. TRANSMITTING, REPRODUCTION, DISSEMINATION
AND EDITING OF THIS DOCUMENT AS WELL AS UTILIZATION OF THE CONTENT ARE
FORBIDDEN WITHOUT PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF
DAMAGES. ALL RIGHTS ARE RESERVED IN THE EVENT OF A PATENT GRANT OR
REGISTRATION OF A UTILITY MODEL OR DESIGN.

Copyright © Quectel Wireless Solutions Co., Ltd. 2019. All rights reserved.

SC66_Display_Driver_Development_Guide 1 / 29
Smart Module Series
SC66 Display Driver Development Guide

About the Document

History

Revision Date Author Description

1.0 2019-10-12 Rid WANG Initial

SC66_Display_Driver_Development_Guide 2 / 29
Smart Module Series
SC66 Display Driver Development Guide

Contents

About the Document ................................................................................................................................... 2


Contents ....................................................................................................................................................... 3
Table Index ................................................................................................................................................... 4
Figure Index ................................................................................................................................................. 5

1 Introduction .......................................................................................................................................... 6

2 XML Tags from GCDB for Panel Configuration ................................................................................ 7


2.1. Display Driver Development Procedure...................................................................................... 7
2.2. Tags for Panel Configuration....................................................................................................... 9
2.2.1. Panel Information ............................................................................................................. 9
2.2.2. Panel Configuration Information .................................................................................... 10
2.2.3. Panel Resolution ............................................................................................................ 11
2.2.4. Panel Color Information ................................................................................................. 12
2.3. Panel Command Information .................................................................................................... 13
2.3.1. Command Format .......................................................................................................... 14
2.4. Video Mode Panel ..................................................................................................................... 16
2.5. Lane Configuration .................................................................................................................... 17
2.6. Panel Physical Data .................................................................................................................. 18
2.6.1. Generate DSI Timing...................................................................................................... 18
2.7. Command Mode Panel ............................................................................................................. 23
2.8. Backlight Configuration ............................................................................................................. 24

3 Configure Kernel and UEFI ............................................................................................................... 25


3.1. Configure Kernel ....................................................................................................................... 25
3.2. Update UEFI ............................................................................................................................. 28

4 Appendix ............................................................................................................................................. 29

SC66_Display_Driver_Development_Guide 3 / 29
Smart Module Series
SC66 Display Driver Development Guide

Table Index

TABLE 1: PANEL INFORMATION ....................................................................................................................... 9


TABLE 2: PANEL CONFIGURATION ................................................................................................................ 10
TABLE 3: PANEL RESOLUTION CONFIGURATION......................................................................................... 11
TABLE 4: PANEL COLOR INFORMATION ....................................................................................................... 12
TABLE 5: PANEL COMMAND INFORMATION ................................................................................................. 13
TABLE 6: COMMAND FORMAT........................................................................................................................ 14
TABLE 7: VIDEO MODE PANEL ....................................................................................................................... 16
TABLE 8: LANE CONFIGURATION .................................................................................................................. 17
TABLE 9: PANEL PHYSICAL DATA .................................................................................................................. 18
TABLE 10: TE-RELATED ENTRIES .................................................................................................................. 23
TABLE 11: BACKLIGHT CONFIGURATION ..................................................................................................... 24
TABLE 12: TERMS AND ABBREVIATIONS ...................................................................................................... 29

SC66_Display_Driver_Development_Guide 4 / 29
Smart Module Series
SC66 Display Driver Development Guide

Figure Index

FIGURE 1: ENABLE CONTENT ....................................................................................................................... 19


FIGURE 2: DSI AND MDP REGISTERS SHEET .............................................................................................. 19
FIGURE 3: INVALID IN DSI PHY TIMING SETTING SHEET ........................................................................... 20
FIGURE 4: VALID IN DSI PHY TIMING SETTING SHEET ............................................................................... 20
FIGURE 5: PHY VALUE SETTING IN THE SPREADSHEET ........................................................................... 21
FIGURE 6: DSI PHY 2.0.0 TIMING CONFIGURATION FOR SC66 MODULE ................................................. 22

SC66_Display_Driver_Development_Guide 5 / 29
Smart Module Series
SC66 Display Driver Development Guide

1 Introduction
This document describes how to use the Display Serial Interface (DSI) to bring up the display panel on
the Android platform of Quectel SC66 module.

This document only describes the important parts of display driver development.

◼NOTE

In this document, Smart EVB G2’s LCD HX8394F is used as an example.

SC66_Display_Driver_Development_Guide 6 / 29
Smart Module Series
SC66 Display Driver Development Guide

2 XML Tags from GCDB for Panel


Configuration
The Global Component Database (GCDB) parser provides configuration options for the display panel on
SDM660 chipset.

This chapter describes the display XML tags required to configure the Android kernel and the little kernel
(LK) to bring up the panel. The following sections provide detailed information on input entries,
descriptions and possible values of the XML tags that can be used in the display parser module for the
GCDB, version 1.0.

NOTE

This document only describes the important parameters. The unspecified parameters usually do not need
to be modified.

2.1. Display Driver Development Procedure

Take the following steps to develop display driver for any display panel and platform. The procedure can
also be found at device/qcom/common/display/tools/README.txt.

1. Install the libraries by the following commands.

#sudo apt-get install libxml-libxml-perl


#sudo apt-get install libxml-perl

2. Enter the tools directory #cd device/qcom/common/display/tools, the following information will appear.

3. Copy a new .XML file to edit.

⚫ If the LCD is in video mode, copy the panel_nt35596_1080p_video.xml to a new


<oem_panel_input_file>.xml.
⚫ If the LCD is in command mode, copy the panel_nt35590_720p_cmd.xml to a new
<oem_panel_input_file>.xml.

SC66_Display_Driver_Development_Guide 7 / 29
Smart Module Series
SC66 Display Driver Development Guide

Taking HX8394F as an example, the new .XML file will be:

#cp panel_nt35596_1080p_video.xml panel_hx8394f_720p_video.xml

NOTE

In most cases, LCD is in video mode which is determined by the LCD module type.

4. Edit the new .XML to configure the display parameters.

The configuration details are present at Chapters 2.2~2.8.

5. Generate the device tree file (.dtsi) and header file (.h) by executing the following command:

#perl parser.pl <oem_panel_input_file>.xml panel

Taking HX8394F as an example, the command will be:

#perl parser.pl panel_hx8394f_720p_video.xml panel

By executing this command, dsi-panel-hx8394f-720p-video.dtsi and panel_hx8394f_720p_video.h will be


generated.

6. Copy .dtsi to dts folder by executing the following command:

#cp device/qcom/common/display/tools/dsi-panel-hx8394f-720p-video.dtsi
kernel/msm-4.4/arch/arm64/boot/dts/qcom/

7. Configure the Android kernel (see Chapter 3 for details).

8. Build image by executing the following commands:

source build/envsetup.sh
lunch sdm660_64-userdebug
make bootimage

SC66_Display_Driver_Development_Guide 8 / 29
Smart Module Series
SC66 Display Driver Development Guide

Then users will get boot.img in the directory out/target/product/sdm660_64/.

2.2. Tags for Panel Configuration

This chapter defines the specific XML tag entries for the panel.

File path: device/qcom/common/display/tools/<oem_panel_input_file>.xml

2.2.1. Panel Information

The parser expects the entries in the following table to be part of the <GCDB> XML tag.

Table 1: Panel Information

XML Tag/Entry Description Value

MAJOR_VERSION.MINOR_VERSION
Each version is bind to be a set of For example: in 1.0, 1 means the major
Version
panel tags. version and 0 means the minor
version.
Name used to generate the .dtsi file
PanelId See the following XML input example.
for kernel.
Name used to generate the header file
PanelH See the following XML input example.
for LK.

For example:

SC66_Display_Driver_Development_Guide 9 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.2.2. Panel Configuration Information

The parser expects all other entries to be part of the <GCDB> and <PanelEntry> tag. Please refer to the
following XML input example for more information.

Table 2: Panel Configuration

XML Tag/Entry Description Value

PanelName Panel name Name/label value

Panel is in video mode or command 0 = video mode


PanelType
mode. 1 = command mode
Panel rotation value.
PanelOrientation If this entry is not mentioned, LK will 1 = 0 degree
(Only used in LK) be configured with default 0 degree 2 = 180 degrees
rotation.
An integer to define the panel
PanelFrameRate For example: 60 for 60fps panel.
refresh rate per second.

For example:

SC66_Display_Driver_Development_Guide 10 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.2.3. Panel Resolution

The following table defines different panel resolution-specific tags. All dimensions should be provided in
pixel format.

Table 3: Panel Resolution Configuration

XML Tag/Entry Description

PanelWidth Panel width

PanelHeight Panel height

HFrontPorch Horizontal front porch value

HBackPorch Horizontal back porch value

HPulseWidth Horizontal pulse width

HSyncSkew Horizontal sync skew value

VBackPorch Vertical back porch value

VFrontPorch Vertical front porch value

VPulseWidth Vertical pulse width

For example:

SC66_Display_Driver_Development_Guide 11 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.2.4. Panel Color Information

The panel color information includes color format, swap values, and border color, some of which are
defined in the following table.

Table 4: Panel Color Information

XML Tag/Entry Description Value

24 = 888_RGB
18 = 666_RGB
16 = 565_RGB
ColorFormat Defines the bits per pixel.
12 = 444_RGB
8 = 332_RGB
3 = 111_RGB
0 = DSI_RGB_SWAP_RGB
1 = DSI_RGB_SWAP_RBG
Defines pixel component color 2 = DSI_RGB_SWAP_BGR
ColorOrder
order between MSM and panel. 3 = DSI_RGB_SWAP_BRG
4 = DSI_RGB_SWAP_GRB
5 = DSI_RGB_SWAP_GBR

For example:

SC66_Display_Driver_Development_Guide 12 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.3. Panel Command Information

This chapter describes the on/off commands sent to the panel. Users can send all valid DSI commands to
the panel.

Table 5: Panel Command Information

XML Tag/Entry Description Value

Array of variable length that lists the


OnCommand
initialization commands of the panel.
See Chapter 2.3.1
Array of variable length that lists the
OffCommand
deinitialization commands of the panel.

OnCommandState Panel state when sending the on command.


0 = DSI_LP_MODE
1 = DSI_HP_MODE
OffCommandState Panel state when sending the off command.

Generally speaking, <OnCommandState> and <OffCommandState> only need to keep the default
values.

SC66_Display_Driver_Development_Guide 13 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.3.1. Command Format

Each command needs the input information listed in the following table. The current parser supports one
complete command per line.

Table 6: Command Format

Subentry Description Byte Length

CommandType Data type of command 1

Specifies if this command packet is


Last 1
individual or not.
Virtual channel used to send this
VC 1
command.
Needs acknowledgement from the
ACK 1
panel.
Sleep in milliseconds before
Wait 1
sending next command.

PayloadSize Payload size 2

Payload Actual command Based on PayloadSize

1. Usually, only “PayloadSize” and “Payload” need to be modified.

Some LCD may need to wait for several milliseconds before sending the next command. Then the
parameter “Wait” need to be modified.

For example:

2. Parameter “Payload” is provided by the LCD module manufacturer.

The parameters provided by LCD module manufacturer in the following format are preferable:

REGISTER, CMD(Hex), Number(Hex), DATA(Hex), DATA(Hex), …

SC66_Display_Driver_Development_Guide 14 / 29
Smart Module Series
SC66 Display Driver Development Guide

When parameters are provided in the above formats, the <OnCommand> parameters will be:

0x39, 0x01, 0x00, 0x00, 0x00 = REGISTER


PayloadSize = Number+1
Payload = CMD,DATA,DATA,…

For example, if the parameters provided by LCD module manufacturers are:

REGISTER,FF,3,98,81,03
REGISTER,01,01,00

The <OnCommand> parameters will be:

0x39, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0xFF, 0x98, 0x81, 0x03,
0x39, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00,

3. Usually the last two commands of <OnCommand> are available as shown below, but some LCD
chips do not need them.

0x05, 0x01, 0x00, 0x00, 0x78, 0x00, 0x02, 0x11, 0x00,


0x05, 0x01, 0x00, 0x00, 0x05, 0x00, 0x02, 0x29, 0x00,

0x11: sleep out command of LCD.


0x29: display on command of LCD.

SC66_Display_Driver_Development_Guide 15 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.4. Video Mode Panel

The following table describes the video mode panel configuration entries.

Table 7: Video Mode Panel

XML Tag/Entry Description Value

Horizontal synchronization pulses.


It determines whether the hardware
0 = Synchronization pulse disable
HSyncPulse should send horizontal
1 = Synchronization pulse enable
synchronization pulses during the
vertical blanking period.
0 = non burst with synchronization
pulses
TrafficMode Panel traffic mode type 1 = non burst with synchronization
start event
2 = burst mode

Usually, these parameters do not need to be modified. Users may need to note the parameter
“TrafficMode” which may vary with the LCD chip. For example:

SC66_Display_Driver_Development_Guide 16 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.5. Lane Configuration

The foloowing table lists the DSI panel’s lane configuration entries.

Table 8: Lane Configuration

XML Tag/Entry Description Value

Number of lanes used for 2 for 2 lane panel


DSILanes
communication with DSI. 4 for 4 lane panel
0 = DLANE_SWAP_0123
1 = DLANE_SWAP_3012
2 = DLANE_SWAP_2301
It defines how the data lanes are 3 = DLANE_SWAP_1230
DSILaneMap
mapped to the panel. 4 = DLANE_SWAP_0321
5 = DLANE_SWAP_1032
6 = DLANE_SWAP_2103
7 = DLANE_SWAP_3210

Lane0State Lane 0 state

Lane1State Lane 1 state


1 = ENABLE
0 = DISABLE
Lane2State Lane 2 state

Lane3State Lane 3 state

For example:

SC66_Display_Driver_Development_Guide 17 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.6. Panel Physical Data

The following table describes all panel’s physical configuration register entries.

Table 9: Panel Physical Data

XML Tag/Entry Description Value

An array of length 12 that specifies


PanelTimings the physical timing settings for the
panel

TClkPost DSI timing control clock post value

TClkPre DSI timing control clock pre-value

For example:

2.6.1. Generate DSI Timing

The panel requires the PHY value setup for “bitclk” in the DSI PHY register. The
80-NH713-1_U_DSI_Timing_Parameters_User_Interactive_Spreadsheet.xlsm in 80-NH713-1_DSI.zip
(the zip file is available in tools directory) can be used to calculate the timing values automatically.

NOTE

Please use Microsoft Excel (Microsoft Excel 2016 is recommended) to open this file. Other tools, such as
WPS, are not recommended.

SC66_Display_Driver_Development_Guide 18 / 29
Smart Module Series
SC66 Display Driver Development Guide

To auto-calculate these values, please take the following steps:

1. Open the 80-NH713-1_U_DSI_Timing_Parameters_User_Interactive_Spreadsheet.xlsm and click


Enable Content.

Figure 1: Enable Content

2. Open the DSI and MDP Registers sheet. Input frame rate/lane numbers/panel resolution/porch/ chip
value to the area framed in red line in the example shown below:

Figure 2: DSI and MDP Registers Sheet

SC66_Display_Driver_Development_Guide 19 / 29
Smart Module Series
SC66 Display Driver Development Guide

NOTE

If the spreadsheet requires to change the porches to be multiple of 4 or make it even, please change it
accordingly and also update the panel porch node. Users can refer to the user instructions in the Excel
sheet.

3. Open the DSI PHY Timing Setting sheet to see the calculated DSI-related clock rate in the blue fields.
Press CTRL+J, a value of INVALID will appear in the Check for T_CLK_ZERO field. Then press
CTRL+K to recalculate T_CLK_ZERO to VALID, as shown below.

Figure 3: INVALID in DSI PHY Timing Setting Sheet

Figure 4: VALID in DSI PHY Timing Setting Sheet

SC66_Display_Driver_Development_Guide 20 / 29
Smart Module Series
SC66 Display Driver Development Guide

The spreadsheet will show the PHY value setup for “bitclk” which the panel requires in the DSI PHY
register.

Figure 5: PHY Value Setting in the Spreadsheet

4. Update the panel XML file <PanelTimings> with the values listed above that obtained from the Excel
worksheet.

The following is an example. The following values are copied from Figure 5.

<PanelTimings>"0x7B, 0x1A, 0x10, 0x00, 0x3C, 0x42, 0x14, 0x1C, 0x15, 0x03,
0x04,0x00"</PanelTimings>

5. Copy the program value for T_CLK_POST and T_CLK_PRE fields obtained from the Excel
worksheet into the panel XML. The values in the Excel worksheet are in decimal. Make sure that they
are converted to HEX before updating the two elements.

<TClkPost>0x4</TClkPost>
<TClkPre>0x1A</TClkPre>

SC66_Display_Driver_Development_Guide 21 / 29
Smart Module Series
SC66 Display Driver Development Guide

6. For SC66, DSI PHY 2.0.0 timing configuration needs to be added, and it can be found in
kernel/msm-4.4/arch/arm/boot/dts/qcom/sdm660-mdss-panels.dtsi, as shown below:

Figure 6: DSI PHY 2.0.0 Timing Configuration for SC66 Module

SC66_Display_Driver_Development_Guide 22 / 29
Smart Module Series
SC66 Display Driver Development Guide

2.7. Command Mode Panel

All TE-related entries listed in the following table are only used in Android kernel.

These parameters are only used in command mode panel. If the LCD is a video mode panel, these
parameters can be ignored.

Table 10: TE-related Entries

Entry Description Value

It enables/disables the TE to check hardware 0=Disabled


TECheckEnable
block within MDP. 1=Enabled
It controls TE to check hardware block 0=through an embedded
TEPinSelect through external GPIO pin or an embedded TE signal
TE signal. 1=through GPIO pin
0=Software vertical
It controls TE to check hardware block
synchronization
TEUsingTEPin through software vertical synchronization or
1=Hardware vertical
hardware vertical synchronization.
synchronization
This integer configures the scan
line number that the DSI pixel
transfer will start on. This should be
TEvSyncRdPtrIrqLine left at the default value of 0.
Adjusting this number to a higher
value will result in delay in the start
of the pixel transfer.
This integer represents the
difference in the number of lines
between estimated read pointer
and write pointer to allow the
TEvSyncContinueLines
updating of all the lines except the
first line of the frame. This threshold
is maintained only when Tear
Check block is enabled.
This entry inserts the DCS
TEDCSCommand
command.

SC66_Display_Driver_Development_Guide 23 / 29
Smart Module Series
SC66 Display Driver Development Guide

For example

2.8. Backlight Configuration

This chapter describes the various backlight configuration entries.

Table 11: Backlight Configuration

Entry Description Value

BLMinLevel Minimum value of backlight. 1

BLMaxLevel Maximum value of backlight. 4095

0=PWM GPIO
1=WLED
2=DCS COMMANDS (for
BLPMICControlType PMIC controller for current backlight.
OLED panel backlight
controller)
3=LPG

For example:

SC66_Display_Driver_Development_Guide 24 / 29
Smart Module Series
SC66 Display Driver Development Guide

3 Configure Kernel and UEFI


◼NOTE
Panel parameters are configured in both UEFI and kernel. After startup, configuration parameters in UEFI
will be used to drive the panel before pressing the power key. After system sleep and then wakeup,
configuration parameters in kernel will be used to drive the panel.

3.1. Configure Kernel

After the procedure in Chapter 2.1 is completed, the file dsi-panel-hx8394f-720p-video.dtsi will be
generated, then copy it to the following directory kernel/msm-4.4/arch/arm64/boot/dts/qcom/. And then
configure the kernel to add a new panel according to the following steps.

1. Include .dtsi files

Include the .dtsi file to the kernel/msm-4.4/arch/arm64/boot/dts/qcom/sdm660-mdss-panels.dtsi file.

2. Modify .dtsi files

Add DSI PHY 2.0.0 timing configuration to the following directory:


kernel/msm-4.4/arch/arm64/boot/dts/qcom/ sdm660-mdss-panels.dtsi.

SC66_Display_Driver_Development_Guide 25 / 29
Smart Module Series
SC66 Display Driver Development Guide

The following should be modified as well in kernel/msm-4.4/arch/arm/boot/dts/qcom/sdm660-mtp.dtsi.

3. Configure the backlight

Configure the backlight in the kernel/msm-4.4/arch/arm64/boot/dts/qcom/sdm660-mtp.dtsi directory.

To configure backlight, the backlight type should be configured.

qcom,mdss-dsi-bl-pmic-control-type: a string that specifies the implementation of backlight control for this
panel.

If the following values are configured in the red-framed area of the above figure, then:
"bl_ctrl_pwm" indicates backlight controlled by PWM
"bl_ctrl_wled" indicates backlight controlled by WLED
"bl_ctrl_dcs" indicates backlight controlled by DCS commands (for OLED panel backlight controller).
Others: Unknown backlight control.

⚫ For the PWM default backlight control, select the “control-type”, “pwm-frequency” and “pwms” shown
below:

&dsi_hx8394f_720p_video {
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>;/* in microseconds */
qcom,mdss-dsi-bl-pmic-bank-select = <0>;
qcom,mdss-dsi-bl-pwm-pmi;
pwms = <&pm660l_pwm_4 0 0>;
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
};

SC66_Display_Driver_Development_Guide 26 / 29
Smart Module Series
SC66 Display Driver Development Guide

⚫ For the WLED backlight control, select the “control-type” shown as below.

The path is kernel/msm-4.4/arch/arm64/boot/dts/qcom/sdm660-mtp.dtsi

&dsi_dual_nt35597_truly_video {
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <4095>;
qcom,mdss-dsi-mode-sel-gpio-state = "dual_port";
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
};

⚫ Control the backlight by sending the DCS commands at any point.

The path is ./kernel/msm-4.4/arch/arm/boot/dts/qcom/dsi-panel-rm67195-amoled-fhd-cmd.dtsi

qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <255>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";

Use the following code to send the backlight command.


Path: ./kernel/msm-4.4/drivers/video/fbdev/msm/mdss_dsi_panel.c

static char led_pwm1[2] = {0x51, 0x0}; /* DTYPE_DCS_WRITE1 */


static struct dsi_cmd_desc backlight_cmd = {
{DTYPE_DCS_WRITE1, 1, 0, 0, 1, sizeof(led_pwm1)},
led_pwm1
};

4. Change cmdline information

According to the panel .dtsi file to get the cmdline information.


Path: kernel/msm-4.4/arch/arm/boot/dts/qcom/dsi-panel-hx8394f-720p-video.dtsi

SC66_Display_Driver_Development_Guide 27 / 29
Smart Module Series
SC66 Display Driver Development Guide

Add the following code to change the default cmdline information.


Path: kernel/msm-4.4/drivers/video/fbdev/msm/mdss_dsi.c.

3.2. Update UEFI

The bootloader of SC66 was replaced by UEFI and the source code of UEFI has not been publiclly
unavailable. Therefore, to configure the UEFI, users should take the following steps:

1. Bring up their own LCD in kernel.


2. Send the LCD parameters they obtained from Step 1 to Quectel.
3. Remove the modified cmdline code if the LCD is brought up in both UEFI and kernel.

After this, Quectel will update the bin file xbl.elf for users.

After being updated by Quectel, users are able to update the xbl.elf file with Fastboot by the following
commands to verify whether the LCD in UEFI has been brought up. If not, please contact Quectel.

adb reboot bootloader


fastboot flash xbl xbl.elf
fastboot reboot

SC66_Display_Driver_Development_Guide 28 / 29
Smart Module Series
SC66 Display Driver Development Guide

4 Appendix

Table 12: Terms and Abbreviations

Abbreviation Description

DCS Display Command Set

DSI Display Serial Interface

GCDB Global Component Database

GPIO General Purpose Input Output

LCD Liquid Crystal Display

LK Little Kernel

LPG Light Pulse Generator

MDP Mobile Display Processor

PMIC Power Management IC

PWM Pulse Width Modulation

TE Tearing Effect

WLED White Light Emitting Diode

UEFI Unified Extensible Firmware Interface

SC66_Display_Driver_Development_Guide 29 / 29

You might also like