Skip to contentSkip to conversation

rainier: Add leds that are off 9551 on Operator Panel

PATCH In review [email protected] 2 participants 2 messages Jul 29, 2020 – Aug 13, 2020

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

PATCH 1/2 rainier: Add leds that are off 9551 on Operator Panel

From: Vishwanatha Subbanna <[email protected]>

These are LEDs that are controlled by 9551

---
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 82 ++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +82 -0
index 37e4123..9b28a30 100644
@@ -120,6 +120,38 @@
 			reg = <3>;
 		};
 	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		/* System ID LED that is at front on Op Panel */
+		front-sys-id0 {
+			retain-state-shutdown;
+			default-state = "keep";
+			gpios = <&pca1 0 GPIO_ACTIVE_LOW>;
+		};
+
+		/* System Attention Indicator ID LED that is at front on Op Panel */
+		front-check-log0 {
+			retain-state-shutdown;
+			default-state = "keep";
+			gpios = <&pca1 1 GPIO_ACTIVE_LOW>;
+		};
+
+		/* Enclosure Fault LED that is at front on Op Panel */
+		front-enc-fault1 {
+			retain-state-shutdown;
+			default-state = "keep";
+			gpios = <&pca1 2 GPIO_ACTIVE_LOW>;
+		};
+
+		/* System PowerOn LED that is at front on Op Panel */
+		front-sys-pwron0 {
+			retain-state-shutdown;
+			default-state = "keep";
+			gpios = <&pca1 3 GPIO_ACTIVE_LOW>;
+		};
+	};
 };
 
 &ehci1 {
@@ -816,6 +848,56 @@
 		};
 	};
 
+	pca1: pca9551@60 {
+		compatible = "nxp,pca9551";
+		reg = <0x60>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		gpio@0 {
+			reg = <0>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+
+		gpio@1 {
+			reg = <1>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+
+		gpio@2 {
+			reg = <2>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+
+		gpio@3 {
+			reg = <3>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+
+		gpio@4 {
+			reg = <4>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+
+		gpio@5 {
+			reg = <5>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+
+		gpio@6 {
+			reg = <6>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+
+		gpio@7 {
+			reg = <7>;
+			type = <PCA955X_TYPE_GPIO>;
+		};
+	};
+
 	dps: dps310@76 {
 		compatible = "infineon,dps310";
 		reg = <0x76>;
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 16 lines · On Wed, 29 Jul 2020 at 11:31, <[email protected]> wrote:

From: Vishwanatha Subbanna <[email protected]>

These are LEDs that are controlled by 9551

---
 arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 82 ++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +0 -0
index 37e4123..9b28a30 100644

arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts line 128

Quoted 9 lines
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +6 -0
@@ -120,6 +120,38 @@
                        reg = <3>;
                };
        };
+
+       leds {
+               compatible = "gpio-leds";
+
+               /* System ID LED that is at front on Op Panel */
+               front-sys-id0 {

The naming here will need to follow whatever we decide in the first patch.

Quoted 30 lines
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +26 -0
+                       retain-state-shutdown;
+                       default-state = "keep";
+                       gpios = <&pca1 0 GPIO_ACTIVE_LOW>;
+               };
+
+               /* System Attention Indicator ID LED that is at front on Op Panel */
+               front-check-log0 {
+                       retain-state-shutdown;
+                       default-state = "keep";
+                       gpios = <&pca1 1 GPIO_ACTIVE_LOW>;
+               };
+
+               /* Enclosure Fault LED that is at front on Op Panel */
+               front-enc-fault1 {
+                       retain-state-shutdown;
+                       default-state = "keep";
+                       gpios = <&pca1 2 GPIO_ACTIVE_LOW>;
+               };
+
+               /* System PowerOn LED that is at front on Op Panel */
+               front-sys-pwron0 {
+                       retain-state-shutdown;
+                       default-state = "keep";
+                       gpios = <&pca1 3 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
 &ehci1 {

arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts line 851

Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +1 -0
@@ -816,6 +848,56 @@
                };
        };
 
+       pca1: pca9551@60 {

I noticed we start to accumulate a lot of pcaX nodes. They will need to be unique per-device tree, so we will need to pick a unique identifier.

How about the part number the schematic? (ie U32 or whatever)

Quoted 55 lines
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts +49 -1
+               compatible = "nxp,pca9551";
+               reg = <0x60>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               gpio-controller;
+               #gpio-cells = <2>;
+
+               gpio@0 {
+                       reg = <0>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+
+               gpio@1 {
+                       reg = <1>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+
+               gpio@2 {
+                       reg = <2>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+
+               gpio@3 {
+                       reg = <3>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+
+               gpio@4 {
+                       reg = <4>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+
+               gpio@5 {
+                       reg = <5>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+
+               gpio@6 {
+                       reg = <6>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+
+               gpio@7 {
+                       reg = <7>;
+                       type = <PCA955X_TYPE_GPIO>;
+               };
+       };
+
        dps: dps310@76 {
                compatible = "infineon,dps310";
                reg = <0x76>;
--

1.8.3.1