Commit Graph

25109 Commits

Author SHA1 Message Date
Chuanhong Guo 43f0e386d4 mediatek: add support for TOTOLINK A8000RU
Specifications:
- SoC: MT7622
- RAM: 512MB
- Flash: MX35LF1GE4AB 128MB SPI NAND
- Ethernet: RTL8367S 5x1GbE
- WiFi: 2.4G: MT7622 5G: MT7615N x2
- Other ports: USB3.0 x1

Flash instruction:
*important*: upgrade vendor firmware to at least V7.1cu.643_B20200521
1. hold the reset button and power on the device. wait for about 10s
   before releasing the reset button.
2. upload sysupgrade.bin via u-boot recovery page on http://192.168.1.1

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-09-03 15:53:28 +08:00
Rui Salvaterra 42ee7d8157 kernel: add missing CONFIG_SECURITY_NETWORK_XFRM ksym
Paul noticed a build failure [1] due to this missing symbol. Add it as disabled
to both generic kconfigs.

[1] https://github.com/aparcar/openwrt/runs/3480872706?check_suite_focus=true#step:11:63

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-31 22:41:46 -10:00
Rafał Miłecki f55f1dbaad bcm53xx: switch to the kernel 5.10
With PCI and USB regressions fixed it should be safe to switch now.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-31 11:41:09 +02:00
Rafał Miłecki 9b40346328 bcm53xx: fix kmod-i2c-bcm-iproc for kernel 5.10
I2C_BCM_IPROC selects I2C_SLAVE which in turn makes two new symbols
available: I2C_SLAVE_EEPROM and I2C_SLAVE_TESTUNIT. That was causing:

I2C support (I2C) [M/n/y/?] m
  Enable compatibility bits for old user-space (I2C_COMPAT) [N/y/?] n
  I2C device interface (I2C_CHARDEV) [M/n/?] m
  I2C bus multiplexing support (I2C_MUX) [N/m/?] n
  Autoselect pertinent helper modules (I2C_HELPER_AUTO) [N/y/?] n
    SMBus-specific protocols (I2C_SMBUS) [N/m/?] n
  I2C/SMBus Test Stub (I2C_STUB) [N/m/?] n
  I2C slave support (I2C_SLAVE) [Y/?] y
    I2C eeprom slave driver (I2C_SLAVE_EEPROM) [N/m/?] n
    I2C eeprom testunit driver (I2C_SLAVE_TESTUNIT) [N/m/?] (NEW)

Ideally I2C_SLAVE should probably be packaged as kmod-i2c-slabe. For now
just modify kmod-i2c-bcm-iproc to fix kernel compilation.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-31 11:41:04 +02:00
Rafał Miłecki 62465c75be bcm53xx: fix USB in kernel 5.10
This makes USB controller driver work with USBs that are always powered
on (don't require toggling any GPIO).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-31 09:34:40 +02:00
Alexander Couzens c39be8e7a4
ramips: minew g1-c: use default static address for lan instead of dhcp
As Adrian Schmutzler suggested on github [1] the device should follow the
default behaviour on ethernet using a static address instead using dhcp.

[1] 8d497b6570

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2021-08-31 02:42:32 +02:00
Rafał Miłecki 8a4d4d4243 bcm53xx: backport missed DT patch cleaning up CRU block
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-30 09:00:28 +02:00
Sungbo Eo f08b76b32f ramips: w2914ns-v2: consolidate leds nodes into dtsi
w2914ns-v2, 11acnas, and freezio use almost same board and thus share a
common dtsi file. Now that LED labels do not contain "devicename" since
commit c846dd91f0 ("ramips: remove model name from LED labels"), let's
move the leds nodes to dtsi and remove them from dts.

Note that freezio has only one USB 3.0 port and adding &ehci_port2 trigger
does not incur any visible changes.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2021-08-30 00:37:47 +02:00
Adrian Schmutzler aec97b31ea ramips: provide default BLOCKSIZE for Device/seama
The Device/seama shared definition requires BLOCKSIZE, so it should
have a default value for this variable.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:47 +02:00
Filip Matijević e2b03c16eb ipq806x: add missing enclosing partitions block for TP-Link C2600
The partitions that have compatible property set are skipped by mtd if
they are not contained inside a partitions node and this breaks
fetching MAC address from "default-mac" partition.

Fix this by defining all the partitions inside partitions node with
compatible = "fixed-partitions" as nvmem requires the standard
partitions scheme to work correctly.

Fixes: FS#3945
Fixes: cd36d71655 ("ipq806x/dts: Add Archer C2600 DTS")
Fixes: 0458a8993c ("ipq806x: convert mtd-mac-address to nvmem
implementation")

Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
[adjust commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:35 +02:00
Adrian Schmutzler d37125b3f3 ath79: remove redundant BLOCKSIZE of 64k from devices
BLOCKSIZE = 64k is set in Device/Default, i.e. global default on
the target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-30 00:37:35 +02:00
Rafał Miłecki bce00f47e5 bcm53xx: backport the latest upstream DT changes
This includes:
1. BCM5301X changes from 5.14 and queued 5.15 stuff
2. NSP changes from 5.11 - 5.15 for kernel 5.10

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-08-29 22:57:13 +02:00
Rui Salvaterra 505b7a2d08 kernel: move two symbols to the generic kconfigs
CONFIG_RCU_{NEED_SEGCBLIST,STALL_COMMON} are set basically everywhere. Move them
to the generic kconfigs. And resort the generic kconfigs while at it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-29 17:07:19 +02:00
Rui Salvaterra 7e135add24 kernel: disable CONFIG_RCU_EXPERT and friends
Based on the existing documentation [1][2], I dare anyone to demonstrate that
we need to fine-tune these RCU parameters. The (performance) breakage potential
for doing so is immense, so let's just please put down this loaded footgun.

Disable CONFIG_RCU_EXPERT and its dependent symbols. Additionally, remove the
CONFIG_RCU_EXPERT symbol from the target kconfigs which contain it.

[1] https://www.kernel.org/doc/Documentation/RCU/Design/Data-Structures/Data-Structures.html
[2] https://lwn.net/Articles/777214/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-08-29 17:03:38 +02:00
Ansuel Smith b8f8d0651c kernel: fix warning about unused try_to_force_load
There is a longlasting warn about unused defined try_to_force_load.
Fix this by including this function only when actually used.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-29 16:31:24 +02:00
John Audia be7e0091fe kernel: bump 5.4 to 5.4.143
Manually rebased:
  bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch

Removed upstreamed:
  mvebu/patches-5.4/100-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-08-29 16:31:02 +02:00
John Audia 6b1cd3e345 kernel: bump 5.10 to 5.10.61
Manually rebased:
  bcm27xx/patches-5.10/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch

Removed upstreamed:
  mvebu/patches-5.10/101-cpufreq-armada-37xx-forbid-cpufreq-for-1.2-GHz-variant.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2021-08-29 16:30:20 +02:00
Sebastian Schaper 1c8214d6f2 ath79: fix spelling of DEVICE_MODEL for D-Link DAP-2695
Change `DAP-2965` to `DAP-2695` for device selection in menuconfig.

Fixes: cd09f26660 ("ath79: add support for D-Link DAP-2695-A1")

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
[add Fixes]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-28 13:24:23 +02:00
David Bauer 90e167abaa ramips: add label-mac for TL-MR3020 v3
The TP-Link TL-MR3020 v3 only has a single MAC address assigned for
ethernet LAN as well as WiFi. This MAC address is also printed on the
casing.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:35:02 +02:00
David Bauer 9c965893ed ramips: enable fast-read for TL-MR3020 v3
The GigaDevices GD25Q64B found on the TL-MR3020 v3 supports the fast
read instruction. Add the required DT property in order to enable usage
of this property.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:31:45 +02:00
David Bauer db3545cd02 ramips: increase SPI frequency for TL-MR3020 v3
The GigaDevices GD25Q64B supports higher SPI clocks than 10 MHz. While
100 MHz do not work reliably, 50 MHz works without issues.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:31:36 +02:00
David Bauer 161ee85bbe ramips: fix input type for TL-MR3020 v3
The modec{1,2} keys are actually switches.

Add the respective DTS properties to avoid accidental activation of
failsafe mode.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-08-28 01:31:29 +02:00
Daniel Golle cf40141b51
kernel: properly handle paging errors in fit partition parser
The uImage.FIT partition uses page mapping without properly handling
paging errors. This can lead to Kernel Oops in case of read errors
while trying to parse uImage.FIT partitions.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-27 21:32:43 +01:00
Chuanhong Guo 97e32e9702 mediatek: mt7623: replace kconfig symbol for snand driver
this change was missing during the spi-nand driver replacement, causing
build failure.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 22:22:29 +08:00
Chuanhong Guo 472437b93f mediatek: mt7629: manually add missing kconfig
These options doesn't show up unless some kernel packages are selected,
so they are not covered by kernel_menuconfig.
Manually add them so that a build with all kmods can pass without user
interaction.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 15:54:53 +08:00
Chuanhong Guo 8f2cace0b7 mediatek: mt7629: build with linux 5.10
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo 9abd2fb6c4 mediatek: bmt: set default bmt oob offset to 0
there's no driver level remapping of oob data in the new spi-nand
driver and bmt oob signature starts at 0x0 of the dumped oob data.
change the default value to 0 for the new spi-nand driver.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo 388127abd1 mediatek: mtk-snand: check request size against chip info
mtd->size will be overrided by BMT which makes all mtd requests made by
bmt fail in request size checking.
this commit changes the driver to check against actual chip size in chip
info as a workaround.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo b600aee3ed mediatek: attach bmt to the new snand driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo 01b452fe2d mediatek: change dts to use the new snand driver
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Chuanhong Guo c6ed31630d mediatek: remove spi-nand hacks from 5.10
we now have a standalone mtd driver and the old spi-mem driver along
with the hack in spi-nand core can be removed.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Weijie Gao e8e8487603 mediatek: enable new spi-nand driver for kernel 5.10
This patch enables new spi-nand driver for mt7622 and mt7629.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2021-08-27 10:26:25 +08:00
Weijie Gao 050621aa01 mediatek: add a new spi-nand driver for kernel 5.10
This patch adds a new spi-nand driver which implements the SNFI of mt7622
and mt7629.

Unlike the existing snfi driver which makes use of the spi-mem framework
and the spi-nand framework with modified ecc support, this driver is
implemented directly on the mtd framework with other components untouched,
and provides better performance, and behaves exactly the same as the nand
framework.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
2021-08-27 10:26:24 +08:00
Christian Lamparter a1bd8109f0 ath79: remove obsolete pci-ath9k-fixup.[c,h] files
This was old code from the AR71XXs target days that
doesn't get compiled and used anymore.

Bringing up AR92xx and earlier chips from their
OWL-Emulator state is currently done by the upstream
ath9k-pci-owl-loader module. (see the kmod-owl-loader
package).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2021-08-26 21:00:26 +02:00
Jan-Niklas Burfeind d98738b5c1 ath79: add support for onion omega
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 5cd49bb067 ("ar71xx: add support for Onion Omega")

Partly reverts:
commit fc553c7e4c ("ath79: drop unused/incomplete dts")

Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2021-08-26 15:07:18 +02:00
Álvaro Fernández Rojas 4ab0b5fabd bmips: backport accepted watchdog patch
This patch has been accepted for linux v5.14.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-25 10:24:33 +02:00
David Yang 38cb500516 ramips: expose ephy leds for miwifi-mini
Give users more control by exposing ephy leds.

Signed-off-by: David Yang <mmyangfl@gmail.com>
[remove execute bit on 01_leds, add status for gpio2]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:42:17 +02:00
David Yang 5ed11012e7 ramips: lock u-boot partition and unlock u-boot-env for miwifi-mini
Generally u-boot should keep read-only to avoid mis-overwriting and
bricking the device, but u-boot-env could be safely modified with u-boot
setenv tool.

Signed-off-by: David Yang <mmyangfl@gmail.com>
2021-08-25 01:42:17 +02:00
David Yang a6c410ae10 ramips: increase flash freq for miwifi-mini
The flash is Winbond 25Q128. As it has large rom, better to increase flash
frequency to 70MHz according to the flash spec and enable fast-read.

Signed-off-by: David Yang <mmyangfl@gmail.com>
2021-08-25 01:42:17 +02:00
Giovanni Cascione d57ba86e48 ramips: add support for D-Link DAP-1325-A1
This patch adds support for D-Link DAP-1325-A1 (Range Extender Wi-Fi N300)

Specifications:
- SoC: 580Mhz MT7628NN
- RAM: 64MB, DDR2 SDRAM
- Storage: 8MB, SPI (W25Q64JVSSIQ)
- Ethernet: 1x 10/100 LAN port
- WIFI: 2.4 GHz 802.11bgn
- LED: Status (2x to provide 3 colors), Wi-Fi Signal Strength (4x)
- Buttons: Reset, WPS
- UART: Serial console (57600, 8n1)
Row of 4 holes near LAN port, starting from square hole:
3.3V, TX,RX,GND
- FCC ID: fccid.io/KA2AP1325A1/

Installation:

Failsafe UI
Firmware can be uploaded with Failsafe UI web page:
- turn device off
- press and hold reset button
- turn device on
- keep holding reset until red wifi strength led turns on (ab. 10sec)
- connect to device through LAN port
PC must be configured with static ip (192.168.0.x)
- connect to 192.168.0.50
- select image to be flashed and upload.
Device will reboot after successful update

Serial port/TFTP server
- Connect through serial connectors on PCB (e.g. with teraterm)
- Set up a TFTP server, and connect through LAN with static IP
- Put image file in the root of the server
- Boot the device and select '2' at U-Boot startup
- Set device IP, server IP and image file name
- Start upload and flash

Signed-off-by: Giovanni Cascione <ing.cascione@gmail.com>
[fix whitespaces in DTS, convert to nvmem, add mtd-eeprom]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:42:17 +02:00
Romain Mahoux e2d08084c3 ath79: add support for Compex WPJ558 (16M)
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>
2021-08-25 01:42:17 +02:00
Chukun Pan 269758a5bc ipq806x: Askey RT4230W REV6: use usual writing for pcie part
The problem has been fixed in f47cb405ca ("ipq806x: fix pci broken
on bootm command"), now the pcie part can be written in the usual way.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-25 01:42:16 +02:00
Shiji Yang a73a8269e1 ramips: add support for DomyWifi DM202/DM203/DW22D
Specifications:
* SOC: MT7620A + MT7610E
* ROM: 16 MiB spi flash (W25Q128FVSG)
* RAM: 128 MiB DDR2 (W971GG6KB-25)
* WAN: 10/100M *1
* LAN: 10/100M *4
* USB: Type-A USB2.0 *1
* SD: MicroSD *1
* Button: Reset *1
* Antennas: 2.4 GHz *2 + 5 GHz *1
* TTL Baudrate: 57600
* U-Boot Recovery: IP: 10.10.10.123, Server: 10.10.10.3

Installation:
* Web UI Update
  1. Open http://192.168.10.1/upgrade.html in the browser.
  2. Rename firmware to a short name like firmware.bin and then upload it.
  3. Fill in the password column with the following content:
  password | mtd -x mIp2osnRG3qZGdIlQPh1 -r write /tmp/firmware.bin firmware
* TFTP + U-Boot
  1. Connect device with a TTL cable.
  2. Press "2" when booting to select "Load system code then write to Flash via TFTP".
  3. Upload firmware by tftpd64, it will boot when write instruction is executed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2021-08-25 01:42:16 +02:00
Shiji Yang 09143282bd ramips: add support for Motorola MWR03
Specifications:
* SOC: MT7628AN + MT7612E
* ROM: 8 MiB Flash
* RAM: 64 MiB DDR2
* WAN: 10/100M *1
* LAN: 10/100M *3
* Button: Reset *1
* LEDs: orange *1, white *1
* Antennas: 2.4 GHz *2 + 5 GHz *2
* TTL Baudrate: 57600
* TFTP Upgrade: IP: 192.168.51.1, Server: 192.168.51.100

MAC addresses as verified by OEM firmware:

use   address   source
2g    *:d8      factory 0x0004 (label)
5g    *:d9      factory 0x8004
LAN   *:d7      factory $label -1
WAN   *:da      factory $label +2

Installation (TFTP + U-Boot):
 * Connect device with a TTL cable and open a serial session by
   PuTTY.
 * Press "2" when booting to select "Load system code then write
   to Flash via TFTP".
 * Configure the IP of local host server.
 * Upload firmware by tftpd64, it will boot when write instruction
   is executed.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
[fix DTS line endings, fix label MAC address, adjust status LED
 names, convert mtd-mac-address-increment to mac-address-increment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-25 01:41:35 +02:00
Chukun Pan fcc075e12f ipq806x: Askey RT4230W REV6: fix caldata script
The partition name in the device dts is '0:ART'.
Be independent to prevent this part from becoming
incorrect once the kernel v5.4 gone.

Fixes: da8428d277 ("ipq806x: add support for Askey RT4230W REV6")

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2021-08-24 20:26:00 +02:00
Shiji Yang 80e70be0ab ramips: add new flash layout support to Phicomm K2
Descriptions:
Phicomm K2 (PSG1218) got a new "permanent_config" partition after
update firmware to v22.5. This partition located in front of the
firmware partition, same as The Phicomm K2P and K2G. Due to this
change the new bootloader can't load previous firmware any more.
This commit is aimed at add support for Phicomm K2 which official
firmware version is 22.5.x or newer. For which runs old firmware
version, just update OpenWrt that has a prefix of "k2-v22.4".
For uniform naming, this commit also changed the model name
PSG1218 to a more recognizable name K2, refer to Phicomm K2G,
K2P K2T.

OpenWrt selection table:
official firmware version           OpenWrt
v22.4.x.x or older              phicomm_k2-v22.4
v22.5.x.x or newer              phicomm_k2-v22.5

Installation:
Same as Phicomm K2G, K2P, PSG1208.
a. TFTP + U-Boot
b. Open telnet by some web page vulnerability (Search Baidu by key
   words "K2 telnet"), and then we can upload firmware image to
   /tmp and write it to firmware partition with mtd instruction.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
[rebase, add/harmonize version in model variables, fix version typo
 in commit message, wrap commit message properly]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-24 20:26:00 +02:00
Adrian Schmutzler c4143505e0 ramips: mt7620: move Phicomm MAC address setup to DTSI
The setup is the same for all devices, so move it up one level.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-08-24 20:26:00 +02:00
Zoltan HERPAI 98eb95dd00 ath79: add support for Atheros DB120 reference board
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>
2021-08-22 23:02:08 +02:00
Russell Senior 61b49cd3f8 ath79: add support for Ubiquiti PowerBeam M2 (XW)
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>
2021-08-22 22:41:52 +02:00
Russell Senior 96db7d2a73 ath79: rename Ubiquiti PowerBeam M (XW) to PowerBeam M5 (XW)
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] 12eb5b2384 ("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>
2021-08-22 22:41:41 +02:00