How to access RTD GPIO in i.MX 8ULP Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to access RTD GPIO in i.MX 8ULP Linux

跳至解决方案
389 次查看
ryo_agrass
Contributor II

Hello, Everyone.

Currently, my company is developing a custom board for i.MX 8ULP.
However, I'm having trouble accessing PTB0 and PTB1 on Linux.

~# gpioset gpiochip1 0=1
gpioset: error setting the GPIO line values: Invalid argument
~# gpioget gpiochip1 0
gpioget: error reading GPIO values: Invalid argument

Even if you try to define PTB0 and PTB1 as GPIOs in the device tree, they cannot be defined in the same way as PTD and PTF.
Instead, something like `rpmsg_gpiob` is defined.

rpmsg_gpiob: gpio@1 {
	compatible = "fsl,imx-rpmsg-gpio";
	port_idx = <1>;
	gpio-controller;
	#gpio-cells = <2>;
	#interrupt-cells = <2>;
	interrupt-controller;
	interrupt-parent = <&rpmsg_gpiob>;
	status = "okay";
};

So, upon investigating i.MX 8ULP SoC, it was determined that PTB0 and PTB1 are RTDs.

I am currently developing with Yocto. Is it possible to enable access to PTB0 and PTB1 on Linux using Yocto?

标签 (1)
0 项奖励
回复
1 解答
172 次查看
ryo_agrass
Contributor II

Although we ultimately couldn't resolve it, meeting the deadline was unrealistic, so we had the hardware team implement the change to APD.

Should a similar issue arise, I will ask again.

Thank you so much.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
353 次查看
joanxie
NXP TechSupport
NXP TechSupport

you need enable it in the config file, you can refer to my document which I tested on theimx8ulp with PTF0

i.mx8ulp gpio hog usage - NXP Community

0 项奖励
回复
342 次查看
ryo_agrass
Contributor II

Hi, @joanxie 

What I want to do this time is precisely to configure pinctrl of rpmsg_gpiob.

What steps are required to configure this like gpiof ?
When I set fsl,pins = <MX8ULP_PAD_PTB0__PTB0 0x3> , compile error occurred because MX8ULP_PAD_PTB0__PTB0 does not exist.

Thanks.

0 项奖励
回复
173 次查看
ryo_agrass
Contributor II

Although we ultimately couldn't resolve it, meeting the deadline was unrealistic, so we had the hardware team implement the change to APD.

Should a similar issue arise, I will ask again.

Thank you so much.

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2202249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%A6%82%E4%BD%95%E5%9C%A8%20i.MX%208ULP%20Linux%20%E4%B8%AD%E8%AE%BF%E9%97%AE%20RTD%20GPIO%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%3C%2FP%3E%3CP%3E%E7%9B%AE%E5%89%8D%EF%BC%8C%E6%88%91%E7%9A%84%E5%85%AC%E5%8F%B8%E6%AD%A3%E5%9C%A8%E4%B8%BAi.MX%208ULP%E5%BC%80%E5%8F%91%E5%AE%9A%E5%88%B6%E6%9D%BF%E3%80%82%3CBR%20%2F%3E%E4%BD%86%E6%98%AF%EF%BC%8C%E6%88%91%E5%9C%A8%20Linux%20%E4%B8%8A%E8%AE%BF%E9%97%AE%20PTB0%20%E5%92%8C%20PTB1%20%E6%97%B6%E9%81%87%E5%88%B0%E4%BA%86%E9%BA%BB%E7%83%A6%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3E~%23%20gpioset%20gpiochip1%200%3D1%0Agpioset%3A%20error%20setting%20the%20GPIO%20line%20values%3A%20Invalid%20argument%0A~%23%20gpioget%20gpiochip1%200%0Agpioget%3A%20error%20reading%20GPIO%20values%3A%20Invalid%20argument%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E5%8D%B3%E4%BD%BF%E4%BD%A0%E5%B0%9D%E8%AF%95%E5%9C%A8%E8%AE%BE%E5%A4%87%E6%A0%91%E4%B8%AD%E5%B0%86%20PTB0%20%E5%92%8C%20PTB1%20%E5%AE%9A%E4%B9%89%E4%B8%BA%20GPIO%EF%BC%8C%E4%B9%9F%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E4%B8%8E%20PTD%20%E5%92%8C%20PTF%20%E7%9B%B8%E5%90%8C%E7%9A%84%E6%96%B9%E5%BC%8F%E5%AE%9A%E4%B9%89%E5%AE%83%E4%BB%AC%E3%80%82%3CBR%20%2F%3E%E5%8F%96%E8%80%8C%E4%BB%A3%E4%B9%8B%E7%9A%84%E6%98%AF%E7%B1%BB%E4%BC%BC%20%60rpmsg_gpiob%60%20%E7%9A%84%E5%AE%9A%E4%B9%89%E3%80%82%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%20translate%3D%22no%22%3Erpmsg_gpiob%3A%20gpio%401%20%7B%0A%09compatible%20%3D%20%22fsl%2Cimx-rpmsg-gpio%22%3B%0A%09port_idx%20%3D%20%26lt%3B1%26gt%3B%3B%0A%09gpio-controller%3B%0A%09%23gpio-cells%20%3D%20%26lt%3B2%26gt%3B%3B%0A%09%23interrupt-cells%20%3D%20%26lt%3B2%26gt%3B%3B%0A%09interrupt-controller%3B%0A%09interrupt-parent%20%3D%20%26lt%3B%26amp%3Brpmsg_gpiob%26gt%3B%3B%0A%09status%20%3D%20%22okay%22%3B%0A%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E5%9B%A0%E6%AD%A4%EF%BC%8C%E5%9C%A8%E8%B0%83%E6%9F%A5%20i.MX%208ULP%20SoC%20%E6%97%B6%EF%BC%8C%E7%A1%AE%E5%AE%9A%20PTB0%20%E5%92%8C%20PTB1%20%E6%98%AF%20RTD%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E7%9B%AE%E5%89%8D%E4%BD%BF%E7%94%A8%20Yocto%20%E8%BF%9B%E8%A1%8C%E5%BC%80%E5%8F%91%E3%80%82%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%E5%9C%A8%20Linux%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20Yocto%20%E5%90%AF%E7%94%A8%E5%AF%B9%20PTB0%20%E5%92%8C%20PTB1%20%E7%9A%84%E8%AE%BF%E9%97%AE%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2202249%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX8ULP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202516%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20access%20RTD%20GPIO%20in%20i.MX%208ULP%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202516%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39586%22%20target%3D%22_blank%22%3E%40joanxie%3C%2FA%3E%3C%2FP%3E%3CP%3E%E8%BF%99%E6%AC%A1%E6%88%91%E8%A6%81%E5%81%9A%E7%9A%84%E6%AD%A3%E6%98%AF%E9%85%8D%E7%BD%AE%20rpmsg_gpiob%20%E7%9A%84%20pinctrl%E3%80%82%3C%2FP%3E%3CP%3E%E5%83%8F%E9%85%8D%E7%BD%AE%20gpiof%20%E4%B8%80%E6%A0%B7%E9%85%8D%E7%BD%AE%E5%AE%83%E9%9C%80%E8%A6%81%E5%93%AA%E4%BA%9B%E6%AD%A5%E9%AA%A4%EF%BC%9F%3CBR%20%2F%3E%E5%BD%93%E6%88%91%E8%AE%BE%E7%BD%AE%20fsl%2Cpins%20%3D%3CMX8ULP_PAD_PTB0__PTB0%200x3%3D%22%22%3E%20%E6%97%B6%EF%BC%8C%E5%87%BA%E7%8E%B0%E7%BC%96%E8%AF%91%E9%94%99%E8%AF%AF%EF%BC%8C%E5%9B%A0%E4%B8%BA%20MX8ULP_PAD_PTB0__PTB0%20%E4%B8%8D%E5%AD%98%E5%9C%A8%E3%80%82%3C%2FMX8ULP_PAD_PTB0__PTB0%3E%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2202379%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20access%20RTD%20GPIO%20in%20i.MX%208ULP%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2202379%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E9%9C%80%E8%A6%81%E5%9C%A8%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E4%B8%AD%E5%90%AF%E7%94%A8%E8%AF%A5%E5%8A%9F%E8%83%BD%EF%BC%8C%E5%8F%AF%E4%BB%A5%E5%8F%82%E8%80%83%E6%88%91%E7%9A%84%E6%96%87%E6%A1%A3%EF%BC%8C%E6%88%91%E5%9C%A8%E4%BD%BF%E7%94%A8%20PTF0%20%E7%9A%84imx8ulp%20%E4%B8%8A%E6%B5%8B%E8%AF%95%E4%BA%86%E8%AF%A5%E5%8A%9F%E8%83%BD%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2Fi-mx8ulp-gpio-hog-usage%2Fta-p%2F2161010%22%20target%3D%22_blank%22%3Ei.mx8ulp%20gpio%20%E5%8D%A0%E7%94%A8%E6%83%85%E5%86%B5%20-%20NXP%20Community%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E