Bring out the MT7688's ethernet switch pins onto GPIOs



  • Hi,

    From what I understand, the omega's MT7688 has an inbuilt 5 port ethernet switch, where one of these ports is natively brought out onto the omega's pins. There are more ports that can be enabled on GPIOs 14 through 29. I would assume these are enabled through changing the pin multiplexing settings through the device tree file, but I'm struggling to see where this change would be made. I've looked at other routers DTS files using the same processor to find where the change may be, but I've not found the difference. Am I looking in the right place for this? Is it just a case of disabling the I2C and other interfaces or is there something more? I assume there may be as GPIO 14-18 aren't used by any other interfaces but the functionality isn't there. Maybe it's by not loading the GPIO driver on those pins?

    The other concern is that I see in the CPU's datasheet it mentions both IoT mode and gateway mode but doesn't mention anything further about these modes. Are they just referencing different use cases?

    Has anyone else managed to successfully accomplish this?

    Kind regards,
    Dave



  • I think I'm closer to the answer. It seems to lie in the register AGPIO_CFG at address 0x1000003C. It switches the GPIOs 14 through 29 between the digital pins and the analog ethernet counterparts. Would this modification to AGPIO be done in the DTSI file, some bootloader/kernel parameter or do I need to make a patch to something somewhere?

    I'm aware I could use something like devmem to directly set this register from userspace but I assume there is something a bit cleaner?



Looks like your connection to Community was lost, please wait while we try to reconnect.