From: Rob Herring <robh@kernel.org>
To: Sven Van Asbroeck <thesven73@gmail.com>
Cc: "Sven Van Asbroeck" <svendev@arcx.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Lee Jones" <lee.jones@linaro.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Andreas Färber" <afaerber@suse.de>,
"Thierry Reding" <treding@nvidia.com>,
"David Lechner" <david@lechnology.com>,
"Noralf Trønnes" <noralf@tronnes.org>,
"Johan Hovold" <johan@kernel.org>,
"Michal Simek" <monstr@monstr.eu>,
"Michal Vokáč" <michal.vokac@ysoft.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"John Garry" <john.garry@huawei.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Robin Murphy" <robin.murphy@arm.com>,
"Paul Gortmaker" <paul.gortmaker@windriver.com>,
"Sebastien Bourdelin" <sebastien.bourdelin@savoirfairelinux>
Subject: Re: [PATCH anybus v4 6/7] dt-bindings: anybuss-host: document devicetree binding
Date: Thu, 29 Nov 2018 19:39:01 -0600 [thread overview]
Message-ID: <CAL_JsqLEDvs0Ktr2aoyS9-aCeybjHFcVv6L+fQMsvd8Hy88ong@mail.gmail.com> (raw)
In-Reply-To: <CAGngYiXFag-C9-0XvGxVVWs5AxL2qn0UhU2W1Ds9LE+BJYgvDQ@mail.gmail.com>
On Thu, Nov 29, 2018 at 2:59 PM Sven Van Asbroeck <thesven73@gmail.com> wrote:
>
> Rob,
>
> Eliminating the 'compatible' property for the anybus gives me an interesting
> devicetree problem.
>
> The imx-weim code naively loops through all subnodes, applying timing settings
> to the CS in the first reg entry.
> In the example below, WEIM CS0 is programmed with the settings in
> fsl,weim-cs-timing, because the CS part of reg is 0:
>
>
> weim: weim@21b8000 {
> compatible = "fsl,imx6q-weim";
> reg = <0x021b8000 0x4000>;
> clocks = <&clks 196>;
> #address-cells = <2>;
> #size-cells = <1>;
> ranges = <0 0 0x08000000 0x08000000>;
> fsl,weim-cs-gpr = <&gpr>;
>
> nor@0,0 {
> compatible = "cfi-flash";
> reg = <0 0 0x02000000>;
> #address-cells = <1>;
> #size-cells = <1>;
> bank-width = <2>;
> fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
> 0x0000c000 0x1404a38e 0x00000000>;
> };
> };
>
> The problem is that my 'anybus controller' hardware spans chip selects.
> It requires access to various memory areas. In the example below, CS1
> will not be programmed with timing settings:
>
> weim {
> controller@0 {
> compatible = "arcx,anybus-controller";
> reg = <0 0 0x100>, <0 0x400000 0x800>, <1 0x400000 0x800>;
> fsl,weim-cs-timing = ...;
> };
> };
>
> I've coped with this in the past by creating a 'dummy' subnode, without a
> compatible property. But it's ugly:
>
> weim {
> controller@0 {
> compatible = "arcx,anybus-controller";
> reg = <0 0 0x100>, <0 0x400000 0x800>, <1 0x400000 0x800>;
> fsl,weim-cs-timing = ...;
> };
> dummy@1 { /* this works ! */
> reg = <1 0 0>;
> fsl,weim-cs-timing = ...;
> };
> };
>
> Is there a better way? I've looked and looked, but can't find anything that's
> similar.
>
> Or should I extend the imx-weim driver to cope?
Yes, I think it should iterate on child reg properties not just nodes.
Hopefully, you don't need different timing for each CS though.
Rob
next prev parent reply other threads:[~2018-11-30 1:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 15:07 [PATCH anybus v4 0/7] Add Fieldbus subsystem + support HMS Profinet card thesven73
2018-11-21 15:07 ` [PATCH anybus v4 1/7] fieldbus_dev: add Fieldbus Device subsystem thesven73
2018-11-27 7:47 ` Greg KH
2018-11-27 7:47 ` Greg KH
2018-11-27 7:54 ` Greg KH
2018-11-28 15:39 ` Sven Van Asbroeck
2018-11-28 17:42 ` Greg KH
2018-11-28 18:19 ` Sven Van Asbroeck
2018-11-28 18:36 ` Greg KH
2018-11-28 19:39 ` Sven Van Asbroeck
2018-11-21 15:07 ` [PATCH anybus v4 2/7] fieldbus: support the Arcx anybus bridge thesven73
2018-11-21 15:07 ` [PATCH anybus v4 3/7] dt-bindings: Add vendor prefix for arcx / Archronix thesven73
2018-11-21 15:07 ` [PATCH anybus v4 4/7] dt-bindings: anybus-bridge: document devicetree binding thesven73
2018-11-21 15:07 ` [PATCH anybus v4 5/7] fieldbus: support HMS Anybus-S bus thesven73
2018-11-21 15:07 ` [PATCH anybus v4 6/7] dt-bindings: anybuss-host: document devicetree binding thesven73
2018-11-26 22:08 ` Rob Herring
2018-11-28 15:38 ` Sven Van Asbroeck
2018-11-28 16:36 ` Rob Herring
2018-11-29 20:59 ` Sven Van Asbroeck
2018-11-30 1:39 ` Rob Herring [this message]
2018-11-21 15:07 ` [PATCH anybus v4 7/7] fieldbus_dev: support HMS Profinet IRT industrial controller thesven73
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=CAL_JsqLEDvs0Ktr2aoyS9-aCeybjHFcVv6L+fQMsvd8Hy88ong@mail.gmail.com \
--to=robh@kernel.org \
--cc=afaerber@suse.de \
--cc=arnd@arndb.de \
--cc=david@lechnology.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=john.garry@huawei.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=mark.rutland@arm.com \
--cc=michal.vokac@ysoft.com \
--cc=monstr@monstr.eu \
--cc=noralf@tronnes.org \
--cc=paul.gortmaker@windriver.com \
--cc=robin.murphy@arm.com \
--cc=sebastien.bourdelin@savoirfairelinux \
--cc=svendev@arcx.com \
--cc=thesven73@gmail.com \
--cc=treding@nvidia.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;
as well as URLs for NNTP newsgroup(s).