aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts
Commit message (Collapse)AuthorAgeFilesLines
* ath79: Add support for OpenMesh OM2P v1Sven Eckelmann2022-01-161-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: ====================== * Qualcomm/Atheros AR7240 rev 2 * 350/350/175 MHz (CPU/DDR/AHB) * 32 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2x 10/100 Mbps Ethernet * 1T1R 2.4 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x fast ethernet - eth0 + 18-24V passive POE (mode B) + used as WAN interface - eth1 + builtin switch port 4 + used as LAN interface * 12-24V 1A DC * external antenna The device itself requires the mtdparts from the uboot arguments to properly boot the flashed image and to support dual-boot (primary + recovery image). Unfortunately, the name of the mtd device in mtdparts is still using the legacy name "ar7240-nor0" which must be supplied using the Linux-specfic DT parameter linux,mtd-name to overwrite the generic name "spi0.0". Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: Add support for OpenMesh OM5P-AC v2Sven Eckelmann2022-01-161-25/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/200 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * 4x GPIO-LEDs (3x wifi, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + AR8031 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas This device support is based on the partially working stub from commit 53c474abbdfe ("ath79: add new OF only target for QCA MIPS silicon"). Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: patch Asus RP-AC66 clean up and fix for sysupgrade imageTamas Balogh2022-01-151-0/+1
| | | | | | | | - clean up leftovers regarding MAC configure in dts - fix alphabetical order in caldata - IMAGE_SIZE for sysupgrade image Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
* ath79: qca955x: remove double declarationKoen Vandeputte2022-01-131-2/+1
| | | | | | No need to mention the same value twice Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: rb912: remove unused propertyKoen Vandeputte2022-01-131-1/+0
| | | | | | | ar934x does not define property 'rgmii-enabled' in the parsing code remove it Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: rb912: fix pll init issuesKoen Vandeputte2022-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was reported that some rb912 boards (ar934x) have issues with some ethernet speeds. Investigation shows that the board failed to adapt the ethernet pll values as shown here: [ 5.284359] ag71xx 19000000.eth: failed to read pll-handle property added custom prints in code and triggering a link switch: [ 62.821446] Atheros AG71xx: fast reset [ 62.826442] Atheros AG71xx: update pll 2 [ 62.830494] Atheros AG71xx: no pll regmap! Comparison with another very similar board (rb922 - QCA955x) showed a missing reference clock frequency in dts, which seems to cause a pll init issue. Unfortunately, no errors are printed when this occurs. Adding the frequency property fixes the pll init as it can be parsed now by the ethernet driver. [ 55.861407] Atheros AG71xx: fast reset [ 55.866403] Atheros AG71xx: update pll 2 [ 55.870462] Atheros AG71xx: ath79_set_pllval: regmap: 0x81548000, pll_reg: 0x2c, pll_val: 0x02000000 Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* mikrotik: make soft_config writableOskari Lemmela2022-01-133-3/+0
| | | | | | Parent mtd partition needs to be writable Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* ath79: Add support for OpenMesh OM5P-AC v1Sven Eckelmann2022-01-091-0/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + AR8035 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: Add support for OpenMesh OM5P-ANSven Eckelmann2022-01-091-0/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 1T1R 2.4 GHz Wi-Fi * 2T2R 5 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + 10/100 Mbps Ethernet + builtin switch port 1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: add support for ASUS RP-AC66Tamas Balogh2022-01-091-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asus RP-AC66 Repeater Hardware specifications: Board: AP152 SoC: QCA9563 DRAM: 64MB DDR2 Flash: 25l128 16MB SPI-NOR LAN/WAN: 1x1000M QCA8033 WiFi 5GHz: QCA9880 Clocks: CPU:775.000MHz, DDR:650.000MHz, AHB:258.333MHz, Ref:25.000MHz MAC addresses as verified by OEM firmware: use address source Lan/Wan *:24 art 0x1002 (label) 2G *:24 art 0x1002 5G *:26 art 0x5006 Installation: Asus windows recovery tool: - install the Asus firmware restoration utility - unplug the router, hold the reset button while powering it on - release when the power LED flashes slowly - specify a static IP on your computer: IP address: 192.168.1.75 Subnet mask 255.255.255.0 - Start the Asus firmware restoration utility, specify the factory image and press upload - Do not power off the device after OpenWrt has booted until the LED flashing. TFTP Recovery method: - set computer to a static ip, 192.168.1.75 - connect computer to the LAN 1 port of the router - hold the reset button while powering on the router for a few seconds - send firmware image using a tftp client; i.e from linux: $ tftp tftp> binary tftp> connect 192.168.1.1 tftp> put factory.bin tftp> quit Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
* ath79: add usb-phy-analog to reset list in qca953x.dtsiJinfan Lei2021-12-291-2/+2
| | | | | | | | | | | | | On startup the USB of QCA9531 board can't be initialized successfully. lsusb result as below: root@OpenWrt:~# lsusb unable to initialize libusb: -99 This is because usb-phy-analog is not added to reset list. Signed-off-by: Jinfan Lei <153869379@qq.com> (added linebreaks and small little changes to the commit message) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: fix various dts warningsChristian Lamparter2021-12-1113-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ar9344_openmesh_mr600-v1.dts:40.10-44.5: Warning (gpios_property): /leds-ath9k/wifi2g: Missing property '#gpio-cells' in node /ahb/pcie-controller@180c0000/wifi@0,0 or bad phandle => added gpio-controller + #gpio-cells qca955x_zyxel_nbg6x16.dtsi:121.3-13: Warning (reg_format): /ahb/usb@1b000000/port@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) ../dts/qca955x_zyxel_nbg6x16.dtsi:131.3-13: Warning (reg_format): /ahb/usb@1b400000/port@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) qca955x_zyxel_nbg6x16.dtsi:120.20-123.4: Warning (avoid_default_addr_size): /ahb/usb@1b000000/port@1: Relying on default #address-cells value => ath79's usb-nodes are missing the address- and size-cells properties. These are needed for usb led trigger support. ar7242_ubnt_sw.dtsi:54.4-14: Warning (reg_format): /gpio_spi/gpio_spi@0:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1) => the #address-cells and #size-cells had to be nudged. qca9531_dlink_dch-g020-a1.dts:19.6-39.4: Warning (i2c_bus_bridge): /i2c: incorrect #size-cells for I2C bus => #size-cells = <0>; Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for WD My Net N600Ryan Mounce2021-12-113-86/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoC: AR9344 RAM: 128MB Flash: 16MiB SPI NOR 5GHz WiFi: AR9382 PCIe 2x2:2 802.11n 2.4GHz WiFi: AR9344 (SoC) AHB 2x2:2 802.11n 5x Fast ethernet via SoC switch (green LEDs) 1x USB 2.0 4x front LEDs from SoC GPIO 1x front WPS button from SoC GPIO 1x bottom reset button from SoC GPIO UART header JP1, 115200 no parity 1 stop TX GND VCC (N/P) RX Flash factory image via "emergency room" recovery: - Configure your computer with a static IP 192.168.1.123/24 - Connect to LAN port on the N600 switch - Hold reset putton - Power on, holding reset until the power LED blinks slowly - Visit http://192.168.1.1/ and upload OpenWrt factory image - Wait at least 5 minutes for flashing, reboot and key generation - Visit http://192.168.1.1/ (OpenWrt LuCI) and upload OpenWrt sysupgrade image Signed-off-by: Ryan Mounce <ryan@mounce.com.au> [dt leds preparations] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for jjPlus JWAP230Olivier Valentin2021-12-111-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The jjPlus JWAP230 is an access point board built around the QCA9558, with built-in 2.4GHz 3x3 N WiFi (28dBm). It can be expanded with 2 mini-PCIe boards, and has an USB2 root port. Specifications: - SOC: Qualcomm Atheros QCA9558 - CPU: 720MHz - H/W switch: QCA8327 rev 2 - Flash: 16 MiB SPI NOR (en25qh128) - RAM: 128 MiB DDR2 - WLAN: AR9550 built-in SoC bgn 3T3R (ath9k) - PCI: 2x mini-PCIe (optional 5V) - LEDs: 6x LEDs (3 are currently available) - Button: 1x Reset (not yet defined) - USB2: - 1x Type A root port - 1x combined mini-PCIe - Ethernet: - 2x 10/100/1000 (1x PoE 802.3af (36-57 V)) Notes: The device used to be supported in the ar71xx target. For upgrades: Please use "sysupgrade --force -n <image>". This will restore the device back to OpenWrt defaults! MAC address assignment: use source LAN art 0x0 WAN art 0x6 WLAN art 0x1002 (as part of the calibration data) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftp 0x80060000 \ openwrt-ath79-generic-jjplus_jwap230-squashfs-sysupgrade.bin > erase 0x9f050000 +${filesize} > cp.b $fileaddr 0x9f050000 $filesize > setenv bootcmd bootm 0x9f050000 > saveenv Signed-off-by: Olivier Valentin <valentio@free.fr> [Added DT-Leds (based on ar71xx), Added more notes about sysupgrade, fixed "qca9550" to match SoC in commit and dts file name] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for TP-Link EAP225 v1Sander Vanheule2021-12-051-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link EAP225 v1 is an AC1200 (802.11ac Wave-1) ceiling mount access point. Device specifications: * SoC: QCA9563 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n, 2x2 * Wireless 5Ghz (QCA9882): a/n/ac, 2x2 * Ethernet (AR8033): 1× 1GbE, 802.3at PoE Flashing instructions: * Ensure the device is upgraded to firmware v1.4.0 * Exploit the user management page in the web interface to start telnetd by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`. * Immediately change the malformed username back to something valid (e.g. 'admin') to make ssh work again. * Use the root shell via telnet to make /tmp world writeable (chmod 777) * Extract /usr/bin/uclited from the device via ssh and apply the binary patch listed below. The patch is required to prevent `uclited -u` in the last step from crashing. * Copy the patched uclited binary back to the device at /tmp/uclited (via ssh) * Upload the factory image to /tmp/upgrade.bin (via ssh) * Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt. uclited patching: --- xxd uclited +++ xxd uclited-patched @@ -53811,7 +53811,7 @@ 000d2330: 8c44 0000 0320 f809 0000 0000 8fbc 0010 .D... .......... 000d2340: 8fa6 0a4c 02c0 2821 8f82 87c4 0000 0000 ...L..(!........ -000d2350: 8c44 0000 0c13 461c 27a7 0018 8fbc 0010 .D....F.'....... +000d2350: 8c44 0000 2402 0000 0000 0000 8fbc 0010 .D..$........... 000d2360: 1040 001d 0000 1821 8f99 8378 3c04 0058 .@.....!...x<..X 000d2370: 3c05 0056 2484 ad68 24a5 9f00 0320 f809 <..V$..h$.... .. To make sure the correct file is patched, the following MD5 checksums should match the unpatched and patched files: 4bd74183c23859c897ed77e8566b84de uclited 4107104024a2e0aeaf6395ed30adccae uclited-patched Debricking: * Serial port can be soldered on unpopulated 4-pin header (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors running from pins 1 (TXD) and 2 (RXD). Do NOT bridge the pull-down for pin 2, running parallel to the header. * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via the LuCI web interface setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr Tested by forum user KernelMaker. Link: https://forum.openwrt.org/t/eap225-v1-firmware/87116 Signed-off-by: Sander Vanheule <sander@svanheule.net>
* ath79: add Embedded Wireless Balin PlatformCatrinel Catrinescu2021-12-031-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the Embedded Wireless "Balin" platform, it is in ar71xx too SoC: QCA AR9344 or AR9350 RAM: DDR2-RAM 64MBytes Flash: SPI-NOR 16MBytes WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n Ethernet: 3 x 10/100 Mb/s USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up PCIe: MiniPCIe - 1 x lane PCIe 1.2 Button: 1 x Reset-Button UART: 1 x Normal, 1 x High-Speed JTAG: 1 x EJTAG LED: 1 x Green Power/Status LED GPIO: 10 x Input/Output multiplexed The module comes already with the current vanilla OpenWrt firmware. To update, use "sysupgrade -n --force <image>" image directly in vendor firmware. This resets the existing configurations back to default! Signed-off-by: Catrinel Catrinescu <cc@80211.de> [indent, led function+color properties, fix partition unit-address, re-enable pcie port, mention button+led in commit message] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: convert TP-Link Archer C7v1/2 Wifis to nvmem-cellsChristian Lamparter2021-11-282-9/+38
| | | | | | | | | | | | | | | For v2, both ath9k (2.4GHz Wifi) and ath10k (5 GHz) driver now pull the (pre-)calibration data from the nvmem subsystem. v1 is slightly different as only the ath9k Wifi is supported. This allows us to move the userspace caldata extraction and mac-address patching for the 5GHZ ath10k supported wifi into the device-tree definition of the device. ath9k's nodes are also changed over to use nvmem-cells over OpenWrt's custom mtd-cal-data property. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* Revert "ath79: add support for Mikrotik LHG 5"Hauke Mehrtens2021-11-232-156/+0
| | | | | | | | This reverts commit 48774decea9b42e97edd53ce33e574de7d85f3df. This commit does not contain a valid name in the Signed-off-by line. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath79: merge D-Link DAP-2695 with dtsiSebastian Schaper2021-11-201-72/+23
| | | | | | | | | | | | Further devices from the series have been added in the meantime, introducing `qca955x_dlink_dap-2xxx.dtsi`. Thus, merge support for DAP-2695 with the existing dtsi. This implies factory images can now be flashed via the regular OEM Web UI, as well as the bootloader recovery. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: move cal-data extraction to dts for DAP-2695Sebastian Schaper2021-11-201-1/+1
| | | | | | | | | | This device can be merged with the existing dtsi, which declares the location of ath9k cal-data via devicetree, correcting the 2.4G mac address in `10_fix_wifi_mac` rather than `10-ath9k-eeprom`. To make these changes more visible, apply before merging with dtsi. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: increase SPI frequency for D-Link DAP-2695Sebastian Schaper2021-11-201-1/+1
| | | | | | | | | This device can be merged with the existing dtsi, which will increase spi-max-frequency to 50 MHz. To make this change more visible, increase to 50 MHz before merging. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: add support for Mikrotik LHG 5Jakob (Jack/XDjackieXD)2021-11-202-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik LHG 5 series (product codes RBLHG-5nD, RBLHG-5HPnD and RBLHG-5HPnD-XL) devices are an outdoor 5GHz CPE with a 24.5dBi or 27dBi integrated antenna built around the Atheros AR9344 SoC. It is very similar to the SXT Lite5 series which this patch is based upon. Specifications: - SoC: Atheros AR9344 - RAM: 64 MB - Storage: 16 MB SPI NOR - Wireless: Atheros AR9340 (SoC) 802.11a/n 2x2:2 - Ethernet: Atheros AR8229 switch (SoC), 1x 10/100 port, 8-32 Vdc PoE in - 8 user-controllable LEDs: - 1x power (blue) - 1x user (white) - 1x ethernet (green) - 5x rssi (green) See https://mikrotik.com/product/RBLHG-5nD for more details. Notes: The device was already supported in the ar71xx target. Flashing: TFTP boot initramfs image and then perform a sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Jakob (Jack/XDjackieXD) <jakob@chaosfield.at>
* ath79: mikrotik: enable USB module on RouterBoard wAPR-2nDRoger Pueyo Centelles2021-11-201-0/+8
| | | | | | | | | | | The MikroTik RouterBOARD wAPR-2nD (wAP R) router features a miniPCI-e slot with USB lines connected, which are used by some USB cards with miniPCI-e form factor, like the R11e-LR8. Enabling USB support is required for such cards to work. Tested on a MikroTik wAP LR8 kit (RB wAPR-2nD + R11e-LR8). Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath79: WNDR3700/3800/MAC: utilize nvmem for caldata fetchingChristian Lamparter2021-11-067-26/+72
| | | | | | | | converts the still popular WNDR3700 Series to fetch the caldata through nvmem. As the "MAC with NVMEM" has shown, there could pitfalls along the way. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for Netgear R6100Piotr Dymacz2021-11-031-0/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Netgear R6100 is a dual-band Wi-Fi 5 (AC1200) router based on Qualcomm Atheros (AR9344 + QCA9882) platform. Support for this device was first introduced in 15f6f67d18 (ar71xx). FCC ID: PY312400225. Specifications: - Atheros AR9344 (560 MHz) - 128 MB of RAM (DDR2) - 128 MB of flash (parallel NAND) - 2T2R 2.4 GHz Wi-Fi (AR9344) - 2T2R 5 GHz Wi-Fi (QCA9882) - 5x 10/100 Mbps Ethernet (AR9344) - 4x internal antenna - 1x USB 2.0 (GPIO-controlled power) - 6x LED, 3x button (reset, Wi-Fi, WPS) - UART (4-pin, 2.54 mm pitch) header on PCB - 1x mechanical power switch - DC jack for main power input (12 V) WARNING: sysupgrade from older stable releases is not possible, fresh installation (via vendor's GUI or TFTP based recovery) is required. Reason for that is increased kernel partition size. Installation: Use the 'factory' image under vendor's GUI or via TFTP U-Boot recovery. You can use the 'nmrpflash' tool at a boot time, before kernel is loaded or start it manually by pressing the 'reset' button for ~20 seconds from powering up the device (U-Boot will start TFTP server on 192.168.1.1, use TFTP client to send the image). Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> Signed-off-by: Michael Pratt <mcpratt@pm.me> Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ath79: fix UBNT Aircube AC gpiosNicolò Veronese2021-11-011-1/+1
| | | | | | | | | | GPIOs on the Aircube AC are wrong: - Reset GPIO moved from 17 to 12 - PoE Pass Through GPIO for Aircube AC is 3 Fixes: 491ae3357e10 ("ath79: add support for Ubiquiti airCube AC") Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
* ath79: add support for Letv LBA-047-CHShiji Yang2021-11-011-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SOC: QCA9531 650 MHz ROM: 16 MiB Flash (Winbond W25Q128FV) RAM: 128 MiB DDR2 (Winbond W971GG6SB) LAN: 10/100M *2 WAN: 10/100M *1 LED: BGR color *1 Mac address: label C8:0E:77:xx:xx:68 art@0x0 lan C8:0E:77:xx:xx:62 art@0x6 wan C8:0E:77:xx:xx:68 art@0x0 (same as the label) wlan C8:0E:77:xx:xx:B2 art@0x1002 (load automatically) TFTP installation: * Set local IP to 192.168.67.100 and open tftpd64, link lan port to computer. Rename "xxxx-factory.bin" to "openwrt-ar71xx-generic-ap147-16M-rootfs-squashfs.bin". * Make sure firmware file is in the tftpd's directory, push reset button and plug in, hold it for 5 seconds, and then it will download firmware from tftp server automatically. More information: * This device boot from flash@0xe80000 so we need a okli loader to deal with small kernel partition issue. In order to make full use of the storage space, connect a part of the previous kernel partition to the firmware. Stock Modify 0x000000-0x040000(u-boot) 0x000000-0x040000(u-boot) 0x040000-0x050000(u-boot-env) 0x000000-0x050000(u-boot-env) 0x050000-0xe80000(rootfs) 0x050000-0xe80000(firmware part1) 0xe80000-0xff0000(kernel) 0xe80000-0xe90000(okli-loader) 0xe90000-0xff0000(firmware part2) 0xff0000-0x1000000(art) 0xff0000-0x1000000(art) Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ath79: add support for Dongwon T&I DW02-412HJihoon Han2021-10-313-0/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dongwon T&I DW02-412H is a 2.4/5GHz band 11ac (WiFi-5) router, based on Qualcomm Atheros QCA9557. Specifications -------------- - SoC: Qualcomm Atheros QCA9557-AT4A - RAM: DDR2 128MB - Flash: SPI NOR 2MB (Winbond W25Q16DVSSIG / ESMT F25L16PA(2S)) + NAND 64/128MB - WiFi: - 2.4GHz: QCA9557 WMAC - 5GHz: QCA9882-BR4A - Ethernet: 5x 10/100/1000Mbps - Switch: QCA8337N-AL3C - USB: 1x USB 2.0 - UART: - JP2: 3.3V, TX, RX, GND (3.3V is the square pad) / 115200 8N1 Installation -------------- 1. Connect a serial interface to UART header and interrupt the autostart of kernel. 2. Transfer the factory image via TFTP and write it to the NAND flash. 3. Update U-Boot environment variable. > tftpboot 0x81000000 <your image>-factory.img > nand erase 0x1000000 > nand write 0x81000000 0x1000000 ${filesize} > setenv bootpart 2 > saveenv Revert to stock firmware -------------- 1. Revert to stock U-Boot environment variable. > setenv bootpart 1 > saveenv MAC addresses as verified by OEM firmware -------------- WAN: *:XX (label) LAN: *:XX + 1 2.4G: *:XX + 3 5G: *:XX + 4 The label MAC address was found in art 0x0. Credits -------------- Credit goes to the @manatails who first developed how to port OpenWRT to this device and had a significant impact on this patch. And thanks to @adschm and @mans0n for guiding me to revise the code in many ways. Signed-off-by: Jihoon Han <rapid_renard@renard.ga> Reviewed-by: Sungbo Eo <mans0n@gorani.run> Tested-by: Sungbo Eo <mans0n@gorani.run>
* ath79: mikrotik: enable SFP on RB921GS-5HPacD (mANTBox 15s)Roger Pueyo Centelles2021-10-312-48/+48
| | | | | | | | | | | | This patch enables the SFP cage on the MikroTik RouterBOARD 921GS-5HPacD (mANTBox 15s). The RB922UAGS-5HPacD had it already working, so the support code is moved to the common DTSI file both devices share. Tested on a RouterBOARD 921GS-5HPacD with a MikroTik S-53LC20D module. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limitChristian Lamparter2021-10-304-6/+6
| | | | | | | | | | | | | | | | | | OpenWrt maintains two special out-of-tree DT properties: "qca,disable-5ghz" and "qca,disable-2ghz". These are implemented in a mac80211 ath9k patch "550-ath9k-disable-bands-via-dt.patch". With the things being what they are, now might be a good point to switch the devices to the generic and upstream "ieee80211-freq-limit" property. This property is much broader and works differently. Instead of disabling the drivers logic which would add the affected band and channels. It now disables all channels which are not within the specified frequency range. Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> # HH5A Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for TP-Link CPE710-v1Andrew Cameron2021-09-251-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with one Ethernet port based on the AP152 reference board Specifications: - SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz - RAM: 128MiB DDR2 @ 650MHz - Flash: 16MiB SPI NOR Based on the GD25Q128 - Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless data rate) Based on the QCA9896 - Ethernet: one 1GbE port - 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal reflector - Power, LAN, WLAN5G Blue LEDs - 3x Blue LEDs Flashing instructions: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 30-40 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP address:192.168.0.254 Signed-off-by: Andrew Cameron <apcameron@softhome.net> [convert to nvmem, fix MAC assignment in 11-ath10k-caldata] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WA1201 v2Robert Balas2021-09-051-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device is a wireless access point working on the 2.4 GHz and 5 GHz band, based on Qualcomm/Atheros QCA9563 + QCA9886. Specification - 775 MHz CPU - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - QCA9563: 2.4 GHz 3x3 - QCA9886: 5 GHz - AR8033: 1x 1 Gbs Ethernet - 4x LED, WPS factory reset and power button - bare UART on PCB (accessible through testpoints) Methods for Flashing: - Apply factory image in OEM firmware web-gui. Wait a minute after the progress bar completes and restart the device. - Sysupgrade on top of existing OpenWRT image - Solder wires onto UART testpoints and attach a terminal. Boot the device and press enter to enter u-boot's menu. Then issue the following commands 1. setenv serverip your-server-ip setenv ipaddr your-device-ip 2. tftp 0x80060000 openwrt-squashfs.bin (Rembember output of size in hex, henceforth "sizeinhex") 3. erase 0x9f030000 +"sizeinhex" 4. cp.b 0x80060000 0x9f030000 0x"sizeinhex" 5. reboot Recover: - U-boot serial console Signed-off-by: Robert Balas <balasr@iis.ee.ethz.ch> [convert to nvmem] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for onion omegaJan-Niklas Burfeind2021-08-261-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Onion Omega is a hardware development platform with built-in WiFi. https://onioniot.github.io/wiki/ Specifications: - QCA9331 @ 400 MHz (MIPS 24Kc Big-Endian Processor) - 64MB of DDR2 RAM running at 400 MHz - 16MB of on-board flash storage - Support for USB 2.0 - Support for Ethernet at 100 Mbps - 802.11b/g/n WiFi at 150 Mbps - 18 digital GPIOs - A single Serial UART - Support for SPI - Support for I2S Flash instructions: The device is running OpenWrt upon release using the ar71xx target. Both a sysupgrade and uploading the factory image using u-boots web-UI do work fine. Depending on the ssh client, it might be necessary to enable outdated KeyExchange methods e.g. in the clients ssh-config: Host 192.168.1.1 KexAlgorithms +diffie-hellman-group1-sha1 The stock credentials are: root onioneer For u-boots web-UI manually configure `192.168.1.2/24` on your computer, connect to `192.168.1.1`. MAC addresses as verified by OEM firmware: 2G phy0 label LAN eth0 label - 1 LAN is only available in combination with an optional expansion dock. Based on vendor acked commit: commit 5cd49bb067ca ("ar71xx: add support for Onion Omega") Partly reverts: commit fc553c7e4c8e ("ath79: drop unused/incomplete dts") Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
* ath79: add support for Compex WPJ558 (16M)Romain Mahoux2021-08-251-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: QCA9558 - DRAM: 128MB DDR2 - Flash: 16MB SPI-NOR - Wireless: on-board abgn 2×2 2.4GHz radio - Ethernet: 2x 10/100/1000 Mbps (1x 802.11af PoE) - miniPCIe slot Flash instruction: - From u-boot tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj558-16m-squashfs-sysupgrade.bin erase 0x9f030000 +$filesize cp.b $fileaddr 0x9f030000 $filesize boot - From cpximg loader The cpximg loader can be started either by holding the reset button during power up. Once it's running, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board. For example, if the board is labelled '6A07': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj558-16m-squashfs-cpximg-6a07.bin Signed-off-by: Romain Mahoux <romain@mahoux.fr> [convert to nvmem, remove redundant lan_mac in 02_network] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Atheros DB120 reference boardZoltan HERPAI2021-08-221-0/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Atheros DB120 reference board. Specifications: SoC: QCA9344 DRAM: 128Mb DDR2 Flash: 8Mb SPI-NOR, 128Mb NAND flash Switch: 5x 10/100Mbps via AR8229 switch (integrated into SoC), 5x 10/100/1000Mbps via QCA8237 via RGMII WLAN: AR9300 (SoC, 2.4G+5G) + AR9340 (PCIe, 5G-only) USB: 1x 2.0 UART: standard QCA UART header JTAG: yes Button: 1x reset LEDs: a lot Slots: 2x mPCIe + 1x mini-PCI, but using them requires additional undocumented changes. Misc: The board allows to boot off NAND, and there is I2S audio support as well - also requiring additional undocumented changes. Installation: 1. Original bootloader Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP tftpboot 0x80060000 openwrt-ath79-generic-atheros_db120-squashfs-factory.bin erase 0x9f050000 +$filesize cp.b $fileaddr 0x9f050000 $filesize 2. pepe2k's u-boot_mod Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP, as "firmware.bin" run fw_upg Reboot the board. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> [explicit factory recipe in generic.mk, sorting in 10-ath9k-eeprom, convert to nvmem, use fwconcat* names in DTS, remove unneeded DT labels, remove redundant uart node] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti PowerBeam M2 (XW)Russell Senior2021-08-221-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Ubiquiti PowerBeam M2 (XW), e.g. PBE-M2-400, a 802.11n wireless with a feed+dish form factor. This device was previously supported by the ar71xx loco-m-xw firmware. Specifications: - Atheros AR9342 SoC - 64 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) Flashing via stock GUI: - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first (see https://openwrt.org/toh/ubiquiti/powerbeam installation instructions) - Upload the factory image via AirOS web GUI. Flashing via TFTP: - Use a pointy tool (e.g., unbent paperclip) to keep the reset button pressed. - Power on the device (keep reset button pressed). - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button. - The device starts a TFTP server at 192.168.1.20. - Set a static IP on the computer (e.g., 192.168.1.21/24). - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-ubnt_powerbeam-m2-xw-squashfs-factory.bin WARNING: so far, no non-destructive method has been discovered for opening the enclosure to reach the serial console. Internal photos are available here: https://fcc.io/SWX-NBM2HP Signed-off-by: Russell Senior <russell@personaltelco.net>
* ath79: rename Ubiquiti PowerBeam M (XW) to PowerBeam M5 (XW)Russell Senior2021-08-221-2/+2
| | | | | | | | | | | | | | The commit [1] added support for Ubiquiti PowerBeam M (XW), tested on the PBE-M5-400. But, it turns out the PBE-M2-400 has a different ethernet configuration, so make the support specific to the m5 version in anticipation of adding specific support for the m2 in a separate commit. [1] 12eb5b2384a6 ("ath79: add support for Ubiquiti PowerBeam M (XW)") Signed-off-by: Russell Senior <russell@personaltelco.net> [fix model name in DTS, format commit reference in commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: remove redundant nvmem definitionsAdrian Schmutzler2021-08-2020-172/+22
| | | | | | | | | Due to use of a script when migrating from mtd-mac-address, a few of the definitions are redundant in DTSI and DTS files. Remove those and consolidate the definitions in parent DTSI files in a few cases. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: convert remaining mtd-mac-address cases to nvmemAdrian Schmutzler2021-08-1864-157/+1406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the nvmem-based approach for retrieving MAC addresses appears to depend on the addresses being set up after the partitions, it is no longer possible to keep the MAC address setup in shared DTSI files while the partitions itself are set up in DTS files for the individual devices. In ath79 the firmware partition is typically located somewhere "in the middle" of the partition table. Thus, it's not trivial to share the partitions containing MAC address information in a common DTSI (like we did in some cases on ramips). In this commit, MAC address setup is thus moved to the relevant partitions, and in most cases needs to be duplicated. While the duplication is not really nice, it eventually provides a cleaner and more tidy setup, making the DTS(I) file fragmentation a bit more logical. This should also help with adding new devices, as information is distributed across less locations. For consistency, this commit also moves the mtd-cal-data property "down" together with the MAC address setup, so it's not based on a partition before the latter is defined either. (This is only done for those files touched due to nvmem conversion.) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for GL.iNet GL-X300BJohn Marrett2021-08-051-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL-X300B is a industrial 4G LTE router based on the Qualcomm QCA9531 SoC. Specifications: - Qualcomm QCA9531 @ 650 MHz - 128 MB of RAM - 16 MB of SPI NOR FLASH - 2x 10/100 Mbps Ethernet - 2.4GHz 802.11b/g/n - 1x USB 2.0 (vbus driven by GPIO) - 4x LED, driven by GPIO - 1x button (reset) - 1x mini pci-e slot (vcc driven by GPIO) - RS-485 Serial Port (untested) Flash instructions: This firmware can be flashed using either sysupgrade from the GL.iNet firmware or the recovery console as follows: - Press and hold the reset button - Connect power to the router, wait five seconds - Manually configure 192.168.1.2/24 on your computer, connect to 192.168.1.1 - Upload the firmware image using the web interface RS-485 serial port is untested and may depend on the following commit in the GL.iNet repo: https://github.com/gl-inet/openwrt/commit/202e83a32ae308fbb70502b6dbe3bb0bf8b1fba9 MAC addresses as verified by OEM firmware: vendor OpenWrt address WAN eth0 label LAN eth1 label + 1 2g phy0 label + 2 The label MAC address was found in the art partition at 0x0 Based on vendor commit: https://github.com/gl-inet/openwrt/commit/16c5708b207eb76ff19a040dc973e560d3d8074b Signed-off-by: John Marrett <johnf@zioncluster.ca>
* ath79: fix JT-OR750i switch LED assignmentDavid Bauer2021-07-281-2/+2
| | | | | | | The LEDs for LAN1 and LAN3 were swapped. Link on port 1 would illuminate the LED on port 3 and vice versa. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: enable missing pinmux for JT-OR750iDavid Bauer2021-07-281-0/+3
| | | | | | | Without explicit configuration of these pins the ethernet as well as status LED of the device do not work correctly. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for Joy-IT JT-OR750iVincent Wiemann2021-07-281-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * QCA9531, 16 MiB flash (Winbond W25Q128JVSQ), 128 MiB RAM * 802.11n 2T2R (external antennas) * QCA9887, 802.11ac 1T1R (connected with diplexer to one of the antennas) * 3x 10/100 LAN, 1x 10/100 WAN * UART header with pinout printed on PCB Installation: * The device comes with a bootloader installed only * The bootloader offers DHCP and is reachable at http://10.123.123.1 * Accept the agreement and flash sysupgrade.bin * Use Firefox if flashing does not work TFTP recovery with static IP: * Rename sysupgrade.bin to jt-or750i_firmware.bin * Offer it via TFTP server at 192.168.0.66 * Keep the reset button pressed for 4 seconds after connecting power TFTP recovery with dynamic IP: * Rename sysupgrade.bin to jt-or750i_firmware.bin * Offer it via TFTP server with a DHCP server running at the same address * Keep the reset button pressed for 6 seconds after connecting power Co-authored-by: Sebastian Schaper <openwrt@sebastianschaper.net> Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
* ath79: convert mtd-mac-address to nvmem implementationAnsuel Smith2021-07-19177-364/+2637
| | | | | | | Define nvmem-cells and convert mtd-mac-address to nvmem implementation. The conversion is done with an automated script. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* treewide: convert mtd-mac-address-increment* to generic implementationAnsuel Smith2021-07-1979-103/+104
| | | | | | | | | | | | | Rework patch 681-NET-add-mtd-mac-address-support to implement only the function to read the mac-address from mtd. Generalize mtd-mac-address-increment function so it can be applied to any source of of_get_mac_address. Rename any mtd-mac-address-increment to mac-address-increment. Rename any mtd-mac-address-increment-byte to mac-address-increment-byte. This should make simplify the conversion of target to nvmem implementation. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ath79: add support for TP-Link RE455 v1Roberto Valentini2021-07-111-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE455 v1 is a dual band router/range-extender based on Qualcomm/Atheros QCA9563 + QCA9880. This device is nearly identical to RE450 v3 Specification: - 775 MHz CPU - 64 MB of RAM (DDR2) - 8 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz - 3T3R 5 GHz - 1x 10/100/1000 Mbps Ethernet (AR8033 PHY) - 7x LED, 4x button - UART header on PCB[1] Flash instruction: Apply factory image in OEM firmware web-gui. [1] Didn't work, probably need to short unpopulated resistor R64 and R69 as RE450v3 Signed-off-by: Roberto Valentini <valantin89@gmail.com>
* ath79: increase SPI frequency for OCEDO boardsDavid Bauer2021-07-073-3/+3
| | | | | | | | | | The MX25L12805D used on all ath79 OCEDO boards supports clock speeds up to 50 MHz. Thus, we can increase the maximum SPI frequency the flash chip is controlled at to 50 MHz, increasing transfer speed. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: increase WS-AP3610 SPI frequencyDavid Bauer2021-07-071-1/+1
| | | | | | | | The M25P80 used on the Siemens WS-AP3610 supports clock speeds up to 54 MHz. Thus, we can safely increase the maximum SPI frequency the flash chip is controlled at to 50 MHz, increasing transfer speed. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add support for Xiaomi AIoT Router AC2350Evgeniy Isaev2021-07-051-0/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications * SoC: QCA9563 @ 775MHz (MIPS 74Kc) * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR (EN25QH128) * Wireless 2.4GHz (SoC): b/g/n, 3x3 * Wireless 5Ghz (QCA9988): a/n/ac, 4x4 MU-MIMO * IoT Wireless 2.4GHz (QCA6006): currently unusable * Ethernet (AR8327): 3 LAN × 1GbE, 1 WAN × 1GbE * LEDs: Internet (blue/orange), System (blue/orange) * Buttons: Reset * UART: through-hole on PCB ([VCC 3.3v](RX)(GND)(TX) 115200, 8n1) * Power: 12VDC, 1,5A MAC addresses map (like in OEM firmware) art@0x0 88:C3:97:*:57 wan/label art@0x1002 88:C3:97:*:2D lan/wlan2g art@0x5006 88:C3:97:*:2C wlan5g Obtain SSH Access 1. Download and flash the firmware version 1.3.8 (China). 2. Login to the router web interface and get the value of `stok=` from the URL 3. Open a new tab and go to the following URL (replace <STOK> with the stok value gained above; line breaks are only for easier handling, please put together all four lines into a single URL without any spaces): http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/set_config_iotdev ?bssid=any&user_id=any&ssid=-h%0Anvram%20set%20ssh_en%3D1%0Anvram%20commit %0Ased%20-i%20%27s%2Fchannel%3D.%2A%2Fchannel%3D%5C%5C%22debug%5C%5C%22%2F g%27%20%2Fetc%2Finit.d%2Fdropbear%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A 4. Wait 30-60 seconds (this is the time required to generate keys for the SSH server on the router). Create Full Backup 1. Obtain SSH Access. 2. Create backup of all flash (on router): dd if=/dev/mtd0 of=/tmp/ALL.backup 3. Copy backup to PC (on PC): scp root@192.168.31.1:/tmp/ALL.backup ./ Tip: backup of the original firmware, taken three times, increases the chances of recovery :) Calculate The Password * Locally using shell (replace "12345/E0QM98765" with your router's serial number): On Linux printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5sum - | head -c8 && echo On macOS printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \ md5 | head -c8 * Locally using python script (replace "12345/E0QM98765" with your router's serial number): wget https://raw.githubusercontent.com/eisaev/ax3600-files/master/scripts/calc_passwd.py python3.7 -c 'from calc_passwd import calc_passwd; print(calc_passwd("12345/E0QM98765"))' * Online https://www.oxygen7.cn/miwifi/ Debricking (lite) If you have a healthy bootloader, you can use recovery via TFTP using programs like TinyPXE on Windows or dnsmasq on Linux. To switch the router to TFTP recovery mode, hold down the reset button, connect the power supply, and release the button after about 10 seconds. The router must be connected directly to the PC via the LAN port. Debricking You will need a full dump of your flash, a CH341 programmer, and a clip for in-circuit programming. Install OpenWRT 1. Obtain SSH Access. 2. Create script (on router): echo '#!/bin/sh' > /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo '. /bin/boardupgrade.sh' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh echo 'board_prepare_upgrade' >> /tmp/flash_fw.sh echo 'mtd erase rootfs_data' >> /tmp/flash_fw.sh echo 'mtd write /tmp/openwrt.bin firmware' >> /tmp/flash_fw.sh echo 'sleep 3' >> /tmp/flash_fw.sh echo 'reboot' >> /tmp/flash_fw.sh echo >> /tmp/flash_fw.sh chmod +x /tmp/flash_fw.sh 3. Copy `openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin` to the router (on PC): scp openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin \ root@192.168.31.1:/tmp/openwrt.bin 4. Flash OpenWRT (on router): /bin/ash /tmp/flash_fw.sh & 5. SSH connection will be interrupted - this is normal. 6. Wait for the indicator to turn blue. Signed-off-by: Evgeniy Isaev <isaev.evgeniy@gmail.com> [improve commit message formatting slightly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WR941HP v1Diogenes Rengo2021-07-041-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SOC: Qualcomm Atheros TP9343 (750 MHz) Flash: 8 Mb (GigaDevice GD25Q64CSIG) RAM: 64 Mb (Zentel A3R12E40DBF-8E) Serial: yes, 4-pin header Wlan: Qualcomm Atheros TP9343, antenna: MIM0 3x3:3 RP-SMA 3 x 2.4GHz power amp module Skyworks (SiGe) SE2576L Ethernet: Qualcomm Atheros TP9343 Lan speed: 100M ports: 4 Lan speed: 100M ports: 1 Other info: same case, ram and flash that TP-Link TL-WR841HP, different SOC https://forum.openwrt.org/t/adding-device-support-tp-link-wr941hp/ Label MAC addresses based on vendor firmware: LAN *:ee label WAN *:ef label +1 WLAN *:ee label The label MAC address found in "config" partition at 0x8 Flash instruction: Upload the generated factory firmware on web interface. Signed-off-by: Diogenes Rengo <rengocbx250@gmail.com> [remove various whitespace issues, squash commits, use short 0x0] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>