All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jasper Mattsson <jasu-tmnvWD0sGVAk+I/owrrOrA@public.gmane.org>
To: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: [PATCH 0/3] Fix scpsys on MT6797
Date: Mon, 3 Sep 2018 23:06:25 +0300	[thread overview]
Message-ID: <20180903200625.GA6388@xn--njmtys-xxab.info> (raw)

Hello,

On MT6797, SCPSYS probe fails due to gaps in the scp_domain_data_mt6797
array. The gaps are due to omitted MFG_* power domains. This could be
solved by rearranging the #defines in dt-bindings, but I'm not sure if
that's allowed as it would break compatibility with existing DTBs.

Audio, VENC, VDEC, and MJC were also missing clocks, which I added.

Additionally, if SCPSYS is started with the power domains initially
disabled (e.g. when booting with kexec), it will hang the system. This
is because all the domains are initially powered on in the order they
are defined in the scp_domain_data array, disregarding any subdomain
dependencies. VENC and VDEC are subdomains of MM, but appear before it
in the array. This makes the system hang. Again, this could be solved by
reordering the #defines, but instead I added the MM clock to the domains
and that fixed things even if the MM domain is not powerd on by SPM.

There *might* be a bug that I did not fix, because I am not sure if it
is a bug at all - MFG_ASYNC does not have any bus protection flags,
but on Android

To properly test this patch, you'll need to apply my previous patch
which fixes some clocks, otherwise the system would not work properly
without clk_ignore_unused. The previous patch shows wrong on Patchwork,
not sure what I messed up (should I re-send?), so here's a link to all
my patches, which should only include this and the clk patch at the time
of writing:

https://patchwork.kernel.org/project/linux-mediatek/list/?submitter=182219


Best regards,
Jasper Mattsson

Jasper Mattsson (3):
  soc: mediatek: Bind missing clocks to scpsys on the MT6797
  soc: mediatek: Allow gaps in SCP PDs
  dts: mediatek: mt6797: Bind audio, mjc, and venc clocks to SCPSYS

 .../bindings/soc/mediatek/scpsys.txt          |  2 +-
 arch/arm64/boot/dts/mediatek/mt6797.dtsi      |  9 +++++---
 drivers/soc/mediatek/mtk-scpsys.c             | 21 ++++++++++++++-----
 3 files changed, 23 insertions(+), 9 deletions(-)

--
2.18.0

                 reply	other threads:[~2018-09-03 20:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180903200625.GA6388@xn--njmtys-xxab.info \
    --to=jasu-tmnvwd0sgvak+i/owrrora@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.