JetPack 5.0.2,Orin AGX dev kit, /dev/pps1 not found

hi,
我想使用gps模块给orin做时间同步,做法如下,完成后,发现只有/dev/pps0,但是没有/dev/pps1,是怎么回事呢?
1.修改参数,arch/arm64/configs/tegra_defconfig,
CONFIG_PPS=y
CONFIG_PPS_DEBUG=y
CONFIG_PPS_CLIENT_KTIMER=y
CONFIG_PPS_CLIENT_LDISC=y
CONFIG_PPS_CLIENT_GPIO=y

2.hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0000-p3737-0000.dts
在最下面增加如下项:
//serial@31d0000 {
// status = “okay”;
//};
pps {
compatible = “pps-gpio”;
gpios = <&tegra_main_gpio TEGRA234_MAIN_GPIO(Q, 6) GPIO_ACTIVE_LOW>;
status = “okay”;
};
//};

./nvbuild.sh -o $PWD/kernel_out

4.替换
$JETPACK/kernel/Image
$JETPACK/kernel/dtb

sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1

结果能看到/dev/pps0, ppstest /dev/pps0结果也正常。
但是没有/dev/pps1。

谢谢!

过程中参考了下面链接

hello wangliyong,

could you please share your kernel logs files, are you able to request PPS GPIO?

kern.log (1.2 MB)
Thank you for replay, here is the kern.log.

Cann’t request PPS GPIO?
Oct 11 17:56:14 nvidia-desktop kernel: [ 4.714223] pps-gpio pps: failed to request PPS GPIO
Oct 11 17:56:14 nvidia-desktop kernel: [ 4.719326] pps-gpio: probe of pps failed with error -22

hello wangliyong,

please revise the driver, drivers/pps/clients/pps-gpio.c,
you may removing return -EINVAL; to avoid GPIO setup failure to return EINVAL directly.
for example,

static int pps_gpio_probe(struct platform_device *pdev)
{
...
	} else {
		ret = pps_gpio_setup(pdev);
		if (ret)
			return ret;

Thankyou very much. It works now.

the pps signal connect Pin 7
sudo ppstest /dev/pps1

source 0 - assert 1665566978.024025290, sequence: 780459 - clear 0.000000000, sequence: 0

but the rate not 1. we will check the input signal.

Hello, JerryChang

We found that the signal could not be correctly identified. One pps signal will be recognized as many signals. It may be correct only when the pulse width is about 50us.

Is our judgment correct? How to solve this question?

do you see fetch timeout errors? please see-also Jetpack 5.0.2: UART: CTS pin not working - #15 by JerryChang to debug further.

没有出现超时,而是有非常多的输出。输入端发送一次pps信号,ppstest能接收到很多条。
我的输入PPS信号的脉宽是1ms,可能跟咱们orin的识别不匹配,该如何让它们一一对应呢?

we can change the Pulse width to 50us from gps。

hello wangliyong,

could you please check and share below two results for reference,
# cat /sys/kernel/debug/gpio | grep -i pps
# cat /proc/interrupts | grep pps

root@nvidia-desktop:/home/nvidia/Desktop# cat /sys/kernel/debug/gpio | grep -i pps
gpio-454 (PQ.06 |pps ) in lo IRQ
root@nvidia-desktop:/home/nvidia/Desktop# cat /proc/interrupts | grep pps
302: 0 0 0 0 0 0 0 0 gpio 106 Edge pps.-1
root@nvidia-desktop:/home/nvidia/Desktop# ~

Hello, The problem I had been fixed. I changed gps input PPS signal(changed pulse width to 50us).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.