implement gpio-imx-rpmsg driver on imx8mn

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

implement gpio-imx-rpmsg driver on imx8mn

Jump to solution
1,974 Views
phuongnguyen1
Contributor II

Hi everyone 

I am writing an application that both M7 core and A53 use different gpio in one port ( ex: A53 use GPIO1_IO_10 , M7 core use GPIO1_IO_11 ), this will make kernel linux stuck forever .

So my solution is Cortex-M will do physical writes/reads to GPIO and send RPMSG messages to core A53 when interrupt happens. All GPIO pins references from disabled &gpio could be easily remapped to virtual GPIO. libgpiod with Linux gpio-imx-rpmsg.c driver, base on this post IMX8M PLUS: GPIO Interrupt conflicts between M7 and A53 - Technical Support - Toradex Community

I have download SDK for M7 core application for IMX8mn chip and has no example implement to service with gpio-imx-rpmsg diver from linux for M7 core. Anyone can help me solve this problem ?

Regards

congphuong

 

0 Kudos
Reply
1 Solution
1,939 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @phuongnguyen1 

gpio-imx-rpmsg driver in kernel is for i.MX7ULP and i.MX8ULP, you can download imx7ul/imx8ulp SDK for reference.

For example, evkmimx8ulp_power_mode_switch\app_srtm.c and evkmimx8ulp_power_mode_switch\srtm\services\srtm_io_service.c

 

 

View solution in original post

0 Kudos
Reply
1 Reply
1,940 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @phuongnguyen1 

gpio-imx-rpmsg driver in kernel is for i.MX7ULP and i.MX8ULP, you can download imx7ul/imx8ulp SDK for reference.

For example, evkmimx8ulp_power_mode_switch\app_srtm.c and evkmimx8ulp_power_mode_switch\srtm\services\srtm_io_service.c

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1861032%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimplement%20gpio-imx-rpmsg%20driver%20on%20imx8mn%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1861032%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20everyone%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20writing%20an%20application%20that%20both%20M7%20core%20and%20A53%20use%20different%20gpio%20in%20one%20port%20(%20ex%3A%20A53%20use%20GPIO1_IO_10%20%2C%20M7%20core%20use%20GPIO1_IO_11%20)%2C%20this%20will%20make%20kernel%20linux%20stuck%20forever%20.%3C%2FP%3E%3CP%3ESo%20my%20solution%20is%26nbsp%3B%3CSPAN%3ECortex-M%20will%20do%20physical%20writes%2Freads%20to%20GPIO%20and%20send%20RPMSG%20messages%20to%20core%20A53%20when%20interrupt%20happens.%20All%20GPIO%20pins%20references%20from%20disabled%20%26amp%3Bgpio%20could%20be%20easily%20remapped%20to%20virtual%20GPIO.%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors%2Flibgpiod-with-Linux-gpio-imx-rpmsg-c-driver%2Fm-p%2F1352813%22%20rel%3D%22ugc%22%20target%3D%22_blank%22%3Elibgpiod%20with%20Linux%20gpio-imx-rpmsg.c%20driver%3C%2FA%3E%2C%20base%20on%20this%20post%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.toradex.com%2Ft%2Fimx8m-plus-gpio-interrupt-conflicts-between-m7-and-a53%2F19288%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EIMX8M%20PLUS%3A%20GPIO%20Interrupt%20conflicts%20between%20M7%20and%20A53%20-%20Technical%20Support%20-%20Toradex%20Community%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20have%20download%20SDK%20for%20M7%20core%20application%20for%20IMX8mn%20chip%20and%20has%20no%20example%20implement%20to%20service%20with%20gpio-imx-rpmsg%20diver%20from%20linux%20for%20M7%20core.%20Anyone%20can%20help%20me%20solve%20this%20problem%20%3F%3C%2FP%3E%3CP%3E%3CSPAN%3ERegards%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Econgphuong%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1861190%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20implement%20gpio-imx-rpmsg%20driver%20on%20imx8mn%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1861190%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233232%22%20target%3D%22_blank%22%3E%40phuongnguyen1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Egpio-imx-rpmsg%20driver%20in%20kernel%20is%20for%20i.MX7ULP%20and%20i.MX8ULP%2C%20you%20can%20download%20imx7ul%2Fimx8ulp%20SDK%20for%20reference.%3C%2FP%3E%0A%3CP%3EFor%20example%2C%26nbsp%3Bevkmimx8ulp_power_mode_switch%5Capp_srtm.c%20and%20evkmimx8ulp_power_mode_switch%5Csrtm%5Cservices%5Csrtm_io_service.c%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E