linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Linux-MIPS <linux-mips@linux-mips.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	LINUX-WATCHDOG <linux-watchdog@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	John Crispin <john@phrozen.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	hauke.mehrtens@intel.com,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH v3 07/16] Documentation: DT: MIPS: lantiq: Add docs for the RCU bindings
Date: Wed, 31 May 2017 16:04:17 -0500	[thread overview]
Message-ID: <CAL_JsqL=iapYifAhDcYSLRGyevx7RxGiUtji72NJD-uYCQnCdw@mail.gmail.com> (raw)
In-Reply-To: <6b8bb1cd-c090-435d-d150-d53edf04d2df@hauke-m.de>

On Wed, May 31, 2017 at 3:13 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> On 05/31/2017 10:05 PM, Rob Herring wrote:
>> On Sun, May 28, 2017 at 08:39:57PM +0200, Hauke Mehrtens wrote:
>>> From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>>>
>>> This adds the initial documentation for the RCU module (a MFD device
>>> which provides USB PHYs, reset controllers and more).
>>>
>>> The RCU register range is used for multiple purposes. Mostly one device
>>> uses one or multiple register exclusively, but for some registers some
>>> bits are for one driver and some other bits are for a different driver.
>>> With this patch all accesses to the RCU registers will go through
>>> syscon.
>>>
>>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>>> ---
>>>  .../devicetree/bindings/mips/lantiq/rcu.txt        | 97 ++++++++++++++++++++++
>>>  1 file changed, 97 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/mips/lantiq/rcu.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/mips/lantiq/rcu.txt b/Documentation/devicetree/bindings/mips/lantiq/rcu.txt
>>> new file mode 100644
>>> index 000000000000..3e2461262218
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/mips/lantiq/rcu.txt
>>> @@ -0,0 +1,97 @@
>>> +Lantiq XWAY SoC RCU binding
>>> +===========================
>>> +
>>> +This binding describes the RCU (reset controller unit) multifunction device,
>>> +where each sub-device has it's own set of registers.
>>> +
>>> +The RCU register range is used for multiple purposes. Mostly one device
>>> +uses one or multiple register exclusively, but for some registers some
>>> +bits are for one driver and some other bits are for a different driver.
>>> +With this patch all accesses to the RCU registers will go through
>>> +syscon.
>>> +
>>> +
>>> +-------------------------------------------------------------------------------
>>> +Required properties:
>>> +- compatible        : The first and second values must be: "simple-mfd", "syscon"
>>> +- reg               : The address and length of the system control registers
>>> +
>>> +
>>> +-------------------------------------------------------------------------------
>>> +Example of the RCU bindings on a xRX200 SoC:
>>> +    rcu0: rcu@203000 {
>>> +            compatible = "lantiq,rcu-xrx200", "simple-mfd", "syscon";
>>> +            reg = <0x203000 0x100>;
>>> +            big-endian;
>>> +
>>> +            gphy0: gphy@0 {
>>
>> Unit address without reg address is not valid.
>>
>>> +                    compatible = "lantiq,xrx200a2x-rcu-gphy";
>>> +
>>> +                    regmap = <&rcu0>;
>>> +                    offset = <0x20>;
>>
>> Does reg not work instead?
>
> Is it ok to access some registers in this range with a reg = <0x20 0x04>
> setting and some others through syscon? This specific register is only
> used by this gphy, but the reset controller shares the register with
> some other drivers like the watchdog driver.

Yes. The main thing is you need to use reg where you have unit addresses.

For the syscon-reboot, you could also just not describe in DT and have
the reset ctrlr driver register reboot driver. DT is not the only way
to instantiate drivers.

Rob

  reply	other threads:[~2017-05-31 21:04 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 18:39 [PATCH v3 00/16] MIPS: lantiq: handle RCU register by separate drivers Hauke Mehrtens
2017-05-28 18:39 ` [PATCH v3 01/16] MIPS: lantiq: Use of_platform_default_populate instead of __dt_register_buses Hauke Mehrtens
2017-05-28 18:39 ` [PATCH v3 02/16] mtd: lantiq-flash: drop check of boot select Hauke Mehrtens
2017-05-28 18:39 ` [PATCH v3 03/16] mtd: spi-falcon: " Hauke Mehrtens
2017-05-28 18:39 ` [PATCH v3 04/16] watchdog: lantiq: access boot cause register through regmap Hauke Mehrtens
2017-05-28 18:39 ` [PATCH v3 05/16] watchdog: lantiq: add device tree binding documentation Hauke Mehrtens
2017-05-31 20:00   ` Rob Herring
2017-05-31 20:11     ` Hauke Mehrtens
2017-05-28 18:39 ` [PATCH v3 06/16] MIPS: lantiq: Enable MFD_SYSCON to be able to use it for the RCU MFD Hauke Mehrtens
2017-05-28 18:39 ` [PATCH v3 07/16] Documentation: DT: MIPS: lantiq: Add docs for the RCU bindings Hauke Mehrtens
2017-05-31 20:05   ` Rob Herring
2017-05-31 20:13     ` Hauke Mehrtens
2017-05-31 21:04       ` Rob Herring [this message]
2017-05-28 18:39 ` [PATCH v3 08/16] MIPS: lantiq: Convert the fpi bus driver to a platform_driver Hauke Mehrtens
2017-05-30 18:23   ` Andy Shevchenko
2017-05-30 22:02     ` Hauke Mehrtens
2017-05-31 20:54   ` Rob Herring
2017-05-28 18:39 ` [PATCH v3 09/16] MIPS: lantiq: remove ltq_reset_cause() and ltq_boot_select() Hauke Mehrtens
2017-05-28 18:40 ` [PATCH v3 10/16] reset: Add a reset controller driver for the Lantiq XWAY based SoCs Hauke Mehrtens
2017-05-29 10:20   ` Philipp Zabel
2017-05-31 20:58     ` Rob Herring
2017-05-28 18:40 ` [PATCH v3 11/16] MIPS: lantiq: remove old reset controller implementation Hauke Mehrtens
2017-05-28 18:40 ` [PATCH v3 12/16] MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd Hauke Mehrtens
2017-05-28 18:40 ` [PATCH v3 13/16] MIPS: lantiq: remove old GPHY loader code Hauke Mehrtens
2017-05-28 18:40 ` [PATCH v3 14/16] phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module Hauke Mehrtens
2017-05-30 18:31   ` Andy Shevchenko
2017-05-30 20:21     ` Hauke Mehrtens
2017-05-28 18:40 ` [PATCH v3 15/16] MIPS: lantiq: remove old USB PHY initialisation Hauke Mehrtens
2017-05-28 18:40 ` [PATCH v3 16/16] MIPS: lantiq: Remove the arch/mips/lantiq/xway/reset.c implementation Hauke Mehrtens

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_JsqL=iapYifAhDcYSLRGyevx7RxGiUtji72NJD-uYCQnCdw@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hauke.mehrtens@intel.com \
    --cc=hauke@hauke-m.de \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=ralf@linux-mips.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).