From patchwork Wed Dec 15 08:54:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1568094 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=CQJP80Dh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JDTZr5t0vz9sRK for ; Wed, 15 Dec 2021 19:54:44 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240960AbhLOIym (ORCPT ); Wed, 15 Dec 2021 03:54:42 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:52512 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233650AbhLOIyl (ORCPT ); Wed, 15 Dec 2021 03:54:41 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BAFB661852; Wed, 15 Dec 2021 08:54:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D0BFC34605; Wed, 15 Dec 2021 08:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639558480; bh=x4q0tu62o/JYyXjdCl3J5rt+WUYZdMXINBc2PlhIulg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CQJP80DhS4g9u+FM7H5GVi3EqvD1qqZcIK18UkbXWPUX44GV+L2utoVBhZVdu11sI DqWLMwJC5W8aL5Af89Ldp1mBkDwAo+xBFh6qpaXTPuEVQZ+3twf+0GZMdFW7CtehU4 NISLeJCXsoz/5RQC2/xdJBMjeRPGfmsmAeE1wI4CfwoEiG1y6Ev7Zk49ySgp9DlGRC GOU7ACp3V7/oyKE6+itkTOB2HPV0ujovLYxf3MfZVvzZKmwmQfN5zIMSKZlbbaKimU jD/clAjJX3i6bbgW30sskH+AxEmlAtStmv7JUix+diS1YRVE7kRoYjMT7/ZE/ROM25 gN88Q7wLO1WKw== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mxQ3Z-0054Hs-Kj; Wed, 15 Dec 2021 09:54:37 +0100 From: Mauro Carvalho Chehab To: Wei Xu , Rob Herring Cc: Yu Chen , John Stultz , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH RESEND 1/7] dt-bindings: misc: add schema for USB hub on Kirin devices Date: Wed, 15 Dec 2021 09:54:27 +0100 Message-Id: <9c3a3ff59408fcb60f7a5817a6f5d5f3053367fc.1639558366.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Yu Chen This patch adds binding documentation to support USB HUB and USB data role switch of HiSilicon HiKey960 and HiKey970 boards. [mchehab: updated OF schema and added HiKey970 example] Signed-off-by: Yu Chen Signed-off-by: John Stultz Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH RESEND 0/7] at: https://lore.kernel.org/all/cover.1639558366.git.mchehab+huawei@kernel.org/ .../bindings/misc/hisilicon,hikey-usb.yaml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/hisilicon,hikey-usb.yaml diff --git a/Documentation/devicetree/bindings/misc/hisilicon,hikey-usb.yaml b/Documentation/devicetree/bindings/misc/hisilicon,hikey-usb.yaml new file mode 100644 index 000000000000..761ab686121a --- /dev/null +++ b/Documentation/devicetree/bindings/misc/hisilicon,hikey-usb.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019 Linaro Ltd. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/hisilicon,hikey-usb.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiKey960/970 onboard USB GPIO Hub + +maintainers: + - John Stultz + +description: | + Supports the onboard USB GPIO hubs found on HiKey960/970. + Such hubs require a power supply for the USB I/O. Depending on the + exact hub model, after USB I/O is powered up, a reset should be needed. + + It also acts as a role-switch intermediary to detect the state of + the USB-C port, to switch the hub into dual-role USB-C or host mode, + which enables and powers up the onboard USB-A host ports. + + Schematics about such hubs can be found here: + https://github.com/96boards/documentation/raw/master/consumer/hikey/hikey960/hardware-docs/HiKey960_Schematics.pdf + https://www.96boards.org/documentation/consumer/hikey/hikey970/hardware-docs/files/hikey970-schematics.pdf + +properties: + compatible: + enum: + - hisilicon,usbhub + + typec-vbus-gpios: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: phandle to the typec-vbus gpio + + otg-switch-gpios: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: phandle to the otg-switch gpio + + hub-reset-en-gpios: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: phandle to the hub reset gpio + + usb-role-switch: + $ref: /schemas/types.yaml#/definitions/flag + description: Support role switch. + + hub-vdd-supply: + description: regulator for hub power + + port: + description: | + describe hadware connections between USB endpoints. + Two ports are supported: the first being the endpoint that will + be notified by this driver, and the second being the endpoint + that notifies this driver of a role switch. + +required: + - compatible + - hub-vdd-supply + - port + +additionalProperties: false + +examples: + - | + #include + + usb-hub { + compatible = "hisilicon,usbhub"; + typec-vbus-gpios = <&gpio25 2 GPIO_ACTIVE_HIGH>; + otg-switch-gpios = <&gpio25 6 GPIO_ACTIVE_HIGH>; + hub-reset-en-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; + hub-vdd-supply = <&usb_hub_vdd>; + usb-role-switch; + port { + #address-cells = <1>; + #size-cells = <0>; + usb_ep0: endpoint@0 { + reg = <0>; + remote-endpoint = <&dwc3_role_switch>; + }; + usb_ep1: endpoint@1 { + reg = <1>; + remote-endpoint = <&rt1711h_ep>; + }; + }; + }; From patchwork Wed Dec 15 08:54:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1568095 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=USWdZKDx; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JDTZs6g7Dz9sRK for ; Wed, 15 Dec 2021 19:54:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240967AbhLOIyn (ORCPT ); Wed, 15 Dec 2021 03:54:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240953AbhLOIym (ORCPT ); Wed, 15 Dec 2021 03:54:42 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7A2EC061574; Wed, 15 Dec 2021 00:54:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D781B6185C; Wed, 15 Dec 2021 08:54:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23549C34607; Wed, 15 Dec 2021 08:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639558480; bh=3uWa+msGiwZKGxdA7Po3wkfv5+4QJ6nxjTenaF8FRok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=USWdZKDx1bXymhaIFissnrZeGg7PL5smlCMhE+Wc92Nd2+/wMREj2jKC29m4kjeBj 4HUHO4jizi9rvDv8hNEZhvWHAwAVD8gpEMVxn/9LtKT9dVQF5Cb7YjXRWcw2NMzRBE lHX+MeKVnOtzLizRG3doxZ4xWVzi7FtyllIbfqcP2s2FdyvG4ORnPS9eFmCRrVXJQK GnM+uqLxgk5rdX8hqQuPLdhvQRixOXMlb6lmpzhMU0WPLsJWisKJ3X4FvKWu1+eZ32 jxIyNIeDCS28P2Qpt81Riw+IGyvlmRdH0UTZerP4Pen0OALAWGOCCzCtsLgDfvz6KD 3ryor3WScbnaQ== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mxQ3Z-0054Hv-Ln; Wed, 15 Dec 2021 09:54:37 +0100 From: Mauro Carvalho Chehab To: Wei Xu , Rob Herring Cc: Mauro Carvalho Chehab , Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 2/7] dt-bindings: clock: hi3670-clock.txt: add pmctrl compatible Date: Wed, 15 Dec 2021 09:54:28 +0100 Message-Id: <3bbfdbd02eea5af71cb37b525be330c864395285.1639558366.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a compatible for the Power Management domain controller, which is needed in order to control power for the PCI devices on HiKey 970. Signed-off-by: Mauro Carvalho Chehab Acked-by: Rob Herring --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH RESEND 0/7] at: https://lore.kernel.org/all/cover.1639558366.git.mchehab+huawei@kernel.org/ Documentation/devicetree/bindings/clock/hi3670-clock.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/clock/hi3670-clock.txt b/Documentation/devicetree/bindings/clock/hi3670-clock.txt index 66f3697eca78..8e9f12a3ba5b 100644 --- a/Documentation/devicetree/bindings/clock/hi3670-clock.txt +++ b/Documentation/devicetree/bindings/clock/hi3670-clock.txt @@ -15,6 +15,7 @@ Required Properties: - "hisilicon,hi3670-iomcu" - "hisilicon,hi3670-media1-crg" - "hisilicon,hi3670-media2-crg" + - "hisilicon,hi3670-pmctrl" - reg: physical base address of the controller and length of memory mapped region. From patchwork Wed Dec 15 08:54:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1568096 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=YePux2nW; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JDTZx4yrtz9sRK for ; Wed, 15 Dec 2021 19:54:49 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240995AbhLOIyr (ORCPT ); Wed, 15 Dec 2021 03:54:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240966AbhLOIyn (ORCPT ); Wed, 15 Dec 2021 03:54:43 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 554D8C06173E; Wed, 15 Dec 2021 00:54:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 07090B81EB8; Wed, 15 Dec 2021 08:54:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E48CC3460C; Wed, 15 Dec 2021 08:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639558480; bh=PoC5ZVjDhgG+YAzEZfocuwaKNBirq7z6kOR1u+gLvQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YePux2nWWEdMVdbTtnQXLzFKQZcq2+GNVe3xjYrv1ZNgU7+/TB37oat2xQaxvFf0j 058YjFyrNlecEAkpA+/ZVEa6Vqb2+MfEDrdfugmYjhwOYFXA7J/fm7AOx4NmPt/i5/ m8xPL+odMv4GhqAZ3GZ89GIQlDNJze5LtoYsHDvO3INObhA7rWz2WbxYdRiH35nRwS A2KCndMpzVsF81+ppQMIJuITt073s/v80S1mbjPs9U0IPFjcPjZbx49Y/aW7YhIYV0 d+ZCM8xUykUuxzM6H7Tm3hBiDk77cT8g2Pv2ZFn1TsxCu1CrLgc+T/jfxC9+7y3W4U XWD9L1tumcGMA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mxQ3Z-0054Hy-Mw; Wed, 15 Dec 2021 09:54:37 +0100 From: Mauro Carvalho Chehab To: Wei Xu , Rob Herring Cc: Mauro Carvalho Chehab , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH RESEND 3/7] dt-bindings: usb: hisilicon,hi3670-dwc3: add binding for Kirin970 Date: Wed, 15 Dec 2021 09:54:29 +0100 Message-Id: <0ccdbe3e1e2ed03c58b4d8b17295dbb11f4598eb.1639558366.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add documentation for the DWC3 USB3 controller found on Kirin970 CPUs. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH RESEND 0/7] at: https://lore.kernel.org/all/cover.1639558366.git.mchehab+huawei@kernel.org/ .../bindings/usb/hisilicon,hi3670-dwc3.yaml | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hisilicon,hi3670-dwc3.yaml diff --git a/Documentation/devicetree/bindings/usb/hisilicon,hi3670-dwc3.yaml b/Documentation/devicetree/bindings/usb/hisilicon,hi3670-dwc3.yaml new file mode 100644 index 000000000000..309a876ea615 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/hisilicon,hi3670-dwc3.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/hisilicon,hi3670-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: HiSilicon Kirin970 USB3 Controller + +maintainers: + - Mauro Carvalho Chehab + +description: + Bindings for the USB3 DWC3 controller present on Kirin970. + +properties: + compatible: + const: hisilicon,hi3670-dwc3 + + clocks: + maxItems: 4 + + clock-names: + items: + - const: clk_gate_abb_usb + - const: hclk_gate_usb3otg + - const: clk_gate_usb3otg_ref + - const: aclk_gate_usb3dvfs + + ranges: true + + assigned-clocks: + maxItems: 1 + + assigned-clock-rates: + maxItems: 1 + + resets: + maxItems: 4 + + '#address-cells': + const: 2 + + '#size-cells': + const: 2 + +# Required child node: + +patternProperties: + "^usb@[0-9a-f]+$": + $ref: snps,dwc3.yaml# + +required: + - compatible + - ranges + - clocks + - clock-names + - assigned-clocks + - assigned-clock-rates + - resets + +additionalProperties: false + +examples: + - | + #include + #include + + bus { + #address-cells = <2>; + #size-cells = <2>; + + usb3: hisi_dwc3 { + compatible = "hisilicon,hi3670-dwc3"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + clocks = <&crg_ctrl HI3670_CLK_GATE_ABB_USB>, + <&crg_ctrl HI3670_HCLK_GATE_USB3OTG>, + <&crg_ctrl HI3670_CLK_GATE_USB3OTG_REF>, + <&crg_ctrl HI3670_ACLK_GATE_USB3DVFS>; + clock-names = "clk_gate_abb_usb", + "hclk_gate_usb3otg", + "clk_gate_usb3otg_ref", + "aclk_gate_usb3dvfs"; + + assigned-clocks = <&crg_ctrl HI3670_ACLK_GATE_USB3DVFS>; + assigned-clock-rates = <238000000>; + resets = <&crg_rst 0x90 6>, + <&crg_rst 0x90 7>, + <&usb31_misc_rst 0xA0 8>, + <&usb31_misc_rst 0xA0 9>; + + dwc3: usb@ff100000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff100000 0x0 0x100000>; + + interrupts = <0 159 IRQ_TYPE_LEVEL_HIGH>, + <0 161 IRQ_TYPE_LEVEL_HIGH>; + + phys = <&usb_phy>; + phy-names = "usb3-phy"; + }; + }; + };