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.

PROCESSOR-SDK-DRA8X-TDA4X: OSPI flash driver

Part Number: PROCESSOR-SDK-DRA8X-TDA4X

Hi, TI support team !

I am using TDA4's OSPI interface to connect to a Micron OSPI flash (MT35XL01GBBA) which the working voltage is 3.3V.

The OSPI flash used on TDA4x EVM is MT35XU512ABA which the working voltage is 1.8V.

In uboot, I have cancelled the selection of OSPI flash and hyper flash, and directly use OSPI flash. 0xFF is returned when reading flash ID.

What configuration do I need to modify when I use the OSPI flash (MT35XL01GBBA)  which the working voltage is 3.3V?

  • Hi,

    3V parts are limited to 133MHz as per J721e datasheet (vs 166MHz for 1.8V) and also as per flash Datasheet.
    OSPI node needs to updated with appropriate frequency (in U-Boot and kernel):

    diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
    index 31875a917c5d..faccb87acc56 100644
    --- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
    +++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
    @@ -190,8 +190,7 @@
                            cdns,trigger-address = <0x0>;
                            clocks = <&k3_clks 103 0>;
                            assigned-clocks = <&k3_clks 103 0>;
    -                       assigned-clock-parents = <&k3_clks 103 2>;
    -                       assigned-clock-rates = <166666666>;
    +                       assigned-clock-rates = <133000000>;
                            power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>;
                            #address-cells = <1>;
                            #size-cells = <0>;

    Similar Change in arch/arm/dts/k3-j721e-mcu-wakeup.dtsi is needed as well.

    Thanks,
    Keerthy

  • Hi,

    Thanks for your reply!

    my sdk version is  psdk_rtos_auto_j7_06_01_00_15.

    In U-Boot, I modified the contents of arch/arm/dts/k3-j721e-mcu-wakeup.dtsi as follows :

    ospi0 : spi@47040000 {

             .........

            /* assigned-clock-parents = <&k3_clks  103  2>;

               assinged-clock-rates = <166666666>; */

            assigned-clock-rates = <133000000>;

            ........

    };

    After compiling, load it to the board to run the U-BOOT command,an error occurred:

    => sf  probe 0:0

    ti_sci_clk_set_rate:  set_freq failed (-19)

    Invalid  bus 0 (err=-19)

    Failed to initialiaze SPI flash at 0:0 (error -19) 

    =>

  • Hi,

    Please try the below diff along with the DT change that you have already made:

    diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
    index 478349f22f..ed1facbbcd 100644
    --- a/drivers/clk/clk-ti-sci.c
    +++ b/drivers/clk/clk-ti-sci.c
    @@ -106,8 +106,7 @@  static ulong ti_sci_clk_set_rate(struct clk *clk, ulong rate)
     	k3_avs_notify_freq(clk->id, clk->data, rate);
     #endif
     
    -	/* Ask for exact frequency by using same value for min/target/max */
    -	ret = cops->set_freq(sci, clk->id, clk->data, rate, rate, rate);
    +	ret = cops->set_freq(sci, clk->id, clk->data, 0, rate, ULONG_MAX);
     	if (ret)
     		dev_err(clk->dev, "%s: set_freq failed (%d)\n", __func__, ret);

    Best Regards,
    Keerthy