Fix bugs in X1000/X1500 and add X1830 pinctrl driver v4.

From: Zhou Yanjie
Date: Sat Nov 23 2019 - 13:15:01 EST


v3->v4:
1.Use local variables to streamline code.
2.Prevents processors older than X1830 from being
configured in HiZ mode.