From patchwork Sun Feb 25 12:03:48 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: 776427 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B80912B6C; Sun, 25 Feb 2024 12:04:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708862643; cv=none; b=HprROPRi0BN5EDuUZ5WKIKYgCMqPKK+MNbUH98E6bDSRTikHKbFCmXumICSHDebwUNI9wKxPpdCAse7q/lYU7nNFtrh2/IQSKCPKyaKODpgE3bOmq+ethba/MpxGYaPk0r4XeKlS712Gmup28L/6TlgvZSKVAjteBGfSnCOkVC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708862643; c=relaxed/simple; bh=G8ub14H/UFjsvGpsnX+JxTo4g+Xp7Uh6sxopc63ZR5Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XF9G3R2RnKXtfdiYaQbgZWihdE/hFdYV6WltElLBOfWZY5fETdFGsluc/9VrLnvMuzxnVaKx4aUm9mhv5H9dzoiUQSuPA7HeX/5KA8/7i7/KnIT+5hdu5IIbZ7RfdN8v5O8QYs9yG3X/+7PLp8sUbdM0gZpCXphpw7/MpPH5efw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LZeTwsNu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LZeTwsNu" Received: by smtp.kernel.org (Postfix) with ESMTPS id 64D1BC433C7; Sun, 25 Feb 2024 12:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708862643; bh=G8ub14H/UFjsvGpsnX+JxTo4g+Xp7Uh6sxopc63ZR5Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=LZeTwsNufN1cu92JPfd363vX0VP0Kj/WRJTwEYWo/W+WXISH9ehnPQz8flgqT4MbA wWNdu1483wxFCu/mCIMazflXiggyiuIjJzLz/RyYTUkBJjUVKOugLO1ur/dZH5q1Q5 /9+mx9VJx2ZX/o7hl3O55mbuaaE/nlsImrN9/tgYPqn+AWTeg/mhVqRYTtiS1nNI1Y R+JUEyQdOHYN0B1M3WxhVdccqgo0Qlyi6Zi74AvMSZYeTKBfhuFT7kgZ2ECiR09FVK qLrIo4P0JJDh2NMKUCaNleny6jB1qDokzN9pdnxWQpnr3EOD43j5pt1CILAiJ6YKVv 1MgFwtUwbI+jQ== 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 43DF4C54E41; Sun, 25 Feb 2024 12:04:03 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Sun, 25 Feb 2024 20:03:48 +0800 Subject: [PATCH v4 1/2] dt-bindings: usb: add hisilicon,hi3798mv200-dwc3 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240225-dwc3-v4-1-8c1fd6c6f615@outlook.com> References: <20240225-dwc3-v4-0-8c1fd6c6f615@outlook.com> In-Reply-To: <20240225-dwc3-v4-0-8c1fd6c6f615@outlook.com> To: Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen , Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708862628; l=3124; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=TbIIsLb8wqVTCtqqeG/liaxRoSs/eRWYcg7QPbnIgSo=; b=tVwGmT7az1FU3fbwJTBcEWSw9tsPGkJZ+u6uN1rLKxH6Ie+oZJ42eYFoB68jNUI+cvIaRbx38 11Qz04FPRFKBwLk57nRugFHWTewUrNoftNUIWUrecM72qd1H+Bwnu50 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 Reply-To: From: Yang Xiwen Document the DWC3 controller used by Hi3798MV200. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Yang Xiwen --- .../bindings/usb/hisilicon,hi3798mv200-dwc3.yaml | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.yaml b/Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.yaml new file mode 100644 index 000000000000..f3011694393d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/hisilicon,hi3798mv200-dwc3.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/hisilicon,hi3798mv200-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiSilicon Hi3798MV200 DWC3 USB SoC controller + +maintainers: + - Yang Xiwen + +properties: + compatible: + const: hisilicon,hi3798mv200-dwc3 + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + + ranges: true + + clocks: + items: + - description: Controller bus clock + - description: Controller suspend clock + - description: Controller reference clock + - description: Controller gm clock + - description: Controller gs clock + - description: Controller utmi clock + - description: Controller pipe clock + + clock-names: + items: + - const: bus + - const: suspend + - const: ref + - const: gm + - const: gs + - const: utmi + - const: pipe + + resets: + maxItems: 1 + + reset-names: + const: soft + +patternProperties: + '^usb@[0-9a-f]+$': + $ref: snps,dwc3.yaml# + +required: + - compatible + - ranges + - '#address-cells' + - '#size-cells' + - clocks + - clock-names + - resets + - reset-names + +additionalProperties: false + +examples: + - | + #include + + usb { + compatible = "hisilicon,hi3798mv200-dwc3"; + ranges; + #address-cells = <1>; + #size-cells = <1>; + clocks = <&clk_bus>, + <&clk_suspend>, + <&clk_ref>, + <&clk_gm>, + <&clk_gs>, + <&clk_utmi>, + <&clk_pipe>; + clock-names = "bus", "suspend", "ref", "gm", "gs", "utmi", "pipe"; + resets = <&crg 0xb0 12>; + reset-names = "soft"; + + usb@98a0000 { + compatible = "snps,dwc3"; + reg = <0x98a0000 0x10000>; + interrupts = ; + clocks = <&clk_bus>, + <&clk_suspend>, + <&clk_ref>; + clock-names = "bus_early", "suspend", "ref"; + phys = <&usb2_phy1_port2>, <&combphy0 0>; + phy-names = "usb2-phy", "usb3-phy"; + maximum-speed = "super-speed"; + dr_mode = "host"; + }; + }; From patchwork Sun Feb 25 12:03:49 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: 775817 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9F5212E47; Sun, 25 Feb 2024 12:04:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708862643; cv=none; b=XYEPW/basY+H3xTP42PVH0EVdhs98x3j2Jv1y/q7qFYFrvhZvBsxRM/a0vRJeVwU/CaIQFwFRmPSM65SaWfBSDcROVZ8sExJL5Ocsbzk7dznl040NwaTrpcu683izDzV1BJyDOSV606OZBlAqo2UnF0Ory6YOzRw0ar15LSp9b8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708862643; c=relaxed/simple; bh=A+X94K8nLPrBsMOn/w5jdCaGJfXT7yw62EcicOP2vgo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LjO3p7NH/bYBzuVmV5P/QGuWzoNG5GVDhWRAAIiByQoO1fSGxy2pwTW/x8Fr5CoRLxUGOzBEK6ykefm7mH2P2sGO5xO88gWGSGn4BauhvsYn3piQWa17OT7UhLD9Io/QEMcBdUqO/cUCRY2NpY+4IYC9tgDTcOIvYZlEGv7X/tg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fYb8dOuQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fYb8dOuQ" Received: by smtp.kernel.org (Postfix) with ESMTPS id 70B0EC43390; Sun, 25 Feb 2024 12:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708862643; bh=A+X94K8nLPrBsMOn/w5jdCaGJfXT7yw62EcicOP2vgo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=fYb8dOuQulxc9W33hGk0+CnBFtpLHEIXsXUnENQNOa38sz4DHex6miv5lnsPS4Syc p5nkXiA+V8iTHx3GxjkNyQahU4l0hkk25wBO4f5J7U3jhoSYTcrCnFO8a82/KkK9Gl 1+d3EfRqKBrv/TDGjnVG8qi6qcCf2BinvNYvIBcWb8fIExsUq8tp+CQmI67YWDMNHW Tn4PjNOawtJ2GVxBULw+pH683maWPW0e+2wxD9CSg9C9GECc4+MadqeIREYNHot7s+ PlnuZXhIyK9yK+r3ISLgepIbKsDly/8KoNmKTjj2wrXanHGxT8D9XYdsXsnREsvxIZ v2Cy08PxJe+Yg== 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 51FC8C54E49; Sun, 25 Feb 2024 12:04:03 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Sun, 25 Feb 2024 20:03:49 +0800 Subject: [PATCH v4 2/2] usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240225-dwc3-v4-2-8c1fd6c6f615@outlook.com> References: <20240225-dwc3-v4-0-8c1fd6c6f615@outlook.com> In-Reply-To: <20240225-dwc3-v4-0-8c1fd6c6f615@outlook.com> To: Thinh Nguyen , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708862628; l=809; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=CsDB1ujYdciRCCnGm2g0rfxKORwEFR6rPwogWA69oCs=; b=PwZtfboAq7YOk3NgbRb4laCVeHt4Rc3146+HViWjMIXMOL5QnQPhJOPq/e41hU2/5DE320UdL deQbRycxI90B2LG1iPh7/W0ZrqAdyKwZenzj5AN3jd104gsLefAZE3v 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 Reply-To: From: Yang Xiwen Hi3798MV200 uses dwc3 controller with a few more clocks and a dedicated resets. Use of_simple driver for it. Signed-off-by: Yang Xiwen --- drivers/usb/dwc3/dwc3-of-simple.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index d1539fc9eabd..158acae08af5 100644 --- a/drivers/usb/dwc3/dwc3-of-simple.c +++ b/drivers/usb/dwc3/dwc3-of-simple.c @@ -173,6 +173,7 @@ static const struct of_device_id of_dwc3_simple_match[] = { { .compatible = "sprd,sc9860-dwc3" }, { .compatible = "allwinner,sun50i-h6-dwc3" }, { .compatible = "hisilicon,hi3670-dwc3" }, + { .compatible = "hisilicon,hi3798mv200-dwc3" }, { .compatible = "intel,keembay-dwc3" }, { /* Sentinel */ } };