From patchwork Thu Jul 1 09:40:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 12353815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0F72C11F64 for ; Thu, 1 Jul 2021 09:40:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 807CC6148E for ; Thu, 1 Jul 2021 09:40:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 807CC6148E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8mapRUXGb1/Lu+ssj6wjUg868bzogxAoBT+HPAlubxc=; b=sbTjNBZeWklgIA Tq3X6V7fLHdqwoB3JCPPhFnONkFPkiPUclArlEMB63OS/Go8eA/FGztG+zU49t1+Z82rp3b3STFiA K1W0oEDWKOQ8XdDvD4iB2gL6+VttAABvqiOL97fmzWE0dcr6S/lF7qSG6q7dcJ4XKEXZPTLi8mA/u oNar4Kw3aN0nqNhCC2zKHFn8oFqgIeHAQUEt6EtIlKewPk+PgzJ1iha2kq32dldMc9X6eiskOJ7so mObNuECmX74DX4MSSy6Dt/dZIJ8al5alYohAFUw8C2KR86jz/eh5TVhET3Ea9bjmAEYAJbLpOxGmr kL6PnlO+YEKn5pwfItiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lytBe-00GmoN-Tt; Thu, 01 Jul 2021 09:40:46 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lytBR-00GmkP-Qw; Thu, 01 Jul 2021 09:40:35 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 36A5F1F43DD5 From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, Collabora Kernel ML , Bilal Wasim , linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 1/3] soc: mediatek: pm-domains: Use correct mask for bus_prot_clr Date: Thu, 1 Jul 2021 11:40:22 +0200 Message-Id: <20210701114012.RESEND.1.I27436c29c3bede46dcf86df696f48683662d1ec1@changeid> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210701094024.1273759-1-enric.balletbo@collabora.com> References: <20210701094024.1273759-1-enric.balletbo@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210701_024034_051702_9F5EB86B X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Bilal Wasim When "bus_prot_reg_update" is true, the driver should use INFRA_TOPAXI_PROTECTEN for both setting and clearing the bus protection. However, the driver does not use this mask for clearing bus protection which causes failure when booting the imgtec gpu. Corrected and tested with mt8173 chromebook. Signed-off-by: Bilal Wasim Reviewed-by: Hsin-Yi Wang Signed-off-by: Enric Balletbo i Serra --- drivers/soc/mediatek/mtk-pm-domains.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/soc/mediatek/mtk-pm-domains.h index 21a4e113bbec..c5ac649ae51b 100644 --- a/drivers/soc/mediatek/mtk-pm-domains.h +++ b/drivers/soc/mediatek/mtk-pm-domains.h @@ -60,7 +60,7 @@ #define BUS_PROT_UPDATE_TOPAXI(_mask) \ BUS_PROT_UPDATE(_mask, \ INFRA_TOPAXI_PROTECTEN, \ - INFRA_TOPAXI_PROTECTEN_CLR, \ + INFRA_TOPAXI_PROTECTEN, \ INFRA_TOPAXI_PROTECTSTA1) struct scpsys_bus_prot_data { From patchwork Thu Jul 1 09:40:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 12353819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F5E9C11F64 for ; Thu, 1 Jul 2021 09:41:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24B806144F for ; Thu, 1 Jul 2021 09:41:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24B806144F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=T02MKmeux0n68QOnhtjxPs8lB4+sxEhh2CMhrjEgtMo=; b=qe/FEtGmczsRbQ F2kufmbGcw0+6piYhZ9I0leLyXpC2uw31Qugcz9b3PT1+57ykB89zuZRVEQHLKxEF9WBDFVZ7t7GB k9H+b4OqqfgmzD30XQcmnXc9BbPiFCCRYdhHfkfluzHuID8dBJNteICj/vR47O63wkrk3fdP2kfzc 3NeKWSBMi8WlwdqAtEmUoP81alB1zoqJRv8ZSHLbVy39ZqjunD/oE6Pad+RJpFpDOtfFx61dn/n2l lVjvv81lvbi6Wdv+8XcnkBVWwR13kHb0xeS9SbyUg2hoB6XKL3B3uCJ95fPHOVOnjiZXeG3lRYgcK ZAM0oJtP1vN/asn184eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lytBq-00GmsO-Pp; Thu, 01 Jul 2021 09:40:58 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lytBT-00GmkW-4t; Thu, 01 Jul 2021 09:40:36 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id EA4F71F43DDA From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, Collabora Kernel ML , Bilal Wasim , linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 2/3] soc: mediatek: pm-domains: Add domain_supply cap for mfg_async PD Date: Thu, 1 Jul 2021 11:40:23 +0200 Message-Id: <20210701114012.RESEND.2.I2e1bf1b589f9138ba6f89791ed9f1e9f3ddd0a5d@changeid> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210701094024.1273759-1-enric.balletbo@collabora.com> References: <20210701094024.1273759-1-enric.balletbo@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210701_024035_388801_DCA5374A X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Bilal Wasim The mfg_async power domain in mt8173 is used to power up imgtec gpu. This domain requires the da9211 regulator to be enabled before the power domain can be enabled successfully. Signed-off-by: Bilal Wasim Reviewed-by: Hsin-Yi Wang Signed-off-by: Enric Balletbo i Serra --- drivers/soc/mediatek/mt8173-pm-domains.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/mediatek/mt8173-pm-domains.h b/drivers/soc/mediatek/mt8173-pm-domains.h index 654c717e5467..714fa92575df 100644 --- a/drivers/soc/mediatek/mt8173-pm-domains.h +++ b/drivers/soc/mediatek/mt8173-pm-domains.h @@ -71,6 +71,7 @@ static const struct scpsys_domain_data scpsys_domain_data_mt8173[] = { .ctl_offs = SPM_MFG_ASYNC_PWR_CON, .sram_pdn_bits = GENMASK(11, 8), .sram_pdn_ack_bits = 0, + .caps = MTK_SCPD_DOMAIN_SUPPLY, }, [MT8173_POWER_DOMAIN_MFG_2D] = { .name = "mfg_2d", From patchwork Thu Jul 1 09:40:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 12353821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B570AC11F64 for ; Thu, 1 Jul 2021 09:41:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F93B6144F for ; Thu, 1 Jul 2021 09:41:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F93B6144F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5g9jx28Vrl1c06uq7yEo0R/gkkZnPWhNZuCS6YMWcZI=; b=kv0An1hVQWgvDQ uXXmsCd/t/a7V7oKHnlbp0K4nhZ2jc+7YOITj/u4mNcRJk6nNs2JXhnNhEtZv7CP7WlfHTD2+ZxPm ZB6amiHWHqde/hOmRjua9IEpDw1AbieLH6u3SDHVnJCN6wA4dtmqlpxlb3DyDoYmeczcCg3epo9Ez x3qExJFuW/BrsL7biuQTJvdXijM8NWMHqaqCab4tZd57T0l6YoXnl4jpxXkHXsGeZzQriOarMWjTT ZDkBEmptKaMESUPSr1x/ktD0l8GF86ixOSZqTv8O1U+kPSxThwk8ka8Af0xUiWhYS4Y6QMBbRMyxw xcSGI03EZyZr4kf3BV+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lytC3-00GmxJ-64; Thu, 01 Jul 2021 09:41:11 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lytBT-00Gmky-Cn; Thu, 01 Jul 2021 09:40:36 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id A60281F43DE2 From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, Collabora Kernel ML , Bilal Wasim , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 3/3] arm64: dts: mediatek: mt8173: Add domain supply for mfg_async Date: Thu, 1 Jul 2021 11:40:24 +0200 Message-Id: <20210701114012.RESEND.3.I9e27871bb700c807a564957302b292e9935dae0b@changeid> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210701094024.1273759-1-enric.balletbo@collabora.com> References: <20210701094024.1273759-1-enric.balletbo@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210701_024035_590523_9D2D005B X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Bilal Wasim da9211 regulator needs to be enabled before enabling the mfg_async power domain. Otherwise the subdomain is not enabled and causes failure in imgtec gpu driver boot. Add the "domain-supply" property to the "mfg_async" node in DT. Signed-off-by: Bilal Wasim Signed-off-by: Enric Balletbo i Serra --- arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 ++++ arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 4 ++++ arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi index 21452c51a20a..a8efff2071bf 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi @@ -157,6 +157,10 @@ hdmi_connector_in: endpoint { }; }; +&mfg_async { + domain-supply = <&da9211_vgpu_reg>; +}; + &cec { status = "okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts index f6a1738dfbaa..4fa1e93302c7 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts @@ -62,6 +62,10 @@ usb_p0_vbus: regulator@1 { }; }; +&mfg_async { + domain-supply = <&da9211_vgpu_reg>; +}; + &cec { status = "okay"; }; diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index 003a5653c505..dbda5d656b29 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi @@ -504,7 +504,7 @@ power-domain@MT8173_POWER_DOMAIN_USB { reg = ; #power-domain-cells = <0>; }; - power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC { + mfg_async: power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC { reg = ; clocks = <&clk26m>; clock-names = "mfg";