The Nezha board has a PCF8574 that acts as an I/O expander on the
i2c2 bus. Enable the required module for it.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
There is no practical value in keeping GCC11 around, as even OpenWrt 23.05
uses GCC12 as the default one, so drop it.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Instead of including the out-of-tree XR USB serial driver, use the
newly packaged in-tree driver for it.
Link: https://github.com/openwrt/openwrt/pull/18926
Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, MaxLinear/Exar USB serial devices are supported via out-of-tree
usb-serial-xr_usb_serial_common driver which is broken on 6.12.
So since upstream has support for these devices since 6.5 lets package
the in-tree driver to be able to drop the out-of-tree one.
Link: https://github.com/openwrt/openwrt/pull/18926
Signed-off-by: Robert Marko <robimarko@gmail.com>
Adapt patches adding NVMEM or fitblk rootdisk references to MMC
partitions for the changed MMC card binding.
Note that boards in 'dts' folder can only be converted once Linux 6.6,
which still depends on the old binding, has been dropped.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add patch to allow referencing MSDOS/MBR partitions in device tree to
allow legacy MT7623 boards to continue working with fitblk.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Replace downstream files by patches, either backports of those
which have already applied or pending patches tracked on patchwork.
This is done to make future maintainance more easy.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Drop patches which have been moved into target/linux/generic by commit
f4144d61d2 ("generic: 6.12: backport MediaTek Ethernet PHY changes").
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.
For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* the variant with 2.5G PHY instead of LAN SFP is called '2p5'
upstream and 'poe' in our downstream Linux 6.6 DT. Use the right
DTS depending on the kernel version and set an additional
compatible.
* drop additional DT overlay for WiFi.
The final version of the board uses a physical switch for the 12V
power of the WiFi module and the I2C EEPROM of the module always
comes empty (instead of with a MAC address).
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
In preparation of using the upstream mt7988a.dtsi when switching
to Linux 6.12 prepare by bringing our downstream version closer to
what went upstream.
* rename 'xphy' -> 'xsphy'
* rename 'uart[012]' -> 'serial[012]'
* only list pinctrl settings directly used in mt7988a.dtsi there,
leave it to boards to define all additional pinctrl settings
they need.
* move fan and thermal-zone to board level
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Upstream uses a different filename, so lets rename our downstream
mt7981.dtsi to mt7981b.dtsi and update the device tree of all
MT7981 boards accordingly.
This is to prepare for the switch to Linux 6.12 which is going to
use the upstream mt7981b.dtsi (plus some patches on top).
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The MediaTek Ethernet PHY drivers are going to be used by multiple
targets (airoha, mediatek, ramips). Add generic backports of changes
required for recently added Ethernet PHYs.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
While it will hopefully be replaced soon by an upstream solution for
now we keep the downstream SerDes PCS implementation for MT7988A.
In order to make it work with upstream mt7988a.dtsi we have to
compensate for the changed start address of topmisc which was
moved from 0x11d10000 to 0x11d10084 to accomodate a future power
domain controller located at 0x11d10000~0x11d10080.
Hence we need to change TOP_MISC_NETSYS_PCS_MUX from 0x84 to 0x0, so
the Ethernet path/mux selection can work with upstream mt7988a.dtsi.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Upstream now uses struct ethtool_keee instead of struct ethtool_eee
as parameter to EEE-related functions. Follow that change and modify
the patch accordingly.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Commit fa0f130764 ("generic: 6.12: update block NVMEM driver") switched
to the upstream DT bindings for block partitions.
Bring back the old/legacy downstream way to assign the OF node to a
block device or partition in order to allow sharing a single DTS for
both, Linux 6.6 (which exclusively uses the old/legacy binding) and
Linux 6.12 (which will now support both, new/upstream binding and the
old/legacy binding).
Once we drop Linux 6.6 and all boards have been converted to the new
binding we can drop this patch.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
There are still a lot of mdio functions scattered around the code.
Move the RTL838x serdes helpers closer to the bus, add the proper
prefix and simplify the functions.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18847
Signed-off-by: Robert Marko <robimarko@gmail.com>
There is a patch/bug cascade in the realtek target phy code that must be resolved.
1. The phy_driver structure is patched to add features ONLY needed for RTL8214FC
2. The kernel is patched to allow switching fiber/copper port of phys through ethtool
by calling these new features.
3. With those patches applied the bootup always switches RTL8214FC ports to copper.
Even if a SFP module was found before and the phy driver switched to fibre before.
3. So another patch is needed that reprobes the SFP module to activate fiber again.
4. Because of the reprobing we need a fourth patch that avoid duplicate devices.
Simplify this by removing all patches and reusing the existing ethtool phy tunable
interface. The command line usage might be counterintuitive but it avoids tons of
problems in the code. In addition, this scenario is not used frequently.
Before:ethtool -s lan25 port fibre/tp
After: ethtool --set-phy-tunable lan25 downshift on/off
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18816
Signed-off-by: Robert Marko <robimarko@gmail.com>
We have modified the kernel to setup all "default" consoles,
including serial ports and framebuffers/screens, providing
no console= argument is supplied on the kernel command line.
Adding 'console=tty1' caused the 'default' serial port on
device tree systems to break, as the kernel would not carry
over the settings (like baud rate) from the bootloader.
The system administrator can still force the use of a
specific console by adding their own console= arguments.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Fixes: c099523d66 ("armsr: use console=tty1 to make
console more readily available")
Link: https://github.com/openwrt/openwrt/pull/17012
Signed-off-by: Robert Marko <robimarko@gmail.com>
A previous change added 'console=tty1' to the default kernel command
line on armsr, in order to ensure the framebuffer console is enabled
on systems capable of graphics output.
Unfortunately, this change broke boards that used device tree
(DT) firmware with serial consoles, as the serial console
specified by the system firmware (stdout-path) was no longer
setup by the kernel.
A bit of probing determined that the SPCR (serial port console
direction table) on ACPI systems was preventing Linux from setting
up a default framebuffer console on these systems (which is why
console=tty1 was added).
(The affected ACPI systems are usually VMs using QEMU's
'virt' machine and EDK2 firmware. The firmware on these systems
does not remove the SPCR when a screen is present)
So to ensure all possible systems are setup correctly, we modify
the kernel so all "default" console types (serial and screen)
are setup when no console= arguments are specified on the kernel
command line.
Signed-off-by: Mathew McBride <matt@traverse.com.au>
Fixes: c099523d66 ("use console=tty1 to make console more
readily available")
Link: https://github.com/openwrt/openwrt/pull/17012
Signed-off-by: Robert Marko <robimarko@gmail.com>
Refresh patches to fix the GitHub CI warning.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18912
Signed-off-by: Nick Hainke <vincent@systemli.org>
SOC: MediaTek MT7981b
RAM: 256MB DDR3
FLASH: 128MB SPI-NAND (Winbond W25N01GV)
WIFI: Mediatek MT7981b DBDC 802.11ax 2.4/5 GHz
ETH: MediaTek MT7531 Switch
UART: 3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)
Interface MAC Algorithm
LAN 8C:AE:DB:2C:xx:xx label
WAN 8C:AE:DB:2C:xx:xx label +1
WLAN 2.4G 8C:AE:DB:2C:xx:xx label +2
WLAN 5G 8C:AE:DB:2C:xx:xx label +3
Installation
-------------------Install openwrt image-------------------------------:
Set a static ip on the ethernet interface of your PC. (ip address:
192.168.1.254, subnet mask:255.255.255.0) .
Download the OpenWrt uboot image
(openwrt-mediatek-filogic-snr_cpe-ax2-bl31-uboot.fip).
SSH/SCP opened by default on the stock firmware (3.0.1).
Username: Admin, default password: Admin. Check it on the bottom of
the router.
Copy uboot image using SCP (WinSCP) to /tmp dir on SNR-CPE-AX2.
Download recovery file.
openwrt-mediatek-filogic-snr_snr-cpe-ax2-initramfs-recovery.itb.
Copy the recovery image to a TFTP server reachable at 192.168.1.254/24.
Open ssh shell to the SNR-CPE-AX2.
Run commands:
mtd write \
/tmp/openwrt-mediatek-filogic-snr_snr-cpe-ax2-bl31-uboot.fip FIP
reboot
Wait until recovery boot.
Open web 192.168.1.1 and do sysupgrade by
openwrt-mediatek-filogic-snr_cpe-ax2-squashfs-sysupgrade.itb
Signed-off-by: Nikolay March <palladin82@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/18700
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Sort the config in alphabetical order
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18897
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Upstream seems to be using led-sources instead of custom properties.
Code mostly taken from mt76.
Changed all(few) users of qca,led_pin to use the new format.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18805
Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently adb uses libopenssl for certain authentication tasks between
the host and the target device such as certificate generation, hashing,
base64 encoding and pki signatures.
Add a patch to use functionalities available in mbedtls instead.
Also switch package makefile and dependency to libmbedtls and drop
patches and references to lib{crypto,openssl} as they are no longer
required.
This conserves considerable amount of space on the device as openwrt
ships with libmbedtls by default.
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18819
Signed-off-by: Robert Marko <robimarko@gmail.com>
The MIPS CPC (Cluster Power Controller) is setup during boot and can take
its configuration from the devicetree. This is currently not possible
because the cpc probing happens before dt initialization. Call order
during startup is:
setup_arch()
prom_init() <- our function
mips_cpc_probe()
smp_stuff()
arch_mem_init()
device_tree_init() <- our function
unflatten_and_copy_device_tree()
To avoid ugly hacking and support a clean devicetree relocate the cps/smp
stuff to device_tree_init(). This is basically the same location as in
generic mips initialization.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Link: https://github.com/openwrt/openwrt/pull/18888
Signed-off-by: Robert Marko <robimarko@gmail.com>
Make it easier to upgrade the kernel in the future. For this remove
the 320-harden-fw_init_cmdline.patch and add the logic into the
startup sequence at the right place.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18853
Signed-off-by: Robert Marko <robimarko@gmail.com>
Remove upstreamed patches:
- 020-MIPS-Include-missing-mips16.S-in-libgcc-lib1funcs.S.patch
- 021-Reuse-scratch-registers-generated-by-LRA.patch
All other patches are automatically refreshed.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18891
Signed-off-by: Robert Marko <robimarko@gmail.com>
The 6.12 testing kernel for ath79 target is ready now.
Tested on AR9344 (ath79/nand) and QCA9531 (ath79/generic).
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
All kernel symbols are automatically refreshed by
`make kernel_oldconfig CONFIG_TARGET=target` and
`make kernel_oldconfig CONFIG_TARGET=subtarget`.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>