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: PCIE SERDES reference clock no output

Part Number: TDA4VM
Other Parts Discussed in Thread: TDA4VH

We have TDA4VM as a PCIE RC on our board(not evm board), but there is no clock output from the Serdes pins. Please help solve how to get the clock to output correctly.

1. Board schematic

The left side of the image below is TDA4VM, where PCIE_REFCLK1P\PCIE_REFCLK1N is used as the clock output pin to output the clock to the EP node. (No clock signal output for measurement).

2. SDK version

08.06.01(ti-processor-sdk-linux-j7-evm-08_06_01_02-Linux-x86-Install.bin)

3. Used patch information

Refer to the known FAQ, patch changes have been merged into the code, installed into the TF card, restart the load.

The two addresses 0x00109008 and 0x0010900C are read as 0. The values read from the other addresses are the values written by the patch.

But these two values can be written by :devmem2 0x0010900C w 0xD172BC5A.

Used patch for SDK8.x:/cfs-file/__key/communityserver-discussions-components-files/791/pcie_2D00_ref_2D00_clock_2D00_out_5F00_sdk8.diff

[FAQ] TDA4VM: TDA4VM/DRA829V: routing PCIE reference clock externally - Processors forum - Processors - TI E2E support forums

4. Select the clock source

According to the default configuration of the device tree, the internal clock source is used.

	serdes_wiz0: wiz@5000000 {
		compatible = "ti,j721e-wiz-16g";
		#address-cells = <1>;
		#size-cells = <1>;
		power-domains = <&k3_pds 292 TI_SCI_PD_EXCLUSIVE>;
		clocks = <&k3_clks 292 5>, <&k3_clks 292 11>, <&cmn_refclk>;
		clock-names = "fck", "core_ref_clk", "ext_ref_clk";
		assigned-clocks = <&k3_clks 292 11>, <&k3_clks 292 0>;
		assigned-clock-parents = <&k3_clks 292 15>, <&k3_clks 292 4>;
		num-lanes = <2>;
		#reset-cells = <1>;
		ranges = <0x5000000 0x0 0x5000000 0x10000>;

		wiz0_pll0_refclk: pll0-refclk {
			clocks = <&k3_clks 292 11>, <&cmn_refclk>;
			#clock-cells = <0>;
			assigned-clocks = <&wiz0_pll0_refclk>;
			assigned-clock-parents = <&k3_clks 292 11>;
		};

		wiz0_pll1_refclk: pll1-refclk {
			clocks = <&k3_clks 292 0>, <&cmn_refclk1>;
			#clock-cells = <0>;
			assigned-clocks = <&wiz0_pll1_refclk>;
			assigned-clock-parents = <&k3_clks 292 0>;
		};

		wiz0_refclk_dig: refclk-dig {
			clocks = <&k3_clks 292 11>, <&k3_clks 292 0>, <&cmn_refclk>, <&cmn_refclk1>;
			#clock-cells = <0>;
			assigned-clocks = <&wiz0_refclk_dig>;
			assigned-clock-parents = <&k3_clks 292 11>;
		};

		wiz0_cmn_refclk_dig_div: cmn-refclk-dig-div {
			clocks = <&wiz0_refclk_dig>;
			#clock-cells = <0>;
		};

		wiz0_cmn_refclk1_dig_div: cmn-refclk1-dig-div {
			clocks = <&wiz0_pll1_refclk>;
			#clock-cells = <0>;
		};

		serdes0: serdes@5000000 {
			compatible = "ti,sierra-phy-t0";
			reg-names = "serdes";
			reg = <0x5000000 0x10000>;
			#address-cells = <1>;
			#size-cells = <0>;
			#clock-cells = <1>;
			resets = <&serdes_wiz0 0>;
			reset-names = "sierra_reset";
			clocks = <&wiz0_cmn_refclk_dig_div>, <&wiz0_cmn_refclk1_dig_div>, <&wiz0_pll0_refclk>, <&wiz0_pll1_refclk>;
			clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div", "pll0_refclk", "pll1_refclk";
		};
	};

  • Hi ljc,

    I am currently looking into a similar thread here: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1273196/tda4vm-clock-of-pcie_m-2. But is this thread related (meaning all logs that I have collected from this other thread is applicable), or a new thread that happened to have similar issues (meaning most logs from previous thread is probably applicable, but there is a chance the issue is different)?

    In either case, could you send the full dmesg logs to me? On my setup, I am getting error logs for PLL not locking, so I would like to see if the errors are similar, or if other issues are seen.

    Regards,

    Takuma

  • Hi Takuma,

    I sent you the dmesg logs via private message.

    In addition, the status of the clock source I read from the board is good.

    Regards,

    Ljc

  • Hi Ljc,

    Thank you for the dmesg logs. Quick look through the logs, it looks like PCIe0 and PCIe1 are coming up correctly and there are logs indicating the clock out from SOC is being configured. so it is strange that no refclk is being seen.

    Two follow up questions:

    • The logs look like there are no devices connected to the PCIe interface since there are no logs indicating "Link up", but if a device is connected to these PCIe interface, are the devices functional? Or is there already a device that is physically connected to the PCIe interface when the logs were collected?
    • Could you run this script and share the output with me: https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/analyze_5F00_pcie_5F00_register_5F00_tda4vm.sh

    Regards,

    Takuma

  • Hi Takuma,

    When logs are collected, an EP device is connected to the Serdes and depends on the clock output of the TDA4VM.

    Here is the result of executing the sh script:

    //// Starting register dump ////
    CTRLMMR_PCIE0_CLKSEL at addr 0x00108080 is 0x00000000
    CTRLMMR_PCIE1_CLKSEL at addr 0x00108084 is 0x00000000
    CTRLMMR_PCIE2_CLKSEL at addr 0x00108088 is 0x00000000
    CTRLMMR_PCIE3_CLKSEL at addr 0x0010808C is 0x00000000
    CTRLMMR_PCIE0_CTRL at addr 0x00104070 is 0x00000082
    CTRLMMR_PCIE1_CTRL at addr 0x00104074 is 0x00000182
    CTRLMMR_PCIE2_CTRL at addr 0x00104078 is 0x00000103
    CTRLMMR_PCIE3_CTRL at addr 0x0010407C is 0x00000103
    CTRLMMR_PCIE_REFCLK0_CLKSEL at addr 0x00108070 is 0x00000100
    CTRLMMR_PCIE_REFCLK1_CLKSEL at addr 0x00108074 is 0x00000101
    CTRLMMR_PCIE_REFCLK2_CLKSEL at addr 0x00108078 is 0x00000100
    CTRLMMR_PCIE_REFCLK3_CLKSEL at addr 0x0010807C is 0x00000101
    CTRLMMR_ACSPCIE0_CTRL at addr 0x00118090 is 0x01000000
    CTRLMMR_ACSPCIE1_CTRL at addr 0x00118094 is 0x01000000
    PCIE_CORE_PF0_I_LINK_CTRL_STATUS/PCIE_CORE_RP_I_LINK_CTRL_STATUS at addr 0x0D8000D0 is 0x00210000
    PCIE_CORE_PF1_I_LINK_CTRL_STATUS at addr 0x0D8010D0 is 0x00210000
    PCIE_CORE_PF2_I_LINK_CTRL_STATUS at addr 0x0D8020D0 is 0x00210000
    PCIE_CORE_PF3_I_LINK_CTRL_STATUS at addr 0x0D8030D0 is 0x00210000
    PCIE_CORE_PF4_I_LINK_CTRL_STATUS at addr 0x0D8040D0 is 0x00210000
    PCIE_CORE_PF5_I_LINK_CTRL_STATUS at addr 0x0D8050D0 is 0x00210000
    CTRLMMR_SERDES0_LN0_CTRL at addr 0x00104080 is 0x00000001
    CTRLMMR_SERDES0_LN1_CTRL at addr 0x00104084 is 0x00000003
    CTRLMMR_SERDES1_LN0_CTRL at addr 0x00104090 is 0x00000001
    CTRLMMR_SERDES1_LN1_CTRL at addr 0x00104094 is 0x00000001
    CTRLMMR_SERDES2_LN0_CTRL at addr 0x001040A0 is 0x00000000
    CTRLMMR_SERDES2_LN1_CTRL at addr 0x001040A4 is 0x00000002
    CTRLMMR_SERDES3_LN0_CTRL at addr 0x001040B0 is 0x00000002
    CTRLMMR_SERDES3_LN1_CTRL at addr 0x001040B4 is 0x00000002
    //// Ending register dump ////
    

    Regards,

    Ljc

  • The clock source is an internal clock. Can TDA4VM output a clock? I see that the clock source of the PCIE clock output on the demo board is an external clock.

  • Hi Ljc,

    I have tried on a similar device, TDA4VH, but that was able to output from internal clock. I assume Jian, my former colleague who made the FAQ for TDA4VM, was able to output from internal clock.

    I am currently looking to see if I can reproduce his work using 8.0 SDK (the SDK the FAQ was originally made with) on the TDA4VM.

    Regards,

    Takuma

  • Hi Takuma san,

    Please reproduce it. Thank you very much.

    Need any more information?

    Regards,

    Ljc

  • Hi Ljc,

    As of now, I do not need additional information. However, I will most likely ask for more information later as I find out more about this setup.

    Regards,

    Takuma

  • Hi Ljc,

    Apologies for the delayed response and thank you for your patience.

    If using the default device trees in our SDK, we have an additional dts file that overwrites the clock settings in k3-j721e-main.dtsi. Commenting out the wiz* section should choose the correct core_ref_clk instead of the ext_ref_clk.

    For 8.0 SDK, along with the patches from the FAQ, this allowed the PCIe slot to get the correct clock and initialize successfully. For 8.6 SDK, I am looking into an issue where devices connected through PCIe is detected but later the link goes down, but let me know if you see the same issue after the wiz* changes.

    Regards,

    Takuma

  • Hi Ljc,

    I found the issue with 8.6 and updated the FAQ with new patches. Please try applying the new patches and let me know if there are further issues: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1004565/faq-tda4vm-tda4vm-dra829v-routing-pcie-reference-clock-externally

    Regards,

    Takuma