Could it be that when the image is loaded from RAM, the clocks are set by uboot and, hence, traffic is flowing between the ipq5018 and qca8337 switches over the uniphy?
I looked at the yaml bindings definition of the GCC, and found that the clocks for gephy and uniphy are explicitly set (and perhaps must be?):
clocks:
items:
- description: Board XO source
- description: Sleep clock source
- description: PCIE20 PHY0 pipe clock source
- description: PCIE20 PHY1 pipe clock source
- description: USB3 PHY pipe clock source
- description: GEPHY RX clock source
- description: GEPHY TX clock source
- description: UNIPHY RX clock source
- description: UNIPHY TX clk source
<-- cut -->
clock-controller@1800000 {
compatible = "qcom,gcc-ipq5018";
reg = <0x01800000 0x80000>;
clocks = <&xo_board_clk>,
<&sleep_clk>,
<&pcie20_phy0_pipe_clk>,
<&pcie20_phy1_pipe_clk>,
<&usb3_phy0_pipe_clk>,
<&gephy_rx_clk>,
<&gephy_tx_clk>,
<&uniphy_rx_clk>,
<&uniphy_tx_clk>;
my current dtsi looks as follows and is missing the gephy and uniphy clocks:
gcc: clock-controller@1800000 {
compatible = "qcom,gcc-ipq5018";
reg = <0x01800000 0x80000>;
clocks = <&xo_board_clk>,
<&sleep_clk>,
<&pcie_x2phy>,
<&pcie_x1phy>,
<&usbphy1>,
<0>,
<0>,
<0>,
<0>;
#clock-cells = <1>;
#reset-cells = <1>;
#power-domain-cells = <1>;
the clocks set point to nodes in the dtsi, for ex, the usbphy1 is the phy node for USB3.
If they need to be set, where do I point them to? The ess-switch (as that's the one that refers to the gephy and uniphy clocks)?
Or can I point directly to clocks in the GCC driver? such as:
gcc: clock-controller@1800000 {
compatible = "qcom,gcc-ipq5018";
reg = <0x01800000 0x80000>;
clocks = <&xo_board_clk>,
<&sleep_clk>,
<&pcie_x2phy>,
<&pcie_x1phy>,
<&usbphy1>,
<&gcc GCC_GEPHY_RX_CLK>,
<&gcc GCC_GEPHY_TX_CLK>,
<&gcc GCC_UNIPHY_RX_CLK>,
<&gcc GCC_UNIPHY_TX_CLK>;
@robimarko, @hzyitc, @kirdes: any clue?