nicole: Add LED support
Changed to be consistent with the schematics.
(From meta-yadro rev: 19d9cb67b24396fabbe7160a3f04a71d775c166c)
Signed-off-by: Artem Senichev <a.senichev@yadro.com>
Change-Id: I46a3f1dde090bd247ddbf72a3a0c1310d6fafdd2
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-yadro/meta-nicole/conf/machine/nicole.conf b/meta-yadro/meta-nicole/conf/machine/nicole.conf
index 35d94e4..11b3541 100644
--- a/meta-yadro/meta-nicole/conf/machine/nicole.conf
+++ b/meta-yadro/meta-nicole/conf/machine/nicole.conf
@@ -10,8 +10,9 @@
require conf/machine/include/openpower.inc
require conf/machine/include/p9.inc
-IMAGE_FEATURES_remove = " obmc-fan-control obmc-fan-mgmt obmc-leds"
+IMAGE_FEATURES_remove = " obmc-fan-control obmc-fan-mgmt"
PREFERRED_PROVIDER_virtual/openpower-fru-vpd-layout = "nicole-openpower-fru-vpd-layout-native"
PREFERRED_PROVIDER_virtual/openpower-fru-inventory = "nicole-openpower-fru-inventory-native"
PREFERRED_PROVIDER_virtual/openpower-fru-properties = "nicole-openpower-fru-properties-native"
+PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "nicole-led-manager-config-native"
diff --git a/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts
index 0b146e3..0c8a9e7 100644
--- a/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts
+++ b/meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/arch/arm/boot/dts/aspeed-bmc-opp-nicole.dts
@@ -54,6 +54,22 @@
leds {
compatible = "gpio-leds";
+
+ power {
+ gpios = <&gpio ASPEED_GPIO(AA, 4) GPIO_ACTIVE_HIGH>;
+ };
+
+ identify {
+ gpios = <&gpio ASPEED_GPIO(AA, 7) GPIO_ACTIVE_HIGH>;
+ };
+
+ alarm_red {
+ gpios = <&gpio ASPEED_GPIO(AA, 3) GPIO_ACTIVE_HIGH>;
+ };
+
+ alarm_yellow {
+ gpios = <&gpio ASPEED_GPIO(AA, 1) GPIO_ACTIVE_HIGH>;
+ };
};
fsi: gpio-fsi {
diff --git a/meta-yadro/meta-nicole/recipes-phosphor/leds/nicole-led-manager-config-native.bb b/meta-yadro/meta-nicole/recipes-phosphor/leds/nicole-led-manager-config-native.bb
new file mode 100644
index 0000000..da34c8b
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-phosphor/leds/nicole-led-manager-config-native.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Phosphor LED Group Management for Nicole"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit native
+
+PROVIDES += "virtual/phosphor-led-manager-config-native"
+
+SRC_URI += "file://led.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ SRC=${S}
+ DEST=${D}${datadir}/phosphor-led-manager
+ install -D ${SRC}/led.yaml ${DEST}/led.yaml
+}
diff --git a/meta-yadro/meta-nicole/recipes-phosphor/leds/nicole-led-manager-config/led.yaml b/meta-yadro/meta-nicole/recipes-phosphor/leds/nicole-led-manager-config/led.yaml
new file mode 100644
index 0000000..9ce2e29
--- /dev/null
+++ b/meta-yadro/meta-nicole/recipes-phosphor/leds/nicole-led-manager-config/led.yaml
@@ -0,0 +1,110 @@
+power_on:
+ power:
+ Action: 'On'
+ Priority: 'On'
+enclosure_identify:
+ identify:
+ Action: 'Blink'
+ Priority: 'Blink'
+enclosure_fault: &SYS_FAULT
+ alarm_red:
+ Action: 'Blink'
+ Priority: 'Blink'
+enclosure_warning: &FRU_FAULT
+ alarm_yellow:
+ Action: 'Blink'
+ Priority: 'Blink'
+
+bmc_fault:
+ <<: *SYS_FAULT
+motherboard_fault:
+ <<: *SYS_FAULT
+system_fault:
+ <<: *SYS_FAULT
+
+cpu0_fault:
+ <<: *FRU_FAULT
+cpu1_fault:
+ <<: *FRU_FAULT
+
+core0_fault:
+ <<: *FRU_FAULT
+core1_fault:
+ <<: *FRU_FAULT
+core2_fault:
+ <<: *FRU_FAULT
+core3_fault:
+ <<: *FRU_FAULT
+core4_fault:
+ <<: *FRU_FAULT
+core5_fault:
+ <<: *FRU_FAULT
+core6_fault:
+ <<: *FRU_FAULT
+core7_fault:
+ <<: *FRU_FAULT
+core8_fault:
+ <<: *FRU_FAULT
+core9_fault:
+ <<: *FRU_FAULT
+core10_fault:
+ <<: *FRU_FAULT
+core11_fault:
+ <<: *FRU_FAULT
+core12_fault:
+ <<: *FRU_FAULT
+core13_fault:
+ <<: *FRU_FAULT
+core14_fault:
+ <<: *FRU_FAULT
+core15_fault:
+ <<: *FRU_FAULT
+core16_fault:
+ <<: *FRU_FAULT
+core17_fault:
+ <<: *FRU_FAULT
+core18_fault:
+ <<: *FRU_FAULT
+core19_fault:
+ <<: *FRU_FAULT
+core20_fault:
+ <<: *FRU_FAULT
+core21_fault:
+ <<: *FRU_FAULT
+core22_fault:
+ <<: *FRU_FAULT
+core23_fault:
+ <<: *FRU_FAULT
+
+dimm0_fault:
+ <<: *FRU_FAULT
+dimm1_fault:
+ <<: *FRU_FAULT
+dimm2_fault:
+ <<: *FRU_FAULT
+dimm3_fault:
+ <<: *FRU_FAULT
+dimm4_fault:
+ <<: *FRU_FAULT
+dimm5_fault:
+ <<: *FRU_FAULT
+dimm6_fault:
+ <<: *FRU_FAULT
+dimm7_fault:
+ <<: *FRU_FAULT
+dimm8_fault:
+ <<: *FRU_FAULT
+dimm9_fault:
+ <<: *FRU_FAULT
+dimm10_fault:
+ <<: *FRU_FAULT
+dimm11_fault:
+ <<: *FRU_FAULT
+dimm12_fault:
+ <<: *FRU_FAULT
+dimm13_fault:
+ <<: *FRU_FAULT
+dimm14_fault:
+ <<: *FRU_FAULT
+dimm15_fault:
+ <<: *FRU_FAULT