From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Pawel Moll <Pawel.Moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Kevin Hilman <khilman@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Olof Johansson <olof@lixom.net>, Rob Herring <robh+dt@kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Kumar Gala <galak@codeaurora.org>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
Simon Horman <horms+renesas@verge.net.au>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infr>
Subject: Re: [PATCH v4 3/5] drivers: bus: Add Simple Power-Managed Bus DT Bindings
Date: Wed, 28 Jan 2015 16:38:55 +0100 [thread overview]
Message-ID: <CAMuHMdXUQESzCggb6FsDQStVtCHgTCCKo7veXSdUTZcB9OAd_w@mail.gmail.com> (raw)
In-Reply-To: <20150127181727.GO17721@leverpostej>
Hi Mark,
On Tue, Jan 27, 2015 at 7:17 PM, Mark Rutland <mark.rutland@arm.com> wrote:
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/bus/simple-pm-bus.txt
>> @@ -0,0 +1,41 @@
>> +Simple Power-Managed Bus
>> +========================
>> +
>> +A Simple Power-Managed Bus is a transparent bus that doesn't need a real
>> +driver, as it's typically initialized by the boot loader.
>> +
>> +However, its bus controller is part of a PM domain, or under the control of a
>> +functional clock. Hence, the bus controller's PM domain and/or clock must be
>> +enabled for child devices connected to the bus (either on-SoC or externally)
>> +to function.
>> +
>> +The bindings for the Simple Power-Managed Bus extend the bindings for
>> +"simple-bus", as specified in ePAPR.
>
> I would note that "simple-pm-bus" follows the "simple-bus" set of
> properties, but is not an extension of "simple-bus".
OK.
> For the reasons I mentioned previously, I don't think that any
> "simple-pm-bus" should be "simple-bus" compatible (and I believe we
> should document that requirement below).
>> +Required properties:
>> + - compatible: Must contain at least "simple-pm-bus".
So you think I should add 'and must not contain "simple-bus"'?
>> + It's recommended to let this be preceded by one or more
>> + vendor-specific compatible values.
>> + - #address-cells, #size-cells, ranges: Must describe the mapping between
>> + parent address and child address spaces.
>> +
>> +Optional platform-specific properties for clock or PM domain control (at least
>> +one of them is required):
>> + - clocks: Must contain a reference to the functional clock(s),
>
> I'm a little worried about the clocks. What are the expectations on
> their configuration?
The clocks are highly platform-dependent. Hence the exact expectations
belong in the binding documentation for the clock provider (and possibly
the PM domain provider, too).
> I don't see how we can generally rely on the clock configuration being
> correct unless the input clocks only have on/off controls, and the OS
> doesn't see any of the parent clock tree it could potentially change the
> configuration of (beyond on/off).
This is indeed not about generic programmable clock generators, but about
clocks that are used solely to start/stop a hardware module by (un)gating
a functional clock.
> Otherwise we're relying on implicit behaviour elsewhere in Linux (which
> _will_ break over time), and this ends up not being usable by anything
> else.
>
> I'm coming to the opinion that while we might be able to have common
> driver in Linux, we can't have a common "simple-pm-bus" binding because
> it implicitly assumes too much about the OS behaviour.
If the bus controller is clocked from a generic programmable clock generator,
it would need its own driver to configure e.g. the clock frequency, which
could need more information from DT. This is not covered by "simple-pm-bus".
Thanks for your comments!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2015-01-28 15:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 16:16 [PATCH v4 0/5] drivers: bus: Add Simple Power-Managed Bus Geert Uytterhoeven
2015-01-26 16:16 ` [PATCH v4 1/5] drivers: bus: Sort Kconfig entries alphabetically Geert Uytterhoeven
2015-01-26 16:16 ` [PATCH v4 2/5] drivers: bus: Sort Makefile " Geert Uytterhoeven
2015-01-26 16:16 ` [PATCH v4 3/5] drivers: bus: Add Simple Power-Managed Bus DT Bindings Geert Uytterhoeven
[not found] ` <1422288977-20353-4-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2015-01-27 18:17 ` Mark Rutland
2015-01-28 15:38 ` Geert Uytterhoeven [this message]
2015-01-26 16:16 ` [PATCH v4 4/5] drivers: bus: Add Renesas Bus State Controller (BSC) " Geert Uytterhoeven
2015-01-26 16:16 ` [PATCH v4 5/5] drivers: bus: Add Simple Power-Managed Bus Driver Geert Uytterhoeven
2015-01-30 9:34 ` Ulf Hansson
2015-02-01 9:36 ` Geert Uytterhoeven
2015-01-27 17:42 ` [PATCH v4 0/5] drivers: bus: Add Simple Power-Managed Bus Kevin Hilman
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=CAMuHMdXUQESzCggb6FsDQStVtCHgTCCKo7veXSdUTZcB9OAd_w@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=Pawel.Moll@arm.com \
--cc=arnd@arndb.de \
--cc=balbi@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=geert+renesas@glider.be \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=horms+renesas@verge.net.au \
--cc=ijc+devicetree@hellion.org.uk \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=olof@lixom.net \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.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).