pepe2k / u-boot_mod

U-Boot 1.1.4 modification for routers
GNU General Public License v2.0
1.08k stars 537 forks source link

wr740n_v4 openwrt wlan can't work #100

Closed jacycle closed 8 years ago

jacycle commented 8 years ago

hello pepe2k, I have a board tplink-wr740n, I update the fireware openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin when I build u-boot_mod and update, the logs are the following content.

*     U-Boot 1.1.4--clean     *
*        Apr 13 2016, 20:45:07        *
***************************************

  BOARD: TP-Link TL-WR74xN/D v4
    SOC: AR9330 rev. 1
    CPU: MIPS 24Kc
    RAM: 64 MB DDR2 16-bit CL3-4-4-10
  FLASH: 16 MB Winbond W25Q128
    MAC: 00:03:7F:09:0B:AD (fixed)
 CLOCKS: CPU/RAM/AHB/SPI/REF
         400/400/200/ 25/ 25 MHz

Hit any key to stop autobooting:  0 

Booting image at: 0x9F020000

   Image name:   OpenWrt r42625
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1107084 Bytes = 1.1 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... OK!
Starting kernel...
..
..
..
procd: - init complete -
[   24.290000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   24.290000] device eth0 entered promiscuous mode
[   24.300000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   24.320000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   25.150000] eth0: link up (1000Mbps/Full duplex)
[   25.150000] br-lan: port 1(eth0) entered forwarding state
[   25.160000] br-lan: port 1(eth0) entered forwarding state
[   25.160000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   25.190000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   27.160000] br-lan: port 1(eth0) entered forwarding state

I use another boot, the logs are the following content.

*********************************************
*        U-Boot 1.1.4  (Jun 19 2014)        *
*********************************************

AP121 (AR9331) U-Boot

DRAM:   64 MB DDR2 16-bit
FLASH:  Winbond W25Q128 (16 MB)
CLOCKS: 400/400/200/25 MHz (CPU/RAM/AHB/SPI)

LED on during eth initialization...

Hit any key to stop autobooting:  0 

Booting image at: 0x9F020000

   Image name:   OpenWrt r42625
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1107084 Bytes = 1.1 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... OK!
Starting kernel...
..
..
..
procd: - init complete -
[   23.340000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   23.340000] device eth0 entered promiscuous mode
[   23.350000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   23.370000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   24.180000] eth0: link up (1000Mbps/Full duplex)
[   24.180000] br-lan: port 1(eth0) entered forwarding state
[   24.190000] br-lan: port 1(eth0) entered forwarding state
[   24.190000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   24.230000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   25.100000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   25.120000] device wlan0 entered promiscuous mode
[   25.130000] br-lan: port 2(wlan0) entered forwarding state
[   25.130000] br-lan: port 2(wlan0) entered forwarding state
[   25.140000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   26.190000] br-lan: port 1(eth0) entered forwarding state
[   27.130000] br-lan: port 2(wlan0) entered forwarding state

The question is

  1. when I use u-boot_mod image, the wifi can't work, use the other boot, it works well. login the web, if channged the wifi configuration or led configuration will let the watchdog reset.
  2. The chip is ar9331, why the boot print SOC: AR9330 rev. 1

I don't down how to reslove the problem. Someone can give me a hand.

pepe2k commented 8 years ago

Hello @jacycle,

  1. The chip is ar9331, why the boot print SOC: AR9330 rev. 1

AR9331 == AR9330 rev. 1.

  1. when I use u-boot_mod image, the wifi can't work, use the other boot, it works well. login the web, if channged the wifi configuration or led configuration will let the watchdog reset.

First of all, I see at least two problems with your board:

  1. It seems that your MAC address is missing (MAC: 00:03:7F:09:0B:AD (fixed)). Did you combine old content of the second 64 KB sector with new version of my U-Boot modification image?
  2. The U-Boot sees DDR2 memory type on your board (RAM: 64 MB DDR2 16-bit CL3-4-4-10, DRAM: 64 MB DDR2 16-bit) which is definitely wrong as the WR740N supports only DDR1. That could be a hardware problem - memory type is recognized based on values of GPIO28 and GPIO12.

To be able to find the reason, I need more information from you:

  1. What exactly version of the OpenWrt you are using - is it official release or your custom build?
  2. Please, post whole two bootlogs.
  3. Please, issue in U-Boot command line md.l 0x180600ac 1 and post here output.

Piotr

jacycle commented 8 years ago

hello pepe2k, I changed the spi flash to W25Q128FV, and I changed the ddr. My board is sendcond hand, The name of the board my be mistaken. As you said the mac address is missing, I write an address on 0x1fc00, the wifi works. but sometimes it will be reset by watchdog,

  1. the Openwrt is official release
  2. uboot> md.l 0x180600ac 1 180600AC: 0004220E ..".
  3. the following are the logs
*     U-Boot 1.1.4--clean     *
*        Apr 15 2016, 11:19:14        *
***************************************

** Warning: bad env CRC, using default,
   use 'saveenv' to save it in FLASH

  BOARD: TP-Link TL-WR74xN/D v4
Get revision ID value=111
    SOC: AR9330 rev. 1
    CPU: MIPS 24Kc
    RAM: 64 MB DDR2 16-bit CL3-4-4-10
  FLASH: 16 MB Winbond W25Q128
    MAC: 38:C7:0A:97:0A:D7
 CLOCKS: CPU/RAM/AHB/SPI/REF
         400/400/200/ 25/ 25 MHz

## Error: MDIO_BUSY!
Hit any key to stop autobooting:  0 

Booting image at: 0x9F020000

   Image name:   OpenWrt r42625
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1107084 Bytes = 1.1 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... OK!
Starting kernel...

[    0.000000] Linux version 3.10.49 (bb@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42625) ) #3 Wed Oct 1 14:00:51 CEST 2014
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=TL-WR741ND-v4 console=ttyATH0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61076k/65536k available (2369k kernel code, 4460k reserved, 621k data, 272k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is TP-LINK TL-WR741ND v4
[    0.520000] bio: create slab <bio-0> at 0
[    0.530000] Switching to clocksource MIPS
[    0.540000] NET: Registered protocol family 2
[    0.540000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.540000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.550000] TCP: Hash tables configured (established 512 bind 512)
[    0.550000] TCP: reno registered
[    0.560000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.560000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.570000] NET: Registered protocol family 1
[    0.590000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.600000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.610000] msgmni has been set to 119
[    0.610000] io scheduler noop registered
[    0.620000] io scheduler deadline registered (default)
[    0.620000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.640000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a 罵933X UART
[    0.640000] console [ttyATH0] enabled, bootconsole disabled
[    0.640000] console [ttyATH0] enabled, bootconsole disabled
[    0.660000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.660000] m25p80 spi0.0: found w25q128, expected m25p80
[    0.670000] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.670000] 5 tp-link partitions found on MTD device spi0.0
[    0.680000] Creating 5 MTD partitions on "spi0.0":
[    0.680000] 0x000000000000-0x000000020000 : "u-boot"
[    0.690000] 0x000000020000-0x00000012e68c : "kernel"
[    0.690000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.710000] 0x00000012e68c-0x000000ff0000 : "rootfs"
[    0.710000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.730000] mtd: device 2 (rootfs) set to be root filesystem
[    0.730000] 1 squashfs-split partitions found on MTD device rootfs
[    0.740000] 0x000000340000-0x000000ff0000 : "rootfs_data"
[    0.740000] 0x000000ff0000-0x000001000000 : "art"
[    0.750000] 0x000000020000-0x000000ff0000 : "firmware"
[    0.770000] libphy: ag71xx_mdio: probed
[    1.320000] ag71xx-mdio.1: Found an AR7240/AR9330 built-in switch
[    2.360000] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.910000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[    2.920000] eth1: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.930000] TCP: cubic registered
[    2.930000] NET: Registered protocol family 17
[    2.940000] Bridge firewalling registered
[    2.940000] 8021q: 802.1Q VLAN Support v1.8
[    2.950000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.960000] Freeing unused kernel memory: 272K (8034c000 - 80390000)
procd: Console is alive
procd: - watchdog -
procd: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
jffs2 is ready
jffs2 is ready
[   10.620000] jffs2: notice: (321) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 17 of xref (0 dead, 3 orphan) found.
switching to overlay
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   12.360000] NET: Registered protocol family 10
[   12.380000] nf_conntrack version 0.5.0 (958 buckets, 3832 max)
[   12.390000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.410000] Loading modules backported from Linux version master-2014-05-22-0-gf2032ea
[   12.410000] Backport generated by backports.git backports-20140320-37-g5c33da0
[   12.430000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.480000] xt_time: kernel timezone is -0000
[   12.520000] cfg80211: Calling CRDA to update world regulatory domain
[   12.520000] cfg80211: World regulatory domain updated:
[   12.530000] cfg80211:  DFS Master region: unset
[   12.530000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.540000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   12.550000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   12.560000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   12.560000] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[   12.570000] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   12.580000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   12.590000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   12.600000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   12.680000] PPP generic driver version 2.4.2
[   12.680000] NET: Registered protocol family 24
[   12.770000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[   12.780000] cfg80211: Calling CRDA for country: US
[   12.780000] cfg80211: Regulatory domain changed to country: US
[   12.790000] cfg80211:  DFS Master region: FCC
[   12.790000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.800000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[   12.810000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
[   12.820000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
[   12.830000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[   12.830000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   22.140000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   22.140000] device eth0 entered promiscuous mode
[   22.150000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   22.160000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   24.940000] eth1: link up (100Mbps/Full duplex)
[   24.940000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   24.980000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   25.020000] device wlan0 entered promiscuous mode
[   25.020000] br-lan: port 2(wlan0) entered forwarding state
[   25.020000] br-lan: port 2(wlan0) entered forwarding state
[   25.030000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   25.950000] br-lan: port 2(wlan0) entered disabled state
[   27.050000] br-lan: port 2(wlan0) entered forwarding state
[   27.060000] br-lan: port 2(wlan0) entered forwarding state
[   27.060000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
procd: - init complete -
[   29.060000] br-lan: port 2(wlan0) entered forwarding state

BusyBox v1.22.1 (2014-09-20 22:01:35 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (14.07, r42625)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# 
root@OpenWrt:/# 

***************************************
*     U-Boot 1.1.4--clean     *
*        Apr 15 2016, 11:19:14        *
***************************************

** Warning: bad env CRC, using default,
   use 'saveenv' to save it in FLASH

  BOARD: TP-Link TL-WR74xN/D v4
Get revision ID value=111
    SOC: AR9330 rev. 1
    CPU: MIPS 24Kc
    RAM: 64 MB DDR2 16-bit CL3-4-4-10
  FLASH: 16 MB Winbond W25Q128
    MAC: 38:C7:0A:97:0A:D7
 CLOCKS: CPU/RAM/AHB/SPI/REF
         400/400/200/ 25/ 25 MHz

## Error: MDIO_BUSY!
Hit any key to stop autobooting:  0 

Booting image at: 0x9F020000

   Image name:   OpenWrt r42625
   Image type:   MIPS Linux Kernel Image (lzma compressed)
   Data size:    1107084 Bytes = 1.1 MB
   Load address: 0x80060000
   Entry point:  0x80060000

Uncompressing kernel image... ```
pepe2k commented 8 years ago

Hello @jacycle,

First of all, your board reports DDR2 memory type and if it's TL-WR74x v4 for sure then you have some hardware problem on the board, with wrong GPIO bootstrap configuration.

Can you take a photo of your board or at least tell me memory chip mark/name? If the memory chip is not in BGA package then it's definitely not DDR2.

Please, try rebuild the code with defined CONFIG_BOARD_DRAM_TYPE_DDR1 (you can add it somewhere here: https://github.com/pepe2k/u-boot_mod/blob/master/u-boot/Makefile#L424). It will ignore bootstrap and setup memory as DDR1. Before you do this, make sure what type of memory you have on the board as it may not boot with DDR1 setup if there is DDR2 on board.

Plus, try to make some memory tests:

  1. Under U-Boot: mtest.
  2. Under OpenWrt: using memtester (should be available in OpenWrt repository, try opkg update; opkg install memtester; memtester 16 3.

Let me know about the results.

Piotr

jacycle commented 8 years ago

Hello @pepe2k I try another board, it works well and does not reset. There should be some hardware problems.

There's a ddr2 in my board, it's in BGA package.

root@OpenWrt:/# opkg update Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker_base. Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/luci/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker_luci. Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker_packages. Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/routing/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker_routing. Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/telephony/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker_telephony. Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/management/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker_management. Downloading http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/oldpackages/Packages.gz. Updated list of available packages in /var/opkg-lists/barrier_breaker_oldpackages.

thanks for your help.

pepe2k commented 8 years ago

Hello @jacycle,

It would be good to find the real reason of your problems. Please, make memory tests. The logs you showed is only about packages list update.

Piotr

jacycle commented 8 years ago

The new board, when I power down and power up, it will stop to print in somewhere at random and will make watchdog reset. If I enter the system, then for a while it will reset too. As before I said it works well, I first use the old boot and then update the u-boot_mod,

I maked some memory tests:

uboot> mtest
Testing RAM 0x80200000...0x83DFFFFF:
Iteration:    325

root@OpenWrt:/# memtester 16 3
memtester version 4.1.3 (32-bit)
Copyright (C) 2010 Charles Cazabon.
Licensed under the GNU General Public License version 2 (only).

pagesize is 4096
pagesizemask is 0xfffff000
want 16MB (16777216 bytes)
got  16MB (16777216 bytes), trying mlock ...locked.
Loop 1/3:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok         
  Block Sequential    : ok         
  Checkerboard        : ok         
  Bit Spread          : ok         
  Bit Flip            : ok         
  Walking Ones        : ok         
  Walking Zeroes      : ok         

Loop 2/3:
  Stuck Address       : ok         
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok

I'm sure the board gpios are as same as tplink_wr740n_v4 the reset gpio and the leds are working correctly when i use openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin.

Where is the code I can change the GPIO bootstrap configuration.

pepe2k commented 8 years ago

Hello @jacycle,

The new board, when I power down and power up, it will stop to print in somewhere at random and will make watchdog reset. If I enter the system, then for a while it will reset too. As before I said it works well, I first use the old boot and then update the u-boot_mod,

I will take a look on this problem. As I see, you are using OpenWrt BB version (kernel 3.10), am I right? Have you tried OpenWrt CC?

Where is the code I can change the GPIO bootstrap configuration.

If your board has DDR2 memory then your bootstrap configuration is correct. And it doesn't come from code - bootstrap configuration is read from some GPIO values at power up.

Piotr

jacycle commented 8 years ago

There is a chip of SiGe 2565T for the wifi. May be it's the problem.

pepe2k commented 8 years ago

There is a chip of SiGe 2565T for the wifi. May be it's the problem.

I don't think so, this is just a PA.

jacycle commented 8 years ago

Hello @pepe2k,

There is a switch for wifi tx and rx There is a picture here http://pan.baidu.com/s/1eRSs6Ym

jacycle commented 8 years ago

Hello @pepe2k,

ar9331 A60(ANTC) A59(ANTB) to control the wifi tx and rx. Do I need to initialize in boot?

jacycle commented 8 years ago

Hello @pepe2k,

there is a signal for low to high and high to low in A60(ANTC) A59(ANTB). But u-boot_mod, always low level. Do you know how to configure the registers?

pepe2k commented 8 years ago

Hello @jacycle,

ar9331 A60(ANTC) A59(ANTB) to control the wifi tx and rx. Do I need to initialize in boot?

there is a signal for low to high and high to low in A60(ANTC) A59(ANTB). But u-boot_mod, always low level. Do you know how to configure the registers?

Basically, U-Boot doesn't touch WiFi at all (excluding reset it).

All WiFi related configuration should be done in the system/driver. Your board is custom one, so don't expect that regular OpenWrt image dedicated for TL-WR74xN v4 will work there and configure any external LNA/PA correctly.

IMHO, you should ask manufacturer how to configure external PA. It might be connected to some GPIO.

Piotr

jacycle commented 8 years ago

Hello @pepe2k,

I just change the uboot, It works. the same firmware. I just want to know what is done in uboot, or what is the different.

Thank you anyway

pepe2k commented 8 years ago

Hello @jacycle,

I just change the uboot, It works. the same firmware. I just want to know what is done in uboot, or what is the different.

Changed to which one? And again, have you tried OpenWrt CC version?

Piotr

jacycle commented 8 years ago

Hello @pepe2k, I get the uboot from the board. (dd if=/dev/mtd0 of=/tmp/u-boot.bin). Then I changed the boot to u-boot_mod, after that, ANTB, ANTC is low level always, and someties wil trigger the watchdog. If I change back, There is high and low level in the pin of ANTB ANTC. I just changed the boot. Do you have the download address for OpenWrt CC version.

pepe2k commented 8 years ago

Hello @jacycle,

I get the uboot from the board. (dd if=/dev/mtd0 of=/tmp/u-boot.bin).

And how can I know what is done or not done in stock U-Boot code? I'm not a wizard... You haven't provided enough information about your board, ex. full stock bootlog.

Then I changed the boot to u-boot_mod, after that, ANTB, ANTC is low level always, and someties wil trigger the watchdog.

Is the only new code of my project not working on your board?

If you really want help and solve the problem, start to be more verbose please. "u-boot_mod" doesn't tell anything about the version, so next time write please something like "with last release 'Jun 19 2014' it's working, with new code from master branch, compiled using XYZ toolchain, it doesn't" etc.

Do you have the download address for OpenWrt CC version.

https://downloads.openwrt.org/chaos_calmer/15.05.1/

Piotr

jacycle commented 8 years ago

Hello @pepe2k,

In the boot, I input uboot>setclk 6 Selected profile 6:

after reset, all works fine. I'm sorry about ANTB and ANTC, they are controlled by openwrt.

pepe2k commented 8 years ago

Hello @jacycle,

You are not answering my questions, so EOT from me.

Piotr

jacycle commented 8 years ago

Hello @pepe2k,

I forget to say that I also tried OpenWrt CC version, it’s as same as Barrier Breaker 14.07. CROSS_COMPILE=mips-openwrt-linux-uclibc- I'm sorry I didn't offer enough verbose. I'll try to do better next time.

thank you for you code, and thank you for the help.