From: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
To: patrick@stwcx.xyz, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>,
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH v18 3/3] ARM: dts: aspeed: yosemite4: add fan led config
Date: Mon, 9 Sep 2024 18:54:18 +0800 [thread overview]
Message-ID: <20240909105420.441607-4-Delphine_CC_Chiu@wiwynn.com> (raw)
In-Reply-To: <20240909105420.441607-1-Delphine_CC_Chiu@wiwynn.com>
From: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
Set fan led config in yosemite4 DTS so that BMC could set different
color LED according to the status of the Fan.
Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
.../aspeed/aspeed-bmc-facebook-yosemite4.dts | 177 +++++++++++++++++-
1 file changed, 175 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
index 7898c4c94b9f..5399fe22e3ae 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
@@ -4,6 +4,7 @@
/dts-v1/;
#include "aspeed-g6.dtsi"
#include <dt-bindings/gpio/aspeed-gpio.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/leds/leds-pca955x.h>
#include <dt-bindings/i2c/i2c.h>
@@ -57,6 +58,178 @@ iio-hwmon {
<&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>,
<&adc1 0>, <&adc1 1>;
};
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-fan0-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio0 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan0-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio0 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan1-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio0 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan1-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio0 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan2-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio1 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan2-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio1 5 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan3-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio1 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan3-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio1 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan4-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio0 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan4-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio0 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan5-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio0 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan5-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio0 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan6-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan6-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio1 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan7-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio1 8 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan7-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio1 9 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan8-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio0 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan8-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio0 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan9-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio0 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan9-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio0 7 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan10-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio1 0 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan10-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio1 1 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan11-blue {
+ color = <LED_COLOR_ID_BLUE>;
+ retain-state-shutdown;
+ default-state = "on";
+ gpios = <&led_gpio1 6 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-fan11-amber {
+ color = <LED_COLOR_ID_AMBER>;
+ retain-state-shutdown;
+ default-state = "off";
+ gpios = <&led_gpio1 7 GPIO_ACTIVE_HIGH>;
+ };
+ };
};
&uart1 {
@@ -840,7 +1013,7 @@ eeprom@52 {
reg = <0x52>;
};
- gpio@61 {
+ led_gpio1: gpio@61 {
compatible = "nxp,pca9552";
reg = <0x61>;
#address-cells = <1>;
@@ -892,7 +1065,7 @@ eeprom@52 {
reg = <0x52>;
};
- gpio@61 {
+ led_gpio0: gpio@61 {
compatible = "nxp,pca9552";
reg = <0x61>;
#address-cells = <1>;
--
2.25.1
next prev parent reply other threads:[~2024-09-09 10:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 10:54 [PATCH v18 0/3] Add i2c-mux and eeprom devices for Meta Yosemite4 Delphine CC Chiu
2024-09-09 10:54 ` [PATCH v18 1/3] ARM: dts: aspeed: yosemite4: Revise i2c-mux devices Delphine CC Chiu
2024-09-09 10:54 ` [PATCH v18 2/3] ARM: dts: aspeed: yosemite4: add mctp config and sensors for NIC Delphine CC Chiu
2024-09-09 10:54 ` Delphine CC Chiu [this message]
2024-09-09 15:45 ` [PATCH v18 0/3] Add i2c-mux and eeprom devices for Meta Yosemite4 Rob Herring (Arm)
2024-09-12 2:34 ` Andrew Jeffery
2024-09-20 6:38 ` Delphine_CC_Chiu/WYHQ/Wiwynn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240909105420.441607-4-Delphine_CC_Chiu@wiwynn.com \
--to=delphine_cc_chiu@wiwynn.com \
--cc=andrew@codeconstruct.com.au \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrick@stwcx.xyz \
--cc=ricky.cx.wu.wiwynn@gmail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox