Bring it in line with all the other targets.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16099
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The DGS-1210-28MP has a LM63 fan controller connected via i2c of the
RTL8231. The clock line is always low if the property
i2c-gpio,scl-open-drain is not set; with this property, the GPIO pin is
force-drive and the clock works as expected.
The LM63 is not configured by U-Boot, thus only manual fan control is
possible by settings pwm1_enable to "1" and writing the desired values to
pwm1.
The OEM firmware drives the fan from user mode and sets it up like this:
// PWM LUT/value r/w, PWM Clock = 1.4kHz
0x4a 0x28
// Tachometer spinup disabled, spin-up cycles bypassed
0x4b 0x00
// PWM Frequency = default
0x4d 0x17
// PWM Value (28)
0x4c 0x1c
// If > 0 C, use
0x50 0x00
// PWM = 28
0x51 0x1c
// If > 51 C, use
0x52 0x33
// PWM = 44
0x53 0x2e
// Set hysteresis to 100 = default
0x4f 0x03
// Turn on automatic mode and w/p the LUT values
0x4a 0x08
A thread in the OEM firmware polls the ALERT status register for fan
failures.
Unfortunately, the lm63 kernel driver does not perform any initialization
of the chip and it does not support changing some config registers (like
PWM frequency or LUT). Hence, we are stuck with the defaults and need to do
fan control in software.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/15616
Signed-off-by: Sander Vanheule <sander@svanheule.net>
The DGS-1210-28 series was lacking full SFP support due to missing GPIOs.
Fortunately, the existing GPIO definitions of DGS-1210-52 match, this adds
the required i2c-gpio nodes to the DTS and allows hotplug SFP support.
Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: https://github.com/openwrt/openwrt/pull/15616
Signed-off-by: Sander Vanheule <sander@svanheule.net>
The one for the mx60 was wrong. The LAN MAC is offset by one.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14037
Signed-off-by: Robert Marko <robimarko@gmail.com>
The qca8k driver is upstream, unlike swconfig. This applies to the mx60
and wndr4700 only. Fixed up LED definitions as well.
RTL83xx DSA for WNDAP62300/660 is not working.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14037
Signed-off-by: Robert Marko <robimarko@gmail.com>
The CPU port of realtek switches needs some proper PVID set to handle
untagged packets. Because the ethernet driver does no special VLAN
handling (see CPU tag RVID/RVID_SEL) as of now we can only steer
untagged packets by setting PVID for the CPU port. VLAN handling has
never been perfect but 3 events made things worse.
- Commit a376508216 ("rtl83xx: dsa: Do nothing when vid 0")
- Commit e691e2b302 ("rtl83xx: dsa: reset PVID to 1 instead of 0")
- Upgrade to kernel 6.6
Reasons are:
- Rejecting VID 0 disabled Linux initialization routines
- Initialization for PVID forgot to set priv->ports[port].pvid
- Kernel 6.6 does no longer clarify CPU port as untagged
To fix this prepare the VID 0 setup inside the driver. Join all ports
to VID 0 and let no one from outsinde interfere with this setup.
Especially ignore PVID settings for the CPU port for all further
VLAN commands.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Suggested-by: Bjørn Mork <bjorn@mork.no>
Since kernel commit c5714f68a76bcad3d ("net: phylink: explicitly invalidate
link_state members in mac_config") it should be clear that link data can
only be used in mac_link_up(). Refactor that for the RTL83xx targets.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Some devices (e.g. HP JG924A) hand over other than expected kernel boot
arguments. Looking at these one can see:
fw_init_cmdline: fw_arg0=00020000
fw_init_cmdline: fw_arg1=00060000
fw_init_cmdline: fw_arg2=fffdffff
fw_init_cmdline: fw_arg3=0000416c
Especially fw_arg2 should be the pointer to the environment and it looks
very suspicous. It is not aligned and the address is outside KSEG0 and
KSEG1. Booting the device will result in a hang. Do better at verifying
the address.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Suggested-by: Bjørn Mork <bjorn@mork.no>
The supported_interfaces bitmap cannot be empty since mainline kernel
commit de5c9bf40c45 ("net: phylink: require supported_interfaces to
be filled"). Fix the dsa and ethernet driver accordingly.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
The DSA framework has changed a bit since 6.1, lets adapt to match.
Currently there is no one-patch-fits-all solution to directly fix
all errors up to 6.6. So cover the final differences with this
second patch.
Most notable upstream changes are:
- a88dd7538461 ("net: dsa: remove legacy_pre_march2020 detection")
- 53d04b981110 ("net: dsa: remove phylink_validate() method")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[Minor checkpatch.pl cleanups]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
The DSA framework has changed a bit since 5.15, lets adapt to match.
Currently there is no one-patch-fits-all solution to directly fix
all errors up to 6.6. So at least take all the already known changes
that cover differences between 5.15 and 6.1
Most notable upstream changes are:
- d3eed0e57d5d ("net: dsa: keep the bridge_dev and bridge_num as part
of the same structure")
Update of port_bridge_{join,leave}: use same helper as upstream
- c26933639b54 ("net: dsa: request drivers to perform FDB isolation")
Update of port_fdb_{add,del}, port_mdb_{add,del}
- dedd6a009f41 ("net: dsa: create a dsa_lag structure")
Update of port_lag_{join,leave}
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
[align updates with upstream, add references to upstream commits]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
No content changes. Only take over the new patch locations. All errors
that wil arise from compiling with the phy driver will be covered by
follow up patches.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
No content changes. Only adapt the failing hooks and take over the
new patch locations. All errors that wil arise from compiling with
the dsa driver will be covered by follow up patches.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
A lot of stuff has been converted to the phylink_pcs_ops structure.
Adapt the ethernet driver to make use of it.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
We no longer are required to pass the weight to netif_napi_add.
See commit b48b89f9c189 ("net: drop the weight argument from netif_napi_add").
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This is not a surprise. Before upgrade to 6.6 we refactored the mdio part of
the ethernet driver and knew that changes will come. Drop all unnecessary
stuff from the old world and adapt to the new kernel.
- remove legacy functions
- directly link new functions
- adapt to new shared base address
- remove references to old MDIO bus capabilities
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
No content changes. Only take over the new patch locations. All errors
that will arise from compiling with the ethernet driver will be covered
by follow up patches.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
With the new kernel the MDIO bus gets created after the smbus
read/write functions are used. Make use of native functions.
Relocate bus initialization into a separate function to make
patch easier to read.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Take over the new patch locations and add references to the link mode into
phylink_sfp_interface_preference[] and phylink_get_capabilities().
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
No content changes. As the order of the 7xx patch files seems very
strange reorder all of them according to the realtek 6.6 kernel upgrade
effort.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
No content changes. Only take over the new patch locations.
With this patch all platform specific changes for kernel 6.6 are in place.
Realtek devices are bootable from serial console. VPE is fully functional
on devices that support it. The switch functions (ethernet and DSA) are
not enabled yet.
Boot tested on RTL8380 (Linksys LGS310C) and RTL8393 (Zyxel GS1920-24).
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
VPE in mainline kernel has changed a lot. This patch wraps up the 5.15
patch files and rebases them in one single patch on top of kernel 6.6.
Former patches are
315-irqchip-irq-realtek-rtl-add-VPE-support.patch
319-irqchip-irq-realtek-rtl-fix-VPE-affinity.patch
Submitted-by: Birger Koblitz <git@birger-koblitz.de>
Submitted-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Copy the patch files to 6.6. Both target drivers/irqchip/irq-realtek-rtl.c
and are additions and fixes for IRQ VPE handling.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Copy the patch file to 6.6. No further processing required as
it applies cleanly to the new kernel
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
No content changes. Due to kernel changes the patch hooks totally failed
and had to be fixed manually.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
The CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US is missing. Avoid
complaints and add it with its default 125.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Copy files and config from 5.15 kernel version. Because of the big version jump
leave out the patches for now so we can treat them individually later on.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
With commit b53202a8c3 ("realtek: switch to use generic MDIO accessor functions")
the phy access logic was enhanced. A quite big kernel patch was introduced that
allowed to make use of hardware-assisted page access like we have in the realtek
target. Basically it works the following way
- The enhanced bus intercepts page write accesses
- Currently selected pages are stored in internal vars.
- Finally only all-in-one-consistent bus/register accesses are issued
- It intercepted page changes and ensured that only a complete bus call
For the details see https://github.com/openwrt/openwrt/pull/16172
Switching over to newer kernels this patch is really hard to maintain. Its heavy
modifcations exist only in the realtek target. So it does not matter if we keep
it as an kernel modification or directly include it in our driver. To make it the
future brighter we drop this patch and take over its logic. Thus the kernel will
stay totally modification-free. What do we do?
1. Up to now the bus->priv structure directly pointed to ethernet->priv. Create an
explicit private structure rtl838x_bus_priv that not only holds the ethernet->priv
pointer but also space for some bus status tracking vars as well.
2. Wherever we use a reference to ethernet->priv directly replace that by an
additional indirection over the new rtl838x_bus_priv structure.
3. Up to now the phy flag PHY_HAS_REALTEK_PAGES identified that we can use the
alternative paged access from the patch. As this will be no longer available
remove it and provide read_page/write_page functions for each possible PHY.
These functions will be pretty standard as for other Realtek PHYs.
4. The existing mdio bus read/write function rely on the classic MII_ADDR_C45
flag - one interface for two access types. This mixup will be removed on the way
to kernel 6.6. In the future there will be two pairs of access functions. One for
classic access one for c45 style access. Rewrite our functions into 3 parts:
- a classic read/write function: ready for kernel 6.6
- a new c45 read/write function: ready for kernel 6.6
- a legacy read/write wrapper: for current 5.15 for the time being
When we switch to 6.6 we only need to remove the legacy wrappers and link the
new functions. Life can be so easy.
5. The classic read/write functions will incorporate the interception logic that
was originally in the patch.
6. The package convenience functions that were embedded in the patch get lost as
well. Rewrite them inside our phy driver.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[Minor checkpatch.pl cleanups]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
There is no need to keep a version specific dts directory.
Rename the folder to its standard location.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Apply changes suggested by SkyLake Huang for pending series improving
MediaTek Ethernet PHY drivers.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Aruba boards now ship with multiple DTS and image-configurations per
image. Newer apboot revs expect a configuration for their hardware to be
present.
Signed-off-by: David Bauer <mail@david-bauer.net>
Add missing 'model' string to DT, so /tmp/sysinfo/model gets populated.
Fixes: e497c975d3 ("ramips: mt76x8: add support for Yuncore M300")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Add missing 'model' string to DT, so /tmp/sysinfo/model gets populated.
Fixes: 64dae1052b ("ramips: mt76x8: add support for Yuncore CPE200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
And remove support for 6.1 while at it.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15838
Signed-off-by: Robert Marko <robimarko@gmail.com>
A rather trivial addition. Patches automatically rebased. Also add the new
CONFIG_USB_DWC3_OCTEON (disabled) to the generic 6.6 config and sort it, while
at it.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15838
Signed-off-by: Robert Marko <robimarko@gmail.com>
Drop config and files for Linux 6.1.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16103
Signed-off-by: Robert Marko <robimarko@gmail.com>
Drop config and files for Linux 5.15.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16103
Signed-off-by: Robert Marko <robimarko@gmail.com>
Switch to Linux kernel version 6.6.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16103
Signed-off-by: Robert Marko <robimarko@gmail.com>
This enables the M.2 E-key on ROCK 5A board.
Reorder rk356x patch while at it.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/16340
Signed-off-by: Robert Marko <robimarko@gmail.com>
Specifications:
* SoC: Qualcomm IPQ8072A (64-bit Quad-core Arm Cortex-A53 @ 2200MHz)
* Memory: 2x ESMT M15T4G16256A-DEBG2G (1 GiB DDR3-1866 13-13-13)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: QCN5054 (4x4 5 GHz 802.11ax)
* Wi-Fi: QCN5024 (4x4 2.4 GHz 802.11b/g/n/ax)
* Ethernet: QCA8081 (10/100/1000/2.5GBASE-T)
* Flash: Winbond W29N01HZSINF (128 MiB)
* LEDs: 1x Blue Status (GPIO 42 Active High)
* Buttons: 1x Reset (GPIO 50 Active Low)
Installation Instructions (Serial+TFTP):
1. Solder 4 pin header to JP1 and bridge pads of R58 and R62.
2. Connect 3V3 TTL port to TX, RX, and GND, which are positions 1, 2,
and 3 respectively. Be sure to crossover TX and RX.
3. Copy RAM firmware image
openwrt-qualcommax-ipq807x-tplink_eap660hd-v1-initramfs-uImage.itb
to TFTP server root, available at 192.168.10.1.
4. Connect PoE ethernet cable to the RJ45 port and hold Ctrl+B in the
serial console (115200 baud) until autoboot is halted.
5. Run the following commands in the U-boot prompt:
# tftpboot 0x44000000 openwrt-qualcommax-ipq807x-tplink_eap660hd-v1-initramfs-uImage.itb
# bootm
You may need to type Ctrl+C and Enter before running these commands
to clear invisible characters from the buffer.
6. Run the following command in a terminal to copy the sysupgrade image
to be installed (check IP address):
$ scp openwrt-qualcommax-ipq807x-tplink_eap660hd-v1-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/
7. Activate the OpenWrt serial console and run the following commands:
# cd /tmp
# sysupgrade -n openwrt-qualcommax-ipq807x-tplink_eap660hd-v1-squashfs-sysupgrade.bin
8. The AP will reboot and OpenWrt will be successfully installed.
Signed-off-by: George Witt <george.witt@nltsproject.org>
Link: https://github.com/openwrt/openwrt/pull/15832
Signed-off-by: Robert Marko <robimarko@gmail.com>
This alias was present in 6.1. Add back to restore a fully working console after
sbi0 (earlycon) gets disabled during the boot process.
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Various cleanups and bugfixes were applied.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16215
Signed-off-by: Robert Marko <robimarko@gmail.com>
No reason for them not to be so. Matches various upstream commits for
PPC.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16345
Signed-off-by: Robert Marko <robimarko@gmail.com>
With upstream commit 0aafbdf35c75cbfec82636d01e6dc7950bc1507c , this is
now default. No need to override.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16345
Signed-off-by: Robert Marko <robimarko@gmail.com>
Upstream commit does this for simple cases, which all of these are.
Commit: 1c96fcdef8c7492ecf34ed70102a1ae5253ef9d1
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16345
Signed-off-by: Robert Marko <robimarko@gmail.com>
configure 2.5G PHY LEDs to:
2500/1000: green with blink on TX/RX
100/10: green+yellow with blink on TX/RX
which is similar to other 1G PHY LEDs, which are:
1000: green with blink on TX/RX
100/10: green+yellow with blink on TX/RX
Fixes: 6cc14bf66a ("filogic: support Telenor branded ZyXEL EX5700")
Signed-off-by: Yan Cangang <nalanzeyu@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16082
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>