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 33A19C54EE9 for ; Wed, 28 Sep 2022 02:22:33 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LuqHQRRE73c3c5Xl3WSjQJplFCnFlXaMN0OEMWVnEoU=; b=UjKr6gVKPTEjLK vb6PdZEHzNjW646G6mdYgWtck5nwuwX9CpiNkite2JuWH33R+8+z88IOq+YJeDvzlivioC07BSfhy Me2DdpicPugkUGhvRvMdAOmBspnu11clK7Zpj1PVAmUQZdA0TlQSEJZAF5ytzYMsewglnz0PYxuCP nUffek4b8UwvWiNOXLik+BlHrCb9PolfXvxqFJzCh63gLj1M+OCZo/KCVarpfGxFrPvsZtFNyxm9U OOsjKRdd095ALdLxh/sbLV33mDsRDD90vCw+DpqXjDRyrtp5aIXJZbY2EIZz3ep57Yi78S4DUdffP OeQdt9NPnR4X7SuqE/vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odMhM-00DYBl-Cz; Wed, 28 Sep 2022 02:21:20 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odMhI-00DY6h-Fh; Wed, 28 Sep 2022 02:21:18 +0000 X-UUID: 587d4acf75184cc5ba13865c24ef734d-20220927 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=bhx05vnAQuloaQ69d3q5dah83jf5VYm6Qwzr4jIxqx8=; b=Pa3eQFwXs3R07lffrCT/jBKdjIYd/CsptDKhKBkSUa/a51//UNhQkhUCDtSGB3YJjneVHXY14KTujQIKVzdXcRWjbhhhlZWNQP7SsTcx/8NjRTr0TJreE3BBdbGzAbXmkeLhGAKYj69+sUARsQwa+Yab/8y3c0EjBPOGE5aXkj8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:ad50b189-26b8-40c3-8eba-595d6856e488,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:08623e07-1cee-4c38-b21b-a45f9682fdc0,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:1,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 587d4acf75184cc5ba13865c24ef734d-20220927 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1103257523; Tue, 27 Sep 2022 19:21:10 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 28 Sep 2022 10:20:32 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 28 Sep 2022 10:20:30 +0800 Message-ID: <26ecca71249f93893b659b604a0e18d479598145.camel@mediatek.com> Subject: Re: [PATCH 2/2] dt-bindings: gce: add gce header file for mt8188 From: elvis.wang To: Krzysztof Kozlowski , Jassi Brar , Rob Herring , "Krzysztof Kozlowski" , Matthias Brugger , CK Hu CC: , , , , Date: Wed, 28 Sep 2022 10:20:31 +0800 In-Reply-To: <747079f8-cf39-a78c-6b8a-51a14991b5c9@linaro.org> References: <20220729084319.6880-1-Elvis.Wang@mediatek.com> <20220729084319.6880-3-Elvis.Wang@mediatek.com> <995fbb2b-2b34-d407-6bfd-4798de2251d7@linaro.org> <1f7ab756af6e27f5336e3caaefc3081f70bbc85b.camel@mediatek.com> <747079f8-cf39-a78c-6b8a-51a14991b5c9@linaro.org> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220927_192116_566699_8878E5B9 X-CRM114-Status: GOOD ( 33.94 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 2022-09-09 at 09:27 +0200, Krzysztof Kozlowski wrote: > On 09/09/2022 08:46, elvis.wang wrote: > > Hello Krzysztof, > > > > On Tue, 2022-08-02 at 10:08 +0200, Krzysztof Kozlowski wrote: > > > On 29/07/2022 10:43, Elvis Wang wrote: > > > > Add gce header file to define the gce subsys id, hardware event > > > > id > > > > and > > > > constant for mt8188. > > > > > > > > Signed-off-by: Elvis Wang > > > > --- > > > > include/dt-bindings/gce/mt8188-gce.h | 1079 > > > > ++++++++++++++++++++++++++ > > > > 1 file changed, 1079 insertions(+) > > > > create mode 100644 include/dt-bindings/gce/mt8188-gce.h > > > > > > > > diff --git a/include/dt-bindings/gce/mt8188-gce.h b/include/dt- > > > > bindings/gce/mt8188-gce.h > > > > new file mode 100644 > > > > index 000000000000..b15e965fe671 > > > > --- /dev/null > > > > +++ b/include/dt-bindings/gce/mt8188-gce.h > > > > > > Use vendor in filename, so mediatek,mt8188-gce.h > > > > yes, mediatek,mt8188-gce.h as filename would be better, will change > > in > > next version. > > > > > > > > > @@ -0,0 +1,1079 @@ > > > > +/* SPDX-License-Identifier: GPL-2.0 */ > > > > > > Dual license. > > > > ok, will use /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ > > in > > next version. Also ask if it is possible to use BSD-3-CLause? > > Please use GPL-2.0 OR BSD-2-Clause. Thanks for your suggestion, we will change the usage in the next version. > > > > > > > > + > > > > +/* GCE thread priority */ > > > > +#define CMDQ_THR_PRIO_LOWEST 0 > > > > +#define CMDQ_THR_PRIO_1 1 > > > > +#define CMDQ_THR_PRIO_2 2 > > > > +#define CMDQ_THR_PRIO_3 3 > > > > +#define CMDQ_THR_PRIO_4 4 > > > > +#define CMDQ_THR_PRIO_5 5 > > > > +#define CMDQ_THR_PRIO_6 6 > > > > +#define CMDQ_THR_PRIO_HIGHEST 7 > > > > + > > > > +/* CPR count in 32bit register */ > > > > +#define GCE_CPR_COUNT 1312 > > > > > > No register values in the bindings. > > > > Those thread priority will be referenced in the device node and > > congfigured to the hw when trigger hw work. > > Using something in DTS does not mean you have to encode it in > bindings. > Bindings describe the DTS, not the hardware programming model. Thanks for your explanation, although these definitions of gpr and cpr are indeed hw-related, but it seems inappropriate to put them in binding and will be removed in the next version. We will try to keep only the definitions used in dts node(such as subsys_id, hw/sw event and thread priority). > > > > > > > > > > > > > > > > + > > > > +/* GCE subsys table */ > > > > +#define SUBSYS_1400XXXX 0 > > > > +#define SUBSYS_1401XXXX 1 > > > > +#define SUBSYS_1402XXXX 2 > > > > +#define SUBSYS_1c00XXXX 3 > > > > +#define SUBSYS_1c01XXXX 4 > > > > +#define SUBSYS_1c02XXXX 5 > > > > +#define SUBSYS_1c10XXXX 6 > > > > +#define SUBSYS_1c11XXXX 7 > > > > +#define SUBSYS_1c12XXXX 8 > > > > +#define SUBSYS_14f0XXXX 9 > > > > +#define SUBSYS_14f1XXXX 10 > > > > +#define SUBSYS_14f2XXXX 11 > > > > +#define SUBSYS_1800XXXX 12 > > > > +#define SUBSYS_1801XXXX 13 > > > > +#define SUBSYS_1802XXXX 14 > > > > +#define SUBSYS_1803XXXX 15 > > > > +#define SUBSYS_1032XXXX 16 > > > > +#define SUBSYS_1033XXXX 17 > > > > +#define SUBSYS_1600XXXX 18 > > > > +#define SUBSYS_1601XXXX 19 > > > > +#define SUBSYS_14e0XXXX 20 > > > > +#define SUBSYS_1c20XXXX 21 > > > > +#define SUBSYS_1c30XXXX 22 > > > > +#define SUBSYS_1c40XXXX 23 > > > > +#define SUBSYS_1c50XXXX 24 > > > > +#define SUBSYS_1c60XXXX 25 > > > > +#define SUBSYS_NO_SUPPORT 99 > > > > + > > > > +/* GCE General Purpose Register (GPR) support > > > > + * Leave note for scenario usage here > > > > + */ > > > > +/* GCE: write mask */ > > > > +#define GCE_GPR_R00 0x00 > > > > +#define GCE_GPR_R01 0x01 > > > > > > No. These are no bindings. Do not embed device programming model > > > into > > > bindings header. I'll stop review. > > > > This GCE_GPR define is an attribute of hw, and different hw > > versions > > may have different gpr number. > > It does not matter that different devices have different programming > model. The bindings are not a place for it. > > Best regards, > Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel