[PATCH v2 0/3] yosemite4: Add power module and ADC on Medusa Board

STALE730d

12 messages, 4 authors, 2024-09-23 · open the first message on its own page

[PATCH v2 0/3] yosemite4: Add power module and ADC on Medusa Board

From: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Date: 2024-09-18 09:54:47

Changelog:
  - v2
    - Add pmbus compatible string in trivial-devices.
	- Add mp5023 compatible string in trivial-devices.
  - v1
    - Add power module and ADC on Medusa Board.

Ricky CX Wu (3):
  dt-bindings: trivial-devices: support pmbus compatible string
  dt-bindings: trivial-devices: support MPS MP5023
  ARM: dts: aspeed: yosemite4: Add power module and ADC on Medusa Board

 .../devicetree/bindings/trivial-devices.yaml  |  4 ++
 .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 45 ++++++++++++++++++-
 2 files changed, 47 insertions(+), 2 deletions(-)

-- 
2.25.1

[PATCH v2 1/3] dt-bindings: trivial-devices: support pmbus compatible string

From: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Date: 2024-09-18 09:54:53

From: Ricky CX Wu <redacted>

Add pmbus compatibale string for the Generic PMbus devices that could
be monitor by pmbus driver.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 8a9a00705b23..cbb9b94e5b3b 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -320,6 +320,8 @@ properties:
           - oki,ml86v7667
             # 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
           - plx,pex8648
+            # Generic PMBus devices
+          - pmbus
             # Pulsedlight LIDAR range-finding sensor
           - pulsedlight,lidar-lite-v2
             # Renesas HS3001 Temperature and Relative Humidity Sensors
-- 
2.25.1

[PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

From: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Date: 2024-09-18 09:54:59

From: Ricky CX Wu <redacted>

Add support for hot-swap controller MPS MP5023.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index cbb9b94e5b3b..c3253ea389d4 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -296,6 +296,8 @@ properties:
           - mps,mp2975
             # Monolithic Power Systems Inc. multi-phase controller mp2993
           - mps,mp2993
+            # Monolithic Power Systems Inc. hot-swap controller mp5023
+          - mps,mp5023
             # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5920
           - mps,mp5920
             # Monolithic Power Systems Inc. multi-phase hot-swap controller mp5990
-- 
2.25.1

[PATCH v2 3/3] ARM: dts: aspeed: yosemite4: Add power module and ADC on Medusa Board

From: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Date: 2024-09-18 09:55:02

From: Ricky CX Wu <redacted>

Add RTQ6056 as 2nd source ADC sensor on Medusa Board.
Add power sensors on Medusa board:
- Add XDP710 as 2nd source HSC to monitor P48V PSU power.
- Add MP5023 as P12V efuse (Driver exists but un-documented).
- Add PMBUS sensors as P12V Delta Module.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
 .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 45 ++++++++++++++++++-
 1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
index 98477792aa00..e486b9d78f61 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
@@ -284,15 +284,25 @@ &i2c10 {
 &i2c11 {
 	status = "okay";
 	power-sensor@10 {
-		compatible = "adi, adm1272";
+		compatible = "adi,adm1272";
 		reg = <0x10>;
 	};
 
+	power-sensor@11 {
+		compatible = "infineon,xdp710";
+		reg = <0x11>;
+	};
+
 	power-sensor@12 {
-		compatible = "adi, adm1272";
+		compatible = "adi,adm1272";
 		reg = <0x12>;
 	};
 
+	power-sensor@13 {
+		compatible = "infineon,xdp710";
+		reg = <0x13>;
+	};
+
 	gpio@20 {
 		compatible = "nxp,pca9555";
 		reg = <0x20>;
@@ -321,6 +331,17 @@ gpio@23 {
 		#gpio-cells = <2>;
 	};
 
+	power-sensor@40 {
+		compatible = "mps,mp5023";
+		reg = <0x40>;
+	};
+
+	adc@41 {
+		compatible = "richtek,rtq6056";
+		reg = <0x41>;
+		#io-channel-cells = <1>;
+	};
+
 	temperature-sensor@48 {
 		compatible = "ti,tmp75";
 		reg = <0x48>;
@@ -345,6 +366,26 @@ eeprom@54 {
 		compatible = "atmel,24c256";
 		reg = <0x54>;
 	};
+
+	power-sensor@62 {
+		compatible = "pmbus";
+		reg = <0x62>;
+	};
+
+	power-sensor@64 {
+		compatible = "pmbus";
+		reg = <0x64>;
+	};
+
+	power-sensor@65 {
+		compatible = "pmbus";
+		reg = <0x65>;
+	};
+
+	power-sensor@68 {
+		compatible = "pmbus";
+		reg = <0x68>;
+	};
 };
 
 &i2c12 {
-- 
2.25.1

Re: [PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2024-09-18 13:01:43

On 18/09/2024 11:54, Delphine CC Chiu wrote:
From: Ricky CX Wu <redacted>

Add support for hot-swap controller MPS MP5023.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++

Acked-by: Krzysztof Kozlowski <redacted>

Best regards,
Krzysztof

Re: [PATCH v2 1/3] dt-bindings: trivial-devices: support pmbus compatible string

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2024-09-18 13:03:09

On 18/09/2024 11:54, Delphine CC Chiu wrote:
From: Ricky CX Wu <redacted>

Add pmbus compatibale string for the Generic PMbus devices that could
be monitor by pmbus driver.
You need to explain more, provide background why we would like to accept
a generic compatible. And why a specific compatible cannot or should not
be used...

In general this is a no, you cannot have such compatibles for real hardware.

Best regards,
Krzysztof

Re: [PATCH v2 1/3] dt-bindings: trivial-devices: support pmbus compatible string

From: Guenter Roeck <linux@roeck-us.net>
Date: 2024-09-18 16:53:12

On 9/18/24 06:03, Krzysztof Kozlowski wrote:
On 18/09/2024 11:54, Delphine CC Chiu wrote:
quoted
From: Ricky CX Wu <redacted>

Add pmbus compatibale string for the Generic PMbus devices that could
be monitor by pmbus driver.
You need to explain more, provide background why we would like to accept
a generic compatible. And why a specific compatible cannot or should not
be used...

In general this is a no, you cannot have such compatibles for real hardware.
Agreed; affected chips should be listed explicitly in drivers/hwmon/pmbus/pmbus.c.

Guenter


Re: [PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

From: Guenter Roeck <linux@roeck-us.net>
Date: 2024-09-18 17:00:10

On 9/18/24 02:54, Delphine CC Chiu wrote:
From: Ricky CX Wu <redacted>

Add support for hot-swap controller MPS MP5023.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
--
The hardware monitoring mailing list was not copied, so I assume that
the expectation is that it will be applied through some other tree.

Acked-by: Guenter Roeck <linux@roeck-us.net>

Re: [PATCH v2 3/3] ARM: dts: aspeed: yosemite4: Add power module and ADC on Medusa Board

From: Andrew Jeffery <andrew@codeconstruct.com.au>
Date: 2024-09-19 01:22:43

Hi Ricky,

On Wed, 2024-09-18 at 17:54 +0800, Delphine CC Chiu wrote:
From: Ricky CX Wu <redacted>

Add RTQ6056 as 2nd source ADC sensor on Medusa Board.
Can you unpack why this is related in the commit message? I assume it's
for something like battery monitoring? An explanation would help
though.
Add power sensors on Medusa board:
- Add XDP710 as 2nd source HSC to monitor P48V PSU power.
- Add MP5023 as P12V efuse (Driver exists but un-documented).
- Add PMBUS sensors as P12V Delta Module.
Generally if you're listing multiple things the change does in the
commit message you should have split the patch up accordingly.

There's some good advice here:

https://docs.kernel.org/process/5.Posting.html#patch-preparation

and here:

https://github.com/axboe/liburing/blob/master/CONTRIBUTING.md?plain=1#L21-L32
quoted hunk
Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
 .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 45 ++++++++++++++++++-
 1 file changed, 43 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
index 98477792aa00..e486b9d78f61 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
@@ -284,15 +284,25 @@ &i2c10 {
 &i2c11 {
 	status = "okay";
 	power-sensor@10 {
-		compatible = "adi, adm1272";
+		compatible = "adi,adm1272";
 		reg = <0x10>;
 	};
This was outright busted. The hunk is a fix, as is the second instance
below. Please separate these out into their own patch and add a Fixes:
tag to it.
 
+	power-sensor@11 {
+		compatible = "infineon,xdp710";
+		reg = <0x11>;
+	};
+
 	power-sensor@12 {
-		compatible = "adi, adm1272";
+		compatible = "adi,adm1272";
(i.e. this one also)
quoted hunk
 		reg = <0x12>;
 	};
 
+	power-sensor@13 {
+		compatible = "infineon,xdp710";
+		reg = <0x13>;
+	};
+
 	gpio@20 {
 		compatible = "nxp,pca9555";
 		reg = <0x20>;
@@ -321,6 +331,17 @@ gpio@23 {
 		#gpio-cells = <2>;
 	};
 
+	power-sensor@40 {
+		compatible = "mps,mp5023";
+		reg = <0x40>;
+	};
+
+	adc@41 {
+		compatible = "richtek,rtq6056";
+		reg = <0x41>;
+		#io-channel-cells = <1>;
+	};
+
 	temperature-sensor@48 {
 		compatible = "ti,tmp75";
 		reg = <0x48>;
@@ -345,6 +366,26 @@ eeprom@54 {
 		compatible = "atmel,24c256";
 		reg = <0x54>;
 	};
+
+	power-sensor@62 {
+		compatible = "pmbus";
+		reg = <0x62>;
+	};
+
+	power-sensor@64 {
+		compatible = "pmbus";
+		reg = <0x64>;
+	};
+
+	power-sensor@65 {
+		compatible = "pmbus";
+		reg = <0x65>;
+	};
+
+	power-sensor@68 {
+		compatible = "pmbus";
+		reg = <0x68>;
+	};
See the discussion on your proposed DT binding document; I expect these
will need to change.

Andrew

Re: [PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

From: Andrew Jeffery <andrew@codeconstruct.com.au>
Date: 2024-09-19 01:24:21

On Wed, 2024-09-18 at 10:00 -0700, Guenter Roeck wrote:
On 9/18/24 02:54, Delphine CC Chiu wrote:
quoted
From: Ricky CX Wu <redacted>

Add support for hot-swap controller MPS MP5023.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
--
The hardware monitoring mailing list was not copied, so I assume that
the expectation is that it will be applied through some other tree.
We can take it through the BMC tree, but I'd prefer that the hardware
monitoring list were copied regardless.

Ricky: Please do so for v3 onwards.

Andrew

RE: [PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

From: Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@wiwynn.com>
Date: 2024-09-20 01:54:55

-----Original Message-----
From: Andrew Jeffery <andrew@codeconstruct.com.au>
Sent: Thursday, September 19, 2024 9:24 AM
To: Guenter Roeck <linux@roeck-us.net>; Delphine_CC_Chiu/WYHQ/Wiwynn
[off-list ref]; patrick@stwcx.xyz; Rob Herring
[off-list ref]; Krzysztof Kozlowski [off-list ref]; Conor Dooley
[off-list ref]
Cc: Ricky CX Wu <redacted>; Joel Stanley
[off-list ref]; Peter Yin [off-list ref]; Noah Wang
[off-list ref]; Javier Carrasco
[off-list ref]; Fabio Estevam [off-list ref];
Lukas Wunner [off-list ref]; Laurent Pinchart
[off-list ref]; devicetree@vger.kernel.org;
linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
linux-aspeed@lists.ozlabs.org
Subject: Re: [PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

 [External Sender]

 [External Sender]

On Wed, 2024-09-18 at 10:00 -0700, Guenter Roeck wrote:
quoted
On 9/18/24 02:54, Delphine CC Chiu wrote:
quoted
From: Ricky CX Wu <redacted>

Add support for hot-swap controller MPS MP5023.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
--
The hardware monitoring mailing list was not copied, so I assume that
the expectation is that it will be applied through some other tree.
We can take it through the BMC tree, but I'd prefer that the hardware
monitoring list were copied regardless.

Ricky: Please do so for v3 onwards.

Andrew
Hi Guenter & Andrew,

Would like to ask how to copy the hardware monitoring mailing list?
Should I just send the v3 patch with only this dt-bindings patch for MP5023
and it will be added in the mail automatically?

Regards.

Re: [PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

From: Andrew Jeffery <andrew@codeconstruct.com.au>
Date: 2024-09-23 01:09:10

On Fri, 2024-09-20 at 01:54 +0000, Delphine_CC_Chiu/WYHQ/Wiwynn wrote:
quoted
-----Original Message-----
From: Andrew Jeffery <andrew@codeconstruct.com.au>
Sent: Thursday, September 19, 2024 9:24 AM
To: Guenter Roeck <linux@roeck-us.net>; Delphine_CC_Chiu/WYHQ/Wiwynn
[off-list ref]; patrick@stwcx.xyz; Rob Herring
[off-list ref]; Krzysztof Kozlowski [off-list ref]; Conor Dooley
[off-list ref]
Cc: Ricky CX Wu <redacted>; Joel Stanley
[off-list ref]; Peter Yin [off-list ref]; Noah Wang
[off-list ref]; Javier Carrasco
[off-list ref]; Fabio Estevam [off-list ref];
Lukas Wunner [off-list ref]; Laurent Pinchart
[off-list ref]; devicetree@vger.kernel.org;
linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
linux-aspeed@lists.ozlabs.org
Subject: Re: [PATCH v2 2/3] dt-bindings: trivial-devices: support MPS MP5023

 [External Sender]

 [External Sender]

On Wed, 2024-09-18 at 10:00 -0700, Guenter Roeck wrote:
quoted
On 9/18/24 02:54, Delphine CC Chiu wrote:
quoted
From: Ricky CX Wu <redacted>

Add support for hot-swap controller MPS MP5023.

Signed-off-by: Ricky CX Wu <redacted>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
--
The hardware monitoring mailing list was not copied, so I assume that
the expectation is that it will be applied through some other tree.
We can take it through the BMC tree, but I'd prefer that the hardware
monitoring list were copied regardless.

Ricky: Please do so for v3 onwards.

Andrew
Hi Guenter & Andrew,

Would like to ask how to copy the hardware monitoring mailing list?
Not sure how best to answer this, but add it in the To: line for your
patches? 
Should I just send the v3 patch with only this dt-bindings patch for MP5023
and it will be added in the mail automatically?
Well, if whatever process you're already using isn't adding it
automatically, I doubt it's going to start doing so now.

You can add it using the `--to` option to `b4 send` or `git send-
email`, for instance.

The details for the hwmon list are here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS?h=v6.11#n9836

Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help