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 59779C433F5 for ; Tue, 8 Mar 2022 01:51:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244660AbiCHBwo (ORCPT ); Mon, 7 Mar 2022 20:52:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiCHBwm (ORCPT ); Mon, 7 Mar 2022 20:52:42 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C9633D497; Mon, 7 Mar 2022 17:51:43 -0800 (PST) X-UUID: e46f70f6212d44398384e46c7dcb109b-20220308 X-UUID: e46f70f6212d44398384e46c7dcb109b-20220308 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1271742935; Tue, 08 Mar 2022 09:51:39 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Tue, 8 Mar 2022 09:51:38 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Mar 2022 09:51:37 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 8 Mar 2022 09:51:37 +0800 Message-ID: <7ae469a94ad51be85f0731c4c42088d65b241581.camel@mediatek.com> Subject: Re: [PATCH V3 2/7] dt-bindings: spi: Add compatible for MT7986 with single mode From: Leilk Liu To: AngeloGioacchino Del Regno , "Mark Brown" CC: Rob Herring , Matthias Brugger , , , , , , "Rob Herring" Date: Tue, 8 Mar 2022 09:51:36 +0800 In-Reply-To: References: <20220307065230.12655-1-leilk.liu@mediatek.com> <20220307065230.12655-3-leilk.liu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2022-03-07 at 11:32 +0100, AngeloGioacchino Del Regno wrote: > Il 07/03/22 07:52, Leilk Liu ha scritto: > > This patch adds dt-binding documentation for MT7986 with single > > mode. > > > > Signed-off-by: Leilk Liu > > Acked-by: Rob Herring > > --- > > Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml | > > 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/Documentation/devicetree/bindings/spi/mediatek,spi- > > mt65xx.yaml b/Documentation/devicetree/bindings/spi/mediatek,spi- > > mt65xx.yaml > > index bfa44acb1bdd..48024b98408a 100644 > > --- a/Documentation/devicetree/bindings/spi/mediatek,spi- > > mt65xx.yaml > > +++ b/Documentation/devicetree/bindings/spi/mediatek,spi- > > mt65xx.yaml > > @@ -41,6 +41,7 @@ properties: > > - mediatek,mt8135-spi > > - mediatek,mt8173-spi > > - mediatek,mt8183-spi > > + - mediatek,mt7986-spi-single > > > > reg: > > maxItems: 1 > > I think that the best way to do this is to better organize the > compatibles > per-hardware, here... or the compatibles list will eventually grow > out of > control for little reason. > > Since "IPM" is a new SPI controller IP, I would expect more and more > MediaTek > SoCs using it in the future, so here's my proposal: Yes, we plan to use this IP with new ICs. > > - Add a generic (const) compatible "mediatek,spi-ipm" to describe the > hardware > - Add an enumeration with "mediatek,mt7986-spi-ipm" as the only > member, as to > prepare this binding for the future. > - Single and quad mode can be expressed with generic SPI bindings! > > Specifically, you can express that with "spi-rx-bus-width" for > SPI_RX_{....} > and "spi-tx-bus-width" for SPI_TX_{....}, so you don't need different > compatibles > for "mediatek,mt7986-spi-single" and "mediatek,mt7896-spi-quad". > > Fast example: > > spi@12345678 { > compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm"; > reg = <....> > /* Quad mode */ > spi-rx-bus-width = <4>; > spi-tx-bus-width = <4>; > > .... etc .... > } > OK, thanks for your advice. > Regards, > Angelo > >