Skip to content

net: pse-pd: add driver for Hasivo HS104 PSE Chip over I2C#1

Open
bevanweiss wants to merge 35 commits intomainfrom
hasivo-pse-hs104
Open

net: pse-pd: add driver for Hasivo HS104 PSE Chip over I2C#1
bevanweiss wants to merge 35 commits intomainfrom
hasivo-pse-hs104

Conversation

@bevanweiss
Copy link
Copy Markdown
Owner

The Hasivo HS104 is a simple 4 port PSE-PD chip capable of providing 802.3af/at/bt power per port.
It is commonly used on Hasivo PoE switches in the 1Gbps/2.5Gbps/10Gbps ranges.

Enable Hasivo HS104 driver for RTL930x boards.

This includes the majority of the Hasivo PoE switches.

Thanks for your contribution to OpenWrt!

To help keep the codebase consistent and readable,
and to help people review your contribution,
we ask you to follow the rules you find in the wiki at this link
https://openwrt.org/submitting-patches

Please remove this message before posting the pull request.

hauke and others added 29 commits April 12, 2026 17:02
Fix links open the Claude Code desktop app which is not useful in the
OpenWrt contributor workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Link: openwrt#22897
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is based on version 1.0.93 plus these commits:
0ca689a fix: fetch base branch to ensure correct PR-only diffs
b7d533d fix: handle fork PRs by fetching via pull/N/head

Link: openwrt#22897
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Simplifies code slightly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: openwrt#21599
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add a recipe 'rt-loader-bootbase' to build an image with rt-loader for
devices using the Zyxel BootBase/BootExtension chain. They need a plain
bootable image for initramfs (preferably rt-loader with piggy-backed
uImage) and a plain uImage for flashing. The flashable uImage is later
combined with the loader into a signed/checksummed image.

This template recipe can be used directly for GS1920-24HP, making the
initramfs image more flexible due to using uImage instead of plain
image.

Suggested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: openwrt#22827
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The pinmux entry for disabling JTAG includes a comment which points to
which GPIOs are sacrificed for using JTAG. However, this comment so far
was only aware of GPIO6 and GPIO7. From RTL931X application notes and
datasheets we know which GPIOs are actually affected here.

Extend the comment to include GPIOs 3-5 too.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: openwrt#22827
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Repurpose a currently unused macro to make it usable for common SFP port
definitions. Do so by changing defined properties, drop the fixed link,
etc.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: openwrt#22827
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7350dc7766f6 tplink-safeloader: add support for Festa F61
f3b02a2f2e39 mkzynfw: add board definitions for Zyxel XS1930 switches

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: openwrt#22827
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
For some unknown reason carving out the mdio bus from the ethernet
node forgot the TP-Link SG2452P. The notation still reads

&ethernet0 {
  mdio: mdio-bus {
    compatible = "realtek,rtl838x-mdio";
    ...

Like everywhere else it should be

&mdio_bus0 {
  PHY_C22(0, 0)
  ...

Fix that.

Fixes: 57b2706 ("rearrange mdio-bus below mdio-controller")
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: openwrt#22866
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Whenever a variable is needed to denote a smi_bus it is named
accordingly. Fix the last wrong definition.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: openwrt#22866
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Align the max defines to upstream. For this

- rename PHY to PORT (that is what it is really about=
- use plural name (e.g. BUSSES instead of BUS)

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: openwrt#22866
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add the affected mdio device to the warning output.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: openwrt#22866
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Without this, max_oper_chwidth is set incorrectly,
thus ibss_mesh_select_80_160mhz fails to set the correct channel width

Signed-off-by: Richard Huynh <voxlympha@gmail.com>
Link: openwrt#22644
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
EDUP EP-RT2983 comes with a factory installed version of OpenWrt 23.05
with device name "netis,n6".

Specification
--------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (Toshiba)
- WLAN      : MT7905DAN + MT7975DN
  - 2.4 GHz : b/g/n/ax, 574 Mbps, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, 1201 Mbps, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x4 (1x WAN, 3x LAN)
- UART      : 3.3V, 115200n8
- Buttons   : 1x Reset
              1x WPS
- LEDs      : 1x Power (green)
              1x WiFi (green)
              1x Mesh/WPS (green); flashing green during boot
              3x LAN (green)
              1x WAN (green); flashing red during upgrade and failsafe
- Power     : 12 VDC 1A

Installation
-------------
1. Log in to LuCI
2. Go to System, Backup / Flash Firmware
3. If desired, backup the current system by saving (all) the mtdblock
contents.
4. Flash new firmware image, select Flash image.
5. Browse and select the sysupgrade file
"openwrt-*-ramips-mt7621-edup_ep-rt2983-squashfs-sysupgrade.bin"
and then Upload.
6. Unselect "Keep settings and retain the current configuration"
Note: All settings will be reset to default. WiFi is not enabled by
default so a connection via Ethernet is necessary to log in and set up.
7. Allow "Force upgrade" (tick the box if there is one), or press Continue
if there is no box to tick. This is because the name is now
"edup,ep-rt2983" as it should have been from the start.
8. Proceed to flash. Wait for reboot and keep power connected.
9. After reboot, default address to access LuCI is 192.168.1.1 with
no password

Recovery (UART)
----------------
1. Remove the 4 screws on the bottom and pry open the cover.
2. Connect serial adapter to the unpopulated serial header pins
TX, RX, GND near the WPS button. Do not connect VCC.
3. Start serial terminal (e.g. minicom, screen, etc) on the computer and
turn on the router.
4. As prompted, hit any key to stop autoboot.
5. Enter 2 to select "2. Upgrade firmware"
6. Enter 0 to select "0 - TFTP client (Default)"
7. Accept the defaults by pressing Enter for
"Input U-Boot's IP address: 192.168.1.1",
"TFTP server's IP address: 192.168.1.2",
"Input IP netmask: 255.255.255.0"
8. Assign your PC's Ethernet port a static IP 192.168.1.2 with netmask
255.255.255.0 and connect to a LAN port on the router using the
Ethernet cable. Disconnect all other network connections (e.g. WiFi) on
the computer.
9. Serve the factory image
"openwrt-*-ramips-mt7621-edup_ep-rt2983-squashfs-factory.bin" using
a TFTP server, e.g. tftpd64. For convenience, the filename can be renamed
to something shorter.
10. In the serial terminal, when prompted "Input file name:", enter the
filename from the previous step and press Enter.
11. The factory image will be flashed as indicated. Wait for reboot.

MAC addresses prototype
------------------------
+---------+---------------------+
|         | MAC example         |
+---------+---------------------+
| LAN     | CC:D8:1F:47:xx:yy   |
| WAN     | CC:D8:1F:47:xx:yy+1 |
| WLAN 2G | CC:D8:1F:17:xx:yy+2 |
| WLAN 5G | CC:D8:1F:77:xx:yy+2 |
+---------+---------------------+

Signed-off-by: Ryan Leung <untilscour@protonmail.com>
Link: openwrt#22197
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Replace conditional "LINUX_6_12:mod" / "!LINUX_6_12:mod" AUTOLOAD entries
with version-filtered module names using @lt6.18 / @ge6.18. This makes
version_filter emit plain module names into /etc/modules.d(e.g. "crc32c_generic"),
allowing kmodloader to find and load the correct module for the running kernel.
Fixes crc32c (and related crypto modules) not being autoloaded on 6.12 kernels.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: openwrt#22798
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Document pci168c,0027 for ath79. Will allow potential nvmem updates in
the future.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: openwrt#22719
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Spaces in the backup.tgz filename was breaking sysupgrade.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: openwrt#17847
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The list of files excluded from backup was outdated.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: openwrt#17847
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The check of files from packages was only checking opkg files.
Check for apk as well and fail if both are missing.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: openwrt#17847
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport the latest NTFS driver. The in-tree NTFS3 driver is obsolete.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Link: openwrt#22861
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Specification:
The device is similar to the M30 but has only one LAN port and no WAN port.

- MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
- 512MB RAM
- 128MB NAND flash with two UBI partitions with identical size
- 1 multi color LED (red, green, blue, white) connected via GCA230718
- 2 buttons (WPS, reset, LED)
- 1 1Gbit LAN port

Disassembly:
- There are two screws at the power connector which must be removed. Afterwards the top case can be removed (it is clipped on, so some tools are required).

Serial Interface:
- The serial interface can be connected to the 4 pin holes on the board. Do NOT connect VCC.
- The pins are labelled on the PCB (RX, TX, GND)
- Settings: 115200, 8N1

MAC addresses:
- LAN MAC is stored in partition "Odm" at offset 0x8f
- WLAN MAC (2.4 GHz and 5GHz) is LAN MAC + 1

Reverting back to OEM firmware:
- There is currently no easy way to revert back to the OEM image
- The methods from M30 and M60 doesn't seem to work anymore
- If you plan to revert back to OEM firmware later, do the following steps before flashing OpenWrt:
  - Boot from initramfs as described in "Flashing via U-Boot" but don't flash anything
  - Instead, make a backup of UBI and UBI1 partition
  - The created dumps must be written to the initial partitions to revert back to OEM

Flashing via Recovery Web Interface:
- Set your IP address to 192.168.200.10, subnetmask 255.255.255.0
- Press the reset button while powering on the device
- Keep the reset button pressed until the LED blinks red
- Open a Chromium based and goto http://192.168.200.50/ (recovery web interface)
- Download openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-squashfs-recovery.bin
- Note: The recovery web interface always reports successful flashing, even if it fails
- After flashing, the recovery web interface will try to forward the browser to 192.168.0.1 (can be ignored)
- If flashing was successful, OpenWrt is accessible via 192.168.1.1
- The recovery image boots an initramfs image, flash the sys upgrade image to get to „normal“ OpenWrt mode

Flashing via U-Boot:
- Open the case, connect to the UART console
- Set your IP address to 192.168.200.2, subnet mask 255.255.255.0. Connect to one of the LAN interfaces of the router
- Run a tftp server which provides openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-initramfs-kernel.bin
- Supply the board with 12V
- Select "7. Load image" in the U-Boot menu
- Enter image file, tftp server IP and device IP (if they differ from the default).
- TFTP download to RAM will start. After a few seconds OpenWrt initramfs should start
- The initramfs is accessible via 192.168.1.1, change your IP address accordingly (or use multiple IP addresses on your interface)
- Perform a sysupgrade using openwrt-mediatek-filogic-dlink_aquila-pro-ai-e30-a1-squashfs-sysupgrade.bin
- Reboot the device. OpenWrt should start from flash now

Flashing via OEM web interface is not possible, as it will change the active partition and OpenWrt is only running on the first UBI partition.

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: openwrt#22776
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Specification:
* CPU: MediaTek MT7628AN (580 MHz)
* Flash: GigaDevice GD25Q128CSIG (16 MiB)
* RAM: Winbond W9751G6KB-25 (64 MiB)

WikiDevi page: <https://wikidevi.wi-cat.ru/Keenetic_City_(KN-1510)>

How to flash:
* Configure TFTP server with IP address 192.168.1.2/24
* Serve OpenWrt factory image as "KN-1510_recovery.bin"
* Connect the PC to router's LAN port, hold the reset button and power
  the router up. When the power LED starts blinking release the
  button.

The same instructions apply to OEM firmware, except one can take it
from osvault.keenetic.net

Signed-off-by: Ivan Davydov <lotigara@lotigara.ru>
Link: openwrt#22404
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
I-O DATA WN-AX2033GR2 is roughly the same as I-O DATA WN-AX2033GR.
The difference is the Flash Memory (Macronix MX30LF1G18AC).

Specification
=============
- SoC: MediaTek MT7621A
- RAM: DDR3 128 MiB
- Flash Memory: NAND 128 MiB (Macronix MX30LF1G18AC)
- Wi-Fi: MediaTek MT7603E
- Wi-Fi: MediaTek MT7615
- Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN)
- LED: 2x green LED
- Input: 2x tactile switch, 1x slide switch
- Power: DC 12V

Flash instruction
=================
1. Open the router management page (192.168.0.1).
2. Update router firmware using "initramfs-kernel.bin".
3. After updating, run sysupgrade with "sysupgrade.bin".

Signed-off-by: Hiroki Utsunomiya <hu-git-ja@proton.me>
Link: openwrt#22762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
cd7a4e5f8b jail: mount /lib/config into netifd jail

Signed-off-by: Paul Spooren <mail@aparcar.org>
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Link: openwrt#22875
Signed-off-by: Linus Walleij <linusw@kernel.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

Link: openwrt#22875
Signed-off-by: Linus Walleij <linusw@kernel.org>
Some new DRM kernel modules appeared in the 6.18 kernel and
are now prompting for selection when enabling DRM in the kernel.
The Gemini D-Link DIR-685 is always the first to run into this
problem hence let's fix it before someone else tries to enable
DRM.

Link: openwrt#22875
Signed-off-by: Linus Walleij <linusw@kernel.org>
Fix up the 6.18 kernel config and allow for selecting it as a
testing kernel. One single Kconfig option needed adding.

Link: openwrt#22875
Signed-off-by: Linus Walleij <linusw@kernel.org>
The initial bringup missed two GPIO-related settings:
  - TX Disable GPIO for the SFP modules
  - LED Sync GPIO selection for the port LEDs

This adds the missing TX Disable GPIOs and muxes GPIO18 to LED sync
(there are HC595 shift registers on the board that require the sync).

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Link: openwrt#22551
Signed-off-by: Robert Marko <robimarko@gmail.com>
The Hasivo HS104 is a simple 4 port PSE-PD chip capable of providing
802.3af/at/bt power per port.
It is commonly used on Hasivo PoE switches in the 1Gbps/2.5Gbps/10Gbps
ranges.

Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment