SPRADK8 February   2025 AM62P

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Hardware Used
    1. 2.1 AM62Px Processor
    2. 2.2 SK-LCD1
    3. 2.3 Display Subsystem on AM62P
  6. 3Early Splash-Screen Architecture
    1. 3.1 Boot Stages on AM62P
    2. 3.2 Flicker-Free Transition
  7. 4Flicker-Free Transition From SPL to U-Boot
    1. 4.1 Steps to Test
    2. 4.2 Measurements
  8. 5Flicker-Free Transition From SBL to Linux Kernel
    1. 5.1 Steps to Test
    2. 5.2 Measurements
  9. 6Results

Measurements

The time taken from POR to when the display comes up is noted to be approximately 680ms. The General Purpose Input-Output (GPIO) pin settings, by default, are in Off state. The direction and value of this GPIO pin is set to high, just after the video_bmp_display() function, which displays a .bmp file onto the panel. OSPI NOR is used as boot-media for testing purposes.

  • GPIO0_39 on the user expansion connector-pin 18, is used for time measurements. To set the direction of this pin to output, and the state of this pin to high, use the following code:
    — 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);
  • To enable the GPIO driver, if not done already, use the following config options in the am62px_evm_r5_defconfig file:
    +CONFIG_SPL_GPIO=y
    +CONFIG_GPIO=y
    +CONFIG_DM_GPIO=y
    +CONFIG_DA8XX_GPIO=y
    +CONFIG_CMD_GPIO=y
  • To set the pin multiplexer (pinmux) of the GPIO pin number GPIO0_39, use the device tree pinmux settings as mentioned in the following code:
    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";
  • Next, connect the GPIO pin and MCU_PORz to the logic analyzer and measure the time difference between the two to get the accurate timestamp.