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: Disabling unused peripherals

Guru 16800 points
Part Number: AM5728

Tool/software: Linux

Hello,

Could you tell me how to disable the clock of unused interface?
Can I achieve it by a device tree file or a direct register setting?

Also, could you tell me how to disable the function of unused interface?
Can I achieve it by a device tree file, too?

Best Regards,
Nomo

  • Hi Nomo,

    Yes, you can use DTS file. Check for "status" entry. See below document for more info:

    www.ti.com/.../sprac74a.pdf

    3.1.4.1 Disabling Peripherals in Device Tree

    Regards,
    Pavel
  • Hello Pavel-san,

    Thank you for your reply.
    I'll refer to the document you suggested.

    Best Regards,
    Nomo
  • Part Number: AM5728

    Tool/software: Linux

    Hello,

    Some interface can be undescribed in the device tree file of AM5728's EVM.
    (For example, i2c1 and i2c3 are described, but i2c2, i2c4 and i2c5 aren't described.)
    In the case, which is the default status, okay or disabled?

    Best Regards,
    Nomo

  • Nomo,

    The default state for all I2C instances is disabled, see dra7.dtsi file. Then i2c1 and i2c3 are enabled in am57xx-beagle-x15-common.dtsi and i2c5 is enabled in am57xx-evm-common.dtsi. Rest of the i2c instances (i2c2, i2c4) are still in disabled state.

    Regards,
    Pavel
  • Hello Pavel-san,

    Thank you for you reply.
    I can understand.

    Best Regards,
    Nomo
  • Part Number: AM5728

    Tool/software: Linux

    Hello,

    I can understand the default status of i2c undescribed in the dts file is disabled from the following thread.
    e2e.ti.com/.../2576105
    How about other interfaces?
    Especially, my customers want to know the default status of the following interfaces undescribed in the dts file.
    PCIe, EMIF (DDR3), GMAC_SW (Ehternet), UART, USB3.0, USB2.0, VOUT, HDMI, SDIO

    Best Regards,
    Nomo

  • Nomo,

    You should explore the AM57x EVM DTS files (dra7.dtsi, dra74x.dtsi, am57xx-beagle-x15-common.dtsi, am57xx-beagle-x15.dts, am57xx-evm-common.dtsi, am57xx-evm.dts), and see which module has status "ok" and which is "disabled". For example pcie1_rc is enabled, while pcie1_ep is disabled.

    dra7.dtsi

    To enable PCI endpoint mode, disable the pcie1_rc
    node and enable pcie1_ep mode.

    pcie1_rc: pcie@51000000 {
    status = "disabled";
    }

    pcie1_ep: pcie_ep@51000000 {
    status = "disabled";
    };



    am57xx-beagle-x15-common.dtsi

    &pcie1_rc {
    status = "ok";
    gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
    };

    &pcie1_ep {
    gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
    };

    You can also double confirm if module is disabled or enabled from reading the corresponding PRCM enable register. For example:

    CM_PCIE_PCIESS1_CLKCTRL
    CM_PCIE_PCIESS2_CLKCTRL

    EMIF (DDR3) is enabled in u-boot and is kept enabled in kernel and user space.

    Regards,
    Pavel

  • Regarding UART, I see that all uarts are disabled in dra7.dtsi file, then uart3 and uart8 are enabled in am57xx-beagle-x15-common.dtsi and am57xx-evm-common.dtsi files.
  • Hello Pavel-san,

    Thank you for your reply.
    However, they want to know the default status of undescribed instances in dts file.
    I understand we can find the status from the dts files; however, we cannot find the default status of instances which don't exist in dts file.

    Best Regards,
    Nomo
  • Nomo,

    If module/instance is not explicitly enabled or disabled in linux DTS file, you can check u-boot DTS files. This module might be enabled/disabled there in u-boot DTS file. If this module/instance is also not enabled/disabled in u-boot DTS files, then most probably this module is disabled, as this is the default state in PRCM registers.

    So I would suggest you for every module/instance to check:
    - linux DTS files
    - u-boot DTS files
    - PRCM power and clock enable/disable registers

    Regards,
    Pavel