devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
Cc: ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org,
	john-Pj+rj9U5foFAfugRpC6u6w@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	hauke.mehrtens-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v2 09/15] reset: Add a reset controller driver for the Lantiq XWAY based SoCs
Date: Wed, 24 May 2017 15:10:52 +0200	[thread overview]
Message-ID: <1495631452.3840.27.camel@pengutronix.de> (raw)
In-Reply-To: <2f809dc7-53c6-ebf9-53c1-466bf34e39db-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>

On Tue, 2017-05-23 at 23:25 +0200, Hauke Mehrtens wrote:
> On 05/22/2017 11:33 AM, Philipp Zabel wrote:
> > Hi Hauke,
> > 
> > thank you for the patch. I have a few questions and comments below:
> > 
> > On Sun, 2017-05-21 at 15:09 +0200, Hauke Mehrtens wrote:
> >> From: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
> >>
> >> The reset controllers (on xRX200 and newer SoCs have two of them) are
> >> provided by the RCU module. This was initially implemented as a simple
> >> reset controller. However, the RCU module provides more functionality
> >> (ethernet GPHYs, USB PHY, etc.), which makes it a MFD device.
> >> The old reset controller driver implementation from
> >> arch/mips/lantiq/xway/reset.c did not honor this fact.
> > 
> > Does this driver replace arch/mips/lantiq/xway/reset.c?
> 
> This serial consists of multiple patches which are all together
> replacing this code. The RCU register block does controls multiple
> blocks in the SoC. One is the reset controller, but also the GPHY FW
> loading and some other unrelated stuff.

Thank you for clarifying.

> >> +		compatible = "lantiq,rcu-reset";
> >> +		lantiq,rcu-syscon = <&rcu0 0x10 0x14>;
> >> +		#reset-cells = <2>;
> >> +	};
> >> +
> >> +	rcu_reset1: rcu_reset {
> >> +		compatible = "lantiq,rcu-reset";
> >> +		lantiq,rcu-syscon = <&rcu0 0x48 0x24>;
> >> +		#reset-cells = <2>;
> >> +	};
> > 
> > I think these should be children of the &rcu0 node. Then you could use
> > the reg property to specify the registers.
> 
> The problem is that the RCU registers at offset 0x10 and 0x14 also have
> bits to indicate what caused the last hardware reset and which boot mode
> was selected by putting some pins to low or high level. I want to access
> the same register from the watchdog driver and probably form more
> positions which do not have anything to do with a reset controller.

That is ok, I just suggest to get the syscon regmap not from a phandle
property, but from the node parent. The reset controller is a part of
the RCU.

> > Also, have you considered using a binding like the ti-syscon-reset? 
> > That could remove the need for a rcu_reset node per register pair
> > altogether, but might not make sense if the reset registers are densely
> > populated.
> 
> Would your suggestion be something like this?
> 
> rcu_reset0: reset-controller {
> 	compatible = "lantiq,rcu-reset";
> 	lantiq,rcu-syscon = <&rcu0>;
> 	#reset-cells = <2>;
> 	ti,reset-bits = <
> 		0x48 0x24
> 		0x10 0x14
> 	>;
> };

Yes, for example. I'd put the reset-controller node inside the &rcu0
node and drop the lantiq,rcu-syscon property, though.

> I prefer to have two device tree nodes entries for these two register
> blocks.

If Rob is fine with this, I won't object. I'd just be interested to know
why.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-05-24 13:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 13:09 [PATCH v2 00/15] MIPS: lantiq: handle RCU register by separate drivers Hauke Mehrtens
     [not found] ` <20170521130918.27446-1-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2017-05-21 13:09   ` [PATCH v2 01/15] MIPS: lantiq: Use of_platform_populate instead of __dt_register_buses Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 02/15] mtd: lantiq-flash: drop check of boot select Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 03/15] mtd: spi-falcon: " Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 04/15] watchdog: lantiq: access boot cause register through regmap Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 05/15] MIPS: lantiq: Enable MFD_SYSCON to be able to use it for the RCU MFD Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 06/15] Documentation: DT: MIPS: lantiq: Add docs for the RCU bindings Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 07/15] MIPS: lantiq: Convert the xbar driver to a platform_driver Hauke Mehrtens
     [not found]     ` <20170521130918.27446-8-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2017-05-22  5:30       ` John Crispin
     [not found]         ` <71c88b1c-3ed1-8f30-1dbd-dbd4c7bb5cdc-Pj+rj9U5foFAfugRpC6u6w@public.gmane.org>
2017-05-23 20:56           ` Hauke Mehrtens
2017-05-22  6:05       ` Andy Shevchenko
     [not found]         ` <CAHp75VeQgekiWc+YxP5sDFBB4fvmRs1=heFcdYS6mAgqPACW7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-25 18:22           ` Hauke Mehrtens
     [not found]             ` <aa0f9259-b96f-f072-93d4-a42e05fadc82-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2017-05-25 18:54               ` Hauke Mehrtens
2017-05-30 23:11       ` Rob Herring
2017-05-21 13:09   ` [PATCH v2 08/15] MIPS: lantiq: remove ltq_reset_cause() and ltq_boot_select() Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 09/15] reset: Add a reset controller driver for the Lantiq XWAY based SoCs Hauke Mehrtens
     [not found]     ` <20170521130918.27446-10-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2017-05-22  9:33       ` Philipp Zabel
     [not found]         ` <1495445613.3558.67.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-05-23 21:25           ` Hauke Mehrtens
     [not found]             ` <2f809dc7-53c6-ebf9-53c1-466bf34e39db-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2017-05-24 13:10               ` Philipp Zabel [this message]
2017-05-21 13:09   ` [PATCH v2 10/15] MIPS: lantiq: remove old reset controller implementation Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 11/15] MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd Hauke Mehrtens
     [not found]     ` <20170521130918.27446-12-hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>
2017-05-23  7:52       ` Andy Shevchenko
     [not found]         ` <CAHp75VdSAGv0md8YsvwdZJX4Eo-K6Tv3TcyAVKfOmdk6De1iGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-25 18:53           ` Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 12/15] MIPS: lantiq: remove old GPHY loader code Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 13/15] phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 14/15] MIPS: lantiq: remove old USB PHY initialisation Hauke Mehrtens
2017-05-21 13:09   ` [PATCH v2 15/15] 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=1495631452.3840.27.camel@pengutronix.de \
    --to=p.zabel-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org \
    --cc=hauke.mehrtens-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=john-Pj+rj9U5foFAfugRpC6u6w@public.gmane.org \
    --cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
    --cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@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).