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.

"No ETH PHY detected" error in Leopard DM368

Other Parts Discussed in Thread: THS7303, ASH, TVP7002, TVP5146, THS7353

Dear friends

I am trying to use RidgeRun SDK DM36X to boot a Leopard DM368 camera from SD Card. Indeed to build the image file I followed the provided instruction within the below link:

https://developer.ridgerun.com/wiki/index.php/Getting_Started_Guide_for_DM368_DM365_LeopardBoard

After getting the image file through compile process and flashing the SD card, during the boot process, I got the following error:

*** Warning - booting from SD, using default environment
Net:   No ETH PHY detected!!!
DaVinci-EMAC
Hit any key to stop autoboot:  0

Is there anyone that could address this issue before?

I really appreciate your help.

Regards,

Dawood

  • Dawood,

    The Ethernet Forum has a focus on stand alone Ethernet Phy and MacPhy devices.  I moved your post to the DM3x DaVinci Video Processor Forum so that it can get the visibility it needs. 

    Patrick

  • Hi,

    Are you using EVM board or custom board?

    If it is custom board , plz check your h/w connections (reset pins ),

    If it is EVM board, what is the u-boot config file used to build?

    Is this your own build-ed u-boot binary or pre-built binary?

    refer the below link

    http://e2e.ti.com/support/embedded/linux/f/354/p/314038/1092981.aspx#1092981

  • Dear Titus

    Thanks for your response. I am using LNCQ112IMX136 Leopard Camera which is using TI DM368 platform.

    https://www.leopardimaging.com/LNCQ112IMX136.html#0

    I have prepared a compiled image of RidgeRun Linux and moved the image file into the SD Card. Then, I configured the board (by setting DIPSWITCH) to boot from SD card. The image can be loaded successfully and I can login into the RidgeRun Linux through Serial Console, but I can't have an Ethernet connection! Although the ethernet interface has been detected by RidgeRun Linux (after boot process) and I can see and even set IP address for it (eth0), it is not able to send or receive packets!!!

    I didn't build any u-boot config. Indeed, I just followed all instructions that is provided in below link that it should be a per-build binary file:

    https://developer.ridgerun.com/wiki/index.php/Getting_Started_Guide_for_DM368_DM365_LeopardBoard

    Also, I didn't find anything special in device manual to enable ETH port through hardware pin.

    Please let me know if you have any experience on this subject.

    Thanks.

    Regards,

    Dawood

  • Hi Dawood,

    Can you please provide your complete bootup logs from u-boot to kernel login shell?

    Although the ethernet interface has been detected by RidgeRun Linux (after boot process) and I can see and even set IP address for it (eth0), it is not able to send or receive packets!!!

    You meant that you cant ping your host Ip addr from ur board!

    Plz share  your board file from linux source, we can start to dig into linux source first

    What about your make of Ethernet PHY & h/w ?

    linux-source/arch/arm/mach-davinci/board-dm368-leobard-camera.c

    board-dm368-leobard-camera.c ---> this name may change & check for which appropriate .o file has been created

  • Dear Titus

    Thanks for your response. You may find boot log information of the board within the below lines:

    ------------------------------------------------------------------

    UBL Jan 29 2014 12:35:47


    U-Boot 2010.12-rc2-00000-g61b2f22-dirty (Jan 29 2014 - 12:35:52)

    Cores: ARM 432 MHz
    DDR:   340 MHz
    I2C:   ready
    DRAM:  128 MiB
    NAND:  256 MiB
    MMC:   davinci: 0, davinci: 1
    *** Warning - booting from SD, using default environment

    Net:   No ETH PHY detected!!!
    DaVinci-EMAC
    Hit any key to stop autoboot:  0
    reading uEnv.txt

    467 bytes read
    Importing environment from mmc ...
    Running uenvcmd ...
    reading uImage

    4322112 bytes read
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   "RR Linux Kernel"
       Created:      2014-01-29   6:50:43 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4322048 Bytes = 4.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Linux version 2.6.32-17-ridgerun (root@TIL) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 PREEMPT Wed Jan 29 12:41:42 MYT 2014
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: DM368 Leopard
    Memory policy: ECC disabled, Data cache writeback
    DaVinci dm36x_rev1.2 variant 0x8
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 21082
    Kernel command line: davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=1080I-30  davinci_display.cont2_bufsize=13631488 vpfe_capture.cont_bufoffset=13631488 vpfe_capture.cont_bufsize=12582912 video=davincifb:osd1=0x0x8:osd0=1920x1080x16,4050K@0,0:vid0=off:vid1=off  console=ttyS0,115200n8  dm365_imp.oper_mode=0  vpfe_capture.interface=1  mem=83M root=/dev/mmcblk0p2 rootdelay=2 rootfstype=ext3
    PID hash table entries: 512 (order: -1, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 83MB = 83MB total
    Memory: 79700KB available (3904K code, 291K data, 128K init, 0K highmem)
    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 215.44 BogoMIPS (lpj=1077248)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    DaVinci: 8 gpio irqs
    NET: Registered protocol family 16
    davinci_serial_init:97: failed to get UART2 clock
    bio: create slab <bio-0> at 0
    DM365 IPIPE initialized in Single Shot mode
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    vpss vpss: dm365_vpss vpss probed
    vpss vpss: dm365_vpss vpss probe success
    dm365_afew_hw_init
    ch0 default output "COMPONENT", mode "1080I-30"
    davinci_venc davinci_venc: Desired VENC clock not available
    davinci_venc davinci_venc: PLL's doesnot yield required VENC clk
    VPBE Encoder Initialized
    LogicPD encoder initialized
    Switching to clocksource timer0_1
    musb_hdrc: version 6.0, cppi-dma, host, debug=0
    musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
    musb_hdrc musb_hdrc: MUSB HDRC host driver
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    msgmni has been set to 155
    alg: No test for stdrng (krng)
    io scheduler noop registered
    io scheduler anticipatory registered (default)
    davincifb davincifb.0: dm_osd0_fb: 1920x1080x16@0,0 with framebuffer size 4050KB
    davincifb davincifb.0: dm_osd1_fb: 0x0x8@0,0 with framebuffer size 4050KB
    DM365 IPIPEIF probed
    imp serializer initialized
    davinci_previewer initialized
    davinci_resizer initialized
    Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
    console [ttyS0] enabled
    brd: module loaded
    loop: module loaded
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
    davinci_nand davinci_nand.0: controller rev. 2.3
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new interface driver usbtest
    i2c /dev entries driver
    Linux video capture interface: v2.00
    ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
    vpfe_init
    vpfe-capture: vpss clock vpss_master enabled
    vpfe-capture vpfe-capture: v4l2 device registered
    vpfe-capture vpfe-capture: video device registered
    mt9p031 1-0048: No MT9P031 chip detected, register read ffffff87
    vpfe-capture vpfe-capture: v4l2 sub device mt9p031 register fails
    No sub devices registered
    vpfe-capture: vpfe capture clocks disabled
    vpfe_register_ccdc_device: DM365 ISIF
    dm365_isif: probe of dm365_isif failed with error -22
    af major#: 252, minor# 0
    AF Driver initialized
    aew major#: 251, minor# 0
    AEW Driver initialized
    Trying to register davinci display video device.
    layer=c40f0400,layer->video_dev=c40f0564
    Trying to register davinci display video device.
    layer=c40f0800,layer->video_dev=c40f0964
    davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
    watchdog watchdog: heartbeat 60 sec
    davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
    usbcore: registered new interface driver usbhid
    usbhid: v2.6:USB HID core driver
    Advanced Linux Sound Architecture Driver Version 1.0.21.
    No device for DAI tlv320aic3x
    No device for DAI davinci-i2s
    asoc: tlv320aic3x <-> davinci-i2s mapping ok
    ALSA device list:
      #0: DaVinci DM365 EVM (tlv320aic3x)
    TCP cubic registered
    NET: Registered protocol family 17
    Clocks: disable unused mmcsd1
    Clocks: disable unused spi0
    Clocks: disable unused spi1
    Clocks: disable unused spi2
    Clocks: disable unused spi3
    Clocks: disable unused spi4
    Clocks: disable unused pwm0
    Clocks: disable unused pwm1
    Clocks: disable unused pwm2
    Clocks: disable unused pwm3
    Clocks: disable unused timer1
    Clocks: disable unused timer3
    Clocks: disable unused adc
    Clocks: disable unused emac
    Clocks: disable unused voice_codec
    Clocks: disable unused rto
    Clocks: disable unused mjcp
    davinci_emac_probe: using random MAC addr: de:c6:36:6b:5e:e9
    emac-mii: probed
    Waiting 2sec before mounting root device...
    mmc0: host does not support reading read-only switch. assuming write-enable.
    mmc0: new high speed SDHC card at address b368
    mmcblk0: mmc0:b368 SDC   7.41 GiB
     mmcblk0: p1 p2
    kjournald starting.  Commit interval 5 seconds
    EXT3 FS on mmcblk0p2, internal journal
    EXT3-fs: recovery complete.
    EXT3-fs: mounted filesystem with writeback data mode.
    VFS: Mounted root (ext3 filesystem) on device 179:2.
    Freeing init memory: 128K
    init started: BusyBox v1.18.2 (2014-01-29 12:53:12 MYT)
    starting pid 992, tty '': '/etc/rcS'
    Starting System
    done.
    Welcome to
    __________ .__     .___               __________
    \______   \|__|  __| _/  ____    ____ \______   \ __ __   ____
     |       _/|  | / __ |  / ___\ _/ __ \ |       _/|  |  \ /    \
     |    |   \|  |/ /_/ | / /_/  >\  ___/ |    |   \|  |  /|   |  \
     |____|_  /|__|\____ | \___  /  \___  >|____|_  /|____/ |___|  /
            \/          \//_____/       \/        \/             \/

        Embedded Linux Solutions

    For further information see:
    http://www.ridgerun.com
    Build host: TIL
    Built by: root
    Build date: Wed, 29 Jan 2014 15:01:51 +0800
    Build tag: leopard
    Configuring network interfaces
    udhcpc (v1.18.2) started
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, failing
    Error while running '/etc/rc.d/S30network'.
    Starting D-Bus message bus system
    Starting Ipipe daemon
    Loading coprocessors modules...
      Loading cmem from 0x86c00000 to 0x87c00000
    CMEMK module: built on Jan 29 2014 at 13:49:11
      Reference Linux version 2.6.32
      File /opt/RidgeRun-SDK-DM36x-Turrialba-Eval/proprietary/dvsdk-4_02_00_06/dvsdk/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    allocated heap buffer 0xcb000000 of size 0x1000000
    heap fallback enabled - will try heap if pool buffer is not available
    CMEM Range Overlaps Kernel Physical - allowing overlap
    CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x85300000)
    cmemk initialized
    EDMAK module: built on Jan 29 2014 at 13:49:20
      Reference Linux version 2.6.32
      File /opt/RidgeRun-SDK-DM36x-Turrialba-Eval/proprietary/dvsdk-4_02_00_06/dvsdk/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
    IRQK module: built on Jan 29 2014 at 13:49:17
      Reference Linux version 2.6.32
      File /opt/RidgeRun-SDK-DM36x-Turrialba-Eval/proprietary/dvsdk-4_02_00_06/dvsdk/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
    irqk initialized
    Starting Dropbear SSH server: dropbear.
    Starting RTSP server

    Please press Enter to activate this console.
    starting pid 1134, tty '/dev/ttyS0': '-/bin/sh'


    BusyBox v1.18.2 (2014-01-29 12:53:12 MYT) built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    / #
    / # ifconfig eth0 172.17.20.25 netmask 255.255.224.0
    / # ifconfig
    eth0      Link encap:Ethernet  HWaddr DE:C6:36:6B:5E:E9
              inet addr:172.17.20.25  Bcast:172.17.31.255  Mask:255.255.224.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:966 (966.0 B)
              Interrupt:52 Base address:0x7000

    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    / # ping 172.17.20.25
    PING 172.17.20.25 (172.17.20.25): 56 data bytes
    64 bytes from 172.17.20.25: seq=0 ttl=64 time=0.761 ms
    64 bytes from 172.17.20.25: seq=1 ttl=64 time=0.447 ms
    64 bytes from 172.17.20.25: seq=2 ttl=64 time=0.382 ms
    ^C
    --- 172.17.20.25 ping statistics ---
    3 packets transmitted, 3 packets received, 0% packet loss
    round-trip min/avg/max = 0.382/0.530/0.761 ms
    -------------------------------------------------------------------------

    As you can see, eth0 interface is detected and I can assign IP address to it, but it is not able to ping the gateway or any other IP address in the same subnet! I checked the ethernet cable and port with other devices (PC) and it is fine, but I can't figure out why the Camera board (DM368) is not able to communicate with other ethernet devices!

    Regarding the existence of board-dm368-leopard.c file, I have a file with this name under the path that you mentioned. May I know what element should be checked inside this file? The full path of the file is:

    #/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/arch/arm/mach-davinci/board-dm368-leopard.c

    Also, I checked the existence of Object file (board-dm368-leopard.o) and it has been created already in the following path:

    #/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/arch/arm/mach-davinci/board-dm368-leopard.o

    I hope this information can help you to guide me for finding a solution for my problem?

    At the end of the day, I need to capture video and images through this camera/SDK and transfer the captured information through Ethernet to other devices.

    Regards,

    Dawood

  • Hi Dawood,

    Please enable appropriate "EMAC" , "MDIO" and MII or RMII driver in your board file,

    I think that you missed ethernet initialization in your board file.

    Just do code walk through board-da850-evm.c board file for enabling EMAC, MDIO & MII | RMII  for ethernet

    Understand and enable in your leobard board file as per your h/w.

  • Hi Dawood,

    What about your make of MAKE of Ethernet PHY & Hardware Chip ?

    Please apply below patch in your board file to enable MDIO for ethernet.

    DM36x MDIO configuration

    The first problem encountered was the kernel board file wasn't properly telling Linux about the PHY being used.

    The following was added to the arch/arm/mach-davinci/board-*.c

    /* PHY_MASK indicates to the davinci_emac driver which MDIO addresses
     * to scan for PHY's.  Whatever bits are 1 in this mask are the addresses that
     * that davinci_emac driver will look for a PHY. */
    #define DM36x_PHY_MASK    (0x1)
    #define DM36x_MDIO_FREQUENCY  (2200000) /* PHY bus frequency */
    
    ....
    
    static void dm368_emac_configure(void)
    {
            struct davinci_soc_info *soc_info = &davinci_soc_info;
    
            /* Specify the set of possibly populated  phy addresses */
            soc_info->emac_pdata->phy_mask = DM36x_PHY_MASK;
            soc_info->emac_pdata->mdio_max_freq = DM36x__MDIO_FREQUENCY;
    
    refer this link & let me know the status,

    https://developer.ridgerun.com/wiki/index.php/DM368_DM365_Ethernet_cable_plug_unplug

    By seeing the below message from MII driver that you have enabled driver but not board init, so apply the above patch,

    emac-mii: probed


    After that ,Check the clock signals of EMAC from h/w,

    Clocks: disable unused emac

  • Dear Titus

    Regarding your instructions, I have appended the following lines (blue lines) within the board-dm368-leopard.c file which is located in the below path:

    /opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/arch/arm/mach-davinci/board-dm368-leopard.c

    #define DM365_EVM_PHY_MASK              (0x1)
    #define DM365_EVM_MDIO_FREQUENCY        (2200000) /* PHY bus frequency */

    static void dm368leopard_emac_configure(void)
    {
            /*
             * EMAC pins are multiplexed with GPIO and UART
             * Further details are available at the DM368 ARM
             * Subsystem Users Guide(sprufg5.pdf) pages 125 - 127
             */
            //-------------Added by Dawood at 4 Feb 2014-----------------
            struct davinci_soc_info *soc_info = &davinci_soc_info;
            /* Specify the set of possibly populated  phy addresses */
            soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK;
            soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY;
            //----------------------------------------------------------------------------

    After adding the above lines into the board-dm368-leopard.c file, I executed make & make install commands and then I copied the new generated sd-image file into the SD Card. After booting the board from new generated image (from SD Card), still I can't communicate with other network devices through Ethernet port. Also, I checked Ethernet cable status through /sys/class/net/eth0/carrier file, but there is no change in this file when I unplug the Ethernet cable!!!

    Is there anything else that I can do? I am not sure about the file. I chose board-dm368-leopard.c based on my board model (DM368). Please let me know if you get any clue.

    Regards,

    Dawood

  • Hi Dawood,

    Can you please share your board file from this location "/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/arch/arm/mach-davinci/board-dm368-leopard.c" ?

    I ll do this for you.

    It is easy to me to find where is the problem exactly, then you can find difference between your file & modified one,

    share your previous bootup log (which is modified for MDIO)

    Try to probe the hardware ethernet clock pin. (I think its not required because it is EVM board right!)

  • Dear Titus

    Thanks for your help. You may find the board-dm368-leopard.c file in the following lines. It is the file that I modified based on your comments (I have specified my comments within the file).

    ---------------------------------

    board-dm368-leopard

    ---------------------------------

    /*
     * DM368 Leopard Board
     *
     * Derived from: arch/arm/mach-davinci/board-dm365-evm.c
     * RidgeRun Copyright (C) 2011.
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation version 2.
     *
     * This program is distributed "as is" WITHOUT ANY WARRANTY of any
     * kind, whether express or implied; without even the implied warranty
     * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     */

    /**************************************************************************
     * Included Files
     **************************************************************************/
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/autoconf.h>
    #include <linux/init.h>
    #include <linux/dma-mapping.h>
    #include <linux/i2c.h>
    #include <linux/io.h>
    #include <linux/clk.h>
    #include <linux/i2c/at24.h>
    #include <linux/leds.h>
    #include <linux/mtd/mtd.h>
    #include <linux/mtd/partitions.h>
    #include <linux/mtd/nand.h>
    #include <linux/input.h>
    #include <linux/spi/spi.h>
    #include <linux/spi/eeprom.h>
    #include <asm/setup.h>
    #include <asm/mach-types.h>
    #include <asm/mach/arch.h>
    #include <asm/mach/map.h>
    #include <mach/mux.h>
    #include <mach/hardware.h>
    #include <mach/dm365.h>
    #include <mach/psc.h>
    #include <mach/common.h>
    #include <mach/i2c.h>
    #include <mach/serial.h>
    #include <mach/mmc.h>
    #include <mach/nand.h>
    #include <mach/keyscan.h>
    #include <mach/gpio.h>
    #include <linux/videodev2.h>
    #include <media/davinci/videohd.h>
    #include <media/davinci/dm365_generic_prgb_encoder.h>
    #include <media/tvp514x.h>
    #include <media/tvp7002.h>

    #define DM365_EVM_PHY_MASK        (0x1)
    #define DM365_EVM_MDIO_FREQUENCY    (2200000) /* PHY bus frequency */

    #define DM365_ASYNC_EMIF_CONTROL_BASE    0x01d10000
    #define DM365_ASYNC_EMIF_DATA_CE0_BASE    0x02000000
    #define DM365_ASYNC_EMIF_DATA_CE1_BASE    0x04000000

    static struct snd_platform_data dm368_leopard_snd_data = {
        .eventq_no = EVENTQ_3,
    };

    static struct i2c_board_info i2c_info[] = {
        {
            I2C_BOARD_INFO("tlv320aic3x", 0x18),
        },
        {
            I2C_BOARD_INFO("ths7303", 0x2c),
        }
    };

    static struct davinci_i2c_platform_data i2c_pdata = {
        .bus_freq    = 400    /* kHz */,
        .bus_delay    = 0    /* usec */,
        .sda_pin        = 21,
        .scl_pin        = 20,
    };

    #if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE)
    /* Input available at the mt9p031 */
    static struct v4l2_input mt9p031_inputs[] = {
        {
            .index = 0,
            .name = "Camera",
            .type = V4L2_INPUT_TYPE_CAMERA,
        }
    };
    #endif

    #if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
    static struct tvp514x_platform_data tvp5146_pdata = {
           .clk_polarity = 0,
           .hs_polarity = 1,
           .vs_polarity = 1
    };


    #define TVP514X_STD_ALL        (V4L2_STD_NTSC | V4L2_STD_PAL)
    /* Inputs available at the TVP5146 */
    static struct v4l2_input tvp5146_inputs[] = {
        {
            .index = 0,
            .name = "Composite",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP514X_STD_ALL,
        },
        {
            .index = 1,
            .name = "S-Video",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP514X_STD_ALL,
        },
    };

    /*
     * this is the route info for connecting each input to decoder
     * ouput that goes to vpfe. There is a one to one correspondence
     * with tvp5146_inputs
     */
    static struct vpfe_route tvp5146_routes[] = {
        {
            .input = INPUT_CVBS_VI2B,
            .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
        },
        {
            .input = INPUT_SVIDEO_VI2C_VI1C,
            .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
        },
    };
    #endif

    #if defined(CONFIG_VIDEO_TVP7002) || defined(CONFIG_VIDEO_TVP7002_MODULE)
    /* tvp7002 platform data, used during reset and probe operations */
    static struct tvp7002_platform_data tvp7002_pdata = {
           .clk_polarity = 0,
           .hs_polarity = 0,
           .vs_polarity = 0,
           .fid_polarity = 0,
    };


    #define TVP7002_STD_ALL        (V4L2_STD_525P_60   | V4L2_STD_625P_50     |\
                    V4L2_STD_NTSC      | V4L2_STD_PAL       |\
                    V4L2_STD_720P_50   | V4L2_STD_720P_60     |\
                    V4L2_STD_1080I_50  | V4L2_STD_1080I_60     |\
                    V4L2_STD_1080P_50  | V4L2_STD_1080P_60)

    /* Inputs available at the TVP7002 */
    static struct v4l2_input tvp7002_inputs[] = {
        {
            .index = 0,
            .name = "Component",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP7002_STD_ALL,
        },
    };
    #endif


    static struct vpfe_subdev_info vpfe_sub_devs[] = {
    #if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
        {
            .module_name = "tvp5146",
            .grp_id = VPFE_SUBDEV_TVP5146,
            .num_inputs = ARRAY_SIZE(tvp5146_inputs),
            .inputs = tvp5146_inputs,
            .routes = tvp5146_routes,
            .can_route = 1,
            .ccdc_if_params = {
                .if_type = VPFE_BT656,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("tvp5146", 0x5d),
                .platform_data = &tvp5146_pdata,
            },
        },
    #endif
    #if defined(CONFIG_VIDEO_TVP7002) || defined(CONFIG_VIDEO_TVP7002_MODULE)
        {
            .module_name = "tvp7002",
            .grp_id = VPFE_SUBDEV_TVP7002,
            .num_inputs = ARRAY_SIZE(tvp7002_inputs),
            .inputs = tvp7002_inputs,
            .ccdc_if_params = {
                .if_type = VPFE_BT1120,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("tvp7002", 0x5c),
                .platform_data = &tvp7002_pdata,
            },
        },
        {
            .module_name = "ths7353",
            .grp_id = VPFE_SUBDEV_TVP7002,
            .board_info = {
                I2C_BOARD_INFO("ths7353", 0x2e),
            },
        },
    #endif
    #if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE)
        {
            .module_name = "mt9p031",
            .is_camera = 1,
            .grp_id = VPFE_SUBDEV_MT9P031,
            .num_inputs = ARRAY_SIZE(mt9p031_inputs),
            .inputs = mt9p031_inputs,
            .ccdc_if_params = {
                .if_type = VPFE_RAW_BAYER,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("mt9p031", 0x48),
                /* this is for PCLK rising edge */
                .platform_data = (void *)1,
            },
        }
    #endif
    };

    static struct vpfe_config vpfe_cfg = {
           .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
           .sub_devs = vpfe_sub_devs,
           .card_name = "DM368 Leopard",
           .ccdc = "DM365 ISIF",
           .num_clocks = 1,
           .clocks = {"vpss_master"},
    };

    /*Need to review if this is necessary*/
    static struct davinci_mmc_config dm368leopard_mmc_config = {
        .wires        = 4,
        .max_freq    = 50000000,
        .caps        = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
        .version    = MMC_CTLR_VERSION_2,
    };

    static void dm368leopard_emac_configure(void)
    {
        /*
         * EMAC pins are multiplexed with GPIO and UART
         * Further details are available at the DM368 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 125 - 127
         */
        //-------------Added by Dawood at 4 Feb 2014-----------------
            struct davinci_soc_info *soc_info = &davinci_soc_info;
            /* Specify the set of possibly populated  phy addresses */
            soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK;
            soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY;
        //-----------------------------------------------------------
        davinci_cfg_reg(DM365_EMAC_TX_EN);
        davinci_cfg_reg(DM365_EMAC_TX_CLK);
        davinci_cfg_reg(DM365_EMAC_COL);
        davinci_cfg_reg(DM365_EMAC_TXD3);
        davinci_cfg_reg(DM365_EMAC_TXD2);
        davinci_cfg_reg(DM365_EMAC_TXD1);
        davinci_cfg_reg(DM365_EMAC_TXD0);
        davinci_cfg_reg(DM365_EMAC_RXD3);
        davinci_cfg_reg(DM365_EMAC_RXD2);
        davinci_cfg_reg(DM365_EMAC_RXD1);
        davinci_cfg_reg(DM365_EMAC_RXD0);
        davinci_cfg_reg(DM365_EMAC_RX_CLK);
        davinci_cfg_reg(DM365_EMAC_RX_DV);
        davinci_cfg_reg(DM365_EMAC_RX_ER);
        davinci_cfg_reg(DM365_EMAC_CRS);
        davinci_cfg_reg(DM365_EMAC_MDIO);
        davinci_cfg_reg(DM365_EMAC_MDCLK);

        /*
         * EMAC interrupts are multiplexed with GPIO interrupts
         * Details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 133 - 134
         */
        davinci_cfg_reg(DM365_INT_EMAC_RXTHRESH);
        davinci_cfg_reg(DM365_INT_EMAC_RXPULSE);
        davinci_cfg_reg(DM365_INT_EMAC_TXPULSE);
        davinci_cfg_reg(DM365_INT_EMAC_MISCPULSE);
    }

    static void dm368leopard_mmc_configure(void)
    {
        /*
         * MMC/SD pins are multiplexed with GPIO and EMIF
         * Further details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131
         */
        davinci_cfg_reg(DM365_SD1_CLK);
        davinci_cfg_reg(DM365_SD1_CMD);
        davinci_cfg_reg(DM365_SD1_DATA3);
        davinci_cfg_reg(DM365_SD1_DATA2);
        davinci_cfg_reg(DM365_SD1_DATA1);
        davinci_cfg_reg(DM365_SD1_DATA0);
    }

    static void dm368leopard_usb_configure(void)
    {
        davinci_cfg_reg(DM365_GPIO66);
        gpio_request(66, "usb");
        gpio_direction_output(66, 0);
        setup_usb(500, 8);
    }

    static void dm368leopard_tlv320aic3x_configure(void)
    {
        /*
        * CLKOUT1 pin is multiplexed with GPIO35 and SPI4
        * Further details are available at the DM365 ARM
        * Subsystem Users Guide(sprufg5.pdf) pages 118, 127 - 129
        */
        struct clk *clkout1_clk;

        davinci_cfg_reg(DM365_CLKOUT1);

        clkout1_clk = clk_get(NULL, "clkout1");
        if (IS_ERR(clkout1_clk))
            return;
        clk_enable(clkout1_clk);

        /*
        * Configure CLKOUT1 OBSCLK registers
        */

        /* (reg OCSEL) Setting OBSCLK source with Oscillator divider output enable */
        __raw_writel(0x0,IO_ADDRESS(0x01C40C00 + 0x104));

        /* (reg OSCDIV1) Setting the Oscillator divider enable with a divider ratio of 1 */
        __raw_writel(0x8000,IO_ADDRESS(0x01C40C00 + 0x124));

        /* (reg CKEN) Setting the OBSCLK clock enable */
        __raw_writel(0x02,IO_ADDRESS(0x01C40C00 + 0x148));

    }

    static void dm368leopard_prgb_out_configure(void)
    {
        /*
         * R/G/B 0 and 1 pins are multiplexed with GPIOs
         * Further details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131
         */
        davinci_cfg_reg(DM365_VOUT_B0);
        davinci_cfg_reg(DM365_VOUT_B1);
        davinci_cfg_reg(DM365_VOUT_B2);
        davinci_cfg_reg(DM365_VOUT_R0);
        davinci_cfg_reg(DM365_VOUT_R1);
        davinci_cfg_reg(DM365_VOUT_R2);
        davinci_cfg_reg(DM365_VOUT_G0);
        davinci_cfg_reg(DM365_VOUT_G1);
        davinci_cfg_reg(DM365_VOUT_COUTL_EN);
        davinci_cfg_reg(DM365_VOUT_COUTH_EN);
        davinci_cfg_reg(DM365_VOUT_LCD_OE);
        davinci_cfg_reg(DM365_VOUT_HVSYNC);
    }

    void enable_lcd(void)
    {
    }
    EXPORT_SYMBOL(enable_lcd);

    void enable_hd_clk(void)
    {
    }
    EXPORT_SYMBOL(enable_hd_clk);


    static void __init leopard_init_i2c(void)
    {
        davinci_cfg_reg(DM365_GPIO20);
        gpio_request(20, "i2c-scl");
        gpio_direction_output(20, 0);
        davinci_cfg_reg(DM365_I2C_SCL);

        davinci_init_i2c(&i2c_pdata);
        i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info));
    }

    int set_prgb_pixel_clk_output(unsigned int required_clk_rate);

    static struct davinci_gen_prgb_pdata gen_prgb_data = {
        .xres = 1280,
        .yres = 720,
        .fps = {60, 1},
        .pixel_clock_khz = 0,
        .left_margin = 300,
        .right_margin = 70,
        .upper_margin = 26,
        .lower_margin = 3,
        .hsync_len = 80,
        .vsync_len = 5,
        .flags = 0,
        .clock_set_function = NULL,
    };

    static struct platform_device gen_prgb_device = {
        .name            = PRGB_ENCODER_DRV_NAME,
        .id                = 0,
        .num_resources    = 0,
        .resource        = NULL,
        .dev            = {
            .platform_data    = &gen_prgb_data,
        },
    };

    static struct davinci_nand_pdata davinci_nand_data = {
        .mask_chipsel        = 0,
        .ecc_mode        = NAND_ECC_HW,
        .options        = NAND_SKIP_BBTSCAN | NAND_NO_SUBPAGE_WRITE,
        .ecc_bits        = 4,
    };

    static struct resource davinci_nand_resources[] = {
        {
            .start        = DM365_ASYNC_EMIF_DATA_CE0_BASE,
            .end        = DM365_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
            .flags        = IORESOURCE_MEM,
        }, {
            .start        = DM365_ASYNC_EMIF_CONTROL_BASE,
            .end        = DM365_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
            .flags        = IORESOURCE_MEM,
        },
    };

    static struct platform_device davinci_nand_device = {
        .name            = "davinci_nand",
        .id            = 0,
        .num_resources        = ARRAY_SIZE(davinci_nand_resources),
        .resource        = davinci_nand_resources,
        .dev            = {
            .platform_data    = &davinci_nand_data,
        },
    };

    static struct platform_device *dm368_leopard_devices[] __initdata = {
        &davinci_nand_device,
        &gen_prgb_device,
    };


    static struct davinci_uart_config uart_config __initdata = {
        .enabled_uarts = (1 << 0),
    };
    static void __init dm368_leopard_map_io(void)
    {
        /* setup input configuration for VPFE input devices */
        dm365_set_vpfe_config(&vpfe_cfg);
        dm365_init();
    }

    static __init void dm368_leopard_init(void)
    {
        leopard_init_i2c();
        davinci_serial_init(&uart_config);

        dm368leopard_emac_configure();
        dm368leopard_usb_configure();
        dm368leopard_mmc_configure();
        dm368leopard_prgb_out_configure();

        davinci_setup_mmc(0, &dm368leopard_mmc_config);

    #ifdef CONFIG_SND_DM365_AIC3X_CODEC
        dm365_init_asp(&dm368_leopard_snd_data);
        dm368leopard_tlv320aic3x_configure();
    #elif defined(CONFIG_SND_DM365_VOICE_CODEC)
        dm365_init_vc(&dm368_leopard_snd_data);
    #endif
        dm365_init_rtc();

        platform_add_devices(dm368_leopard_devices,
            ARRAY_SIZE(dm368_leopard_devices));
    }

    static __init void dm368_leopard_irq_init(void)
    {
        davinci_irq_init();
    }

    MACHINE_START(DM368_LEOPARD, "DM368 Leopard")
        .phys_io    = IO_PHYS,
        .io_pg_offst    = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
        .boot_params    = (0x80000100),
        .map_io        = dm368_leopard_map_io,
        .init_irq    = dm368_leopard_irq_init,
        .timer        = &davinci_timer,
        .init_machine    = dm368_leopard_init,
    MACHINE_END
    ---------------------------------

    Also the boot log message of modified image can be seen in the following files:

    ---------------------------------

    UBL Jan 29 2014 12:35:47


    U-Boot 2010.12-rc2-00000-g61b2f22-dirty (Jan 29 2014 - 12:35:52)

    Cores: ARM 432 MHz
    DDR:   340 MHz
    I2C:   ready
    DRAM:  128 MiB
    NAND:  256 MiB
    MMC:   davinci: 0, davinci: 1
    *** Warning - booting from SD, using default environment

    Net:   No ETH PHY detected!!!
    DaVinci-EMAC
    Hit any key to stop autoboot:  0
    reading uEnv.txt

    467 bytes read
    Importing environment from mmc ...
    Running uenvcmd ...
    reading uImage

    4330592 bytes read
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   "RR Linux Kernel"
       Created:      2014-02-04   9:30:49 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4330528 Bytes = 4.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Linux version 2.6.32-17-ridgerun (root@TIL) (gcc version 4.3.3 (Sourcery G++ Lit                                                                                        e 2009q1-203) ) #3 PREEMPT Tue Feb 4 16:24:55 MYT 2014
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: DM368 Leopard
    Memory policy: ECC disabled, Data cache writeback
    DaVinci dm36x_rev1.2 variant 0x8
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 21082
    Kernel command line: davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_                                                                                        mode=1080I-30  davinci_display.cont2_bufsize=13631488 vpfe_capture.cont_bufoffse                                                                                        t=13631488 vpfe_capture.cont_bufsize=12582912 video=davincifb:osd1=0x0x8:osd0=19                                                                                        20x1080x16,4050K@0,0:vid0=off:vid1=off  console=ttyS0,115200n8  dm365_imp.oper_m                                                                                        ode=0  vpfe_capture.interface=1  mem=83M root=/dev/mmcblk0p2 rootdelay=2 rootfst                                                                                        ype=ext3
    PID hash table entries: 512 (order: -1, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 83MB = 83MB total
    Memory: 79692KB available (3912K code, 291K data, 128K init, 0K highmem)
    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 215.44 BogoMIPS (lpj=1077248)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    DaVinci: 8 gpio irqs
    NET: Registered protocol family 16
    davinci_serial_init:97: failed to get UART2 clock
    bio: create slab <bio-0> at 0
    DM365 IPIPE initialized in Single Shot mode
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    vpss vpss: dm365_vpss vpss probed
    vpss vpss: dm365_vpss vpss probe success
    dm365_afew_hw_init
    ch0 default output "COMPONENT", mode "1080I-30"
    davinci_venc davinci_venc: Desired VENC clock not available
    davinci_venc davinci_venc: PLL's doesnot yield required VENC clk
    VPBE Encoder Initialized
    LogicPD encoder initialized
    Switching to clocksource timer0_1
    musb_hdrc: version 6.0, cppi-dma, host, debug=0
    musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
    musb_hdrc musb_hdrc: MUSB HDRC host driver
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    msgmni has been set to 155
    alg: No test for stdrng (krng)
    io scheduler noop registered
    io scheduler anticipatory registered (default)
    davincifb davincifb.0: dm_osd0_fb: 1920x1080x16@0,0 with framebuffer size 4050KB
    davincifb davincifb.0: dm_osd1_fb: 0x0x8@0,0 with framebuffer size 4050KB
    DM365 IPIPEIF probed
    imp serializer initialized
    davinci_previewer initialized
    davinci_resizer initialized
    Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
    console [ttyS0] enabled
    brd: module loaded
    loop: module loaded
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit                                                                                        )
    davinci_nand davinci_nand.0: controller rev. 2.3
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new interface driver usbtest
    i2c /dev entries driver
    Linux video capture interface: v2.00
    ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
    vpfe_init
    vpfe-capture: vpss clock vpss_master enabled
    vpfe-capture vpfe-capture: v4l2 device registered
    vpfe-capture vpfe-capture: video device registered
    mt9p031 1-0048: No MT9P031 chip detected, register read ffffff87
    vpfe-capture vpfe-capture: v4l2 sub device mt9p031 register fails
    No sub devices registered
    vpfe-capture: vpfe capture clocks disabled
    vpfe_register_ccdc_device: DM365 ISIF
    dm365_isif: probe of dm365_isif failed with error -22
    af major#: 252, minor# 0
    AF Driver initialized
    aew major#: 251, minor# 0
    AEW Driver initialized
    Trying to register davinci display video device.
    layer=c40fe400,layer->video_dev=c40fe564
    Trying to register davinci display video device.
    layer=c40fe800,layer->video_dev=c40fe964
    davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
    watchdog watchdog: heartbeat 60 sec
    davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
    usbcore: registered new interface driver usbhid
    usbhid: v2.6:USB HID core driver
    Advanced Linux Sound Architecture Driver Version 1.0.21.
    No device for DAI tlv320aic3x
    No device for DAI davinci-i2s
    asoc: tlv320aic3x <-> davinci-i2s mapping ok
    ALSA device list:
      #0: DaVinci DM365 EVM (tlv320aic3x)
    TCP cubic registered
    NET: Registered protocol family 17
    Clocks: disable unused mmcsd1
    Clocks: disable unused spi0
    Clocks: disable unused spi1
    Clocks: disable unused spi2
    Clocks: disable unused spi3
    Clocks: disable unused spi4
    Clocks: disable unused pwm0
    Clocks: disable unused pwm1
    Clocks: disable unused pwm2
    Clocks: disable unused pwm3
    Clocks: disable unused timer1
    Clocks: disable unused timer3
    Clocks: disable unused adc
    Clocks: disable unused emac
    Clocks: disable unused voice_codec
    Clocks: disable unused rto
    Clocks: disable unused mjcp
    davinci_emac_probe: using random MAC addr: 52:6f:4d:41:ae:31
    emac-mii: probed
    Waiting 2sec before mounting root device...
    mmc0: host does not support reading read-only switch. assuming write-enable.
    mmc0: new high speed SDHC card at address b368
    mmcblk0: mmc0:b368 SDC   7.41 GiB
     mmcblk0: p1 p2
    kjournald starting.  Commit interval 5 seconds
    EXT3 FS on mmcblk0p2, internal journal
    EXT3-fs: recovery complete.
    EXT3-fs: mounted filesystem with writeback data mode.
    VFS: Mounted root (ext3 filesystem) on device 179:2.
    Freeing init memory: 128K
    init started: BusyBox v1.18.2 (2014-01-29 12:53:12 MYT)
    starting pid 992, tty '': '/etc/rcS'
    Starting System
    done.
    Welcome to
    __________ .__     .___               __________
    \______   \|__|  __| _/  ____    ____ \______   \ __ __   ____
     |       _/|  | / __ |  / ___\ _/ __ \ |       _/|  |  \ /    \
     |    |   \|  |/ /_/ | / /_/  >\  ___/ |    |   \|  |  /|   |  \
     |____|_  /|__|\____ | \___  /  \___  >|____|_  /|____/ |___|  /
            \/          \//_____/       \/        \/             \/

        Embedded Linux Solutions

    For further information see:
    http://www.ridgerun.com
    Build host: TIL
    Built by: root
    Build date: Tue, 04 Feb 2014 17:32:22 +0800
    Build tag: leopard
    Configuring network interfaces
    udhcpc (v1.18.2) started
    Sending discover...
    Sending discover...
    Sending discover...
    No lease, failing
    Error while running '/etc/rc.d/S30network'.
    Starting D-Bus message bus system
    Starting Ipipe daemon
    Loading coprocessors modules...
      Loading cmem from 0x86c00000 to 0x87c00000
    CMEMK module: built on Jan 29 2014 at 13:49:11
      Reference Linux version 2.6.32
      File /opt/RidgeRun-SDK-DM36x-Turrialba-Eval/proprietary/dvsdk-4_02_00_06/dvsdk/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    allocated heap buffer 0xcb000000 of size 0x1000000
    heap fallback enabled - will try heap if pool buffer is not available
    CMEM Range Overlaps Kernel Physical - allowing overlap
    CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x85300000)
    cmemk initialized
    EDMAK module: built on Jan 29 2014 at 13:49:20
      Reference Linux version 2.6.32
      File /opt/RidgeRun-SDK-DM36x-Turrialba-Eval/proprietary/dvsdk-4_02_00_06/dvsdk/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/edma/src/module/edmak.c
    IRQK module: built on Jan 29 2014 at 13:49:17
      Reference Linux version 2.6.32
      File /opt/RidgeRun-SDK-DM36x-Turrialba-Eval/proprietary/dvsdk-4_02_00_06/dvsdk/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
    irqk initialized
    Starting Dropbear SSH server: dropbear.
    Starting RTSP server

    Please press Enter to activate this console.
    starting pid 1134, tty '/dev/ttyS0': '-/bin/sh'


    BusyBox v1.18.2 (2014-01-29 12:53:12 MYT) built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    / #
    ---------------------------------------

    Regards,

    Dawood

  • Hi Dawood,

    Please check your schematics and tell me

    What is your make of MAKE/vendor of Ethernet PHY & Hardware Chip ? (like SMSC PHY or anyother PHY h/w !)

    to check whether you enabled PHY linux driver (ex: SMSC PHY) or not. plz refer screen shot.

    linux-sourec# make menuconfig ARCH=arm

      │ │                                   Device Drivers  --->                                                                             │ │  
      │ │                               [*] Network device support  --->                                                                     │ │  
      │ │                               -*-   PHY Device support and infrastructure  --->                                                    │ │  
    and then select appropriate PHY driver


    I checked your board file, it everything looks good.

    1) Probe the ethernet clock pin to check the frequency.

    2) Change  #define DM365_EVM_PHY_MASK        (0x1) to #define DM365_EVM_PHY_MASK        (0x2)

    3)Use the attached board file & tell me what is the value of PINMUX3 reg.

    4) EVM board (bought simply) or your modified custom board? still im not getting

    5)If still this issue is not cleared , then surely it is a hardware problem (because the ethernet problem exists in u-boot   Net:   No ETH PHY detected!!!  ) , 

    check connection between MDCLK and PHY chip then MDIO and PHY chip.

     

    /*
     * DM368 Leopard Board
     *
     * Derived from: arch/arm/mach-davinci/board-dm365-evm.c
     * RidgeRun Copyright (C) 2011.
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation version 2.
     *
     * This program is distributed "as is" WITHOUT ANY WARRANTY of any
     * kind, whether express or implied; without even the implied warranty
     * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     */
    
    /**************************************************************************
     * Included Files
     **************************************************************************/
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/autoconf.h>
    #include <linux/init.h>
    #include <linux/dma-mapping.h>
    #include <linux/i2c.h>
    #include <linux/io.h>
    #include <linux/clk.h>
    #include <linux/i2c/at24.h>
    #include <linux/leds.h>
    #include <linux/mtd/mtd.h>
    #include <linux/mtd/partitions.h>
    #include <linux/mtd/nand.h>
    #include <linux/input.h>
    #include <linux/spi/spi.h>
    #include <linux/spi/eeprom.h>
    #include <asm/setup.h>
    #include <asm/mach-types.h>
    #include <asm/mach/arch.h>
    #include <asm/mach/map.h>
    #include <mach/mux.h>
    #include <mach/hardware.h>
    #include <mach/dm365.h>
    #include <mach/psc.h>
    #include <mach/common.h>
    #include <mach/i2c.h>
    #include <mach/serial.h>
    #include <mach/mmc.h>
    #include <mach/nand.h>
    #include <mach/keyscan.h>
    #include <mach/gpio.h>
    #include <linux/videodev2.h>
    #include <media/davinci/videohd.h>
    #include <media/davinci/dm365_generic_prgb_encoder.h>
    #include <media/tvp514x.h>
    #include <media/tvp7002.h>
    
    #define DM365_EVM_PHY_MASK        (0x1)
    #define DM365_EVM_MDIO_FREQUENCY    (2200000) /* PHY bus frequency */
    
    #define DM365_ASYNC_EMIF_CONTROL_BASE    0x01d10000
    #define DM365_ASYNC_EMIF_DATA_CE0_BASE    0x02000000
    #define DM365_ASYNC_EMIF_DATA_CE1_BASE    0x04000000
    
    static struct snd_platform_data dm368_leopard_snd_data = {
        .eventq_no = EVENTQ_3,
    };
    
    static struct i2c_board_info i2c_info[] = {
        {
            I2C_BOARD_INFO("tlv320aic3x", 0x18),
        },
        {
            I2C_BOARD_INFO("ths7303", 0x2c),
        }
    };
    
    static struct davinci_i2c_platform_data i2c_pdata = {
        .bus_freq    = 400    /* kHz */,
        .bus_delay    = 0    /* usec */,
        .sda_pin        = 21,
        .scl_pin        = 20,
    };
    
    #if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE)
    /* Input available at the mt9p031 */
    static struct v4l2_input mt9p031_inputs[] = {
        {
            .index = 0,
            .name = "Camera",
            .type = V4L2_INPUT_TYPE_CAMERA,
        }
    };
    #endif
    
    #if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
    static struct tvp514x_platform_data tvp5146_pdata = {
           .clk_polarity = 0,
           .hs_polarity = 1,
           .vs_polarity = 1
    };
    
    
    #define TVP514X_STD_ALL        (V4L2_STD_NTSC | V4L2_STD_PAL)
    /* Inputs available at the TVP5146 */
    static struct v4l2_input tvp5146_inputs[] = {
        {
            .index = 0,
            .name = "Composite",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP514X_STD_ALL,
        },
        {
            .index = 1,
            .name = "S-Video",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP514X_STD_ALL,
        },
    };
    
    /*
     * this is the route info for connecting each input to decoder
     * ouput that goes to vpfe. There is a one to one correspondence
     * with tvp5146_inputs
     */
    static struct vpfe_route tvp5146_routes[] = {
        {
            .input = INPUT_CVBS_VI2B,
            .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
        },
        {
            .input = INPUT_SVIDEO_VI2C_VI1C,
            .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
        },
    };
    #endif
    
    #if defined(CONFIG_VIDEO_TVP7002) || defined(CONFIG_VIDEO_TVP7002_MODULE)
    /* tvp7002 platform data, used during reset and probe operations */
    static struct tvp7002_platform_data tvp7002_pdata = {
           .clk_polarity = 0,
           .hs_polarity = 0,
           .vs_polarity = 0,
           .fid_polarity = 0,
    };
    
    
    #define TVP7002_STD_ALL        (V4L2_STD_525P_60   | V4L2_STD_625P_50     |\
                    V4L2_STD_NTSC      | V4L2_STD_PAL       |\
                    V4L2_STD_720P_50   | V4L2_STD_720P_60     |\
                    V4L2_STD_1080I_50  | V4L2_STD_1080I_60     |\
                    V4L2_STD_1080P_50  | V4L2_STD_1080P_60)
    
    /* Inputs available at the TVP7002 */
    static struct v4l2_input tvp7002_inputs[] = {
        {
            .index = 0,
            .name = "Component",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP7002_STD_ALL,
        },
    };
    #endif
    
    
    static struct vpfe_subdev_info vpfe_sub_devs[] = {
    #if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
        {
            .module_name = "tvp5146",
            .grp_id = VPFE_SUBDEV_TVP5146,
            .num_inputs = ARRAY_SIZE(tvp5146_inputs),
            .inputs = tvp5146_inputs,
            .routes = tvp5146_routes,
            .can_route = 1,
            .ccdc_if_params = {
                .if_type = VPFE_BT656,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("tvp5146", 0x5d),
                .platform_data = &tvp5146_pdata,
            },
        },
    #endif
    #if defined(CONFIG_VIDEO_TVP7002) || defined(CONFIG_VIDEO_TVP7002_MODULE)
        {
            .module_name = "tvp7002",
            .grp_id = VPFE_SUBDEV_TVP7002,
            .num_inputs = ARRAY_SIZE(tvp7002_inputs),
            .inputs = tvp7002_inputs,
            .ccdc_if_params = {
                .if_type = VPFE_BT1120,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("tvp7002", 0x5c),
                .platform_data = &tvp7002_pdata,
            },
        },
        {
            .module_name = "ths7353",
            .grp_id = VPFE_SUBDEV_TVP7002,
            .board_info = {
                I2C_BOARD_INFO("ths7353", 0x2e),
            },
        },
    #endif
    #if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE)
        {
            .module_name = "mt9p031",
            .is_camera = 1,
            .grp_id = VPFE_SUBDEV_MT9P031,
            .num_inputs = ARRAY_SIZE(mt9p031_inputs),
            .inputs = mt9p031_inputs,
            .ccdc_if_params = {
                .if_type = VPFE_RAW_BAYER,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("mt9p031", 0x48),
                /* this is for PCLK rising edge */
                .platform_data = (void *)1,
            },
        }
    #endif
    };
    
    static struct vpfe_config vpfe_cfg = {
           .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
           .sub_devs = vpfe_sub_devs,
           .card_name = "DM368 Leopard",
           .ccdc = "DM365 ISIF",
           .num_clocks = 1,
           .clocks = {"vpss_master"},
    };
    
    /*Need to review if this is necessary*/
    static struct davinci_mmc_config dm368leopard_mmc_config = {
        .wires        = 4,
        .max_freq    = 50000000,
        .caps        = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
        .version    = MMC_CTLR_VERSION_2,
    };
    
    static void dm368leopard_emac_configure(void)
    {
        /*
         * EMAC pins are multiplexed with GPIO and UART
         * Further details are available at the DM368 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 125 - 127
         */
        //-------------Added by Dawood at 4 Feb 2014-----------------
            struct davinci_soc_info *soc_info = &davinci_soc_info;
            /* Specify the set of possibly populated  phy addresses */
            soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK;
            soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY;
        //-----------------------------------------------------------
        davinci_cfg_reg(DM365_EMAC_TX_EN);
        davinci_cfg_reg(DM365_EMAC_TX_CLK);
        davinci_cfg_reg(DM365_EMAC_COL);
        davinci_cfg_reg(DM365_EMAC_TXD3);
        davinci_cfg_reg(DM365_EMAC_TXD2);
        davinci_cfg_reg(DM365_EMAC_TXD1);
        davinci_cfg_reg(DM365_EMAC_TXD0);
        davinci_cfg_reg(DM365_EMAC_RXD3);
        davinci_cfg_reg(DM365_EMAC_RXD2);
        davinci_cfg_reg(DM365_EMAC_RXD1);
        davinci_cfg_reg(DM365_EMAC_RXD0);
        davinci_cfg_reg(DM365_EMAC_RX_CLK);
        davinci_cfg_reg(DM365_EMAC_RX_DV);
        davinci_cfg_reg(DM365_EMAC_RX_ER);
        davinci_cfg_reg(DM365_EMAC_CRS);
        davinci_cfg_reg(DM365_EMAC_MDIO);
        davinci_cfg_reg(DM365_EMAC_MDCLK);
    
        /*
         * EMAC interrupts are multiplexed with GPIO interrupts
         * Details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 133 - 134
         */
        davinci_cfg_reg(DM365_INT_EMAC_RXTHRESH);
        davinci_cfg_reg(DM365_INT_EMAC_RXPULSE);
        davinci_cfg_reg(DM365_INT_EMAC_TXPULSE);
        davinci_cfg_reg(DM365_INT_EMAC_MISCPULSE);
    }
    
    static void dm368leopard_mmc_configure(void)
    {
        /*
         * MMC/SD pins are multiplexed with GPIO and EMIF
         * Further details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131
         */
        davinci_cfg_reg(DM365_SD1_CLK);
        davinci_cfg_reg(DM365_SD1_CMD);
        davinci_cfg_reg(DM365_SD1_DATA3);
        davinci_cfg_reg(DM365_SD1_DATA2);
        davinci_cfg_reg(DM365_SD1_DATA1);
        davinci_cfg_reg(DM365_SD1_DATA0);
    }
    
    static void dm368leopard_usb_configure(void)
    {
        davinci_cfg_reg(DM365_GPIO66);
        gpio_request(66, "usb");
        gpio_direction_output(66, 0);
        setup_usb(500, 8);
    }
    
    static void dm368leopard_tlv320aic3x_configure(void)
    {
        /*
        * CLKOUT1 pin is multiplexed with GPIO35 and SPI4
        * Further details are available at the DM365 ARM
        * Subsystem Users Guide(sprufg5.pdf) pages 118, 127 - 129
        */
        struct clk *clkout1_clk;
    
        davinci_cfg_reg(DM365_CLKOUT1);
    
        clkout1_clk = clk_get(NULL, "clkout1");
        if (IS_ERR(clkout1_clk))
            return;
        clk_enable(clkout1_clk);
    
        /*
        * Configure CLKOUT1 OBSCLK registers
        */
    
        /* (reg OCSEL) Setting OBSCLK source with Oscillator divider output enable */
        __raw_writel(0x0,IO_ADDRESS(0x01C40C00 + 0x104));
    
        /* (reg OSCDIV1) Setting the Oscillator divider enable with a divider ratio of 1 */
        __raw_writel(0x8000,IO_ADDRESS(0x01C40C00 + 0x124));
    
        /* (reg CKEN) Setting the OBSCLK clock enable */
        __raw_writel(0x02,IO_ADDRESS(0x01C40C00 + 0x148));
    
    }
    
    static void dm368leopard_prgb_out_configure(void)
    {
        /*
         * R/G/B 0 and 1 pins are multiplexed with GPIOs
         * Further details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131
         */
        davinci_cfg_reg(DM365_VOUT_B0);
        davinci_cfg_reg(DM365_VOUT_B1);
        davinci_cfg_reg(DM365_VOUT_B2);
        davinci_cfg_reg(DM365_VOUT_R0);
        davinci_cfg_reg(DM365_VOUT_R1);
        davinci_cfg_reg(DM365_VOUT_R2);
        davinci_cfg_reg(DM365_VOUT_G0);
        davinci_cfg_reg(DM365_VOUT_G1);
        davinci_cfg_reg(DM365_VOUT_COUTL_EN);
        davinci_cfg_reg(DM365_VOUT_COUTH_EN);
        davinci_cfg_reg(DM365_VOUT_LCD_OE);
        davinci_cfg_reg(DM365_VOUT_HVSYNC);
    }
    
    void enable_lcd(void)
    {
    }
    EXPORT_SYMBOL(enable_lcd);
    
    void enable_hd_clk(void)
    {
    }
    EXPORT_SYMBOL(enable_hd_clk);
    
    
    static void __init leopard_init_i2c(void)
    {
        davinci_cfg_reg(DM365_GPIO20);
        gpio_request(20, "i2c-scl");
        gpio_direction_output(20, 0);
        davinci_cfg_reg(DM365_I2C_SCL);
    
        davinci_init_i2c(&i2c_pdata);
        i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info));
    }
    
    int set_prgb_pixel_clk_output(unsigned int required_clk_rate);
    
    static struct davinci_gen_prgb_pdata gen_prgb_data = {
        .xres = 1280,
        .yres = 720,
        .fps = {60, 1},
        .pixel_clock_khz = 0,
        .left_margin = 300,
        .right_margin = 70,
        .upper_margin = 26,
        .lower_margin = 3,
        .hsync_len = 80,
        .vsync_len = 5,
        .flags = 0,
        .clock_set_function = NULL,
    };
    
    static struct platform_device gen_prgb_device = {
        .name            = PRGB_ENCODER_DRV_NAME,
        .id                = 0,
        .num_resources    = 0,
        .resource        = NULL,
        .dev            = {
            .platform_data    = &gen_prgb_data,
        },
    };
    
    static struct davinci_nand_pdata davinci_nand_data = {
        .mask_chipsel        = 0,
        .ecc_mode        = NAND_ECC_HW,
        .options        = NAND_SKIP_BBTSCAN | NAND_NO_SUBPAGE_WRITE,
        .ecc_bits        = 4,
    };
    
    static struct resource davinci_nand_resources[] = {
        {
            .start        = DM365_ASYNC_EMIF_DATA_CE0_BASE,
            .end        = DM365_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
            .flags        = IORESOURCE_MEM,
        }, {
            .start        = DM365_ASYNC_EMIF_CONTROL_BASE,
            .end        = DM365_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
            .flags        = IORESOURCE_MEM,
        },
    };
    
    static struct platform_device davinci_nand_device = {
        .name            = "davinci_nand",
        .id            = 0,
        .num_resources        = ARRAY_SIZE(davinci_nand_resources),
        .resource        = davinci_nand_resources,
        .dev            = {
            .platform_data    = &davinci_nand_data,
        },
    };
    
    static struct platform_device *dm368_leopard_devices[] __initdata = {
        &davinci_nand_device,
        &gen_prgb_device,
    };
    
    
    static struct davinci_uart_config uart_config __initdata = {
        .enabled_uarts = (1 << 0),
    };
    static void __init dm368_leopard_map_io(void)
    {
        /* setup input configuration for VPFE input devices */
        dm365_set_vpfe_config(&vpfe_cfg);
        dm365_init();
    }
    
    static __init void dm368_leopard_init(void)
    {
        unsigned int temp = 0;
        void __iomem *PINMUX3 = (void __iomem *) IO_ADDRESS(0x01C4000C); /* Titus Debug : PINMUX3 Physical address = 0x01C4000C */
    
        leopard_init_i2c();
        davinci_serial_init(&uart_config);
    
        dm368leopard_emac_configure();
        dm368leopard_usb_configure();
        dm368leopard_mmc_configure();
        dm368leopard_prgb_out_configure();
    
        davinci_setup_mmc(0, &dm368leopard_mmc_config);
    
    #ifdef CONFIG_SND_DM365_AIC3X_CODEC
        dm365_init_asp(&dm368_leopard_snd_data);
        dm368leopard_tlv320aic3x_configure();
    #elif defined(CONFIG_SND_DM365_VOICE_CODEC)
        dm365_init_vc(&dm368_leopard_snd_data);
    #endif
        dm365_init_rtc();
    
        platform_add_devices(dm368_leopard_devices,
            ARRAY_SIZE(dm368_leopard_devices));
    
        temp = __raw_readl(PINMUX3);  /* Titus Debug : Read PINMUX3 regiter to check EMAC configuration */
        printk("Updated PINMUX3 reg value for EMAC = %x\n",temp);
    
    }
    
    static __init void dm368_leopard_irq_init(void)
    {
        davinci_irq_init();
    }
    
    MACHINE_START(DM368_LEOPARD, "DM368 Leopard")
        .phys_io    = IO_PHYS,
        .io_pg_offst    = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
        .boot_params    = (0x80000100),
        .map_io        = dm368_leopard_map_io,
        .init_irq    = dm368_leopard_irq_init,
        .timer        = &davinci_timer,
        .init_machine    = dm368_leopard_init,
    MACHINE_END
    

     

  • Dear Titus

    Thanks for your response and sorry for my late reply.

    1) Where and how can I probe the ethernet clock pin to check the frequency?

    2) I changed 0x1 to 0x2 based on your comment (it is the default value that after using the generated image by using this value still I can't use my ethernet port of the board!)

    3) I replaced the attached file (6740.board_2D00_dm368_2D00_leopard.c) with board-dm368-leopard.c file and then rerun the whole compiling procedure. After placing the new sdcard.img file into the SD memory and booting the board with it, still the problem exists! BTW, could you please let me know how can I check PINMUX3 reg? There is no such a value in board-dm365-evm.c file.

    4) As I mentioned you already, I am using Leopard camera LNCQ112IMX136 board that you may find its data sheet in the following link.

    https://www.leopardimaging.com/uploads/IPCAM_Userguide.pdf

    Also, I took some photos from the camera board that is based on DM368 and you can find them in the below link:

    https://www.dropbox.com/sh/cvf5i3h8jfwzkm5/6kciro1fwc

    5) How can I check the connection between MDCLK & PHY chip or MDIO & PHY chip?

    Thanks for your attention.

    Regards,

    Dawood

  • Hi,

    1) If you use my previous attached reply's file, then you could see

        printk("Updated PINMUX3 reg value for EMAC = %x\n",temp);

    2) 3)Use the previously attached board file & attach/share your bootup logs

     

    How can I check the connection between MDCLK & PHY chip or MDIO & PHY chip?

    Where and how can I probe the ethernet clock pin to check the frequency?

    Check with your hardware engineer for this

    or

    Find in Internet & Share your board schematics to check.

     

  • Dear Titus

    I have tried to compile and run the file that you had attached in your prior posts but I got a lot of error messages! It seems something is wrong with the file (6740.board_2D00_dm368_2D00_leopard.c). Hence, I can't get PINMUX3 reg value. You may see the error messages in the following lines:

    ---------------------------------------------------------------

    root@RidgeRunSDK:/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/include# gcc 6740.board_2D00_dm368_2D00_leopard.c
    6740.board_2D00_dm368_2D00_leopard.c:417: error: unknown field ‘ecc_bits’ specified in initializer
    6740.board_2D00_dm368_2D00_leopard.c:417: warning: excess elements in struct initializer
    6740.board_2D00_dm368_2D00_leopard.c:417: warning: (near initialization for ‘davinci_nand_data’)
    6740.board_2D00_dm368_2D00_leopard.c:420: error: array type has incomplete element type
    6740.board_2D00_dm368_2D00_leopard.c:422: error: field name not in record or union initializer
    6740.board_2D00_dm368_2D00_leopard.c:422: error: (near initialization for ‘davinci_nand_resources’)
    6740.board_2D00_dm368_2D00_leopard.c:423: error: field name not in record or union initializer
    6740.board_2D00_dm368_2D00_leopard.c:423: error: (near initialization for ‘davinci_nand_resources’)
    6740.board_2D00_dm368_2D00_leopard.c:423: error: ‘SZ_32M’ undeclared here (not in a function)
    6740.board_2D00_dm368_2D00_leopard.c:424: error: field name not in record or union initializer
    6740.board_2D00_dm368_2D00_leopard.c:424: error: (near initialization for ‘davinci_nand_resources’)
    6740.board_2D00_dm368_2D00_leopard.c:424: error: ‘IORESOURCE_MEM’ undeclared here (not in a function)
    6740.board_2D00_dm368_2D00_leopard.c:426: error: field name not in record or union initializer
    6740.board_2D00_dm368_2D00_leopard.c:426: error: (near initialization for ‘davinci_nand_resources’)
    6740.board_2D00_dm368_2D00_leopard.c:427: error: field name not in record or union initializer
    6740.board_2D00_dm368_2D00_leopard.c:427: error: (near initialization for ‘davinci_nand_resources’)
    6740.board_2D00_dm368_2D00_leopard.c:427: error: ‘SZ_4K’ undeclared here (not in a function)
    6740.board_2D00_dm368_2D00_leopard.c:428: error: field name not in record or union initializer
    6740.board_2D00_dm368_2D00_leopard.c:428: error: (near initialization for ‘davinci_nand_resources’)
    6740.board_2D00_dm368_2D00_leopard.c:432: error: variable ‘davinci_nand_device’ has initializer but incomplete type
    6740.board_2D00_dm368_2D00_leopard.c:433: error: unknown field ‘name’ specified in initializer
    6740.board_2D00_dm368_2D00_leopard.c:433: warning: excess elements in struct initializer
    6740.board_2D00_dm368_2D00_leopard.c:433: warning: (near initialization for ‘davinci_nand_device’)
    6740.board_2D00_dm368_2D00_leopard.c:434: error: unknown field ‘id’ specified in initializer
    6740.board_2D00_dm368_2D00_leopard.c:434: warning: excess elements in struct initializer
    6740.board_2D00_dm368_2D00_leopard.c:434: warning: (near initialization for ‘davinci_nand_device’)
    6740.board_2D00_dm368_2D00_leopard.c:435: error: unknown field ‘num_resources’ specified in initializer
    6740.board_2D00_dm368_2D00_leopard.c:435: warning: excess elements in struct initializer
    6740.board_2D00_dm368_2D00_leopard.c:435: warning: (near initialization for ‘davinci_nand_device’)
    6740.board_2D00_dm368_2D00_leopard.c:436: error: unknown field ‘resource’ specified in initializer
    6740.board_2D00_dm368_2D00_leopard.c:436: warning: excess elements in struct initializer
    6740.board_2D00_dm368_2D00_leopard.c:436: warning: (near initialization for ‘davinci_nand_device’)
    6740.board_2D00_dm368_2D00_leopard.c:437: error: unknown field ‘dev’ specified in initializer
    6740.board_2D00_dm368_2D00_leopard.c:437: error: extra brace group at end of initializer
    6740.board_2D00_dm368_2D00_leopard.c:437: error: (near initialization for ‘davinci_nand_device’)
    6740.board_2D00_dm368_2D00_leopard.c:439: warning: excess elements in struct initializer
    6740.board_2D00_dm368_2D00_leopard.c:439: warning: (near initialization for ‘davinci_nand_device’)
    6740.board_2D00_dm368_2D00_leopard.c:442: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__initdata’
    6740.board_2D00_dm368_2D00_leopard.c:448: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__initdata’
    6740.board_2D00_dm368_2D00_leopard.c:451: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dm368_leopard_map_io’
    6740.board_2D00_dm368_2D00_leopard.c:458: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
    6740.board_2D00_dm368_2D00_leopard.c:489: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
    ---------------------------------------------------------------

    Regarding the "connection between MDCLK & PHY chip or MDIO & PHY chip & probing the clock pin", with all respect, but your answer doesn't ring a bell for me! What a hardware engineer is supposed to do while I have passed all necessary information about the board model, datasheet and even taken photos to you already? I should not be the first guy on the Earth that has encountered Ethernet problem in a RidgeRun Linux on Leaprd boards that are using TI chips (DM368)...

    As a TI employee, if still you are interested to help me for addressing the existing issue, please give me detailed and more practical hints. Thanks for your time and attention.

  • Hi,

    root@RidgeRunSDK:/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/include# gcc 6740.board_2D00_dm368_2D00_leopard.c

    Why are you building linux kernel by gcc and not cross compiler?

    Linux kernel Building:

    host-linux $ make uImage ARCH=arm CROSS_COMPILE=<tool chain>

    Ex:

    make clean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-   (cleaning old compiled obj files)

    make distclean ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-  (cleaning old config files)

    make davinci_dm365_leobard_defconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-  (located under arch/arm/configs/ < ur board def config)

    make uImage ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- (building linux kerne uImage)

     

    Please replace the attached file in arch/arm/mach-davicni/ from previous reply (6740.board-dm368-leopard.c)

    #/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/arch/arm/mach-davinci/board-dm368-leopard.c

    #/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/ # make uImage ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    and tell me what is the PINMUX3 value printed at bootup log?

    "    printk("Updated PINMUX3 reg value for EMAC = %x\n",temp);  "

     

  • Dear Titus

    Thanks for your kind response. I followed your instructions and the PINMUX3 value in new bootlog is:

    --------------------------------

    DaVinci: 8 gpio irqs
    NET: Registered protocol family 16
    davinci_serial_init:97: failed to get UART2 clock
    Updated PINMUX3 reg value for EMAC = 815affff
    bio: create slab <bio-0> at 0
    DM365 IPIPE initialized in Single Shot mode
    SCSI subsystem initialized
    -------------------------------

    Also, after booting the system, when I run the ifconfig command no Ethernet port is detected:

    / # ifconfig
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:6 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:504 (504.0 B)  TX bytes:504 (504.0 B)

    After manual enabling Ethernet port with ifconfig, I encountered an error that is shown in the below lines:

    / # ifconfig eth0 up
    net eth0: DaVinci EMAC: request_irq() failed
    ------------[ cut here ]------------
    WARNING: at kernel/irq/manage.c:871 __free_irq+0xa4/0x1f4()
    Trying to free already-free IRQ 53
    Modules linked in: cmemk dm365mmap edmak irqk
    Backtrace:
    [<c002d688>] (dump_backtrace+0x0/0x114) from [<c0308930>] (dump_stack+0x18/0x1c)
     r7:c42a3d60 r6:c006b2b4 r5:c039e48a r4:00000367
    [<c0308918>] (dump_stack+0x0/0x1c) from [<c003ce88>] (warn_slowpath_common+0x50/0x68)
    [<c003ce38>] (warn_slowpath_common+0x0/0x68) from [<c003ceec>] (warn_slowpath_fmt+0x30/0x38)
     r7:00000035 r6:a0000013 r5:00000000 r4:c0407064
    [<c003cebc>] (warn_slowpath_fmt+0x0/0x38) from [<c006b2b4>] (__free_irq+0xa4/0x1f4)
     r3:00000035 r2:c039e5a8
    [<c006b210>] (__free_irq+0x0/0x1f4) from [<c006b448>] (free_irq+0x44/0x64)
     r9:c4063000 r8:c4063000 r7:c040197c r6:c4063000 r5:c0407064
    r4:00000035
    [<c006b404>] (free_irq+0x0/0x64) from [<c02009dc>] (emac_dev_open+0xb14/0xc48)
     r7:c040197c r6:00000035 r5:00000000 r4:00000035
    [<c01ffec8>] (emac_dev_open+0x0/0xc48) from [<c0299a90>] (dev_open+0xbc/0x120)
    [<c02999d4>] (dev_open+0x0/0x120) from [<c0299040>] (dev_change_flags+0x98/0x170)
     r5:00000041 r4:c4063000
    [<c0298fa8>] (dev_change_flags+0x0/0x170) from [<c02da790>] (devinet_ioctl+0x2f0/0x6b0)
     r7:c42a3e68 r6:c414b500 r5:00000000 r4:c4139b40
    [<c02da4a0>] (devinet_ioctl+0x0/0x6b0) from [<c02dbd5c>] (inet_ioctl+0xd0/0x108)
    [<c02dbc8c>] (inet_ioctl+0x0/0x108) from [<c0287c94>] (sock_ioctl+0x1f0/0x248)
     r5:00008914 r4:c4128480
    [<c0287aa4>] (sock_ioctl+0x0/0x248) from [<c00a7ab8>] (vfs_ioctl+0x34/0x94)
     r7:c4128480 r6:00008914 r5:befaccb0 r4:c4128480
    [<c00a7a84>] (vfs_ioctl+0x0/0x94) from [<c00a81ac>] (do_vfs_ioctl+0x594/0x5f0)
     r7:c4128480 r6:00000003 r5:c4128480 r4:00000003
    [<c00a7c18>] (do_vfs_ioctl+0x0/0x5f0) from [<c00a8248>] (sys_ioctl+0x40/0x64)
    [<c00a8208>] (sys_ioctl+0x0/0x64) from [<c0029f60>] (ret_fast_syscall+0x0/0x28)
     r7:00000036 r6:000111e0 r5:00000000 r4:000c2f08
    ---[ end trace 837174fd7e5034c8 ]---
    ifconfig: SIOCSIFFLAGS: Device or resource busy

  • Hi Dawood,

    This PINMUX3 register value seems good,

    Please enable following options in kernel configuration.

    make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- (Linux kernel configuration)

    1)

    make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- (Linux kernel configuration)

    [*] Networking support  --->

    Networking options  --->

    Enable all the options like attached screen shot [TCP_IP.png]

    2)

    make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- (Linux kernel configuration)

    Device Drivers  --->

    [*] Network device support  --->

    Enable all the options like attached screen shot [NW_driver.png]

    -*-   PHY Device support and infrastructure  --->

    Enable all the options like attached screen shot [NW_PHY.png]

    3)

    make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- (Linux kernel configuration)

    Device Drivers  --->

    [*] Network device support  --->

    Ethernet (10 or 100Mbit)  --->

    Enable all the options like attached screen shot [NW_Ethernet.png]

    4)

    make menuconfig ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- (Linux kernel configuration)

    Device Drivers  --->

    [*] Network device support  --->

    [*]   Ethernet (1000 Mbit)  --->

    Enable all the options like attached screen shot [NW_Ethernet2.png]

    1715.kernel_config.tar.gz

    Save all the modified configurations in kernel and build uImage & boot the board,

    Share me the full bootup logs.

  • Dear Titus

    I followed your instructions and loaded the new image file within the SD Card and booted the camera board through it. After logging in, still I can't enable Ethernet interface by using ifconfig command. You may find the boot log messages in the following lines. In the last lines, I tried to enable Ethernet port, but it was not successful.

    --------------------------------------------

    UBL Feb 18 2014 15:34:53
    U-Boot 2010.12-rc2-00000-g61b2f22-dirty (Feb 18 2014 - 15:34:57)
    Cores: ARM 432 MHz
    DDR:   340 MHz
    I2C:   ready
    DRAM:  128 MiB
    NAND:  256 MiB
    MMC:   davinci: 0, davinci: 1
    *** Warning - booting from SD, using default environment

    Net:   No ETH PHY detected!!!
    DaVinci-EMAC
    Hit any key to stop autoboot:  0
    reading uEnv.txt

    467 bytes read
    Importing environment from mmc ...
    Running uenvcmd ...
    reading uImage

    4343040 bytes read
    ## Booting kernel from Legacy Image at 82000000 ...
       Image Name:   "RR Linux Kernel"
       Created:      2014-02-20   9:39:16 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4342976 Bytes = 4.1 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Linux version 2.6.32-17-ridgerun (root@RidgeRunSDK) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #4 PREEMPT Tue Feb 18 17:50:39 MYT 2014
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: DM368 Leopard
    Memory policy: ECC disabled, Data cache writeback
    DaVinci dm36x_rev1.2 variant 0x8
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 21082
    Kernel command line: davinci_enc_mngr.ch0_output=COMPONENT davinci_enc_mngr.ch0_mode=1080I-30  davinci_display.cont2_bufsize=13631488 vpfe_capture.cont_bufoffset=13631488 vpfe_capture.cont_bufsize=12582912 video=davincifb:osd1=0x0x8:osd0=1920x1080x16,4050K@0,0:vid0=off:vid1=off  console=ttyS0,115200n8  dm365_imp.oper_mode=0  vpfe_capture.interface=1  mem=83M root=/dev/mmcblk0p2 rootdelay=2 rootfstype=ext3
    PID hash table entries: 512 (order: -1, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 83MB = 83MB total
    Memory: 79680KB available (3916K code, 295K data, 132K init, 0K highmem)
    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 215.44 BogoMIPS (lpj=1077248)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    DaVinci: 8 gpio irqs
    NET: Registered protocol family 16
    davinci_serial_init:97: failed to get UART2 clock
    Updated PINMUX3 reg value for EMAC = 815affff
    bio: create slab <bio-0> at 0
    DM365 IPIPE initialized in Single Shot mode
    SCSI subsystem initialized
    usbcore: registered new interface driver usbfs
    usbcore: registered new interface driver hub
    usbcore: registered new device driver usb
    vpss vpss: dm365_vpss vpss probed
    vpss vpss: dm365_vpss vpss probe success
    dm365_afew_hw_init
    ch0 default output "COMPONENT", mode "1080I-30"
    davinci_venc davinci_venc: Desired VENC clock not available
    davinci_venc davinci_venc: PLL's doesnot yield required VENC clk
    VPBE Encoder Initialized
    LogicPD encoder initialized
    Switching to clocksource timer0_1
    musb_hdrc: version 6.0, cppi-dma, host, debug=0
    musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
    musb_hdrc musb_hdrc: MUSB HDRC host driver
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    msgmni has been set to 155
    alg: No test for stdrng (krng)
    io scheduler noop registered
    io scheduler anticipatory registered (default)
    davincifb davincifb.0: dm_osd0_fb: 1920x1080x16@0,0 with framebuffer size 4050KB
    davincifb davincifb.0: dm_osd1_fb: 0x0x8@0,0 with framebuffer size 4050KB
    DM365 IPIPEIF probed
    imp serializer initialized
    davinci_previewer initialized
    davinci_resizer initialized
    Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
    console [ttyS0] enabled
    brd: module loaded
    loop: module loaded
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
    davinci_nand davinci_nand.0: controller rev. 2.3
    Fixed MDIO Bus: probed
    Initializing USB Mass Storage driver...
    usbcore: registered new interface driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new interface driver usbtest
    i2c /dev entries driver
    Linux video capture interface: v2.00
    ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
    vpfe_init
    vpfe-capture: vpss clock vpss_master enabled
    vpfe-capture vpfe-capture: v4l2 device registered
    vpfe-capture vpfe-capture: video device registered
    mt9p031 1-0048: No MT9P031 chip detected, register read ffffff87
    vpfe-capture vpfe-capture: v4l2 sub device mt9p031 register fails
    No sub devices registered
    vpfe-capture: vpfe capture clocks disabled
    vpfe_register_ccdc_device: DM365 ISIF
    dm365_isif: probe of dm365_isif failed with error -22
    af major#: 252, minor# 0
    AF Driver initialized
    aew major#: 251, minor# 0
    AEW Driver initialized
    Trying to register davinci display video device.
    layer=c40dec00,layer->video_dev=c40ded64
    Trying to register davinci display video device.
    layer=c40df000,layer->video_dev=c40df164
    davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
    watchdog watchdog: heartbeat 60 sec
    davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
    usbcore: registered new interface driver usbhid
    usbhid: v2.6:USB HID core driver
    Advanced Linux Sound Architecture Driver Version 1.0.21.
    No device for DAI tlv320aic3x
    No device for DAI davinci-i2s
    asoc: tlv320aic3x <-> davinci-i2s mapping ok
    ALSA device list:
      #0: DaVinci DM365 EVM (tlv320aic3x)
    TCP cubic registered
    NET: Registered protocol family 17
    Clocks: disable unused mmcsd1
    Clocks: disable unused spi0
    Clocks: disable unused spi1
    Clocks: disable unused spi2
    Clocks: disable unused spi3
    Clocks: disable unused spi4
    Clocks: disable unused pwm0
    Clocks: disable unused pwm1
    Clocks: disable unused pwm2
    Clocks: disable unused pwm3
    Clocks: disable unused timer1
    Clocks: disable unused timer3
    Clocks: disable unused adc
    Clocks: disable unused emac
    Clocks: disable unused voice_codec
    Clocks: disable unused rto
    Clocks: disable unused mjcp
    davinci_emac_probe: using random MAC addr: 32:ca:04:2b:b0:0a
    emac-mii: probed
    Waiting 2sec before mounting root device...
    mmc0: host does not support reading read-only switch. assuming write-enable.
    mmc0: new high speed SDHC card at address b368
    mmcblk0: mmc0:b368 SDC   7.41 GiB
     mmcblk0: p1 p2
    kjournald starting.  Commit interval 5 seconds
    EXT3 FS on mmcblk0p2, internal journal
    EXT3-fs: mounted filesystem with writeback data mode.
    VFS: Mounted root (ext3 filesystem) on device 179:2.
    Freeing init memory: 132K
    init started: BusyBox v1.18.2 (2014-02-18 15:59:48 MYT)
    starting pid 1034, tty '': '/etc/rcS'
    Starting System
    done.
    Welcome to
    __________ .__     .___               __________
    \______   \|__|  __| _/  ____    ____ \______   \ __ __   ____
     |       _/|  | / __ |  / ___\ _/ __ \ |       _/|  |  \ /    \
     |    |   \|  |/ /_/ | / /_/  >\  ___/ |    |   \|  |  /|   |  \
     |____|_  /|__|\____ | \___  /  \___  >|____|_  /|____/ |___|  /
            \/          \//_____/       \/        \/             \/

        Embedded Linux Solutions

    For further information see:
    http://www.ridgerun.com
    Build host: RidgeRunSDK
    Built by: root
    Build date: Thu, 20 Feb 2014 17:42:57 +0800
    Build tag: leopard
    Configuring network interfaces
    eth0: no PHY found
    net eth0: DaVinci EMAC: request_irq() failedError while running '/etc/rc.d/S30network'.
    Starting D-Bus message bus system
    Starting Ipipe daemon
    Loading coprocessors modules...
    Generating RSA key...Public key portion is:
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgwCG265GvDGdHM8QYJvUAnvluNPuz8sHrgqBz9SJuJfGEkWsJCD/1X62Gc9+2cHjVmLRAbbSzQvEma8X4wSDi4wKdCdW/Zy3AMIqoHwncsSPBtXrqN7/xOj6JKYKu7eSIhFucPqJOsdrI+JmVNZrAossQCBLgI6nuq7hC77DHonbRHFb root@dm365
    Fingerprint: md5 14:d1:68:0f:59:1c:01:74:72:92:b0:22:19:c9:57:dc
    Generating DSS key...Public key portion is:
    ssh-dss AAAAB3NzaC1kc3MAAACBAJ1UgCStg3va7VPi06O1L9JTRmqqFMsmsB9ThqiPw7ZVd3S1s7J/fhZB4cdxYpT3evJphjMM2gQTZGvwWUNMy73OTpKCgYmyz8A4n4oJ09Tk8eFhS7XDSpc+B5Zu0ZMBzSw51bJA1fqw2nRWZl0LKV/MBpv8Zh7Z6bWWrF+v7a/VAAAAFQDYNZe21huCeTmBjBKqONrD02/BmwAAAIBzkXXfrVuMbumgs4i21vgFYLm6rnGuY/L7OtFie0PSqn2/7pSXgacSzkwmOBy0OoK+5bTCjpXg5OgozTTzR651N14jfpJ9lFxHlAbqYrbIvL9ycLnnziT6P3jASuIrBWuRyzJA1+NK0jmNwn2SGkH0rDv2drei8RPfZCSZ+YhzbAAAAIAOEYPrUtL1YX5+soG+mztjANnPcuodvtFLDgpxb1Kfnufbig/jLTNLfyrbrXTc/LsJb38NwJ7XPeYG5pArlkupiDMMcruTr2atAKukCVErsTOaAlsFXTq+IEtfXWEd7eF2XXIDUrjALgef+yrRJkW46QE5QEP8YUvs7TIPh7xIsg== root@dm365
    Fingerprint: md5 8d:bc:58:dc:87:ff:bd:44:f4:41:b4:40:7f:8f:79:b7
    Starting Dropbear SSH server: dropbear.
    Starting RTSP server

    Please press Enter to activate this console.
    starting pid 1143, tty '/dev/ttyS0': '-/bin/sh'


    BusyBox v1.18.2 (2014-02-18 15:59:48 MYT) built-in shell (ash)
    Enter 'help' for a list of built-in commands.

    / # ifconfig
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    / # ifconfig -a
    dummy0    Link encap:Ethernet  HWaddr 16:31:CF:A9:FE:EF
              BROADCAST NOARP  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    eth0      Link encap:Ethernet  HWaddr 32:CA:04:2B:B0:0A
              inet addr:172.17.20.25  Bcast:172.17.255.255  Mask:255.255.0.0
              BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:52 Base address:0x7000

    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

    / # ifconfig eth0 up

    net eth0: DaVinci EMAC: request_irq() failed
    ------------[ cut here ]------------
    WARNING: at kernel/irq/manage.c:871 __free_irq+0xa4/0x1f4()
    Trying to free already-free IRQ 53
    Modules linked in:
    Backtrace:
    [<c002d688>] (dump_backtrace+0x0/0x114) from [<c0308930>] (dump_stack+0x18/0x1c)
     r7:c3501d60 r6:c006b2b4 r5:c039e48a r4:00000367
    [<c0308918>] (dump_stack+0x0/0x1c) from [<c003ce88>] (warn_slowpath_common+0x50/0x68)
    [<c003ce38>] (warn_slowpath_common+0x0/0x68) from [<c003ceec>] (warn_slowpath_fmt+0x30/0x38)
     r7:00000035 r6:a0000013 r5:00000000 r4:c0407064
    [<c003cebc>] (warn_slowpath_fmt+0x0/0x38) from [<c006b2b4>] (__free_irq+0xa4/0x1f4)
     r3:00000035 r2:c039e5a8
    [<c006b210>] (__free_irq+0x0/0x1f4) from [<c006b448>] (free_irq+0x44/0x64)
     r9:c405f000 r8:c405f000 r7:c040197c r6:c405f000 r5:c0407064
    r4:00000035
    [<c006b404>] (free_irq+0x0/0x64) from [<c02009dc>] (emac_dev_open+0xb14/0xc48)
     r7:c040197c r6:00000035 r5:00000000 r4:00000035
    [<c01ffec8>] (emac_dev_open+0x0/0xc48) from [<c0299a90>] (dev_open+0xbc/0x120)
    [<c02999d4>] (dev_open+0x0/0x120) from [<c0299040>] (dev_change_flags+0x98/0x170)
     r5:00000041 r4:c405f000
    [<c0298fa8>] (dev_change_flags+0x0/0x170) from [<c02da790>] (devinet_ioctl+0x2f0/0x6b0)
     r7:c3501e68 r6:c4135500 r5:00000000 r4:c415d600
    [<c02da4a0>] (devinet_ioctl+0x0/0x6b0) from [<c02dbd5c>] (inet_ioctl+0xd0/0x108)
    [<c02dbc8c>] (inet_ioctl+0x0/0x108) from [<c0287c94>] (sock_ioctl+0x1f0/0x248)
     r5:00008914 r4:c4f01180
    [<c0287aa4>] (sock_ioctl+0x0/0x248) from [<c00a7ab8>] (vfs_ioctl+0x34/0x94)
     r7:c4f01180 r6:00008914 r5:bec88cb0 r4:c4f01180
    [<c00a7a84>] (vfs_ioctl+0x0/0x94) from [<c00a81ac>] (do_vfs_ioctl+0x594/0x5f0)
     r7:c4f01180 r6:00000003 r5:c4f01180 r4:00000003
    [<c00a7c18>] (do_vfs_ioctl+0x0/0x5f0) from [<c00a8248>] (sys_ioctl+0x40/0x64)
    [<c00a8208>] (sys_ioctl+0x0/0x64) from [<c0029f60>] (ret_fast_syscall+0x0/0x28)
     r7:00000036 r6:000111e0 r5:00000000 r4:000c2f08
    ---[ end trace 47694caeac4f85db ]---
    ifconfig: SIOCSIFFLAGS: Device or resource busy
    / #

  • Hi Dawood,

    Build tag: leopard
    Configuring network interfaces
    eth0: no PHY found

    1) Please replace the attached board file in arch/arm/mach-davinci and re-build linux kernel source using the following command.

    #/opt/RidgeRun-SDK-DM36x-Turrialba-Eval/kernel/linux-2.6.32.17-psp03.01.01.39/ # make uImage ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-

    /*
     * DM368 Leopard Board
     *
     * Derived from: arch/arm/mach-davinci/board-dm365-evm.c
     * RidgeRun Copyright (C) 2011.
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation version 2.
     *
     * This program is distributed "as is" WITHOUT ANY WARRANTY of any
     * kind, whether express or implied; without even the implied warranty
     * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     */
    
    /**************************************************************************
     * Included Files
     **************************************************************************/
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/autoconf.h>
    #include <linux/init.h>
    #include <linux/dma-mapping.h>
    #include <linux/i2c.h>
    #include <linux/io.h>
    #include <linux/clk.h>
    #include <linux/i2c/at24.h>
    #include <linux/leds.h>
    #include <linux/mtd/mtd.h>
    #include <linux/mtd/partitions.h>
    #include <linux/mtd/nand.h>
    #include <linux/input.h>
    #include <linux/spi/spi.h>
    #include <linux/spi/eeprom.h>
    #include <asm/setup.h>
    #include <asm/mach-types.h>
    #include <asm/mach/arch.h>
    #include <asm/mach/map.h>
    #include <mach/mux.h>
    #include <mach/hardware.h>
    #include <mach/dm365.h>
    #include <mach/psc.h>
    #include <mach/common.h>
    #include <mach/i2c.h>
    #include <mach/serial.h>
    #include <mach/mmc.h>
    #include <mach/nand.h>
    #include <mach/keyscan.h>
    #include <mach/gpio.h>
    #include <linux/videodev2.h>
    #include <media/davinci/videohd.h>
    #include <media/davinci/dm365_generic_prgb_encoder.h>
    #include <media/tvp514x.h>
    #include <media/tvp7002.h>
    
    /* Titus Debug: To fix "no PHY found" issue */
    
    #define DM365_EVM_PHY_ID0		"0:00"
    
    #define DM365_EVM_PHY_ID1		"0:01"
    
    
    #define DM365_EVM_PHY_MASK        (0x1)
    #define DM365_EVM_MDIO_FREQUENCY    (2200000) /* PHY bus frequency */
    
    #define DM365_ASYNC_EMIF_CONTROL_BASE    0x01d10000
    #define DM365_ASYNC_EMIF_DATA_CE0_BASE    0x02000000
    #define DM365_ASYNC_EMIF_DATA_CE1_BASE    0x04000000
    
    static struct snd_platform_data dm368_leopard_snd_data = {
        .eventq_no = EVENTQ_3,
    };
    
    static struct i2c_board_info i2c_info[] = {
        {
            I2C_BOARD_INFO("tlv320aic3x", 0x18),
        },
        {
            I2C_BOARD_INFO("ths7303", 0x2c),
        }
    };
    
    static struct davinci_i2c_platform_data i2c_pdata = {
        .bus_freq    = 400    /* kHz */,
        .bus_delay    = 0    /* usec */,
        .sda_pin        = 21,
        .scl_pin        = 20,
    };
    
    #if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE)
    /* Input available at the mt9p031 */
    static struct v4l2_input mt9p031_inputs[] = {
        {
            .index = 0,
            .name = "Camera",
            .type = V4L2_INPUT_TYPE_CAMERA,
        }
    };
    #endif
    
    #if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
    static struct tvp514x_platform_data tvp5146_pdata = {
           .clk_polarity = 0,
           .hs_polarity = 1,
           .vs_polarity = 1
    };
    
    
    #define TVP514X_STD_ALL        (V4L2_STD_NTSC | V4L2_STD_PAL)
    /* Inputs available at the TVP5146 */
    static struct v4l2_input tvp5146_inputs[] = {
        {
            .index = 0,
            .name = "Composite",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP514X_STD_ALL,
        },
        {
            .index = 1,
            .name = "S-Video",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP514X_STD_ALL,
        },
    };
    
    /*
     * this is the route info for connecting each input to decoder
     * ouput that goes to vpfe. There is a one to one correspondence
     * with tvp5146_inputs
     */
    static struct vpfe_route tvp5146_routes[] = {
        {
            .input = INPUT_CVBS_VI2B,
            .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
        },
        {
            .input = INPUT_SVIDEO_VI2C_VI1C,
            .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
        },
    };
    #endif
    
    #if defined(CONFIG_VIDEO_TVP7002) || defined(CONFIG_VIDEO_TVP7002_MODULE)
    /* tvp7002 platform data, used during reset and probe operations */
    static struct tvp7002_platform_data tvp7002_pdata = {
           .clk_polarity = 0,
           .hs_polarity = 0,
           .vs_polarity = 0,
           .fid_polarity = 0,
    };
    
    
    #define TVP7002_STD_ALL        (V4L2_STD_525P_60   | V4L2_STD_625P_50     |\
                    V4L2_STD_NTSC      | V4L2_STD_PAL       |\
                    V4L2_STD_720P_50   | V4L2_STD_720P_60     |\
                    V4L2_STD_1080I_50  | V4L2_STD_1080I_60     |\
                    V4L2_STD_1080P_50  | V4L2_STD_1080P_60)
    
    /* Inputs available at the TVP7002 */
    static struct v4l2_input tvp7002_inputs[] = {
        {
            .index = 0,
            .name = "Component",
            .type = V4L2_INPUT_TYPE_CAMERA,
            .std = TVP7002_STD_ALL,
        },
    };
    #endif
    
    
    static struct vpfe_subdev_info vpfe_sub_devs[] = {
    #if defined(CONFIG_VIDEO_TVP514X) || defined(CONFIG_VIDEO_TVP514X_MODULE)
        {
            .module_name = "tvp5146",
            .grp_id = VPFE_SUBDEV_TVP5146,
            .num_inputs = ARRAY_SIZE(tvp5146_inputs),
            .inputs = tvp5146_inputs,
            .routes = tvp5146_routes,
            .can_route = 1,
            .ccdc_if_params = {
                .if_type = VPFE_BT656,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("tvp5146", 0x5d),
                .platform_data = &tvp5146_pdata,
            },
        },
    #endif
    #if defined(CONFIG_VIDEO_TVP7002) || defined(CONFIG_VIDEO_TVP7002_MODULE)
        {
            .module_name = "tvp7002",
            .grp_id = VPFE_SUBDEV_TVP7002,
            .num_inputs = ARRAY_SIZE(tvp7002_inputs),
            .inputs = tvp7002_inputs,
            .ccdc_if_params = {
                .if_type = VPFE_BT1120,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("tvp7002", 0x5c),
                .platform_data = &tvp7002_pdata,
            },
        },
        {
            .module_name = "ths7353",
            .grp_id = VPFE_SUBDEV_TVP7002,
            .board_info = {
                I2C_BOARD_INFO("ths7353", 0x2e),
            },
        },
    #endif
    #if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE)
        {
            .module_name = "mt9p031",
            .is_camera = 1,
            .grp_id = VPFE_SUBDEV_MT9P031,
            .num_inputs = ARRAY_SIZE(mt9p031_inputs),
            .inputs = mt9p031_inputs,
            .ccdc_if_params = {
                .if_type = VPFE_RAW_BAYER,
                .hdpol = VPFE_PINPOL_POSITIVE,
                .vdpol = VPFE_PINPOL_POSITIVE,
            },
            .board_info = {
                I2C_BOARD_INFO("mt9p031", 0x48),
                /* this is for PCLK rising edge */
                .platform_data = (void *)1,
            },
        }
    #endif
    };
    
    static struct vpfe_config vpfe_cfg = {
           .num_subdevs = ARRAY_SIZE(vpfe_sub_devs),
           .sub_devs = vpfe_sub_devs,
           .card_name = "DM368 Leopard",
           .ccdc = "DM365 ISIF",
           .num_clocks = 1,
           .clocks = {"vpss_master"},
    };
    
    /*Need to review if this is necessary*/
    static struct davinci_mmc_config dm368leopard_mmc_config = {
        .wires        = 4,
        .max_freq    = 50000000,
        .caps        = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
        .version    = MMC_CTLR_VERSION_2,
    };
    
    static void dm368leopard_emac_configure(void)
    {
        /*
         * EMAC pins are multiplexed with GPIO and UART
         * Further details are available at the DM368 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 125 - 127
         */
        //-------------Added by Dawood at 4 Feb 2014-----------------
            struct davinci_soc_info *soc_info = &davinci_soc_info;
            /* Specify the set of possibly populated  phy addresses */
            soc_info->emac_pdata->phy_mask = DM365_EVM_PHY_MASK;
            soc_info->emac_pdata->mdio_max_freq = DM365_EVM_MDIO_FREQUENCY;
        //-----------------------------------------------------------
        davinci_cfg_reg(DM365_EMAC_TX_EN);
        davinci_cfg_reg(DM365_EMAC_TX_CLK);
        davinci_cfg_reg(DM365_EMAC_COL);
        davinci_cfg_reg(DM365_EMAC_TXD3);
        davinci_cfg_reg(DM365_EMAC_TXD2);
        davinci_cfg_reg(DM365_EMAC_TXD1);
        davinci_cfg_reg(DM365_EMAC_TXD0);
        davinci_cfg_reg(DM365_EMAC_RXD3);
        davinci_cfg_reg(DM365_EMAC_RXD2);
        davinci_cfg_reg(DM365_EMAC_RXD1);
        davinci_cfg_reg(DM365_EMAC_RXD0);
        davinci_cfg_reg(DM365_EMAC_RX_CLK);
        davinci_cfg_reg(DM365_EMAC_RX_DV);
        davinci_cfg_reg(DM365_EMAC_RX_ER);
        davinci_cfg_reg(DM365_EMAC_CRS);
        davinci_cfg_reg(DM365_EMAC_MDIO);
        davinci_cfg_reg(DM365_EMAC_MDCLK);
    
        /*
         * EMAC interrupts are multiplexed with GPIO interrupts
         * Details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 133 - 134
         */
        davinci_cfg_reg(DM365_INT_EMAC_RXTHRESH);
        davinci_cfg_reg(DM365_INT_EMAC_RXPULSE);
        davinci_cfg_reg(DM365_INT_EMAC_TXPULSE);
        davinci_cfg_reg(DM365_INT_EMAC_MISCPULSE);
    }
    
    static void dm368leopard_mmc_configure(void)
    {
        /*
         * MMC/SD pins are multiplexed with GPIO and EMIF
         * Further details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131
         */
        davinci_cfg_reg(DM365_SD1_CLK);
        davinci_cfg_reg(DM365_SD1_CMD);
        davinci_cfg_reg(DM365_SD1_DATA3);
        davinci_cfg_reg(DM365_SD1_DATA2);
        davinci_cfg_reg(DM365_SD1_DATA1);
        davinci_cfg_reg(DM365_SD1_DATA0);
    }
    
    static void dm368leopard_usb_configure(void)
    {
        davinci_cfg_reg(DM365_GPIO66);
        gpio_request(66, "usb");
        gpio_direction_output(66, 0);
        setup_usb(500, 8);
    }
    
    static void dm368leopard_tlv320aic3x_configure(void)
    {
        /*
        * CLKOUT1 pin is multiplexed with GPIO35 and SPI4
        * Further details are available at the DM365 ARM
        * Subsystem Users Guide(sprufg5.pdf) pages 118, 127 - 129
        */
        struct clk *clkout1_clk;
    
        davinci_cfg_reg(DM365_CLKOUT1);
    
        clkout1_clk = clk_get(NULL, "clkout1");
        if (IS_ERR(clkout1_clk))
            return;
        clk_enable(clkout1_clk);
    
        /*
        * Configure CLKOUT1 OBSCLK registers
        */
    
        /* (reg OCSEL) Setting OBSCLK source with Oscillator divider output enable */
        __raw_writel(0x0,IO_ADDRESS(0x01C40C00 + 0x104));
    
        /* (reg OSCDIV1) Setting the Oscillator divider enable with a divider ratio of 1 */
        __raw_writel(0x8000,IO_ADDRESS(0x01C40C00 + 0x124));
    
        /* (reg CKEN) Setting the OBSCLK clock enable */
        __raw_writel(0x02,IO_ADDRESS(0x01C40C00 + 0x148));
    
    }
    
    static void dm368leopard_prgb_out_configure(void)
    {
        /*
         * R/G/B 0 and 1 pins are multiplexed with GPIOs
         * Further details are available at the DM365 ARM
         * Subsystem Users Guide(sprufg5.pdf) pages 118, 128 - 131
         */
        davinci_cfg_reg(DM365_VOUT_B0);
        davinci_cfg_reg(DM365_VOUT_B1);
        davinci_cfg_reg(DM365_VOUT_B2);
        davinci_cfg_reg(DM365_VOUT_R0);
        davinci_cfg_reg(DM365_VOUT_R1);
        davinci_cfg_reg(DM365_VOUT_R2);
        davinci_cfg_reg(DM365_VOUT_G0);
        davinci_cfg_reg(DM365_VOUT_G1);
        davinci_cfg_reg(DM365_VOUT_COUTL_EN);
        davinci_cfg_reg(DM365_VOUT_COUTH_EN);
        davinci_cfg_reg(DM365_VOUT_LCD_OE);
        davinci_cfg_reg(DM365_VOUT_HVSYNC);
    }
    
    void enable_lcd(void)
    {
    }
    EXPORT_SYMBOL(enable_lcd);
    
    void enable_hd_clk(void)
    {
    }
    EXPORT_SYMBOL(enable_hd_clk);
    
    
    static void __init leopard_init_i2c(void)
    {
        davinci_cfg_reg(DM365_GPIO20);
        gpio_request(20, "i2c-scl");
        gpio_direction_output(20, 0);
        davinci_cfg_reg(DM365_I2C_SCL);
    
        davinci_init_i2c(&i2c_pdata);
        i2c_register_board_info(1, i2c_info, ARRAY_SIZE(i2c_info));
    }
    
    int set_prgb_pixel_clk_output(unsigned int required_clk_rate);
    
    static struct davinci_gen_prgb_pdata gen_prgb_data = {
        .xres = 1280,
        .yres = 720,
        .fps = {60, 1},
        .pixel_clock_khz = 0,
        .left_margin = 300,
        .right_margin = 70,
        .upper_margin = 26,
        .lower_margin = 3,
        .hsync_len = 80,
        .vsync_len = 5,
        .flags = 0,
        .clock_set_function = NULL,
    };
    
    static struct platform_device gen_prgb_device = {
        .name            = PRGB_ENCODER_DRV_NAME,
        .id                = 0,
        .num_resources    = 0,
        .resource        = NULL,
        .dev            = {
            .platform_data    = &gen_prgb_data,
        },
    };
    
    static struct davinci_nand_pdata davinci_nand_data = {
        .mask_chipsel        = 0,
        .ecc_mode        = NAND_ECC_HW,
        .options        = NAND_SKIP_BBTSCAN | NAND_NO_SUBPAGE_WRITE,
        .ecc_bits        = 4,
    };
    
    static struct resource davinci_nand_resources[] = {
        {
            .start        = DM365_ASYNC_EMIF_DATA_CE0_BASE,
            .end        = DM365_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
            .flags        = IORESOURCE_MEM,
        }, {
            .start        = DM365_ASYNC_EMIF_CONTROL_BASE,
            .end        = DM365_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
            .flags        = IORESOURCE_MEM,
        },
    };
    
    static struct platform_device davinci_nand_device = {
        .name            = "davinci_nand",
        .id            = 0,
        .num_resources        = ARRAY_SIZE(davinci_nand_resources),
        .resource        = davinci_nand_resources,
        .dev            = {
            .platform_data    = &davinci_nand_data,
        },
    };
    
    static struct platform_device *dm368_leopard_devices[] __initdata = {
        &davinci_nand_device,
        &gen_prgb_device,
    };
    
    
    static struct davinci_uart_config uart_config __initdata = {
        .enabled_uarts = (1 << 0),
    };
    static void __init dm368_leopard_map_io(void)
    {
        /* setup input configuration for VPFE input devices */
        dm365_set_vpfe_config(&vpfe_cfg);
        dm365_init();
    }
    
    static __init void dm368_leopard_init(void)
    {
        leopard_init_i2c();
        davinci_serial_init(&uart_config);
    
        dm368leopard_emac_configure();
        soc_info->emac_pdata->phy_id = DM365_EVM_PHY_ID0;		/* Titus Debug : PHY ID 0 */
    //    soc_info->emac_pdata->phy_id = DM365_EVM_PHY_ID1;		/* Titus Debug : PHY ID 1 */
    	
    
        dm368leopard_usb_configure();
        dm368leopard_mmc_configure();
        dm368leopard_prgb_out_configure();
    
        davinci_setup_mmc(0, &dm368leopard_mmc_config);
    
    #ifdef CONFIG_SND_DM365_AIC3X_CODEC
        dm365_init_asp(&dm368_leopard_snd_data);
        dm368leopard_tlv320aic3x_configure();
    #elif defined(CONFIG_SND_DM365_VOICE_CODEC)
        dm365_init_vc(&dm368_leopard_snd_data);
    #endif
        dm365_init_rtc();
    
        platform_add_devices(dm368_leopard_devices,
            ARRAY_SIZE(dm368_leopard_devices));
    }
    
    static __init void dm368_leopard_irq_init(void)
    {
        davinci_irq_init();
    }
    
    MACHINE_START(DM368_LEOPARD, "DM368 Leopard")
        .phys_io    = IO_PHYS,
        .io_pg_offst    = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
        .boot_params    = (0x80000100),
        .map_io        = dm368_leopard_map_io,
        .init_irq    = dm368_leopard_irq_init,
        .timer        = &davinci_timer,
        .init_machine    = dm368_leopard_init,
    MACHINE_END
    

    If not fixed,

    2) Undo the old fix which is used from the following link previously,

    https://developer.ridgerun.com/wiki/index.php/DM368_DM365_Ethernet_cable_plug_unplug

    As of now, These are the trial and error methods to narrow down your issues.

     

  • Dear Titus

    Thanks for your comment. I replaced your file with former file that you sent me and then I built the new image file. After flashing the image file into the SD Card and booting the board, still the problem exists! (I received an error when I tried to enable eth0 as same as that shown in my previous post)

    BTW, in my Ubuntu Linux that I used it to build image file, I don't have any cross compiler under arm-arago-linux-gnueabi-*  name!  As I mentioned you already, I followed the presented instruction within the below link:

    https://developer.ridgerun.com/wiki/index.php/Getting_Started_Guide_for_DM368_DM365_LeopardBoard

    It seems by following these instructions, all environmental variables and default value of cross-compiler will be set automatically. Hence I just run make config and then make and make install commands. By execution of these commands a new image file will be created under ../image folder.

    Regards,

    Dawood