This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: Whether Linux SDK probe GPIO0_8 disable OSPI0 interface?

Part Number: TDA4VM


Hi Experts:

Our customer build their own TDA4V board. OSPI0 use the same OSPI like EVM board. MT35XU512ABA1G12-0AUT

At uboot they can successful control, read write this OSPI flash. But enter kernel, they can not probe the OSPI.

At EVM board we try it at Linux kernel, we can find OSPI0 flash like attached JPG picture. 

Customer has analyze the boot log, did not find ospi probe operate.

"cat /sys/firmware/devicetree/base/interconnect@100000/interconnect@28380000/fss@47000000/spi@47040000/status” , report the status is disable. but get the dtb file and analyze it that customer enable OSPI0. 

We think the different is that EVM board GPIO0_8 monitor SW switch boot from OSPI or hyperflash but we did not find the driver at uboot and kernel.

Could you please tell us which driver probe GPIO0_8 to switch OSPI/Hyperflash boot?

Best Regards!

Han Tao 

 https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/2746.dtb.7z

  • Hi Han Tao,

    I have confusions with your explanation.

    1) When you say EVM board you mean custom board or TDA4VM board?
    2) The image attached is the boot log of custom board? Can you please share the full boot log in text format so it is easy for us to check?
    3) What is the SDK version you are using?

    WKUP_GPIO0_8 is the HYPERBUS/OSPI select. Is that used for anything on the custom board?

    Regards,
    Keerthy

  • Hi Keerthy,

    I'm the customer Han Tao metioned. Sorry for late reply. 

    1. EVM board means TDA4VM board
    2. The image attached is boot log of EVM board. OSPI Flash can not be probed on our custom board and I attached full boot log.
    3. The PSDKLA version is 06_02_00
    4. WKUP_GPIO0_8 is used as gpio function(not for HYPERBUS/OSPI select).  We want OSPI always be selected since there's no hyper flash on our custom board. Could you please tell us how to implement it.

    Thanks! 

    /cfs-file/__key/communityserver-discussions-components-files/791/bootlog.log

  • Hi jianyu huo,

    Thanks for the details now it is clear to me. I see that OSPI is not getting probed unlike the TDA4VM board.

    I believe for the custom board you would have created a custom dts file. Please attach
    the DTS file and also the DTB that you are using to boot kernel.

    I believe the DTS file somehow does not have the ospi node enabled. So i want to look
    at the both DTS and DTB. Please share them.

    Regards,
    Keerthy

  • Hi Keerthy

    I attached dtb and dts file below. The dts file is converted from dtb file since there are several dts and dtsi files and are hard to read.

    I think we enable OSPI properly in device tree but its status is changed to "disabled" somewhere. Is there any code doing this?

    Thanks!

    /cfs-file/__key/communityserver-discussions-components-files/791/7870.ti.zip

  • Hi jianyu huo,

    U-boot checks for the line state based on that fixes up DTB on the fly. Since you do not have hyperbus at all
    that function to fix up DT from u-boot is not needed as you want ospi default. So at u-boot can you try this change:

    diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
    index fa27eea271..0c05477aeb 100644
    --- a/board/ti/j721e/evm.c
    +++ b/board/ti/j721e/evm.c
    @@ -118,13 +118,6 @@ static void __maybe_unused detect_enable_hyperflash(void *blob)
     }
     #endif
     
    -#if CONFIG_IS_ENABLED(LOAD_FIT)
    -void spl_perform_fixups(struct spl_image_info *spl_image)
    -{
    -       detect_enable_hyperflash(spl_image->fdt_addr);
    -}
    -#endif
    -
     #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
     int ft_board_setup(void *blob, bd_t *bd)
     {
    @@ -134,8 +127,6 @@ int ft_board_setup(void *blob, bd_t *bd)
            if (ret)
                    printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
     
    -       detect_enable_hyperflash(blob);
    -
            return ret;
     }
     #endif

    Regards,
    Keerthy

  • Hi Keerthy,

    It works for me! When i comment `detect_enable_hyperflash`, OSPI Flash is probed in kernel.

    Thank you so much!

  • Hello  ,

    Great! Could you pl;ease resolve this issues.

    Regards,
    Keerthy

  • Hi Keerthy & Jianyu:

    Has confirmed that modify resolved customer problem.

    Thanks a lot!

    Han Tao