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/DM388: How to disable the PLL clock in the device tree of kernel 4.4

Part Number: DM388

Tool/software: Linux

Dear Sir,

From the TRM, I know DM388 has 12 on-chip PLL at top level.

I want to disable the useless PLL for power saving. Ex, SATA, PCIe, Ethernet MAC.

I change the file "ti81xx-clock.tdsi" via "ti,set-bit-to-disable;"

For example, I hope to disable PLL_VIDEO0 (Is it ARM M3?) to check the current.

    /* Clock input select for video0 DPLL */
    video0_dpll_clkin_ck: video0_dpll_clkin_ck {
        #clock-cells = <0>;
        compatible = "ti,mux-clock";
        clocks = <&devosc_ck>;
        reg = <0x02C0>; /* OSC_SRC Register */
        /*ti,bit-shift = <16>;*/
        ti,set-bit-to-disable;
    };

After do that, I don't get the correct action, The current doesn't change.

Can you give me a example how to do that?

Thanks.

S.K.

  • Hi S.K,

    set-bit-to-disable applies to gate-clock and not for mux-clock. You can try for ti,gate-clock the same and check the power. Please refer Documentation/devicetree/bindings/clock/ti
  • Hi Dwarakesh,

    Do you know how to set the value about 0x418 and 0x41c for I2C-0 pinmux?

    Because these values in the device tree are not matched for the datasheet.

    i2c0_pins: pinmux_i2c0_pins{

    pinctrl-single,pins =<

    0x418 (PULL_UP | MUX_MODE0)

    0x41c (PULL_UP | MUX_MODE0)

    >;

    };

    Thanks.

    S.K.

  • Hi Huang,

    Sorry for confusion ignore my previous reply.

    MUX_MODE0 refers to 1<<0 (refer ./arch/arm/boot/dts/include/dt-bindings/pinctrl/ti81xx.h) so it is proper according to data sheet .

    Thanks & Regards,

    Vishwanath Patil

  • S.K. Huang said:

    Do you know how to set the value about 0x418 and 0x41c for I2C-0 pinmux?

    Because these values in the device tree are not matched for the datasheet.

    i2c0_pins: pinmux_i2c0_pins{

    pinctrl-single,pins =<

    0x418 (PULL_UP | MUX_MODE0)

    0x41c (PULL_UP | MUX_MODE0)

    In DM38x datasheet we have 0x48140C18 address for PINCNTL263 (i2c0_scl pin).

    In IPNC_RDK-3.9.0/linux-kernel/arch/arm/boot/dts/dm38x-csk.dts we have 0x418 for i2c0_scl pin, but in kernel/arch/arm/boot/dts/ti81xx.dtsi file we have:

    ti81xx_pincntl: pinmux@800 {
                        compatible = "pinctrl-single";
                        reg = <0x800 0x438>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        pinctrl-single,register-width = <32>;
                        pinctrl-single,function-mask = <0x300ff>;
                    };

    Thus the full address is 0x48140000 + 0x800 + 0x418 = 0x48140C18.

    To sum up, device tree code is correct regarding i2c0 pinmux, no need to change.


    Regards,
    Pavel