ACT LED GPIO output for emmc on Renegade

Another user trying to get an external LED to work for indicating SD card (or emmc in my case) activity. After going through this thread example as well as this, I got make to run successfully and the dtoverlay enabled. There’s just one problem: I did that one as an example (PoC to make sure I generally knew what I was doing) and that example used ‘GPIOX_5’ which is specific to aml-s905x-cc, so I went back to the .dts file and changed the GPIO assignment to one that was actually available on the Renegade. As soon as I do make throws a syntax error. I’m entering it just as it appears if I run ./lgpio header j1 or in the gpio.map file, namely in the GPIOn_A1 form.

I realize using examples for aml-s905x-cc boards in Renegade-land is nominally a bad idea but there shouldn’t be that much difference in this case? The vast majority of help (including the links above) is for Le Potato and there are comparatively few resources for Renegade, so I have to make do.

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-gxl-gpio.h>

/ {
        compatible = "libretech","roc-rk3328-cc","rockchip,rk3328";

        fragment@0 {
        target-path = "/leds";
                __overlay__ {
                        mmc_status@0 {
                                label = "statusLED";
                                # this thing right here:
                                gpios = <&gpio GPIOX_5 GPIO_ACTIVE_HIGH>;
                                linux,default-trigger="mmc0";
                        };
                };
        };
};

FWIW I did run a make clean before trying again. Any ideas?

Update: Further sifting gave me the “proper” GPIO syntax (and to use the appropriate include) for rk3328.

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
        compatible = "libretech,roc-rk3328-cc", "rockchip,rk3328";

        fragment@0 {
        target-path = "/leds";
                __overlay__ {
                        mmc_status@0 {
                                label = "statusLED";
                                // Syntax: GPIO1_D4 is below
                                gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>;
                                linux,default-trigger="mmc0";
                        };
                };
        };
};

Now to decipher which pin is which: According to gpio.map, the above should be pin 7 but is actually pin 28? With the above dts, pin 7 does nothing and pin 28 lights the LED constant rather than flashing when the emmc is being read/written to (similar to the board LED).

There’s something really simple I’m missing, isn’t there? :laughing: Anyway thanks to anyone who looks at this.