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/AM3354: Unable to configure DMTimer as PWM

Part Number: AM3354

Tool/software: Linux

Hi All,

HW description,

  • SoC used AM3354BZCZ60
  • Custom made board

SW description,

  • SDK version - 03.03, Kernel version - 4.4.41-gf9f6f0db2d, u-boot version - u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd

Problem Scenario,

I have configured timer7(gpio1_8) as PWM under user space by referring the scripts attached in the below link,

e2e.ti.com/.../440723

In my user space script, I have configured the timer7 registers to generate PWM signals by referring the section 20.1.5 of AM335x TRM. Timer7 is configured to use 24MHz main clk as clk source.Once I run the script it complains with the following error messages,

/ti.mer.sh: line 54:  2229 Bus error               (core dumped) evmem2 0x4804a04c w 0xFFFFFE9C
/dev/mem opened.
Memory mapped at address 0xb6fa0000.[ 3036.452740] Unhandled fault: external abort on non-linefetch (0x1018) at 0xb6fa0044
[ 3036.466501] pgd = d536c000
[ 3036.469221] [b6fa0044] *pgd=9b623831, *pte=4804a303, *ppte=4804aa33
[ 3036.475712] edma 49000000.edma: dma_ccerr_handler: Error interrupt without error event!

./timer.sh: line 58:  2231 Bus error               (core dumped) devmem2 0x4804a044 w 0x00000000
/dev/mem opened.
Memory mapped at address 0xb6f1b000.[ 3036.506486] Unhandled fault: external abort on non-linefetch (0x1018) at 0xb6f1b010
[ 3036.520767] pgd = d5300000
[ 3036.523486] [b6f1b010] *pgd=9530a831, *pte=4804a303, *ppte=4804aa33
[ 3036.530003] edma 49000000.edma: dma_ccerr_handler: Error interrupt without error event!

./timer.sh: line 62:  2233 Bus error               (core dumped) devmem2 0x4804a010 w 0x8
/dev/mem opened.
Memory mapped at address 0xb6f8d000.[ 3036.560894] Unhandled fault: external abort on non-linefetch (0x1018) at 0xb6f8d038
[ 3036.574340] pgd = d52b0000
[ 3036.577061] [b6f8d038] *pgd=952d4831, *pte=4804a303, *ppte=4804aa33
[ 3036.583556] edma 49000000.edma: dma_ccerr_handler: Error interrupt without error event!

./timer.sh: line 65:  2235 Bus error               (core dumped) devmem2 0x4804a038 w 0x186B
Timer Value 1
/dev/mem opened.
Memory mapped at address 0xb6f97000.[ 3036.615355] Unhandled fault: external abort on non-linefetch (0x1018) at 0xb6f9703c
[ 3036.629573] pgd = d536c000
[ 3036.632292] [b6f9703c] *pgd=95366831, *pte=4804a303, *ppte=4804aa33
[ 3036.638811] edma 49000000.edma: dma_ccerr_handler: Error interrupt without error event!

./timer.sh: line 70:  2237 Bus error               (core dumped) devmem2 0x4804a03C
Timer is Running!


Timer Value 2
/dev/mem opened.
Memory mapped at address 0xb6f67000.[ 3037.683757] Unhandled fault: external abort on non-linefetch (0x1018) at 0xb6f6703c
[ 3037.695746] pgd = d52b0000
[ 3037.698479] [b6f6703c] *pgd=9c533831, *pte=4804a303, *ppte=4804aa33
[ 3037.705103] edma 49000000.edma: dma_ccerr_handler: Error interrupt without error event!

./timer.sh: line 70:  2240 Bus error               (core dumped) devmem2 0x4804a03C
Timer is Running!

and my timer7 pin remains LOW all the time. Please help me out in generating  the PWM signals using timer78737.timer.doc.

Please look into the below Kernel logs for timer,
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000060] OMAP clocksource: timer1 at 24000000 Hz
[    0.249064] clocksource: Switched to clocksource timer1
[    0.267737] omap_timer 4804a000.timer: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/timer7_pins_dee

Below are my device tree changes for timer7,

timer7_pins_default: timer7_pins_default {
                pinctrl-single,pins = <
                        0x168 ( PIN_OUTPUT | MUX_MODE5 ) /* (E18) uart0_ctsn.timer7 */
                >;
 };

&timer7 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&timer7_pins_default>;
};

Please find the attached user space script for reference.

  • Hi Rravikumar,

    Can you go through the below wiki and e2e threads and see if these would be in help?

    processors.wiki.ti.com/.../Linux_Core_CPSW_User's_Guide

    e2e.ti.com/.../571543
    e2e.ti.com/.../534175
    e2e.ti.com/.../359886

    Regards,
    Pavel
  • Hi Pavel,

    Thank you very much for the reply.

    I have been trying all the above links, the user space script is not working for me. I have written a DM timer driver by referring to one of the above links, and I modified my DTS file. Below are the my pin-mux and timer nodes,

    /* timer 7 as on E18 */
    timer7_pins_default: timer7_pins_default {
                    pinctrl-single,pins = <
                            0x168 ( PIN_OUTPUT | MUX_MODE5 | PULL_DISABLE) /* (E18) uart0_ctsn.timer7 */
                    >;
    };
    &timer7 {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&timer7_pins_default>;
    };

    am33xx-test_module_timer {
                    compatible = "test,am33xx-test_module_timer";
                    status = "okay";
                    pinctrl-names = "default";
                    pinctrl-0 = <&timer7_pins_default>;
                    DMtimer = <&timer7>;
                        //reg = <0x4804a000 0x4804afff>;
                        //interrupts = <95>;
                        //ti,hwmods = "timer7";
                        //ti,timer-pwm;
      };

    After compiling and rebuilding the kernel I get the below error in the kernel log,

    root@am335x-evm:~# dmesg | grep timer    
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000045] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000057] OMAP clocksource: timer1 at 24000000 Hz
    [    0.249073] clocksource: Switched to clocksource timer1
    [    0.267731] omap_timer 4804a000.timer: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/timer7_pins_dee
    [    0.289424] test_module_timer: probe of am33xx-test_module_timer failed with error -1

    Also I have attached my timer driver file please refer it, suggest me If anything needs to be added.

    #include <linux/module.h>     /* Needed by all Linux Kernel Modules */
    #include <linux/platform_device.h>    /* Needed to query the plaform configuration for addresses, interrupts,etc */
    #include <linux/kernel.h>     /* Needed for KERN_INFO */
    #include <linux/init.h>           /* Needed for the module_ macros */
    
    /* ARM DM Timer Header */
    #include </opt/processor-sdk-linux-image-am335x-evm-20170514014918/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/arch/arm/plat-omap/include/plat/dmtimer.h>
    
    /* Needed for clk functions */
    #include <linux/clk.h>    
    
    /* Interrupt Header */
    #include <linux/interrupt.h>
    #include <linux/of.h>
    
    #define DRIVER_AUTHOR   "LnT"
    #define DRIVER_DESC "Test DM Timer"     
    #define DRIVER_NAME "test_module_timer"
    
    static struct omap_dm_timer *timer_ptr = NULL;
    
    static int32_t timer_irq;
    static uint32_t timer_rate;
    
    
    static irqreturn_t timer_irq_handler( int irq, void * dev_id)
    {
        int status = 0;
    
        /* Read the current Status */
        status = omap_dm_timer_read_status(timer_ptr);
    
        /* Clear the timer interrupt */
        if (status == OMAP_TIMER_INT_MATCH)
        {
            omap_dm_timer_write_status(timer_ptr,  OMAP_TIMER_INT_MATCH);
        }   
    
        /* Stop the Timer */
        omap_dm_timer_stop(timer_ptr);
    
        /* Indicate the Interrupt was handled */
        return IRQ_HANDLED;
    }
    
    static int test_module_init(struct platform_device *pdev)
    {
        int ret = 1;
        struct clk *timer_clk;  
    
        struct device_node *timer_device_node; 
    	
       /* Attempt to request a timer based on the device node */
       timer_device_node = of_parse_phandle(pdev->dev.of_node, "DMtimer", 0);	
       timer_ptr = omap_dm_timer_request_by_node(timer_device_node);
       if(timer_ptr == NULL){
    	/* no timers available */
    	printk(KERN_INFO "Can't request specified DM Timer\n");
    	return -1;
        }	
    
        /* Set the Clock source to the System Clock */
        ret = omap_dm_timer_set_source(timer_ptr, OMAP_TIMER_SRC_SYS_CLK);
    
        /* Determine what IRQ the timer triggers */
        timer_irq = omap_dm_timer_get_irq(timer_ptr);
    
        /* Setup the IRQ handler */
        ret = request_irq(timer_irq, timer_irq_handler, IRQF_TIMER, DRIVER_NAME, NULL);
    
        /* Setup the timer to trigger the IRQ on the match event */
        omap_dm_timer_set_int_enable(timer_ptr, OMAP_TIMER_INT_MATCH);
        
        /* Get the Clock rate in Hz */
        timer_clk = omap_dm_timer_get_fclk(timer_ptr);
        timer_rate = clk_get_rate(timer_clk);
        
        /* Setup the Output for the Timer pin */
        /* Setup to toggle on the overflow and the compare match event */   
        omap_dm_timer_set_pwm(timer_ptr, 0, 1, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE);
    
        /* Enable the Timer */
        /* Needs to be done before we can write to the counter */
        omap_dm_timer_enable(timer_ptr);
    
        /* Set the initial Count */
        /* According to section 20.1.3.5 Pulse-Width Modulation, an overflow or match be used to toggle when a compare condition occurs*/
        /* Therefore it we will trigger the overflow event almost immediately to ensure our toggle will be generated quickly */
        omap_dm_timer_write_counter(timer_ptr, (0xFFFFFFFF - 5));
    
        /* Setup the Load Register */
        /* Setup as autoload to set the the counter back to 0 on an overflow */
        omap_dm_timer_set_load(timer_ptr, 1, 0);
    
        /* Set the the compare register to 1 second */
        /* This will ensure the signal toggle of 1 second after the overflow event*/
        omap_dm_timer_set_match(timer_ptr, 1, timer_rate);
    
        /* Start the timer */
        ret = omap_dm_timer_start(timer_ptr);
        printk(KERN_INFO "Timer Start ret %d\n", ret);
    
        /* 
        * A non 0 returns means the call to init_modules failed; module can't be loaded
        */
        return 0;
    }
    
    
    static int test_module_exit(struct platform_device *pdev)
    {
        int ret = 1;
    
        /* stop the timer */
        ret = omap_dm_timer_stop(timer_ptr);
        printk(KERN_INFO "Timer Stop ret = %d\n", ret); 
    
        /* Release the IRQ handler */
        free_irq(timer_irq, NULL);
        printk(KERN_INFO "Free IRQ Done\n");    
    
        /* Release the timer */
        ret = omap_dm_timer_free(timer_ptr);
        printk(KERN_INFO "Timer Free ret = %d\n", ret); 
    
        return 0;
    }
    
    
    static const struct of_device_id test_module_timer_of_match[] = {
        { .compatible   = "test,am33xx-test_module_timer" },
        {},
    };
    MODULE_DEVICE_TABLE(of, test_module_timer_of_match);
    
    static struct platform_driver test_module_timer_driver = {
        .driver = {
            .name   = DRIVER_NAME,
            .owner  = THIS_MODULE,
            //.of_match_table = test_module_timer_of_match,
    	.of_match_table = of_match_ptr(test_module_timer_of_match),
        },
        .probe  = test_module_init,
        .remove = test_module_exit,
    };
    
    module_platform_driver(test_module_timer_driver);
    MODULE_LICENSE("GPL");
    MODULE_AUTHOR("LnT");       /* Who wrote this module */
    MODULE_DESCRIPTION("DMT PWM");    /* What is this module */
    

  • Hi Pavel,

    Awaiting for your reply.
  • Hi Pavel,

    From the first link, the below node is mentioned to use timer7 as pwm.
    pwm7: dmtimer-pwm {
    compatible = "ti,omap-dmtimer-pwm";
    ti,timers = <&timer7>;
    #pwm-cells = <3>;
    };

    From the above I did not understand where is "omap-dmtimer-pwm" driver in the SDK?. Blindly I have tried including the above node in my dts. But under /sys/class/pwm nothing got created.
  • Ravikumar G said:
    From the first link, the below node is mentioned to use timer7 as pwm.
    pwm7: dmtimer-pwm {
    compatible = "ti,omap-dmtimer-pwm";
    ti,timers = <&timer7>;
    #pwm-cells = <3>;
    };

    From the above I did not understand where is "omap-dmtimer-pwm" driver in the SDK?. Blindly I have tried including the above node in my dts. But under /sys/class/pwm nothing got created.

    This dmtimer pwm driver is available from PSDK v4.00 onwards (kernel 4.9.28). I would suggest you to switch to the latest PSDK v4.01 (kernel 4.9.41) or at least to PSDK v4.00 to be able to use that driver:

    {PSDK4.x}/board-support/linux-4.9.x/drivers/pwm/pwm-omap-dmtimer.c

    You should enable that driver through the menuconfig (CONFIG_PWM_OMAP_DMTIMER=y) as it is disabled by default in the am335x evm config file:

    {PSDK4.x}/board-support/linux-4.9.x/arch/arm/configs/tisdk_am335x-evm_defconfig

    Regards,
    Pavel

  • Thanks for the reply Pavel.

    I can't use PSDK v4.0, since we have made most of the changes to PSDK v3.3 porting our application will be difficult for us.

    I am able to toggle timer7 pin with one of the drivers given from the above link. But the thing is, I want to control it (change time period) from the user space as I need to control LCD backlight. It will be great if you can help me out to achieve this.
  • #include <linux/module.h>     /* Needed by all Linux Kernel Modules */
    #include <linux/platform_device.h>    /* Needed to query the plaform configuration for addresses, interrupts,etc */
    #include <linux/kernel.h>     /* Needed for KERN_INFO */
    #include <linux/init.h>           /* Needed for the module_ macros */
    
    /* ARM DM Timer Header */
    #include </opt/processor-sdk-linux-image-am335x-evm-20170514014918/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/arch/arm/plat-omap/include/plat/dmtimer.h>
    
    /* Needed for clk functions */
    #include <linux/clk.h>    
    
    /* Interrupt Header */
    #include <linux/interrupt.h>
    #include <linux/of.h>
    
    #define DRIVER_AUTHOR   "LnT"
    #define DRIVER_DESC "Test DM Timer"     
    #define DRIVER_NAME "test_module_timer"
    
    static struct omap_dm_timer *timer_ptr = NULL;
    
    static int32_t timer_irq;
    static uint32_t timer_rate;
    
    
    static irqreturn_t timer_irq_handler( int irq, void * dev_id)
    {
        int status = 0;
    
        /* Read the current Status */
        status = omap_dm_timer_read_status(timer_ptr);
    
        /* Clear the timer interrupt */
        if (status == OMAP_TIMER_INT_MATCH)
        {
            omap_dm_timer_write_status(timer_ptr,  OMAP_TIMER_INT_MATCH);
        }   
    
        /* Stop the Timer */
        /* omap_dm_timer_stop(timer_ptr); */
        omap_dm_timer_start(timer_ptr);
    
        /* Indicate the Interrupt was handled */
        return IRQ_HANDLED;
    }
    
    static int test_module_init(struct platform_device *pdev)
    {
        int ret = 1;
        struct clk *timer_clk;  
    
        struct device_node *timer_device_node; 
    	
       /* Attempt to request a timer based on the device node */
       timer_device_node = of_parse_phandle(pdev->dev.of_node, "DMtimer", 0);	
       timer_ptr = omap_dm_timer_request_by_node(timer_device_node);
       if(timer_ptr == NULL){
    	/* no timers available */
    	printk(KERN_INFO "Can't request specified DM Timer\n");
    	return -1;
        }	
    
        /* Set the Clock source to the System Clock */
        ret = omap_dm_timer_set_source(timer_ptr, OMAP_TIMER_SRC_SYS_CLK);
    
        /* Determine what IRQ the timer triggers */
        timer_irq = omap_dm_timer_get_irq(timer_ptr);
    
        /* Setup the IRQ handler */
        ret = request_irq(timer_irq, timer_irq_handler, IRQF_TIMER, DRIVER_NAME, NULL);
    
        /* Setup the timer to trigger the IRQ on the match event */
        omap_dm_timer_set_int_enable(timer_ptr, OMAP_TIMER_INT_MATCH);
        
        /* Get the Clock rate in Hz */
        timer_clk = omap_dm_timer_get_fclk(timer_ptr);
        timer_rate = clk_get_rate(timer_clk);
        
        /* Setup the Output for the Timer pin */
        /* Setup to toggle on the overflow and the compare match event */   
        omap_dm_timer_set_pwm(timer_ptr, 0, 1, OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE);
    
        /* Enable the Timer */
        /* Needs to be done before we can write to the counter */
        omap_dm_timer_enable(timer_ptr);
    
        /* Set the initial Count */
        /* According to section 20.1.3.5 Pulse-Width Modulation, an overflow or match be used to toggle when a compare condition occurs*/
        /* Therefore it we will trigger the overflow event almost immediately to ensure our toggle will be generated quickly */
        //omap_dm_timer_write_counter(timer_ptr, (0xFFFFFFFF - 5));
        omap_dm_timer_write_counter(timer_ptr, (0xFFFFF000 - 5));
    
        /* Setup the Load Register */
        /* Setup as autoload to set the the counter back to 0 on an overflow */
        omap_dm_timer_set_load(timer_ptr, 1, 0);
    
        /* Set the the compare register to 1 second */
        /* This will ensure the signal toggle of 1 second after the overflow event*/
        omap_dm_timer_set_match(timer_ptr, 1, timer_rate);
    
        /* Start the timer */
        ret = omap_dm_timer_start(timer_ptr);
        printk(KERN_INFO "Timer Start ret %d\n", ret);
    
        /* 
        * A non 0 returns means the call to init_modules failed; module can't be loaded
        */
        return 0;
    }
    
    
    static int test_module_exit(struct platform_device *pdev)
    {
        int ret = 1;
    
        /* stop the timer */
        ret = omap_dm_timer_stop(timer_ptr);
        printk(KERN_INFO "Timer Stop ret = %d\n", ret); 
    
        /* Release the IRQ handler */
        free_irq(timer_irq, NULL);
        printk(KERN_INFO "Free IRQ Done\n");    
    
        /* Release the timer */
        ret = omap_dm_timer_free(timer_ptr);
        printk(KERN_INFO "Timer Free ret = %d\n", ret); 
    
        return 0;
    }
    
    
    static const struct of_device_id test_module_timer_of_match[] = {
        { .compatible   = "test,am33xx-test_module_timer" },
        {},
    };
    
    static struct platform_driver test_module_timer_driver = {
        .driver = {
            .name   = DRIVER_NAME,
            .owner  = THIS_MODULE,
            .of_match_table = test_module_timer_of_match,
        },
        .probe  = test_module_init,
        .remove = test_module_exit,
    };
    
    module_platform_driver(test_module_timer_driver);
    MODULE_LICENSE("GPL");
    MODULE_AUTHOR("LnT");       /* Who wrote this module */
    MODULE_DESCRIPTION("PWM-DMTimer");    /* What is this module */
    
    I have attached the driver file for your reference, my dts node is below.

    am33xx-test_module_timer {

                   compatible = "test,am33xx-test_module_timer";

                   status = "okay";

                   pinctrl-names = "default";

                   pinctrl-0 = <&timer7_pins_default>;

                   DMtimer = <&timer7>;

    };

    Please look into this and suggest how to control this from the user space

  • Ravikumar G said:
    I can't use PSDK v4.0, since we have made most of the changes to PSDK v3.3 porting our application will be difficult for us.

    I am able to toggle timer7 pin with one of the drivers given from the above link. But the thing is, I want to control it (change time period) from the user space as I need to control LCD backlight. It will be great if you can help me out to achieve this.

    You might back port PSDK4 pwm-omap-dmtimer in PSDK v3.3, then use the below user space commands (same as CPSW wiki page) to control the pin:

    enable Timer7 to trigger 1sec periodic pulses on CPTS HW4_TS_PUSH input pin:

        # echo 1000000000 > /sys/class/pwm/pwmchip0/pwm0/period
        # echo 500000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
        # echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
    
  • Hi Pavel,

    I have back ported pwm-omap-dmtimer to SDK3.3. Kernel compiled successfully. In the dmesg output I am getting the below errors,

    root@am335x-evm:~# dmesg | grep dmtimer

    [    0.289089] omap-dmtimer-pwm dmtimer-pwm@7: Missing dmtimer platform data

    [    0.289397] omap-dmtimer-pwm: probe of dmtimer-pwm@7 failed with error -22

     

    And to enable Timer7 to trigger on CPTS HW4_TS_PUSH input pin, I have added "cpts-ext-ts-inputs = <4>;" to my pwm7 node it looks as below,

    pwm7: dmtimer-pwm@7 {
                    //status = "okay";
                    compatible = "ti,omap-dmtimer-pwm";
                    ti,timers = <&timer7>;
                    cpts-ext-ts-inputs = <4>;
    };

    Is this correct? Or I am missing something else?

     

  • Pavel, I want to generate pwm signals on E18 pin (i.e. gpio1_8) for AM3354, ZCZ package. And I have tried configuring this pin using pinmux config, the result is the same.
  • Hi Pavel,

    Awaiting for your reply.
  • Ravikumar G said:
    Pavel, I want to generate pwm signals on E18 pin (i.e. gpio1_8) for AM3354, ZCZ package. And I have tried configuring this pin using pinmux config, the result is the same.

    Regarding TIMER7, this is the correct pin to be used (E18), make sure you configure it in muxmode 5 (timer7), not muxmode7 (gpio1_8).

    Regards,
    Pavel

  • Ravikumar G said:

    And to enable Timer7 to trigger on CPTS HW4_TS_PUSH input pin, I have added "cpts-ext-ts-inputs = <4>;" to my pwm7 node it looks as below,

    pwm7: dmtimer-pwm@7 {
                    //status = "okay";
                    compatible = "ti,omap-dmtimer-pwm";
                    ti,timers = <&timer7>;
                    cpts-ext-ts-inputs = <4>;
    };

    Is this correct? Or I am missing something else?

    No, this does not look correct. HW4_TS_PUSH is part of the Ethernet subsystem, and is used for hardware time stamp. Timer7 PWM output goes out in two directions, one external to timer7 pin output (E18) and one internal to AM335x ethernet subsystem. For more details refer to AM335x TRM:

    ch14 Ethernet Subsystem

    figure 20-3. Timer2-7 Integration

    From what I understand, your goal is to provide Timer7 PWM signal out on the E18 pin. And you do not need Ethernet hardware time stamps. If my understanding is correct, then you do not need cpts-ext-ts-inputs in pwm7 node.

    Ravikumar G said:

    I have back ported pwm-omap-dmtimer to SDK3.3. Kernel compiled successfully. In the dmesg output I am getting the below errors,

    root@am335x-evm:~# dmesg | grep dmtimer

    [    0.289089] omap-dmtimer-pwm dmtimer-pwm@7: Missing dmtimer platform data

    [    0.289397] omap-dmtimer-pwm: probe of dmtimer-pwm@7 failed with error -22

    There is something missing or something wrong in the back port. Do you have a patch? Can you attach your changes (patch) to add (back port) pwm timer support in PSDK3.3?

    Regards,
    Pavel

  • Thanks for the reply Pavel.

    Yes, I have configured it in MODE5 and direction as Output. You can find the attached DTS file.am335x-evm.tar.gz

  • Pavel Botev

    No, this does not look correct. HW4_TS_PUSH is part of the Ethernet subsystem, and is used for hardware time stamp. Timer7 PWM output goes out in two directions, one external to timer7 pin output (E18) and one internal to AM335x ethernet subsystem. For more details refer to AM335x TRM:

    ch14 Ethernet Subsystem

    figure 20-3. Timer2-7 Integration

    I have removed  "cpts-ext-ts-inputs = <4>;"  line from my pwm7 node

    Pavel Botev

    From what I understand, your goal is to provide Timer7 PWM signal out on the E18 pin. And you do not need Ethernet hardware time stamps. If my understanding is correct, then you do not need cpts-ext-ts-inputs in pwm7 node.

    Yes, I want to generate Timer7 PWM signals on E18.

    Pavel Botev

    There is something missing or something wrong in the back port. Do you have a patch? Can you attach your changes (patch) to add (back port) pwm timer support in PSDK3.3?

    Copied  "pwm-omap-dmtimer.c"  file from PSDK 4.1 to "board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/drivers/pwm" folder,  copied  "pwm_omap_dmtimer.h" to "board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/include/linux/platform_data" folder and added below change to makefile,

    diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
    index 69b8275..f7148c3 100644
    --- a/drivers/pwm/Makefile
    +++ b/drivers/pwm/Makefile
    @@ -41,3 +41,4 @@ obj-$(CONFIG_PWM_TIPWMSS)     += pwm-tipwmss.o
     obj-$(CONFIG_PWM_TWL)          += pwm-twl.o
     obj-$(CONFIG_PWM_TWL_LED)      += pwm-twl-led.o
     obj-$(CONFIG_PWM_VT8500)       += pwm-vt8500.o
    +obj-$(CONFIG_OMAP_DM_TIMER)    += pwm-omap-dmtimer.o

    These are the changes done.

  • Ravikumar G said:
    Yes, I have configured it in MODE5 and direction as Output. You can find the attached DTS file.(Please visit the site to view this file)

    I have review your DTS file. I see some errors. Let me first clarify that we have PWM feature in several AM335x modules/subsystems: Timers, eCAPs, eHRPWMs, PRU-ICSS. eCAPs and eHRPWMs belongs to PWMSS. 

    By default, in PSDK3.3 DTS file for AM335x TI EVM, we use pin eCAP0_in_PWM0_out to generate PWM output signal, which is used for LCD LED backlight control (brightness):

    &epwmss0 {
        status = "okay";

        ecap0: ecap@48300100 {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&ecap0_pins>;
        };
    };

    lcd_bl: backlight {
            compatible = "pwm-backlight";
            pwms = <&ecap0 0 50000 0>;
            brightness-levels = <0 51 53 56 62 75 101 152 255>;
            default-brightness-level = <8>;
        };

    panel {
            compatible = "ti,tilcdc,panel";
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&lcd_pins_s0>;
            backlight = <&lcd_bl>;
            panel-info {
                ac-bias           = <255>;
                ac-bias-intrpt    = <0>;
                dma-burst-sz      = <16>;
                bpp               = <32>;
                fdd               = <0x80>;
                sync-edge         = <0>;
                sync-ctrl         = <1>;
                raster-order      = <0>;
                fifo-th           = <0>;
            };

    ecap0_pins: backlight_pins {
            pinctrl-single,pins = <
                AM33XX_IOPAD(0x964, MUX_MODE0)    /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out */
            >;
        };

    See also the below wiki pages, which explains LCD backlight pwm control:

    http://processors.wiki.ti.com/index.php/Linux_Core_PWM_User's_Guide

     

    http://processors.wiki.ti.com/index.php/AM335x_PWM_Driver's_Guide

     

     

    Regarding your custom board, do you want to change your LCD LED backlight/brightness control from eCAP0_in_PWM0_out PWM output pin to timer7 PWM output pin? Do you have physical connection of pin E18 (timer7 pwm out) to LCD LED backlight control input pin?

    You should not mix timer7 pwm output and ecap0 pwm output:

    &epwmss0 {
        status = "okay";
        
        #if 0
        ecap0: ecap@48300100 {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&ecap0_pins>;
        };
        
        pwm7: dmtimer-pwm@7 {
            status = "okay";
                compatible = "ti,omap-dmtimer-pwm";
                ti,timers = <&timer7>;
                #pwm-cells = <3>;
                pinctrl-names = "default";
                pinctrl-0 = <&timer7_pins_default>;
        };
        #endif
    };

     

    For more info how LCD backlight is controlled from eCAP pwm output on AM335x EVM and StarterKit in PSDK3.3, you can refer to EVM/StarterKit HW user guides, schematics and DTS files (am335x-evm.dts, am335x-evmsk.dts)

    Regards,
    Pavel

  • Hi Pavel,

    On my custom board pin E18 is physically connected to the LCD backlight light control. In our case, we are using AM3354 ZCZ package and  the pin E18 cannot be configured in eCAP0_in_PWM0_out mode but it can be configured to timer7, so my aim was to generate PWM signals on this pin.

    As we should not mix timer7 output and ecap0 pwm output, I will try with disabling the &epwmss0  node from my DTS.

    Please find the attached LCD schematics here7230.PWM_Backlight_schema.pdf

  • Hi avel,

    I have tried disabling &epwmss0 node from my dts file, error remains the same. Please find below dmesg output.

    root@am335x-evm:~# dmesg | grep timer
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000047] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.000060] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.249721] clocksource: Switched to clocksource timer1
    [ 0.268324] omap_timer 4804a000.timer: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/timer7_pins_dee
    [ 0.289654] omap-dmtimer-pwm dmtimer-pwm@7: Missing dmtimer platform data
    [ 0.289692] omap-dmtimer-pwm: probe of dmtimer-pwm@7 failed with error -22
  • Ravikumar G said:
    I have tried disabling &epwmss0 node from my dts file, error remains the same.

    Please attach your latest DTS file for review.


    Regards,
    Pavel

  • Ravikumar G said:

    Copied  "pwm-omap-dmtimer.c"  file from PSDK 4.1 to "board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/drivers/pwm" folder,  copied  "pwm_omap_dmtimer.h" to "board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/include/linux/platform_data" folder and added below change to makefile,

    diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
    index 69b8275..f7148c3 100644
    --- a/drivers/pwm/Makefile
    +++ b/drivers/pwm/Makefile
    @@ -41,3 +41,4 @@ obj-$(CONFIG_PWM_TIPWMSS)     += pwm-tipwmss.o
     obj-$(CONFIG_PWM_TWL)          += pwm-twl.o
     obj-$(CONFIG_PWM_TWL_LED)      += pwm-twl-led.o
     obj-$(CONFIG_PWM_VT8500)       += pwm-vt8500.o
    +obj-$(CONFIG_OMAP_DM_TIMER)    += pwm-omap-dmtimer.o

    Should be drivers/pwm/Makefile - obj-$(CONFIG_PWM_OMAP_DMTIMER)    += pwm-omap-dmtimer.o

    Regarding dmtimer-pwm, we also have code in below PSDK4.1 files:

    drivers/pwm/Kconfig - config PWM_OMAP_DMTIMER

    arch/arm/configs/tisdk_am335x-evm_defconfig - # CONFIG_PWM_OMAP_DMTIMER is not set

    You should enable PWM_OMAP_DMTIMER driver through the menuconfig feature

    You should also add pwm_omap_dmtimer, omap-dmtimer-pwm in below file:

    arch/arm/mach-omap2/pdata-quirks.c

    Regards,
    Pavel

  • Hi Pavel,

    Sorry for the delayed reply.

    Pavel Botev,

    Should be drivers/pwm/Makefile - obj-$(CONFIG_PWM_OMAP_DMTIMER)    += pwm-omap-dmtimer.o

    In my SDK 3.3, pwm-omap-dmtimer.c doesn't compile if I include the above line, whereas it compiles successfully with CONFIG_OMAP_DM_TIMER.

     

    Pavel Botev,

    arch/arm/configs/tisdk_am335x-evm_defconfig - # CONFIG_PWM_OMAP_DMTIMER is not set

    You should enable PWM_OMAP_DMTIMER driver through the menuconfig feature

    In my case, through menuconfig I don't see PWM_OMAP_DMTIMER option (you can refer the below screen shot)


     

    But still I have already unset in the arch/arm/configs/tisdk_am335x-evm_defconfig file.

     

    Pavel Botev,

    You should also add pwm_omap_dmtimer, omap-dmtimer-pwm in below file:

    arch/arm/mach-omap2/pdata-quirks.c

    In my PSDK_3.3 I don't find the file arch/arm/mach-omap2/pdata-quirks.c file. Copying this file from PSDK4.1 to PSDK3.3 without any modifications suffice?

     

    And also please find the attached updated DTS file.am335x_dts.tar

     

  • Ravikumar G said:

    Pavel Botev,

    Should be drivers/pwm/Makefile - obj-$(CONFIG_PWM_OMAP_DMTIMER)    += pwm-omap-dmtimer.o

    In my SDK 3.3, pwm-omap-dmtimer.c doesn't compile if I include the above line, whereas it compiles successfully with CONFIG_OMAP_DM_TIMER.

    This is not correct, you can not use OMAP_DM_TIMER in pwm Makefile.

    PWM_OMAP_DMTIMER and OMAP_DM_TIMER are two different drivers, and are using in two different Makefiles.

    PWM_OMAP_DMTIMER:

    linux-kernel/drivers/pwm/pwm-omap-dmtimer.c

    linux-kernel/drivers/pwm/Makefile   obj-$(CONFIG_PWM_OMAP_DMTIMER)    += pwm-omap-dmtimer.o

    linux-kernel/arch/arm/configs/tisdk_am335x-evm_defconfig    CONFIG_PWM_OMAP_DMTIMER

    OMAP_DM_TIMER:

    linux-kernel/arch/arm/plat-omap/dmtimer.c

    linux-kernel/arch/arm/plat-omap/Makefile    obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o

    linux-kernel/arch/arm/configs/tisdk_am335x-evm_defconfig   CONFIG_OMAP_DM_TIMER

    Ravikumar G said:

    Pavel Botev,

    arch/arm/configs/tisdk_am335x-evm_defconfig - # CONFIG_PWM_OMAP_DMTIMER is not set

    You should enable PWM_OMAP_DMTIMER driver through the menuconfig feature

    In my case, through menuconfig I don't see PWM_OMAP_DMTIMER option (you can refer the below screen shot)

    Once you port it successful, you will be able to see it.

    Ravikumar G said:

    Pavel Botev,

    You should also add pwm_omap_dmtimer, omap-dmtimer-pwm in below file:

    arch/arm/mach-omap2/pdata-quirks.c

    In my PSDK_3.3 I don't find the file arch/arm/mach-omap2/pdata-quirks.c file. Copying this file from PSDK4.1 to PSDK3.3 without any modifications suffice?

    I am not sure, you might try. You are porting from 4.9 to 4.4 kernel, thus additional things might be needed.

  • Ravikumar G said:

    Pavel Botev,

    You should also add pwm_omap_dmtimer, omap-dmtimer-pwm in below file:

    arch/arm/mach-omap2/pdata-quirks.c

    In my PSDK_3.3 I don't find the file arch/arm/mach-omap2/pdata-quirks.c file. Copying this file from PSDK4.1 to PSDK3.3 without any modifications suffice?

    I have found this pdata-quirks.c file in mine installation of PSDK3.3:

    ti-processor-sdk-linux-am335x-evm-03.03.00.04/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/arch/arm/mach-omap2/pdata-quirks.c

    Can you check again?

  • Ravikumar G said:
    And also please find the attached updated DTS file.(Please visit the site to view this file)

    You are missing pwm-cells entry from the pwm7 node. This entry is a must, not optional, see below doc:

    linux-kernel/Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt

    lcd_bl: backlight node does not looks correct also. Refer to below files for examples of LCD backlight through timer pwm:

    linux-kernel/arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts

    linux-kernel/arch/arm/boot/dts/omap3-gta04.dtsi

    linux-kernel/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
    linux-kernel/Documentation/devicetree/bindings/pwm/pwm.txt

  • Hi Pavel,

    Pavel Botev,

    ti-processor-sdk-linux-am335x-evm-03.03.00.04/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/arch/arm/mach-omap2/pdata-quirks.c

    Can you check again?

    I found the file and added pwm-omap-dmtimer and omap-dmtm. After compiling I got compilation errors. Please find the attached logs.

    arch/arm/mach-omap2/pdata-quirks.c:656:28: error: 'omap_dm_timer_request_by_node' undeclared here (not in a function)
             .request_by_node = omap_dm_timer_request_by_node,
                                ^
    arch/arm/mach-omap2/pdata-quirks.c:657:29: error: 'omap_dm_timer_request_specific' undeclared here (not in a function)
             .request_specific = omap_dm_timer_request_specific,
                                 ^
    arch/arm/mach-omap2/pdata-quirks.c:658:20: error: 'omap_dm_timer_request' undeclared here (not in a function)
             .request = omap_dm_timer_request,
                        ^
    arch/arm/mach-omap2/pdata-quirks.c:659:23: error: 'omap_dm_timer_set_source' undeclared here (not in a function)
             .set_source = omap_dm_timer_set_source,
                           ^
    arch/arm/mach-omap2/pdata-quirks.c:660:20: error: 'omap_dm_timer_get_irq' undeclared here (not in a function)
             .get_irq = omap_dm_timer_get_irq,
                        ^
    arch/arm/mach-omap2/pdata-quirks.c:661:27: error: 'omap_dm_timer_set_int_enable' undeclared here (not in a function)
             .set_int_enable = omap_dm_timer_set_int_enable,
                               ^
    arch/arm/mach-omap2/pdata-quirks.c:662:28: error: 'omap_dm_timer_set_int_disable' undeclared here (not in a function)
             .set_int_disable = omap_dm_timer_set_int_disable,
                                ^
    arch/arm/mach-omap2/pdata-quirks.c:663:17: error: 'omap_dm_timer_free' undeclared here (not in a function)
             .free = omap_dm_timer_free,
                     ^
    arch/arm/mach-omap2/pdata-quirks.c:664:19: error: 'omap_dm_timer_enable' undeclared here (not in a function)
             .enable = omap_dm_timer_enable,
                       ^
    arch/arm/mach-omap2/pdata-quirks.c:665:20: error: 'omap_dm_timer_disable' undeclared here (not in a function)
             .disable = omap_dm_timer_disable,
                        ^
    arch/arm/mach-omap2/pdata-quirks.c:666:21: error: 'omap_dm_timer_get_fclk' undeclared here (not in a function)
             .get_fclk = omap_dm_timer_get_fclk,
                         ^
    arch/arm/mach-omap2/pdata-quirks.c:667:18: error: 'omap_dm_timer_start' undeclared here (not in a function)
             .start = omap_dm_timer_start,
                      ^
    arch/arm/mach-omap2/pdata-quirks.c:668:17: error: 'omap_dm_timer_stop' undeclared here (not in a function)
             .stop = omap_dm_timer_stop,
                     ^
    arch/arm/mach-omap2/pdata-quirks.c:669:21: error: 'omap_dm_timer_set_load' undeclared here (not in a function)
             .set_load = omap_dm_timer_set_load,
                         ^
    arch/arm/mach-omap2/pdata-quirks.c:670:22: error: 'omap_dm_timer_set_match' undeclared here (not in a function)
             .set_match = omap_dm_timer_set_match,
                          ^
    arch/arm/mach-omap2/pdata-quirks.c:671:20: error: 'omap_dm_timer_set_pwm' undeclared here (not in a function)
             .set_pwm = omap_dm_timer_set_pwm,
                        ^
    arch/arm/mach-omap2/pdata-quirks.c:672:26: error: 'omap_dm_timer_set_prescaler' undeclared here (not in a function)
             .set_prescaler = omap_dm_timer_set_prescaler,
                              ^
    arch/arm/mach-omap2/pdata-quirks.c:673:25: error: 'omap_dm_timer_read_counter' undeclared here (not in a function)
             .read_counter = omap_dm_timer_read_counter,
                             ^
    arch/arm/mach-omap2/pdata-quirks.c:674:26: error: 'omap_dm_timer_write_counter' undeclared here (not in a function)
             .write_counter = omap_dm_timer_write_counter,
                              ^
    arch/arm/mach-omap2/pdata-quirks.c:675:24: error: 'omap_dm_timer_read_status' undeclared here (not in a function)
             .read_status = omap_dm_timer_read_status,
                            ^
    arch/arm/mach-omap2/pdata-quirks.c:676:25: error: 'omap_dm_timer_write_status' undeclared here (not in a function)
             .write_status = omap_dm_timer_write_status,
                             ^
    In file included from arch/arm/mach-omap2/pdata-quirks.c:15:0:
    include/linux/of_platform.h:51:2: error: expected identifier or '(' before '{' token
      { .compatible = _compat, .phys_addr = _phys, .name = _name, \
      ^
    arch/arm/mach-omap2/pdata-quirks.c:681:9: note: in expansion of macro 'OF_DEV_AUXDATA'
             OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
             ^
    arch/arm/mach-omap2/pdata-quirks.c:681:75: error: expected identifier or '(' before ',' token
             OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
                                                                               ^
    arch/arm/mach-omap2/pdata-quirks.c: In function 'pdata_quirks_init':
    arch/arm/mach-omap2/pdata-quirks.c:707:2: error: implicit declaration of function 'pdata_quirks_check' [-Werror=implicit-function-declaration]
    
    

  • Ravikumar G said:
    I found the file and added pwm-omap-dmtimer and omap-dmtm. After compiling I got compilation errors. Please find the attached logs.

    Seems like a header file is missing. Can you attach your arch/arm/mach-omap2/pdata-quirks.c for review?

    Regards,
    Pavel

  • Hi Pavel,

    Please find the attached pdata-quirks.c file

    /*
     * Legacy platform_data quirks
     *
     * Copyright (C) 2013 Texas Instruments
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    #include <linux/clk.h>
    #include <linux/davinci_emac.h>
    #include <linux/gpio.h>
    #include <linux/init.h>
    #include <linux/kernel.h>
    #include <linux/of_platform.h>
    #include <linux/ti_wilink_st.h>
    #include <linux/wl12xx.h>
    #include <linux/mmc/card.h>
    #include <linux/mmc/host.h>
    #include <linux/regulator/machine.h>
    #include <linux/regulator/fixed.h>
    
    #include <linux/platform_data/hsmmc-omap.h>
    #include <linux/platform_data/pinctrl-single.h>
    #include <linux/platform_data/iommu-omap.h>
    #include <linux/platform_data/remoteproc-omap.h>
    #include <linux/platform_data/wkup_m3.h>
    #include </opt/processor-sdk-linux-image-am335x-evm-20170514014918/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/include/linux/platform_data/pwm_omap_dmtimer.h> //---added by ravikumar
    #include <linux/platform_data/remoteproc-pruss.h>
    #include <linux/platform_data/sgx-omap.h>
    
    #include "common.h"
    #include "common-board-devices.h"
    #include "dss-common.h"
    #include "control.h"
    #include "omap_device.h"
    #include "omap-secure.h"
    #include "soc.h"
    #include "hsmmc.h"
    #include "remoteproc.h"
    
    struct pdata_init {
    	const char *compatible;
    	void (*fn)(void);
    };
    
    static struct of_dev_auxdata omap_auxdata_lookup[];
    static struct twl4030_gpio_platform_data twl_gpio_auxdata;
    
    #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
    static struct gfx_sgx_platform_data sgx_pdata = {
    	.reset_name = "gfx",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    };
    #endif
    
    #if IS_ENABLED(CONFIG_OMAP_IOMMU)
    int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
    				    u8 *pwrst);
    #else
    static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev,
    						  bool request, u8 *pwrst)
    {
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_MACH_NOKIA_N8X0
    static void __init omap2420_n8x0_legacy_init(void)
    {
    	omap_auxdata_lookup[0].platform_data = n8x0_legacy_init();
    }
    #else
    #define omap2420_n8x0_legacy_init	NULL
    #endif
    
    #ifdef CONFIG_ARCH_OMAP3
    /*
     * Configures GPIOs 126, 127 and 129 to 1.8V mode instead of 3.0V
     * mode for MMC1 in case bootloader did not configure things.
     * Note that if the pins are used for MMC1, pbias-regulator
     * manages the IO voltage.
     */
    static void __init omap3_gpio126_127_129(void)
    {
    	u32 reg;
    
    	reg = omap_ctrl_readl(OMAP343X_CONTROL_PBIAS_LITE);
    	reg &= ~OMAP343X_PBIASLITEVMODE1;
    	reg |= OMAP343X_PBIASLITEPWRDNZ1;
    	omap_ctrl_writel(reg, OMAP343X_CONTROL_PBIAS_LITE);
    	if (cpu_is_omap3630()) {
    		reg = omap_ctrl_readl(OMAP34XX_CONTROL_WKUP_CTRL);
    		reg |= OMAP36XX_GPIO_IO_PWRDNZ;
    		omap_ctrl_writel(reg, OMAP34XX_CONTROL_WKUP_CTRL);
    	}
    }
    
    static void __init hsmmc2_internal_input_clk(void)
    {
    	u32 reg;
    
    	reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
    	reg |= OMAP2_MMCSDIO2ADPCLKISEL;
    	omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
    }
    
    static struct iommu_platform_data omap3_iommu_pdata = {
    	.reset_name = "mmu",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    
    static struct iommu_platform_data omap3_iommu_isp_pdata = {
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    
    static int omap3_sbc_t3730_twl_callback(struct device *dev,
    					   unsigned gpio,
    					   unsigned ngpio)
    {
    	int res;
    
    	res = gpio_request_one(gpio + 2, GPIOF_OUT_INIT_HIGH,
    			       "wlan pwr");
    	if (res)
    		return res;
    
    	gpio_export(gpio, 0);
    
    	return 0;
    }
    
    static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
    {
    	int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name);
    
    	if (err) {
    		pr_err("SBC-T3x: %s reset gpio request failed: %d\n",
    			hub_name, err);
    		return;
    	}
    
    	gpio_export(gpio, 0);
    
    	udelay(10);
    	gpio_set_value(gpio, 1);
    	msleep(1);
    }
    
    static void __init omap3_sbc_t3730_twl_init(void)
    {
    	twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback;
    }
    
    static void __init omap3_sbc_t3730_legacy_init(void)
    {
    	omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
    }
    
    static void __init omap3_sbc_t3530_legacy_init(void)
    {
    	omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
    }
    
    static struct ti_st_plat_data wilink_pdata = {
    	.nshutdown_gpio = 137,
    	.dev_name = "/dev/ttyO1",
    	.flow_cntrl = 1,
    	.baud_rate = 300000,
    };
    
    static struct platform_device wl18xx_device = {
    	.name	= "kim",
    	.id	= -1,
    	.dev	= {
    		.platform_data = &wilink_pdata,
    	}
    };
    
    static struct platform_device btwilink_device = {
    	.name	= "btwilink",
    	.id	= -1,
    };
    
    static void __init omap3_igep0020_rev_f_legacy_init(void)
    {
    	platform_device_register(&wl18xx_device);
    	platform_device_register(&btwilink_device);
    }
    
    static void __init omap3_igep0030_rev_g_legacy_init(void)
    {
    	platform_device_register(&wl18xx_device);
    	platform_device_register(&btwilink_device);
    }
    
    static void __init omap3_evm_legacy_init(void)
    {
    	hsmmc2_internal_input_clk();
    }
    
    static void am35xx_enable_emac_int(void)
    {
    	u32 v;
    
    	v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
    	v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
    	      AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
    	omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
    	omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
    }
    
    static void am35xx_disable_emac_int(void)
    {
    	u32 v;
    
    	v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
    	v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
    	omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
    	omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
    }
    
    static struct emac_platform_data am35xx_emac_pdata = {
    	.interrupt_enable	= am35xx_enable_emac_int,
    	.interrupt_disable	= am35xx_disable_emac_int,
    };
    
    static void __init am35xx_emac_reset(void)
    {
    	u32 v;
    
    	v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
    	v &= ~AM35XX_CPGMACSS_SW_RST;
    	omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
    	omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
    }
    
    static struct gpio cm_t3517_wlan_gpios[] __initdata = {
    	{ 56,	GPIOF_OUT_INIT_HIGH,	"wlan pwr" },
    	{ 4,	GPIOF_OUT_INIT_HIGH,	"xcvr noe" },
    };
    
    static void __init omap3_sbc_t3517_wifi_init(void)
    {
    	int err = gpio_request_array(cm_t3517_wlan_gpios,
    				ARRAY_SIZE(cm_t3517_wlan_gpios));
    	if (err) {
    		pr_err("SBC-T3517: wl12xx gpios request failed: %d\n", err);
    		return;
    	}
    
    	gpio_export(cm_t3517_wlan_gpios[0].gpio, 0);
    	gpio_export(cm_t3517_wlan_gpios[1].gpio, 0);
    
    	msleep(100);
    	gpio_set_value(cm_t3517_wlan_gpios[1].gpio, 0);
    }
    
    static void __init omap3_sbc_t3517_legacy_init(void)
    {
    	omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub");
    	omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub");
    	am35xx_emac_reset();
    	hsmmc2_internal_input_clk();
    	omap3_sbc_t3517_wifi_init();
    }
    
    static void __init am3517_evm_legacy_init(void)
    {
    	am35xx_emac_reset();
    }
    
    static struct platform_device omap3_rom_rng_device = {
    	.name		= "omap3-rom-rng",
    	.id		= -1,
    	.dev	= {
    		.platform_data	= rx51_secure_rng_call,
    	},
    };
    
    static void __init nokia_n900_legacy_init(void)
    {
    	hsmmc2_internal_input_clk();
    
    	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
    		if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
    			pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
    			/* set IBE to 1 */
    			rx51_secure_update_aux_cr(BIT(6), 0);
    		} else {
    			pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n");
    			pr_warn("Thumb binaries may crash randomly without this workaround\n");
    		}
    
    		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
    		platform_device_register(&omap3_rom_rng_device);
    
    	}
    }
    
    static void __init omap3_tao3530_legacy_init(void)
    {
    	hsmmc2_internal_input_clk();
    }
    
    /* omap3pandora legacy devices */
    #define PANDORA_WIFI_IRQ_GPIO		21
    #define PANDORA_WIFI_NRESET_GPIO	23
    
    static struct platform_device pandora_backlight = {
    	.name	= "pandora-backlight",
    	.id	= -1,
    };
    
    static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
    	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
    };
    
    static struct regulator_init_data pandora_vmmc3 = {
    	.constraints = {
    		.valid_ops_mask		= REGULATOR_CHANGE_STATUS,
    	},
    	.num_consumer_supplies	= ARRAY_SIZE(pandora_vmmc3_supply),
    	.consumer_supplies	= pandora_vmmc3_supply,
    };
    
    static struct fixed_voltage_config pandora_vwlan = {
    	.supply_name		= "vwlan",
    	.microvolts		= 1800000, /* 1.8V */
    	.gpio			= PANDORA_WIFI_NRESET_GPIO,
    	.startup_delay		= 50000, /* 50ms */
    	.enable_high		= 1,
    	.init_data		= &pandora_vmmc3,
    };
    
    static struct platform_device pandora_vwlan_device = {
    	.name		= "reg-fixed-voltage",
    	.id		= 1,
    	.dev = {
    		.platform_data = &pandora_vwlan,
    	},
    };
    
    static void pandora_wl1251_init_card(struct mmc_card *card)
    {
    	/*
    	 * We have TI wl1251 attached to MMC3. Pass this information to
    	 * SDIO core because it can't be probed by normal methods.
    	 */
    	if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) {
    		card->quirks |= MMC_QUIRK_NONSTD_SDIO;
    		card->cccr.wide_bus = 1;
    		card->cis.vendor = 0x104c;
    		card->cis.device = 0x9066;
    		card->cis.blksize = 512;
    		card->cis.max_dtr = 24000000;
    		card->ocr = 0x80;
    	}
    }
    
    static struct omap2_hsmmc_info pandora_mmc3[] = {
    	{
    		.mmc		= 3,
    		.caps		= MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
    		.gpio_cd	= -EINVAL,
    		.gpio_wp	= -EINVAL,
    		.init_card	= pandora_wl1251_init_card,
    	},
    	{}	/* Terminator */
    };
    
    static void __init pandora_wl1251_init(void)
    {
    	struct wl1251_platform_data pandora_wl1251_pdata;
    	int ret;
    
    	memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
    
    	pandora_wl1251_pdata.power_gpio = -1;
    
    	ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq");
    	if (ret < 0)
    		goto fail;
    
    	pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
    	if (pandora_wl1251_pdata.irq < 0)
    		goto fail_irq;
    
    	pandora_wl1251_pdata.use_eeprom = true;
    	ret = wl1251_set_platform_data(&pandora_wl1251_pdata);
    	if (ret < 0)
    		goto fail_irq;
    
    	return;
    
    fail_irq:
    	gpio_free(PANDORA_WIFI_IRQ_GPIO);
    fail:
    	pr_err("wl1251 board initialisation failed\n");
    }
    
    static void __init omap3_pandora_legacy_init(void)
    {
    	platform_device_register(&pandora_backlight);
    	platform_device_register(&pandora_vwlan_device);
    	omap_hsmmc_init(pandora_mmc3);
    	omap_hsmmc_late_init(pandora_mmc3);
    	pandora_wl1251_init();
    }
    #endif /* CONFIG_ARCH_OMAP3 */
    
    #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
    	defined(CONFIG_SOC_DRA7XX)
    static struct omap_rproc_timer_ops omap_rproc_dmtimer_ops = {
    	.request_timer = omap_rproc_request_timer,
    	.release_timer = omap_rproc_release_timer,
    	.start_timer = omap_rproc_start_timer,
    	.stop_timer = omap_rproc_stop_timer,
    	.get_timer_irq = omap_rproc_get_timer_irq,
    	.ack_timer_irq = omap_rproc_ack_timer_irq,
    };
    
    static struct omap_rproc_pdata omap4_ipu_dsp_pdata = {
    	.device_enable = omap_rproc_device_enable,
    	.device_shutdown = omap_rproc_device_shutdown,
    	.timer_ops = &omap_rproc_dmtimer_ops,
    };
    
    static struct iommu_platform_data omap4_iommu_pdata = {
    	.reset_name = "mmu_cache",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    #endif
    
    #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
    static struct wkup_m3_platform_data wkup_m3_data = {
    	.reset_name = "wkup_m3",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    };
    
    static struct pruss_platform_data pruss_pdata = {
    	.reset_name = "pruss",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    };
    #endif
    
    #ifdef CONFIG_SOC_OMAP5
    static void __init omap5_uevm_legacy_init(void)
    {
    }
    #endif
    
    #ifdef CONFIG_SOC_DRA7XX
    static struct iommu_platform_data dra7_ipu1_dsp_iommu_pdata = {
    	.reset_name = "mmu_cache",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    	.set_pwrdm_constraint = omap_iommu_set_pwrdm_constraint,
    };
    
    static struct iommu_platform_data dra7_dsp_mmu_edma_pdata = {
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    
    static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1;
    static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2;
    static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3;
    
    static void __init dra7x_evm_mmc_quirk(void)
    {
    	if (omap_rev() == DRA752_REV_ES1_1 || omap_rev() == DRA752_REV_ES1_0) {
    		dra7_hsmmc_data_mmc1.version = "rev11";
    		dra7_hsmmc_data_mmc1.max_freq = 96000000;
    
    		dra7_hsmmc_data_mmc2.version = "rev11";
    		dra7_hsmmc_data_mmc2.max_freq = 48000000;
    
    		dra7_hsmmc_data_mmc3.version = "rev11";
    		dra7_hsmmc_data_mmc3.max_freq = 48000000;
    	}
    }
    #endif
    
    static struct pcs_pdata pcs_pdata;
    
    void omap_pcs_legacy_init(int irq, void (*rearm)(void))
    {
    	pcs_pdata.irq = irq;
    	pcs_pdata.rearm = rearm;
    }
    
    /*
     * GPIOs for TWL are initialized by the I2C bus and need custom
     * handing until DSS has device tree bindings.
     */
    void omap_auxdata_legacy_init(struct device *dev)
    {
    	if (dev->platform_data)
    		return;
    
    	if (strcmp("twl4030-gpio", dev_name(dev)))
    		return;
    
    	dev->platform_data = &twl_gpio_auxdata;
    }
    
    /*
     * Few boards still need auxdata populated before we populate
     * the dev entries in of_platform_populate().
     */
    static struct pdata_init auxdata_quirks[] __initdata = {
    #ifdef CONFIG_SOC_OMAP2420
    	{ "nokia,n800", omap2420_n8x0_legacy_init, },
    	{ "nokia,n810", omap2420_n8x0_legacy_init, },
    	{ "nokia,n810-wimax", omap2420_n8x0_legacy_init, },
    #endif
    #ifdef CONFIG_ARCH_OMAP3
    	{ "compulab,omap3-sbc-t3730", omap3_sbc_t3730_twl_init, },
    #endif
    	{ /* sentinel */ },
    };
    
    static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
    #ifdef CONFIG_MACH_NOKIA_N8X0
    	OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL),
    	OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data),
    	OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data),
    #endif
    #ifdef CONFIG_ARCH_OMAP3
    	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
    		       &omap3_iommu_pdata),
    	OF_DEV_AUXDATA("ti,omap2-iommu", 0x480bd400, "480bd400.mmu",
    		       &omap3_iommu_isp_pdata),
    	/* Only on am3517 */
    	OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
    	OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",
    		       &am35xx_emac_pdata),
    #endif
    #ifdef CONFIG_SOC_AM33XX
    	OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
    		       &wkup_m3_data),
    	OF_DEV_AUXDATA("ti,am3352-pruss", 0x4a300000, "4a300000.pruss",
    		       &pruss_pdata),
    	OF_DEV_AUXDATA("ti,am3352-sgx530", 0x56000000, "56000000.sgx",
    		       &sgx_pdata),
    #endif
    #ifdef CONFIG_ARCH_OMAP4
    	OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap4-dsp", 0, "dsp", &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,omap4-ipu", 0x55020000, "ipu", &omap4_ipu_dsp_pdata),
    #endif
    #ifdef CONFIG_SOC_OMAP5
    	OF_DEV_AUXDATA("ti,omap5-padconf", 0x4a002840, "4a002840.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap5-padconf", 0x4ae0c840, "4ae0c840.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap5-dsp", 0, "dsp", &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,omap5-ipu", 0x55020000, "ipu", &omap4_ipu_dsp_pdata),
    #endif
    #ifdef CONFIG_SOC_DRA7XX
    	OF_DEV_AUXDATA("ti,dra7-padconf", 0x4a003400, "4a003400.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x40d01000, "40d01000.mmu",
    		       &dra7_ipu1_dsp_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x41501000, "41501000.mmu",
    		       &dra7_ipu1_dsp_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x40d02000, "40d02000.mmu",
    		       &dra7_dsp_mmu_edma_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x41502000, "41502000.mmu",
    		       &dra7_dsp_mmu_edma_pdata),
    	OF_DEV_AUXDATA("ti,dra7-iommu", 0x55082000, "55082000.mmu",
    		       &omap4_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-iommu", 0x58882000, "58882000.mmu",
    		       &dra7_ipu1_dsp_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-ipu", 0x55020000, "55020000.ipu",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-ipu", 0x58820000, "58820000.ipu",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp", 0x40800000, "40800000.dsp",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp", 0x41000000, "41000000.dsp",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x4809c000, "4809c000.mmc",
    		       &dra7_hsmmc_data_mmc1),
    	OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480b4000, "480b4000.mmc",
    		       &dra7_hsmmc_data_mmc2),
    	OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc",
    		       &dra7_hsmmc_data_mmc3),
    #endif
    #ifdef CONFIG_SOC_AM43XX
    	OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
    		       &wkup_m3_data),
    	OF_DEV_AUXDATA("ti,am4372-pruss-wrapper", 0x54426000,
    		       "54426000.pruss_wrapper", &pruss_pdata),
    	OF_DEV_AUXDATA("ti,am4376-sgx530", 0x56000000, "56000000.sgx",
    		       &sgx_pdata),
    #endif
    #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
    	OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
    		       &omap4_iommu_pdata),
    	OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
    		       &omap4_iommu_pdata),
    #endif
    	{ /* sentinel */ },
    };
    
    /*
     * Few boards still need to initialize some legacy devices with
     * platform data until the drivers support device tree.
     */
    static struct pdata_init pdata_quirks[] __initdata = {
    #ifdef CONFIG_ARCH_OMAP3
    	{ "compulab,omap3-sbc-t3517", omap3_sbc_t3517_legacy_init, },
    	{ "compulab,omap3-sbc-t3530", omap3_sbc_t3530_legacy_init, },
    	{ "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, },
    	{ "nokia,omap3-n900", nokia_n900_legacy_init, },
    	{ "nokia,omap3-n9", hsmmc2_internal_input_clk, },
    	{ "nokia,omap3-n950", hsmmc2_internal_input_clk, },
    	{ "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
    	{ "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
    	{ "logicpd,dm3730-torpedo-devkit", omap3_gpio126_127_129, },
    	{ "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
    	{ "ti,am3517-evm", am3517_evm_legacy_init, },
    	{ "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
    	{ "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
    	{ "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
    #endif
    #ifdef CONFIG_SOC_OMAP5
    	{ "ti,omap5-uevm", omap5_uevm_legacy_init, },
    #endif
    #ifdef CONFIG_SOC_DRA7XX
    	{ "ti,dra7-evm", dra7x_evm_mmc_quirk, },
    #endif
    	{ /* sentinel */ },
    };
    
    //---below struct is added by ravikumar
    /* Dual mode timer PWM callbacks platdata */
    #if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
    static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
            .request_by_node = omap_dm_timer_request_by_node,
            .request_specific = omap_dm_timer_request_specific,
            .request = omap_dm_timer_request,
            .set_source = omap_dm_timer_set_source,
            .get_irq = omap_dm_timer_get_irq,
            .set_int_enable = omap_dm_timer_set_int_enable,
            .set_int_disable = omap_dm_timer_set_int_disable,
            .free = omap_dm_timer_free,
            .enable = omap_dm_timer_enable,
            .disable = omap_dm_timer_disable,
            .get_fclk = omap_dm_timer_get_fclk,
            .start = omap_dm_timer_start,
            .stop = omap_dm_timer_stop,
            .set_load = omap_dm_timer_set_load,
            .set_match = omap_dm_timer_set_match,
            .set_pwm = omap_dm_timer_set_pwm,
            .set_prescaler = omap_dm_timer_set_prescaler,
            .read_counter = omap_dm_timer_read_counter,
            .write_counter = omap_dm_timer_write_counter,
            .read_status = omap_dm_timer_read_status,
            .write_status = omap_dm_timer_write_status,
    };
    #endif
    
    #if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
            OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
    #endif
    
    
    static void pdata_quirks_check(struct pdata_init *quirks)
    {
    	while (quirks->compatible) {
    		if (of_machine_is_compatible(quirks->compatible)) {
    			if (quirks->fn)
    				quirks->fn();
    			break;
    		}
    		quirks++;
    	}
    }
    
    void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
    {
    	/*
    	 * We still need this for omap2420 and omap3 PM to work, others are
    	 * using drivers/misc/sram.c already.
    	 */
    	if (of_machine_is_compatible("ti,omap2420") ||
    	    of_machine_is_compatible("ti,omap3"))
    		omap_sdrc_init(NULL, NULL);
    
    	pdata_quirks_check(auxdata_quirks);
    	of_platform_populate(NULL, omap_dt_match_table,
    			     omap_auxdata_lookup, NULL);
    	pdata_quirks_check(pdata_quirks);
    }
    

  • Ravikumar G said:
    Please find the attached pdata-quirks.c file

    omap_dm_timer_request_by_node() is declared and defined in below c/h files:

    linux-kernel/arch/arm/plat-omap/include/plat/dmtimer.h

    linux-kernel/arch/arm/plat-omap/dmtimer.c

    I see you miss to include the dmtimer.h file in pdata-quirks.c file

    #include <plat/dmtimer.h>

    Regards,
    Pavel

  • Thanks Pavel. I will modify and test.
  • Hi Pavel,

    Most of the errors are removed. Still compiler complains with the below errors,

    In file included from arch/arm/mach-omap2/pdata-quirks.c:15:0:

    include/linux/of_platform.h:50:52: error: expected identifier or '(' before '{' token

    #define OF_DEV_AUXDATA(_compat,_phys,_name,_pdata) {.compatible = _compat, .phys_addr = _phys, .name = _name, .platform_data = _pdat

                                                       ^

    arch/arm/mach-omap2/pdata-quirks.c:684:9: note: in expansion of macro 'OF_DEV_AUXDATA'

            OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),

            ^

    arch/arm/mach-omap2/pdata-quirks.c:684:75: error: expected identifier or '(' before ',' token

            OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),

     

    Please find the attached files

    /*
     * Legacy platform_data quirks
     *
     * Copyright (C) 2013 Texas Instruments
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    #include <linux/clk.h>
    #include <linux/davinci_emac.h>
    #include <linux/gpio.h>
    #include <linux/init.h>
    #include <linux/kernel.h>
    #include <linux/of_platform.h>
    #include <linux/ti_wilink_st.h>
    #include <linux/wl12xx.h>
    #include <linux/mmc/card.h>
    #include <linux/mmc/host.h>
    #include <linux/regulator/machine.h>
    #include <linux/regulator/fixed.h>
    
    #include <linux/platform_data/hsmmc-omap.h>
    #include <linux/platform_data/pinctrl-single.h>
    #include <linux/platform_data/iommu-omap.h>
    #include <linux/platform_data/remoteproc-omap.h>
    #include <linux/platform_data/wkup_m3.h>
    #include </opt/processor-sdk-linux-image-am335x-evm-20170514014918/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d/include/linux/platform_data/pwm_omap_dmtimer.h> //---added by ravikumar
    #include <linux/platform_data/remoteproc-pruss.h>
    #include <linux/platform_data/sgx-omap.h>
    #include <plat/dmtimer.h>
    
    #include "common.h"
    #include "common-board-devices.h"
    #include "dss-common.h"
    #include "control.h"
    #include "omap_device.h"
    #include "omap-secure.h"
    #include "soc.h"
    #include "hsmmc.h"
    #include "remoteproc.h"
    
    struct pdata_init {
    	const char *compatible;
    	void (*fn)(void);
    };
    
    static struct of_dev_auxdata omap_auxdata_lookup[];
    static struct twl4030_gpio_platform_data twl_gpio_auxdata;
    
    static void pdata_quirks_check(struct pdata_init *quirks); //---added by ravikumar
    
    #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
    static struct gfx_sgx_platform_data sgx_pdata = {
    	.reset_name = "gfx",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    };
    #endif
    
    #if IS_ENABLED(CONFIG_OMAP_IOMMU)
    int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
    				    u8 *pwrst);
    #else
    static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev,
    						  bool request, u8 *pwrst)
    {
    	return 0;
    }
    #endif
    
    #ifdef CONFIG_MACH_NOKIA_N8X0
    static void __init omap2420_n8x0_legacy_init(void)
    {
    	omap_auxdata_lookup[0].platform_data = n8x0_legacy_init();
    }
    #else
    #define omap2420_n8x0_legacy_init	NULL
    #endif
    
    #ifdef CONFIG_ARCH_OMAP3
    /*
     * Configures GPIOs 126, 127 and 129 to 1.8V mode instead of 3.0V
     * mode for MMC1 in case bootloader did not configure things.
     * Note that if the pins are used for MMC1, pbias-regulator
     * manages the IO voltage.
     */
    static void __init omap3_gpio126_127_129(void)
    {
    	u32 reg;
    
    	reg = omap_ctrl_readl(OMAP343X_CONTROL_PBIAS_LITE);
    	reg &= ~OMAP343X_PBIASLITEVMODE1;
    	reg |= OMAP343X_PBIASLITEPWRDNZ1;
    	omap_ctrl_writel(reg, OMAP343X_CONTROL_PBIAS_LITE);
    	if (cpu_is_omap3630()) {
    		reg = omap_ctrl_readl(OMAP34XX_CONTROL_WKUP_CTRL);
    		reg |= OMAP36XX_GPIO_IO_PWRDNZ;
    		omap_ctrl_writel(reg, OMAP34XX_CONTROL_WKUP_CTRL);
    	}
    }
    
    static void __init hsmmc2_internal_input_clk(void)
    {
    	u32 reg;
    
    	reg = omap_ctrl_readl(OMAP343X_CONTROL_DEVCONF1);
    	reg |= OMAP2_MMCSDIO2ADPCLKISEL;
    	omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
    }
    
    static struct iommu_platform_data omap3_iommu_pdata = {
    	.reset_name = "mmu",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    
    static struct iommu_platform_data omap3_iommu_isp_pdata = {
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    
    static int omap3_sbc_t3730_twl_callback(struct device *dev,
    					   unsigned gpio,
    					   unsigned ngpio)
    {
    	int res;
    
    	res = gpio_request_one(gpio + 2, GPIOF_OUT_INIT_HIGH,
    			       "wlan pwr");
    	if (res)
    		return res;
    
    	gpio_export(gpio, 0);
    
    	return 0;
    }
    
    static void __init omap3_sbc_t3x_usb_hub_init(int gpio, char *hub_name)
    {
    	int err = gpio_request_one(gpio, GPIOF_OUT_INIT_LOW, hub_name);
    
    	if (err) {
    		pr_err("SBC-T3x: %s reset gpio request failed: %d\n",
    			hub_name, err);
    		return;
    	}
    
    	gpio_export(gpio, 0);
    
    	udelay(10);
    	gpio_set_value(gpio, 1);
    	msleep(1);
    }
    
    static void __init omap3_sbc_t3730_twl_init(void)
    {
    	twl_gpio_auxdata.setup = omap3_sbc_t3730_twl_callback;
    }
    
    static void __init omap3_sbc_t3730_legacy_init(void)
    {
    	omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
    }
    
    static void __init omap3_sbc_t3530_legacy_init(void)
    {
    	omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
    }
    
    static struct ti_st_plat_data wilink_pdata = {
    	.nshutdown_gpio = 137,
    	.dev_name = "/dev/ttyO1",
    	.flow_cntrl = 1,
    	.baud_rate = 300000,
    };
    
    static struct platform_device wl18xx_device = {
    	.name	= "kim",
    	.id	= -1,
    	.dev	= {
    		.platform_data = &wilink_pdata,
    	}
    };
    
    static struct platform_device btwilink_device = {
    	.name	= "btwilink",
    	.id	= -1,
    };
    
    static void __init omap3_igep0020_rev_f_legacy_init(void)
    {
    	platform_device_register(&wl18xx_device);
    	platform_device_register(&btwilink_device);
    }
    
    static void __init omap3_igep0030_rev_g_legacy_init(void)
    {
    	platform_device_register(&wl18xx_device);
    	platform_device_register(&btwilink_device);
    }
    
    static void __init omap3_evm_legacy_init(void)
    {
    	hsmmc2_internal_input_clk();
    }
    
    static void am35xx_enable_emac_int(void)
    {
    	u32 v;
    
    	v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
    	v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
    	      AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
    	omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
    	omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
    }
    
    static void am35xx_disable_emac_int(void)
    {
    	u32 v;
    
    	v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
    	v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
    	omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
    	omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
    }
    
    static struct emac_platform_data am35xx_emac_pdata = {
    	.interrupt_enable	= am35xx_enable_emac_int,
    	.interrupt_disable	= am35xx_disable_emac_int,
    };
    
    static void __init am35xx_emac_reset(void)
    {
    	u32 v;
    
    	v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
    	v &= ~AM35XX_CPGMACSS_SW_RST;
    	omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
    	omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
    }
    
    static struct gpio cm_t3517_wlan_gpios[] __initdata = {
    	{ 56,	GPIOF_OUT_INIT_HIGH,	"wlan pwr" },
    	{ 4,	GPIOF_OUT_INIT_HIGH,	"xcvr noe" },
    };
    
    static void __init omap3_sbc_t3517_wifi_init(void)
    {
    	int err = gpio_request_array(cm_t3517_wlan_gpios,
    				ARRAY_SIZE(cm_t3517_wlan_gpios));
    	if (err) {
    		pr_err("SBC-T3517: wl12xx gpios request failed: %d\n", err);
    		return;
    	}
    
    	gpio_export(cm_t3517_wlan_gpios[0].gpio, 0);
    	gpio_export(cm_t3517_wlan_gpios[1].gpio, 0);
    
    	msleep(100);
    	gpio_set_value(cm_t3517_wlan_gpios[1].gpio, 0);
    }
    
    static void __init omap3_sbc_t3517_legacy_init(void)
    {
    	omap3_sbc_t3x_usb_hub_init(152, "cm-t3517 usb hub");
    	omap3_sbc_t3x_usb_hub_init(98, "sb-t35 usb hub");
    	am35xx_emac_reset();
    	hsmmc2_internal_input_clk();
    	omap3_sbc_t3517_wifi_init();
    }
    
    static void __init am3517_evm_legacy_init(void)
    {
    	am35xx_emac_reset();
    }
    
    static struct platform_device omap3_rom_rng_device = {
    	.name		= "omap3-rom-rng",
    	.id		= -1,
    	.dev	= {
    		.platform_data	= rx51_secure_rng_call,
    	},
    };
    
    static void __init nokia_n900_legacy_init(void)
    {
    	hsmmc2_internal_input_clk();
    
    	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
    		if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
    			pr_info("RX-51: Enabling ARM errata 430973 workaround\n");
    			/* set IBE to 1 */
    			rx51_secure_update_aux_cr(BIT(6), 0);
    		} else {
    			pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n");
    			pr_warn("Thumb binaries may crash randomly without this workaround\n");
    		}
    
    		pr_info("RX-51: Registring OMAP3 HWRNG device\n");
    		platform_device_register(&omap3_rom_rng_device);
    
    	}
    }
    
    static void __init omap3_tao3530_legacy_init(void)
    {
    	hsmmc2_internal_input_clk();
    }
    
    /* omap3pandora legacy devices */
    #define PANDORA_WIFI_IRQ_GPIO		21
    #define PANDORA_WIFI_NRESET_GPIO	23
    
    static struct platform_device pandora_backlight = {
    	.name	= "pandora-backlight",
    	.id	= -1,
    };
    
    static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
    	REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
    };
    
    static struct regulator_init_data pandora_vmmc3 = {
    	.constraints = {
    		.valid_ops_mask		= REGULATOR_CHANGE_STATUS,
    	},
    	.num_consumer_supplies	= ARRAY_SIZE(pandora_vmmc3_supply),
    	.consumer_supplies	= pandora_vmmc3_supply,
    };
    
    static struct fixed_voltage_config pandora_vwlan = {
    	.supply_name		= "vwlan",
    	.microvolts		= 1800000, /* 1.8V */
    	.gpio			= PANDORA_WIFI_NRESET_GPIO,
    	.startup_delay		= 50000, /* 50ms */
    	.enable_high		= 1,
    	.init_data		= &pandora_vmmc3,
    };
    
    static struct platform_device pandora_vwlan_device = {
    	.name		= "reg-fixed-voltage",
    	.id		= 1,
    	.dev = {
    		.platform_data = &pandora_vwlan,
    	},
    };
    
    static void pandora_wl1251_init_card(struct mmc_card *card)
    {
    	/*
    	 * We have TI wl1251 attached to MMC3. Pass this information to
    	 * SDIO core because it can't be probed by normal methods.
    	 */
    	if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) {
    		card->quirks |= MMC_QUIRK_NONSTD_SDIO;
    		card->cccr.wide_bus = 1;
    		card->cis.vendor = 0x104c;
    		card->cis.device = 0x9066;
    		card->cis.blksize = 512;
    		card->cis.max_dtr = 24000000;
    		card->ocr = 0x80;
    	}
    }
    
    static struct omap2_hsmmc_info pandora_mmc3[] = {
    	{
    		.mmc		= 3,
    		.caps		= MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
    		.gpio_cd	= -EINVAL,
    		.gpio_wp	= -EINVAL,
    		.init_card	= pandora_wl1251_init_card,
    	},
    	{}	/* Terminator */
    };
    
    static void __init pandora_wl1251_init(void)
    {
    	struct wl1251_platform_data pandora_wl1251_pdata;
    	int ret;
    
    	memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
    
    	pandora_wl1251_pdata.power_gpio = -1;
    
    	ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq");
    	if (ret < 0)
    		goto fail;
    
    	pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
    	if (pandora_wl1251_pdata.irq < 0)
    		goto fail_irq;
    
    	pandora_wl1251_pdata.use_eeprom = true;
    	ret = wl1251_set_platform_data(&pandora_wl1251_pdata);
    	if (ret < 0)
    		goto fail_irq;
    
    	return;
    
    fail_irq:
    	gpio_free(PANDORA_WIFI_IRQ_GPIO);
    fail:
    	pr_err("wl1251 board initialisation failed\n");
    }
    
    static void __init omap3_pandora_legacy_init(void)
    {
    	platform_device_register(&pandora_backlight);
    	platform_device_register(&pandora_vwlan_device);
    	omap_hsmmc_init(pandora_mmc3);
    	omap_hsmmc_late_init(pandora_mmc3);
    	pandora_wl1251_init();
    }
    #endif /* CONFIG_ARCH_OMAP3 */
    
    #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
    	defined(CONFIG_SOC_DRA7XX)
    static struct omap_rproc_timer_ops omap_rproc_dmtimer_ops = {
    	.request_timer = omap_rproc_request_timer,
    	.release_timer = omap_rproc_release_timer,
    	.start_timer = omap_rproc_start_timer,
    	.stop_timer = omap_rproc_stop_timer,
    	.get_timer_irq = omap_rproc_get_timer_irq,
    	.ack_timer_irq = omap_rproc_ack_timer_irq,
    };
    
    static struct omap_rproc_pdata omap4_ipu_dsp_pdata = {
    	.device_enable = omap_rproc_device_enable,
    	.device_shutdown = omap_rproc_device_shutdown,
    	.timer_ops = &omap_rproc_dmtimer_ops,
    };
    
    static struct iommu_platform_data omap4_iommu_pdata = {
    	.reset_name = "mmu_cache",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    #endif
    
    #if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
    static struct wkup_m3_platform_data wkup_m3_data = {
    	.reset_name = "wkup_m3",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    };
    
    static struct pruss_platform_data pruss_pdata = {
    	.reset_name = "pruss",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    };
    #endif
    
    #ifdef CONFIG_SOC_OMAP5
    static void __init omap5_uevm_legacy_init(void)
    {
    }
    #endif
    
    #ifdef CONFIG_SOC_DRA7XX
    static struct iommu_platform_data dra7_ipu1_dsp_iommu_pdata = {
    	.reset_name = "mmu_cache",
    	.assert_reset = omap_device_assert_hardreset,
    	.deassert_reset = omap_device_deassert_hardreset,
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    	.set_pwrdm_constraint = omap_iommu_set_pwrdm_constraint,
    };
    
    static struct iommu_platform_data dra7_dsp_mmu_edma_pdata = {
    	.device_enable = omap_device_enable,
    	.device_idle = omap_device_idle,
    };
    
    static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1;
    static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2;
    static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3;
    
    static void __init dra7x_evm_mmc_quirk(void)
    {
    	if (omap_rev() == DRA752_REV_ES1_1 || omap_rev() == DRA752_REV_ES1_0) {
    		dra7_hsmmc_data_mmc1.version = "rev11";
    		dra7_hsmmc_data_mmc1.max_freq = 96000000;
    
    		dra7_hsmmc_data_mmc2.version = "rev11";
    		dra7_hsmmc_data_mmc2.max_freq = 48000000;
    
    		dra7_hsmmc_data_mmc3.version = "rev11";
    		dra7_hsmmc_data_mmc3.max_freq = 48000000;
    	}
    }
    #endif
    
    static struct pcs_pdata pcs_pdata;
    
    void omap_pcs_legacy_init(int irq, void (*rearm)(void))
    {
    	pcs_pdata.irq = irq;
    	pcs_pdata.rearm = rearm;
    }
    
    /*
     * GPIOs for TWL are initialized by the I2C bus and need custom
     * handing until DSS has device tree bindings.
     */
    void omap_auxdata_legacy_init(struct device *dev)
    {
    	if (dev->platform_data)
    		return;
    
    	if (strcmp("twl4030-gpio", dev_name(dev)))
    		return;
    
    	dev->platform_data = &twl_gpio_auxdata;
    }
    
    /*
     * Few boards still need auxdata populated before we populate
     * the dev entries in of_platform_populate().
     */
    static struct pdata_init auxdata_quirks[] __initdata = {
    #ifdef CONFIG_SOC_OMAP2420
    	{ "nokia,n800", omap2420_n8x0_legacy_init, },
    	{ "nokia,n810", omap2420_n8x0_legacy_init, },
    	{ "nokia,n810-wimax", omap2420_n8x0_legacy_init, },
    #endif
    #ifdef CONFIG_ARCH_OMAP3
    	{ "compulab,omap3-sbc-t3730", omap3_sbc_t3730_twl_init, },
    #endif
    	{ /* sentinel */ },
    };
    
    static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
    #ifdef CONFIG_MACH_NOKIA_N8X0
    	OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL),
    	OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data),
    	OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data),
    #endif
    #ifdef CONFIG_ARCH_OMAP3
    	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002030, "48002030.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap3-padconf", 0x480025a0, "480025a0.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
    		       &omap3_iommu_pdata),
    	OF_DEV_AUXDATA("ti,omap2-iommu", 0x480bd400, "480bd400.mmu",
    		       &omap3_iommu_isp_pdata),
    	/* Only on am3517 */
    	OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
    	OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",
    		       &am35xx_emac_pdata),
    #endif
    #ifdef CONFIG_SOC_AM33XX
    	OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
    		       &wkup_m3_data),
    	OF_DEV_AUXDATA("ti,am3352-pruss", 0x4a300000, "4a300000.pruss",
    		       &pruss_pdata),
    	OF_DEV_AUXDATA("ti,am3352-sgx530", 0x56000000, "56000000.sgx",
    		       &sgx_pdata),
    #endif
    #ifdef CONFIG_ARCH_OMAP4
    	OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a100040, "4a100040.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap4-padconf", 0x4a31e040, "4a31e040.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap4-dsp", 0, "dsp", &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,omap4-ipu", 0x55020000, "ipu", &omap4_ipu_dsp_pdata),
    #endif
    #ifdef CONFIG_SOC_OMAP5
    	OF_DEV_AUXDATA("ti,omap5-padconf", 0x4a002840, "4a002840.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap5-padconf", 0x4ae0c840, "4ae0c840.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,omap5-dsp", 0, "dsp", &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,omap5-ipu", 0x55020000, "ipu", &omap4_ipu_dsp_pdata),
    #endif
    #ifdef CONFIG_SOC_DRA7XX
    	OF_DEV_AUXDATA("ti,dra7-padconf", 0x4a003400, "4a003400.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x40d01000, "40d01000.mmu",
    		       &dra7_ipu1_dsp_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x41501000, "41501000.mmu",
    		       &dra7_ipu1_dsp_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x40d02000, "40d02000.mmu",
    		       &dra7_dsp_mmu_edma_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp-iommu", 0x41502000, "41502000.mmu",
    		       &dra7_dsp_mmu_edma_pdata),
    	OF_DEV_AUXDATA("ti,dra7-iommu", 0x55082000, "55082000.mmu",
    		       &omap4_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-iommu", 0x58882000, "58882000.mmu",
    		       &dra7_ipu1_dsp_iommu_pdata),
    	OF_DEV_AUXDATA("ti,dra7-ipu", 0x55020000, "55020000.ipu",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-ipu", 0x58820000, "58820000.ipu",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp", 0x40800000, "40800000.dsp",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-dsp", 0x41000000, "41000000.dsp",
    		       &omap4_ipu_dsp_pdata),
    	OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x4809c000, "4809c000.mmc",
    		       &dra7_hsmmc_data_mmc1),
    	OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480b4000, "480b4000.mmc",
    		       &dra7_hsmmc_data_mmc2),
    	OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc",
    		       &dra7_hsmmc_data_mmc3),
    #endif
    #ifdef CONFIG_SOC_AM43XX
    	OF_DEV_AUXDATA("ti,am437-padconf", 0x44e10800, "44e10800.pinmux", &pcs_pdata),
    	OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
    		       &wkup_m3_data),
    	OF_DEV_AUXDATA("ti,am4372-pruss-wrapper", 0x54426000,
    		       "54426000.pruss_wrapper", &pruss_pdata),
    	OF_DEV_AUXDATA("ti,am4376-sgx530", 0x56000000, "56000000.sgx",
    		       &sgx_pdata),
    #endif
    #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
    	OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
    		       &omap4_iommu_pdata),
    	OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu",
    		       &omap4_iommu_pdata),
    #endif
    	{ /* sentinel */ },
    };
    
    /*
     * Few boards still need to initialize some legacy devices with
     * platform data until the drivers support device tree.
     */
    static struct pdata_init pdata_quirks[] __initdata = {
    #ifdef CONFIG_ARCH_OMAP3
    	{ "compulab,omap3-sbc-t3517", omap3_sbc_t3517_legacy_init, },
    	{ "compulab,omap3-sbc-t3530", omap3_sbc_t3530_legacy_init, },
    	{ "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, },
    	{ "nokia,omap3-n900", nokia_n900_legacy_init, },
    	{ "nokia,omap3-n9", hsmmc2_internal_input_clk, },
    	{ "nokia,omap3-n950", hsmmc2_internal_input_clk, },
    	{ "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
    	{ "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
    	{ "logicpd,dm3730-torpedo-devkit", omap3_gpio126_127_129, },
    	{ "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
    	{ "ti,am3517-evm", am3517_evm_legacy_init, },
    	{ "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
    	{ "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
    	{ "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
    #endif
    #ifdef CONFIG_SOC_OMAP5
    	{ "ti,omap5-uevm", omap5_uevm_legacy_init, },
    #endif
    #ifdef CONFIG_SOC_DRA7XX
    	{ "ti,dra7-evm", dra7x_evm_mmc_quirk, },
    #endif
    	{ /* sentinel */ },
    };
    
    //---below struct is added by ravikumar
    /* Dual mode timer PWM callbacks platdata */
    #if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
    static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
            .request_by_node = omap_dm_timer_request_by_node,
            .request_specific = omap_dm_timer_request_specific,
            .request = omap_dm_timer_request,
            .set_source = omap_dm_timer_set_source,
            .get_irq = omap_dm_timer_get_irq,
            .set_int_enable = omap_dm_timer_set_int_enable,
            .set_int_disable = omap_dm_timer_set_int_disable,
            .free = omap_dm_timer_free,
            .enable = omap_dm_timer_enable,
            .disable = omap_dm_timer_disable,
            .get_fclk = omap_dm_timer_get_fclk,
            .start = omap_dm_timer_start,
            .stop = omap_dm_timer_stop,
            .set_load = omap_dm_timer_set_load,
            .set_match = omap_dm_timer_set_match,
            .set_pwm = omap_dm_timer_set_pwm,
            .set_prescaler = omap_dm_timer_set_prescaler,
            .read_counter = omap_dm_timer_read_counter,
            .write_counter = omap_dm_timer_write_counter,
            .read_status = omap_dm_timer_read_status,
            .write_status = omap_dm_timer_write_status,
    };
    #endif
    
    #if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
            OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
    #endif
    
    
    static void pdata_quirks_check(struct pdata_init *quirks)
    {
    	while (quirks->compatible) {
    		if (of_machine_is_compatible(quirks->compatible)) {
    			if (quirks->fn)
    				quirks->fn();
    			break;
    		}
    		quirks++;
    	}
    }
    
    void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
    {
    	/*
    	 * We still need this for omap2420 and omap3 PM to work, others are
    	 * using drivers/misc/sram.c already.
    	 */
    	if (of_machine_is_compatible("ti,omap2420") ||
    	    of_machine_is_compatible("ti,omap3"))
    		omap_sdrc_init(NULL, NULL);
    
    	pdata_quirks_check(auxdata_quirks);
    	of_platform_populate(NULL, omap_dt_match_table,
    			     omap_auxdata_lookup, NULL);
    	pdata_quirks_check(pdata_quirks);
    }
    
    of_platform.h

  • Hi Pavel,

    I am able to compile it successfully. I will enable backlight in my dts and let you know the results.
  • Hi Pavel,

    After compiling th kernel with pwm7 and backlight nodes, below are the results,

    root@am335x-evm:~# dmesg | grep timer
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000059] OMAP clocksource: timer1 at 24000000 Hz
    [    0.249080] clocksource: Switched to clocksource timer1
    [    0.267703] omap_timer 4804a000.timer: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/timer7_pins_dee
    [    0.290889] /backlight: could not get #pwm-cells for /dmtimer-pwm@7

    root@am335x-evm:~# dmesg | grep pwm
    [    0.290557] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.290582] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.290889] /backlight: could not get #pwm-cells for /dmtimer-pwm@7
    [    0.290910] pwm-backlight backlight: unable to request PWM
    [    0.291128] pwm-backlight: probe of backlight failed with error -22

    below are my nodes and pin-mux details,

    pwm7: dmtimer-pwm@7 {

                   compatible = "ti,omap-dmtimer-pwm";

                   ti,timers = <&timer7>;

                   pwm-cells = <4>;

           };

    lcd_bl: backlight {

                   compatible = "pwm-backlight";

                   pinctrl-names = "default";

                   pinctrl-0 = <&timer7_pins_default>;

                   pwms = <&pwm7 0 5000000 0>;

                   brightness-levels = <0 32 64 96 128 160 192 224 255>;

                   default-brightness-level = <8>;

                   enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;

           };

    &timer7 {

           status = "okay";

           pinctrl-names = "default";

           pinctrl-0 = <&timer7_pins_default>;

    };

    /* timer 7 as on E18 */

           timer7_pins_default: timer7_pins_default {

                   pinctrl-single,pins = <

                           0x168 ( PIN_OUTPUT | MUX_MODE5 | PULL_DISABLE) /* (E18) uart0_ctsn.timer7 */

                   >;

           };

    Suggest me what else I need to add. Also find  he attached dts file  am335x_evm.tar.gz

  • Ravikumar G said:

    Most of the errors are removed. Still compiler complains with the below errors,

    In file included from arch/arm/mach-omap2/pdata-quirks.c:15:0:

    include/linux/of_platform.h:50:52: error: expected identifier or '(' before '{' token

    #define OF_DEV_AUXDATA(_compat,_phys,_name,_pdata) {.compatible = _compat, .phys_addr = _phys, .name = _name, .platform_data = _pdat

                                                       ^

    arch/arm/mach-omap2/pdata-quirks.c:684:9: note: in expansion of macro 'OF_DEV_AUXDATA'

            OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),

            ^

    arch/arm/mach-omap2/pdata-quirks.c:684:75: error: expected identifier or '(' before ',' token

            OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),

     

    Please find the attached files (Please visit the site to view this file) (Please visit the site to view this file)

    In your pdata-quirks.c file, you are calling OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata), out of struct of_dev_auxdata omap_auxdata_lookup[]

    In your pdata-quirks.c file you have:

    #if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
    static struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
            .request_by_node = omap_dm_timer_request_by_node,
            .request_specific = omap_dm_timer_request_specific,
            .request = omap_dm_timer_request,
            .set_source = omap_dm_timer_set_source,
            .get_irq = omap_dm_timer_get_irq,
            .set_int_enable = omap_dm_timer_set_int_enable,
            .set_int_disable = omap_dm_timer_set_int_disable,
            .free = omap_dm_timer_free,
            .enable = omap_dm_timer_enable,
            .disable = omap_dm_timer_disable,
            .get_fclk = omap_dm_timer_get_fclk,
            .start = omap_dm_timer_start,
            .stop = omap_dm_timer_stop,
            .set_load = omap_dm_timer_set_load,
            .set_match = omap_dm_timer_set_match,
            .set_pwm = omap_dm_timer_set_pwm,
            .set_prescaler = omap_dm_timer_set_prescaler,
            .read_counter = omap_dm_timer_read_counter,
            .write_counter = omap_dm_timer_write_counter,
            .read_status = omap_dm_timer_read_status,
            .write_status = omap_dm_timer_write_status,
    };
    #endif

    #if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
            OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),  -----> This is not in the right place
    #endif

    Should be placed/called like below:

    static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {

    .....

    #if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
        OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
    #endif

    ....

    };

  • Ravikumar G said:

    pwm7: dmtimer-pwm@7 {

                   compatible = "ti,omap-dmtimer-pwm";

                   ti,timers = <&timer7>;

                   pwm-cells = <4>;

           };

    Change pwm-cells entry like below:

    -pwm-cells = <4>;

    +#pwm-cells = <3>;

    Ravikumar G said:

    lcd_bl: backlight {

                   compatible = "pwm-backlight";

                   pinctrl-names = "default";

                   pinctrl-0 = <&timer7_pins_default>;

                   pwms = <&pwm7 0 5000000 0>;

                   brightness-levels = <0 32 64 96 128 160 192 224 255>;

                   default-brightness-level = <8>;

                   enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;

           };

    enable-gpios entry is optional and used for GPIO pin to enable/disable the backlight. If you do not have such GPIO pin, you should remove that entry.

    Ravikumar G said:

    &timer7 {

           status = "okay";

           pinctrl-names = "default";

           pinctrl-0 = <&timer7_pins_default>;

    };

    Do you use the default am33xx.dtsi file?

    I think this node is not needed. timer7 is described in am33xx.dtsi file and is NOT disabled there, thus no need to enable it in your am335x-evm.dts file. Also the pinmux is done in backlight node and you duplicate it this timer7 node. I think you can remove this timer7 node from your am335x-evm.dts file.

    Also I see you miss the backlight entry in panel node, please add it.

    panel {

    ....

    backlight = <&lcd_bl>;

    Modify your DTS file and try again. Check from user space if the timer7 pin is muxmode correctly. If not, we can try to transfer the pinmux entry from  backlight node to timer7 node (in this case we will put timer7 node again in DTS file).

    Regards,
    Pavel

  • Hi Pavel,

    Thanks for the reply.

    I have made the above changes, below are the results,

    root@am335x-evm:/sys/class/pwm# dmesg | grep pwm
    [    0.290458] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.290484] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.290529] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.290543] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.716720] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.716741] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.716785] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.716799] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.760973] pwm-backlight backlight: GPIO lookup for consumer enable

    I have commented out timer7 node, enable-gpios entry from lcd_bl node in my dts.

  • Ravikumar,

    Do you use the default am33xx.dtsi file or you made changes?

    Please provide your latest DTS file for review.

    Please check if timer7 pinmux is correct, check from user space with devmem2 tool or omapconf tool.

    Regards,
    Pavel
  • Pavel,

    Yes, I am using the default am33xx.dtsi file without any mdification.

    Please find the attached dts 8015.am335x_evm.tar.gz

  • Ravikumar,

    When you boot up, can you check register value of conf_uart0_ctsn/0x44E10968 register? You can check it through devmem2 tool. Please provide me the value you have there.

    Regards,
    Pavel
  • You can also try with below DTS file modifications. Let me know the result.

    lcd_bl: backlight {
    compatible = "pwm-backlight";
    pwms = <&pwm7 0 5000000 0>;
    brightness-levels = <0 32 64 96 128 160 192 224 255>;
    default-brightness-level = <8>;
    };

    pwm7: dmtimer-pwm@7 {
    compatible = "ti,omap-dmtimer-pwm";
    ti,timers = <&timer7>;
    #pwm-cells = <3>;
    };

    &timer7 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&timer7_pins_default>;
    }
  • Hi Pavel,

    Sorry for the late reply.

    Below is the output of devmem2,

    root@am335x-evm:~# devmem2 0x44E10968            
    /dev/mem opened.
    Memory mapped at address 0xb6fc0000.
    Read at address  0x44E10968 (0xb6fc0968): 0x0000000D

     


    I have also tried with the DTS changes provided by you, below are the kernel logs,

    root@am335x-evm:/sys/class/pwm# dmesg | grep pwm
    [    0.290458] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.290484] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.290529] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.290543] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.716720] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.716741] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.716785] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.716799] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.760973] pwm-backlight backlight: GPIO lookup for consumer enable

  • Ravikumar G said:

    I have also tried with the DTS changes provided by you, below are the kernel logs,

    root@am335x-evm:/sys/class/pwm# dmesg | grep pwm
    [    0.290458] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.290484] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.290529] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.290543] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.716720] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.716741] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.716785] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.716799] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.760973] pwm-backlight backlight: GPIO lookup for consumer enable

    Can you please also check conf_uart0_ctsn/0x44E10968 register value in this case (after DTS file modification)? Do you still have the same value (0xD)?

    Please provide me also the full boot up log (SPL, u-boot, kernel, rootfs). Put it in txt file and attach the txt file here in the forum.

    Attach also the latest version of your DTS file.

    Regards,
    Pavel

  • Hi Pavel,

    Yes, even after the DTS modification the output of devmem2 is 0xD.

    Please find the attached log file and latest DTS file.

    U-Boot SPL 2016.05-00319-ga0faac0-dirty (Oct 19 2017 - 22:06:09)
    Trying to boot from MMC1
    reading args
    spl_load_image_fat_os: error reading image args, err - -1
    reading u-boot.img
    reading u-boot.img
    
    
    U-Boot 2016.05-00319-ga0faac0-dirty (Oct 19 2017 - 22:06:09 +0530)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM
           Watchdog enabled
    DRAM:  512 MiB
    NAND:  256 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:
    Warning: usb_ether MAC addresses don't match:
    Address in SROM is         de:ad:be:ef:00:01
    Address in environment is  68:c9:0b:bb:31:d9
    eth0: usb_ether
    Press SPACE to abort autoboot in 1 seconds
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    3475752 bytes read in 297 ms (11.2 MiB/s)
    42732 bytes read in 39 ms (1 MiB/s)
    Kernel image @ 0x82000000 [ 0x000000 - 0x350928 ]
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8fff2000, end 8ffff6eb ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.41-gf9f6f0db2d (root@BLTSP02849) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #231 PREEMPT Tue Oct 24 23:00:22 IST 2017
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine model: TI AM335x EVM
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 131072
    [    0.000000] free_area_init_node: node 0, pgdat c09550e4, node_mem_map dcb61000
    [    0.000000]   Normal zone: 1152 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 131072 pages, LIFO batch:31
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (sgx neon )
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyO0,115200n8 quiet lpj=3590144 root=PARTUUID=6d2f1b93-02 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 459980K/524288K available (6603K kernel code, 317K rwdata, 2344K rodata, 264K init, 265K bss, 15156K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
                       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                       fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                       vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
                       lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
                       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                         .text : 0xc0008000 - 0xc08c5004   (8949 kB)
                         .init : 0xc08c6000 - 0xc0908000   ( 264 kB)
                         .data : 0xc0908000 - 0xc0957570   ( 318 kB)
                          .bss : 0xc0957570 - 0xc0999c98   ( 266 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000] 	Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000018] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000058] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000290] clocksource_probe: no matching clocksources found
    [    0.000503] Console: colour dummy device 80x30
    [    0.000536] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000545] This ensures that you still see kernel messages. Please
    [    0.000552] update your kernel commandline.
    [    0.000570] Calibrating delay loop (skipped) preset value.. 718.02 BogoMIPS (lpj=3590144)
    [    0.000591] pid_max: default: 32768 minimum: 301
    [    0.000749] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000764] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001612] Initializing cgroup subsys io
    [    0.001650] Initializing cgroup subsys memory
    [    0.001696] Initializing cgroup subsys devices
    [    0.001714] Initializing cgroup subsys freezer
    [    0.001732] Initializing cgroup subsys perf_event
    [    0.001747] Initializing cgroup subsys pids
    [    0.001781] CPU: Testing write buffer coherency: ok
    [    0.002232] Setting up static identity map for 0x80008200 - 0x80008260
    [    0.004976] devtmpfs: initialized
    [    0.022442] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.027524] omap_hwmod: rtc: Missing dt reg0 for /ocp/rtc@44e3e000
    [    0.027545] ------------[ cut here ]------------
    [    0.027577] WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2523 _init.constprop.22+0x1fc/0x424()
    [    0.027587] omap_hwmod: rtc: doesn't have mpu register target base
    [    0.027595] Modules linked in:
    [    0.027617] CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.41-gf9f6f0db2d #231
    [    0.027626] Hardware name: Generic AM33XX (Flattened Device Tree)
    [    0.027634] Backtrace: 
    [    0.027672] [<c0013508>] (dump_backtrace) from [<c0013704>] (show_stack+0x18/0x1c)
    [    0.027681]  r7:c08d17c4 r6:000009db r5:00000009 r4:00000000
    [    0.027713] [<c00136ec>] (show_stack) from [<c02a8aa8>] (dump_stack+0x24/0x28)
    [    0.027739] [<c02a8a84>] (dump_stack) from [<c0031d64>] (warn_slowpath_common+0x88/0xb4)
    [    0.027758] [<c0031cdc>] (warn_slowpath_common) from [<c0031dc8>] (warn_slowpath_fmt+0x38/0x40)
    [    0.027767]  r8:000000a8 r7:dc0dcd40 r6:00000000 r5:dcb56bbc r4:c0802670
    [    0.027800] [<c0031d94>] (warn_slowpath_fmt) from [<c08d17c4>] (_init.constprop.22+0x1fc/0x424)
    [    0.027809]  r3:c0840e50 r2:c0802670
    [    0.027820]  r4:c0911ff0
    [    0.027840] [<c08d15c8>] (_init.constprop.22) from [<c08d1b1c>] (__omap_hwmod_setup_all+0x48/0x98)
    [    0.027848]  r10:00000000 r9:c08c6600 r8:000000a8 r7:dc0dcd40 r6:c090cd20 r5:c090efd8
    [    0.027872]  r4:c0911ff0
    [    0.027890] [<c08d1ad4>] (__omap_hwmod_setup_all) from [<c00096bc>] (do_one_initcall+0x98/0x1e4)
    [    0.027899]  r5:c08d1ad4 r4:c090cd20
    [    0.027931] [<c0009624>] (do_one_initcall) from [<c08c6e80>] (kernel_init_freeable+0x138/0x1cc)
    [    0.027940]  r10:00000002 r9:c08c6600 r8:000000a8 r7:c08fa81c r6:c0906a2c r5:c0957580
    [    0.027962]  r4:c0957580
    [    0.027985] [<c08c6d48>] (kernel_init_freeable) from [<c0675374>] (kernel_init+0x18/0xf4)
    [    0.027994]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c067535c
    [    0.028016]  r4:c0957580
    [    0.028034] [<c067535c>] (kernel_init) from [<c000fab8>] (ret_from_fork+0x14/0x3c)
    [    0.028043]  r5:c067535c r4:00000000
    [    0.028097] ---[ end trace 32f732867cd804bc ]---
    [    0.043187] omap_hwmod: debugss: _wait_target_disable failed
    [    0.109440] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.114050] pinctrl core: initialized pinctrl subsystem
    [    0.115635] NET: Registered protocol family 16
    [    0.118378] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.148801] cpuidle: using governor ladder
    [    0.178790] cpuidle: using governor menu
    [    0.184287] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
    [    0.184660] OMAP GPIO hardware version 0.1
    [    0.185607] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
    [    0.186604] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
    [    0.187577] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
    [    0.195420] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    [    0.199296] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.239826] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.240312] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@0[0]'
    [    0.240700] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator@1[0]'
    [    0.245075] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.245151] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [    0.245332] media: Linux media interface: v0.10
    [    0.245419] Linux video capture interface: v2.00
    [    0.245483] pps_core: LinuxPPS API ver. 1 registered
    [    0.245493] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.245530] PTP clock support registered
    [    0.245602] EDAC MC: Ver: 3.0.0
    [    0.247067] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.247503] Advanced Linux Sound Architecture Driver Initialized.
    [    0.249088] clocksource: Switched to clocksource timer1
    [    0.263336] NET: Registered protocol family 2
    [    0.264297] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.264366] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.264427] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.264521] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.264546] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.264735] NET: Registered protocol family 1
    [    0.265209] RPC: Registered named UNIX socket transport module.
    [    0.265227] RPC: Registered udp transport module.
    [    0.265236] RPC: Registered tcp transport module.
    [    0.265245] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.265280] PCI: CLS 0 bytes, default 64
    [    0.266420] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.267715] omap_timer 4804a000.timer: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/timer7_pins_default, deferring probe
    [    0.268977] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.279904] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.280932] NFS: Registering the id_resolver key type
    [    0.281013] Key type id_resolver registered
    [    0.281023] Key type id_legacy registered
    [    0.281112] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.285497] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [    0.285530] io scheduler noop registered
    [    0.285548] io scheduler deadline registered
    [    0.285755] io scheduler cfq registered (default)
    [    0.287619] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.290454] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.290478] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.290497] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    0.290511] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    0.290524] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.290538] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.290565] backlight supply power not found, using dummy regulator
    [    0.371882] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.377009] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    0.406996] console [ttyS0] enabled
    [    0.408488] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    0.409986] [drm] Initialized drm 1.1.0 20060810
    [    0.412792] tilcdc 4830e000.lcdc: no encoders/connectors found
    [    0.428051] loop: module loaded
    [    0.432968] libphy: Fixed MDIO Bus: probed
    [    0.499180] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    0.499209] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [    0.500266] libphy: 4a101000.mdio: probed
    [    0.500296] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    [    0.501136] cpsw 4a100000.ethernet: Detected MACID = 68:c9:0b:bb:31:d9
    [    0.501318] cpsw 4a100000.ethernet: cpts: overflow check period 850
    [    0.503575] mousedev: PS/2 mouse device common for all mice
    [    0.504439] rtc-mcp795 spi1.0: SPI-RTC setup done....
    [    0.510192] rtc-mcp795 spi1.0: Read RTC called....!!!!
    [    0.515365] rtc-mcp795 spi1.0: Read from mcp795: 2001-01-01 00:00:00
    [    0.515672] rtc rtc0: rtc-mcp795: dev (254:0)
    [    0.515708] rtc-mcp795 spi1.0: rtc core: registered rtc-mcp795 as rtc0
    [    0.515781] i2c /dev entries driver
    [    0.517247] cpuidle: enable-method property 'ti,am3352' found operations
    [    0.518105] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    0.518128] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    0.518146] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
    [    0.518160] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
    [    0.518173] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    0.518187] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
    [    0.518203] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    0.518215] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    0.518227] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    0.518239] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    0.518251] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    0.518263] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    0.540005] ledtrig-cpu: registered to indicate activity on CPUs
    [    0.544685] NET: Registered protocol family 10
    [    0.546301] sit: IPv6 over IPv4 tunneling driver
    [    0.547321] NET: Registered protocol family 17
    [    0.547702] Key type dns_resolver registered
    [    0.548042] omap_voltage_late_init: Voltage driver support not added
    [    0.558758] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    0.558793] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    0.558809] gpiochip_find_base: found new base at 510
    [    0.559018] gpiochip_add: registered GPIOs 510 to 511 on device: omap-gpmc
    [    0.560319] omap2-nand 8000000.nand: GPIO lookup for consumer rb
    [    0.560348] omap2-nand 8000000.nand: using device tree for GPIO lookup
    [    0.560396] of_get_named_gpiod_flags: parsed 'rb-gpios' property of node '/ocp/gpmc@50000000/nand@0,0[0]' - status (0)
    [    0.560465] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xda
    [    0.560475] nand: Toshiba NAND 256MiB 3,3V 8-bit
    [    0.560487] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
    [    0.560531] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    0.560652] 10 ofpart partitions found on MTD device 8000000.nand
    [    0.560663] Creating 10 MTD partitions on "8000000.nand":
    [    0.560682] 0x000000000000-0x000000080000 : "NAND.SPL"
    [    0.562599] 0x000000080000-0x000000100000 : "NAND.SPL.backup1"
    [    0.564191] 0x000000100000-0x000000180000 : "NAND.SPL.backup2"
    [    0.565748] 0x000000180000-0x000000200000 : "NAND.SPL.backup3"
    [    0.567312] 0x000000200000-0x000000280000 : "NAND.u-boot-spl-os"
    [    0.568902] 0x000000280000-0x000000380000 : "NAND.u-boot"
    [    0.570882] 0x000000380000-0x000000400000 : "NAND.u-boot-env"
    [    0.572524] 0x000000400000-0x000000480000 : "NAND.u-boot-env.backup1"
    [    0.574122] 0x000000480000-0x000000b80000 : "NAND.kernel"
    [    0.578194] 0x000000b80000-0x000040000000 : "NAND.file-system"
    [    0.578214] mtd: partition "NAND.file-system" extends beyond the end of device "8000000.nand" -- size truncated to 0xf480000
    [    0.689389] tps65910 0-002d: No interrupt support, no core IRQ
    [    0.689636] tps65910-gpio tps65910-gpio: ti,en-gpio-sleep not specified
    [    0.689656] gpiochip_find_base: found new base at 504
    [    0.689825] gpiochip_add: registered GPIOs 504 to 509 on device: tps65910
    [    0.714732] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    0.716391] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
    [    0.717079] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.717100] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.717120] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    0.717133] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    0.717146] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.717160] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.717203] backlight supply power not found, using dummy regulator
    [    0.718564] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    0.718588] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    0.718604] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@48060000[0]'
    [    0.718618] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@48060000[0]'
    [    0.718632] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    0.718645] omap_hsmmc 48060000.mmc: lookup for GPIO cd failed
    [    0.718661] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    0.718673] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    0.718686] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    0.718698] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    0.718711] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    0.718722] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    0.719313] vmmc: supplied by vbat
    [    0.759690] vdd_mpu: supplied by vbat
    [    0.760988] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.761011] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.761029] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    0.761043] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    0.761056] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.761070] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.761106] backlight supply power not found, using dummy regulator
    [    0.762824] of_get_named_gpiod_flags: parsed 'gpios' property of node '/volume_keys@0/switch@9[0]' - status (0)
    [    0.762875] of_get_named_gpiod_flags: parsed 'gpios' property of node '/volume_keys@0/switch@10[0]' - status (0)
    [    0.763463] input: volume_keys@0 as /devices/platform/volume_keys@0/input/input0
    [    0.764325] rtc-mcp795 spi1.0: Read RTC called....!!!!
    [    0.769950] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.769970] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.769987] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    0.770000] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    0.770014] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.770027] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.770066] backlight supply power not found, using dummy regulator
    [    0.771104] rtc-mcp795 spi1.0: Read from mcp795: 2001-01-01 00:00:00
    [    0.771163] rtc-mcp795 spi1.0: setting system clock to 2001-02-01 00:00:00 UTC (980985600)
    [    0.779735] lis3_reg: disabling
    [    0.780160] ALSA device list:
    [    0.780175]   No soundcards found.
    [    0.785378] Waiting for root device PARTUUID=6d2f1b93-02...
    [    0.807040] mmc0: host does not support reading read-only switch, assuming write-enable
    [    0.808871] mmc0: new high speed SDHC card at address 0002
    [    0.809799] mmcblk0: mmc0:0002 00000 3.83 GiB 
    [    0.811405]  mmcblk0: p1 p2
    [    0.812771] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.812794] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.812811] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    0.812825] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    0.812838] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.812852] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.812895] backlight supply power not found, using dummy regulator
    [    2.277397] EXT4-fs (mmcblk0p2): recovery complete
    [    2.281644] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.281804] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.293890] devtmpfs: mounted
    [    2.294799] Freeing unused kernel memory: 264K (c08c6000 - c0908000)
    [    2.294819] This architecture does not have kernel memory protection.
    [    2.590341] systemd[1]: System time before build time, advancing clock.
    [    2.666525] random: systemd: uninitialized urandom read (16 bytes read, 31 bits of entropy available)
    [    2.675195] random: systemd: uninitialized urandom read (16 bytes read, 31 bits of entropy available)
    [    2.702759] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    [    2.704345] systemd[1]: Detected architecture arm.
    [    2.706147] systemd[1]: Set hostname to <am335x-evm>.
    [    2.878004] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 33 bits of entropy available)
    [    2.904772] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 34 bits of entropy available)
    [    2.905522] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 34 bits of entropy available)
    [    2.916148] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 34 bits of entropy available)
    [    2.934243] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 35 bits of entropy available)
    [    3.049585] random: systemd: uninitialized urandom read (16 bytes read, 39 bits of entropy available)
    [    3.050281] random: systemd: uninitialized urandom read (16 bytes read, 39 bits of entropy available)
    [    3.052200] random: systemd: uninitialized urandom read (16 bytes read, 39 bits of entropy available)
    [    3.506350] systemd[1]: [/lib/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
    [    3.602565] systemd[1]: Configuration file /lib/systemd/system/psplash-stop.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    [    3.739083] systemd[1]: Configuration file /lib/systemd/system/psplash-start.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    [    3.740303] systemd[1]: [/lib/systemd/system/psplash-start.service:4] Unknown lvalue 'OnBootSec' in section 'Unit'
    [    3.805292] systemd[1]: sysinit.target: Found ordering cycle on sysinit.target/start
    [    3.805354] systemd[1]: sysinit.target: Found dependency on alignment.service/start
    [    3.805394] systemd[1]: sysinit.target: Found dependency on basic.target/start
    [    3.805423] systemd[1]: sysinit.target: Found dependency on sockets.target/start
    [    3.805450] systemd[1]: sysinit.target: Found dependency on rpcbind.socket/start
    [    3.805476] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
    [    3.805506] systemd[1]: sysinit.target: Breaking ordering cycle by deleting job alignment.service/start
    [    3.805538] systemd[1]: alignment.service: Job alignment.service/start deleted to break ordering cycle starting with sysinit.target/start
    [    3.828845] systemd[1]: Created slice System Slice.
    [    3.829370] systemd[1]: Reached target Remote File Systems.
    [    3.846127] systemd[1]: Reached target Swap.
    [    3.847027] systemd[1]: Listening on Network Service Netlink Socket.
    [    3.847571] systemd[1]: Listening on udev Control Socket.
    [    3.848128] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    3.850264] systemd[1]: Created slice User and Session Slice.
    [    3.850469] systemd[1]: Reached target Slices.
    [    3.850885] systemd[1]: Listening on Syslog Socket.
    [    3.851262] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [    3.851809] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
    [    3.851975] systemd[1]: Reached target Paths.
    [    3.852467] systemd[1]: Listening on Journal Socket.
    [    3.857685] systemd[1]: Starting Setup Virtual Console...
    [    3.867750] systemd[1]: Starting Load Kernel Modules...
    [    3.921887] systemd[1]: Starting Remount Root and Kernel File Systems...
    [    3.946163] systemd[1]: Mounting Temporary Directory...
    [    4.001672] systemd[1]: Starting Create list of required static device nodes for the current kernel...
    [    4.007323] systemd[1]: Starting Synchronize System and HW clocks...
    [    4.039773] cryptodev: driver 1.8 loaded.
    [    4.091796] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    4.158255] systemd[1]: Mounting POSIX Message Queue File System...
    [    4.178847] systemd[1]: Starting Psplash Boot Screen...
    [    4.186996] rtc-mcp795 spi1.0: Set mcp795: 1917-04-13 17:52:20
    [    4.187024] rtc-mcp795 spi1.0: Write RTC called.....!!!!!
    [    4.219072] rtc-mcp795 spi1.0: Read RTC called....!!!!
    [    4.224439] rtc-mcp795 spi1.0: Read from mcp795: 2017-04-13 17:52:20
    [    4.240484] systemd[1]: Mounting Debug File System...
    [    4.241798] systemd[1]: Listening on udev Kernel Socket.
    [    4.244132] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [    4.245977] systemd[1]: Created slice system-getty.slice.
    [    4.246475] systemd[1]: Listening on Journal Socket (/dev/log).
    [    4.310318] systemd[1]: Starting Journal Service...
    [    4.381751] systemd[1]: Mounted POSIX Message Queue File System.
    [    4.382566] systemd[1]: Mounted Debug File System.
    [    4.382773] systemd[1]: Mounted Temporary Directory.
    [    4.386988] systemd[1]: Started Setup Virtual Console.
    [    4.390896] systemd[1]: Started Load Kernel Modules.
    [    4.393649] systemd[1]: Started Remount Root and Kernel File Systems.
    [    4.401841] systemd[1]: Started Create list of required static device nodes for the current kernel.
    [    4.404248] systemd[1]: Started Synchronize System and HW clocks.
    [    4.421003] systemd[1]: Started Psplash Boot Screen.
    [    4.510310] systemd[1]: psplash-start.service: Main process exited, code=exited, status=255/n/a
    [    4.513831] systemd[1]: psplash-start.service: Unit entered failed state.
    [    4.513909] systemd[1]: psplash-start.service: Failed with result 'exit-code'.
    [    4.742196] systemd[1]: Started Journal Service.
    [    6.564292] systemd-journald[119]: Received request to flush runtime journal from PID 1
    [    8.926887] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad@0[0]' - status (0)
    [    8.926942] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad@0[1]' - status (0)
    [    8.926980] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad@0[2]' - status (0)
    [    8.927002] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad@0[0]' - status (0)
    [    8.927032] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad@0[1]' - status (0)
    [    8.927656] input: matrix_keypad@0 as /devices/platform/matrix_keypad@0/input/input1
    [    8.932850] pwm-backlight backlight: GPIO lookup for consumer enable
    [    8.932882] pwm-backlight backlight: using device tree for GPIO lookup
    [    8.932901] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    8.932916] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    8.932929] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    8.932943] pwm-backlight backlight: lookup for GPIO enable failed
    [    8.932988] backlight supply power not found, using dummy regulator
    [    9.085256] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.085292] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.085314] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.085328] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.085341] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.085356] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.085400] backlight supply power not found, using dummy regulator
    [    9.121355] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    9.121763] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.121785] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.121804] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.121818] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.121830] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.121844] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.121890] backlight supply power not found, using dummy regulator
    [    9.133186] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.133221] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.133241] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.133255] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.133267] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.133281] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.133325] backlight supply power not found, using dummy regulator
    [    9.181347] input: ti-tsc as /devices/platform/ocp/44e0d000.tscadc/TI-am335x-tsc/input/input2
    [    9.183084] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [    9.183117] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [    9.183137] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    9.183152] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    9.183165] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [    9.183180] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [    9.183196] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [    9.183208] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [    9.183221] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    9.183235] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [    9.183247] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [    9.183260] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [    9.183349] 47401300.usb-phy supply vcc not found, using dummy regulator
    [    9.190156] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.190190] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.190209] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.190223] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.190236] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.190250] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.190293] backlight supply power not found, using dummy regulator
    [    9.207345] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.207384] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.207405] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.207418] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.207432] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.207447] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.207491] backlight supply power not found, using dummy regulator
    [    9.211139] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [    9.211175] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [    9.211198] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    9.211212] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    9.211226] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [    9.211240] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO reset failed
    [    9.211255] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [    9.211267] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [    9.211281] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    9.211294] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [    9.211307] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [    9.211320] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO vbus-detect failed
    [    9.211407] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [    9.249850] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.249886] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.249907] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.249921] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.249934] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.249948] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.249993] backlight supply power not found, using dummy regulator
    [    9.382377] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.382413] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.382434] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.382448] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.382461] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.382476] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.382521] backlight supply power not found, using dummy regulator
    [    9.383878] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.383904] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.383922] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.383935] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.383948] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.383962] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.383994] backlight supply power not found, using dummy regulator
    [    9.781015] edt_ft5x06 2-0038: GPIO lookup for consumer reset
    [    9.781049] edt_ft5x06 2-0038: using device tree for GPIO lookup
    [    9.781070] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    9.781085] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    9.781097] edt_ft5x06 2-0038: using lookup tables for GPIO lookup
    [    9.781111] edt_ft5x06 2-0038: lookup for GPIO reset failed
    [    9.781126] edt_ft5x06 2-0038: GPIO lookup for consumer wake
    [    9.781137] edt_ft5x06 2-0038: using device tree for GPIO lookup
    [    9.781150] of_get_named_gpiod_flags: can't parse 'wake-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    9.781163] of_get_named_gpiod_flags: can't parse 'wake-gpio' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    9.781175] edt_ft5x06 2-0038: using lookup tables for GPIO lookup
    [    9.781187] edt_ft5x06 2-0038: lookup for GPIO wake failed
    [    9.844280] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    9.844643] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.844665] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.844685] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.844698] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.844712] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.844727] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.844771] backlight supply power not found, using dummy regulator
    [    9.848433] input: EP01080M09 as /devices/platform/ocp/4819c000.i2c/i2c-2/2-0038/input/input3
    [    9.849862] pwm-backlight backlight: GPIO lookup for consumer enable
    [    9.849886] pwm-backlight backlight: using device tree for GPIO lookup
    [    9.849904] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    9.849918] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    9.849931] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    9.849945] pwm-backlight backlight: lookup for GPIO enable failed
    [    9.849986] backlight supply power not found, using dummy regulator
    [   10.359146] omap_hwmod: pruss: _wait_target_ready failed: -16
    [   10.481587] ti-pruss 4a300000.pruss: couldn't enable pruss
    [   10.487238] ti-pruss: probe of 4a300000.pruss failed with error -16
    [   11.647085] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [   11.991656]  remoteproc0: wkup_m3 is available
    [   11.991687]  remoteproc0: Note: remoteproc is still under development and considered experimental.
    [   11.991700]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [   12.013007] pwm-backlight backlight: GPIO lookup for consumer enable
    [   12.013044] pwm-backlight backlight: using device tree for GPIO lookup
    [   12.013065] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   12.013080] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   12.013093] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   12.013108] pwm-backlight backlight: lookup for GPIO enable failed
    [   12.013153] backlight supply power not found, using dummy regulator
    [   12.447920]  remoteproc0: powering up wkup_m3
    [   12.450421] pwm-backlight backlight: GPIO lookup for consumer enable
    [   12.450454] pwm-backlight backlight: using device tree for GPIO lookup
    [   12.450475] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   12.450490] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   12.450503] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   12.450518] pwm-backlight backlight: lookup for GPIO enable failed
    [   12.450563] backlight supply power not found, using dummy regulator
    [   12.453610]  remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217232
    [   12.453908]  remoteproc0: remote processor wkup_m3 is now up
    [   12.453941] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [   12.548160] pwm-backlight backlight: GPIO lookup for consumer enable
    [   12.548199] pwm-backlight backlight: using device tree for GPIO lookup
    [   12.548220] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   12.548234] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   12.548248] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   12.548263] pwm-backlight backlight: lookup for GPIO enable failed
    [   12.548309] backlight supply power not found, using dummy regulator
    [   12.549555] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [   13.097584] pwm-backlight backlight: GPIO lookup for consumer enable
    [   13.097623] pwm-backlight backlight: using device tree for GPIO lookup
    [   13.097644] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   13.097659] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   13.097672] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   13.097687] pwm-backlight backlight: lookup for GPIO enable failed
    [   13.097734] backlight supply power not found, using dummy regulator
    [   13.130110] [drm] Initialized pvr 1.14.3699939 20110701 on minor 0
    [   13.133652] pwm-backlight backlight: GPIO lookup for consumer enable
    [   13.133685] pwm-backlight backlight: using device tree for GPIO lookup
    [   13.133705] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   13.133718] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   13.133731] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   13.133746] pwm-backlight backlight: lookup for GPIO enable failed
    [   13.133791] backlight supply power not found, using dummy regulator
    [   13.136163] PM: no-rtc available, rtc-only mode disabled.
    [   13.169942] pwm-backlight backlight: GPIO lookup for consumer enable
    [   13.169978] pwm-backlight backlight: using device tree for GPIO lookup
    [   13.169999] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   13.170014] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   13.170027] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   13.170041] pwm-backlight backlight: lookup for GPIO enable failed
    [   13.170086] backlight supply power not found, using dummy regulator
    [   13.467494] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   15.299449] net eth0: initializing cpsw version 1.12 (0)
    [   15.299507] net eth0: initialized cpsw ale version 1.4
    [   15.299522] net eth0: ALE Table size 1024
    [   15.302225] net eth0: phy found : id is : 0x7c0f1
    [   15.302320] libphy: PHY 4a101000.mdio:01 not found
    [   15.307146] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
    [   15.384955] Bluetooth: Core ver 2.21
    [   15.385127] NET: Registered protocol family 31
    [   15.385140] Bluetooth: HCI device and connection manager initialized
    [   15.385171] Bluetooth: HCI socket layer initialized
    [   15.385191] Bluetooth: L2CAP socket layer initialized
    [   15.385263] Bluetooth: SCO socket layer initialized
    [   15.573789] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   15.770140] random: nonblocking pool is initialized
    [   16.317617] NET: Registered protocol family 15
    [   17.313048] Initializing XFRM netlink socket
    [   21.083249] pwm-backlight backlight: GPIO lookup for consumer enable
    [   21.083286] pwm-backlight backlight: using device tree for GPIO lookup
    [   21.083307] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   21.083321] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   21.083334] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   21.083348] pwm-backlight backlight: lookup for GPIO enable failed
    [   21.083393] backlight supply power not found, using dummy regulator
    [   21.393553] usbcore: registered new interface driver usbfs
    [   21.393680] usbcore: registered new interface driver hub
    [   21.426035] usbcore: registered new device driver usb
    [   21.618928] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [   21.618963] musb-hdrc: MHDRC RTL version 2.0 
    [   21.618976] musb-hdrc: setup fifo_mode 4
    [   21.619001] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [   21.632540] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [   21.632611] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [   21.640689] hub 1-0:1.0: USB hub found
    [   21.651076] hub 1-0:1.0: 1 port detected
    [   21.653238] pwm-backlight backlight: GPIO lookup for consumer enable
    [   21.653269] pwm-backlight backlight: using device tree for GPIO lookup
    [   21.653288] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   21.653303] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   21.653316] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   21.653330] pwm-backlight backlight: lookup for GPIO enable failed
    [   21.653373] backlight supply power not found, using dummy regulator
    [   21.655485] pwm-backlight backlight: GPIO lookup for consumer enable
    [   21.655511] pwm-backlight backlight: using device tree for GPIO lookup
    [   21.655528] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   21.655542] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   21.655554] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   21.655568] pwm-backlight backlight: lookup for GPIO enable failed
    [   21.655601] backlight supply power not found, using dummy regulator
    [   21.698307] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [   21.698340] musb-hdrc: MHDRC RTL version 2.0 
    [   21.698352] musb-hdrc: setup fifo_mode 4
    [   21.698374] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [   21.698545] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [   21.698592] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    [   21.700425] pwm-backlight backlight: GPIO lookup for consumer enable
    [   21.700453] pwm-backlight backlight: using device tree for GPIO lookup
    [   21.700472] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   21.700486] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   21.700498] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   21.700513] pwm-backlight backlight: lookup for GPIO enable failed
    [   21.700557] backlight supply power not found, using dummy regulator
    [   21.772645] hub 2-0:1.0: USB hub found
    [   21.795925] hub 2-0:1.0: 1 port detected
    [   21.798292] pwm-backlight backlight: GPIO lookup for consumer enable
    [   21.798322] pwm-backlight backlight: using device tree for GPIO lookup
    [   21.798342] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   21.798356] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   21.798370] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   21.798385] pwm-backlight backlight: lookup for GPIO enable failed
    [   21.798428] backlight supply power not found, using dummy regulator
    [   21.800770] pwm-backlight backlight: GPIO lookup for consumer enable
    [   21.800798] pwm-backlight backlight: using device tree for GPIO lookup
    [   21.800817] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   21.800830] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   21.800844] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   21.800858] pwm-backlight backlight: lookup for GPIO enable failed
    [   21.800895] backlight supply power not found, using dummy regulator
    [   21.824124] pwm-backlight backlight: GPIO lookup for consumer enable
    [   21.824162] pwm-backlight backlight: using device tree for GPIO lookup
    [   21.824182] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [   21.824196] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [   21.824209] pwm-backlight backlight: using lookup tables for GPIO lookup
    [   21.824223] pwm-backlight backlight: lookup for GPIO enable failed
    [   21.824267] backlight supply power not found, using dummy regulator
    [   28.337349] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    [   28.617829] using random self ethernet address
    [   28.617866] using random host ethernet address
    [   28.617888] using host ethernet address: 68:C9:0B:BB:31:DB
    [   28.617929] using random self ethernet address
    [   28.617945] using random host ethernet address
    [   28.617961] using host ethernet address: 68:C9:0B:BB:31:DB
    [   28.622910] usb0: HOST MAC 68:c9:0b:bb:31:db
    [   28.623813] usb0: MAC ae:53:a5:c0:81:25
    [   28.766854] Mass Storage Function, version: 2009/09/11
    [   28.766891] LUN: removable file: (no medium)
    [   28.767192] LUN: removable read only file: /dev/mmcblk0p1
    [   28.767206] Number of LUNs=1
    [   28.788139] g_multi gadget: Multifunction Composite Gadget
    [   28.788177] g_multi gadget: g_multi ready
    [   29.127686] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
    
    [  OK  ] Found device /dev/ttyS3.
    [  OK  ] Found device /dev/mmcblk0p1.
    [  OK  ] Started uim-sysfs.service.
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
            autoconf
            binutils
            bison-dev
            bison
            cpp-symlinks
            cpp
            dosfstools
            g++-symlinks
            g++
            gawk-dev
            gawk
            gcc-symlinks
            gcc
            gdb
            gdbserver
            gstreamer1.0-libav
            hidapi
            libcairo-perf-utils
            libgmp10
            libidn11
            libmpc3
            libmpfr4
            m4-dev
            m4
            make
            nettle
            swig-dev
            swig
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
            autoconf
            binutils
            bison-dev
            bison
            cpp-symlinks
            cpp
            dosfstools
            g++-symlinks
            g++
            gawk-dev
            gawk
            gcc-symlinks
            gcc
            gdb
            gdbserver
            gstreamer1.0-libav
            hidapi
            libcairo-perf-utils
            libgmp10
            libidn11
            libmpc3
            libmpfr4
            m4-dev
            m4
            make
            nettle
            swig-dev
            swig
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    [  OK  ] Started Print notice about GPLv3 packages.
    [  OK  ] Started Telephony service.
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Started Login Service.
             Starting rc.pvr.service...
             Starting Start USB gadget...
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    [  OK  ] Reached target Network.
             Starting Lightning Fast Webserver With Light System Requirements...
             Starting Network Name Resolution...
    [  OK  ] Started Serial Getty on ttyS0.
    [  OK  ] Started Serial Getty on ttyS3.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Lightning Fast Webserver With Light System Requirements.
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Started rc.pvr.service.
    [  OK  ] Found device /dev/ttyGS0.
    [  OK  ] Started Start USB gadget.
    [  OK  ] Started Serial Getty on ttyGS0.
             Starting weston.service...
             Mounting Configuration File System...
    [  OK  ] Mounted Configuration File System.
    [  OK  ] Started weston.service.
             Starting Terminate Psplash Boot Screen...
             Starting busybox-udhcpd.service...
             Starting zmvp.service...
    [FAILED] Failed to start Terminate Psplash Boot Screen.
    See 'systemctl status psplash-stop.service' for details.
    [  OK  ] Started busybox-udhcpd.service.
    [  OK  ] Started zmvp.service.
             Starting rng-tools.service...
    [  OK  ] Started rng-tools.service.
             Starting thermal-zone-init.service...
             Starting parse-ip.service...
    [  OK  ] Started thermal-zone-init.service.
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org am335x-evm ttyS0
    
    Arago 2016.12 am335x-evm ttyS0
    
    am335x-evm login:
    
    1680.am335x_evm.tar.gz

  • Ravikumar,

    You have the below messages in the log:

    pwm-backlight backlight: GPIO lookup for consumer enable

    pwm-backlight backlight: using device tree for GPIO lookup

    of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'

    of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'

    pwm-backlight backlight: using lookup tables for GPIO lookup

    pwm-backlight backlight: lookup for GPIO enable failed

    It seems to me you are using DTB file that is based on old DTS file. When you modify your DTS file, do you compile it to DTB file and the use this new DTB file when booting? From this log, it seems to me that "enable-gpios" entry is still available in your DTB file.

    omap_timer 4804a000.timer: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/timer7_pins_default, deferring probe

    The above message does not look correct also. You can also debug in that direction.

    Regards,
    Pavel