关键词:rockchip; display-timing;hfront-porch, hback-porch, hsync-len;vfront-porch, vback-porch, vsync-len;clock-frequency;hsync-active;vsync-active;
rockchip — display-timing dts配置
1、display-timing 参数说明如下:
+----------+-------------------------------------+----------+-------+ | | ↑ | | | | | |vback_porch | | | | | ↓ | | | +----------#######################################----------+-------+ | # ↑ # | | | # | # | | | hback # | # hfront | hsync | | porch # | hactive # porch | len | |<-------->#<-------+--------------------------->#<-------->|<----->| | # | # | | | # |vactive # | | | # | # | | | # ↓ # | | +----------#######################################----------+-------+ | | ↑ | | | | | |vfront_porch | | | | | ↓ | | | +----------+-------------------------------------+----------+-------+ | | ↑ | | | | | |vsync_len | | | | | ↓ | | | +----------+-------------------------------------+----------+-------+
2、display-timing 节点属性值配置:
- native-mode: The native mode for the display, in case multiple modes are provided. When omitted, assume the first node is the native.
3、timing 子节点属性值配置:
- hactive, vactive: 显示器的分辨率;
- hfront-porch, hback-porch, hsync-len: 配置水平display-timing参数,以像素为单位;
vfront-porch, vback-porch, vsync-len: 配置垂直display-timing参数,以像素为单位;
- clock-frequency: 配置显示时钟,以HZ为单位;
- hsync-active: 配置 hsync 脉冲有效极性,low/high/ignored
- vsync-active: 配置 vsync 脉冲有效极性,low/high/ignored
- de-active: 配置 data-enable 脉冲有效极性 low/high/ignored
- pixelclk-active: with
- active high = drive pixel data on rising edge/
sample data on falling edge
- active low = drive pixel data on falling edge/
sample data on rising edge
- ignored = ignored
- interlaced (bool): boolean to enable interlaced mode
- doublescan (bool): boolean to enable doublescan mode
- doubleclk (bool): boolean to enable doubleclock mode
All the optional properties that are not bool follow the following logic:
<1>: high active
<0>: low active
omitted: not used on hardware
4、实例,display-timing可以配置不同的信号timing,通过使用native-mode来指定使用的timing子节点,比如:
正常的使用如下:
Example:
display-timings {
native-mode = <&timing0>;
timing0: 1080p24 {
/* 1920x1080p24 */
clock-frequency = <52000000>;
hactive = <1920>;
vactive = <1080>;
hfront-porch = <25>;
hback-porch = <25>;
hsync-len = <25>;
vback-porch = <2>;
vfront-porch = <2>;
vsync-len = <2>;
hsync-active = <1>;
};
};
如果要切换display-timing,可以再定义一个timing子节点,如下:
Example:
timing1: timing {
/* 1920x1080p24 */
clock-frequency = <148500000>;
hactive = <1920>;
vactive = <1080>;
hsync-len = <0 44 60>;
hfront-porch = <80 88 95>;
hback-porch = <100 148 160>;
vfront-porch = <0 4 6>;
vback-porch = <0 36 50>;
vsync-len = <0 5 6>;
};
然后,只要把native-mode改成<&timing1>即可,子节点timing1也说明了,参数 可以设置成最小值,推荐值,最大值;