From aee2ea85dfce6b13d2dbe233144bc0aea9dfa8fe Mon Sep 17 00:00:00 2001 From: Gunnar Mills Date: Mon, 11 Feb 2019 12:53:08 -0600 Subject: Fix up LED-Architecture.md Fixed some grammar, spelling, and punctuation. Fixed links to reflect a newer kernel and the updated subtrees layers. Changed wording to be consistent. Removed a 3rd link to the LED D-Bus README. Tested: Copied into https://jbt.github.io/markdown-editor/ Change-Id: I66208553ea64458da1e1e0fad97e60aa5efe8d4f Signed-off-by: Gunnar Mills --- LED-architecture.md | 76 +++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 40 deletions(-) (limited to 'LED-architecture.md') diff --git a/LED-architecture.md b/LED-architecture.md index 0a4b548..3d9e782 100644 --- a/LED-architecture.md +++ b/LED-architecture.md @@ -1,10 +1,9 @@ # LED Support for OpenBMC This document describes how to add LED support for your machine based upon the -OpenBMC -[LED Architecture](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Led/README.md) -document. LED group management is done automatically for machines that support -the use of the MRW and is beyond the scope of this document. +OpenBMC [LED Architecture][LED D-Bus README] document. LED group management is +done automatically for machines that support the use of the MRW and is beyond +the scope of this document. ## D-Bus @@ -20,7 +19,7 @@ Attribute: Asserted (boolean) ## REST ``` -PUT /xyz/openbmc_project/led/groups/\/attr/Asserted +PUT /xyz/openbmc_project/led/groups//attr/Asserted ``` The LED group state can be changed by setting the Asserted value to boolean 0 or 1. @@ -41,9 +40,7 @@ interfaces for the individual LEDs that are part of the group. ### Defining the physical LED Physical LED wiring is defined in the `leds` section of the machine's -[device tree](https://github.com/openbmc/linux/tree/dev-4.10/arch/arm/boot/dts). -See the -[Palmetto dts](https://github.com/openbmc/linux/blob/dev-4.10/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts#L39) +[device tree][Kernel ARM DTS]. See the [Palmetto DTS][Palmetto DTS LED] as an example. _Add a fault LED to the device tree with a corresponding gpio pin..._ @@ -72,14 +69,13 @@ lrwxrwxrwx 1 root root 0 Jun 21 20:04 subsystem -> ../../../. ``` ### Defining Groups -A LED Group can contain zero or more LEDs and defined in the machines -[led.yaml](https://github.com/openbmc/phosphor-led-manager/blob/master/led.yaml). -The default one will likely need to be tailored to your machines layout. -Customized yaml files are placed into the machines specific Yocto location. As -an example.... +An LED Group can contain zero or more LEDs and is defined in the machines +[led.yaml][LED YAML]. The default one will likely need to be tailored to your +machines layout. Customized yaml files are placed into the machines specific +Yocto location. As an example: ``` -meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/recipes-phosphor/leds/palmetto-led-manager-config/led.yaml +meta-ibm/meta-palmetto/recipes-phosphor/leds/palmetto-led-manager-config/led.yaml ``` The parent properties in the yaml file will be created below `/xyz/openbmc_project/led/groups/`. @@ -89,7 +85,7 @@ In the example, below two URIs would be created: `/xyz/openbmc_project/led/groups/enclosure_fault` and `/xyz/openbmc_project/led/groups/lamp_test`. Both act on the same physical LED `fault` but do so differently. The lamp_test would also drive a blink -signal to the physical `power` led if one was created. +signal to the physical `power` LED if one was created. ``` @@ -112,41 +108,41 @@ lamp_test: ### Required Groups OpenBMC Architecture requires specific LED Groups to be created and are -documented in the -[dbus interface](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Led/README.md) +documented in the [D-Bus interface][LED D-Bus README]. ## Yocto packaging 1. Create a tailored LED manager file -`meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/leds/romulus-led-manager-config-native.bb` -``` -SUMMARY = "Phosphor LED Group Management for Romulus" -PR = "r1" - -inherit native -inherit obmc-phosphor-utils -inherit obmc-phosphor-license + E.g. `meta-ibm/meta-romulus/recipes-phosphor/leds/romulus-led-manager-config-native.bb` + ``` + SUMMARY = "Phosphor LED Group Management for Romulus" + PR = "r1" -PROVIDES += "virtual/phosphor-led-manager-config-native" + inherit native + inherit obmc-phosphor-utils + inherit obmc-phosphor-license -SRC_URI += "file://led.yaml" -S = "${WORKDIR}" + PROVIDES += "virtual/phosphor-led-manager-config-native" -# Overwrites the default led.yaml -do_install() { - SRC=${S} - DEST=${D}${datadir}/phosphor-led-manager - install -D ${SRC}/led.yaml ${DEST}/led.yaml -} -``` -2. Change your machine's peferred provider for the led-manager in the conf file + SRC_URI += "file://led.yaml" + S = "${WORKDIR}" -_i.e. meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/conf/machine/romulus.conf_ + # Overwrites the default led.yaml + do_install() { + SRC=${S} + DEST=${D}${datadir}/phosphor-led-manager + install -D ${SRC}/led.yaml ${DEST}/led.yaml + } + ``` +2. Change your machine's preferred provider for the led-manager in the conf file -`PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "romulus-led-manager-config-native"` + E.g. `meta-ibm/meta-romulus/conf/machine/romulus.conf` + ```PREFERRED_PROVIDER_virtual/phosphor-led-manager-config-native = "romulus-led-manager-config-native"``` -## Additional Reading -D-Bus Interfaces [Managing LED groups](https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Led/README.md) +[LED D-Bus README]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Led/README.md +[LED YAML]: https://github.com/openbmc/phosphor-led-manager/blob/master/led.yaml +[Kernel ARM DTS]: https://github.com/openbmc/linux/tree/dev-4.19/arch/arm/boot/dts +[Palmetto DTS LED]: https://github.com/openbmc/linux/blob/dev-4.19/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts#L45 -- cgit v1.2.1