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.

AM5728: Disabling unnecessary peripherals

Part Number: AM5728
Other Parts Discussed in Thread: ADS1015, PMP

I'm just trying to understand the extent / responsibility of the Linux device tree node.

For example, I have the SATA nodes disabled like this:

/* No Sata on this device */
&sata_phy {
status = "disabled";
};

&sata {
status = "disabled";
};

 

However, reading the register shows that the block is still powered and being clocked:

 
root@sg3:~# devmem2 0x4a002374
/dev/mem opened.
Memory mapped at address 0xb6f11000.
Read at address 0x4A002374 (0xb6f11374): 0x0500C000

 

Am I expected to manipulate these bits directly to completely disable SATA? Or is there anything else that needs to be done in the Linux DTS (or possibly in U-Boot) to make sure SATA does not get initialized at all?

  • Adam,

    Double confirm by adding prints in the probe of SATA driver. Also you can print
    the value at u-boot itself.

    md 0x4a002374 1

    This will let us know if that was something done before kernel.

    Best Regards,
    Keerthy

  • Hello Keerthy, thanks for the response.

    Here is the output from U-Boot:

    => md 0x4a002374 1
    4a002374: 0500c000 ....

     

    Looks the same as the reading from Linux.

    FWIW, I checked for SATA in the boot log and from loaded modules, but nothing returned:

    root@sg3:~# lsmod
    Module Size Used by
    bc_example 16384 0
    xhci_plat_hcd 16384 0
    xhci_hcd 118784 1 xhci_plat_hcd
    usbcore 204800 2 xhci_plat_hcd,xhci_hcd
    pru_rproc 20480 0
    pruss_intc 16384 1 pru_rproc
    unified_kbd 24576 0
    pruss 16384 1 pru_rproc
    dwc3 69632 0
    udc_core 28672 1 dwc3
    usb_common 16384 3 udc_core,usbcore,dwc3
    bluetooth 335872 2
    ecdh_generic 28672 1 bluetooth
    bridge 110592 0
    stp 16384 1 bridge
    llc 16384 2 bridge,stp
    snd_soc_omap_hdmi_audio 16384 0
    pvrsrvkm 417792 1 bc_example
    c_can_platform 16384 0
    c_can 20480 1 c_can_platform
    can_dev 24576 1 c_can
    omap_aes_driver 24576 0
    omap_sham 28672 0
    omap_wdt 16384 1
    pruss_soc_bus 16384 0
    ti_vip 45056 0
    ti_vpe 24576 0
    ti_sc 36864 2 ti_vpe,ti_vip
    ti_csc 16384 2 ti_vpe,ti_vip
    ti_vpdma 20480 2 ti_vpe,ti_vip
    dwc3_omap 16384 0
    adv7604 61440 1
    v4l2_fwnode 16384 2 ti_vip,adv7604
    omap_des 20480 0
    ti_ads1015 20480 0
    leds_lp8863 16384 0
    des_generic 28672 1 omap_des
    crypto_engine 16384 2 omap_des,omap_aes_driver
    omap_crypto 16384 2 omap_des,omap_aes_driver
    omap_remoteproc 20480 0
    virtio_rpmsg_bus 20480 0
    rpmsg_core 16384 1 virtio_rpmsg_bus
    remoteproc 40960 2 pru_rproc,omap_remoteproc
    sch_fq_codel 20480 3
    sonar_gpio 16384 0
    cryptodev 45056 0
    cmemk 45056 0
    root@sg3:~# lsmod | grep -i sata

    root@sg3:~#
    root@sg3:~# dmesg | grep -i sata

    root@sg3:~#

    Which module in the Kernel should I put the prints? I don't believe I have any TI specific SATA drivers:

    $ cat .config | grep -i sata
    CONFIG_SATA_PMP=y
    CONFIG_SATA_AHCI=m
    CONFIG_SATA_AHCI_PLATFORM=m
    # CONFIG_SATA_INIC162X is not set
    # CONFIG_SATA_ACARD_AHCI is not set
    # CONFIG_SATA_SIL24 is not set
    # CONFIG_SATA_QSTOR is not set
    # CONFIG_SATA_SX4 is not set
    # SATA SFF controllers with BMDMA
    # CONFIG_SATA_DWC is not set
    CONFIG_SATA_MV=m
    # CONFIG_SATA_NV is not set
    # CONFIG_SATA_PROMISE is not set
    # CONFIG_SATA_SIL is not set
    # CONFIG_SATA_SIS is not set
    # CONFIG_SATA_SVW is not set
    # CONFIG_SATA_ULI is not set
    # CONFIG_SATA_VIA is not set
    # CONFIG_SATA_VITESSE is not set

  • Hi Adam,

    Quickest way to get to the driver is by searching for the exact compatible string of the node
    you tried to disable.

    Ex: arch/arm/boot/dts/dra7.dtsi

    sata: sata@4a141100 {
    compatible = "snps,dwc-ahci";
    reg = <0x4a140000 0x1100>, <0x4a141100 0x7>;
    interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
    phys = <&sata_phy>;
    phy-names = "sata-phy";
    clocks = <&l3init_clkctrl DRA7_SATA_CLKCTRL 8>;
    ti,hwmods = "sata";
    ports-implemented = <0x1>;
    };

    git grep snps,dwc-ahci drivers/
    drivers/ata/ahci_platform.c: if (of_device_is_compatible(dev->of_node, "snps,dwc-ahci"))
    drivers/ata/ahci_platform.c: { .compatible = "snps,dwc-ahci", },

    So drivers/ata/ahci_platform.c is the driver file.

    Similarly for sata_phy:

    git grep ti,phy-pipe3-sata drivers/
    drivers/phy/ti/phy-ti-pipe3.c: .compatible = "ti,phy-pipe3-sata",

    drivers/phy/ti/phy-ti-pipe3.c is the file.

    Best Regards,
    Keerthy