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.

AM625: CLKOUT0 frequency configuration

Part Number: AM625

This question was asked many times on the forum. would like to get a conclusion. 

The CLKOUT0(A18) pin is just a pin to observe clock output, but seems it is bond with CPSW RMII mode configuration to enable it and output 50MHz.

image.png

#1. How to configure it output 25MHz/50MHz alone without CPSW in Linux?

#2. The same question for wkup_clkout0?

image.png

image.png

  • Hello,

    The subject matter expert is out of office until April 29th. Please expect a delayed response. Thanks.

  • Hi Tony,

    Using kernel devicetree k3-am625-beagleplay.dts as an example, CLKOUT0 is defined as

    &cpsw3g {
            pinctrl-names = "default";
            pinctrl-0 = <&rgmii1_pins_default>, <&spe_pins_default>,
                        <&gbe_pmx_obsclk>;
            assigned-clocks = <&k3_clks 157 70>, <&k3_clks 157 20>;
            assigned-clock-parents = <&k3_clks 157 72>, <&k3_clks 157 22>;
    };

    The second element in line 5 and 6 configures CLKOUT0. You can copy the following two lines to any DT node to configure CLKOUT0, it is not tied to cpsw3g.

    assigned-clocks = <&k3_clks 157 20>;
    assigned-clock-parents = <&k3_clks 157 22>;

    In the first line, "157" is the device ID which CLKOUT0 belongs to, "20" is the clk ID for CLKOUT0.

    In the second line, the second number is the clk ID for the clk mux input selected for CLKOUT0. "22" PLL2_HSDIV1_CLKOUT/5 (50MHz), while "23" is PLL2_HSDIV1_CLKOUT/10 (25MHz).

    WKUP_CLKOUT0 can be configured in the same way. The device ID will still be "157", the clk ID for WKUP_CLKOUT0 is "158", and the clk IDs for its clkmux input are 159 ~ 165. So an example of WKUP_CLKOUT0 configuration:

    assigned-clocks = <&k3_clks 157 158>;
    assigned-clock-parents = <&k3_clks 157 159>;

    All these device ID and clk ID details are in 

    AM62X Clock Identifiers — TISCI User Guide