pinout designer and Cortex-M GPIO

PD (pinout designer) is great tool. But each great tool can be better.

There is a known issue sharing GPIO between Linux and Cortex-M. Only whole GPIO banks/peripherals can be dedicated either to Linux or Cortex-M, not some pins here, and some there. This is true at least for iMX7 and VF61, though looking deeper to iMX8, it seems it has the same issues with GPIO sharing between Cortex-A and -M. There are exceptions to this, like no problems reading pins simultaneously from CM and CA, etc, but simultaneous write access to the same GPIO clearly will break something, and of course issue with shared interrupt.

So the task is to choose GPIO pins and banks, which can be dedicated to Cortex-M, living the rest on Linux functional. To do so we need

  1. a list of GPIO banks, that are occupied by Linux and so which banks are not occupied by Linux and can be dedicated to M4. Without support for this in PD you need to search through DT files and determine a list of GPIO banks that are used by Linux. In my case on VF61 GPIOs, which can be dedicated to M4 are 0,3,4. On iMX7D - GPIOs 2,3,6.

  2. to use different Colibri versions (iMX7/iMX8…) on the same carrier board and make board compatible with Colibri variants, from the list of pin candidates we should remove ones, which are in the list of GPIO banks used by Linux. Resulting filtered list of GPIO pins to use on M4 should belong to above mentioned GPIO 0/3/4 on VF and GPIO 2/3/6 on iMX7.

  3. With filtered out list of GPIO pin candidates, chose ones, you are not likely to use for some dedicated Colibri-standard function in next carrier board revisions.

How current PD helps with above?

  • It grays and yellows pins currently used by other enabled functions. Since GPIO choices on the left are very crowded, it would be nice to filter it somehow, so that only right choices are visible. Current filter tool can’t be used for this, as it not only hides unused pins, but as well makes changes to already assigned peripheral pins, it switches used pin function to next available unfiltered choice! It is quite dangerous to add pins to filter list as it may destroy already done work silently.
  • View->More specific information->Show Function Note2 shows GPIO bank numbers for VF61. Other derivatives show bank number in function column by default. But this all becomes visible only after you enable GPIO on the left. So checking one or other pin, I may see, does it fall to banks 0/3/4 on VF and 2/3/6 on iMX7 or not. Then switch off and look for next better candidate. I think GPIO pin choices should be filterable by bank numbers. Of course, filter shouldn’t reassign already assigned pins.

Perhaps other means could be used to ease elimination of GPIOs not suitable for M4, without scanning DT for GPIO usage instances. In current pinout designer eval-v3 imx7 SPI_1 CS0 is told having function ecspi3.SS0, which is not true, GPIO CS is used by default. And you can’t let pinout designer to assign any SPI CS to any GPIO. Well, you can uncheck SPI CS and enable corresponding GPIO, but GPIO subtree is full of so many pin choices… Another example - I2C. Usually I2C recovery GPIO pins are defined to try to recover bus when it gets stuck. This is not a problem visualizing used pins, but I guess it would be a problem automatically determining is GPIO bank used or not. It isn’t as trivial as single checkbox in I2C subtree. Perhaps second checkbox in a row could show if you want to allow GPIO emulated pin instead of native peripheral function? With this 2nd checkbox checked, GPIO item could be removed or disabled in GPIO subtree.

2 Likes

Hi @Edward,

Thanks a lot for the request. I think it would benefit everybody trying to use the Pinout designer.

I submitted your request to our PM and I’ll update you as soon as we have something.

Thanks a lot again!

Best Regards,
Hiago.

Hi @hfranco.tx,

One more request. Are there some Excel or CSV files with tables from your som.pdf’s? Since pinout-designer doesn’t allow writing comments for each pin, I think every new design with your SOM starts from some spreadsheets. Copying from PDF is troublesome. And with tables imported to Excel it is quite easy to sort by something, color cells by some features, etc.
Part of above can be extracted from pinout designer. Check-enable all GPIOs, then export to Excell. But SODIMM table in Function list chapters has more information than can be exported from PD.

Best Regards,
Edward

Hi @Edward,

Thanks again for your comment. I’ll submit this request to our team as well.

The closest thing we have is the Compatibility spreadsheet that you can download here (Using Colibri as an example): Carrier Board Design Guides

Basically, the pinout designer nowadays is replacing this spreadsheet.
Is this what you were thinking about?

Best Regards,
Hiago.

Hi @hfranco.tx,

Thank You, this is what I was looking for.

Best Regards,
Edward

1 Like