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/OMAP-L138: Using device tree instead of board file

Part Number: OMAP-L138

Tool/software: Linux

We are developing a board with "TI OMAP-L138" and Linux.
We have moved to a newer kernel version (V4.4.25); but we are still using a "board file" (using "platform device data") to register device drivers and initialize them.

But it seems, that with newer kernel versions (from 4.x?) the usage of "device tree" is highly recommended.
We have already experienced, that new drivers are only written for device tree based systems.

What is the actual status for using device tree for a board based on "TI OMAP-L138" and Linux Kernel V4.x?
Can we completely replace our board file with a device tree describing all (!) details of the hardware?

How can we start creating a device tree source file for our board?
From where we can know, what nodes and properties should the device tree source file contain?
Is there any "knowledge base" for the necessary "device tree bindings" for "TI OMAP-L138"?
Is there any existing device tree source file for OMAP-L138 we can use as a template for our board?

Your help is greatly appreciated!

  • Hi,

    What is the actual status for using device tree for a board based on "TI OMAP-L138" and Linux Kernel V4.x?


    I know there are efforts to push the OMAP-L138 devices in the Processor SDK linux, which uses dts files. However, I don't have any status on this, or a schedule...

    Can we completely replace our board file with a device tree describing all (!) details of the hardware?

    Yes, this is possible.

    How can we start creating a device tree source file for our board?
    From where we can know, what nodes and properties should the device tree source file contain?
    Is there any "knowledge base" for the necessary "device tree bindings" for "TI OMAP-L138"?
    Is there any existing device tree source file for OMAP-L138 we can use as a template for our board?

    From the existing Processor SDK 03.02.00.05 (kernel 4.4.32 - for example the am335x sdk: software-dl.ti.com/.../index_FDS.html), you can refer to arch/arm/boot/dts/da850.dtsi & arch/arm/boot/dts/da850-evm.dts.
    There are also some community patches adding support for omap-l138 lcdk:
    patchwork.kernel.org/.../
    www.spinics.net/.../msg137814.html
    You could also have a look at those.
    you should use the kernel docs as a general knowledge base for the dts files: Documentation/devicetree/bindings/

    Note that you may need to modify some specific omap-l138 drivers to use the dts, as currently they are using board files.

    Hope this helps.

    Best Regards,
    Yordan
  • Hi Yordan!

    Thank you for your answer.

    Only for clarification:
    With "processor sdk" do you mean the "processor sdk linux 03.02.00"?
    I have found a git repository at gitorious.ti.com/.../processor-sdk-linux-03.02.00.
    If we use this processor sdk for OMAP-L138 than we still have to modify some specific drivers for the OMAP-L138 in case of using device tree?

    Is there an offical "processor sdk linux" for OMAP-L138?
    As far as I know there is an "BIOSLINUXMCSDK-OMAPL13X"; but this is very old (Linux 3.3).
    What SDK schould we use for further development with OMAP-L138 and Linux with device tree?

    Best regards
    Jan-Marc.
  • Hi Jan-Marc,

    With "processor sdk" do you mean the "processor sdk linux 03.02.00"?

    Yes.

    If we use this processor sdk for OMAP-L138 than we still have to modify some specific drivers for the OMAP-L138 in case of using device tree?

    Correct, you have to modify the drivers.

    Is there an offical "processor sdk linux" for OMAP-L138?

    No, there isn't. As I said there are plans to move the support of OMAP-L138 in processor sdk. But I have no further info, if and when this will happen.

    What SDK schould we use for further development with OMAP-L138 and Linux with device tree?

    I think the BIOSLINUXMCSDK-OMAPL13X which uses kernel 3.3 will require more effort, because, besides porting the drivers & dts file, you will have to port the dts support in this kernel. While later kernels 4.x (used by processor sdk linux) already support dts, but you still have to create a dts file & modify the omap-l138 specific drivers. Unfortunately both options will be quite time consuming..

    Best Regards,
    Yordan
  • Hi Yordan,

    thanks for your reply.

    As I've understood we should use a Linux Kernel 4.x as we already do.

    Actually we are using a mainline ("vanilla") kernel 4.4.25 with a few patches.
    This kernel version already includes the OMAP-L138 ("davinci" or "da8500") specific drivers and together with a board file we have crerated a running system.

    In what details do the linux kernel in "processor sdk linux 03.02.00" differ from a mainline kernel?
    Are there important differences regarding the OMAP-L138 specific drivers?
    Is the kernel included in "processor sdk linux 03.02.00" more suitable for a linux system with device tree?
    Or is a "ti-linux-kernel-4.x" (git.ti.com/.../ti-linux-kernel) a better choice?

    Perhaps there is no context between a specific linux kernel version and OMAP-L138 specific drivers and we have to modify the drivers in any case?
    How can we find out what specific drivers for OMAP-L138 we have to modify in order to use device tree?
    Is there an expert at TI for this topic?

    Best regards,
    Jan-Marc
  • Hi Jan-Marc,

    In what details do the linux kernel in "processor sdk linux 03.02.00" differ from a mainline kernel?
    Are there important differences regarding the OMAP-L138 specific drivers?


    Usually the kernels from the officially released linux SDKs are tested & adapted to TI devices (AM335x, AM437x, AM57xx, DRA7xx and so on..). As a general rule the mainline kernel also supports TI devices & contains the TI drivers.

    Is the kernel included in "processor sdk linux 03.02.00" more suitable for a linux system with device tree?
    Or is a "ti-linux-kernel-4.x" (git.ti.com/.../ti-linux-kernel) a better choice?


    Both should work fine with dts files.

    How can we find out what specific drivers for OMAP-L138 we have to modify in order to use device tree?


    Have a look at the compatible="" parameter in the dts file. Also you can use the defconfig file to see which drivers are included in your kernel build and adapt them if necessary.

    Best Regards,
    Yordan