From patchwork Mon Feb 19 21:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 13563115 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 CAFACC48BC3 for ; Mon, 19 Feb 2024 21:28:03 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y5Lij5ksDglIOh8yx/O7tP4SjFmQewLZv/EdtJUVXm4=; b=XiLTJuhxI7jViO rdLYOaLHB+qADSp/YC4/VBPT4pAGnHRgJiWXHpjNtDWHYy07C4wUfkRW8M1pXXCQriB5Bnf323+Nr orm9/0ArqVV02+qGe1M65/Lkpqf0ndjzb9jylWLerEKuNzhbD3OqPt+3of1n9S0f4hTSyZoTxt5jU tbfCuCqv0siDDVQe+YfJCaHDj85uRJJpfqiAyJ3zwov1cIHBq+LiKOWfODGlQziU3TRJeSWlLMEMW Wu3/2KUeLunywCYE4m95esRGHwIMvugqzeqINX5aYpzEv56QmvMefVvK1d5FgffQg3uhRwVUm2BYE 8PMrjubEuKLsQxSoLaKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBD-0000000CE7h-1khy; Mon, 19 Feb 2024 21:28:03 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBA-0000000CE4N-1U55 for linux-phy@lists.infradead.org; Mon, 19 Feb 2024 21:28:01 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A720C60FB0; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 36231C433C7; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708378079; bh=mxN1ZkEXW2mgTzfWWUyIZjDudn+fs3HVQgmWVyZDq4A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Y2QOFmIRHjyFbPkJMUN51fXL0P40hmihbedRpirrjAD3xk7igcPVnvCqOgPId1JVK LzRLk3KL1xOd0nLHmdLeuB673w5QCtnUgzWsJCk8cwl4C3iqmHcwbThPIRsVICe8Dl MkB+b9fM7JYVXO4oSYMjIALtwmNWq7WNFQl94t+Q7YZt6GRfTQ0qkf8+xFXd+K4Zqk ib2vZiYIDPw1ppwISvyVIGmP6DUWzc4dt4uVEnEDM2aoGt5CsEZWSi2np8O5xPQ3rK P7n0PuiIG1oqvXOKmhNcVwryCW9VNo8qgu9aPI4146oY5YaQDtzdNBkkWTI2er6DW2 DHXO6ixZQcmMA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15D63C48BF8; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 20 Feb 2024 05:27:58 +0800 Subject: [PATCH RFC v3 1/5] dt-bindings: phy: hisi-inno-usb2: convert to YAML MIME-Version: 1.0 Message-Id: <20240220-inno-phy-v3-1-893cdf8633b4@outlook.com> References: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> In-Reply-To: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jiancheng Xue , Shawn Guo , Philipp Zabel Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , David Yang , Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708378078; l=5498; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=U6z/RQ0uF+ViR2t96pmwIWGjVhr4jNGIoMn6+B3Bm2E=; b=E5hi8gD7t05khy6nno5iubPtNEc5E3qKveeyoqOyV7D+B/Bnny83UrvRJVgHrakxYcTMKO4j2 TAIcn+qUQNRBiledFodaXR778qj8Zk5EJf3bKAYV+NlgJvttEPEvwxS X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_132800_544249_A091359E X-CRM114-Status: GOOD ( 13.82 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: forbidden405@outlook.com Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Yang Xiwen Add missing compatible "hisilicon,hi3798mv100-usb2-phy" to compatible list due to prior driver change. Also rename to hisilicon,inno-usb2-phy.yaml and add this name to compatible lists. Fixes: 3940ffc65492 ("phy: hisilicon: Add inno-usb2-phy driver for Hi3798MV100") Signed-off-by: Yang Xiwen --- .../bindings/phy/hisilicon,inno-usb2-phy.yaml | 95 ++++++++++++++++++++++ .../devicetree/bindings/phy/phy-hisi-inno-usb2.txt | 71 ---------------- 2 files changed, 95 insertions(+), 71 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml new file mode 100644 index 000000000000..1b57e0396209 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/hisilicon,inno-usb2-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiSilicon HiSTB SoCs INNO USB2 PHY device + +maintainers: + - Yang Xiwen + +properties: + compatible: + items: + - enum: + - hisilicon,hi3798cv200-usb2-phy + - hisilicon,hi3798mv100-usb2-phy + - const: hisilicon,inno-usb2-phy + + reg: + maxItems: 1 + description: Should be the address space for PHY configuration register in + peripheral controller, e.g. PERI_USB0 for USB 2.0 PHY01 on Hi3798CV200 SoC, + or direct MMIO address space. + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + clocks: + maxItems: 1 + description: reference clock + + resets: + maxItems: 1 + +patternProperties: + 'phy@[0-9a-f]+': + type: object + additionalProperties: false + description: individual ports provided by INNO PHY + + properties: + reg: + maxItems: 1 + descrption: should be the port index (if under a perictrl node) + or port address space + + '#phy-cells': + const: 0 + + resets: + maxItems: 1 + + required: + - reg + - '#phy-cells' + - resets + +required: + - compatible + - clocks + - reg + - '#address-cells' + - '#size-cells' + - resets + +additionalProperties: false + +examples: + - | + #include + + usb2-phy@120 { + compatible = "hisilicon,hi3798cv200-usb2-phy", "hisilicon,inno-usb2-phy"; + reg = <0x120 0x4>; + clocks = <&crg HISTB_USB2_PHY1_REF_CLK>; + resets = <&crg 0xbc 4>; + #address-cells = <1>; + #size-cells = <0>; + + phy@0 { + reg = <0>; + #phy-cells = <0>; + resets = <&crg 0xbc 8>; + }; + + phy@1 { + reg = <1>; + #phy-cells = <0>; + resets = <&crg 0xbc 9>; + }; + }; diff --git a/Documentation/devicetree/bindings/phy/phy-hisi-inno-usb2.txt b/Documentation/devicetree/bindings/phy/phy-hisi-inno-usb2.txt deleted file mode 100644 index 104953e849e7..000000000000 --- a/Documentation/devicetree/bindings/phy/phy-hisi-inno-usb2.txt +++ /dev/null @@ -1,71 +0,0 @@ -Device tree bindings for HiSilicon INNO USB2 PHY - -Required properties: -- compatible: Should be one of the following strings: - "hisilicon,inno-usb2-phy", - "hisilicon,hi3798cv200-usb2-phy". -- reg: Should be the address space for PHY configuration register in peripheral - controller, e.g. PERI_USB0 for USB 2.0 PHY01 on Hi3798CV200 SoC. -- clocks: The phandle and clock specifier pair for INNO USB2 PHY device - reference clock. -- resets: The phandle and reset specifier pair for INNO USB2 PHY device reset - signal. -- #address-cells: Must be 1. -- #size-cells: Must be 0. - -The INNO USB2 PHY device should be a child node of peripheral controller that -contains the PHY configuration register, and each device supports up to 2 PHY -ports which are represented as child nodes of INNO USB2 PHY device. - -Required properties for PHY port node: -- reg: The PHY port instance number. -- #phy-cells: Defined by generic PHY bindings. Must be 0. -- resets: The phandle and reset specifier pair for PHY port reset signal. - -Refer to phy/phy-bindings.txt for the generic PHY binding properties - -Example: - -perictrl: peripheral-controller@8a20000 { - compatible = "hisilicon,hi3798cv200-perictrl", "simple-mfd"; - reg = <0x8a20000 0x1000>; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x8a20000 0x1000>; - - usb2_phy1: usb2-phy@120 { - compatible = "hisilicon,hi3798cv200-usb2-phy"; - reg = <0x120 0x4>; - clocks = <&crg HISTB_USB2_PHY1_REF_CLK>; - resets = <&crg 0xbc 4>; - #address-cells = <1>; - #size-cells = <0>; - - usb2_phy1_port0: phy@0 { - reg = <0>; - #phy-cells = <0>; - resets = <&crg 0xbc 8>; - }; - - usb2_phy1_port1: phy@1 { - reg = <1>; - #phy-cells = <0>; - resets = <&crg 0xbc 9>; - }; - }; - - usb2_phy2: usb2-phy@124 { - compatible = "hisilicon,hi3798cv200-usb2-phy"; - reg = <0x124 0x4>; - clocks = <&crg HISTB_USB2_PHY2_REF_CLK>; - resets = <&crg 0xbc 6>; - #address-cells = <1>; - #size-cells = <0>; - - usb2_phy2_port0: phy@0 { - reg = <0>; - #phy-cells = <0>; - resets = <&crg 0xbc 10>; - }; - }; -}; From patchwork Mon Feb 19 21:27:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 13563116 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 34AFDC48BF8 for ; Mon, 19 Feb 2024 21:28:05 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AgHyb6Fm8qsmB2oWPRK2Ve/SUghRayrIEX8ycvNWXHk=; b=KeDk/kHzQBQzVo MxfxbabhGVjvOIHz0oNW0xxFozBwvq1O5nJhoTnRxivcMVAQ4oqaqCsiZj3WJYlqax3hDe8llVvf8 V3bHlx+/LQJhlIe91BFTxSx2yJeRY5yhUfnfPiHzD3aymtvME25Ox4pJDMBjbeQmCt1hq1kfuwyFD BYTdE9F0LreDpYWp+U1EHhTmdb5NEAcTaU7CapRg1j0qDxdO9pZwDS2fF5ox++9bm4kRu9QbmAnLo ljHIWWZ7AqLAVYMAftlbhIVR6MB3bNYnVBu6bYYozKYA/L8IEagVSrFeQHYsEI8OjIGS1blSQckZJ 6Lzt5Lh1dAU/adPYkO0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBE-0000000CE8O-3cmt; Mon, 19 Feb 2024 21:28:04 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBB-0000000CE4U-05AP for linux-phy@lists.infradead.org; Mon, 19 Feb 2024 21:28:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 512DF60FC9; Mon, 19 Feb 2024 21:28:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 49721C43394; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708378079; bh=QALXNb0onLycYsgMBD77sidxYNcSFWXNGDA/ZI2hTFs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=WY+2cyF8KbO2esqkK//upSklFy9fdKQNieae1c1W9+bw4JoGjAS1Xg2K4nBdNCzkz Obnv5wb0aayVQmSqJmSB2atMUJPeojRc34aMUResDLnoQztvs0YgqdPfg3acqz5YRH FbbBxzdBmL9KA7wTzIoZOslS67VSwuIsvNJQEIQqpFp+anBkNDAVDbgawEALIbAKpQ 54qGzvgo7mDwJ2WNOxHSwFdQnPiKCYLQaXiVbC4zbQDKUd1JElBKhxNnOs1quZiT07 ss03Z2oEsFVkeNHAqcAaO9pU/pssbGv+omExgR+7IVq97B/fZzPjWlwRf2Mb8DcW5E stRXe4YextrJA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28650C54787; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 20 Feb 2024 05:27:59 +0800 Subject: [PATCH RFC v3 2/5] arm64: dts: hi3798cv200: add hisilicon,inno-usb2-phy to compatible list MIME-Version: 1.0 Message-Id: <20240220-inno-phy-v3-2-893cdf8633b4@outlook.com> References: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> In-Reply-To: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jiancheng Xue , Shawn Guo , Philipp Zabel Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , David Yang , Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708378078; l=1213; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=9vJGt8Ea6nDd4110Luo3uNaofm3Nie+YLh4/3aqzgKY=; b=G6dwipOzO7tIAyQn4WvhzD9c9rqV9ps0/6dGeA76lSMJBMrT0dJH/JkirMdy8SIQDVSc+ggtB y70Sgiw1jlyAAwqIqcwJKTAco24oWGn7DDyAwaasUOTGA/spqPteT2+ X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_132801_143998_DA7ED2EF X-CRM114-Status: UNSURE ( 8.12 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: forbidden405@outlook.com Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Yang Xiwen This is required due to recent binding changes. Signed-off-by: Yang Xiwen --- arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi index ed1b5a7a6067..268d57eabce7 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi @@ -114,7 +114,8 @@ perictrl: peripheral-controller@8a20000 { ranges = <0x0 0x8a20000 0x1000>; usb2_phy1: usb2_phy@120 { - compatible = "hisilicon,hi3798cv200-usb2-phy"; + compatible = "hisilicon,hi3798cv200-usb2-phy", + "hisilicon,inno-usb2-phy"; reg = <0x120 0x4>; clocks = <&crg HISTB_USB2_PHY1_REF_CLK>; resets = <&crg 0xbc 4>; @@ -135,7 +136,8 @@ usb2_phy1_port1: phy@1 { }; usb2_phy2: usb2_phy@124 { - compatible = "hisilicon,hi3798cv200-usb2-phy"; + compatible = "hisilicon,hi3798cv200-usb2-phy", + "hisilicon,inno-usb2-phy"; reg = <0x124 0x4>; clocks = <&crg HISTB_USB2_PHY2_REF_CLK>; resets = <&crg 0xbc 6>; From patchwork Mon Feb 19 21:28:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 13563119 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 45338C48BF8 for ; Mon, 19 Feb 2024 21:28:08 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5CqrOjn+r2NL3/5DXc98kummx46ciD+kgKSPPuXJWKk=; b=TKAIfWS6aqZStF AKw3DgWQCM38FwSefFJ5tQSEKGoxY2p8C5ug7F3E1dNFOytu/iJq9RHwaEU9ISI1z/4zjWjxgZGGq 4ozLMkLLZg4QxXVXGCviT1F+hAQC2AJ0zxT2XBhmTREi1iJfd0f340BYYofHb+foU+b0xMef6a/eP p2otjZ895g7ySOL+RWf7O98jyb1vztCg6K9J1oi7TXJoF5XaS6tHtEY9osOOtoK1sLVr5e2OH5P8k XiCRu5o11Pa0on2AguFUZfnu4utzLYrj59WNmwWyesNNfGS7gXn5VEbGvg2E2k7HOqJRvkGcTmMTJ EV5KV6xWc9KMrDVjNldw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBH-0000000CE9q-3g3F; Mon, 19 Feb 2024 21:28:07 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBC-0000000CE55-3Fl8 for linux-phy@lists.infradead.org; Mon, 19 Feb 2024 21:28:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id F073BCE1720; Mon, 19 Feb 2024 21:28:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 58CAFC433A6; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708378079; bh=esSfqR/EN2uGgQJhZInB3gQ5IgggyIpQkCwvAPI4KIE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=YbPciEzKQMYE7noRsTetjNj3S9+k7Ik1GeacWOOuS+ThMtoaO1ZkflWACao+7rYih gCHfwLLmHNN/b/6Ycu7whZhRHunuj5/m+hk0VxA6ClSAsqb9hwclvPSlBly+QPqG38 72KrvgDKyBiBzzbiUSeeaErXXsllCTohfyAq4+oW+JbAw+LmZlVvDe4aHvyVZn/QV4 sVsocx6VN0a+cYLAA4RfUOm6eu6f1QhMUSrTVRjLZDnTnn95k2+89H9npeFfBydnzY xmqvx0EC4HkrIEiFdQOpBe39nsrMEI/tbY97N4j0XKAhqMlxOfOwIDtxhxNFsscDyv 87YumtHsIvzxQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3594DC5478A; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 20 Feb 2024 05:28:00 +0800 Subject: [PATCH RFC v3 3/5] phy: hisilicon: hisi-inno-phy: enable clocks for every ports MIME-Version: 1.0 Message-Id: <20240220-inno-phy-v3-3-893cdf8633b4@outlook.com> References: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> In-Reply-To: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jiancheng Xue , Shawn Guo , Philipp Zabel Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , David Yang , Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708378078; l=971; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=jGUbESXsyAvU27nkXjLoTOKtwqcjOT068eM8RNJCWfs=; b=zs3Pye2H9yxnBHI/KFOaUXuqr2aivy0VIlFkP7na/Xbw3rIoaMubBcpeDNsVhE3207LPYz72J c2VRW0Hg+5MCQr8XwdaAjcx1MiDv9f2A/+Fv+yagKFNF/ujcU467b1S X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_132803_034909_DD24DC76 X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: forbidden405@outlook.com Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Yang Xiwen This is needed for port1 to work. Fixes: ba8b0ee81fbb ("phy: add inno-usb2-phy driver for hi3798cv200 SoC") Signed-off-by: Yang Xiwen --- drivers/phy/hisilicon/phy-hisi-inno-usb2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c index c138cd4807d6..b7e740eb4752 100644 --- a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c +++ b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c @@ -86,8 +86,10 @@ static void hisi_inno_phy_write_reg(struct hisi_inno_phy_priv *priv, static void hisi_inno_phy_setup(struct hisi_inno_phy_priv *priv) { + int i; /* The phy clk is controlled by the port0 register 0x06. */ - hisi_inno_phy_write_reg(priv, 0, 0x06, PHY_CLK_ENABLE); + for (i = 0; i < INNO_PHY_PORT_NUM; i++) + hisi_inno_phy_write_reg(priv, i, 0x06, PHY_CLK_ENABLE); msleep(PHY_CLK_STABLE_TIME); } From patchwork Mon Feb 19 21:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 13563120 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 7E21FC54787 for ; Mon, 19 Feb 2024 21:28:08 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/URnU3c1QUVpIQFum11DnOM7RW9vmImwTM1j18u0f5Q=; b=bVMkrTVnozn92X g1h8CNidSAj2TN13FkGsQOlB+7vZ7gPMhfYUKwTJol8v0EH2PW0IBH34b4lvfor3KYB0Xk25p5vzq EnQsXbnv11SKa70FwwKsFUbOWfzFPmGFCOxzOZCW2hR/lr85yVJ5qpksgE0rPXmZGuSef1SnmEgEc DUEOa5GPWXJmmSDqYu19E/pekJS9lpUWOpj1bkvSakKXLXtMY6wSb46TEN1IGRxJsvULFbRrnH9mq UCwE1YHdMqMLtQs0dS+JOzO6FHaE7/TSnV9K4f4j9EAdE7dBN5LwoO2J8NXMgT4vTiwKxyfWFEUtO H+Neol6A2KkbbESjtInA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBI-0000000CEAM-0mcn; Mon, 19 Feb 2024 21:28:08 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBC-0000000CE59-3Fgj for linux-phy@lists.infradead.org; Mon, 19 Feb 2024 21:28:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 163F6CE1724; Mon, 19 Feb 2024 21:28:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 5D79FC4166A; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708378079; bh=fSZGw8CHrtheqHYmGL9yCRQ6avDh/svcGOMbahUkH18=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=kkotpivV3qBGtd35q7KqBauD+c7x3sscudQ5oB9JtiEVemDmyNadxo0oNnUh1npEc E9HJqgEkQOlchjjTWp+OW4+A6deuOFnu+tETp3SsOqDQYJ8knnsDtOpNvTkVkclr6f KpcwQT/4pYX4SLn3Hp+RdHwne+XU2PqTfwf2sAIAmkGeuQXpb1f1MMhdc5zgDVxo65 gO4qvVa2RyRi8lVhwCVbDdVwsw8Tb9KKZEE4hIvz0In3aqv7SL7E2s6/CldF1xvBOd jUmEGMoZ+HCJNdfk1u8tQ1HaBxiq1IJfRqrs3BGiSqPKQwhEmVRMivMdd4Ge+UAgFH DLuToMwXIjYFA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47607C54788; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 20 Feb 2024 05:28:01 +0800 Subject: [PATCH RFC v3 4/5] phy: hisilicon: hisi-inno-phy: add support for Hi3798MV200 INNO PHY MIME-Version: 1.0 Message-Id: <20240220-inno-phy-v3-4-893cdf8633b4@outlook.com> References: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> In-Reply-To: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jiancheng Xue , Shawn Guo , Philipp Zabel Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , David Yang , Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708378078; l=4896; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=GrCYJatgoRWu7Bx47GQoBXbcdNOq+uSu0U+veti+reE=; b=ou3NyvShEGVdWHjXOWZHUrDCDkQq0AwopgQeh6RbfmD6RJSnEFQ8RhcVdlRIzycIJ7DskzFF8 PmGGLHUwY9oBtCsuDnvrcIQBJRY2W7HhlRxK7ag6YVYY/WSRcVROpGM X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_132803_239597_37240F12 X-CRM114-Status: GOOD ( 15.99 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: forbidden405@outlook.com Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Yang Xiwen Direct MMIO resgiter access is used by Hi3798MV200. For other models, of_iomap() returns 0 due to insufficient length. So they are unaffected. Also Hi3798MV200 INNO PHY has an extra reset required to be deasserted, switch to reset_control_bulk_() APIs to resolve this. Signed-off-by: Yang Xiwen --- drivers/phy/hisilicon/phy-hisi-inno-usb2.c | 65 ++++++++++++++++++------------ 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c index b7e740eb4752..5175e5a351ac 100644 --- a/drivers/phy/hisilicon/phy-hisi-inno-usb2.c +++ b/drivers/phy/hisilicon/phy-hisi-inno-usb2.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -43,6 +44,7 @@ #define PHY_CLK_ENABLE BIT(2) struct hisi_inno_phy_port { + void __iomem *base; struct reset_control *utmi_rst; struct hisi_inno_phy_priv *priv; }; @@ -50,7 +52,7 @@ struct hisi_inno_phy_port { struct hisi_inno_phy_priv { void __iomem *mmio; struct clk *ref_clk; - struct reset_control *por_rst; + struct reset_control *rsts; unsigned int type; struct hisi_inno_phy_port ports[INNO_PHY_PORT_NUM]; }; @@ -62,26 +64,31 @@ static void hisi_inno_phy_write_reg(struct hisi_inno_phy_priv *priv, u32 val; u32 value; - if (priv->type == PHY_TYPE_0) - val = (data & PHY_TEST_DATA) | - ((addr << PHY_TEST_ADDR_OFFSET) & PHY0_TEST_ADDR) | - ((port << PHY0_TEST_PORT_OFFSET) & PHY0_TEST_PORT) | - PHY0_TEST_WREN | PHY0_TEST_RST; - else - val = (data & PHY_TEST_DATA) | - ((addr << PHY_TEST_ADDR_OFFSET) & PHY1_TEST_ADDR) | - ((port << PHY1_TEST_PORT_OFFSET) & PHY1_TEST_PORT) | - PHY1_TEST_WREN | PHY1_TEST_RST; - writel(val, reg); - - value = val; - if (priv->type == PHY_TYPE_0) - value |= PHY0_TEST_CLK; - else - value |= PHY1_TEST_CLK; - writel(value, reg); - - writel(val, reg); + if (priv->ports[port].base) + // stride is 4 + writel(data, (u32 *)priv->ports[port].base + addr); + else { + if (priv->type == PHY_TYPE_0) + val = (data & PHY_TEST_DATA) | + ((addr << PHY_TEST_ADDR_OFFSET) & PHY0_TEST_ADDR) | + ((port << PHY0_TEST_PORT_OFFSET) & PHY0_TEST_PORT) | + PHY0_TEST_WREN | PHY0_TEST_RST; + else + val = (data & PHY_TEST_DATA) | + ((addr << PHY_TEST_ADDR_OFFSET) & PHY1_TEST_ADDR) | + ((port << PHY1_TEST_PORT_OFFSET) & PHY1_TEST_PORT) | + PHY1_TEST_WREN | PHY1_TEST_RST; + writel(val, reg); + + value = val; + if (priv->type == PHY_TYPE_0) + value |= PHY0_TEST_CLK; + else + value |= PHY1_TEST_CLK; + writel(value, reg); + + writel(val, reg); + } } static void hisi_inno_phy_setup(struct hisi_inno_phy_priv *priv) @@ -104,7 +111,7 @@ static int hisi_inno_phy_init(struct phy *phy) return ret; udelay(REF_CLK_STABLE_TIME); - reset_control_deassert(priv->por_rst); + reset_control_deassert(priv->rsts); udelay(POR_RST_COMPLETE_TIME); /* Set up phy registers */ @@ -122,7 +129,7 @@ static int hisi_inno_phy_exit(struct phy *phy) struct hisi_inno_phy_priv *priv = port->priv; reset_control_assert(port->utmi_rst); - reset_control_assert(priv->por_rst); + reset_control_assert(priv->rsts); clk_disable_unprepare(priv->ref_clk); return 0; @@ -158,15 +165,16 @@ static int hisi_inno_phy_probe(struct platform_device *pdev) if (IS_ERR(priv->ref_clk)) return PTR_ERR(priv->ref_clk); - priv->por_rst = devm_reset_control_get_exclusive(dev, NULL); - if (IS_ERR(priv->por_rst)) - return PTR_ERR(priv->por_rst); + priv->rsts = devm_reset_control_array_get(dev, false, false); + if (IS_ERR(priv->rsts)) + return PTR_ERR(priv->rsts); priv->type = (uintptr_t) of_device_get_match_data(dev); for_each_child_of_node(np, child) { struct reset_control *rst; struct phy *phy; + void __iomem *base; rst = of_reset_control_get_exclusive(child, NULL); if (IS_ERR(rst)) { @@ -174,7 +182,10 @@ static int hisi_inno_phy_probe(struct platform_device *pdev) return PTR_ERR(rst); } + base = of_iomap(child, 0); + priv->ports[i].utmi_rst = rst; + priv->ports[i].base = base; priv->ports[i].priv = priv; phy = devm_phy_create(dev, child, &hisi_inno_phy_ops); @@ -205,6 +216,8 @@ static const struct of_device_id hisi_inno_phy_of_match[] = { .data = (void *) PHY_TYPE_0 }, { .compatible = "hisilicon,hi3798mv100-usb2-phy", .data = (void *) PHY_TYPE_1 }, + { .compatible = "hisilicon,hi3798mv200-usb2-phy", + .data = (void *) PHY_TYPE_0 }, { }, }; MODULE_DEVICE_TABLE(of, hisi_inno_phy_of_match); From patchwork Mon Feb 19 21:28:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 13563117 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 9C92DC54787 for ; Mon, 19 Feb 2024 21:28:05 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MKIsvZTrbYZfJXhHoN4NNVNqS3B96/HpjF0tg2X2uAM=; b=LmghsHxll9gGrB jUZLSmMbOTnwCLlwwqp2xMxivW4Byo6a/5t11vw6qy/+gFf704BrgTcU2CeRNQmq2v7AKEcONhrj1 4W7O35p8e5JWjnWjtm6HnuviqhQtslbtz5h+ZRrMRUcYI1ZsEmd3Iguu8CpEvwG4L7aFHEt6C/2+p voHKJAUWgxQad9NWQkEtUPybh/tikXsQNcyLA0vTm5Ii47JP86h7SquHic2iR4iiDuB1y+88eO3yb hO6pb0LcQHpd7YPum0aUJr5SLzwttxUT+zEWI1mNnAKft5+rRHBspWcGR63ulcosWWkMTkED2BzIg voEwFBjNr3RRGdEQU8nA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBF-0000000CE8d-0iQf; Mon, 19 Feb 2024 21:28:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcBBB-0000000CE4e-1Ctq for linux-phy@lists.infradead.org; Mon, 19 Feb 2024 21:28:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B0DFA60FD2; Mon, 19 Feb 2024 21:28:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 6C9C6C4166B; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708378079; bh=bubzY9/Q81Ml7PldAcrUeOkRxvvoWWMJMf+jhZFDA1s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=OcvjZdSXTUQpicinGKWLlKRUdttBhzQoryWSwgH+x/FBTFVIak/f/s8jJacvGs93z 8l+KQT0s9XmzcR7bNeGOci0jOcUP2Yn+qCFoVx77mWH320r23D3cliX+M07XeOFcA6 zqorjNs5D/sivfkdUTb1FCL8Qs1U/7fDPrJEuoFnNgtmXg5099Q1f28We6QtepsLcX YQDUvuW/ql4+akdghsOBhG6dKK/9gpH5/w7MDb5PyIpJTgr8M/slfG/Z+PwGYGFjfw zEiaJ1X6N4rnOhOocp9VgrZ2qyPQ4R81l9NHbDsDQCkKphdg2s4iMgq1KAvW8K0V0f hrPjO8fcOJ3EA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 565A5C48BC3; Mon, 19 Feb 2024 21:27:59 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Tue, 20 Feb 2024 05:28:02 +0800 Subject: [PATCH RFC v3 5/5] dt-bindings: phy: hisi-inno-usb2: add compatible of hisilicon,hi3798mv200-usb2-phy MIME-Version: 1.0 Message-Id: <20240220-inno-phy-v3-5-893cdf8633b4@outlook.com> References: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> In-Reply-To: <20240220-inno-phy-v3-0-893cdf8633b4@outlook.com> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jiancheng Xue , Shawn Guo , Philipp Zabel Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , David Yang , Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708378078; l=2027; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=avj4AQctpHODHrI4Gj2Nnv22VVypJnyWPLnjEGJEEdE=; b=xZ9uDnvgbLGc44UOmznpNLi5rmjnlS/9CKX9jmNtOvRqOBPi6PeuTIZpq5jyKB4Ty1XXjQjBh x660NzaUFhPD8H222qtB1e2SROUGiE+AjJFtRO97Ci2oNfsllIBvmhi X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240219_132801_473561_3476C6C5 X-CRM114-Status: UNSURE ( 8.14 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: forbidden405@outlook.com Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Yang Xiwen It is accessed by direct MMIO, making "ranges" property mandatory for it. Also there is an extra clock for the phy. Signed-off-by: Yang Xiwen --- .../bindings/phy/hisilicon,inno-usb2-phy.yaml | 32 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml index 1b57e0396209..969fd3fb7537 100644 --- a/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/hisilicon,inno-usb2-phy.yaml @@ -15,6 +15,7 @@ properties: - enum: - hisilicon,hi3798cv200-usb2-phy - hisilicon,hi3798mv100-usb2-phy + - hisilicon,hi3798mv200-usb2-phy - const: hisilicon,inno-usb2-phy reg: @@ -23,18 +24,27 @@ properties: peripheral controller, e.g. PERI_USB0 for USB 2.0 PHY01 on Hi3798CV200 SoC, or direct MMIO address space. + ranges: + maxItems: 1 + '#address-cells': const: 1 '#size-cells': - const: 0 + enum: [0, 1] clocks: maxItems: 1 description: reference clock resets: - maxItems: 1 + minItems: 1 + maxItems: 2 + + reset-names: + items: + - const: port + - const: test patternProperties: 'phy@[0-9a-f]+': @@ -54,6 +64,9 @@ patternProperties: resets: maxItems: 1 + phy_type: + const: utmi + required: - reg - '#phy-cells' @@ -67,6 +80,21 @@ required: - '#size-cells' - resets +allOf: + - if: + properties: + compatible: + contains: + const: hisilicon,hi3798mv200-usb2-phy + then: + required: + - ranges + - reset-names + else: + properties: + ranges: false + reset-names: false + additionalProperties: false examples: