Skip to contentSkip to conversation

Enable second flash, update gpios pin and merge adc channels

PATCH In review Quan Nguyen 2 participants 11 messages Feb 28, 2022 – Aug 18, 2022

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

cover Enable second flash, update gpios pin and merge adc channels

This patchset adds the second flash support, merge all ADC channels to single iio-hwmon node and update various gpios pin name.

Quan Nguyen (5):
ARM: dts: aspeed: mtjade: Enable secondary flash
ARM: dts: aspeed: mtjade: Update rtc-battery-voltage-read-enable pin
ARM: dts: aspeed: mtjade: Update host0-ready pin
ARM: dts: aspeed: mtjade: Rename GPIO hog nodes to match schema.
ARM: dts: aspeed: mtjade: Move all adc sensors into iio-hwmon node

 .../arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 26 +++++++++----------
 1 file changed, 12 insertions(+), 14 deletions(-)
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/5 ARM: dts: aspeed: mtjade: Enable secondary flash

Enable the secondary flash of the Ampere's Mt. Jade's BMC.

---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts +7 -0
index 4c3c3f1a12ea..934bb54b193a 100644
@@ -362,6 +362,13 @@ flash at 0 {
 		/* spi-max-frequency = <50000000>; */
 #include "openbmc-flash-layout-64.dtsi"
 	};
+
+	flash at 1 {
+		status = "okay";
+		m25p,fast-read;
+		label = "alt-bmc";
+#include "openbmc-flash-layout-64-alt.dtsi"
+	};
 };
 
 &spi1 {
Signature · 1 line
2.28.0
#2 lore raw

PATCH 2/5 ARM: dts: aspeed: mtjade: Update rtc-battery-voltage-read-enable pin

In reply to Quan Nguyen

Update the output pin name that enables reading RTC battery voltage.

---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts +1 -1
index 934bb54b193a..c2b5b3dfeb85 100644
@@ -876,7 +876,7 @@ &gpio {
 	/*Q0-Q7*/	"","","","","","UID_BUTTON","","",
 	/*R0-R7*/	"","","BMC_EXT_HIGHTEMP_L","OCP_AUX_PWREN",
 			"OCP_MAIN_PWREN","RESET_BUTTON","","",
-	/*S0-S7*/	"","","","","RTC_BAT_SEN_EN","","","",
+	/*S0-S7*/	"","","","","rtc-battery-voltage-read-enable","","","",
 	/*T0-T7*/	"","","","","","","","",
 	/*U0-U7*/	"","","","","","","","",
 	/*V0-V7*/	"","","","","","","","",
Signature · 1 line
2.28.0
#3 lore raw

PATCH 3/5 ARM: dts: aspeed: mtjade: Update host0-ready pin

In reply to Quan Nguyen

Update the input GPIO that indicates Host ready.

---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts +1 -1
index c2b5b3dfeb85..a823571f8f4b 100644
@@ -860,7 +860,7 @@ &gpio {
 	/*E0-E7*/	"","","","","","","","",
 	/*F0-F7*/	"","","BMC_SYS_PSON_L","S0_DDR_SAVE","PGOOD",
 			"S1_DDR_SAVE","","",
-	/*G0-G7*/	"S0_FW_BOOT_OK","SHD_REQ_L","","S0_OVERTEMP_L","","",
+	/*G0-G7*/	"host0-ready","SHD_REQ_L","","S0_OVERTEMP_L","","",
 			"","",
 	/*H0-H7*/	"","","","","PSU1_VIN_GOOD","PSU2_VIN_GOOD","","",
 	/*I0-I7*/	"PSU1_PRESENT","PSU2_PRESENT","S1_BMC_SPECIAL_BOOT",
Signature · 1 line
2.28.0
#4 lore raw

PATCH 4/5 ARM: dts: aspeed: mtjade: Rename GPIO hog nodes to match schema.

In reply to Quan Nguyen

GPIO hog nodes must have a "hog-" prefix or "-hog" suffix according to the DT schema. Rename the node to pass dtbs_check.

---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts +1 -1
index a823571f8f4b..60b0e650957a 100644
@@ -891,7 +891,7 @@ &gpio {
 	/*AC0-AC7*/	"SYS_PWR_GD","","","","","BMC_READY","SLAVE_PRESENT_L",
 			"BMC_OCP_PG";
 
-	i2c4_o_en {
+	i2c4-o-en-hog {
 		gpio-hog;
 		gpios = <ASPEED_GPIO(Y, 2) GPIO_ACTIVE_HIGH>;
 		output-high;
Signature · 1 line
2.28.0
#5 lore raw

PATCH 5/5 ARM: dts: aspeed: mtjade: Move all adc sensors into iio-hwmon node

In reply to Quan Nguyen

Move adc14 and adc15 (battery sensor) into single iio-hwmon node to correct label to be read by single application for all adc sensors.

---
 arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
arch/arm/boot/dts/aspeed-bmc-ampere-mtjade.dts +2 -11
index 60b0e650957a..1b2e7ad37566 100644
@@ -339,17 +339,8 @@ iio-hwmon {
 			<&adc10mux 0>, <&adc10mux 1>,
 			<&adc11mux 0>, <&adc11mux 1>,
 			<&adc12mux 0>, <&adc12mux 1>,
-			<&adc13mux 0>, <&adc13mux 1>;
-	};
-
-	iio-hwmon-adc14 {
-		compatible = "iio-hwmon";
-		io-channels = <&adc 14>;
-	};
-
-	iio-hwmon-battery {
-		compatible = "iio-hwmon";
-		io-channels = <&adc 15>;
+			<&adc13mux 0>, <&adc13mux 1>,
+			<&adc 14>, <&adc 15>;
 	};
 };
 
Signature · 1 line
2.28.0
maintainer Reviewed-by on the v1 series
#6 lore raw
In reply to Quan Nguyen
Quoted 4 lines · Quan Nguyen

This patchset adds the second flash support, merge all ADC channels to single iio-hwmon node and update various gpios pin name.

Quoted 8 lines

Quan Nguyen (5):
ARM: dts: aspeed: mtjade: Enable secondary flash
ARM: dts: aspeed: mtjade: Update rtc-battery-voltage-read-enable pin
ARM: dts: aspeed: mtjade: Update host0-ready pin
ARM: dts: aspeed: mtjade: Rename GPIO hog nodes to match schema.
ARM: dts: aspeed: mtjade: Move all adc sensors into iio-hwmon node

These look good.

I'll apply them for v5.18.

Quoted 7 lines
 .../arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 26 +++++++++----------
 1 file changed, 12 insertions(+), 14 deletions(-)

--
2.28.0

#7 lore raw
Quoted 14 lines · Joel Stanley
Quoted 4 lines · Quan Nguyen

This patchset adds the second flash support, merge all ADC channels to single iio-hwmon node and update various gpios pin name.

Quoted 8 lines

Quan Nguyen (5):
ARM: dts: aspeed: mtjade: Enable secondary flash
ARM: dts: aspeed: mtjade: Update rtc-battery-voltage-read-enable pin
ARM: dts: aspeed: mtjade: Update host0-ready pin
ARM: dts: aspeed: mtjade: Rename GPIO hog nodes to match schema.
ARM: dts: aspeed: mtjade: Move all adc sensors into iio-hwmon node

Quoted 6 lines

These look good.

I'll apply them for v5.18.

Thank you, Joel
-Quan

#8 lore raw
In reply to Joel Stanley

Dear Joel,

Thanks for applying this patchset for v5.18.

Would it be also possible to apply them to OpenBMC kernel dev-5.15 branch as well?

Thanks,
- Quan

Quoted 27 lines · Joel Stanley
Quoted 4 lines · Quan Nguyen

This patchset adds the second flash support, merge all ADC channels to single iio-hwmon node and update various gpios pin name.

Quoted 8 lines

Quan Nguyen (5):
ARM: dts: aspeed: mtjade: Enable secondary flash
ARM: dts: aspeed: mtjade: Update rtc-battery-voltage-read-enable pin
ARM: dts: aspeed: mtjade: Update host0-ready pin
ARM: dts: aspeed: mtjade: Rename GPIO hog nodes to match schema.
ARM: dts: aspeed: mtjade: Move all adc sensors into iio-hwmon node

These look good.

I'll apply them for v5.18.

Quoted 7 lines
  .../arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 26 +++++++++----------
  1 file changed, 12 insertions(+), 14 deletions(-)

--
2.28.0

#9 lore raw
In reply to Quan Nguyen

Dear Joel,

Could you help review and backport this patch series to dev-5.15 branch?

https://lore.kernel.org/linux-arm-kernel/[email protected]/

Thank you,
- Quan

Quoted 15 lines · Quan Nguyen

This patchset adds the second flash support, merge all ADC channels to single iio-hwmon node and update various gpios pin name.

Quan Nguyen (5):
ARM: dts: aspeed: mtjade: Enable secondary flash
ARM: dts: aspeed: mtjade: Update rtc-battery-voltage-read-enable pin
ARM: dts: aspeed: mtjade: Update host0-ready pin
ARM: dts: aspeed: mtjade: Rename GPIO hog nodes to match schema.
ARM: dts: aspeed: mtjade: Move all adc sensors into iio-hwmon node

  .../arm/boot/dts/aspeed-bmc-ampere-mtjade.dts | 26 +++++++++----------
  1 file changed, 12 insertions(+), 14 deletions(-)