Message ID | 20221201073328.1559-1-allen-kh.cheng@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp128571wrr; Wed, 30 Nov 2022 23:48:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf7LUYgB63bZsfK69Pi+q+1WJSdXDLNQKKLIQqCqe6egLRRaBSdNT0L046pF3ixSvbn9T8Ua X-Received: by 2002:a17:907:8c0d:b0:7ae:70f9:114 with SMTP id ta13-20020a1709078c0d00b007ae70f90114mr25653904ejc.44.1669880938494; Wed, 30 Nov 2022 23:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669880938; cv=none; d=google.com; s=arc-20160816; b=HVyRwl0JDQZ9jn0dXD+FoPQxGLq4Tmkm1lD6VuiI25G1edz+tgXU4HrR6HGzJIBgbt CmYkuBclr8rfbK1nHIKBGOUPc3ihBe7i4x74DH5eIm2t9mE2Sir0pL9H3aLW189vIJeY cAUzCjHFiSPrbpmQf6lO0XYWzedrGczJWNFuUOM+UwBmzMv9RzZfArGll5DdUpmDkVzz tY3bfF5LMzr8hqBEqJcVUyUxooF44H0TCbK0YaXN8ejCCbZ53UP2bLOr0vQijYcXnFD2 QdA/B6JUYihBqfpJHUQUWnGlJQnS+Zgmn387s/5UhnkxecnLmd4nHEGdYdLHvyuz09rz UILw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=GEB/PItp3ApqYqJMuq7w9mwjWCEXCCq4x+XaxUYFjtY=; b=CIVC1tDSLX1nMViOXMnlwEgzyemAzhYKSj4TgwK7Vegm5yhro/rZ4ymxbvKn9DLW4a p7Xmn0jWoPPGsouW/0LkuQBXrZMGOqPrTA8ljvSbWv9E7bxOt4A2sn7A6XBbfhOg8LZy zpoYVi9c+mRz3fEgIQ3Blw5k+54gNYKQxXGLbf6NywrBrkZy722RpuiAOT5gIKYbb4AT XNqzFnw1N4B9y88rvohThxEoTqPoqIFtusDSqSNYKz8kxDe8jGG2VnpQVjGmIRiVbZ3V Ov0I+fs/+1NW6MyanJQa38dxVadHIOsbP8TX7XEm7dmpSyldV9KBPHI/GeYsXpdf+bQG jg6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=WGLBy8dU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id re3-20020a170906d8c300b007815a44de91si2791183ejb.771.2022.11.30.23.48.35; Wed, 30 Nov 2022 23:48:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=WGLBy8dU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbiLAHdr (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Thu, 1 Dec 2022 02:33:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiLAHdn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Dec 2022 02:33:43 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2A3132047; Wed, 30 Nov 2022 23:33:39 -0800 (PST) X-UUID: f60f3869cfd94774a36a8475ca396d66-20221201 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=GEB/PItp3ApqYqJMuq7w9mwjWCEXCCq4x+XaxUYFjtY=; b=WGLBy8dU39blEpJFwRgIQVMqlq4N5GUMWE1ApWNtuEa8bXgFJQoA7bL1IRonaCvyP82UYVWL6uzzL1YReIcNm6egKUOvDfQdF+shpxJLwppxqpvMzE4AELDazkxkX2DAqvN9pnMY7mJHi7v9yY01fdUnU5SyBfllwVgcz4bJDG8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:9389cffb-4fcc-4b91-9c5f-ebd33effa78c,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:90 X-CID-INFO: VERSION:1.1.14,REQID:9389cffb-4fcc-4b91-9c5f-ebd33effa78c,IP:0,URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:90 X-CID-META: VersionHash:dcaaed0,CLOUDID:68a23e6c-41fe-47b6-8eb4-ec192dedaf7d,B ulkID:221201153334SA4JXALR,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: f60f3869cfd94774a36a8475ca396d66-20221201 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from <allen-kh.cheng@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1360004168; Thu, 01 Dec 2022 15:33:32 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Thu, 1 Dec 2022 15:33:30 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 1 Dec 2022 15:33:30 +0800 From: Allen-KH Cheng <allen-kh.cheng@mediatek.com> To: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Matthias Brugger <matthias.bgg@gmail.com> CC: <Project_Global_Chrome_Upstream_Group@mediatek.com>, <angelogioacchino.delregno@collabora.com>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-mediatek@lists.infradead.org>, Chen-Yu Tsai <wenst@chromium.org>, Allen-KH Cheng <allen-kh.cheng@mediatek.com> Subject: [PATCH] arm64: dts: mt8192: Add adsp power domain controller Date: Thu, 1 Dec 2022 15:33:28 +0800 Message-ID: <20221201073328.1559-1-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750997074924529144?= X-GMAIL-MSGID: =?utf-8?q?1750997074924529144?= |
Series |
arm64: dts: mt8192: Add adsp power domain controller
|
|
Commit Message
Allen-KH Cheng
Dec. 1, 2022, 7:33 a.m. UTC
Add adsp power domain controller node for mt8192 SoC.
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
---
Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/
[Allen-KH Cheng <allen-kh.cheng@mediatek.com>]
---
---
arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++
include/dt-bindings/power/mt8192-power.h | 1 +
2 files changed, 9 insertions(+)
Comments
On Thu, Dec 1, 2022 at 3:33 PM Allen-KH Cheng <allen-kh.cheng@mediatek.com> wrote: > > Add adsp power domain controller node for mt8192 SoC. > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > --- > Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ > [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] > --- > --- > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ > include/dt-bindings/power/mt8192-power.h | 1 + > 2 files changed, 9 insertions(+) > > diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > index 424fc89cc6f7..e71afba871fc 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > @@ -514,6 +514,14 @@ > }; > }; > }; > + > + power-domain@MT8192_POWER_DOMAIN_ADSP { > + reg = <MT8192_POWER_DOMAIN_ADSP>; > + clocks = <&topckgen CLK_TOP_ADSP_SEL>; > + clock-names = "adsp"; > + mediatek,infracfg = <&infracfg>; > + #power-domain-cells = <0>; > + }; > }; > }; > Please also tie the new power domain to the SCP_ADSP clock. ChenYu > diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h > index 4eaa53d7270a..63e81cd0d06d 100644 > --- a/include/dt-bindings/power/mt8192-power.h > +++ b/include/dt-bindings/power/mt8192-power.h > @@ -28,5 +28,6 @@ > #define MT8192_POWER_DOMAIN_CAM_RAWA 18 > #define MT8192_POWER_DOMAIN_CAM_RAWB 19 > #define MT8192_POWER_DOMAIN_CAM_RAWC 20 > +#define MT8192_POWER_DOMAIN_ADSP 21 > > #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ > -- > 2.18.0 >
Il 01/12/22 08:33, Allen-KH Cheng ha scritto: > Add adsp power domain controller node for mt8192 SoC. > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > --- > Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ > [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] > --- > --- > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ > include/dt-bindings/power/mt8192-power.h | 1 + > 2 files changed, 9 insertions(+) > Allen, thanks for this one, but it's incomplete... First of all, you must add the power domain on the driver itself, specifically, in drivers/soc/mediatek/mt8192-pm-domains.h - otherwise this change will have no effect! ...Then, as Chen-Yu said, you should also add the power domain to the scp_adsp clock node as that's solving the lockup issue... .......and last, but not least: we need a Fixes tag to backport this fix, here and on the commit that adds the missing power domain in the driver. Thanks, Angelo > diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > index 424fc89cc6f7..e71afba871fc 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > @@ -514,6 +514,14 @@ > }; > }; > }; > + > + power-domain@MT8192_POWER_DOMAIN_ADSP { > + reg = <MT8192_POWER_DOMAIN_ADSP>; > + clocks = <&topckgen CLK_TOP_ADSP_SEL>; > + clock-names = "adsp"; > + mediatek,infracfg = <&infracfg>; > + #power-domain-cells = <0>; > + }; > }; > }; > > diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h > index 4eaa53d7270a..63e81cd0d06d 100644 > --- a/include/dt-bindings/power/mt8192-power.h > +++ b/include/dt-bindings/power/mt8192-power.h > @@ -28,5 +28,6 @@ > #define MT8192_POWER_DOMAIN_CAM_RAWA 18 > #define MT8192_POWER_DOMAIN_CAM_RAWB 19 > #define MT8192_POWER_DOMAIN_CAM_RAWC 20 > +#define MT8192_POWER_DOMAIN_ADSP 21 > > #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ >
On Thu, Dec 1, 2022 at 5:07 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > Il 01/12/22 08:33, Allen-KH Cheng ha scritto: > > Add adsp power domain controller node for mt8192 SoC. > > > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > > --- > > Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ > > [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] > > --- > > --- > > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ > > include/dt-bindings/power/mt8192-power.h | 1 + > > 2 files changed, 9 insertions(+) > > > > Allen, thanks for this one, but it's incomplete... > > First of all, you must add the power domain on the driver itself, specifically, > in drivers/soc/mediatek/mt8192-pm-domains.h - otherwise this change will have no > effect! Actually it's worse. The driver doesn't know about the new power domain, and so it will fail to probe. We might need to make the power domain driver fail gracefully and skip unknown power domains. ChenYu > ...Then, as Chen-Yu said, you should also add the power domain to the scp_adsp > clock node as that's solving the lockup issue... > > .......and last, but not least: we need a Fixes tag to backport this fix, here > and on the commit that adds the missing power domain in the driver. > > Thanks, > Angelo > > > diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > index 424fc89cc6f7..e71afba871fc 100644 > > --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > @@ -514,6 +514,14 @@ > > }; > > }; > > }; > > + > > + power-domain@MT8192_POWER_DOMAIN_ADSP { > > + reg = <MT8192_POWER_DOMAIN_ADSP>; > > + clocks = <&topckgen CLK_TOP_ADSP_SEL>; > > + clock-names = "adsp"; > > + mediatek,infracfg = <&infracfg>; > > + #power-domain-cells = <0>; > > + }; > > }; > > }; > > > > diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h > > index 4eaa53d7270a..63e81cd0d06d 100644 > > --- a/include/dt-bindings/power/mt8192-power.h > > +++ b/include/dt-bindings/power/mt8192-power.h > > @@ -28,5 +28,6 @@ > > #define MT8192_POWER_DOMAIN_CAM_RAWA 18 > > #define MT8192_POWER_DOMAIN_CAM_RAWB 19 > > #define MT8192_POWER_DOMAIN_CAM_RAWC 20 > > +#define MT8192_POWER_DOMAIN_ADSP 21 > > > > #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ > > >
Il 01/12/22 10:10, Chen-Yu Tsai ha scritto: > On Thu, Dec 1, 2022 at 5:07 PM AngeloGioacchino Del Regno > <angelogioacchino.delregno@collabora.com> wrote: >> >> Il 01/12/22 08:33, Allen-KH Cheng ha scritto: >>> Add adsp power domain controller node for mt8192 SoC. >>> >>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> >>> --- >>> Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ >>> [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] >>> --- >>> --- >>> arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ >>> include/dt-bindings/power/mt8192-power.h | 1 + >>> 2 files changed, 9 insertions(+) >>> >> >> Allen, thanks for this one, but it's incomplete... >> >> First of all, you must add the power domain on the driver itself, specifically, >> in drivers/soc/mediatek/mt8192-pm-domains.h - otherwise this change will have no >> effect! > > Actually it's worse. The driver doesn't know about the new power domain, > and so it will fail to probe. We might need to make the power domain driver > fail gracefully and skip unknown power domains. > Right. It's worse. I don't know, though, if gracefully skipping unknown power domains in the driver would be a good decision... as sometimes error messages go unnoticed. When the platform "explodes" instead, you're forced to read that log carefully and get it working again... Anyway, I'm only thinking out loud, nothing less and nothing more than that :-) By the way, we can probably expand on that topic a bit later, as it's outside of the scope of this specific change. Back to topic, if we get one series containing both changes (devicetree, bindings and driver) with the right Fixes tags and/or Cc stable, we shouldn't have such issue on backports so we can probably ignore that potential issue, I think? :-) Cheers, Angelo > ChenYu > >> ...Then, as Chen-Yu said, you should also add the power domain to the scp_adsp >> clock node as that's solving the lockup issue... >> >> .......and last, but not least: we need a Fixes tag to backport this fix, here >> and on the commit that adds the missing power domain in the driver. >> >> Thanks, >> Angelo >> >>> diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>> index 424fc89cc6f7..e71afba871fc 100644 >>> --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>> +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>> @@ -514,6 +514,14 @@ >>> }; >>> }; >>> }; >>> + >>> + power-domain@MT8192_POWER_DOMAIN_ADSP { >>> + reg = <MT8192_POWER_DOMAIN_ADSP>; >>> + clocks = <&topckgen CLK_TOP_ADSP_SEL>; >>> + clock-names = "adsp"; >>> + mediatek,infracfg = <&infracfg>; >>> + #power-domain-cells = <0>; >>> + }; >>> }; >>> }; >>> >>> diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h >>> index 4eaa53d7270a..63e81cd0d06d 100644 >>> --- a/include/dt-bindings/power/mt8192-power.h >>> +++ b/include/dt-bindings/power/mt8192-power.h >>> @@ -28,5 +28,6 @@ >>> #define MT8192_POWER_DOMAIN_CAM_RAWA 18 >>> #define MT8192_POWER_DOMAIN_CAM_RAWB 19 >>> #define MT8192_POWER_DOMAIN_CAM_RAWC 20 >>> +#define MT8192_POWER_DOMAIN_ADSP 21 >>> >>> #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ >>> >>
On Thu, Dec 1, 2022 at 5:39 PM AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote: > > Il 01/12/22 10:10, Chen-Yu Tsai ha scritto: > > On Thu, Dec 1, 2022 at 5:07 PM AngeloGioacchino Del Regno > > <angelogioacchino.delregno@collabora.com> wrote: > >> > >> Il 01/12/22 08:33, Allen-KH Cheng ha scritto: > >>> Add adsp power domain controller node for mt8192 SoC. > >>> > >>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > >>> --- > >>> Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ > >>> [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] > >>> --- > >>> --- > >>> arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ > >>> include/dt-bindings/power/mt8192-power.h | 1 + > >>> 2 files changed, 9 insertions(+) > >>> > >> > >> Allen, thanks for this one, but it's incomplete... > >> > >> First of all, you must add the power domain on the driver itself, specifically, > >> in drivers/soc/mediatek/mt8192-pm-domains.h - otherwise this change will have no > >> effect! > > > > Actually it's worse. The driver doesn't know about the new power domain, > > and so it will fail to probe. We might need to make the power domain driver > > fail gracefully and skip unknown power domains. > > > > Right. It's worse. I don't know, though, if gracefully skipping unknown power > domains in the driver would be a good decision... as sometimes error messages > go unnoticed. > > When the platform "explodes" instead, you're forced to read that log carefully > and get it working again... Anyway, I'm only thinking out loud, nothing less and > nothing more than that :-) Me too. :) > By the way, we can probably expand on that topic a bit later, as it's outside of > the scope of this specific change. > > Back to topic, if we get one series containing both changes (devicetree, bindings > and driver) with the right Fixes tags and/or Cc stable, we shouldn't have such > issue on backports so we can probably ignore that potential issue, I think? :-) Everything goes through the soc tree, so they should appear in Linus's tree and get picked by stable at more or less the same time. I think we would want the driver change to appear before the dts change, for bisectability's sake (because of header dependencies and driver errors). So we probably want: 1. driver + binding header changes 2. dtsi changes And have these merged through fixes so that the history between them is linear. ChenYu > Cheers, > Angelo > > > ChenYu > > > >> ...Then, as Chen-Yu said, you should also add the power domain to the scp_adsp > >> clock node as that's solving the lockup issue... > >> > >> .......and last, but not least: we need a Fixes tag to backport this fix, here > >> and on the commit that adds the missing power domain in the driver. > >> > >> Thanks, > >> Angelo > >> > >>> diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > >>> index 424fc89cc6f7..e71afba871fc 100644 > >>> --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi > >>> +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > >>> @@ -514,6 +514,14 @@ > >>> }; > >>> }; > >>> }; > >>> + > >>> + power-domain@MT8192_POWER_DOMAIN_ADSP { > >>> + reg = <MT8192_POWER_DOMAIN_ADSP>; > >>> + clocks = <&topckgen CLK_TOP_ADSP_SEL>; > >>> + clock-names = "adsp"; > >>> + mediatek,infracfg = <&infracfg>; > >>> + #power-domain-cells = <0>; > >>> + }; > >>> }; > >>> }; > >>> > >>> diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h > >>> index 4eaa53d7270a..63e81cd0d06d 100644 > >>> --- a/include/dt-bindings/power/mt8192-power.h > >>> +++ b/include/dt-bindings/power/mt8192-power.h > >>> @@ -28,5 +28,6 @@ > >>> #define MT8192_POWER_DOMAIN_CAM_RAWA 18 > >>> #define MT8192_POWER_DOMAIN_CAM_RAWB 19 > >>> #define MT8192_POWER_DOMAIN_CAM_RAWC 20 > >>> +#define MT8192_POWER_DOMAIN_ADSP 21 > >>> > >>> #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ > >>> > >> > >
Il 01/12/22 11:05, Chen-Yu Tsai ha scritto: > On Thu, Dec 1, 2022 at 5:39 PM AngeloGioacchino Del Regno > <angelogioacchino.delregno@collabora.com> wrote: >> >> Il 01/12/22 10:10, Chen-Yu Tsai ha scritto: >>> On Thu, Dec 1, 2022 at 5:07 PM AngeloGioacchino Del Regno >>> <angelogioacchino.delregno@collabora.com> wrote: >>>> >>>> Il 01/12/22 08:33, Allen-KH Cheng ha scritto: >>>>> Add adsp power domain controller node for mt8192 SoC. >>>>> >>>>> Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> >>>>> --- >>>>> Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ >>>>> [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] >>>>> --- >>>>> --- >>>>> arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ >>>>> include/dt-bindings/power/mt8192-power.h | 1 + >>>>> 2 files changed, 9 insertions(+) >>>>> >>>> >>>> Allen, thanks for this one, but it's incomplete... >>>> >>>> First of all, you must add the power domain on the driver itself, specifically, >>>> in drivers/soc/mediatek/mt8192-pm-domains.h - otherwise this change will have no >>>> effect! >>> >>> Actually it's worse. The driver doesn't know about the new power domain, >>> and so it will fail to probe. We might need to make the power domain driver >>> fail gracefully and skip unknown power domains. >>> >> >> Right. It's worse. I don't know, though, if gracefully skipping unknown power >> domains in the driver would be a good decision... as sometimes error messages >> go unnoticed. >> >> When the platform "explodes" instead, you're forced to read that log carefully >> and get it working again... Anyway, I'm only thinking out loud, nothing less and >> nothing more than that :-) > > Me too. :) > >> By the way, we can probably expand on that topic a bit later, as it's outside of >> the scope of this specific change. >> >> Back to topic, if we get one series containing both changes (devicetree, bindings >> and driver) with the right Fixes tags and/or Cc stable, we shouldn't have such >> issue on backports so we can probably ignore that potential issue, I think? :-) > > Everything goes through the soc tree, so they should appear in Linus's tree > and get picked by stable at more or less the same time. I think we would > want the driver change to appear before the dts change, for bisectability's > sake (because of header dependencies and driver errors). > > So we probably want: > 1. driver + binding header changes > 2. dtsi changes > > And have these merged through fixes so that the history between them is linear. > Perfect, I fully agree. > > ChenYu > >> Cheers, >> Angelo >> >>> ChenYu >>> >>>> ...Then, as Chen-Yu said, you should also add the power domain to the scp_adsp >>>> clock node as that's solving the lockup issue... >>>> >>>> .......and last, but not least: we need a Fixes tag to backport this fix, here >>>> and on the commit that adds the missing power domain in the driver. >>>> >>>> Thanks, >>>> Angelo >>>> >>>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>>>> index 424fc89cc6f7..e71afba871fc 100644 >>>>> --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>>>> +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi >>>>> @@ -514,6 +514,14 @@ >>>>> }; >>>>> }; >>>>> }; >>>>> + >>>>> + power-domain@MT8192_POWER_DOMAIN_ADSP { >>>>> + reg = <MT8192_POWER_DOMAIN_ADSP>; >>>>> + clocks = <&topckgen CLK_TOP_ADSP_SEL>; >>>>> + clock-names = "adsp"; >>>>> + mediatek,infracfg = <&infracfg>; >>>>> + #power-domain-cells = <0>; >>>>> + }; >>>>> }; >>>>> }; >>>>> >>>>> diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h >>>>> index 4eaa53d7270a..63e81cd0d06d 100644 >>>>> --- a/include/dt-bindings/power/mt8192-power.h >>>>> +++ b/include/dt-bindings/power/mt8192-power.h >>>>> @@ -28,5 +28,6 @@ >>>>> #define MT8192_POWER_DOMAIN_CAM_RAWA 18 >>>>> #define MT8192_POWER_DOMAIN_CAM_RAWB 19 >>>>> #define MT8192_POWER_DOMAIN_CAM_RAWC 20 >>>>> +#define MT8192_POWER_DOMAIN_ADSP 21 >>>>> >>>>> #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ >>>>> >>>> >> >>
On 01/12/2022 08:33, Allen-KH Cheng wrote: > Add adsp power domain controller node for mt8192 SoC. > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > --- > Ref: https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ > [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] > --- > --- > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ > include/dt-bindings/power/mt8192-power.h | 1 + Bindings are separate patches. Best regards, Krzysztof
Hi Angelo and Chen-Yu, On Thu, 2022-12-01 at 11:10 +0100, AngeloGioacchino Del Regno wrote: > Il 01/12/22 11:05, Chen-Yu Tsai ha scritto: > > On Thu, Dec 1, 2022 at 5:39 PM AngeloGioacchino Del Regno > > <angelogioacchino.delregno@collabora.com> wrote: > > > > > > Il 01/12/22 10:10, Chen-Yu Tsai ha scritto: > > > > On Thu, Dec 1, 2022 at 5:07 PM AngeloGioacchino Del Regno > > > > <angelogioacchino.delregno@collabora.com> wrote: > > > > > > > > > > Il 01/12/22 08:33, Allen-KH Cheng ha scritto: > > > > > > Add adsp power domain controller node for mt8192 SoC. > > > > > > > > > > > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > > > > > > --- > > > > > > Ref: > > > > > > https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ > > > > > > [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] > > > > > > --- > > > > > > --- > > > > > > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ > > > > > > include/dt-bindings/power/mt8192-power.h | 1 + > > > > > > 2 files changed, 9 insertions(+) > > > > > > > > > > > > > > > > Allen, thanks for this one, but it's incomplete... > > > > > > > > > > First of all, you must add the power domain on the driver > > > > > itself, specifically, > > > > > in drivers/soc/mediatek/mt8192-pm-domains.h - otherwise this > > > > > change will have no > > > > > effect! > > > > > > > > Actually it's worse. The driver doesn't know about the new > > > > power domain, > > > > and so it will fail to probe. We might need to make the power > > > > domain driver > > > > fail gracefully and skip unknown power domains. > > > > > > > > > > Right. It's worse. I don't know, though, if gracefully skipping > > > unknown power > > > domains in the driver would be a good decision... as sometimes > > > error messages > > > go unnoticed. > > > > > > When the platform "explodes" instead, you're forced to read that > > > log carefully > > > and get it working again... Anyway, I'm only thinking out loud, > > > nothing less and > > > nothing more than that :-) > > > > Me too. :) > > > > > By the way, we can probably expand on that topic a bit later, as > > > it's outside of > > > the scope of this specific change. > > > > > > Back to topic, if we get one series containing both changes > > > (devicetree, bindings > > > and driver) with the right Fixes tags and/or Cc stable, we > > > shouldn't have such > > > issue on backports so we can probably ignore that potential > > > issue, I think? :-) > > > > Everything goes through the soc tree, so they should appear in > > Linus's tree > > and get picked by stable at more or less the same time. I think we > > would > > want the driver change to appear before the dts change, for > > bisectability's > > sake (because of header dependencies and driver errors). > > > > So we probably want: > > 1. driver + binding header changes > > 2. dtsi changes > > > > And have these merged through fixes so that the history between > > them is linear. > > > > Perfect, I fully agree. > Thank you for your comments. I need to check internally with my coworkers for driver and will update v2. Best Regards, Allen > > > > ChenYu > > > > > Cheers, > > > Angelo > > > > > > > ChenYu > > > > > > > > > ...Then, as Chen-Yu said, you should also add the power > > > > > domain to the scp_adsp > > > > > clock node as that's solving the lockup issue... > > > > > > > > > > .......and last, but not least: we need a Fixes tag to > > > > > backport this fix, here > > > > > and on the commit that adds the missing power domain in the > > > > > driver. > > > > > > > > > > Thanks, > > > > > Angelo > > > > > > > > > > > diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > > > > > b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > > > > > index 424fc89cc6f7..e71afba871fc 100644 > > > > > > --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > > > > > +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > > > > > @@ -514,6 +514,14 @@ > > > > > > }; > > > > > > }; > > > > > > }; > > > > > > + > > > > > > + power-domain@MT8192_POWER_DOM > > > > > > AIN_ADSP { > > > > > > + reg = > > > > > > <MT8192_POWER_DOMAIN_ADSP>; > > > > > > + clocks = <&topckgen > > > > > > CLK_TOP_ADSP_SEL>; > > > > > > + clock-names = "adsp"; > > > > > > + mediatek,infracfg = > > > > > > <&infracfg>; > > > > > > + #power-domain-cells = > > > > > > <0>; > > > > > > + }; > > > > > > }; > > > > > > }; > > > > > > > > > > > > diff --git a/include/dt-bindings/power/mt8192-power.h > > > > > > b/include/dt-bindings/power/mt8192-power.h > > > > > > index 4eaa53d7270a..63e81cd0d06d 100644 > > > > > > --- a/include/dt-bindings/power/mt8192-power.h > > > > > > +++ b/include/dt-bindings/power/mt8192-power.h > > > > > > @@ -28,5 +28,6 @@ > > > > > > #define MT8192_POWER_DOMAIN_CAM_RAWA 18 > > > > > > #define MT8192_POWER_DOMAIN_CAM_RAWB 19 > > > > > > #define MT8192_POWER_DOMAIN_CAM_RAWC 20 > > > > > > +#define MT8192_POWER_DOMAIN_ADSP 21 > > > > > > > > > > > > #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */ > > > > > > > > > > > > > >
On Thu, 2022-12-01 at 11:22 +0100, Krzysztof Kozlowski wrote: > On 01/12/2022 08:33, Allen-KH Cheng wrote: > > Add adsp power domain controller node for mt8192 SoC. > > > > Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > > --- > > Ref: > > https://lore.kernel.org/all/2ec80bd8-dfef-d2e6-eb41-6e6088043e33@collabora.com/ > > [Allen-KH Cheng <allen-kh.cheng@mediatek.com>] > > --- > > --- > > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 8 ++++++++ > > include/dt-bindings/power/mt8192-power.h | 1 + > > Bindings are separate patches. > > Best regards, > Krzysztof > Noted, will fix in next version. Thanks, Allen
diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot/dts/mediatek/mt8192.dtsi index 424fc89cc6f7..e71afba871fc 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi @@ -514,6 +514,14 @@ }; }; }; + + power-domain@MT8192_POWER_DOMAIN_ADSP { + reg = <MT8192_POWER_DOMAIN_ADSP>; + clocks = <&topckgen CLK_TOP_ADSP_SEL>; + clock-names = "adsp"; + mediatek,infracfg = <&infracfg>; + #power-domain-cells = <0>; + }; }; }; diff --git a/include/dt-bindings/power/mt8192-power.h b/include/dt-bindings/power/mt8192-power.h index 4eaa53d7270a..63e81cd0d06d 100644 --- a/include/dt-bindings/power/mt8192-power.h +++ b/include/dt-bindings/power/mt8192-power.h @@ -28,5 +28,6 @@ #define MT8192_POWER_DOMAIN_CAM_RAWA 18 #define MT8192_POWER_DOMAIN_CAM_RAWB 19 #define MT8192_POWER_DOMAIN_CAM_RAWC 20 +#define MT8192_POWER_DOMAIN_ADSP 21 #endif /* _DT_BINDINGS_POWER_MT8192_POWER_H */