GPIP Pin Address Change

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIP Pin Address Change

2,142 Views
Nirjul_Patel
Contributor III

Hello,



I Want To Read/Write Data Direct GPIO Pin A Pind address Through Device Driver And I Want to Change GPIO Pin Address So, Can You Explain Which Driver File I Need Change ?  And  How to I Change GPIO Pin Address?

0 Kudos
12 Replies

1,778 Views
josephzhou1
Contributor V

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 ,  u must undestand this

 

3

for imx 8 we normal do LInux , open file , operate file to operate the port , not bare metal 

4

base on this , you can read the board reference manual , not short one , but some 9111 pages references manual one

to find what port u can use lah 

5

see my project << how to port imx8 gpio in linux bsp l5.10.35...>>

 

i find our this pcieb not in use , no have wifi moudle for my board si b0 , so can modified the circuits then port to LEDS 

==========================================================

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
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 thank you , hope you can find out the correct way and enjoy developing .

 

joseph

 

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos

2,048 Views
josephzhou1
Contributor V

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 

imx8 reference manual.JPG

 

 

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
0 Kudos

2,107 Views
Nirjul_Patel
Contributor III

@Yuri 
Hello

Thanks Your Support
Where Is Your Comments?

0 Kudos

2,098 Views
Yuri
NXP Employee
NXP Employee

@Nirjul_Patel 
Hello,

   check nirjul.patel@radixweb.com

 

Regards,
Yuri.

0 Kudos

2,088 Views
Nirjul_Patel
Contributor III

@Yuri 
Hello


I Not Get Mail

0 Kudos

2,091 Views
Nirjul_Patel
Contributor III

@Yuri 
Hello

Thanks Your Support
Please Can you Send Mail This Mail ID:- nirjulpatel1807@gmail.com

2,071 Views
Yuri
NXP Employee
NXP Employee

Done!

~Yuri.

0 Kudos

2,063 Views
Nirjul_Patel
Contributor III

@Yuri 

Hello,


Thanks Your Support
I Want To  Know Peripheral Device (GPIO ) Memory Address Range
Whare Is Define To .dts File?

0 Kudos

2,051 Views
Yuri
NXP Employee
NXP Employee

@Nirjul_Patel 
Hello,

  

i.MX8 device tree files are located in

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale?h=lf-5.10.y

 

The DTS files include .h files with pins definitions.
Use pinctrl binding documents in Documentation/devicetree/bindings/pinctrl/fsl.
Also: imx8??-pinfunc.h under device tree source folder.

Regards,
Yuri.

0 Kudos

2,128 Views
jamesbone
NXP TechSupport
NXP TechSupport

Which  device are you using?  which software your are trying to implement?  Linux?  SDK?

 

0 Kudos

2,118 Views
Nirjul_Patel
Contributor III

 

Hello,

Thanks For Your Quickly Supoort


I Use i.MX8mm-ddr4-evk board And I Built imx-image-multimedia So,

How to Get Particular GPIO Pin Address?
Which Pin Available Convert to GPIO Pin?
How to Read/Write Data Direct GPIO Pin Address?

0 Kudos

2,111 Views
Yuri
NXP Employee
NXP Employee

@Nirjul_Patel 
Hello,

  I've sent You some comments directly.

Regards,
Yuri.