Skip to contentSkip to conversation

Add "aspeed,ast2700-pwm-tach" compatible string

PATCH Superseded Billy Tsai 2 participants 4 messages Nov 18, 2025 – Nov 19, 2025

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Billy Tsai

author reviewer
#0 lore raw

v2 cover Add "aspeed,ast2700-pwm-tach" compatible string

Adds the "aspeed,ast2700-pwm-tach" compatible string, which provides fallback support for the previous version of the hardware design, to the PWM/TACH dt-binding and driver.

---
Changes in v2:
- Reworked the binding to use a two-level compatible list with "aspeed,ast2600-pwm-tach" as the fallback.
- Link to v1: https://lore.kernel.org/r/[email protected]
---

---
Billy Tsai (2):
dt-bindings: hwmon: Add AST2700 compatible
hwmon: (aspeed-g6-pwm-tach): Add AST2700 compatible string

 .../devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml          | 10 +++++++---
 drivers/hwmon/aspeed-g6-pwm-tach.c                             |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)

---
base-commit: e7c375b181600caf135cfd03eadbc45eb530f2cb
change-id: 20251118-upstream_pwm_tach-57fba779ce84

Best regards,

Signature · 1 line
Billy Tsai <[email protected]>
author reviewer
#1 lore raw

PATCH v2 1/2 dt-bindings: hwmon: Add AST2700 compatible

Adds support for the AST2700 PWM/Tach controller by extending the compatible string enumeration in the device tree binding.

The AST2700 PWM/Tach hardware is compatible with the existing binding schema and requires no additional properties or modifications beyond the new compatible string.

---
 .../devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml          | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml +7 -3
index 9e5ed901ae54..8b579321915f 100644
@@ -18,9 +18,13 @@ description: |
 
 properties:
   compatible:
-    enum:
-      - aspeed,ast2600-pwm-tach
-
+    oneOf:
+      # AST2700 with fallback to AST2600
+      - items:
+          - const: aspeed,ast2700-pwm-tach
+          - const: aspeed,ast2600-pwm-tach
+      # Only AST2600
+      - const: aspeed,ast2600-pwm-tach
   reg:
     maxItems: 1
 
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v2 1/2] dt-bindings: hwmon: Add AST2700 compatible

Quoted 17 lines · Billy Tsai

Adds support for the AST2700 PWM/Tach controller by extending the compatible string enumeration in the device tree binding.

The AST2700 PWM/Tach hardware is compatible with the existing binding schema and requires no additional properties or modifications beyond the new compatible string.

---
 .../devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml          | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml +0 -0
index 9e5ed901ae54..8b579321915f 100644

Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml description: | · line 22

Quoted 8 lines
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml +2 -3
@@ -18,9 +18,13 @@ description: |
 
 properties:
   compatible:
-    enum:
-      - aspeed,ast2600-pwm-tach
-
+    oneOf:
+      # AST2700 with fallback to AST2600

Drop the comments, useless and redundant. We can read the schema. Inflating code with obvious comments is not making it better.

Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml description: | · line 27

Quoted 5 lines
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml +5 -0
+      - items:
+          - const: aspeed,ast2700-pwm-tach
+          - const: aspeed,ast2600-pwm-tach
+      # Only AST2600
+      - const: aspeed,ast2600-pwm-tach

And why are you removing blank line?

Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml description: | · line 28

Quoted 1 line
Documentation/devicetree/bindings/hwmon/aspeed,g6-pwm-tach.yaml +0 -0
   reg:

Best regards,
Krzysztof

author reviewer
#3 lore raw

PATCH v2 2/2 hwmon: (aspeed-g6-pwm-tach): Add AST2700 compatible string

In reply to Billy Tsai

Extends device tree support to include the AST2700 chip variant by adding its compatible string to the device match table.

The AST2700 PWM/TACH hardware is compatible with the existing driver implementation used for AST2600.

---
 drivers/hwmon/aspeed-g6-pwm-tach.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/hwmon/aspeed-g6-pwm-tach.c +3 -0
index 4174b129d1fc..44e1ecba205d 100644
@@ -528,6 +528,9 @@ static const struct of_device_id aspeed_pwm_tach_match[] = {
 	{
 		.compatible = "aspeed,ast2600-pwm-tach",
 	},
+	{
+		.compatible = "aspeed,ast2700-pwm-tach",
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, aspeed_pwm_tach_match);
Signature · 1 line
2.34.1