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 057E9C433EF for ; Mon, 7 Mar 2022 11:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235382AbiCGLLP (ORCPT ); Mon, 7 Mar 2022 06:11:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241895AbiCGLKf (ORCPT ); Mon, 7 Mar 2022 06:10:35 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC7EA5373E; Mon, 7 Mar 2022 02:32:49 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 75C481F43920 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1646649168; bh=PesHG5E9XWbmSJlu7I167mK5yVdbSK02UCAMGo049pQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Dw5qXgQNfkLcKFLIdYteeaVz2PeRPjWRY/Y0R8CXAB/5hXopw9c+kg+ANQXd+iV9G EPNAP9xDxiEPo2IEgk7Hi2tGGluboOOm/FZGeyxRkvhUcHnWn5AJZdlgxIuh1LkWdg 0fnXNz8PwHnQcqOuf+rDwI44j186+HSaz5B5Xvn6oW2kQ8Q4vnkhc844IAm45X04Gg oCFPYxo7bmVWbXs20PUvlNfVn9/dp/FzCwK8biefNwLL83o2tX7lYGQto7YVIP+v95 HMslHNz0F4DIlgiRQpDT1jsoN2ayKflymDDDGdDRIRqMAwqnHmb2xMt2ZUjCJBeNVo En4ZaIuBYE2qA== Message-ID: Date: Mon, 7 Mar 2022 11:32:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH V3 2/7] dt-bindings: spi: Add compatible for MT7986 with single mode Content-Language: en-US To: Leilk Liu , Mark Brown Cc: Rob Herring , Matthias Brugger , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-mediatek@lists.infradead.org, Rob Herring References: <20220307065230.12655-1-leilk.liu@mediatek.com> <20220307065230.12655-3-leilk.liu@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220307065230.12655-3-leilk.liu@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: - 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 .... } Regards, Angelo