Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp479797ybv; Thu, 20 Feb 2020 02:00:03 -0800 (PST) X-Google-Smtp-Source: APXvYqyw1Cv4jBXjNMNYEognxrv5FegMDQFkmp68buiT/nciOU1XW5USwBQTET+7KMB6oRyPrh3L X-Received: by 2002:a9d:2ae5:: with SMTP id e92mr22850096otb.72.1582192803202; Thu, 20 Feb 2020 02:00:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582192803; cv=none; d=google.com; s=arc-20160816; b=zfmYEUdyPwTRWTtYCBvgrC7QizIUiaj4HJyImsMYNpcCY/moNQIwgH/7Ror+Mqa7rk iCXjtJhbUTh0EZJir/54bLb6NPZ8OfexBRMah02O0D8Kq6RriFnFFktnz7klTLIMTM/q DfxUZdtyV0Z1u1Mel5bVd1IJEmKHy3WQcerefwLI3D3iKVzW7LOxDocezfDkeuXpT5V2 4TpqdUR9dLJ3fTxphIqrcBbEUhuvQp7Q28Xe6FP/u/xnbKLhEX9+i87ZvmW8qZn3UtWa gKQRMRlN2yKhuCE8Wd7KQGR/RUoqbCDvlYMuSo8MsWusWPLrc+89wZO/Smk7C/bBdHDJ DroA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from; bh=yuVNTSvF8Xjy9IAbkA3XazArFPKkj4MvF3VxU1iui4s=; b=yKC/kKfe3XjJCjekm4qYTN0XT0Q0yQNeDOtJcDL1rBSanK40b65e/zowpGmwMTAZD4 TJWAM/ISgIQ1PX5KHnFtpzv5W8V0WjzjhWQi4si9KtFgw0jIfoyubZQI6t+lfELt2vgY 1bJgp4BcPWzfv2iBaPYaep6T9X5vIPpUhASDW6hwelEEVzEX3H9XxG/xNM0Chc3SmyGn QctgdrdgIZdmX/ccfPn/7b51vx+K10SbP6r3meMbsrMqA2Ul1xDnIIz9xNEYqO0vMxBd um2WIEFZCzrRfW4bsQfr8sSu9SiGFlTO64dLA5RXuW9Wyl5qBfX3xB0pYHX4XB5aMQ+b BkSA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13si1351078otc.228.2020.02.20.01.59.51; Thu, 20 Feb 2020 02:00:03 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726940AbgBTJ6h (ORCPT + 99 others); Thu, 20 Feb 2020 04:58:37 -0500 Received: from mga01.intel.com ([192.55.52.88]:37319 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726799AbgBTJ6h (ORCPT ); Thu, 20 Feb 2020 04:58:37 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2020 01:58:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,464,1574150400"; d="scan'208";a="259225619" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 20 Feb 2020 01:58:36 -0800 Received: from [10.226.39.49] (unknown [10.226.39.49]) by linux.intel.com (Postfix) with ESMTP id 8A86E580270; Thu, 20 Feb 2020 01:58:33 -0800 (PST) From: Dilip Kota Subject: Re: [PATCH v2 1/2] dt-bindings: phy: Add YAML schemas for Intel Combophy To: Rob Herring 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 References: <208fcb9660abd560aeab077442d158d84a3dddee.1582021248.git.eswara.kota@linux.intel.com> Message-ID: <6f4cad61-b094-78e5-9921-9de0a1d7dbd7@linux.intel.com> Date: Thu, 20 Feb 2020 17:58:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/19/2020 10:42 PM, Rob Herring wrote: > 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. Will fix it. > >> + >> + compatible: >> + items: >> + - const: intel,combo-phy > Needs to be an SoC specific compatible. Sure, will update it to intel, combophy-lgm > >> + - 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? Its only one clock, i will add maxItems:1 and remove the description. > >> + >> + 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 Sure, will define the types in header file. > 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. Two PHYs must be in same mode. actual mode configuration is done for the ComboPhy to work as a two individual PHYs in PCIe/XPCS/SATA mode or as a single PHY providing dual physical lanes in PCIe/XPCS. And mode configuration is dependent on the 'intel,aggregation' flag. So, placed the phy-mode here itself, to make sure all the mode related parameters are at one location. Also, avoids setting individual PHYs in different modes. >> + >> +patternProperties: >> + "^cb[0-9]phy@[0-9]+$": > ^phy@... Sure, will fix it. Regards, Dilip >