Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp658175ybv; Wed, 19 Feb 2020 06:42:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyQ/pPPxdVWn2F2ihZtdeQIygrBsupjy4SfqXfZ/g+fwM13OVozu17ApfY/ai3Sek3gMzLy X-Received: by 2002:a05:6830:1:: with SMTP id c1mr18199289otp.254.1582123363332; Wed, 19 Feb 2020 06:42:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582123363; cv=none; d=google.com; s=arc-20160816; b=M00guLdy7M3QLTdS08qFJ5nRw/xK7YztlOnnZflJmoNCO+5f9uxJVYjGZNrO6UxSxz gERLavOHyLM/wOasFFwet4MWAaNiFpCyn8VJ+38N/4+VMhBUsAo8yycYOKgxBwpix2TV 7P2E2+eJlQEMnZs4gho2MLZ6pAxctJEiV6jKBQmxr6lFBnvXKEZ3nkncBlg+fvytOyqv pqJdEYX5MH1WLx/Og9ZakukUN5Rdy6jGG3gr5/f+HgKnlJW2VXoTdi+tST4oAIxScQUY InRJVPzEBZ9FQL/tW23bSoh1QplDMS6GF7QbBsR4GOxj034a9YAB+CUSb2BiSU5/tlrs ddvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ETk+uMYrdma1eyXO35+IiwiXCd93qHM5VobtCXZQK38=; b=IFVa4//mKW4B9UkN091iA2b3+RTpYRHWnFh92JBFbhZurejJIvDp6b3xO4gowtcwFV 86gLNrgPgeRh+cr2xrC4ECEdGEsAo+CXbGd1SXEjByWMgonarTtJ8/YFNuWthZHet7FP f95gg09MZdjSD8mtnLIlGLTRBGokdcawTic0QitmbLj/xr7niY5ClfNqc4yTOtAoOqxT MtjuACau3uqlBxH9OypOANGSoXxJr1mOCpbA9o/Q1Non20Ua3CQH7JI7AD8NHgnejtSs If+Xt2GNwujMInChSXEsAvKDGT0MAn1xQhGw1iZlxuSN5KxFG+FVdu45VJm3b03fBbJ2 nsfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q6rrVqsa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si1168246oth.267.2020.02.19.06.42.31; Wed, 19 Feb 2020 06:42:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Q6rrVqsa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726729AbgBSOm1 (ORCPT + 99 others); Wed, 19 Feb 2020 09:42:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:55424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbgBSOm1 (ORCPT ); Wed, 19 Feb 2020 09:42:27 -0500 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C8CCA24670; Wed, 19 Feb 2020 14:42:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582123345; bh=W6+6Bdzc+nFCT886mpTg5D+WUTg1lRbfhrjBZeyUobE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Q6rrVqsaEy4WbKAzVTNlyIzaA/gE/EoMQf2t1vl2fJV/icxRr0ChDvep4a0oNbtca FtY0mDoxZTS5pDIDl9DMyli8vSvitQDrhniTHcsOPdEWYxMr3LZcTDucO0pirhrZXG RQVligVJB37e34uiIzCtdy17JXnVGD/kF3X3PkKk= Received: by mail-qk1-f169.google.com with SMTP id t83so319565qke.3; Wed, 19 Feb 2020 06:42:25 -0800 (PST) X-Gm-Message-State: APjAAAW8FdecG5CwzOgpl2NogjDO1+3CsdOwzC8//+VrA1DxcS5DX89S GeN7WAo0esB+cgiSirQuPviNIEbGNjMq71CvoQ== X-Received: by 2002:a37:6457:: with SMTP id y84mr24256558qkb.254.1582123344892; Wed, 19 Feb 2020 06:42:24 -0800 (PST) MIME-Version: 1.0 References: <208fcb9660abd560aeab077442d158d84a3dddee.1582021248.git.eswara.kota@linux.intel.com> In-Reply-To: <208fcb9660abd560aeab077442d158d84a3dddee.1582021248.git.eswara.kota@linux.intel.com> From: Rob Herring Date: Wed, 19 Feb 2020 08:42:13 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: phy: Add YAML schemas for Intel Combophy To: Dilip Kota Cc: "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Kishon Vijay Abraham I , Andy Shevchenko , cheol.yong.kim@intel.com, chuanhua.lei@linux.intel.com, qi-ming.wu@intel.com, yixin.zhu@intel.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 9:31 PM Dilip Kota wrote: > > Combophy subsystem provides PHY support to various > controllers, viz. PCIe, SATA and EMAC. > Adding YAML schemas for the same. > > Signed-off-by: Dilip Kota > --- > Changes on v2: > > Add custom 'select' > Pass hardware instance entries with phandles and > remove cell-index and bid entries > Clock, register address space, are same for the children. > So move them to parent node. > Two PHY instances cannot run in different modes, > so move the phy-mode entry to parent node. > Add second child entry in the DT example. > > .../devicetree/bindings/phy/intel,combo-phy.yaml | 138 +++++++++++++++++++++ > 1 file changed, 138 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/intel,combo-phy.yaml > > diff --git a/Documentation/devicetree/bindings/phy/intel,combo-phy.yaml b/Documentation/devicetree/bindings/phy/intel,combo-phy.yaml > new file mode 100644 > index 000000000000..8e65a2a71e7f > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/intel,combo-phy.yaml > @@ -0,0 +1,138 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/phy/intel,combo-phy.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Intel Combophy Subsystem > + > +maintainers: > + - Dilip Kota > + > +description: | > + Intel Combophy subsystem supports PHYs for PCIe, EMAC and SATA > + controllers. A single Combophy provides two PHY instances. > + > +# We need a select here so we don't match all nodes with 'simple-bus' > +select: > + properties: > + compatible: > + contains: > + const: intel,combo-phy > + required: > + - compatible > + > +properties: > + $nodename: > + pattern: "^combophy@[0-9]+$" Unit addresses are hex. > + > + compatible: > + items: > + - const: intel,combo-phy Needs to be an SoC specific compatible. > + - const: simple-bus > + > + clocks: > + description: | > + List of phandle and clock specifier pairs as listed > + in clock-names property. Configure the clocks according > + to the PHY mode. How many? No need to redefine a common property name, drop description. Plus, where's clock-names? > + > + reg: > + items: > + - description: ComboPhy core registers > + - description: PCIe app core control registers > + > + reg-names: > + items: > + - const: core > + - const: app > + > + resets: > + maxItems: 2 > + > + reset-names: > + items: > + - const: phy > + - const: core > + > + intel,syscfg: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: Chip configuration registers handle and ComboPhy instance id > + > + intel,hsio: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: HSIO registers handle and ComboPhy instance id on NOC > + > + intel,aggregation: > + description: | > + Specify the flag to confiure ComboPHY in dual lane mode. > + type: boolean > + > + intel,phy-mode: > + $ref: /schemas/types.yaml#/definitions/uint32 > + minimum: 0 > + maximum: 2 > + description: | > + Configure the mode of the PHY. > + 0 - PCIe > + 1 - xpcs > + 2 - sata Doesn't this need to be per PHY? Or the 2 PHYs have to be the same mode? Use the types defined in include/dt-bindings/phy/phy.h. You'll need to add XPCS which maybe should be more specific to distinguish 1G, 10G, etc. Also, we typically put the mode into the 'phys' cells so the mode lives with the client node. > + > +patternProperties: > + "^cb[0-9]phy@[0-9]+$": ^phy@... > + type: object > + > + properties: > + compatible: > + const: intel,phydev > + > + "#phy-cells": > + const: 0 > + > + resets: > + description: | > + reset handle according to the PHY mode. > + See ../reset/reset.txt for details. > + > + required: > + - compatible > + - "#phy-cells" > + > +required: > + - compatible > + - clocks > + - reg > + - reg-names > + - intel,syscfg > + - intel,hsio > + - intel,phy-mode > + > +additionalProperties: false > + > +examples: > + - | > + combophy@0 { > + compatible = "intel,combo-phy", "simple-bus"; > + clocks = <&cgu0 1>; > + reg = <0xd0a00000 0x40000>, > + <0xd0a40000 0x1000>; > + reg-names = "core", "app"; > + resets = <&rcu0 0x50 6>, > + <&rcu0 0x50 17>; > + reset-names = "phy", "core"; > + intel,syscfg = <&sysconf 0>; > + intel,hsio = <&hsiol 0>; > + intel,phy-mode = <0>; > + > + cb0phy0:cb0phy@0 { > + compatible = "intel,phydev"; > + #phy-cells = <0>; > + resets = <&rcu0 0x50 23>; > + }; > + > + cb0phy1:cb0phy@1 { > + compatible = "intel,phydev"; > + #phy-cells = <0>; > + resets = <&rcu0 0x50 24>; > + }; > + }; > -- > 2.11.0 >