AnsweredAssumed Answered

iMX8M 1PPS in

Question asked by Aaron Goldsworthy on May 25, 2020
Latest reply on Jun 16, 2020 by Aaron Goldsworthy

Having difficulty getting 1PPS input on a GPIO1_IO08 tp work. My device tree fragments are:

pinctrl@30330000 {
   compatible = "fsl,imx8mm-iomuxc";
   reg = <0x0 0x30330000 0x0 0x10000>;
   pinctrl-names = "default";
   pinctrl-0 = <0x13>;

   

  ucm-imx8m-mini {

   ppsgrp {

      //
      fsl,pins = <MX8MM_IOMUXC_GPIO1_IO08_GPIO1_IO8 0x19>;
      linux,phandle = <0x60>;
      phandle = <0x60>;
   };

... etc ...

gpio@30200000 {
compatible = "fsl,imx8mm-gpio", "fsl,imx35-gpio";
reg = <0x0 0x30200000 0x0 0x10000>;
interrupts = <0x0 0x40 0x4 0x0 0x41 0x4>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
linux,phandle = <0x21>;
phandle = <0x21>;
};

 

... etc ...

pps {
compatible = "pps-gpio";
pinctrl-names = "default";
pinctrl-0 = <0x60>;
input-gpios = <0x21 0x08 0x01>;
assert-rising-edge;
status = "okay";
};

I have also enabled CONFIG_PPS=y and CONFIG_PPS_CLIENT_GPIO=m in the kernel config. I've compiled pps-gpio.ko against the same kernel version and .config and place it in the /lib/modules/$(uname -r)/ directory.

 

However during the boot process I ge the following messages:

[ 6.072774] pps-gpio pps: failed to get GPIO from device tree
[ 6.078646] pps-gpio: probe of pps failed with error -2

It would seem pretty clear that the reference to which GPIO pin to use is incorrectly configured but I can't see a problem at all. The gpios=<0x21 0x08 0x00>; should correctly point to the gpiochip0 controller pin 8 and the pinctrl fragment should select the gpio function.

 

There must be some core concept I'm missing here because as far as I can tell I'm doing what //linux/Documentaion/devicetree/bindings/pps/pps.txt is saying to do.

Outcomes