linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Update the device tree for Ampere's Mt.Mitchell BMC
@ 2023-04-25  6:57 Chanh Nguyen
  2023-04-25  6:57 ` [PATCH 1/4] ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9 Chanh Nguyen
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Chanh Nguyen @ 2023-04-25  6:57 UTC (permalink / raw)
  To: OpenBMC Maillist, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Chanh Nguyen

Updates the device tree to support some features on Ampere's
Mt.Mitchell BMC.

Chanh Nguyen (4):
  ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9
  ARM: dts: aspeed: mtmitchell: Add I2C Fan
  ARM: dts: aspeed: mtmitchell: Update ADC sensors for Mt.Mitchell DVT
    systems
  ARM: dts: aspeed: mtmitchell: Add MCTP

 .../boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 138 ++++++++++++------
 1 file changed, 97 insertions(+), 41 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9
  2023-04-25  6:57 [PATCH 0/4] Update the device tree for Ampere's Mt.Mitchell BMC Chanh Nguyen
@ 2023-04-25  6:57 ` Chanh Nguyen
  2023-04-25  6:57 ` [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan Chanh Nguyen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Chanh Nguyen @ 2023-04-25  6:57 UTC (permalink / raw)
  To: OpenBMC Maillist, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Chanh Nguyen

The BMC UART8 and UART9 were connected to the Secpro and Mpro console
of socket S1 on the Mt.Mitchell system.

Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
index 1e0e88465254..e79f56208b89 100644
--- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
@@ -9,6 +9,10 @@
 / {
 	model = "Ampere Mt.Mitchell BMC";
 	compatible = "ampere,mtmitchell-bmc", "aspeed,ast2600";
+	aliases {
+		serial7 = &uart8;
+		serial8 = &uart9;
+	};
 
 	chosen {
 		stdout-path = &uart5;
@@ -307,6 +311,14 @@
 	status = "okay";
 };
 
+&uart8 {
+	status = "okay";
+};
+
+&uart9 {
+	status = "okay";
+};
+
 &i2c0 {
 	status = "okay";
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
  2023-04-25  6:57 [PATCH 0/4] Update the device tree for Ampere's Mt.Mitchell BMC Chanh Nguyen
  2023-04-25  6:57 ` [PATCH 1/4] ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9 Chanh Nguyen
@ 2023-04-25  6:57 ` Chanh Nguyen
  2023-04-25 13:15   ` Krzysztof Kozlowski
  2023-04-25  6:57 ` [PATCH 3/4] ARM: dts: aspeed: mtmitchell: Update ADC sensors for Mt.Mitchell DVT systems Chanh Nguyen
  2023-04-25  6:57 ` [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP Chanh Nguyen
  3 siblings, 1 reply; 11+ messages in thread
From: Chanh Nguyen @ 2023-04-25  6:57 UTC (permalink / raw)
  To: OpenBMC Maillist, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Chanh Nguyen

Add the MAX31790 node as a Fan I2C controller. It controls the
TACH and PWM for Fan Mt.Mitchell system.

Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
index e79f56208b89..6455cf80da0e 100644
--- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
@@ -477,6 +477,18 @@
 			line-name = "bmc-ocp0-en-n";
 		};
 	};
+
+	max31790@20 {
+		compatible = "maxim,max31790";
+		reg = <0x20>;
+		pwm-to-tach = <0 0 0 0 1 1>;
+	};
+
+	max31790@2f {
+		compatible = "maxim,max31790";
+		reg = <0x2f>;
+		pwm-to-tach = <0 0 0 0 1 1>;
+	};
 };
 
 &i2c9 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] ARM: dts: aspeed: mtmitchell: Update ADC sensors for Mt.Mitchell DVT systems
  2023-04-25  6:57 [PATCH 0/4] Update the device tree for Ampere's Mt.Mitchell BMC Chanh Nguyen
  2023-04-25  6:57 ` [PATCH 1/4] ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9 Chanh Nguyen
  2023-04-25  6:57 ` [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan Chanh Nguyen
@ 2023-04-25  6:57 ` Chanh Nguyen
  2023-04-25  6:57 ` [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP Chanh Nguyen
  3 siblings, 0 replies; 11+ messages in thread
From: Chanh Nguyen @ 2023-04-25  6:57 UTC (permalink / raw)
  To: OpenBMC Maillist, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Chanh Nguyen

Change to use I2C ADC controller (ltc2497) for Mt.Mitchell DVT and
later hardware.

Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
 .../boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 107 +++++++++++-------
 1 file changed, 66 insertions(+), 41 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
index 6455cf80da0e..0b5ea8620063 100644
--- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
@@ -65,174 +65,192 @@
 
 	adc0mux: adc0mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 0>;
+		io-channels = <&adc_i2c_0 0>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc1mux: adc1mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 1>;
+		io-channels = <&adc_i2c_0 1>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc2mux: adc2mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 2>;
+		io-channels = <&adc_i2c_0 2>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc3mux: adc3mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 3>;
+		io-channels = <&adc_i2c_0 3>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc4mux: adc4mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 4>;
+		io-channels = <&adc_i2c_0 4>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc5mux: adc5mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 5>;
+		io-channels = <&adc_i2c_0 5>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc6mux: adc6mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 6>;
+		io-channels = <&adc_i2c_0 6>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc7mux: adc7mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc0 7>;
+		io-channels = <&adc_i2c_0 7>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc8mux: adc8mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 0>;
+		io-channels = <&adc_i2c_0 8>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc9mux: adc9mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 1>;
+		io-channels = <&adc_i2c_0 9>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc10mux: adc10mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 2>;
+		io-channels = <&adc_i2c_0 10>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc11mux: adc11mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 3>;
+		io-channels = <&adc_i2c_0 11>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc12mux: adc12mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 4>;
+		io-channels = <&adc_i2c_0 12>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc13mux: adc13mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 5>;
+		io-channels = <&adc_i2c_0 13>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc14mux: adc14mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 6>;
+		io-channels = <&adc_i2c_0 14>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	adc15mux: adc15mux {
 		compatible = "io-channel-mux";
-		io-channels = <&adc1 7>;
+		io-channels = <&adc_i2c_0 15>;
 		#io-channel-cells = <1>;
 		io-channel-names = "parent";
 		mux-controls = <&gpioI5mux>;
+		settle-time-us = <10000>;
 		channels = "s0", "s1";
 	};
 
 	iio-hwmon {
 		compatible = "iio-hwmon";
-		io-channels = <&adc0mux 0>, <&adc0mux 1>,
-			<&adc1mux 0>, <&adc1mux 1>,
-			<&adc2mux 0>, <&adc2mux 1>,
-			<&adc3mux 0>, <&adc3mux 1>,
-			<&adc4mux 0>, <&adc4mux 1>,
-			<&adc5mux 0>, <&adc5mux 1>,
-			<&adc6mux 0>, <&adc6mux 1>,
-			<&adc7mux 0>, <&adc7mux 1>,
-			<&adc8mux 0>, <&adc8mux 1>,
-			<&adc9mux 0>, <&adc9mux 1>,
-			<&adc10mux 0>, <&adc10mux 1>,
-			<&adc11mux 0>, <&adc11mux 1>,
-			<&adc12mux 0>, <&adc12mux 1>,
-			<&adc13mux 0>, <&adc13mux 1>,
-			<&adc14mux 0>, <&adc14mux 1>,
-			<&adc15mux 0>, <&adc15mux 1>,
-			<&adc_i2c 0>, <&adc_i2c 1>,
-			<&adc_i2c 2>, <&adc_i2c 3>,
-			<&adc_i2c 4>, <&adc_i2c 5>,
-			<&adc_i2c 6>, <&adc_i2c 7>,
-			<&adc_i2c 8>, <&adc_i2c 9>,
-			<&adc_i2c 10>, <&adc_i2c 11>,
-			<&adc_i2c 12>, <&adc_i2c 13>,
-			<&adc_i2c 14>, <&adc_i2c 15>;
+		io-channels =	<&adc0mux 0>, <&adc0mux 1>,
+				<&adc1mux 0>, <&adc1mux 1>,
+				<&adc2mux 0>, <&adc2mux 1>,
+				<&adc3mux 0>, <&adc3mux 1>,
+				<&adc4mux 0>, <&adc4mux 1>,
+				<&adc5mux 0>, <&adc5mux 1>,
+				<&adc6mux 0>, <&adc6mux 1>,
+				<&adc7mux 0>, <&adc7mux 1>,
+				<&adc8mux 0>, <&adc8mux 1>,
+				<&adc9mux 0>, <&adc9mux 1>,
+				<&adc10mux 0>, <&adc10mux 1>,
+				<&adc11mux 0>, <&adc11mux 1>,
+				<&adc12mux 0>, <&adc12mux 1>,
+				<&adc13mux 0>, <&adc13mux 1>,
+				<&adc14mux 0>, <&adc14mux 1>,
+				<&adc15mux 0>, <&adc15mux 1>,
+				<&adc_i2c_1 0>, <&adc_i2c_1 1>,
+				<&adc_i2c_1 2>, <&adc_i2c_1 3>,
+				<&adc_i2c_1 4>, <&adc_i2c_1 5>,
+				<&adc_i2c_1 6>, <&adc_i2c_1 7>,
+				<&adc_i2c_1 8>, <&adc_i2c_1 9>,
+				<&adc_i2c_1 10>, <&adc_i2c_1 11>,
+				<&adc_i2c_1 12>, <&adc_i2c_1 13>,
+				<&adc_i2c_1 14>, <&adc_i2c_1 15>,
+				<&adc0 0>, <&adc0 1>,
+				<&adc0 2>;
 	};
 };
 
@@ -353,7 +371,14 @@
 &i2c4 {
 	status = "okay";
 
-	adc_i2c: adc@16 {
+	adc_i2c_0: adc@14 {
+		compatible = "lltc,ltc2497";
+		reg = <0x14>;
+		vref-supply = <&voltage_mon_reg>;
+		#io-channel-cells = <1>;
+	 };
+
+	adc_i2c_1: adc@16 {
 		compatible = "lltc,ltc2497";
 		reg = <0x16>;
 		vref-supply = <&voltage_mon_reg>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP
  2023-04-25  6:57 [PATCH 0/4] Update the device tree for Ampere's Mt.Mitchell BMC Chanh Nguyen
                   ` (2 preceding siblings ...)
  2023-04-25  6:57 ` [PATCH 3/4] ARM: dts: aspeed: mtmitchell: Update ADC sensors for Mt.Mitchell DVT systems Chanh Nguyen
@ 2023-04-25  6:57 ` Chanh Nguyen
  2023-04-27  1:04   ` Andrew Jeffery
  3 siblings, 1 reply; 11+ messages in thread
From: Chanh Nguyen @ 2023-04-25  6:57 UTC (permalink / raw)
  To: OpenBMC Maillist, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: Chanh Nguyen

Enable MCTP driver on I2C3 bus for MCTP transaction

Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
index 0b5ea8620063..33e06eafed31 100644
--- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
@@ -366,6 +366,13 @@
 
 &i2c3 {
 	status = "okay";
+	bus-frequency = <1000000>;
+	multi-master;
+	mctp-controller;
+	mctp@10 {
+		compatible = "mctp-i2c-controller";
+		reg = <0x10>;
+	};
 };
 
 &i2c4 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
  2023-04-25  6:57 ` [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan Chanh Nguyen
@ 2023-04-25 13:15   ` Krzysztof Kozlowski
  2023-05-07  8:20     ` Chanh Nguyen
  0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-25 13:15 UTC (permalink / raw)
  To: Chanh Nguyen, OpenBMC Maillist, Rob Herring, Krzysztof Kozlowski,
	Joel Stanley, Andrew Jeffery, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel

On 25/04/2023 08:57, Chanh Nguyen wrote:
> Add the MAX31790 node as a Fan I2C controller. It controls the
> TACH and PWM for Fan Mt.Mitchell system.
> 
> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
> index e79f56208b89..6455cf80da0e 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
> @@ -477,6 +477,18 @@
>  			line-name = "bmc-ocp0-en-n";
>  		};
>  	};
> +
> +	max31790@20 {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +		compatible = "maxim,max31790";

Unfortunately the compatible is undocumented.

Please run scripts/checkpatch.pl and fix reported warnings.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP
  2023-04-25  6:57 ` [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP Chanh Nguyen
@ 2023-04-27  1:04   ` Andrew Jeffery
  2023-05-07  8:31     ` Chanh Nguyen
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Jeffery @ 2023-04-27  1:04 UTC (permalink / raw)
  To: Chanh Nguyen, OpenBMC Maillist, Rob Herring, Krzysztof Kozlowski,
	Joel Stanley, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel



On Tue, 25 Apr 2023, at 16:27, Chanh Nguyen wrote:
> Enable MCTP driver on I2C3 bus for MCTP transaction
>
> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
> ---
>  arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts 
> b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
> index 0b5ea8620063..33e06eafed31 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
> @@ -366,6 +366,13 @@
> 
>  &i2c3 {
>  	status = "okay";
> +	bus-frequency = <1000000>;
> +	multi-master;
> +	mctp-controller;
> +	mctp@10 {
> +		compatible = "mctp-i2c-controller";
> +		reg = <0x10>;

This needs to be `reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;`

Andrew

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
  2023-04-25 13:15   ` Krzysztof Kozlowski
@ 2023-05-07  8:20     ` Chanh Nguyen
  2023-05-07  8:23       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Chanh Nguyen @ 2023-05-07  8:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Chanh Nguyen, OpenBMC Maillist, Rob Herring,
	Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel


On 25/04/2023 20:15, Krzysztof Kozlowski wrote:
> On 25/04/2023 08:57, Chanh Nguyen wrote:
>> Add the MAX31790 node as a Fan I2C controller. It controls the
>> TACH and PWM for Fan Mt.Mitchell system.
>>
>> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
>> ---
>>   arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>> index e79f56208b89..6455cf80da0e 100644
>> --- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>> +++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>> @@ -477,6 +477,18 @@
>>   			line-name = "bmc-ocp0-en-n";
>>   		};
>>   	};
>> +
>> +	max31790@20 {
> 
> Node names should be generic.
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

Thank Krzysztof,

I think these node names should be "fan-i2c-0" and "fan-i2c-1". Do you 
have any other idea ?

> 
>> +		compatible = "maxim,max31790";
> 
> Unfortunately the compatible is undocumented.
> 
> Please run scripts/checkpatch.pl and fix reported warnings.
> 
> Best regards,
> Krzysztof
> 

Yes Krzysztof,

This compatible has not yes documented.

Should I push a document for max31790 to 
./Documentation/devicetree/bindings/ or ask to maintainer (Guenter Roeck 
<linux@roeck-us.net> or Jean Delvare <jdelvare@suse.com>) ?

Best regards,
Chanh Ng

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
  2023-05-07  8:20     ` Chanh Nguyen
@ 2023-05-07  8:23       ` Krzysztof Kozlowski
  2023-05-07  9:39         ` Chanh Nguyen
  0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-07  8:23 UTC (permalink / raw)
  To: Chanh Nguyen, Chanh Nguyen, OpenBMC Maillist, Rob Herring,
	Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel

On 07/05/2023 10:20, Chanh Nguyen wrote:
> 
> On 25/04/2023 20:15, Krzysztof Kozlowski wrote:
>> On 25/04/2023 08:57, Chanh Nguyen wrote:
>>> Add the MAX31790 node as a Fan I2C controller. It controls the
>>> TACH and PWM for Fan Mt.Mitchell system.
>>>
>>> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
>>> ---
>>>   arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++
>>>   1 file changed, 12 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>>> index e79f56208b89..6455cf80da0e 100644
>>> --- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>>> +++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>>> @@ -477,6 +477,18 @@
>>>   			line-name = "bmc-ocp0-en-n";
>>>   		};
>>>   	};
>>> +
>>> +	max31790@20 {
>>
>> Node names should be generic.
>> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> 
> Thank Krzysztof,
> 
> I think these node names should be "fan-i2c-0" and "fan-i2c-1". Do you 
> have any other idea ?

i2c-0 is not generic. This should be either fan or fan-controller,
depending what this is.
> 
>>
>>> +		compatible = "maxim,max31790";
>>
>> Unfortunately the compatible is undocumented.
>>
>> Please run scripts/checkpatch.pl and fix reported warnings.
>>
>> Best regards,
>> Krzysztof
>>
> 
> Yes Krzysztof,
> 
> This compatible has not yes documented.
> 
> Should I push a document for max31790 to 
> ./Documentation/devicetree/bindings/ or ask to maintainer (Guenter Roeck 
> <linux@roeck-us.net> or Jean Delvare <jdelvare@suse.com>) ?

Check on lore.kernel.org if there is ongoing work. If there is no, then
please submit new the bindings (in DT schema). Maintainers are not for
writing your code, so it's you or some other developer who should do it.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP
  2023-04-27  1:04   ` Andrew Jeffery
@ 2023-05-07  8:31     ` Chanh Nguyen
  0 siblings, 0 replies; 11+ messages in thread
From: Chanh Nguyen @ 2023-05-07  8:31 UTC (permalink / raw)
  To: Andrew Jeffery, Chanh Nguyen, OpenBMC Maillist, Rob Herring,
	Krzysztof Kozlowski, Joel Stanley, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel



On 27/04/2023 08:04, Andrew Jeffery wrote:
> 
> 
> On Tue, 25 Apr 2023, at 16:27, Chanh Nguyen wrote:
>> Enable MCTP driver on I2C3 bus for MCTP transaction
>>
>> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
>> ---
>>   arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>> b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>> index 0b5ea8620063..33e06eafed31 100644
>> --- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>> +++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>> @@ -366,6 +366,13 @@
>>
>>   &i2c3 {
>>   	status = "okay";
>> +	bus-frequency = <1000000>;
>> +	multi-master;
>> +	mctp-controller;
>> +	mctp@10 {
>> +		compatible = "mctp-i2c-controller";
>> +		reg = <0x10>;
> 
> This needs to be `reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;`
> 
> Andrew

Thank Andrew, I will update that in PATCH v2.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan
  2023-05-07  8:23       ` Krzysztof Kozlowski
@ 2023-05-07  9:39         ` Chanh Nguyen
  0 siblings, 0 replies; 11+ messages in thread
From: Chanh Nguyen @ 2023-05-07  9:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Chanh Nguyen, OpenBMC Maillist, Rob Herring,
	Krzysztof Kozlowski, Joel Stanley, Andrew Jeffery, devicetree,
	linux-arm-kernel, linux-aspeed, linux-kernel



On 07/05/2023 15:23, Krzysztof Kozlowski wrote:
> On 07/05/2023 10:20, Chanh Nguyen wrote:
>>
>> On 25/04/2023 20:15, Krzysztof Kozlowski wrote:
>>> On 25/04/2023 08:57, Chanh Nguyen wrote:
>>>> Add the MAX31790 node as a Fan I2C controller. It controls the
>>>> TACH and PWM for Fan Mt.Mitchell system.
>>>>
>>>> Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
>>>> ---
>>>>    arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts | 12 ++++++++++++
>>>>    1 file changed, 12 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>>>> index e79f56208b89..6455cf80da0e 100644
>>>> --- a/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>>>> +++ b/arch/arm/boot/dts/aspeed-bmc-ampere-mtmitchell.dts
>>>> @@ -477,6 +477,18 @@
>>>>    			line-name = "bmc-ocp0-en-n";
>>>>    		};
>>>>    	};
>>>> +
>>>> +	max31790@20 {
>>>
>>> Node names should be generic.
>>> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
>>
>> Thank Krzysztof,
>>
>> I think these node names should be "fan-i2c-0" and "fan-i2c-1". Do you
>> have any other idea ?
> 
> i2c-0 is not generic. This should be either fan or fan-controller,
> depending what this is.

Thank Krzysztof! I will update node name is "fan-controller" in PATCH v2.

>>
>>>
>>>> +		compatible = "maxim,max31790";
>>>
>>> Unfortunately the compatible is undocumented.
>>>
>>> Please run scripts/checkpatch.pl and fix reported warnings.
>>>
>>> Best regards,
>>> Krzysztof
>>>
>>
>> Yes Krzysztof,
>>
>> This compatible has not yes documented.
>>
>> Should I push a document for max31790 to
>> ./Documentation/devicetree/bindings/ or ask to maintainer (Guenter Roeck
>> <linux@roeck-us.net> or Jean Delvare <jdelvare@suse.com>) ?
> 
> Check on lore.kernel.org if there is ongoing work. If there is no, then
> please submit new the bindings (in DT schema). Maintainers are not for
> writing your code, so it's you or some other developer who should do it.
> 
> Best regards,
> Krzysztof
> 

Thank Krzysztof!

I checked on lore.kernel.org but no submit is in-progress for that. I'll 
submit new the binding document for max31790.

Now, Do I need to remove the "[PATCH 2/4] ARM: dts: aspeed: mtmitchell: 
Add I2C Fan" from PATCH v2?

And will push again "ARM: dts: aspeed: mtmitchell: Add I2C Fan" commit 
once max31790 binding document was available upstream.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-05-07  9:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25  6:57 [PATCH 0/4] Update the device tree for Ampere's Mt.Mitchell BMC Chanh Nguyen
2023-04-25  6:57 ` [PATCH 1/4] ARM: dts: aspeed: mtmitchell: Enable the BMC UART8 and UART9 Chanh Nguyen
2023-04-25  6:57 ` [PATCH 2/4] ARM: dts: aspeed: mtmitchell: Add I2C Fan Chanh Nguyen
2023-04-25 13:15   ` Krzysztof Kozlowski
2023-05-07  8:20     ` Chanh Nguyen
2023-05-07  8:23       ` Krzysztof Kozlowski
2023-05-07  9:39         ` Chanh Nguyen
2023-04-25  6:57 ` [PATCH 3/4] ARM: dts: aspeed: mtmitchell: Update ADC sensors for Mt.Mitchell DVT systems Chanh Nguyen
2023-04-25  6:57 ` [PATCH 4/4] ARM: dts: aspeed: mtmitchell: Add MCTP Chanh Nguyen
2023-04-27  1:04   ` Andrew Jeffery
2023-05-07  8:31     ` Chanh Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).