@@ -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>;