Hi all,
if I look in the SAMD21G datasheet PA12, PA13, PA14 and PA15 (TDI, TCK, TDS, TDO) are on pins 21,22,23 and 24.
So board's schematic and SAMD21G datasheet are coherent
Now looking in the samd21g18a.h file in the arduino's package PA12..PA15 are define from 12 to 15.
So, and it's of course to be confirmed by arduino's guys , I think it's one right method to associate port number, Pin and #define.
Update : I was wrong : values from 12 to 15 work only with low level jtag functions.
All other arduino's functions have to use values from 26 to 29