[PATCH linux v1 3/3] devicetree : Add device tree info for POST card display on zaius

Xo Wang xow at google.com
Fri Oct 14 04:33:15 AEDT 2016


Hi Jagha,

On Wed, Oct 12, 2016 at 5:41 PM, Jaghathiswari Rankappagounder Natarajan <
jaghu at google.com> wrote:

> Add clock, data and clear signal lines to control POST card display on
> zaius
>
> Signed-off-by: Jaghathiswari Rankappagounder Natarajan <jaghu at google.com>
> ---
>  .../devicetree/bindings/misc/postcard-disp.txt         | 18
> ++++++++++++++++++
>  arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts             |  8 ++++++++
>  2 files changed, 26 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/postcard-disp.
> txt
>
> diff --git a/Documentation/devicetree/bindings/misc/postcard-disp.txt
> b/Documentation/devicetree/bindings/misc/postcard-disp.txt
> new file mode 100644
> index 0000000..164449e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/postcard-disp.txt
>

This doc file belongs in the same commit as the driver that it describes.
The Zaius dts change should stand alone.


> @@ -0,0 +1,18 @@
> +POST card display (two seven segment LEDs) connected to GPIO lines
> +
> +Required properties:
> +- compatible : should be "postcard-display".
> +- clk-gpios :  Should specify the GPIO pin connected to the Clock line on
> the POST card.
>

For consistency and readability, please don't abbreviate these names. We
should use "clock-gpios" instead of "clk-gpios."


> +- data-gpios : Should specify the GPIO pin connected to Data line on the
> POST card.
> +- clear-gpios : Should specify the GPIO pin connected to Clear line on
> the POST card.
>

Ex. you wrote "clear-gpios" here but the code uses "clr-gpios," which looks
visually similar to "clk-gpios."


> +
> +Examples:
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +postcard {
> +       compatible = "postcard-display";
> +       clk-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
> +       data-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
> +       clear-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
>

This uses the same gpio designator (1) as the second -gpios property. I
know it's example code but...


> +};
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> index 4c4754b..d555ff1 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> @@ -1,6 +1,7 @@
>  /dts-v1/;
>
>  #include "aspeed-g5.dtsi"
> +#include <dt-bindings/gpio/aspeed-gpio.h>
>
>  / {
>         model = "Zaius BMC";
> @@ -58,6 +59,13 @@
>                         };
>                 };
>         };
> +
> +       postcard {
> +               compatible = "postcard-display";
> +               clk-gpios = <&gpio ASPEED_GPIO(J, 0) GPIO_ACTIVE_HIGH>;
> +               data-gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_HIGH>;
> +               clr-gpios = <&gpio ASPEED_GPIO(J, 1) GPIO_ACTIVE_HIGH>;
>

This property should match up to the documentation.


> +       };
>  };
>
>  &uart5 {
> --
> 2.8.0.rc3.226.g39d4020
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
>

cheers
xo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20161013/157f38ee/attachment.html>


More information about the openbmc mailing list