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.

AR8035 on am335x custom board with sdk8

Other Parts Discussed in Thread: TPS65910

Hi TI


AR8035 can't not obtain IP when I ifup eth1.  

root@am335x-evm:~# ifconfig eth1 up
[  143.828890] net eth1: initializing cpsw version 1.12 (0)
[  143.917997] net eth1: phy found : id is : 0x4dd072

root@am335x-evm:~# ifup eth1
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending discover...

But there are some wired because RX and TX all have data like this:

eth1      Link encap:Ethernet  HWaddr D0:39:72:4D:53:4D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:32 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:2924 (2.8 KiB)  TX bytes:1026 (1.0 KiB)

=================================================================================

I have checked pinmux RGMII2 in am335x-evmsk.dts in slave2, that is no problem

»   /* Slave 2 */
342 »   »   »   0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)» /* gpmc_a0.rgmii2_tctl *
343 »   »   »   0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)»  /* gpmc_a1.rgmii2_rctl *
344 »   »   »   0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)» /* gpmc_a2.rgmii2_td3 */
345 »   »   »   0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)» /* gpmc_a3.rgmii2_td2 */
346 »   »   »   0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)» /* gpmc_a4.rgmii2_td1 */
347 »   »   »   0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)» /* gpmc_a5.rgmii2_td0 */
348 »   »   »   0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)» /* gpmc_a6.rgmii2_tclk *
349 »   »   »   0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)»  /* gpmc_a7.rgmii2_rclk *
350 »   »   »   0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)»  /* gpmc_a8.rgmii2_rd3 */
351 »   »   »   0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)»  /* gpmc_a9.rgmii2_rd2 */
352 »   »   »   0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)»  /* gpmc_a10.rgmii2_rd1 *
353 »   »   »   0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)»  /* gpmc_a11.rgmii2_rd0 *
354 »   »   >;

    and phy_id  in dts

&cpsw_emac1 {
   phy_id = <&davinci_mdio>, <7>;
   phy-mode = "rgmii-txid";
   dual_emac_res_vlan = <2>;

Do I have lost something?

=====================================================================================

By the way. We use sdk6, AR8035 works very good. This is our revise:

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

Thank you.

  

  • To supply:

    If I set Ip manually ifconfig eth1 192.168.30.1 netmask 255.255.255.0 , then connect to computer directly, It still can't ping each other.
  • Hi Bernie,

    How many Ethernet ports do you have on your board? Please note that if you have 2, then they must be connected to different network segments.

  • Hi Biser
    1 ethernet wan port & 4 switch LAN ports.
  • Do you have Dual EMAC enabled as described here: http://processors.wiki.ti.com/index.php/Linux_Core_CPSW_User's_Guide#Dual_Standalone_EMAC_mode (under Dual EMAC Device tree entry)?

  • Hi Biser

    SDK8 kernel config has default configs built in for dual emac

    [*] Texas Instruments (TI) devices │ │
    │ │ -*- TI DaVinci MDIO Support │ │
    │ │ -*- TI DaVinci CPDMA Support │ │
    │ │ -*- TI CPSW Switch Phy sel Support │ │
    │ │ <*> TI CPSW Switch Support │ │
    │ │ [*] TI Common Platform Time Sync (CPTS) Support

    and DTS file has default "dual_emac = <1>"

    &mac {
    651 » pinctrl-names = "default", "sleep";
    652 » pinctrl-0 = <&cpsw_default>;
    653 » pinctrl-1 = <&cpsw_sleep>;
    654 » dual_emac = <1>;
    655 };

    and there are my boot message below

    cpsw 4a100000.ethernet: Detected MACID = d0:39:72:4d:53:4b
    [ 3.052133] cpsw 4a100000.ethernet: cpsw: Detected MACID = d0:39:72:4d:53:4d

    And I doubt am33xx.dtsi: "active_slave=<0>" should be active_slave=<1>?

    mac: ethernet@4a100000 {
    683 » » » compatible = "ti,cpsw";
    684 » » » ti,hwmods = "cpgmac0";
    685 » » » clocks = <&cpsw_125mhz_gclk>, <&cpsw_cpts_rft_clk>;
    686 » » » clock-names = "fck", "cpts";
    687 » » » cpdma_channels = <8>;
    688 » » » ale_entries = <1024>;
    689 » » » bd_ram_size = <0x2000>;
    690 » » » no_bd_ram = <0>;
    691 » » » rx_descs = <64>;
    692 » » » mac_control = <0x20>;
    693 » » » slaves = <2>;
    694 » » » active_slave = <0>;


    Thank you.
  • Hello

    I attache my boot log with ubuntu 14.04 , hope somebody give me suggestions.......maybe some wrong message cause ethernet problem.
    Thank you very much

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 3.14.26-g2d3247c-dirty (bernie@ubuntu) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 Wed May 13 16:12:35 CST 2015
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: TI AM335x EVM-SK
    [ 0.000000] cma: CMA: reserved 24 MiB at 8c800000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64512
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
    [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.000000] Memory: 224296K/260096K available (5831K kernel code, 314K rwdata, 2100K rodata, 269K init, 231K bss, 35800K 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 : 0xd0800000 - 0xff000000 ( 744 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc07c7054 (7933 kB)
    [ 0.000000] .init : 0xc07c8000 - 0xc080b504 ( 270 kB)
    [ 0.000000] .data : 0xc080c000 - 0xc085a9a0 ( 315 kB)
    [ 0.000000] .bss : 0xc085a9a0 - 0xc0894978 ( 232 kB)
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] Total of 128 interrupts on 1 active controller
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000026] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
    [ 0.000072] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000676] Console: colour dummy device 80x30
    [ 0.000742] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992)
    [ 0.068464] pid_max: default: 32768 minimum: 301
    [ 0.068686] Security Framework initialized
    [ 0.068804] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.068831] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.086741] CPU: Testing write buffer coherency: ok
    [ 0.087478] Setting up static identity map for 0x805b81a0 - 0x805b81f8
    [ 0.089661] devtmpfs: initialized
    [ 0.094008] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.112602] omap_hwmod: tptc0 using broken dt data from edma
    [ 0.112812] omap_hwmod: tptc1 using broken dt data from edma
    [ 0.112998] omap_hwmod: tptc2 using broken dt data from edma
    [ 0.119492] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.189541] pinctrl core: initialized pinctrl subsystem
    [ 0.191818] regulator-dummy: no parameters
    [ 0.196558] NET: Registered protocol family 16
    [ 0.201547] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.207614] cpuidle: using governor ladder
    [ 0.207651] cpuidle: using governor menu
    [ 0.224710] syscon 44e10000.control_module: regmap [mem 0x44e10000-0x44e107fb] registered
    [ 0.228291] platform 49000000.edma: alias fck already exists
    [ 0.228350] platform 49000000.edma: alias fck already exists
    [ 0.228387] platform 49000000.edma: alias fck already exists
    [ 0.231194] OMAP GPIO hardware version 0.1
    [ 0.264775] No ATAGs?
    [ 0.264826] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.330985] bio: create slab <bio-0> at 0
    [ 0.370558] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    [ 0.372844] vbat: 5000 mV
    [ 0.373755] lis3_reg: no parameters
    [ 0.374918] vtt: 1500 mV
    [ 0.382601] vgaarb: loaded
    [ 0.383841] i2c-core: driver [palmas] using legacy suspend method
    [ 0.383866] i2c-core: driver [palmas] using legacy resume method
    [ 0.385573] SCSI subsystem initialized
    [ 0.389307] usbcore: registered new interface driver usbfs
    [ 0.389779] usbcore: registered new interface driver hub
    [ 0.390265] usbcore: registered new device driver usb
    [ 0.392531] omap_i2c 4802a000.i2c: could not find pctldev for node /pinmux@44e10800/pinmux_i2c1_pins, deferring probe
    [ 0.392595] platform 4802a000.i2c: Driver omap_i2c requests probe deferral
    [ 0.393548] pps_core: LinuxPPS API ver. 1 registered
    [ 0.393577] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.393908] PTP clock support registered
    [ 0.398688] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 0.400727] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.404442] Switched to clocksource timer1
    [ 0.452973] NET: Registered protocol family 2
    [ 0.455079] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.455167] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.455240] TCP: Hash tables configured (established 2048 bind 2048)
    [ 0.455396] TCP: reno registered
    [ 0.455427] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.455476] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.455912] NET: Registered protocol family 1
    [ 0.456728] RPC: Registered named UNIX socket transport module.
    [ 0.456755] RPC: Registered udp transport module.
    [ 0.456772] RPC: Registered tcp transport module.
    [ 0.456789] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.459015] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
    [ 0.465505] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.903130] VFS: Disk quotas dquot_6.5.2
    [ 0.903273] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 0.904425] NFS: Registering the id_resolver key type
    [ 0.904724] Key type id_resolver registered
    [ 0.904751] Key type id_legacy registered
    [ 0.904844] jffs2: version 2.2. (NAND) (SUMMARY) c 2001-2006 Red Hat, Inc.
    [ 0.905255] msgmni has been set to 486
    [ 0.908818] NET: Registered protocol family 38
    [ 0.908912] io scheduler noop registered
    [ 0.908934] io scheduler deadline registered
    [ 0.908985] io scheduler cfq registered (default)
    [ 0.912950] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 0.920760] backlight.9 supply power not found, using dummy regulator
    [ 0.929310] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [ 0.936808] omap_uart 44e09000.serial: no wakeirq for uart0
    [ 0.937147] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
    [ 1.589384] console [ttyO0] enabled
    [ 1.596346] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [ 1.604186] [drm] Initialized drm 1.1.0 20060810
    [ 1.636266] brd: module loaded
    [ 1.653231] loop: module loaded
    [ 1.657451] (hci_tty): inside hci_tty_init
    [ 1.662811] (hci_tty): allocated 249, 0
    [ 1.675799] mtdoops: mtd device (mtddev=name/number) must be supplied
    [ 1.691384] usbcore: registered new interface driver asix
    [ 1.697644] usbcore: registered new interface driver ax88179_178a
    [ 1.704582] usbcore: registered new interface driver cdc_ether
    [ 1.711136] usbcore: registered new interface driver smsc95xx
    [ 1.717653] usbcore: registered new interface driver net1080
    [ 1.724062] usbcore: registered new interface driver cdc_subset
    [ 1.730684] usbcore: registered new interface driver zaurus
    [ 1.737202] usbcore: registered new interface driver cdc_ncm
    [ 1.744312] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 1.751251] ehci-pci: EHCI PCI platform driver
    [ 1.756431] ehci-omap: OMAP-EHCI Host Controller driver
    [ 1.762997] usbcore: registered new interface driver cdc_wdm
    [ 1.769513] usbcore: registered new interface driver usb-storage
    [ 1.781111] 47401300.usb-phy supply vcc not found, using dummy regulator
    [ 1.792938] musb-hdrc musb-hdrc.0.auto: Failed to request rx1.
    [ 1.799458] musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
    [ 1.807742] platform musb-hdrc.0.auto: Driver musb-hdrc requests probe deferral
    [ 1.817118] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [ 1.828685] musb-hdrc musb-hdrc.1.auto: Failed to request rx1.
    [ 1.835154] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -517
    [ 1.843375] platform musb-hdrc.1.auto: Driver musb-hdrc requests probe deferral
    [ 1.887506] mousedev: PS/2 mouse device common for all mice
    [ 1.896791] TI-am335x-tsc TI-am335x-tsc: ti,charge-delay not specified
    [ 1.904950] input: ti-tsc as /devices/ocp.3/44e0d000.tscadc/TI-am335x-tsc/input/input0
    [ 1.916800] i2c-core: driver [rtc-ds1307] using legacy suspend method
    [ 1.923588] i2c-core: driver [rtc-ds1307] using legacy resume method
    [ 1.932033] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [ 1.941590] i2c /dev entries driver
    [ 1.945746] Driver for 1-wire Dallas network protocol.
    [ 1.956023] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 1.978504] omap_hsmmc 48060000.mmc: unable to get vmmc regulator -517
    [ 1.985707] platform 48060000.mmc: Driver omap_hsmmc requests probe deferral
    [ 1.994197] pinctrl-single 44e10800.pinmux: bad data for mux user_leds_sleep
    [ 2.001698] pinctrl-single 44e10800.pinmux: no pins entries for user_leds_sleep
    [ 2.013212] ledtrig-cpu: registered to indicate activity on CPUs
    [ 2.020355] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [ 2.029238] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [ 2.038973] usbcore: registered new interface driver usbhid
    [ 2.044930] usbhid: USB HID core driver
    [ 2.049804] platform 44d00000.wkup_m3: Driver wkup_m3 requests probe deferral
    [ 2.065008] oprofile: using arm/armv7
    [ 2.069538] TCP: cubic registered
    [ 2.073030] Initializing XFRM netlink socket
    [ 2.077778] NET: Registered protocol family 17
    [ 2.082532] NET: Registered protocol family 15
    [ 2.087469] Key type dns_resolver registered
    [ 2.093454] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [ 2.102710] cpu cpu0: cpu0 clock notifier not ready, retry
    [ 2.108691] platform cpufreq-cpu0.0: Driver cpufreq-cpu0 requests probe deferral
    [ 2.117847] PM: bootloader does not support rtc-only!
    [ 2.123186] ThumbEE CPU extension supported.
    [ 2.127957] Registering SWP/SWPB emulation handler
    [ 2.136452] lis3_reg: disabling
    [ 2.139784] vbat: disabling
    [ 2.142727] regulator-dummy: disabling
    [ 2.154256] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 2.161337] [drm] No driver support for vblank timestamp query.
    [ 2.230395] Console: switching to colour frame buffer device 60x34
    [ 2.242601] tilcdc 4830e000.lcdc: fb0: frame buffer device
    [ 2.248494] tilcdc 4830e000.lcdc: registered panic notifier
    [ 2.254372] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
    [ 2.265826] tps65910 1-002d: No interrupt support, no core IRQ
    [ 2.278370] vrtc: 1800 mV
    [ 2.281697] vrtc: supplied by vbat
    [ 2.287963] vio: at 1500 mV
    [ 2.291182] vio: supplied by vbat
    [ 2.297520] vdd_mpu: 912 <--> 1375 mV at 1100 mV
    [ 2.302648] vdd_mpu: supplied by vbat
    [ 2.309151] vdd_core: 912 <--> 1150 mV at 1100 mV
    [ 2.314372] vdd_core: supplied by vbat
    [ 2.320699] vdd3: 5000 mV
    [ 2.325831] vdig1: at 1800 mV
    [ 2.329233] vdig1: supplied by vbat
    [ 2.335183] vdig2: at 1800 mV
    [ 2.338568] vdig2: supplied by vbat
    [ 2.344477] vpll: at 1800 mV
    [ 2.347778] vpll: supplied by vbat
    [ 2.353519] vdac: at 1800 mV
    [ 2.356849] vdac: supplied by vbat
    [ 2.362690] vaux1: at 1800 mV
    [ 2.366129] vaux1: supplied by vbat
    [ 2.371946] vaux2: at 3300 mV
    [ 2.375466] vaux2: supplied by vbat
    [ 2.381211] vaux33: at 3300 mV
    [ 2.384785] vaux33: supplied by vbat
    [ 2.390837] vmmc: 1800 <--> 3300 mV at 3300 mV
    [ 2.395816] vmmc: supplied by vbat
    [ 2.403532] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
    [ 2.417316] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    [ 2.424386] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    [ 2.433205] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 2.440416] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 2.448036] usb usb1: Product: MUSB HDRC host driver
    [ 2.453260] usb usb1: Manufacturer: Linux 3.14.26-g2d3247c-dirty musb-hcd
    [ 2.460424] usb usb1: SerialNumber: musb-hdrc.0.auto
    [ 2.467993] hub 1-0:1.0: USB hub found
    [ 2.472104] hub 1-0:1.0: 1 port detected
    [ 2.486133] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [ 2.493135] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    [ 2.501926] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [ 2.509136] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 2.516761] usb usb2: Product: MUSB HDRC host driver
    [ 2.521987] usb usb2: Manufacturer: Linux 3.14.26-g2d3247c-dirty musb-hcd
    [ 2.529158] usb usb2: SerialNumber: musb-hdrc.1.auto
    [ 2.536558] hub 2-0:1.0: USB hub found
    [ 2.540663] hub 2-0:1.0: 1 port detected
    [ 2.585792] remoteproc0: wkup_m3 is available
    [ 2.590494] remoteproc0: Note: remoteproc is still under development and considered experimental.
    [ 2.600024] remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [ 2.611298] remoteproc0: Direct firmware load failed with error -2
    [ 2.618012] remoteproc0: Falling back to user helper
    [ 2.661600] mmc0: host does not support reading read-only switch. assuming write-enable.
    [ 2.672401] mmc0: new high speed SDHC card at address b368
    [ 2.695768] mmcblk0: mmc0:b368 USD 7.45 GiB
    [ 2.702926] mmcblk0: p1 p2
    [ 2.744492] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 2.750942] davinci_mdio 4a101000.mdio: detected phy mask f00fff00
    [ 2.768304] libphy: 4a101000.mdio: probed
    [ 2.772556] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
    [ 2.781048] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
    [ 2.789497] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver unknown
    [ 2.797944] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver unknown
    [ 2.806394] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver unknown
    [ 2.814839] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver unknown
    [ 2.823267] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver unknown
    [ 2.831713] davinci_mdio 4a101000.mdio: phy[7]: device 4a101000.mdio:07, driver AR8035 Gigabit Ethernet
    [ 2.841619] davinci_mdio 4a101000.mdio: phy[20]: device 4a101000.mdio:14, driver unknown
    [ 2.850201] davinci_mdio 4a101000.mdio: phy[21]: device 4a101000.mdio:15, driver unknown
    [ 2.858738] davinci_mdio 4a101000.mdio: phy[22]: device 4a101000.mdio:16, driver unknown
    [ 2.867277] davinci_mdio 4a101000.mdio: phy[23]: device 4a101000.mdio:17, driver unknown
    [ 2.875812] davinci_mdio 4a101000.mdio: phy[24]: device 4a101000.mdio:18, driver unknown
    [ 2.884336] davinci_mdio 4a101000.mdio: phy[25]: device 4a101000.mdio:19, driver unknown
    [ 2.892869] davinci_mdio 4a101000.mdio: phy[26]: device 4a101000.mdio:1a, driver unknown
    [ 2.901405] davinci_mdio 4a101000.mdio: phy[27]: device 4a101000.mdio:1b, driver unknown
    [ 2.911399] cpsw 4a100000.ethernet: Detected MACID = d0:39:72:4d:53:4b
    [ 2.920127] cpsw 4a100000.ethernet: cpsw: Detected MACID = d0:39:72:4d:53:4d
    [ 2.930877] input: gpio_buttons.8 as /devices/gpio_buttons.8/input/input1
    [ 2.939229] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
    [ 2.952434] ALSA device list:
    [ 2.955700] No soundcards found.
    [ 2.973464] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 2.982238] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
    [ 2.993224] devtmpfs: mounted
    [ 2.996976] Freeing unused kernel memory: 268K (c07c8000 - c080b000)
    [ 3.154955] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 0008010c
    Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory
    [ 3.350019] random: init urandom read with 34 bits of entropy available
    [ 3.723102] init: ureadahead main process (942) terminated with status 5
    [ 6.086110] wkup_m3 44d00000.wkup_m3: rproc_boot failed
    Last login: Sat Jan 1 00:00:13 UTC 2000 on ttyO0
    Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.14.26-g2d3247c-dirty armv7l)
  • Hello

    This patch we did in sdk6 and works very well

    static int am33xx_evm_tx_clk_dly_phy_fixup(struct phy_device *phydev)
    {
    - phy_write(phydev, AR8051_PHY_DEBUG_ADDR_REG,
    + /*phy_write(phydev, AR8051_PHY_DEBUG_ADDR_REG,
    AR8051_DEBUG_RGMII_CLK_DLY_REG);
    - phy_write(phydev, AR8051_PHY_DEBUG_DATA_REG, AR8051_RGMII_TX_CLK_DLY);
    + phy_write(phydev, AR8051_PHY_DEBUG_DATA_REG, AR8051_RGMII_TX_CLK_DLY);*/
    + //Wig modify for AR8035 PHY fixup start (refer from u-boot AR8035 part)
    + int regval;
    + int reg;
    + int timeout = 500;
    +
    + phy_write(phydev, 0xd, 0x0007);
    + phy_write(phydev, 0xe, 0x8016);
    + phy_write(phydev, 0xd, 0x4007);
    + regval = phy_read(phydev, 0xe);
    + phy_write(phydev, 0xe, (regval|0x0018));
    +
    + phy_write(phydev, 0x1d, 0x05);
    + regval = phy_read(phydev, 0x1e);
    + phy_write(phydev, 0x1e, (regval|0x0100));
    +
    + genphy_config_aneg(phydev);
    +
    +
    + reg = phy_read(phydev, MII_BMCR);
    + if (reg < 0) {
    + printk("PHY status read failed\n");
    + return -1;
    + }
    +
    + reg |= BMCR_RESET;
    +
    + if (phy_write(phydev, MII_BMCR, reg) < 0) {
    + printk("PHY reset failed\n");
    + return -1;
    + }
    +
    + /*
    + * Poll the control register for the reset bit to go to 0 (it is
    + * auto-clearing). This should happen within 0.5 seconds per the
    + * IEEE spec.
    + */
    + while ((reg & BMCR_RESET) && timeout--) {
    + reg = phy_read(phydev, MII_BMCR);
    +
    + if (reg < 0) {
    + printk("PHY status read failed\n");
    + return -1;
    + }
    + udelay(1000);
    + }
    +
    + if (reg & BMCR_RESET) {
    + printk("PHY reset timed out\n");
    + return -1;
    + }

    return 0;
    }
    @@ -2363,7 +2414,9 @@ static void setup_starterkit(void)

    am33xx_cpsw_init(AM33XX_CPSW_MODE_RGMII, NULL, NULL);
    /* Atheros Tx Clk delay Phy fixup */
    - phy_register_fixup_for_uid(AM335X_EVM_PHY_ID, AM335X_EVM_PHY_MASK,
    + /*phy_register_fixup_for_uid(AM335X_EVM_PHY_ID, AM335X_EVM_PHY_MASK,
    + am33xx_evm_tx_clk_dly_phy_fixup);*/
    +phy_register_fixup_for_uid(AR8035_PHY_ID, AM335X_EVM_PHY_MASK,
    am33xx_evm_tx_clk_dly_phy_fixup);
    }


    Where I can apply this patch in sdk8 about phy TX delay ?????

    At beginning, because our AR8035 at slave2, icplus phy at slave1, so I doubt in u-boot level don't initialize AR8035, then I do these change below:

    diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
    index bbbc9f4..f62f375 100644
    --- a/board/ti/am335x/board.c
    +++ b/board/ti/am335x/board.c
    @@ -547,7 +547,7 @@ static void cpsw_control(int enabled)
    }

    static struct cpsw_slave_data cpsw_slaves[] = {
    - {
    + /*{
    .slave_reg_ofs = 0x208,
    .sliver_reg_ofs = 0xd80,
    .phy_addr = 0,
    @@ -556,6 +556,16 @@ static struct cpsw_slave_data cpsw_slaves[] = {
    .slave_reg_ofs = 0x308,
    .sliver_reg_ofs = 0xdc0,
    .phy_addr = 1,
    + },*/
    + {
    + .slave_reg_ofs = 0x308,
    + .sliver_reg_ofs = 0xdc0,
    + .phy_addr = 7,
    + },
    + {
    + .slave_reg_ofs = 0x208,
    + .sliver_reg_ofs = 0xd80,
    + .phy_addr = 0,
    },
    };

    @@ -651,7 +661,7 @@ int board_eth_init(bd_t *bis)
    } else {
    writel((RGMII_MODE_ENABLE | RGMII_INT_DELAY), &cdev->miisel);
    cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
    - PHY_INTERFACE_MODE_RGMII;
    + PHY_INTERFACE_MODE_MII;
    }

    rv = cpsw_register(&cpsw_data);
    diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
    index 8ec5161..96fe97a 100644
    --- a/drivers/net/cpsw.c
    +++ b/drivers/net/cpsw.c
    @@ -630,10 +630,11 @@ static int cpsw_check_link(struct cpsw_priv *priv)

    static inline u32 cpsw_get_slave_port(struct cpsw_priv *priv, u32 slave_num)
    {
    - if (priv->host_port == 0)
    + /*if (priv->host_port == 0)
    return slave_num + 1;
    else
    - return slave_num;
    + return slave_num;*/
    + return 2;
    }
    index 1a1d999..43e20a1 100644
    --- a/include/configs/am335x_evm.h
    +++ b/include/configs/am335x_evm.h
    @@ -12,7 +12,8 @@
    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU General Public License for more details.
    */
    -
    +#define CONFIG_PHY_ICPLUS
    +#define CONFIG_PHY_ATHEROS
    #ifndef __CONFIG_AM335X_EVM_H
    #define __CONFIG_AM335X_EVM_H

    It is indeed getting into AR8035 config of driver to initialize in u-boot, but it is not affecting.

    and I dump some value of register:

    root@am335x-evm:~# devmem2 0x44e10650
    /dev/mem opened.
    Memory mapped at address 0xb6f8b000.
    Read at address 0x44E10650 (0xb6f8b650): 0x0000003A , and 0x79 in sdk6

    I make sure pimnux of RGMII2 is correct.

    We have no idea to try, please help, thank you.

  • There is a file in kernel : arch/arm/mach-imx/mach-imx6q.c, I found they have some information about AR8031 TX delay, I don't know why AR8035 don't need it, but my patch of sdk6 have done , then where I can do these fix up in sdk 8? I will appreciate that you give me a hand.
  • Hi Bernie Chen,

    I am in a similar situation although I believe the fixup has been moved to the phy driver in linux. I believe the fixup is in at803x.c in /drivers/net/phy/at803x.c Line: 180

    I can get gigabit working at sub-optimal performance by changing the phy-mode in am335x device tree. The phy-mode is rgmii-txid but when changed to rgmii it appears to work (Although I should clarify that this does not seem to be the correct phy mode). Although the performance is horrible.
    When using iperf. The transmission is approximate 32Mbit/s and Receiving is approximately 90Mbit/s.

    I have tested the same board on Linux 3.2 and able to get transmission of 280Mbit/s and receving of 320Mbit/s.

    Could a TI Member please clarify what the issue may be with this?

    EDIT:
    Although even being in RGMII (no TXID) mode wouldn't explain the poor performance when receiving data. So I am guessing a clock division has gone wrong in am335x-clocks.dtsi. I remember reading a post in regards to this issue that relates with CORE_CLOCKOUTM5. But I could be completely wrong

  • Hi Tyson Thomas

    Sorry. Indeed, my AR8035 has been not worked yet. Just like you see. And could you attach your patch about device tree file for us if you don't mind? Thank you.
  • Hi Bernie,

    Sorry for the late reply.

    If you open your kernel's source and go to /arch/arm/boot/dts and open (I'm going to assume your board is based on EVM). Modify the &cpsw_emac0 node in am335x-evm.dts. It will state the phy-id and phy-mode.
    Change it to:
    phy_id = <&davinci_mdio>, <7>; /*Your phy id that I saw in your boot log*/
    phy-mode = "rgmii"; /*phy mode, strangely ours works without txid*/

    I don't believe rgmii is the right mode but as of today I have sort of resolved my performance issues and have not changed back to rgmii-txid.
  • Dear Tyson

    Excuse me, which version of TISDK you are using?
  • Dear Tyson

    Do you have checked this thread?
    www.deyisupport.com/.../203718.aspx

    This is problem about your RX TX speed with internal delay bit of GMII_SEL.

    By the way, I still try to find the problem why I can't get IP address with my AR8035
  • Hi Bernie,


    So in regards to my problem, I have managed to solve it by reconfiguring my kernel which was strange solution as I can't for the life of me figure out what I configured that caused this issue. I can confirm that my phy-mode is still on RGMII (Not RGMII-TXID) and I am getting the speeds shown on the TI Ethernet performance wiki (approximately 280Mbit/s up, 360Mbit/s down).


    I tested this on both SDK8 and SDK1.003 (Latest) as well as with mainline kernel from github.


    Thank you for your help I can only hope my assistance has helped you solve your problem.


    I'll take an excerpt from my DTS file in /arch/arm/boot/dts/am335x-evmsk.dts

    So if you look at (Which is the default from am335x-evmsk.dts):

    &cpsw_emac0 {
        phy_id = <&davinci_mdio>, <0>;
        phy-mode = "rgmii-txid";
        dual_emac_res_vlan = <1>;
    };

    The changes you will need to do are:

    &cpsw_emac0 {
        phy_id = <&davinci_mdio>, <7>; /* This reflects the id that I saw in your bootlog */
        phy-mode = "rgmii"; /* This has enabled gigabit ethernet for me */
        dual_emac_res_vlan = <1>;
    };


    Although I am using the am335x-evmsk as an example you could be basing your custom board off that device tree. If not I would look into what dtb file that uboot is loading or what dtb file that is being appended to your kernel.

  • Hi Tyson

    Thanks your sharing and I want to know your AR8035 that is on slave1 or slave2 ?

    Thank you. 

  • I have a AR8035 on both

  • Dear Tyson


    May I check your value of gmii_sel register? plz make "devmem2 0x44e10650", Thank you very much..

     

  • Dear chen,
    Are you success now? I have the same problem, the eth1 can see ,but cannot ping.
  • Dear chen,

    Plese reply me ,or send a email at 465226464@qq.com. Thanks a lot.
  • Hi
    sdk8 u-boot initialize core volutage and MPU frequency to opp50, so you have no function of ethernet