I solved my problem with the serial TTL by swapping my cp210x based adapter with a pl2303 based one, now I can break the bootloader and load an OpenWRT initramfs image. I tested antdes457 patch and I can get a successful boot, although nor WiFi neither ethernet worked out of the box.
So this is my attempt to produce a working patch based on trunk.
Basically it is a rework of antdes457 patch with the following differences:
- added new profile for EA-N66 (instead of modifying TEW-691GR)
- set RTL8211E ethernet speed to 100Mbps fixed (instead of 1000Mbps fixed)
- make WiFi work on 2.4GHz band
- typo fix on package/kernel/linux/modules/netdevices.mk hunk
Realtek 8211 phy
============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 3883_MP (MAC to GigaPHY Mode)
DRAM component: 256 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:Feb 3 2012 Time:10:27:47
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 500 MHZ ####
estimate memory size =32 Mbytes
Please choose the operation:
0: Load Boot Loader code to SDRAM via Serial.
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
7: Load Boot Loader code then write to Flash via Serial.
8: Load Boot Loader code to SDRAM via TFTP.
9: Load Boot Loader code then write to Flash via TFTP.
You choosed 1
0
1: System Load Linux to SDRAM via TFTP.
Please Input new ones /or Ctrl-C to discard
Input device IP (172.16.1.1) ==:172.16.1.1
Input server IP (172.16.1.100) ==:172.16.1.100
Input Linux Kernel filename (openwrt-ramips-rt3883-ea-n66-initramfs-uImage.bin) ==:openwrt-ramips-rt3883-ea-n66-initramfs-uImage.bin
netboot_common, argc= 3
NetTxPacket = 0x81BB58C0
KSEG1ADDR(NetTxPacket) = 0xA1BB58C0
NetLoop,call eth_halt !
NetLoop,call eth_init !
Trying Eth0 (10/100-M)
Waitting for RX_DMA_BUSY status Start... done
Header Payload scatter function is Disable !!
ETH_STATE_ACTIVE!!
switch prereq:0
Using Eth0 (10/100-M) device
TFTP from server 172.16.1.100; our IP address is 172.16.1.1
Filename 'openwrt-ramips-rt3883-ea-n66-initramfs-uImage.bin'.
TIMEOUT_COUNT=10,Load address: 0x80700000
Loading: Got ARP REPLY, set server/gtwy eth addr (xx:xx:xx:xx:xx:xx)
Got it
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#############################################################
done
Bytes transferred = 2974267 (2d623b hex)
NetBootFileXferSize= 002d623b
File: env_flash.c, Func: saveenv, Line: 302
copy old content: sect_addr: BC030000 env_addr: BC030000 offset: 00000000
Protect off BC030000 ... BC03FFFF
b_end =BC3FFFFF
Un-Protecting sectors 10..10 in bank 1
Un-Protected 1 sectors
Erasing Flash...
b_end =BC3FFFFF
Erase Flash from 0xbc030000 to 0xbc03ffff in Bank # 1
erase sector = 10
sect = 10,s_last = 10,erase poll = 1435520
done
Erased 1 sectors
Writing to Flash... done
b_end =BC3FFFFF
Protecting sectors 10..10 in bank 1
Protected 1 sectors
Automatic boot of image at addr 0x80700000 ...
## Booting image at 80700000 ...
Image Name: MIPS OpenWrt Linux-4.3
Created: 2015-12-16 16:06:03 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2974203 Bytes = 2.8 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 32
Starting kernel ...
[ 0.000000] Linux version 4.3.0 (frankio@xw4400) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 r47894) ) #6 Wed Dec 16 17:05:46 CET 2015
[ 0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[ 0.000000] MIPS: machine is Asus EA-N66
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[ 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: 8128
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Writing ErrCtl register=00000ea0
[ 0.000000] Readback ErrCtl register=00000ea0
[ 0.000000] Memory: 26828K/32768K available (2868K kernel code, 117K rwdata, 588K rodata, 1792K init, 195K bss, 5940K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] CPU Clock: 500MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[ 0.000011] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[ 0.015461] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[ 0.090643] pid_max: default: 32768 minimum: 301
[ 0.099946] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.112982] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.132600] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.152250] pinctrl core: initialized pinctrl subsystem
[ 0.163281] NET: Registered protocol family 16
[ 0.193488] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.204520] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.216954] rt2880_gpio 10000638.gpio: registering 16 gpios
[ 0.229764] clocksource: Switched to clocksource MIPS
[ 0.241438] NET: Registered protocol family 2
[ 0.250968] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.264750] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.277343] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.290094] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.301608] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.314358] NET: Registered protocol family 1
[ 2.804551] rt-timer 10000100.timer: maximum frequency is 5065Hz
[ 2.817528] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 2.848081] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 2.859614] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 2.882560] io scheduler noop registered
[ 2.890280] io scheduler deadline registered (default)
[ 2.901435] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 2.915385] console [ttyS0] disabled
[ 2.922440] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[ 2.942114] console [ttyS0] enabled
[ 2.942114] console [ttyS0] enabled
[ 2.955921] bootconsole [early0] disabled
[ 2.955921] bootconsole [early0] disabled
[ 2.973124] 1c000000.nor-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[ 2.994193] Amd/Fujitsu Extended Query Table at 0x0040
[ 3.004446] Amd/Fujitsu Extended Query version 1.1.
[ 3.014517] number of CFI chips: 1
[ 3.024162] 4 ofpart partitions found on MTD device 1c000000.nor-flash
[ 3.037231] Creating 4 MTD partitions on "1c000000.nor-flash":
[ 3.048885] 0x000000000000-0x000000030000 : "u-boot"
[ 3.060757] 0x000000030000-0x000000040000 : "u-boot-env"
[ 3.073495] 0x000000040000-0x000000050000 : "factory"
[ 3.085718] 0x000000050000-0x000000400000 : "firmware"
[ 3.100618] ralink_soc_eth 10100000.ethernet: using fixed link parameters
[ 3.114225] ralink_soc_eth 10100000.ethernet eth0 (uninitialized): link up (100Mbps/Full duplex)
[ 3.132601] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[ 3.147705] rt2880_wdt 10000120.watchdog: Initialized
[ 3.159381] NET: Registered protocol family 10
[ 3.173626] NET: Registered protocol family 17
[ 3.182659] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[ 3.207823] 8021q: 802.1Q VLAN Support v1.8
[ 3.231757] Freeing unused kernel memory: 1792K (80380000 - 80540000)
[ 3.260047] init: Console is alive
[ 3.267059] init: - watchdog -
[ 4.274092] init: - preinit -
[ 4.397702] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[ 4.413368] 8021q: adding VLAN 0 to HW filter on device eth0
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
[ 6.590707] ralink_soc_eth 10100000.ethernet eth0: link down
[ 6.613722] procd: - early -
[ 6.619580] procd: - watchdog -
[ 7.192894] procd: - ubus -
[ 8.201332] random: ubusd urandom read with 13 bits of entropy available
[ 8.216639] procd: - init -
Please press Enter to activate this console.
[ 8.868921] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 8.893835] Loading modules backported from Linux version master-2015-12-03-0-g1677f62
[ 8.909680] Backport generated by backports.git backports-20151120-0-g906a6b3
[ 8.928690] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 8.951273] nf_conntrack version 0.5.0 (447 buckets, 1788 max)
[ 9.008584] xt_time: kernel timezone is -0000
[ 9.038879] cfg80211: World regulatory domain updated:
[ 9.049192] cfg80211: DFS Master region: unset
[ 9.057878] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 9.077305] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.093263] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.109220] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.125180] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 9.144082] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 9.162982] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 9.179111] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.195067] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 9.273650] PPP generic driver version 2.4.2
[ 9.285372] NET: Registered protocol family 24
[ 9.330258] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3883, rev 0400 detected
[ 9.345761] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 3853 detected
[ 16.101259] ralink_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[ 16.116454] 8021q: adding VLAN 0 to HW filter on device eth0
[ 16.181717] device eth0 entered promiscuous mode
[ 16.222478] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 17.079851] br-lan: port 1(eth0) entered forwarding state
[ 17.090705] br-lan: port 1(eth0) entered forwarding state
[ 17.149861] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 19.089778] br-lan: port 1(eth0) entered forwarding state
BusyBox v1.24.1 (2015-12-16 15:21:08 CET) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
DESIGNATED DRIVER (Bleeding Edge, r47894)
-----------------------------------------------------
* 2 oz. Orange Juice Combine all juices in a
* 2 oz. Pineapple Juice tall glass filled with
* 2 oz. Grapefruit Juice ice, stir well.
* 2 oz. Cranberry Juice
-----------------------------------------------------
root@OpenWrt:/#
diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk
index ef3cf85..0c55383 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -165,6 +165,22 @@ endef
$(eval $(call KernelPackage,phy-broadcom))
+define KernelPackage/phy-realtek
+ SUBMENU:=$(NETWORK_DEVICES_MENU)
+ TITLE:=Realtek Ethernet PHY driver
+ KCONFIG:=CONFIG_REALTEK_PHY
+ DEPENDS:=+kmod-libphy
+ FILES:=$(LINUX_DIR)/drivers/net/phy/realtek.ko
+ AUTOLOAD:=$(call AutoProbe,realtek)
+endef
+
+define KernelPackage/phy-realtek/description
+ RTL821x PHY support
+endef
+
+$(eval $(call KernelPackage,phy-realtek))
+
+
define KernelPackage/swconfig
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=switch configuration API
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 719e968..89b0743 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -148,6 +148,7 @@ ramips_setup_interfaces()
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0"
;;
d105|\
+ ea-n66|\
hpm|\
na930|\
wli-tx4-ag300n)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 62be045..225eff5 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -151,6 +151,9 @@ ramips_board_detect() {
*"E1700")
name="e1700"
;;
+ *"EA-N66")
+ name="ea-n66"
+ ;;
*"ESR-9753")
name="esr-9753"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index f8073d1..2ab7209 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -50,6 +50,7 @@ platform_check_image() {
dir-620-d1|\
dir-810l|\
e1700|\
+ ea-n66|\
esr-9753|\
f7c027|\
firewrt|\
diff --git a/target/linux/ramips/dts/EA-N66.dts b/target/linux/ramips/dts/EA-N66.dts
new file mode 100644
index 0000000..610739e
--- /dev/null
+++ b/target/linux/ramips/dts/EA-N66.dts
@@ -0,0 +1,67 @@
+/dts-v1/;
+
+/include/ "rt3883.dtsi"
+
+/ {
+ compatible = "EA-N66", "ralink,rt3883-soc";
+ model = "Asus EA-N66";
+
+ palmbus@10000000 {
+ gpio1: gpio@638 {
+ status = "okay";
+ };
+ };
+
+ pinctrl {
+ state_default: pinctrl0 {
+ gpio {
+ ralink,group = "spi", "i2c", "jtag", "uartf";
+ ralink,function = "gpio";
+ };
+ };
+ };
+
+ ethernet@10100000 {
+ mtd-mac-address = <&factory 0x4>;
+
+ port@0 {
+ ralink,fixed-link = <100 1 1 1>;
+ };
+ };
+
+ wmac@10180000 {
+ status = "okay";
+ ralink,mtd-eeprom = <&factory 0>;
+ };
+
+ nor-flash@1c000000 {
+ compatible = "cfi-flash";
+ reg = <0x1c000000 0x800000>;
+ bank-width = <2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ reg = <0x0 0x0030000>;
+ label = "u-boot";
+ read-only;
+ };
+
+ partition@30000 {
+ reg = <0x00030000 0x00010000>;
+ label = "u-boot-env";
+ read-only;
+ };
+
+ factory: partition@40000 {
+ reg = <0x00040000 0x00010000>;
+ label = "factory";
+ read-only;
+ };
+
+ partition@50000 {
+ reg = <0x00050000 0x003b0000>;
+ label = "firmware";
+ };
+ };
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 2c0fc46..af8ee0b 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -887,6 +887,8 @@ define BuildFirmware/RTN56U/squashfs
endef
Image/Build/Profile/RTN56U=$(call BuildFirmware/RTN56U/$(1),$(1),rt-n56u,RT-N56U)
+Image/Build/Profile/EAN66=$(call BuildFirmware/UMedia/$(1),$(1),ea-n66,EA-N66,0x026910)
+
Image/Build/Profile/TEW691GR=$(call BuildFirmware/UMedia/$(1),$(1),tew-691gr,TEW-691GR,0x026910)
Image/Build/Profile/TEW692GR=$(call BuildFirmware/UMedia/$(1),$(1),tew-692gr,TEW-692GR,0x026920)
@@ -902,6 +904,7 @@ define Image/Build/Profile/Default
$(call Image/Build/Profile/HPM,$(1))
$(call Image/Build/Profile/RTN56U,$(1))
$(call Image/Build/Profile/BR6475ND,$(1))
+ $(call Image/Build/Profile/EAN66,$(1))
$(call Image/Build/Profile/TEW691GR,$(1))
$(call Image/Build/Profile/TEW692GR,$(1))
endef
diff --git a/target/linux/ramips/rt3883/profiles/asus.mk b/target/linux/ramips/rt3883/profiles/asus.mk
index 4c652df..6eb1ecd 100644
--- a/target/linux/ramips/rt3883/profiles/asus.mk
+++ b/target/linux/ramips/rt3883/profiles/asus.mk
@@ -5,6 +5,17 @@
# See /LICENSE for more information.
#
+define Profile/EAN66
+ NAME:=Asus EA-N66
+ PACKAGES:=kmod-phy-realtek swconfig
+endef
+
+define Profile/EAN66/Description
+ Package set compatible with the Asus EA-N66 board.
+endef
+$(eval $(call Profile,EAN66))
+
+
define Profile/RTN56U
NAME:=Asus RT-N56U
PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig
Happy testing.