Skip to contentSkip to conversation

Describe the nvmem provided by the Qnap MCU

PATCH In review Heiko Stuebner 2 participants 4 messages Aug 18, 2025 – Aug 19, 2025

Subsystems (2)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

cover Describe the nvmem provided by the Qnap MCU

Describe the nvmem-cells found inside the MCU of Qnap RK3568-based NAS devices. And move the cpu thermal node to its correct position.

Heiko Stuebner (2):
arm64: dts: rockchip: move cpu_thermal node to the correct position
arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433

 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 158 ++++++++++++------
 1 file changed, 110 insertions(+), 48 deletions(-)
Signature · 1 line
2.47.2
author maintainer
#1 lore raw

PATCH 1/2 arm64: dts: rockchip: move cpu_thermal node to the correct position

The &cpu_thermal node was added at the wrong position, move it to the correctly sorted one.

---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 96 +++++++++----------
 1 file changed, 48 insertions(+), 48 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts +48 -48
index 6ae4316761c4..5656554ca284 100644
@@ -196,6 +196,54 @@ &cpu3 {
 	cpu-supply = <&vdd_cpu>;
 };
 
+/*
+ * The MCU can provide system temperature too, but only by polling and of
+ * course also cannot set trip points. So attach to the cpu thermal-zone
+ * instead to control the fan.
+ */
+&cpu_thermal {
+	trips {
+		case_fan0: case-fan0 {
+			hysteresis = <2000>;
+			temperature = <35000>;
+			type = "active";
+		};
+
+		case_fan1: case-fan1 {
+			hysteresis = <2000>;
+			temperature = <45000>;
+			type = "active";
+		};
+
+		case_fan2: case-fan2 {
+			hysteresis = <2000>;
+			temperature = <65000>;
+			type = "active";
+		};
+	};
+
+	cooling-maps {
+		/*
+		 * Always provide some air movement, due to small case
+		 * full of harddrives.
+		 */
+		map1 {
+			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+			trip = <&case_fan0>;
+		};
+
+		map2 {
+			cooling-device = <&fan 2 3>;
+			trip = <&case_fan1>;
+		};
+
+		map3 {
+			cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
+			trip = <&case_fan2>;
+		};
+	};
+};
+
 &gmac0 {
 	assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>;
 	assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>;
@@ -492,54 +540,6 @@ rgmii_phy0: ethernet-phy@3 {
 	};
 };
 
-/*
- * The MCU can provide system temperature too, but only by polling and of
- * course also cannot set trip points. So attach to the cpu thermal-zone
- * instead to control the fan.
- */
-&cpu_thermal {
-	trips {
-		case_fan0: case-fan0 {
-			hysteresis = <2000>;
-			temperature = <35000>;
-			type = "active";
-		};
-
-		case_fan1: case-fan1 {
-			hysteresis = <2000>;
-			temperature = <45000>;
-			type = "active";
-		};
-
-		case_fan2: case-fan2 {
-			hysteresis = <2000>;
-			temperature = <65000>;
-			type = "active";
-		};
-	};
-
-	cooling-maps {
-		/*
-		 * Always provide some air movement, due to small case
-		 * full of harddrives.
-		 */
-		map1 {
-			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
-			trip = <&case_fan0>;
-		};
-
-		map2 {
-			cooling-device = <&fan 2 3>;
-			trip = <&case_fan1>;
-		};
-
-		map3 {
-			cooling-device = <&fan 4 THERMAL_NO_LIMIT>;
-			trip = <&case_fan2>;
-		};
-	};
-};
-
 &pcie30phy {
 	data-lanes = <1 2>;
 	status = "okay";
Signature · 1 line
2.47.2
author maintainer
#2 lore raw

PATCH 2/2 arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433

In reply to Heiko Stuebner

The MCU's eeprom contains the unit's serial and a number of slots for mac-addresses. As the MCU seems to be used in different devices, up to 8 mac addresses can live there and the unused slots are actually initialized with empty mac-address strings like 00:00:00:00:05:09 .

Interestingly on the TS-433, the PCIe ethernet adapter brings its own memory to hold its mac, and the gmac0 is supposed to get its mac from the second mac-slot, while the first one stays empty.

---
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)
arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts +62 -0
index 5656554ca284..224db87973b2 100644
@@ -655,6 +655,68 @@ fan: fan-0 {
 			#cooling-cells = <2>;
 			cooling-levels = <0 64 89 128 166 204 221 238>;
 		};
+
+		nvmem-layout {
+			compatible = "fixed-layout";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			serial-number@0 {
+				reg = <0x0 0x13>;
+			};
+
+			ext-port@22 {
+				reg = <0x22 0x2>;
+			};
+
+			mac0: mac@24 {
+				compatible = "mac-base";
+				reg = <0x24 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac1: mac@35 {
+				compatible = "mac-base";
+				reg = <0x35 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac2: mac@46 {
+				compatible = "mac-base";
+				reg = <0x46 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac3: mac@57 {
+				compatible = "mac-base";
+				reg = <0x57 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac4: mac@68 {
+				compatible = "mac-base";
+				reg = <0x68 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac5: mac@79 {
+				compatible = "mac-base";
+				reg = <0x79 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac6: mac@8a {
+				compatible = "mac-base";
+				reg = <0x8a 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+
+			mac7: mac@9b {
+				compatible = "mac-base";
+				reg = <0x9b 0x11>;
+				#nvmem-cell-cells = <1>;
+			};
+		};
 	};
 };
 
Signature · 1 line
2.47.2
#3 lore raw
In reply to Heiko Stuebner
Quoted 8 lines · Heiko Stuebner

Describe the nvmem-cells found inside the MCU of Qnap RK3568-based NAS devices. And move the cpu thermal node to its correct position.

Heiko Stuebner (2):
arm64: dts: rockchip: move cpu_thermal node to the correct position
arm64: dts: rockchip: describe mcu eeprom cells on rk3568-ts433

Quoted 8 lines
 .../boot/dts/rockchip/rk3568-qnap-ts433.dts   | 158 ++++++++++++------
 1 file changed, 110 insertions(+), 48 deletions(-)

--
2.47.2

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

This patch series was applied (using b4) to base:
Base: attempting to guess base-commit...
Base: tags/next-20250818 (exact match)

If this is not the correct base, please add 'base-commit' tag (or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/rockchip/' for [email protected]:

arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dtb: mcu (qnap,ts433-mcu): 'nvmem-layout' does not match any of the regexes: '^fan-[0-9]+$', '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/mfd/qnap,ts433-mcu.yaml#