Message ID | 14f60578e2935c0844537eab162af3afa52ffe39.1686126439.git.quic_varada@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp176215vqr; Wed, 7 Jun 2023 04:14:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4526dmgrxtSCVG8eHdYDvCFkNc85b/cgweral/3JE95z89rW1Dbfq+gxwNjXH8QC0SA3jf X-Received: by 2002:a17:902:bd94:b0:1b1:7336:2634 with SMTP id q20-20020a170902bd9400b001b173362634mr2958873pls.57.1686136476633; Wed, 07 Jun 2023 04:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686136476; cv=none; d=google.com; s=arc-20160816; b=swIZRNr/ko0EVsQ/yqsZe3c8npLlBEVvDfqqZOKwRmXSn1fWBQiFSLfb6ZmUd0nUqT Qh2GPdFU0g1xIV3cI4qkSIeeDYQWrFscWisVTIEg882NejgHqvklJ9eQkmkZoaOSdVvE 5MuYFEKAjTIRPa6q7iCUuiUnb1hk/+QcQOeB/0YrPoUfaFJ7Q/4fMfrax+4Pp62/hIBj EqwmYL2oLK18N0s04TWAmtHXPzRiz7rgsD+XAb/MC4gzIbX17UNPPVRSGZ8tuN+sv5V0 x17wf/nRLhEeFqJz2LI4T7IMmCNoojknJBsBM9mlks+Nb6FawmV5ucAFsv8xCW9F9bvY rAZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=smG/5RqUV9r3lpf7t81s/TdasSHKd4QEHKnq4m3+YA4=; b=shjD2IGJpJZded1ZMmO0eYwOupgc7+J3d/fTekjhsHygv/7QGSgm6RcTtyst3BYzCj F+hMpis2feZncquIS+X2v8geHJ2TpzkgusMu/ngc/g3Jlmp6Q20VhKBqVasW+Q8udn7F wHLuOmPBoD6fNQ8k8OmJKo8jtLOccavskiUIT6evNMu3qjuj/xFL4vzCD5cpvPkp5AYU W3zHoN/qEePDYAVibgk1ETzNhOc92jK2TyfzhkQZHH935npSA+b67U1/oF6Leb/E51Vn rjrP8KL6kUtbO6LUuCMb6jei4/R0/cdUY6JZEt3MvknaYqc2xs/sEzCOrnudMSPG6Bjs aphA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="UrI/hj5x"; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a170902788500b001a1b75674bdsi8586598pll.207.2023.06.07.04.14.21; Wed, 07 Jun 2023 04:14:36 -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=@quicinc.com header.s=qcppdkim1 header.b="UrI/hj5x"; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239478AbjFGLAl (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 07:00:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240500AbjFGLAL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 07:00:11 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB1261FDC; Wed, 7 Jun 2023 03:58:52 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 357AiK99005199; Wed, 7 Jun 2023 10:56:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=smG/5RqUV9r3lpf7t81s/TdasSHKd4QEHKnq4m3+YA4=; b=UrI/hj5xlLXoImFsG7kRS5nFmkBNM5BJyMWjgq7wH6YDkTv6UO/QTTrCjNNy11bs/kGO GzdOrnOs/zLxaD1pGUbjeHtccQ7RvncCiSPwj6vvnSAmQfe4o9IF/W8v6By0qU1i8ViP Dobt2ICpbplSqUgDlsyXO5wi85VjbMGyKqAc2iXJuywyUtGExhnyt+0wEO30mlgvNyDd YuKsf0tH5KMwyahrHUclFjDqFtezPRALBIfnxikSlnlW0I7ANhdzjHYVTcdfEPbPJwmH HmoObkcIYXTVPIkRvkEoX2VCh9GXoSg9hu/u6xMS2SG8KiJY/W+cUCU63C8Lg057TKk6 Sw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r2a9thkfm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 07 Jun 2023 10:56:48 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 357AulKC025487 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 7 Jun 2023 10:56:47 GMT Received: from varda-linux.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Wed, 7 Jun 2023 03:56:38 -0700 From: Varadarajan Narayanan <quic_varada@quicinc.com> To: <agross@kernel.org>, <andersson@kernel.org>, <konrad.dybcio@linaro.org>, <vkoul@kernel.org>, <kishon@kernel.org>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <gregkh@linuxfoundation.org>, <catalin.marinas@arm.com>, <will@kernel.org>, <mturquette@baylibre.com>, <sboyd@kernel.org>, <p.zabel@pengutronix.de>, <arnd@arndb.de>, <geert+renesas@glider.be>, <neil.armstrong@linaro.org>, <nfraprado@collabora.com>, <broonie@kernel.org>, <rafal@milecki.pl>, <quic_srichara@quicinc.com>, <quic_varada@quicinc.org>, <quic_wcheng@quicinc.com>, <linux-arm-msm@vger.kernel.org>, <linux-phy@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-clk@vger.kernel.org> CC: Varadarajan Narayanan <quic_varada@quicinc.com> Subject: [PATCH 2/9] dt-bindings: phy: qcom,m31: Document qcom,m31 USB phy Date: Wed, 7 Jun 2023 16:26:06 +0530 Message-ID: <14f60578e2935c0844537eab162af3afa52ffe39.1686126439.git.quic_varada@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <cover.1686126439.git.quic_varada@quicinc.com> References: <cover.1686126439.git.quic_varada@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: LbTCSfTXNxpfeTxjqiBTijUyAv80Q3I7 X-Proofpoint-ORIG-GUID: LbTCSfTXNxpfeTxjqiBTijUyAv80Q3I7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-07_06,2023-06-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306070089 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768042242075324781?= X-GMAIL-MSGID: =?utf-8?q?1768042242075324781?= |
Series |
Enable IPQ5332 USB2
|
|
Commit Message
Varadarajan Narayanan
June 7, 2023, 10:56 a.m. UTC
Document the M31 USB2 phy present in IPQ5332 Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> --- .../devicetree/bindings/phy/qcom,m31.yaml | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/qcom,m31.yaml
Comments
On Wed, 07 Jun 2023 16:26:06 +0530, Varadarajan Narayanan wrote: > Document the M31 USB2 phy present in IPQ5332 > > Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > --- > .../devicetree/bindings/phy/qcom,m31.yaml | 69 ++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/qcom,m31.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/phy/qcom,m31.example.dtb: hs_m31phy@5b00: status:0: 'ok' is not one of ['okay', 'disabled', 'reserved'] From schema: /usr/local/lib/python3.10/dist-packages/dtschema/schemas/dt-core.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/14f60578e2935c0844537eab162af3afa52ffe39.1686126439.git.quic_varada@quicinc.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On 07/06/2023 12:56, Varadarajan Narayanan wrote: > Document the M31 USB2 phy present in IPQ5332 Full stop. > > Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > --- > .../devicetree/bindings/phy/qcom,m31.yaml | 69 ++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/qcom,m31.yaml > > diff --git a/Documentation/devicetree/bindings/phy/qcom,m31.yaml b/Documentation/devicetree/bindings/phy/qcom,m31.yaml > new file mode 100644 > index 0000000..8ad4ba4 > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/qcom,m31.yaml > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > + Drop stray blank lines. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/phy/qcom,m31.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm M31 USB PHY What is M31? > + > +maintainers: > + - Sricharan Ramabadhran <quic_srichara@quicinc.com> > + - Varadarajan Narayanan <quic_varada@quicinc.org> > + > +description: > + This file contains documentation for the USB M31 PHY found in Qualcomm Drop redundant parts ("This file contains documentation for the"). > + IPQ5018, IPQ5332 SoCs. > + > +properties: > + compatible: > + oneOf: That's not oneOf. > + - items: No items. > + - enum: > + - qcom,m31-usb-hsphy I am confused what's this. If m31 is coming from some IP block provider, then you are using wrong vendor prefix. https://www.m31tech.com/download_file/M31_USB.pdf > + - qcom,ipq5332-m31-usb-hsphy This confuses me even more. IPQ m31? > + > + reg: > + description: > + Offset and length of the M31 PHY register set Drop description, obvious. > + maxItems: 2 > + > + reg-names: > + items: > + - const: m31usb_phy_base > + - const: qscratch_base Drop "_base" from both. > + > + phy_type: > + oneOf: > + - items: > + - enum: > + - utmi > + - ulpi This does not belong to phy, but to USB node. > + > + resets: > + maxItems: 1 > + description: > + List of phandles and reset pairs, one for each entry in reset-names. Drop useless description. > + > + reset-names: > + items: > + - const: > + usb2_phy_reset Drop entire reset-names. > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/qcom,ipq5332-gcc.h> > + hs_m31phy_0: hs_m31phy@5b00 { Node names should be generic. See also explanation and list of examples in DT specification: https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation Also, no underscores in node names. > + compatible = "qcom,m31-usb-hsphy"; > + reg = <0x5b000 0x3000>, This is not what your unit address is saying. > + <0x08af8800 0x400>; Align it. > + reg-names = "m31usb_phy_base", > + "qscratch_base"; Align it. > + phy_type = "utmi"; > + resets = <&gcc GCC_QUSB2_0_PHY_BCR>; > + reset-names = "usb2_phy_reset"; > + > + status = "ok"; Drop. > + }; Best regards, Krzysztof
On Wed, Jun 07, 2023 at 08:31:50PM +0200, Krzysztof Kozlowski wrote: > On 07/06/2023 12:56, Varadarajan Narayanan wrote: > > Document the M31 USB2 phy present in IPQ5332 > > Full stop. Ok. > > Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com> > > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > > --- > > .../devicetree/bindings/phy/qcom,m31.yaml | 69 ++++++++++++++++++++++ > > 1 file changed, 69 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/phy/qcom,m31.yaml > > > > diff --git a/Documentation/devicetree/bindings/phy/qcom,m31.yaml b/Documentation/devicetree/bindings/phy/qcom,m31.yaml > > new file mode 100644 > > index 0000000..8ad4ba4 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/phy/qcom,m31.yaml > > @@ -0,0 +1,69 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > + > > Drop stray blank lines. Ok. > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/phy/qcom,m31.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Qualcomm M31 USB PHY > > What is M31? M31 is an external IP integrated into IPQ5332 SoC. > > + > > +maintainers: > > + - Sricharan Ramabadhran <quic_srichara@quicinc.com> > > + - Varadarajan Narayanan <quic_varada@quicinc.org> > > + > > +description: > > + This file contains documentation for the USB M31 PHY found in Qualcomm > > Drop redundant parts ("This file contains documentation for the"). Ok. > > + IPQ5018, IPQ5332 SoCs. > > + > > +properties: > > + compatible: > > + oneOf: > > That's not oneOf. Ok. > > + - items: > > No items. Ok. > > + - enum: > > + - qcom,m31-usb-hsphy > > I am confused what's this. If m31 is coming from some IP block provider, > then you are using wrong vendor prefix. > https://www.m31tech.com/download_file/M31_USB.pdf > > > > + - qcom,ipq5332-m31-usb-hsphy > > This confuses me even more. IPQ m31? Will change this to m31,usb-hsphy and m31,ipq5332-usb-hsphy respectively. Will that be acceptable? > > + > > + reg: > > + description: > > + Offset and length of the M31 PHY register set > > Drop description, obvious. Ok. > > + maxItems: 2 > > + > > + reg-names: > > + items: > > + - const: m31usb_phy_base > > + - const: qscratch_base > > Drop "_base" from both. Ok. Will drop qscratch_base. This is in the controller space. Should not come here. > > + > > + phy_type: > > + oneOf: > > + - items: > > + - enum: > > + - utmi > > + - ulpi > > This does not belong to phy, but to USB node. This is used by the driver to set a bit during phy init. Hence have it as a replication of the USB node's entry. If this is not permissible, is there some way to get this from the USB node, or any other alternative mechanism? > > + > > + resets: > > + maxItems: 1 > > + description: > > + List of phandles and reset pairs, one for each entry in reset-names. > > Drop useless description. Ok. > > + > > + reset-names: > > + items: > > + - const: > > + usb2_phy_reset > > Drop entire reset-names. Ok. > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/clock/qcom,ipq5332-gcc.h> > > + hs_m31phy_0: hs_m31phy@5b00 { > > Node names should be generic. See also explanation and list of examples > in DT specification: > https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > > Also, no underscores in node names. Will change this as usbphy0:hs_m31phy@7b000 > > + compatible = "qcom,m31-usb-hsphy"; > > + reg = <0x5b000 0x3000>, > > This is not what your unit address is saying. Will change to 0x0007b000. > > + <0x08af8800 0x400>; > > Align it. Will drop this. This is in the controller space. > > + reg-names = "m31usb_phy_base", > > + "qscratch_base"; > > Align it. Ok. > > + phy_type = "utmi"; > > + resets = <&gcc GCC_QUSB2_0_PHY_BCR>; > > + reset-names = "usb2_phy_reset"; > > + > > + status = "ok"; > > Drop. Ok. Hopefully will get an alternative for the phy_type. Thanks Varada > > + }; > > Best regards, > Krzysztof >
On 15/06/2023 07:27, Varadarajan Narayanan wrote: >>> + - enum: >>> + - qcom,m31-usb-hsphy >> >> I am confused what's this. If m31 is coming from some IP block provider, >> then you are using wrong vendor prefix. >> https://www.m31tech.com/download_file/M31_USB.pdf >> >> >>> + - qcom,ipq5332-m31-usb-hsphy >> >> This confuses me even more. IPQ m31? > > Will change this to m31,usb-hsphy and m31,ipq5332-usb-hsphy respectively. > Will that be acceptable? m31,ipq5332 seems wrong, as m31 did not create ipq5332. Does the m31 device have some name/version/model? If it is not really known, then I would just propose to go with qcom,ipq5332-usb-hsphy. Skip generic compatible ("usb-hsphy") entirely. And then we have... existing bindings qcom,usb-hs-phy.yaml. Don't create something similar with difference in the hyphen. Just use device specific compatible thus device specific filename. > >>> + >>> + reg: >>> + description: >>> + Offset and length of the M31 PHY register set >> >> Drop description, obvious. > > Ok. > >>> + maxItems: 2 >>> + >>> + reg-names: >>> + items: >>> + - const: m31usb_phy_base >>> + - const: qscratch_base >> >> Drop "_base" from both. > > Ok. Will drop qscratch_base. This is in the controller space. > Should not come here. Then drop reg-names entirely. > >>> + >>> + phy_type: >>> + oneOf: >>> + - items: >>> + - enum: >>> + - utmi >>> + - ulpi >> >> This does not belong to phy, but to USB node. > > This is used by the driver to set a bit during phy init. Hence > have it as a replication of the USB node's entry. If this is not > permissible, is there some way to get this from the USB node, > or any other alternative mechanism? Shouldn't USB controller choose what type of PHY type it wants? > >>> + >>> +additionalProperties: false >>> + >>> +examples: >>> + - | >>> + #include <dt-bindings/clock/qcom,ipq5332-gcc.h> >>> + hs_m31phy_0: hs_m31phy@5b00 { >> >> Node names should be generic. See also explanation and list of examples >> in DT specification: >> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation >> >> Also, no underscores in node names. > > Will change this as usbphy0:hs_m31phy@7b000 This does not solve my comments. I did not write "label" but "node name". Best regards, Krzysztof
On Sat, Jun 17, 2023 at 10:48:41AM +0200, Krzysztof Kozlowski wrote: > On 15/06/2023 07:27, Varadarajan Narayanan wrote: > >>> + - enum: > >>> + - qcom,m31-usb-hsphy > >> > >> I am confused what's this. If m31 is coming from some IP block provider, > >> then you are using wrong vendor prefix. > >> https://www.m31tech.com/download_file/M31_USB.pdf > >> > >> > >>> + - qcom,ipq5332-m31-usb-hsphy > >> > >> This confuses me even more. IPQ m31? > > > > Will change this to m31,usb-hsphy and m31,ipq5332-usb-hsphy respectively. > > Will that be acceptable? > > m31,ipq5332 seems wrong, as m31 did not create ipq5332. Does the m31 > device have some name/version/model? If it is not really known, then I > would just propose to go with qcom,ipq5332-usb-hsphy. > > Skip generic compatible ("usb-hsphy") entirely. Ok. > And then we have... existing bindings qcom,usb-hs-phy.yaml. Don't create > something similar with difference in the hyphen. Just use device > specific compatible thus device specific filename. qcom,usb-hs-phy.yaml seems to be for ULPI mode phy and the driver we are introducing is for UTMI. We would have to modify phy-qcom-usb-hs.c to accomodate M31. Will that be acceptable to phy-qcom-usb-hs.c owners/maintainers? > >>> + > >>> + reg: > >>> + description: > >>> + Offset and length of the M31 PHY register set > >> > >> Drop description, obvious. > > > > Ok. > > > >>> + maxItems: 2 > >>> + > >>> + reg-names: > >>> + items: > >>> + - const: m31usb_phy_base > >>> + - const: qscratch_base > >> > >> Drop "_base" from both. > > > > Ok. Will drop qscratch_base. This is in the controller space. > > Should not come here. > > Then drop reg-names entirely. Ok. > >>> + > >>> + phy_type: > >>> + oneOf: > >>> + - items: > >>> + - enum: > >>> + - utmi > >>> + - ulpi > >> > >> This does not belong to phy, but to USB node. > > > > This is used by the driver to set a bit during phy init. Hence > > have it as a replication of the USB node's entry. If this is not > > permissible, is there some way to get this from the USB node, > > or any other alternative mechanism? > > Shouldn't USB controller choose what type of PHY type it wants? Will remove this. IPQ5332 uses it in UTMI mode only. > >>> + > >>> +additionalProperties: false > >>> + > >>> +examples: > >>> + - | > >>> + #include <dt-bindings/clock/qcom,ipq5332-gcc.h> > >>> + hs_m31phy_0: hs_m31phy@5b00 { > >> > >> Node names should be generic. See also explanation and list of examples > >> in DT specification: > >> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > >> > >> Also, no underscores in node names. > > > > Will change this as usbphy0:hs_m31phy@7b000 > > This does not solve my comments. I did not write "label" but "node name". Sorry. will fix it. Thanks Varada
On 20/06/2023 11:32, Varadarajan Narayanan wrote: > >> And then we have... existing bindings qcom,usb-hs-phy.yaml. Don't create >> something similar with difference in the hyphen. Just use device >> specific compatible thus device specific filename. > > qcom,usb-hs-phy.yaml seems to be for ULPI mode phy and the > driver we are introducing is for UTMI. We would have to > modify phy-qcom-usb-hs.c to accomodate M31. Will that be > acceptable to phy-qcom-usb-hs.c owners/maintainers? We don't talk about drivers here but bindings. Why would you need to modify the driver when introducing new binding for different device? Best regards, Krzysztof
On Wed, Jun 21, 2023 at 10:43:38AM +0200, Krzysztof Kozlowski wrote: > On 20/06/2023 11:32, Varadarajan Narayanan wrote: > > > > >> And then we have... existing bindings qcom,usb-hs-phy.yaml. Don't create > >> something similar with difference in the hyphen. Just use device > >> specific compatible thus device specific filename. > > > > qcom,usb-hs-phy.yaml seems to be for ULPI mode phy and the > > driver we are introducing is for UTMI. We would have to > > modify phy-qcom-usb-hs.c to accomodate M31. Will that be > > acceptable to phy-qcom-usb-hs.c owners/maintainers? > > We don't talk about drivers here but bindings. Why would you need to > modify the driver when introducing new binding for different device? Sorry. I misunderstood your feedback as "use the existing bindings". Will name the bindings file as qcom,ipq5332-usb-hsphy.yaml and post the next version. Thanks Varada
diff --git a/Documentation/devicetree/bindings/phy/qcom,m31.yaml b/Documentation/devicetree/bindings/phy/qcom,m31.yaml new file mode 100644 index 0000000..8ad4ba4 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/qcom,m31.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,m31.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm M31 USB PHY + +maintainers: + - Sricharan Ramabadhran <quic_srichara@quicinc.com> + - Varadarajan Narayanan <quic_varada@quicinc.org> + +description: + This file contains documentation for the USB M31 PHY found in Qualcomm + IPQ5018, IPQ5332 SoCs. + +properties: + compatible: + oneOf: + - items: + - enum: + - qcom,m31-usb-hsphy + - qcom,ipq5332-m31-usb-hsphy + + reg: + description: + Offset and length of the M31 PHY register set + maxItems: 2 + + reg-names: + items: + - const: m31usb_phy_base + - const: qscratch_base + + phy_type: + oneOf: + - items: + - enum: + - utmi + - ulpi + + resets: + maxItems: 1 + description: + List of phandles and reset pairs, one for each entry in reset-names. + + reset-names: + items: + - const: + usb2_phy_reset + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/qcom,ipq5332-gcc.h> + hs_m31phy_0: hs_m31phy@5b00 { + compatible = "qcom,m31-usb-hsphy"; + reg = <0x5b000 0x3000>, + <0x08af8800 0x400>; + reg-names = "m31usb_phy_base", + "qscratch_base"; + phy_type = "utmi"; + resets = <&gcc GCC_QUSB2_0_PHY_BCR>; + reset-names = "usb2_phy_reset"; + + status = "ok"; + };