[RFC PATCH 0/5] add support mikrotik routerboard hex poe
Oskari Lemmela
oskari at lemmela.net
Sun Dec 26 10:41:21 PST 2021
RFC patchset because of following open questions:
---
Since the QCA8337 DSA driver does not work properly with the current
5.4 kernel, should new boards wait until ath79 5.10 kernel and DSA change
is made?
---
Mikrotik bootloader does not print anything to the serial console.
Debugging the bootloader is quite time consuming. While testing,
I found that it is impossible to start an initramfs image larger
than 0x580000 (5.7 MB) via tftp.
Is there any way to limit the size of the initramfs image when the
sysupgrade image exceeds the tftp size limit?
---
POE driver is implemented as a kernel module. Every port is separate
hwmon device with same label as the DSA port.
root at OpenWrt:/# sensors
lan5-isa-0000
Adapter: ISA adapter
in1: N/A
power1: N/A
curr1: N/A
lan3-isa-0000
Adapter: ISA adapter
in1: 50.23 V
power1: 3.11 W
curr1: 62.00 mA
rbpoe-spi-0-2
Adapter: SPI adapter
in0: 50.23 V
temp1: +46.0°C
sfp-isa-0000
Adapter: ISA adapter
VCC: 3.26 V (crit min = +2.95 V, min = +3.00 V)
(max = +3.50 V, crit max = +3.60 V)
temperature: +60.5°C (low = -5.0°C, high = +95.0°C)
(crit low = -10.0°C, crit = +100.0°C)
TX_power: 0.00 W (max = 1000.00 uW, min = 148.00 uW) ALARM (MIN, LCRIT)
(lcrit = 118.00 uW, crit = 1.26 mW)
RX_power: 0.00 W (max = 1000.00 uW, min = 62.00 uW) ALARM (MIN, LCRIT)
(lcrit = 49.00 uW, crit = 1.26 mW)
bias: 36.00 mA (crit min = +0.00 A, min = +0.00 A)
(max = +0.04 A, crit max = +0.05 A)
lan4-isa-0000
Adapter: ISA adapter
in1: 50.23 V
power1: 2.91 W
curr1: 58.00 mA
lan2-isa-0000
Adapter: ISA adapter
in1: N/A
power1: N/A
curr1: N/A
Should this be implemented in Realtek POE switches as well?
I haven't created any userspace tools for ubus integration yet
Because I'm not sure if this is the right way to go.
The hwmon part should be upstremable. Only thing is two non-standard sysfs
controls (force_enable, port_state). They are also possible to implement
as debugfs files if they are not accepted by the upstream.
---
I used the preinit script to rename eth1 interface to sfp.
Is there a better way to do this?
Oskari Lemmela (5):
ath79: mikrotik: change to DSA driver
ath79: add support for MikroTik RouterBOARD 960PGS (hEx PoE)
ath79: fix spi driver delays
ath79: mikrotik: add poe driver
ath79: mikrotik: add poe to hex poe board
.../qca9557_mikrotik_routerboard-960pgs.dts | 310 +++++++++++++++++
.../linux/ath79/files/drivers/hwmon/rbpoe.c | 260 +++++++++++++++
.../linux/ath79/files/drivers/hwmon/rbpoe.h | 25 ++
.../ath79/files/drivers/hwmon/rbpoeport.c | 315 ++++++++++++++++++
target/linux/ath79/image/mikrotik.mk | 9 +
.../base-files/etc/board.d/02_network | 14 +
.../lib/preinit/10_rename_interfaces.sh | 11 +
target/linux/ath79/mikrotik/config-default | 7 +
...-ar934x-fix-transfer-and-word-delays.patch | 30 ++
.../902-hwmon-support-for-mikrotik-poe.patch | 51 +++
.../902-hwmon-support-for-mikrotik-poe.patch | 51 +++
11 files changed, 1083 insertions(+)
create mode 100644 target/linux/ath79/dts/qca9557_mikrotik_routerboard-960pgs.dts
create mode 100644 target/linux/ath79/files/drivers/hwmon/rbpoe.c
create mode 100644 target/linux/ath79/files/drivers/hwmon/rbpoe.h
create mode 100644 target/linux/ath79/files/drivers/hwmon/rbpoeport.c
create mode 100644 target/linux/ath79/mikrotik/base-files/lib/preinit/10_rename_interfaces.sh
create mode 100644 target/linux/ath79/patches-5.10/401-spi-ar934x-fix-transfer-and-word-delays.patch
create mode 100644 target/linux/ath79/patches-5.10/902-hwmon-support-for-mikrotik-poe.patch
create mode 100644 target/linux/ath79/patches-5.4/902-hwmon-support-for-mikrotik-poe.patch
--
2.25.1
More information about the openwrt-devel
mailing list