From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 04725C433EF for ; Tue, 18 Jan 2022 13:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=csg3jXmd8aBNeXyeYHZuuW/zlExmpuMWAriE2jL/1Q0=; b=fEyBywRtK/5Gbt Ja4KFZiL3/AJnG+5WHBieQpKtrLDrMfYqLUtGimoYV6mZMXqXQwRYwi1cFGqnjGoqmTa4ow+3KD+C eFnS8hcDwbmU+SrJF0BVBRyaKfq+/IsWiJjiF3TyigfA6H5RRo6tChphekyQIOLF7KhpRBSNmlqfT 5VCv3n+3ZJxmKtY3oqBlQrJdg3mTSjU82IcGwOBLb+bv5n5MRQ2fhxgzh8mrh5oS4kv0Il70XkLqU 0wdbKG+vTaWpu3Zmx0cBxGJNB40js7M8xV6usSGtpCQztMJkQXaClJeLjsc8OSFo1ZSEjqTVtBfeZ P5xzevF3ibLimj14ykRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9oND-001cma-DL; Tue, 18 Jan 2022 13:18:07 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9oMn-001cXf-PE; Tue, 18 Jan 2022 13:17:44 +0000 Received: by mail-wm1-x336.google.com with SMTP id n8so878508wmk.3; Tue, 18 Jan 2022 05:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Q7VK09hbhq9EF54NXn3wG/WGVYjtOlKUjjiSI8lz1ck=; b=dGRXIOV4goUxOIaWV646IpZ8F1nDyXNUH/J3l5cyAa9AB5BDE96BztzhhahUYB3BIL jlGpO8yZnafBRe6gFpFy94a+OwASwyI9BOyMwuucVNHWjxgNjcUAC6FbVaveZwJJSuzl BTVqJDrDh9X8BaS/TqAd8SlAazmgFHpsbcpBeCDoOERQHqlETvSeDuttPLMzml0UyTTx 7c3RRFEfSoj55Orxijj/drBvI/BqtV5USJrqhVSoLcTsl4zkYl8SH2bREz30Kgy6TM0+ UfrpNLDnFm4YDLpJ3SGVpoF1ZWlrmmt5ny7kNpOmpHuD3Z62qKn2sJk2XX0Vlw0W7RE9 QwIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Q7VK09hbhq9EF54NXn3wG/WGVYjtOlKUjjiSI8lz1ck=; b=vpjU2Qg/u9U2CMJEhDE5cFImfcV0kJebzqzfSEcdYkWCNvox28ISfMUafYNPXLjQ58 tEblXoK03RIDUCwH+qDYR8XaQ6Hj/4fyFbFJyY+M+kEAsZyGMaVLxhsuPYnUEsIZt8m7 a+uSIFW7LWerOyTNQBw04RcgGJ7iOZGAYcxZ0Gkh8zBhgmeyApTIr+Kz3fewfqx114Eq eIGZ0RKseJUBrWsA9mo6LLI8Rul0ilFACMRd6twxlsC3yvuSJpJWg507siLQijxtDOLd NqKwbD+sHGQW4bXLlcUnFyBK/nlm52+qa/ann7k64FAJkr3lVnmjTQB6K4arafOJ5OFZ 9Qgg== X-Gm-Message-State: AOAM532Vb39gY9Ma3HRKYkzXScsVp161kOp4QVwG+iCv/VpPgeXHuQT6 02/KiNQtxcu56hllPSnIrUyNHvPMBp57dw== X-Google-Smtp-Source: ABdhPJw1UPBVre/JNKUC+L4E+4ziUHkUgPD9UeI112aZ+x3y/3f7KSt7xQVyvz+AmxisjpUlbcMjwg== X-Received: by 2002:adf:ffc7:: with SMTP id x7mr23088441wrs.623.1642511859529; Tue, 18 Jan 2022 05:17:39 -0800 (PST) Received: from [192.168.1.145] ([207.188.161.251]) by smtp.gmail.com with ESMTPSA id c8sm2938627wmq.34.2022.01.18.05.17.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jan 2022 05:17:38 -0800 (PST) Message-ID: Date: Tue, 18 Jan 2022 14:17:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 1/2] soc: mediatek: pwrap: add pwrap driver for MT8186 SoC Content-Language: en-US To: Johnson Wang , robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, angelogioacchino.delregno@collabora.com, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220107104633.7500-1-johnson.wang@mediatek.com> <20220107104633.7500-2-johnson.wang@mediatek.com> <9949a1f7-1ed5-a137-c7b9-2ef8d8e1caf8@gmail.com> <544f5085fc8597ce9ce3eb7dc1b5d08fb1ac8755.camel@mediatek.com> From: Matthias Brugger In-Reply-To: <544f5085fc8597ce9ce3eb7dc1b5d08fb1ac8755.camel@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220118_051741_903945_637A64D5 X-CRM114-Status: GOOD ( 25.38 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 18/01/2022 10:25, Johnson Wang wrote: > Hi Matthias, > > On Fri, 2022-01-14 at 16:46 +0100, Matthias Brugger wrote: >> >> On 07/01/2022 11:46, Johnson Wang wrote: >>> MT8186 are highly integrated SoC and use PMIC_MT6366 for >>> power management. This patch adds pwrap master driver to >>> access PMIC_MT6366. >>> >> >> It seems this new arbiter is significantly different from the version >> 1. Please >> explain that in the commit message. >> >>> Signed-off-by: Johnson Wang >>> --- >>> drivers/soc/mediatek/mtk-pmic-wrap.c | 72 >>> ++++++++++++++++++++++++++++ >>> 1 file changed, 72 insertions(+) >>> >>> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c >>> b/drivers/soc/mediatek/mtk-pmic-wrap.c >>> index 952bc554f443..78866ebf7f04 100644 >>> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c >>> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c >>> @@ -30,6 +30,7 @@ >>> #define PWRAP_GET_WACS_REQ(x) (((x) >> 19) & >>> 0x00000001) >>> #define PWRAP_STATE_SYNC_IDLE0 BIT(20) >>> #define PWRAP_STATE_INIT_DONE0 BIT(21) >>> +#define PWRAP_STATE_INIT_DONE0_V2 BIT(22) >> >> That's a strange name, does it come from the datasheet description? > > Thanks for your review. > > No, there is only PWRAP_STATE_INIT_DONE0 in MT8186 datasheet. > However, it's the 22nd bit in MT8186 and the 21st bit in other SoCs. > So we changed its name to avoid redefinition of PWRAP_STATE_INIT_DONE0. > > Could you give us some suggestion on proper definition naming? > Do you think PWRAP_STATE_INIT_DONE0_MT8186 will be a better choice? > Is this a difference that only will show up on the PMIC-wrapper of MT8186 or will other SoCs include the same IP? If not, then PWRAP_STATE_INIT_DONE0_MT8186 should be fine. Otherwise we would need a better name. >> >>> #define PWRAP_STATE_INIT_DONE1 BIT(15) >>> >>> /* macro for WACS FSM */ >>> @@ -77,6 +78,8 @@ >>> #define PWRAP_CAP_INT1_EN BIT(3) >>> #define PWRAP_CAP_WDT_SRC1 BIT(4) >>> #define PWRAP_CAP_ARB BIT(5) >>> +#define PWRAP_CAP_MONITOR_V2 BIT(6) >> >> Not used capability, please delete. >> >> >> Regards, >> Matthias > > PWRAP_CAP_MONITOR_V2 is not used right now. > We can remove it in next version. > But this capability will be added when we need it. > That's OK, we should add capability definitions once they are added to the driver, not before that. Thanks, Matthias _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id BD6B1C433F5 for ; Tue, 18 Jan 2022 13:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MMVzg9MN1tMmOMePgKbzjmLts+U6AdO3Iyb0km685zo=; b=p7aXkR70hhZCmz tf2Ppl/21ldvuz6kmsfv4cLCjkV9shiKfw/wJkRe+3FqTw9pHR7LGkRBDo33VFS/x2eS5wTnIFazx SxT/NejWWHS/JNBYtaio6soPVRCFM16CF1QMxzRZcb1hPmtkY5NYStdOwUW4HkIpXQhr8Hqbiy2bj nTYH7zp/j8bo8xPWJPmK1cRxj6dFpUdx+1VKR//GsiE/E9ecHIybhlRaKmaJ97/XXI3HnlVCWrBFe GWpaNr5UdLIOfCFzKwD5bC6HvzHMy37iZEdyDzVltvxsgch4aDAw7FnNk7sF2sqCPDks2wsY34j9s YkgQXRFDfzkEiBHRkdfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9oMu-001ccR-L0; Tue, 18 Jan 2022 13:17:48 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9oMn-001cXf-PE; Tue, 18 Jan 2022 13:17:44 +0000 Received: by mail-wm1-x336.google.com with SMTP id n8so878508wmk.3; Tue, 18 Jan 2022 05:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Q7VK09hbhq9EF54NXn3wG/WGVYjtOlKUjjiSI8lz1ck=; b=dGRXIOV4goUxOIaWV646IpZ8F1nDyXNUH/J3l5cyAa9AB5BDE96BztzhhahUYB3BIL jlGpO8yZnafBRe6gFpFy94a+OwASwyI9BOyMwuucVNHWjxgNjcUAC6FbVaveZwJJSuzl BTVqJDrDh9X8BaS/TqAd8SlAazmgFHpsbcpBeCDoOERQHqlETvSeDuttPLMzml0UyTTx 7c3RRFEfSoj55Orxijj/drBvI/BqtV5USJrqhVSoLcTsl4zkYl8SH2bREz30Kgy6TM0+ UfrpNLDnFm4YDLpJ3SGVpoF1ZWlrmmt5ny7kNpOmpHuD3Z62qKn2sJk2XX0Vlw0W7RE9 QwIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Q7VK09hbhq9EF54NXn3wG/WGVYjtOlKUjjiSI8lz1ck=; b=vpjU2Qg/u9U2CMJEhDE5cFImfcV0kJebzqzfSEcdYkWCNvox28ISfMUafYNPXLjQ58 tEblXoK03RIDUCwH+qDYR8XaQ6Hj/4fyFbFJyY+M+kEAsZyGMaVLxhsuPYnUEsIZt8m7 a+uSIFW7LWerOyTNQBw04RcgGJ7iOZGAYcxZ0Gkh8zBhgmeyApTIr+Kz3fewfqx114Eq eIGZ0RKseJUBrWsA9mo6LLI8Rul0ilFACMRd6twxlsC3yvuSJpJWg507siLQijxtDOLd NqKwbD+sHGQW4bXLlcUnFyBK/nlm52+qa/ann7k64FAJkr3lVnmjTQB6K4arafOJ5OFZ 9Qgg== X-Gm-Message-State: AOAM532Vb39gY9Ma3HRKYkzXScsVp161kOp4QVwG+iCv/VpPgeXHuQT6 02/KiNQtxcu56hllPSnIrUyNHvPMBp57dw== X-Google-Smtp-Source: ABdhPJw1UPBVre/JNKUC+L4E+4ziUHkUgPD9UeI112aZ+x3y/3f7KSt7xQVyvz+AmxisjpUlbcMjwg== X-Received: by 2002:adf:ffc7:: with SMTP id x7mr23088441wrs.623.1642511859529; Tue, 18 Jan 2022 05:17:39 -0800 (PST) Received: from [192.168.1.145] ([207.188.161.251]) by smtp.gmail.com with ESMTPSA id c8sm2938627wmq.34.2022.01.18.05.17.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jan 2022 05:17:38 -0800 (PST) Message-ID: Date: Tue, 18 Jan 2022 14:17:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 1/2] soc: mediatek: pwrap: add pwrap driver for MT8186 SoC Content-Language: en-US To: Johnson Wang , robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, angelogioacchino.delregno@collabora.com, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220107104633.7500-1-johnson.wang@mediatek.com> <20220107104633.7500-2-johnson.wang@mediatek.com> <9949a1f7-1ed5-a137-c7b9-2ef8d8e1caf8@gmail.com> <544f5085fc8597ce9ce3eb7dc1b5d08fb1ac8755.camel@mediatek.com> From: Matthias Brugger In-Reply-To: <544f5085fc8597ce9ce3eb7dc1b5d08fb1ac8755.camel@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220118_051741_903945_637A64D5 X-CRM114-Status: GOOD ( 25.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 18/01/2022 10:25, Johnson Wang wrote: > Hi Matthias, > > On Fri, 2022-01-14 at 16:46 +0100, Matthias Brugger wrote: >> >> On 07/01/2022 11:46, Johnson Wang wrote: >>> MT8186 are highly integrated SoC and use PMIC_MT6366 for >>> power management. This patch adds pwrap master driver to >>> access PMIC_MT6366. >>> >> >> It seems this new arbiter is significantly different from the version >> 1. Please >> explain that in the commit message. >> >>> Signed-off-by: Johnson Wang >>> --- >>> drivers/soc/mediatek/mtk-pmic-wrap.c | 72 >>> ++++++++++++++++++++++++++++ >>> 1 file changed, 72 insertions(+) >>> >>> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c >>> b/drivers/soc/mediatek/mtk-pmic-wrap.c >>> index 952bc554f443..78866ebf7f04 100644 >>> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c >>> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c >>> @@ -30,6 +30,7 @@ >>> #define PWRAP_GET_WACS_REQ(x) (((x) >> 19) & >>> 0x00000001) >>> #define PWRAP_STATE_SYNC_IDLE0 BIT(20) >>> #define PWRAP_STATE_INIT_DONE0 BIT(21) >>> +#define PWRAP_STATE_INIT_DONE0_V2 BIT(22) >> >> That's a strange name, does it come from the datasheet description? > > Thanks for your review. > > No, there is only PWRAP_STATE_INIT_DONE0 in MT8186 datasheet. > However, it's the 22nd bit in MT8186 and the 21st bit in other SoCs. > So we changed its name to avoid redefinition of PWRAP_STATE_INIT_DONE0. > > Could you give us some suggestion on proper definition naming? > Do you think PWRAP_STATE_INIT_DONE0_MT8186 will be a better choice? > Is this a difference that only will show up on the PMIC-wrapper of MT8186 or will other SoCs include the same IP? If not, then PWRAP_STATE_INIT_DONE0_MT8186 should be fine. Otherwise we would need a better name. >> >>> #define PWRAP_STATE_INIT_DONE1 BIT(15) >>> >>> /* macro for WACS FSM */ >>> @@ -77,6 +78,8 @@ >>> #define PWRAP_CAP_INT1_EN BIT(3) >>> #define PWRAP_CAP_WDT_SRC1 BIT(4) >>> #define PWRAP_CAP_ARB BIT(5) >>> +#define PWRAP_CAP_MONITOR_V2 BIT(6) >> >> Not used capability, please delete. >> >> >> Regards, >> Matthias > > PWRAP_CAP_MONITOR_V2 is not used right now. > We can remove it in next version. > But this capability will be added when we need it. > That's OK, we should add capability definitions once they are added to the driver, not before that. Thanks, Matthias _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 184E2C433EF for ; Tue, 18 Jan 2022 13:17:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241721AbiARNRo (ORCPT ); Tue, 18 Jan 2022 08:17:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236141AbiARNRl (ORCPT ); Tue, 18 Jan 2022 08:17:41 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 046EBC061574; Tue, 18 Jan 2022 05:17:41 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id j5-20020a05600c1c0500b0034d2e956aadso4743657wms.4; Tue, 18 Jan 2022 05:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Q7VK09hbhq9EF54NXn3wG/WGVYjtOlKUjjiSI8lz1ck=; b=dGRXIOV4goUxOIaWV646IpZ8F1nDyXNUH/J3l5cyAa9AB5BDE96BztzhhahUYB3BIL jlGpO8yZnafBRe6gFpFy94a+OwASwyI9BOyMwuucVNHWjxgNjcUAC6FbVaveZwJJSuzl BTVqJDrDh9X8BaS/TqAd8SlAazmgFHpsbcpBeCDoOERQHqlETvSeDuttPLMzml0UyTTx 7c3RRFEfSoj55Orxijj/drBvI/BqtV5USJrqhVSoLcTsl4zkYl8SH2bREz30Kgy6TM0+ UfrpNLDnFm4YDLpJ3SGVpoF1ZWlrmmt5ny7kNpOmpHuD3Z62qKn2sJk2XX0Vlw0W7RE9 QwIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Q7VK09hbhq9EF54NXn3wG/WGVYjtOlKUjjiSI8lz1ck=; b=SBb/RRv+8WWyR17XhHc64icjWlbChOxjfRjwD15mbwALe2B4qK9+Ln9jNI+lODj2MP 3uQTeVeN/TeU9DMPUgtzC2YX5F3gI+Jt5kddaT5/e2Yf9zK30V/pLYzDITum+PQFIFSQ fYFWTRrIS7ERFYtIqKuOtfQ+AFuctWardYwBWczBssKBw2H9yWbon95dJmqTz2uJ85LC 4pPxOSC3PmNeITL3kvtgd1dC9yHj2xVaebIyQEHGSY+QxmzrfxwDS2EKAKPJMantk5C4 rnvpeFGZiiFJbd5s0VUQqxASLsZ/XJbK4oulhZokvHOt8Orx/V5ItCsbl45IJWpO19qD sKPg== X-Gm-Message-State: AOAM532FfGZZfGN/GqKEtFogIxe1GuJYmAKllWbVbqx1fFIQXbiHtZzY YylWRnkzmpgvxSIaGb6sXYY= X-Google-Smtp-Source: ABdhPJw1UPBVre/JNKUC+L4E+4ziUHkUgPD9UeI112aZ+x3y/3f7KSt7xQVyvz+AmxisjpUlbcMjwg== X-Received: by 2002:adf:ffc7:: with SMTP id x7mr23088441wrs.623.1642511859529; Tue, 18 Jan 2022 05:17:39 -0800 (PST) Received: from [192.168.1.145] ([207.188.161.251]) by smtp.gmail.com with ESMTPSA id c8sm2938627wmq.34.2022.01.18.05.17.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jan 2022 05:17:38 -0800 (PST) Message-ID: Date: Tue, 18 Jan 2022 14:17:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 1/2] soc: mediatek: pwrap: add pwrap driver for MT8186 SoC Content-Language: en-US To: Johnson Wang , robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, angelogioacchino.delregno@collabora.com, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220107104633.7500-1-johnson.wang@mediatek.com> <20220107104633.7500-2-johnson.wang@mediatek.com> <9949a1f7-1ed5-a137-c7b9-2ef8d8e1caf8@gmail.com> <544f5085fc8597ce9ce3eb7dc1b5d08fb1ac8755.camel@mediatek.com> From: Matthias Brugger In-Reply-To: <544f5085fc8597ce9ce3eb7dc1b5d08fb1ac8755.camel@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 18/01/2022 10:25, Johnson Wang wrote: > Hi Matthias, > > On Fri, 2022-01-14 at 16:46 +0100, Matthias Brugger wrote: >> >> On 07/01/2022 11:46, Johnson Wang wrote: >>> MT8186 are highly integrated SoC and use PMIC_MT6366 for >>> power management. This patch adds pwrap master driver to >>> access PMIC_MT6366. >>> >> >> It seems this new arbiter is significantly different from the version >> 1. Please >> explain that in the commit message. >> >>> Signed-off-by: Johnson Wang >>> --- >>> drivers/soc/mediatek/mtk-pmic-wrap.c | 72 >>> ++++++++++++++++++++++++++++ >>> 1 file changed, 72 insertions(+) >>> >>> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c >>> b/drivers/soc/mediatek/mtk-pmic-wrap.c >>> index 952bc554f443..78866ebf7f04 100644 >>> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c >>> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c >>> @@ -30,6 +30,7 @@ >>> #define PWRAP_GET_WACS_REQ(x) (((x) >> 19) & >>> 0x00000001) >>> #define PWRAP_STATE_SYNC_IDLE0 BIT(20) >>> #define PWRAP_STATE_INIT_DONE0 BIT(21) >>> +#define PWRAP_STATE_INIT_DONE0_V2 BIT(22) >> >> That's a strange name, does it come from the datasheet description? > > Thanks for your review. > > No, there is only PWRAP_STATE_INIT_DONE0 in MT8186 datasheet. > However, it's the 22nd bit in MT8186 and the 21st bit in other SoCs. > So we changed its name to avoid redefinition of PWRAP_STATE_INIT_DONE0. > > Could you give us some suggestion on proper definition naming? > Do you think PWRAP_STATE_INIT_DONE0_MT8186 will be a better choice? > Is this a difference that only will show up on the PMIC-wrapper of MT8186 or will other SoCs include the same IP? If not, then PWRAP_STATE_INIT_DONE0_MT8186 should be fine. Otherwise we would need a better name. >> >>> #define PWRAP_STATE_INIT_DONE1 BIT(15) >>> >>> /* macro for WACS FSM */ >>> @@ -77,6 +78,8 @@ >>> #define PWRAP_CAP_INT1_EN BIT(3) >>> #define PWRAP_CAP_WDT_SRC1 BIT(4) >>> #define PWRAP_CAP_ARB BIT(5) >>> +#define PWRAP_CAP_MONITOR_V2 BIT(6) >> >> Not used capability, please delete. >> >> >> Regards, >> Matthias > > PWRAP_CAP_MONITOR_V2 is not used right now. > We can remove it in next version. > But this capability will be added when we need it. > That's OK, we should add capability definitions once they are added to the driver, not before that. Thanks, Matthias