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.

Linux: AM5728 MMC clock

Other Parts Discussed in Thread: AM5728, WL1835

Tool/software: Linux

Hi,

In the device tree of AM57xx-evm, mmc3 is configured for connecting a WiFi module.

I see that default max-frequency is set to 48 MHz. But, when checked the clock frequency with oscilloscope, I am getting around 25 MHz only.

I tried modifying the value for the "max-frequency" of mmc3 but I was clock seems to be unchanged.

I am using AM5728 GP EVM and I am trying to modify "arch/arm/boot/dts/am57xx-evm-common.dtsi"

Kindly let me the reason for it. Is there anything I am missing here.

Regards,

Babji.

 

  • Hi Babji,

    Do you use AM57x TI PSDK v4.03?

    Regards,
    Pavel

  • Babji,

    "max-frequency" of mmc3 is set in file dra7.dtsi, it is set to 64MHz and I suggest you to not change that value.

    mmc3: mmc@480ad000 {
                compatible = "ti,dra7-hsmmc", "ti,omap4-hsmmc";
                reg = <0x480ad000 0x400>;
                interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                ti,hwmods = "mmc3";
                ti,needs-special-reset;
                dmas = <&sdma_xbar 77>, <&sdma_xbar 78>;
                dma-names = "tx", "rx";
                status = "disabled";
                /* Errata i887 limits max-frequency of MMC3 to 64 MHz */
                max-frequency = <64000000>;
                sd-uhs-sdr12;
                sd-uhs-sdr25;
                sd-uhs-sdr50;
            };

     

    Babji Pakala said:
    But, when checked the clock frequency with oscilloscope, I am getting around 25 MHz only.

    Most probably you are in mode sd-uhs-sdr12 (24MHz) and you need to switch to mode sd-uhs-sdr25 (48MHz). You can do that in am57xx-evm-common.dtsi file, try the below approach:

    &mmc3 {
        status = "okay";
        vmmc-supply = <&vmmcwl_fixed>;
        bus-width = <4>;
        pinctrl-names = "default";
        cap-power-off-card;
        keep-power-in-suspend;
        ti,non-removable;
        +/delete-property/ sd-uhs-sdr12;
        +/delete-property/ sd-uhs-sdr50;

        #address-cells = <1>;
        #size-cells = <0>;
        wlcore: wlcore@2 {
            compatible = "ti,wl1835";
            reg = <2>;
            interrupt-parent = <&gpio5>;
            interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
        };
    };

     

    Then you can trace the flow in linux-kernel/drivers/mmc/core/host.c file and verify that MMC_CAP_UHS_SDR25 is set for host->caps.

    Note also that the external WiFi module should also support SDR25 mode (48MHz, 24Mbps).

    Regards,
    Pavel

  • Hi Pavel,

    Thanks for the response.
    I am using ti-processor-sdk-linux-am57xx-evm-02.00.02.11.

    I will try it out and get back to you.

    Regards,
    Babji.
  • If you look in the Silicon Errata, you'll see the speed limits on each mmc. MMC3 has a maximum speed of 64MHz.

    Steve K.