AnsweredAssumed Answered

Problem on remapping MX6QDL_PAD_RGMII_TDx as GPIO LED

Question asked by Dehuan Xin on Dec 30, 2015
Latest reply on Jan 4, 2016 by Dehuan Xin

I'm trying to remap some of the pins to drive GPIO LEDs.

 

I decompiled and modified the device tree:

 

ipu1grp {/*re-purpose DISP0_DAT6 and DISP0_DAT7 to GPIO4_27 and GPIO4_28*/

        fsl,pins = <0x188 0x49c 0x0 0x5 0x0 0x10 0x18c 0x4a0 0x000 0x5 0x0 0x10>;

};

       enetgrp {/*re-purpose RGMII_TD0 and RGMII_TD1 to GPIO6_20 and GPIO6_21*/

                fsl,pins = <0x60 0x374 0x0 0x5 0x0 0x010 0x05c 0x370 0x000 0x5 0x0 0x010>;

       };

 

    leds {

        compatible = "gpio-leds";

        led@0 {

            label = "led0";

            gpios = <0x5 27 0>;

            linux,default-trigger = "default-on";

            default-state = "on";

        };

        led@1 {

            label = "led1";

            gpios = <0x5 28 0>;

            linux,default-trigger = "default-on";

            default-state = "on";

        };

        led@2 {

            label = "led2";

            gpios = <0x26 20 0>;

            linux,default-trigger = "default-on";

            default-state = "off";

        };

        led@3 {

            label = "led3";

            gpios = <0x26 21 0>;

            linux,default-trigger = "default-on";

            default-state = "off";

        };

    };

 

In linux I can see all four new leds, but only led0 and led1 response to brightness adjustments. led2 and led3 stays off all the time.

 

What have I done wrong here?

 

Also in the GPIO cell, the first value, I'm not sure whether 0x5 means gpio4 and 0x26 means gpio6, but 0x5(led0 and led1) works and 0x26(led2 and led3) doesn't.

Original Attachment has been moved to: imx6qdl-var-dart.dtsi.patch.zip

Outcomes