mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chukun Pan <amadeus@jmu.edu.cn>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, Chukun Pan <amadeus@jmu.edu.cn>
Subject: [PATCH 2/3] soc: mediatek: update power domain data of MT7623A
Date: Tue, 26 Jul 2022 11:06:20 +0800	[thread overview]
Message-ID: <20220726030621.7555-2-amadeus@jmu.edu.cn> (raw)
In-Reply-To: <20220726030621.7555-1-amadeus@jmu.edu.cn>

When running OpenWrt on MT7623A, I receive a kernel
warning as follows (Device dts using mt7623.dtsi):

mtk-scpsys 10006000.scpsys: Failed to power on domain mfg
WARNING: CPU: 0 PID: 1 at drivers/soc/mediatek/mtk-scpsys.c:457 0xc04a4130

When I switch the device dts to using mt7623a.dtsi,
the system fails to boot:

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 0-...0: (0 ticks this GP) idle=146/1/0x40000000 softirq=53/53 fqs=1051
 (detected by 1, t=2102 jiffies, g=-1111, q=18)
Sending NMI from CPU 1 to CPUs 0:

Solved the problem by duplicating the power domain of
the MT7623 (except MFG) to MT7623A, the system works
fine without kernel warnings/errors.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 drivers/soc/mediatek/mtk-scpsys.c | 35 +++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index ca75b14931ec..8b5713db1ca3 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -910,6 +910,41 @@ static const struct scp_domain_data scp_domain_data_mt7623a[] = {
 		.clk_id = {CLK_NONE},
 		.caps = MTK_SCPD_ACTIVE_WAKEUP,
 	},
+	[MT7623A_POWER_DOMAIN_VDEC] = {
+		.name = "vdec",
+		.sta_mask = PWR_STATUS_VDEC,
+		.ctl_offs = SPM_VDE_PWR_CON,
+		.sram_pdn_bits = GENMASK(11, 8),
+		.sram_pdn_ack_bits = GENMASK(12, 12),
+		.clk_id = {CLK_MM},
+		.caps = MTK_SCPD_ACTIVE_WAKEUP,
+	},
+	[MT7623A_POWER_DOMAIN_DISP] = {
+		.name = "disp",
+		.sta_mask = PWR_STATUS_DISP,
+		.ctl_offs = SPM_DIS_PWR_CON,
+		.sram_pdn_bits = GENMASK(11, 8),
+		.clk_id = {CLK_MM},
+		.bus_prot_mask = MT2701_TOP_AXI_PROT_EN_MM_M0,
+		.caps = MTK_SCPD_ACTIVE_WAKEUP,
+	},
+	[MT7623A_POWER_DOMAIN_ISP] = {
+		.name = "isp",
+		.sta_mask = PWR_STATUS_ISP,
+		.ctl_offs = SPM_ISP_PWR_CON,
+		.sram_pdn_bits = GENMASK(11, 8),
+		.sram_pdn_ack_bits = GENMASK(13, 12),
+		.clk_id = {CLK_MM},
+		.caps = MTK_SCPD_ACTIVE_WAKEUP,
+	},
+	[MT7623A_POWER_DOMAIN_BDP] = {
+		.name = "bdp",
+		.sta_mask = PWR_STATUS_BDP,
+		.ctl_offs = SPM_BDP_PWR_CON,
+		.sram_pdn_bits = GENMASK(11, 8),
+		.clk_id = {CLK_NONE},
+		.caps = MTK_SCPD_ACTIVE_WAKEUP,
+	},
 };
 
 /*
-- 
2.25.1


  reply	other threads:[~2022-07-26  3:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  3:06 [PATCH 1/3] dt-bindings: soc: update MT7623A power dt-bindings Chukun Pan
2022-07-26  3:06 ` Chukun Pan [this message]
2022-07-26  8:54   ` [PATCH 2/3] soc: mediatek: update power domain data of MT7623A AngeloGioacchino Del Regno
2022-07-26  3:06 ` [PATCH 3/3] arm: dts: mt7623: update scpsys device nodes Chukun Pan
2022-07-26  9:25 ` [PATCH 1/3] dt-bindings: soc: update MT7623A power dt-bindings Krzysztof Kozlowski

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=20220726030621.7555-2-amadeus@jmu.edu.cn \
    --to=amadeus@jmu.edu.cn \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.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 \
    --cc=robh+dt@kernel.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

all inboxes | Powered by JetHome®