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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5836C6FA8F for ; Tue, 29 Aug 2023 16:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mNpWJ5b+VFeRxxHaWi/g8EAF8m1WkAGdSVzGz/ZFzBM=; b=Itd6thdRRFD9p/ mm9GLphTYohF5SMWLGBQ3DAl1YIhivzWNa3UlI57mn9FAm0g+2DlBwAB7p/MnVro+6yxYz72yJoc+ kMbm+xyZM9eebHJi4YtNsi1ZTq5DG7mJeHQ30HxMe7EB1QR/IXSYFP+/35PFRPx5lakOrFq52gtvd deWctHM3TnEwjtdN3UOUY3Je+Wum5pOndl/Fe7slURmdvN3goAfhRrbxRrWLCYcBNkn7zlws8pTUR wxq0t59SYAib1NPNKhnQZxeIFaDwTie/g5RVK+jlQD+4Hk0ZupIyE/Xs3Ah9PnUdhham83TPoVzc/ yynmZP8bCRd8+hzibwfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qb1OX-00BqFq-1K; Tue, 29 Aug 2023 16:16:45 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qb1OU-00BqFU-2i; Tue, 29 Aug 2023 16:16:44 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5376161FE4; Tue, 29 Aug 2023 16:16:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FE50C433C7; Tue, 29 Aug 2023 16:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693325801; bh=qAojA2STHyfw0Fv9cHDM+ZJ3rFLmT5D9fyY8FeUxJ08=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I1no0gQjl1B6jZ4lW88cFiYSW4ij6Dfpt7EoNo/2wnPIFmGfD7Dr4i7QabpuL5JE2 HK1QMHfJCe+tR/aNwLCvlUj/EW4+ogvseulBGIKJx0sycNBoonYXNDZBkNA6RfVL68 DwvcokkvKG2Wqbq1Z5gtW+MhfRRJ7GPM5wdiSe+2ufbebdJ4u7nXGR4GyYrEogNpTD UKNaRsuiUZBTSoqupAKGxoYn0i0pa0A8nMPOWP9IJV9sm3hXTKqA2lTx2zH7l8wStP PSjO670jTsszBrqiVS46aerX+RK1umsfFU/KZOms/RaGw1OSbenZbboetJ4lF1WvKh dtuoBI/xAo4jw== Received: (nullmailer pid 2279862 invoked by uid 1000); Tue, 29 Aug 2023 16:16:38 -0000 Date: Tue, 29 Aug 2023 11:16:38 -0500 From: Rob Herring To: Praveenkumar I Cc: robert.marko@sartura.hr, luka.perkov@sartura.hr, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, vkoul@kernel.org, kishon@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, gregkh@linuxfoundation.org, catalin.marinas@arm.com, will@kernel.org, p.zabel@pengutronix.de, arnd@arndb.de, geert+renesas@glider.be, nfraprado@collabora.com, rafal@milecki.pl, peng.fan@nxp.com, 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, quic_varada@quicinc.com Subject: Re: [PATCH 4/9] dt-bindings: phy: qcom,uniphy: Add ipq5332 USB3 SS UNIPHY Message-ID: <20230829161638.GA2274047-robh@kernel.org> References: <20230829135818.2219438-1-quic_ipkumar@quicinc.com> <20230829135818.2219438-5-quic_ipkumar@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230829135818.2219438-5-quic_ipkumar@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230829_091642_966549_39C1A833 X-CRM114-Status: GOOD ( 19.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Aug 29, 2023 at 07:28:13PM +0530, Praveenkumar I wrote: > Add ipq5332 USB3 SS UNIPHY support. > > Signed-off-by: Praveenkumar I > --- > .../devicetree/bindings/phy/qcom,uniphy.yaml | 117 +++++++++++++++++- > 1 file changed, 114 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/phy/qcom,uniphy.yaml b/Documentation/devicetree/bindings/phy/qcom,uniphy.yaml > index cbe2cc820009..17ba661b3d9b 100644 > --- a/Documentation/devicetree/bindings/phy/qcom,uniphy.yaml > +++ b/Documentation/devicetree/bindings/phy/qcom,uniphy.yaml > @@ -19,21 +19,53 @@ properties: > enum: > - qcom,usb-ss-ipq4019-phy > - qcom,usb-hs-ipq4019-phy > + - qcom,ipq5332-usb-ssphy > > reg: > maxItems: 1 > > + reg-names: > + items: > + - const: phy_base > + > + clocks: > + maxItems: 3 > + > + clock-names: > + maxItems: 3 > + > + "#clock-cells": > + const: 0 > + > resets: > + minItems: 1 > maxItems: 2 > > reset-names: > - items: > - - const: por_rst > - - const: srif_rst No need to remove this and duplicate the names multiple times. Just add 'minItems: 1' here and then the if/then schemas only need either minItems or maxItems. > + minItems: 1 > + maxItems: 2 > + > + clock-output-names: > + maxItems: 1 > > "#phy-cells": > const: 0 > > + qcom,phy-mux-sel: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: > + PHY Mux Selection for used to select which interface is going to use the > + combo PHY. > + items: > + - items: > + - description: phandle to TCSR syscon region > + - description: offset to the PHY Mux selection register > + - description: value to write on the PHY Mux selection register > + > + vdd-supply: > + description: > + Phandle to 5V regulator supply to PHY digital circuit. > + > required: > - compatible > - reg > @@ -41,6 +73,68 @@ required: > - reset-names > - "#phy-cells" > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,ipq5332-usb-ssphy > + then: > + properties: > + clocks: > + maxItems: 3 > + clock-names: > + items: > + - const: pipe > + - const: phy_cfg_ahb > + - const: phy_ahb How do the other variants work without any clocks? Magic? Define the names in the top level and then just set the number of items or disallow the property in the if/then schemas. > + > + "#clock-cells": > + const: 0 > + > + clock-output-names: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + reset-names: > + items: > + - const: por_rst > + > + vdda-supply: > + description: > + Phandle to 5V regulator supply to PHY digital circuit. > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,usb-ss-ipq4019-phy > + then: > + properties: > + resets: > + maxItems: 1 > + reset-names: > + items: > + - const: por_rst > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,usb-hs-ipq4019-phy > + then: > + properties: > + resets: > + maxItems: 2 > + reset-names: > + items: > + - const: por_rst > + - const: srif_rst > + > additionalProperties: false > > examples: > @@ -55,3 +149,20 @@ examples: > <&gcc USB2_HSPHY_S_ARES>; > reset-names = "por_rst", "srif_rst"; > }; > + > + - | > + #include > + > + ssuniphy@4b0000 { > + #phy-cells = <0>; > + #clock-cells = <0>; > + compatible = "qcom,ipq5332-usb-ssphy"; > + reg = <0x4b0000 0x800>; > + clocks = <&gcc GCC_USB0_PIPE_CLK>, > + <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, > + <&gcc GCC_PCIE3X1_PHY_AHB_CLK>; > + clock-names = "pipe", "phy_cfg_ahb", "phy_ahb"; > + > + resets = <&gcc GCC_USB0_PHY_BCR>; > + reset-names = "por_rst"; > + }; > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel