From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: alison-hh6fLRYtCEIS+FvcfC7Uqw@public.gmane.org
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org,
shijie8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] i.MX6-SabreAuto: WEIM: add steering-gpios to set WEIM for NOR
Date: Fri, 16 Jan 2015 08:27:16 +0100 [thread overview]
Message-ID: <20150116072716.GD18220@pengutronix.de> (raw)
In-Reply-To: <1421347571-9239-2-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
On Thu, Jan 15, 2015 at 10:46:11AM -0800, alison-hh6fLRYtCEIS+FvcfC7Uqw@public.gmane.org wrote:
> From: Alison Chaiken <alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
>
> EIM_D18 pin of i.MX6 CPU is connected to the WEIM switch, to which pin
> DQ2 of the parallel NOR is also attached. Use GPIO5, pin 4 to steer
> the switch to connect the pin to the parallel NOR at boot. If the
> GPIO is not set LOW, the probe of the NOR fails when cfi_qry_present()
> returns "U-V-]" rather than "Q-R-Y" because bit 2 is erroneously high.
> Implement control of the GPIO by adding a steering-gpios property to
> the nor child node of the WEIM in the SabreAuto device-tree. Also add
> a function to the imx-weim probe to set GPIO5 to drive the pad.
>
> Signed-off-by: Alison Chaiken <alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
> ---
> Documentation/devicetree/bindings/bus/imx-weim.txt | 10 +++++
> arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 1 +
> drivers/bus/imx-weim.c | 46 ++++++++++++++++++++++
> 3 files changed, 57 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt
> index 6630d84..359fb26 100644
> --- a/Documentation/devicetree/bindings/bus/imx-weim.txt
> +++ b/Documentation/devicetree/bindings/bus/imx-weim.txt
> @@ -59,6 +59,15 @@ Timing property for child nodes. It is mandatory, not optional.
> there are six registers: CSxGCR1, CSxGCR2, CSxRCR1,
> CSxRCR2, CSxWCR1, CSxWCR2.
>
> +Steering property for child nodes is optional. Steering is needed if
> +the bootloader doesn't set the GPIOs driving the EIM switch to connect
> +the WEIM to the CPU rather than to the peripherals with which the WEIM
> +has a pin conflict.
> +
> + - fsl,steering-gpios: For i.mx6q-sabreauto, the connectivity of CPU
> + pins EIM_D18 and EIM_D30 can be controlled via
> + GPIOs.
It seems to be common that some GPIOs which are not regulators or reset
pins must be switched into the right direction for stuff to work. Adding
board specific properties to the device tree to solve this common
problem for a single usecase doesn't sound like a good solution. I
suggest that you take a look at the GPIO hogging mechanism patches from
Benoit Parrot instead: https://lkml.org/lkml/2014/12/19/342
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
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
next prev parent reply other threads:[~2015-01-16 7:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1421278609-8446-1-git-send-email-alison_chaiken@mentor.com>
[not found] ` <1421278609-8446-1-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2015-01-15 0:03 ` [PATCH] i.MX6-SabreAuto: EIM: pull PAD_EIM_D18 low for NOR probe Brian Norris
2015-01-15 7:56 ` Sascha Hauer
[not found] ` <20150115075646.GM23940-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-15 18:46 ` [PATCHv2] i.MX6-SabreAuto: WEIM: add steering-gpios to set WEIM for NOR alison-hh6fLRYtCEIS+FvcfC7Uqw
[not found] ` <1421347571-9239-1-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2015-01-15 18:46 ` [PATCH] " alison-hh6fLRYtCEIS+FvcfC7Uqw
[not found] ` <1421347571-9239-2-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2015-01-16 7:27 ` Sascha Hauer [this message]
[not found] ` <20150116072716.GD18220-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-04-19 21:02 ` [PATCH 0/2] i.MX6-SabreAuto: DTS: use gpio-hog to enable WEIM-NOR at boot alison-hh6fLRYtCEIS+FvcfC7Uqw
[not found] ` <1429477343-11076-1-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2015-04-19 21:02 ` [PATCH 1/2] " alison-hh6fLRYtCEIS+FvcfC7Uqw
[not found] ` <1429477343-11076-2-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2015-04-23 6:31 ` Sascha Hauer
[not found] ` <20150423063127.GJ6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-04-24 8:00 ` [PATCHv2 0/2] i.MX6-SabreAuto: DTS: use gpio-hog to enable WEIM-NOR at boo alison-hh6fLRYtCEIS+FvcfC7Uqw
[not found] ` <1429862420-15434-1-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2015-04-24 8:00 ` [PATCHv2 1/2] i.MX6-SabreAuto: DTS: use gpio-hog to enable WEIM-NOR at boot alison-hh6fLRYtCEIS+FvcfC7Uqw
[not found] ` <1429862420-15434-2-git-send-email-alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2015-04-27 7:49 ` Shawn Guo
2015-04-27 5:53 ` [PATCH " Sascha Hauer
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=20150116072716.GD18220@pengutronix.de \
--to=s.hauer-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=alison-hh6fLRYtCEIS+FvcfC7Uqw@public.gmane.org \
--cc=alison_chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org \
--cc=computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=shijie8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).