From: Sascha Hauer <s.hauer@pengutronix.de>
To: Kevin Hilman <khilman@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
kernel@pengutronix.de, Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver
Date: Wed, 27 May 2015 08:24:30 +0200 [thread overview]
Message-ID: <20150527062430.GN6325@pengutronix.de> (raw)
In-Reply-To: <7hlhgbotlp.fsf@deeprootsystems.com>
On Tue, May 26, 2015 at 03:35:14PM -0700, Kevin Hilman wrote:
> Sascha Hauer <s.hauer@pengutronix.de> writes:
>
> > This adds a power domain driver for the Mediatek SCPSYS unit.
> >
> > The System Control Processor System (SCPSYS) has several power
> > management related tasks in the system. The tasks include thermal
> > measurement, dynamic voltage frequency scaling (DVFS), interrupt
> > filter and lowlevel sleep control. The System Power Manager (SPM)
> > inside the SCPSYS is for the MTCMOS power domain control.
> >
> > For now this driver only adds power domain support, the more
> > advanced features are not yet supported. The driver implements
> > the generic PM domain device tree bindings, the first user will
> > most likely be the Mediatek AFE audio driver.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > drivers/soc/mediatek/Kconfig | 6 +
> > drivers/soc/mediatek/Makefile | 1 +
> > drivers/soc/mediatek/mtk-scpsys.c | 345 +++++++++++++++++++++++++++++++
> > include/dt-bindings/power/mt8173-power.h | 15 ++
> > 4 files changed, 367 insertions(+)
> > create mode 100644 drivers/soc/mediatek/mtk-scpsys.c
> > create mode 100644 include/dt-bindings/power/mt8173-power.h
> >
> > diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
> > index bcdb22d..1d34819 100644
> > --- a/drivers/soc/mediatek/Kconfig
> > +++ b/drivers/soc/mediatek/Kconfig
> > @@ -9,3 +9,9 @@ config MTK_PMIC_WRAP
> > Say yes here to add support for MediaTek PMIC Wrapper found
> > on different MediaTek SoCs. The PMIC wrapper is a proprietary
> > hardware to connect the PMIC.
> > +
> > +config MTK_SCPSYS
> > + tristate "MediaTek SCPSYS Support"
>
> depends on ARCH_MEDIATEK ?
You are reviewing v2 of this series. This is already fixed in v3 sent
out last wednesday.
> > + for (i = 0; i < NUM_DOMAINS; i++) {
> > + struct scp_domain *scpd = &scp->domains[i];
> > + struct generic_pm_domain *pmd = &scpd->pmd;
> > +
> > + scp->pmd[i] = pmd;
> > + scpd->data = &scp_domain_data[i];
> > + scpd->scp = scp;
> > +
> > + pmd->name = scp_domain_data[i].name;
> > + pmd->power_off = scpsys_power_off;
> > + pmd->power_on = scpsys_power_on;
> > + pmd->power_off_latency_ns = 20000;
> > + pmd->power_on_latency_ns = 20000;
>
> I think I mentioned this before... are these numbers really identical
> for all domains? I suggest you make these each a field in the domain
> data so they can be different for each domain, and eventually come from
> DT data.
For the record, here are the numbers I just measured:
mtk-scpsys 10006000.scpsys: vdec on: 31000 off: 10769
mtk-scpsys 10006000.scpsys: venc on: 6000 off: 5923
mtk-scpsys 10006000.scpsys: isp on: 5923 off: 5923
mtk-scpsys 10006000.scpsys: mm on: 7616 off: 7692
mtk-scpsys 10006000.scpsys: venc_lt on: 5924 off: 6000
mtk-scpsys 10006000.scpsys: audio on: 5462 off: 5615
mtk-scpsys 10006000.scpsys: usb on: 5461 off: 5462
mtk-scpsys 10006000.scpsys: mfg_async on: 29923 off: 11077
mtk-scpsys 10006000.scpsys: mfg_2d on: 5923 off: 5616
mtk-scpsys 10006000.scpsys: mfg on: 11231 off: 16153
Anyway, the pm domain core measures these times itself, so there
should not be a need to fill in anything here. I was irritated by the
warning message I got each time when the times were exceeded. This
message seemed to imply that something was wrong and I had to fill
in sane values in the latency fields. Since we now have [1] I'll just
drop the initialisation of these fields.
Sascha
[1]
commit 6d7d5c3266aa946b2049d9fed02186c1a378621b
Author: Russell King <rmk+kernel@arm.linux.org.uk>
Date: Fri Mar 20 17:20:28 2015 +0000
PM / domains: quieten down generic pm domains
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2015-05-27 6:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 13:11 [PATCH v2] Mediatek SCPSYS power domain support Sascha Hauer
2015-05-11 13:11 ` [PATCH 4/4] ARM64: MediaTek MT8173: Add SCPSYS device node Sascha Hauer
2015-05-15 14:17 ` Daniel Kurtz
[not found] ` <1431349882-12260-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-11 13:11 ` [PATCH 1/4] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
2015-05-11 13:11 ` [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver Sascha Hauer
[not found] ` <1431349882-12260-3-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-26 22:35 ` Kevin Hilman
2015-05-27 6:24 ` Sascha Hauer [this message]
2015-05-28 17:22 ` Kevin Hilman
2015-05-11 13:11 ` [PATCH 3/4] ARM64: MediaTek: Add generic pm domain support Sascha Hauer
2015-05-11 16:05 ` [PATCH v2] Mediatek SCPSYS power " Matthias Brugger_0
2015-05-11 19:24 ` Sascha Hauer
-- strict thread matches above, loose matches on Subject: below --
2015-03-10 15:40 [PATCH v1] " Sascha Hauer
[not found] ` <1426002063-25713-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-03-10 15:41 ` [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver Sascha Hauer
2015-03-11 11:10 ` Paul Bolle
2015-03-31 16:27 ` Kevin Hilman
[not found] ` <7hbnj9b08m.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2015-04-13 10:55 ` Sascha Hauer
2015-05-08 12:16 ` Matthias Brugger
[not found] ` <CABuKBeLvBfeXw+b+SxAEjGA2dzPhYBs-SiJUyP5dUA28R=Rjkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-08 12:19 ` Sascha Hauer
2015-05-08 12:28 ` Matthias Brugger
[not found] ` <CABuKBeJ=HrwNMvV5N+6pnBgbB9k7e=8UPi3WWBTnpRFeEbTWvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-08 12:51 ` Sascha Hauer
2015-05-08 15:51 ` Matthias Brugger
2015-03-09 8:09 [RFC] Mediatek SCPSYS power domain support Sascha Hauer
2015-03-09 8:10 ` [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver Sascha Hauer
2015-03-09 21:35 ` Kevin Hilman
[not found] ` <7h61a94zy0.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2015-03-10 9:41 ` Sascha Hauer
2015-03-10 14:40 ` Sascha Hauer
[not found] ` <20150310144053.GH24885-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-03-10 16:00 ` Kevin Hilman
[not found] ` <20150310094142.GD24885-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-03-11 3:16 ` James Liao
2015-03-11 9:03 ` Sascha Hauer
2015-03-11 17:14 ` Kevin Hilman
2015-03-12 7:21 ` Sascha Hauer
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=20150527062430.GN6325@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=devicetree@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.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).