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.

How to read LEDS device driver for AM3358 SK board?

Other Parts Discussed in Thread: AM3358

Hi,

I want to add/modify an external LED function to AM3358 SK board. It is found there are many files under folder:

/home/xx3/ti-processor-sdk-linux-am335x-evm-01.00.00.03/board-support/linux-3.14.43+gitAUTOINC+875c69b2c3-g875c69b/drivers/leds

There are many different manufacture boards file there. I even don't see which one is for TI AM3358. Could you tell me the relevant .c files for the Starter Kit?

Thanks,

  • Hi,
    Please have a look at it in arch & mach file and device tree file for your customization on LED.
    arch/arm/mach-am335x/
    arch/arm/boot/dts/am335x-sk-evm.dts
  • That is correct. If you open the arch/arm/boot/dts/am335x-evmsk.dts you will see the relevant .c file which you are looking for is drivers/leds/leds-gpio.c
  • Thank both of you.

    Your replies give me further information on the learning the SK board. Could you tell me answers below?

    To build an individual device tree file find the name of the dts file for the board you are using and replace the .dts extension with .dtb. Then run the following command:

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- <dt filename>.dtb.      In what directory to run this make command?
    

    The compiled device tree file with (will?) be located in arch/arm/boot/dts.  The folder: arch/arm/boot/dts only serves the source input file, no any output file there?

    For example, the Beaglebone Black device tree file is named am335x-boneblack.dts. To build the device tree binary you would run:

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb





  • Run the make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-boneblack.dtb command from the kernel source directory where the main kernel Makefile is located.
    In SDK 01.00.00.03 the make linux-dtbs command will rebuild am335x-evm.dtb am335x-evmsk.dtb am335x-bone.dtb am335x-boneblack.dtb
    After the successful compilation all the generated .dtb files are located next to the .dts files within the arch/arm/boot/dts directory.