Re: [LEDE-DEV] [PATCH v4] ar71xx: add ew-balin platform from Embedded Wireless

2018-01-15 Thread Catrinel Catrinescu
Hi John & Piotr

Thank you for your advices. I updated the patch, inclusive your comments,
I hope now you can commit the new patch version v5.

Best regards
Catrinel


-Original Message-
From: Piotr Dymacz [mailto:pep...@gmail.com] 
Sent: Samstag, 13. Januar 2018 15:25
To: Catrinel Catrinescu; lede-dev@lists.infradead.org
Cc: 'i...@embeddedwireless.de'; j...@phrozen.org
Subject: Re: [LEDE-DEV] [PATCH v4] ar71xx: add ew-balin platform from Embedded 
Wireless

Hello Catrinel,

As John already wrote, it seems that your patch got whitespace mangled. 
Please, send new version using git send-email.

Also, please see minor comments inline, below.

On 13.01.2018 11:36, Catrinel Catrinescu wrote:
> Add the Embedded Wireless "Balin" platform, based on AR9344:
> http://www.embeddedwireless.de/uploads/Balin_data_2016_10.pdf

Please, drop url from commit message.

> SoC: QCA AR9344 or AR9350
> RAM: DDR2-RAM 64MBytes
> Flash: SPI-NOR 16MBytes
> WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n
> Ethernet: 3 x 10/100 Mb/s
> USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up
> PCI-Express: 1 x lane PCIe 1.2
> UART: 1 x Normal, 1 x High-Speed
> JTAG: 1 x EJTAG
> GPIO: 10 x Input/Output multiplexed
> The module comes already with the current vanilla OpenWRT firmware, so no 
> need to install "factory"-image, or any other stuff :-)

OpenWRT -> OpenWrt.

If the boards already runs OpenWrt, maybe it would be better to write 
something like this instead: Use "sysupgrade" image directly in vendor 
firmware which is based on OpenWrt.

I don't see any reason to mention that "factory" image is not required 
when your patch doesn't include code for it.

And please, drop ":-)" ;)

> 
> Signed-off-by: Catrinel Catrinescu <c...@80211.de>
> ---
>   .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
>   target/linux/ar71xx/base-files/etc/diag.sh |   3 +
>   .../etc/uci-defaults/03_network-switchX-migration  |   1 +
>   target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>   .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
>   target/linux/ar71xx/config-4.4 |   1 +
>   target/linux/ar71xx/config-4.9 |   1 +
>   .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
>   target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>   .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 112 
> +
>   .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>   target/linux/ar71xx/image/generic.mk   |   9 ++
>   target/linux/ar71xx/mikrotik/config-default|   1 +
>   target/linux/ar71xx/nand/config-default|   1 +
>   14 files changed, 152 insertions(+)
>   create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c
> 
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
> b/target/linux/ar71xx/base-files/etc/board.d/02_network
> index fb61792bf4..4919e7c983 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -368,6 +368,12 @@ ar71xx_setup_interfaces()
>   ucidef_add_switch "switch0" \
>   "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
>   ;;
> + ew-balin)
> + ucidef_set_interface_raw "usb2" "usb0" "static"
> + ucidef_set_interface_raw "usb3" "usb0" "static"

Could you please explain these two lines?
This code will create two static interfaces with the same netdev (usb0).

Is USB in this module/board set to device mode by default?

> + ucidef_add_switch "switch0" \
> + "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
> + ;;
>   ew-dorin)
>   ucidef_add_switch "switch0" \
>   "0@eth0" "1:lan" "2:lan" "3:wan"
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index 6cbb3576d8..ca73d5f62b 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -193,6 +193,9 @@ get_status_led() {
>   el-mini)
>   status_led="easylink:green:system"
>   ;;
> + ew-balin)
> + status_led="balin:green:status"
> + ;;
>   ew-dorin|\
>   ew-dorin-router)
>   status_led="dorin:green:status"
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
&

[LEDE-DEV] [PATCH v5] ar71xx: add ew-balin platform from Embedded Wireless

2018-01-15 Thread Catrinel Catrinescu
Add the Embedded Wireless "Balin" platform
 SoC: QCA AR9344 or AR9350
 RAM: DDR2-RAM 64MBytes
 Flash: SPI-NOR 16MBytes
 WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n
 Ethernet: 3 x 10/100 Mb/s
 USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up
 PCI-Express: 1 x lane PCIe 1.2
 UART: 1 x Normal, 1 x High-Speed
 JTAG: 1 x EJTAG
 GPIO: 10 x Input/Output multiplexed

The module comes already with the current vanilla OpenWrt firmware.
To update, use "sysupgrade" image directly in vendor firmware.

Signed-off-by: Catrinel Catrinescu <c...@80211.de>
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 target/linux/ar71xx/config-4.9 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 110 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/config-default |   1 +
 target/linux/ar71xx/image/generic.mk   |   9 ++
 12 files changed, 148 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 5a10a9f486..bc7a89fc33 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -370,6 +370,12 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
+   ew-balin)
+# usb0 is RNDIS interface over USB in device mode
+   ucidef_set_interface_raw "usb2" "usb0" "static"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
+   ;;
ew-dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 2720288e3d..8fb2252436 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -199,6 +199,9 @@ get_status_led() {
el-mini)
status_led="easylink:green:system"
;;
+   ew-balin)
+   status_led="balin:green:status"
+   ;;
ew-dorin|\
ew-dorin-router)
status_led="dorin:green:status"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b6642495de..7a00d5b909 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -643,6 +643,9 @@ ar71xx_board_detect() {
*"EL-MINI")
name="el-mini"
;;
+   *"EmbWir-Balin")
+   name="ew-balin"
+   ;;
*"EmbWir-Dorin")
name="ew-dorin"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 3d7b1593e1..1e389db7a6 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -237,6 +237,7 @@ platform_check_image() {
epg5000|\
esr1750|\
esr900|\
+   ew-balin|\
ew-dorin|\
ew-dorin-router|\
gl-ar150|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 8ecf7e1355..4a8024b9a5 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -108,6 +108,7 @@ CONFIG_ATH79=y
 # CONFIG_ATH79_MACH_EPG5000 is not set
 # CONFIG_ATH79_MACH_ESR1750 is not set
 # CONFIG_ATH79_MACH_ESR900 is not set
+# CONFIG_ATH79_MACH_EW_BALIN is not set
 # CONFIG_ATH79_MACH_EW_DORIN is not set
 # CONFIG_ATH79_MACH_F9K1115V2 is not set
 # CONFIG_ATH79_MACH_FRITZ300E is not set
diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9
index 0e224ae1c4..19f3541de8 100644
--- a/target/linux/ar71xx/config-4.9
+++ b/target/linux/ar71xx/config-4.9
@@ -106,6 +106,7 @@ CONFIG_ATH79=y
 # CONFIG_ATH79_MACH_EPG5000 is not set
 # CONFIG_ATH79_MACH_ESR1750 is not set
 # CONFIG_ATH79_MACH_ESR900 is not set
+# CONFIG_ATH79_MACH_EW_BALIN is not set
 # C

[LEDE-DEV] [PATCH v4] ar71xx: add ew-balin platform from Embedded Wireless

2018-01-13 Thread Catrinel Catrinescu
Add the Embedded Wireless "Balin" platform, based on AR9344:
http://www.embeddedwireless.de/uploads/Balin_data_2016_10.pdf
SoC: QCA AR9344 or AR9350
RAM: DDR2-RAM 64MBytes
Flash: SPI-NOR 16MBytes
WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n
Ethernet: 3 x 10/100 Mb/s
USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up
PCI-Express: 1 x lane PCIe 1.2
UART: 1 x Normal, 1 x High-Speed
JTAG: 1 x EJTAG
GPIO: 10 x Input/Output multiplexed
The module comes already with the current vanilla OpenWRT firmware, so no need 
to install "factory"-image, or any other stuff :-)

Signed-off-by: Catrinel Catrinescu <c...@80211.de>
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../etc/uci-defaults/03_network-switchX-migration  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 target/linux/ar71xx/config-4.9 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 112 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk   |   9 ++
 target/linux/ar71xx/mikrotik/config-default|   1 +
 target/linux/ar71xx/nand/config-default|   1 +
 14 files changed, 152 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index fb61792bf4..4919e7c983 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -368,6 +368,12 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
+   ew-balin)
+   ucidef_set_interface_raw "usb2" "usb0" "static"
+   ucidef_set_interface_raw "usb3" "usb0" "static"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
+   ;;
ew-dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 6cbb3576d8..ca73d5f62b 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -193,6 +193,9 @@ get_status_led() {
el-mini)
status_led="easylink:green:system"
;;
+   ew-balin)
+   status_led="balin:green:status"
+   ;;
ew-dorin|\
ew-dorin-router)
status_led="dorin:green:status"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b5440230a5..162742a94c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -640,6 +640,9 @@ ar71xx_board_detect() {
*"EL-MINI")
name="el-mini"
;;
+   *EmbWir-Balin)
+   name="ew-balin"
+   ;;
*"EmbWir-Dorin")
name="ew-dorin"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ecf6820a2b..9dceadc563 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -237,6 +237,7 @@ platform_check_image() {
epg5000|\
esr1750|\
esr900|\
+   ew-balin|\
ew-dorin|\
ew-dorin-router|\
gl-ar150|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 
index 5a8004a03e..36b266f21c 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -109,6 +109,7 @@ CONFIG_ATH79_MACH_ENS202EXT=y  CONFIG_ATH79_MACH_EPG5000=y  
CONFIG_ATH79_MACH_ESR1750=y  CONFIG_ATH79_MACH_ESR900=y
+CONFIG_ATH79_MACH_EW_BALIN=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_FRITZ300E=y
diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 
index 4334d25b80..d51fe5f797 100644
--- a/target/linux/ar71xx/config-4.9
+++ b/target/linux/ar71xx/config-4.9
@@ -107,6 +107,7 @@ CONFIG_ATH79_M

Re: [LEDE-DEV] [PATCH v2] .gitignore: add .project & .cproject for eclipse users

2018-01-11 Thread Catrinel Catrinescu
Hi Hans

Thanks for the hint, I updated the patch with my SoB.


Catrinel

-Original Message-
From: Hans Dedecker [mailto:dedec...@gmail.com] 
Sent: Mittwoch, 10. Januar 2018 22:04
To: Catrinel Catrinescu
Cc: LEDE Development List
Subject: Re: [LEDE-DEV] [PATCH v2] .gitignore: add .project & .cproject for 
eclipse users

On Tue, Jan 9, 2018 at 3:39 PM, Catrinel Catrinescu <c...@80211.de> wrote:
> For eclipse users, .project is always created inside the project.
> For users of CDT within Eclipse, add also .cproject, thanks Dirk
> Feytons.
Hi,

The patch is missing a SoB; see
https://lede-project.org/submitting-patches for guidelines

Hans

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v3] ar71xx: add ew-balin platform from Embedded Wireless

2018-01-11 Thread Catrinel Catrinescu
Add the Embedded Wireless "Balin" platform, based on AR9344:
http://www.embeddedwireless.de/uploads/Balin_data_2016_10.pdf

The module comes already with the current vanilla OpenWRT firmware,
so no need to install "factory"-image, or any other stuff:-)

Signed-off-by: Catrinel Catrinescu <c...@80211.de>
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../etc/uci-defaults/03_network-switchX-migration  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 target/linux/ar71xx/config-4.9 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 112 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk   |   9 ++
 target/linux/ar71xx/mikrotik/config-default|   1 +
 target/linux/ar71xx/nand/config-default|   1 +
 14 files changed, 152 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index fb61792bf4..4919e7c983 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -368,6 +368,12 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
+   ew-balin)
+   ucidef_set_interface_raw "usb2" "usb0" "static"
+   ucidef_set_interface_raw "usb3" "usb0" "static"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
+   ;;
ew-dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 6cbb3576d8..ca73d5f62b 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -193,6 +193,9 @@ get_status_led() {
el-mini)
status_led="easylink:green:system"
;;
+   ew-balin)
+   status_led="balin:green:status"
+   ;;
ew-dorin|\
ew-dorin-router)
status_led="dorin:green:status"
diff --git 
a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration 
b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
index 29fdde40a0..898082f552 100644
--- 
a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
+++ 
b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
@@ -53,6 +53,7 @@ dir-615-e1|\
 dir-615-e4|\
 dir-825-c1|\
 ebr-2310-c1|\
+ew-balin|\
 ew-dorin|\
 ew-dorin-router|\
 ja76pf|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b5440230a5..162742a94c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -640,6 +640,9 @@ ar71xx_board_detect() {
*"EL-MINI")
name="el-mini"
;;
+   *EmbWir-Balin)
+   name="ew-balin"
+   ;;
*"EmbWir-Dorin")
name="ew-dorin"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ecf6820a2b..9dceadc563 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -237,6 +237,7 @@ platform_check_image() {
epg5000|\
esr1750|\
esr900|\
+   ew-balin|\
ew-dorin|\
ew-dorin-router|\
gl-ar150|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 5a8004a03e..36b266f21c 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -109,6 +109,7 @@ CONFIG_ATH79_MACH_ENS202EXT=y
 CONFIG_ATH79_MACH_EPG5000=y
 CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
+CONFIG_ATH79_MACH_EW_BALIN=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_FRITZ300E=y
diff --git a/target/linux/ar71xx/config-4.9 b/

[LEDE-DEV] [PATCH v3] .gitignore: add .project & .cproject for eclipse users

2018-01-11 Thread Catrinel Catrinescu
For eclipse users, .project is always created inside the project.
For users of CDT within Eclipse, add also .cproject, thanks Dirk
Feytons.

Signed-off-by: Catrinel Catrinescu <c...@80211.de>
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index aff13e1136..84e1a9d6d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,5 @@ key-build*
 .emacs.desktop*
 TAGS*~
 git-src
+.project
+.cproject
-- 
2.14.3 (Apple Git-98)


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v2] ar71xx: add ew-balin platform from Embedded Wireless

2018-01-10 Thread Catrinel Catrinescu
Add the Embedded Wireless "Balin" platform, based on AR9344:
http://www.embeddedwireless.de/uploads/Balin_data_2016_10.pdf

The module comes already with the current vanilla OpenWRT firmware,
so no need to install "factory"-image, or any other stuff:-)
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../etc/uci-defaults/03_network-switchX-migration  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 target/linux/ar71xx/config-4.9 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  11 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 112 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk   |   9 ++
 target/linux/ar71xx/mikrotik/config-default|   1 +
 target/linux/ar71xx/nand/config-default|   1 +
 14 files changed, 152 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index fb61792bf4..4919e7c983 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -368,6 +368,12 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
+   ew-balin)
+   ucidef_set_interface_raw "usb2" "usb0" "static"
+   ucidef_set_interface_raw "usb3" "usb0" "static"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
+   ;;
ew-dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 6cbb3576d8..ca73d5f62b 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -193,6 +193,9 @@ get_status_led() {
el-mini)
status_led="easylink:green:system"
;;
+   ew-balin)
+   status_led="balin:green:status"
+   ;;
ew-dorin|\
ew-dorin-router)
status_led="dorin:green:status"
diff --git 
a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration 
b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
index 29fdde40a0..898082f552 100644
--- 
a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
+++ 
b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
@@ -53,6 +53,7 @@ dir-615-e1|\
 dir-615-e4|\
 dir-825-c1|\
 ebr-2310-c1|\
+ew-balin|\
 ew-dorin|\
 ew-dorin-router|\
 ja76pf|\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b5440230a5..162742a94c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -640,6 +640,9 @@ ar71xx_board_detect() {
*"EL-MINI")
name="el-mini"
;;
+   *EmbWir-Balin)
+   name="ew-balin"
+   ;;
*"EmbWir-Dorin")
name="ew-dorin"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ecf6820a2b..9dceadc563 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -237,6 +237,7 @@ platform_check_image() {
epg5000|\
esr1750|\
esr900|\
+   ew-balin|\
ew-dorin|\
ew-dorin-router|\
gl-ar150|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 5a8004a03e..36b266f21c 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -109,6 +109,7 @@ CONFIG_ATH79_MACH_ENS202EXT=y
 CONFIG_ATH79_MACH_EPG5000=y
 CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
+CONFIG_ATH79_MACH_EW_BALIN=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_FRITZ300E=y
diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9
index 4334d25b80..d51fe5f797 100644
--- a/target/linux/ar71xx/config-4.9
+++ b/target/linux/ar71xx/config-4.9
@@ -107,6 +107,7 @@ CONFIG_ATH79_MACH_ENS202EXT=y
 CONFIG_ATH79_MACH_EPG5000=y
 CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
+CONFIG_ATH79_MACH_EW_BALIN=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 

[LEDE-DEV] [PATCH v2] .gitignore: add .project & .cproject for eclipse users

2018-01-09 Thread Catrinel Catrinescu
For eclipse users, .project is always created inside the project.
For users of CDT within Eclipse, add also .cproject, thanks Dirk
Feytons.
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index aff13e1136..84e1a9d6d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,5 @@ key-build*
 .emacs.desktop*
 TAGS*~
 git-src
+.project
+.cproject
-- 
2.14.3 (Apple Git-98)


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] ar71xx: add ew-balin platform from Embedded Wireless

2017-07-19 Thread Catrinel Catrinescu
Add the Embedded Wireless Balin platform, based on AR9344

Signed-off-by: Catrinel Catrinescu <c...@80211.de>
---
 .../linux/ar71xx/base-files/etc/board.d/02_network |   6 ++
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../etc/uci-defaults/03_network-switchX-migration  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   3 +-
 target/linux/ar71xx/config-4.4 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  14 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-ew-balin.c   | 112 +
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/image/generic.mk   |   9 ++
 11 files changed, 153 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ew-balin.c

diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index b2126c0c94..d06e36337f 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -352,6 +352,12 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
+   ew-balin)
+   ucidef_set_interface_raw "usb2" "usb0" "static"
+   ucidef_set_interface_raw "usb3" "usb0" "static"
+   ucidef_add_switch "switch0" \
+   "0@eth0" "5:lan:4" "4:lan:5" "3:wan"
+   ;;
ew-dorin)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1dc48624a0..29d2faf147 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -190,6 +190,9 @@ get_status_led() {
el-m150)
status_led="easylink:green:system"
;;
+   ew-balin)
+   status_led="balin:green:status"
+   ;;
ew-dorin|\
ew-dorin-router)
status_led="dorin:green:status"
diff --git 
a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration 
b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
index 338a22297b..9f21d968a4 100644
--- 
a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
+++ 
b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
@@ -74,6 +74,7 @@ whr-hp-gn|\
 wzr-hp-ag300h|\
 wzr-hp-g450h|\
 z1|\
+ew-balin|\
 ew-dorin|\
 ew-dorin-router)
migrate_switch_name "eth0" "switch0"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 5c29a3f0d0..cc5d53adad 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -628,6 +628,9 @@ ar71xx_board_detect() {
*"EL-MINI")
name="el-mini"
;;
+   *EmbWir-Balin)
+   name="ew-balin"
+   ;;
*"EmbWir-Dorin")
name="ew-dorin"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 949cb6aed5..e5f67f4d12 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -242,8 +242,9 @@ platform_check_image() {
epg5000|\
esr1750|\
esr900|\
-   ew-dorin-router|\
+   ew-balin|\
ew-dorin|\
+   ew-dorin-router|\
gl-ar150|\
gl-ar300m|\
gl-ar300|\
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index e8d907fcd3..2b105fa32b 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -106,6 +106,7 @@ CONFIG_ATH79_MACH_ENS202EXT=y
 CONFIG_ATH79_MACH_EPG5000=y
 CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
+CONFIG_ATH79_MACH_EW_BALIN=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
 CONFIG_ATH79_MACH_FRITZ300E=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 055dddf33d..71f0cc60f8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -669,6 +66

[LEDE-DEV] [PATCH v2] ar71xx:ew-dorin target moved from legacy to generic

2017-07-19 Thread Catrinel Catrinescu
Embedded Wireless Dorin platform moved from legacy to generic and
changed the STATUS-LED from GPIO23 to GPIO21 for Dorin-Eval 2.2 boards

Signed-off-by: Catrinel Catrinescu <c...@80211.de>
---
 .../ar71xx/files/arch/mips/ath79/mach-ew-dorin.c | 16 ++--
 target/linux/ar71xx/image/generic.mk | 20 
 target/linux/ar71xx/image/legacy-devices.mk  | 18 --
 target/linux/ar71xx/image/legacy.mk  |  5 -
 4 files changed, 22 insertions(+), 37 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c
index e686b5fa6f..575a976aec 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c
@@ -2,7 +2,7 @@
  *  EW Dorin board support
  *  (based on Atheros Ref. Design AP121)
  *  Copyright (C) 2011-2012 Gabor Juhos <juh...@openwrt.org>
- *  Copyright (C) 2012-2015 Embedded Wireless GmbHwww.80211.de
+ *  Copyright (C) 2012-2017 Embedded Wireless GmbHwww.80211.de
  *
  *  This program is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License version 2 as published
@@ -27,25 +27,13 @@
 #define DORIN_CALDATA_OFFSET   0x1000
 #define DORIN_WMAC_MAC_OFFSET  0x1002
 
-#define DORIN_GPIO_LED_21  21
-#define DORIN_GPIO_LED_22  22
-#define DORIN_GPIO_LED_STATUS  23
+#define DORIN_GPIO_LED_STATUS  21
 
 #define DORIN_GPIO_BTN_JUMPSTART   11
 #define DORIN_GPIO_BTN_RESET   6
 
 static struct gpio_led dorin_leds_gpio[] __initdata = {
{
-   .name   = "dorin:green:led21",
-   .gpio   = DORIN_GPIO_LED_21,
-   .active_low = 1,
-   },
-   {
-   .name   = "dorin:green:led22",
-   .gpio   = DORIN_GPIO_LED_22,
-   .active_low = 1,
-   },
-   {
.name   = "dorin:green:status",
.gpio   = DORIN_GPIO_LED_STATUS,
.active_low = 1,
diff --git a/target/linux/ar71xx/image/generic.mk 
b/target/linux/ar71xx/image/generic.mk
index 3f1486ed63..66cbfc6b3f 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -207,6 +207,26 @@ define Device/dragino2
 endef
 TARGET_DEVICES += dragino2
 
+define Device/ew-dorin
+  DEVICE_TITLE := Embedded Wireless Dorin Platform
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea 
+  BOARDNAME = EW-DORIN
+  CONSOLE := ttyATH0,115200
+  IMAGE_SIZE = 16000k
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
+endef
+TARGET_DEVICES += ew-dorin
+
+define Device/ew-dorin-router
+  DEVICE_TITLE := Embedded Wireless Dorin Router Platform
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea 
+  BOARDNAME = EW-DORIN-ROUTER
+  CONSOLE := ttyATH0,115200
+  IMAGE_SIZE = 16000k
+  MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
+endef
+TARGET_DEVICES += ew-dorin-router
+
 define Device/weio
   DEVICE_TITLE := WeIO
   DEVICE_PACKAGES := kmod-usb-core kmod-usb2
diff --git a/target/linux/ar71xx/image/legacy-devices.mk 
b/target/linux/ar71xx/image/legacy-devices.mk
index 77230249af..e418282dd0 100644
--- a/target/linux/ar71xx/image/legacy-devices.mk
+++ b/target/linux/ar71xx/image/legacy-devices.mk
@@ -132,24 +132,6 @@ define LegacyDevice/DB120
 endef
 LEGACY_DEVICES += DB120
 
-define LegacyDevice/EWDORINAP
-  DEVICE_TITLE := Embedded Wireless Dorin Platform (4MB flash)
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport 
kmod-usb-storage
-endef
-LEGACY_DEVICES += EWDORINAP
-
-define LegacyDevice/EWDORINRT
-  DEVICE_TITLE := Embedded Wireless Dorin Router
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport 
kmod-usb-storage
-endef
-LEGACY_DEVICES += EWDORINRT
-
-define LegacyDevice/EWDORIN16M
-  DEVICE_TITLE := Embedded Wireless Dorin Platform (16MB flash)
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport 
kmod-usb-storage
-endef
-LEGACY_DEVICES += EWDORIN16M
-
 define LegacyDevice/HORNETUBx2
   DEVICE_TITLE := ALFA Network Hornet-UB-x2 board (16MB flash, 64MB ram)
   DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
diff --git a/target/linux/ar71xx/image/legacy.mk 
b/target/linux/ar71xx/image/legacy.mk
index b400e5ddbb..701116be43 100644
--- a/target/linux/ar71xx/image/legacy.mk
+++ b/target/linux/ar71xx/image/legacy.mk
@@ -258,8 +258,6 @@ 
cameo_ap94_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,7808k(firmw
 
esr900_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),13248k(rootfs),1024k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(caldata)ro,14656k@0x4(firmware)
 
esr1750_mtdlayout=mtdparts=spi0.0:192

[LEDE-DEV] [PATCH] ar71xx:ew-dorin target moved from legacy to generic add ew-dorin-usbboot

2017-07-19 Thread Catrinel Catrinescu
Embedded Wireless Dorin Platform moved from legacy to generic.
Add ew-dorin-usbboot target, as part of Dorin platform

Signed-off-by: Catrinel Catrinescu <c...@80211.de>
---
 target/linux/ar71xx/base-files/etc/diag.sh |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 ++
 .../ar71xx/files/arch/mips/ath79/mach-ew-dorin.c   | 54 --
 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
 target/linux/ar71xx/image/generic.mk   | 30 
 target/linux/ar71xx/image/legacy-devices.mk| 18 
 target/linux/ar71xx/image/legacy.mk|  5 --
 7 files changed, 75 insertions(+), 37 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1dc48624a0..5128b8e8ae 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -191,6 +191,7 @@ get_status_led() {
status_led="easylink:green:system"
;;
ew-dorin|\
+   ew-dorin-usbboot|\
ew-dorin-router)
status_led="dorin:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 5c29a3f0d0..ed310796b3 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -634,6 +634,9 @@ ar71xx_board_detect() {
*"EmbWir-Dorin-Router")
name="ew-dorin-router"
;;
+   *EmbWir-Dorin-USBBoot)
+   name="ew-dorin-usbboot"
+   ;;
*"ENS202EXT")
name="ens202ext"
;;
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c
index e686b5fa6f..d6d4ddd61e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ew-dorin.c
@@ -2,7 +2,7 @@
  *  EW Dorin board support
  *  (based on Atheros Ref. Design AP121)
  *  Copyright (C) 2011-2012 Gabor Juhos <juh...@openwrt.org>
- *  Copyright (C) 2012-2015 Embedded Wireless GmbHwww.80211.de
+ *  Copyright (C) 2012-2017 Embedded Wireless GmbHwww.80211.de
  *
  *  This program is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License version 2 as published
@@ -27,25 +27,13 @@
 #define DORIN_CALDATA_OFFSET   0x1000
 #define DORIN_WMAC_MAC_OFFSET  0x1002
 
-#define DORIN_GPIO_LED_21  21
-#define DORIN_GPIO_LED_22  22
-#define DORIN_GPIO_LED_STATUS  23
+#define DORIN_GPIO_LED_STATUS  21
 
 #define DORIN_GPIO_BTN_JUMPSTART   11
 #define DORIN_GPIO_BTN_RESET   6
 
 static struct gpio_led dorin_leds_gpio[] __initdata = {
{
-   .name   = "dorin:green:led21",
-   .gpio   = DORIN_GPIO_LED_21,
-   .active_low = 1,
-   },
-   {
-   .name   = "dorin:green:led22",
-   .gpio   = DORIN_GPIO_LED_22,
-   .active_low = 1,
-   },
-   {
.name   = "dorin:green:status",
.gpio   = DORIN_GPIO_LED_STATUS,
.active_low = 1,
@@ -148,3 +136,41 @@ static void __init ew_dorin_router_setup(void)
 
 MIPS_MACHINE(ATH79_MACH_EW_DORIN_ROUTER, "EW-DORIN-ROUTER",
 "EmbWir-Dorin-Router", ew_dorin_router_setup);
+
+
+static void __init ew_dorin_usbboot_setup(void)
+{
+   static u8 mac[6];
+   mac[0] = 0x00;
+   mac[1] = 0x1F;
+   mac[2] = 0x7D;
+   mac[3] = 0x00;
+   mac[4] = 0xBE;
+   mac[5] = 0xBE;
+
+
+   ath79_register_m25p80(NULL);
+
+   ath79_register_usb();
+
+   ath79_register_leds_gpio(-1, ARRAY_SIZE(dorin_leds_gpio), 
dorin_leds_gpio);
+
+   mac[3] |= 0x40;
+   ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
+
+// mac[3] &= 0x3F;
+// ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+// ath79_setup_ar933x_phy4_switch(true, true);
+
+   ath79_register_mdio(0, 0x0);
+
+   /* LAN ports */
+   ath79_register_eth(1);
+
+   /* WAN port */
+// ath79_register_eth(0);
+
+}
+
+MIPS_MACHINE(ATH79_MACH_EW_DORIN_USBBOOT, "EW-DORIN-USBBOOT", 
"EmbWir-Dorin-USBBoot",
+ew_dorin_usbboot_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h 
b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
index 0b70256338..bf974270d8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -103,6 +103,7 @@ enum ath79_mach_type {
ATH79_MACH_ESR900,  /* EnGenius ESR900 */
ATH79_