<div dir="ltr">Ok thanks,<div>Will clean up the white space + board name and resubmit (maybe also with the additional changes for the wireless calibration data at this point)</div><div><br></div><div>For the WAN link, I did not test it myself yet with 10 or 100mbps, but the situation should be the same as described here</div><div><a href="https://dev.openwrt.org/changeset/47695/trunk/target/linux/ipq806x">https://dev.openwrt.org/changeset/47695/trunk/target/linux/ipq806x</a><br></div><div><br></div><div>ie the wan link from the cpu is actually to the 1gbps internal port on the switch chip, regardless of what is then connected to the wan port on the switch.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 December 2015 at 16:46, Jonas Gorski <span dir="ltr"><<a href="mailto:jogo@openwrt.org" target="_blank">jogo@openwrt.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On Sun, Dec 6, 2015 at 3:20 PM, Josh Bendavid <<a href="mailto:Josh.Bendavid@cern.ch">Josh.Bendavid@cern.ch</a>> wrote:<br>
> From: Josh Bendavid <<a href="mailto:joshbendavid@gmail.com">joshbendavid@gmail.com</a>><br>
><br>
> Add initial support for Archer C2600 to Makefiles and profiles. This is<br>
> sufficient to build a working factory image. Sysupgrade image is not<br>
> implemented yet. Currently wired network is working, but<br>
</span>> LED's/buttons/wireless are not. Updated to create a separate dts file for<br>
<span class="">> c2600, which is currently identical to the ap148 aside that the sata-related<br>
> sections have been removed.<br>
><br>
> Signed-off-by: Josh Bendavid <<a href="mailto:joshbendavid@gmail.com">joshbendavid@gmail.com</a>><br>
> ---<br>
><br>
> diff --git a/include/<a href="http://image.mk" rel="noreferrer" target="_blank">image.mk</a> b/include/<a href="http://image.mk" rel="noreferrer" target="_blank">image.mk</a><br>
> index fd5e3f4..fab3c8a 100644<br>
> --- a/include/<a href="http://image.mk" rel="noreferrer" target="_blank">image.mk</a><br>
> +++ b/include/<a href="http://image.mk" rel="noreferrer" target="_blank">image.mk</a><br>
> @@ -327,6 +327,17 @@ define Build/netgear-dni<br>
> mv $@.new $@<br>
> endef<br>
><br>
> +define Build/tplink-safe<br>
> + $(STAGING_DIR_HOST)/bin/tplink-safeloader \<br>
<br>
</span>This patch is whitespace broken, please use an email client that<br>
doesn't convert tabs to spaces or git-email.<br>
<span class=""><br>
> + -B $(TPLINK_BOARD_ID) -V OpenWrt.$(REVISION) \<br>
> + -k $(word 1,$^) \<br>
> + -r $(word 2,$^) \<br>
> + -j \<br>
> + $(if $(findstring sysupgrade,$1),-S) \<br>
> + -o $@.new<br>
> + mv $@.new $@<br>
> +endef<br>
> +<br>
> define Build/fit<br>
> $(TOPDIR)/scripts/mkits.sh \<br>
> -D $(DEVICE_NAME) -o $@.its -k $@ \<br>
> diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network<br>
> b/target/linux/ipq806x/base-files/etc/board.d/02_network<br>
> index b054230..e000e3d 100755<br>
> --- a/target/linux/ipq806x/base-files/etc/board.d/02_network<br>
> +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network<br>
> @@ -13,7 +13,8 @@ board=$(ipq806x_board_name)<br>
><br>
> case "$board" in<br>
> ap148 |\<br>
> -r7500)<br>
> +r7500 |\<br>
> +c2600)<br>
<br>
</span>Please use alphabetical ordering<br>
<span class=""><br>
> ucidef_add_switch "switch0" \<br>
> "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"<br>
> ;;<br>
> diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh<br>
> b/target/linux/ipq806x/base-files/lib/ipq806x.sh<br>
> index 5b27bde..262183f 100644<br>
> --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh<br>
> +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh<br>
> @@ -23,6 +23,9 @@ ipq806x_board_detect() {<br>
> *"R7500")<br>
> name="r7500"<br>
> ;;<br>
> + *"C2600")<br>
> + name="c2600"<br>
<br>
</span>same.<br>
<div><div class="h5"><br>
> + ;;<br>
> esac<br>
><br>
> [ -z "$name" ] && name="unknown"<br>
> diff --git a/target/linux/ipq806x/image/Makefile<br>
> b/target/linux/ipq806x/image/Makefile<br>
> index 14cf442..0445914 100644<br>
> --- a/target/linux/ipq806x/image/Makefile<br>
> +++ b/target/linux/ipq806x/image/Makefile<br>
> @@ -85,6 +85,18 @@ define Device/DniImage<br>
> endef<br>
> DEVICE_VARS += KERNEL_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_BLOCK_SIZE<br>
> DEVICE_PAGE_SIZE<br>
><br>
> +define Device/TpSafeImage<br>
> + PROFILES += $$(DEVICE_NAME)<br>
> + FILESYSTEMS := squashfs<br>
> + KERNEL_SUFFIX := -uImage<br>
> + KERNEL = kernel-bin | append-dtb | uImage none<br>
> + KERNEL_NAME := zImage<br>
> + TPLINK_BOARD_ID :=<br>
> + IMAGES := factory.bin<br>
> + IMAGE/factory.bin := tplink-safe<br>
> +endef<br>
> +DEVICE_VARS += TPLINK_BOARD_ID<br>
> +<br>
> define Device/AP148<br>
> $(call Device/FitImage)<br>
> $(call Device/UbiFit)<br>
> @@ -103,6 +115,15 @@ define Device/AP148-legacy<br>
> BOARD_NAME := ap148<br>
> endef<br>
><br>
> +define Device/C2600<br>
> + $(call Device/TpSafeImage)<br>
> + DEVICE_DTS := qcom-ipq8064-c2600<br>
> + BLOCKSIZE := 128KiB<br>
> + PAGESIZE := 2048<br>
> + BOARD_NAME := ap148<br>
<br>
</div></div>This must be the boardname you assign in board_detect.<br>
<div><div class="h5"><br>
> + TPLINK_BOARD_ID := C2600<br>
> +endef<br>
> +<br>
> define Device/DB149<br>
> $(call Device/FitImage)<br>
> DEVICE_DTS := qcom-ipq8064-db149<br>
> @@ -121,6 +142,6 @@ define Device/R7500<br>
> BOARD_NAME := r7500<br>
> endef<br>
><br>
> -TARGET_DEVICES += AP148 AP148-legacy DB149 R7500<br>
> +TARGET_DEVICES += AP148 AP148-legacy C2600 DB149 R7500<br>
><br>
> $(eval $(call BuildImage))<br>
> diff --git<br>
> a/target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch<br>
> b/target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch<br>
> index e69de29..e750b98 100644<br>
> ---<br>
> a/target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch<br>
> +++<br>
> b/target/linux/ipq806x/patches-3.18/711-ARM-qcom-add-TP-Link-Archer-C2600-device-tree.patch<br>
> @@ -0,0 +1,246 @@<br>
> +diff -urN a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile<br>
> +--- a/arch/arm/boot/dts/Makefile 2015-11-25 22:51:15.148899604 +0100<br>
> ++++ b/arch/arm/boot/dts/Makefile 2015-12-06 14:33:31.092396982 +0100<br>
> +@@ -362,6 +362,7 @@<br>
> + qcom-ipq8064-ap148.dtb \<br>
> + qcom-ipq8064-db149.dtb \<br>
> + qcom-ipq8064-r7500.dtb \<br>
> ++ qcom-ipq8064-c2600.dtb \<br>
> + qcom-msm8660-surf.dtb \<br>
> + qcom-msm8960-cdp.dtb \<br>
> + qcom-msm8974-sony-xperia-honami.dtb<br>
> +diff -urN a/arch/arm/boot/dts/qcom-ipq8064-c2600.dts<br>
> b/arch/arm/boot/dts/qcom-ipq8064-c2600.dts<br>
> +--- a/arch/arm/boot/dts/qcom-ipq8064-c2600.dts 1970-01-01<br>
> 01:00:00.000000000 +0100<br>
> ++++ b/arch/arm/boot/dts/qcom-ipq8064-c2600.dts 2015-12-06<br>
> 14:20:05.152365670 +0100<br>
> +@@ -0,0 +1,231 @@<br>
> ++#include "qcom-ipq8064-v1.0.dtsi"<br>
> ++<br>
> ++/ {<br>
> ++ model = "TP-Link Archer C2600";<br>
> ++ compatible = "tplink,c2600", "qcom,ipq8064";<br>
> ++<br>
> ++ memory@0 {<br>
> ++ reg = <0x42000000 0x1e000000>;<br>
> ++ device_type = "memory";<br>
> ++ };<br>
> ++<br>
> ++ reserved-memory {<br>
> ++ #address-cells = <1>;<br>
> ++ #size-cells = <1>;<br>
> ++ ranges;<br>
> ++ rsvd@41200000 {<br>
> ++ reg = <0x41200000 0x300000>;<br>
> ++ no-map;<br>
> ++ };<br>
> ++ };<br>
> ++<br>
> ++ aliases {<br>
> ++ serial0 = &uart4;<br>
> ++ mdio-gpio0 = &mdio0;<br>
> ++ };<br>
> ++<br>
> ++ chosen {<br>
> ++ linux,stdout-path = "serial0:115200n8";<br>
> ++ };<br>
> ++<br>
> ++ soc {<br>
> ++ pinmux@800000 {<br>
> ++ i2c4_pins: i2c4_pinmux {<br>
> ++ pins = "gpio12", "gpio13";<br>
> ++ function = "gsbi4";<br>
> ++ bias-disable;<br>
> ++ };<br>
> ++<br>
> ++ spi_pins: spi_pins {<br>
> ++ mux {<br>
> ++ pins = "gpio18", "gpio19", "gpio21";<br>
> ++ function = "gsbi5";<br>
> ++ drive-strength = <10>;<br>
> ++ bias-none;<br>
> ++ };<br>
> ++ };<br>
> ++<br>
> ++ nand_pins: nand_pins {<br>
> ++ mux {<br>
> ++ pins = "gpio34", "gpio35", "gpio36",<br>
> ++ "gpio37", "gpio38", "gpio39",<br>
> ++ "gpio40", "gpio41", "gpio42",<br>
> ++ "gpio43", "gpio44", "gpio45",<br>
> ++ "gpio46", "gpio47";<br>
> ++ function = "nand";<br>
> ++ drive-strength = <10>;<br>
> ++ bias-disable;<br>
> ++ };<br>
> ++<br>
> ++ pullups {<br>
> ++ pins = "gpio39";<br>
> ++ bias-pull-up;<br>
> ++ };<br>
> ++<br>
> ++ hold {<br>
> ++ pins = "gpio40", "gpio41", "gpio42",<br>
> ++ "gpio43", "gpio44", "gpio45",<br>
> ++ "gpio46", "gpio47";<br>
> ++ bias-bus-hold;<br>
> ++ };<br>
> ++ };<br>
> ++<br>
> ++ mdio0_pins: mdio0_pins {<br>
> ++ mux {<br>
> ++ pins = "gpio0", "gpio1";<br>
> ++ function = "gpio";<br>
> ++ drive-strength = <8>;<br>
> ++ bias-disable;<br>
> ++ };<br>
> ++ };<br>
> ++<br>
> ++ rgmii2_pins: rgmii2_pins {<br>
> ++ mux {<br>
> ++ pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",<br>
> ++ "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;<br>
> ++ function = "rgmii2";<br>
> ++ drive-strength = <8>;<br>
> ++ bias-disable;<br>
> ++ };<br>
> ++ };<br>
> ++ };<br>
> ++<br>
> ++ gsbi@16300000 {<br>
> ++ qcom,mode = <GSBI_PROT_I2C_UART>;<br>
> ++ status = "ok";<br>
> ++ serial@16340000 {<br>
> ++ status = "ok";<br>
> ++ };<br>
> ++ /*<br>
> ++ * The i2c device on gsbi4 should not be enabled.<br>
> ++ * On ipq806x designs gsbi4 i2c is meant for exclusive<br>
> ++ * RPM usage. Turning this on in kernel manifests as<br>
> ++ * i2c failure for the RPM.<br>
> ++ */<br>
> ++ };<br>
> ++<br>
> ++ gsbi5: gsbi@1a200000 {<br>
> ++ qcom,mode = <GSBI_PROT_SPI>;<br>
> ++ status = "ok";<br>
> ++<br>
> ++ spi4: spi@1a280000 {<br>
> ++ status = "ok";<br>
> ++ spi-max-frequency = <50000000>;<br>
> ++<br>
> ++ pinctrl-0 = <&spi_pins>;<br>
> ++ pinctrl-names = "default";<br>
> ++<br>
> ++ cs-gpios = <&qcom_pinmux 20 0>;<br>
> ++<br>
> ++ flash: m25p80@0 {<br>
> ++ compatible = "s25fl256s1";<br>
> ++ #address-cells = <1>;<br>
> ++ #size-cells = <1>;<br>
> ++ spi-max-frequency = <50000000>;<br>
> ++ reg = <0>;<br>
<br>
</div></div>So it has both nor and nand flash?<br>
<div><div class="h5"><br>
> ++<br>
> ++ linux,part-probe = "qcom-smem";<br>
> ++ };<br>
> ++ };<br>
> ++ };<br>
> ++<br>
> ++ phy@100f8800 { /* USB3 port 1 HS phy */<br>
> ++ status = "ok";<br>
> ++ };<br>
> ++<br>
> ++ phy@100f8830 { /* USB3 port 1 SS phy */<br>
> ++ status = "ok";<br>
> ++ };<br>
> ++<br>
> ++ phy@110f8800 { /* USB3 port 0 HS phy */<br>
> ++ status = "ok";<br>
> ++ };<br>
> ++<br>
> ++ phy@110f8830 { /* USB3 port 0 SS phy */<br>
> ++ status = "ok";<br>
> ++ };<br>
> ++<br>
> ++ usb30@0 {<br>
> ++ status = "ok";<br>
> ++ };<br>
> ++<br>
> ++ usb30@1 {<br>
> ++ status = "ok";<br>
> ++ };<br>
> ++<br>
> ++ pcie0: pci@1b500000 {<br>
> ++ status = "ok";<br>
> ++ phy-tx0-term-offset = <7>;<br>
> ++ };<br>
> ++<br>
> ++ pcie1: pci@1b700000 {<br>
> ++ status = "ok";<br>
> ++ phy-tx0-term-offset = <7>;<br>
> ++ };<br>
> ++<br>
> ++ nand@1ac00000 {<br>
> ++ status = "ok";<br>
> ++<br>
> ++ pinctrl-0 = <&nand_pins>;<br>
> ++ pinctrl-names = "default";<br>
> ++<br>
> ++ nand-ecc-strength = <4>;<br>
> ++ nand-bus-width = <8>;<br>
> ++<br>
> ++ linux,part-probe = "qcom-smem";<br>
> ++ };<br>
> ++<br>
> ++ mdio0: mdio {<br>
> ++ compatible = "virtual,mdio-gpio";<br>
> ++ #address-cells = <1>;<br>
> ++ #size-cells = <0>;<br>
> ++ gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;<br>
> ++ pinctrl-0 = <&mdio0_pins>;<br>
> ++ pinctrl-names = "default";<br>
> ++<br>
> ++ phy0: ethernet-phy@0 {<br>
> ++ device_type = "ethernet-phy";<br>
> ++ reg = <0>;<br>
> ++ qca,ar8327-initvals = <<br>
> ++ 0x00004 0x7600000 /* PAD0_MODE */<br>
> ++ 0x00008 0x1000000 /* PAD5_MODE */<br>
> ++ 0x0000c 0x80 /* PAD6_MODE */<br>
> ++ 0x000e4 0xaa545 /* MAC_POWER_SEL */<br>
> ++ 0x000e0 0xc74164de /* SGMII_CTRL */<br>
> ++ 0x0007c 0x4e /* PORT0_STATUS */<br>
> ++ 0x00094 0x4e /* PORT6_STATUS */<br>
> ++ >;<br>
> ++ };<br>
> ++<br>
> ++ phy4: ethernet-phy@4 {<br>
> ++ device_type = "ethernet-phy";<br>
> ++ reg = <4>;<br>
> ++ };<br>
> ++ };<br>
> ++<br>
> ++ gmac1: ethernet@37200000 {<br>
> ++ status = "ok";<br>
> ++ phy-mode = "rgmii";<br>
> ++ phy-handle = <&phy4>;<br>
<br>
</div></div>So your wan port works fine with a 10 or 100 Mbit connection?<br>
<span class=""><br>
> ++ qcom,id = <1>;<br>
> ++<br>
> ++ pinctrl-0 = <&rgmii2_pins>;<br>
> ++ pinctrl-names = "default";<br>
> ++ };<br>
> ++<br>
> ++ gmac2: ethernet@37400000 {<br>
> ++ status = "ok";<br>
> ++ phy-mode = "sgmii";<br>
> ++ qcom,id = <2>;<br>
> ++<br>
> ++ fixed-link {<br>
> ++ speed = <1000>;<br>
> ++ full-duplex;<br>
> ++ };<br>
> ++ };<br>
> ++ };<br>
> ++};<br>
> ++<br>
> ++&adm_dma {<br>
> ++ status = "ok";<br>
> ++};<br>
<br>
</span>(snip)<br>
<span class=""><br>
><br>
><br>
> On 5 December 2015 at 15:08, Jonas Gorski <<a href="mailto:jogo@openwrt.org">jogo@openwrt.org</a>> wrote:<br>
<br>
</span>Please don't top post or send new versions as replies to older version.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Jonas<br>
</font></span></blockquote></div><br></div>