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.

AM3352 DP83848J,mii bus注册失败,sdk-evm06 3.2内核

Other Parts Discussed in Thread: DP83848J, AM3352, TPS65910

各位好:

     现在使用ti-sdk-am335x-evm-06.00.00.00-Linux-x86-Install开发包实现双网卡,CPU是AM3352,PHY是DP83848J,PHY addr为7,在U-Boot下调试通过,可以收发数据。按照http://processors.wiki.ti.com/index.php/AM335x_CPSW_(Ethernet)_Driver%27s_Guide#Dual_Standalone_EMAC_mode指导配置双网卡,启动后找不到PHY了,如果不配置VLAN,可以找到PHY,但PHYID是错的,正确的PHYID为0x20005c90,已增加了DP83848J的驱动

网卡为MII模式,现在的问题是mii bus注册失败,phy也找不到,请各位大神帮忙看看。board-am335xevm.c请参考附件,先谢了。

U-Boot 2013.01.01 (Dec 28 2015 - 10:06:47)

I2C:   ready
arch/arm/lib/board.c board_init_f
DRAM:  1 GiB
WARNING: Caches not enabled
NAND:  No NAND device found!!!
0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 47401000 using PIO, IRQ 0
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Host mode controller at 47401800 using PIO, IRQ 0
Net:   <ethaddr> not set. Validating first E-fuse MAC
set default macaddr 7c:66:9d:52:30:3c
cpsw
Hit any key to stop autoboot:  0
Booting from network ...
cpsw Waiting for PHY auto negotiation to complete. done
link up on port 0, speed 100, half duplex
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 7
*** Unhandled DHCP Option in OFFER/ACK: 44
*** Unhandled DHCP Option in OFFER/ACK: 7
*** Unhandled DHCP Option in OFFER/ACK: 44
DHCP client bound to address 192.168.10.106
link up on port 0, speed 100, half duplex
Using cpsw device
TFTP from server 192.168.10.98; our IP address is 192.168.10.106
Filename 'uImage'.
Load address: 0x80200000
Loading: #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  #################################################################
  ####################
  286.1 KiB/s
done
Bytes transferred = 21277184 (144aa00 hex)
## Booting kernel from Legacy Image at 80200000 ...
   Image Name:   Linux-3.2.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    21277120 Bytes = 20.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Linux version 3.2.0 (root@ubuntu) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #69 Tue Dec 29 14:58:26 CST 2015
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: am335xevm
[    0.000000] Truncating RAM at 80000000-bfffffff to -af7fffff (vmalloc region overlap).
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES2.1 (neon )
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at arch/arm/mach-omap2/clkt_clksel.c:194 omap2_clksel_recalc+0xc8/0x134()
[    0.000000] clock: Could not find fieldval 0 for clock dpll_core_m6_ck parent dpll_core_x2_ck
[    0.000000] Modules linked in:
[    0.000000] Backtrace:
[    0.000000] [<c0017df0>] (dump_backtrace+0x0/0x10c) from [<c03ac7b8>] (dump_stack+0x18/0x1c)
[    0.000000]  r6:c0030434 r5:00000009 r4:c2817e78 r3:c2836b0c
[    0.000000] [<c03ac7a0>] (dump_stack+0x0/0x1c) from [<c003cae0>] (warn_slowpath_common+0x54/0x6c)
[    0.000000] [<c003ca8c>] (warn_slowpath_common+0x0/0x6c) from [<c003cb9c>] (warn_slowpath_fmt+0x38/0x40)
[    0.000000]  r8:80000200 r7:c288b2d4 r6:00000000 r5:c28299c0 r4:00000000
[    0.000000] r3:00000009
[    0.000000] [<c003cb64>] (warn_slowpath_fmt+0x0/0x40) from [<c0030434>] (omap2_clksel_recalc+0xc8/0x134)
[    0.000000]  r3:00000000 r2:c047ed38
[    0.000000] [<c003036c>] (omap2_clksel_recalc+0x0/0x134) from [<c0033b28>] (propagate_rate+0x34/0x54)
[    0.000000]  r6:c288b30c r5:c28298cc r4:c28299c0
[    0.000000] [<c0033af4>] (propagate_rate+0x0/0x54) from [<c0033b34>] (propagate_rate+0x40/0x54)
[    0.000000]  r5:c2829874 r4:c28298b8
[    0.000000] [<c0033af4>] (propagate_rate+0x0/0x54) from [<c0033b34>] (propagate_rate+0x40/0x54)
[    0.000000]  r5:c28297c4 r4:c2829860
[    0.000000] [<c0033af4>] (propagate_rate+0x0/0x54) from [<c0033b34>] (propagate_rate+0x40/0x54)
[    0.000000]  r5:c28296bc r4:c28297b0
[    0.000000] [<c0033af4>] (propagate_rate+0x0/0x54) from [<c0033c98>] (recalculate_root_clocks+0x40/0x58)
[    0.000000]  r5:c28362dc r4:c28296a8
[    0.000000] [<c0033c58>] (recalculate_root_clocks+0x0/0x58) from [<c05133b8>] (am33xx_clk_init+0x84/0xa0)
[    0.000000]  r5:c2829548 r4:c2829548
[    0.000000] [<c0513334>] (am33xx_clk_init+0x0/0xa0) from [<c0513100>] (omap3xxx_clk_init+0xe0/0x314)
[    0.000000]  r5:c2e95040 r4:00003517
[    0.000000] [<c0513020>] (omap3xxx_clk_init+0x0/0x314) from [<c050d60c>] (am33xx_init_early+0x3c/0x40)
[    0.000000]  r7:c288b2d4 r6:c288b30c r5:c2e95040 r4:c052f6b4
[    0.000000] [<c050d5d0>] (am33xx_init_early+0x0/0x40) from [<c0509de0>] (setup_arch+0x714/0x804)
[    0.000000] [<c05096cc>] (setup_arch+0x0/0x804) from [<c05065a4>] (start_kernel+0x78/0x2dc)
[    0.000000] [<c050652c>] (start_kernel+0x0/0x2dc) from [<80008040>] (0x80008040)
[    0.000000]  r6:c0530b30 r5:c2818084 r4:10c53c7d
[    0.000000] ---[ end trace 1b75b31a2719ed1c ]---
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 193040
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/nfs nfsroot=192.168.10.98:/export/rootfs,nolock rw ip=dhcp
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 760MB = 760MB total
[    0.000000] Memory: 729712k/729712k available, 48528k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0506000   (5112 kB)
[    0.000000]       .init : 0xc0506000 - 0xc2815000   (35900 kB)
[    0.000000]       .data : 0xc2816000 - 0xc2875c90   ( 384 kB)
[    0.000000]        .bss : 0xc2875cb4 - 0xc28a21a8   ( 178 kB)
[    0.000000] NR_IRQS:396
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
[    0.000000] omap_dm_timer_switch_src: Switching to HW default clocksource(sys_clkin_ck) for timer1, this may impact timekeeping in low power state
[    0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000409] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
[    0.064003] pid_max: default: 32768 minimum: 301
[    0.064276] Security Framework initialized
[    0.064459] Mount-cache hash table entries: 512
[    0.065185] CPU: Testing write buffer coherency: ok
[    0.092826] omap_hwmod: gfx: failed to hardreset
[    0.112922] omap_hwmod: pruss: failed to hardreset
[    0.115075] print_constraints: dummy:
[    0.115808] NET: Registered protocol family 16
[    0.120148] OMAP GPIO hardware version 0.1
[    0.125535] omap_mux_init: Add partition: #1: core, flags: 0
[    0.126244] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x9b0,value=0b
[    0.126280] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x988,value=060
[    0.126315] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x98c,value=060
[    0.129684]  omap_i2c.1: alias fck already exists
[    0.131013]  omap2_mcspi.1: alias fck already exists
[    0.131478]  omap2_mcspi.2: alias fck already exists
[    0.133452]  edma.0: alias fck already exists
[    0.133502]  edma.0: alias fck already exists
[    0.133544]  edma.0: alias fck already exists
[    0.189071] bio: create slab <bio-0> at 0
[    0.192616] SCSI subsystem initialized
[    0.194450] >>>> dirvers/net/phy/phy_devices.c phy_init  >>>>>
[    0.194481]
[    0.194489] >>>>>>>>>>>>>>> mdio_bus_init  begin to register class >>>>>>>>>>>>>>
[    0.196157] usbcore: registered new interface driver usbfs
[    0.196832] usbcore: registered new interface driver hub
[    0.197319] usbcore: registered new device driver usb
[    0.197918] registerd cppi-dma Intr @ IRQ 17
[    0.197946] Cppi41 Init Done Qmgr-base(f007a000) dma-base(f0078000)
[    0.197969] Cppi41 Init Done
[    0.198022] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[    0.198584] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[    0.200785] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[    1.194050] omap_i2c omap_i2c.1: controller timed out
[    1.214058] tps65910 1-002d: could not be detected
[    1.216811] Switching to clocksource gp timer
[    1.250166] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    1.250491] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[    1.251086] MUSB0 controller's USBSS revision = 4ea20800
[    1.251154] musb0: Enabled SW babble control
[    1.252895] musb-hdrc musb-hdrc.0: USB OTG mode controller at f003c000 using DMA, IRQ 18
[    1.253203] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[    1.253780] MUSB1 controller's USBSS revision = 4ea20800
[    1.253840] musb1: Enabled SW babble control
[    1.254681] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    1.254861] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    1.255113] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.255151] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.255182] usb usb1: Product: MUSB HDRC host driver
[    1.255206] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
[    1.255231] usb usb1: SerialNumber: musb-hdrc.1
[    1.256791] hub 1-0:1.0: USB hub found
[    1.256853] hub 1-0:1.0: 1 port detected
[    1.258057] musb-hdrc musb-hdrc.1: USB Host mode controller at f003e800 using DMA, IRQ 19
[    1.258934] NET: Registered protocol family 2
[    1.259312] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
[    1.260179] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[    1.265509] TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
[    1.267161] TCP: Hash tables configured (established 131072 bind 65536)
[    1.267190] TCP reno registered
[    1.267222] UDP hash table entries: 512 (order: 1, 8192 bytes)
[    1.267296] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
[    1.267780] NET: Registered protocol family 1
[    1.268273] RPC: Registered named UNIX socket transport module.
[    1.268301] RPC: Registered udp transport module.
[    1.268321] RPC: Registered tcp transport module.
[    1.268342] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.159652] NetWinder Floating Point Emulator V0.97 (double precision)
[    2.159957] etb: probe of etb failed with error -2
[    2.169219] etm: probe of etm failed with error -2
[    2.212990] VFS: Disk quotas dquot_6.5.2
[    2.213125] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.214251] msgmni has been set to 1425
[    2.220906] alg: No test for stdrng (krng)
[    2.222210] io scheduler noop registered
[    2.222241] io scheduler deadline registered
[    2.222374] io scheduler cfq registered (default)
[    2.223893] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    3.115779] console [ttyO0] enabled
[    3.120655] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    3.129037] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    3.137323] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    3.145595] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    3.153896] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[    3.163180] omap4_rng omap4_rng: OMAP4 Random Number Generator ver. 2.00
[    3.190515] brd: module loaded
[    3.204508] loop: module loaded
[    3.208326] i2c-core: driver [tsl2550] using legacy suspend method
[    3.214901] i2c-core: driver [tsl2550] using legacy resume method
[    3.221546] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    4.226927] omap_i2c omap_i2c.1: controller timed out
[    5.247166] omap_i2c omap_i2c.1: controller timed out
[    5.286903] No daughter card found
[    5.290619] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[    5.298047] The board is a AM335x Starter Kit.
[    5.302927] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x80c,value=031
[    5.312520] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x808,value=031
[    5.322111] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x804,value=031
[    5.331690] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x800,value=031
[    5.341264] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x880,value=032
[    5.350839] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x884,value=032
[    5.360418] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8f0,value=030
[    5.369994] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8f4,value=030
[    5.379577] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8f8,value=030
[    5.389135] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8fc,value=030
[    5.398702] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x900,value=030
[    5.408265] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x904,value=030
[    5.417809] >>>> Entry mii1_init begin to set ethernet pinmux >>>>>
[    5.424501] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x910,value=020
[    5.434072] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x914,value=00
[    5.443564] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x918,value=020
[    5.453147] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x91c,value=00
[    5.462632] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x920,value=00
[    5.472114] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x924,value=00
[    5.481601] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x928,value=00
[    5.491076] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x92c,value=020
[    5.500653] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x930,value=020
[    5.510221] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x934,value=020
[    5.519796] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x938,value=020
[    5.529377] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x93c,value=020
[    5.538945] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x940,value=020
[    5.548507] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x948,value=030
[    5.558069] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x94c,value=010
[    5.567612] >>>> End of setting mii1 pinmux >>>>>
[    5.572651] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8a0,value=08
[    5.582143] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8a4,value=08
[    5.591628] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8a8,value=08
[    5.601118] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8ac,value=08
[    5.610598] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8b0,value=08
[    5.620079] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8b4,value=08
[    5.629551] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8b8,value=08
[    5.639041] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8bc,value=08
[    5.648523] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8c0,value=08
[    5.658014] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8c4,value=08
[    5.667490] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8c8,value=08
[    5.676970] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8cc,value=08
[    5.686436] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8d0,value=08
[    5.695910] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8d4,value=08
[    5.705392] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8d8,value=08
[    5.714871] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8dc,value=08
[    5.724358] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x820,value=01
[    5.733845] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x824,value=01
[    5.743326] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x828,value=01
[    5.752805] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x82c,value=01
[    5.762281] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x830,value=01
[    5.771772] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x834,value=01
[    5.781238] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x838,value=01
[    5.790725] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x83c,value=01
[    5.800196] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8e0,value=00
[    5.809676] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8e4,value=00
[    5.819149] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8e8,value=00
[    5.828621] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x8ec,value=00
[    5.838373]  da8xx_lcdc.0: alias fck already exists
[    5.844390] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x99c,value=04
[    5.855187] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x978,value=00
[    5.864720] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x97c,value=028
[    5.874300] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x980,value=030
[    5.883883] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x984,value=00
[    5.893372] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x874,value=02f
[    5.902935] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x87c,value=017
[    5.912506] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x9ac,value=07
[    5.921970] Configure Bluetooth Enable pin...
[    5.926606] error setting wl12xx data
[    5.930525] wl12xx mmc device initialization failed
[    5.935731] omap_mux_write pinmuxname=core,phys=0x44e10000,baseaddr=0xf9e10000,reg=0x964,value=07
[    5.945199] >>>>>> am33xx_cpsw_init macaddr1 7c:66:9d:52:30:3c macaddr2 7c:66:9d:52:30:3e
[    5.953916] am33xx_cpsw_slaves[0].phy_if = 1,am33xx_cpsw_slaves[1].phy_if =1
[    5.961432] write 0x0  to gmii_sel
[    5.965071] am33xx_cpsw_slaves[0].phy_id=0:07,am33xx_cpsw_slaves[1].phy_id =0:04
[    5.974102] am335x_opp_update: unable to get core regulator
[    5.980732] lis3lv02d_i2c 1-0018: Failed to get supply 'Vdd': -19
[    5.991788] mtdoops: mtd device (mtddev=name/number) must be supplied
[    5.999533] omap2-nand driver initializing
[    6.004246] OneNAND driver initializing
[    6.012330] Fixed MDIO Bus: probed
[    6.016276] CAN device driver interface
[    6.020417] CAN bus driver for Bosch D_CAN controller 1.0
[    6.027943] davinci_mdio_probe bus_id=0,name=davinci_mdio.0
[    6.033971] ------------[ cut here ]------------
[    6.038988] WARNING: at fs/sysfs/dir.c:481 sysfs_add_one+0x88/0xa8()
[    6.045752] sysfs: cannot create duplicate filename '/class/mdio_bus/0'
[    6.052816] Modules linked in:
[    6.056069] Backtrace:
[    6.058762] [<c0017df0>] (dump_backtrace+0x0/0x10c) from [<c03ac7b8>] (dump_stack+0x18/0x1c)
[    6.067772]  r6:c00f7c24 r5:00000009 r4:ee82dd28 r3:c2836b0c
[    6.073858] [<c03ac7a0>] (dump_stack+0x0/0x1c) from [<c003cae0>] (warn_slowpath_common+0x54/0x6c)
[    6.083338] [<c003ca8c>] (warn_slowpath_common+0x0/0x6c) from [<c003cb9c>] (warn_slowpath_fmt+0x38/0x40)
[    6.093437]  r8:00000001 r7:ee8f6000 r6:ee8f6000 r5:ede9d9a0 r4:ffffffef
[    6.100446] r3:00000009
[    6.103263] [<c003cb64>] (warn_slowpath_fmt+0x0/0x40) from [<c00f7c24>] (sysfs_add_one+0x88/0xa8)
[    6.112714]  r3:ee8f6000 r2:c048cb14
[    6.116562] [<c00f7b9c>] (sysfs_add_one+0x0/0xa8) from [<c00f84c0>] (sysfs_do_create_link+0xf8/0x1e0)
[    6.126400]  r7:ee82dd80 r6:ee88d2c0 r5:ede9d9a0 r4:ede9dae0
[    6.132496] [<c00f83c8>] (sysfs_do_create_link+0x0/0x1e0) from [<c00f85bc>] (sysfs_create_link+0x14/0x18)
[    6.142720] [<c00f85a8>] (sysfs_create_link+0x0/0x18) from [<c0203d00>] (device_add+0x218/0x574)
[    6.152109] [<c0203ae8>] (device_add+0x0/0x574) from [<c0204078>] (device_register+0x1c/0x20)
[    6.161224] [<c020405c>] (device_register+0x0/0x20) from [<c0253e2c>] (mdiobus_register+0x80/0x174)
[    6.170866]  r4:edee4c04 r3:edec5b40
[    6.174726] [<c0253dac>] (mdiobus_register+0x0/0x174) from [<c03a77e0>] (davinci_mdio_probe+0x1f8/0x2e8)
[    6.184825]  r8:00000000 r7:ed77cf40 r6:ed7f9600 r5:ed7f9608 r4:edec5c80
[    6.191824] r3:c2836b0c
[    6.194655] [<c03a75e8>] (davinci_mdio_probe+0x0/0x2e8) from [<c0207a28>] (platform_drv_probe+0x1c/0x20)
[    6.204761]  r7:c285cd10 r6:c2870500 r5:c2897ac0 r4:ed7f9608
[    6.210859] [<c0207a0c>] (platform_drv_probe+0x0/0x20) from [<c0206694>] (driver_probe_device+0xb4/0x2c0)
[    6.221069] [<c02065e0>] (driver_probe_device+0x0/0x2c0) from [<c0206934>] (__driver_attach+0x94/0x98)
[    6.230982]  r8:00000000 r7:ed37c5c0 r6:ed7f963c r5:c285cd10 r4:ed7f9608
[    6.238200] [<c02068a0>] (__driver_attach+0x0/0x98) from [<c02053f0>] (bus_for_each_dev+0x4c/0x94)
[    6.247752]  r6:c02068a0 r5:c285cd10 r4:00000000 r3:c02068a0
[    6.253815] [<c02053a4>] (bus_for_each_dev+0x0/0x94) from [<c02062bc>] (driver_attach+0x24/0x28)
[    6.263184]  r6:c28557c8 r5:c285cd10 r4:c285cd10
[    6.268157] [<c0206298>] (driver_attach+0x0/0x28) from [<c0205f10>] (bus_add_driver+0x188/0x270)
[    6.277533] [<c0205d88>] (bus_add_driver+0x0/0x270) from [<c0206bf8>] (driver_register+0x80/0x144)
[    6.287114] [<c0206b78>] (driver_register+0x0/0x144) from [<c0207c30>] (platform_driver_register+0x4c/0x60)
[    6.297527] [<c0207be4>] (platform_driver_register+0x0/0x60) from [<c05262d4>] (davinci_mdio_init+0x14/0x1c)
[    6.308024] [<c05262c0>] (davinci_mdio_init+0x0/0x1c) from [<c000876c>] (do_one_initcall+0x128/0x1a8)
[    6.317866] [<c0008644>] (do_one_initcall+0x0/0x1a8) from [<c050688c>] (kernel_init+0x84/0x120)
[    6.327164] [<c0506808>] (kernel_init+0x0/0x120) from [<c003f924>] (do_exit+0x0/0x65c)
[    6.335589]  r5:c0506808 r4:00000000
[    6.339438] ---[ end trace 1b75b31a2719ed1d ]---
[    6.344822] mii_bus 0 failed to register
[    6.349112] davinci_mdio: probe of davinci_mdio.0 failed with error -22
[    6.356984] usbcore: registered new interface driver cdc_ether
[    6.363545] usbcore: registered new interface driver cdc_eem
[    6.369946] usbcore: registered new interface driver dm9601
[    6.375949] cdc_ncm: 04-Aug-2011
[    6.379785] usbcore: registered new interface driver cdc_ncm
[    6.385805] Initializing USB Mass Storage driver...
[    6.391526] usbcore: registered new interface driver usb-storage
[    6.397957] USB Mass Storage support registered.
[    6.403777] mousedev: PS/2 mouse device common for all mice
[    6.410725] i2c /dev entries driver
[    6.415363] Linux video capture interface: v2.00
[    6.421061] usbcore: registered new interface driver uvcvideo
[    6.427219] USB Video Class driver (1.1.1)
[    6.432440] cpuidle: using governor ladder
[    6.438017] cpuidle: using governor menu
[    6.442198] omap4_aes_mod_init: loading AM33X AES driver
[    6.448109] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
[    6.455292] omap4_aes_probe: probe() done
[    6.460110] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
[    6.466481] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
[    6.517956] omap4_sham_probe: probe() done
[    6.528356] usbcore: registered new interface driver usbhid
[    6.534297] usbhid: USB HID core driver
[    6.539770] tiadc tiadc: attached adc driver
[    6.544666] oprofile: hardware counters not available
[    6.550084] oprofile: using timer interrupt.
[    6.554685] nf_conntrack version 0.5.0 (11401 buckets, 45604 max)
[    6.562454] ip_tables: (C) 2000-2006 Netfilter Core Team
[    6.568396] TCP cubic registered
[    6.571844] NET: Registered protocol family 17
[    6.576589] can: controller area network core (rev 20090105 abi 8)
[    6.583364] NET: Registered protocol family 29
[    6.588132] can: raw protocol (rev 20090105)
[    6.592678] can: broadcast manager protocol (rev 20090105 t)
[    6.598799] 8021q: 802.1Q VLAN Support v1.8
[    6.603313] Registering the dns_resolver key type
[    6.608478] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    6.616644] ThumbEE CPU extension supported.
[    6.621333] mux: Failed to setup hwmod io irq -22
[    6.627828] Power Management for AM33XX family
[    6.633626] sr_init: platform driver register failed
[    6.640476] clock: disabling unused clocks to save power
[    7.497667] Detected MACID=7c:66:9d:52:30:3c
[    7.504516] cpsw: Detected MACID = 7c:66:9d:52:30:3e
[    7.523417] >>>> phy_connect >>> netdevname=eth0, interface=1
[    7.529588] PHY 0:07 not found
[    7.549654] >>>> phy_connect >>> netdevname=eth1, interface=1
[    7.555790] PHY 0:04 not found

  • Kernel这部分有修改过驱动么?

  • 修改过,修改内容如下:

    board-am335xevm.c

    1.增加mii的pinmux,删除rgmii1和rgmii2

    static struct evm_dev_cfg evm_sk_dev_cfg[] = {
    // {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {mmc1_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {mmc0_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    // {rgmii1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    // {rgmii2_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {mii1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {lcdc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {enable_ecap2, DEV_ON_BASEBOARD, PROFILE_ALL},
    {mfd_tscadc_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    // {gpio_keys_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    // {gpio_led_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {lis331dlh_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    // {mcasp1_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {uart1_wl12xx_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {wl12xx_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {gpio_ddr_vtt_enb_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {sgx_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    {NULL, 0, 0},
    };

    2.

    static void setup_starterkit(void)
    {
    pr_info("The board is a AM335x Starter Kit.\n");

    /* Starter Kit has Micro-SD slot which doesn't have Write Protect pin */
    am335x_mmc[0].gpio_wp = -EINVAL;

    _configure_device(EVM_SK, evm_sk_dev_cfg, PROFILE_NONE);

    am33xx_cpsw_init(AM33XX_CPSW_MODE_MII, NULL, NULL);
    /* Atheros Tx Clk delay Phy fixup */
    // phy_register_fixup_for_uid(AM335X_EVM_PHY_ID, AM335X_EVM_PHY_MASK,
    // am33xx_evm_tx_clk_dly_phy_fixup);
    }

    3.没有eeproom,修改am335x_evm_setup函数

    static void am335x_evm_setup(struct memory_accessor *mem_acc, void *context)
    {
    #if 0
    int ret;
    char tmp[10];

    /* 1st get the MAC address from EEPROM */
    ret = mem_acc->read(mem_acc, (char *)&am335x_mac_addr,
    EEPROM_MAC_ADDRESS_OFFSET, sizeof(am335x_mac_addr));

    if (ret != sizeof(am335x_mac_addr)) {
    pr_warning("AM335X: EVM Config read fail: %d\n", ret);
    return;
    }

    /* Fillup global mac id */
    am33xx_cpsw_macidfillup(&am335x_mac_addr[0][0],
    &am335x_mac_addr[1][0]);

    /* get board specific data */
    ret = mem_acc->read(mem_acc, (char *)&config, 0, sizeof(config));
    if (ret != sizeof(config)) {
    pr_err("AM335X EVM config read fail, read %d bytes\n", ret);
    pr_err("This likely means that there either is no/or a failed EEPROM\n");
    goto out;
    }

    if (config.header != AM335X_EEPROM_HEADER) {
    pr_err("AM335X: wrong header 0x%x, expected 0x%x\n",
    config.header, AM335X_EEPROM_HEADER);
    goto out;
    }

    if (strncmp("A335", config.name, 4)) {
    pr_err("Board %s\ndoesn't look like an AM335x board\n",
    config.name);
    goto out;
    }

    snprintf(tmp, sizeof(config.name) + 1, "%s", config.name);
    pr_info("Board name: %s\n", tmp);
    snprintf(tmp, sizeof(config.version) + 1, "%s", config.version);
    pr_info("Board version: %s\n", tmp);

    if (!strncmp("A335BONE", config.name, 8)) {
    daughter_brd_detected = false;
    if(!strncmp("00A1", config.version, 4) ||
    !strncmp("00A2", config.version, 4))
    setup_beaglebone_old();
    else
    setup_beaglebone();
    } else if (!strncmp("A335BNLT", config.name, 8)) {
    setup_beagleboneblack();
    } else if (!strncmp("A335X_SK", config.name, 8)) {
    daughter_brd_detected = false;
    setup_starterkit();
    } else {
    /* only 6 characters of options string used for now */
    snprintf(tmp, 7, "%s", config.opt);
    pr_info("SKU: %s\n", tmp);

    if (!strncmp("SKU#01", config.opt, 6))
    setup_general_purpose_evm();
    else if (!strncmp("SKU#02", config.opt, 6))
    setup_ind_auto_motor_ctrl_evm();
    else
    goto out;
    }

    am335x_opp_update();

    /*
    * For now, Beaglebone Black uses PG 2.0 that are speed binned and operate
    * up to 1GHz. So re-enable Turbo and Nitro modes,
    */
    if (!strncmp("A335BNLT", config.name, 8)) {
    struct device *mpu_dev;

    mpu_dev = omap_device_get_by_hwmod_name("mpu");
    opp_enable(mpu_dev,
    AM33XX_ES2_0_OPPTURBO_FREQ);
    opp_enable(mpu_dev,
    AM33XX_ES2_0_OPPNITRO_FREQ);
    }

    /* SmartReflex also requires board information. */
    am33xx_sr_init();

    return;
    #endif

    daughter_brd_detected = false;
    setup_starterkit();
    am335x_opp_update();

    return;

    out:
    /*
    * If the EEPROM hasn't been programed or an incorrect header
    * or board name are read then the hardware details are unknown.
    * Notify the user and call machine_halt to stop the boot process.
    */
    pr_err("The error message above indicates that there is an issue with\n"
    "the EEPROM or the EEPROM contents. After verifying the EEPROM\n"
    "contents, if any, refer to the %s function in the\n"
    "%s file to modify the board\n"
    "initialization code to match the hardware configuration\n",
    __func__ , __FILE__);
    machine_halt();
    }

    4.增加dp83848驱动文件,请参考附件

    5.修改phyid

    static struct cpsw_slave_data am33xx_cpsw_slaves[] = {
    {
    .slave_reg_ofs = 0x200,
    .sliver_reg_ofs = 0xd80,
    .phy_id = "0:07",
    .dual_emac_reserved_vlan = CPSW_PORT_VLAN_SLAVE_0,
    },
    {
    .slave_reg_ofs = 0x300,
    .sliver_reg_ofs = 0xdc0,
    .phy_id = "0:04",
    .dual_emac_reserved_vlan = CPSW_PORT_VLAN_SLAVE_1,
    },
    };

    6.另外,kernel中的“Generic PHY”就可以用吧?我看了下phy_device.c的代码,我的dp83848j.c的内容完全可以搬过来,驱动的很多函数是用的这个里面的函数。

    注:该dp83848j.c的驱动在该版本的u-boot下调试功能正常