ok. hi nirjul how r u
2 for imx8 i will told you no have much SPARE GPIO pins for us to use , all of them are reused for others , fews gpio can be exported
root@imx8qxpmek:/sys/class/gpio# ls
export gpiochip128 gpiochip224 gpiochip472 gpiochip96
gpio32 gpiochip160 gpiochip32 gpiochip480 unexport
gpiochip0 gpiochip192 gpiochip464 gpiochip64
root@imx8qxpmek:/sys/class/gpio#
even no have any User LEDs all r system LEDs such as numlock/ caps lock and scrolllock , all under system control , u must undestand this. if u really interest in operate gpio pins , u might try Arduino Uno or TI MSP430 . many gpio there r open for user to control
3
for imx 8 we normal do LInux , open file , operate file to operate the port , not bare metal
(even in bare metal we all fellow the system defines the address of any port and pins , to let your program more readable and portable lah)
4
base on this , you can read the proceesor and board reference manual , not short one , but some50mb pdf file and about 9111 pages references manual one(for my board imx8qxpmek , yours also about 6000pages if i m not wrong), to read every things insides and
to find what port u can use lah

5
see my project << how to port imx8 gpio_LED in linux bsp l5.10.35...>>here the link:
https://community.nxp.com/t5/i-MX-Processors/How-to-port-GPIO-LED-in-Linux-BSP-L5-10-35-for-i-MX8QXP...
i also only just find out this pcieb pin not in use , no have wifi moudle for my board si b0 , so can modified the circuits then port to LEDS
============================finally done it==============================
of cause have lah; in line 1406# of file imx8x.dtsi
pinctrl_pcieb: pcieagrp{
fsl,pins = <
IMX8QXP_PCIE_CTRL0_PERST_B_LSIO_GPIO4_IO00 0x06000021 // dun chge this address pls
IMX8QXP_PCIE_CTRL0_CLKREQ_B_LSIO_GPIO4_IO01 0x06000021
IMX8QXP_PCIE_CTRL0_WAKE_B_LSIO_GPIO4_IO02 0x04000021
>;
};
thank you as you helps r great !!! i accepted it as a solution , thank you again
Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer
============================================================
6
u no need to channged the default port / pin address and dun do so , it is always the same address say
IMX8QXP_PCIE_CTRL0_PERST_B_LSIO_GPIO4_IO00 0x06000021 // dun chge this address pls
thank you , hope you can find out the correct way and enjoy developing .
Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore