ZHCAEZ2 February   2025 AM62P

 

  1.   1
  2.   摘要
  3.   商标
  4. 1引言
  5. 2所用硬件
    1. 2.1 AM62Px 处理器
    2. 2.2 SK-LCD1
    3. 2.3 AM62P 的显示子系统
  6. 3早期启动屏幕架构
    1. 3.1 AM62P 的引导阶段
    2. 3.2 无闪烁切换
  7. 4从 SPL 到 U-Boot 的无闪烁切换
    1. 4.1 测试步骤
    2. 4.2 测量
  8. 5从 SBL 到 Linux 内核的无闪烁转换
    1. 5.1 测试步骤
    2. 5.2 测量
  9. 6结果

测量

从 POR 到显示画面出现的时间约为 680ms。默认情况下,通用输入输出 (GPIO) 引脚设置处于关闭状态。在执行 video_bmp_display() 函数(用于在面板上显示 .bmp 文件)后,该 GPIO 引脚的方向和数值被设为高电平。OSPI NOR 被用作测试时的引导介质。

  • 用户扩展连接器上的 GPIO0_39(引脚 18)用于时间测量。要将该引脚的方向设置为输出,并将其状态设为高电平,可使用以下代码:
    — a/common/bmp.c
    +++ b/common/bmp.c
    @@ -19,6 +19,7 @@
    #include <splash.h>
    #include <video.h>
    #include <asm/byteorder.h>
    +#include <asm/io.h>
    
    /*
    
    Allocate and decompress a BMP image using gunzip().
    @@ -142,6 +143,11 @@ int bmp_display(ulong addr, int x, int y)
    ret = video_bmp_display(dev, addr, x, y, align);
    }
    
    + writel(0x00050007, 0x000F40A0);
    + writel(0xFFFFFF7F, 0x00600038);
    + writel(0x80, 0x00600040);
    +
    if (bmp_alloc_addr)
    free(bmp_alloc_addr);
  • 如果尚未启用 GPIO 驱动程序,可在 am62px_evm_r5_defconfig 文件中使用以下配置选项进行设置:
    +CONFIG_SPL_GPIO=y
    +CONFIG_GPIO=y
    +CONFIG_DM_GPIO=y
    +CONFIG_DA8XX_GPIO=y
    +CONFIG_CMD_GPIO=y
  • 要设置 GPIO 引脚编号 GPIO0_39 的引脚多路复用器 (pinmux),请按照以下代码所述使用器件树引脚多路复用设置:
    diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
    index 4b8e7964ca4d..7dbf5e9b9c2b 100644
    --- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
    +++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
    @@ -232,6 +232,10 @@ hdmi_connector_in: endpoint {
     
     &main_gpio0 {
     	bootph-all;
    +
    +	status = "okay";
    +	pinctrl-names = "default";
    +	pinctrl-0 = <&test_gpio_default>;
     };
     
     &main_gpio1 {
    @@ -446,6 +450,12 @@ AM62PX_IOPAD(0x0078, PIN_OUTPUT, 1) /* (AC24) GPMC0_AD15.VOUT0_DATA23 */
     			AM62PX_IOPAD(0x009c, PIN_OUTPUT, 1) /* (AD24) GPMC0_WAIT1.VOUT0_EXTPCLKIN */
     		>;
     	};
    +
    +	test_gpio_default: test-gpio {
    +        pinctrl-single,pins = <
    +			AM62PX_IOPAD(0x00a0, PIN_INPUT, 7) /* (P24) GPMC0_WPn.GPIO0_39 */
    +		>;
    +	};
     };
     
     &main_i2c0 {
    @@ -789,6 +799,7 @@ &mcu_r5fss0_core0 {
     &main_uart0 {
     	pinctrl-names = "default";
     	pinctrl-0 = <&main_uart0_pins_default>;
    +	test-gpios = <&main_gpio0 39 GPIO_ACTIVE_HIGH>;
     	interrupts-extended = <&gic500 GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>,
     			<&main_pmx0 0x1c8>; /* (D14) UART0_RXD PADCONFIG114 */
     	interrupt-names = "irq", "wakeup";
  • 接下来,将 GPIO 引脚和 MCU_PORz 连接至逻辑分析仪,并测量两者之间的时间差,以获取精确的时间戳。