Wind River Support Network

HomeDefectsLIN10-6732
Fixed

LIN10-6732 : gpio-line-names property in device tree

Created: Nov 20, 2019    Updated: Jan 15, 2020
Resolved Date: Jan 15, 2020
Found In Version: 10.17.41.18
Fix Version: 10.17.41.19
Severity: Standard
Applicable for: Wind River Linux LTS 17
Component/s: BSP

Description

Kernel documentation (Documentation/devicetree/bindings/gpio.gpio.txt) states that:

"Optionally, a GPIO controller may have a "gpio-line-names" property. This is
 an array of strings defining the names of the GPIO lines going out of the
 GPIO controller. This name should be the most meaningful....

Example:

gpio-controller@00000000

{ <------>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