This commit adds support for Hasivo S600WP-5GT-2SX-SE switch.
Device specification
--------------------
SoC Type: Realtek RTL9303
RAM: 128MB DDR3 SDRAM
Flash: Fudan FM25Q128A (16 MB)
Ethernet: 5x RTL8221B 10/100/1000/2500Mbps PHY (RJ45)
2x SFP+ 10G (I2C/DOM via bit-banged GPIO)
LEDs: 1x power green (no control)
1x system green (via RTL9303 GPIO)
3x RJ45 LEDs/port (HC595 shift regs on LED SPI)
1x Green (1G link)
1x Green (10M/100M link)
1x Orange (2.5G link)
2x SFP+ LEDs/port (HC595 shift regs on LED SPI)
1x 10G link
1x 1G link
Button: Reset
USB ports: None
Bootloader: Realtek U-Boot 2011.12
PoE: 1x HS104PTI for 802.3af/at/bt PoE (driver
will follow in a separate patch)
Installing OpenWrt
------------------
1. UART RJ45 requires soldering a connector to the empty footprint (RJ1).
(Amphenol RJHSEE380 or similar)
2. Connect to UART 38400@8n1, using Cisco Console Rollover cable (RS232)
3. Enter bootloader by pressing esc key during boot
4. Enter password `Hs2021cfgmg`
5. Type `XXXX` to get into U-Boot
6. Increase baudrate: `setenv baudrate 115200`
7. Use serial transfer (Y modem) via minicom:
`loady 0x84f00000`
Then send the initramfs image via minicom's Y modem upload.
8. `bootm 0x84f00000`
Now you should be in OpenWrt, and can use sysupgrade to install.
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/22310
Signed-off-by: Robert Marko <robimarko@gmail.com>
With the recent backport of the common PHY properties infrastructure
(phy-common-props and the phy_get_manual_{rx,tx}_polarity() helpers) to
OpenWrt, the generic `{rx,tx}-polarity` device tree properties are now
usable for the Realtek PCS driver. Switch the driver and all affected
boards from the local vendor-specific `realtek,pnswap-{rx,tx}` booleans
to the common properties.
Add a `config_polarity` SerDes op (implemented by RTL930x and RTL931x;
RTL838x/RTL839x polarity support not yet added) and a generic wrapper
that resolves the requested polarity via phy_get_manual_{rx,tx}_polarity()
and dispatches to the op. Variants without the op silently accept the
default polarity but warn when a non-default polarity is requested,
since that cannot be honored.
Move the polarity programming out of the variant setup_serdes callbacks
into rtpcs_pcs_config, so it runs before setup_serdes. This matches the
ordering used by the vendor SDK, which configures polarity first.
Update all board DTS files that previously used `realtek,pnswap-{rx,tx}`
to the new `{rx,tx}-polarity = <PHY_POL_INVERT>` property, and select
PHY_COMMON_PROPS from Kconfig.
Each SerDes now retains its DT node for later polarity lookup. Use
for_each_child_of_node_scoped for the iterator, and register a
devm_add_action_or_reset for each stored reference so it is released on
unbind or probe failure.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23044
Signed-off-by: Robert Marko <robimarko@gmail.com>
The hardware usually takes care that
- a packet is no larger than the available buffer
- has at least a FCS checksum of 4 bytes
Nevertheless be cautious and improve the existing
packet check. Just in case ...
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22884
Signed-off-by: Robert Marko <robimarko@gmail.com>
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: Zoltan HERPAI <wigyori@uid0.hu>
The netifd/dhcp flow uses this, and as uxc mounts netifd in a
container, this allows not mounting `basename` for just a usage.
References: https://github.com/openwrt/procd/pull/34
Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Andre Heider <a.heider@gmail.com>
Small size reduction.
Tested with Turris Omnia.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23054
Signed-off-by: Robert Marko <robimarko@gmail.com>
The Kite EVB device wrongly select an invalid package for NPU firmware
where the correct one should be the airoha-en7581-npu-firmware one.
Fix the wrong package to restore compilation of the Airoha target.
Fixes: 0cf516751af3 ("airoha: an7581: generalize eMMC DTS and add Kite variant")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The basic AN7581 NPU FW also supports WiFi offload for MT7992 WiFi chip.
Add this information in the package description to clarify this.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop patches and configs for Linux 6.12.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22893
Signed-off-by: Nick Hainke <vincent@systemli.org>
Switch to Linux kernel version 6.18.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/22893
Signed-off-by: Nick Hainke <vincent@systemli.org>
The 6.18 testing kernel for lantiq target is ready now.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22922
Signed-off-by: Nick Hainke <vincent@systemli.org>
CONFIG_PAGE_BLOCK_MAX_ORDER was set to 10 as the page size is 4k.
All other 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>
Link: https://github.com/openwrt/openwrt/pull/22922
Signed-off-by: Nick Hainke <vincent@systemli.org>
Manually resolve the patch conflicts on new LTS kernel.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22922
Signed-off-by: Nick Hainke <vincent@systemli.org>
They are included in the 6.18 kernel.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22922
Signed-off-by: Nick Hainke <vincent@systemli.org>
Copy patches and kernel configs from 6.18 kernel to restore the
default 6.12 kernel support files.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22922
Signed-off-by: Nick Hainke <vincent@systemli.org>
This is a preparation for 6.18 kernel support. It can help us
track the files history by using the Git tool.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22922
Signed-off-by: Nick Hainke <vincent@systemli.org>
6.14 has introduced a DRM client setup library. Add kmod-drm-client-lib
to support it, and add it as a dependency to DRM modules which depend on it.
Link: https://github.com/openwrt/openwrt/pull/22975
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
This patch adds support for the MikroTik RouterBOARD 960PGS (hEX
PoE/PowerBox Pro) router. The device has a USB 2.0 port and an SFP port for
adding optical fiber connectivity. The ports 2-5 can power other PoE
capable devices with the same voltage as applied to the unit.
Specifications:
- SoC: Qualcomm Atheros QCA9557
- Flash: 16 MB (SPI)
- RAM: 128 MB
- 1x Ethernet SFP: 1000
- 1x Ethernet RJ45: 10/100/1000 port with passive POE in
- 4x Ethernet RJ45: 10/100/1000 ports with 802.3af/at PoE out
- 1x USB 2.0 host port
- 1x reset button
See [1] and [2] for more details.
Flashing:
TFTP boot initramfs image and then perform sysupgrade. Follow common
MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.
Link: https://mikrotik.com/product/RB960PGS [1]
Link: https://mikrotik.com/product/RB960PGS-PB [2]
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Signed-off-by: Chester A. Unal <chester.a.unal@arinc9.com>
Unset the SWCONFIG symbol and AR8216_PHY which selects SWCONFIG. Add
kmod-switch-ar8xxx, which enables AR8216_PHY, to DEFAULT_PACKAGES for the
subtarget. With this, swconfig driver will be now compiled as a module, as
kmod-switch-ar8xxx selects kmod-swconfig.
Refresh the config-default file for ath79/mikrotik while at it.
This change makes it possible to disable the swconfig driver for MikroTik
RouterBOARD 960PGS (hEX PoE/PowerBox Pro).
Signed-off-by: Chester A. Unal <chester.a.unal@arinc9.com>
These two image profiles overwrite DEVICE_NAME making the two image
profiles appear with the same name "ventana" in the "profiles.json"
mixing ramdomly the two profiles.
Use BOARD_NAME instead to keep the two profiles names unique (orginal
DEVICE_NAME) hence generating a coherent "profiles.json".
Since there are image recipes hardconding DEVICE_NAME, change them to use
BOARD_NAME if defined, in order to preserve the previous names used in
those recipes.
Fixes: cbc8bcfbaa71fe0928bf07d29ec0fe6217fd51ad ("imx6: image: use vendor_model scheme")
Reported-by: Eric Fahlgren <ericfahlgren@gmail.com>
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22994
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is required to build the motorcomm dwmac driver which is widely
used on loongson platforms.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/22923
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Motorcomm YT6801 is a PCIe ethernet controller based on DWMAC4 IP. It
integrates an GbE phy, supporting WOL, VLAN tagging and various types
of offloading. It ships an on-chip eFuse for storing various vendor
configuration, including MAC address.
The PM and plat_data functions were slightly modified to build with
current kernel.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/22923
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Stop overriding CCACHE_COMPILERCHECK from rules.mk and rely on
ccache's default, which hashes the compiler binary's mtime and
size.
For a local tree that is enough: the toolchain only changes when
it is rebuilt, and a rebuild updates mtime and size. Users who
want a stricter check can still set CCACHE_COMPILERCHECK in their
environment.
CI does not depend on this export either. The workflow writes a
secondary ccache.conf with
compiler_check=string:<toolchain-commit-sha>
so the cache key is tied to the toolchain source revision. That
is both stricter than the previous "%compiler% -v -c" setting
and portable across runners, where compiler mtimes would not
match after restoring a cache archive.
Link: https://github.com/openwrt/openwrt/pull/22995
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Xiaomi AX6000 has three radios:
- IPQ5018 integrated 2.4 GHz (ath11k AHB, wifi0)
- QCN9024 on PCIe0 (ath11k PCI, QCA8074-class 5 GHz)
- QCA9887 on PCIe1 (ath10k, 5 GHz)
The DTS previously kept pcie1 disabled because the controller
could not bring the link up. The real cause was the PERST GPIO
polarity: the stock device-tree uses GPIO_ACTIVE_HIGH on GPIO18
for the QCA9887 card, while OpenWrt had GPIO_ACTIVE_LOW, leaving
the card held in reset.
With the correct polarity the PCIe1 link trains and the QCA9887
enumerates at 01:00.0. ath10k loads firmware-2.bin, registers
phy0 with mac80211, and provides a functional 5 GHz AP.
Tested on a reworked Xiaomi AX6000 with QCA9887 soldered in.
All three radios enumerate, load firmware and beacon
successfully; scan, association and data traffic confirmed on
each radio.
Signed-off-by: chinawrj <chinawrj@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23047
Signed-off-by: Robert Marko <robimarko@gmail.com>
Some occurrences of regmap_update_bits can be simplified by
using other regmap commands. Use set_bits/clear_bits/assign_bits
for better readability.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23039
Signed-off-by: Robert Marko <robimarko@gmail.com>
All consumers of legacy table commands have been refactored and
use the rtl_table helpers. Drop unused code.
rtl839x_exec_tbl2_cmd() cannot be dropped as it is still used
in the qos code. Keep it for now.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23037
Signed-off-by: Robert Marko <robimarko@gmail.com>
rtldsa_931x_stp_get() and rtl931x_stp_set() use legacy table code.
Replace that with rtl_table_xxx() helpers.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23037
Signed-off-by: Robert Marko <robimarko@gmail.com>
rtldsa_930x_stp_get() and rtl930x_stp_set() use legacy table code.
Replace that with rtl_table_xxx() helpers.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23037
Signed-off-by: Robert Marko <robimarko@gmail.com>
rtldsa_839x_stp_get() and rtl839x_stp_set() use legacy table code.
Replace that with rtl_table_xxx() helpers.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23037
Signed-off-by: Robert Marko <robimarko@gmail.com>
rtldsa_838x_stp_get() and rtl838x_stp_set() use legacy table code.
Replace that with rtl_table_xxx() helpers.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23037
Signed-off-by: Robert Marko <robimarko@gmail.com>
Use regmap in the four target specific hw_init() functions.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23038
Signed-off-by: Robert Marko <robimarko@gmail.com>
Another cleanup of legacy sw() code.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23038
Signed-off-by: Robert Marko <robimarko@gmail.com>
Another two functions that are cleaned from the legacy sw() macros.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23038
Signed-off-by: Robert Marko <robimarko@gmail.com>
The EXTERNAL_SFP_PHY macro is very strange. It has attributes
sfp and media but is not linked to any SFP definition. There
is nothing that the kernel can evaluate better than the classic
PHY_C22 macro.
Remark! For the current D-Link DGS-1210 consumers this macro
should be converted to a PHY_C22_SFP in the future. As of now
there is no hardware to identify the proper gpios and define
and verify the corresponding SFP ports. Add a TODO comment
where needed.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23036
Signed-off-by: Robert Marko <robimarko@gmail.com>
Several EXTERNAL macros have been removed in the past. There is
no need to distinguish if a phy is built into the SoC or is
attached externally.
Do the same for EXTERNAL_SFP_PHY_FULL. This macro denotes a phy
that has a SFP port attached to it. This is usually RTL8214FC
based. To be consistent with other macros name it PHY_C22_SFP.
While we are here make use of the new port/phy notation.
So PHY_C22_SFP(p, n, s) gives
- p: the overall port number
- n: the phy address on the current bus
- s: the sfp identifier
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23036
Signed-off-by: Robert Marko <robimarko@gmail.com>
GCC15 defaults to C23, which does not work here.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23042
Signed-off-by: Robert Marko <robimarko@gmail.com>
libcody will fail to build if building using a GCC16 host compiler, so
backport the upstream fix.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>