[OpenWrt-Devel] [PATCH] ramips: change LED trigger
This commit changes the trigger for the WiFi-LED from netdev to the wireless PHY device. With this change, the LEDs illuminate, even when the wireless interface is not named wifi{0,1}. This change is (for now) applied only to MT7628 devices from TP-Link, as we had the possibility to test this change against two of those devices, namely a TL-WR841 v13 and a Archer C50 v3. Signed-off-by: David Bauer --- target/linux/ramips/base-files/etc/board.d/01_leds | 8 1 file changed, 4 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 ae5ac77b5e..73e3f22418 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -384,12 +384,12 @@ tiny-ac) set_usb_led "$boardname:green:usb" ;; tl-wr840n-v4) - set_wifi_led "$boardname:green:wlan" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ;; tl-wr841n-v13) - set_wifi_led "$boardname:green:wlan" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan1" "lan1" "$boardname:green:lan1" "switch0" "0x2" ucidef_set_led_switch "lan2" "lan2" "$boardname:green:lan2" "switch0" "0x4" ucidef_set_led_switch "lan3" "lan3" "$boardname:green:lan3" "switch0" "0x8" @@ -415,13 +415,13 @@ tplink,c50-v3) ;; tplink,tl-mr3420-v5) set_usb_led "$boardname:green:usb" - set_wifi_led "$boardname:green:wlan" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ;; tplink,tl-wr902ac-v3) set_usb_led "$boardname:green:usb" - ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan" "wlan0" + ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x10" ;; u25awf-h1) -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ipq40xx: add get_status_led to diag.sh
This commit adds the get_status_led method to diag.sh, which sets the boot-led as status-led for scripts using this method to get a status-led. This method is used platform-independent in downstream project gluon to set the LED used to indicate the config-mode. Signed-off-by: David Bauer --- target/linux/ipq40xx/base-files/etc/diag.sh | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/ipq40xx/base-files/etc/diag.sh b/target/linux/ipq40xx/base-files/etc/diag.sh index 4cfe6325f2..a3a7047702 100755 --- a/target/linux/ipq40xx/base-files/etc/diag.sh +++ b/target/linux/ipq40xx/base-files/etc/diag.sh @@ -7,6 +7,10 @@ failsafe="$(get_dt_led failsafe)" running="$(get_dt_led running)" upgrade="$(get_dt_led upgrade)" +get_status_led() { + status_led="$boot" +} + set_state() { status_led="$boot" -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] ath79: add support for OCEDO Koala
This commit adds support for the OCEDO Koala SOC:Qualcomm QCA9558 (Scorpion) RAM:128MB FLASH: 16MiB WLAN1: QCA9558 2.4 GHz 802.11bgn 3x3 WLAN2: QCA9880 5 GHz 802.11nac 3x3 INPUT: RESET button LED:Power, LAN, WiFi 2.4, WiFi 5, SYS Serial: Header Next to Black metal shield Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4 GHz WiFi - 5 GHz WiFi - TFTP boot from ramdisk image - Installation via ramdisk image - OpenWRT sysupgrade - Buttons - LEDs Installation seems to be possible only through booting an OpenWRT ramdisk image. Hold down the reset button while powering on the device. It will load a ramdisk image named 'koala-uImage-initramfs-lzma.bin' from 192.168.100.8. Note: depending on the present software, the device might also try to pull a file called 'koala-uimage-factory'. Only the name differs, it is still used as a ramdisk image. Wait for the ramdisk image to boot. OpenWRT can be written to the flash via sysupgrade or mtd. Due to the flip-flop bootloader which we not (yet) support, you need to set the partition the bootloader is selecting. It is possible from the initramfs image with > fw_setenv bootcmd run bootcmd_1 Afterwards you can reboot the device. Signed-off-by: David Bauer --- package/boot/uboot-envtools/files/ath79 | 1 + .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 + .../linux/ath79/dts/qca9558_ocedo_koala.dts | 169 ++ target/linux/ath79/image/generic.mk | 10 ++ 5 files changed, 185 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_ocedo_koala.dts diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 4d9d2e8fe0..aa0bf4514f 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -14,6 +14,7 @@ board=$(board_name) case "$board" in glinet,ar300m|\ +ocedo,koala|\ ocedo,raccoon|\ openmesh,om5p-ac-v2) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1" "0x1" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 9ec78ece23..413b4a4160 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -10,6 +10,7 @@ ath79_setup_interfaces() case "$board" in avm,fritz300e|\ + ocedo,koala|\ ocedo,raccoon|\ pcs,cap324|\ tplink,re450-v2|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 038573f3e8..57d9744af2 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,6 +87,10 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in + ocedo,koala) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(mtd_get_mac_binary art 12) + ;; openmesh,om5p-ac-v2) ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts new file mode 100644 index 00..6020e469a3 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9557.dtsi" + +/ { + compatible = "ocedo,koala", "qca,qca9557"; + model = "OCEDO Koala"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = + }; + + leds { + compatible = "gpio-leds"; + + power { + label = "koala:green:power"; + gpios = < 22 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wifi2 { + label = "koala:yellow:wlan2"; + gpios = < 23 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + default-state = "off"; + }; + + wifi5 { + label = "koala:red:wlan58"; + gpios = < 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt";
[OpenWrt-Devel] [PATCH] ath79: fix PLL settings for QCA955x
This adds PLL settings for the ethernet ports of the TP-Link TL-WR1043 v2/v3 and the Openmesh OM5P-AC-v2. We also change the PLL-settings in the qca9557.dtsi to match the ones used as default on the ar71xx target. As of 4b9680f138 those devices have broken ethernet ports as the default PLL settings defined in the QCA9557.dtsi are applied which are off for those devices. Signed-off-by: David Bauer --- target/linux/ath79/dts/qca9557.dtsi| 4 ++-- target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts | 4 target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi | 4 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/dts/qca9557.dtsi b/target/linux/ath79/dts/qca9557.dtsi index 992ccff1e7..379e257d02 100644 --- a/target/linux/ath79/dts/qca9557.dtsi +++ b/target/linux/ath79/dts/qca9557.dtsi @@ -298,7 +298,7 @@ pll-reg = <0 0x28 0>; pll-handle = <>; - pll-data = <0x82000101 0x8101 0x80001313>; + pll-data = <0x1600 0x0101 0x1616>; phy-mode = "rgmii"; resets = < 9>; @@ -316,7 +316,7 @@ pll-reg = <0 0x48 0>; pll-handle = <>; - pll-data = <0x82000101 0x8101 0x80001313>; + pll-data = <0x1600 0x0101 0x1616>; phy-mode = "sgmii"; resets = < 13>; diff --git a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts index 097e44b310..8794718131 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts @@ -155,6 +155,8 @@ { status = "okay"; + pll-data = <0x82000101 0x8101 0x80001313>; + phy-handle = <>; phy-mode = "rgmii"; }; @@ -162,6 +164,8 @@ { status = "okay"; + pll-data = <0x03000101 0x8101 0x80001313>; + phy-handle = <>; phy-mode = "sgmii"; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index 52041b8d01..fb08f867de 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -155,6 +155,8 @@ { status = "okay"; + pll-data = <0x5600 0x0101 0x1616>; + mtd-mac-address = < 0x1fc00>; mtd-mac-address-increment = <1>; phy-handle = <>; @@ -163,6 +165,8 @@ { status = "okay"; + pll-data = <0x03000101 0x0101 0x1616>; + mtd-mac-address = < 0x1fc00>; fixed-link { -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] build: add mkrasimage
The current make-ras.sh image generation script for the ZyXEL NBG6617 has portability issues with bash. Because of this, factory images are currently not built correctly by the OpenWRT buildbots. This commit replaces the make-ras.sh by C-written mkrasimage. The old script is still kept but can be deleted in the future. Signed-off-by: David Bauer --- include/image-commands.mk | 13 + target/linux/ipq40xx/image/Makefile | 2 +- tools/firmware-utils/Makefile | 1 + tools/firmware-utils/src/mkrasimage.c | 374 ++ 4 files changed, 389 insertions(+), 1 deletion(-) create mode 100644 tools/firmware-utils/src/mkrasimage.c diff --git a/include/image-commands.mk b/include/image-commands.mk index 3cc5dc21e1..bb5fe46e1a 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -62,6 +62,19 @@ define Build/make-ras @mv $@.new $@ endef +define Build/zyxel-ras-image + let \ + newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \ + $(STAGING_DIR_HOST)/bin/mkrasimage \ + -b $(RAS_BOARD) \ + -v $(RAS_VERSION) \ + -k $(call param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \ + -r $@ \ + -s $$newsize \ + -o $@.new + @mv $@.new $@ +endef + define Build/mkbuffaloimg $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \ -R $$(($(subst k, * 1024,$(ROOTFS_SIZE \ diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index d1ee1004fd..6e4125db0b 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -221,7 +221,7 @@ define Device/zyxel_nbg6617 # at least as large as the one of the initial firmware image (not the current # one on the device). This only applies to the Web-UI, the bootlaoder ignores # this minimum-size. However, the larger image can be flashed both ways. - IMAGE/factory.bin := append-rootfs | pad-rootfs | check-size (ROOTFS_SIZE) | make-ras + IMAGE/factory.bin := append-rootfs | pad-rootfs | check-size (ROOTFS_SIZE) | zyxel-ras-image IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size (ROOTFS_SIZE) | sysupgrade-tar rootfs=@ | append-metadata DEVICE_PACKAGES := ipq-wifi-zyxel_nbg6617 uboot-envtools endef diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 436a43794c..00917c3417 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -70,6 +70,7 @@ define Host/Compile $(call cc,fix-u-media-header cyg_crc32,-Wall) $(call cc,hcsmakeimage bcmalgo) $(call cc,mkporayfw, -Wall) + $(call cc,mkrasimage, --std=gnu99) $(call cc,mkhilinkfw, -lcrypto) $(call cc,mkdcs932, -Wall) $(call cc,mkheader_gemtek,-lz) diff --git a/tools/firmware-utils/src/mkrasimage.c b/tools/firmware-utils/src/mkrasimage.c new file mode 100644 index 00..1cac7b5da9 --- /dev/null +++ b/tools/firmware-utils/src/mkrasimage.c @@ -0,0 +1,374 @@ +/* + * --- ZyXEL header format --- + * Original Version by Benjamin Berg + * C implementation based on generation-script by Christian Lamparter + * + * The firmware image prefixed with a header (which is written into the MTD device). + * The header is one erase block (~64KiB) in size, but the checksum only convers the + * first 2KiB. Padding is 0xff. All integers are in big-endian. + * + * The checksum is always a 16-Bit System V checksum (sum -s) stored in a 32-Bit integer. + * + * 4 bytes: checksum of the rootfs image + * 4 bytes: length of the contained rootfs image file (big endian) + * 32 bytes: Firmware Version string (NUL terminated, 0xff padded) + * 4 bytes: checksum over the header partition (big endian - see below) + * 64 bytes: Model (e.g. "NBG6617", NUL termiated, 0xff padded) + * 4 bytes: checksum of the kernel partition + * 4 bytes: length of the contained kernel image file (big endian) + * rest: 0xff padding (To erase block size) + * + * The checksums are calculated by adding up all bytes and if a 16bit + * overflow occurs, one is added and the sum is masked to 16 bit: + * csum = csum + databyte; if (csum > 0x) { csum += 1; csum &= 0x }; + * Should the file have an odd number of bytes then the byte len-0x800 is + * used additionally. + * + * The checksum for the header is calculated over the first 2048 bytes with + * the rootfs image checksum as the placeholder during calculation. + * + * 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 +#include +#include +#include +#include +#include + +#define VERSION_STRING_LEN 31 +#define ROOT
[OpenWrt-Devel] [PATCH v2] ath79: add support for Fritz!Box 4020
This commit adds support for the AVM Fritz!Box 4020 WiFi-router. SoC: Qualcomm Atheros QCA9561 (Dragonfly) 750MHz RAM: Winbond W971GG6KB-25 FLASH: Macronix MX25L12835F WiFi: QCA9561 b/g/n 3x3 450Mbit/s USB: 1x USB 2.0 IN:WPS button, WiFi button OUT: Power LED green, Internet LED green, WLAN LED green, LAN LED green, INFO LED green, INFO LED red UART: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet (LAN + WAN) - WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - LEDs Not working: - USB port Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. After transfer is complete you need to powercycle the device to boot OpenWRT. Signed-off-by: David Bauer --- v2 changes: - add annotation for initial output-line-state setting - rebase onto current master .../ath79/base-files/etc/board.d/01_leds | 4 + .../ath79/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/firmware/10-ath9k-eeprom| 3 + .../linux/ath79/dts/qca9561_avm_fritz4020.dts | 172 ++ target/linux/ath79/image/generic.mk | 14 ++ .../005-gpio-74x164-add-initvals.patch| 15 ++ 6 files changed, 213 insertions(+) create mode 100644 target/linux/ath79/dts/qca9561_avm_fritz4020.dts create mode 100644 target/linux/ath79/patches-4.14/005-gpio-74x164-add-initvals.patch diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index c3dc1bbe56..f058bf599e 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -17,6 +17,10 @@ avm,fritz300e) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100" ;; +avm,fritz4020) + ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" + ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x1E" + ;; etactica,eg200) ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0" ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index a29a295c56..6cd1686e23 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -43,6 +43,7 @@ ath79_setup_interfaces() etactica,eg200) ucidef_set_interface_lan "eth0" "dhcp" ;; + avm,fritz4020|\ glinet,ar150|\ glinet,ar300m) ucidef_set_interfaces_lan_wan "eth1" "eth0" @@ -155,6 +156,10 @@ ath79_setup_macs() avm,fritz300e) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) ;; + avm,fritz4020) + lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) + wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)")) + ;; dlink,dir-825-b1) lan_mac=$(mtd_get_mac_text "caldata" 65440) wan_mac=$(mtd_get_mac_text "caldata" 65460) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index f71139c55c..c36b566a35 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -97,6 +97,9 @@ board=$(board_name) case "$FIRMWARE" in "ath9k-eeprom-ahb-1810.wmac.bin") case $board in + avm,fritz4020) + ath9k_eeprom_extract_reverse "urlader" 5441 1088 + ;; iodata,wn-ac1600dgr2) ath9k_eeprom_extract "art" 4096 1088 ath9k_patch_fw_mac $(mtd_get_mac_ascii u-boot-env ethaddr) 2 diff --git a/target/linux/ath79/dts/qca9561_avm_frit
Re: [OpenWrt-Devel] [PATCH] build: add mkrasimage
Hello Karl, On 8/16/18 3:12 AM, Karl Palsson wrote: > 1) how bad are the portability issues that you felt > reimplementing in _C_ was the best path? 2) if it's that bad, why > keep it? How will future people knwo what to use. Either get rid > of it, or fix it. Regarding 1) The portability issue seems to be affecting older bash versions. Christian described and also fixed the issue in the forums [1]. I'm not sure about what systems correctly are affected (definitely older MacOS X and the OS of the buildbots). The C implementation originated from when i worked on the device before finding Christians tree. Honestly i also think the readability of the current script is not really that great but honestly i don't think we can substantially improve that. Regarding 2) I see that point, removing it is probably the better way. [1] https://forum.openwrt.org/t/solved-zyxel-nbg6617-tftp-flash-wont-take/17731/10 Greetings David > Cheers, > Karl P > >> >> Signed-off-by: David Bauer >> --- >> include/image-commands.mk | 13 + >> target/linux/ipq40xx/image/Makefile | 2 +- >> tools/firmware-utils/Makefile | 1 + >> tools/firmware-utils/src/mkrasimage.c | 374 ++ >> 4 files changed, 389 insertions(+), 1 deletion(-) >> create mode 100644 tools/firmware-utils/src/mkrasimage.c >> >> diff --git a/include/image-commands.mk >> b/include/image-commands.mk index 3cc5dc21e1..bb5fe46e1a 100644 >> --- a/include/image-commands.mk >> +++ b/include/image-commands.mk >> @@ -62,6 +62,19 @@ define Build/make-ras >> @mv $@.new $@ >> endef >> >> +define Build/zyxel-ras-image >> +let \ >> +newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \ >> +$(STAGING_DIR_HOST)/bin/mkrasimage \ >> +-b $(RAS_BOARD) \ >> +-v $(RAS_VERSION) \ >> +-k $(call >> param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \ >> +-r $@ \ >> +-s $$newsize \ >> +-o $@.new >> +@mv $@.new $@ >> +endef >> + >> define Build/mkbuffaloimg >> $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \ >> -R $$(($(subst k, * 1024,$(ROOTFS_SIZE \ >> diff --git a/target/linux/ipq40xx/image/Makefile >> b/target/linux/ipq40xx/image/Makefile index >> d1ee1004fd..6e4125db0b 100644 >> --- a/target/linux/ipq40xx/image/Makefile >> +++ b/target/linux/ipq40xx/image/Makefile >> @@ -221,7 +221,7 @@ define Device/zyxel_nbg6617 >> # at least as large as the one of the initial firmware image (not the >> current >> # one on the device). This only applies to the Web-UI, the bootlaoder >> ignores >> # this minimum-size. However, the larger image can be flashed both ways. >> -IMAGE/factory.bin := append-rootfs | pad-rootfs | check-size >> (ROOTFS_SIZE) | make-ras >> +IMAGE/factory.bin := append-rootfs | pad-rootfs | check-size >> (ROOTFS_SIZE) | zyxel-ras-image >> IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | >> check-size (ROOTFS_SIZE) | sysupgrade-tar rootfs=@ | append-metadata >> DEVICE_PACKAGES := ipq-wifi-zyxel_nbg6617 uboot-envtools >> endef >> diff --git a/tools/firmware-utils/Makefile >> b/tools/firmware-utils/Makefile index 436a43794c..00917c3417 >> 100644 >> --- a/tools/firmware-utils/Makefile >> +++ b/tools/firmware-utils/Makefile >> @@ -70,6 +70,7 @@ define Host/Compile >> $(call cc,fix-u-media-header cyg_crc32,-Wall) >> $(call cc,hcsmakeimage bcmalgo) >> $(call cc,mkporayfw, -Wall) >> +$(call cc,mkrasimage, --std=gnu99) >> $(call cc,mkhilinkfw, -lcrypto) >> $(call cc,mkdcs932, -Wall) >> $(call cc,mkheader_gemtek,-lz) >> diff --git a/tools/firmware-utils/src/mkrasimage.c >> b/tools/firmware-utils/src/mkrasimage.c new file mode 100644 >> index 00..1cac7b5da9 >> --- /dev/null >> +++ b/tools/firmware-utils/src/mkrasimage.c >> @@ -0,0 +1,374 @@ >> +/* >> + * --- ZyXEL header format --- >> + * Original Version by Benjamin Berg >> + * C implementation based on generation-script by Christian Lamparter >> >> + * >> + * The firmware image prefixed with a header (which is written into the MTD >> device). >> + * The header is one erase block (~64KiB) in size, but the checksum only >> convers the >> + * first 2KiB. Padding is 0xff. All integers are in big-endian. >> + * >> + * The checksum is always a 16-Bit System V che
Re: [OpenWrt-Devel] [PATCH v2] ath79: add support for Fritz!Box 4020
I was informed that gpio-hogs might be the thing we are looking for, i will look into that. So this patch should be hold back for now. On 8/16/18 2:15 AM, David Bauer wrote: > This commit adds support for the AVM Fritz!Box 4020 WiFi-router. > > SoC: Qualcomm Atheros QCA9561 (Dragonfly) 750MHz > RAM: Winbond W971GG6KB-25 > FLASH: Macronix MX25L12835F > WiFi: QCA9561 b/g/n 3x3 450Mbit/s > USB: 1x USB 2.0 > IN:WPS button, WiFi button > OUT: Power LED green, Internet LED green, WLAN LED green, >LAN LED green, INFO LED green, INFO LED red > UART: Header Next to Black metal shield >Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) >The Serial setting is 115200-8-N-1. > > Tested and working: > - Ethernet (LAN + WAN) > - WiFi (correct MAC) > - Installation via EVA bootloader > - OpenWRT sysupgrade > - Buttons > - LEDs > > Not working: > - USB port > > Installation via EVA: > In the first seconds after Power is connected, the bootloader will > listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). > Firmware can be uploaded like following: > > ftp> quote USER adam2 > ftp> quote PASS adam2 > ftp> binary > ftp> debug > ftp> passive > ftp> quote MEDIA FLSH > ftp> put openwrt-sysupgrade.bin mtd1 > > Note that this procedure might take up to two minutes. After transfer is > complete you need to powercycle the device to boot OpenWRT. > > Signed-off-by: David Bauer > --- > > v2 changes: > - add annotation for initial output-line-state setting > - rebase onto current master > > .../ath79/base-files/etc/board.d/01_leds | 4 + > .../ath79/base-files/etc/board.d/02_network | 5 + > .../etc/hotplug.d/firmware/10-ath9k-eeprom| 3 + > .../linux/ath79/dts/qca9561_avm_fritz4020.dts | 172 ++ > target/linux/ath79/image/generic.mk | 14 ++ > .../005-gpio-74x164-add-initvals.patch| 15 ++ > 6 files changed, 213 insertions(+) > create mode 100644 target/linux/ath79/dts/qca9561_avm_fritz4020.dts > create mode 100644 > target/linux/ath79/patches-4.14/005-gpio-74x164-add-initvals.patch > > diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds > b/target/linux/ath79/base-files/etc/board.d/01_leds > index c3dc1bbe56..f058bf599e 100755 > --- a/target/linux/ath79/base-files/etc/board.d/01_leds > +++ b/target/linux/ath79/base-files/etc/board.d/01_leds > @@ -17,6 +17,10 @@ avm,fritz300e) > ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" > "$boardname:green:rssi3" "wlan0" "60" "100" > ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" > "wlan0" "80" "100" > ;; > +avm,fritz4020) > + ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" > + ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" > "0x1E" > + ;; > etactica,eg200) > ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0" > ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" > "33" > diff --git a/target/linux/ath79/base-files/etc/board.d/02_network > b/target/linux/ath79/base-files/etc/board.d/02_network > index a29a295c56..6cd1686e23 100755 > --- a/target/linux/ath79/base-files/etc/board.d/02_network > +++ b/target/linux/ath79/base-files/etc/board.d/02_network > @@ -43,6 +43,7 @@ ath79_setup_interfaces() > etactica,eg200) > ucidef_set_interface_lan "eth0" "dhcp" > ;; > + avm,fritz4020|\ > glinet,ar150|\ > glinet,ar300m) > ucidef_set_interfaces_lan_wan "eth1" "eth0" > @@ -155,6 +156,10 @@ ath79_setup_macs() > avm,fritz300e) > lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) > ;; > + avm,fritz4020) > + lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) > + wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)")) > + ;; > dlink,dir-825-b1) > lan_mac=$(mtd_get_mac_text "caldata" 65440) > wan_mac=$(mtd_get_mac_text "caldata" 65460) > diff --git > a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom > b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom >
[OpenWrt-Devel] [PATCH 4/4] ath79: add support for OCEDO Koala
This commit adds support for the OCEDO Koala SOC:Qualcomm QCA9558 (Scorpion) RAM:128MB FLASH: 16MiB WLAN1: QCA9558 2.4 GHz 802.11bgn 3x3 WLAN2: QCA9880 5 GHz 802.11nac 3x3 INPUT: RESET button LED:Power, LAN, WiFi 2.4, WiFi 5, SYS Serial: Header Next to Black metal shield Pinout is 3.3V - GND - TX - RX (Arrow Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet - 2.4 GHz WiFi - 5 GHz WiFi - TFTP boot from ramdisk image - Installation via ramdisk image - OpenWRT sysupgrade - Buttons - LEDs Installation seems to be possible only through booting an OpenWRT ramdisk image. Hold down the reset button while powering on the device. It will load a ramdisk image named 'koala-uImage-initramfs-lzma.bin' from 192.168.100.8. Note: depending on the present software, the device might also try to pull a file called 'koala-uimage-factory'. Only the name differs, it is still used as a ramdisk image. Wait for the ramdisk image to boot. OpenWRT can be written to the flash via sysupgrade or mtd. Due to the flip-flop bootloader which we not (yet) support, you need to set the partition the bootloader is selecting. It is possible from the initramfs image with > fw_setenv bootcmd run bootcmd_1 Afterwards you can reboot the device. Signed-off-by: David Bauer --- package/boot/uboot-envtools/files/ath79 | 1 + .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 + .../linux/ath79/dts/qca9558_ocedo_koala.dts | 173 ++ target/linux/ath79/image/generic.mk | 10 + 5 files changed, 189 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_ocedo_koala.dts diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 4d9d2e8fe0..aa0bf4514f 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -14,6 +14,7 @@ board=$(board_name) case "$board" in glinet,ar300m|\ +ocedo,koala|\ ocedo,raccoon|\ openmesh,om5p-ac-v2) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1" "0x1" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 0bc187a245..e333231638 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -13,6 +13,7 @@ ath79_setup_interfaces() ucidef_set_interface_lan "eth0" "dhcp" ;; "avm,fritz300e"|\ + "ocedo,koala"|\ "ocedo,raccoon"|\ "pcs,cap324"|\ "tplink,re450-v2"|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 240a1bf1dd..c6d6c0157d 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,6 +87,10 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in + "ocedo,koala") + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(mtd_get_mac_binary art 12) + ;; "openmesh,om5p-ac-v2") ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts new file mode 100644 index 00..e0d9680add --- /dev/null +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9557.dtsi" + +/ { + compatible = "ocedo,koala", "qca,qca9557"; + model = "OCEDO Koala"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = + }; + + leds { + compatible = "gpio-leds"; + + power { + label = "koala:green:power"; + gpios = < 22 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wifi2 { + label = "koala:yellow:wlan2"; + gpios = < 23 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + default-state = "off"; + }; + + wifi5 { + label = "koala:red:wlan58"; +
[OpenWrt-Devel] [PATCH 3/4] kernel: allow device-tree configuration of at803x
This commit adds the ability to configure specific functions of the at803x series ethernet-PHYs, which were previously configured exclusively with the help of platform-data, via device-tree. This is needed to fully support existing boards of the ar71xx platform. Signed-off-by: David Bauer --- ...phy-at803x-allow-to-configure-via-dt.patch | 49 +++ 1 file changed, 49 insertions(+) create mode 100644 target/linux/generic/pending-4.14/736-net-phy-at803x-allow-to-configure-via-dt.patch diff --git a/target/linux/generic/pending-4.14/736-net-phy-at803x-allow-to-configure-via-dt.patch b/target/linux/generic/pending-4.14/736-net-phy-at803x-allow-to-configure-via-dt.patch new file mode 100644 index 00..daff25b633 --- /dev/null +++ b/target/linux/generic/pending-4.14/736-net-phy-at803x-allow-to-configure-via-dt.patch @@ -0,0 +1,49 @@ +Index: linux-4.14.60/drivers/net/phy/at803x.c +=== +--- linux-4.14.60.orig/drivers/net/phy/at803x.c linux-4.14.60/drivers/net/phy/at803x.c +@@ -354,6 +354,14 @@ static int at803x_config_init(struct phy + AT803X_DEBUG_TX_CLK_DLY_EN, 0); + } + ++#ifdef CONFIG_OF_MDIO ++ if (phydev->mdio.dev.of_node && ++ of_property_read_bool(phydev->mdio.dev.of_node, ++"at803x-disable-smarteee")) { ++ at803x_disable_smarteee(phydev); ++ } ++#endif ++ + return 0; + } + +@@ -392,6 +400,7 @@ static void at803x_link_change_notify(st + { + struct at803x_priv *priv = phydev->priv; + struct at803x_platform_data *pdata; ++ u8 fixup_rgmii_tx_delay = 0; + pdata = dev_get_platdata(>mdio.dev); + + /* +@@ -421,8 +430,19 @@ static void at803x_link_change_notify(st + } else { + priv->phy_reset = false; + } +- if (pdata && pdata->fixup_rgmii_tx_delay && +- phydev->speed != priv->prev_speed) { ++ ++ if (pdata && pdata->fixup_rgmii_tx_delay) ++ fixup_rgmii_tx_delay = 1; ++ ++#ifdef CONFIG_OF_MDIO ++ if (phydev->mdio.dev.of_node && ++ of_property_read_bool(phydev->mdio.dev.of_node, ++"at803x-fixup-rgmii-tx-delay")) { ++ fixup_rgmii_tx_delay = 1; ++ } ++#endif ++ ++ if (fixup_rgmii_tx_delay && phydev->speed != priv->prev_speed) { + switch (phydev->speed) { + case SPEED_10: + case SPEED_100: -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/4] ath79: fix QCA9557 eth PLL settings
The QCA9557 dtsi is currently missing pll-handle and pll-regs for both eth0 and eth1, therefore PLL settings won't be applied. This commit fixes this behavior. Signed-off-by: David Bauer --- target/linux/ath79/dts/qca9557.dtsi | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/ath79/dts/qca9557.dtsi b/target/linux/ath79/dts/qca9557.dtsi index 4f797a5543..e586f46433 100644 --- a/target/linux/ath79/dts/qca9557.dtsi +++ b/target/linux/ath79/dts/qca9557.dtsi @@ -109,7 +109,7 @@ pll: pll-controller@1805 { compatible = "qca,ar9557-pll", - "qca,qca9550-pll"; + "qca,qca9550-pll", "syscon"; reg = <0x1805 0x50>; #clock-cells = <1>; @@ -295,6 +295,9 @@ { compatible = "qca,qca9550-eth", "syscon", "simple-mfd"; + pll-reg = <0 0x28 0>; + pll-handle = <>; + pll-data = <0x82000101 0x8101 0x80001313>; phy-mode = "rgmii"; @@ -310,6 +313,9 @@ { compatible = "qca,qca9550-eth", "syscon", "simple-mfd"; + pll-reg = <0 0x48 0>; + pll-handle = <>; + pll-data = <0x82000101 0x8101 0x80001313>; phy-mode = "sgmii"; -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/4] uboot-envtools: add ath79 target
This adds uci entries for all ath79 devices for which this already was the case on ar71xx. Additionally we add the OCEDO Koala as there was no support in OpenWRT yet. Signed-off-by: David Bauer --- package/boot/uboot-envtools/files/ath79 | 26 + 1 file changed, 26 insertions(+) create mode 100644 package/boot/uboot-envtools/files/ath79 diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 new file mode 100644 index 00..4d9d2e8fe0 --- /dev/null +++ b/package/boot/uboot-envtools/files/ath79 @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (C) 2011-2014 OpenWrt.org +# + +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(board_name) + +case "$board" in +glinet,ar300m|\ +ocedo,raccoon|\ +openmesh,om5p-ac-v2) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1" "0x1" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ar71xx: allow to override at803x sgmii aneg status
When checking the outcome of the PHY autonegotiation status, at803x currently returns false in case the SGMII side is not established. Due to a hardware-bug, ag71xx needs to fixup the SoCs SGMII side, which it can't as it is not aware of the link-establishment. This commit allows to ignore the SGMII side autonegotiation status to allow ag71xx to do the fixup work. Signed-off-by: David Bauer --- .../files/arch/mips/ath79/mach-fritz450e.c| 1 + ...at803x-add-sgmii-aneg-override-pdata.patch | 42 +++ 2 files changed, 43 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.9/903-at803x-add-sgmii-aneg-override-pdata.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c index e48ddd65e7..4e99834d27 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c @@ -122,6 +122,7 @@ static struct gpio_keys_button fritz450E_gpio_keys[] __initdata = { static struct at803x_platform_data fritz450E_at803x_data = { .disable_smarteee = 1, .has_reset_gpio = 1, + .override_sgmii_aneg = 1, .reset_gpio = FRITZ450E_GPIO_PHY_RESET, }; diff --git a/target/linux/ar71xx/patches-4.9/903-at803x-add-sgmii-aneg-override-pdata.patch b/target/linux/ar71xx/patches-4.9/903-at803x-add-sgmii-aneg-override-pdata.patch new file mode 100644 index 00..9c922d155d --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/903-at803x-add-sgmii-aneg-override-pdata.patch @@ -0,0 +1,42 @@ +Index: linux-4.9.111/drivers/net/phy/at803x.c +=== +--- linux-4.9.111.orig/drivers/net/phy/at803x.c linux-4.9.111/drivers/net/phy/at803x.c +@@ -461,12 +461,15 @@ static void at803x_link_change_notify(st + + static int at803x_aneg_done(struct phy_device *phydev) + { ++ struct at803x_platform_data *pdata; + int ccr; + + int aneg_done = genphy_aneg_done(phydev); + if (aneg_done != BMSR_ANEGCOMPLETE) + return aneg_done; + ++ pdata = dev_get_platdata(>mdio.dev); ++ + /* +* in SGMII mode, if copper side autoneg is successful, +* also check SGMII side autoneg result +@@ -481,7 +484,8 @@ static int at803x_aneg_done(struct phy_d + /* check if the SGMII link is OK. */ + if (!(phy_read(phydev, AT803X_PSSR) & AT803X_PSSR_MR_AN_COMPLETE)) { + pr_warn("803x_aneg_done: SGMII link is not ok\n"); +- aneg_done = 0; ++ if (!pdata || !pdata->override_sgmii_aneg) ++ aneg_done = 0; + } + /* switch back to copper page */ + phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr | AT803X_BT_BX_REG_SEL); +Index: linux-4.9.111/include/linux/platform_data/phy-at803x.h +=== +--- linux-4.9.111.orig/include/linux/platform_data/phy-at803x.h linux-4.9.111/include/linux/platform_data/phy-at803x.h +@@ -7,6 +7,7 @@ struct at803x_platform_data { + int enable_rgmii_rx_delay:1; + int fixup_rgmii_tx_delay:1; + int has_reset_gpio:1; ++ int override_sgmii_aneg:1; + int reset_gpio; + }; + -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] ar71xx: fix QCA955X SGMII link loss
The QCA955X is affected by a hardware bug which causes link-loss of the SGMII link between SoC and PHY. This happens on change of link-state or speed. It is not really known what causes this bug. It definitely occurs when using a AR8033 Gigabit Ethernet PHY. Qualcomm solves this Bug in a similar fashion. We need to apply the fix on a per-device base via platform-data as performing the fixup work will break connectivity in case the SGMII interface is connected to a Switch. This bug was first proposed to be fixed by Sven Eckelmann in 2016. https://patchwork.ozlabs.org/patch/604782/ Based-on-patch-by: Sven Eckelmann Signed-off-by: David Bauer --- .../files/arch/mips/ath79/mach-fritz450e.c| 1 + .../include/asm/mach-ath79/ag71xx_platform.h | 1 + .../net/ethernet/atheros/ag71xx/ag71xx.h | 2 + .../net/ethernet/atheros/ag71xx/ag71xx_main.c | 79 +++ .../940-qca955x-add-more-registers.patch | 44 +++ 5 files changed, 127 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.9/940-qca955x-add-more-registers.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c index ee0a185304..e48ddd65e7 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz450e.c @@ -155,6 +155,7 @@ static void __init fritz450E_setup(void) { ath79_eth0_data.mii_bus_dev = _mdio1_device.dev; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; ath79_eth0_data.phy_mask = BIT(FRITZ450E_PHY_ADDRESS); + ath79_eth0_data.enable_sgmii_fixup = 1; ath79_eth0_pll_data.pll_1000 = 0x0300; ath79_eth0_pll_data.pll_100 = 0x0101; ath79_eth0_pll_data.pll_10 = 0x1313; diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h index c4c3a6d44c..e476d57e45 100644 --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h @@ -37,6 +37,7 @@ struct ag71xx_platform_data { u8 is_ar724x:1; u8 has_ar8216:1; u8 use_flow_control:1; + u8 enable_sgmii_fixup:1; u8 disable_inline_checksum_engine:1; struct ag71xx_switch_platform_data *switch_data; diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h index 77ee5b36ec..2d9a865043 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h @@ -66,6 +66,8 @@ #define AG71XX_TX_RING_SIZE_MAX128 #define AG71XX_RX_RING_SIZE_MAX256 +#define QCA955X_SGMII_LINK_WAR_MAX_TRY 10 + #ifdef CONFIG_AG71XX_DEBUG #define DBG(fmt, args...) pr_debug(fmt, ## args) #else diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 54ec8e67b3..d89579298f 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -31,6 +31,7 @@ MODULE_PARM_DESC(msg_level, "Message level (-1=defaults,0=none,...,16=all)"); #define ETH_SWITCH_HEADER_LEN 2 static int ag71xx_tx_packets(struct ag71xx *ag, bool flush); +static void ag71xx_qca955x_sgmii_init(void); static inline unsigned int ag71xx_max_frame_len(unsigned int mtu) { @@ -610,6 +611,9 @@ __ag71xx_link_adjust(struct ag71xx *ag, bool update) if (update && pdata->set_speed) pdata->set_speed(ag->speed); + if (update && pdata->enable_sgmii_fixup) + ag71xx_qca955x_sgmii_init(); + ag71xx_wr(ag, AG71XX_REG_MAC_CFG2, cfg2); ag71xx_wr(ag, AG71XX_REG_FIFO_CFG5, fifo5); ag71xx_wr(ag, AG71XX_REG_MAC_IFCTL, ifctl); @@ -913,6 +917,81 @@ static void ag71xx_tx_timeout(struct net_device *dev) schedule_delayed_work(>restart_work, 1); } +static void ag71xx_bit_set(void __iomem *reg, u32 bit) +{ + u32 val = __raw_readl(reg) | bit; + __raw_writel(val, reg); + __raw_readl(reg); +} + +static void ag71xx_bit_clear(void __iomem *reg, u32 bit) +{ + u32 val = __raw_readl(reg) & ~bit; + __raw_writel(val, reg); + __raw_readl(reg); +} + +static void ag71xx_qca955x_sgmii_init() +{ + void __iomem *gmac_base; + u32 mr_an_status, sgmii_status; + u8 tries = 0; + + gmac_base = ioremap_nocache(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); + + if (!gmac_base) +
[OpenWrt-Devel] [PATCH 2/2] ath79: add support for Fritz!Box 4020
This commit adds support for the AVM Fritz!Box 4020 WiFi-router. SoC: Qualcomm Atheros QCA9561 (Dragonfly) 750MHz RAM: Winbond W971GG6KB-25 FLASH: Macronix MX25L12835F WiFi: QCA9561 b/g/n 3x3 450Mbit/s USB: 1x USB 2.0 IN:WPS button, WiFi button OUT: Power LED green, Internet LED green, WLAN LED green, LAN LED green, INFO LED green, INFO LED red UART: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet (LAN + WAN) - WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - LEDs Not working: - USB port Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. After transfer is complete you need to powercycle the device to boot OpenWRT. Signed-off-by: David Bauer --- .../ath79/base-files/etc/board.d/01_leds | 4 + .../ath79/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/firmware/10-ath9k-eeprom| 10 ++ .../linux/ath79/dts/qca9561_avm_fritz4020.dts | 169 ++ target/linux/ath79/image/generic.mk | 14 ++ .../005-gpio-74x164-add-initvals.patch| 12 ++ 6 files changed, 214 insertions(+) create mode 100644 target/linux/ath79/dts/qca9561_avm_fritz4020.dts create mode 100644 target/linux/ath79/patches-4.14/005-gpio-74x164-add-initvals.patch diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index c3dc1bbe56..f058bf599e 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -17,6 +17,10 @@ avm,fritz300e) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100" ;; +avm,fritz4020) + ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" + ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x1E" + ;; etactica,eg200) ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0" ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index fe2d5859d3..33bea4de4e 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -42,6 +42,7 @@ ath79_setup_interfaces() etactica,eg200) ucidef_set_interface_lan "eth0" "dhcp" ;; + avm,fritz4020|\ glinet,ar150|\ glinet,ar300m) ucidef_set_interfaces_lan_wan "eth1" "eth0" @@ -149,6 +150,10 @@ ath79_setup_macs() avm,fritz300e) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) ;; + avm,fritz4020) + lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) + wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)")) + ;; dlink,dir-825-b1) lan_mac=$(mtd_get_mac_text "caldata" 65440) wan_mac=$(mtd_get_mac_text "caldata" 65460) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 29c11bbd5f..34ef2f2137 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -162,4 +162,14 @@ case "$FIRMWARE" in ;; esac ;; +"ath9k-eeprom-ahb-1810.wmac.bin") + case $board in + "avm,fritz4020") + ath9k_eeprom_extract_reverse "urlader" 5441 1088 + ;; + *) + ath9k_eeprom_die "board $board is not supported yet" + ;; + esac + ;; esac diff --git a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts new file mode 10064
[OpenWrt-Devel] [PATCH 1/2] ath79: add QCA956x GMAC config
This commit adds the ability to configure the GMAC of the QCA956x. Signed-off-by: David Bauer --- target/linux/ath79/dts/qca956x.dtsi | 5 + .../net/ethernet/atheros/ag71xx/ag71xx_gmac.c | 13 + 2 files changed, 18 insertions(+) diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index 10c88eedc2..8145371747 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -222,6 +222,11 @@ #address-cells = <1>; #size-cells = <0>; }; + + gmac: gmac@1807 { + compatible = "qca,qca9560-gmac"; + reg = <0x1807 0x64>; + }; }; usb_phy0: usb-phy { diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_gmac.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_gmac.c index 55a8f57f15..2e5fb3a641 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_gmac.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_gmac.c @@ -75,6 +75,17 @@ static void ag71xx_setup_gmac_955x(struct device_node *np, void __iomem *base) __raw_writel(val, base + QCA955X_GMAC_REG_ETH_CFG); } +static void ag71xx_setup_gmac_956x(struct device_node *np, void __iomem *base) +{ + u32 val = __raw_readl(base + QCA956X_GMAC_REG_ETH_CFG); + + ag71xx_of_bit(np, "switch-phy-swap", , QCA956X_ETH_CFG_SW_PHY_SWAP); + ag71xx_of_bit(np, "switch-phy-addr-swap", , + QCA956X_ETH_CFG_SW_PHY_ADDR_SWAP); + + __raw_writel(val, base + QCA956X_GMAC_REG_ETH_CFG); +} + int ag71xx_setup_gmac(struct device_node *np) { struct device_node *np_dev; @@ -102,6 +113,8 @@ int ag71xx_setup_gmac(struct device_node *np) ag71xx_setup_gmac_934x(np, base); else if (of_device_is_compatible(np_dev, "qca,qca9550-gmac")) ag71xx_setup_gmac_955x(np, base); + else if (of_device_is_compatible(np_dev, "qca,qca9560-gmac")) + ag71xx_setup_gmac_956x(np, base); iounmap(base); -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] build: add mkrasimage
Hi Christian, I wrote the bash version because of issues in the past with C implementations of firmware packers for the Meraki routers (mkmerakifw.c and mkmerakifw-old.c). The issue there was that the main dev was coming from a sysadmin background and as with many OpenWrt users he had problems with C (endiannes!). As for what implementation is better. Why not let Karl Palsson (or any other commentor that wants to join ;) ) decide? I didn't want to start a race here, I was just more comfortable with finishing my C implementation as i have a problem with understanding such shell-scripts. From my understanding your linked script fixed the issues? I'm not sure why the script in OpenWRT is that old. IIRC i took it directly from your tree without further modifications. Note: The NBG6617 isn't the only device from ZyXEL that utilize the ras image. In fact, the "original" version of the notes above was written by Benjamin Berg and can still be found as a rather long comment in the NBG6616 image generation code under /target/linux/ar71xx/image/generic.mk [0]. (And there is at least one more device that can make use of ras: the NBG6817). So chances are, there that whatever "wins" will need to be updated to support those routers as well. Good point (didn't thought about that). At first glance the NBG6817 looks identical while the NBG6616 is missing the kernel-header part. I will see how i can support those two devices. There is also the NBG6716 around, but his one is using legacy build-code. So for this patch i see it as out-of-scope (although the header looks identical to the NBG6616). Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ath79: fix SUPPORTED_DEVICES for TL-MR3020
On 8/19/18 12:13 AM, Karl Palsson wrote: > These were removed as "it was intended to be required to force > when switching "architectures"" I disagreed then, but it got > railed through, so it's good to see I'm not the only one who > thought you should be able to upgrade from ar71xx to ath79 on the > same hardware> See also https://github.com/openwrt/openwrt/pull/1222 I understand the point of signaling people that things are most like going to break with the target-switch. I was expecting the compatible string to be there exactly for this reason as the compatible string for ath79 is automatically added from the device-tree. I'm not sure which approach is "better". On one hand, this makes upgrading via LuCI (with settings not preserved) not possible. I would expect people to read release nodes and follow the path accordingly, on the other hand you could argue one who is reading release notes is also capable of upgrading via CLI/SSH. Middle ground would be (in my opinion) to allow forced sysupgrade via LuCI, but I'm not sure how much effort this would be. Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] build: add mkrasimage
Hi, On 8/21/18 8:31 AM, Stefan Lippers-Hollmann wrote: > While this passes the version check, the appended git hash does break > later on in the flashing process - so at the moment only the numerical > revision (of DISTRIB_REVISION='r7890-40eb9bda44') seems to be safe: > > RAS_VERSION := "V1.99(OWRT.$$(shell echo $(REVISION) | sed -e s/^r// -e > s/\\-.*//))C0" Does the version string contained in the RAS-header get exposed to a user in any way? If not, i would go for using a static (high enough so it probably never get's used by ZyXEL) version string and call it a day before we are over-complicating things here. The NBG6617 btw. does not have such a validation (Downgrades using older ZyXEL-firmware are also possible using the Web-UI) Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] build: add mkrasimage
The current make-ras.sh image generation script for the ZyXEL NBG6617 has portability issues with bash. Because of this, factory images are currently not built correctly by the OpenWRT buildbots. This commit replaces the make-ras.sh by C-written mkrasimage. The old script is still kept but can be deleted in the future. The new mkrasimage is also compatible with other ZyXEL devices using the ras image-format. This is not tested with a OpenWRT build but it correctly builds the header for ZyXEL factory images for all devices it is added to. Signed-off-by: David Bauer --- v2 changes: - Rework image-generation code - Add factory image for NBG6616 - Add factory image for NBG6817 include/image-commands.mk | 18 +- scripts/make-ras.sh | 196 --- target/linux/ar71xx/image/generic.mk | 6 +- target/linux/ipq40xx/image/Makefile | 2 +- target/linux/ipq806x/image/Makefile | 6 +- tools/firmware-utils/Makefile | 1 + tools/firmware-utils/src/mkrasimage.c | 474 ++ 7 files changed, 495 insertions(+), 208 deletions(-) delete mode 100755 scripts/make-ras.sh create mode 100644 tools/firmware-utils/src/mkrasimage.c diff --git a/include/image-commands.mk b/include/image-commands.mk index 3cc5dc21e1..61ba49de51 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -49,17 +49,17 @@ define Build/eva-image mv $@.new $@ endef -define Build/make-ras +define Build/zyxel-ras-image let \ newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \ - $(TOPDIR)/scripts/make-ras.sh \ - --board $(RAS_BOARD) \ - --version $(RAS_VERSION) \ - --kernel $(call param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \ - --rootfs $@ \ - --rootfssize $$newsize \ - $@.new - @mv $@.new $@ + $(STAGING_DIR_HOST)/bin/mkrasimage \ + -b $(RAS_BOARD) \ + -v $(RAS_VERSION) \ + -r $@ \ + -s $$newsize \ + -o $@.new \ + $(if $(findstring seperate-kernel,$(word 1,$(1))),-k $(IMAGE_KERNEL)) \ + && mv $@.new $@ endef define Build/mkbuffaloimg diff --git a/scripts/make-ras.sh b/scripts/make-ras.sh deleted file mode 100755 index ccddaa0016..00 --- a/scripts/make-ras.sh +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env bash -# -# --- ZyXEL header format --- -# Original Version by Benjamin Berg -# -# The firmware image prefixed with a header (which is written into the MTD device). -# The header is one erase block (~64KiB) in size, but the checksum only convers the -# first 2KiB. Padding is 0xff. All integers are in big-endian. -# -# The checksum is always a 16-Bit System V checksum (sum -s) stored in a 32-Bit integer. -# -# 4 bytes: checksum of the rootfs image -# 4 bytes: length of the contained rootfs image file (big endian) -# 32 bytes: Firmware Version string (NUL terminated, 0xff padded) -# 4 bytes: checksum over the header partition (big endian - see below) -# 32 bytes: Model (e.g. "NBG6617", NUL termiated, 0xff padded) -# 4 bytes: checksum of the kernel partition -# 4 bytes: length of the contained kernel image file (big endian) -# rest: 0xff padding -# -# The checksums are calculated by adding up all bytes and if a 16bit -# overflow occurs, one is added and the sum is masked to 16 bit: -# csum = csum + databyte; if (csum > 0x) { csum += 1; csum &= 0x }; -# Should the file have an odd number of bytes then the byte len-0x800 is -# used additionally. -# -# The checksum for the header is calculated over the first 2048 bytes with -# the rootfs image checksum as the placeholder during calculation. -# -# The header is padded with 0xff to the erase block size of the device. -# -board="" -version="" -kernel="" -rootfs="" -outfile="" -err="" - -while [ "$1" ]; do - case "$1" in - "--board") - board="$2" - shift - shift - continue - ;; - "--version") - version="$2" - shift - shift - continue - ;; - "--kernel") - kernel="$2" - shift - shift - continue - ;; - "--rootfs") - rootfs="$2" - shift - shift - continue - ;; - "--rootfssize") - rootfssize="$2" - shift - shift - continue - ;; -
[OpenWrt-Devel] [PATCH v3] ath79: add support for Fritz!Box 4020
This commit adds support for the AVM Fritz!Box 4020 WiFi-router. SoC: Qualcomm Atheros QCA9561 (Dragonfly) 750MHz RAM: Winbond W971GG6KB-25 FLASH: Macronix MX25L12835F WiFi: QCA9561 b/g/n 3x3 450Mbit/s USB: 1x USB 2.0 IN:WPS button, WiFi button OUT: Power LED green, Internet LED green, WLAN LED green, LAN LED green, INFO LED green, INFO LED red UART: Header Next to Black metal shield Pinout is 3.3V - RX - TX - GND (Square Pad is 3.3V) The Serial setting is 115200-8-N-1. Tested and working: - Ethernet (LAN + WAN) - WiFi (correct MAC) - Installation via EVA bootloader - OpenWRT sysupgrade - Buttons - LEDs Not working: - USB port A few words about the shift-register: AVM used a trick to control the shift-register for the LEDs with only 2 pins, SERCLK and MOSI. Q7S, normally used for daisy-chaining multiple shift-registers, pulls the latch, moving the shift register-state to the storage register. It also pulls down MR (normally pulled up) to clear the storage register, so the latch gets released and will not be pulled by the remaining bits in the shift-register. Shift register is all-zero after this. For that we need to make sure output 7 is set to high on driver probe. We accomplish this by using gpio-hogging. Installation via EVA: In the first seconds after Power is connected, the bootloader will listen for FTP connections on 169.254.157.1 (Might also be 192.168.178.1). Firmware can be uploaded like following: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put openwrt-sysupgrade.bin mtd1 Note that this procedure might take up to two minutes. After transfer is complete you need to powercycle the device to boot OpenWRT. Signed-off-by: David Bauer --- v3 changes: - Rebased onto master - Add GPIO-hog to device-tree - Add SR description to commit message - Removed initvals kernel-patch .../ath79/base-files/etc/board.d/01_leds | 4 + .../ath79/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/firmware/10-ath9k-eeprom| 3 + .../linux/ath79/dts/qca9561_avm_fritz4020.dts | 180 ++ target/linux/ath79/image/generic.mk | 14 ++ 5 files changed, 206 insertions(+) create mode 100644 target/linux/ath79/dts/qca9561_avm_fritz4020.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 73f350cae2..9d63254a67 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -17,6 +17,10 @@ avm,fritz300e) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100" ;; +avm,fritz4020) + ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" + ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x1E" + ;; buffalo,whr-g301n) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 603251954b..1854583418 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -44,6 +44,7 @@ ath79_setup_interfaces() etactica,eg200) ucidef_set_interface_lan "eth0" "dhcp" ;; + avm,fritz4020|\ glinet,ar150|\ glinet,ar300m) ucidef_set_interfaces_lan_wan "eth1" "eth0" @@ -155,6 +156,10 @@ ath79_setup_macs() avm,fritz300e) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) ;; + avm,fritz4020) + lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) + wan_mac=$(fritz_tffs -n macb -i $(find_mtd_part "tffs (1)")) + ;; dlink,dir-825-b1) lan_mac=$(mtd_get_mac_text "caldata" 65440) wan_mac=$(mtd_get_mac_text "caldata" 65460) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index f668a82fa2..9cbce4cecd 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/
[OpenWrt-Devel] [PATCH v3] build: add mkrasimage
The current make-ras.sh image generation script for the ZyXEL NBG6617 has portability issues with bash. Because of this, factory images are currently not built correctly by the OpenWRT buildbots. This commit replaces the make-ras.sh by C-written mkrasimage. The new mkrasimage is also compatible with other ZyXEL devices using the ras image-format. This is not tested with the NBG6616 but it correctly builds the header for ZyXEL factory image. Signed-off-by: David Bauer --- v3 changes: - Removed remark about leaving the old script - Adjusted NBG6817 RAS_VERSION string to allow Web-UI flashing include/image-commands.mk | 18 +- scripts/make-ras.sh | 196 --- target/linux/ar71xx/image/generic.mk | 6 +- target/linux/ipq40xx/image/Makefile | 2 +- target/linux/ipq806x/image/Makefile | 6 +- tools/firmware-utils/Makefile | 1 + tools/firmware-utils/src/mkrasimage.c | 474 ++ 7 files changed, 495 insertions(+), 208 deletions(-) delete mode 100755 scripts/make-ras.sh create mode 100644 tools/firmware-utils/src/mkrasimage.c diff --git a/include/image-commands.mk b/include/image-commands.mk index 3cc5dc21e1..61ba49de51 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -49,17 +49,17 @@ define Build/eva-image mv $@.new $@ endef -define Build/make-ras +define Build/zyxel-ras-image let \ newsize="$(subst k,* 1024,$(RAS_ROOTFS_SIZE))"; \ - $(TOPDIR)/scripts/make-ras.sh \ - --board $(RAS_BOARD) \ - --version $(RAS_VERSION) \ - --kernel $(call param_get_default,kernel,$(1),$(IMAGE_KERNEL)) \ - --rootfs $@ \ - --rootfssize $$newsize \ - $@.new - @mv $@.new $@ + $(STAGING_DIR_HOST)/bin/mkrasimage \ + -b $(RAS_BOARD) \ + -v $(RAS_VERSION) \ + -r $@ \ + -s $$newsize \ + -o $@.new \ + $(if $(findstring seperate-kernel,$(word 1,$(1))),-k $(IMAGE_KERNEL)) \ + && mv $@.new $@ endef define Build/mkbuffaloimg diff --git a/scripts/make-ras.sh b/scripts/make-ras.sh deleted file mode 100755 index ccddaa0016..00 --- a/scripts/make-ras.sh +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env bash -# -# --- ZyXEL header format --- -# Original Version by Benjamin Berg -# -# The firmware image prefixed with a header (which is written into the MTD device). -# The header is one erase block (~64KiB) in size, but the checksum only convers the -# first 2KiB. Padding is 0xff. All integers are in big-endian. -# -# The checksum is always a 16-Bit System V checksum (sum -s) stored in a 32-Bit integer. -# -# 4 bytes: checksum of the rootfs image -# 4 bytes: length of the contained rootfs image file (big endian) -# 32 bytes: Firmware Version string (NUL terminated, 0xff padded) -# 4 bytes: checksum over the header partition (big endian - see below) -# 32 bytes: Model (e.g. "NBG6617", NUL termiated, 0xff padded) -# 4 bytes: checksum of the kernel partition -# 4 bytes: length of the contained kernel image file (big endian) -# rest: 0xff padding -# -# The checksums are calculated by adding up all bytes and if a 16bit -# overflow occurs, one is added and the sum is masked to 16 bit: -# csum = csum + databyte; if (csum > 0x) { csum += 1; csum &= 0x }; -# Should the file have an odd number of bytes then the byte len-0x800 is -# used additionally. -# -# The checksum for the header is calculated over the first 2048 bytes with -# the rootfs image checksum as the placeholder during calculation. -# -# The header is padded with 0xff to the erase block size of the device. -# -board="" -version="" -kernel="" -rootfs="" -outfile="" -err="" - -while [ "$1" ]; do - case "$1" in - "--board") - board="$2" - shift - shift - continue - ;; - "--version") - version="$2" - shift - shift - continue - ;; - "--kernel") - kernel="$2" - shift - shift - continue - ;; - "--rootfs") - rootfs="$2" - shift - shift - continue - ;; - "--rootfssize") - rootfssize="$2" - shift - shift - continue - ;; - *) - if [ ! "$outfile" ]; then - outfi
[OpenWrt-Devel] [PATCH] ath79: fix SUPPORTED_DEVICES for TL-MR3020
Sysupgrading to ath79 from ar71xx currently fails because of mismatching supported_devices. ar71xx is expecting "tl-mr3020" which is missing in the ath79 image. Upgrading from ath79 is unaffected, as the image contains the old string for ar71xx and the new one coming from the device-tree. Signed-off-by: David Bauer --- target/linux/ath79/image/tiny-tp-link.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/image/tiny-tp-link.mk b/target/linux/ath79/image/tiny-tp-link.mk index 6ccc9d7dba..dadcd24b42 100644 --- a/target/linux/ath79/image/tiny-tp-link.mk +++ b/target/linux/ath79/image/tiny-tp-link.mk @@ -17,7 +17,7 @@ define Device/tplink_tl-mr3020-v1 DEVICE_TITLE := TP-LINK TL-MR3020 v1 DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x3021 - SUPPORTED_DEVICES += tl-mr3020-v1 + SUPPORTED_DEVICES += tl-mr3020 endef TARGET_DEVICES += tplink_tl-mr3020-v1 -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ath79: fix OCEDO Raccoon
The OCEDO Raccoon only has one ethernet port, but currently uci sections for WAN and LAN are created. Additionally, newer versions of the devices U-Boot (units with SteelWRT) set the kernel-cmdline and therefore overwrite the partition-layout. We fix this by overwriting the cmdline supplied by the bootloader. Signed-off-by: David Bauer --- target/linux/ath79/base-files/etc/board.d/02_network | 1 + target/linux/ath79/dts/ar9344_ocedo_raccoon.dts | 4 2 files changed, 5 insertions(+) diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index dd75a55b73..c5e23e4e50 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -13,6 +13,7 @@ ath79_setup_interfaces() ucidef_set_interface_lan "eth0" "dhcp" ;; "avm,fritz300e"|\ + "ocedo,raccoon"|\ "tplink,re450-v2"|\ "tplink,tl-mr10u"|\ "tplink,tl-wr703n"|\ diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts index a98f251e34..01d5dae307 100644 --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts @@ -10,6 +10,10 @@ model = "OCEDO Raccoon"; compatible = "ocedo,raccoon", "qca,ar9344"; + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + aliases { led-status = }; -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Ubiquiti UniFi AC range missing factory images?
Hi Stijn, On 9/8/18 5:47 PM, Stijn Segers wrote: > Since > newer Ubiquiti images (after March 2017 it seems) also lack the mtd > command necessary to flash OpenWrt, I was wondering why there's only > sysupgrade images. After all, Ubiquiti might pull those older firmwares > at any time, and that would mean people which buy these devices would be > unable to install OpenWrt on them. IIRC you can also extract mtd from any old OpenWRT 12.09 ar71xx-image and use it with the Ubiquiti-firmware. Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ath79: flag FritzBox 4020 buttons as active low
Buttons of AVM FritzBox 4020 are incorrectly flagged as active high. This was an oversight as RFKill button was working as expected even with incorrectly flagged GPIO. Signed-off-by: David Bauer --- target/linux/ath79/dts/qca9561_avm_fritz4020.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts index 6b30c036ea..8489c8a1e6 100644 --- a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts +++ b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts @@ -96,13 +96,13 @@ wps_button { label = "WPS button"; linux,code = ; - gpios = < 2 GPIO_ACTIVE_HIGH>; + gpios = < 2 GPIO_ACTIVE_LOW>; }; wlan_button { label = "WLAN button"; linux,code = ; - gpios = < 21 GPIO_ACTIVE_HIGH>; + gpios = < 21 GPIO_ACTIVE_LOW>; }; }; }; -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] ar71xx: flag FritzBox 4020 buttons as active low
Buttons of AVM FritzBox 4020 are incorrectly flagged as active high. This was an oversight as RFKill button was working as expected even with incorrectly flagged GPIO. Signed-off-by: David Bauer --- This commit should also be applied to the openwrt-18.06 branch as the issue is also present there. target/linux/ar71xx/files/arch/mips/ath79/mach-fritz4020.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz4020.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz4020.c index ed7f9a8b3e..c00cf681b2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz4020.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-fritz4020.c @@ -169,7 +169,7 @@ static struct gpio_keys_button fritz4020_gpio_keys[] __initdata = { .code = KEY_RFKILL, .debounce_interval = FRITZ4020_KEYS_DEBOUNCE_INTERVAL, .gpio = FRITZ4020_GPIO_BTN_WLAN, - .active_low = 0, + .active_low = 1, }, { .desc = "WPS button", @@ -177,7 +177,7 @@ static struct gpio_keys_button fritz4020_gpio_keys[] __initdata = { .code = KEY_WPS_BUTTON, .debounce_interval = FRITZ4020_KEYS_DEBOUNCE_INTERVAL, .gpio = FRITZ4020_GPIO_BTN_WPS, - .active_low = 0, + .active_low = 1, }, }; -- 2.18.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ar71xx: move OCEDO Koala back to generic subtarget
This changes the OCEDO Koala flash-layout to a unified firmware partition, thus making the ar71xx-generic kernel fit in flash. Compile and runtested on OCEDO Koala. Signed-off-by: David Bauer --- target/linux/ar71xx/generic/config-default | 1 + target/linux/ar71xx/image/generic.mk | 9 + target/linux/ar71xx/image/tiny-senao.mk| 13 - target/linux/ar71xx/tiny/config-default| 1 - 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/target/linux/ar71xx/generic/config-default b/target/linux/ar71xx/generic/config-default index 5f3adecc22..26717b107c 100644 --- a/target/linux/ar71xx/generic/config-default +++ b/target/linux/ar71xx/generic/config-default @@ -106,6 +106,7 @@ CONFIG_ATH79_MACH_HORNET_UB=y CONFIG_ATH79_MACH_JA76PF=y CONFIG_ATH79_MACH_JWAP003=y CONFIG_ATH79_MACH_JWAP230=y +CONFIG_ATH79_MACH_KOALA=y CONFIG_ATH79_MACH_LAN_TURTLE=y CONFIG_ATH79_MACH_LIMA=y CONFIG_ATH79_MACH_MC_MAC1200R=y diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 9834e199ae..fedd37e219 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -822,6 +822,15 @@ define Device/jwap230 endef TARGET_DEVICES += jwap230 +define Device/koala + DEVICE_TITLE := OCEDO Koala + BOARDNAME := KOALA + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 7424k + MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),7424k(firmware),1536k(kernel2),5888k(rootfs2),1088k(data)ro,64k(id)ro,64k(art)ro +endef +TARGET_DEVICES += koala + define Device/r36a DEVICE_TITLE := ALFA Network R36A DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport -swconfig diff --git a/target/linux/ar71xx/image/tiny-senao.mk b/target/linux/ar71xx/image/tiny-senao.mk index a241e4a6f5..3a7f6776b3 100644 --- a/target/linux/ar71xx/image/tiny-senao.mk +++ b/target/linux/ar71xx/image/tiny-senao.mk @@ -26,16 +26,3 @@ define Device/ens202ext IMAGE/sysupgrade.bin := append-kernel | pad-to (KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size (IMAGE_SIZE) endef TARGET_DEVICES += ens202ext - -define Device/koala - DEVICE_TITLE := OCEDO Koala - BOARDNAME := KOALA - DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct - KERNEL_SIZE := 1536k - IMAGE_SIZE := 7424k - MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),1536k(kernel),5888k(rootfs),1536k(kernel2),5888k(rootfs2),1088k(data)ro,64k(id)ro,64k(art)ro,7424k@0x5(firmware) - KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma - KERNEL_INITRAMFS := $$(KERNEL) - IMAGE/sysupgrade.bin := append-kernel | pad-to (KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata | check-size (IMAGE_SIZE) -endef -TARGET_DEVICES += koala diff --git a/target/linux/ar71xx/tiny/config-default b/target/linux/ar71xx/tiny/config-default index 2c7b4b71aa..1148d8c451 100644 --- a/target/linux/ar71xx/tiny/config-default +++ b/target/linux/ar71xx/tiny/config-default @@ -14,7 +14,6 @@ CONFIG_ATH79_MACH_DIR_615_C1=y CONFIG_ATH79_MACH_DIR_615_I1=y CONFIG_ATH79_MACH_ENS202EXT=y CONFIG_ATH79_MACH_F9K1115V2=y -CONFIG_ATH79_MACH_KOALA=y CONFIG_ATH79_MACH_NBG460N=y CONFIG_ATH79_MACH_TEW_632BRP=y CONFIG_ATH79_MACH_TEW_712BR=y -- 2.19.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel: b53: register switch on probe
Currently, the b53 MDIO switch driver registers the switch on config-init and not on device probe. Because of this, the switch gets added every time the associated interface comes up. This commit fixes this behavior by registering the switch on device probe. Compile- and run-tested on OCEDO Koala. Signed-off-by: David Bauer --- .../files/drivers/net/phy/b53/b53_mdio.c | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c index 75bb4d941c..5934befc9e 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c @@ -273,55 +273,54 @@ static struct b53_io_ops b53_mdio_ops = { static int b53_phy_probe(struct phy_device *phydev) { - struct b53_device dev; + struct b53_device *dev; int ret; /* allow the generic phy driver to take over */ if (phydev->mdio.addr != B53_PSEUDO_PHY && phydev->mdio.addr != 0) return -ENODEV; - dev.current_page = 0xff; - dev.priv = phydev->mdio.bus; - dev.ops = _mdio_ops; - dev.pdata = NULL; - mutex_init(_mutex); + dev = b53_switch_alloc(>mdio.dev, _mdio_ops, phydev->mdio.bus); + if (!dev) + return -ENOMEM; - ret = b53_switch_detect(); + dev->current_page = 0xff; + dev->priv = phydev->mdio.bus; + dev->ops = _mdio_ops; + dev->pdata = NULL; + mutex_init(>reg_mutex); + + ret = b53_switch_detect(dev); if (ret) return ret; - if (is5325() || is5365()) + if (is5325(dev) || is5365(dev)) phydev->supported = SUPPORTED_100baseT_Full; else phydev->supported = SUPPORTED_1000baseT_Full; phydev->advertising = phydev->supported; + ret = b53_switch_register(dev); + if (ret) { + dev_err(dev->dev, "failed to register switch: %i\n", ret); + return ret; + } + + phydev->priv = dev; + return 0; } static int b53_phy_config_init(struct phy_device *phydev) { - struct b53_device *dev; - int ret; - - dev = b53_switch_alloc(>mdio.dev, _mdio_ops, phydev->mdio.bus); - if (!dev) - return -ENOMEM; + struct b53_device *dev = phydev->priv; /* we don't use page 0xff, so force a page set */ dev->current_page = 0xff; /* force the ethX as alias */ dev->sw_dev.alias = phydev->attached_dev->name; - ret = b53_switch_register(dev); - if (ret) { - dev_err(dev->dev, "failed to register switch: %i\n", ret); - return ret; - } - - phydev->priv = dev; - return 0; } -- 2.19.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] RFT: ar71xx - 4.14
Hi Koen, On 25.10.18 14:39, Koen Vandeputte wrote: > Hi All, > > As most of you know, ar71xx bumped to 4.14 which caused a slight kernel > oversize for some targets. > > I crafted some patches to address this, but it requires testing. > As I don't have any of these devices locally, I would like to request > for some testing on any of the following devices: > > - TP-LINK C25 V1 > - TP-LINK C58-V1 > - TP-LINK C59 V1 > - TP-LINK C60-V1 > - TP-LINK C60-V2 > - TP-LINK C7 V4 (also includes a bugfix for imagesize) > - TP-LINK C7 V5 > - TP-LINK ER355 > - TP-LINK TL-WR1043 V5 > - TP-LINK TL-WR902AC V1 > - TP-LINK TL-WR942N V1 > I've tested your changes on an Archer C58 v1 (EU) today - works without any problems! Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ath79: add support for Archer C58/C59 v1
This commit adds support for the Archer C58 v1 and C59 v1, previously supported in the ar71xx target. CPU: Qualcomm QCA9561 RAM: 64M (C58) / 128M (C59) FLASH: 8M (C58) / 16M (C59) WiFi: QCA9561 bgn 3x3:3 QCA9888 nac 2x2:2 LED: Power, WiFi 2.4, WiFi 5, WAN green, WAN amber, LAN, WPS Only C59: USB BTN: WPS, WiFi, Reset Installation Via Web-UI: Update factory image via Web-UI. Via TFTP: Rename factory image to "tp_recovery.bin" and place it in the root-dir of your tftp server. Configure to listen on 192.168.0.66. Power up the router while holding down the reset-button. The router will flash itself and reboot. Note: For TFTP, you might need a switch between router and computer, as link establishment might take to long. Signed-off-by: David Bauer --- .../ath79/base-files/etc/board.d/01_leds | 5 + .../ath79/base-files/etc/board.d/02_network | 4 +- .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 4 + .../dts/qca9561_tplink_archer-c58-v1.dts | 130 +++ .../dts/qca9561_tplink_archer-c59-v1.dts | 153 ++ .../ath79/dts/qca9561_tplink_archer-c5x.dtsi | 98 +++ target/linux/ath79/image/common-tp-link.mk| 20 +++ target/linux/ath79/image/generic-tp-link.mk | 22 +++ 9 files changed, 441 insertions(+), 1 deletion(-) create mode 100644 target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts create mode 100644 target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts create mode 100644 target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index f04eb7f5c6..95a4201fb2 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -49,6 +49,11 @@ pcs,cr3000) ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10" ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02" ;; +tplink,archer-c58-v1|\ +tplink,archer-c59-v1) + ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E" + ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0" + ;; tplink,re450-v2) ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx" ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link" diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 5f02c5769a..e3f8c3eee3 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -31,7 +31,9 @@ ath79_setup_interfaces() wd,mynet-wifi-rangeextender) ucidef_set_interface_lan "eth0" ;; - avm,fritz4020) + avm,fritz4020|\ + tplink,archer-c58-v1|\ + tplink,archer-c59-v1) ucidef_set_interface_wan "eth0" ucidef_add_switch "switch0" \ "0@eth1" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2" diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index dfe2d3ef31..d8d18191a7 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -127,6 +127,12 @@ case "$FIRMWARE" in ln -sf /lib/firmware/ath10k/pre-cal-pci-\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; + tplink,archer-c58-v1|\ + tplink,archer-c59-v1) + ath10kcal_extract "art" 20480 12064 + ln -sf /lib/firmware/ath10k/pre-cal-pci-\:00\:00.0.bin \ + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin + ;; esac ;; *) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 59c58f9c67..fe5aa64a19 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -18,6 +18,10 @@ case "$board" in [ "$PHYNBR" -eq 1 ] && \ echo $(k2t_get_mac "lan_mac") > /sys${DEVPATH}/macaddress
[OpenWrt-Devel] [PATCH] ipq40xx: fix NBG6617 LED mapping
The NBG6617's LEDs are wrongly identified in the 01_leds boardinit script (board instead of boardname), resulting in referencing non-existent LEDs in UCI. Signed-off-by: David Bauer --- target/linux/ipq40xx/base-files/etc/board.d/01_leds | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 475a8623f7..ab2f77ee10 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -35,9 +35,9 @@ meraki,mr33) ucidef_set_interface_lan "eth0" ;; zyxel,nbg6617) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2G" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5G" "phy1tpt" - ucidef_set_led_usbport "usb" "USB" "${board}:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" + ucidef_set_led_usbport "usb" "USB" "${boardname}:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1" ;; zyxel,wre6606) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt" -- 2.19.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] tools: tplink-safeloader: add C7v5 EU SupportList
Currently flash from WebIF is broken for Archer C7 v5 EU models as their SupportList entries are missing. The added entries originate from TP-Links latest Archer C7 v5 EU firmware. Signed-off-by: David Bauer --- tools/firmware-utils/src/tplink-safeloader.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index a51cca476e..2959a212f8 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -665,7 +665,11 @@ static struct device_info boards[] = { .support_list = "SupportList:\n" "{product_name:Archer C7,product_ver:5.0.0,special_id:}\n" - "{product_name:Archer C7,product_ver:5.0.0,special_id:5553}\n", + "{product_name:Archer C7,product_ver:5.0.0,special_id:4555}\n" + "{product_name:Archer C7,product_ver:5.0.0,special_id:5553}\n" + "{product_name:Archer C7,product_ver:5.0.0,special_id:4341}\n" + "{product_name:Archer C7,product_ver:5.0.0,special_id:4A50}\n" + "{product_name:Archer C7,product_ver:5.0.0,special_id:5457}\n", .support_trail = '\x00', .soft_ver = "soft_ver:1.0.0\n", -- 2.19.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ath79: add support for TP-Link Archer A7
Hello Karl, On 10.11.18 18:06, Karl-Felix Glatzer wrote: > This patch adds support for TP-Link Archer A7 > > Specification: > - SOC: QCA9563 > - Flash: 16 MiB (SPI) > - RAM: 128 MiB (DDR2) > - Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN > - Wireless: > - 2.4GHz (bgn) SoC internal > - 5GHz (ac) QCA988x > - USB: 1x USB 2.0 port > - Button: 1x power, 1x reset, 1x wps > - LED: 10x LEDs > - UART: holes in PCB > - Vcc, GND, RX, TX from ethernet port side > - 115200n8 > > Flash instruction using factory image: > > 1. Connect the computer to one of the LAN ports of the Archer A7 > 2. Set the computer IP to 192.168.0.66 > 3. Start a tftp server with the OpenWrt factory image in the tftp >root directory renamed to ArcherC7v5_tp_recovery.bin > 2. Connect power cable to Archer A7, press and hold the reset button >and turn the router on > 3. Keep the reset button pressed for ~5 seconds > 4. Wait ~150 seconds to complete flashing Does it really only accept the firmware by TFTP and blocks installation thru the TP-Link UI? Also the filename seems odd, although completely possible TP-Link uses the C7 filename. > Signed-off-by: Karl-Felix Glatzer > --- > .../ath79/base-files/etc/board.d/01_leds | 7 + > .../ath79/base-files/etc/board.d/02_network | 4 + > .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + > .../ath79/dts/qca9563_tplink_archer-a7-v5.dts | 255 ++ > target/linux/ath79/image/common-tp-link.mk| 9 + > target/linux/ath79/image/generic-tp-link.mk | 16 ++ > tools/firmware-utils/src/tplink-safeloader.c | 46 +++- > 7 files changed, 337 insertions(+), 1 deletion(-) > create mode 100644 target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts > > diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds > b/target/linux/ath79/base-files/etc/board.d/01_leds > index f04eb7f5c6..4ddf04ef84 100755 > --- a/target/linux/ath79/base-files/etc/board.d/01_leds > +++ b/target/linux/ath79/base-files/etc/board.d/01_leds > @@ -57,6 +57,13 @@ tplink,tl-mr3020-v1|\ > tplink,tl-mr3040-v2) > ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" > ;; > +tplink,archer-a7-v5) > + ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02" > + ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" > "0x04" > + ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" > "0x08" > + ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" > "0x10" > + ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" > "0x20" > + ;; > tplink,tl-wr1043nd-v4) > ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20" > ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" > "0x10" > diff --git a/target/linux/ath79/base-files/etc/board.d/02_network > b/target/linux/ath79/base-files/etc/board.d/02_network > index 5f02c5769a..7c7c9e14e1 100755 > --- a/target/linux/ath79/base-files/etc/board.d/02_network > +++ b/target/linux/ath79/base-files/etc/board.d/02_network > @@ -107,6 +107,10 @@ ath79_setup_interfaces() > ucidef_add_switch "switch0" \ > "0@eth0" "3:lan:1" "5:lan:2" "4:wan" > ;; > + tplink,archer-a7-v5) > + ucidef_add_switch "switch0" \ > + "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" > + ;; > tplink,archer-c7-v1|\ > tplink,archer-c7-v2|\ > tplink,tl-wdr4900-v2) > diff --git > a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > index dfe2d3ef31..6001df07bb 100644 > --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > @@ -100,6 +100,7 @@ case "$FIRMWARE" in > ath10kcal_extract "ART" 20480 2116 > ath10kcal_patch_mac $(macaddr_add $(cat > /sys/class/net/eth0/address) +16) > ;; > + tplink,archer-a7-v5|\ > tplink,archer-c7-v2) > ath10kcal_extract "art" 20480 2116 > ath10kcal_patch_mac $(macaddr_add $(cat > /sys/class/net/eth1/address) -1) > diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts > b/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts > new file mode 100644 > index 00..c62cb63b0d > --- /dev/null > +++ b/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts > @@ -0,0 +1,255 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT > +/dts-v1/; > + > +#include > +#include > + > +#include "qca956x.dtsi" > + > +/ { > + compatible = "tplink,archer-a7-v5", "qca,qca9563"; > + model = "TP-Link Archer A7 Version 5"; This might e a bit of personal preference, but TP-Link never calls their Devices "XXX Version Y", so i would go for "TP-Link Archer A7 v5", as everywhere else it is referenced as such
[OpenWrt-Devel] [PATCH v3 1/3] tools: mktplinkfw2: add split-uboot layout
This commit adds the split-uboot partition layout used by the Archer C50 v4 to mktplinkfw2. Signed-off-by: David Bauer --- tools/firmware-utils/src/mktplinkfw2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/firmware-utils/src/mktplinkfw2.c b/tools/firmware-utils/src/mktplinkfw2.c index dead49e7af..35db848bba 100644 --- a/tools/firmware-utils/src/mktplinkfw2.c +++ b/tools/firmware-utils/src/mktplinkfw2.c @@ -146,6 +146,12 @@ static struct flash_layout layouts[] = { .kernel_la = 0x8000, .kernel_ep = 0x8000, .rootfs_ofs = 0x14, + }, { + .id = "8MSUmtk", /* Split U-Boot OS */ + .fw_max_len = 0x77, + .kernel_la = 0x8000, + .kernel_ep = 0x8000, + .rootfs_ofs = 0x14, }, { .id = "8MLmtk", .fw_max_len = 0x7b, -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v3 2/3] mtd: add logic for TP-Link ramips recovery magic
This adds an option to set the recovery flag of newer TP-Link MediaTek boards and remove it after a successful write. To make use of this feature, add the '-t' option to mtd-write. The '-t' option takes the mtd partition containing the recovery flag (usually 'romfile') as an argument. Make sure this partition is not flagged as read-only! Example: > mtd -t romfile write owrt.bin firmware This command writes the recovery-flag before it begins writing the image to the firmware partition. After the image-write has been successful, the recovery flag is removed. This way, the TP-Link web-recovery is automatically enabled on an unsucessful flash (e.g. power loss). This option is only available if the mtd package is compiled for the ramips target. Signed-off-by: David Bauer --- package/system/mtd/Makefile | 2 +- package/system/mtd/src/Makefile | 3 +- package/system/mtd/src/mtd.c | 33 ++- package/system/mtd/src/mtd.h | 1 + .../system/mtd/src/tpl_ramips_recoveryflag.c | 94 +++ 5 files changed, 130 insertions(+), 3 deletions(-) create mode 100644 package/system/mtd/src/tpl_ramips_recoveryflag.c diff --git a/package/system/mtd/Makefile b/package/system/mtd/Makefile index 65de47f23f..c307555436 100644 --- a/package/system/mtd/Makefile +++ b/package/system/mtd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mtd -PKG_RELEASE:=23 +PKG_RELEASE:=24 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME) STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS) diff --git a/package/system/mtd/src/Makefile b/package/system/mtd/src/Makefile index daeadbcd35..90b72dec02 100644 --- a/package/system/mtd/src/Makefile +++ b/package/system/mtd/src/Makefile @@ -6,12 +6,13 @@ obj = mtd.o jffs2.o crc32.o md5.o obj.seama = seama.o md5.o obj.wrg = wrg.o md5.o obj.wrgg = wrgg.o md5.o +obj.tpl = tpl_ramips_recoveryflag.o obj.ar71xx = trx.o $(obj.seama) $(obj.wrgg) obj.brcm = trx.o obj.brcm47xx = $(obj.brcm) obj.bcm53xx = $(obj.brcm) $(obj.seama) obj.brcm63xx = imagetag.o -obj.ramips = $(obj.seama) $(obj.wrg) +obj.ramips = $(obj.seama) $(obj.tpl) $(obj.wrg) obj.mvebu = linksys_bootcount.o obj.kirkwood = linksys_bootcount.o obj.ipq806x = linksys_bootcount.o diff --git a/package/system/mtd/src/mtd.c b/package/system/mtd/src/mtd.c index fa04c0f95b..eccb4f6a1a 100644 --- a/package/system/mtd/src/mtd.c +++ b/package/system/mtd/src/mtd.c @@ -85,6 +85,7 @@ static char *buf = NULL; static char *imagefile = NULL; static enum mtd_image_format imageformat = MTD_IMAGE_FORMAT_UNKNOWN; static char *jffs2file = NULL, *jffs2dir = JFFS2_DEFAULT_DIR; +static char *tpl_uboot_args_part; static int buflen = 0; int quiet; int no_erase; @@ -554,6 +555,17 @@ resume: lseek(fd, part_offset, SEEK_SET); } + /* Write TP-Link recovery flag */ + if (tpl_uboot_args_part && mtd_tpl_recoverflag_write) { + if (quiet < 2) + fprintf(stderr, "Writing recovery flag to %s\n", tpl_uboot_args_part); + result = mtd_tpl_recoverflag_write(tpl_uboot_args_part, true); + if (result < 0) { + fprintf(stderr, "Could not write TP-Link recovery flag to %s: %i", mtd, result); + exit(1); + } + } + indicate_writing(mtd); w = e = 0; @@ -716,6 +728,18 @@ resume: #endif close(fd); + + /* Clear TP-Link recovery flag */ + if (tpl_uboot_args_part && mtd_tpl_recoverflag_write) { + if (quiet < 2) + fprintf(stderr, "Removing recovery flag from %s\n", tpl_uboot_args_part); + result = mtd_tpl_recoverflag_write(tpl_uboot_args_part, false); + if (result < 0) { + fprintf(stderr, "Could not clear TP-Link recovery flag to %s: %i", mtd, result); + exit(1); + } + } + return 0; } @@ -771,6 +795,10 @@ static void usage(void) fprintf(stderr, "-c datasize amount of data to be used for checksum calculation (for fixtrx / fixseama / fixwrg / fixwrgg)\n"); } + if (mtd_tpl_recoverflag_write) { + fprintf(stderr, + "-t write TP-Link recovery-flag to (for write)\n"); + } fprintf(stderr, #ifdef FIS_SUPPORT "-F [:[:]][,...]\n" @@ -828,7 +856,7 @@ int main (int argc, char **argv) #ifdef FIS_SUPPORT "F:" #endif - "frnqe:d:s:j:p:o:c:l:")) != -1) + "frnqe:d:s:j:p:o:c:t:l:")) != -1) switch (ch) { case 'f':
[OpenWrt-Devel] [PATCH v3 3/3] ramips: add support for Archer C50 v4
This adds support for the TP-Link Archer C50 v4. It uses the same hardware as the v3 variant, sharing the same FCC-ID. CPU: MediaTek MT7628 (580MHz) RAM: 64M DDR2 FLASH: 8M SPI WiFi: 2.4GHz 2x2 MT7628 b/g/n integrated WiFI: 5GHz 2x2 MT7612 a/n/ac ETH: 1x WAN 4x LAN LED: Power, WiFi2, WiFi5, LAN, WAN, WPS BTN: WPS/WiFi, RESET UART: Near ETH ports, 115200 8n1, TP-Link pinout Create Factory image As all installation methods require a U-Boot to be integrated into the Image (and we do not ship one with the image) we are not able to create an image in the OpenWRT build-process. Download a TP-Link image from their Wesite and a OpenWRT sysupgrade image for the device and build yourself a factory image like following: TP-Link image: tpl.bin OpenWRT sysupgrade image: owrt.bin > dd if=tpl.bin of=boot.bin bs=131584 count=1 > cat owrt.bin >> boot.bin Installing via Web-UI - Upload the boot.bin via TP-Links firmware upgrade tool in the web-interface. Installing via Recovery --- Activate Web-Recovery by beginning the upgrade Process with a Firmware-Image from TP-Link. After starting the Firmware Upgrade, wait ~3 seconds (When update status is switching to 0%), then disconnect the power supply from the device. Upgrade flag (which activates Web-Recovery) is written before the OS-image is touched and removed after write is succesfull, so this procedure should be safe. Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1. When active, all LEDs but the WPS LED are off. Remeber to assign yourself a static IP-address as DHCP is not active in this mode. The boot.bin can now be uploaded and flashed using the web-recovery. Installing via TFTP --- Prepare an image like following (Filenames from factory image steps apply here) > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1 > dd if=tpl.bin of=tmp.bin bs=131584 count=1 > dd if=tmp.bin of=boot.bin bs=512 skip=1 > cat boot.bin >> tp_recovery.bin > cat owrt.bin >> tp_recovery.bin Place tp_recovery.bin in root directory of TFTP server and listen on 192.168.0.66/24. Connect router LAN ports with your computer and power up the router while pressing the reset button. The router will download the image via tftp and after ~1 Minute reboot into OpenWRT. U-Boot CLI -- U-Boot CLI can be activated by holding down '4' on bootup. Dual U-Boot --- This is the first TP-Link MediaTek device to feature a split-uboot design. The first (factory-uboot) provides recovery via TFTP and HTTP, jumping straight into the second (firmware-uboot) if no recovery needs to be performed. The firmware-uboot unpacks and executed the kernel. Web-Recovery TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 / TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition before beginning to write and removes it afterwards. If the router boots with this flag set, bootloader will automatically start Web-recovery and listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT factory image can be written. By doing the same while performing sysupgrade, we can take advantage of the Web-recovery in OpenWRT. It is important to note that Web-Recovery is only based on this flag. It can't detect e.g. a crashing kernel or other means. Once activated it won't boot the OS before a recovery action (either via TFTP or HTTP) is performed. This recovery-mode is indicated by an illuminated WPS-LED on boot. Signed-off-by: David Bauer --- .../base-files/files/lib/upgrade/common.sh| 4 +- package/base-files/files/sbin/sysupgrade | 1 + .../ramips/base-files/etc/board.d/01_leds | 3 +- .../ramips/base-files/etc/board.d/02_network | 1 + .../ramips/base-files/lib/upgrade/platform.sh | 4 + target/linux/ramips/dts/ArcherC50V4.dts | 99 +++ .../ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi | 90 + target/linux/ramips/image/mt76x8.mk | 15 +++ 8 files changed, 214 insertions(+), 3 deletions(-) create mode 100644 target/linux/ramips/dts/ArcherC50V4.dts create mode 100644 target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 8ee07494a3..b3a29fb32e 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -223,9 +223,9 @@ indicate_upgrade() { default_do_upgrade() { sync if [ "$SAVE_CONFIG" -eq 1 ]; then - get_image "$1" "$2" | mtd $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}" + get_image "$1" "$2" | mtd $MTD_ARGS $MTD_CONFIG_ARGS -j "$CONF_TAR" write - "${PART_NAME:-image}" else -
[OpenWrt-Devel] [PATCH] ath79: fix OCEDO Koala ethernet configuration
The OCEDO Koala has incorrect PLL settings which result in ~3% packet loss on ethernet connections. Also omit the gmac-configuration as it's incorrect too. Signed-off-by: David Bauer --- target/linux/ath79/dts/qca9558_ocedo_koala.dts | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index 2c150971db..23835492a3 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -156,15 +156,5 @@ phy-handle = <>; phy-mode = "rgmii-rxid"; - pll-data = <0xae00 0xa101 0xa0001313>; - - gmac-config { - device = <>; - - rxdv-delay = <3>; - rxd-delay = <3>; - txen-delay = <0>; - txd-delay = <0>; - rgmii-enabled = <1>; - }; + pll-data = <0x8e00 0x8101 0x80001313>; }; -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ath79: add support for devolo WiFi pro 1200i
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) WiFi2: QCA9558 2T2R WiFi5: QCA9880 2T2R BTN: 1x Reset LED: 1x LED blue 1x LED red BEEP: 1x GPIO attached piezo beeper UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + .../ath79/dts/qca9558_devolo_dvl1200i.dts | 51 +++ target/linux/ath79/image/generic.mk | 8 +++ 4 files changed, 61 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index c5c163c6ec..04d68fd533 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -10,6 +10,7 @@ ath79_setup_interfaces() case "$board" in avm,fritz300e|\ + devolo,dvl1200i|\ devolo,dvl1750c|\ devolo,dvl1750i|\ ocedo,koala|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index bd26f35f50..7adedfef8f 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -88,6 +88,7 @@ case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in devolo,dvl1200e|\ + devolo,dvl1200i|\ devolo,dvl1750c|\ devolo,dvl1750i) ath10kcal_extract "art" 20480 2116 diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts new file mode 100644 index 00..5900d8b487 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1200i", "qca,qca9557"; + model = "devolo WiFi pro 1200i"; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1200i:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1200i:red:status"; + gpios = < 15 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = < 4 GPIO_ACTIVE_HIGH>; + }; +}; + + { + pll-data = <0xbe00 0x8101 0x80001313>; +}; + +_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; + rgmii-enabled = <1>; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index b8c67e1638..db66720130 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -170,6 +170,14 @@ define Device/devolo_dvl1200e endef TARGET_DEVICES += devolo_dvl1200e +define Device/devolo_dvl1200i + ATH_SOC := qca9558 + DEVICE_TITLE := devolo WiFi pro 1200i + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += devolo_dvl1200i + define Device/devolo_dvl1750c ATH_SOC := qca9558 DEVICE_TITLE := devolo WiFi pro 1750c -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] ath79: add support for devolo WiFi pro 1750i
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) WiFi2: QCA9558 3T3R WiFi5: QCA9880 3T3R BTN: 1x Reset LED: 1x LED blue 1x LED red BEEP: 1x GPIO attached piezo beeper UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 3 +- .../ath79/dts/qca9558_devolo_dvl1750i.dts | 51 +++ target/linux/ath79/image/generic.mk | 8 +++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index e24c58e208..c5c163c6ec 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -11,6 +11,7 @@ ath79_setup_interfaces() case "$board" in avm,fritz300e|\ devolo,dvl1750c|\ + devolo,dvl1750i|\ ocedo,koala|\ ocedo,raccoon|\ pcs,cap324|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 441893a752..bd26f35f50 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -88,7 +88,8 @@ case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in devolo,dvl1200e|\ - devolo,dvl1750c) + devolo,dvl1750c|\ + devolo,dvl1750i) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0) -1) ;; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts new file mode 100644 index 00..bd3702eb36 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1750i", "qca,qca9557"; + model = "devolo WiFi pro 1750i"; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1750i:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1750i:red:status"; + gpios = < 15 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = < 4 GPIO_ACTIVE_HIGH>; + }; +}; + + { + pll-data = <0xbe00 0x8101 0x80001313>; +}; + +_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; + rgmii-enabled = <1>; +}; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 326633835d..b8c67e1638 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -178,6 +178,14 @@ define Device/devolo_dvl1750c endef TARGET_DEVICES += devolo_dvl1750c +define Device/devolo_dvl1750i + ATH_SOC := qca9558 + DEVICE_TITLE := devolo WiFi pro 1750i + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += devolo_dvl1750i + define Device/dlink_dir-825-b1 ATH_SOC := ar7161 DEVICE_TITLE := D-LINK DIR-825 B1 -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mpc85xx: add support for Sophos RED 15w Rev.1
Hardware CPU: Freescale P1010 PowerPC RAM: 128M DDR3 NAND: 128MiB ETH: RTL8211F SGMII PHY RTL8367B 5-port RGMII switch (not connected to SoC - unmanaged) WiFi: SparkLan WPEA-121N - Atheros AR9382 2T2R abgn USB: 1x USB 2.0 LED: System, Router, Internet, Tunnel controllable LAN1-4, WAN, Power non-controllable BTN: None Installation 1. Power on the device while attached to the Console port. 2. Halt the U-Boot by pressing Enter when prompted. 3. Set the correct bootcmd for booting OpenWRT: > setenv bootargs_owrt "setenv bootargs console=ttyS0,115200" > setenv bootcmd "run bootargs_owrt; nand read 0x100 0x30 0x80; bootm 0x100;" > saveenv 5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a TFTP server root-directory served on 192.168.1.2/24. Connect your computer to one of the LAN-ports. 4. Boot OpenWRT initramfs image with > run bootargs_owrt; tftpboot 0x100 192.168.1.2:kernel.bin; bootm 0x100; 6. (Optional) Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case you ever want to go back to the vendor firmware. 7. Create Ubi Volume on mtd4 by executing > ubiformat /dev/mtd4 -y 8. Transfer OpenWRT sysupgrade image to the device via SCP and install it with > sysupgrade -n Back to Stock = If you want to go back to the stock firmware, here is the bootcmd of the vendor firmware: > setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5; nand read 0xc0 0x0030 0x10; nand read 0x100 0x0040 0x0080; bootm 0x100 - 0xc0 Set it via 'setenv' from the U-Boot shell and don't forget to save it using 'saveenv'! After this, boot the OpenWRT initramfs image just like you would for installation. Write back the three vendor partitions using mtd. Reboot the device afterwards. Signed-off-by: David Bauer --- target/linux/mpc85xx/Makefile | 2 +- target/linux/mpc85xx/base-files/etc/diag.sh | 3 + .../etc/hotplug.d/ieee80211/10-fix-wifi-mac | 20 ++ .../base-files/lib/upgrade/platform.sh| 13 +- target/linux/mpc85xx/config-4.14 | 16 ++ target/linux/mpc85xx/config-4.19 | 16 ++ .../arch/powerpc/boot/dts/red-15w-rev1.dts| 203 ++ .../arch/powerpc/platforms/85xx/red15w_rev1.c | 85 target/linux/mpc85xx/image/Makefile | 12 ++ target/linux/mpc85xx/p1020/target.mk | 1 - .../104-powerpc-85xx-red-15w-rev1.patch | 33 +++ .../103-powerpc-85xx-red-15w-rev1.patch | 33 +++ 12 files changed, 434 insertions(+), 3 deletions(-) create mode 100644 target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c create mode 100644 target/linux/mpc85xx/patches-4.14/104-powerpc-85xx-red-15w-rev1.patch create mode 100644 target/linux/mpc85xx/patches-4.19/103-powerpc-85xx-red-15w-rev1.patch diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile index 552f16e82f..c6555cb688 100644 --- a/target/linux/mpc85xx/Makefile +++ b/target/linux/mpc85xx/Makefile @@ -10,7 +10,7 @@ ARCH:=powerpc BOARD:=mpc85xx BOARDNAME:=Freescale MPC85xx CPU_TYPE:=8540 -FEATURES:=squashfs +FEATURES:=squashfs nand ramdisk MAINTAINER:=Imre Kaloz SUBTARGETS:=generic p1020 diff --git a/target/linux/mpc85xx/base-files/etc/diag.sh b/target/linux/mpc85xx/base-files/etc/diag.sh index 3d56d14b08..e344d4b756 100644 --- a/target/linux/mpc85xx/base-files/etc/diag.sh +++ b/target/linux/mpc85xx/base-files/etc/diag.sh @@ -9,6 +9,9 @@ get_status_led() { aerohive,hiveap-330) status_led="hiveap-330:green:tricolor0" ;; + sophos,red-15w-rev1) + status_led="red-15w-rev1:green:system" + ;; tplink,tl-wdr4900-v1) status_led="tp-link:blue:system" ;; diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac new file mode 100644 index 00..3092cebfc9 --- /dev/null +++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac @@ -0,0 +1,20 @@ +#!/bin/ash + +[ "$ACTION" == "add" ] || exit 0 + +PHYNBR=${DEVPATH##*/phy} + +[ -n $PHYNBR ] || exit 0 + +. /lib/functions.sh +. /lib/functions/system.sh + +board=$(board_name) + +case "$board" in +sophos,red-15w-rev1) + echo $(mtd_get_mac_ascii u-boot-env ethaddr) > /sys${DEVPATH}/macaddress + ;; +*) + ;; +esac diff --git a/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh b/target/linux/mpc85xx/base-files/lib/upgrade/platform.sh index 1108b3fd6e..9f49d0ddce 10
[OpenWrt-Devel] [PATCH 2/2] mpc85xx: add support for OCEDO Panda
CPU: FSL P1020 (2x 800MHz E500 PPC) RAM: 1GB DDR3 FLASH: 256MiB NAND WiFi: 2x Atheros AR9382 2x2:2 abgn ETH: 2x BCM54616S - 1x BCM53128 8-port switch LED: 5x LEDs (Power, WiFi1, WiFi2, N/D, SYS) BTN: 1x RESET Installation 1. Download initrams kernel image, dtb binary and sysupgrade image. 2. Place initramfs kernel into tftp root directory. Rename to "panda-uimage-factory". 3. Place dtb binary into tftp root directory. Rename to "panda.fdt". 4. Start tftp server on 192.168.100.8/24. 5. Power up the device with the reset button pressed. It will download the initrams and dtb via tftp and boot into OpenWRT in RAM. 6. SSH into the device and remove the factory partitions. > ubirmvol /dev/ubi0 --name=kernel1 > ubirmvol /dev/ubi0 --name=rootfs1 > ubirmvol /dev/ubi0 --name=devicetree1 You will have around 60 MiB of free space with that. You can also delete "kernel2", "devicetree2", "rootfs2" and "storage" respectively in case you do not want to go back to the vendor firmware. 7. Modify the U-Boot bootcmd to allow for booting OpenWRT > fw_setenv bootcmd_owrt "ubi part ubi && ubi read 0x100 kernel && bootm 0x100" > fw_setenv bootargs_owrt "setenv bootargs console=ttyS0,115200 ubi.mtd=3,2048" > fw_setenv bootcmd "run bootargs_owrt; run bootcmd_owrt" 8. Transfer the sysupgrade image via scp into the /tmp directory. 9. Upgrade the device > sysupgrade -n /tmp/ Signed-off-by: David Bauer --- package/boot/uboot-envtools/files/mpc85xx | 22 ++ .../mpc85xx/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/ieee80211/10-fix-wifi-mac | 5 + .../base-files/lib/upgrade/platform.sh| 1 + target/linux/mpc85xx/config-4.14 | 1 + .../files/arch/powerpc/boot/dts/panda.dts | 264 ++ .../files/arch/powerpc/platforms/85xx/panda.c | 91 ++ target/linux/mpc85xx/image/Makefile | 14 + target/linux/mpc85xx/p1020/config-default | 22 ++ target/linux/mpc85xx/p1020/target.mk | 1 + .../106-powerpc-85xx-panda-support.patch | 34 +++ .../105-powerpc-85xx-panda-support.patch | 34 +++ 12 files changed, 494 insertions(+) create mode 100644 package/boot/uboot-envtools/files/mpc85xx create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/panda.dts create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/panda.c create mode 100644 target/linux/mpc85xx/patches-4.14/106-powerpc-85xx-panda-support.patch create mode 100644 target/linux/mpc85xx/patches-4.19/105-powerpc-85xx-panda-support.patch diff --git a/package/boot/uboot-envtools/files/mpc85xx b/package/boot/uboot-envtools/files/mpc85xx new file mode 100644 index 00..d219b57cb1 --- /dev/null +++ b/package/boot/uboot-envtools/files/mpc85xx @@ -0,0 +1,22 @@ +#!/bin/sh + +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(board_name) + +case "$board" in +ocedo,panda) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2" "0x2" + ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x2" "0x2" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index 19f01a6589..d6b4eebf14 100755 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -13,6 +13,11 @@ case "$board" in aerohive,hiveap-330) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; +ocedo,panda) + ucidef_set_interface_wan "eth1" + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8u@eth0" + ;; tplink,tl-wdr4900-v1) ucidef_add_switch "switch0" \ "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac index 3092cebfc9..f153b53c8e 100644 --- a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac +++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac @@ -12,6 +12,11 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in +ocedo,panda) + WMAC=wmac$(($PHYNBR + 1)) + MAC=$(mtd_get_mac_ascii uboot-env0 ${WMAC}) + echo ${MAC} >
[OpenWrt-Devel] [PATCH 1/2] mpc85xx: use generic diag.sh
This commit removes the target-specific diag.sh script. This way, the generic one is used for the target, which uses DT-aliases to specify the LEDs used. This way, we are also able to use different LEDs to indicate different states. We use green status LEDs for indicating boot and a running system. Where possible, the red status LED is used to indicate failsafe mode and a running upgrade. Signed-off-by: David Bauer --- target/linux/mpc85xx/base-files/etc/diag.sh | 41 --- .../arch/powerpc/boot/dts/hiveap-330.dts | 11 - .../arch/powerpc/boot/dts/red-15w-rev1.dts| 11 - .../arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 6 ++- 4 files changed, 23 insertions(+), 46 deletions(-) delete mode 100644 target/linux/mpc85xx/base-files/etc/diag.sh diff --git a/target/linux/mpc85xx/base-files/etc/diag.sh b/target/linux/mpc85xx/base-files/etc/diag.sh deleted file mode 100644 index e344d4b756..00 --- a/target/linux/mpc85xx/base-files/etc/diag.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# Copyright (C) 2013 OpenWrt.org - -. /lib/functions.sh -. /lib/functions/leds.sh - -get_status_led() { - case $(board_name) in - aerohive,hiveap-330) - status_led="hiveap-330:green:tricolor0" - ;; - sophos,red-15w-rev1) - status_led="red-15w-rev1:green:system" - ;; - tplink,tl-wdr4900-v1) - status_led="tp-link:blue:system" - ;; - 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/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts index 5e732664aa..c4abc905e9 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts @@ -14,6 +14,13 @@ model = "Aerohive HiveAP-330"; compatible = "aerohive,hiveap-330"; + aliases { + led-boot = _green; + led-failsafe = _red; + led-running = _green; + led-upgrade = _red; + }; + chosen { bootargs-override = "console=ttyS0,9600"; }; @@ -109,12 +116,12 @@ compatible = "national,lp5521"; reg = <0x32>; clock-mode = /bits/ 8 <2>; - chan0 { + tricolor_red: chan0 { chan-name = "hiveap-330:red:tricolor0"; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; }; - chan1 { + tricolor_green:chan1 { chan-name = "hiveap-330:green:tricolor0"; led-cur = /bits/ 8 <0x2f>; max-cur = /bits/ 8 <0x5f>; diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts index 600426bb6e..40b8014a53 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts @@ -6,6 +6,13 @@ model = "Sophos RED 15w Rev.1"; compatible = "sophos,red-15w-rev1"; + aliases { + led-boot = _green; + led-failsafe = _red; + led-running = _green; + led-upgrade = _red; + }; + memory { device_type = "memory"; }; @@ -13,12 +20,12 @@ leds { compatible = "gpio-leds"; - system_green { + system_green: system_green { gpios = < 7 0>; label = "red-15w-rev1:green:system"; }; - system_red { + system_red: system_red { gpios = < 3 0>; label = "red-15w-rev1:red:system"; }; diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index 0969b272a8..ab4952aad5 100644 --- a/target/linux/mpc85xx/files/a
[OpenWrt-Devel] [PATCH] ramips: adjust Netgear R6120 model name
Adjust the model string and device title to match other Netgear routers in the ramips target. Signed-off-by: David Bauer --- target/linux/ramips/dts/R6120.dts | 2 +- target/linux/ramips/image/mt76x8.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/R6120.dts b/target/linux/ramips/dts/R6120.dts index 052933b766..375e400299 100644 --- a/target/linux/ramips/dts/R6120.dts +++ b/target/linux/ramips/dts/R6120.dts @@ -7,7 +7,7 @@ / { compatible = "netgear,r6120", "mediatek,mt7628an-soc"; - model = "Netgear AC1200 R6120"; + model = "Netgear R6120"; aliases { led-boot = _power; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index be3aeb1093..8b0fe3b38e 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -119,7 +119,7 @@ define Device/netgear_r6120 DTS := R6120 BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_16M) - DEVICE_TITLE := Netgear AC1200 R6120 + DEVICE_TITLE := Netgear R6120 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci SERCOMM_HWID := CGQ SERCOMM_HWVER := A001 -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq: make AVM FRITZ!Box naming consistent
This commit changes the model string and device title of all AVM boards to fit the naming of the manufacturer. Drop all provider-specific titles as they are re-used for every device generation by 1&1. The original AVM model name is printed on the bottom of every devices. Exception applies for boards which are only supported by a specific sub-revision. Signed-off-by: David Bauer --- .../arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts | 2 +- .../arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts | 2 +- .../arch/mips/boot/dts/FRITZ3370-REV2.dtsi | 2 +- .../files-4.14/arch/mips/boot/dts/FRITZ7312.dts | 2 +- .../files-4.14/arch/mips/boot/dts/FRITZ7320.dts | 2 +- .../files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts| 2 +- target/linux/lantiq/image/Makefile | 12 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts index 3cb7d7d723..ebd6f6e4c8 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-HYNIX.dts @@ -4,7 +4,7 @@ / { compatible = "avm,fritz3370-rev2-hynix", "avm,fritz3370-rev2", "lantiq,xway", "lantiq,vr9"; - model = "AVM Fritz!Box WLAN 3370 Rev. 2 (Hynix NAND)"; + model = "AVM FRITZ!Box 3370 Rev. 2 (Hynix NAND)"; }; { diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts index 1a1be6fd37..dcc97d2808 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2-MICRON.dts @@ -4,7 +4,7 @@ / { compatible = "avm,fritz3370-rev2-micron", "avm,fritz3370-rev2", "lantiq,xway", "lantiq,vr9"; - model = "AVM Fritz!Box WLAN 3370 Rev. 2 (Micron NAND)"; + model = "AVM FRITZ!Box 3370 Rev. 2 (Micron NAND)"; }; { diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi index a7e0c71915..9a0359d1cc 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ3370-REV2.dtsi @@ -5,7 +5,7 @@ / { compatible = "avm,fritz3370-rev2", "lantiq,xway", "lantiq,vr9"; - model = "AVM Fritz!Box WLAN 3370 Rev. 2"; + model = "AVM FRITZ!Box 3370 Rev. 2"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts index c14695413e..796b941ede 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7312.dts @@ -6,7 +6,7 @@ / { compatible = "avm,fritz7312", "lantiq,xway", "lantiq,ar9"; - model = "FritzBox 7312 (1&1 WLAN-MODEM)"; + model = "AVM FRITZ!Box 7312"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts index 45a59c012d..cd274277d1 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7320.dts @@ -6,7 +6,7 @@ / { compatible = "avm,fritz7320", "lantiq,xway", "lantiq,ar9"; - model = "1&1 HomeServer"; + model = "AVM FRITZ!Box 7320"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts index 91520c8137..53623ab56c 100644 --- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts +++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/FRITZ7360SL.dts @@ -7,7 +7,7 @@ / { compatible = "avm,fritz7360sl", "lantiq,xway", "lantiq,vr9"; - model = "1&1 HomeServer"; + model = "AVM FRITZ!Box 7360 SL"; chosen { bootargs = "console=ttyLTQ0,115200"; diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index e9d9e42027..b59acf4ddc 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lant
Re: [OpenWrt-Devel] [PATCH 1/2] ath79: load watchdog before PHY driver
On 10.12.18 09:55, Mathias Kresin wrote: > Hey David, > > have you tried to set GPIO_WATCHDOG_ARCH_INITCALL instead? According to > the help text, it might solve your issue: Hello Mathias, thanks for pointing out, indeed this does solve my issue. This patch is therefore obsolete. I will send a v2 later this evening. Best wishes David > > In some situations, the default initcall level (module_init) > in not early enough in the boot process to avoid the watchdog > to be triggered. > If you say yes here, the initcall level would be raised to > arch_initcall. > > Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v3 2/2] ath79: add support for devolo WiFi pro 1750c
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) WiFi2: QCA9558 3T3R WiFi5: QCA9880 3T3R BTN: 1x Reset LED: 1x LED blue 1x LED red BUZZ: 1x GPIO attached piezo buzzer (controllable ass LED) UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button There is also a Micro-B USB-port present but this only seems to be a dummy as the circuit next to it is not present (at least in my unit). It is also not mentioned in the devolo manual. Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 3 +- .../ath79/dts/qca9558_devolo_dvl1750c.dts | 46 +++ .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 2 +- target/linux/ath79/image/generic.mk | 8 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index e090396708..594cadb1e1 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -10,6 +10,7 @@ ath79_setup_interfaces() case "$board" in avm,fritz300e|\ + devolo,dvl1750c|\ ocedo,koala|\ ocedo,raccoon|\ pcs,cap324|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index d1b3bbdcb5..681a397efc 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,7 +87,8 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in - devolo,dvl1200e) + devolo,dvl1200e|\ + devolo,dvl1750c) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) -1) ;; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts new file mode 100644 index 00..20860b6806 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1750c", "qca,qca9557"; + model = "devolo WiFi pro 1750c"; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1750c:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1750c:red:status"; + gpios = < 15 GPIO_ACTIVE_LOW>; + }; + + buzzer { + label = "dvl1750c:gpio:buzzer"; + gpios = < 21 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi index 17c0a3135d..25f0ed56df 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -120,7 +120,7 @@ pll-data = <0xae00 0x8101 0x80001313>; - gmac-config { + gmac_config: gmac-config { device = <>; rxdv-delay = <3>; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 17f55d120c..dafb92773f 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -136,6 +136,14 @@ define Device/devolo_dvl1200e endef TARGET_DEVICES += devolo_dvl1200e +define Device/devolo_dvl1750c + ATH_SOC := qca9558 + DEVICE_TITLE := devolo WiFi pro 1750c + DEVICE_PACKAGES := kmod-ath10k-ct at
[OpenWrt-Devel] [PATCH v3 1/2] ath79: add support for devolo WiFi pro 1200e
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) 1x Atheros AR8033 WiFi2: QCA9558 2T2R WiFi5: QCA9880 2T2R BTN: 1x Reset LED: 1x LED blue 1x LED red BUZZ: 1x GPIO attached piezo buzzer (controllable ass LED) UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- v2: - fixed whitespace issues - activate CONFIG_GPIO_WATCHDOG_ARCH_INITCALL kernel config symbol v3: - refactored LED DT-nodes - fixed GMAC config for dvl1200e - add patch for dvl1750c .../ath79/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 + .../ath79/dts/qca9558_devolo_dvl1200e.dts | 47 ++ .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 156 ++ target/linux/ath79/generic/config-default | 3 + target/linux/ath79/image/generic.mk | 8 + 6 files changed, 221 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 43b537835c..e090396708 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -58,6 +58,9 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan" ;; + devolo,dvl1200e) + ucidef_set_interface_lan "eth0 eth1" + ;; dlink,dir-825-b1) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 82c23e3079..d1b3bbdcb5 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,6 +87,10 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in + devolo,dvl1200e) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) -1) + ;; glinet,gl-x750) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts new file mode 100644 index 00..185745199d --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1200e", "qca,qca9557"; + model = "devolo WiFi pro 1200e"; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1200e:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1200e:red:status"; + gpios = < 15 GPIO_ACTIVE_LOW>; + }; + + buzzer { + label = "dvl1200e:gpio:buzzer"; + gpios = < 4 GPIO_ACTIVE_HIGH>; + }; + }; +}; + + { + status = "okay"; +}; + + { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi new file mode 100644 index 00..17c0a3135d --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/* + * The hardware of this board family is most likely shared with other devices from othe
[OpenWrt-Devel] [PATCH] ipq40xx: clean up netgear-dni image generation
The NETGEAR EX61x0v2 does only validate the DNI header, neither it needs the kernel to be a specific size nor a fake filesystem header to be present. This has been tested using the NETGEAR Web-UI and the pushbutton TFTP recovery. Signed-off-by: David Bauer --- target/linux/ipq40xx/image/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index eaf9f68395..af953def41 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -40,8 +40,8 @@ define Device/DniImage NETGEAR_BOARD_ID := NETGEAR_HW_ID := IMAGES := factory.img sysupgrade.bin - IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to (KERNEL_SIZE) | append-rootfs | pad-rootfs | netgear-dni - IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to (KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata + IMAGE/factory.img := append-kernel | append-rootfs | pad-rootfs | netgear-dni + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata endef DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID @@ -144,7 +144,6 @@ TARGET_DEVICES += meraki_mr33 define Device/netgear_ex61x0v2 $(call Device/DniImage) - KERNEL_SIZE := 3080192 DEVICE_DTS_CONFIG := config@4 NETGEAR_BOARD_ID := EX6150v2series NETGEAR_HW_ID := 29765285+16+0+128+2x2 -- 2.20.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ipq40xx: disable kernel-padding for DNI image
This commit removes the fixed kernel size-padding for the Netgear DNI image creation as it is not necessary for a working image. The fake rootfs still needs to be padded to the blocksize. Tested-By: Christian Lamparter Signed-off-by: David Bauer --- target/linux/ipq40xx/image/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index eaf9f68395..d95c151653 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -40,8 +40,8 @@ define Device/DniImage NETGEAR_BOARD_ID := NETGEAR_HW_ID := IMAGES := factory.img sysupgrade.bin - IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to (KERNEL_SIZE) | append-rootfs | pad-rootfs | netgear-dni - IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | pad-to (KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata + IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni + IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | append-metadata endef DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID @@ -144,7 +144,6 @@ TARGET_DEVICES += meraki_mr33 define Device/netgear_ex61x0v2 $(call Device/DniImage) - KERNEL_SIZE := 3080192 DEVICE_DTS_CONFIG := config@4 NETGEAR_BOARD_ID := EX6150v2series NETGEAR_HW_ID := 29765285+16+0+128+2x2 -- 2.20.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v4 1/2] ath79: add support for devolo WiFi pro 1200e
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) 1x Atheros AR8033 WiFi2: QCA9558 2T2R WiFi5: QCA9880 2T2R BTN: 1x Reset LED: 1x LED blue 1x LED red BEEP: 1x GPIO attached piezo beeper UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- v2: - fixed whitespace issues - activate CONFIG_GPIO_WATCHDOG_ARCH_INITCALL kernel config symbol v3: - refactored LED DT-nodes - fixed GMAC config for dvl1200e - add patch for dvl1750c v4: - use ath10kcal_patch_mac_crc instead of ath10kcal_patch_mac - reduce line-length of dvl1200e dtsi - fix misspelled commit message - remove unnecessary DT-properties .../ath79/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 + .../ath79/dts/qca9558_devolo_dvl1200e.dts | 47 ++ .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 149 ++ target/linux/ath79/generic/config-default | 3 + target/linux/ath79/image/generic.mk | 8 + 6 files changed, 214 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 35eff1c8f8..5d6a1eefcd 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -58,6 +58,9 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan" ;; + devolo,dvl1200e) + ucidef_set_interface_lan "eth0 eth1" + ;; dlink,dir-825-b1) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index fbe70b8b5c..e38e2a1933 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,6 +87,10 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in + devolo,dvl1200e) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0) -1) + ;; glinet,gl-x750) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts new file mode 100644 index 00..3bca23cc57 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1200e", "qca,qca9557"; + model = "devolo WiFi pro 1200e"; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1200e:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1200e:red:status"; + gpios = < 15 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = < 4 GPIO_ACTIVE_HIGH>; + }; +}; + + { + status = "okay"; +}; + + { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi new file mode 100644 index 00..185b29bdbe --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -0,0 +1,149 @@ +// SPDX-License-Identifier
[OpenWrt-Devel] [PATCH v4 2/2] ath79: add support for devolo WiFi pro 1750c
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) WiFi2: QCA9558 3T3R WiFi5: QCA9880 3T3R BTN: 1x Reset LED: 1x LED blue 1x LED red BEEP: 1x GPIO attached piezo beeper UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button There is also a Micro-B USB-port present but this only seems to be a dummy as the circuit next to it is not present (at least in my unit). It is also not mentioned in the devolo manual. Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- .../ath79/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 3 +- .../ath79/dts/qca9558_devolo_dvl1750c.dts | 46 +++ .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 2 +- target/linux/ath79/image/generic.mk | 8 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 5d6a1eefcd..a258a6da61 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -10,6 +10,7 @@ ath79_setup_interfaces() case "$board" in avm,fritz300e|\ + devolo,dvl1750c|\ ocedo,koala|\ ocedo,raccoon|\ pcs,cap324|\ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index e38e2a1933..885b57f6a1 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,7 +87,8 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in - devolo,dvl1200e) + devolo,dvl1200e|\ + devolo,dvl1750c) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0) -1) ;; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts new file mode 100644 index 00..b5a2954406 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1750c", "qca,qca9557"; + model = "devolo WiFi pro 1750c"; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1750c:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1750c:red:status"; + gpios = < 15 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = < 21 GPIO_ACTIVE_HIGH>; + }; +}; + +_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi index 185b29bdbe..9937186b1e 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -117,7 +117,7 @@ phy-handle = <>; pll-data = <0xae00 0x8101 0x80001313>; - gmac-config { + gmac_config: gmac-config { device = <>; rxdv-delay = <3>; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index ef8cf170de..b2f83ba58c 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -146,6 +146,14 @@ define Device/devolo_dvl1200e endef TARGET_DEVICES += devolo_dvl1200e +define Device/devolo_dvl1750c + ATH_SOC := qca9558 + DEVICE_TITLE := devolo WiFi pro 1750c + DEVICE_PACKAGES := kmod-ath10k
[OpenWrt-Devel] [PATCH v2] ath79: add support for devolo WiFi pro 1200e
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) 1x Atheros AR8033 WiFi2: QCA9558 2T2R WiFi5: QCA9880 2T2R BTN: 1x Reset LED: 1x LED blue 1x LED red BUZZ: 1x GPIO attached piezo buzzer (controllable ass LED) UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- v2: - fixed whitespace issues - activate CONFIG_GPIO_WATCHDOG_ARCH_INITCALL kernel config symbol .../ath79/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 + .../ath79/dts/qca9558_devolo_dvl1200e.dts | 20 ++ .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 185 ++ target/linux/ath79/generic/config-default | 3 + target/linux/ath79/image/generic.mk | 8 + 6 files changed, 223 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index fa7a618909..340befefed 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -58,6 +58,9 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan" ;; + devolo,dvl1200e) + ucidef_set_interface_lan "eth0 eth1" + ;; dlink,dir-825-b1) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 82c23e3079..d1b3bbdcb5 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,6 +87,10 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in + devolo,dvl1200e) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) -1) + ;; glinet,gl-x750) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts new file mode 100644 index 00..240425d990 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1200e", "qca,qca9557"; + model = "devolo WiFi pro 1200e"; +}; + + { + status = "okay"; +}; + + { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi new file mode 100644 index 00..8c8491dd56 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -0,0 +1,185 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/* + * The hardware of this board family is most likely shared with other devices from other manufacturers. + * Devolo seems to use hardware from Edimax, namely the Edimax WAP1750. + * + * The base board is identical but the single models differ in number of buttons, ethernet ports, + * external console, USB, external / internal antennas and number of spatial streams. + */ + +/dts-v1/; + +#include +#include + +#include "qca9557.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "devolo:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; +
[OpenWrt-Devel] [PATCH v2 2/2] ramips: add support for Archer C50 v4
This adds support for the TP-Link Archer C50 v4. It uses the same hardware as the v3 variant, sharing the same FCC-ID. CPU: MediaTek MT7628 (580MHz) RAM: 64M DDR2 FLASH: 8M SPI WiFi: 2.4GHz 2x2 MT7628 b/g/n integrated WiFI: 5GHz 2x2 MT7612 a/n/ac ETH: 1x WAN 4x LAN LED: Power, WiFi2, WiFi5, LAN, WAN, WPS BTN: WPS/WiFi, RESET UART: Near ETH ports, 115200 8n1, TP-Link pinout Create Factory image As all installation methods require a U-Boot to be integrated into the Image (and we do not ship one with the image) we are not able to create an image in the OpenWRT build-process. Download a TP-Link image from their Wesite and a OpenWRT sysupgrade image for the device and build yourself a factory image like following: TP-Link image: tpl.bin OpenWRT sysupgrade image: owrt.bin > dd if=tpl.bin of=boot.bin bs=131584 count=1 > cat owrt.bin >> boot.bin Installing via Web-UI - Upload the boot.bin via TP-Links firmware upgrade tool in the web-interface. Installing via Recovery --- Activate Web-Recovery by beginning the upgrade Process with a Firmware-Image from TP-Link. After starting the Firmware Upgrade, wait ~3 seconds (When update status is switching to 0%), then disconnect the power supply from the device. Upgrade flag (which activates Web-Recovery) is written before the OS-image is touched and removed after write is succesfull, so this procedure should be safe. Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1. When active, all LEDs but the WPS LED are off. Remeber to asign yourself a static IP-adress as DHCP is not active in this mode. The boot.bin can now be uploaded and flashed using the web-recovery. Installing via TFTP --- Prepare an image like following (Filenames from factory image steps apply here) > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1 > dd if=tpl.bin of=tmp.bin bs=131584 count=1 > dd if=tmp.bin of=boot.bin bs=512 skip=1 > cat boot.bin >> tp_recovery.bin > cat owrt.bin >> tp_recovery.bin Place tp_recovery.bin in root directory of TFTP server and listen on 192.168.0.66/24. Connect router LAN ports with your computer and power up the router while pressing the reset button. The router will download the image via tftp and after ~1 Minute reboot into OpenWRT. U-Boot CLI -- U-Boot CLI can be activated by holding down '4' on bootup. Dual U-Boot --- This is the first TP-Link MediaTek device to feature a split-uboot design. The first (factory-uboot) provides recovery via TFTP and HTTP, jumping straight into the second (firmware-uboot) if no recovery needs to be performed. The firmware-uboot unpacks and executed the kernel. Web-Recovery TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 / TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition before beginning to write and removes it afterwards. If the router boots with this flag set, bootloader will automatically start Web-recovery and listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT factory image can be written. By doing the same while performing sysupgrade, we can take advantage of the Web-recovery in OpenWRT. It is important to note that Web-Recovery is only based on this flag. It can't detect e.g. a crashing kernel or other means. Once activated it won't boot the OS before a recovery action (either via TFTP or HTTP) is performed. This recovery-mode is indicated by an illuminated WPS-LED on boot. Signed-off-by: David Bauer --- v2: - rebase on latest HEAD - Add mt76x2 driver to DEVICE_PACKAGES - rename nodes to fit Device Tree Specification - reorder LED nodes .../ramips/base-files/etc/board.d/01_leds | 3 +- .../ramips/base-files/etc/board.d/02_network | 1 + .../ramips/base-files/lib/upgrade/platform.sh | 3 + .../ramips/base-files/lib/upgrade/tplink.sh | 31 ++ target/linux/ramips/dts/ArcherC50V4.dts | 99 +++ .../ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi | 90 + target/linux/ramips/image/mt76x8.mk | 15 +++ 7 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/base-files/lib/upgrade/tplink.sh create mode 100644 target/linux/ramips/dts/ArcherC50V4.dts create mode 100644 target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi 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 400183acc5..f1dcf5be07 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -332,7 +332,8 @@ tplink,c20-v4) ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" "wlan0&
[OpenWrt-Devel] [PATCH v2 1/2] tools: mktplinkfw2: add split-uboot layout
This commit adds the split-uboot partition layout used by the Archer C50 v4 to mktplinkfw2. Signed-off-by: David Bauer --- tools/firmware-utils/src/mktplinkfw2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/firmware-utils/src/mktplinkfw2.c b/tools/firmware-utils/src/mktplinkfw2.c index dead49e7af..35db848bba 100644 --- a/tools/firmware-utils/src/mktplinkfw2.c +++ b/tools/firmware-utils/src/mktplinkfw2.c @@ -146,6 +146,12 @@ static struct flash_layout layouts[] = { .kernel_la = 0x8000, .kernel_ep = 0x8000, .rootfs_ofs = 0x14, + }, { + .id = "8MSUmtk", /* Split U-Boot OS */ + .fw_max_len = 0x77, + .kernel_la = 0x8000, + .kernel_ep = 0x8000, + .rootfs_ofs = 0x14, }, { .id = "8MLmtk", .fw_max_len = 0x7b, -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] iwinfo: add device id for MediaTek MT7612E
Signed-off-by: David Bauer --- hardware.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/hardware.txt b/hardware.txt index f646d6a..40988ea 100644 --- a/hardware.txt +++ b/hardware.txt @@ -64,3 +64,4 @@ 0x11ab 0x2a55 0x11ab 0x0 0 "Marvell" "88W8864" 0x02df 0x9135 0x 0x0 0 "Marvell" "88W8887" 0x11ab 0x2b40 0x11ab 0x0 0 "Marvell" "88W8964" +0x14c3 0x7662 0x14c3 0x76620 0 "MediaTek" "MT7612E" -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] kernel: add DT binding support to AVM EVA parser
It allows selecting split-firmware parser directly by specifying image-format in the device-tree. Signed-off-by: David Bauer --- .../generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c index 746944ee2e..399263ccca 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "mtdsplit.h" @@ -79,9 +80,19 @@ static int mtdsplit_parse_eva(struct mtd_info *master, return EVA_NR_PARTS; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +static const struct of_device_id mtdsplit_eva_of_match_table[] = { + { .compatible = "avm,eva-firmware" }, + {}, +}; +#endif + static struct mtd_part_parser mtdsplit_eva_parser = { .owner = THIS_MODULE, .name = "eva-fw", +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) + .of_match_table = mtdsplit_eva_of_match_table, +#endif .parse_fn = mtdsplit_parse_eva, .type = MTD_PARSER_TYPE_FIRMWARE, }; -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ath79: add AVM 4020 firmware partition compatible
This commit adds firmware partition compatible for the AVM FRITZ!Box 4020. This allows to select the correct mtdsplit parser instead of trying all available ones one by one. Signed-off-by: David Bauer --- target/linux/ath79/dts/qca9561_avm_fritz4020.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts index 8489c8a1e6..3310a3423b 100644 --- a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts +++ b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts @@ -136,6 +136,7 @@ }; partition@1 { + compatible = "avm,eva-firmware"; label = "firmware"; reg = <0x02 0xee>; }; -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] tools: mktplinkfw2: add split-uboot layout
This commit adds the split-uboot partition layout used by the Archer C50 v4 to mktplinkfw2. Signed-off-by: David Bauer --- tools/firmware-utils/src/mktplinkfw2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/firmware-utils/src/mktplinkfw2.c b/tools/firmware-utils/src/mktplinkfw2.c index dead49e7af..35db848bba 100644 --- a/tools/firmware-utils/src/mktplinkfw2.c +++ b/tools/firmware-utils/src/mktplinkfw2.c @@ -146,6 +146,12 @@ static struct flash_layout layouts[] = { .kernel_la = 0x8000, .kernel_ep = 0x8000, .rootfs_ofs = 0x14, + }, { + .id = "8MSUmtk", /* Split U-Boot OS */ + .fw_max_len = 0x77, + .kernel_la = 0x8000, + .kernel_ep = 0x8000, + .rootfs_ofs = 0x14, }, { .id = "8MLmtk", .fw_max_len = 0x7b, -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ramips: add support for Archer C50 v4
This adds support for the TP-Link Archer C50 v4. It uses the same hardware as the v3 variant, sharing the same FCC-ID. CPU: MediaTek MT7628 (580MHz) RAM: 64M DDR2 FLASH: 8M SPI WiFi: 2.4GHz 2x2 MT7628 b/g/n integrated WiFI: 5GHz 2x2 MT7612 a/n/ac ETH: 1x WAN 4x LAN LED: Power, WiFi2, WiFi5, LAN, WAN, WPS BTN: WPS/WiFi, RESET UART: Near ETH ports, 115200 8n1, TP-Link pinout Create Factory image As all installation methods require a U-Boot to be integrated into the Image (and we do not ship one with the image) we are not able to create an image in the OpenWRT build-process. Download a TP-Link image from their Wesite and a OpenWRT sysupgrade image for the device and build yourself a factory image like following: TP-Link image: tpl.bin OpenWRT sysupgrade image: owrt.bin > dd if=tpl.bin of=boot.bin bs=131584 count=1 > cat owrt.bin >> boot.bin Installing via Web-UI - Upload the boot.bin via TP-Links firmware upgrade tool in the web-interface. Installing via Recovery --- Activate Web-Recovery by beginning the upgrade Process with a Firmware-Image from TP-Link. After starting the Firmware Upgrade, wait ~3 seconds (When update status is switching to 0%), then disconnect the power supply from the device. Upgrade flag (which activates Web-Recovery) is written before the OS-image is touched and removed after write is succesfull, so this procedure should be safe. Plug the power back in. It will come up in Recovery-Mode on 192.168.0.1. When active, all LEDs but the WPS LED are off. Remeber to asign yourself a static IP-adress as DHCP is not active in this mode. The boot.bin can now be uploaded and flashed using the web-recovery. Installing via TFTP --- Prepare an image like following (Filenames from factory image steps apply here) > dd if=/dev/zero of=tp_recovery.bin bs=196608 count=1 > dd if=tpl.bin of=tmp.bin bs=131584 count=1 > dd if=tmp.bin of=boot.bin bs=512 skip=1 > cat boot.bin >> tp_recovery.bin > cat owrt.bin >> tp_recovery.bin Place tp_recovery.bin in root directory of TFTP server and listen on 192.168.0.66/24. Connect router LAN ports with your computer and power up the router while pressing the reset button. The router will download the image via tftp and after ~1 Minute reboot into OpenWRT. U-Boot CLI -- U-Boot CLI can be activated by holding down '4' on bootup. Dual U-Boot --- This is the first TP-Link MediaTek device to feature a split-uboot design. The first (factory-uboot) provides recovery via TFTP and HTTP, jumping straight into the second (firmware-uboot) if no recovery needs to be performed. The firmware-uboot unpacks and executed the kernel. Web-Recovery TP-Link integrated a new Web-Recovery like the one on the Archer C7v4 / TL-WR1043v5. Stock-firmware sets a flag in the "romfile" partition before beginning to write and removes it afterwards. If the router boots with this flag set, bootloader will automatically start Web-recovery and listens on 192.168.0.1. This way, the vendor-firmware or an OpenWRT factory image can be written. By doing the same while performing sysupgrade, we can take advantage of the Web-recovery in OpenWRT. It is important to note that Web-Recovery is only based on this flag. It can't detect e.g. a crashing kernel or other means. Once activated it won't boot the OS before a recovery action (either via TFTP or HTTP) is performed. This recovery-mode is indicated by an illuminated WPS-LED on boot. Signed-off-by: David Bauer --- .../ramips/base-files/etc/board.d/01_leds | 3 +- .../ramips/base-files/etc/board.d/02_network | 1 + .../ramips/base-files/lib/upgrade/platform.sh | 4 + .../ramips/base-files/lib/upgrade/tplink.sh | 31 ++ target/linux/ramips/dts/ArcherC50V4.dts | 100 ++ .../ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi | 89 target/linux/ramips/image/mt76x8.mk | 14 +++ 7 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/base-files/lib/upgrade/tplink.sh create mode 100644 target/linux/ramips/dts/ArcherC50V4.dts create mode 100644 target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi 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 b2c69d4b59..94ed6d41f6 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -330,7 +330,8 @@ tplink,c20-v4) ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" "wlan0" ;; -tplink,c50-v3) +tplink,c50-v3|\ +tplink,c50-v4) ucidef_set_led_switch "lan" "lan" "$bo
Re: [OpenWrt-Devel] [PATCH 1/2] kernel: add DT binding support to AVM EVA parser
Hello John, On 03.12.18 07:24, John Crispin wrote: @@ -79,9 +80,19 @@ static int mtdsplit_parse_eva(struct mtd_info *master, return EVA_NR_PARTS; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) Hi, the kernel version check is not required and can be dropped i believe John You are right, eva_mtdsplit is only used by ar71xx, ath79 and lantiq target, all K4.14 targets. I will remove the version check in the next version. Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] ar71xx Vs ath79
Hello John, > The idea was to fade out ar71xx after the next release and only accept > new boards for ath79. However i'd been fine taking that step as of now. > i have noticed that the ath79 patches far out number the ar71xx ones. we > have lots of patches that migrate boards and i have seen a few new > boards added only to ath79. lets see how the thread goes, looking fwd to > hearing opinions... +1 for Phasing out ar71xx. ath79 seems to be in a good state so the majority of devices should work without a lot of hassle. Not sure about devices with a lot of custom code in the machine-file (Meraki?) but IMHO they should not stall this process. Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ath79: add support for devolo WiFi pro 1200e
Hardware CPU: Qualcomm Atheros QCA9558 RAM: 128M DDR2 FLASH: 16MiB ETH: 1x Atheros AR8035 (PoE in) 1x Atheros AR8033 WiFi2: QCA9558 2T2R WiFi5: QCA9880 2T2R BTN: 1x Reset LED: 1x LED blue 1x LED red BUZZ: 1x GPIO attached piezo buzzer (controllable ass LED) UART: 3.3V GND TX RX (115200-N-8) (3.3V is square pad) Header is located next to reset-button Installation Make sure you set a password for the root user as prompted on first setup! 1. Upload OpenWRT sysupgrade image via SSH to the device. Use /tmp as the destination folder on the device. User is root, password the one set in the web interface. 2. Install OpenWRT with > sysupgrade -n -F /tmp/ Signed-off-by: David Bauer --- .../ath79/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 4 + .../ath79/dts/qca9558_devolo_dvl1200e.dts | 20 ++ .../ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 185 ++ target/linux/ath79/generic/config-default | 3 + target/linux/ath79/image/generic.mk | 8 + 6 files changed, 223 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index fa7a618909..340befefed 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -58,6 +58,9 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan" ;; + devolo,dvl1200e) + ucidef_set_interface_lan "eth0 eth1" + ;; dlink,dir-825-b1) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 82c23e3079..d1b3bbdcb5 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -87,6 +87,10 @@ board=$(board_name) case "$FIRMWARE" in "ath10k/cal-pci-:00:00.0.bin") case $board in + devolo,dvl1200e) + ath10kcal_extract "art" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0) -1) + ;; glinet,gl-x750) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts new file mode 100644 index 00..240425d990 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1200e", "qca,qca9557"; + model = "devolo WiFi pro 1200e"; +}; + + { + status = "okay"; +}; + + { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi new file mode 100644 index 00..f11fd2db48 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -0,0 +1,185 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/* + * The hardware of this board family is most likely shared with other devices from other manufacturers. + * Devolo seems to use hardware from Edimax, namely the Edimax WAP1750. + * + * The base board is identical but the single models differ in number of buttons, ethernet ports, + * external console, USB, external / internal antennas and number of spatial streams. + */ + +/dts-v1/; + +#include +#include + +#include "qca9557.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = _blue; + led-failsafe = _red; + led-running = _blue; + led-upgrade = _red; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "devolo:blue:status"; + gpios = < 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "devolo:red
[OpenWrt-Devel] [PATCH 1/2] ath79: load watchdog before PHY driver
The initialization for the two ethernet PHYs causes the hardware wathchdog of devolo WiFi pro boards to trigger reset. Linking the watchdog drivers before the PHY driver fixes this issue. Signed-off-by: David Bauer --- .../431-link-phy-after-watchdog.patch | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 target/linux/ath79/patches-4.14/431-link-phy-after-watchdog.patch diff --git a/target/linux/ath79/patches-4.14/431-link-phy-after-watchdog.patch b/target/linux/ath79/patches-4.14/431-link-phy-after-watchdog.patch new file mode 100644 index 00..d5b5357fd5 --- /dev/null +++ b/target/linux/ath79/patches-4.14/431-link-phy-after-watchdog.patch @@ -0,0 +1,31 @@ +Index: linux-4.14.82/drivers/Makefile +=== +--- linux-4.14.82.orig/drivers/Makefile linux-4.14.82/drivers/Makefile +@@ -9,13 +9,16 @@ + obj-y += irqchip/ + obj-y += bus/ + +-obj-$(CONFIG_GENERIC_PHY) += phy/ +- + # GPIO must come after pinctrl as gpios may need to mux pins etc + obj-$(CONFIG_PINCTRL) += pinctrl/ + obj-$(CONFIG_GPIOLIB) += gpio/ + obj-y += pwm/ + ++# load watchdog before PHY drivers as PHY driver init causes ++# watchdog timeout on some devices ++obj-$(CONFIG_WATCHDOG)+= watchdog/ ++obj-$(CONFIG_GENERIC_PHY) += phy/ ++ + obj-$(CONFIG_PCI) += pci/ + obj-$(CONFIG_PCI_ENDPOINT)+= pci/endpoint/ + # PCI dwc controller drivers +@@ -120,7 +123,6 @@ obj-$(CONFIG_W1) += w1/ + obj-y += power/ + obj-$(CONFIG_HWMON) += hwmon/ + obj-$(CONFIG_THERMAL) += thermal/ +-obj-$(CONFIG_WATCHDOG)+= watchdog/ + obj-$(CONFIG_MD) += md/ + obj-$(CONFIG_BT) += bluetooth/ + obj-$(CONFIG_ACCESSIBILITY) += accessibility/ -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] ath79: add support for TP-Link Archer A7
Hello Karl, just as a heads-up for your v3: On 23.11.18 22:00, Karl-Felix Glatzer wrote: > --- a/target/linux/ath79/image/common-tp-link.mk > +++ b/target/linux/ath79/image/common-tp-link.mk > @@ -39,6 +39,15 @@ define Build/mktplinkfw-combined > @mv $@.new $@ > endef > > +define Build/uImageArcher > + ${STAGING_DIR_HOST}/bin/mkimage \ > + -A $(LINUX_KARCH) \ > + -O linux -T kernel \ > + -C $(1) -a $(KERNEL_LOADADDR) -e $(if > $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ > + -n '$(call toupper,$(LINUX_KARCH)) OpenWrt > Linux-$(LINUX_VERSION)' -d $@ $@.new > + @mv $@.new $@ > +endef > + This was added in https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=946ffe470d923fdde53db68592437194e0c276fc > --- a/target/linux/ath79/image/generic-tp-link.mk > +++ b/target/linux/ath79/image/generic-tp-link.mk > @@ -1,5 +1,21 @@ > include ./common-tp-link.mk > > +define Device/tplink_archer-a7-v5 > + $(Device/tplink) Added a definition for the safeloader-uimage with the same commit, replace $(Device/tplink) with $(Device/tplink-safeloader-uimage) > + ATH_SOC := qca9563 > + DEVICE_TITLE := TP-LINK Archer A7 v5 > + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport > kmod-ath10k-ct ath10k-firmware-qca988x-ct > + SUPPORTED_DEVICES := tplink,archer-a7-v5 > + BOARDNAME := ARCHER-A7-V5 > + TPLINK_BOARD_ID := ARCHER-A7-V5 > + IMAGE_SIZE := 15104k > + KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma Can be dropped, defined in tplink-safeloader, inherited by tplink-safeloader-uimage > + IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ > +append-metadata | check-size (IMAGE_SIZE) Can be dropped also. tplink-safeloader is missing the size check, this is already performed within tplink-safeloader.c > + IMAGE/factory.bin := append-rootfs | tplink-safeloader factory Can be dropped also. Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] kernel: add DT binding support to AVM EVA parser
It allows selecting split-firmware parser directly by specifying image-format in the device-tree. Signed-off-by: David Bauer --- v2: remove kernel version check .../linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c index 746944ee2e..a30297a964 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c @@ -79,9 +79,15 @@ static int mtdsplit_parse_eva(struct mtd_info *master, return EVA_NR_PARTS; } +static const struct of_device_id mtdsplit_eva_of_match_table[] = { + { .compatible = "avm,eva-firmware" }, + {}, +}; + static struct mtd_part_parser mtdsplit_eva_parser = { .owner = THIS_MODULE, .name = "eva-fw", + .of_match_table = mtdsplit_eva_of_match_table, .parse_fn = mtdsplit_parse_eva, .type = MTD_PARSER_TYPE_FIRMWARE, }; -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ath79: add AVM EVA firmware partition compatible
This commit adds firmware partition compatible for the AVM FRITZ!Box 4020 and AVM FRITZ!WLAN Repeater 300E. This allows to select the correct mtdsplit parser instead of trying all available ones one by one. Signed-off-by: David Bauer --- target/linux/ath79/dts/ar7242_avm_fritz300e.dts | 1 + target/linux/ath79/dts/qca9561_avm_fritz4020.dts | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts index 0a142666ac..fb6b0ff30e 100644 --- a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts +++ b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts @@ -115,6 +115,7 @@ }; partition@2 { + compatible = "avm,eva-firmware"; reg = <0x2 0xee>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts index 8489c8a1e6..3310a3423b 100644 --- a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts +++ b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts @@ -136,6 +136,7 @@ }; partition@1 { + compatible = "avm,eva-firmware"; label = "firmware"; reg = <0x02 0xee>; }; -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] ath79: add AVM 4020 firmware partition compatible
Hi Petr, On 01.12.18 10:33, Petr Štetiar wrote: > Do you think, that the same format could be applied also to > ar7242_avm_fritz300e.dts? Would you mind to add this board to this patch as > well? According to my notes which are included in the PR[1] it should be just > this two AVM boards with this EVA format. yes, they both use the EVA image-format so the Fritz 300E can also have the compatible property added. I've submitted an altered version of the patch. Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] ar71xx Vs ath79 -- sysupgrade
Hello Henrique, On 03.12.18 19:04, Henrique de Moraes Holschuh wrote: > Is there a viable way to "sysupgrade" from ar71xx to ath79? > > Even if it would require a model-by-model "update map" for the > lower-level stuff (LEDs, switch ports?, etc), that would be valuable. > Otherwise, it will be difficult for people with fleets of ar71xx devices > to remotely switch them to ath79... We've looked into this issue a few weeks ago. We have a lot of wireless mesh communities in Germany using thousands of ar71xx devices, so this is something we need. First things first - sysupgrade is possible (be it with -F option). The wmac path however changed, it has to be adjusted from "qca95xx_wmac" to "platform/ahb/ahb:apb/1810.wmac". Another aspect was the LED configuration, as LED naming is very inconsistent and often differs from ar71xx. Some LEDs are now not included in UCI configuration. So you either need to delete (and recreate) them ore just dump your '/etc/config/system' and recreate it using "config_generate". I expect ethernet and switch configuration to be consistent between ar71xx and ath79, but exceptions may apply. Tested this migration strategy across some devices and it worked flawlessly. For anyone interested, there is a downstream issue at the Gluon project regarding this topic. [1] [1] https://github.com/freifunk-gluon/gluon/issues/1570 Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ath79: add Archer C58/C59 partition compatible
This commit adds firmware partition compatible for the TP-Link Archer C58 v1 and Archer C59 v1. Since a22311e this allows to select the correct mtdsplit parser instead of trying all available ones one by one. Signed-off-by: David Bauer --- target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts | 1 + target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts index ffce955fd3..0e122b4ddc 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts @@ -93,6 +93,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x02 0x7c>; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts index 9d4df9a5fc..64778df495 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts @@ -116,6 +116,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x02 0xe3>; }; -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] ath79: add firmware partition compatible for OCEDO
This commit adds firmware partition compatible for the OCEDO Raccoon and OCEDO Koala. Since a22311e this allows to select the correct mtdsplit parser instead of trying all available ones one by one. Signed-off-by: David Bauer --- target/linux/ath79/dts/ar9344_ocedo_raccoon.dts | 1 + target/linux/ath79/dts/qca9558_ocedo_koala.dts | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts index 206619ef5c..eb7219b6f9 100644 --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts @@ -105,6 +105,7 @@ }; partition@5 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x05 0x74>; }; diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index 748eec823b..d87ddc48ae 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -101,6 +101,7 @@ }; partition@5 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x05 0x74>; }; -- 2.19.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] mpc85xx: add support for Sophos RED 15w Rev.1
On 10.01.19 19:03, Christian Lamparter wrote: > On Tuesday, January 8, 2019 1:20:56 AM CET David Bauer wrote: >> Hardware >> >> CPU: Freescale P1010 PowerPC >> RAM: 128M DDR3 >> NAND: 128MiB >> ETH: RTL8211F SGMII PHY >> RTL8367B 5-port RGMII switch >> (not connected to SoC - unmanaged) >> WiFi: SparkLan WPEA-121N >>- Atheros AR9382 2T2R abgn >> USB: 1x USB 2.0 >> LED: System, Router, Internet, Tunnel controllable >> LAN1-4, WAN, Power non-controllable >> BTN: None >> >> Installation >> >> 1. Power on the device while attached to the Console port. >> >> 2. Halt the U-Boot by pressing Enter when prompted. >> >> 3. Set the correct bootcmd for booting OpenWRT: >> > setenv bootargs_owrt "setenv bootargs console=ttyS0,115200" >> > setenv bootcmd "run bootargs_owrt; >>nand read 0x100 0x30 0x80; >>bootm 0x100;" >> > saveenv >> >> 5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a >>TFTP server root-directory served on 192.168.1.2/24. Connect your >>computer to one of the LAN-ports. >> >> 4. Boot OpenWRT initramfs image with >> > run bootargs_owrt; tftpboot 0x100 192.168.1.2:kernel.bin; >>bootm 0x100; >> >> 6. (Optional) >>Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case >>you ever want to go back to the vendor firmware. >> >> 7. Create Ubi Volume on mtd4 by executing >> > ubiformat /dev/mtd4 -y >> >> 8. Transfer OpenWRT sysupgrade image to the device via SCP and install it >>with >> > sysupgrade -n >> >> Back to Stock >> = >> If you want to go back to the stock firmware, here is the bootcmd of the >> vendor firmware: >> > setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5; >>nand read 0xc0 0x0030 0x10; >>nand read 0x100 0x0040 0x0080; >>bootm 0x100 - 0xc0 >> >> Set it via 'setenv' from the U-Boot shell and don't forget to save it >> using 'saveenv'! >> >> After this, boot the OpenWRT initramfs image just like you would for >> installation. Write back the three vendor partitions using mtd. Reboot >> the device afterwards. >> >> Signed-off-by: David Bauer >> --- >> v2: >> - move kernel configuration to subtarget >> - move nand feature to subtarget >> - move partition layout to "fixed-partition" subnode >> - add SPDX license-identifier to red15w_rev1.c >> - use pr_info instead of printk in red15w_rev1.c >> >> target/linux/mpc85xx/Makefile | 2 +- >> target/linux/mpc85xx/base-files/etc/diag.sh | 3 + >> .../etc/hotplug.d/ieee80211/10-fix-wifi-mac | 20 ++ >> .../base-files/lib/upgrade/platform.sh| 13 +- >> target/linux/mpc85xx/config-4.14 | 1 + >> target/linux/mpc85xx/config-4.19 | 1 + >> .../arch/powerpc/boot/dts/red-15w-rev1.dts| 207 ++ >> .../arch/powerpc/platforms/85xx/red15w_rev1.c | 87 >> target/linux/mpc85xx/generic/config-default | 16 ++ >> target/linux/mpc85xx/generic/target.mk| 1 + >> target/linux/mpc85xx/image/Makefile | 12 + >> target/linux/mpc85xx/p1020/target.mk | 1 - >> .../104-powerpc-85xx-red-15w-rev1.patch | 33 +++ >> .../103-powerpc-85xx-red-15w-rev1.patch | 33 +++ >> 14 files changed, 427 insertions(+), 3 deletions(-) >> create mode 100644 >> target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac >> create mode 100644 >> target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts >> create mode 100644 >> target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c >> create mode 100644 >> target/linux/mpc85xx/patches-4.14/104-powerpc-85xx-red-15w-rev1.patch >> create mode 100644 >> target/linux/mpc85xx/patches-4.19/103-powerpc-85xx-red-15w-rev1.patch >> >> diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile >> index 552f16e82f..0affc38f61 100644 >> --- a/target/linux/mpc85xx/Makefile >> +++ b/target/linux/mpc85xx/Makefile >> @@ -10,7 +10,7 @@ ARCH:=powerpc >> BOARD:=mpc85xx >> BOARDNAME:=Freescale MPC85xx >> CPU_TYPE:=8540 >> -FEATURES:=squashfs >> +FEATURES:=squashfs ramdisk >> MAINTAINER:=Imre Kaloz >> SUBTARGETS:=generic p1020 >> > >
[OpenWrt-Devel] [PATCH v2] mpc85xx: add support for Sophos RED 15w Rev.1
Hardware CPU: Freescale P1010 PowerPC RAM: 128M DDR3 NAND: 128MiB ETH: RTL8211F SGMII PHY RTL8367B 5-port RGMII switch (not connected to SoC - unmanaged) WiFi: SparkLan WPEA-121N - Atheros AR9382 2T2R abgn USB: 1x USB 2.0 LED: System, Router, Internet, Tunnel controllable LAN1-4, WAN, Power non-controllable BTN: None Installation 1. Power on the device while attached to the Console port. 2. Halt the U-Boot by pressing Enter when prompted. 3. Set the correct bootcmd for booting OpenWRT: > setenv bootargs_owrt "setenv bootargs console=ttyS0,115200" > setenv bootcmd "run bootargs_owrt; nand read 0x100 0x30 0x80; bootm 0x100;" > saveenv 5. Rename OpenWRT initramfs image to 'kernel.bin' and place it in a TFTP server root-directory served on 192.168.1.2/24. Connect your computer to one of the LAN-ports. 4. Boot OpenWRT initramfs image with > run bootargs_owrt; tftpboot 0x100 192.168.1.2:kernel.bin; bootm 0x100; 6. (Optional) Make a Backup of 'sophos-os1', 'sophos-os2' and 'sophos-data' in case you ever want to go back to the vendor firmware. 7. Create Ubi Volume on mtd4 by executing > ubiformat /dev/mtd4 -y 8. Transfer OpenWRT sysupgrade image to the device via SCP and install it with > sysupgrade -n Back to Stock = If you want to go back to the stock firmware, here is the bootcmd of the vendor firmware: > setenv bootargs console=ttyS0,115200 root=/dev/mtdblock5; nand read 0xc0 0x0030 0x10; nand read 0x100 0x0040 0x0080; bootm 0x100 - 0xc0 Set it via 'setenv' from the U-Boot shell and don't forget to save it using 'saveenv'! After this, boot the OpenWRT initramfs image just like you would for installation. Write back the three vendor partitions using mtd. Reboot the device afterwards. Signed-off-by: David Bauer --- v2: - move kernel configuration to subtarget - move nand feature to subtarget - move partition layout to "fixed-partition" subnode - add SPDX license-identifier to red15w_rev1.c - use pr_info instead of printk in red15w_rev1.c target/linux/mpc85xx/Makefile | 2 +- target/linux/mpc85xx/base-files/etc/diag.sh | 3 + .../etc/hotplug.d/ieee80211/10-fix-wifi-mac | 20 ++ .../base-files/lib/upgrade/platform.sh| 13 +- target/linux/mpc85xx/config-4.14 | 1 + target/linux/mpc85xx/config-4.19 | 1 + .../arch/powerpc/boot/dts/red-15w-rev1.dts| 207 ++ .../arch/powerpc/platforms/85xx/red15w_rev1.c | 87 target/linux/mpc85xx/generic/config-default | 16 ++ target/linux/mpc85xx/generic/target.mk| 1 + target/linux/mpc85xx/image/Makefile | 12 + target/linux/mpc85xx/p1020/target.mk | 1 - .../104-powerpc-85xx-red-15w-rev1.patch | 33 +++ .../103-powerpc-85xx-red-15w-rev1.patch | 33 +++ 14 files changed, 427 insertions(+), 3 deletions(-) create mode 100644 target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/red-15w-rev1.dts create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/red15w_rev1.c create mode 100644 target/linux/mpc85xx/patches-4.14/104-powerpc-85xx-red-15w-rev1.patch create mode 100644 target/linux/mpc85xx/patches-4.19/103-powerpc-85xx-red-15w-rev1.patch diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile index 552f16e82f..0affc38f61 100644 --- a/target/linux/mpc85xx/Makefile +++ b/target/linux/mpc85xx/Makefile @@ -10,7 +10,7 @@ ARCH:=powerpc BOARD:=mpc85xx BOARDNAME:=Freescale MPC85xx CPU_TYPE:=8540 -FEATURES:=squashfs +FEATURES:=squashfs ramdisk MAINTAINER:=Imre Kaloz SUBTARGETS:=generic p1020 diff --git a/target/linux/mpc85xx/base-files/etc/diag.sh b/target/linux/mpc85xx/base-files/etc/diag.sh index 3d56d14b08..e344d4b756 100644 --- a/target/linux/mpc85xx/base-files/etc/diag.sh +++ b/target/linux/mpc85xx/base-files/etc/diag.sh @@ -9,6 +9,9 @@ get_status_led() { aerohive,hiveap-330) status_led="hiveap-330:green:tricolor0" ;; + sophos,red-15w-rev1) + status_led="red-15w-rev1:green:system" + ;; tplink,tl-wdr4900-v1) status_led="tp-link:blue:system" ;; diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac new file mode 100644 index 00..3092cebfc9 --- /dev/null +++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac @@ -0,0 +1,20 @@ +#!/bin/ash + +[ "$ACTION" == "add" ] || exit 0 + +PHYNBR=${DEVPATH##*/phy} + +[ -n $PHYNBR ] || exit 0 + +. /lib/functions.sh +. /lib/functions/system.sh + +boar
[OpenWrt-Devel] [PATCH] ath79: fix Archer A7 v5 5GHz MAC adress
Currently all Archer A7 v5 have the same (incorrect) MAC address. The address is currently derived from eth1 which is not present on the QCA9563. Use eth0 to get the correct MAC address. Signed-off-by: David Bauer --- .../ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index b83f3c0b94..53f57be824 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -113,11 +113,11 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; - tplink,archer-a7-v5|\ tplink,archer-c7-v2) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1) ;; + tplink,archer-a7-v5|\ tplink,archer-c7-v5) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ath79: use caldata patching for Archer C58/C59
With this commit the TP-Link Archer C58 and Archer C59 use caldata patching in order to set the correct 5GHz MAC-address. Tested on TP-Link Archer C59 v1. For more details see commit 330965b. Signed-off-by: David Bauer --- .../ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 1 + .../ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac | 4 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index b9a987d418..9469602f77 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -152,6 +152,7 @@ case "$FIRMWARE" in tplink,archer-c58-v1|\ tplink,archer-c59-v1) ath10kcal_extract "art" 20480 12064 + ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary mac 8) -1) ln -sf /lib/firmware/ath10k/pre-cal-pci-\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index bb55b1c11c..14d4f6b9d6 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -24,10 +24,6 @@ case "$board" in [ "$PHYNBR" -eq 1 ] && \ echo $(k2t_get_mac "lan_mac") > /sys${DEVPATH}/macaddress ;; - tplink,archer-c58-v1|\ - tplink,archer-c59-v1) - echo $(macaddr_add $(mtd_get_mac_binary mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress - ;; *) ;; esac -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ipq40xx: clean up netgear-dni image generation
Hello Christian, On 19.12.18 00:14, Christian Lamparter wrote: > I had no luck with a loaned EX6150v2 and this patch. I tried to sysupgrade > from the current -snapshot to a newly compiled image with the patch applied. > But sadly, the device didn't boot (power led stayed orange). I had to > initiaite the tftp firmware recovery after waiting 15 minutes through the > hold "Factory Reset" on boot until the light flashes green in order to get > it back. > > Sadly, I can't really help with any bootlogs since I can't "void its > warranty" :(. > could you send me the sysupgrade image you've used so i can test it on my unit and get a bootlog? Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips: add missing SPDX identifier for EX6150
This adds the SPDX license identifier for the NETGEAR EX6150. It was missed when submitting the original patch. Signed-off-by: David Bauer --- target/linux/ramips/dts/EX6150.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/dts/EX6150.dts b/target/linux/ramips/dts/EX6150.dts index 729173bdd6..a5827f270d 100644 --- a/target/linux/ramips/dts/EX6150.dts +++ b/target/linux/ramips/dts/EX6150.dts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; #include "mt7621.dtsi" -- 2.21.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] ath79: add support for OCEDO Ursus
Hello, I've tried your suggenstions on my unit (and try to provide some information from my work with the other two APs from OCEDO/Riverbed). On 02.04.19 00:19, Petr Štetiar wrote: > markus.sche...@gmail.com [2019-03-21 16:43:27]: > > Hi, > >> +label = "ursus:green:wlan2"; >> +label = "ursus:green:wlan5"; > > could we please make it wlan2g and wlan5g in order to stay consistent? > > I found this old PR[1] for ar71xx, which makes me wonder if the stuff bellow > is correct. > >> + { >> +status = "okay"; >> + >> +phy1: ethernet-phy@1 { >> +reg = <1>; >> +}; >> + > > In that ar71xx code it seems, that phy2 is connected through GMAC1/SGMII. Can > you please explain in your commit message what is connected where in more > details? The OCEDO Ursus / Riverbed AP5r is a bit odd here as the MDIO lines for the GMAC1 PHY is connected to the MDIO interface of GMAC0 (nothing connected to GMAC1 MDIO). This is also how it's interfaced in the ar71xx PR from last year ago. > >> +phy2: ethernet-phy@2 { >> +reg = <2>; >> +}; >> +}; >> + >> + { >> +status = "okay"; > > add newline here > >> +mtd-mac-address = < 0x00>; >> +phy-handle = <>; >> +pll-data = <0xa600 0x8101 0x80001313>; > > pll-data = <0xae00 0xa101 0xa0001313>; I'm experiencing low throughput with this. The PLL-values from the PR also match the ones i get via devmem from the vendor SteelWrt. > > what is expected phy-mode here? This information seems to be redundant to me as QCA9558 only supports RGMII/SGMII and this information is already present in the inherited qca9557.dtsi. While we could (theoretically) use the mux to switch the interfaces between the GMACs i don't see support for it currently neither in ar71xx nor ath79. > >> + { >> +status = "okay"; > > add newline here > >> +mtd-mac-address = < 0x12>; > > mtd-mac-address = < 0xc>; ? It seems the original firmware derives the MAC addresses for the interfaces from the local OCEDO/Riverbed gateway the AP is connected to (note the devices are not intended to be used independently). The device itself has 4 unique addresses stored in the ART partition. The first one used for eth0 (only MAC address matching the original firmware), the other ones seem to be for IPSec tunnels but they are also device-unique. Because of that, I've decided to distribute the 3 i had for the Raccoon and Koala across eth0/wlan0/wlan1. This patch seems to match the scheme of the existing two, adding the forth IP address to eth1, which i would also aim for. > >> +phy-handle = <>; >> +pll-data = <0x3000101 0x101 0x1313>; > > what is expected phy-mode here? > > pll-data = <0x030 0x101 0x1313>; I get around ~2% of packet-loss with these. I know they are used in the ar71xx PR, but as the ones currently used in this patch are matching the ones from SteelWrt I'm more confident with whats present here. Best wishes David > > 1. > https://github.com/openwrt/openwrt/pull/1016/commits/6bc138ec46ce956783aba7f8c83608982030a8be > > -- ynezz > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] ath79: add support for OCEDO Ursus
Hello Petr, sorry for the late reply, I was very busy last week. On 03.04.19 09:35, Petr Štetiar wrote: > ok, so it seems like this patch is fine with you and you've already tested it > as it is, so can I add your Tested-by or Reviewed-by as well? Tested-by: David Bauer Maybe you can alter the LED names and the newline issue on your side avoiding a v2 :) Best wishes David > > -- ynezz > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips: enable R6120 USB power
Enable the USB power for the Netgear R6120. Otherwise, no power is supplied to an attached USB device. Signed-off-by: David Bauer --- target/linux/ramips/dts/R6120.dts | 15 ++- target/linux/ramips/mt76x8/config-4.14 | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/R6120.dts b/target/linux/ramips/dts/R6120.dts index 07b1a165d3..d263c7824b 100644 --- a/target/linux/ramips/dts/R6120.dts +++ b/target/linux/ramips/dts/R6120.dts @@ -65,13 +65,26 @@ gpios = < 7 GPIO_ACTIVE_LOW>; }; }; + + usb-regulator { + compatible = "regulator-fixed"; + + regulator-name = "USB-power"; + gpio = < 13 GPIO_ACTIVE_HIGH>; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + enable-active-high; + + regulator-always-on; + }; }; { state_default: pinctrl0 { gpio { ralink,group = "p0led_an", "p1led_an", "p2led_an", - "p3led_an", "p4led_an", "wdt", "wled_an"; + "p3led_an", "p4led_an", "wdt", + "wled_an", "uart1"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14 index 62e51cbe43..5bcb948585 100644 --- a/target/linux/ramips/mt76x8/config-4.14 +++ b/target/linux/ramips/mt76x8/config-4.14 @@ -192,6 +192,8 @@ CONFIG_RALINK=y # CONFIG_RCU_STALL_COMMON is not set CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_RESET_CONTROLLER=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set -- 2.21.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 3/3] ipq40xx: add support for FritzBox 7530
Hardware CPU: Qualcomm IPQ4019 RAM: 256M FLASH: 128M NAND ETH: QCA8075 VDSL: Intel/Lantiq VRX518 PCIe attached currently not supported DECT: Dialog SC14448 currently not supported WiFi2: IPQ4019 2T2R 2SS b/g/n WiFi5: IPQ4019 2T2R 2SS n/ac LED:- Power/DSL green - WLAN green - FON/DECT green - Connect/WPS green - Info green - Info red BTN:- WLAN - FON - WPS/Connect UART: 115200n8 3.3V (located under the Dialog chip) VCC - RX - TX - GND (Square is VCC) Installation 1. Grab the uboot for the Device from the 'u-boot-fritz7530' subdirectory. Place it in the same directory as the 'eva_ramboot.py' script. It is located in the 'scripts/flashing' subdirectory of the OpenWRT tree. 2. Assign yourself the IP address 192.168.178.10/24. Connect your Computer to one of the boxes LAN ports. 3. Connect Power to the Box. As soon as the LAN port of your computer shows link, load the U-Boot to the box using following command. > ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz7530.bin 4. The U-Boot will now start. Now assign yourself the IP address 192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP server root directory and rename it to 'FRITZ7530.bin'. 5. The Box will now boot OpenWRT from RAM. This can take up to two minutes. 6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using scp. SSH into the Box and first write the Bootloader to both previous kernel partitions. > mtd write /path/to/uboot-fritz7530.bin uboot0 > mtd write /path/to/uboot-fritz7530.bin uboot1 7. Remove the AVM filesystem partitions to make room for our kernel + rootfs + overlayfs. > ubirmvol /dev/ubi0 --name=avm_filesys_0 > ubirmvol /dev/ubi0 --name=avm_filesys_1 8. Flash OpenWRT peristently using sysupgrade. > sysupgrade -n /path/to/openwrt-sysupgrade.bin Signed-off-by: David Bauer --- v2: - add PCIe subnode so VRX518 is detected on the PCIe bus - driver is still missing - add fallback onto uboot1 partition for the caldata - adjust caldata size so no padding is extracted - reordered 01_leds - remove gpio52 from nand pinmux - fixed wrong label on SBL1 partition - drop 'qcom,ipq4019' compatible package/boot/uboot-fritz4040/Makefile | 7 +- package/firmware/ipq-wifi/Makefile| 3 +- package/firmware/ipq-wifi/board-fritz7530.bin | Bin 0 -> 24324 bytes .../ipq40xx/base-files/etc/board.d/01_leds| 7 +- .../ipq40xx/base-files/etc/board.d/02_network | 4 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 8 + .../base-files/lib/upgrade/platform.sh| 3 +- .../boot/dts/qcom-ipq4019-fritzbox-7530.dts | 305 + .../boot/dts/qcom-ipq4019-fritzbox-7530.dts | 309 ++ target/linux/ipq40xx/image/Makefile | 9 + .../901-arm-boot-add-dts-files.patch | 3 +- .../901-arm-boot-add-dts-files.patch | 3 +- 12 files changed, 653 insertions(+), 8 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-fritz7530.bin create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 45f211527d..a53b7d010f 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -30,6 +30,11 @@ define U-Boot/fritz4040 BUILD_DEVICES:=avm_fritzbox-4040 endef +define U-Boot/fritz7530 + NAME:=FritzBox 7530 + BUILD_DEVICES:=avm_fritzbox-7530 +endef + UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes UBOOT_MAKE_FLAGS = USE_PRIVATE_LIBGCC=yes export DTC @@ -56,6 +61,6 @@ define Package/u-boot/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/ endef -UBOOT_TARGETS := fritz4040 +UBOOT_TARGETS := fritz4040 fritz7530 $(eval $(call BuildPackage/U-Boot)) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 7c9def8967..695d2f4429 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -17,7 +17,7 @@ endef # Please send a mail with your device-specific board files upstream. # You can find instructions and examples on the linux-wireless wiki: # <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles> -ALLWIFIBOARDS:=asus_map-ac2200 engenius_eap1300 linksys_ea6350v3 +ALLWIFIBOARDS:=asus_map-ac2200 engenius_eap1300 fritz7530 linksys_ea6350v3 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) define Package/ipq-wifi-default @@ -54,6 +54,7 @@ endef #$(eval $(call generate-ipq-wifi-package,,,)) $(eval $(call generate-ipq-wifi-package,asus_map-ac2200,board-map-ac2200.bin,ASUS MAP-AC2200)) $(eval $(call generate-ipq-wi
[OpenWrt-Devel] [PATCH v2 1/3] scripts: make eva_ramboot.py offset configurable
The current eva_ramboot.py script is currently only compatible with Lantiq based AVM devices. For IPQ40xx devices, the offset needs to be changed. Also an alignment is not necessary here. Adjust the script to be able to pass an optional offset to load the image to. In case no offset is provided, the script behaves exactly as before this commit. Signed-off-by: David Bauer --- scripts/flashing/eva_ramboot.py | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/scripts/flashing/eva_ramboot.py b/scripts/flashing/eva_ramboot.py index b825d2768b..b182f09d21 100755 --- a/scripts/flashing/eva_ramboot.py +++ b/scripts/flashing/eva_ramboot.py @@ -1,24 +1,32 @@ -#!/usr/bin/python +#!/usr/bin/env python3 + +import argparse from ftplib import FTP from sys import argv from os import stat -assert len(argv) == 3 -ip = argv[1] -image = argv[2] +parser = argparse.ArgumentParser(description='Tool to boot AVM EVA ramdisk images.') +parser.add_argument('ip', type=str, help='IP-address to transfer the image to') +parser.add_argument('image', type=str, help='Location of the ramdisk image') +parser.add_argument('--offset', type=lambda x: int(x,0), help='Offset to load the image to in hex format with leading 0x. Only needed for non-lantiq devices.') +args = parser.parse_args() -size = stat(image).st_size +size = stat(args.image).st_size # arbitrary size limit, to prevent the address calculations from overflows etc. assert size < 0x200 -# We need to align the address. A page boundary seems to be sufficient on 7362sl -# and 7412 -addr = ((0x800 - size) & ~0xfff) -haddr = 0x8000 + addr -img = open(image, "rb") +if args.offset: + addr = size + haddr = args.offset +else: + # We need to align the address. + # A page boundary seems to be sufficient on 7362sl and 7412 + addr = ((0x800 - size) & ~0xfff) + haddr = 0x8000 + addr -ftp = FTP(ip, 'adam2', 'adam2') +img = open(args.image, "rb") +ftp = FTP(args.ip, 'adam2', 'adam2') def adam(cmd): print("> %s"%(cmd)) -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 2/3] uboot-fritz4040: bump version to 2019-02-08
Adds support for the AVM FRITZ!Box 7530. Signed-off-by: David Bauer --- package/boot/uboot-fritz4040/Makefile | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index df00b89af0..45f211527d 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -10,22 +10,23 @@ include $(INCLUDE_DIR)/kernel.mk PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=a768e513b07b5999a8e7d7740ac8d9da04ee7e51 -PKG_SOURCE_DATE:=2019-01-25 -PKG_MIRROR_HASH:=eb552c946bcad53763557b19703b10210f7acabf0d135759beddb7b11fa4ef25 +PKG_SOURCE_VERSION:=d306cce36f98a0a67becc42f20df4b22f1d1465f +PKG_SOURCE_DATE:=2019-02-08 +PKG_MIRROR_HASH:=715380605dd0cd6ffd65a18b34127bd57dfe9fb0a0164bf8aca703ee018d8070 -PKG_RELEASE:=1 +PKG_RELEASE:=2 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk define U-Boot/Default BUILD_TARGET:=ipq40xx + UBOOT_BOARD:=$(1) + UBOOT_IMAGE:=uboot-$(1).bin endef define U-Boot/fritz4040 NAME:=FritzBox 4040 - UBOOT_IMAGE:=uboot-fritz4040.bin BUILD_DEVICES:=avm_fritzbox-4040 endef @@ -42,7 +43,7 @@ endef define Build/Compile $(Build/Compile/U-Boot) - (cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh;) + (cd $(PKG_BUILD_DIR); ./fritz/fritzcreator.sh $(UBOOT_BOARD);) endef define Build/InstallDev -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 3/3] ipq40xx: add support for FritzBox 7530
Hello Christian, On 25.02.19 23:10, Christian Lamparter wrote: > On Wednesday, February 20, 2019 6:02:21 PM CET Christian Lamparter wrote: >> On Monday, February 18, 2019 11:58:34 PM CET David Bauer wrote: >>> diff --git >>> a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts >>> >>> b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts >>> new file mode 100644 >>> index 00..b2a33468bb >>> --- /dev/null >>> +++ >>> b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts >>> @@ -0,0 +1,305 @@ >>> + { >>> + status = "okay"; >>> + >>> + ranges = <0x8100 0 0x4020 0x4020 >>> + 0 0x0010 /* downstream I/O */ >>> + 0x8200 0 0x4800 0x4800 >>> + 0 0x1000>; /* non-prefetchable memory */ >> >> Let me dig out my MR33 (will have to wait until the Weekend) and see if this >> should be put into the qcom-ipq4019.dtsi as well. > > And it didn't work. While the pcie enumeration worked fine. > The QCA9887 was no longer attaching. As soon as the driver was > loaded it failed due to: > > [8.888466] ath10k_pci :01:00.0: enabling device (0140 -> 0142) > [8.934145] ath10k_pci :01:00.0: failed to wake up device : -110 > [8.935258] ath10k: failed to probe PCI : -110, retry-count: 0 > [8.949596] ath10k 4.19 driver, optimized for CT firmware, probing pci > device: 0x50. > [8.989503] ath10k_pci :01:00.0: failed to wake up device : -110 > [8.989899] ath10k: failed to probe PCI : -110, retry-count: 1 > [9.005086] ath10k 4.19 driver, optimized for CT firmware, probing pci > device: 0x50. > [9.046821] ath10k_pci :01:00.0: failed to wake up device : -110 > [9.049851] ath10k: failed to probe PCI : -110, retry-count: 2 > [9.062448] ath10k 4.19 driver, optimized for CT firmware, probing pci > device: 0x50. > [9.099055] ath10k_pci :01:00.0: failed to wake up device : -110 > [9.099442] ath10k: failed to probe PCI : -110, retry-count: 3 > [...] > [9.489869] ath10k: failed to probe PCI : -110, retry-count: 10 > [9.503780] ath10k_pci: probe of :01:00.0 failed with error -110 > [...] > > But I think we can fix the problem. Because according to the old > qcom-ipq40xx.dtsi I dug up: > > <https://github.com/gl-inet/openwrt-imagebuilder-ipq806x/blob/master/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/linux-ipq806x/linux-3.14.77/arch/arm/boot/dts/qcom-ipq40xx.dtsi#L631> > > The non-prefetchable memory area window size should be 0x00d0. > > ranges =<0x8100 0 0x4020 0x4020 0 0x0010>, /* > downstream I/O */ > <0x8200 0 0x4030 0x4030 0 > 0x00d0>; /* non-prefetchable memory */ > > (yes, I'll be preparing a patch for linux-msm-arm. Can you please let > me know if does indeed finally let you enumerate the device?) It seems to work with your proposed change: [0.042117] OF: PCI: host bridge /soc/pci@4000 ranges: [0.042152] OF: PCI:IO 0x4020..0x402f -> 0x4020 [0.042171] OF: PCI: MEM 0x4030..0x40ff -> 0x4030 [0.259505] qcom-pcie 4000.pci: link up [0.259649] qcom-pcie 4000.pci: PCI host bridge to bus :00 [0.259671] pci_bus :00: root bus resource [bus 00-ff] [0.259687] pci_bus :00: root bus resource [io 0x-0xf] (bus address [0x4020-0x402f]) [0.259700] pci_bus :00: root bus resource [mem 0x4030-0x40ff] [0.259742] pci :00:00.0: [17cb:1001] type 01 class 0x060400 [0.259776] pci :00:00.0: reg 0x10: [mem 0x-0x0fff 64bit] [0.259829] pci :00:00.0: PME# supported from D0 D3hot [0.260015] PCI: bus0: Fast back to back transfers disabled [0.260195] pci :01:00.0: [8086:09a9] type 00 class 0x028000 [0.260312] pci :01:00.0: reg 0x10: [mem 0x-0x007f] [0.260790] pci :01:00.0: supports D1 D2 [0.260797] pci :01:00.0: PME# supported from D0 D1 D3hot D3cold [0.261043] PCI: bus1: Fast back to back transfers disabled [0.261095] pci :00:00.0: BAR 8: assigned [mem 0x4080-0x40ff] [0.261112] pci :00:00.0: BAR 0: assigned [mem 0x4030-0x40300fff 64bit] [0.261136] pci :01:00.0: BAR 0: assigned [mem 0x4080-0x40ff] [0.261164] pci :00:00.0: PCI bridge to [bus 01-ff] [0.261180] pci :00:00.0: bridge window [mem 0x4080-0x40ff] [0.261891] pcieport :00:00.0: AER enabled with IRQ 93 See https://github.com/blocktrron/open
Re: [OpenWrt-Devel] [PATCH v2 3/3] ipq40xx: add support for FritzBox 7530
Hello Christian, On 26.02.19 23:17, Christian Lamparter wrote: > Hello David, > > On Tuesday, February 26, 2019 12:15:41 AM CET David Bauer wrote: >> On 25.02.19 23:10, Christian Lamparter wrote: >>> On Wednesday, February 20, 2019 6:02:21 PM CET Christian Lamparter wrote: >>>> On Monday, February 18, 2019 11:58:34 PM CET David Bauer wrote: >>>>> diff --git >>>>> a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts >>>>> >>>>> b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts >>>>> new file mode 100644 >>>>> index 00..b2a33468bb >>>>> --- /dev/null >>>>> +++ >>>>> b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts >>>>> @@ -0,0 +1,305 @@ >>>>> + { >>>>> + status = "okay"; >>>>> + >>>>> + ranges = <0x8100 0 0x4020 0x4020 >>>>> + 0 0x0010 /* downstream I/O */ >>>>> + 0x8200 0 0x4800 0x4800 >>>>> + 0 0x1000>; /* non-prefetchable memory */ >>>> >>>> Let me dig out my MR33 (will have to wait until the Weekend) and see if >>>> this >>>> should be put into the qcom-ipq4019.dtsi as well. >>> >>> And it didn't work. While the pcie enumeration worked fine. >>> The QCA9887 was no longer attaching. As soon as the driver was >>> loaded it failed due to: >>> >>> [8.888466] ath10k_pci :01:00.0: enabling device (0140 -> 0142) >>> [8.934145] ath10k_pci :01:00.0: failed to wake up device : -110 >>> [8.935258] ath10k: failed to probe PCI : -110, retry-count: 0 >>> [8.949596] ath10k 4.19 driver, optimized for CT firmware, probing pci >>> device: 0x50. >>> [8.989503] ath10k_pci :01:00.0: failed to wake up device : -110 >>> [8.989899] ath10k: failed to probe PCI : -110, retry-count: 1 >>> [9.005086] ath10k 4.19 driver, optimized for CT firmware, probing pci >>> device: 0x50. >>> [9.046821] ath10k_pci :01:00.0: failed to wake up device : -110 >>> [9.049851] ath10k: failed to probe PCI : -110, retry-count: 2 >>> [9.062448] ath10k 4.19 driver, optimized for CT firmware, probing pci >>> device: 0x50. >>> [9.099055] ath10k_pci :01:00.0: failed to wake up device : -110 >>> [9.099442] ath10k: failed to probe PCI : -110, retry-count: 3 >>> [...] >>> [9.489869] ath10k: failed to probe PCI : -110, retry-count: 10 >>> [9.503780] ath10k_pci: probe of :01:00.0 failed with error -110 >>> [...] >>> >>> But I think we can fix the problem. Because according to the old >>> qcom-ipq40xx.dtsi I dug up: >>> >>> <https://github.com/gl-inet/openwrt-imagebuilder-ipq806x/blob/master/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/linux-ipq806x/linux-3.14.77/arch/arm/boot/dts/qcom-ipq40xx.dtsi#L631> >>> >>> The non-prefetchable memory area window size should be 0x00d0. >>> >>> ranges =<0x8100 0 0x4020 0x4020 0 0x0010>, /* >>> downstream I/O */ >>> <0x8200 0 0x4030 0x4030 0 >>> 0x00d0>; /* non-prefetchable memory */ >>> >>> (yes, I'll be preparing a patch for linux-msm-arm. Can you please let >>> me know if does indeed finally let you enumerate the device?) >> >> It seems to work with your proposed change: >> >> [0.042117] OF: PCI: host bridge /soc/pci@4000 ranges: >> [0.042152] OF: PCI:IO 0x4020..0x402f -> 0x4020 >> [0.042171] OF: PCI: MEM 0x4030..0x40ff -> 0x4030 >> [0.259505] qcom-pcie 4000.pci: link up >> [0.259649] qcom-pcie 4000.pci: PCI host bridge to bus :00 >> [0.259671] pci_bus :00: root bus resource [bus 00-ff] >> [0.259687] pci_bus :00: root bus resource [io 0x-0xf] >> (bus address [0x4020-0x402f]) >> [0.259700] pci_bus :00: root bus resource [mem >> 0x4030-0x40ff] >> [0.259742] pci :00:00.0: [17cb:1001] type 01 class 0x060400 >> [0.259776] pci :00:00.0: reg 0x10: [mem 0x-0x0fff 64bit] >> [0.259829] pci :00:00.0: PME# supported from D0 D3hot >> [0.260015] PCI: bus0: Fast back to back transfers disabled >> [0
[OpenWrt-Devel] [PATCH] ath10k-ct: limit available channels via DT
This backports upstream commit 34d5629 ath10k: limit available channels via DT ieee80211-freq-limit to the 4.19 ath10k-ct version. Without this patch, disabled channels are still listed as a supported configuration for the radio. The identical patch was also backported by OpenWRT to the non-ct driver. It can be dropped as soon as we switch to an ath10k-ct version based on 4.20 or higher. Signed-off-by: David Bauer --- ...ilable-channels-via-DT-ieee80211-fre.patch | 39 +++ 1 file changed, 39 insertions(+) create mode 100644 package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch new file mode 100644 index 00..de4f98549a --- /dev/null +++ b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch @@ -0,0 +1,39 @@ +From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001 +From: Sven Eckelmann +Date: Mon, 30 Jul 2018 17:31:41 +0200 +Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit + +Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in +the RX and TX path. These filtered channel can in theory still be used by +the hardware but the signal strength is reduced so much that it makes no +sense. + +There is already a DT property to limit the available channels but ath10k +has to manually call this functionality to limit the currrently set wiphy +channels further. + +Signed-off-by: Sven Eckelmann + +Forwarded: https://patchwork.kernel.org/patch/10549245/ +--- + drivers/net/wireless/ath/ath10k/mac.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/ath10k-4.19/mac.c b/ath10k-4.19/mac.c +@@ -18,6 +18,7 @@ + + #include "mac.h" + ++#include + #include + #include + #include +@@ -8390,6 +8391,7 @@ int ath10k_mac_register(struct ath10k *a + ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; + } + ++ wiphy_read_of_freq_limits(ar->hw->wiphy); + ath10k_mac_setup_ht_vht_cap(ar); + + ar->hw->wiphy->interface_modes = -- 2.21.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ath79: make TP-Link revision naming consistent
This commit makes the TP-Link hardware-revision naming consistent to match the one used by the vendor. TP-Link refers to the different revisions as "vX" not "Version X". Signed-off-by: David Bauer --- target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts | 2 +- target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts | 2 +- target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts| 2 +- target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts | 2 +- target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts | 2 +- target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts | 2 +- target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts | 2 +- target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts | 2 +- target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index 23eba5bb30..f617d89c5b 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -8,7 +8,7 @@ / { compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132"; - model = "TP-Link TL-WR1043ND Version 1"; + model = "TP-Link TL-WR1043ND v1"; aliases { led-boot = diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts index e451b7d67d..29fca8b3a9 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts @@ -8,7 +8,7 @@ / { compatible = "tplink,tl-wr841-v11", "qca,qca9533"; - model = "TP-Link TL-WR841N/ND Version 11"; + model = "TP-Link TL-WR841N/ND v11"; aliases { led-boot = _led; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts index ac069eed27..a3284226a0 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v9.dts @@ -8,7 +8,7 @@ / { compatible = "tplink,tl-wr841-v9", "qca,qca9533"; - model = "TP-Link TL-WR841N/ND Version 9"; + model = "TP-Link TL-WR841N/ND v9"; aliases { led-boot = _led; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts index 7334a6e7ee..c26695d248 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts @@ -8,7 +8,7 @@ / { compatible = "tplink,archer-c7-v1", "qca,qca9558"; - model = "TP-Link Archer C7 Version 1"; + model = "TP-Link Archer C7 v1"; }; _keys { diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts index f168a17796..afc1b14b8a 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts @@ -8,7 +8,7 @@ / { compatible = "tplink,archer-c7-v2", "qca,qca9558"; - model = "TP-Link Archer C7 Version 2"; + model = "TP-Link Archer C7 v2"; }; _keys { diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts index a2992c10fe..f49f143d14 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v2.dts @@ -8,5 +8,5 @@ / { compatible = "tplink,tl-wr1043nd-v2", "qca,qca9557"; - model = "TP-Link TL-WR1043ND Version 2"; + model = "TP-Link TL-WR1043ND v2"; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts index a473cf42ea..5efa417216 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd-v3.dts @@ -8,5 +8,5 @@ / { compatible = "tplink,tl-wr1043nd-v3", "qca,qca9557"; - model = "TP-Link TL-WR1043ND Version 3"; + model = "TP-Link TL-WR1043ND v3"; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts index 9686290e73..c106a63eb8 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts @@ -8,7 +8,7 @@ / { compatible = "tplink,archer-c2-v3", "qca,qca9563"; - model = "TP-Link Archer C2 Version 3"; +
[OpenWrt-Devel] [PATCH] ath79: fix support-list for TP-Link WDR3600
The TP-Link WDR3600 shares the same machine-code in the ar71xx target, thus expecting "tl-wdr4300" not "tl-wdr3600" in the support-list metadata to allow non-forced sysupgrades from ar71xx to ath79. With this, it is possible to flash a WDR4300 image on the WDR3600. It is no problem however, as the only difference is the 5GHz WiFi chip which has 3SS instead of 2SS. Both work with either image. Signed-off-by: David Bauer --- target/linux/ath79/image/generic-tp-link.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 2e8897396b..db11a6f4ba 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -122,7 +122,7 @@ define Device/tplink_tl-wdr3600 DEVICE_TITLE := TP-Link TL-WDR3600 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport TPLINK_HWID := 0x3601 - SUPPORTED_DEVICES += tl-wdr3600 + SUPPORTED_DEVICES += tl-wdr4300 endef TARGET_DEVICES += tplink_tl-wdr3600 -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ath10k-ct: limit available channels via DT
Hello Ben, On 04.03.19 18:49, Ben Greear wrote: > I've stopped any serious development on my 4.19 kernel, and am mostly > using 4.20 now. So, might be worth moving OpenWRT ath10k-ct to use the > 4.20 > kernel if it is not already doing so? I thought about the same - as OpenWRT 19.x is set to be branched rather soon (to my knowledge) i was more comfortable adding that one patch instead of switching the whole driver version. But someone who is more familiar should make the decision here. IMHO. either the version bump or the patch should be included in the next stable release. Best wishes David > > Thanks, > Ben > > On 3/4/19 9:03 AM, David Bauer wrote: >> This backports upstream commit >> >> 34d5629 ath10k: limit available channels via DT ieee80211-freq-limit >> >> to the 4.19 ath10k-ct version. Without this patch, disabled channels >> are still listed as a supported configuration for the radio. >> >> The identical patch was also backported by OpenWRT to the non-ct driver. >> It can be dropped as soon as we switch to an ath10k-ct version based on >> 4.20 or higher. >> >> Signed-off-by: David Bauer >> --- >> ...ilable-channels-via-DT-ieee80211-fre.patch | 39 +++ >> 1 file changed, 39 insertions(+) >> create mode 100644 >> package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch >> >> >> diff --git >> a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch >> b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch >> >> new file mode 100644 >> index 00..de4f98549a >> --- /dev/null >> +++ >> b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch >> >> @@ -0,0 +1,39 @@ >> +From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001 >> +From: Sven Eckelmann >> +Date: Mon, 30 Jul 2018 17:31:41 +0200 >> +Subject: [PATCH] ath10k: Limit available channels via DT >> ieee80211-freq-limit >> + >> +Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special >> filters in >> +the RX and TX path. These filtered channel can in theory still be >> used by >> +the hardware but the signal strength is reduced so much that it makes no >> +sense. >> + >> +There is already a DT property to limit the available channels but >> ath10k >> +has to manually call this functionality to limit the currrently set >> wiphy >> +channels further. >> + >> +Signed-off-by: Sven Eckelmann >> + >> +Forwarded: https://patchwork.kernel.org/patch/10549245/ >> +--- >> + drivers/net/wireless/ath/ath10k/mac.c | 2 ++ >> + 1 file changed, 2 insertions(+) >> + >> +--- a/ath10k-4.19/mac.c >> b/ath10k-4.19/mac.c >> +@@ -18,6 +18,7 @@ >> + >> + #include "mac.h" >> + >> ++#include >> + #include >> + #include >> + #include >> +@@ -8390,6 +8391,7 @@ int ath10k_mac_register(struct ath10k *a >> + ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; >> + } >> + >> ++ wiphy_read_of_freq_limits(ar->hw->wiphy); >> + ath10k_mac_setup_ht_vht_cap(ar); >> + >> + ar->hw->wiphy->interface_modes = >> > > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000
Hardware CPU: Qualcomm IPQ4019 RAM: 256M FLASH: 128M NAND ETH: Qualcomm QCA8072 WiFi2: IPQ4019 2T2R 2SS b/g/n WiFi5: IPQ4019 2T2R 2SS n/ac WiFi5: QCA9984 4T4R 4SS n/ac LED:- Connect green/blue/red - Power green BTN: WPS/Connect UART: 115200n8 3.3V VCC - RX - TX - GND (Square is VCC) Installation 1. Grab the uboot for the Device from the 'u-boot-fritz3000' subdirectory. Place it in the same directory as the 'eva_ramboot.py' script. It is located in the 'scripts/flashing' subdirectory of the OpenWRT tree. 2. Assign yourself the IP address 192.168.178.10/24. Connect your Computer to one of the boxes LAN ports. 3. Connect Power to the Box. As soon as the LAN port of your computer shows link, load the U-Boot to the box using following command. > ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz3000.bin 4. The U-Boot will now start. Now assign yourself the IP address 192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP server root directory and rename it to 'FRITZ3000.bin'. 5. The Box will now boot OpenWRT from RAM. This can take up to two minutes. 6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using scp. SSH into the Box and first write the Bootloader to both previous kernel partitions. > mtd write /path/to/uboot-fritz3000.bin uboot0 > mtd write /path/to/uboot-fritz3000.bin uboot1 7. Remove the AVM filesystem partitions to make room for our kernel + rootfs + overlayfs. > ubirmvol /dev/ubi0 --name=avm_filesys_0 > ubirmvol /dev/ubi0 --name=avm_filesys_1 8. Flash OpenWRT peristently using sysupgrade. > sysupgrade -n /path/to/openwrt-sysupgrade.bin Signed-off-by: David Bauer --- package/boot/uboot-fritz4040/Makefile | 7 +- .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 10 +- .../base-files/lib/upgrade/platform.sh| 1 + .../dts/qcom-ipq4019-fritzrepeater-3000.dts | 261 + .../dts/qcom-ipq4019-fritzrepeater-3000.dts | 265 ++ target/linux/ipq40xx/image/Makefile | 9 + .../901-arm-boot-add-dts-files.patch | 3 +- .../901-arm-boot-add-dts-files.patch | 3 +- 9 files changed, 555 insertions(+), 5 deletions(-) create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 3182842c89..015ca1deb9 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -25,6 +25,11 @@ define U-Boot/Default UBOOT_IMAGE:=uboot-$(1).bin endef +define U-Boot/fritz3000 + NAME:=FritzRepeater 3000 + BUILD_DEVICES:=avm_fritzrepeater-3000 +endef + define U-Boot/fritz4040 NAME:=FritzBox 4040 BUILD_DEVICES:=avm_fritzbox-4040 @@ -61,6 +66,6 @@ define Package/u-boot/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/ endef -UBOOT_TARGETS := fritz4040 fritz7530 +UBOOT_TARGETS := fritz3000 fritz4040 fritz7530 $(eval $(call BuildPackage/U-Boot)) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 9c232d49f7..5f1f87974a 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -37,6 +37,7 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" ;; + avm,fritzrepeater-3000|\ compex,wpj428) ucidef_set_interface_lan "eth0 eth1" ;; diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 1264d2ef36..8520dfb41d 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -111,6 +111,10 @@ case "$FIRMWARE" in ln -sf /lib/firmware/ath10k/pre-cal-pci-\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; + avm,fritzrepeater-3000) + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \ + /usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") + ;; openmesh,a62) ath10kcal_extract "0:ART" 36864 12064 ;; @@ -135
[OpenWrt-Devel] [PATCH 1/2] uboot-fritz4040: bump version to 2019-03-03
Adds support for the AVM FRITZ!Repeater 3000 Signed-off-by: David Bauer --- package/boot/uboot-fritz4040/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 9af09afcd1..3182842c89 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=d306cce36f98a0a67becc42f20df4b22f1d1465f -PKG_SOURCE_DATE:=2019-02-08 -PKG_MIRROR_HASH:=715380605dd0cd6ffd65a18b34127bd57dfe9fb0a0164bf8aca703ee018d8070 +PKG_SOURCE_VERSION:=5f383305f4f0be631b51f89e3dc717318057bde9 +PKG_SOURCE_DATE:=2019-03-03 +PKG_MIRROR_HASH:=cb9153480648776cce21f038de8153a0f033066e3d44476ed4c802b48f500fae PKG_RELEASE:=1 -- 2.21.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 3/3] ipq40xx: add support for FritzBox 7530
Hello Christian, On 27.02.19 13:03, David Bauer wrote: Hello Christian, On 26.02.19 23:17, Christian Lamparter wrote: Hello David, On Tuesday, February 26, 2019 12:15:41 AM CET David Bauer wrote: On 25.02.19 23:10, Christian Lamparter wrote: On Wednesday, February 20, 2019 6:02:21 PM CET Christian Lamparter wrote: On Monday, February 18, 2019 11:58:34 PM CET David Bauer wrote: diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts new file mode 100644 index 00..b2a33468bb --- /dev/null +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts @@ -0,0 +1,305 @@ + { + status = "okay"; + + ranges = <0x8100 0 0x4020 0x4020 + 0 0x0010 /* downstream I/O */ + 0x8200 0 0x4800 0x4800 + 0 0x1000>; /* non-prefetchable memory */ Let me dig out my MR33 (will have to wait until the Weekend) and see if this should be put into the qcom-ipq4019.dtsi as well. And it didn't work. While the pcie enumeration worked fine. The QCA9887 was no longer attaching. As soon as the driver was loaded it failed due to: [8.888466] ath10k_pci :01:00.0: enabling device (0140 -> 0142) [8.934145] ath10k_pci :01:00.0: failed to wake up device : -110 [8.935258] ath10k: failed to probe PCI : -110, retry-count: 0 [8.949596] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x50. [8.989503] ath10k_pci :01:00.0: failed to wake up device : -110 [8.989899] ath10k: failed to probe PCI : -110, retry-count: 1 [9.005086] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x50. [9.046821] ath10k_pci :01:00.0: failed to wake up device : -110 [9.049851] ath10k: failed to probe PCI : -110, retry-count: 2 [9.062448] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x50. [9.099055] ath10k_pci :01:00.0: failed to wake up device : -110 [9.099442] ath10k: failed to probe PCI : -110, retry-count: 3 [...] [9.489869] ath10k: failed to probe PCI : -110, retry-count: 10 [9.503780] ath10k_pci: probe of :01:00.0 failed with error -110 [...] But I think we can fix the problem. Because according to the old qcom-ipq40xx.dtsi I dug up: <https://github.com/gl-inet/openwrt-imagebuilder-ipq806x/blob/master/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/linux-ipq806x/linux-3.14.77/arch/arm/boot/dts/qcom-ipq40xx.dtsi#L631> The non-prefetchable memory area window size should be 0x00d0. ranges =<0x8100 0 0x4020 0x4020 0 0x0010>, /* downstream I/O */ <0x8200 0 0x4030 0x4030 0 0x00d0>; /* non-prefetchable memory */ (yes, I'll be preparing a patch for linux-msm-arm. Can you please let me know if does indeed finally let you enumerate the device?) It seems to work with your proposed change: [0.042117] OF: PCI: host bridge /soc/pci@4000 ranges: [0.042152] OF: PCI:IO 0x4020..0x402f -> 0x4020 [0.042171] OF: PCI: MEM 0x4030..0x40ff -> 0x4030 [0.259505] qcom-pcie 4000.pci: link up [0.259649] qcom-pcie 4000.pci: PCI host bridge to bus :00 [0.259671] pci_bus :00: root bus resource [bus 00-ff] [0.259687] pci_bus :00: root bus resource [io 0x-0xf] (bus address [0x4020-0x402f]) [0.259700] pci_bus :00: root bus resource [mem 0x4030-0x40ff] [0.259742] pci :00:00.0: [17cb:1001] type 01 class 0x060400 [0.259776] pci :00:00.0: reg 0x10: [mem 0x-0x0fff 64bit] [0.259829] pci :00:00.0: PME# supported from D0 D3hot [0.260015] PCI: bus0: Fast back to back transfers disabled [0.260195] pci :01:00.0: [8086:09a9] type 00 class 0x028000 [0.260312] pci :01:00.0: reg 0x10: [mem 0x-0x007f] [0.260790] pci :01:00.0: supports D1 D2 [0.260797] pci :01:00.0: PME# supported from D0 D1 D3hot D3cold [0.261043] PCI: bus1: Fast back to back transfers disabled [0.261095] pci :00:00.0: BAR 8: assigned [mem 0x4080-0x40ff] [0.261112] pci :00:00.0: BAR 0: assigned [mem 0x4030-0x40300fff 64bit] [0.261136] pci :01:00.0: BAR 0: assigned [mem 0x4080-0x40ff] [0.261164] pci :00:00.0: PCI bridge to [bus 01-ff] [0.261180] pci :00:00.0: bridge window [mem 0x4080-0x40ff] [0.261891] pcieport :00:00.0: AER enabled with IRQ 93 See https://github.com/blocktrron/openwrt/commit/cc1a94b2e1616d33698852df38ae23f72f193b74 How should we proceed on this device? Should i resend a v3 or will you remove the ranges property and backport the patch you prepare for upstream? Sorry for the late reply, I added a rebased ve
[OpenWrt-Devel] [PATCH] ath79: add ar71xx support-list entry for Fritz4020
This adds the support-list entry the AVM FRITZ!Box 4020 expects in the ar71xx target to allow non-forced sysupgrades from ar71xx to ath79. Signed-off-by: David Bauer --- target/linux/ath79/image/generic.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 889321867a..d3978629fd 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -92,6 +92,7 @@ define Device/avm_fritz4020 append-squashfs-fakeroot-be | pad-to 256 | \ append-rootfs | pad-rootfs | append-metadata | check-size (IMAGE_SIZE) DEVICE_PACKAGES := fritz-tffs + SUPPORTED_DEVICES += fritz4020 endef TARGET_DEVICES += avm_fritz4020 -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000
Hello Christian, On 10.03.19 20:27, Christian Lamparter wrote: > On Saturday, March 9, 2019 12:20:54 AM CET David Bauer wrote: >> Hardware >> >> CPU: Qualcomm IPQ4019 >> RAM: 256M (NANYA NT5CC128M16JR-EK) >> FLASH: 128M NAND (Macronix MX30LF1G18AC-XKI) >> ETH: Qualcomm QCA8072 >> WiFi2: IPQ4019 2T2R 2SS b/g/n >> WiFi5: IPQ4019 2T2R 2SS n/ac >> WiFi5: QCA9984 4T4R 4SS n/ac >> LED:- Connect green/blue/red >> - Power green >> BTN: WPS/Connect >> UART: 115200n8 3.3V >>VCC - RX - TX - GND (Square is VCC) >> >> Installation >> >> 1. Grab the uboot for the Device from the 'u-boot-fritz3000' >>subdirectory. Place it in the same directory as the 'eva_ramboot.py' >>script. It is located in the 'scripts/flashing' subdirectory of the >>OpenWRT tree. >> >> 2. Assign yourself the IP address 192.168.178.10/24. Connect your >>Computer to one of the boxes LAN ports. >> >> 3. Connect Power to the Box. As soon as the LAN port of your computer >>shows link, load the U-Boot to the box using following command. >> >>> ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz3000.bin >> >> 4. The U-Boot will now start. Now assign yourself the IP address >>192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP >>server root directory and rename it to 'FRITZ3000.bin'. >> >> 5. The Box will now boot OpenWRT from RAM. This can take up to two >>minutes. >> >> 6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using >>scp. SSH into the Box and first write the Bootloader to both previous >>kernel partitions. >> >>> mtd write /path/to/uboot-fritz3000.bin uboot0 >>> mtd write /path/to/uboot-fritz3000.bin uboot1 >> >> 7. Remove the AVM filesystem partitions to make room for our kernel + >>rootfs + overlayfs. >> >>> ubirmvol /dev/ubi0 --name=avm_filesys_0 >>> ubirmvol /dev/ubi0 --name=avm_filesys_1 >> >> 8. Flash OpenWRT peristently using sysupgrade. >> >>> sysupgrade -n /path/to/openwrt-sysupgrade.bin >> >> Signed-off-by: David Bauer >> --- >> diff --git a/target/linux/ipq40xx/image/Makefile >> b/target/linux/ipq40xx/image/Makefile >> index 3a7ecf39eb..49ff71c6bc 100644 >> --- a/target/linux/ipq40xx/image/Makefile >> +++ b/target/linux/ipq40xx/image/Makefile >> @@ -130,6 +130,15 @@ define Device/avm_fritzbox-7530 >> endef >> TARGET_DEVICES += avm_fritzbox-7530 >> >> +define Device/avm_fritzrepeater-3000 >> +$(call Device/FitImageLzma) >> +DEVICE_DTS := qcom-ipq4019-fritzrepeater-3000 >> +DEVICE_TITLE := AVM Fritz!Repeater 3000 >> +DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata >> ipq-wifi-avm_fritzrepeater-3000 > The fritz-tffs-nand was just added to openwrt. > > <https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=50717510e7e556cbc9ef05887900a7dc93a57793> > > Should I add it in place? (And for the 7530 as well?) I will submit a follow-up patch regarding tis topic as it was merged without this issue addressed. I have already prepared a patch for this, but will test it tomorrow on all 3 affected devices (7530, 3000 and 7412). Best wishes David > > Cheers, > Christian > > > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000
Hello Christian, first of all, thanks for the review! On 08.03.19 22:23, Christian Lamparter wrote: > On Tuesday, March 5, 2019 7:38:38 PM CET David Bauer wrote: >> Hardware >> >> CPU: Qualcomm IPQ4019 >> RAM: 256M >> FLASH: 128M NAND > Sorry for being nosy. Did you get any chance to open up the device > and write down what RAM and flash chips are used in your unit? Will be contained in the v2. In the meantime: RAM: NANYA NT5CC128M16JR-EK NAND: Macronix MX30LF1G18AC-XKI > [...] >> diff --git >> a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts >> >> b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts >> new file mode 100644 >> index 00..b73a214c09 >> --- /dev/null >> +++ >> b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts >> @@ -0,0 +1,261 @@ >> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT >> + >> +#include "qcom-ipq4019.dtsi" >> +#include >> +#include >> +#include >> + >> +/ { >> +model = "AVM FRITZ!Repeater 3000"; >> +compatible = "avm,fritzrepeater-3000"; >> + >> +aliases { >> +led-boot = _led; >> +led-failsafe = _led; >> +led-running = _led; >> +led-upgrade = _led; >> +}; >> + >> +keys { > Since it's a single "key" or "button" you can of course > also call this node "key" or "button". Whatever fits the > best. Thanks, will fix that. > >> +compatible = "gpio-keys"; >> + >> +connect { >> +label = "Connect"; >> +gpios = < 10 GPIO_ACTIVE_LOW>; >> +linux,code = ; >> +}; >> +}; >> + >> +leds { >> +compatible = "gpio-leds"; >> + >> +connect_red { >> +label = "fritzwlan-3000:red:connect"; >> +gpios = < 30 GPIO_ACTIVE_LOW>; >> +}; >> + >> +connect_green { >> +label = "fritzwlan-3000:green:connect"; >> +gpios = < 31 GPIO_ACTIVE_LOW>; >> +}; >> + >> +connect_blue { >> +label = "fritzwlan-3000:blue:connect"; >> +gpios = < 32 GPIO_ACTIVE_LOW>; >> +}; > Just a question: Are the "connect" LED three different LEDs > or just one RGB LED? It's 3 separate LEDs on the PCB, but they are directed to the same spot on the case, so technically it works like a RGB LED. >> + >> +power_led: power { >> +label = "fritzwlan-3000:green:power"; >> +gpios = < 33 GPIO_ACTIVE_LOW>; >> +}; >> +}; >> +}; >> + >> + { >> +serial_0_pins: serial_pinmux { >> +mux { >> +pins = "gpio16", "gpio17"; >> +function = "blsp_uart0"; >> +bias-disable; >> +}; >> +}; >> + >> +nand_pins: nand_pins { >> +pullups { >> +pins = "gpio53", "gpio58", "gpio59"; >> +function = "qpic"; >> +bias-pull-up; >> +}; >> + >> +pulldowns { >> +pins = "gpio54", "gpio55", "gpio56", >> +"gpio57", "gpio60", "gpio61", >> +"gpio62", "gpio63", "gpio64", >> +"gpio65", "gpio66", "gpio67", >> +"gpio68", "gpio69"; >> +function = "qpic"; >> +bias-pull-down; >> +}; >> +}; >> +}; >> + >> + { >> +pinctrl-0 = <_pins>; >> +pinctrl-names = "default"; >> +status = "okay"; >> +cs-gpios = < 54 GPIO_ACTIVE_HIGH>; > cs-gpios? Oh no! the qcom,ipq4019-nand does not have this property binding. > <https://www.kernel.org/doc/Documentation/devicetree
[OpenWrt-Devel] [PATCH v2 1/2] uboot-fritz4040: bump version to 2019-03-03
Adds support for the AVM FRITZ!Repeater 3000 Signed-off-by: David Bauer --- package/boot/uboot-fritz4040/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 9af09afcd1..3182842c89 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -10,9 +10,9 @@ include $(INCLUDE_DIR)/kernel.mk PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=d306cce36f98a0a67becc42f20df4b22f1d1465f -PKG_SOURCE_DATE:=2019-02-08 -PKG_MIRROR_HASH:=715380605dd0cd6ffd65a18b34127bd57dfe9fb0a0164bf8aca703ee018d8070 +PKG_SOURCE_VERSION:=5f383305f4f0be631b51f89e3dc717318057bde9 +PKG_SOURCE_DATE:=2019-03-03 +PKG_MIRROR_HASH:=cb9153480648776cce21f038de8153a0f033066e3d44476ed4c802b48f500fae PKG_RELEASE:=1 -- 2.21.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000
Hardware CPU: Qualcomm IPQ4019 RAM: 256M (NANYA NT5CC128M16JR-EK) FLASH: 128M NAND (Macronix MX30LF1G18AC-XKI) ETH: Qualcomm QCA8072 WiFi2: IPQ4019 2T2R 2SS b/g/n WiFi5: IPQ4019 2T2R 2SS n/ac WiFi5: QCA9984 4T4R 4SS n/ac LED:- Connect green/blue/red - Power green BTN: WPS/Connect UART: 115200n8 3.3V VCC - RX - TX - GND (Square is VCC) Installation 1. Grab the uboot for the Device from the 'u-boot-fritz3000' subdirectory. Place it in the same directory as the 'eva_ramboot.py' script. It is located in the 'scripts/flashing' subdirectory of the OpenWRT tree. 2. Assign yourself the IP address 192.168.178.10/24. Connect your Computer to one of the boxes LAN ports. 3. Connect Power to the Box. As soon as the LAN port of your computer shows link, load the U-Boot to the box using following command. > ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz3000.bin 4. The U-Boot will now start. Now assign yourself the IP address 192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP server root directory and rename it to 'FRITZ3000.bin'. 5. The Box will now boot OpenWRT from RAM. This can take up to two minutes. 6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using scp. SSH into the Box and first write the Bootloader to both previous kernel partitions. > mtd write /path/to/uboot-fritz3000.bin uboot0 > mtd write /path/to/uboot-fritz3000.bin uboot1 7. Remove the AVM filesystem partitions to make room for our kernel + rootfs + overlayfs. > ubirmvol /dev/ubi0 --name=avm_filesys_0 > ubirmvol /dev/ubi0 --name=avm_filesys_1 8. Flash OpenWRT peristently using sysupgrade. > sysupgrade -n /path/to/openwrt-sysupgrade.bin Signed-off-by: David Bauer --- v2: - remove cs-gpio property from nand node - add device-specific BDF package - add RAM and NAND chip model information package/boot/uboot-fritz4040/Makefile | 7 +- package/firmware/ipq-wifi/Makefile| 3 +- .../ipq-wifi/board-avm_fritzrepeater-3000.bin | Bin 0 -> 24332 bytes .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 10 +- .../base-files/lib/upgrade/platform.sh| 1 + .../dts/qcom-ipq4019-fritzrepeater-3000.dts | 260 + .../dts/qcom-ipq4019-fritzrepeater-3000.dts | 264 ++ target/linux/ipq40xx/image/Makefile | 9 + .../901-arm-boot-add-dts-files.patch | 3 +- .../901-arm-boot-add-dts-files.patch | 3 +- 11 files changed, 555 insertions(+), 6 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-avm_fritzrepeater-3000.bin create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 3182842c89..015ca1deb9 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -25,6 +25,11 @@ define U-Boot/Default UBOOT_IMAGE:=uboot-$(1).bin endef +define U-Boot/fritz3000 + NAME:=FritzRepeater 3000 + BUILD_DEVICES:=avm_fritzrepeater-3000 +endef + define U-Boot/fritz4040 NAME:=FritzBox 4040 BUILD_DEVICES:=avm_fritzbox-4040 @@ -61,6 +66,6 @@ define Package/u-boot/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/ endef -UBOOT_TARGETS := fritz4040 fritz7530 +UBOOT_TARGETS := fritz3000 fritz4040 fritz7530 $(eval $(call BuildPackage/U-Boot)) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 9a00832ca2..d273667f68 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -18,7 +18,7 @@ endef # Please send a mail with your device-specific board files upstream. # You can find instructions and examples on the linux-wireless wiki: # <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles> -ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 engenius_eap1300 linksys_ea6350v3 qxwlan_e2600ac +ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 avm_fritzrepeater-3000 engenius_eap1300 linksys_ea6350v3 qxwlan_e2600ac ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) define Package/ipq-wifi-default @@ -57,6 +57,7 @@ $(eval $(call generate-ipq-wifi-package,alfa-network_ap120c-ac,board-alfa-networ $(eval $(call generate-ipq-wifi-package,asus_map-ac2200,board-map-ac2200.bin,ASUS MAP-AC2200)) $(eval $(call generate-ipq-wifi-package,engenius_eap1300,board-engenius_eap1300.bin,EnGenius EAP1300)) $(eval $(call generate-ipq-wifi-package,avm_fritzbox-7530,board-avm_fritzbox-7530.bin,AVM FRITZ!Box 7530)) +$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-3000,board
[OpenWrt-Devel] [PATCH] ipq40xx: fix FRITZBox 7530 NAND controller node
This removes the 'cs-gpios' property from the AVM FRITZ!Box 7530 NAND controller node. As pointed out by Christian Lamparter, the property is not needed by the Qualcomm NAND controller driver. Signed-off-by: David Bauer --- .../files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts | 1 - .../files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts | 1 - 2 files changed, 2 deletions(-) diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts index 45c4864855..ce117b451a 100644 --- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts @@ -167,7 +167,6 @@ pinctrl-0 = <_pins>; pinctrl-names = "default"; status = "okay"; - cs-gpios = < 54 GPIO_ACTIVE_HIGH>; nand@0 { partitions { diff --git a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts index 53f83f411b..b04a61dc04 100644 --- a/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts +++ b/target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts @@ -171,7 +171,6 @@ pinctrl-0 = <_pins>; pinctrl-names = "default"; status = "okay"; - cs-gpios = < 54 GPIO_ACTIVE_HIGH>; nand@0 { partitions { -- 2.21.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] ipq40xx: add support for AVM FRITZ!Repeater 3000
Hello Christian, missed one thing (which might also be interesting to others) On 08.03.19 22:23, Christian Lamparter wrote: > Didn't find any GPL sources or firmware releases for this device yet. So, I > would much rather err on the side of caution and change this so that the > device gets its own variant. Even if the boarddata is seemingly shared between > "different" devices from the same vendor. > While the GPL tarball for the Repeater 3000 is missing, everything is contained in the tarball for the FRITZ!Box 7530. [0] Although maybe not relevant for this particular device, the tarball also contains code for the new QCN550x series from Qualcomm. They also put up a factory image on their FTP in the last days which can be found here. [1] [0] http://osp.avm.de/fritzbox/fritzbox-7530/ [1] http://ftp.avm.de/fritzwlan/fritzrepeater-3000/deutschland/fritz.os/ Best wishes David ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v3 3/3] ipq40xx: add support for AVM FRITZ!Repeater 3000
Hardware CPU: Qualcomm IPQ4019 RAM: 256M (NANYA NT5CC128M16JR-EK) FLASH: 128M NAND (Macronix MX30LF1G18AC-XKI) ETH: Qualcomm QCA8072 WiFi2: IPQ4019 2T2R 2SS b/g/n WiFi5: IPQ4019 2T2R 2SS n/ac WiFi5: QCA9984 4T4R 4SS n/ac LED:- Connect green/blue/red - Power green BTN: WPS/Connect UART: 115200n8 3.3V VCC - RX - TX - GND (Square is VCC) Installation 1. Grab the uboot for the Device from the 'u-boot-fritz3000' subdirectory. Place it in the same directory as the 'eva_ramboot.py' script. It is located in the 'scripts/flashing' subdirectory of the OpenWRT tree. 2. Assign yourself the IP address 192.168.178.10/24. Connect your Computer to one of the boxes LAN ports. 3. Connect Power to the Box. As soon as the LAN port of your computer shows link, load the U-Boot to the box using following command. > ./eva_ramboot.py --offset 0x8500 192.168.178.1 uboot-fritz3000.bin 4. The U-Boot will now start. Now assign yourself the IP address 192.168.1.70/24. Copy the OpenWRT initramfs (!) image to a TFTP server root directory and rename it to 'FRITZ3000.bin'. 5. The Box will now boot OpenWRT from RAM. This can take up to two minutes. 6. Copy the U-Boot and the OpenWRT sysupgrade (!) image to the Box using scp. SSH into the Box and first write the Bootloader to both previous kernel partitions. > mtd write /path/to/uboot-fritz3000.bin uboot0 > mtd write /path/to/uboot-fritz3000.bin uboot1 7. Remove the AVM filesystem partitions to make room for our kernel + rootfs + overlayfs. > ubirmvol /dev/ubi0 --name=avm_filesys_0 > ubirmvol /dev/ubi0 --name=avm_filesys_1 8. Flash OpenWRT peristently using sysupgrade. > sysupgrade -n /path/to/openwrt-sysupgrade.bin Signed-off-by: David Bauer --- package/boot/uboot-fritz4040/Makefile | 7 +- package/firmware/ipq-wifi/Makefile| 3 +- .../ipq-wifi/board-avm_fritzrepeater-3000.bin | Bin 0 -> 24332 bytes .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 10 +- .../base-files/lib/upgrade/platform.sh| 1 + .../dts/qcom-ipq4019-fritzrepeater-3000.dts | 260 + .../dts/qcom-ipq4019-fritzrepeater-3000.dts | 264 ++ target/linux/ipq40xx/image/Makefile | 9 + .../901-arm-boot-add-dts-files.patch | 3 +- .../901-arm-boot-add-dts-files.patch | 3 +- 11 files changed, 555 insertions(+), 6 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-avm_fritzrepeater-3000.bin create mode 100644 target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts create mode 100644 target/linux/ipq40xx/files-4.19/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 3182842c89..015ca1deb9 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -25,6 +25,11 @@ define U-Boot/Default UBOOT_IMAGE:=uboot-$(1).bin endef +define U-Boot/fritz3000 + NAME:=FritzRepeater 3000 + BUILD_DEVICES:=avm_fritzrepeater-3000 +endef + define U-Boot/fritz4040 NAME:=FritzBox 4040 BUILD_DEVICES:=avm_fritzbox-4040 @@ -61,6 +66,6 @@ define Package/u-boot/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/upload-to-f4040.sh $(1)/ endef -UBOOT_TARGETS := fritz4040 fritz7530 +UBOOT_TARGETS := fritz3000 fritz4040 fritz7530 $(eval $(call BuildPackage/U-Boot)) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 9a00832ca2..d273667f68 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -18,7 +18,7 @@ endef # Please send a mail with your device-specific board files upstream. # You can find instructions and examples on the linux-wireless wiki: # <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles> -ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 engenius_eap1300 linksys_ea6350v3 qxwlan_e2600ac +ALLWIFIBOARDS:=alfa-network_ap120c-ac asus_map-ac2200 avm_fritzbox-7530 avm_fritzrepeater-3000 engenius_eap1300 linksys_ea6350v3 qxwlan_e2600ac ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) define Package/ipq-wifi-default @@ -57,6 +57,7 @@ $(eval $(call generate-ipq-wifi-package,alfa-network_ap120c-ac,board-alfa-networ $(eval $(call generate-ipq-wifi-package,asus_map-ac2200,board-map-ac2200.bin,ASUS MAP-AC2200)) $(eval $(call generate-ipq-wifi-package,engenius_eap1300,board-engenius_eap1300.bin,EnGenius EAP1300)) $(eval $(call generate-ipq-wifi-package,avm_fritzbox-7530,board-avm_fritzbox-7530.bin,AVM FRITZ!Box 7530)) +$(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-3000,board-avm_fritzrepeater-3000.bin,AVM FRITZ!Repeater 3000)) $(eval $(call generate-ipq-wifi-package,linksys_ea6350v3,board-l