openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS
@ 2022-06-28  3:13 Potin Lai
  2022-06-28  3:13 ` [PATCH linux dev-5.15 1/4] ARM: dts: aspeed: bletchley: change LED sys_log_id to active low Potin Lai
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Potin Lai @ 2022-06-28  3:13 UTC (permalink / raw)
  To: openbmc, joel; +Cc: Potin Lai, Potin Lai

Hi Joel,

Could you help review this patch series and backport to linux-aspeed dev-5.15?
Thank you.

LINK: https://lore.kernel.org/all/20220613095150.21917-1-potin.lai.pt@gmail.com/

Potin Lai (4):
  ARM: dts: aspeed: bletchley: change LED sys_log_id to active low
  ARM: dts: aspeed: bletchley: disable GPIOV2 pull-down
  ARM: dts: aspeed: bletchley: bind presence-sledX pins via gpio-keys
  ARM: dts: aspeed: bletchley: update fusb302 nodes

 .../dts/aspeed-bmc-facebook-bletchley.dts     | 197 +++++++++++++-----
 1 file changed, 148 insertions(+), 49 deletions(-)

-- 
2.17.1


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

* [PATCH linux dev-5.15 1/4] ARM: dts: aspeed: bletchley: change LED sys_log_id to active low
  2022-06-28  3:13 [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Potin Lai
@ 2022-06-28  3:13 ` Potin Lai
  2022-06-28  3:13 ` [PATCH linux dev-5.15 2/4] ARM: dts: aspeed: bletchley: disable GPIOV2 pull-down Potin Lai
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Potin Lai @ 2022-06-28  3:13 UTC (permalink / raw)
  To: openbmc, joel; +Cc: Potin Lai, Potin Lai

change LED sys_log_id to active low base on DVT schematic.

Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
---
 arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index 41d2b1535d9a..d34bfa50620e 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -59,7 +59,7 @@
 		compatible = "gpio-leds";
 		sys_log_id {
 			default-state = "off";
-			gpios = <&front_leds 0 GPIO_ACTIVE_HIGH>;
+			gpios = <&front_leds 0 GPIO_ACTIVE_LOW>;
 		};
 	};
 
-- 
2.17.1


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

* [PATCH linux dev-5.15 2/4] ARM: dts: aspeed: bletchley: disable GPIOV2 pull-down
  2022-06-28  3:13 [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Potin Lai
  2022-06-28  3:13 ` [PATCH linux dev-5.15 1/4] ARM: dts: aspeed: bletchley: change LED sys_log_id to active low Potin Lai
@ 2022-06-28  3:13 ` Potin Lai
  2022-06-28  3:13 ` [PATCH linux dev-5.15 3/4] ARM: dts: aspeed: bletchley: bind presence-sledX pins via gpio-keys Potin Lai
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Potin Lai @ 2022-06-28  3:13 UTC (permalink / raw)
  To: openbmc, joel; +Cc: Potin Lai, Potin Lai

The external pull-up cannot drive GPIOV2, so disable GPIOV2 internal
pull-down resistor by the request form HW team.

Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
---
 arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index d34bfa50620e..ee33cc3efae4 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -860,6 +860,9 @@
 };
 
 &gpio0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_gpiov2_unbiased_default>;
+
 	gpio-line-names =
 	/*A0-A7*/	"","","","","","","","",
 	/*B0-B7*/	"FUSB302_SLED1_INT_N","FUSB302_SLED2_INT_N",
@@ -950,3 +953,10 @@
 &ehci0 {
 	status = "okay";
 };
+
+&pinctrl {
+	pinctrl_gpiov2_unbiased_default: gpiov2 {
+		pins = "AD14";
+		bias-disable;
+	};
+};
-- 
2.17.1


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

* [PATCH linux dev-5.15 3/4] ARM: dts: aspeed: bletchley: bind presence-sledX pins via gpio-keys
  2022-06-28  3:13 [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Potin Lai
  2022-06-28  3:13 ` [PATCH linux dev-5.15 1/4] ARM: dts: aspeed: bletchley: change LED sys_log_id to active low Potin Lai
  2022-06-28  3:13 ` [PATCH linux dev-5.15 2/4] ARM: dts: aspeed: bletchley: disable GPIOV2 pull-down Potin Lai
@ 2022-06-28  3:13 ` Potin Lai
  2022-06-28  3:13 ` [PATCH linux dev-5.15 4/4] ARM: dts: aspeed: bletchley: update fusb302 nodes Potin Lai
  2022-06-28  4:30 ` [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Joel Stanley
  4 siblings, 0 replies; 6+ messages in thread
From: Potin Lai @ 2022-06-28  3:13 UTC (permalink / raw)
  To: openbmc, joel; +Cc: Potin Lai, Potin Lai

Bind presence-sledX pins via gpio-keys driver to monitor and export
GPIO pin values on DBUS using phosphor-gpio-presence service.

Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
---
 .../dts/aspeed-bmc-facebook-bletchley.dts     | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index ee33cc3efae4..7b6de9b51547 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -190,6 +190,41 @@
 			gpios = <&sled6_leds 1 GPIO_ACTIVE_LOW>;
 		};
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		presence-sled1 {
+			label = "presence-sled1";
+			gpios = <&gpio0 ASPEED_GPIO(H, 2) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(H, 2)>;
+		};
+		presence-sled2 {
+			label = "presence-sled2";
+			gpios = <&gpio0 ASPEED_GPIO(H, 3) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(H, 3)>;
+		};
+		presence-sled3 {
+			label = "presence-sled3";
+			gpios = <&gpio0 ASPEED_GPIO(H, 4) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(H, 4)>;
+		};
+		presence-sled4 {
+			label = "presence-sled4";
+			gpios = <&gpio0 ASPEED_GPIO(H, 5) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(H, 5)>;
+		};
+		presence-sled5 {
+			label = "presence-sled5";
+			gpios = <&gpio0 ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(H, 6)>;
+		};
+		presence-sled6 {
+			label = "presence-sled6";
+			gpios = <&gpio0 ASPEED_GPIO(H, 7) GPIO_ACTIVE_LOW>;
+			linux,code = <ASPEED_GPIO(H, 7)>;
+		};
+	};
 };
 
 &mac2 {
-- 
2.17.1


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

* [PATCH linux dev-5.15 4/4] ARM: dts: aspeed: bletchley: update fusb302 nodes
  2022-06-28  3:13 [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Potin Lai
                   ` (2 preceding siblings ...)
  2022-06-28  3:13 ` [PATCH linux dev-5.15 3/4] ARM: dts: aspeed: bletchley: bind presence-sledX pins via gpio-keys Potin Lai
@ 2022-06-28  3:13 ` Potin Lai
  2022-06-28  4:30 ` [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Joel Stanley
  4 siblings, 0 replies; 6+ messages in thread
From: Potin Lai @ 2022-06-28  3:13 UTC (permalink / raw)
  To: openbmc, joel; +Cc: Potin Lai, Potin Lai

1. Add interrupt pin of fusb302 on each sled.
2. Add vbus-supply property in each fusb302 node.
3. Fix BMC power-role at source and data-role at host.
4. Disable PD to avoid "HARD Reset" due to incompatible PD ver.

Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
---
 .../dts/aspeed-bmc-facebook-bletchley.dts     | 150 ++++++++++++------
 1 file changed, 102 insertions(+), 48 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index 7b6de9b51547..9fdb3d17596b 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -225,6 +225,60 @@
 			linux,code = <ASPEED_GPIO(H, 7)>;
 		};
 	};
+
+	vbus_sled1: vbus_sled1 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus_sled1";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&sled1_ioexp 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	vbus_sled2: vbus_sled2 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus_sled2";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&sled2_ioexp 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	vbus_sled3: vbus_sled3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus_sled3";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&sled3_ioexp 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	vbus_sled4: vbus_sled4 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus_sled4";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&sled4_ioexp 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	vbus_sled5: vbus_sled5 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus_sled5";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&sled5_ioexp 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	vbus_sled6: vbus_sled6 {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus_sled6";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&sled6_ioexp 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 };
 
 &mac2 {
@@ -336,17 +390,17 @@
 		compatible = "fcs,fusb302";
 		reg = <0x22>;
 
+		interrupt-parent = <&gpio0>;
+		interrupts = <ASPEED_GPIO(B, 0) IRQ_TYPE_LEVEL_LOW>;
+		vbus-supply = <&vbus_sled1>;
+
 		connector {
 			compatible = "usb-c-connector";
 			label = "USB-C";
-			power-role = "dual";
-			try-power-role = "sink";
-			data-role = "dual";
-			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-					PDO_VAR(3000, 12000, 3000)
-					PDO_PPS_APDO(3000, 11000, 3000)>;
-			op-sink-microwatt = <10000000>;
+			power-role = "source";
+			data-role = "host";
+			pd-disable;
+			typec-power-opmode = "default";
 		};
 	};
 
@@ -422,17 +476,17 @@
 		compatible = "fcs,fusb302";
 		reg = <0x22>;
 
+		interrupt-parent = <&gpio0>;
+		interrupts = <ASPEED_GPIO(B, 1) IRQ_TYPE_LEVEL_LOW>;
+		vbus-supply = <&vbus_sled2>;
+
 		connector {
 			compatible = "usb-c-connector";
 			label = "USB-C";
-			power-role = "dual";
-			try-power-role = "sink";
-			data-role = "dual";
-			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-					PDO_VAR(3000, 12000, 3000)
-					PDO_PPS_APDO(3000, 11000, 3000)>;
-			op-sink-microwatt = <10000000>;
+			power-role = "source";
+			data-role = "host";
+			pd-disable;
+			typec-power-opmode = "default";
 		};
 	};
 
@@ -508,17 +562,17 @@
 		compatible = "fcs,fusb302";
 		reg = <0x22>;
 
+		interrupt-parent = <&gpio0>;
+		interrupts = <ASPEED_GPIO(B, 7) IRQ_TYPE_LEVEL_LOW>;
+		vbus-supply = <&vbus_sled3>;
+
 		connector {
 			compatible = "usb-c-connector";
 			label = "USB-C";
-			power-role = "dual";
-			try-power-role = "sink";
-			data-role = "dual";
-			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-					PDO_VAR(3000, 12000, 3000)
-					PDO_PPS_APDO(3000, 11000, 3000)>;
-			op-sink-microwatt = <10000000>;
+			power-role = "source";
+			data-role = "host";
+			pd-disable;
+			typec-power-opmode = "default";
 		};
 	};
 
@@ -594,17 +648,17 @@
 		compatible = "fcs,fusb302";
 		reg = <0x22>;
 
+		interrupt-parent = <&gpio0>;
+		interrupts = <ASPEED_GPIO(S, 7) IRQ_TYPE_LEVEL_LOW>;
+		vbus-supply = <&vbus_sled4>;
+
 		connector {
 			compatible = "usb-c-connector";
 			label = "USB-C";
-			power-role = "dual";
-			try-power-role = "sink";
-			data-role = "dual";
-			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-					PDO_VAR(3000, 12000, 3000)
-					PDO_PPS_APDO(3000, 11000, 3000)>;
-			op-sink-microwatt = <10000000>;
+			power-role = "source";
+			data-role = "host";
+			pd-disable;
+			typec-power-opmode = "default";
 		};
 	};
 
@@ -680,17 +734,17 @@
 		compatible = "fcs,fusb302";
 		reg = <0x22>;
 
+		interrupt-parent = <&gpio0>;
+		interrupts = <ASPEED_GPIO(Y, 3) IRQ_TYPE_LEVEL_LOW>;
+		vbus-supply = <&vbus_sled5>;
+
 		connector {
 			compatible = "usb-c-connector";
 			label = "USB-C";
-			power-role = "dual";
-			try-power-role = "sink";
-			data-role = "dual";
-			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-					PDO_VAR(3000, 12000, 3000)
-					PDO_PPS_APDO(3000, 11000, 3000)>;
-			op-sink-microwatt = <10000000>;
+			power-role = "source";
+			data-role = "host";
+			pd-disable;
+			typec-power-opmode = "default";
 		};
 	};
 
@@ -766,17 +820,17 @@
 		compatible = "fcs,fusb302";
 		reg = <0x22>;
 
+		interrupt-parent = <&gpio0>;
+		interrupts = <ASPEED_GPIO(I, 7) IRQ_TYPE_LEVEL_LOW>;
+		vbus-supply = <&vbus_sled6>;
+
 		connector {
 			compatible = "usb-c-connector";
 			label = "USB-C";
-			power-role = "dual";
-			try-power-role = "sink";
-			data-role = "dual";
-			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
-			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
-					PDO_VAR(3000, 12000, 3000)
-					PDO_PPS_APDO(3000, 11000, 3000)>;
-			op-sink-microwatt = <10000000>;
+			power-role = "source";
+			data-role = "host";
+			pd-disable;
+			typec-power-opmode = "default";
 		};
 	};
 
-- 
2.17.1


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

* Re: [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS
  2022-06-28  3:13 [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Potin Lai
                   ` (3 preceding siblings ...)
  2022-06-28  3:13 ` [PATCH linux dev-5.15 4/4] ARM: dts: aspeed: bletchley: update fusb302 nodes Potin Lai
@ 2022-06-28  4:30 ` Joel Stanley
  4 siblings, 0 replies; 6+ messages in thread
From: Joel Stanley @ 2022-06-28  4:30 UTC (permalink / raw)
  To: Potin Lai; +Cc: OpenBMC Maillist, Potin Lai

On Tue, 28 Jun 2022 at 03:15, Potin Lai <potin.lai.pt@gmail.com> wrote:
>
> Hi Joel,
>
> Could you help review this patch series and backport to linux-aspeed dev-5.15?
> Thank you.

Sure. I took the ones you posted on the upstream list as they have
Patrick's r-b.

I've applied them to dev-5.15.

Cheers,

Joel

>
> LINK: https://lore.kernel.org/all/20220613095150.21917-1-potin.lai.pt@gmail.com/
>
> Potin Lai (4):
>   ARM: dts: aspeed: bletchley: change LED sys_log_id to active low
>   ARM: dts: aspeed: bletchley: disable GPIOV2 pull-down
>   ARM: dts: aspeed: bletchley: bind presence-sledX pins via gpio-keys
>   ARM: dts: aspeed: bletchley: update fusb302 nodes
>
>  .../dts/aspeed-bmc-facebook-bletchley.dts     | 197 +++++++++++++-----
>  1 file changed, 148 insertions(+), 49 deletions(-)
>
> --
> 2.17.1
>

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

end of thread, other threads:[~2022-07-18  9:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28  3:13 [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Potin Lai
2022-06-28  3:13 ` [PATCH linux dev-5.15 1/4] ARM: dts: aspeed: bletchley: change LED sys_log_id to active low Potin Lai
2022-06-28  3:13 ` [PATCH linux dev-5.15 2/4] ARM: dts: aspeed: bletchley: disable GPIOV2 pull-down Potin Lai
2022-06-28  3:13 ` [PATCH linux dev-5.15 3/4] ARM: dts: aspeed: bletchley: bind presence-sledX pins via gpio-keys Potin Lai
2022-06-28  3:13 ` [PATCH linux dev-5.15 4/4] ARM: dts: aspeed: bletchley: update fusb302 nodes Potin Lai
2022-06-28  4:30 ` [PATCH linux dev-5.15 0/4] Update Facebook Bletchley BMC DTS Joel Stanley

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).