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 <skyline@mail.ru>
[ improve commit title ]
Link: https://github.com/openwrt/openwrt/pull/17924
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Konstantin Meshkov 2025-11-25 16:18:31 +03:00 committed by Christian Marangi
parent 7e829b8209
commit 2c2b048295
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
2 changed files with 159 additions and 0 deletions

View File

@ -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 <dt-bindings/thermal/thermal.h>
/ {
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>;
};

View File

@ -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>;
};
};