All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 1/4] ARM: bcm2835: remove sdhci pins from GPIO pinctrl
Date: Tue, 1 Dec 2015 20:40:39 -0700	[thread overview]
Message-ID: <565E6837.1070909@wwwdotorg.org> (raw)
In-Reply-To: <1447949176-21926-2-git-send-email-stefan.wahren@i2se.com>

On 11/19/2015 09:06 AM, Stefan Wahren wrote:
> Currently the pins alt3 (sdhci) are assigned to GPIO pinctrl.
> This is bad because a user could export it to sysfs and break
> sdhci. In order to avoid that remove those pins from GPIO pintrl.

> diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts

>  &gpio {
> -	pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
> +	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;

This doesn't make sense. The current DT content is configuring those
pins as SDHCI, not as GPIO. Admitedly this is redundant since the
firmware and/or bootloader already did this in order to boot the system,
but irrespective, the current DT causes no issues. Removing the pinctrl
setting should not influence whether the pins can be exported via GPIO
sysfs either.

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Lee Jones <lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH RFC 1/4] ARM: bcm2835: remove sdhci pins from GPIO pinctrl
Date: Tue, 1 Dec 2015 20:40:39 -0700	[thread overview]
Message-ID: <565E6837.1070909@wwwdotorg.org> (raw)
In-Reply-To: <1447949176-21926-2-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>

On 11/19/2015 09:06 AM, Stefan Wahren wrote:
> Currently the pins alt3 (sdhci) are assigned to GPIO pinctrl.
> This is bad because a user could export it to sysfs and break
> sdhci. In order to avoid that remove those pins from GPIO pintrl.

> diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts

>  &gpio {
> -	pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>;
> +	pinctrl-0 = <&gpioout &alt0 &i2s_alt0>;

This doesn't make sense. The current DT content is configuring those
pins as SDHCI, not as GPIO. Admitedly this is redundant since the
firmware and/or bootloader already did this in order to boot the system,
but irrespective, the current DT causes no issues. Removing the pinctrl
setting should not influence whether the pins can be exported via GPIO
sysfs either.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-12-02  3:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 16:06 [PATCH RFC 0/4] ARM: bcm2835: assign pins to sdhci pinctrl Stefan Wahren
2015-11-19 16:06 ` Stefan Wahren
2015-11-19 16:06 ` [PATCH RFC 1/4] ARM: bcm2835: remove sdhci pins from GPIO pinctrl Stefan Wahren
2015-11-19 16:06   ` Stefan Wahren
2015-12-02  3:40   ` Stephen Warren [this message]
2015-12-02  3:40     ` Stephen Warren
2015-12-05  9:12     ` Stefan Wahren
2015-12-05  9:12       ` Stefan Wahren
2015-12-11  5:15       ` Stephen Warren
2015-12-11  5:15         ` Stephen Warren
2015-11-19 16:06 ` [PATCH RFC 2/4] ARM: bcm2835: rename sdhci pin group Stefan Wahren
2015-11-19 16:06   ` Stefan Wahren
2015-12-02  3:42   ` Stephen Warren
2015-12-02  3:42     ` Stephen Warren
2015-12-05  9:43     ` Stefan Wahren
2015-12-05  9:43       ` Stefan Wahren
2015-12-11  5:19       ` Stephen Warren
2015-12-11  5:19         ` Stephen Warren
2015-11-19 16:06 ` [PATCH RFC 3/4] ARM: bcm2835: specify card detect pin for RPi B Stefan Wahren
2015-11-19 16:06   ` Stefan Wahren
2015-12-02  3:44   ` Stephen Warren
2015-12-02  3:44     ` Stephen Warren
2015-12-02 16:33     ` Stefan Wahren
2015-12-02 16:33       ` Stefan Wahren
2015-11-19 16:06 ` [PATCH RFC 4/4] ARM: bcm2835: assign pins to sdhci pinctrl Stefan Wahren
2015-11-19 16:06   ` Stefan Wahren
2015-12-01 23:03   ` Eric Anholt
2015-12-01 23:03     ` Eric Anholt

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=565E6837.1070909@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.