From patchwork Fri Dec 17 10:12:45 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: 1569909 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=W9wCq+gN; 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 4JFlDJ3L5Qz9t6S for ; Fri, 17 Dec 2021 21:13:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234797AbhLQKNC (ORCPT ); Fri, 17 Dec 2021 05:13:02 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:38992 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234756AbhLQKM6 (ORCPT ); Fri, 17 Dec 2021 05:12:58 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8D6D8B82785; Fri, 17 Dec 2021 10:12:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52939C36AE5; Fri, 17 Dec 2021 10:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639735975; bh=tz94hJXS5Lpe+Fmm8yoGm62o/DyyDUvvDdbkBBkCTs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W9wCq+gNxoW4yfF52ncTtYtgUBB0HB9mFooO+4nt++v5Yplh21tZg/buirz313GKV bkpLtScq4KjYI/UqACl9OTEyBCZsFHvzkgBbbMYfJfUyvo4IUe6I3X0t6K45KVUD4U AxrRg05NP/D+/IDTMKDP/52MmzPFeLUiFS1vyauxgx6FjGC+xEpZckDxD8QnlUwpIo fwfbHToV42ViH5ROS5iEiavXEEyjUz6nj6vHpLayuSq+5ZwiaH/RMPR8dYPKAh8kva lEbq4osu+XmoUb630GM0dWiXQVw5K7BrL9Xuin0tjXEnI1BJk+nXk+FlDA3cXfwFyu UiOsjpMimR59A== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1myAEP-000g68-5P; Fri, 17 Dec 2021 11:12:53 +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 , Mauro Carvalho Chehab Subject: [PATCH v2 1/7] dt-bindings: misc: add schema for USB hub on Kirin devices Date: Fri, 17 Dec 2021 11:12:45 +0100 Message-Id: <4533bc1f2287641c11069a6dab2800a3b0e74b22.1639735742.git.mchehab@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 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 Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 0/7] at: https://lore.kernel.org/all/cover.1639735742.git.mchehab@kernel.org/ .../bindings/misc/hisilicon,hikey-usb.yaml | 84 +++++++++++++++++++ 1 file changed, 84 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..208c49478f1f --- /dev/null +++ b/Documentation/devicetree/bindings/misc/hisilicon,hikey-usb.yaml @@ -0,0 +1,84 @@ +# 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 a USB port and its endpoints. + +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 Fri Dec 17 10:12:46 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: 1569906 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=cQzyhvI5; 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 4JFlDB6crXz9t6S for ; Fri, 17 Dec 2021 21:12:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234739AbhLQKM4 (ORCPT ); Fri, 17 Dec 2021 05:12:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234738AbhLQKM4 (ORCPT ); Fri, 17 Dec 2021 05:12:56 -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 5BEAAC06173E; Fri, 17 Dec 2021 02:12:56 -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 06DB6620E5; Fri, 17 Dec 2021 10:12:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C8ECC36AEA; Fri, 17 Dec 2021 10:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639735975; bh=dH8n7XUB1hLxYi6SAGbwQxNYY+TqA+ySoHz3F9+B+do=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cQzyhvI5KJkFziFEyLauhMS8wcVOFeE007vOX8MrViQtCpyuUd2WxMSDRRuxWxBuW D9MrOGC82RmQ4bhs3j3XMObXD0DExnJD4XnxjYOaeaUSwKoIw0fPjhGqNSX9u+FIqC j+DvpSymDKCjsd9AyIRF7Fnz05sCmLm7VHdIKV5eAYDsep5DB18sYr+9cOk0katxM1 z0v6LrnOLGHczpW3Pc+2aeiSOfoZQEJ/WgHQOyvE1mTt+/tn4/tpIwMfWuKBKofUQp 1TPxz95FZimnV9CDD6nlf7VJM7zvw1uWK8RyxPdzanaDN1GP4zEqfbmTLbPcno88uD Ef4hxz57kyE5Q== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1myAEP-000g6B-6k; Fri, 17 Dec 2021 11:12:53 +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, Rob Herring , Mauro Carvalho Chehab Subject: [PATCH v2 2/7] dt-bindings: clock: hi3670-clock.txt: add pmctrl compatible Date: Fri, 17 Dec 2021 11:12:46 +0100 Message-Id: <3495df40d10eecb2326cd0ef002cc708244c0fd8.1639735742.git.mchehab@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Mauro Carvalho Chehab Add a compatible for the Power Management domain controller, which is needed in order to control power for the PCI devices on HiKey 970. Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 0/7] at: https://lore.kernel.org/all/cover.1639735742.git.mchehab@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 Fri Dec 17 10:12:47 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: 1569907 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=kZDwwESC; 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 4JFlDC1qG5z9t9b for ; Fri, 17 Dec 2021 21:12:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234750AbhLQKM5 (ORCPT ); Fri, 17 Dec 2021 05:12:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232647AbhLQKM4 (ORCPT ); Fri, 17 Dec 2021 05:12:56 -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 58EE1C061574; Fri, 17 Dec 2021 02:12:56 -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 0076562070; Fri, 17 Dec 2021 10:12:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A0BDC36AE9; Fri, 17 Dec 2021 10:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639735975; bh=OMKIhVLZUPKdh2b5spfQ1xeI04TQ3VcvJwTnPxVdAGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kZDwwESCTE5e1d2oB/a7RrnwmLOC6/S9BgtKCla+pvVOGAd8z+TCBuzNMh+O5zc2u nXkpKjfKzR2YEPymyVyreeR1X7d0vnRVHFHF0xh3pks/1pMn5mKj9VGO5UbhE+NHEa 1ig3ZglSd8yQgC4FiUj6G8N16KVHtuODC9ETDH0nWEhGWmv0o7HhFp2vdgwHQzawwz acXWxP0QQ1gGCQO4/K/bB0F0CXAMF4m23f3p0kFRjqUTDNpRWEvwUPA3EJ0LuPO3A3 N3Rzld0ZbJ6xuihJrW/HrwzAI9luzWlJwaUMq8T7klK5dCRX+oHjaNCCifkf8z0KBU by0Ed0ghpvyyA== Received: from mchehab by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1myAEP-000g6E-8X; Fri, 17 Dec 2021 11:12:53 +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, Mauro Carvalho Chehab Subject: [PATCH v2 3/7] dt-bindings: usb: hisilicon,hi3670-dwc3: add binding for Kirin970 Date: Fri, 17 Dec 2021 11:12:47 +0100 Message-Id: <03023825dafd0c9ae3f99e650e14137f290bb377.1639735742.git.mchehab@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Mauro Carvalho Chehab Add documentation for the DWC3 USB3 controller found on Kirin970 CPUs. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- See [PATCH v2 0/7] at: https://lore.kernel.org/all/cover.1639735742.git.mchehab@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..b38f3bfd9107 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/hisilicon,hi3670-dwc3.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%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: abb + - const: hclk + - const: ref + - const: aclk + + 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: 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 = "abb", + "hclk", + "ref", + "aclk"; + + 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"; + }; + }; + };