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.

AM335x safe removal of device tree nodes

I'm building my own device tree based off the am335x-evm.dts and there are a bunch of nodes I want to get rid of (as they're not applicable). My platform doesn't use WiFi, Bt, volume keys or sound, NAND flash and a few other things that are in the EVM's device tree. So I wanted to pull a bunch of nodes but first I'd like confirmation that:

1) I'm under the impression I can rip out what I want to, but is that safe or should each node be looked at carefully and settings changed to a "dormant" state instead of simply removing it?

2) Several nodes have both a "sleep" and a "default" state. Our product will not be going to sleep, it will simply be on or off. Given this, can all "sleep" pin mux configurations be ripped out?

3) Below is the list I'd like to remove, could I please get confirmation that each node is what I think it is?
volume_keys_s0: volume_keys_s0 -                   volume key settings for the EVM
clkout2_pin: pinmux_clkout2_pin -                   This is the clock output for the HDMI transceiver
nandflash_pins_default: nandflash_pins_default - the pin settings for the NAND flash interface
mmc2_pins: pinmux_mmc2_pins -                     MMC2 pins (we only will use MMC0)
wlan_pins: pinmux_wlan_pins -                         wireless lan pin settings
elm: elm@48080000 -                                          error location module settings (used for NAND)
gpmc: gpmc@50000000 -                                    General purpose memory controler (used for NAND)
wlan_en_reg: fixedregulator@2 -                         Power setup for wireless LAN
wlcore -                      More wireless lan set up
btwilink -                   Bluetooth set up node
mmc3 -                       MMC3 setup, I think it's just used for the wireless LAN
edma -               I'm not sure if I need to keep this node or not, it's being used by the mmc3 node (which we don't need) so my gut tells me we can remove it, but is it required if we want to use EDMA for other reasons?

4) Last question, There are two nodes that I do not know what they do

lis3_reg: fixedregulator@1 - can't find this anywhere...
kim -                                         I can't find this in schamice or the TRM, but looking online I think it has something to do with BT and interconnections.

  • Mike Worster said:
    1) I'm under the impression I can rip out what I want to, but is that safe or should each node be looked at carefully and settings changed to a "dormant" state instead of simply removing it?

    Generally speaking, yes, rip out the stuff you don't need to keep things tidy.  Just be careful not to rip out something that's necessary!

    Mike Worster said:
    2) Several nodes have both a "sleep" and a "default" state. Our product will not be going to sleep, it will simply be on or off. Given this, can all "sleep" pin mux configurations be ripped out?

    Let me get back to you on this one.  I need to dig a bit more on exactly how those are used.

    Mike Worster said:
    3) Below is the list I'd like to remove, could I please get confirmation that each node is what I think it is?
    volume_keys_s0: volume_keys_s0 -                   volume key settings for the EVM
    clkout2_pin: pinmux_clkout2_pin -                   This is the clock output for the HDMI transceiver
    nandflash_pins_default: nandflash_pins_default - the pin settings for the NAND flash interface
    mmc2_pins: pinmux_mmc2_pins -                     MMC2 pins (we only will use MMC0)
    wlan_pins: pinmux_wlan_pins -                         wireless lan pin settings
    elm: elm@48080000 -                                          error location module settings (used for NAND)
    gpmc: gpmc@50000000 -                                    General purpose memory controler (used for NAND)
    wlan_en_reg: fixedregulator@2 -                         Power setup for wireless LAN
    wlcore -                      More wireless lan set up
    btwilink -                   Bluetooth set up node
    mmc3 -                       MMC3 setup, I think it's just used for the wireless LAN
    edma -               I'm not sure if I need to keep this node or not, it's being used by the mmc3 node (which we don't need) so my gut tells me we can remove it, but is it required if we want to use EDMA for other reasons?

    Looks ok.  I was a bit concerned about the EDMA reference at first, but I see now that just relates to the event crossbar that was being setup for "mmc3".

    Mike Worster said:

    4) Last question, There are two nodes that I do not know what they do

    lis3_reg: fixedregulator@1 - can't find this anywhere...
    kim -                                         I can't find this in schamice or the TRM, but looking online I think it has something to do with BT and interconnections.

    The lis3_reg is part of the LIS302 accelerometer configuration which is documented in the kernel source at Documentation/devicetree/bindings/misc/lis302.txt.

    I don't see details on "kim" though you are correct that it relates to UART1 and the WiLink device.

  • I received some inputs from the factory team.  (Thanks, Schuyler!)  I'll summarize:

    Mike Worster said:
    1) I'm under the impression I can rip out what I want to, but is that safe or should each node be looked at carefully and settings changed to a "dormant" state instead of simply removing it?

    The am33xx.dtsi file defines most/all the peripherals with "status=disabled".  Therefore if you strip out unused peripherals from your board.dts file then that will result in the corresponding peripherals NOT being probed/initialized.  So that will save you in terms of boot time. 

    You could go a step further by making a corresponding modification to your Linux config file.  In particular, if you disable the peripheral in the config file that will remove the code completely from the zImage.  This reduces the amount of nonvolatile memory needed to hold zImage and also reduces the amount of time to load zImage into RAM.

    Mike Worster said:
    2) Several nodes have both a "sleep" and a "default" state. Our product will not be going to sleep, it will simply be on or off. Given this, can all "sleep" pin mux configurations be ripped out?

    The "sleep" state is optional.  When entering DS0, DS1, or standby the pins will be reconfigured to the "sleep" state if one is defined.