Problem with atheros db120-like device

Hello all!
My boss braught from China new router with two m-pci modems support. There is no any information about this device. Openwrt 12.09 is already installed on it.
Board name in preinstalled system is atheros db120 board. I've tried to install different openwrt releases including 18.01 and 17.01.6. And even 12.09. From download.openwrt.org. Openwrt loading without problem, but I have two problems:

  1. Device has two lan ports and one wan port. When I connect patchcord to lan1, led for lan2(!) is on. When I connects to lan2 port no any led indicates it.
  2. If I connects to lan2 port the device reboots after about a one minute.
    I have stock firmware backup and router works properly with it.
    Sorry for my english. I didn't talked on it for very along time.
    I hope somebody will help me to solve this problem.
    Thank you!

What device do you have, can you provide the link for the Table of Hardware.

DB120 was QCA's reference design (devboard) for its AR9132 SOC ("Howl"), lazy OEM often kept the name (hwid/ boardname) for their related custom designs and only adapted the software for their own needs. This means you actually don't have a DB120 device, but something similar, but different in several key components, instead. While you can take OpenWrt's db120 profile as a start, you won't get around porting OpenWrt to it properly (under a different boardname) to fix these issues.

DB120 -> AR934x.

Sorry, you're right, of course.

Hi! Yes, I need to fix led setting for both LAN ports. But I don't have any system devices for LAN1 and LAN2 like phy1tpt, phy0tpt. So I can't assign gpio to this ports usi /etc/config/system

You are right talking about lazy manufacturers. But I have full backup of original firmware. It is openwrt 12.09 based on DB120 board:

root@OpenWrt:/# cat /proc/cpuinfo 
system type             : Atheros AR9344 rev 3
machine                 : Atheros DB120 reference board
processor               : 0
cpu model               : MIPS 74Kc V4.12
BogoMIPS                : 278.93
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
ASEs implemented        : mips16 dsp
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available


root@OpenWrt:/# ls -l /sys/class/leds/
lrwxrwxrwx    1 root     root             0 May 22  2028 db120:green:PORT3_LINK_LED -> ../../devices/platform/leds-gpio/leds/db120:green:PORT3_LINK_LED
lrwxrwxrwx    1 root     root             0 May 22  2028 db120:green:PORT4_LINK_LED -> ../../devices/platform/leds-gpio/leds/db120:green:PORT4_LINK_LED
lrwxrwxrwx    1 root     root             0 May 22  2028 db120:green:PORT5_LINK_LED -> ../../devices/platform/leds-gpio/leds/db120:green:PORT5_LINK_LED
lrwxrwxrwx    1 root     root             0 May 22  2028 db120:green:usb -> ../../devices/platform/leds-gpio/leds/db120:green:usb
lrwxrwxrwx    1 root     root             0 May 22  2028 db120:green:wlan-2g -> ../../devices/platform/leds-gpio/leds/db120:green:wlan-2g
lrwxrwxrwx    1 root     root             0 May 22  2028 db120:green:wlan-5g -> ../../devices/platform/leds-gpio/leds/db120:green:wlan-5g

[64637.700000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.700000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.710000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.710000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.720000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.720000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.730000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.730000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.740000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.740000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.750000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.750000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.760000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.760000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.760000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.770000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.780000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.780000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.780000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.790000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.790000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.800000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.800000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.810000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.810000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.820000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.820000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.830000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.830000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.840000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.840000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.850000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.850000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.860000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.860000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.870000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
[64637.870000] hxq:ath79_gpio_get_value,reg 6C=[ 2]
[64637.880000] hxq:ath79_gpio_get_value,reg 00=[b830b]
[64637.880000] hxq:ath79_gpio_get_value,reg 3C=[2d0000]
[64637.890000] hxq:ath79_gpio_get_value,reg 40=[2b002c]
GPIOs 0-22, ath79:
 gpio-11  (db120:green:usb     ) out lo
 gpio-12  (db120:green:wlan-2g ) out lo
 gpio-13  (db120:green:wlan-5g ) out hi
 gpio-15  (scl                 ) in  hi
 gpio-16  (WPS button          ) in  hi
 gpio-18  (db120:green:PORT5_LI) out lo
 gpio-19  (sda                 ) in  hi
 gpio-20  (db120:green:PORT4_LI) out lo
 gpio-21  (sysfs               ) out hi
 gpio-22  (db120:green:PORT3_LI) out hi

And here is information with firmware 17.01.6 downloaded from download.openwrt.org:

root@LEDE:/# cat /proc/cpuinfo 
system type             : Atheros AR9344 rev 3
machine                 : Atheros DB120 reference board
processor               : 0
cpu model               : MIPS 74Kc V4.12
BogoMIPS                : 278.93
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp dsp2
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

root@LEDE:/# ls -l /sys/class/leds/
lrwxrwxrwx    1 root     root             0 Aug 30 12:15 ath9k-phy0 -> ../../devices/platform/ar934x_wmac/leds/ath9k-phy0
lrwxrwxrwx    1 root     root             0 Jan  1  1970 db120:green:status -> ../../devices/platform/leds-gpio/leds/db120:green:status
lrwxrwxrwx    1 root     root             0 Jan  1  1970 db120:green:usb -> ../../devices/platform/leds-gpio/leds/db120:green:usb
lrwxrwxrwx    1 root     root             0 Jan  1  1970 db120:green:wlan-2g -> ../../devices/platform/leds-gpio/leds/db120:green:wlan-2g
lrwxrwxrwx    1 root     root             0 Jan  1  1970 db120:green:wlan-5g -> ../../devices/platform/leds-gpio/leds/db120:green:wlan-5g
lrwxrwxrwx    1 root     root             0 Jan  1  1970 db120:green:wps -> ../../devices/platform/leds-gpio/leds/db120:green:wps

root@LEDE:/# cat /sys/kernel/debug/gpio 
GPIOs 0-22, platform/ath79-gpio, ath79:
 gpio-11  (                    |db120:green:usb     ) out lo    
 gpio-12  (                    |db120:green:wlan-5g ) out hi    
 gpio-13  (                    |db120:green:wlan-2g ) out hi    
 gpio-14  (                    |db120:green:status  ) out lo    
 gpio-15  (                    |db120:green:wps     ) out hi    
 gpio-16  (                    |WPS button          ) in  hi    

GPIOs 489-511, platform/ar934x_wmac, ath9k-phy0:
 gpio-490 (                    |ath9k-phy0          ) in  lo

Could anyone help with the LEDs? My be I can somehow take LED's setting from original firmware?
I decide to make .dts file for this device based on Atheros DB120 configuration. How can I get offset and other parameters for phy0 from manufactures firmware?