From patchwork Tue Jan 26 21:55:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Grassein X-Patchwork-Id: 12048427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6F71C433E9 for ; Tue, 26 Jan 2021 21:57:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 A04A22064C for ; Tue, 26 Jan 2021 21:57:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A04A22064C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=nuZVPdEXz1B8i2VwdlDg3sAO8aeaKROqsm9YtciNmTs=; b=yna91tkXwN8Dakl8xOUm8zX+5q MUD3RNPSvrI3wynCdA6lE0e4mD9e0R2m4FvHXEgJy0eTGSNY7Wygshlj7cxz0NHbpuVV1jO9g1lNm qtoJ39vBkjv6bEbGrmu/Kehpoo/QWcQgHGiIdx3x3BglfI5fGX00oCSUDsLeJt+7IjVqrzSRLYQWy EapMxZB8oRgBE1YVbjHydriqF2ptnjtjspoHoX0brXF8VECX1k1iJU8dK5bsRuCXvxm5G8jVZOHwJ mxqpr+QlUlJ+QfLYO9s9eZX7K53+hNDYanatJ+kgbEtcOUAnhZ2+uld5m/F5Tv5pT0zSrhjrFV+ft X5jqjVvw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4WIz-0002wV-Pn; Tue, 26 Jan 2021 21:55:21 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4WIw-0002v2-0E for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 21:55:19 +0000 Received: by mail-wm1-x332.google.com with SMTP id s24so2228537wmj.0 for ; Tue, 26 Jan 2021 13:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=thEebwIJh5TAbqy+mXWpJTbrAfE0ddYwkqXqlmzMeB0=; b=oeFCWWoxarlMyRwYBVKoFlAcyfp3pINXvgRSnPu4NRUgDg9yhXwhSHUwOpsVSy0l11 e0aUUHBTKgRprSkWtlFez4O/ZUmIEnUURzza1xs1z9SWBfRlf7MkF/CcGMMnArO5ivMa yM1w8l9UZTp4J1hZugi3uiqjfk5Yrb4w82/6Zf0dWS7fnnujc3YOdHxSm5dgLHGOIxn+ iImsl1nWgLSKm6lCuXmrpqbUQk1zKDIfkZsgskgb5Z9S7SAUmfmCiqRNXgzS2ss+pzcQ 5m6bxTaxwNp5X2GxSaj7CcflIA9jNV8h6eTwISxYVryMzgVeyVRFHgyfH444mclp/LAR jNKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=thEebwIJh5TAbqy+mXWpJTbrAfE0ddYwkqXqlmzMeB0=; b=bPOpjYoQjgRVHF3XwZ7UsNqLsbgmHaV9uq3r5o5unvuBMTi4zEruQiHj8ZaWuAcTsV QIJIDwGTwGR86wMFk4EQR6cub0tVJPn+Su4fPgkeBMSBPC/nlVzcsjmkteLgZsB8Xx+B z9LhzH8wSThUJUoPPm3XxWHWjvVBNLQjnaaaczeIAmuVGORoGVNqwuHm7+xXaYWHPZy2 DGEYSvmHLJNerfhb9FIVmV4P/KZUVyCZGIfno7p6SSIjAs2GByAa4jaLTg9FdpzcoEXM nbSbMyr5OYUtX8oS2yPCHIvVPw7Mbwj+Y5eZL0ANc1owxwQdagg7VpwwTjueeXJQqrRQ ILWw== X-Gm-Message-State: AOAM530hk01weQbGmUgmr+yF0O9svjIZBFZVpWX5shhPiNHYKWpXy3QW LivBNbav6u9Wb3Y88DRKQ0nCC0IxHHM= X-Google-Smtp-Source: ABdhPJwvAZrSaNjV4BCF4LcfDpOLNuzuKTKg8DSnSqJQtKgq1kMzCwIqOeQrsfihjmJTPL1iGE2dYA== X-Received: by 2002:a1c:98c6:: with SMTP id a189mr1438596wme.88.1611698114870; Tue, 26 Jan 2021 13:55:14 -0800 (PST) Received: from localhost.localdomain (2a01cb0008bd2700e5dd22906bf4cfc4.ipv6.abo.wanadoo.fr. [2a01:cb00:8bd:2700:e5dd:2290:6bf4:cfc4]) by smtp.gmail.com with ESMTPSA id 36sm17678wrj.97.2021.01.26.13.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 13:55:14 -0800 (PST) From: Adrien Grassein To: Subject: [PATCH] arm64: dts: imx8mq-nitrogen: add USB support Date: Tue, 26 Jan 2021 22:55:11 +0100 Message-Id: <20210126215511.1056600-1-adrien.grassein@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210126_165518_088407_0711E41E X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, troy.kisky@boundarydevices.com, gary.bisson@boundarydevices.com, robh+dt@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, Adrien Grassein Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org add USB support for imx8mq-nitrogen. It consists in 2 phys: OTG and host. The OTG port uses a dedicated regulator for vbus. Signed-off-by: Adrien Grassein --- .../boot/dts/freescale/imx8mq-nitrogen.dts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts b/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts index 81d269296610..fb8acd83a280 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-nitrogen.dts @@ -34,6 +34,17 @@ power { }; }; + reg_usb_otg_vbus: regulator-usb-otg-vbus { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_reg_usbotg_vbus>; + regulator-name = "usb_otg_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + reg_vref_0v9: regulator-vref-0v9 { compatible = "regulator-fixed"; regulator-name = "vref-0v9"; @@ -190,6 +201,25 @@ &uart2 { status = "okay"; }; +&usb_dwc3_0 { + dr_mode = "otg"; + status = "okay"; +}; + +&usb3_phy0 { + vbus-supply = <®_usb_otg_vbus>; + status = "okay"; +}; + +&usb_dwc3_1 { + dr_mode = "host"; + status = "okay"; +}; + +&usb3_phy1 { + status = "okay"; +}; + &usdhc1 { assigned-clocks = <&clk IMX8MQ_CLK_USDHC1>; assigned-clock-rates = <400000000>; @@ -339,6 +369,12 @@ MX8MQ_IOMUXC_SD2_WP_GPIO2_IO20 0x16 >; }; + pinctrl_reg_usbotg_vbus: reg-usbotg-vbusgrp { + fsl,pins = < + MX8MQ_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x16 + >; + }; + pinctrl_uart1: uart1grp { fsl,pins = < MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX 0x45