AnsweredAssumed Answered

How to add a gpio led for heartbeat and disk activity on ls1020a based board ?

Question asked by Dhruvalkumar Patel on Jul 12, 2016
Latest reply on Aug 10, 2016 by Yiping Wang

Hi All,

 

I did following changes in device tree to  add  disk activity and heartbeat activity on our ls1020a based custom board but it seems its not working as expected . Any Idea or suggestion .

 

gpio1: gpio@2300000 {

  compatible = "fsl,ls1021a-gpio";

  reg = <0x0 0x2300000 0x0 0x10000>;

  interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;

  gpio-controller;

  #gpio-cells = <2>;

  interrupt-controller;

  #interrupt-cells = <2>;

  sleep = <&rcpm 0x00000040 0x0>;

  };

 

 

  gpio2: gpio@2310000 {

  compatible = "fsl,ls1021a-gpio";

  reg = <0x0 0x2310000 0x0 0x10000>;

  interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;

  gpio-controller;

  #gpio-cells = <2>;

  interrupt-controller;

  #interrupt-cells = <2>;

  };

 

 

  gpio3: gpio@2320000 {

  compatible = "fsl,ls1021a-gpio";

  reg = <0x0 0x2320000 0x0 0x10000>;

  interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;

  gpio-controller;

  #gpio-cells = <2>;

  interrupt-controller;

  #interrupt-cells = <2>;

  };

 

 

  gpio4: gpio@2330000 {

  compatible = "fsl,ls1021a-gpio";

  reg = <0x0 0x2330000 0x0 0x10000>;

  interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;

  gpio-controller;

  #gpio-cells = <2>;

  interrupt-controller;

  #interrupt-cells = <2>;

  };

 

  /* On Circuit board only */

  leds {

       compatible = "gpio-leds";

       hdd {

                 label = "Disk_Activity";

                 gpios = <&gpio1 24 1>;

                  linux,default-trigger = "ide-disk";

       };

         heartbeat {

                  label = "Heartbeat";

                  gpios = <&gpio1 25 1>;

                  linux,default-trigger = "heartbeat";

        };

  };

 

Am I doing anything incorrectly ?

Outcomes