<div dir="ltr">Please ignore the patch in the first email since it has an typo in the model name.</div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-17 12:30 GMT+01:00 Marius Gripsgard <span dir="ltr"><<a href="mailto:mariogrip@ubuntu.com" target="_blank">mariogrip@ubuntu.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">This adds support for TP-Link Archer C20<br>
<br>
Signed-off-by: Marius Gripsgard <<a href="mailto:mariogrip@ubuntu.com">mariogrip@ubuntu.com</a>><br>
---<br>
 target/linux/ramips/dts/<wbr>ArcherC20.dts  | 156 ++++++++++++++++++++++++++++++<wbr>+++<br>
 target/linux/ramips/image/<a href="http://mt7620.mk" rel="noreferrer" target="_blank">mt76<wbr>20.mk</a>    |   9 ++<br>
 tools/firmware-utils/src/<wbr>mktplinkfw2.c |   7 ++<br>
 3 files changed, 172 insertions(+)<br>
 create mode 100644 target/linux/ramips/dts/<wbr>ArcherC20.dts<br>
<br>
diff --git a/target/linux/ramips/dts/<wbr>ArcherC20.dts b/target/linux/ramips/dts/<wbr>ArcherC20.dts<br>
new file mode 100644<br>
</span>index 0000000..0fe8479<br>
<span class="">--- /dev/null<br>
+++ b/target/linux/ramips/dts/<wbr>ArcherC20.dts<br>
@@ -0,0 +1,156 @@<br>
+/dts-v1/;<br>
+<br>
+#include "mt7620a.dtsi"<br>
+<br>
+/ {<br>
+       compatible = "ralink,mt7620a-soc";<br>
</span>+       model = "TP-Link Archer C20";<br>
<div class="HOEnZb"><div class="h5">+<br>
+       chosen {<br>
+               bootargs = "console=ttyS0,115200";<br>
+       };<br>
+<br>
+       gpio-leds {<br>
+               compatible = "gpio-leds";<br>
+<br>
+               lan {<br>
+                       label = "tp-link:blue:lan";<br>
+                       gpios = <&gpio0 1 1>;<br>
+               };<br>
+<br>
+               power {<br>
+                       label = "tp-link:blue:power";<br>
+                       gpios = <&gpio0 7 0>;<br>
+               };<br>
+<br>
+               usb {<br>
+                       label = "tp-link:blue:usb";<br>
+                       gpios = <&gpio0 9 1>;<br>
+               };<br>
+<br>
+               wlan5g {<br>
+                       label = "tp-link:blue:wlan5g";<br>
+                       gpios = <&gpio0 11 1>;<br>
+               };<br>
+<br>
+               wlan2g {<br>
+                       label = "tp-link:blue:wlan2g";<br>
+                       gpios = <&gpio3 0 1>;<br>
+               };<br>
+       };<br>
+<br>
+       gpio-keys-polled {<br>
+               compatible = "gpio-keys-polled";<br>
+               #address-cells = <1>;<br>
+               #size-cells = <0>;<br>
+               poll-interval = <20>;<br>
+<br>
+               reset {<br>
+                       label = "reset";<br>
+                       gpios = <&gpio0 13 1>;<br>
+                       linux,code = <0x198>;<br>
+               };<br>
+<br>
+               rfkill {<br>
+                       label = "rfkill";<br>
+                       gpios = <&gpio0 2 1>;<br>
+                       linux,code = <0xf7>;<br>
+               };      };<br>
+};<br>
+<br>
+&gpio2 {<br>
+       status = "okay";<br>
+};<br>
+<br>
+&gpio3 {<br>
+       status = "okay";<br>
+};<br>
+<br>
+&spi0 {<br>
+       status = "okay";<br>
+<br>
+       m25p80@0 {<br>
+               #address-cells = <1>;<br>
+               #size-cells = <1>;<br>
+               compatible = "jedec,spi-nor";<br>
+               reg = <0>;<br>
+               linux,modalias = "m25p80", "mx25l6405d";<br>
+               spi-max-frequency = <10000000>;<br>
+<br>
+               partition@0 {<br>
+                       label = "u-boot";<br>
+                       reg = <0x0 0x20000>;<br>
+                       read-only;<br>
+               };<br>
+<br>
+               partition@20000 {<br>
+                       label = "firmware";<br>
+                       reg = <0x20000 0x7a0000>;<br>
+               };<br>
+<br>
+               partition@7c0000 {<br>
+                       label = "config";<br>
+                       reg = <0x7c0000 0x10000>;<br>
+               };<br>
+<br>
+               rom: partition@7d0000 {<br>
+                       label = "rom";<br>
+                       reg = <0x7d0000 0x10000>;<br>
+               };<br>
+<br>
+               partition@7e0000 {<br>
+                       label = "romfile";<br>
+                       reg = <0x7e0000 0x10000>;<br>
+               };<br>
+<br>
+               radio: partition@7f0000 {<br>
+                       label = "radio";<br>
+                       reg = <0x7f0000 0x10000>;<br>
+               };<br>
+       };<br>
+};<br>
+<br>
+&pinctrl {<br>
+       state_default: pinctrl0 {<br>
+               gpio {<br>
+                       ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";<br>
+                       ralink,function = "gpio";<br>
+               };<br>
+       };<br>
+};<br>
+<br>
+&ethernet {<br>
+               pinctrl-names = "default";<br>
+               pinctrl-0 = <&ephy_pins>;<br>
+               mtd-mac-address = <&rom 0xf100>;<br>
+               mediatek,portmap = "wllll";<br>
+       };<br>
+<br>
+&ehci {<br>
+       status = "okay";<br>
+};<br>
+<br>
+&ohci {<br>
+       status = "okay";<br>
+};<br>
+<br>
+&gsw {<br>
+       mediatek,port4 = "ephy";<br>
+};<br>
+<br>
+&wmac {<br>
+       ralink,mtd-eeprom = <&radio 0>;<br>
+};<br>
+<br>
+&pcie {<br>
+       status = "okay";<br>
+<br>
+       pcie-bridge {<br>
+               mt76@0,0 {<br>
+                       reg = <0x0000 0 0 0 0>;<br>
+                       device_type = "pci";<br>
+                       mediatek,mtd-eeprom = <&radio 32768>;<br>
+                       mediatek,2ghz = <0>;<br>
+               };<br>
+       };<br>
+};<br>
diff --git a/target/linux/ramips/image/<a href="http://mt7620.mk" rel="noreferrer" target="_blank">mt<wbr>7620.mk</a> b/target/linux/ramips/image/<a href="http://mt7620.mk" rel="noreferrer" target="_blank">mt<wbr>7620.mk</a><br>
index 87f8ed8..39292e1 100644<br>
--- a/target/linux/ramips/image/<a href="http://mt7620.mk" rel="noreferrer" target="_blank">mt<wbr>7620.mk</a><br>
+++ b/target/linux/ramips/image/<a href="http://mt7620.mk" rel="noreferrer" target="_blank">mt<wbr>7620.mk</a><br>
@@ -50,6 +50,15 @@ define Device/ArcherC20i<br>
 endef<br>
 TARGET_DEVICES += ArcherC20i<br>
<br>
+define Device/ArcherC20<br>
+  DTS := ArcherC20<br>
+  KERNEL := $(KERNEL_DTB)<br>
+  KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-header ArcherC20 -c<br>
+  IMAGE/sysupgrade.bin := append-kernel | tplink-header ArcherC20 -j -r $(KDIR)/root.squashfs<br>
+  DEVICE_TITLE := TP-Link ArcherC20<br>
+endef<br>
+TARGET_DEVICES += ArcherC20<br>
+<br>
 define Device/ArcherC50<br>
   DTS := ArcherC50<br>
   KERNEL := $(KERNEL_DTB)<br>
diff --git a/tools/firmware-utils/src/<wbr>mktplinkfw2.c b/tools/firmware-utils/src/<wbr>mktplinkfw2.c<br>
index 213e672..05156bc 100644<br>
--- a/tools/firmware-utils/src/<wbr>mktplinkfw2.c<br>
+++ b/tools/firmware-utils/src/<wbr>mktplinkfw2.c<br>
@@ -192,6 +192,13 @@ static struct board_info boards[] = {<br>
                .hdr_ver        = 3,<br>
                .endian_swap    = true,<br>
        }, {<br>
+               .id             = "ArcherC20",<br>
+               .hw_id          = 0xc2000001,<br>
+               .hw_rev         = 68,<br>
+               .layout_id      = "8Mmtk",<br>
+               .hdr_ver        = 3,<br>
+               .endian_swap    = true,<br>
+       }, {<br>
                /* terminating entry */<br>
        }<br>
 };<br>
--<br>
2.9.3<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:small">Best regards,</div><div style="font-size:small">Marius</div></div></div>
</div>