Re: [OpenWrt-Devel] Howto/advice: Patch for variant of hardware platform?

2017-02-27 Thread L. D. Pinney
On Mon, Feb 27, 2017 at 11:32 AM, Dana Myers <k...@comcast.net> wrote:

> On Wed, Feb 22, 2017 at 8:57 PM, Dana Myers  <https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>> wrote:
>
> >* On 2/22/2017 6:18 PM, L. D. Pinney wrote:
> *>>>* spi-mt7621.c has bugs ... isn't very helpful.
> *>>>* I am a bit surprised you're not already aware of the SPI issues.
> *>>I am not surprised at all ... ALL of my MT76x8 devices have only a single
> SPI-NOR Chip connected to the SPI.
> On every device it works as intended ... load the OS.
>
>
> Of course - that's surely why this hardware bug in the MediaTek SPI
> peripheral
> escaped from the factory; they implement and document functionality
> (full-duplex
> operation), and either didn't test it or didn't regard the bug as
> critical. The
> critical use-case of the SPI port is to read the flash device, which is
> half-duplex,
> but that's not the only documented use of the SPI port.
>
> MediaTek documents the SPI port as a general peripheral (and provides
> an additional select line), and there's a bug in the hardware.
>
> Whenever you (or anyone) adds functionality to a device you can expect
> problems.
>
> Thanks, though this isn't relevant at all. I'm not *adding* functionality
> to the device.
> There's a bug in the SPI controller that's exposed when you try to use it
> as documented.
>
> In this case some device foreign to the actual device in question.
> More specifically a device such as a RFID module or STM32.
>
> Disagree this IS relevant.
The device in your case is the Onion Omega2.
There is only ONE thing connected to the SPI ... the NOR chip.
Is your second or third SPI peripheral soldered to the board?
Basically OpenWrt is working OK until you add something.
The problem is only present when something ELSE is connected to SPI.

> This isn't the case at all. There's a bug in the MediaTek SPI controller
> completely
> independent of what (if anything) is attached to it. Simply attempting to
> *send*
> a byte in full-duplex mode results in corrupted bits coming out of the
> MediaTek
> SPI Master-Out line. It has absolutely nothing to do with external
> devices. It's a
> bug in the MediaTek controller.
>
> This has been interesting bit of bikeshedding, but back to my original
> question.
>
If you have a working patch...You can start here :
>

> https://lede-project.org/docs/guide-developer/the-source-code
>
>
> I have a working patch. I know how to do a PR. I know how to RTFM :-)
> Which brings us full-circle to my initial query...
>

Why don't you post the [PATCH] here or even better to the LEDE-DEV list
where it is more likely to find 'action'


>
> My concern (as alluded to in the subject line) is that I have a patch that
> I know for certain is required for the MT7688 and I've tested on the
> MT7688.
> I don't have other MT76xx variants to  to verify the presence of  the
> hardware
> bug, so I'm reluctant  to generically apply the patch to spi-mt7621.c - my
> question is how to apply this patch for only the mt7688 target.
>

My question is :

If you have a patch...why don't YOU know where to apply it?
If you expect someone help post the patcheven if YOU don't know what to
do with it.

You will find it difficult to apply your patch specifically to mt7688.
It would more properly apply in target/linux/ramips/patches-4.? and thus be
applied to mt76?? as needed.


>
> However, the more I think about it, I strongly suspect this bug is present
> on all variants of the MT76xx, so the patch should be generically applied;
> I need to find confirmation; I'll try contacting MediaTek.
>

I hope you can speak ZH-TW :)
You seem to be using LEDE.
Which brings up the question of why are you posting to the OpenWrt-dev list?
When you aren't using OpenWrt and seem to know full well from this thread
that the patch should be applied upstream?


> Thanks,
> Dana  K6JQ
>
>
> You can start here:
> >>* https://community.onion.io/topic/1560/spi-pins-for-the-omega2/20 
> >><https://community.onion.io/topic/1560/spi-pins-for-the-omega2/20>
> *>>* which links to another forum thread which contains this *very* 
> informative
> *>* posting:
> *>>* http://52.76.69.244/jforum/posts/list/30/3683.page#12266 
> <http://52.76.69.244/jforum/posts/list/30/3683.page#12266>
> *>>* and suggested patch:
> *>>* http://52.76.69.244/jforum/posts/list/30/3683.page#12299 
> <http://52.76.69.244/jforum/posts/list/30/3683.page#12299>
> *>>* which is the basis of the patch I'm using.
> *>>* Please describe the problem?
> *>>* berniwa does a much better job than me in the above-linked posting.
> *>>&

Re: [OpenWrt-Devel] Howto/advice: Patch for variant of hardware platform?

2017-02-22 Thread L. D. Pinney
On Wed, Feb 22, 2017 at 8:57 PM, Dana Myers <k...@comcast.net> wrote:

> On 2/22/2017 6:18 PM, L. D. Pinney wrote:
>
>
> spi-mt7621.c has bugs ... isn't very helpful.
>
>
> I am a bit surprised you're not already aware of the SPI issues.
>
>
I am not surprised at all ... ALL of my MT76x8 devices have only a single
SPI-NOR Chip connected to the SPI.
On every device it works as intended ... load the OS.

Whenever you (or anyone) adds functionality to a device you can expect
problems.
In this case some device foreign to the actual device in question.
More specifically a device such as a RFID module or STM32.

If you have a working patch...You can start here :

https://lede-project.org/docs/guide-developer/the-source-code



You can start here:
>
> https://community.onion.io/topic/1560/spi-pins-for-the-omega2/20
>
> which links to another forum thread which contains this *very* informative
> posting:
>
> http://52.76.69.244/jforum/posts/list/30/3683.page#12266
>
> and suggested patch:
>
> http://52.76.69.244/jforum/posts/list/30/3683.page#12299
>
> which is the basis of the patch I'm using.
>
> Please describe the problem?
>
> berniwa does a much better job than me in the above-linked posting.
>
>
> Can I reproduce the same problem on one of my many MT76x8 devices?
> If so how?
>
>
> I've only seen reports of  the issue on MT7688-based devices (LinkIt 7688,
> Omega2)
> and I personally have observed it on the Omega2.
>
> The easiest way to reproduce it is to attempt to send an SPI sequence
> starting with the '10' bit sequence (first nibble of 0x8 .. 0xb). You'll
> find
> the leading '1' bit is sent as a '0'.
>
> I'd be somewhat surprised if the same issue wasn't present on all devices
> which
> incorporate the MT7621 SPI peripheral given the likelihood that MediaTek
> reproduces the same logic on every chip that includes the peripheral.
>
> The SPI driver also exposes the transfer limit of 16 bytes, which berniwa's
> patch addresses by breaking up a transfer as needed (keeping chip select
> asserted).
>
>
> The MediaTek Linkit github is based on OpenWrt 15.05 using a 3.18 kernel.
> The patches needed for 3.18 vs. 4.4 or 4.9 will be quite different.
>
>
> Understood; I didn't say that MediaTek was using the *same* patch, but that
> this issue is present on all MT7688 devices and that MediaTek has
> incorporated
> a patch for it. The patch I'm using is for 4.4, of course.
>
> If you could confirm the presence of  the issue on other MT7621-based SPI
> peripherals, that would address my initial inquiry indirectly if we could
> just
> patch all instances of the MT7621 SPI build :-)
>
> Cheers,
> Dana  K6JQ
>
>
>
>
>
>
> On Wed, Feb 22, 2017 at 7:00 PM, Dana Myers <k...@comcast.net> wrote:
>
>> On 2/22/2017 4:27 PM, L. D. Pinney wrote:
>>
>> Are you using https://github.com/OnionIoT/source onion-omega2 branch ?
>>
>>
>> I am not; I'm using https://github.com/lede-project/source (master
>> branch)
>>
>> However, I don't believe it makes any difference - spi-mt7621.c appears
>> to be identical in both and the same patch applies; and this isn't an
>> Omega2-specific issue. All MT7688-based systems have this issue; MediaTek
>> Labs patched their LinkIt repo for this. A fix really belongs upstream.
>>
>> Thanks -
>> Dana
>>
>>
>> On Wed, Feb 22, 2017 at 2:30 PM, Dana Myers <k...@comcast.net> wrote:
>>
>>>
>>> I'm working with the Onion Omega2, which is based on an MT7688 SoC.
>>> The MT7688 SoC is a variant of the MT76xx family; in particular, it
>>> shares the same SPI peripheral. Support for SPI is in
>>> /drivers/spi/mt7621.c
>>>
>>> However, there's  bugs with the SPI in the MT7688 which require a patch
>>> to spi-mt7621.c - and I don't know if the same bugs are present in the
>>> other MT76xx family members. It is possible the other MT76xx SoCs have
>>> the same hardware issue (I'd be surprised if not) but I can only test
>>> the MT7688 I have.
>>>
>>> I think I want to patch the source file only when building only the
>>> MT7688
>>> target, but I'm not sure how to do that or if it's supported.
>>>
>>> So I'm looking for advice on how I might incorporate this patch so
>>> that it is only applied when building ramips/mt7688.
>>>
>>> Thanks,
>>> Dana K6JQ
>>> ___
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>
>>
>>
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Howto/advice: Patch for variant of hardware platform?

2017-02-22 Thread L. D. Pinney
spi-mt7621.c has bugs ... isn't very helpful.
Please describe the problem?

Can I reproduce the same problem on one of my many MT76x8 devices?
If so how?

The MediaTek Linkit github is based on OpenWrt 15.05 using a 3.18 kernel.
The patches needed for 3.18 vs. 4.4 or 4.9 will be quite different.





On Wed, Feb 22, 2017 at 7:00 PM, Dana Myers <k...@comcast.net> wrote:

> On 2/22/2017 4:27 PM, L. D. Pinney wrote:
>
> Are you using https://github.com/OnionIoT/source onion-omega2 branch ?
>
>
> I am not; I'm using https://github.com/lede-project/source (master branch)
>
> However, I don't believe it makes any difference - spi-mt7621.c appears
> to be identical in both and the same patch applies; and this isn't an
> Omega2-specific issue. All MT7688-based systems have this issue; MediaTek
> Labs patched their LinkIt repo for this. A fix really belongs upstream.
>
> Thanks -
> Dana
>
>
> On Wed, Feb 22, 2017 at 2:30 PM, Dana Myers <k...@comcast.net> wrote:
>
>>
>> I'm working with the Onion Omega2, which is based on an MT7688 SoC.
>> The MT7688 SoC is a variant of the MT76xx family; in particular, it
>> shares the same SPI peripheral. Support for SPI is in
>> /drivers/spi/mt7621.c
>>
>> However, there's  bugs with the SPI in the MT7688 which require a patch
>> to spi-mt7621.c - and I don't know if the same bugs are present in the
>> other MT76xx family members. It is possible the other MT76xx SoCs have
>> the same hardware issue (I'd be surprised if not) but I can only test
>> the MT7688 I have.
>>
>> I think I want to patch the source file only when building only the MT7688
>> target, but I'm not sure how to do that or if it's supported.
>>
>> So I'm looking for advice on how I might incorporate this patch so
>> that it is only applied when building ramips/mt7688.
>>
>> Thanks,
>> Dana K6JQ
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Howto/advice: Patch for variant of hardware platform?

2017-02-22 Thread L. D. Pinney
Are you using https://github.com/OnionIoT/source onion-omega2 branch ?

On Wed, Feb 22, 2017 at 2:30 PM, Dana Myers  wrote:

>
> I'm working with the Onion Omega2, which is based on an MT7688 SoC.
> The MT7688 SoC is a variant of the MT76xx family; in particular, it
> shares the same SPI peripheral. Support for SPI is in
> /drivers/spi/mt7621.c
>
> However, there's  bugs with the SPI in the MT7688 which require a patch
> to spi-mt7621.c - and I don't know if the same bugs are present in the
> other MT76xx family members. It is possible the other MT76xx SoCs have
> the same hardware issue (I'd be surprised if not) but I can only test
> the MT7688 I have.
>
> I think I want to patch the source file only when building only the MT7688
> target, but I'm not sure how to do that or if it's supported.
>
> So I'm looking for advice on how I might incorporate this patch so
> that it is only applied when building ramips/mt7688.
>
> Thanks,
> Dana K6JQ
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] ar71xx: Add support for the OMYlink OMY-G1

2016-04-25 Thread L. D. Pinney
https://wiki.openwrt.org/toh/omylink/omy-g1

http://www.omylink.com/

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>

---

v2 corrects the Device name in Subject
v3 removes changes to mktplinkfw.c

 target/linux/ar71xx/base-files/etc/board.d/01_leds|   6 
 target/linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh|   3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |   6 
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|   1 +
 target/linux/ar71xx/config-4.1|   1 +
 target/linux/ar71xx/config-4.4|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c   | 123 
++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/omy.mk   |  10 ++
 target/linux/ar71xx/image/Makefile|   9 -
 13 files changed, 172 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index b2469bf..39b21ca 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -399,6 +399,12 @@ om5p-ac)
ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
;;
 
+omy-g1)
+   ucidef_set_led_wlan "wlan" "WLAN" "omy:green:wlan" "phy0tpt"
+   ucidef_set_led_netdev "wan" "WAN" "omy:green:wan" "eth0"
+   ucidef_set_led_netdev "lan" "LAN" "omy:green:lan" "eth1"
+   ;;
+
 omy-x1)
ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
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 8fdfa07..7724a08 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -220,6 +220,7 @@ tl-wr941nd)
;;
 
 dir-615-i1 |\
+omy-g1 |\
 r6100 |\
 smart-300 |\
 tl-mr3420-v2 |\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1f9bd3f..77fa398 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -218,6 +218,9 @@ get_status_led() {
om5p-acv2)
status_led="om5pac:blue:power"
;;
+   omy-g1)
+   status_led="omy:green:wlan"
+   ;;
omy-x1)
status_led="omy:green:power"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 3d4541e..588affd 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -123,6 +123,9 @@ tplink_board_detect() {
"007260"*)
model="TellStick ZNet Lite"
;;
+   "066601"*)
+   model="OMYlink OMY-G1"
+   ;;
"066602"*)
model="OMYlink OMY-X1"
;;
@@ -655,6 +658,9 @@ ar71xx_board_detect() {
*"OMY-X1")
name="omy-x1"
;;
+   *"OMY-G1")
+   name="omy-g1"
+   ;;
*"Onion Omega")
name="onion-omega"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d44ece5..5334600 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -340,6 +340,7 @@ platform_check_image() {
gl-inet | \
mc-mac1200r | \
minibox-v1 |\
+   omy-g1 |\
omy-x1 |\
onion-omega | \
oolite | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index fa98643..40cf453 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OM5P_ACv2=y
+CONFIG_ATH79_MACH_OMY_G1=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
in

[OpenWrt-Devel] [PATCHv2] ar71xx: Add support for the OMYlink OMY-G1

2016-04-12 Thread L. D. Pinney
https://wiki.openwrt.org/toh/omylink/omy-g1

http://www.omylink.com/

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>

---

v2 corrects the Device name in Subject

 target/linux/ar71xx/base-files/etc/board.d/01_leds|   5 +++
 target/linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh|   3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |   3 ++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|   1 +
 target/linux/ar71xx/config-4.1|   1 +
 target/linux/ar71xx/config-4.4|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c   | 123 
++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/omy.mk   |  10 ++
 target/linux/ar71xx/image/Makefile|   9 -
 tools/firmware-utils/src/mktplinkfw.c |   1 +
 14 files changed, 169 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index b2469bf..4546107 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -398,6 +398,11 @@ om5p-ac)
ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0"
ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
;;
+omy-g1)
+   ucidef_set_led_wlan "wlan" "WLAN" "omy:green:wlan" "phy0tpt"
+   ucidef_set_led_netdev "wan" "WAN" "omy:green:wan" "eth0"
+   ucidef_set_led_netdev "lan" "LAN" "omy:green:lan" "eth1"
+   ;;
 
 omy-x1)
ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
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 8fdfa07..7724a08 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -220,6 +220,7 @@ tl-wr941nd)
;;
 
 dir-615-i1 |\
+omy-g1 |\
 r6100 |\
 smart-300 |\
 tl-mr3420-v2 |\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1f9bd3f..77fa398 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -218,6 +218,9 @@ get_status_led() {
om5p-acv2)
status_led="om5pac:blue:power"
;;
+   omy-g1)
+   status_led="omy:green:wlan"
+   ;;
omy-x1)
status_led="omy:green:power"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 3d4541e..0c9dddc 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -123,6 +123,9 @@ tplink_board_detect() {
"007260"*)
model="TellStick ZNet Lite"
;;
+   "066601"*)
+   model="OMYlink OMY-G1"
+   ;;
"066602"*)
model="OMYlink OMY-X1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d44ece5..5334600 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -340,6 +340,7 @@ platform_check_image() {
gl-inet | \
mc-mac1200r | \
minibox-v1 |\
+   omy-g1 |\
omy-x1 |\
onion-omega | \
oolite | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index fa98643..40cf453 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OM5P_ACv2=y
+CONFIG_ATH79_MACH_OMY_G1=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index ec04c28..860b1e1 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -114,6 +114,7 @@ CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OM5P_ACv2=y
+CONFIG_ATH79_MACH_OMY_G1=y
 CONFIG_ATH79_MACH_OMY_X

[OpenWrt-Devel] [PATCH] ar71xx: Add support for the OMYlink OMY-X1

2016-04-11 Thread L. D. Pinney
https://wiki.openwrt.org/toh/omylink/omy-g1

http://www.omylink.com/

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>

---

 target/linux/ar71xx/base-files/etc/board.d/01_leds|   5 +++
 target/linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh|   3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |   3 ++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|   1 +
 target/linux/ar71xx/config-4.1|   1 +
 target/linux/ar71xx/config-4.4|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c   | 123 
++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/omy.mk   |  10 ++
 target/linux/ar71xx/image/Makefile|   9 -
 tools/firmware-utils/src/mktplinkfw.c |   1 +
 14 files changed, 169 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index b2469bf..4546107 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -398,6 +398,11 @@ om5p-ac)
ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0"
ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
;;
+omy-g1)
+   ucidef_set_led_wlan "wlan" "WLAN" "omy:green:wlan" "phy0tpt"
+   ucidef_set_led_netdev "wan" "WAN" "omy:green:wan" "eth0"
+   ucidef_set_led_netdev "lan" "LAN" "omy:green:lan" "eth1"
+   ;;
 
 omy-x1)
ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
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 8fdfa07..7724a08 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -220,6 +220,7 @@ tl-wr941nd)
;;
 
 dir-615-i1 |\
+omy-g1 |\
 r6100 |\
 smart-300 |\
 tl-mr3420-v2 |\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1f9bd3f..77fa398 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -218,6 +218,9 @@ get_status_led() {
om5p-acv2)
status_led="om5pac:blue:power"
;;
+   omy-g1)
+   status_led="omy:green:wlan"
+   ;;
omy-x1)
status_led="omy:green:power"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 3d4541e..0c9dddc 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -123,6 +123,9 @@ tplink_board_detect() {
"007260"*)
model="TellStick ZNet Lite"
;;
+   "066601"*)
+   model="OMYlink OMY-G1"
+   ;;
"066602"*)
model="OMYlink OMY-X1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d44ece5..5334600 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -340,6 +340,7 @@ platform_check_image() {
gl-inet | \
mc-mac1200r | \
minibox-v1 |\
+   omy-g1 |\
omy-x1 |\
onion-omega | \
oolite | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index fa98643..40cf453 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OM5P_ACv2=y
+CONFIG_ATH79_MACH_OMY_G1=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index ec04c28..860b1e1 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -114,6 +114,7 @@ CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OM5P_ACv2=y
+CONFIG_ATH79_MACH_OMY_G1=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA

[OpenWrt-Devel] [PATCH] ramips: Add support for the Netgear WNDR3700v5

2016-03-31 Thread L. D. Pinney
https://wiki.openwrt.org/toh/netgear/wndr3700

wndr3700v5 uses the single-core dual thread MediaTek MT7621S SoC.

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>

---

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 5816e60..a396212 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -264,6 +264,9 @@ whr-600d)
 wnce2001)
set_wifi_led "$board:green:wlan"
;;
+wndr3700v5)
+   ucidef_set_led_default "power" "POWER" "$board:green:power" "0"
+   ;;
 wt3020)
ucidef_set_led_default "power" "power" "$board:blue:power" "0"
;;
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 4b65d36..8c804b2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -81,6 +81,7 @@ ramips_setup_interfaces()
whr-300hp2|\
whr-600d|\
witi|\
+   wndr3700v5|\
wsr-1166|\
wsr-600|\
wt1520|\
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index daa7fb1..2f34aff 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -26,6 +26,7 @@ get_status_led() {
nbg-419n|\
pwh2004|\
wnce2001|\
+   wndr3700v5|\
x5|\
x8|\
xdxrn502j)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 5f1df7b..e67ac8d 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -454,6 +454,9 @@ ramips_board_detect() {
*"WNCE2001")
name="wnce2001"
;;
+   *"WNDR3700v5")
+   name="wndr3700v5"
+   ;;
*"WR512-3GN-like"*)
name="wr512-3gn"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index c329dce..db9d7de 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -133,6 +133,7 @@ platform_check_image() {
wli-tx4-ag300n|\
wmr-300|\
wnce2001|\
+   wndr3700v5|\
wr512-3gn|\
wr6202|\
wrtnode|\
diff --git a/target/linux/ramips/dts/WNDR3700V5.dts 
b/target/linux/ramips/dts/WNDR3700V5.dts
new file mode 100644
index 000..1b386fd
--- /dev/null
+++ b/target/linux/ramips/dts/WNDR3700V5.dts
@@ -0,0 +1,139 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+/ {
+   compatible = "mediatek,mt7621-eval-board","ralink,mt7621-soc";
+   model = "Netgear WNDR3700v5";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x800>;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600 maxcpus=2";
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "mx25l12805d";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@f3 {
+   label = "factory";
+   reg = <0xf3 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0xfb>;
+   };
+   };
+   };
+   };
+
+   pcie@1e14 {
+   status = "okay"

Re: [OpenWrt-Devel] [RFC] ramips: Add initial support for the Netgear WNDR3700v5

2016-03-28 Thread L. D. Pinney
On Mon, Mar 28, 2016 at 12:34 PM, John Crispin <blo...@openwrt.org> wrote:

> lets try to figure out what they changed by comparing the sercomm uboot
> sources of the unit with RTSDK original
>
> ​ AFAICT the source downloaded from Netgear only contains the uboot
binary​ and not the source code.
​(WNDR3700v5_boot_v113.bin)​

>
> On 28/03/2016 17:58, L. D. Pinney wrote:
> > Sercomm hacked bootloader replaced with my own from :
> https://github.com/gnubee-git/GnuBee-MT7621-uboot.git
> >
> > Relevent files and instructions can be downloaded from :
> https://drive.google.com/open?id=0B0CKglNyN0URM2FhVDBpNkVsRlk
> >
> > Some Devices are 'uncooperative' Reset and WPS switches, and LEDs other
> than power.
> >
> > Radios are still non-functional. (MT7662E and MT7603EN)
> >
> > Device has the single-core MediaTek MT7621S.
> >
> > How should CONFIG_NR_CPUS=2 be set in the kernel config ... most other
> devices will need CPUS=4 ??
>
> i think you can override the cpu count via cmdline try maxcpus=2 ?
>

​OK I'll try passing that on the cmdline  :)​


>
> >
> > Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
> >
> > ---
> >
> >  target/linux/ramips/base-files/etc/board.d/01_leds |   3 ++
> >  target/linux/ramips/base-files/etc/board.d/02_network  |   1 +
> >  target/linux/ramips/base-files/etc/diag.sh |   1 +
> >  target/linux/ramips/base-files/lib/ramips.sh   |   3 ++
> >  target/linux/ramips/base-files/lib/upgrade/platform.sh |   1 +
> >  target/linux/ramips/dts/WNDR3700V5.dts | 122
> +
> >  target/linux/ramips/image/Makefile |   7 +++-
> >  target/linux/ramips/mt7621/config-4.4  |   2 +-
> >  target/linux/ramips/mt7621/profiles/netgear.mk |  17 ++
> >  9 files changed, 155 insertions(+), 2 deletions(-)
> >
> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> > index 5816e60..a396212 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> > @@ -264,6 +264,9 @@ whr-600d)
> >  wnce2001)
> >   set_wifi_led "$board:green:wlan"
> >   ;;
> > +wndr3700v5)
> > + ucidef_set_led_default "power" "POWER" "$board:green:power" "0"
> > + ;;
> >  wt3020)
> >   ucidef_set_led_default "power" "power" "$board:blue:power" "0"
> >   ;;
> > 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 4b65d36..8c804b2 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/02_network
> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> > @@ -81,6 +81,7 @@ ramips_setup_interfaces()
> >   whr-300hp2|\
> >   whr-600d|\
> >   witi|\
> > + wndr3700v5|\
> >   wsr-1166|\
> >   wsr-600|\
> >   wt1520|\
> > diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> > index daa7fb1..2f34aff 100644
> > --- a/target/linux/ramips/base-files/etc/diag.sh
> > +++ b/target/linux/ramips/base-files/etc/diag.sh
> > @@ -26,6 +26,7 @@ get_status_led() {
> >   nbg-419n|\
> >   pwh2004|\
> >   wnce2001|\
> > + wndr3700v5|\
> >   x5|\
> >   x8|\
> >   xdxrn502j)
> > diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> b/target/linux/ramips/base-files/lib/ramips.sh
> > index 5f1df7b..e67ac8d 100755
> > --- a/target/linux/ramips/base-files/lib/ramips.sh
> > +++ b/target/linux/ramips/base-files/lib/ramips.sh
> > @@ -454,6 +454,9 @@ ramips_board_detect() {
> >   *"WNCE2001")
> >   name="wnce2001"
> >   ;;
> > + *"WNDR3700v5")
> > + name="wndr3700v5"
> > + ;;
> >   *"WR512-3GN-like"*)
> >   name="wr512-3gn"
> >   ;;
> > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> > index c329dce..db9d7de 100755
> > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> > @@ -133,6 +133,7 @@ platform_chec

[OpenWrt-Devel] [RFC] ramips: Add initial support for the Netgear WNDR3700v5

2016-03-28 Thread L. D. Pinney
Sercomm hacked bootloader replaced with my own from : 
https://github.com/gnubee-git/GnuBee-MT7621-uboot.git

Relevent files and instructions can be downloaded from : 
https://drive.google.com/open?id=0B0CKglNyN0URM2FhVDBpNkVsRlk

Some Devices are 'uncooperative' Reset and WPS switches, and LEDs other than 
power.

Radios are still non-functional. (MT7662E and MT7603EN)

Device has the single-core MediaTek MT7621S.

How should CONFIG_NR_CPUS=2 be set in the kernel config ... most other devices 
will need CPUS=4 ??

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>

---

 target/linux/ramips/base-files/etc/board.d/01_leds |   3 ++
 target/linux/ramips/base-files/etc/board.d/02_network  |   1 +
 target/linux/ramips/base-files/etc/diag.sh |   1 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 ++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |   1 +
 target/linux/ramips/dts/WNDR3700V5.dts | 122 
+
 target/linux/ramips/image/Makefile |   7 +++-
 target/linux/ramips/mt7621/config-4.4  |   2 +-
 target/linux/ramips/mt7621/profiles/netgear.mk |  17 ++
 9 files changed, 155 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 5816e60..a396212 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -264,6 +264,9 @@ whr-600d)
 wnce2001)
set_wifi_led "$board:green:wlan"
;;
+wndr3700v5)
+   ucidef_set_led_default "power" "POWER" "$board:green:power" "0"
+   ;;
 wt3020)
ucidef_set_led_default "power" "power" "$board:blue:power" "0"
;;
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 4b65d36..8c804b2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -81,6 +81,7 @@ ramips_setup_interfaces()
whr-300hp2|\
whr-600d|\
witi|\
+   wndr3700v5|\
wsr-1166|\
wsr-600|\
wt1520|\
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index daa7fb1..2f34aff 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -26,6 +26,7 @@ get_status_led() {
nbg-419n|\
pwh2004|\
wnce2001|\
+   wndr3700v5|\
x5|\
x8|\
xdxrn502j)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 5f1df7b..e67ac8d 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -454,6 +454,9 @@ ramips_board_detect() {
*"WNCE2001")
name="wnce2001"
;;
+   *"WNDR3700v5")
+   name="wndr3700v5"
+   ;;
*"WR512-3GN-like"*)
name="wr512-3gn"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index c329dce..db9d7de 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -133,6 +133,7 @@ platform_check_image() {
wli-tx4-ag300n|\
wmr-300|\
wnce2001|\
+   wndr3700v5|\
wr512-3gn|\
wr6202|\
wrtnode|\
diff --git a/target/linux/ramips/dts/WNDR3700V5.dts 
b/target/linux/ramips/dts/WNDR3700V5.dts
new file mode 100644
index 000..508ba86
--- /dev/null
+++ b/target/linux/ramips/dts/WNDR3700V5.dts
@@ -0,0 +1,122 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+/ {
+   compatible = "mediatek,mt7621-eval-board","ralink,mt7621-soc";
+   model = "Netgear WNDR3700v5";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x800>;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "mx25l12805d";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+

[OpenWrt-Devel] [PATCH v3] ar71xx: Add support for the OMYlink OMY-X1

2016-03-10 Thread L. D. Pinney
This patch adds support for the OMYlink OMY-X1

https://wiki.openwrt.org/toh/omylink/omy-x1

http://www.omylink.com/

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---

v2 change in mach-omy-x1.c suggested by Karl Palsson <ka...@tweak.net.au>
v3 rebase patch trunk@48995 , use default 02_network and include forgotten 
'board_detect' in ar71xx.sh

 target/linux/ar71xx/base-files/etc/board.d/01_leds|   5 
 target/linux/ar71xx/base-files/etc/diag.sh|   3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |   6 
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|   1 +
 target/linux/ar71xx/config-4.1|   1 +
 target/linux/ar71xx/config-4.4|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt |   9 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-omy-x1.c   | 106 
++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/omy.mk   |  16 ++
 target/linux/ar71xx/image/Makefile|   8 +
 tools/firmware-utils/src/mktplinkfw.c |   6 
 13 files changed, 164 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index eff6e0d..cfe5f1d 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -394,6 +394,11 @@ om5p-an)
ucidef_set_led_netdev "port2" "port2" "om5p:blue:lan" "eth1"
;;
 
+omy-x1)
+   ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
+   ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
+   ;;
+
 qihoo-c301)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
;;
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index d083a79..a2251d1 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -214,6 +214,9 @@ get_status_led() {
om5p-an)
status_led="om5p:blue:power"
;;
+   omy-x1)
+   status_led="omy:green:power"
+   ;;
onion-omega)
status_led="onion:amber:system"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 46f1685..199379e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -123,6 +123,9 @@ tplink_board_detect() {
"007260"*)
model="TellStick ZNet Lite"
;;
+   "066602"*)
+   model="OMYlink OMY-X1"
+   ;;
"3C0001"*)
model="OOLITE"
;;
@@ -632,6 +635,9 @@ ar71xx_board_detect() {
*"OM5P AN")
name="om5p-an"
;;
+   *"OMY-X1")
+   name="omy-x1"
+   ;;
*"Onion Omega")
name="onion-omega"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d410819..1d3695f 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -333,6 +333,7 @@ platform_check_image() {
gl-inet | \
mc-mac1200r | \
minibox-v1 |\
+   omy-x1 |\
onion-omega | \
oolite | \
smart-300 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 0570749..d740c2e 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -108,6 +108,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index c9ee122..b11dd91 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/li

[OpenWrt-Devel] [PATCH] ar71xx: Add support for the OMYlink OMY-X1

2016-03-09 Thread L. D. Pinney
https://wiki.openwrt.org/toh/omylink/omy-x1

http://www.omylink.com/

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---

 target/linux/ar71xx/base-files/etc/board.d/01_leds|   5 +++
 target/linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh|   3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |   3 ++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|   1 +
 target/linux/ar71xx/config-4.1|   1 +
 target/linux/ar71xx/config-4.4|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt |   9 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-omy-x1.c   | 110 
++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/omy.mk   |  16 ++
 target/linux/ar71xx/image/Makefile|   8 +
 tools/firmware-utils/src/mktplinkfw.c |   6 
 14 files changed, 166 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 6cec5df..355c391 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -394,6 +394,11 @@ om5p-an)
ucidef_set_led_netdev "port2" "port2" "om5p:blue:lan" "eth1"
;;
 
+omy-x1)
+   ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
+   ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
+   ;;
+
 qihoo-c301)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
;;
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 799d98e..56ea451 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -384,6 +384,7 @@ gl-ar150 |\
 gl-domino |\
 gl-inet |\
 jwap003 |\
+omy-x1 |\
 pb42 |\
 pb44 |\
 routerstation|\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index db69757..9167808 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -214,6 +214,9 @@ get_status_led() {
om5p-an)
status_led="om5p:blue:power"
;;
+   omy-x1)
+   status_led="omy:green:power"
+   ;;
onion-omega)
status_led="onion:amber:system"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 804f622..8e9d1ea 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -120,6 +120,9 @@ tplink_board_detect() {
"12"*)
model="MERCURY MAC1200R"
;;
+   "066602"*)
+   model="OMYlink OMY-X1"
+   ;;
"3C0001"*)
model="OOLITE"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 8a70502..c8687c9 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -333,6 +333,7 @@ platform_check_image() {
gl-inet | \
mc-mac1200r | \
minibox-v1 |\
+   omy-x1 |\
onion-omega | \
oolite | \
smart-300 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 0ccb278..a682c11 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -108,6 +108,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index bef1863..73d552d 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 3d6dc4d..12f8c55 100644
--- a/target/linux

Re: [OpenWrt-Devel] [PATCH] V2 ar71xx : Add Support for the Bitmain Antrouter R1

2015-12-24 Thread L. D. Pinney
​Sorry the diff stat doesn't seem to match
maybe I used 'diff --stat' rather than '​diff origin/master --stat'

 target/linux/ar71xx/base-files/etc/board.d/01_leds|  5 
 target/linux/ar71xx/base-files/etc/board.d/02_network |  1 +
 target/linux/ar71xx/base-files/etc/diag.sh|  3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |  3 ++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|  1 +
 target/linux/ar71xx/config-4.1|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 +++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c | 98
+++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
 target/linux/ar71xx/generic/profiles/antminer.mk  | 11 +++
 target/linux/ar71xx/image/Makefile| 10 ++-
12 files changed, 144 insertions(+), 1 deletion(-)

Bitmain or their firmware 'team' used AA same as the antminer s1/s3
and reused the 'tplink profile' for a tplink routerbasically a hack job.

I have no Idea why they can't do things more properly.

On Thu, Dec 24, 2015 at 7:41 AM, Yousong Zhou <yszhou4t...@gmail.com> wrote:

> Hi,
>
> On 24 December 2015 at 09:32, L. D. Pinney <ldpin...@gmail.com> wrote:
> > This patch adds support for the Bitmain Antrouter R1
> >
> > http://wiki.openwrt.org/toh/bitmain/r1
> >
> > Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
> > ---
> >
> > V2 Corrects naming errors in Profile in V1
> >
> >  target/linux/ar71xx/base-files/etc/board.d/01_leds|  5 +
> >  target/linux/ar71xx/base-files/etc/board.d/02_network |  1 +
> >  target/linux/ar71xx/base-files/etc/diag.sh|  3 +++
> >  target/linux/ar71xx/base-files/lib/ar71xx.sh  |  3 +++
> >  target/linux/ar71xx/base-files/lib/upgrade/platform.sh|  1 +
> >  target/linux/ar71xx/config-4.1|  1 +
> >  target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10
> ++
> >  target/linux/ar71xx/files/arch/mips/ath79/Makefile|  1 +
> >  target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c |  8
> +++-
> >  target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
> >  target/linux/ar71xx/generic/profiles/antminer.mk  | 11
> +++
> >  target/linux/ar71xx/image/Makefile| 10
> +-
> >  12 files changed, 53 insertions(+), 2 deletions(-)
> >
>
> The patch may be fine but the diffstat apparently does not match the patch.
>
> > diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> > index 576d45b..cfb42a5 100755
> > --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
> > +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
> > @@ -45,6 +45,11 @@ antminer-s3)
> > ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
> > ;;
> >
> > +antrouter-r1)
> > +   ucidef_set_led_wlan "wlan" "WLAN" "antrouter-r1:green:wlan"
> "phy0tpt"
> > +   ucidef_set_led_default "btc" "BTC" "antrouter-r1:green:btc" "0"
> > +   ;;
> > +
> >  arduino-yun)
> > ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt"
> > ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1"
> > 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 8c57f2b..6b6c6a4 100755
> > --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> > +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> > @@ -317,6 +317,7 @@ dlan-pro-1200-ac)
> >  all0305 |\
> >  antminer-s1 |\
> >  antminer-s3 |\
> > +antrouter-r1 |\
> >  aw-nr580 |\
> >  bullet-m |\
> >  c-55 |\
> > diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
> b/target/linux/ar71xx/base-files/etc/diag.sh
> > index 7e2dac8..13a0a98 100644
> > --- a/target/linux/ar71xx/base-files/etc/diag.sh
> > +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> > @@ -18,6 +18,9 @@ get_status_led() {
> > antminer-s3)
> > status_led="antminer-s3:green:system"
> >  

[OpenWrt-Devel] [PATCH] ar71xx : Add Support for the Bitmain Antrouter R1

2015-12-23 Thread L. D. Pinney
This patch adds support for the Bitmain Antrouter R!

http://wiki.openwrt.org/toh/bitmain/r1

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---

 target/linux/ar71xx/base-files/etc/board.d/01_leds|  5 +
 target/linux/ar71xx/base-files/etc/board.d/02_network |  1 +
 target/linux/ar71xx/base-files/etc/diag.sh|  3 +++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|  1 +
 target/linux/ar71xx/config-4.1|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c |  8 +++-
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
 target/linux/ar71xx/generic/profiles/antminer.mk  | 11 +++
 target/linux/ar71xx/image/Makefile| 10 +-
 12 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 576d45b..cfb42a5 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -45,6 +45,11 @@ antminer-s3)
ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
;;
 
+antrouter-r1)
+   ucidef_set_led_wlan "wlan" "WLAN" "antrouter-r1:green:wlan" "phy0tpt"
+   ucidef_set_led_default "btc" "BTC" "antrouter-r1:green:btc" "0"
+   ;;
+
 arduino-yun)
ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt"
ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1"
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 8c57f2b..6b6c6a4 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -317,6 +317,7 @@ dlan-pro-1200-ac)
 all0305 |\
 antminer-s1 |\
 antminer-s3 |\
+antrouter-r1 |\
 aw-nr580 |\
 bullet-m |\
 c-55 |\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 7e2dac8..13a0a98 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -18,6 +18,9 @@ get_status_led() {
antminer-s3)
status_led="antminer-s3:green:system"
;;
+   antminer-r1)
+   status_led="antminer-r1:green:system"
+   ;;
ap132)
status_led="ap132:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 46e6311..61dcbba 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -114,6 +114,9 @@ tplink_board_detect() {
"044403"*)
model="ANTMINER-S3"
;;
+   "0101"*)
+   model="ANTROUTER-R1"
+   ;;
"12"*)
model="MERCURY MAC1200R"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index e8998f4..cff7dfe 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -323,6 +323,7 @@ platform_check_image() {
 
antminer-s1 | \
antminer-s3 | \
+   antrouter-r1 | \
archer-c5 | \
archer-c7 | \
el-m150 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 7845aa2..fe1dd68 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -35,6 +35,7 @@ CONFIG_ATH79_MACH_ALL0258N=y
 CONFIG_ATH79_MACH_ALL0315N=y
 CONFIG_ATH79_MACH_ANTMINER_S1=y
 CONFIG_ATH79_MACH_ANTMINER_S3=y
+CONFIG_ATH79_MACH_ANTROUTER_R1=y
 CONFIG_ATH79_MACH_AP113=y
 CONFIG_ATH79_MACH_AP121=y
 CONFIG_ATH79_MACH_AP132=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 84d22fe..cdd4fa2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -72,6 +72,16 @@ config ATH79_MACH_ANTMINER_S3
select ATH79_DEV_USB
select ATH79_DEV_WMAC
 
+config ATH79_MACH_ANTROUTER_R1
+   bool "Bitmain Antrouter R1 support"
+   select SOC_AR933X
+   select ATH79_DEV_ET

[OpenWrt-Devel] [PATCH] V2 ar71xx : Add Support for the Bitmain Antrouter R1

2015-12-23 Thread L. D. Pinney
This patch adds support for the Bitmain Antrouter R1

http://wiki.openwrt.org/toh/bitmain/r1

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---

V2 Corrects naming errors in Profile in V1

 target/linux/ar71xx/base-files/etc/board.d/01_leds|  5 +
 target/linux/ar71xx/base-files/etc/board.d/02_network |  1 +
 target/linux/ar71xx/base-files/etc/diag.sh|  3 +++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|  1 +
 target/linux/ar71xx/config-4.1|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c |  8 +++-
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |  1 +
 target/linux/ar71xx/generic/profiles/antminer.mk  | 11 +++
 target/linux/ar71xx/image/Makefile| 10 +-
 12 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index 576d45b..cfb42a5 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -45,6 +45,11 @@ antminer-s3)
ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
;;
 
+antrouter-r1)
+   ucidef_set_led_wlan "wlan" "WLAN" "antrouter-r1:green:wlan" "phy0tpt"
+   ucidef_set_led_default "btc" "BTC" "antrouter-r1:green:btc" "0"
+   ;;
+
 arduino-yun)
ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt"
ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1"
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 8c57f2b..6b6c6a4 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -317,6 +317,7 @@ dlan-pro-1200-ac)
 all0305 |\
 antminer-s1 |\
 antminer-s3 |\
+antrouter-r1 |\
 aw-nr580 |\
 bullet-m |\
 c-55 |\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 7e2dac8..13a0a98 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -18,6 +18,9 @@ get_status_led() {
antminer-s3)
status_led="antminer-s3:green:system"
;;
+   antminer-r1)
+   status_led="antminer-r1:green:system"
+   ;;
ap132)
status_led="ap132:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 46e6311..61dcbba 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -114,6 +114,9 @@ tplink_board_detect() {
"044403"*)
model="ANTMINER-S3"
;;
+   "0101"*)
+   model="ANTROUTER-R1"
+   ;;
"12"*)
model="MERCURY MAC1200R"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index e8998f4..cff7dfe 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -323,6 +323,7 @@ platform_check_image() {
 
antminer-s1 | \
antminer-s3 | \
+   antrouter-r1 | \
archer-c5 | \
archer-c7 | \
el-m150 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 7845aa2..fe1dd68 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -35,6 +35,7 @@ CONFIG_ATH79_MACH_ALL0258N=y
 CONFIG_ATH79_MACH_ALL0315N=y
 CONFIG_ATH79_MACH_ANTMINER_S1=y
 CONFIG_ATH79_MACH_ANTMINER_S3=y
+CONFIG_ATH79_MACH_ANTROUTER_R1=y
 CONFIG_ATH79_MACH_AP113=y
 CONFIG_ATH79_MACH_AP121=y
 CONFIG_ATH79_MACH_AP132=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 84d22fe..cdd4fa2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -72,6 +72,16 @@ config ATH79_MACH_ANTMINER_S3
select ATH79_DEV_USB
select ATH79_DEV_WMAC
 
+config ATH79_MACH_ANTROUTER_R1
+   bool "Bitmain Antrouter R1 support"
+   s

Re: [OpenWrt-Devel] Fwd: [homenet] Protocol Action: 'Home Networking Control Protocol' to Proposed Standard (draft-ietf-homenet-hncp-10.txt)

2015-12-08 Thread L. D. Pinney
Why has this been cross posted to the OpenWrt *Development* List?

I fail to see any relevance to the usual and prevailing use of this list.

On Tue, Dec 8, 2015 at 10:52 AM, Dave Taht  wrote:

> While I'm dreaming of steadier funding for things I care about,
> ietf homenet wg's work is nearly complete.
>
> *most* of the work is already done in openwrt to make all the ietf
> homenet proposed standards work, and indeed, be the default in
> openwrt. However nobody is funded anymore to take it further, and it
> would be nice to see builds taking place and tested automagically - to
> finally bring the dream of always interoperable, ipv6 capable cpe and
> home routers, plugged in, every which way - a reality.
>
> There are still many details left to make it happen well and be a
> truly usable set of interoperable standards - I have a huge list of
> things still not encapsulated or negotiated right within the hncp
> stack, such as wifi channel selection and uplink bandwidth, and babel
> is in need of some love, there are some state machine bugs that need
> squashing.
>
> -- Forwarded message --
> From: The IESG 
> Date: Tue, Dec 8, 2015 at 3:09 PM
> Subject: [homenet] Protocol Action: 'Home Networking Control Protocol'
> to Proposed Standard (draft-ietf-homenet-hncp-10.txt)
> To: IETF-Announce 
> Cc: homenet-cha...@ietf.org, m...@townsley.net,
> draft-ietf-homenet-h...@ietf.org, The IESG ,
> home...@ietf.org, terry.mander...@icann.org, rfc-edi...@rfc-editor.org
>
>
> The IESG has approved the following document:
> - 'Home Networking Control Protocol'
>   (draft-ietf-homenet-hncp-10.txt) as Proposed Standard
>
> This document is the product of the Home Networking Working Group.
>
> The IESG contact persons are Brian Haberman and Terry Manderson.
>
> A URL of this Internet Draft is:
> https://datatracker.ietf.org/doc/draft-ietf-homenet-hncp/
>
>
>
>
>
> Technical Summary
>
> This document describes the Home Networking Control Protocol (HNCP),
> an extensible distributed configuration protocol for “unmanaged”
> (e.g., functions that are not configured manually or by a central
> management server of some kind) home network devices. The intent is to
> provide a distributed protocol for flooding of basic configuration
> state essential to IP network functionality.
>
> HNCP is described as a profile of and extension to the Distributed
> Node Consensus Protocol (DNCP).  HNCP enables discovery of network
> topology and borders, automated configuration of addresses (using the
> algorithm defined in draft-ietf-homenet-prefix-assignment-08), name
> resolution, and service discovery.
>
> Working Group Summary
>
> The earliest roots of HNCP are in draft-acee-ospf-ospfv3-autoconfig-00
> (Oct 2011) which was eventually published as Standards Track RFC 7503,
>  with the expectation that other documents would define
> HOMENET-specific TLVs to be carried inside OSPFv3.
>
> Strong resistance from the WG (as well as open source router software
> developers) to this tight coupling between a specific routing protocol
> and network configuration led to the split of HNCP as a standalone
> protocol first defined in draft-stenberg-homenet-hncp-00.
>
> Later, DNCP (generic aspects of HNCP concerning synchronization of
> state among a set of nodes using Trickle[RFC6206]) were split from the
> main HNCP document to allow for modularity and potential reuse. After
> this final split, the HNCP document describes the HOMENET-specific
> TLVs and the DNCP profile used to synchronize them across the home
> network.
>
> Document Quality
>
>   Are there existing implementations of the protocol?
>
> The reference “hnetd” implementation is at
> https://github.com/sbyx/hnetd/ (project homepage at
> http://www.homewrt.org/doku.php).
>
> There is a second (fully independent and interoperable) implementation
> available at https://github.com/jech/shncpd developed entirely from
> the specification documents without referal to the reference
> implementation.
>
> There is a partial third implementation, though not fully independent,
> available here: https://github.com/fingon/pysyma
>
>
>   Have a significant number of vendors indicated their plan to
>   implement the specification?
>
>
> The reference implementation has been a part of routing feed of
> OpenWrt since Barrier Breaker (14.07) release in July, 2014.
>
> Google Nest, Comcast Xfinity, D-Link, Freebox, Technicolor, and Cisco
> have all expressed interest in implementing and/or shipping HNCP. HNCP
> is referenced in version 1.0 of the Thread Specification (Nest,
> Samsung, etc.)
>
> “Homenet” running either the early OSPF version and later HNCP (with
> DNCP) has been demonstrated publicly at 9 IETF BnB events (every BnB
> since BnB began, plus at least one “pre BnB” event), HNCP split off
> from OSPF has been demontrated at the last 5 IETF BnB events. In
> addition to IETF, Homenet 

[OpenWrt-Devel] [PATCH] CC: ramips: Backport support for ZBT WG2626

2015-11-06 Thread L. D. Pinney
Backport of r47351

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   5 +++
 target/linux/ramips/base-files/etc/board.d/02_network  |   3 +-
 target/linux/ramips/base-files/etc/diag.sh |   3 ++
 target/linux/ramips/base-files/lib/ramips.sh   |   3 ++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |   5 +--
 target/linux/ramips/dts/ZBT-WG2626.dts | 127 
+
 target/linux/ramips/image/Makefile |   7 +++-
 target/linux/ramips/mt7621/profiles/zbt.mk |  19 +++
 8 files changed, 168 insertions(+), 4 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 545bd70..5946f98 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -258,6 +258,11 @@ case $board in
set_usb_led "lenovo:blue:usb"
set_wifi_led "lenovo:blue:wifi"
;;
+   zbt-wg2626)
+   ucidef_set_led_default "power" "power" "zbt-wg2626:green:power" 
"1"
+   set_wifi_led "zbt-wg2626:green:air"
+   set_usb_led "zbt-wg2626:green:usb"
+   ;;
zte-q7)
set_wifi_led "zte:blue:status"
;;
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 19ef3f7..d7d016b 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -145,7 +145,8 @@ ramips_setup_interfaces()
wsr-1166 | \
wt1520 | \
xiaomi-miwifi-mini |\
-   y1)
+   y1|\
+   zbt-wg2626)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index d32d692..0747d70 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -247,6 +247,9 @@ get_status_led() {
y1s)
status_led="lenovo:blue:power"
;;
+   zbt-wg2626)
+   status_led="zbt-wg2626:green:power"
+   ;;
zte-q7)
status_led="zte:red:status"
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 70f22a7..e4276d9 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -403,6 +403,9 @@ ramips_board_detect() {
*"Zbtlink ZBT-WA05")
name="zbt-wa05"
;;
+   *"ZBT-WG2626")
+   name="zbt-wg2626"
+   ;;
*"ZBT WR8305RT")
name="wr8305rt"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 11fee85..2f64d8c 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -126,8 +126,9 @@ platform_check_image() {
xiaomi-miwifi-mini |\
y1 |\
y1s |\
-   zte-q7 |\
-   zbt-wa05)
+   zbt-wa05 |\
+   zbt-wg2626 |\
+   zte-q7)
[ "$magic" != "27051956" ] && {
echo "Invalid image type."
return 1
diff --git a/target/linux/ramips/dts/ZBT-WG2626.dts 
b/target/linux/ramips/dts/ZBT-WG2626.dts
new file mode 100644
index 000..6170454
--- /dev/null
+++ b/target/linux/ramips/dts/ZBT-WG2626.dts
@@ -0,0 +1,127 @@
+/dts-v1/;
+
+/include/ "mt7621.dtsi"
+
+/ {
+   compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+   model = "ZBT-WG2626";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x1c00>, <0x2000 0x400>;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   sdhci@1013 {
+   status = "okay";
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size

[OpenWrt-Devel] [PATCH] ar71xx: Bitmain Antminer S1/S3 set GPIO for USB Power

2015-10-24 Thread L. D. Pinney
Antminers using the stock bootloader will not hash without this GPIO set.
Applies to DD and CC

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---

 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c | 2 +-
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c | 5 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
index 880bc72..0a81227 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
@@ -26,7 +26,7 @@
 
 #define ANTMINER_S1_GPIO_LED_SYSTEM23
 #define ANTMINER_S1_GPIO_LED_WLAN  0
-#define ANTMINER_S1_GPIO_USB_POWER 8
+#define ANTMINER_S1_GPIO_USB_POWER 26
 
 #define ANTMINER_S1_KEYSPOLL_INTERVAL  20  /* msecs */
 #define ANTMINER_S1_KEYSDEBOUNCE_INTERVAL (3 * ANTMINER_S1_KEYSPOLL_INTERVAL)
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
index aa54e9c..b77a6cc 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
@@ -25,6 +25,7 @@
 #define ANTMINER_S3_GPIO_LED_WLAN  0
 #define ANTMINER_S3_GPIO_LED_SYSTEM17
 #define ANTMINER_S3_GPIO_LED_LAN   22
+#define ANTMINER_S3_GPIO_USB_POWER 26
 
 #define ANTMINER_S3_GPIO_BTN_RESET 11
 
@@ -81,6 +82,10 @@ static void __init antminer_s3_setup(void)
ath79_register_gpio_keys_polled(-1, ANTMINER_S3_KEYSPOLL_INTERVAL,
ARRAY_SIZE(ANTMINER_S3_GPIO_keys),
ANTMINER_S3_GPIO_keys);
+
+   gpio_request_one(ANTMINER_S3_GPIO_USB_POWER,
+GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+"USB power");
ath79_register_usb();
 
ath79_register_m25p80(_S3_flash_data);
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [FCC] dan gillmor nails why I just did what I did

2015-10-19 Thread L. D. Pinney
"Surely our government isn't insane"

LOL

On Mon, Oct 19, 2015 at 5:52 PM, Dave Taht  wrote:

> From:
>
>
> http://www.slate.com/blogs/future_tense/2015/10/15/trans_pacific_partnership_could_thwart_computer_security_research_and_tinkering.html
>
> "Surely our government isn't insane enough to thwart research designed
> to keep us safer in the emerging “Internet of Things.” Yet tell that,
> for starters, to the automobile industry, where one of the world's
> largest car makers, Volkswagen, cheated on emissions testing by
> tweaking its software. This crime against humanity—not an
> exaggeration, given the massive contribution this may have made to
> accelerating climate change—was discovered by researchers who, by good
> luck, discovered that VW's cars had been spewing vastly more
> pollutants than the company claimed for years. This almost certainly
> would have been uncovered much earlier had the industry not relied on
> the Digital Millennium Copyright Act to “protect” its software from
> analysis; the DMCA made it illegal to circumvent “digital restrictions
> management.” Yet the automakers continue to adamantly oppose any
> exception to the DMCA.
>
> This TPP provision, assuming it's in the final document—won't it be
> great when our government allows us to actually see it?—is just one of
> the many, many terrible “intellectual property” arrangements aimed at
> giving corporations greater control over their customers. When
> software is part of a product, as it is in so many things today and
> almost everything tomorrow, the very concept of ownership becomes an
> abstraction for the alleged buyer. And when we risk harsh penalties
> for even attempting to repair a device that's defective, whether
> that's because of the seller's incompetence or venality, we are in a
> totally untenable, and frighteningly insecure, position.
>
> We need to be going in precisely the opposite direction, and a
> too-little-noticed proposal this week shows how it might be done. A
> group of security experts looked into the absolutely horrifying, and
> willful, lack of security in devices most of us use every
> day—especially the Wi-Fi routers that let us share one Internet
> connection among a variety of devices—and asked the Federal
> Communications Commission to intervene.
>
> In a letter to the FCC and a press release explaining their goals,
> more than 250 people, including Vint Cerf, one of the Internet's
> creators, implored the agency to make these crucial devices more
> secure by forcing manufacturers to be more open about how they work.
> Among other things, the security experts asked the FCC to require that
> device makers a) provide public access to “source code”—the
> programming instructions that operate the device—so that it can be
> analyzed; b) provide ongoing security updates in timely ways; and c)
> be prevented from selling devices that don't comply with those and
> other rules designed to ensure security.
>
> The FCC should make this happen yesterday. Then, regulators and
> Congress should extend the compelling logic of this proposal to other
> devices—notably cars and mobile phones—that are notoriously riddled
> with flaws.
>
> Meanwhile, it's vital that Congress not agree to the TPP as it's
> currently written. Thankfully, the deal is in trouble. Let's hope the
> odd-couple combination of a corporate-dominated Obama administration
> and a Republican-controlled Congress doesn't override common sense and
> the public good."
>
> Scientists and Engineers have a mandate to obey physical law. Lawyers,
> and lobbyists, not so much.
>
> Dave Täht
> I just lost several years of my life to making wifi better. And the
> FCC wants to mess all that up. https://www.gofundme.com/savewifi
> ___
> FCC mailing list
> f...@lists.prplfoundation.org
> http://lists.prplfoundation.org/cgi-bin/mailman/listinfo/fcc
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH]v2 CC: ar71xx: Bitmain Antminer S1 & S3 cleanup

2015-10-19 Thread L. D. Pinney
Sets the LEDs to boardname:color:led-name
Sets the LAN to eth0
Corrects the profile names in the Makefile and changes tabs to spaces 
in the Makefile 'define Device/' like the other devices.
Other corrections such as the Machine Name and HWIDs

v1 inadvertently included files for the antrouter r1

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 9e30313..89fe53c 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,9 +12,11 @@ get_status_led() {
all0305)
status_led="eap7660d:green:ds4"
;;
-   antminer-s1|\
+   antminer-s1)
+   status_led="antminer-s1:green:system"
+   ;;
antminer-s3)
-   status_led="bitmain:green:system"
+   status_led="antminer-s3:green:system"
;;
ap132)
status_led="ap132:green:status"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 88e966d..5241db2 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -32,14 +32,14 @@ all0315n)
;;
 
 antminer-s1)
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s1:green:sys" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s1:green:wlan" "phy0tpt"
;;
 
 antminer-s3)
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_default "lan" "LAN" "bitmain:yellow:lan" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s3:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s3:green:sys" "0"
+   ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
;;
 
 ap113)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index cbd7b13..5c38c54 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -322,6 +322,8 @@ dlan-pro-1200-ac)
;;
 
 all0305 |\
+antminer-s1 |\
+antminer-s3 |\
 aw-nr580 |\
 bullet-m |\
 cap4200ag |\
@@ -366,8 +368,6 @@ wp543)
ucidef_set_interface_lan "eth0"
;;
 
-antminer-s1 |\
-antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 6f5ff18..839abc7 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -107,11 +107,11 @@ tplink_board_detect() {
"015300"*)
model="EasyLink EL-MINI"
;;
-   "04440001"*)
-   model="BITMAIN ANTMINER S1"
+   "044401"*)
+   model="ANTMINER-S1"
;;
-   "04440003"*)
-   model="BITMAIN ANTMINER S3"
+   "044403"*)
+   model="ANTMINER-S3"
;;
"12"*)
model="MERCURY MAC1200R"
@@ -344,6 +344,12 @@ ar71xx_board_detect() {
*ALL0315N)
name="all0315n"
;;
+   *Antminer-S1)
+   name="antminer-s1"
+   ;;
+   *Antminer-S3)
+   name="antminer-s3"
+   ;;
*AP113)
name="ap113"
;;
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
index 27ed760..880bc72 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
@@ -42,11 +42,11 @@ static struct flash_platform_data ANTMINER_S1_flash_data = {
 
 static struct gpio_led ANTMINER_S1_leds_gpio[] __initdata = {
{
-   .name   = "bitmain:green:system",
+   .name   = "antminer-s1:green:system",
.gpio   = ANTMINER_S1_GPIO_LED_SYSTEM,
.active_low = 0,
},{
-   .name   = "bitmain:green:wlan",
+   .name   = "antminer-s1:green:wlan",
.gpio   = ANTMINER_S1_GPIO_LED_WLAN,
.active_low = 0,
},
@@ -95,4 +95,4 @@ static void __init antminer_s1_setup(void)
 }
 
 MIPS_MACHINE(ATH79_MACH_ANTMINER_S1, "ANTMINER-S1",
-"Bitmain Antminer S1", antminer_s1_setup);
+"Antminer-S1", antminer_s1_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
index 

[OpenWrt-Devel] [PATCH] CC: ar71xx: Bitmain Antminer S1 & S3 cleanup

2015-10-19 Thread L. D. Pinney
Sets the LEDs to boardname:color:led-name
Sets the LAN to eth0
Corrects the profile names in the Makefile and changes tabs to spaces 
in the Makefile 'define Device/' like the other devices.
Other corrections such as the Machine Name and HWIDs

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---
 target/linux/ar71xx/base-files/etc/diag.sh 
|  6 ++-
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
| 10 ++---
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
|  4 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   
| 14 --
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c   
|  6 +--
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c   
|  8 ++--
 target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c  
| 98 --
 target/linux/ar71xx/generic/profiles/antminer.mk   
| 16 +++
 target/linux/ar71xx/image/Makefile 
| 20 -
 
target/linux/ar71xx/patches-3.18/904-MIPS-ath79-bitmain-antminer-s1-support.patch
  |  2 +-
 
target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
  |  4 +-
 
target/linux/ar71xx/patches-3.18/907-MIPS-ath79-bitmain-antrouter-r1-support.patch
 | 45 ---
 tools/firmware-utils/src/mktplinkfw.c  
|  9 +++-
 13 files changed, 56 insertions(+), 186 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 9e30313..89fe53c 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,9 +12,11 @@ get_status_led() {
all0305)
status_led="eap7660d:green:ds4"
;;
-   antminer-s1|\
+   antminer-s1)
+   status_led="antminer-s1:green:system"
+   ;;
antminer-s3)
-   status_led="bitmain:green:system"
+   status_led="antminer-s3:green:system"
;;
ap132)
status_led="ap132:green:status"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 88e966d..5241db2 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -32,14 +32,14 @@ all0315n)
;;
 
 antminer-s1)
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s1:green:sys" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s1:green:wlan" "phy0tpt"
;;
 
 antminer-s3)
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_default "lan" "LAN" "bitmain:yellow:lan" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s3:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s3:green:sys" "0"
+   ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
;;
 
 ap113)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index cbd7b13..5c38c54 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -322,6 +322,8 @@ dlan-pro-1200-ac)
;;
 
 all0305 |\
+antminer-s1 |\
+antminer-s3 |\
 aw-nr580 |\
 bullet-m |\
 cap4200ag |\
@@ -366,8 +368,6 @@ wp543)
ucidef_set_interface_lan "eth0"
;;
 
-antminer-s1 |\
-antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 6f5ff18..839abc7 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -107,11 +107,11 @@ tplink_board_detect() {
"015300"*)
model="EasyLink EL-MINI"
;;
-   "04440001"*)
-   model="BITMAIN ANTMINER S1"
+  

[OpenWrt-Devel] (no subject)

2015-10-19 Thread L. D. Pinney
Subject: [PATCH] CC: ar71xx: Bitmain Antminer S1 & S3 cleanup

Sets the LEDs to boardname:color:led-name
Sets the LAN to eth0
Corrects the profile names in the Makefile and changes tabs to spaces 
in the Makefile 'define Device/' like the other devices.
Other corrections such as the Machine Name and HWIDs

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---
 target/linux/ar71xx/base-files/etc/diag.sh 
|  6 ++-
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
| 10 ++---
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
|  4 +-
 target/linux/ar71xx/base-files/lib/ar71xx.sh   
| 14 --
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c   
|  6 +--
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c   
|  8 ++--
 target/linux/ar71xx/files/arch/mips/ath79/mach-antrouter-r1.c  
| 98 --
 target/linux/ar71xx/generic/profiles/antminer.mk   
| 16 +++
 target/linux/ar71xx/image/Makefile 
| 20 -
 
target/linux/ar71xx/patches-3.18/904-MIPS-ath79-bitmain-antminer-s1-support.patch
  |  2 +-
 
target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
  |  4 +-
 
target/linux/ar71xx/patches-3.18/907-MIPS-ath79-bitmain-antrouter-r1-support.patch
 | 45 ---
 tools/firmware-utils/src/mktplinkfw.c  
|  9 +++-
 13 files changed, 56 insertions(+), 186 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 9e30313..89fe53c 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,9 +12,11 @@ get_status_led() {
all0305)
status_led="eap7660d:green:ds4"
;;
-   antminer-s1|\
+   antminer-s1)
+   status_led="antminer-s1:green:system"
+   ;;
antminer-s3)
-   status_led="bitmain:green:system"
+   status_led="antminer-s3:green:system"
;;
ap132)
status_led="ap132:green:status"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 88e966d..5241db2 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -32,14 +32,14 @@ all0315n)
;;
 
 antminer-s1)
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s1:green:sys" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s1:green:wlan" "phy0tpt"
;;
 
 antminer-s3)
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_default "lan" "LAN" "bitmain:yellow:lan" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s3:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s3:green:sys" "0"
+   ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
;;
 
 ap113)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index cbd7b13..5c38c54 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -322,6 +322,8 @@ dlan-pro-1200-ac)
;;
 
 all0305 |\
+antminer-s1 |\
+antminer-s3 |\
 aw-nr580 |\
 bullet-m |\
 cap4200ag |\
@@ -366,8 +368,6 @@ wp543)
ucidef_set_interface_lan "eth0"
;;
 
-antminer-s1 |\
-antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 6f5ff18..839abc7 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -107,11 +107,11 @@ tplink_board_detect() {
"015300"*)
model="EasyLink EL-MINI"
;;
-   

Re: [OpenWrt-Devel] SVN to GIT transition

2015-10-11 Thread L. D. Pinney
Just my 2-cents

IF it isn't BROKENplease DON'T fix it.



On Sun, Oct 11, 2015 at 1:26 PM, Nemesis  wrote:

> On 10/10/2015 07:45 PM, nemesis wrote:
>
> On Sat, 10 Oct 2015 00:41:24 +0300, Roman Yeryomin 
>   wrote:
>
> On 9 October 2015 at 21:22, Jo-Philipp Wich 
>  wrote:
>
> Hi.
>
> Moving to Git seemed to have lots of traction at the summit, and I'll
> add my voice that this sounds like a step in the right direction for
> OpenWrt.  I'm assuming that we would want to do a proper SVN to Git
> conversion, and Eric's help on this would be great, I think.  My
> discussion with Eric is over on Google+ and marked public:
> https://plus.google.com/+JonathanBennett87/posts/bMPMjn7ZcJS
>
>
> Why does the core system need to migrate from svn to git?
>
>
> I thought everybody is using git anyway already. Are there people
> still using svn?
>
>
> doing something because everybody is doing so is not the best argument
> IMHO.
>
> I would say that using git would improve quite a few things:
>
> * it would be easier to send upstream patches
> * having a good git web interface like gitlab or github would allow
> newcomers to participate more easily
> * it would make life easier to the core contributors that prefer to work
> with git because git allows a very powerful development workflow compared
> to SVN
>
>
> I remember somebody also mentioned sending patches to the linux kernel
> would be easier.
>
> What do you people think about this point?
>
> Federico
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH, v2] ar71xx: Bitmain Antminer S1 & S3 cleanup

2015-10-11 Thread L. D. Pinney
Sets the LEDs to boardname:color:led-name
Sets the LAN to eth0
Other corrections such as the Machine Name and HWIDs
v2 corrects the profile names in the Makefile and changes tabs to spaces 
in the Makefile 'define Device/' like the other devices. 

Signed-off-by: L. D. Pinney <ldpin...@gmail.com>
---

 target/linux/ar71xx/base-files/etc/diag.sh|  6 
--
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds   | 10 
+-
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network|  4 ++--
 target/linux/ar71xx/base-files/lib/ar71xx.sh  | 14 
++
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c  |  6 
+++---
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c  |  8 

 target/linux/ar71xx/generic/profiles/antminer.mk  | 16 

 target/linux/ar71xx/image/Makefile| 20 
++--
 target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch |  4 ++--
 tools/firmware-utils/src/mktplinkfw.c |  9 
+++--
 10 files changed, 55 insertions(+), 42 deletions(-)


diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index cfba6b4..b2f77a0 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,9 +12,11 @@ get_status_led() {
all0305)
status_led="eap7660d:green:ds4"
;;
-   antminer-s1|\
+   antminer-s1)
+   status_led="antminer-s1:green:system"
+   ;;
antminer-s3)
-   status_led="bitmain:green:system"
+   status_led="antminer-s3:green:system"
;;
ap132)
status_led="ap132:green:status"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index fac4751..abed456 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -33,14 +33,14 @@ all0315n)
;;
 
 antminer-s1)
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s1:green:sys" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s1:green:wlan" "phy0tpt"
;;
 
 antminer-s3)
-   ucidef_set_led_wlan "wlan" "WLAN" "bitmain:green:wlan" "phy0tpt"
-   ucidef_set_led_default "sys" "SYS" "bitmain:green:sys" "0"
-   ucidef_set_led_default "lan" "LAN" "bitmain:yellow:lan" "0"
+   ucidef_set_led_wlan "wlan" "WLAN" "antminer-s3:green:wlan" "phy0tpt"
+   ucidef_set_led_default "sys" "SYS" "antminer-s3:green:sys" "0"
+   ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
;;
 
 ap113)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 880953c..40e9b30 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -339,6 +339,8 @@ dlan-pro-1200-ac)
;;
 
 all0305 |\
+antminer-s1 |\
+antminer-s3 |\
 aw-nr580 |\
 bullet-m |\
 cap4200ag |\
@@ -384,8 +386,6 @@ wp543)
ucidef_set_interface_lan "eth0"
;;
 
-antminer-s1 |\
-antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 4679a4b..166e52e 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -107,11 +107,11 @@ tplink_board_detect() {
"015300"*)
model="EasyLink EL-MINI"
;;
-   "04440001"*)
-   model="BITMAIN ANTMINER S1"
+   "044401"*)
+   model="ANTMINER-S1"
;;
-   "04440003"*)
-   model="BITMAIN ANTMINER S3"
+   "044403"*)
+   model="ANTMINER-S3"
;;
"12"*)
model="MERCURY MAC1200R"
@@ -350,6 +350,12 @@ ar71xx_board_detect() {
*ALL0315N)
  

Re: [OpenWrt-Devel] Backporting from dev branch to stable

2015-09-29 Thread L. D. Pinney
Basically speaking ... one would take the working patch set from trunk and
apply it to CC ... fix all the errors, changes, etc.
Then once you have a working patch set for CC ... submit it.

A couple of recent examples :

https://patchwork.ozlabs.org/patch/505724/ and
https://patchwork.ozlabs.org/patch/499956/

Regards

Larry

On Tue, Sep 29, 2015 at 8:47 PM, Jonathan Bennett 
wrote:

> Guys with more experience will certainly be better suited to answer, but
> from what I've observed, something like new device support wouldn't be
> appropriate to backport into a released branch.  Usually only critical
> security patches are backported.  There has been discussion of 15.05
> working as a LTS sort of release, with minor version updates, so a 15.05.1
> might happen in a few months.  You *might* get your patches included for
> that maintenance release.  That's certainly not for me to decide, though.
>
> --Jonathan Bennett
>
> On Tue, Sep 29, 2015 at 2:15 PM Drasko DRASKOVIC <
> drasko.drasko...@gmail.com> wrote:
>
>> Hi all,
>> how are the patches from main development branch backported to Chaos
>> Calmer branch from dev branch?
>>
>> Do I have to re-post this patch-set
>>
>> http://git.openwrt.org/?p=openwrt.git;a=commit;h=c84682a79e36bb57f4f78d51aa589f7bfe3fb5e8
>> against this branch:
>> http://git.openwrt.org/?p=15.05/openwrt.git;a=summary?
>>
>> BR,
>> Drasko
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWRT www version banner a security risk

2015-09-13 Thread L. D. Pinney
+1 for Etienne

Patch OpenWrt to add robots.txt

On Sun, Sep 13, 2015 at 12:45 PM, Daniel Dickinson <
open...@daniel.thecshore.com> wrote:

> My point, especially if you read this post fully, and the following, is
> that not displaying the banner is minimally useful, and that other measure
> to achieve the same goal (protect user when they mistakes) are far more
> useful/meaninful than eliminating the banner.
>
> Regards,
>
> Daniel
>
>
> On 2015-09-13 11:34 AM, MauritsVB wrote:
>
>> I see where you’re coming from but I disagree that one should always rely
>> on the user to know exactly what to do and what not to do. A bit of basic
>> prevention doesn’t hurt.
>>
>> Wouldn’t you agree that if you follow that line you might as well argue
>> that OpenWRT should not come with default-deny rules in the firewall? After
>> all, anyone who is savvy enough to install OpenWRT should then also know
>> that by default it has no firewall rules.
>>
>> There is a reason that not displaying too much information in banners is
>> good security practice. It slows down the reconnaissance phase of an attack
>> (using “banner grabbing” tools) and can persuade many attackers to even
>> skip a specific target. Even for complex server software and hardware that
>> requires far more expert operators than OpenWRT it is still best practice
>> not to give too much away about the specific version. It’s why companies
>> such as Cisco and Juniper advise not to disclose version information in
>> banners.
>>
>> Of course, by not displaying by default but making it a configurable
>> option any admin who requires if for support purposes could still enable it.
>>
>> As for your idea about warning users that their LuCI is reachable via
>> WAN, I agree, that definitely makes sense. However, I see that as a
>> separate issue from displaying security sensitive information on the login
>> page.
>>
>> Maurits
>>
>> On 13 Sep 2015, at 15:28, Daniel Dickinson 
>>> wrote:
>>>
>>> Quite frankly if someone has unintionally exposed LuCI to the internet I
>>> think they've got a lot bigger problem than exposed version information,
>>> and that not putting the version information at best delays only very
>>> slightly a would be attacker.
>>>
>>> And for properly configured installs, the version information is
>>> extremely useful for doing support and such like.
>>>
>>> Not that it likely means much, by vote is against such weak bandaid to
>>> what is fundamentally an issue a user creates for themselves that is much
>>> larger than the details of what's on the screen.
>>>
>>> What would be more relevent solution is for LuCI to have a banner that
>>> indicates that the LuCI is visible on the WAN, thus alerting the user to a
>>> misconfiguration, if it is that.
>>>
>>> Regards,
>>>
>>> Daniel
>>>
>>> On 2015-09-13 10:21 AM, MauritsVB wrote:
>>>
 At the moment the OpenWRT www login screen provides *very* detailed
 version information before anyone has even entered a password. It displays
 not just “15.05” or “Chaos Calmer” but even the exact git version on the
 banner.

 While it’s not advised to open this login screen to the world, fact is
 that it does happen intentionally or accidentally. Just a Google search for
 “Powered by LuCI Master (git-“ will provide many accessible OpenWRT login
 screens, including exact version information.

 As soon as someone discovers a vulnerability in a OpenWRT version all
 an attacker needs to do is perform a Google search to find many
 installations with versions that are vulnerable (even if a patch is already
 available).

 In the interest of hardening the default OpenWRT install, can I suggest
 that by default OpenWRT doesn’t disclose the version (not even 15.05 or
 “Chaos Calmer”) on the login screen? For extra safety I would even suggest
 to leave “OpenWRT” off the login screen, the only people who should use
 this screen already know it’s running OpenWRT.

 Any thoughts?

 Maurits
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

 ___
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>> ___
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

[OpenWrt-Devel] [PATCH] ramips: Fix Ticket #20153 swap radio calibration data pointers on the RE6500

2015-07-29 Thread L. D. Pinney
This patch fixes weak radio signal reported by nikola.georgiev

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
Patch applies to CC as well.

 target/linux/ramips/dts/RE6500.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/dts/RE6500.dts 
b/target/linux/ramips/dts/RE6500.dts
index 0c33994..36d6218 100644
--- a/target/linux/ramips/dts/RE6500.dts
+++ b/target/linux/ramips/dts/RE6500.dts
@@ -69,7 +69,7 @@
mt76@0,0 {
reg = 0x 0 0 0 0;
device_type = pci;
-   mediatek,mtd-eeprom = factory 0x8000;
+   mediatek,mtd-eeprom = factory 0x;
mediatek,2ghz = 0;
};
};
@@ -78,7 +78,7 @@
mt76@1,0 {
reg = 0x 0 0 0 0;
device_type = pci;
-   mediatek,mtd-eeprom = factory 0x;
+   mediatek,mtd-eeprom = factory 0x8000;
mediatek,5ghz = 0;
};
};
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] (no subject)

2015-07-29 Thread L. D. Pinney
Subject: [PATCH] ramips: Fix Ticket #20153 swap radio calibration data pointers 
on the RE6500

This patch fixes weak radio signal reported by nikola.georgiev

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
Patch applies to CC as well.

 target/linux/ramips/dts/RE6500.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/dts/RE6500.dts 
b/target/linux/ramips/dts/RE6500.dts
index 0c33994..36d6218 100644
--- a/target/linux/ramips/dts/RE6500.dts
+++ b/target/linux/ramips/dts/RE6500.dts
@@ -69,7 +69,7 @@
mt76@0,0 {
reg = 0x 0 0 0 0;
device_type = pci;
-   mediatek,mtd-eeprom = factory 0x8000;
+   mediatek,mtd-eeprom = factory 0x;
mediatek,2ghz = 0;
};
};
@@ -78,7 +78,7 @@
mt76@1,0 {
reg = 0x 0 0 0 0;
device_type = pci;
-   mediatek,mtd-eeprom = factory 0x;
+   mediatek,mtd-eeprom = factory 0x8000;
mediatek,5ghz = 0;
};
};
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH]v4: CC: ar71xx: Backport support for Onion Omega

2015-07-25 Thread L. D. Pinney
Backport of r46458 to CC

https://onion.io/omega

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: Boken Lin b...@onion.io
Tested-by: Jacky Huang huangfangch...@163.com
---
V4 Refreshes the patch @46487 - kernel bump to 3.18.19

 target/linux/ar71xx/base-files/etc/diag.sh |  3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network |  4 

 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ar71xx/config-3.18|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c   | 84 

 target/linux/ar71xx/generic/profiles/onion.mk  | 16 
++
 target/linux/ar71xx/image/Makefile |  9 

 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 48 
+
 tools/firmware-utils/src/mktplinkfw.c  |  6 
++
 10 files changed, 161 insertions(+), 14 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 7ff5a8e..d6c7ec9 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -169,6 +169,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+   onion-omega)
+   status_led=onion:amber:system
+   ;;
pb44)
status_led=pb44:amber:jump1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 8dcedc8..d577fc6 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -275,6 +275,10 @@ mynet-n750)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+onion-omega)
+   ucidef_set_interface_lan wlan0
+   ;;
+
 dhp-1565-a1 |\
 dir-835-a1 |\
 wndr3700v4 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index f19af26..4c10ab2 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -550,6 +550,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+   *Onion Omega)
+   name=onion-omega
+   ;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 205cf22..f3dd61b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -310,6 +310,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   onion-omega | \
oolite | \
smart-300 | \
tl-mr10u | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index c9ec327..4f52332 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -86,6 +86,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
 CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
new file mode 100644
index 000..c739840
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
@@ -0,0 +1,84 @@
+/*
+ *  Onion Omega board support
+ *
+ *  Copyright (C) 2015 Boken Lin b...@onion.io
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define OMEGA_GPIO_LED_SYSTEM  27
+#define OMEGA_GPIO_BTN_RESET   11
+
+#define OMEGA_GPIO_USB_POWER   8
+
+#define OMEGA_KEYS_POLL_INTERVAL   20  /* msecs */
+#define OMEGA_KEYS_DEBOUNCE_INTERVAL   (3 * OMEGA_KEYS_POLL_INTERVAL)
+
+static const char *omega_part_probes[] = {
+   tp-link,
+   NULL,
+};
+
+static struct flash_platform_data omega_flash_data = {
+   .part_probes= omega_part_probes,
+};
+
+static struct gpio_led omega_leds_gpio[] __initdata = {
+   {
+   .name   = onion:amber:system,
+   .gpio

[OpenWrt-Devel] [PATCH]v3: CC: ar71xx: Backport support for Onion Omega

2015-07-24 Thread L. D. Pinney
Backport of r46458 to CC

https://onion.io/omega

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: Boken Lin b...@onion.io
Tested-by: Jacky Huang huangfangch...@163.com
---
V3 Refreshes the patch @46450

 target/linux/ar71xx/base-files/etc/diag.sh |  3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network |  4 

 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ar71xx/config-3.18|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c   | 84 

 target/linux/ar71xx/generic/profiles/onion.mk  | 16 
++
 target/linux/ar71xx/image/Makefile |  9 

 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 48 
+
 tools/firmware-utils/src/mktplinkfw.c  |  6 
++
 10 files changed, 161 insertions(+), 14 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 7ff5a8e..d6c7ec9 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -169,6 +169,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+   onion-omega)
+   status_led=onion:amber:system
+   ;;
pb44)
status_led=pb44:amber:jump1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 8dcedc8..d577fc6 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -275,6 +275,10 @@ mynet-n750)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+onion-omega)
+   ucidef_set_interface_lan wlan0
+   ;;
+
 dhp-1565-a1 |\
 dir-835-a1 |\
 wndr3700v4 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index f19af26..4c10ab2 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -550,6 +550,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+   *Onion Omega)
+   name=onion-omega
+   ;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 205cf22..f3dd61b 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -310,6 +310,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   onion-omega | \
oolite | \
smart-300 | \
tl-mr10u | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index c9ec327..4f52332 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -86,6 +86,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
 CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
new file mode 100644
index 000..c739840
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
@@ -0,0 +1,84 @@
+/*
+ *  Onion Omega board support
+ *
+ *  Copyright (C) 2015 Boken Lin b...@onion.io
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define OMEGA_GPIO_LED_SYSTEM  27
+#define OMEGA_GPIO_BTN_RESET   11
+
+#define OMEGA_GPIO_USB_POWER   8
+
+#define OMEGA_KEYS_POLL_INTERVAL   20  /* msecs */
+#define OMEGA_KEYS_DEBOUNCE_INTERVAL   (3 * OMEGA_KEYS_POLL_INTERVAL)
+
+static const char *omega_part_probes[] = {
+   tp-link,
+   NULL,
+};
+
+static struct flash_platform_data omega_flash_data = {
+   .part_probes= omega_part_probes,
+};
+
+static struct gpio_led omega_leds_gpio[] __initdata = {
+   {
+   .name   = onion:amber:system,
+   .gpio   = OMEGA_GPIO_LED_SYSTEM

[OpenWrt-Devel] [PATCH]v3: CC : ar71xx: Backport Support for the Bitmain Antminer S3

2015-07-22 Thread L. D. Pinney
Backport of r46236 to CC : add support for the Bitmain Antminer S3

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
V3 adds the *support.patch missing in V2

 target/linux/ar71xx/base-files/etc/diag.sh 
   |  3 +-
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
   |  6 
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
   |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   
   |  3 ++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
   |  2 ++
 target/linux/ar71xx/config-3.18
   |  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c   
   | 98 +
 target/linux/ar71xx/generic/profiles/antminer.mk   
   | 11 +++
 target/linux/ar71xx/image/Makefile 
   | 10 ++-
 
target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
 | 45 
 tools/firmware-utils/src/mktplinkfw.c  
   |  1 +
 11 files changed, 179 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 4bdb53d..843e709 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,7 +12,8 @@ get_status_led() {
all0305)
status_led=eap7660d:green:ds4
;;
-   antminer-s1)
+   antminer-s1|\
+   antminer-s3)
status_led=bitmain:green:system
;;
ap132)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 19814f4..5126497 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -36,6 +36,12 @@ antminer-s1)
ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
;;
 
+antminer-s3)
+   ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
+   ucidef_set_led_default sys SYS bitmain:green:sys 0
+   ucidef_set_led_default lan LAN bitmain:yellow:lan 0
+   ;;
+
 ap113)
ucidef_set_led_usbdev usb USB ap113:green:usb 1-1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 4fe951e..ea5ba91 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -344,6 +344,7 @@ wp543)
;;
 
 antminer-s1 |\
+antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan eth1
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8f4bb40..1aa90fe 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -110,6 +110,9 @@ tplink_board_detect() {
04440001*)
model=BITMAIN ANTMINER S1
;;
+   04440003*)
+   model=BITMAIN ANTMINER S3
+   ;;
12*)
model=MERCURY MAC1200R
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ade47fb..da4c9fa 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -299,6 +299,8 @@ platform_check_image() {
return 1
;;
 
+   antminer-s1 | \
+   antminer-s3 | \
archer-c5 | \
archer-c7 | \
el-m150 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 05c98eb..b051c90 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -41,6 +41,7 @@ CONFIG_ATH79_MACH_AP96=y
 CONFIG_ATH79_MACH_ARCHER_C7=y
 CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_ANTMINER_S1=y
+CONFIG_ATH79_MACH_ANTMINER_S3=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
new file mode 100644
index 000..010c461
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
@@ -0,0 +1,98 @@
+/*
+ *   Bitmain Antminer S3 board support
+ *
+ *  Copyright (C) 2015 L. D. Pinney ldpin...@gmail.com
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h

[OpenWrt-Devel] [PATCH]v2: CC: ar71xx: add support for Onion Omega

2015-07-22 Thread L. D. Pinney
This patch adds support for the Onion Omega.

https://onion.io/omega

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: Boken Lin b...@onion.io
Tested-by: Jacky Huang huangfangch...@163.com
---
Patch v1 had ath79/mach-onion-omega.c and profiles/onion.mk ommitted in error.
v2 includes these files.
 target/linux/ar71xx/base-files/etc/diag.sh |  3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network |  4 

 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ar71xx/config-3.18|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c   | 84 

 target/linux/ar71xx/generic/profiles/onion.mk  | 16 
++
 target/linux/ar71xx/image/Makefile |  9 

 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 48 
+
 tools/firmware-utils/src/mktplinkfw.c  |  6 
++
 10 files changed, 161 insertions(+), 14 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 4bdb53d..6b885b2 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -159,6 +159,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+   onion-omega)
+   status_led=onion:amber:system
+   ;;
pb44)
status_led=pb44:amber:jump1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 4fe951e..2a43c2c 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -274,6 +274,10 @@ mynet-n750)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+onion-omega)
+   ucidef_set_interface_lan wlan0
+   ;;
+
 dhp-1565-a1 |\
 dir-835-a1 |\
 wndr3700v4 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8f4bb40..1315859 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -538,6 +538,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+   *Onion Omega)
+   name=onion-omega
+   ;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ade47fb..f5f4adb 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -305,6 +305,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   onion-omega | \
oolite | \
smart-300 | \
tl-mr10u | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 05c98eb..8167134 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -82,6 +82,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
 CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
new file mode 100644
index 000..c739840
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
@@ -0,0 +1,84 @@
+/*
+ *  Onion Omega board support
+ *
+ *  Copyright (C) 2015 Boken Lin b...@onion.io
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define OMEGA_GPIO_LED_SYSTEM  27
+#define OMEGA_GPIO_BTN_RESET   11
+
+#define OMEGA_GPIO_USB_POWER   8
+
+#define OMEGA_KEYS_POLL_INTERVAL   20  /* msecs */
+#define OMEGA_KEYS_DEBOUNCE_INTERVAL   (3 * OMEGA_KEYS_POLL_INTERVAL)
+
+static const char *omega_part_probes[] = {
+   tp-link,
+   NULL,
+};
+
+static struct flash_platform_data omega_flash_data = {
+   .part_probes= omega_part_probes,
+};
+
+static struct gpio_led omega_leds_gpio[] __initdata

[OpenWrt-Devel] [PATCH]v2: CC : ar71xx: Backport Support for the Bitmain Antminer S3

2015-07-22 Thread L. D. Pinney
Backport of r46236 to CC : add support for the Bitmain Antminer S3

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
V1 is missing mach-antminer-s3.c
V2 includes this file.

 target/linux/ar71xx/base-files/etc/diag.sh   |  3 ++-
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds  |  6 +
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network   |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh   |  2 ++
 target/linux/ar71xx/config-3.18  |  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c | 98 
++
 target/linux/ar71xx/generic/profiles/antminer.mk | 11 ++
 target/linux/ar71xx/image/Makefile   | 10 -
 tools/firmware-utils/src/mktplinkfw.c|  1 +

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 4bdb53d..843e709 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,7 +12,8 @@ get_status_led() {
all0305)
status_led=eap7660d:green:ds4
;;
-   antminer-s1)
+   antminer-s1|\
+   antminer-s3)
status_led=bitmain:green:system
;;
ap132)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 19814f4..5126497 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -36,6 +36,12 @@ antminer-s1)
ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
;;
 
+antminer-s3)
+   ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
+   ucidef_set_led_default sys SYS bitmain:green:sys 0
+   ucidef_set_led_default lan LAN bitmain:yellow:lan 0
+   ;;
+
 ap113)
ucidef_set_led_usbdev usb USB ap113:green:usb 1-1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 4fe951e..ea5ba91 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -344,6 +344,7 @@ wp543)
;;
 
 antminer-s1 |\
+antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan eth1
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8f4bb40..1aa90fe 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -110,6 +110,9 @@ tplink_board_detect() {
04440001*)
model=BITMAIN ANTMINER S1
;;
+   04440003*)
+   model=BITMAIN ANTMINER S3
+   ;;
12*)
model=MERCURY MAC1200R
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ade47fb..da4c9fa 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -299,6 +299,8 @@ platform_check_image() {
return 1
;;
 
+   antminer-s1 | \
+   antminer-s3 | \
archer-c5 | \
archer-c7 | \
el-m150 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 05c98eb..b051c90 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -41,6 +41,7 @@ CONFIG_ATH79_MACH_AP96=y
 CONFIG_ATH79_MACH_ARCHER_C7=y
 CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_ANTMINER_S1=y
+CONFIG_ATH79_MACH_ANTMINER_S3=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
new file mode 100644
index 000..010c461
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
@@ -0,0 +1,98 @@
+/*
+ *   Bitmain Antminer S3 board support
+ *
+ *  Copyright (C) 2015 L. D. Pinney ldpin...@gmail.com
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+
+#include common.h
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-wmac.h
+#include machtypes.h
+#include dev-usb.h
+
+#define ANTMINER_S3_GPIO_LED_WLAN  0
+#define ANTMINER_S3_GPIO_LED_SYSTEM

[OpenWrt-Devel] [PATCHv3] ar71xx: add support for Onion Omega

2015-07-20 Thread L. D. Pinney
This patch adds support for the Onion Omega.

https://onion.io/omega

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: Boken Lin b...@onion.io
Tested-by: Jacky Huang huangfangch...@163.com
---
v2 @ kernel 3.18
v3 bumps the kernel to 4.1

 target/linux/ar71xx/base-files/etc/diag.sh|  3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network|  4 
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|  1 +
 target/linux/ar71xx/config-4.1|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c  | 84 
+
 target/linux/ar71xx/generic/profiles/onion.mk | 16 
++
 target/linux/ar71xx/image/Makefile|  9 

 target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch | 24 
+++--
 tools/firmware-utils/src/mktplinkfw.c |  6 
++
 10 files changed, 145 insertions(+), 6 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 12c31c4..97ba1d8 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -173,6 +173,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+   onion-omega)
+   status_led=onion:amber:system
+   ;;
pb44)
status_led=pb44:amber:jump1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index e7dc538..c010d3f 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -277,6 +277,10 @@ mynet-n750)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+onion-omega)
+   ucidef_set_interface_lan wlan0
+   ;;
+
 dhp-1565-a1 |\
 dir-835-a1 |\
 wndr3700v4 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9edd0cd..91e1629 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -556,6 +556,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+   *Onion Omega)
+   name=onion-omega
+   ;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 98e607c..f5d67ef 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -312,6 +312,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   onion-omega | \
oolite | \
smart-300 | \
tl-mr10u | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 23ba27d..2982196 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -90,6 +90,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
 CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
new file mode 100644
index 000..c739840
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
@@ -0,0 +1,84 @@
+/*
+ *  Onion Omega board support
+ *
+ *  Copyright (C) 2015 Boken Lin b...@onion.io
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define OMEGA_GPIO_LED_SYSTEM  27
+#define OMEGA_GPIO_BTN_RESET   11
+
+#define OMEGA_GPIO_USB_POWER   8
+
+#define OMEGA_KEYS_POLL_INTERVAL   20  /* msecs */
+#define OMEGA_KEYS_DEBOUNCE_INTERVAL   (3 * OMEGA_KEYS_POLL_INTERVAL)
+
+static const char *omega_part_probes[] = {
+   tp-link,
+   NULL,
+};
+
+static struct flash_platform_data omega_flash_data = {
+   .part_probes= omega_part_probes,
+};
+
+static struct gpio_led omega_leds_gpio[] __initdata = {
+   {
+   .name   = onion:amber:system,
+   .gpio   = OMEGA_GPIO_LED_SYSTEM

[OpenWrt-Devel] [PATCH] ar71xx: add support for Onion Omega

2015-07-19 Thread L. D. Pinney
This patch adds support for the Onion Omega.

https://onion.io/omega

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: Boken Lin b...@onion.io
Tested-by: Jacky Huang huangfangch...@163.com
---

 target/linux/ar71xx/base-files/etc/diag.sh |  3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network |  4 

 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ar71xx/config-3.18|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c   | 85 

 target/linux/ar71xx/generic/profiles/onion.mk  | 16 
++
 target/linux/ar71xx/image/Makefile |  9 

 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 24 
+++--
 tools/firmware-utils/src/mktplinkfw.c  |  6 
++
 10 files changed, 146 insertions(+), 6 deletions(-)
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index f3bd142..aa23400 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -173,6 +173,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+   onion-omega)
+   status_led=onion:amber:system
+   ;;
pb44)
status_led=pb44:amber:jump1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 9a0d0a3..9ab782e 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -277,6 +277,10 @@ mynet-n750)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+onion-omega)
+   ucidef_set_interface_lan wlan0
+   ;;
+
 dhp-1565-a1 |\
 dir-835-a1 |\
 wndr3700v4 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9d3d2cb..2362c11 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -556,6 +556,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+   *Onion Omega)
+   name=onion-omega
+   ;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 41e344c..7ce2bce 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -313,6 +313,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   onion-omega | \
oolite | \
smart-300 | \
tl-mr10u | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 0de176e..d8adb44 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
 CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
new file mode 100644
index 000..c739840
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
@@ -0,0 +1,84 @@
+/*
+ *  Onion Omega board support
+ *
+ *  Copyright (C) 2015 Boken Lin b...@onion.io
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define OMEGA_GPIO_LED_SYSTEM  27
+#define OMEGA_GPIO_BTN_RESET   11
+
+#define OMEGA_GPIO_USB_POWER   8
+
+#define OMEGA_KEYS_POLL_INTERVAL   20  /* msecs */
+#define OMEGA_KEYS_DEBOUNCE_INTERVAL   (3 * OMEGA_KEYS_POLL_INTERVAL)
+
+static const char *omega_part_probes[] = {
+   tp-link,
+   NULL,
+};
+
+static struct flash_platform_data omega_flash_data = {
+   .part_probes= omega_part_probes,
+};
+
+static struct gpio_led omega_leds_gpio[] __initdata = {
+   {
+   .name   = onion:amber:system,
+   .gpio   = OMEGA_GPIO_LED_SYSTEM,
+   .active_low = 1

[OpenWrt-Devel] [PATCH,v2] ar71xx: add support for Onion Omega

2015-07-19 Thread L. D. Pinney
This patch adds support for the Onion Omega.

https://onion.io/omega

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: Boken Lin b...@onion.io
Tested-by: Jacky Huang huangfangch...@163.com
---
v1 had code for the dlan_pro* included in error.
v2 removes this code.

 target/linux/ar71xx/base-files/etc/diag.sh |  3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network |  4 

 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ar71xx/config-3.18|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c   | 84 

 target/linux/ar71xx/generic/profiles/onion.mk  | 16 
++
 target/linux/ar71xx/image/Makefile |  9 

 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 24 
+++--
 tools/firmware-utils/src/mktplinkfw.c  |  6 
++
 10 files changed, 145 insertions(+), 6 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index f3bd142..aa23400 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -173,6 +173,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+   onion-omega)
+   status_led=onion:amber:system
+   ;;
pb44)
status_led=pb44:amber:jump1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 9a0d0a3..9ab782e 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -277,6 +277,10 @@ mynet-n750)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+onion-omega)
+   ucidef_set_interface_lan wlan0
+   ;;
+
 dhp-1565-a1 |\
 dir-835-a1 |\
 wndr3700v4 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9d3d2cb..2362c11 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -556,6 +556,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+   *Onion Omega)
+   name=onion-omega
+   ;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 41e344c..7ce2bce 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -313,6 +313,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   onion-omega | \
oolite | \
smart-300 | \
tl-mr10u | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 0de176e..d8adb44 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
 CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
new file mode 100644
index 000..c739840
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c
@@ -0,0 +1,84 @@
+/*
+ *  Onion Omega board support
+ *
+ *  Copyright (C) 2015 Boken Lin b...@onion.io
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-usb.h
+#include dev-wmac.h
+#include machtypes.h
+
+#define OMEGA_GPIO_LED_SYSTEM  27
+#define OMEGA_GPIO_BTN_RESET   11
+
+#define OMEGA_GPIO_USB_POWER   8
+
+#define OMEGA_KEYS_POLL_INTERVAL   20  /* msecs */
+#define OMEGA_KEYS_DEBOUNCE_INTERVAL   (3 * OMEGA_KEYS_POLL_INTERVAL)
+
+static const char *omega_part_probes[] = {
+   tp-link,
+   NULL,
+};
+
+static struct flash_platform_data omega_flash_data = {
+   .part_probes= omega_part_probes,
+};
+
+static struct gpio_led omega_leds_gpio[] __initdata = {
+   {
+   .name   = onion:amber:system

[OpenWrt-Devel] [PATCH] CC: ar71xx: add support for Onion Omega

2015-07-19 Thread L. D. Pinney
This patch adds support for the Onion Omega.

https://onion.io/omega

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: Boken Lin b...@onion.io
Tested-by: Jacky Huang huangfangch...@163.com
---
 target/linux/ar71xx/base-files/etc/diag.sh |  3 +++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network |  4 

 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  3 +++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ar71xx/config-3.18|  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c   | 84 

 target/linux/ar71xx/generic/profiles/onion.mk  | 16 
++
 target/linux/ar71xx/image/Makefile |  9 

 target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch | 48 
+
 tools/firmware-utils/src/mktplinkfw.c  |  6 
++
 10 files changed, 161 insertions(+), 14 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 4bdb53d..6b885b2 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -159,6 +159,9 @@ get_status_led() {
om5p-an)
status_led=om5p:blue:power
;;
+   onion-omega)
+   status_led=onion:amber:system
+   ;;
pb44)
status_led=pb44:amber:jump1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 4fe951e..2a43c2c 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -274,6 +274,10 @@ mynet-n750)
[ -n $mac ]  ucidef_set_interface_macaddr wan $mac
;;
 
+onion-omega)
+   ucidef_set_interface_lan wlan0
+   ;;
+
 dhp-1565-a1 |\
 dir-835-a1 |\
 wndr3700v4 | \
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8f4bb40..1315859 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -538,6 +538,9 @@ ar71xx_board_detect() {
*OM5P AN)
name=om5p-an
;;
+   *Onion Omega)
+   name=onion-omega
+   ;;
*PB42)
name=pb42
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ade47fb..f5f4adb 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -305,6 +305,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   onion-omega | \
oolite | \
smart-300 | \
tl-mr10u | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 05c98eb..8167134 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -82,6 +82,7 @@ CONFIG_ATH79_MACH_NBG460N=y
 CONFIG_ATH79_MACH_NBG6716=y
 CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
 CONFIG_ATH79_MACH_PB44=y
 CONFIG_ATH79_MACH_PB92=y
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index a2a66b8..dc0b6db 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -329,6 +329,15 @@ define Device/mc-mac1200r
 endef
 TARGET_DEVICES += mc-mac1200r
 
+define Device/onion-omega
+$(Device/tplink-16mlzma)
+BOARDNAME := ONION-OMEGA
+DEVICE_PROFILE := OMEGA
+TPLINK_HWID := 0x0471
+CONSOLE := ttyATH0,115200
+endef
+TARGET_DEVICES += onion-omega
+
 define Device/tl-mr10u-v1
 $(Device/tplink-4mlzma)
 BOARDNAME := TL-MR10U
diff --git 
a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch 
b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
index d6b6aab..590bb2b 100644
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
@@ -1,6 +1,8 @@
 a/arch/mips/ath79/machtypes.h
-+++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,192 @@
+Index: linux-3.18.18/arch/mips/ath79/machtypes.h
+===
+--- linux-3.18.18.orig/arch/mips/ath79/machtypes.h
 linux-3.18.18/arch/mips/ath79/machtypes.h
+@@ -16,22 +16,193 @@
  
  enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
@@ -72,6 +74,7 @@
 +  ATH79_MACH_OM2Pv2

[OpenWrt-Devel] [PATCH] CC : ar71xx: Backport Support for the Bitmain Antminer S3

2015-07-18 Thread L. D. Pinney
Backport of r46236 to CC : add support for the Bitmain Antminer S3

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
 target/linux/ar71xx/base-files/etc/diag.sh 
   |  3 +-
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
   |  6 
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
   |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   
   |  3 ++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
   |  2 ++
 target/linux/ar71xx/config-3.18
   |  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c   
   | 98 
 target/linux/ar71xx/generic/profiles/antminer.mk   
   | 11 +++
 target/linux/ar71xx/image/Makefile 
   | 10 ++-
 
target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
 | 39 
 tools/firmware-utils/src/mktplinkfw.c  
   |  1 +
 11 files changed, 173 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 4bdb53d..843e709 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,7 +12,8 @@ get_status_led() {
all0305)
status_led=eap7660d:green:ds4
;;
-   antminer-s1)
+   antminer-s1|\
+   antminer-s3)
status_led=bitmain:green:system
;;
ap132)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 19814f4..5126497 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -36,6 +36,12 @@ antminer-s1)
ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
;;
 
+antminer-s3)
+   ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
+   ucidef_set_led_default sys SYS bitmain:green:sys 0
+   ucidef_set_led_default lan LAN bitmain:yellow:lan 0
+   ;;
+
 ap113)
ucidef_set_led_usbdev usb USB ap113:green:usb 1-1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 4fe951e..ea5ba91 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -344,6 +344,7 @@ wp543)
;;
 
 antminer-s1 |\
+antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan eth1
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8f4bb40..1aa90fe 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -110,6 +110,9 @@ tplink_board_detect() {
04440001*)
model=BITMAIN ANTMINER S1
;;
+   04440003*)
+   model=BITMAIN ANTMINER S3
+   ;;
12*)
model=MERCURY MAC1200R
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ade47fb..da4c9fa 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -299,6 +299,8 @@ platform_check_image() {
return 1
;;
 
+   antminer-s1 | \
+   antminer-s3 | \
archer-c5 | \
archer-c7 | \
el-m150 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 05c98eb..b051c90 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -41,6 +41,7 @@ CONFIG_ATH79_MACH_AP96=y
 CONFIG_ATH79_MACH_ARCHER_C7=y
 CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_ANTMINER_S1=y
+CONFIG_ATH79_MACH_ANTMINER_S3=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
diff --git a/target/linux/ar71xx/generic/profiles/antminer.mk 
b/target/linux/ar71xx/generic/profiles/antminer.mk
index 366982c..404133b 100644
--- a/target/linux/ar71xx/generic/profiles/antminer.mk
+++ b/target/linux/ar71xx/generic/profiles/antminer.mk
@@ -15,3 +15,14 @@ define Profile/ANTMINER_S1/Description
Package set optimized for the Bitmain Antminer S1.
 endef
 $(eval $(call Profile,ANTMINER_S1))
+
+define Profile/ANTMINER_S3
+   NAME:=Antminer S3
+   PACKAGES:=kmod-usb-core kmod-usb2 kmod-crypto-manager 
kmod-i2c-gpio-custom kmod-usb-hid
+endef
+
+
+define Profile/ANTMINER_S1/Description
+   Package set optimized for the Bitmain

[OpenWrt-Devel] [PATCH V5] linux:generic: mtd backport for Spansion S25FL164K

2015-07-01 Thread L. D. Pinney
Backport for the Spansion S25FL164K
It's a 8 MiB flash chip with 4 KiB erase sectors.

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 
target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-Spansion_S25FL164K
 | 12 
 
target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-Spansion_S25FL164K 
 | 12 
 
target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-Spansion_S25FL164K 
 | 12 
 3 files changed, 36 insertions(+)

diff --git 
a/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-Spansion_S25FL164K
 
b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-Spansion_S25FL164K
new file mode 100644
index 000..354bd78
--- /dev/null
+++ 
b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-Spansion_S25FL164K
@@ -0,0 +1,12 @@
+Index: linux-3.18.17/drivers/mtd/spi-nor/spi-nor.c
+===
+--- linux-3.18.17.orig/drivers/mtd/spi-nor/spi-nor.c
 linux-3.18.17/drivers/mtd/spi-nor/spi-nor.c
+@@ -570,6 +570,7 @@ static const struct spi_device_id spi_no
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+ 
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
diff --git 
a/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-Spansion_S25FL164K
 
b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-Spansion_S25FL164K
new file mode 100644
index 000..83e4303
--- /dev/null
+++ 
b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-Spansion_S25FL164K
@@ -0,0 +1,12 @@
+Index: linux-4.0.7/drivers/mtd/spi-nor/spi-nor.c
+===
+--- linux-4.0.7.orig/drivers/mtd/spi-nor/spi-nor.c
 linux-4.0.7/drivers/mtd/spi-nor/spi-nor.c
+@@ -602,6 +602,7 @@ static const struct spi_device_id spi_no
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
+   { s25fl132k,  INFO(0x014016,  0,  64 * 1024,  64, 0) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+ 
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
diff --git 
a/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-Spansion_S25FL164K
 
b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-Spansion_S25FL164K
new file mode 100644
index 000..d28fbc6
--- /dev/null
+++ 
b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-Spansion_S25FL164K
@@ -0,0 +1,12 @@
+Index: linux-4.1.1/drivers/mtd/spi-nor/spi-nor.c
+===
+--- linux-4.1.1.orig/drivers/mtd/spi-nor/spi-nor.c
 linux-4.1.1/drivers/mtd/spi-nor/spi-nor.c
+@@ -618,6 +618,7 @@ static const struct spi_device_id spi_no
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
+   { s25fl132k,  INFO(0x014016,  0,  64 * 1024,  64, 0) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+ 
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] linux:generic: mtd backport for Spansion S25FL164K

2015-06-29 Thread L. D. Pinney
The space was removed because git apply complainedI'll ignore the
complaint.
Please mark this one rejected...
I'll do better next time.
Thanks for your patience and guidance.

Larry

On Mon, Jun 29, 2015 at 2:16 AM, Rafał Miłecki zaj...@gmail.com wrote:

 On 29 June 2015 at 07:54, L. D. Pinney ldpin...@gmail.com wrote:
  Backport for the Spansion S25FL164K
  It's an 8 MiB flash with 4 KiB erase sectors.
 
  Signed-off-by: L. D. Pinney ldpin...@gmail.com

 It looks much better but this patch doesn't seem to be refreshed, see:

 Applying patch
 generic/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 patching file drivers/mtd/spi-nor/spi-nor.c
 Hunk #1 succeeded at 566 (offset -7 lines).

 Applying patch
 generic/472-mtd-m25p80-add-support-for-Winbond-W25X05-flash.patch
 patching file drivers/mtd/spi-nor/spi-nor.c
 Hunk #1 succeeded at 617 (offset 1 line).

 And there is some general problem with your patch, see below


  diff --git
 a/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
  new file mode 100644
  index 000..866567a
  --- /dev/null
  +++
 b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
  @@ -0,0 +1,10 @@
  +--- a/drivers/mtd/spi-nor/spi-nor.c
   b/drivers/mtd/spi-nor/spi-nor.c
  +@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
  +   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K)
 },
  +   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K)
 },
  +   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K)
 },
  ++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K)
 },
  +
  +   /* SST -- large erase sizes are overlays, sectors are 4K */
  +   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K |
 SST_WRITE) },

 A diff (patch) file should have space at the beginning for every
 unmodified (reference) file. The file you added doesn't have it. How
 did you prepare this file?

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH V3] linux:generic: mtd backport for Spansion S25FL164K

2015-06-29 Thread L. D. Pinney
Backport for the Spansion S25FL164K
It's an 8 MiB flash with 4 KiB erase sectors.

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 
target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 | 12 
 
target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
  | 12 
 
target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
  | 12 
 3 files changed, 36 insertions(+)

diff --git 
a/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 
b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 000..866567a
--- /dev/null
+++ 
b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
diff --git 
a/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 
b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 000..866567a
--- /dev/null
+++ 
b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
diff --git 
a/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 
b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 000..866567a
--- /dev/null
+++ 
b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] mtd: spi-nor: Add support for Spansion S25FL164K

2015-06-28 Thread L. D. Pinney
It's an 8 MiB flash with 4 KiB erase sectors.

Unfortunately this patch from Rafał Miłecki zajec5 at gmail.com hasn't been 
picked up.

Tested-by: L. D. Pinney ldpin...@gmail.com
---
 drivers/mtd/spi-nor/spi-nor.c | 1 +
 1 file changed, 1 insertion(+)
diff --git 
a/target/linux/generic/patches-3.18/475-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 
b/target/linux/generic/patches-3.18/475-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 000..6b185b9
--- /dev/null
+++ 
b/target/linux/generic/patches-3.18/475-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx:Add Support for the Bitmain Antminer S3

2015-06-28 Thread L. D. Pinney
This patch adds support for the Bitmain Antminer S3 Cryptocurrency Miner

http://wiki.openwrt.org/toh/bitmain/s3

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/ar71xx/base-files/etc/diag.sh 
   |  3 +-
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
   |  6 
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
   |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   
   |  3 ++
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
   |  2 ++
 target/linux/ar71xx/config-3.18
   |  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c   
   | 98 +
 target/linux/ar71xx/generic/profiles/antminer.mk   
   | 11 +++
 target/linux/ar71xx/image/Makefile 
   | 10 ++-
 
target/linux/ar71xx/patches-3.18/905-MIPS-ath79-bitmain-antminer-s3-support.patch
 | 39 
 tools/firmware-utils/src/mktplinkfw.c  
   |  1 +
 11 files changed, 173 insertions(+), 2 deletions(-)
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index c02efa8..eaf6261 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,7 +12,8 @@ get_status_led() {
all0305)
status_led=eap7660d:green:ds4
;;
-   antminer-s1)
+   antminer-s1|\
+   antminer-s3)
status_led=bitmain:green:system
;;
ap132)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 19814f4..5126497 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -36,6 +36,12 @@ antminer-s1)
ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
;;
 
+antminer-s3)
+   ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
+   ucidef_set_led_default sys SYS bitmain:green:sys 0
+   ucidef_set_led_default lan LAN bitmain:yellow:lan 0
+   ;;
+
 ap113)
ucidef_set_led_usbdev usb USB ap113:green:usb 1-1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2fab4c2..31de241 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -345,6 +345,7 @@ wp543)
;;
 
 antminer-s1 |\
+antminer-s3 |\
 dir-505-a1)
ucidef_set_interface_lan eth1
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 00e39ae..39e2abc 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -110,6 +110,9 @@ tplink_board_detect() {
04440001*)
model=BITMAIN ANTMINER S1
;;
+   04440003*)
+   model=BITMAIN ANTMINER S3
+   ;;
12*)
model=MERCURY MAC1200R
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 0f3ea9c..2696710 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -300,6 +300,8 @@ platform_check_image() {
return 1
;;
 
+   antminer-s1 | \
+   antminer-s3 | \
archer-c5 | \
archer-c7 | \
el-m150 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 17f33bd..415abea 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -41,6 +41,7 @@ CONFIG_ATH79_MACH_AP96=y
 CONFIG_ATH79_MACH_ARCHER_C7=y
 CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_ANTMINER_S1=y
+CONFIG_ATH79_MACH_ANTMINER_S3=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
new file mode 100644
index 000..010c461
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s3.c
@@ -0,0 +1,98 @@
+/*
+ *   Bitmain Antminer S3 board support
+ *
+ *  Copyright (C) 2015 L. D. Pinney ldpin...@gmail.com
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h

Re: [OpenWrt-Devel] [PATCH] mtd: spi-nor: Add support for Spansion S25FL164K

2015-06-28 Thread L. D. Pinney
OK Thanks

I'll try to fix it ... I need it for the Bitmain Antminer S3 :)

Larry

On Mon, Jun 29, 2015 at 12:04 AM, Rafał Miłecki zaj...@gmail.com wrote:

 On 29 June 2015 at 07:00, John Crispin blo...@openwrt.org wrote:
  On 29/06/2015 06:37, Rafał Miłecki wrote:
  On 29 June 2015 at 06:36, Rafał Miłecki zaj...@gmail.com wrote:
  On 29 June 2015 at 05:30, L. D. Pinney ldpin...@gmail.com wrote:
  It's an 8 MiB flash with 4 KiB erase sectors.
 
  Unfortunately this patch from Rafał Miłecki zajec5 at gmail.com
 hasn't been picked up.
 
  I don't pick/backport every (mtd) patch, so:
  1) Please drop your complainings from the commit message
  2) Backport this patch to 4.0 and 4.1 as well
  3) Rename it, see target/linux/generic/PATCHES
  4) Resend
 
  5) Sign it off
 
 
  6) send it upstream to minux-mtd

 It's a backport. It was already sent by me :) Queued for 4.2.

 --
 Rafał
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] linux:generic: mtd backport for Spansion S25FL164K

2015-06-28 Thread L. D. Pinney
Backport for the Spansion S25FL164K
It's an 8 MiB flash with 4 KiB erase sectors.

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 
target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 | 10 ++
 
target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
  | 10 ++
 
target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
  | 10 ++
 3 files changed, 30 insertions(+)

diff --git 
a/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 
b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 000..866567a
--- /dev/null
+++ 
b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
diff --git 
a/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 
b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 000..866567a
--- /dev/null
+++ 
b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
diff --git 
a/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
 
b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 000..866567a
--- /dev/null
+++ 
b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
 b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+   { s25fl008k,  INFO(0xef4014,  0,  64 * 1024,  16, SECT_4K) },
+   { s25fl016k,  INFO(0xef4015,  0,  64 * 1024,  32, SECT_4K) },
+   { s25fl064k,  INFO(0xef4017,  0,  64 * 1024, 128, SECT_4K) },
++  { s25fl164k,  INFO(0x014017,  0,  64 * 1024, 128, SECT_4K) },
+
+   /* SST -- large erase sizes are overlays, sectors are 4K */
+   { sst25vf040b, INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) 
},
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: Enable sysupgrade on the Bitmain Antminer S1

2015-06-19 Thread L. D. Pinney
This patch enables sysupgrade for the Bitmain Antminer S1

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 0f3ea9c..79e52fc 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -300,6 +300,7 @@ platform_check_image() {
return 1
;;
 
+   antminer-s1 | \
archer-c5 | \
archer-c7 | \
el-m150 | \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: Add Support for the Linksys RE6500

2015-06-07 Thread L. D. Pinney
This patch adds support for the Linksys RE6500 Range Extender

http://wiki.openwrt.org/toh/linksys/re6500

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   4 +++
 target/linux/ramips/base-files/etc/board.d/02_network  |   1 +
 target/linux/ramips/base-files/etc/diag.sh |   3 +++
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |   1 +
 target/linux/ramips/dts/RE6500.dts | 115 
+++
 target/linux/ramips/image/Makefile |   6 -
 target/linux/ramips/mt7621/profiles/linksys.mk |  16 
 8 files changed, 148 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index ad0062a..a36c91b 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -203,6 +203,10 @@ case $board in
wnce2001)
set_wifi_led netgear:green:wlan
;;
+   re6500)
+   ucidef_set_led_default power power linksys:white:power 1
+   ucidef_set_led_default wifi wifi linksys:orange:wifi 1
+   ;;
rt-n14u)
ucidef_set_led_default power power asus:blue:power 1
ucidef_set_led_netdev lan lan asus:blue:lan eth0.1
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 4982566..63f9d6f 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -103,6 +103,7 @@ ramips_setup_interfaces()
ucidef_add_switch_vlan switch0 2 0 9t
;;
 
+re6500 | \
asl26555)
ucidef_set_interface_lan eth0.1
ucidef_add_switch switch0 1 1
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index c5b2921..7876dd3 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -126,6 +126,9 @@ get_status_led() {
px4885)
status_led=7links:orange:wifi
;;
+   re6500)
+   status_led=linksys:orange:wifi
+   ;;
rt-n15)
status_led=rt-n15:blue:power
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 0cb02c7..315bba2 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -205,6 +205,9 @@ ramips_board_detect() {
*Linksys E1700)
name=e1700
;;
+   *Linksys RE6500)
+   name=re6500
+   ;;
*Planex MZK-750DHP)
name=mzk-750dhp
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 99cabbd..959fac9 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -78,6 +78,7 @@ platform_check_image() {
olinuxino-rt5350f-evb | \
psr-680w | \
px4885 | \
+   re6500 | \
rp-n53 | \
rt-g32-b1 | \
rt-n10-plus | \
diff --git a/target/linux/ramips/dts/RE6500.dts 
b/target/linux/ramips/dts/RE6500.dts
new file mode 100644
index 000..0c33994
--- /dev/null
+++ b/target/linux/ramips/dts/RE6500.dts
@@ -0,0 +1,115 @@
+/dts-v1/;
+
+/include/ mt7621.dtsi
+
+/ {
+   compatible = mediatek,mt7621-eval-board, mediatek,mt7621-soc;
+   model = Linksys RE6500;
+
+   memory@0 {
+   device_type = memory;
+   reg = 0x0 0x800;
+   };
+
+   chosen {
+   bootargs = console=ttyS0,57600;
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = mx25l6405d;
+   reg = 0 0;
+   linux,modalias = m25p80, en25q64;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1

[OpenWrt-Devel] [PATCH] ramips: Add support for the D-Link DCS-930 B1

2015-06-05 Thread L. D. Pinney
http://wiki.openwrt.org/toh/d-link/dcs-930l

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/ramips/base-files/etc/board.d/01_leds |  4 
 target/linux/ramips/base-files/etc/board.d/02_network  |  1 +
 target/linux/ramips/base-files/etc/diag.sh |  3 +++
 target/linux/ramips/base-files/lib/ramips.sh   |  3 +++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |  1 +
 target/linux/ramips/image/Makefile |  2 ++
 target/linux/ramips/rt305x/profiles/dlink.mk   | 13 +
 7 files changed, 27 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index ad0062a..64c2c2f 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -85,6 +85,10 @@ case $board in
ucidef_set_led_default power POWER d105:red:power 1
set_usb_led d105:green:usb
;;
+   dcs-930l-b1)
+   ucidef_set_led_default power POWER d-link:red:power 1
+   ucidef_set_led_netdev wifi WiFi d-link:blue:wps
+   ;;
dir-300-b1|\
dir-600-b1|\
dir-600-b2|\
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 4982566..55af58f 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -53,6 +53,7 @@ ramips_setup_interfaces()
all5003 | \
broadway | \
dcs-930| \
+   dcs-930l-b1| \
ht-tm02| \
ncs601w | \
wnce2001)
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index c5b2921..f62005e 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -48,6 +48,9 @@ get_status_led() {
dcs-930 | dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-610-a1 | 
dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1| dir-300-b7| dir-320-b1)
status_led=d-link:green:status
;;
+   dcs-930l-b1)
+   status_led=d-link:red:power
+   ;;
dir-645)
status_led=d-link:green:wps
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 0cb02c7..912512b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -106,6 +106,9 @@ ramips_board_detect() {
*DCS-930)
name=dcs-930
;;
+   *DCS-930L B1)
+   name=dcs-930l-b1
+   ;;
*DIR-300 B1)
name=dir-300-b1
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 99cabbd..41e8ef0 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -37,6 +37,7 @@ platform_check_image() {
d105 | \
dap-1350 | \
dcs-930 | \
+   dcs-930l-b1 | \
dir-300-b1 | \
dir-300-b7 | \
dir-320-b1 | \
diff --git a/target/linux/ramips/dts/DCS-930L-B1.dts 
b/target/linux/ramips/dts/DCS-930L-B1.dts
new file mode 100644
index 000..f73a997
--- /dev/null
+++ b/target/linux/ramips/dts/DCS-930L-B1.dts
@@ -0,0 +1,103 @@
+/dts-v1/;
+
+/include/ rt5350.dtsi
+
+/ {
+   compatible =  DCS-930L-B1, ralink,rt5350-soc;
+   model = D-Link DCS-930L B1;
+
+   palmbus@1000 {
+   spi@b00 {
+   status = okay;
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = mx25l3205d;
+   reg = 0 0;
+   linux,modalias = m25p80, s25fl064k;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = factory;
+   reg = 0x4 0x1;
+   read-only;
+   };
+
+   partition@5

[OpenWrt-Devel] [PATCH] ar71xx: Add Support for the Bitmain Antminer S1

2015-05-24 Thread L. D. Pinney
This patch adds support for the Bitmain Antminer S1 Cryptocurrency Miner

http://wiki.openwrt.org/toh/bitmain/s1

Signed-off-by: L. D. Pinney ldpin...@gmail.com
Acked-by: James Hilliard james.hillia...@gmail.com
---

 target/linux/ar71xx/base-files/etc/diag.sh 
   |  3 ++
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
   |  5 
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
   |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   
   |  3 ++
 target/linux/ar71xx/config-3.18
   |  1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c   
   | 98 +
 target/linux/ar71xx/generic/profiles/antminer.mk   
   | 17 +++
 target/linux/ar71xx/image/Makefile 
   | 10 ++-
 
target/linux/ar71xx/patches-3.18/904-MIPS-ath79-bitmain-antminer-s1-support.patch
 | 39 
 tools/firmware-utils/src/mktplinkfw.c  
   |  6 
 10 files changed, 182 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 0553251..f6e4a87 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -12,6 +12,9 @@ get_status_led() {
all0305)
status_led=eap7660d:green:ds4
;;
+   antminer-s1)
+   status_led=bitmain:green:system
+   ;;
ap132)
status_led=ap132:green:status
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 41b..19814f4 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -31,6 +31,11 @@ all0315n)
ucidef_set_led_rssi rssihigh RSSIHIGH all0315n:green:rssihigh 
wlan0 70 100 -69 8
;;
 
+antminer-s1)
+   ucidef_set_led_default sys SYS bitmain:green:sys 0
+   ucidef_set_led_wlan wlan WLAN bitmain:green:wlan phy0tpt
+   ;;
+
 ap113)
ucidef_set_led_usbdev usb USB ap113:green:usb 1-1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index f5c6865..9fdaca0 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -343,6 +343,7 @@ wp543)
ucidef_set_interface_lan eth0
;;
 
+antminer-s1 |\
 dir-505-a1)
ucidef_set_interface_lan eth1
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index d5dd561..06c6e53 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -107,6 +107,9 @@ tplink_board_detect() {
015300*)
model=EasyLink EL-MINI
;;
+   04440001*)
+   model=BITMAIN ANTMINER S1
+   ;;
12*)
model=MERCURY MAC1200R
;;
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 543b77e..1960060 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -40,6 +40,7 @@ CONFIG_ATH79_MACH_AP83=y
 CONFIG_ATH79_MACH_AP96=y
 CONFIG_ATH79_MACH_ARCHER_C7=y
 CONFIG_ATH79_MACH_AW_NR580=y
+CONFIG_ATH79_MACH_ANTMINER_S1=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_CAP4200AG=y
 CONFIG_ATH79_MACH_CARAMBOLA2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
new file mode 100644
index 000..27ed760
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-antminer-s1.c
@@ -0,0 +1,98 @@
+/*
+ *   Bitmain Antminer S1 board support
+ *
+ *  Copyright (C) 2015 L. D. Pinney ldpin...@gmail.com
+ *
+ *  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
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+
+#include common.h
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-wmac.h
+#include machtypes.h
+#include dev-usb.h
+
+#define ANTMINER_S1_GPIO_BTN_RESET 11
+
+#define ANTMINER_S1_GPIO_LED_SYSTEM23
+#define ANTMINER_S1_GPIO_LED_WLAN  0
+#define ANTMINER_S1_GPIO_USB_POWER 8
+
+#define ANTMINER_S1_KEYSPOLL_INTERVAL  20  /* msecs

[OpenWrt-Devel] [PATCH] kirkwood: add support for the Seagate GoflexHome

2015-05-08 Thread L. D. Pinney
Add Support for the Seagate GoflexHome 
http://wiki.openwrt.org/toh/seagate/goflexhome

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---

 target/linux/kirkwood/base-files/etc/diag.sh |   1 +
 target/linux/kirkwood/base-files/etc/uci-defaults/01_leds|   1 +
 target/linux/kirkwood/base-files/etc/uci-defaults/02_network |   1 +
 target/linux/kirkwood/base-files/lib/kirkwood.sh |   4 +++
 target/linux/kirkwood/image/Makefile |   3 ++
 target/linux/kirkwood/patches-3.18/180-goflexhome.patch  | 140 
+
 target/linux/kirkwood/profiles/110-nas.mk|  17 ++
 7 files changed, 167 insertions(+)

diff --git a/target/linux/kirkwood/base-files/etc/diag.sh 
b/target/linux/kirkwood/base-files/etc/diag.sh
index 29445d5..716e6c9 100755
--- a/target/linux/kirkwood/base-files/etc/diag.sh
+++ b/target/linux/kirkwood/base-files/etc/diag.sh
@@ -7,6 +7,7 @@
 get_status_led() {
case $(kirkwood_board_name) in
dockstar|\
+   goflexhome|\
goflexnet|\
pogo_e02)
status_led=status:orange:fault
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds 
b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
index 0f7a906..a8ba1f6 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
@@ -20,6 +20,7 @@ case $board in
ucidef_set_led_default health health ea4500:white:health 1
ucidef_set_led_default pulse pulse ea4500:white:pulse 1
;;
+goflexhome | \
 goflexnet)
 ucidef_set_led_default health health status:green:health 1
 ucidef_set_led_default fault fault status:orange:fault 0
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network 
b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index 4ed0ab4..f0628cd 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -29,6 +29,7 @@ ucidef_set_interface_loopback
 
 case $board in
 dockstar|\
+goflexhome|\
 goflexnet|\
 iconnect|\
 ib62x0|\
diff --git a/target/linux/kirkwood/base-files/lib/kirkwood.sh 
b/target/linux/kirkwood/base-files/lib/kirkwood.sh
index c088581..aa16daf 100755
--- a/target/linux/kirkwood/base-files/lib/kirkwood.sh
+++ b/target/linux/kirkwood/base-files/lib/kirkwood.sh
@@ -17,6 +17,10 @@ kirkwood_board_detect() {
name=dockstar
;;
 
+Seagate GoFlex Home)
+name=goflexhome
+;;
+
Seagate GoFlex Net)
name=goflexnet
;;
diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index ede7cb3..8413a41 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -123,6 +123,9 @@ Image/InstallKernel/Template/EA3500=$(call 
Image/InstallKernel/Template,ea3500)
 Image/BuildKernel/Template/EA4500=$(call Image/BuildKernel/Template,ea4500)
 Image/InstallKernel/Template/EA4500=$(call Image/InstallKernel/Template,ea4500)
 
+Image/BuildKernel/Template/GOFLEXHOME=$(call 
Image/BuildKernel/Template,goflexhome)
+Image/InstallKernel/Template/GOFLEXHOME=$(call 
Image/InstallKernel/Template,goflexhome)
+
 Image/BuildKernel/Template/GOFLEXNET=$(call 
Image/BuildKernel/Template,goflexnet)
 Image/InstallKernel/Template/GOFLEXNET=$(call 
Image/InstallKernel/Template,goflexnet)
 
diff --git a/target/linux/kirkwood/patches-3.18/180-goflexhome.patch 
b/target/linux/kirkwood/patches-3.18/180-goflexhome.patch
new file mode 100644
index 000..b224f53
--- /dev/null
+++ b/target/linux/kirkwood/patches-3.18/180-goflexhome.patch
@@ -0,0 +1,140 @@
+--- a/arch/arm/boot/dts/Makefile
 b/arch/arm/boot/dts/Makefile
+@@ -125,6 +126,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-
+   kirkwood-ds411slim.dtb \
+   kirkwood-ea3500.dtb \
+   kirkwood-ea4500.dtb \
++  kirkwood-goflexhome.dtb \
+   kirkwood-goflexnet.dtb \
+   kirkwood-guruplug-server-plus.dtb \
+   kirkwood-ib62x0.dtb \
+--- /dev/null
 b/arch/arm/boot/dts/kirkwood-goflexhome.dts
+@@ -0,0 +1,127 @@
++/dts-v1/;
++
++#include kirkwood.dtsi
++#include kirkwood-6281.dtsi
++
++/ {
++  model = Seagate GoFlex Home;
++  compatible = seagate,goflexhome, marvell,kirkwood-88f6281, 
marvell,kirkwood;
++
++  memory {
++  device_type = memory;
++  reg = 0x 0x800;
++  };
++
++  chosen {
++  bootargs = console=ttyS0,115200n8 earlyprintk root=/dev/sda1 
rootdelay=10;
++  stdout-path = uart0;
++  };
++
++  ocp@f100 {
++  pinctrl: pin-controller@1 {
++  pmx_usb_power_enable: pmx-usb-power-enable {
++  marvell,pins = mpp29

[OpenWrt-Devel] [PATCH][v2] BB : kirkwood : Seagate GoFlex Net Board Name and cleanup

2015-02-16 Thread L. D. Pinney
Add the diag.sh file for failsafe LEDs. 
Cleanup uci-defaults for network and LEDs.
Sets the fault LEDs in uci-defaults to off
Add the GoFlex Net Board Name 
Remove kmod-rtc-marvell from default packages, as the GoFlex net does not have 
a Real Time Clock.

V2 adds led name in uci-defaults missing from V1.

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/kirkwood/base-files/etc/diag.sh | 37 
+
 target/linux/kirkwood/base-files/etc/uci-defaults/01_leds| 17 
++---
 target/linux/kirkwood/base-files/etc/uci-defaults/02_network | 13 -
 target/linux/kirkwood/base-files/lib/kirkwood.sh |  4 
 target/linux/kirkwood/profiles/110-nas.mk|  2 +-
 5 files changed, 56 insertions(+), 17 deletions(-)

diff --git a/target/linux/kirkwood/base-files/etc/diag.sh 
b/target/linux/kirkwood/base-files/etc/diag.sh
new file mode 100755
index 000..29445d5
--- /dev/null
+++ b/target/linux/kirkwood/base-files/etc/diag.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright (C) 2014 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/kirkwood.sh
+
+get_status_led() {
+   case $(kirkwood_board_name) in
+   dockstar|\
+   goflexnet|\
+   pogo_e02)
+   status_led=status:orange:fault
+   ;;
+   ea4500)
+   status_led=ea4500:white:health
+   ;;
+   esac
+}
+
+set_state() {
+   get_status_led
+
+   case $1 in
+   preinit)
+   status_led_blink_preinit
+   ;;
+   failsafe)
+   status_led_blink_failsafe
+   ;;
+   preinit_regular)
+   status_led_blink_preinit_regular
+   ;;
+   done)
+   status_led_on
+   ;;
+   esac
+}
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds 
b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
index 07c1a0e..9961913 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
@@ -9,22 +9,25 @@
 board=$(kirkwood_board_name)
 
 case $board in
-dockstar)
-   ucidef_set_led_default health status:green:health 1
-   ucidef_set_led_default fault status:orange:fault 1
+dockstar|\
+pogo_e02)
+   ucidef_set_led_default health health status:green:health 1
+   ucidef_set_led_default fault fault status:orange:fault 0
;;
 ea4500)
ucidef_set_led_default health ea4500:white:health 1
ucidef_set_led_default pulse ea4500:white:pulse 1
;;
+goflexnet)
+   ucidef_set_led_default health health status:green:health 1
+   ucidef_set_led_default fault fault status:orange:fault 0
+   ucidef_set_led_default status status status:white:misc 0
+   ;;
 ib62x0)
ucidef_set_led_default health ib62x0:green:os 1
ucidef_set_led_default fault ib62x0:red:os 1
;;
-pogo_e02)
-   ucidef_set_led_default health status:green:health 1
-   ucidef_set_led_default fault status:orange:fault 1
-   ;;
+
 *)
;;
 esac
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network 
b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index e795d65..cff31a8 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -28,15 +28,10 @@ board=$(kirkwood_board_name)
 ucidef_set_interface_loopback
 
 case $board in
-dockstar)
-   set_lan_dhcp eth0
-   ;;
-iconnect)
-   set_lan_dhcp eth0
-   ;;
-ib62x0)
-   set_lan_dhcp eth0
-   ;;
+dockstar|\
+goflexnet|\
+iconnect|\
+ib62x0|\
 pogo_e02)
set_lan_dhcp eth0
;;
diff --git a/target/linux/kirkwood/base-files/lib/kirkwood.sh 
b/target/linux/kirkwood/base-files/lib/kirkwood.sh
index ba080f4..e2a84a7 100755
--- a/target/linux/kirkwood/base-files/lib/kirkwood.sh
+++ b/target/linux/kirkwood/base-files/lib/kirkwood.sh
@@ -17,6 +17,10 @@ kirkwood_board_detect() {
name=dockstar
;;
 
+   Seagate GoFlex Net)
+   name=goflexnet
+   ;;
+
Iomega Iconnect)
name=iconnect
;;
diff --git a/target/linux/kirkwood/profiles/110-nas.mk 
b/target/linux/kirkwood/profiles/110-nas.mk
index eff5952..daad904 100644
--- a/target/linux/kirkwood/profiles/110-nas.mk
+++ b/target/linux/kirkwood/profiles/110-nas.mk
@@ -25,7 +25,7 @@ define Profile/GOFLEXNET
   NAME:=Seagate GoFlexNet
   PACKAGES:= \
kmod-ata-core kmod-ata-marvell-sata \
-   kmod-rtc-marvell kmod-usb2 kmod-usb-storage \
+   kmod-usb2 kmod-usb-storage \
uboot-envtools
 endef
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] BB : kirkwood : Seagate GoFlex Net Board Name and cleanup

2015-02-13 Thread L. D. Pinney
Add the diag.sh file for failsafe LEDs. 
Cleanup uci-defaults for network and LEDs.
Sets the fault LEDs in uci-defaults to off
Add the GoFlex Net Board Name 
Remove kmod-rtc-marvell from default packages, as the GoFlex net does not have 
a Real Time Clock.

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/kirkwood/base-files/etc/diag.sh | 37 
+
 target/linux/kirkwood/base-files/etc/uci-defaults/01_leds| 17 
++---
 target/linux/kirkwood/base-files/etc/uci-defaults/02_network | 13 -
 target/linux/kirkwood/base-files/lib/kirkwood.sh |  4 
 target/linux/kirkwood/profiles/110-nas.mk|  2 +-
 5 files changed, 56 insertions(+), 17 deletions(-)

diff --git a/target/linux/kirkwood/base-files/etc/diag.sh 
b/target/linux/kirkwood/base-files/etc/diag.sh
new file mode 100755
index 000..29445d5
--- /dev/null
+++ b/target/linux/kirkwood/base-files/etc/diag.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright (C) 2014 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/kirkwood.sh
+
+get_status_led() {
+   case $(kirkwood_board_name) in
+   dockstar|\
+   goflexnet|\
+   pogo_e02)
+   status_led=status:orange:fault
+   ;;
+   ea4500)
+   status_led=ea4500:white:health
+   ;;
+   esac
+}
+
+set_state() {
+   get_status_led
+
+   case $1 in
+   preinit)
+   status_led_blink_preinit
+   ;;
+   failsafe)
+   status_led_blink_failsafe
+   ;;
+   preinit_regular)
+   status_led_blink_preinit_regular
+   ;;
+   done)
+   status_led_on
+   ;;
+   esac
+}
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds 
b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
index 07c1a0e..9961913 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
@@ -9,22 +9,25 @@
 board=$(kirkwood_board_name)
 
 case $board in
-dockstar)
-   ucidef_set_led_default health status:green:health 1
-   ucidef_set_led_default fault status:orange:fault 1
+dockstar|\
+pogo_e02)
+   ucidef_set_led_default health health status:green:health 1
+   ucidef_set_led_default fault fault status:orange:fault 0
;;
 ea4500)
ucidef_set_led_default health ea4500:white:health 1
ucidef_set_led_default pulse ea4500:white:pulse 1
;;
+goflexnet)
+   ucidef_set_led_default health status:green:health 1
+   ucidef_set_led_default fault status:orange:fault 0
+   ucidef_set_led_default status status:white:misc 0
+   ;;
 ib62x0)
ucidef_set_led_default health ib62x0:green:os 1
ucidef_set_led_default fault ib62x0:red:os 1
;;
-pogo_e02)
-   ucidef_set_led_default health status:green:health 1
-   ucidef_set_led_default fault status:orange:fault 1
-   ;;
+
 *)
;;
 esac
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network 
b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index e795d65..cff31a8 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -28,15 +28,10 @@ board=$(kirkwood_board_name)
 ucidef_set_interface_loopback
 
 case $board in
-dockstar)
-   set_lan_dhcp eth0
-   ;;
-iconnect)
-   set_lan_dhcp eth0
-   ;;
-ib62x0)
-   set_lan_dhcp eth0
-   ;;
+dockstar|\
+goflexnet|\
+iconnect|\
+ib62x0|\
 pogo_e02)
set_lan_dhcp eth0
;;
diff --git a/target/linux/kirkwood/base-files/lib/kirkwood.sh 
b/target/linux/kirkwood/base-files/lib/kirkwood.sh
index ba080f4..e2a84a7 100755
--- a/target/linux/kirkwood/base-files/lib/kirkwood.sh
+++ b/target/linux/kirkwood/base-files/lib/kirkwood.sh
@@ -17,6 +17,10 @@ kirkwood_board_detect() {
name=dockstar
;;
 
+   Seagate GoFlex Net)
+   name=goflexnet
+   ;;
+
Iomega Iconnect)
name=iconnect
;;
diff --git a/target/linux/kirkwood/profiles/110-nas.mk 
b/target/linux/kirkwood/profiles/110-nas.mk
index eff5952..daad904 100644
--- a/target/linux/kirkwood/profiles/110-nas.mk
+++ b/target/linux/kirkwood/profiles/110-nas.mk
@@ -25,7 +25,7 @@ define Profile/GOFLEXNET
   NAME:=Seagate GoFlexNet
   PACKAGES:= \
kmod-ata-core kmod-ata-marvell-sata \
-   kmod-rtc-marvell kmod-usb2 kmod-usb-storage \
+   kmod-usb2 kmod-usb-storage \
uboot-envtools
 endef
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] BB:ramips:Kingston MLW221 cleanup

2015-02-09 Thread L. D. Pinney
MLW221 dts use tabs NOT spaces.
Cleanup uci-defaults and diag.sh

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/ramips/base-files/etc/diag.sh |   4 +-
 target/linux/ramips/base-files/etc/uci-defaults/01_leds|   5 +-
 target/linux/ramips/base-files/etc/uci-defaults/02_network |   5 +-
 target/linux/ramips/dts/MLW221.dts | 226 
+-
 4 files changed, 116 insertions(+), 124 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index bd3779a..74b8867 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -73,9 +73,7 @@ get_status_led() {
m4)
status_led=m4:blue:status
;;
-   mlw221)
-   status_led=kingston:blue:status
-   ;;
+   mlw221|\
mlwg2)
status_led=kingston:blue:system
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index f5b5b01..5d6ed2b 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -113,10 +113,7 @@ case $board in
hw550-3g)
set_usb_led hw550-3g:green:usb
;;
-   mlw221)
-   set_wifi_led kingston:blue:wifi
-   ucidef_set_led_default system system kingston:blue:system 
1
-   ;;
+   mlw221|\
mlwg2)
set_wifi_led kingston:blue:wifi
ucidef_set_led_default system system kingston:blue:system 
1
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index 91bedcc..c3ea489 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -55,10 +55,7 @@ ramips_setup_interfaces()
 ucidef_set_interface_lan eth0.2
 ;;
 
-   mlwg2)
-ucidef_set_interface_lan eth0.1
-;;
-
+   mlwg2 | \
wl-330n | \
wmr300)
ucidef_set_interface_lan eth0.1
diff --git a/target/linux/ramips/dts/MLW221.dts 
b/target/linux/ramips/dts/MLW221.dts
index f220e97..83467dc 100644
--- a/target/linux/ramips/dts/MLW221.dts
+++ b/target/linux/ramips/dts/MLW221.dts
@@ -3,117 +3,117 @@
 /include/ mt7620n.dtsi
 
 / {
-   compatible = mlw221, ralink,mt7620n-soc;
-   model = Kingston MLW221;
-
-   palmbus@1000 {
-   gpio0: gpio@600 {
-   status = okay;
-   };
-
-   gpio2: gpio@660 {
-   status = okay;
-   };
-
-   gpio3: gpio@688 {
-   status = okay;
-   };
-
-   spi@b00 {
-   status = okay;
-
-   m25p80@0 {
-   #address-cells = 1;
-   #size-cells = 1;
-   compatible = s25fl129p1;
-   reg = 0 0;
-   linux,modalias = m25p80, s25fl129p1;
-   spi-max-frequency = 1000;
-
-   partition@0 {
-   label = u-boot;
-   reg = 0x0 0x3;
-   read-only;
-   };
-
-   partition@3 {
-   label = u-boot-env;
-   reg = 0x3 0x1;
-   read-only;
-   };
-
-   factory: partition@4 {
-   label = factory;
-   reg = 0x4 0x1;
-   read-only;
-   };
-
-   partition@5 {
-   label = firmware;
-   reg = 0x5 0xf6;
-   };
-
-   partition@fb {
-   label = user-config;
-   reg = 0xfb 0x5;
-
-   };
-   };
-   };
-   };
-
-   ehci@101c {
-   status = okay;
-   };
-
-   ohci@101c1000 {
-   status = okay;
-   };
-
-   ethernet@1010 {
-   mtd-mac-address = factory 0x4;
-   ralink,port-map = w;
-   };
-
-   wmac@1018

[OpenWrt-Devel] [PATCH] kirkwood: Seagate GoFlex Net

2015-02-08 Thread L. D. Pinney
Add GoFlex Net Board Name , set and cleanup network default and LEDs.
Remove kmod-rtc-marvell from default packages, as the GoFlex net does not have 
a RTC.

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/kirkwood/base-files/etc/diag.sh |  5 +
 target/linux/kirkwood/base-files/etc/uci-defaults/01_leds|  4 
 target/linux/kirkwood/base-files/etc/uci-defaults/02_network | 13 -
 target/linux/kirkwood/base-files/lib/kirkwood.sh |  4 
 target/linux/kirkwood/profiles/110-nas.mk|  2 +-
 5 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/target/linux/kirkwood/base-files/etc/diag.sh 
b/target/linux/kirkwood/base-files/etc/diag.sh
old mode 100644
new mode 100755
index b2bb583..29445d5
--- a/target/linux/kirkwood/base-files/etc/diag.sh
+++ b/target/linux/kirkwood/base-files/etc/diag.sh
@@ -6,6 +6,11 @@
 
 get_status_led() {
case $(kirkwood_board_name) in
+   dockstar|\
+   goflexnet|\
+   pogo_e02)
+   status_led=status:orange:fault
+   ;;
ea4500)
status_led=ea4500:white:health
;;
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds 
b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
index ba4d569..0f7a906 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
@@ -20,6 +20,10 @@ case $board in
ucidef_set_led_default health health ea4500:white:health 1
ucidef_set_led_default pulse pulse ea4500:white:pulse 1
;;
+goflexnet)
+ucidef_set_led_default health health status:green:health 1
+ucidef_set_led_default fault fault status:orange:fault 0
+   ;;
 ib62x0)
ucidef_set_led_default health health ib62x0:green:os 1
ucidef_set_led_default fault fault ib62x0:red:os 1
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network 
b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index 540c8c3..4ed0ab4 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -28,15 +28,10 @@ board=$(kirkwood_board_name)
 ucidef_set_interface_loopback
 
 case $board in
-dockstar)
-   set_lan_dhcp eth0
-   ;;
-iconnect)
-   set_lan_dhcp eth0
-   ;;
-ib62x0)
-   set_lan_dhcp eth0
-   ;;
+dockstar|\
+goflexnet|\
+iconnect|\
+ib62x0|\
 pogo_e02)
set_lan_dhcp eth0
;;
diff --git a/target/linux/kirkwood/base-files/lib/kirkwood.sh 
b/target/linux/kirkwood/base-files/lib/kirkwood.sh
index 962b09a..c088581 100755
--- a/target/linux/kirkwood/base-files/lib/kirkwood.sh
+++ b/target/linux/kirkwood/base-files/lib/kirkwood.sh
@@ -17,6 +17,10 @@ kirkwood_board_detect() {
name=dockstar
;;
 
+   Seagate GoFlex Net)
+   name=goflexnet
+   ;;
+
Iomega Iconnect)
name=iconnect
;;
diff --git a/target/linux/kirkwood/profiles/110-nas.mk 
b/target/linux/kirkwood/profiles/110-nas.mk
index 7b8d7bc..66a4f6c 100644
--- a/target/linux/kirkwood/profiles/110-nas.mk
+++ b/target/linux/kirkwood/profiles/110-nas.mk
@@ -25,7 +25,7 @@ define Profile/GOFLEXNET
   NAME:=Seagate GoFlexNet
   PACKAGES:= \
kmod-ata-core kmod-ata-marvell-sata \
-   kmod-rtc-marvell kmod-usb2 kmod-usb-storage \
+   kmod-usb2 kmod-usb-storage \
uboot-envtools
 endef
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips : Kingston MLW221 and MLWG2 cleanup

2015-02-06 Thread L. D. Pinney
MLW221 dts use tabs NOT spaces.
MLWG2 dts typo and 1 tab not spaces
01_leds and diag.sh cleanup

Signed-off-by: L. D. Pinney ldpin...@gmail.com
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   5 +-
 target/linux/ramips/base-files/etc/diag.sh |   4 +-
 target/linux/ramips/dts/MLW221.dts | 226 
++---
 target/linux/ramips/dts/MLWG2.dts  |   4 +-
 4 files changed, 117 insertions(+), 122 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index cfc782e..bfe1c0c 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -127,10 +127,7 @@ case $board in
hw550-3g)
set_usb_led hw550-3g:green:usb
;;
-   mlw221)
-   set_wifi_led kingston:blue:wifi
-   ucidef_set_led_default system system kingston:blue:system 
1
-   ;;
+   mlw221|\
mlwg2)
set_wifi_led kingston:blue:wifi
ucidef_set_led_default system system kingston:blue:system 
1
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index e9b3997..d31fbe4 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -88,9 +88,7 @@ get_status_led() {
m4)
status_led=m4:blue:status
;;
-   mlw221)
-   status_led=kingston:blue:status
-   ;;
+   mlw221|\
mlwg2)
status_led=kingston:blue:system
;;
diff --git a/target/linux/ramips/dts/MLW221.dts 
b/target/linux/ramips/dts/MLW221.dts
index f220e97..83467dc 100644
--- a/target/linux/ramips/dts/MLW221.dts
+++ b/target/linux/ramips/dts/MLW221.dts
@@ -3,117 +3,117 @@
 /include/ mt7620n.dtsi
 
 / {
-   compatible = mlw221, ralink,mt7620n-soc;
-   model = Kingston MLW221;
-
-   palmbus@1000 {
-   gpio0: gpio@600 {
-   status = okay;
-   };
-
-   gpio2: gpio@660 {
-   status = okay;
-   };
-
-   gpio3: gpio@688 {
-   status = okay;
-   };
-
-   spi@b00 {
-   status = okay;
-
-   m25p80@0 {
-   #address-cells = 1;
-   #size-cells = 1;
-   compatible = s25fl129p1;
-   reg = 0 0;
-   linux,modalias = m25p80, s25fl129p1;
-   spi-max-frequency = 1000;
-
-   partition@0 {
-   label = u-boot;
-   reg = 0x0 0x3;
-   read-only;
-   };
-
-   partition@3 {
-   label = u-boot-env;
-   reg = 0x3 0x1;
-   read-only;
-   };
-
-   factory: partition@4 {
-   label = factory;
-   reg = 0x4 0x1;
-   read-only;
-   };
-
-   partition@5 {
-   label = firmware;
-   reg = 0x5 0xf6;
-   };
-
-   partition@fb {
-   label = user-config;
-   reg = 0xfb 0x5;
-
-   };
-   };
-   };
-   };
-
-   ehci@101c {
-   status = okay;
-   };
-
-   ohci@101c1000 {
-   status = okay;
-   };
-
-   ethernet@1010 {
-   mtd-mac-address = factory 0x4;
-   ralink,port-map = w;
-   };
-
-   wmac@1018 {
-   ralink,mtd-eeprom = factory 0;
-   };
-
-   pinctrl {
-   state_default: pinctrl0 {
-   default {
-   ralink,group = i2c, ephy, wled;
-   ralink,function = gpio;
-   };
-   };
-   };
-
-   gpio-leds {
-   compatible = gpio-leds;
-   system {
-   label = kingston:blue:system;
-   gpios = gpio2 3 1;
-   };
-   wifi {
-   label = kingston:blue:wifi

[OpenWrt-Devel] [PATCH] BB : ramips : Backport for Kingston MLWG2

2015-01-25 Thread L. D. Pinney
Backport r43990 to Barrier Breaker.

http://wiki.openwrt.org/toh/kingston/mlwg2

Signed-off-by: L. D. Pinney ldpin...@gmail.com

 target/linux/ramips/base-files/etc/diag.sh |   3 +++
 target/linux/ramips/base-files/etc/uci-defaults/01_leds|   4 +++
 target/linux/ramips/base-files/etc/uci-defaults/02_network |   4 +++
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |   1 +
 target/linux/ramips/dts/MLWG2.dts  | 118 

 target/linux/ramips/image/Makefile |   2 ++
 7 files changed, 135 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 9ad7ccb..bd3779a 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -76,6 +76,9 @@ get_status_led() {
mlw221)
status_led=kingston:blue:status
;;
+   mlwg2)
+   status_led=kingston:blue:system
+   ;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 2f36bed..f5b5b01 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -117,6 +117,10 @@ case $board in
set_wifi_led kingston:blue:wifi
ucidef_set_led_default system system kingston:blue:system 
1
;;
+   mlwg2)
+   set_wifi_led kingston:blue:wifi
+   ucidef_set_led_default system system kingston:blue:system 
1
+   ;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usb
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index 6840fb6..91bedcc 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -55,6 +55,10 @@ ramips_setup_interfaces()
 ucidef_set_interface_lan eth0.2
 ;;
 
+   mlwg2)
+ucidef_set_interface_lan eth0.1
+;;
+
wl-330n | \
wmr300)
ucidef_set_interface_lan eth0.1
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index d7b5540..fd03423 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -163,6 +163,9 @@ ramips_board_detect() {
*Kingston MLW221)
name=mlw221
;;
+   *Kingston MLWG2)
+   name=mlwg2
+   ;;
*Planex MZK-750DHP)
name=mzk-750dhp
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 407c218..ba69a89 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -56,6 +56,7 @@ platform_check_image() {
m3 | \
m4 | \
mlw221 | \
+   mlwg2 | \
mofi3500-3gn | \
mpr-a1 | \
mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLWG2.dts 
b/target/linux/ramips/dts/MLWG2.dts
new file mode 100644
index 000..a2b0033
--- /dev/null
+++ b/target/linux/ramips/dts/MLWG2.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = mlwg2, ralink,mt7620n-soc;
+   model = Kingston MLWG2;
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = okay;
+   };
+
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = mx25l12805d;
+   reg = 0 0;
+   linux,modalias = m25p80;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1

[OpenWrt-Devel] [PATCH] [ramips] : add support for Kingston MLWG2

2015-01-11 Thread L. D. Pinney
This patch adds support for the Kingston Mobilelite Wireless G2 (MLWG2)

http://wiki.openwrt.org/toh/kingston/mlwg2

https://github.com/gmacario/kingston-mlwg2-hack/wiki/Testing-OpenWrt-on-MLWG2

Tested-by: Gianpaolo Macario gmaca...@gmail.com

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---

 target/linux/ramips/base-files/etc/board.d/01_leds |   4 +++
 target/linux/ramips/base-files/etc/board.d/02_network  |   3 ++
 target/linux/ramips/base-files/etc/diag.sh |   3 ++
 target/linux/ramips/base-files/lib/ramips.sh   |   3 ++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |   1 +
 target/linux/ramips/dts/MLWG2.dts  | 118 

 target/linux/ramips/image/Makefile |   2 ++
 7 files changed, 134 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 405a6c0..23e310e 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -130,6 +130,10 @@ case $board in
set_wifi_led kingston:blue:wifi
ucidef_set_led_default system system kingston:blue:system 
1
;;
+   mlwg2)
+   set_wifi_led kingston:blue:wifi
+   ucidef_set_led_default system system kingston:blue:system 
1
+   ;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usb
;;
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 a86466e..aad1197 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -61,6 +61,9 @@ ramips_setup_interfaces()
mlw221)
ucidef_set_interface_lan eth0.2
;;
+   mlwg2)
+   ucidef_set_interface_lan eth0.1
+   ;;
 
wizard8800 | \
wl-330n | \
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 103dfcd..65ef0db 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -88,6 +88,9 @@ get_status_led() {
mlw221)
status_led=kingston:blue:status
;;
+   mlwg2)
+   status_led=kingston:blue:system
+   ;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 540da33..379713b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -187,6 +187,9 @@ ramips_board_detect() {
*Kingston MLW221)
name=mlw221
;;
+   *Kingston MLWG2)
+   name=mlwg2
+   ;;
*Linksys E1700)
name=e1700
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 95cad63..b5eecfc 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -58,6 +58,7 @@ platform_check_image() {
m3 | \
m4 | \
mlw221 | \
+   mlwg2 | \
mofi3500-3gn | \
mpr-a1 | \
mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLWG2.dts 
b/target/linux/ramips/dts/MLWG2.dts
index e69de29..c7ce146 100644
--- a/target/linux/ramips/dts/MLWG2.dts
+++ b/target/linux/ramips/dts/MLWG2.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = mlwG2, ralink,mt7620n-soc;
+   model = Kingston MLWG2;
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = okay;
+   };
+
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = mx25l12805d;
+   reg = 0 0;
+   linux,modalias = m25p80;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env

[OpenWrt-Devel] [PATCH] [RESEND] ar71xx: Fix the sys LEDs on the EasyLink M150 and mini

2014-08-28 Thread L. D. Pinney
From: L. D. Pinney ldpin...@gmail.com

Sets the system LED on the EasyLink M150 and mini to lower-case easylink

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1864b11..faac4bd 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -70,7 +70,7 @@ get_status_led() {
;;
el-mini | \
el-m150)
-   status_led=EasyLink:green:system
+   status_led=easylink:green:system
;;
gl-inet)
status_led=gl-connect:green:lan
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
index 72a396d..b95d6c2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
@@ -44,7 +44,7 @@ static struct flash_platform_data EL_M150_flash_data = {
 
 static struct gpio_led EL_M150_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = easylink:green:system,
.gpio   = EL_M150_GPIO_LED_SYSTEM,
.active_low = 1,
},
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
index aaccb0d..9879b18 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
@@ -40,7 +40,7 @@ static struct flash_platform_data mini_flash_data = {
 
 static struct gpio_led mini_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = easylink:green:system,
.gpio   = MINI_GPIO_LED_SYSTEM,
.active_low = 1,
},
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] ar71xx : Fix the sys LEDs on the EasyLink M150 and mini

2014-08-25 Thread L. D. Pinney


From: L. D. Pinney ldpin...@gmail.com

Sets the system LED on the EasyLink M150 and mini to lower-case easylink

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1864b11..faac4bd 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -70,7 +70,7 @@ get_status_led() {
;;
el-mini | \
el-m150)
-   status_led=EasyLink:green:system
+   status_led=easylink:green:system
;;
gl-inet)
status_led=gl-connect:green:lan
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
index 72a396d..b95d6c2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
@@ -44,7 +44,7 @@ static struct flash_platform_data EL_M150_flash_data = {

 static struct gpio_led EL_M150_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = easylink:green:system,
.gpio   = EL_M150_GPIO_LED_SYSTEM,
.active_low = 1,
},
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
index aaccb0d..9879b18 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
@@ -40,7 +40,7 @@ static struct flash_platform_data mini_flash_data = {

 static struct gpio_led mini_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = easylink:green:system,
.gpio   = MINI_GPIO_LED_SYSTEM,
.active_low = 1,
},diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1864b11..faac4bd 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -70,7 +70,7 @@ get_status_led() {
;;
el-mini | \
el-m150)
-   status_led=EasyLink:green:system
+   status_led=easylink:green:system
;;
gl-inet)
status_led=gl-connect:green:lan
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
index 72a396d..b95d6c2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
@@ -44,7 +44,7 @@ static struct flash_platform_data EL_M150_flash_data = {
 
 static struct gpio_led EL_M150_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = easylink:green:system,
.gpio   = EL_M150_GPIO_LED_SYSTEM,
.active_low = 1,
},
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
index aaccb0d..9879b18 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
@@ -40,7 +40,7 @@ static struct flash_platform_data mini_flash_data = {
 
 static struct gpio_led mini_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = easylink:green:system,
.gpio   = MINI_GPIO_LED_SYSTEM,
.active_low = 1,
},
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx Fix the sys LEDs on the EasyLink M150 and mini

2014-08-20 Thread L. D. Pinney

From: L. D. Pinney ldpin...@gmail.com

This Patch sets the system LED on the EasyLink M150 and mini to EasyLink 

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
index 72a396d..6701d3e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
@@ -44,7 +44,7 @@ static struct flash_platform_data EL_M150_flash_data = {
 
 static struct gpio_led EL_M150_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = EasyLink:green:system,
.gpio   = EL_M150_GPIO_LED_SYSTEM,
.active_low = 1,
},
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
index aaccb0d..4af9abd 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
@@ -40,7 +40,7 @@ static struct flash_platform_data mini_flash_data = {
 
 static struct gpio_led mini_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = EasyLink:green:system,
.gpio   = MINI_GPIO_LED_SYSTEM,
.active_low = 1,
},diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
index 72a396d..6701d3e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
@@ -44,7 +44,7 @@ static struct flash_platform_data EL_M150_flash_data = {
 
 static struct gpio_led EL_M150_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = EasyLink:green:system,
.gpio   = EL_M150_GPIO_LED_SYSTEM,
.active_low = 1,
},
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
index aaccb0d..4af9abd 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-mini.c
@@ -40,7 +40,7 @@ static struct flash_platform_data mini_flash_data = {
 
 static struct gpio_led mini_leds_gpio[] __initdata = {
{
-   .name   = ELINK:green:system,
+   .name   = EasyLink:green:system,
.gpio   = MINI_GPIO_LED_SYSTEM,
.active_low = 1,
},
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: Fix LEDs on the Kingston MLW221

2014-07-30 Thread L. D. Pinney

From: L. D. Pinney ldpin...@gmail.com

LED Fix up for the Kingston Mobilelite Wireless (MLW-221)

http://wiki.openwrt.org/toh/kingston/mlw221
  
Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 0887606..4cd5acf 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -74,7 +74,7 @@ get_status_led() {
status_led=m4:blue:status
;;
mlw221)
-   status_led=kingston:green:status
+   status_led=kingston:blue:system
;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 359281e..e92a12e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -115,6 +115,7 @@ case $board in
;;
mlw221)
set_wifi_led kingston:blue:wifi
+   ucidef_set_led_default system system kingston:blue:system 
1
;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usbdiff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 0887606..4cd5acf 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -74,7 +74,7 @@ get_status_led() {
 		status_led=m4:blue:status
 		;;
 	mlw221)
-		status_led=kingston:green:status
+		status_led=kingston:blue:system
 		;;
 	mofi3500-3gn)
 		status_led=mofi3500-3gn:green:status
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 359281e..e92a12e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -115,6 +115,7 @@ case $board in
 		;;
 	mlw221)
 		set_wifi_led kingston:blue:wifi
+		ucidef_set_led_default system system kingston:blue:system 1
 		;;
 	mofi3500-3gn)
 		set_usb_led mofi3500-3gn:green:usb
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] ramips: add support for Kingston MLW221

2014-07-26 Thread L. D. Pinney


From: L. D. Pinney ldpin...@gmail.com

This patch adds support for the Kingston Mobilelite Wireless (MLW-221)

v3 refeshes the patch @r41835

http://wiki.openwrt.org/toh/kingston/mlw221

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 908547e..0887606 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -73,6 +73,9 @@ get_status_led() {
m4)
status_led=m4:blue:status
;;
+   mlw221)
+   status_led=kingston:green:status
+   ;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 19ec4f5..359281e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -113,6 +113,9 @@ case $board in
hw550-3g)
set_usb_led hw550-3g:green:usb
;;
+   mlw221)
+   set_wifi_led kingston:blue:wifi
+   ;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usb
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index b372893..9de29ac 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -51,6 +51,10 @@ ramips_setup_interfaces()
;;

3g-6200nl | \
+   mlw221)
+ucidef_set_interface_lan eth0.2
+;;
+
wl-330n | \
wmr300)
ucidef_set_interface_lan eth0.1
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index f9ab1e3..71cdd47 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -157,6 +157,9 @@ ramips_board_detect() {
*HAME MPR-A2)
name=mpr-a2
;;
+   *Kingston MLW221)
+   name=mlw221
+   ;;
*Planex MZK-750DHP)
name=mzk-750dhp
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 8ada58b..5dec7f8 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -54,6 +54,7 @@ platform_check_image() {
ip2202 | \
m3 | \
m4 | \
+   mlw221 | \
mofi3500-3gn | \
mpr-a1 | \
mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLW221.dts 
b/target/linux/ramips/dts/MLW221.dts
index e69de29..f220e97 100644
--- a/target/linux/ramips/dts/MLW221.dts
+++ b/target/linux/ramips/dts/MLW221.dts
@@ -0,0 +1,119 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = mlw221, ralink,mt7620n-soc;
+   model = Kingston MLW221;
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = okay;
+   };
+
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = s25fl129p1;
+   reg = 0 0;
+   linux,modalias = m25p80, s25fl129p1;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = factory;
+   reg = 0x4 0x1;
+   read-only;
+   };
+
+   partition@5 {
+   label = firmware;
+   reg = 0x5 0xf6;
+   };
+
+   partition@fb

Re: [OpenWrt-Devel] [PATCH v2] ramips: Fix WR8305RT USB LED

2014-07-24 Thread L. D. Pinney
Working unit ... I changed u-boot (now @115200 baud) and the ZBT-WA05 build
@r41824

Thanks
Larry


On Thu, Jul 24, 2014 at 4:10 AM, Roman Yeryomin leroi.li...@gmail.com
wrote:

 On 24 July 2014 11:51, John Crispin j...@phrozen.org wrote:
 
 
  On 23/07/2014 17:33, Roman Yeryomin wrote:
  On 23 July 2014 18:26, L. D. Pinney ldpin...@gmail.com wrote:
  The WR8305RT may be the same as the WA05I have asked ZBT.
 
  One difference is uboot is set for 57600 on my WR8305RT...meaning
  I'll need to patch the WA05 dts to use it. Or update the
  uboot? I have also asked ZBT for the current uboot...
 
  That's very strange because they have asked me to rename WA05 into
  WR8305RT. They didn't say the baudrate is different. Can you take a
  photo of pcb?
 
  Regards, Roman
 
  Hi,
 
  whoever decided to put 57600 as the default baud rate in the RTSDK
  should be tar'ed and feathered.
 

 I will make a patch to synchronize these two boards.
 ZBT confirmed they use 115200 as default baudrate and the guy who made
 the initial patch for WR8305RT owns an early sample.

 Regards,
 Roman
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ramips: Fix WR8305RT USB LED

2014-07-23 Thread L. D. Pinney
The WR8305RT may be the same as the WA05I have asked ZBT.

One difference is uboot is set for 57600 on my WR8305RT...meaning I'll need
to patch the WA05 dts to use it.
Or update the uboot?
I have also asked ZBT for the current uboot...

Thanks

Larry


On Wed, Jul 23, 2014 at 10:17 AM, Roman Yeryomin leroi.li...@gmail.com
wrote:

 On 23 July 2014 04:27, L. D. Pinney ldpin...@gmail.com wrote:
  From: L. D. Pinney ldpin...@gmail.com
 
  This patch sets the USB LED to 0 (no device = no light) v2 also sets
 the
  name from lan to usb
 
 

 This router uses the same board as WA05 without any changes. The
 difference is the case only.
 I believe this can be discarded and comment can be put into WA05 dts file.

 Regards,
 Roman

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] ramips: add support for Kingston MLW221

2014-07-22 Thread L. D. Pinney


From: L. D. Pinney ldpin...@gmail.com

This patch adds support for the Kingston Mobilelite Wireless (MLW-221)

http://wiki.openwrt.org/toh/kingston/mlw221

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh

index 908547e..0887606 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -73,6 +73,9 @@ get_status_led() {
m4)
status_led=m4:blue:status
;;
+   mlw221)
+   status_led=kingston:green:status
+   ;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds

index 19ec4f5..359281e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -113,6 +113,9 @@ case $board in
hw550-3g)
set_usb_led hw550-3g:green:usb
;;
+   mlw221)
+   set_wifi_led kingston:blue:wifi
+   ;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usb
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network

index b54b555..a1aff2e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -50,6 +50,10 @@ ramips_setup_interfaces()
;;

3g-6200nl | \
+   mlw221)
+   ucidef_set_interfaces_lan_wan eth0.1 eth0.2
+   ;;
+
wl-330n | \
wmr300)
ucidef_set_interface_lan eth0.1
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh

index f9ab1e3..63f3c54 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -157,6 +157,9 @@ ramips_board_detect() {
*HAME MPR-A2)
name=mpr-a2
;;
+   *Kingston MLW221
+   name=mlw221
+   ;;
*Planex MZK-750DHP)
name=mzk-750dhp
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh

index 8ada58b..5dec7f8 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -54,6 +54,7 @@ platform_check_image() {
ip2202 | \
m3 | \
m4 | \
+   mlw221 | \
mofi3500-3gn | \
mpr-a1 | \
mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLW221.dts 
b/target/linux/ramips/dts/MLW221.dts

index e69de29..e364d4e 100644
--- a/target/linux/ramips/dts/MLW221.dts
+++ b/target/linux/ramips/dts/MLW221.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = mlw221, ralink,mt7620n-soc;
+   model = Kingston MLW221;
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = okay;
+   };
+
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = s25fl129p1;
+   reg = 0 0;
+   linux,modalias = m25p80, s25fl129p1;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot;
+   reg = 0x0 0x3;
+   read-only;
+   };
+
+   partition@3 {
+   label = u-boot-env;
+   reg = 0x3 0x1;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = factory;
+   reg = 0x4 0x1;
+   read-only;
+   };
+
+   partition@5 {
+   label = firmware;
+   reg = 0x5 0xf6;
+   };
+
+   partition@fb

[OpenWrt-Devel] [PATCH] ramips: Fix WR8305RT USB LED

2014-07-22 Thread L. D. Pinney


From: L. D. Pinney ldpin...@gmail.com

This patch sets the USB LED to 0 (no device = no light)

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ramips/dts/WR8305RT.dts 
b/target/linux/ramips/dts/WR8305RT.dts

index c28e422..3d2d815 100644
--- a/target/linux/ramips/dts/WR8305RT.dts
+++ b/target/linux/ramips/dts/WR8305RT.dts
@@ -89,7 +89,7 @@
};
lan {
label = wr8305rt:usb;
-   gpios = gpio1 15 1;
+   gpios = gpio1 15 0;
};
wifi {
label = wr8305rt:wifi;diff --git a/target/linux/ramips/dts/WR8305RT.dts 
b/target/linux/ramips/dts/WR8305RT.dts
index c28e422..3d2d815 100644
--- a/target/linux/ramips/dts/WR8305RT.dts
+++ b/target/linux/ramips/dts/WR8305RT.dts
@@ -89,7 +89,7 @@
};
lan {
label = wr8305rt:usb;
-   gpios = gpio1 15 1;
+   gpios = gpio1 15 0;
};
wifi {
label = wr8305rt:wifi;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] ramips: Fix WR8305RT USB LED

2014-07-22 Thread L. D. Pinney

From: L. D. Pinney ldpin...@gmail.com

This patch sets the USB LED to 0 (no device = no light) v2 also sets the 
name from lan to usb


Signed-off-by: L. D. Pinney ldpin...@gmail.com

---

diff --git a/target/linux/ramips/dts/WR8305RT.dts 
b/target/linux/ramips/dts/WR8305RT.dts

index c28e422..812c6e5 100644
--- a/target/linux/ramips/dts/WR8305RT.dts
+++ b/target/linux/ramips/dts/WR8305RT.dts
@@ -87,9 +87,9 @@
label = wr8305rt:sys;
gpios = gpio1 14 1;
};
-   lan {
+   usb {
label = wr8305rt:usb;
-   gpios = gpio1 15 1;
+   gpios = gpio1 15 0;
};
wifi {
label = wr8305rt:wifi;
diff --git a/target/linux/ramips/dts/WR8305RT.dts 
b/target/linux/ramips/dts/WR8305RT.dts
index c28e422..812c6e5 100644
--- a/target/linux/ramips/dts/WR8305RT.dts
+++ b/target/linux/ramips/dts/WR8305RT.dts
@@ -87,9 +87,9 @@
label = wr8305rt:sys;
gpios = gpio1 14 1;
};
-   lan {
+   usb {
label = wr8305rt:usb;
-   gpios = gpio1 15 1;
+   gpios = gpio1 15 0;
};
wifi {
label = wr8305rt:wifi;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: add support for Kingston MLW221

2014-07-18 Thread L. D. Pinney


From: L. D. Pinney ldpin...@gmail.com

This patch adds support for the Kingston Mobilelite Wireless (MLW-221)

http://wiki.openwrt.org/toh/kingston/mlw221

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh

index 908547e..0887606 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -73,6 +73,9 @@ get_status_led() {
m4)
status_led=m4:blue:status
;;
+   mlw221)
+   status_led=kingston:green:status
+   ;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds

index 19ec4f5..359281e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -113,6 +113,9 @@ case $board in
hw550-3g)
set_usb_led hw550-3g:green:usb
;;
+   mlw221)
+   set_wifi_led kingston:blue:wifi
+   ;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usb
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network

index b54b555..c6a4609 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -49,6 +49,10 @@ ramips_setup_interfaces()
ucidef_set_interface_lan eth0
;;

+   mlw221)
+   ucidef_set_interfaces_lan_wan eth0.1 eth0.2
+   ;;
+
3g-6200nl | \
wl-330n | \
wmr300)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh

index f9ab1e3..71cdd47 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -157,6 +157,9 @@ ramips_board_detect() {
*HAME MPR-A2)
name=mpr-a2
;;
+   *Kingston MLW221)
+   name=mlw221
+   ;;
*Planex MZK-750DHP)
name=mzk-750dhp
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh

index 8ada58b..5dec7f8 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -54,6 +54,7 @@ platform_check_image() {
ip2202 | \
m3 | \
m4 | \
+   mlw221 | \
mofi3500-3gn | \
mpr-a1 | \
mpr-a2 | \
diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile

index c7225a6..3a0fe9d 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -737,6 +737,7 @@ endif
 # MT7620N Profiles
 #

+Image/Build/Profile/MLW221=$(call 
BuildFirmware/Default16M/$(1),$(1),mlw221,MLW221)
 Image/Build/Profile/WMR300=$(call 
BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300)
 Image/Build/Profile/RT-N14U=$(call 
BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U)
 Image/Build/Profile/WR8305RT=$(call 
BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT)
@@ -745,6 +746,7 @@ Image/Build/Profile/ZBT-WA05=$(call 
BuildFirmware/Default8M/$(1),$(1),zbt-wa05,Z

 ifeq ($(SUBTARGET),mt7620n)
 define Image/Build/Profile/Default
+   $(call Image/Build/Profile/MLW221,$(1))
$(call Image/Build/Profile/WMR300,$(1))
$(call Image/Build/Profile/RT-N14U,$(1))
$(call Image/Build/Profile/WR8305RT,$(1))
diff --git a/target/linux/ramips/dts/MLW221.dts 
b/target/linux/ramips/dts/MLW221.dts

index e69de29..d91781b 100644
--- a/target/linux/ramips/dts/MLW221.dts
+++ b/target/linux/ramips/dts/MLW221.dts
@@ -0,0 +1,115 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = mlw221, ralink,mt7620n-soc;
+   model = Kingston MLW221;
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = okay;
+   };
+
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = s25fl129p1;
+   reg = 0 0;
+   linux,modalias = m25p80, s25fl129p1;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot

[OpenWrt-Devel] [PATCH] ramips: add support for Kingston MLW221 [resend]

2014-07-18 Thread L. D. Pinney


From: L. D. Pinney ldpin...@gmail.com

This patch adds support for the Kingston Mobilelite Wireless (MLW-221)

http://wiki.openwrt.org/toh/kingston/mlw221

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh

index 908547e..0887606 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -73,6 +73,9 @@ get_status_led() {
m4)
status_led=m4:blue:status
;;
+   mlw221)
+   status_led=kingston:green:status
+   ;;
mofi3500-3gn)
status_led=mofi3500-3gn:green:status
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds

index 19ec4f5..359281e 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -113,6 +113,9 @@ case $board in
hw550-3g)
set_usb_led hw550-3g:green:usb
;;
+   mlw221)
+   set_wifi_led kingston:blue:wifi
+   ;;
mofi3500-3gn)
set_usb_led mofi3500-3gn:green:usb
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network

index b54b555..c6a4609 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -49,6 +49,10 @@ ramips_setup_interfaces()
ucidef_set_interface_lan eth0
;;

+   mlw221)
+   ucidef_set_interfaces_lan_wan eth0.1 eth0.2
+   ;;
+
3g-6200nl | \
wl-330n | \
wmr300)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh

index f9ab1e3..71cdd47 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -157,6 +157,9 @@ ramips_board_detect() {
*HAME MPR-A2)
name=mpr-a2
;;
+   *Kingston MLW221)
+   name=mlw221
+   ;;
*Planex MZK-750DHP)
name=mzk-750dhp
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh

index 8ada58b..5dec7f8 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -54,6 +54,7 @@ platform_check_image() {
ip2202 | \
m3 | \
m4 | \
+   mlw221 | \
mofi3500-3gn | \
mpr-a1 | \
mpr-a2 | \
diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile

index c7225a6..3a0fe9d 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -737,6 +737,7 @@ endif
 # MT7620N Profiles
 #

+Image/Build/Profile/MLW221=$(call 
BuildFirmware/Default16M/$(1),$(1),mlw221,MLW221)
 Image/Build/Profile/WMR300=$(call 
BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300)
 Image/Build/Profile/RT-N14U=$(call 
BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U)
 Image/Build/Profile/WR8305RT=$(call 
BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT)
@@ -745,6 +746,7 @@ Image/Build/Profile/ZBT-WA05=$(call 
BuildFirmware/Default8M/$(1),$(1),zbt-wa05,Z

 ifeq ($(SUBTARGET),mt7620n)
 define Image/Build/Profile/Default
+   $(call Image/Build/Profile/MLW221,$(1))
$(call Image/Build/Profile/WMR300,$(1))
$(call Image/Build/Profile/RT-N14U,$(1))
$(call Image/Build/Profile/WR8305RT,$(1))
diff --git a/target/linux/ramips/dts/MLW221.dts 
b/target/linux/ramips/dts/MLW221.dts

new file mode 100644
index 000..15fde52 100644
--- a/target/linux/ramips/dts/MLW221.dts
+++ b/target/linux/ramips/dts/MLW221.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ mt7620n.dtsi
+
+/ {
+   compatible = mlw221, ralink,mt7620n-soc;
+   model = Kingston MLW221;
+
+   palmbus@1000 {
+   gpio0: gpio@600 {
+   status = okay;
+   };
+
+   gpio2: gpio@660 {
+   status = okay;
+   };
+
+   gpio3: gpio@688 {
+   status = okay;
+   };
+
+   spi@b00 {
+   status = okay;
+
+   m25p80@0 {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = s25fl129p1;
+   reg = 0 0;
+   linux,modalias = m25p80, s25fl129p1;
+   spi-max-frequency = 1000;
+
+   partition@0 {
+   label = u-boot

[OpenWrt-Devel] [PATCH v2][ar71xx] add support for EasyLink M150 and M-mini‏

2014-06-19 Thread L. D. Pinney



From : L. D. Pinney ldpin...@gmail.com


v2 refreshes the patch on trunk@41281

This patch adds support for the EasyLink EL-M150 and M-mini

http://wiki.openwrt.org/toh/easylink/el-m150
http://wiki.openwrt.org/toh/easylink/el-m-mini

Signed-off-by: L. D. Pinney ldpin...@gmail.com

---
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh

index d5063de..687cddf 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -65,6 +65,10 @@ get_status_led() {
eap7660d)
status_led=eap7660d:green:ds4
;;
+   el-mini | \
+   el-m150)
+   status_led=EasyLink:green:system
+   ;;
hiwifi-hc6361)
status_led=hiwifi:blue:system
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network

index a2b2762..99c0268 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -152,6 +152,16 @@ ap113)
ucidef_add_switch_vlan switch0 2 0t 2
;;

+el-m150)
+   ucidef_set_interfaces_lan_wan eth1 eth0
+   ucidef_add_switch switch0 1 1
+   ucidef_add_switch_vlan switch0 1 0 1 3
+   ;;
+
+el-mini)
+   ucidef_set_interface_lan eth0
+   ;;
+
 tl-wdr4300|\
 tl-wr1041n-v2)
ucidef_set_interfaces_lan_wan eth0.1 eth0.2
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 093fbc1..31ce548 100755
--- 
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

@@ -81,6 +81,7 @@ ew-dorin-router)
migrate_switch_name eth0 switch0
;;

+el-m150|\
 rb-450)
migrate_switch_name eth1 switch0
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh

index 6dd5e62..4656ac2 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -91,6 +91,12 @@ tplink_board_detect() {
hwver=v${hwver#0}

case $hwid in
+   015000*)
+   model=EasyLink EL-M150
+   ;;
+   015300*)
+   model=EasyLink EL-MINI
+   ;;
3C0001*)
model=OOLITE
;;
@@ -307,6 +313,12 @@ ar71xx_board_detect() {
*EAP7660D)
name=eap7660d
;;
+   *EL-M150)
+   name=el-m150
+   ;;
+   *EL-MINI)
+   name=el-mini
+   ;;
*JA76PF)
name=ja76pf
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh

index 57803cc..6aaddf2 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -224,6 +224,8 @@ platform_check_image() {
;;

archer-c7 | \
+   el-m150 | \
+   el-mini | \
oolite | \
tl-mr10u | \
tl-mr11u | \
diff --git a/target/linux/ar71xx/config-3.10 
b/target/linux/ar71xx/config-3.10

index c294cd8..1346c3f 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -47,6 +47,8 @@ CONFIG_ATH79_MACH_DIR_825_B1=y
 CONFIG_ATH79_MACH_DIR_825_C1=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP7660D=y
+CONFIG_ATH79_MACH_EL_M150=y
+CONFIG_ATH79_MACH_EL_MINI=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
 CONFIG_ATH79_MACH_HORNET_UB=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c

index e69de29..72a396d 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-el-m150.c
@@ -0,0 +1,112 @@
+/*
+ *  Easy-Link EL-M150 board support
+ *
+ *  Copyright (C) 2012 huangfc huangfangch...@163.com
+ *  Copyright (C) 2012 HYS 550663...@qq.com
+ *
+ *  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

+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+#include asm/mach-ath79/ar71xx_regs.h
+
+#include common.h
+#include dev-eth.h
+#include dev-gpio-buttons.h
+#include dev-leds-gpio.h
+#include dev-m25p80.h
+#include dev-wmac.h
+#include machtypes.h
+#include dev-usb.h
+
+#define EL_M150_GPIO_BTN6  6
+#define EL_M150_GPIO_BTN7  7
+#define EL_M150_GPIO_BTN_RESET 11
+
+#define EL_M150_GPIO_LED_SYSTEM27
+#define EL_M150_GPIO_USB_POWER

[OpenWrt-Devel] [PATCH] [ar71xx] add support for EasyLink M150 and M-mini‏

2014-06-08 Thread L. D. Pinney


From: L. D. Pinney ldpin...@gmail.com

This patch adds support for the EasyLink EL-M150 and M-mini

http://wiki.openwrt.org/toh/easylink/el-m150
http://wiki.openwrt.org/toh/easylink/el-m-mini

Signed-off-by: L. D. Pinney ldpin...@gmail.com



Index: target/linux/ar71xx/config-3.10
===
--- target/linux/ar71xx/config-3.10 (revision 41055)
+++ target/linux/ar71xx/config-3.10 (working copy)
@@ -47,6 +47,8 @@
 CONFIG_ATH79_MACH_DIR_825_C1=y
 CONFIG_ATH79_MACH_DRAGINO2=y
 CONFIG_ATH79_MACH_EAP7660D=y
+CONFIG_ATH79_MACH_EL_M150=y
+CONFIG_ATH79_MACH_EL_MINI=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
 CONFIG_ATH79_MACH_HORNET_UB=y
Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
===
--- target/linux/ar71xx/base-files/lib/ar71xx.sh(revision 41055)
+++ target/linux/ar71xx/base-files/lib/ar71xx.sh(working copy)
@@ -91,6 +91,12 @@
hwver=v${hwver#0}

case $hwid in
+   015000*)
+   model=ELink EL-M150
+   ;;
+   015300*)
+   model=ELink EL-MINI
+   ;;
3C0001*)
model=OOLITE
;;
@@ -307,6 +313,12 @@
*EAP7660D)
name=eap7660d
;;
+   *EL-M150)
+   name=el-m150
+   ;;
+   *EL-MINI)
+   name=el-mini
+   ;;
*JA76PF)
name=ja76pf
;;
Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===
--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh	(revision 
41055)
+++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh	(working 
copy)

@@ -224,6 +224,8 @@
;;

archer-c7 | \
+   el-m150 | \
+   el-mini | \
oolite | \
tl-mr10u | \
tl-mr11u | \
Index: 
target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration

===
--- 
target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration 
(revision 41055)
+++ 
target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration 
(working copy)

@@ -81,6 +81,7 @@
migrate_switch_name eth0 switch0
;;

+el-m150|\
 rb-450)
migrate_switch_name eth1 switch0
;;
Index: target/linux/ar71xx/base-files/etc/uci-defaults/02_network
===
--- target/linux/ar71xx/base-files/etc/uci-defaults/02_network	(revision 
41055)
+++ target/linux/ar71xx/base-files/etc/uci-defaults/02_network	(working 
copy)

@@ -148,6 +148,13 @@
ucidef_add_switch_vlan switch0 2 0t 2
;;

+el-mini|\
+el-m150)
+   ucidef_set_interfaces_lan_wan eth1 eth0
+   ucidef_add_switch switch0 1 1
+   ucidef_add_switch_vlan switch0 1 0 1 3
+   ;;
+
 tl-wdr4300|\
 tl-wr1041n-v2)
ucidef_set_interfaces_lan_wan eth0.1 eth0.2

Index: target/linux/ar71xx/base-files/etc/diag.sh
===
--- target/linux/ar71xx/base-files/etc/diag.sh  (revision 41055)
+++ target/linux/ar71xx/base-files/etc/diag.sh  (working copy)
@@ -65,6 +65,10 @@
eap7660d)
status_led=eap7660d:green:ds4
;;
+   el-mini | \
+   el-m150)
+   status_led=elink:green:system
+   ;;
hiwifi-hc6361)
status_led=hiwifi:blue:system
;;
Index: target/linux/ar71xx/image/Makefile
===
--- target/linux/ar71xx/image/Makefile  (revision 41055)
+++ target/linux/ar71xx/image/Makefile  (working copy)
@@ -1132,6 +1132,8 @@

 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,ARCHERC7V1,archer-c7-v1,ARCHER-C7,ttyS0,115200,0x7501,1,8Mlzma))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,ARCHERC7V2,archer-c7-v2,ARCHER-C7,ttyS0,115200,0xc702,1,16Mlzma))
+$(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,ELM150,el-m150,EL-M150,ttyATH0,115200,0x01500101,1,8Mlzma))
+$(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,ELMINI,el-mini,EL-MINI,ttyATH0,115200,0x01530001,1,8Mlzma))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,TLMR10U,tl-mr10u-v1,TL-MR10U,ttyATH0,115200,0x00100101,1,4Mlzma))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV1,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
 $(eval $(call 
SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV2,tl-mr11u-v2,TL-MR11U,ttyATH0,115200,0x00110102,1,4Mlzma))

Index: target/linux/ar71xx/generic/profiles/easy-link.mk
===
--- /dev/null
+++ target/linux/ar71xx/generic/profiles/easy-link.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (C) 2009 OpenWrt.org