Wind River Support Network

HomeDefectsLIN1018-5381
Fixed

LIN1018-5381 : gpio-line-names property in device tree

Created: Dec 2, 2019    Updated: Feb 18, 2020
Resolved Date: Jan 8, 2020
Found In Version: unknown
Fix Version: 10.18.44.14
Severity: Standard
Applicable for: Wind River Linux LTS 18
Component/s: BSP

Description

{ <------>compatible = "foo";

<------>reg = <0x00000000 0x1000>;

<------>gpio-controller;

<------>#gpio-cells = <2>;

<------>ngpios = <18>;

<------>gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",

<------><------>"LED G", "LED B", "Col A", "Col B", "Col C", "Col D",

<------><------>"Row A", "Row B", "Row C", "Row D", "NMI button",

<------><------>"poweroff", "reset"; }

"

(Please note that gpio-line-names property is placed under gpio-controller definition)

However, implementing after this example would cause the kernel to ignore such definition. I am attaching a dtsi (socfpga_stratix10-lts17-test1.dtsi) where I have added such definition and the output of gpioinfo (test1-unnamed.txt) to show the names are still unnamed.

Alternatively, if one puts this definition directly under gpio0 node in the dts, it is correctly taken into account. I am attaching the corresponding dts and gpioinfo output (test2).

Steps to Reproduce

wrlinux-x/setup.sh --machine intel-socfpga-64b

. ./environment-setup-x86_64-wrlinuxsdk-linux

. ./oe-init-build-env build

copy attached local.conf in conf/local.conf

bitbake linux-yocto -c menuconfig (to extract sources)

edit tmp-glibc/work-shared/intel-socfpga-64b/kernel-source/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi according to attached socfpga_stratix10-lts17-test1.dtsi

bitbake linux-yocto or directly bitbake wrlinux-image-glibc-core

Boot Stratix10 board with image created above

run gpioinfo - check that "HPS_LED_1" and "HPS_LED_2" appear un the first 2 lines of gpiochip0

 
Live chat
Online