Skip to contentSkip to conversation

yosemite4: Add power module and ADC on Medusa Board

PATCH In review Delphine CC Chiu 4 participants 12 messages Sep 18, 2024 – Sep 23, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover yosemite4: Add power module and ADC on Medusa Board

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(-)
Signature · 1 line
2.25.1
#1 lore raw

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

From: Ricky CX Wu <[email protected]>

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

---
 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +2 -0
index 8a9a00705b23..cbb9b94e5b3b 100644
@@ -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
Signature · 1 line
2.25.1
#2 lore raw

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

Quoted 5 lines · Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

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

#3 lore raw

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

Quoted 7 lines · Krzysztof Kozlowski
Quoted 5 lines · Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

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

Quoted 6 lines

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

#4 lore raw

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

In reply to Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

Add support for hot-swap controller MPS MP5023.

---
 Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/trivial-devices.yaml +2 -0
index cbb9b94e5b3b..c3253ea389d4 100644
@@ -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
Signature · 1 line
2.25.1
Acked-by on v2 2/3
#6 lore raw

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

In reply to Delphine CC Chiu
Quoted 7 lines · Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

Add support for hot-swap controller MPS MP5023.

--

The hardware monitoring mailing list was not copied, so I assume that the expectation is that it will be applied through some other tree.

maintainer
#7 lore raw

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

Quoted 11 lines · Guenter Roeck
Quoted 7 lines · Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

Add support for hot-swap controller MPS MP5023.

--

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

#8 lore raw

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

Quoted 36 lines

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

[External Sender]

[External Sender]

Quoted 11 lines · Guenter Roeck
Quoted 7 lines · Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

Add support for hot-swap controller MPS MP5023.

--

The hardware monitoring mailing list was not copied, so I assume that the expectation is that it will be applied through some other tree.

Quoted 6 lines

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.

maintainer
#9 lore raw

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

Quoted 38 lines · Delphine_CC_Chiu/WYHQ/Wiwynn
Quoted 38 lines

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

[External Sender]

[External Sender]

Quoted 11 lines · Guenter Roeck
Quoted 7 lines · Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

Add support for hot-swap controller MPS MP5023.

--

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.

Quoted 6 lines
Quoted 3 lines

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?

Quoted 2 lines

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

#10 lore raw

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

In reply to Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

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.

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

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

Hi Ricky,

Quoted 3 lines · Delphine CC Chiu

From: Ricky CX Wu <[email protected]>

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.

Quoted 4 lines

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 12 lines
---
 .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 45 ++++++++++++++++++-
 1 file changed, 43 insertions(+), 2 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +0 -0
index 98477792aa00..e486b9d78f61 100644

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts &i2c10 { · line 289

Quoted 7 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +1 -1
@@ -284,15 +284,25 @@ &i2c10 {
 &i2c11 {
 	status = "okay";
 	power-sensor at 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.

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts &i2c10 { · line 297

Quoted 9 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +6 -1
+	power-sensor at 11 {
+		compatible = "infineon,xdp710";
+		reg = <0x11>;
+	};
+
 	power-sensor at 12 {
-		compatible = "adi, adm1272";
+		compatible = "adi,adm1272";

(i.e. this one also)

Quoted 43 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +26 -0
 		reg = <0x12>;
 	};
 
+	power-sensor at 13 {
+		compatible = "infineon,xdp710";
+		reg = <0x13>;
+	};
+
 	gpio at 20 {
 		compatible = "nxp,pca9555";
 		reg = <0x20>;
@@ -321,6 +331,17 @@ gpio at 23 {
 		#gpio-cells = <2>;
 	};
 
+	power-sensor at 40 {
+		compatible = "mps,mp5023";
+		reg = <0x40>;
+	};
+
+	adc at 41 {
+		compatible = "richtek,rtq6056";
+		reg = <0x41>;
+		#io-channel-cells = <1>;
+	};
+
 	temperature-sensor at 48 {
 		compatible = "ti,tmp75";
 		reg = <0x48>;
@@ -345,6 +366,26 @@ eeprom at 54 {
 		compatible = "atmel,24c256";
 		reg = <0x54>;
 	};
+
+	power-sensor at 62 {
+		compatible = "pmbus";
+		reg = <0x62>;
+	};
+
+	power-sensor at 64 {
+		compatible = "pmbus";
+		reg = <0x64>;
+	};

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts eeprom at 54 { · line 388

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +10 -0
+
+	power-sensor at 65 {
+		compatible = "pmbus";
+		reg = <0x65>;
+	};
+
+	power-sensor at 68 {
+		compatible = "pmbus";
+		reg = <0x68>;
+	};

See the discussion on your proposed DT binding document; I expect these will need to change.

Andrew