diff mbox series

[v11,25/27] ARM: dts: aspeed: yosemite4: add RTQ6056 support

Message ID 20240723092310.3565410-26-Delphine_CC_Chiu@wiwynn.com (mailing list archive)
State New, archived
Headers show
Series Add i2c-mux and eeprom devices for Meta Yosemite 4 | expand

Commit Message

Delphine CC Chiu July 23, 2024, 9:23 a.m. UTC
Add RTQ6056 (spider board 3rd source) support in yosemite4 DTS.

Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
 .../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Patrick Williams July 29, 2024, 10:03 p.m. UTC | #1
On Tue, Jul 23, 2024 at 05:23:06PM +0800, Delphine CC Chiu wrote:
> Add RTQ6056 (spider board 3rd source) support in yosemite4 DTS.
> 
> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> ---
>  .../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts  | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 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 f73719b3c2f1..03a1e41312e3 100644
> --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> @@ -1240,35 +1240,35 @@ adc@37 {
>  	};
>  
>  	power-sensor@40 {
> -		compatible = "ti,ina233";
> +		compatible = "ti,ina233", "richtek,rtq6056";

Is this legal to have two chips both listed as compatible?  I thought
this approach has been rejected before.

>  		reg = <0x40>;
>  		resistor-calibration = /bits/ 16 <0x0a00>;
>  		current-lsb= /bits/ 16 <0x0001>;
>  	};
>  
>  	power-sensor@41 {
> -		compatible = "ti,ina233";
> +		compatible = "ti,ina233", "richtek,rtq6056";
>  		reg = <0x41>;
>  		resistor-calibration = /bits/ 16 <0x0a00>;
>  		current-lsb= /bits/ 16 <0x0001>;
>  	};
>  
>  	power-sensor@42 {
> -		compatible = "ti,ina233";
> +		compatible = "ti,ina233", "richtek,rtq6056";
>  		reg = <0x42>;
>  		resistor-calibration = /bits/ 16 <0x0a00>;
>  		current-lsb= /bits/ 16 <0x0001>;
>  	};
>  
>  	power-sensor@43 {
> -		compatible = "ti,ina233";
> +		compatible = "ti,ina233", "richtek,rtq6056";
>  		reg = <0x43>;
>  		resistor-calibration = /bits/ 16 <0x0a00>;
>  		current-lsb= /bits/ 16 <0x0001>;
>  	};
>  
>  	power-sensor@44 {
> -		compatible = "ti,ina233";
> +		compatible = "ti,ina233", "richtek,rtq6056";
>  		reg = <0x44>;
>  		resistor-calibration = /bits/ 16 <0x0a00>;
>  		current-lsb= /bits/ 16 <0x0001>;
> -- 
> 2.25.1
>
Andrew Jeffery July 30, 2024, 3:56 a.m. UTC | #2
On Mon, 2024-07-29 at 17:03 -0500, Patrick Williams wrote:
> On Tue, Jul 23, 2024 at 05:23:06PM +0800, Delphine CC Chiu wrote:
> > Add RTQ6056 (spider board 3rd source) support in yosemite4 DTS.
> > 
> > Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> > ---
> >  .../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts  | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 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 f73719b3c2f1..03a1e41312e3 100644
> > --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > @@ -1240,35 +1240,35 @@ adc@37 {
> >  	};
> >  
> >  	power-sensor@40 {
> > -		compatible = "ti,ina233";
> > +		compatible = "ti,ina233", "richtek,rtq6056";
> 
> Is this legal to have two chips both listed as compatible?  I thought
> this approach has been rejected before.

It depends on the circumstances. Does one have a superset of the
functionality of the other?

https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#compatible

Andrew
Krzysztof Kozlowski July 30, 2024, 6:04 a.m. UTC | #3
On 30/07/2024 00:03, Patrick Williams wrote:
> On Tue, Jul 23, 2024 at 05:23:06PM +0800, Delphine CC Chiu wrote:
>> Add RTQ6056 (spider board 3rd source) support in yosemite4 DTS.
>>
>> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
>> ---
>>  .../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts  | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 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 f73719b3c2f1..03a1e41312e3 100644
>> --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
>> +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
>> @@ -1240,35 +1240,35 @@ adc@37 {
>>  	};
>>  
>>  	power-sensor@40 {
>> -		compatible = "ti,ina233";
>> +		compatible = "ti,ina233", "richtek,rtq6056";
> 
> Is this legal to have two chips both listed as compatible?  I thought
> this approach has been rejected before.
> 

Testing would tell... This was clearly not tested and is just ridiculous.

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).


Best regards,
Krzysztof
diff mbox series

Patch

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 f73719b3c2f1..03a1e41312e3 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
@@ -1240,35 +1240,35 @@  adc@37 {
 	};
 
 	power-sensor@40 {
-		compatible = "ti,ina233";
+		compatible = "ti,ina233", "richtek,rtq6056";
 		reg = <0x40>;
 		resistor-calibration = /bits/ 16 <0x0a00>;
 		current-lsb= /bits/ 16 <0x0001>;
 	};
 
 	power-sensor@41 {
-		compatible = "ti,ina233";
+		compatible = "ti,ina233", "richtek,rtq6056";
 		reg = <0x41>;
 		resistor-calibration = /bits/ 16 <0x0a00>;
 		current-lsb= /bits/ 16 <0x0001>;
 	};
 
 	power-sensor@42 {
-		compatible = "ti,ina233";
+		compatible = "ti,ina233", "richtek,rtq6056";
 		reg = <0x42>;
 		resistor-calibration = /bits/ 16 <0x0a00>;
 		current-lsb= /bits/ 16 <0x0001>;
 	};
 
 	power-sensor@43 {
-		compatible = "ti,ina233";
+		compatible = "ti,ina233", "richtek,rtq6056";
 		reg = <0x43>;
 		resistor-calibration = /bits/ 16 <0x0a00>;
 		current-lsb= /bits/ 16 <0x0001>;
 	};
 
 	power-sensor@44 {
-		compatible = "ti,ina233";
+		compatible = "ti,ina233", "richtek,rtq6056";
 		reg = <0x44>;
 		resistor-calibration = /bits/ 16 <0x0a00>;
 		current-lsb= /bits/ 16 <0x0001>;