linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: Kevin Hilman <khilman@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	jbrunet@baylibre.com, devicetree@vger.kernel.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC 02/11] dt-bindings: power: amlogic, meson-gx-pwrc: Add SM1 bindings
Date: Tue, 20 Aug 2019 07:45:39 +0200	[thread overview]
Message-ID: <CAFBinCCubjTCvzFWA-JJeGPJ_29O5az3=-99G3dvcnBNZGt+gw@mail.gmail.com> (raw)
In-Reply-To: <7h1rxgvgyj.fsf@baylibre.com>

Hi Kevin,

On Tue, Aug 20, 2019 at 2:06 AM Kevin Hilman <khilman@baylibre.com> wrote:
[...]
> >> +ao_sysctrl: sys-ctrl@0 {
> >> +       compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
> >> +       reg =  <0x0 0x0 0x0 0x100>;
> >> +
> >> +       pwrc: power-controller {
> >> +               compatible = "amlogic,meson-sm1-pwrc";
> >> +               #power-domain-cells = <1>;
> >> +               amlogic,hhi-sysctrl = <&hhi>;
> >> +       };
> >> +};
> >
> > I'm not sure that we want to mix HHI and AO power domains in one driver again
>
> We're not mixing here. These are all EE domains.  They just have some
> control registers in the AO memory region.
looking at patch 04/11 I see what you mean
(I'm describing it in my own words to make sure I got it right)
we are controlling the EE power domains with this binding.
each power domain has 1 bit in the HHI registers and 2 more bits
("sleep" and "isolation") in the AO region

then it makes sense to describe this together

> > back in March I asked a few questions about modelling the power
> > domains and Kevin explained that we can implement them hierarchical:
> > [0]
> > unfortunately I didn't have the time to work on this - however, now
> > that we implement a new driver: should we follow this hierarchical
> > approach?
>
> The more I look at this, I don't think we have a commpelling need to
> model them hierarchically.  The main reason being is that of the 3
> top-level domains I listed[0], we can only managing the EE domains in the
> kernel.  It doesn't make sense to model/manage AO domains because, well,
> they are always-on (AO).  The CPU domains are managed my the PSCI
> firmware, and we don't/won't have any control over that.
agreed, this is the same for the 32-bit SoCs except that we manage the
CPU domains in arch/arm/mach-meson/platsmp.c instead of PSCI firmware
(no problem here, I'm just mentioning it to get a complete picture)

> For that reason, I think it makes the most sense to have a generic
> driver that handles all the EE domains.
>
> IMO, the SM1 driver that Neil wrote in patch 4 of this series is 80%
> there.  If we generalize that little more, it can be quite easily used
> for all the EE domains.
with your description above I agree.

for the 32-bit SoCs it would be beneficial if the register layout in
the bindings was swapped:
- have the power controller as child of HHI
- pass the AO syscon

my main points for this are:
- it seems that for some power domains there are no AO register bits,
for example the Ethernet Memory PD (GXBB datasheet [0] section 18.3 on
page 48 and Meson8b datasheet [1] section 5.4 on page 17)
- less confusion: if it's a power domain controller for the EE region
then it should be located there, even if it has additional bits
elsewhere
- (weakest argument though) on the 32-bit SoCs we currently don't have
a "big AO syscon" (and I don't see that we actually need it), but we
do have a "amlogic,meson8b-pmu", "syscon" binding which covers
AO_RTI_GEN_PWR_SLEEP0 (I should probably extend it so it covers
AO_RTI_GEN_PWR_ISO0 as well, that just extra 4 bytes)

What do you think?


Martin


[0] https://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf
[1] https://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf

  reply	other threads:[~2019-08-20  5:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 10:46 [RFC 00/11] arm64: Add support for Amlogic SM1 SoC Family Neil Armstrong
2019-07-01 10:46 ` [RFC 01/11] soc: amlogic: meson-gx-socinfo: Add SM1 and S905X3 IDs Neil Armstrong
2019-07-02  9:51   ` Jerome Brunet
2019-07-02 23:11   ` Martin Blumenstingl
2019-07-01 10:46 ` [RFC 02/11] dt-bindings: power: amlogic, meson-gx-pwrc: Add SM1 bindings Neil Armstrong
2019-07-03  0:00   ` Martin Blumenstingl
2019-08-20  0:05     ` Kevin Hilman
2019-08-20  5:45       ` Martin Blumenstingl [this message]
2019-07-01 10:46 ` [RFC 03/11] soc: amlogic: gx-pwrc-vpu: add SM1 support Neil Armstrong
2019-07-01 10:46 ` [RFC 04/11] soc: amlogic: Add support for SM1 power controller Neil Armstrong
2019-08-19 23:56   ` Kevin Hilman
2019-08-20 14:55     ` Neil Armstrong
2019-08-20 19:19       ` Kevin Hilman
2019-07-01 10:46 ` [RFC 05/11] dt-bindings: soc: amlogic: clk-measure: Add SM1 compatible Neil Armstrong
2019-07-03  0:01   ` Martin Blumenstingl
2019-07-22 22:10   ` Rob Herring
2019-07-01 10:47 ` [RFC 06/11] soc: amlogic: clk-measure: Add support for SM1 Neil Armstrong
2019-07-02 23:51   ` Martin Blumenstingl
2019-07-03 11:44     ` Neil Armstrong
2019-07-01 10:47 ` [RFC 07/11] dt-bindings: media: meson-ao-cec: add SM1 compatible Neil Armstrong
2019-07-22 22:11   ` Rob Herring
2019-07-01 10:47 ` [RFC 08/11] media: platform: meson-ao-cec-g12a: add support for SM1 Neil Armstrong
2019-07-01 10:47 ` [RFC 09/11] dt-bindings: arm: amlogic: add SM1 bindings Neil Armstrong
2019-07-01 10:47 ` [RFC 10/11] dt-bindings: arm: amlogic: add SEI Robotics SEI610 bindings Neil Armstrong
2019-07-01 10:47 ` [RFC 11/11] arm64: dts: add support for SM1 based SEI Robotics SEI610 Neil Armstrong
2019-08-20 13:16 ` [RFC 00/11] arm64: Add support for Amlogic SM1 SoC Family Neil Armstrong

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='CAFBinCCubjTCvzFWA-JJeGPJ_29O5az3=-99G3dvcnBNZGt+gw@mail.gmail.com' \
    --to=martin.blumenstingl@googlemail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.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).