LS1046 PPS on GPIO

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

LS1046 PPS on GPIO

Jump to solution
1,417 Views
srogers
Contributor II

I'm trying to connect a GPS 1PPS signal to a FRWY-LS1046 via a GPIO line.

I've done the following:

Kernel config:

CONFIG_PPS=y
CONFIG_PPS_CLIENT_GPIO=m
CONFIG_PPS_DEBUG=y

 

fsl-ls1046a.dtsi:

	pps {
		compatible = "pps-gpio";
		gpios = <&gpio3 11 0>;
		assert-falling-edge;
	};

 

The kernel logs show pps1 fails to get setup:

[  941.608348] genirq: Setting trigger mode 1 for irq 83 failed (mpc8xxx_irq_set_type+0x0/0xf8)
[  941.616823] pps_core: unregistering pps1
[  941.617053] pps_core: deallocating pps1
[  941.617063] pps-gpio pps: failed to acquire IRQ 83
[  941.621915] pps-gpio: probe of pps failed with error -22

 

Is there a problem with using GPIO3_11 (427) for this? Is it on a GPIO expander or something?

I can read the PPS signal on the GPIO so I know I've got the correct pin.

 

0 Kudos
Reply
1 Solution
1,389 Views
srogers
Contributor II

Apologies - I had made a mistake - my .dtsi looked like this when it failed:

	pps {
		compatible = "pps-gpio";
		gpios = <&gpio3 11 0>;
		assert-rising-edge;
	};

This is evidently wrong - for rising edge you remove the assert-falling-edge line.

It looks like pps1 is now registered.

View solution in original post

0 Kudos
Reply
1 Reply
1,390 Views
srogers
Contributor II

Apologies - I had made a mistake - my .dtsi looked like this when it failed:

	pps {
		compatible = "pps-gpio";
		gpios = <&gpio3 11 0>;
		assert-rising-edge;
	};

This is evidently wrong - for rising edge you remove the assert-falling-edge line.

It looks like pps1 is now registered.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1862802%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELS1046%20PPS%20on%20GPIO%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1862802%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI'm%20trying%20to%20connect%20a%20GPS%201PPS%20signal%20to%20a%20FRWY-LS1046%20via%20a%20GPIO%20line.%3C%2FP%3E%3CP%3EI've%20done%20the%20following%3A%3C%2FP%3E%3CP%3EKernel%20config%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3ECONFIG_PPS%3Dy%0ACONFIG_PPS_CLIENT_GPIO%3Dm%0ACONFIG_PPS_DEBUG%3Dy%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3Efsl-ls1046a.dtsi%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%09pps%20%7B%0A%09%09compatible%20%3D%20%22pps-gpio%22%3B%0A%09%09gpios%20%3D%20%26lt%3B%26amp%3Bgpio3%2011%200%26gt%3B%3B%0A%09%09assert-falling-edge%3B%0A%09%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EThe%20kernel%20logs%20show%20pps1%20fails%20to%20get%20setup%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%5B%20%20941.608348%5D%20genirq%3A%20Setting%20trigger%20mode%201%20for%20irq%2083%20failed%20(mpc8xxx_irq_set_type%2B0x0%2F0xf8)%0A%5B%20%20941.616823%5D%20pps_core%3A%20unregistering%20pps1%0A%5B%20%20941.617053%5D%20pps_core%3A%20deallocating%20pps1%0A%5B%20%20941.617063%5D%20pps-gpio%20pps%3A%20failed%20to%20acquire%20IRQ%2083%0A%5B%20%20941.621915%5D%20pps-gpio%3A%20probe%20of%20pps%20failed%20with%20error%20-22%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EIs%20there%20a%20problem%20with%20using%20GPIO3_11%20(427)%20for%20this%3F%20Is%20it%20on%20a%20GPIO%20expander%20or%20something%3F%3C%2FP%3E%3CP%3EI%20can%20read%20the%20PPS%20signal%20on%20the%20GPIO%20so%20I%20know%20I've%20got%20the%20correct%20pin.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1863341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1046%20PPS%20on%20GPIO%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1863341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EApologies%20-%20I%20had%20made%20a%20mistake%20-%20my%20.dtsi%20looked%20like%20this%20when%20it%20failed%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3E%09pps%20%7B%0A%09%09compatible%20%3D%20%22pps-gpio%22%3B%0A%09%09gpios%20%3D%20%26lt%3B%26amp%3Bgpio3%2011%200%26gt%3B%3B%0A%09%09assert-rising-edge%3B%0A%09%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThis%20is%20evidently%20wrong%20-%20for%20rising%20edge%20you%20remove%20the%20assert-falling-edge%20line.%3C%2FP%3E%3CP%3EIt%20looks%20like%20pps1%20is%20now%20registered.%3C%2FP%3E%3C%2FLINGO-BODY%3E