<!-- Panel Command information -->根据前面的initial code
<OnCommand><OffCommand>格式
CommandType Data type of command 1
Last Specifies if this command packet is individual or not. 1
VC Virtual channel used to send this command 1
Ack Needs acknowledgement from panel 1
Wait Sleep in microsecond before sending next command. 1
PayloadSize Size of payload 2
Payload Actual command Based on payload size
example:
0x29, 0x01, 0x00 ,0x00, 0x80, 0x00, 0x02, 0x11, 0x00
<OnCommandState> Panel state when sending the on command.
0 = DSI_LP_MODE 1= DSI_HS_MODE
1
2
3
4
5
6
7
8
9
10
11
12
13
1
2
3
4
5
6
7
8
9
10
11
12
13
<!-- Panel Resolution -->根据上面porch setting
PanelWidth = Panel width in pixel = 1080
PanelHeight = Panel height in pixel = 1920
HFrontPorch = Horizontal back porch value = HFP = 120
HBackPorch = Horizontal front porch value = HBP = 60
HPulseWidth = Horizontal pulse width = HS = 4
HSyncSkew = Horizontal sync skew value 厂商没有特殊说明 都为0
VBackPorch=Vertical back porch value = VBP = 4
VFrontPorch= Vertical front porch value = VFP = 4
VPulseWidth=Vertical pulse width = VS = 4
HLeftBorder 厂商没有特殊说明 都为0
HRightBorder 厂商没有特殊说明 都为0
VTopBorder 厂商没有特殊说明 都为0
VBottomBorder 厂商没有特殊说明 都为0
Porch setting 设置完了。
<!-- Backlight -->
BLMinLevel Minimum value of backlight 1
BLMaxLevel Maximum value of backlight 255
BLPMICControlType PMIC controller for current backlight.
0 = PWM GPIO 1 = WLED 2 = DCS COMMANDS 3 = LPG
(看电路图 这个配置会影响到kernel的背光控制,一般使用WLED和DCS COMMAND ,若配置错误,系统调节背光不能使用)
BLMinLevel 和 BLMaxLevel影响 backlight等级,设置1 - 255 控制背光范围较小,设置1 – 4095 控制背光范围较大
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
<!-- Panel Reset Sequence -->根据reset sequence
<ResetSequence><PinState1>1</PinState1><PulseWidth1>20</PulseWidth1><PinState2>0</PinState2><PulseWidth2>10</PulseWidth2><PinState3>1</PinState3><PulseWidth3>20</PulseWidth3><EnableBit>2</EnableBit> Reset pin direction to enable it 默认2
</ResetSequence>
设置时序延时。高电平->延时20ms->低电平->延时10ms->高电平->延时20ms
如果panel 电压不对,则在这里面改
<!-- GPIO configuration -->查电路图看有哪些pin接上
<ResetGPIO> Reset GPIO pin to reset the DSI panel
<EnableGPIO> Enable GPIO pin to power on the DSI panel
<TEGPIO> TE pin for command mode panel
<PWMGPIO> Reset sequence using ResetGPIO with pulse width
<PinSource>“msmgpio”</PinSource> 一般固定string
<PinId>7</PinId> Integer GPIO pin number on source location 看电路图
<PinStrength>3</PinStrength> Power strength of GPIO pin mA. Valuesection describes the power strength table. 有 0=2mA 1=4mA 2=6mA 3=8mA 4=10mA 5=12mA 6=14mA 7=16mA
<PinDirection>1</PinDirection> GPIO pin direction 输入\输出
<PinPull>0</PinPull> GPIO pin pull direction
<PinState>1</PinState> GPIO Pin active state enable\disable
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步