* [PATCH v2 1/5] ARM: dts: aspeed: mtjade, mtmitchell: Add OCP temperature sensors
2024-08-06 7:18 [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Chanh Nguyen
@ 2024-08-06 7:18 ` Chanh Nguyen
2024-08-06 7:18 ` [PATCH v2 2/5] ARM: dts: aspeed: mtmitchell: Add I2C temperature sensor alias ports Chanh Nguyen
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chanh Nguyen @ 2024-08-06 7:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
linux-kernel, OpenBMC Maillist, Open Source Submission
Cc: Phong Vo, Thang Nguyen, Quan Nguyen, Chanh Nguyen
Define I2C alias ports from I2C Switch 0x70 at BMC I2C5.
Add the tmp421 sensors via the I2C alias ports as OCP device
temperature sensors.
Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
Changes in v2:
- None
---
.../dts/aspeed/aspeed-bmc-ampere-mtjade.dts | 16 +++++++++++
.../aspeed/aspeed-bmc-ampere-mtmitchell.dts | 28 +++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjade.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjade.dts
index 8ab5f301f926..8102f41d1d15 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjade.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtjade.dts
@@ -49,6 +49,11 @@ aliases {
*/
i2c80 = &nvme_m2_0;
i2c81 = &nvme_m2_1;
+
+ /*
+ * i2c bus 82 assigned to OCP slot
+ */
+ i2c82 = &ocpslot;
};
chosen {
@@ -420,6 +425,17 @@ i2c-mux@70 {
reg = <0x70>;
i2c-mux-idle-disconnect;
+ ocpslot: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+
+ ocpslot_temp: temperature-sensor@1f {
+ compatible = "ti,tmp421";
+ reg = <0x1f>;
+ };
+ };
+
nvmeslot_0_7: i2c@3 {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
index 3c8925034a8c..3a97e88278d5 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
@@ -15,6 +15,12 @@ aliases {
serial7 = &uart8;
serial8 = &uart9;
+ /*
+ * i2c bus 30-31 assigned to OCP slot 0-1
+ */
+ i2c30 = &ocpslot_0;
+ i2c31 = &ocpslot_1;
+
/*
* I2C NVMe alias port
*/
@@ -515,6 +521,28 @@ i2c-mux@70 {
#size-cells = <0>;
reg = <0x70>;
i2c-mux-idle-disconnect;
+
+ ocpslot_0: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+
+ ocpslot_0_temp: temperature-sensor@1f {
+ compatible = "ti,tmp421";
+ reg = <0x1f>;
+ };
+ };
+
+ ocpslot_1: i2c@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x1>;
+
+ ocpslot_1_temp: temperature-sensor@1f {
+ compatible = "ti,tmp421";
+ reg = <0x1f>;
+ };
+ };
};
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 2/5] ARM: dts: aspeed: mtmitchell: Add I2C temperature sensor alias ports
2024-08-06 7:18 [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Chanh Nguyen
2024-08-06 7:18 ` [PATCH v2 1/5] ARM: dts: aspeed: mtjade, mtmitchell: Add OCP temperature sensors Chanh Nguyen
@ 2024-08-06 7:18 ` Chanh Nguyen
2024-08-06 7:18 ` [PATCH v2 3/5] ARM: dts: aspeed: mtmitchell: Add Riser cards Chanh Nguyen
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chanh Nguyen @ 2024-08-06 7:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
linux-kernel, OpenBMC Maillist, Open Source Submission
Cc: Phong Vo, Thang Nguyen, Quan Nguyen, Chanh Nguyen
Add the I2C alias ports to read temperature sensors via channels
of the I2C muxes.
Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
Changes in v2:
- None
---
arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
index 3a97e88278d5..1679911e4fd8 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
@@ -15,6 +15,14 @@ aliases {
serial7 = &uart8;
serial8 = &uart9;
+ /*
+ * I2C temperature alias port
+ */
+ i2c20 = &i2c4_bus70_chn0;
+ i2c21 = &i2c4_bus70_chn1;
+ i2c22 = &i2c4_bus70_chn2;
+ i2c23 = &i2c4_bus70_chn3;
+
/*
* i2c bus 30-31 assigned to OCP slot 0-1
*/
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 3/5] ARM: dts: aspeed: mtmitchell: Add Riser cards
2024-08-06 7:18 [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Chanh Nguyen
2024-08-06 7:18 ` [PATCH v2 1/5] ARM: dts: aspeed: mtjade, mtmitchell: Add OCP temperature sensors Chanh Nguyen
2024-08-06 7:18 ` [PATCH v2 2/5] ARM: dts: aspeed: mtmitchell: Add I2C temperature sensor alias ports Chanh Nguyen
@ 2024-08-06 7:18 ` Chanh Nguyen
2024-08-06 7:18 ` [PATCH v2 4/5] ARM: dts: aspeed: mtmitchell: Enable i2c10 and i2c15 Chanh Nguyen
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Chanh Nguyen @ 2024-08-06 7:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
linux-kernel, OpenBMC Maillist, Open Source Submission
Cc: Phong Vo, Thang Nguyen, Quan Nguyen, Chanh Nguyen
Define the I2C alias ports for the riser cards.
Add the i2c muxes to switch to the i2c alias ports and
the eeprom nodes to read the FRU contents on riser cards.
Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
Changes in v2:
- Add eeprom nodes to the riser cards and update commit message [Chanh]
---
.../aspeed/aspeed-bmc-ampere-mtmitchell.dts | 64 +++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
index 1679911e4fd8..4d2f6e5348ce 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
@@ -29,6 +29,18 @@ aliases {
i2c30 = &ocpslot_0;
i2c31 = &ocpslot_1;
+ /*
+ * i2c bus 32-33 assigned to Riser slot 0-1
+ */
+ i2c32 = &i2c_riser0;
+ i2c33 = &i2c_riser1;
+
+ /*
+ * i2c bus 38-39 assigned to FRU on Riser slot 0-1
+ */
+ i2c38 = &i2c_riser0_chn_0;
+ i2c39 = &i2c_riser1_chn_0;
+
/*
* I2C NVMe alias port
*/
@@ -551,6 +563,58 @@ ocpslot_1_temp: temperature-sensor@1f {
reg = <0x1f>;
};
};
+
+ i2c_riser0: i2c@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x2>;
+
+ i2c-mux@72 {
+ compatible = "nxp,pca9546";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x72>;
+ i2c-mux-idle-disconnect;
+
+ i2c_riser0_chn_0: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+
+ eeprom@50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ pagesize = <16>;
+ };
+ };
+ };
+ };
+
+ i2c_riser1: i2c@3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x3>;
+
+ i2c-mux@72 {
+ compatible = "nxp,pca9546";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x72>;
+ i2c-mux-idle-disconnect;
+
+ i2c_riser1_chn_0: i2c@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0>;
+
+ eeprom@50 {
+ compatible = "atmel,24c02";
+ reg = <0x50>;
+ pagesize = <16>;
+ };
+ };
+ };
+ };
};
};
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 4/5] ARM: dts: aspeed: mtmitchell: Enable i2c10 and i2c15
2024-08-06 7:18 [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Chanh Nguyen
` (2 preceding siblings ...)
2024-08-06 7:18 ` [PATCH v2 3/5] ARM: dts: aspeed: mtmitchell: Add Riser cards Chanh Nguyen
@ 2024-08-06 7:18 ` Chanh Nguyen
2024-08-06 7:18 ` [PATCH v2 5/5] ARM: dts: aspeed: mtmitchell: Add LEDs Chanh Nguyen
2024-08-07 2:08 ` [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Andrew Jeffery
5 siblings, 0 replies; 7+ messages in thread
From: Chanh Nguyen @ 2024-08-06 7:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
linux-kernel, OpenBMC Maillist, Open Source Submission
Cc: Phong Vo, Thang Nguyen, Quan Nguyen, Chanh Nguyen
Enable the BMC I2C10.
Enable the BMC I2C15 and add the GPIO Expander as a child node.
Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
Changes in v2:
- None
---
.../aspeed/aspeed-bmc-ampere-mtmitchell.dts | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
index 4d2f6e5348ce..3111f23e56dc 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
@@ -890,6 +890,10 @@ nvme_m2_1: i2c@1 {
};
};
+&i2c10 {
+ status = "okay";
+};
+
&i2c11 {
status = "okay";
ssif-bmc@10 {
@@ -912,6 +916,25 @@ bmc_ast2600_cpu: temperature-sensor@35 {
};
};
+&i2c15 {
+ status = "okay";
+ gpio_expander1: gpio-expander@22 {
+ compatible = "nxp,pca9535";
+ reg = <0x22>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names =
+ "fan-fault","psu-fault",
+ "","",
+ "","",
+ "","",
+ "","",
+ "","",
+ "","",
+ "","";
+ };
+};
+
&adc0 {
status = "okay";
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 5/5] ARM: dts: aspeed: mtmitchell: Add LEDs
2024-08-06 7:18 [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Chanh Nguyen
` (3 preceding siblings ...)
2024-08-06 7:18 ` [PATCH v2 4/5] ARM: dts: aspeed: mtmitchell: Enable i2c10 and i2c15 Chanh Nguyen
@ 2024-08-06 7:18 ` Chanh Nguyen
2024-08-07 2:08 ` [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Andrew Jeffery
5 siblings, 0 replies; 7+ messages in thread
From: Chanh Nguyen @ 2024-08-06 7:18 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Joel Stanley,
Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
linux-kernel, OpenBMC Maillist, Open Source Submission
Cc: Phong Vo, Thang Nguyen, Quan Nguyen, Chanh Nguyen
Add LED nodes as the gpio-leds devices. They are led-bmc-ready,
led-sw-heartbeat, led-identify, led-fault, led-fan-fault, led-psu-fault
Signed-off-by: Chanh Nguyen <chanh@os.amperecomputing.com>
---
Changes in v2:
- None
---
.../aspeed/aspeed-bmc-ampere-mtmitchell.dts | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
index 3111f23e56dc..0295f5adcfbc 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ampere-mtmitchell.dts
@@ -113,6 +113,37 @@ vga_memory: region@bf000000 {
};
};
+ leds {
+ compatible = "gpio-leds";
+ /*
+ * Use gpio-leds to configure GPIOW5 (bmc-ready) pin to be reseted when
+ * watchdog timeout.
+ */
+ led-bmc-ready {
+ gpios = <&gpio0 ASPEED_GPIO(W, 5) (GPIO_ACTIVE_HIGH | GPIO_TRANSITORY)>;
+ };
+
+ led-sw-heartbeat {
+ gpios = <&gpio0 ASPEED_GPIO(N, 3) GPIO_ACTIVE_HIGH>;
+ };
+
+ led-identify {
+ gpios = <&gpio0 ASPEED_GPIO(S, 3) GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fault {
+ gpios = <&gpio0 ASPEED_GPIO(P, 4) GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan-fault {
+ gpios = <&gpio_expander1 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-psu-fault {
+ gpios = <&gpio_expander1 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
voltage_mon_reg: voltage-mon-regulator {
compatible = "regulator-fixed";
regulator-name = "ltc2497_reg";
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2 0/5] Update the device tree for Ampere's BMC platform
2024-08-06 7:18 [PATCH v2 0/5] Update the device tree for Ampere's BMC platform Chanh Nguyen
` (4 preceding siblings ...)
2024-08-06 7:18 ` [PATCH v2 5/5] ARM: dts: aspeed: mtmitchell: Add LEDs Chanh Nguyen
@ 2024-08-07 2:08 ` Andrew Jeffery
5 siblings, 0 replies; 7+ messages in thread
From: Andrew Jeffery @ 2024-08-07 2:08 UTC (permalink / raw)
To: Chanh Nguyen, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Joel Stanley, Andrew Jeffery, devicetree, linux-arm-kernel,
linux-aspeed, linux-kernel, OpenBMC Maillist,
Open Source Submission
Cc: Thang Nguyen, Phong Vo, Quan Nguyen
On Tue, 2024-08-06 at 07:18 +0000, Chanh Nguyen wrote:
> Updates the device tree to support some features on Ampere's
> Mt.Mitchell BMC and Ampere's Mt.Jade BMC.
>
> Changes in v2:
> - Add eeprom nodes to the riser cards and update commit message [Chanh]
> - Remove the "Add I2C Fan controllers" [Andrew]
>
> Chanh Nguyen (5):
> ARM: dts: aspeed: mtjade, mtmitchell: Add OCP temperature sensors
> ARM: dts: aspeed: mtmitchell: Add I2C temperature sensor alias ports
> ARM: dts: aspeed: mtmitchell: Add Riser cards
> ARM: dts: aspeed: mtmitchell: Enable i2c10 and i2c15
> ARM: dts: aspeed: mtmitchell: Add LEDs
>
> .../dts/aspeed/aspeed-bmc-ampere-mtjade.dts | 16 ++
> .../aspeed/aspeed-bmc-ampere-mtmitchell.dts | 154 ++++++++++++++++++
> 2 files changed, 170 insertions(+)
>
I've applied these to be merged via the BMC tree.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 7+ messages in thread