lkml.org 
[lkml]   [2021]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 8/8] ARM: dts: wpcm450-supermicro-x9sci-ln4f: Add GPIO LEDs and buttons
    Date
    The Supermicro X9SCi-LN4F server mainboard has a two LEDs and a button
    under the control of the BMC. This patch makes them accessible under
    Linux running on the BMC.

    Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>


    ---
    v2:
    - Adjust to new GPIO controller names
    - Explicitly set pinmux to GPIO for GPIO keys and LEDs

    v1:
    - https://lore.kernel.org/lkml/20210602120329.2444672-9-j.neuschaefer@gmx.net/
    ---
    .../nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 43 +++++++++++++++++++
    1 file changed, 43 insertions(+)

    diff --git a/arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts b/arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts
    index 83f27fbf4e939..cd8d3a6bbf853 100644
    --- a/arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts
    +++ b/arch/arm/boot/dts/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts
    @@ -8,6 +8,9 @@

    #include "nuvoton-wpcm450.dtsi"

    +#include <dt-bindings/input/linux-event-codes.h>
    +#include <dt-bindings/gpio/gpio.h>
    +
    / {
    model = "Supermicro X9SCi-LN4F BMC";
    compatible = "supermicro,x9sci-ln4f-bmc", "nuvoton,wpcm450";
    @@ -20,6 +23,46 @@ memory@0 {
    device_type = "memory";
    reg = <0 0x08000000>; /* 128 MiB */
    };
    +
    + gpio-keys {
    + compatible = "gpio-keys";
    + pinctrl-names = "default";
    + pinctrl-0 = <&key_pins>;
    +
    + uid {
    + label = "UID button";
    + linux,code = <KEY_HOME>;
    + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
    + };
    + };
    +
    + gpio-leds {
    + compatible = "gpio-leds";
    + pinctrl-names = "default";
    + pinctrl-0 = <&led_pins>;
    +
    + uid {
    + label = "UID";
    + gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
    + };
    +
    + heartbeat {
    + label = "heartbeat";
    + gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
    + };
    + };
    +};
    +
    +&pinctrl {
    + key_pins: mux_keys {
    + groups = "gspi", "sspi";
    + function = "gpio";
    + };
    +
    + led_pins: mux_leds {
    + groups = "hg3", "hg0", "pwm4";
    + function = "gpio";
    + };
    };

    &serial0 {
    --
    2.30.2
    \
     
     \ /
      Last update: 2021-12-07 22:10    [W:3.185 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site