Using PWM0, PWM1, UART2 and SD pins as GPIO in MT7628

I am trying to use about 15 pins of MT7628 as GPIO pins using the PIN share scheme. Few of them are used by default as SD card, PWM, and uart2 pins.

I built a new LEDE image by editing the dts file as follows.

&pinctrl {
    state_default: pinctrl0 {
        gpio {
            ralink,group = "i2s", "pwm0", "pwm1", “uart2”, “sdmode";
            ralink,function = "gpio";
        };
    };
};

After I loaded the new image, the i2s port was converted to GPIO pin. But the pwm0, pwm1, uart2 and sd card pins didn’t work as GPIO pins. When I checked the memory map of the device, it was changed correctly as mentioned in the MT7628 programmer’s guide to enable GPIO in these pins.

Following are the pins I am trying to convert to GPIO pins.
Application

Are there any other changes to be done other than in dts file to enable GPIO in these pins?

hi, any chance anyone has any info on this? I would also like to use the GPIO#18 pin, and editing the dts file doesnt seem to work :confused: