Hi there,
the following the tell you a brick story of a AR300M (v.1.3.1). I have tried to update the u-boot on serial using the following
https://raw.githubusercontent.com/gl-inet/gl-uboot-source-for--ar300m/master/bin/uboot-gl-ar300m.bin. However for some reasons,
the downloaded file was corrupted and I have not done an md5 check before using it via tftp ( first error!! ).
On serial console, I have done and got the following:
U-Boot 1.1.4-g87b46363-dirty (Jul 6 2016 - 08:09:50)
cus531 - Honey Bee 2.0DRAM:
sri
Honey Bee 2.0
ath_ddr_initial_config(195): (16bit) ddr2 init
tap = 0x00000003
Tap (low, high) = (0x8, 0x25)
Tap values = (0x16, 0x16, 0x16, 0x16)
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 242k for U-Boot at: 87fc0000
Reserving 192k for malloc() at: 87f90000
Reserving 44 Bytes for Board Info at: 87f8ffd4
Reserving 36 Bytes for Global Data at: 87f8ffb0
Reserving 128k for boot params() at: 87f6ffb0
Stack Pointer at: 87f6ff98
Now running in RAM - U-Boot at: 87fc0000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
*** Warning *** : PCIe WLAN Module not found !!!
In: serial
Out: serial
Err: serial
Net: ath_gmac_enet_initializeā¦
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
Scorpion ---->S27 PHY*
S27 reg init
: cfg1 0x800c0000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 4 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 4 :10
eth0 up
Honey Bee ----> MAC 1 S27 PHY *
S27 reg init
ATHRS27: resetting s27
ATHRS27: s27 reset done
: cfg1 0x800c0000 cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
athrs27_phy_setup ATHR_PHY_CONTROL 0 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 0 :10
athrs27_phy_setup ATHR_PHY_CONTROL 1 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 1 :10
athrs27_phy_setup ATHR_PHY_CONTROL 2 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 2 :10
athrs27_phy_setup ATHR_PHY_CONTROL 3 :1000
athrs27_phy_setup ATHR_PHY_SPEC_STAUS 3 :10
eth1 up
eth0, eth1
Qualcomm Atheros SPI NAND Driver, Version 0.1 (c) 2014 Qualcomm Atheros Inc.
====== NAND Parameters ======
sc = 0x87ff5160 page = 0x800 block = 0x20000Setting 0x181162c0 to 0x7efda100
Protect off 9F040000 ā¦ 9F04FFFF
Un-Protecting sectors 4ā¦4 in bank 1
Un-Protected 1 sectors
Erasing Flashā¦Erasing flashā¦
First 0x4 last 0x4 sector size 0x10000 4
Erased 1 sectors
Writing to Flashā¦ write addr: 9f040000
done
Protecting sectors 4ā¦4 in bank 1
Protected 1 sectors
Warning: Bootlimit (3) exceeded. Using altbootcmd.
Hit any key to stop autoboot: 0
ath> printenv
Unknown command āprintenvā - try āhelpā
ath> printenv
bootargs=board=CUS531-NAND console=ttyS0,115200 ubi.mtd=5,2048 root=/dev/mtdblock8 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),128k(reserved),64k(art);spi0.1:2m(kernel),20m(rootfs),106m(data),22m@0x0(firmware) rootfstype=squashfs,jffs2 noinitrd
bootcmd=if nand bad; then nboot 0x81000000 0; else bootm 0x9f050000; fi
bootdelay=1
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.1
serverip=192.168.1.2
loadaddr=0x80800000
dir=
bootlimit=3
altbootcmd=if nand bad; then bootm 0x9f050000; else tftp 0x80060000 ${dir}openwrt-gl-ar300m.bin && erase 0x9f050000 +e30000 && cp.b $fileaddr 0x9f050000 $filesize && bootm 0x9f050000; fi
nlf=tftp 0x81000000 openwrt-ar71xx-nand-gl-ar300m-ubi.img && nand erase && nand write $fileaddr 0 $filesize
lu=tftp 0x80060000 ${dir}uboot_for_gl-ar300m.bin && erase 0x9f000000 +50000 && cp.b $fileaddr 0x9f000000 $filesize; reset
lf=tftp 0x80060000 ${dir}openwrt-gl-ar300m.bin && erase 0x9f050000 +e30000 && cp.b $fileaddr 0x9f050000 $filesize; if nand bad; then run nlf; fi
lc=if ping 192.168.1.2; then tftp 0x81000000 config.bin && cp.b 0x9fff1000 0x80060000 0xf000 && cp.b 0x81000000 0x80060002 0x06 && erase 0x9fff0000 +0x10000 && cp.b 0x81000000 0x9fff0000 $filesize && cp.b 0x80060000 0x9fff1000 0xefff; else setenv bootcount 1 && saveenv && bootm 0x9fe80000; fi
ethact=eth0
stdin=serial
stdout=serial
stderr=serial
bootcount=6
Environment size: 1385/65532 bytes
ath> run lu
Trying eth0
dup 1 speed 100
Using eth0 device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename āuboot_for_gl-ar300m.binā.
Load address: 0x80060000
Loading: #########
done
Bytes transferred = 40973 (a00d hex) ## Damn!!
Erasing flashā¦
First 0x0 last 0x4 sector size 0x10000 4
Erased 5 sectors
Copy to Flashā¦ write addr: 9f000000
Lost connection at this point ā¦
In order to recover this condition,
Iāve tried to re-flash it by using CH341A ( black edition ) programmer with a SOIC8 in-circuit clip and the correct .bin
( I think ā¦ see further considerations below ), but several errors occurred.
So, after several unsuccessful attempt, Iāve connected a Buspirate 3.6 board and used flashrom ( always using the SOIC8 clip ),
but with no success. Next, Iāve tried to investigate if the W25Q128FVSIG chip is correctly working ā¦
HiZ>m
- HiZ
- 1-WIRE
- UART
- I2C
- SPI
- 2WIRE
- 3WIRE
- KEYB
- LCD
- PIC
- DIO
x. exit(without change)
(1)>5
Set speed:
- 30KHz
- 125KHz
- 250KHz
- 1MHz
- 50KHz
- 1.3MHz
- 2MHz
- 2.6MHz
- 3.2MHz
- 4MHz
- 5.3MHz
- 8MHz
(1)>4
Clock polarity:
- Idle low *default
- Idle high
(1)>2
Output clock edge:
- Idle to active
- Active to idle *default
(2)>1
Input sample phase:
- Middle *default
- End
(1)>1
CS:
- CS
- /CS *default
(2)>2
Select output type:
- Open drain (H=Hi-Z, L=GND)
- Normal (H=3.3V, L=GND)
(1)>2
Clutch disengaged!!!
To finish setup, start up the power supplies with command āWā
Ready
Now, with router powered on ( Buspirate power supply not in use! ) and the following connections:
/CS ā pin 1 , DO (MISO)-> pin 2, GND ā pin 4, DI (MOSI) ā pin 5 and CLK ā pin 6.
SPI>[ 0b11 0x00 0x00 r:2 r:2 ]
/CS ENABLED
WRITE: 0x03 ## Interface hangs
At this point I suspect the chip is definitively gone ( damn ā¦ ): Iāve discovered also, the CH341A programmer ( black edition ) always power 5V
and the chip, by datasheet, pretend at maximum 3.6V and probably here another great mistake!!
I donāt know at this point if I can do something other, but if the hypothesis are correct ( chip fried and so on ) and suppose Iām able to replace
the chip by desolder-solder ( Iāve the right equipment ā¦ a kind of beast is here in soldering ā¦ work in progress ):
- Probably I can replace the chip with the following W25Q128JVSIQ-ND @Digikey, correct?
- If 1 is true, could someone in case the downloaded .bin is not right for this environment, provide the right .bin ( or better a full dump of nand )?
- Other suggestions?
I will grateful to anyone for each suggestion that can permit to learn a lot by this experience.
Thank you