Pinmux file in uboot for TX2 4GB

Well, you don’t have your math quite right. :-)
256 + 5*8 + 2 does not equal 398.
256 + 5*8 + 2 does equal 298.

It’s much easier to create a simple table in a spreadsheet or other mechanism that you can just lookup. Take a look here for a simple and reliable way you can track down those #s: