From mboxrd@z Thu Jan 1 00:00:00 1970 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 6BA3FC6FD1C for ; Tue, 14 Mar 2023 07:47:18 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SnI2yI8uZEOX3gVeZKI2UyEkNCEtGvMzfuJXJfW0lCU=; b=ACoAWiGRVsFKqt gWqI6crlqgYxDu/vJEjfqSD5imO1MjtuebIGhb3VrvJzl9rYTOuPxD7o7gdRRCnT51gV1PEB/GeEM w+USnJdpPIU0G4dMCVAI5m4Th+/2Q7aJ6aru/48AtHNT4LmIg3o9Un1rnYR+008f1LnJilLsqJyvU YcmReK2A9hHaf1UvPf0U4ix7Pjc6sjbcKU9X0WSesh9fHE8ld1F2kejJA4+9WLlrgWQiS39OUk6nA /6zpY02dU3FE3FNDN6lrkQwDmKXIhHjV/R2nH5CjvsI+hAryiUDWupAt9S7t2VCK0MqhsqOt/jri2 xZucLzQ9Opo/yrpopOpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbzMU-009Obm-Il; Tue, 14 Mar 2023 07:46:22 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbzMQ-009ObC-T9 for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2023 07:46:20 +0000 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 6E138615EB; Tue, 14 Mar 2023 07:46:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E82A0C433EF; Tue, 14 Mar 2023 07:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678779976; bh=he0dIS15NrPiOP6nfQukxJSBq6n5Ecl1RNpbb9P/8e4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r2EqEvVovQwLwtx03840Uq3g6YFrVn2NG6Emm/6yD/SkRobD6WYskeAaLrwgOO3Jc NKItMRMdnbcQFHGsNtZTG0RHJksElTEfDnzatyc08NBAfpM8hsEfP3/1fzAQLCI8r0 ltfAqWucxC5oOCjyPDotIyc/Ty10K7MiikZRmqm4Y1GAhwF7sk8u6MXvg01BbuxSQk Zs9vxxyhRCznYYpZmxE0YOxbYDUKfITjVa+Rp3Fpkb3snvl0Fw6UshGsHV/NWgy6B3 NXN6NPSzcGhultbRRA8VEGzwpBj/GGvLCxIS07XwSZWIaNCPqFAmQ3u0NgEaAd/XLs IevmV3prgc6fw== Date: Tue, 14 Mar 2023 15:46:02 +0800 From: Shawn Guo To: Lucas Stach Cc: Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patchwork-lst@pengutronix.de Subject: Re: [PATCH] arm64: dts: imx8mp-debix: add USB host support Message-ID: <20230314074602.GD143566@dragon> References: <20230228170247.910655-1-l.stach@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230228170247.910655-1-l.stach@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_004619_066516_46A7B196 X-CRM114-Status: GOOD ( 22.21 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 28, 2023 at 06:02:47PM +0100, Lucas Stach wrote: > This adds support for the 4 USB3 host ports on the board, which are > connected to the i.MX8MP SoC via a Realtek RTS5411 hub. > > As the schematic for the board is not available, I could not validate > that this really reflects the reality, but I modeled things after the > hacked in usage of the GPIOs in the downstream kernel. > > Signed-off-by: Lucas Stach > --- > .../dts/freescale/imx8mp-debix-model-a.dts | 57 +++++++++++++++++++ > 1 file changed, 57 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts > index 2876d18f2a38..94dc089e4550 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mp-debix-model-a.dts > @@ -43,6 +43,17 @@ reg_usdhc2_vmmc: regulator-usdhc2 { > gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; > enable-active-high; > }; > + > + reg_usb_hub: regulator-usb-hub { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_reg_usb_hub>; > + regulator-name = "USB_HUB"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > }; > > &A53_0 { > @@ -254,6 +265,39 @@ &uart4 { > status = "okay"; > }; > > +&usb3_phy1 { > + status = "okay"; > +}; > + > +&usb3_1 { > + status = "okay"; > +}; > + > +&usb_dwc3_1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_usb1>; > + dr_mode = "host"; > + status = "okay"; I had to fix it up by adding #address-cells = <1>; #size-cells = <0>; Otherwise, DTC emits reg_format warnings. /soc@0/usb@32f10108/usb@38200000/hub@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) /soc@0/usb@32f10108/usb@38200000/hub@2:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) Shawn > + > + /* 2.x hub on port 1 */ > + usb_hub_2_x: hub@1 { > + compatible = "usbbda,5411"; > + reg = <1>; > + reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>; > + vdd-supply = <®_usb_hub>; > + peer-hub = <&usb_hub_3_x>; > + }; > + > + /* 3.x hub on port 2 */ > + usb_hub_3_x: hub@2 { > + compatible = "usbbda,411"; > + reg = <2>; > + reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>; > + vdd-supply = <®_usb_hub>; > + peer-hub = <&usb_hub_2_x>; > + }; > +}; > + > /* SD Card */ > &usdhc2 { > pinctrl-names = "default", "state_100mhz", "state_200mhz"; > @@ -384,6 +428,12 @@ MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x41 > >; > }; > > + pinctrl_reg_usb_hub: regusbhubgrp { > + fsl,pins = < > + MX8MP_IOMUXC_SAI2_TXD0__GPIO4_IO26 0x19 > + >; > + }; > + > pinctrl_rtc_int: rtcintgrp { > fsl,pins = < > MX8MP_IOMUXC_SD1_STROBE__GPIO2_IO11 0x140 > @@ -411,6 +461,13 @@ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x49 > >; > }; > > + pinctrl_usb1: usb1grp { > + fsl,pins = < > + MX8MP_IOMUXC_GPIO1_IO14__USB2_OTG_PWR 0x10 > + MX8MP_IOMUXC_SAI2_TXC__GPIO4_IO25 0x19 > + >; > + }; > + > pinctrl_usdhc2: usdhc2grp { > fsl,pins = < > MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190 > -- > 2.30.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel