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.

PROCESSOR-SDK-AM335X: DTS parse error

Part Number: PROCESSOR-SDK-AM335X

Hi

I have added following entry in my dts file.

timer5 {
pinctrl-names = "default";
status = "okay";
DMtimer5 = <&timer5>;
};

But I get error as 

Error: arch/arm/boot/dts/......... syntax error
FATAL ERROR: Unable to parse input tree

When I change it to, the error goes

&timer5 {
pinctrl-names = "default";
status = "okay";
DMtimer5 = <&timer5>;
};

My concern is I am not able to create a node with any new name . Please let me know the process to create a node like 

my_xyz{

status=ok;

};

  • Part Number: PROCESSOR-SDK-AM335X

    hi

    My dts entry is as below

    &timer5 {
    pinctrl-names = "default";
    status = "okay";
    DMtimer5 = <&timer5>;
    };

    And my code to read the DTS entry as as below

    struct device_node *timer_device_node; 

    timer_device_node = of_parse_phandle(pdev->dev.of_node, "DMtimer5", 0);
    if(!timer_device_node)
    {
    /* no timers available */
    printk(KERN_INFO "Phandle Missing DM Timer 5\n");
    // return -1;
    }

    But I am getting the error as Phandle Missing DM Timer 5

    Please help me resolve this error asap

  • We define most SoC peripheral nodes for you in our DT architecture. You should only need to add nodes for board level devices.

    In your example, timer5 is defined in am33xx.dtsi, which is should be included in you DTS like it is in our EVM DTS files. If you want to change some attribute of it, a phandle using & as you indicate above is the proper way to do it.

  • Hi

    Thanks for the reply. But I am unable to understand it. What I did understand is 

    Timer5 node is there in my DTS file. It is defined as given below

    &timer5 {
    pinctrl-names = "default";
    status = "okay";
    DMtimer5 = <&timer5>;
    };

    Also if I remove the & sign, I get error because the node is not defined. Hence I understand that &timer5 is defned in dtsi which is included

    The problem i am facing is I am unable to pass the function - of_parse_phandle

    Can you please give me a short example of the entry in DTS file which has the entry for DMtimer.

  • Hi,

    Please take a look at this training to help understand how to find device drivers from DT nodes. You can use this to find the drivers that TI provides with our Linux package and they will serve as a great reference for how to interrogate DT properly.