Devicetree overlay not work

Hi! I’m asking because the Devicetree overlay doesn’t work as I expected.

I’m using Aster V1.1B carrier board, and I’m trying to make “LED4” act as a “heartbeat” through Devicetree.

“LED4” is connected to SODIMM104(gpio2.IO[27]) on the SoM.

According to this documents, I wrote a my-dts_overlay.dts as follows.

/dts-v1/;
/plugin/;
​
#include <dt-bindings/gpio/gpio.h>
#include "imx7d-pinfunc.h"
​
/{
	compatible = "toradex,colibri-imx7d",
		     "toradex,colibri-imx7s",
		     "toradex,colibri-imx7d-emmc";
​
	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_leds>;
​
		my_led {
			gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};
	};
};
​
&iomuxc{
	pinctrl_gpio_leds: gpio_ledsgrp {
		fsl,pins = <
			MX7D_PAD_EPDC_GDSP__GPIO2_IO27		0x1b0b0
		>;
	};	
};

Then I built the dtbo file, copied this file to /boot/overlays, and added my-dts_overlay.dtbo to /boot/overlays.txt.

The U-Boot log shows that this dtbo is overloaded, but led does not blink.

I don’t knwo where is the problem.

Thanks!

Hi @YongJaeKim , what is the BSP version on Colibri iMX7D? You can find it by cat /etc/issue.

Thanks to reply! :slight_smile:

root@colibri-imx7-emmc:~# cat /etc/issue
TDX Wayland with XWayland 5.3.0-devel-20210715051752+build.0 (dunfell) \n \l
Colibri-iMX7-eMMC_Reference-Multimedia-Image

Hi @YongJaeKim , I directly add the following into imx7-colibri-eval-v3.dtsi instead of device tree overlay. But it doesn’t work.

pps {
	compatible = "pps-gpio";
	gpios = <&gpio2 27 0>;
	assert-falling-edge;
	status = "okay";

};

Here is the log:

colibri-imx7-emmc login: root

root@colibri-imx7-emmc:~# dmesg|grep pps
[    0.093055] pps_core: LinuxPPS API ver. 1 registered
[    0.093074] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.093426] pps pps0: new PPS source ptp0
[    1.334621] pps_ldisc: PPS line discipline registered
[    1.341705] pps pps1: new PPS source pps.-1
[    1.347465] pps pps1: Registered IRQ 134 as PPS source

We are looking into this issue. I will update you later.

PPS is for input instead of driving a LED.

A PPS source can be connected to a serial port (usually to the Data Carrier Detect pin) or to a parallel port (ACK-pin) or to a special CPU’s GPIOs (this is the common case in embedded systems) but in each case when a new pulse arrives the system must apply to it a timestamp and record it for userland.
PPS - Pulse Per Second — The Linux Kernel documentation

What you need is leds-gpio.