mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: "Drew Fustini" <drew@beagleboard.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	Linux-OMAP <linux-omap@vger.kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Jason Kridner" <jkridner@beagleboard.org>,
	"Robert Nelson" <robertcnelson@beagleboard.org>
Subject: Re: [PATCH v2] arm: dts: am33xx-bone-common: add gpio-line-names
Date: Thu, 21 May 2020 17:34:58 +0300	[thread overview]
Message-ID: <71dbf4e6-e65b-f001-319c-0b354f675568@ti.com> (raw)
In-Reply-To: <20200520214757.GA362547@x1>



On 21/05/2020 00:47, Drew Fustini wrote:
> Add gpio-line-names properties to the GPIO controller nodes.
> 
> BeagleBone boards have P8 and P9 headers [0] which expose many of the
> AM3358 ZCZ SoC balls to stacking expansion boards called "capes", or to
> other external connections like jumper wires connected to a breadboard.
> BeagleBone users will often refer to the "Cape Exanpsion Headers" pin
> diagram [1] as it is in the "Bone101" getting started tutorial. [2]
> 
> Most of the P8 and P9 header pins can muxed to a GPIO line.  The
> gpio-line-names describe which P8 or P9 pin that line goes to and the
> default mux for that P8 or P9 pin if it is not GPIO.
> 
> For example, gpiochip 1 line 0 is connected to P8 header pin 25 (P8_25)
> however the default device tree has the corresponding BGA ball (ZCZ U7)
> muxed to mmc1_dat0 as it is used for the on-board eMMC chip.  For that
> GPIO line to be used, one would need to modify the device tree to
> disable the eMMC and change the pin mux for that ball to GPIO mode.
> 
> Some of the AM3358 ZCZ balls corresponding to GPIO lines are not routed
> to a P8 or P9 header, but are instead wired to some peripheral device
> like on-board eMMC, HDMI framer IC, or status LEDs.  Those names are in
> brackets to denote those GPIO lines can not be used.
> 
> Some GPIO lines are named "[NC]" as the corresponding balls are not
> routed to anything on the PCB.
> 
> The goal for these names is to make it easier for a user viewing the
> output of gpioinfo to determine which P8 or P9 pin is connected to a
> GPIO line.  The output of gpioinfo on a BeagleBone Black would be:
> 
> debian@beaglebone:~$ gpioinfo
> gpiochip0 - 32 lines:
> 	line   0: "[ethernet]"       unused   input  active-high
> 	line   1: "[ethernet]"       unused   input  active-high
> 	line   2: "P9_22 [spi0_sclk]" unused input active-high
> 	line   3: "P9_21 [spi0_d0]" unused input active-high
> 	line   4: "P9_18 [spi0_d1]" unused input active-high
> 	line   5: "P9_17 [spi0_cs0]" unused input active-high
> 	line   6:  "[sd card]"         "cd"   input   active-low [used]
> 	line   7: "P9_42A [ecappwm0]" unused input active-high
> 	line   8: "P8_35 [hdmi]" unused input active-high
> 	line   9: "P8_33 [hdmi]" unused input active-high
> 	line  10: "P8_31 [hdmi]" unused input active-high
> 	line  11: "P8_32 [hdmi]" unused input active-high

[...]

> 
> [0] https://git.io/JfgOd
> [1] https://beagleboard.org/capes
> [1] https://beagleboard.org/Support/bone101
> [2] https://beagleboard.org/static/images/cape-headers.png
> 
> Reviewed-by: Jason Kridner <jason@beagleboard.org>
> Reviewed-by: Robert Nelson <robertcnelson@gmail.com>
> Signed-off-by: Drew Fustini <drew@beagleboard.org>
> ---
>   arch/arm/boot/dts/am335x-bone-common.dtsi | 144 ++++++++++++++++++++++

Not sure if it should be in am335x-bone-common.dtsi.

For example:
am335x-boneblack.dts
  #include "am335x-bone-common.dtsi"
  #include "am335x-boneblack-common.dtsi" <-- hdmi defined only here

am335x-bonegreen.dts
  #include "am335x-bone-common.dtsi"
  #include "am335x-bonegreen-common.dtsi"

>   1 file changed, 144 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
> index 6c9187bc0f17..d86e67b0e852 100644
> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
> @@ -397,3 +397,147 @@ &rtc {
>   	clocks = <&clk_32768_ck>, <&clk_24mhz_clkctrl AM3_CLK_24MHZ_CLKDIV32K_CLKCTRL 0>;
>   	clock-names = "ext-clk", "int-clk";
>   };
> +
> +&gpio0 {
> +	gpio-line-names =
> +		"[ethernet]",
> +		"[ethernet]",
> +		"P9_22 [spi0_sclk]",
> +		"P9_21 [spi0_d0]",
> +		"P9_18 [spi0_d1]",
> +		"P9_17 [spi0_cs0]",
> +		"[sd card]",
> +		"P9_42A [ecappwm0]",
> +		"P8_35 [hdmi]",
> +		"P8_33 [hdmi]",
> +		"P8_31 [hdmi]",
> +		"P8_32 [hdmi]",

[...]

-- 
Best regards,
grygorii

  reply	other threads:[~2020-05-21 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 21:47 Drew Fustini
2020-05-21 14:34 ` Grygorii Strashko [this message]
2020-05-21 14:41   ` Robert Nelson
2020-05-21 17:26     ` Grygorii Strashko
2020-05-21 19:23       ` Drew Fustini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71dbf4e6-e65b-f001-319c-0b354f675568@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drew@beagleboard.org \
    --cc=jkridner@beagleboard.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=robertcnelson@beagleboard.org \
    --cc=robh+dt@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®