From 2c2b04829583453bc654470f119eab173228068f Mon Sep 17 00:00:00 2001 From: Konstantin Meshkov Date: Tue, 25 Nov 2025 16:18:31 +0300 Subject: [PATCH] kirkwood: add aliases and new partition for support D-Link DNS-325 A1 - Added fan0 alias - Implemented LED aliases and thermal zones - Restructured partitions: u-boot, u-boot-env, ubi Signed-off-by: Konstantin Meshkov [ improve commit title ] Link: https://github.com/openwrt/openwrt/pull/17924 Signed-off-by: Christian Marangi --- ...325-add-led-labels-and-thermal-zones.patch | 107 ++++++++++++++++++ ...-add-fan-label-and-update-partitions.patch | 52 +++++++++ 2 files changed, 159 insertions(+) create mode 100644 target/linux/kirkwood/patches-6.12/108-dns325-add-led-labels-and-thermal-zones.patch create mode 100644 target/linux/kirkwood/patches-6.12/109-dns325-add-fan-label-and-update-partitions.patch diff --git a/target/linux/kirkwood/patches-6.12/108-dns325-add-led-labels-and-thermal-zones.patch b/target/linux/kirkwood/patches-6.12/108-dns325-add-led-labels-and-thermal-zones.patch new file mode 100644 index 0000000000..ca0347366c --- /dev/null +++ b/target/linux/kirkwood/patches-6.12/108-dns325-add-led-labels-and-thermal-zones.patch @@ -0,0 +1,107 @@ +--- a/arch/arm/boot/dts/marvell/kirkwood-dns325.dts ++++ b/arch/arm/boot/dts/marvell/kirkwood-dns325.dts +@@ -2,11 +2,19 @@ + /dts-v1/; + + #include "kirkwood-dnskw.dtsi" ++#include + + / { + model = "D-Link DNS-325 NAS (Rev A1)"; + compatible = "dlink,dns-325-a1", "dlink,dns-325", "dlink,dns-kirkwood", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + ++ aliases { ++ led-boot = &led_white_power; ++ led-failsafe = &led_white_power; ++ led-running = &led_white_power; ++ led-upgrade = &led_white_power; ++ }; ++ + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; +@@ -24,24 +32,25 @@ + &pmx_led_white_usb>; + pinctrl-names = "default"; + +- led-white-power { ++ led_white_power: white-power { + label = "dns325:white:power"; + gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; +- led-white-usb { ++ led_white_usb: white-usb { + label = "dns325:white:usb"; + gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; /* GPIO 43 */ ++ linux,default-trigger = "usb-host"; + }; +- led-red-l_hdd { ++ led_red_l_hdd: red-l_hdd { + label = "dns325:red:l_hdd"; + gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; + }; +- led-red-r_hdd { ++ led_red_r_hdd: red-r_hdd { + label = "dns325:red:r_hdd"; + gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; + }; +- led-red-usb { ++ led_red_usb: red-usb { + label = "dns325:red:usb"; + gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; + }; +@@ -54,10 +63,53 @@ + lm75: lm75@48 { + compatible = "national,lm75"; + reg = <0x48>; ++ #thermal-sensor-cells = <0>; + }; + }; + serial@12000 { + status = "okay"; + }; + }; ++ ++ thermal-zones { ++ chassis-thermal { ++ polling-delay = <20000>; ++ polling-delay-passive = <2000>; ++ ++ thermal-sensors = <&lm75>; ++ ++ trips { ++ chassis_alert0: chassis-alert0 { ++ temperature = <43000>; ++ hysteresis = <3000>; ++ type = "active"; ++ }; ++ chassis_alert1: chassis-alert1 { ++ temperature = <47000>; ++ hysteresis = <3000>; ++ type = "active"; ++ }; ++ chassis-crit { ++ temperature = <60000>; ++ hysteresis = <2000>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ map0 { ++ trip = <&chassis_alert0>; ++ cooling-device = <&fan0 1 1>; ++ }; ++ map1 { ++ trip = <&chassis_alert1>; ++ cooling-device = <&fan0 2 2>; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&fan0 { ++ #cooling-cells = <2>; + }; diff --git a/target/linux/kirkwood/patches-6.12/109-dns325-add-fan-label-and-update-partitions.patch b/target/linux/kirkwood/patches-6.12/109-dns325-add-fan-label-and-update-partitions.patch new file mode 100644 index 0000000000..5bc0378f4e --- /dev/null +++ b/target/linux/kirkwood/patches-6.12/109-dns325-add-fan-label-and-update-partitions.patch @@ -0,0 +1,52 @@ +--- a/arch/arm/boot/dts/marvell/kirkwood-dnskw.dtsi ++++ b/arch/arm/boot/dts/marvell/kirkwood-dnskw.dtsi +@@ -29,7 +29,7 @@ + }; + }; + +- gpio_fan { ++ fan0: gpio_fan { + /* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ + compatible = "gpio-fan"; + pinctrl-0 = <&pmx_fan_high_speed &pmx_fan_low_speed>; +@@ -187,33 +187,18 @@ + + partition@0 { + label = "u-boot"; +- reg = <0x0000000 0x100000>; ++ reg = <0x0000000 0x0e0000>; + read-only; + }; + +- partition@100000 { +- label = "uImage"; +- reg = <0x0100000 0x500000>; +- }; +- +- partition@600000 { +- label = "ramdisk"; +- reg = <0x0600000 0x500000>; +- }; +- +- partition@b00000 { +- label = "image"; +- reg = <0x0b00000 0x6600000>; +- }; +- +- partition@7100000 { +- label = "mini firmware"; +- reg = <0x7100000 0xa00000>; ++ partition@e0000 { ++ label = "u-boot-env"; ++ reg = <0x00e0000 0x020000>; + }; + +- partition@7b00000 { +- label = "config"; +- reg = <0x7b00000 0x500000>; ++ partition@100000 { ++ label = "ubi"; ++ reg = <0x0100000 0x7f00000>; + }; + }; + -- 2.30.2