Move Build/buffalo-trx to image-commands.mk from image/mt7622.mk to use
that definition from ramips as well.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
This pull request ports Ruijie RG-X60 Pro router support to the main branch.
Parameters:
- SoC : MediaTek MT7986A Quad-core ARM Cortex-A53 2.0GHz
- RAM : DDR3 512MiB (W634GU6QB)
- Flash : SPI-NAND 128 MiB (W25N01GVZEIG)
- WLAN : MediaTek MT7986A integration dual-band WiFi 6
- 2.4 GHz : b/g/n/ax, MIMO 4x4
- 5 GHz : a/n/ac/ax, MIMO 4x4
- Ethernet : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
2500Mbps x 1 (Realtek RTL8221B-VB-CG)
- UART : through-hole on PCB
- [J500] GND, TX, RX, 3.3V (115200n1)
- Buttons : Mesh, Reset
- LEDs : 1x Power (Blue)
1x Turbo (Purple)
- Power : 12 VDC, 3 A
How to Installation:
1. Remove the case and connect the TTL cable to the corresponding position.
2. Power on the device and quickly press "down" on the keyboard, then
U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Openwrt image file name to be
flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.
How return to stock:
1. Remove the case and connect the TTL cable to the corresponding
position.
2. Power on the device and quickly press "down" on the keyboard, then
U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Stock “E-WEBOS” image file name to
be flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.
About recovery:
Connect uart, use u-boot menu to flash stock firmware image or boot
OpenWrt initramfs image.
About MAC Address:
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| WAN | 10:82:3D:XX:XX:9E | label |
| LAN | 10:82:3D:XX:XX:9F | label+1 |
| WLAN 2g | 10:82:3D:XX:XX:A0 | label+2 |
| WLAN 5g | 10:82:3D:XX:XX:A1 | label+3 |
+---------+-------------------+-----------+
Signed-off-by: Ashley Lee <code@emtips.net>
In preparation to update to upcoming Linux 6.6.33 move accepted patches
from mediatek target to backport folder, so moving to newer Linux 6.6
releases becomes easier and also other patches on top can be applied
more easily.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add missing ';;' to the end of shell switch case statement.
Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
Reported-by: @gl-dude
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random
mac addresses on boot and set the 'local-mac-address' property which
prevents Openwrt from assigning the correct address from evmem.
This patch removes the alias for ethernet0 so that U-Boot doesn't add the
property, removes the workaround from 02_network, and adds back the nvmem
definition for the M3000.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Common specifications:
* Mediatek MT7988A (4x Cortex-A73, up to 1.8 GHz clock speed)
* 8 GiB eMMC
* 2 GiB DDR4 RAM
* 1x 10000M/1000M/100M + 3x 1000M/100M/10M LAN ports
* MT7996 Tri-band (2.4G, 5G, 6G) 4T4R 802.11be Wi-Fi
* Airoha AG3352 GPS
* Renesas DA14531MOD Bluetooth
* 2 buttons (Reset, Mesh/WPS)
* uC-controlled RGB LED via I2C
* 2x LED for each 1G port, 3x LED for each 10G port
* USB 3.0 type A port
* 3.3V-level 115200 baud UART console via 4-pin Dupont connector
exposed at the bottom of the device
* USB-C PD power input
SDG-8733: 1x 10000M/1000M/100M WAN port
SDG-8734: 1x USXGMII/10GBase-R/5GBase-R/2500Base-X/1000Base-X/SGMII SFP+
Both models are also available in versions including 2x FXS POTS interfaces
for analog phones. Those interfaces are not supported by OpenWrt.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add missing call to emmc_copy_config which either writes the sysupgrade
tar.gz backup file or clears the existing rootfs_data overlay.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
mt7915e driver supports MT7915 & MT7916 devices and MT7981 & MT7986
on-SoC wireless controllers. Devices based on MT7988 and possibly other
next chipsets are quite unlikely to need it (MT7988 was designed to be
used with MT7996).
Move kmod-mt7915e to DEVICE_PACKAGES of relevant devices.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
filogic: Add support for D-Link AQUILA PRO AI M30
Specification:
- MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
- 1GB RAM
- 16MB NOR
- 128MB NAND
- 3 LEDs (red, green, blue, white)
- 2 buttons (reset, user defined)
- 1 2.5Gbit WAN port (Airoha EN8811h)
- 1 1Gbit LAN ports
- 1 single lane M.2 SSD slot
- 1 mikroBus socket
- externel HW WDT (25s refresh time)
- i2c RTC (with battery backup)
Serial Interface
- UBS-C CDC-ACM
- 3 Pins GND, RX, TX
- Settings: 115200, 8N1
MAC addresses are not populated on the early samples.
Signed-off-by: John Crispin <john@phrozen.org>
Add ubi volumes for mt7988a-rfb and support for using factory data
for Ethernet MAC addresses and MT7996 WLAN calibration data.
Also add rootdisk handle. Removes the need to keep using nmbm
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Hardware:
SoC: MT7981b
RAM: 256 MB
Flash: 128 MB SPI NAND
Ethernet:
1x 2.5Gbps (rtl8221b)
1x 1Gbps (integrated phy)
WiFi: 2x2 MT7981
Buttons: Reset, WPS
LED: 1x multicolor
Solder on UART:
- remove rubber ring on the bottom
- remove screws
- pull up the cylinder, maybe help by push on an ethernet socket with a screwdriver
- remove the (3) screws holding the board in the frame
- remove the board from the frame to get to the screws for the silver, flat heat shield
- remove the (3) screws holding the heat shield
- solder UART pins to the back of the board
- make sure to have the pins point out on side with the black, finned heat spread
- the markings for the pins are going to be below the silver heat shield
- Vcc is not needed
If you don't intend on using the UART outside of the installation process, you might not
want to solder:
- carefully scrape off the thin layer of epoxy on the holes (not the copper)
- place your pin header with the UART attached in the holes
- the pins, starting with the one closest to the socket:
- Vcc (not required)
- GND
- RX
- TX
- either wedge the header or hold it with your fingers so that the pins stay in contact with the board
Installation (UART):
- attach an Ethernet cable to the 1Gbps port (black) on the router
- hold the reset button while powering the router
- press CTRL-C or wait for the timeout to get to the U-Boot prompt
- prepare a TFTP server on the network to supply ..-initramfs-kernel.bin
- use 'tftpboot' in the U-Boot shell to pull the image
- boot the image using 'bootm'
- push the ..-sysupgrade to the router using your preferred method
- perform the upgrade with 'sysupgrade -n'
There is a recovery mechanism that involves fetching a file called 'recovery.bin' but that is not understood yet.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
Add additional PWM fan cooling step and enable fan on BPi-R4.
Suggested-by: Frank Wunderlich <frank-w@public-files.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Hardware:
- SoC: MediaTek MT7981B
- CPU: 2x 1.3 GHz Cortex-A53
- Flash: 128 MiB SPI NAND
- RAM: 512 MiB
- WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
- Ethernet: 1x 10/100/1000/2500 Mbps RTL8221B WAN, 1x10/100/1000 Mbps MT7981 LAN
- USB 3.0 port
- Buttons: 1 Reset button, 1 slider button
- LEDs: 1x Red, 1x White
- Serial console: internal test points, 115200 8n1
- Power: 5 VDC, 3 A
MAC addresses:
+---------+-------------------+-----------+
| | MAC | Algorithm |
+---------+-------------------+-----------+
| WAN | 80:af:ca:xx:xx:x1 | label+1 |
| LAN | 80:af:ca:xx:xx:x0 | label |
| WLAN 2g | 80:af:ca:xx:xx:x0 | label |
| WLAN 5g | 82:af:ca:xx:xx:x0 | |
+---------+-------------------+-----------+
Installation:
The installation must be done via TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware to make installation easier, and so I recommend checking the Wiki for this device if there is a more convenient solution than the one below.
To install using TFTP:
1. Connect to UART.
2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
3. A u-boot shell will automatically open.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an OpenWrt initramfs-kernel.bin firmware file.
5. Run these steps in u-boot using the name of your file.
setenv bootfile initramfs-kernel.bin
tftpboot
bootm
6. If you can reach LuCI or SSH now, just use the sysupgrade image with the 'Keep settings' option turned off.
Signed-off-by: Luis Mita <luis@luismita.com>
Continuation of commit 8b66f1a. Set the switch address on the MDIO bus to 31.
This is required for all boards currently working with the mt7530 DSA driver.
Fixes: #15419
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
The way to register the switch MDIO bus and PHYs on the bus in upstream
Linux is more strict and requires each PHY to explicitely state the
interrupt instead of assuming it in case the 'interrupts' property in DT
is missing.
Add missing interrupts for the PHYs of the build-in 4x1GE switch of the
MT7988 SoC.
Fixes: 4354b34f6f ("generic: 6.6: sync mt7530 DSA driver with upstream")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
To fix issue #15304
Correct br-lan ports 1-4 so that phy-handle matches reg nr not port label.
Fixes: eb13076e77 ("mediatek: fix DTS defining mt7530 switch phys but not referencing them")
Signed-off-by: Magnus Lindström <magnus1089@hotmail.com>
There was a typo in commit 5709254690 ("mediatek: bpi-r4: store random
MAC addresses for the BPi-R4"). Let's fix it and also add support for
the bpi-r4-poe variant.
Fixes: 5709254690 ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
In commit cd4de3251c ("mediatek: wait for fitblk rootfs"), the linux
6.6 files and patches has been forgotton to be fixed.
Fixes: cd4de3251c ("mediatek: wait for fitblk rootfs")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
In commit cd4de3251c ("mediatek: wait for fitblk rootfs"), the linux
6.6 files and patches has been forgotton to be fixed.
Fixes: cd4de3251c ("mediatek: wait for fitblk rootfs")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Adding the aliases also for Linux 6.6 was forgotten and is required for
U-Boot to hand down persistent MAC addresses to Linux.
Fixes: 5709254690 ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
makes use of "syscon_regmap_lookup_by_phandle" which requires that
"syscon" be in the compatible list.
Without this patch, PCIe probe will fail with the following error:
[ 1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[ 1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
[ 1.299901] mtk-pcie 1a143000.pcie: MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[ 1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
[ 1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22
Fixes: 4c6e9a9943 ("kernel: bump 6.6 to 6.6.30")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
This adds support for the bpi-r4 variant with internal 2.5G PHY and
additional ethernet port instead of second sfp.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Move the common parts of the mt7988a-bananapi-bpi-r4.dts to a dtsi file.
This is done to prepare support for the 2.5G Ethernet Variant.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This reverts commit 3fe239fcf8.
Now that we switched to Linux 6.6 this is no longer needed, and resulted
in a left-over file because it's removal was not included in the commit
removing all the other files intended for Linux 6.1.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Remove unnecessary 'if' macros for previous kernel versions.
After removing kernel 6.1 the kernel is always >= 6.6 so the conditions
are unnecessary.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Despite coming with multiple I2C EEPROMs supposedly dedicated for that
purpose, the BPi-R4 does not seem to have factory assigned MAC addresses.
Hence, just like for all other BPi boards, store a randomly generated
MAC address on first boot and derive WAN and Wi-Fi MAC addresses from
that as well. Not perfect, but better than random on every boot.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The compatible string for the MediaTek MT7988 SoC ended up being
'mediatek,mt7988a' instead of 'mediatek,mt7988' in the now upstream
dtsi. Adapt the cpufreq driver so support for frequency scaling is
again usable.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
For all boards currently working with the mt7530 DSA driver we can
be sure that the address of the switch on the MDIO bus is 31 --
simply because that address is hard-coded in the driver and the
address from the Device Tree is being ignore.
An upcoming patch will add support for MT753x ICs which are programmed
to addresses different from 0x1f using bootstrap pins. As a result the
address from the Device Tree will then be taken into account, which
will break currently working boards which got the address set to
anything else than 31.
While at it also unify the syntax in Device Tree to always us a decimal
value for the 'reg' property.
* mt7622-buffalo-wsr-3200ax4s.dts
Cosmetic change 'reg = <0x1f>' -> 'reg = <31>'
* mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
Wrong address: 0 -> 31
* mt7622-elecom-wrc-x3200gst3.dts
Wrong address: 0 -> 31
* mt7622-linksys-e8450.dtsi
Wrong address: 0 -> 31
* mt7622-ruijie-rg-ew3200.dtsi
Wrong address: 0 -> 31
* mt7622-xiaomi-redmi-router-ax6s.dts
Wrong address: 0 -> 31
* mt7629-iptime-a6004mx.dts
Wrong address: 2 -> 31
* mt7981b-zbtlink-zbt-z8102ax.dts
Cosmetic change 'reg = <0x1f>' -> 'reg = <31>'
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Use 'mediatek,mt7988a' instead of 'mediatek,mt7988' as compatible
string to be in-sync with upstream and no longer break the cpufreq
driver which was also kept in sync with upstream.
Fixes: 56dd6b473b ("mediatek: sync cpufreq support with changed compatible string")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Backport patches for support of generic spi-nor from SFDP data for
kernel 6.1.
Kernel 5.15 have major rework of the info flags and it's not trustable
to backport this amount of changes and expect correct function of it.
All affected patches automatically refreshed using make
target/linux/refresh.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The upstream solution to define the MDIO bus in DT is a bit
more strict than our previous downstream solution doing the same thing
and now requires switch PHYs to be referenced in DT as well.
Arınç Ünal told us in #15141:
"With [the now upstream patch written by him which we backported], the
switch MDIO bus won't be assigned to ds->user_mii_bus when the switch
MDIO bus is defined on the device tree anymore. This was not the case
with the downstream patch.
When ds->user_mii_bus is populated, DSA will 1:1 map the port with
PHY. Meaning port with address 1 will be mapped to PHY with address 1.
Because that ds->user_mii_bus is not populated when the switch MDIO
bus is defined on the device tree, on every port node, the PHY address
must be supplied by the phy-handle property."
Add those phy-handles to affected devices' DT.
Fixes: 4354b34f6f ("generic: 6.6: sync mt7530 DSA driver with upstream")
Fixes: 401a6ccfaf ("generic: 6.1: sync mt7530 DSA driver with upstream")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>