Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1237701rwb; Thu, 18 Aug 2022 23:09:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR7LKdm9dJzLBLuWUgvzx7R17B0O5N1sNmoC9brmTkgamSEAJ3ZCBUKooHt7bw5rFUZABXt6 X-Received: by 2002:a17:90b:180f:b0:1f4:e294:d322 with SMTP id lw15-20020a17090b180f00b001f4e294d322mr12495237pjb.163.1660889374088; Thu, 18 Aug 2022 23:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660889374; cv=none; d=google.com; s=arc-20160816; b=lCAdM6J1WVJ29duKVaAMogyuAETa1JNTmKwVXkHcyn+5ZcCH9Xjyny3/Nrsnbx+XpG BtSjs1EVIWKlZgU1/jRjAHWEKNMDeb9Ey9zJAsjz1zGxaDkP3+Oe5JIQYMeYerEdqHLM MyGUA3+WjngUBsw1w3PrlWRGx9CoTcQYhbOF6lXiJUQS6OvULgZedvcPUIGuyF14oPDd EdpD9DSaOtDxy4X05sZwYlR+cjQr97JBIHIwqZamtoeJJEcFUN5EiJ83LUu+qM23dRFV 2IcNMtk16UzzETWqOspLnOZCpFyQCq5/6dLRYeV9+7wlD6DcHIYzs/HfRIa4GEWvhz7C ZW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=g8oyDk7JBZxiYlL06SI8ybX1FXh3s1KT+kFnj1vFyGo=; b=XpEyJusGs6yBsHGqMlwqCAHEJFjFsNQuE/a129MK7ecKzAKkiEGZT4lBCp5V9oQ5+7 5mFSoseJxTv1ghklql/CXO8UUK6ZciZdYJF7F7gh2jRNDSoJKcVB3/eTBvdhI4HdLGUW SH9YtodrdFI4syJ1YYjOXYpql/g+FAnvtAE3ra0k2TIJVg4dsBF8xLSIdakIFswFahNe QQ/OblhNbPKxkGXgY6Yxe4CZZQ6AOXpKFlg8UcKpJqTYIZqFpbI8WqL5It7LyJ9kdzrv wWwFPayzSVfQaWTUTPb/HGyM79/0IfeB6r9LMH9ZU2NUdMS9XUpOUB2SCFWKbkmpFEJO kQhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hHdkAwTP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cp7-20020a170902e78700b0017281416db6si2820033plb.408.2022.08.18.23.09.22; Thu, 18 Aug 2022 23:09:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hHdkAwTP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243414AbiHSGAL (ORCPT + 99 others); Fri, 19 Aug 2022 02:00:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230002AbiHSGAK (ORCPT ); Fri, 19 Aug 2022 02:00:10 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C738C59FA; Thu, 18 Aug 2022 23:00:07 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 27J5xbo3048870; Fri, 19 Aug 2022 00:59:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1660888777; bh=g8oyDk7JBZxiYlL06SI8ybX1FXh3s1KT+kFnj1vFyGo=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=hHdkAwTP1EitZwBSwO0WeHRjek6uVGOxzEPV9Rjeh7n7YEGOvUzLkeNf4RgseNV51 xJXhS/IEd5zeKbCnTpSvJwQrn8y+/xRbFExXRTPQ87VAxSrNP5oupacjJzKD5bIV3W YbqDsGY9Vqa83G6KpS7jXkQH8h7tZCmRln2/0jg4= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 27J5xbwV102751 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Aug 2022 00:59:37 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Fri, 19 Aug 2022 00:59:37 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Fri, 19 Aug 2022 00:59:37 -0500 Received: from [10.24.69.241] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 27J5xX8j065125; Fri, 19 Aug 2022 00:59:34 -0500 Message-ID: <8fd1e19e-5d40-2847-47ae-93131ed9260d@ti.com> Date: Fri, 19 Aug 2022 11:29:32 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 CC: , , , , , , , , , , Subject: Re: [PATCH v2 1/2] dt-bindings: phy: ti: phy-gmii-sel: Add bindings for J7200 Content-Language: en-US To: Rob Herring References: <20220816055848.111482-1-s-vadapalli@ti.com> <20220816055848.111482-2-s-vadapalli@ti.com> <20220818144326.GA1829017-robh@kernel.org> From: Siddharth Vadapalli In-Reply-To: <20220818144326.GA1829017-robh@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Rob, On 18/08/22 20:13, Rob Herring wrote: > On Tue, Aug 16, 2022 at 11:28:47AM +0530, Siddharth Vadapalli wrote: >> TI's J7200 SoC supports additional PHY modes like QSGMII and SGMII >> that are not supported on earlier SoCs. Add a compatible for it. >> >> Signed-off-by: Siddharth Vadapalli >> --- >> .../mfd/ti,j721e-system-controller.yaml | 5 ++++ >> .../bindings/phy/ti,phy-gmii-sel.yaml | 27 ++++++++++++++++++- >> 2 files changed, 31 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml >> index 73cffc45e056..527fd47b648b 100644 >> --- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml >> +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml >> @@ -54,6 +54,11 @@ patternProperties: >> description: >> Clock provider for TI EHRPWM nodes. >> >> + "phy@[0-9a-f]+$": >> + type: object >> + description: >> + This is the register to set phy mode through phy-gmii-sel driver. > > No properties for this node? A whole node for 1 register? > > Or this node is ti,phy-gmii-sel.yaml? If so, add a $ref to it. Thank you for reviewing the patch. Yes, the node is for ti,phy-gmii-sel.yaml. I will add the $ref for it. > >> + >> required: >> - compatible >> - reg >> diff --git a/Documentation/devicetree/bindings/phy/ti,phy-gmii-sel.yaml b/Documentation/devicetree/bindings/phy/ti,phy-gmii-sel.yaml >> index ff8a6d9eb153..54da408d0360 100644 >> --- a/Documentation/devicetree/bindings/phy/ti,phy-gmii-sel.yaml >> +++ b/Documentation/devicetree/bindings/phy/ti,phy-gmii-sel.yaml >> @@ -53,12 +53,21 @@ properties: >> - ti,am43xx-phy-gmii-sel >> - ti,dm814-phy-gmii-sel >> - ti,am654-phy-gmii-sel >> + - ti,j7200-cpsw5g-phy-gmii-sel >> >> reg: >> maxItems: 1 >> >> '#phy-cells': true >> >> + ti,qsgmii-main-ports: >> + $ref: /schemas/types.yaml#/definitions/uint32-array >> + description: | >> + Required only for QSGMII mode. Array to select the port for >> + QSGMII main mode. Rest of the ports are selected as QSGMII_SUB >> + ports automatically. Any one of the 4 CPSW5G ports can act as the >> + main port with the rest of them being the QSGMII_SUB ports. > > Constraints? This is an optional property that should only be used for the ti,j7200-cpsw5g-phy-gmii-sel compatible if it is used. I did not realize that by defining it here, I had automatically defined it as a valid property for all the compatibles. I will restrict this property only to the ti,j7200-cpsw5g-phy-gmii-sel compatible by extending the if-then statement below, adding an else statement with "ti,qsgmii-main-ports: false", which will disallow this property for other compatibles. > >> + >> allOf: >> - if: >> properties: >> @@ -73,6 +82,22 @@ allOf: >> '#phy-cells': >> const: 1 >> description: CPSW port number (starting from 1) >> + - if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - ti,j7200-cpsw5g-phy-gmii-sel >> + then: >> + properties: >> + '#phy-cells': >> + const: 1 >> + description: CPSW port number (starting from 1) >> + ti,qsgmii-main-ports: >> + maxItems: 1 > > An array, but only 1 entry allowed? For the ti,j7200-cpsw5g-phy-gmii-sel compatible, only one entry is allowed, but in the future, I will be adding a new compatible which will require two entries for the ti,qsgmii-main-ports property. On TI's J721e device, there are a total of 8 external ports, therefore making it possible to configure them as two sets of QSGMII interfaces. This requires two qsgmii-main ports which can be specified in the ti,qsgmii-main-ports property as an array. Therefore, I have declared the property as an array. > >> + items: >> + minimum: 1 >> + maximum: 4 > > Can't this be up above? Yes, I will move it to the top where the ti,qsgmii-main-ports property is defined. Regards, Siddharth.