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 324D8C4332F for ; Thu, 10 Mar 2022 21:19:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233866AbiCJVU6 (ORCPT ); Thu, 10 Mar 2022 16:20:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237947AbiCJVU5 (ORCPT ); Thu, 10 Mar 2022 16:20:57 -0500 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA62063BD3 for ; Thu, 10 Mar 2022 13:19:55 -0800 (PST) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 355F23F312 for ; Thu, 10 Mar 2022 21:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646947187; bh=9DmBnTPJmgfr8wJC4s2tQqC5+M2g/VQlbp1lfsPPtrg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TbYxkSGDGpB+9LWMIcVrg/bKxfcGPedih+1jROjbklTGSPGnT8HSP3sgc8bZ6/LkS rOyeRbCE4m31eogGMA8HknzxDE9ntuUwsfoqtUL4XLQR3K/uIlBPg8tJQqjgeWwPNg NFyle0JOpc7uViUfkSixVt881DBA2mfBmfIu2ZOr7wIyKO7hxXCEIN6RTqu/IEOMaa uiob7bceabyF7HlIlNWLngGVTisQgQIgJx5IPZExaKB6xe7jAh178Hv930En95ltg8 lmxguayBsyolhw/kyqh5IY45ySP8KH4OJX3aF8QfVpRr7EYLuj2G9ythIqYZILjIl6 8I+KsxVWG/vhg== Received: by mail-ej1-f72.google.com with SMTP id l24-20020a170906a41800b006da873d66b6so3774796ejz.3 for ; Thu, 10 Mar 2022 13:19:47 -0800 (PST) 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=9DmBnTPJmgfr8wJC4s2tQqC5+M2g/VQlbp1lfsPPtrg=; b=dX+wJD9p7kcbjWWqo3A6zTCjwXRTTyavKl5CQ82NYCZcT4zK5aYN5OUOeBxq3k+p+c HyU2I28FAW2GOG5LT1MG5FKQZ+yEbWJKDD2Qcnue5N90T9QCOJtDp40qbr69m86GjvnT YPr0EnHc8wmF+TEFNQ8qvu/PJGkKQbrowp3Aqm2dbLrD2vMb0w6W7P8nJQx5nDpVLktv fQQH46l8qdrKZrmt+4mju3p/ZfVMpiILwrk8ub8rg79xPupSunnj3o/cL8TX790jvjsx Mt4ZitLG7+lClRLzUuvJmvoMeMA8Ahtt6+75ktt2oJjQE1aZVBACgC602VQBgLfuUngy QL5w== X-Gm-Message-State: AOAM531oekpXLQirH0gWuOJIQGGbgjVWMwx7Hkm33jrNCN88VnToQObx Npl/3+jJUoVAguEKjhaHgLnPnXvNOzadFPOcU2EaBTU0W4U2xHslk2UpfRQ1L1R1bOTg08LBl9P Y0fg+x1fRy2kJzdbhpAZQmPPHURU9On1FBI6Yi0w= X-Received: by 2002:a17:906:4108:b0:6db:867c:f3ab with SMTP id j8-20020a170906410800b006db867cf3abmr4064713ejk.708.1646947186744; Thu, 10 Mar 2022 13:19:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpPhoEYeMm5ZEZqUHmwNDHKl/pnXpf7yeFjdCLVUvg18iW5ZSftFmEY3A2p0wQ8bC7jpG3FA== X-Received: by 2002:a17:906:4108:b0:6db:867c:f3ab with SMTP id j8-20020a170906410800b006db867cf3abmr4064700ejk.708.1646947186550; Thu, 10 Mar 2022 13:19:46 -0800 (PST) Received: from [192.168.0.147] (xdsl-188-155-174-239.adslplus.ch. [188.155.174.239]) by smtp.gmail.com with ESMTPSA id yy18-20020a170906dc1200b006d6e5c75029sm2114790ejb.187.2022.03.10.13.19.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Mar 2022 13:19:46 -0800 (PST) Message-ID: Date: Thu, 10 Mar 2022 22:19:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH net-next v3 2/8] dt-bindings: phy: add the "fsl,lynx-28g" compatible Content-Language: en-US To: Ioana Ciornei Cc: "davem@davemloft.net" , "kuba@kernel.org" , "netdev@vger.kernel.org" , "kishon@ti.com" , "vkoul@kernel.org" , "robh+dt@kernel.org" , Leo Li , "linux-phy@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux@armlinux.org.uk" , "shawnguo@kernel.org" , Hongxing Zhu References: <20220310145200.3645763-1-ioana.ciornei@nxp.com> <20220310145200.3645763-3-ioana.ciornei@nxp.com> <20220310173223.pl2asv55iqfmbasq@skbuf> From: Krzysztof Kozlowski In-Reply-To: <20220310173223.pl2asv55iqfmbasq@skbuf> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 10/03/2022 18:32, Ioana Ciornei wrote: > On Thu, Mar 10, 2022 at 05:47:31PM +0100, Krzysztof Kozlowski wrote: >> On 10/03/2022 15:51, Ioana Ciornei wrote: >>> Describe the "fsl,lynx-28g" compatible used by the Lynx 28G SerDes PHY >>> driver on Layerscape based SoCs. >> >> The message is a bit misleading, because it suggests you add only >> compatible to existing bindings. Instead please look at the git log how >> people usually describe it in subject and message. > > Sure, I can change the title and commit message. > >>> +patternProperties: >>> + '^phy@[0-9a-f]$': >>> + type: object >>> + properties: >>> + reg: >>> + description: >>> + Number of the SerDes lane. >>> + minimum: 0 >>> + maximum: 7 >>> + >>> + "#phy-cells": >>> + const: 0 >> >> Why do you need all these children? You just enumerated them, without >> statuses, resources or any properties. This should be rather just index >> of lynx-28g phy. > > I am just describing each lane of the SerDes block so that each ethernet > dts node references it directly. Instead, phy user should reference phy device node and phy ID. Just like we do for other providers (everything with #xxxxx-cells). > Since I am new to the generic PHY infrastructure I was using the COMPHY > for the Marvell MVEBU SoCs (phy-mvebu-comphy.txt) as a loose example. I don't know it but it might not be the best example... Just because we have already some solution it does not mean it is good. :) > Each lane there is described as a different child node as well. The only > difference from the COMPHY is that Lynx 28G does not need #phy-cells = > <1> to reference the input port, we just use '#phy-cells = <0>' on each > lane. > > What is wrong with this approach? Or better, is there an easier way to > do this? Because the nodes look artificial. It looks like you have nodes only differentiate by index. As I said before - there are no other properties in these nodes. Imagine now a clock provider with 500 clocks like this... The easier approach, especially since you have a shared registers, is to use phy-cells = 1, without artificial nodes just to pass the index. It would be entirely different if you actually had any properties in the children. IOW, if these were actually some blocks with their own characteristics and programming model. Best regards, Krzysztof