From patchwork Tue Nov 16 11:59:30 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: 12692762 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE757C433F5 for ; Tue, 16 Nov 2021 12:02:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B29C961040 for ; Tue, 16 Nov 2021 12:02:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B29C961040 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4kKDzoDOfu8HkLCH0SH5lrihyzW1B3Jcy/cRaExWylQ=; b=RvV4jUks+mRkLf SlGtSwCG6Lvy3xqrqIGxnR3DVe5zJnMxvsG3WmXPUeBoogpG1LK8xDXU4NizNMSQyNDE9LzwSDWqE 7BDpD9gZ9gBfqK7Do5Dfn3m4GLSuosV1vHNH2FfWZGQbRmOO9uR63LsZ5xwymihRVH1zF+cvj681I 9HIqMJKQLd9NUnsmbtZui8P7USVTwCNno5p+hljVlI+ZeQeMU8OGDxXhJJ2lHECyC6mXjhGtWCLrs du6E1oKZe3c4MXUKh9dXRsSQCc8ueLNfKAfq6vlcivDPDQP5wh6/UNfVE1pPFyffbZ689yHJT95Li 4k1nZRAAGzzRhkGJjwvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx9Q-001cPB-Qj; Tue, 16 Nov 2021 12:01:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx7i-001bnN-2b for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:59:44 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 71CA461B42; Tue, 16 Nov 2021 11:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637063977; bh=qZJOX053SmKrunGAmrzvW/fb185tiP+HTXee+NpSnAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u0NmTbkHFNHgTMwVPBGBJiReSLfYUDtsvia+6Oh9HgxkttLjQbFfYrMOO4E9OV0iZ vY0b5mRZ/v08iJbGS/lOc8oJX+2ki+HsSJsgGcUPCetLLcpjGaONBhkc7XWOfGlktr 7QQ7SbYYfxpkR+Y1ZCodm9EO0TsvPJlCqqmgqeLYxeHMnquVtXWJ7iZ/u524FD73yv ig5XMOmPeJc3qeL6JIMUYy69G8/OqlPIUPAfOOp7Q2Q2qzbUMCxHAq3aR4je1+xga1 9yRfOcbqjkNePodTPjLDEyKr2YkgdsKSRObNopdFPZxoe1Z1lsDU/q4z5kKQCpdZXY U9isT/6xvz66Q== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mmx7e-00A97L-FL; Tue, 16 Nov 2021 11:59:34 +0000 From: Mauro Carvalho Chehab To: Wei Xu , Rob Herring Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Manivannan Sadhasivam , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH 2/5] arm64: dts: HiSilicon: Add support for HiKey 970 PCIe controller hardware Date: Tue, 16 Nov 2021 11:59:30 +0000 Message-Id: <884b83c1aed70735883e15f032f9668ebfd77a01.1637063775.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_035938_203108_A6490259 X-CRM114-Status: GOOD ( 10.49 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Manivannan Sadhasivam Add DTS bindings for the HiKey 970 board's PCIe hardware. Co-developed-by: Mauro Carvalho Chehab Signed-off-by: Manivannan Sadhasivam Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/5] at: https://lore.kernel.org/all/cover.1637063775.git.mchehab+huawei@kernel.org/ arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 107 ++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi index 636c8817df7e..225dccbcb064 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi @@ -176,6 +176,12 @@ sctrl: sctrl@fff0a000 { #clock-cells = <1>; }; + pmctrl: pmctrl@fff31000 { + compatible = "hisilicon,hi3670-pmctrl", "syscon"; + reg = <0x0 0xfff31000 0x0 0x1000>; + #clock-cells = <1>; + }; + iomcu: iomcu@ffd7e000 { compatible = "hisilicon,hi3670-iomcu", "syscon"; reg = <0x0 0xffd7e000 0x0 0x1000>; @@ -659,6 +665,107 @@ gpio28: gpio@fff1d000 { clock-names = "apb_pclk"; }; + pcie_phy: pcie-phy@fc000000 { + compatible = "hisilicon,hi970-pcie-phy"; + reg = <0x0 0xfc000000 0x0 0x80000>; + + phy-supply = <&ldo33>; + + clocks = <&crg_ctrl HI3670_CLK_GATE_PCIEPHY_REF>, + <&crg_ctrl HI3670_CLK_GATE_PCIEAUX>, + <&crg_ctrl HI3670_PCLK_GATE_PCIE_PHY>, + <&crg_ctrl HI3670_PCLK_GATE_PCIE_SYS>, + <&crg_ctrl HI3670_ACLK_GATE_PCIE>; + clock-names = "phy_ref", "aux", + "apb_phy", "apb_sys", + "aclk"; + + /* vboost iboost pre post main */ + hisilicon,eye-diagram-param = <0xffffffff 0xffffffff + 0xffffffff 0xffffffff + 0xffffffff>; + + #phy-cells = <0>; + }; + + pcie@f4000000 { + compatible = "hisilicon,kirin970-pcie"; + reg = <0x0 0xf4000000 0x0 0x1000000>, + <0x0 0xfc180000 0x0 0x1000>, + <0x0 0xf5000000 0x0 0x2000>; + reg-names = "dbi", "apb", "config"; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + phys = <&pcie_phy>; + ranges = <0x02000000 0x0 0x00000000 + 0x0 0xf6000000 + 0x0 0x02000000>; + num-lanes = <1>; + #interrupt-cells = <1>; + interrupts = ; + interrupt-names = "msi"; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0x0 0 0 1 + &gic GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>, + <0x0 0 0 2 + &gic GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>, + <0x0 0 0 3 + &gic GIC_SPI 284 IRQ_TYPE_LEVEL_HIGH>, + <0x0 0 0 4 + &gic GIC_SPI 285 IRQ_TYPE_LEVEL_HIGH>; + reset-gpios = <&gpio7 0 0>; + hisilicon,clken-gpios = <&gpio27 3 0>, <&gpio17 0 0>, + <&gpio20 6 0>; + pcie@0,0 { // Lane 0: PCIe switch: Bus 1, Device 0 + reg = <0 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + pcie@0,0 { // Lane 0: upstream + reg = <0 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + pcie@1,0 { // Lane 4: M.2 + reg = <0x0800 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + reset-gpios = <&gpio3 1 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + + pcie@5,0 { // Lane 5: Mini PCIe + reg = <0x2800 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + reset-gpios = <&gpio27 4 0 >; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + + pcie@7,0 { // Lane 6: Ethernet + reg = <0x3800 0 0 0 0>; + compatible = "pciclass,0604"; + device_type = "pci"; + reset-gpios = <&gpio25 2 0 >; + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + }; + }; + }; + /* UFS */ ufs: ufs@ff3c0000 { compatible = "hisilicon,hi3670-ufs", "jedec,ufs-2.1"; From patchwork Tue Nov 16 11:59:31 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: 12692761 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DBD2C433EF for ; Tue, 16 Nov 2021 12:02:30 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2DFE261040 for ; Tue, 16 Nov 2021 12:02:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2DFE261040 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vQl9GNNH+nphCCk3CCaX4Ng5Fmu3OgiOXiLgr9qqv2w=; b=kxkd0Hp66eqCIG 4F/TkgMktIijDmu8S4Bb20C1ITiIU4jbUu8IZ5RPeZMNqY30icRFI616Qi5+GFb4KlpIWllFYnAZn SpixvUmpo4T7Nsz1wE4AD0WjzOW+JgabAjOd5DRkLYeU85rQWCIBPPV/r5KBP74uGnk9IEbLmwFrn APuid2m2nYH2n55Gk2JKJZ8kpg4mGkpJI20snEBvJi6igcCBUg97hSPhv8u8xSDNngcnFlNptLMcc nFwSvWxfUSacXm1P4DT8PncQmSDrmG73C6ZtVz+MpAhfL3Nef/ix1cDsIeeTfc6PNRdCOSDYsjXBJ QUAGHv5P0XVecQoU7gfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx90-001cDc-Km; Tue, 16 Nov 2021 12:00:59 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx7h-001bnK-Pp for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:59:41 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7557961B3F; Tue, 16 Nov 2021 11:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637063977; bh=KW6zS3tprLUgIK7GpAI4GtqXQeMWH8Ykq0FuHlwvRso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KGOzq7Ci3YBqt8Von3QRwlk25u9ZEuAUNV0fQsdIqB6MenWB/Cr09OWmPsqMXjeQE PirmcM93aI3yksOs1cQJxLD4yOYYJ0pV0dEBWcrpj1xDOij8X4k6GZml9wLDMTgov7 O70zsHDAuWcKGD8lid6jvkTkjAQPriNhlGcJDVAzQCVmKMmRZJZwPOlbCy6gvTdnmB p0QburP8ALq2pnnxHNjE6CA3mqee1tfk3rN1v9hH38vCAbxEwdWaM+XABXYPCoyNIR Uy4YSW5DpgDD5bJsPBAAvu7PKsCKjMUSdYvZpWo5sdovHafjCxXrlVroL96QYQ+FgX +knLZsGrV92sA== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mmx7e-00A97O-Fv; Tue, 16 Nov 2021 11:59:34 +0000 From: Mauro Carvalho Chehab To: Wei Xu , Rob Herring Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] arm64: dts: HiSilicon: Add support for HiKey 970 USB3 PHY Date: Tue, 16 Nov 2021 11:59:31 +0000 Message-Id: <97d470290e81ac40023bdcc7e2d796796421b737.1637063775.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_035937_945248_743214A9 X-CRM114-Status: GOOD ( 11.39 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the USB3 bindings for Kirin 970 phy and HiKey 970 board. Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/5] at: https://lore.kernel.org/all/cover.1637063775.git.mchehab+huawei@kernel.org/ .../boot/dts/hisilicon/hi3670-hikey970.dts | 83 +++++++++++++++++++ arch/arm64/boot/dts/hisilicon/hi3670.dtsi | 56 +++++++++++++ 2 files changed, 139 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts index 7c32f5fd5cc5..60594db07041 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts @@ -430,3 +430,86 @@ &uart6 { label = "LS-UART1"; status = "okay"; }; + +&usb_phy { + phy-supply = <&ldo17>; +}; + +&i2c1 { + status = "okay"; + + rt1711h: rt1711h@4e { + compatible = "richtek,rt1711h"; + reg = <0x4e>; + status = "okay"; + interrupt-parent = <&gpio27>; + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&usb_cfg_func>; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "sink"; + source-pdos = ; + sink-pdos = ; + op-sink-microwatt = <10000000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@1 { + reg = <1>; + usb_con_ss: endpoint { + remote-endpoint = <&dwc3_ss>; + }; + }; + }; + }; + port { + #address-cells = <1>; + #size-cells = <0>; + + rt1711h_ep: endpoint@0 { + reg = <0>; + remote-endpoint = <&hikey_usb_ep1>; + }; + }; + }; +}; + +&i2c2 { + /* USB HUB is on this bus at address 0x44 */ + status = "okay"; +}; + +&dwc3 { /* USB */ + dr_mode = "otg"; + maximum-speed = "super-speed"; + phy_type = "utmi"; + snps,dis-del-phy-power-chg-quirk; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,tx_de_emphasis_quirk; + snps,tx_de_emphasis = <1>; + snps,dis-split-quirk; + snps,gctl-reset-quirk; + usb-role-switch; + role-switch-default-mode = "host"; + port { + #address-cells = <1>; + #size-cells = <0>; + dwc3_role_switch: endpoint@0 { + reg = <0>; + remote-endpoint = <&hikey_usb_ep0>; + }; + + dwc3_ss: endpoint@1 { + reg = <1>; + remote-endpoint = <&usb_con_ss>; + }; + }; +}; diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi index 225dccbcb064..b47654b50139 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi @@ -8,6 +8,7 @@ #include #include +#include / { compatible = "hisilicon,hi3670"; @@ -892,5 +893,60 @@ i2c4: i2c@fdf0d000 { pinctrl-0 = <&i2c4_pmx_func &i2c4_cfg_func>; status = "disabled"; }; + + usb3_otg_bc: usb3_otg_bc@ff200000 { + compatible = "syscon", "simple-mfd"; + reg = <0x0 0xff200000 0x0 0x1000>; + + usb_phy: usbphy { + compatible = "hisilicon,hi3670-usb-phy"; + #phy-cells = <0>; + hisilicon,pericrg-syscon = <&crg_ctrl>; + hisilicon,pctrl-syscon = <&pctrl>; + hisilicon,sctrl-syscon = <&sctrl>; + hisilicon,eye-diagram-param = <0xFDFEE4>; + hisilicon,tx-vboost-lvl = <0x5>; + }; + }; + + usb31_misc_rst: usb31_misc_rst_controller { + compatible = "hisilicon,hi3660-reset"; + #reset-cells = <2>; + hisi,rst-syscon = <&usb3_otg_bc>; + }; + + 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"; + }; + }; }; }; From patchwork Tue Nov 16 11:59:32 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: 12692759 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E66ACC433F5 for ; Tue, 16 Nov 2021 12:01:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BA86C60FBF for ; Tue, 16 Nov 2021 12:01:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BA86C60FBF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ddA0jpJCSY38YgRiH56KeFdP6KsHq875HVoEpouqltY=; b=SNVehs80HZk834 pI1O0pv98rKYwlrm95ecToLb66N3knTGbKs1KUnC3rG7TrB/zsB7Cku647vIP+GnqtdtiiCtom6r+ vjWH3fTHzNli0yeMWIMCSG5MnV608B4M0LiRl//i20E4mGoRTNSIS2+0SQk1Ek6vfhlvoJANiMCmi h7z76cs8DmoDpsV13ekv7aURWvBAuiO8hFzQlDbrSXxwkLze3jKoE42cIUSIIYUesrzR7WWZpqnAN BW4DRtFNCpr2pPMExA3twdC1jEAw5Srni8MI1TznhnfQeb/9mLlHsy4Q80HmSopJpvShC44ly5SnA wSBlULfXnWMycQLASuUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx8B-001byL-Vu; Tue, 16 Nov 2021 12:00:08 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx7h-001bnI-OS for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:59:39 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 69FBD61B31; Tue, 16 Nov 2021 11:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637063977; bh=EiP6cuQpwBBg39/9D1fBHWNz1se4q5TjJex4rIsVzd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oMdUQaRIpni0YwpNNeiEIXZrvHqvHYgtVFaZMeJWSd/gALq34uR8iv2lHN/+4S1Y2 1KNjc6pg0EMDi/N+TjdDgOMvY59lczPkCHV0AXbcYObK5GNbScp5ZgEcEyU7XYN782 NRRXznaYZ482sMLtgwFsHxwZxuN2iSqcvCGtUCIuBXSlz7wE+FggQz7x4xbUZIGOlF dEIqvUU7HyowmSdBbt/6lCShwkXSdIqjTeqk/OXcGIheW8UAvFlsp/Qiclo+ueQu8D GglszQBYOIlYmxVxE4AG5XZIDNzBTNeldxd0nhGYg1blZcxxW9hfA6afOfnxD4425K 89aPNvubzDtTQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mmx7e-00A97R-GR; Tue, 16 Nov 2021 11:59:34 +0000 From: Mauro Carvalho Chehab To: Wei Xu , Rob Herring Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] arm64: dts: HiSilicon: Add usb mux hub for HiKey 970 Date: Tue, 16 Nov 2021 11:59:32 +0000 Message-Id: <3ae388fed672b3d7ee22dd123ec2cf0727f0a79b.1637063775.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_035937_862263_3479D198 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add dt bindings for HiKey 970 USB HUB. Such board comes with an integrated USB HUB provided via a TI TUSB8041 4-port USB 3.0 hub. Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/5] at: https://lore.kernel.org/all/cover.1637063775.git.mchehab+huawei@kernel.org/ .../boot/dts/hisilicon/hi3670-hikey970.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts index 60594db07041..95ca49f1e455 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts @@ -53,6 +53,29 @@ wlan_en: wlan-en-1-8v { startup-delay-us = <70000>; enable-active-high; }; + + usb-hub { + compatible = "hisilicon,usbhub"; + typec-vbus-gpios = <&gpio26 1 0>; + otg-switch-gpios = <&gpio4 2 0>; + hub-reset-en-gpios = <&gpio0 3 0>; + hub-vdd-supply = <&ldo17>; + usb-role-switch; + + port { + #address-cells = <1>; + #size-cells = <0>; + + hikey_usb_ep0: endpoint@0 { + reg = <0>; + remote-endpoint = <&dwc3_role_switch>; + }; + hikey_usb_ep1: endpoint@1 { + reg = <1>; + remote-endpoint = <&rt1711h_ep>; + }; + }; + }; }; /* From patchwork Tue Nov 16 11:59:33 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: 12692760 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48716C433EF for ; Tue, 16 Nov 2021 12:01:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2054D611C3 for ; Tue, 16 Nov 2021 12:01:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2054D611C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dslS9DMNTrSp5/sW9dcUkrpkH7puw7YR9DKxoMzqtdY=; b=WXO0xtIjOsTfBO yeOc+nFwknWRiYKVpsx8MWl4CAv6xWugcvqk9/KqoobQn39enmPLhDXOUIjPwT59U8ij8XkVzq2HZ myqPzHkRjezzDYtTYz7jhsTyMH2W1FnqA8DFfqIPO41JfE4DvQC6vkRJA0W9dWrwExC8MoSTlIdgD IowwVS2/83CoJf92VK1/O2r3045eF/ppaCv8DGIrPVRmcJEoaOrhQp0eJ7Y9VmwFxOo6qym2YslhW l+2LRkH/mn9qg7BUQe5D1Q+FiQsU0gCY7FacCELA+g3YT0kHf4F+OJKQmP4gUR2ffWSkl0Uh+/8bj 2D7Jx5SLMHyn+u4ftiWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx8X-001c4E-RR; Tue, 16 Nov 2021 12:00:30 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmx7h-001bnJ-Q1 for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 11:59:41 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6F46F61040; Tue, 16 Nov 2021 11:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637063977; bh=kBce9oGEz4xGelWyG99zfuqEst9w2N8rcyAAYzIL21o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kvlF6u8lCRlnr2nHZffiybPcksvrQr8S2P0qX3zKvTzvD+yKCN1A69CaWNhUjkxKO u5Nw59niXS5dogkmDcz6YjiqUhGK++DQCabtB0U74PxGR5wF+qVAFtUS6Qdpg0VRsL uDJPn+lwa6ENggzAP+hwJX2EPU8RqAUNBJP0f7J7x6opQ+AiIH5NjTVb8ApsHFzR+O fuckMF/Qi5Cl9LcGF0aOuMetyWHmn27oRbBwUZgENOszsWzlZsCbMQSl1qdCkKQGDA m8Mmk+IHu17GV7UnA2fPDIcYmBRq8TXmQrlQZehOq81ONPMj1RCtiSV4E0wAUTfvVs 3qKceVQ4yNs4g== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mmx7e-00A97U-Gy; Tue, 16 Nov 2021 11:59:34 +0000 From: Mauro Carvalho Chehab To: Wei Xu , Rob Herring Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, John Stultz , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH 5/5] arm64: dts: HiSilicon: Add usb mux hub for HiKey 960 Date: Tue, 16 Nov 2021 11:59:33 +0000 Message-Id: <74724e79adcc2ac8001339e1ed8fd051b9fd4e80.1637063775.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_035938_010936_D6328362 X-CRM114-Status: GOOD ( 10.42 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: John Stultz Add dt bindings for HiKey 960 USB HUB. Such board comes with an integrated USB HUB provided via a Microchip USB5734 4-port high-speed hub controller. [mchehab: modified it to adapt to the merged DT schema] Signed-off-by: John Stultz Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/5] at: https://lore.kernel.org/all/cover.1637063775.git.mchehab+huawei@kernel.org/ .../boot/dts/hisilicon/hi3660-hikey960.dts | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts index f68580dc87d8..135501e57f86 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts @@ -197,6 +197,37 @@ optee { method = "smc"; }; }; + + usb_hub_vdd: usb_hub_vdd { + compatible = "regulator-fixed"; + regulator-name = "hub-vdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio5 6 0>; + enable-active-high; + }; + + usb-hub { + compatible = "hisilicon,usbhub"; + typec-vbus-gpios = <&gpio25 2 GPIO_ACTIVE_HIGH>; + otg-switch-gpios = <&gpio25 6 GPIO_ACTIVE_HIGH>; + hub-vdd-supply = <&usb_hub_vdd>; + usb-role-switch; + + port { + #address-cells = <1>; + #size-cells = <0>; + + hikey_usb_ep0: endpoint@0 { + reg = <0>; + remote-endpoint = <&dwc3_role_switch>; + }; + hikey_usb_ep1: endpoint@1 { + reg = <1>; + remote-endpoint = <&rt1711h_ep>; + }; + }; + }; }; /* @@ -564,7 +595,7 @@ port { rt1711h_ep: endpoint@0 { reg = <0>; - remote-endpoint = <&dwc3_role_switch>; + remote-endpoint = <&hikey_usb_ep1>; }; }; }; @@ -686,7 +717,7 @@ port { #size-cells = <0>; dwc3_role_switch: endpoint@0 { reg = <0>; - remote-endpoint = <&rt1711h_ep>; + remote-endpoint = <&hikey_usb_ep0>; }; dwc3_ss: endpoint@1 {