Skip to contentSkip to conversation

qnap-mcu: Add TS133 support

PATCH Applied Heiko Stuebner 3 participants 5 messages Jan 4 – Jan 13

Subsystems (3)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

cover qnap-mcu: Add TS133 support

The completionist in me made me grab a TS133 1-bay variant for cheap. Not yet sure what to do with it, but at least once one understands the basic layout, adding support for more variants gets easy :-) .

So this small series adds support for 1-bay consumer variant of the QNAP NAS series based on Rockchip RK3566/RK3568 SoCs.

The last remaining type of this series is the TS433eu 1HE rackmount variant. There are people wanting to add support for this, so they also get to do the MCU support for it - which is a tiny bit more involved as the TS433eU has 3 independently controllable fans.

Heiko Stuebner (2):
dt-bindings: mfd: qnap,ts433-mcu: Add qnap,ts133-mcu compatible
mfd: qnap-mcu: Add driver data for TS133 variant

 .../devicetree/bindings/mfd/qnap,ts433-mcu.yaml          | 1 +
 drivers/mfd/qnap-mcu.c                                   | 9 +++++++++
 2 files changed, 10 insertions(+)
Signature · 1 line
2.47.2
author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: mfd: qnap,ts433-mcu: Add qnap,ts133-mcu compatible

The same MCU is used on a number of devices, each with a slightly different set of features, like the number of LEDs.

Add a compatible for the MCU used in the TS133 variant. This is the 1-disk consumer variant of the RK356x-based family.

---
 Documentation/devicetree/bindings/mfd/qnap,ts433-mcu.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/qnap,ts433-mcu.yaml +1 -0
index 5454d9403cad..12e738b1270a 100644
@@ -16,6 +16,7 @@ description:
 properties:
   compatible:
     enum:
+      - qnap,ts133-mcu
       - qnap,ts233-mcu
       - qnap,ts433-mcu
 
Signature · 1 line
2.47.2
maintainer Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] dt-bindings: mfd: qnap,ts433-mcu: Add qnap,ts133-mcu compatible

Quoted 11 lines · Heiko Stuebner

The same MCU is used on a number of devices, each with a slightly different set of features, like the number of LEDs.

Add a compatible for the MCU used in the TS133 variant. This is the 1-disk consumer variant of the RK356x-based family.

---
 Documentation/devicetree/bindings/mfd/qnap,ts433-mcu.yaml | 1 +
 1 file changed, 1 insertion(+)
author maintainer
#3 lore raw

PATCH 2/2 mfd: qnap-mcu: Add driver data for TS133 variant

In reply to Heiko Stuebner

Add the TS133 compatible and affiliated driver data to qnap-mcu. The TS133 is mostly similar to the TS233/TS433, except only having one drive and no USB-LED.

The fan pwm-limits from the vendor-configuration also are the same as for the TS233/TS433 variants.

---
 drivers/mfd/qnap-mcu.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/mfd/qnap-mcu.c +9 -0
index 08e55ff24012..556bc5bb43d9 100644
@@ -444,6 +444,14 @@ static int qnap_mcu_power_off(struct sys_off_data *data)
 	return NOTIFY_DONE;
 }
 
+static const struct qnap_mcu_variant qnap_ts133_mcu = {
+	.baud_rate = 115200,
+	.num_drives = 1,
+	.fan_pwm_min = 51,  /* Specified in original model.conf */
+	.fan_pwm_max = 255,
+	.usb_led = false,
+};
+
 static const struct qnap_mcu_variant qnap_ts233_mcu = {
 	.baud_rate = 115200,
 	.num_drives = 2,
@@ -529,6 +537,7 @@ static int qnap_mcu_probe(struct serdev_device *serdev)
 }
 
 static const struct of_device_id qnap_mcu_dt_ids[] = {
+	{ .compatible = "qnap,ts133-mcu", .data = &qnap_ts133_mcu },
 	{ .compatible = "qnap,ts233-mcu", .data = &qnap_ts233_mcu },
 	{ .compatible = "qnap,ts433-mcu", .data = &qnap_ts433_mcu },
 	{ /* sentinel */ }
Signature · 1 line
2.47.2
maintainer Applied
#4 lore raw
In reply to Heiko Stuebner
Quoted 8 lines · Heiko Stuebner

The completionist in me made me grab a TS133 1-bay variant for cheap. Not yet sure what to do with it, but at least once one understands the basic layout, adding support for more variants gets easy :-) .

So this small series adds support for 1-bay consumer variant of the QNAP NAS series based on Rockchip RK3566/RK3568 SoCs.

[...]

Applied, thanks!

[1/2] dt-bindings: mfd: qnap,ts433-mcu: Add qnap,ts133-mcu compatible

      commit: 7093a9f58cd759fcb9bf77a6a4c93a06c00f9c3c
[2/2] mfd: qnap-mcu: Add driver data for TS133 variant
      commit: 5380ce6d573059ae840e846a643a06521ef2cee3

--
Lee Jones [李琼斯]