From patchwork Thu Dec 16 16:05:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12681545 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 CCDD6C4332F for ; Thu, 16 Dec 2021 16:09:33 +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: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=nTD3LSHf1ZgAeOhF0wZqmGWxhTBTIDP7OtvGhGPFGLg=; b=3iLWP/umkzaMoP a5EfT8ISpz1kvbSBnywEteqGlhmvcdmTLZTETjGPCcexo3SrqAijcwX0R8i4R2zkEkI6dtt7yPCXI X8ZNaPUBN1kET58VzrP4Uj55CDamkOnLv0RExXLAd7HLAkTrJmmCRY9k0Hs6oUmxDDkNqRdIgZ5kI YndgY7McrHYUeTrlBsoqmPb10DH5sf3qFHEvwQFgc1sfLlENNZEhY3AWM8O9QsxGtJL7gDAFSK+7m 0+u4sHl0p1MsK9Vx3+Ga6f4zl+Focot7CTia6YwRWiTZ0kPS1iYa/GSvLhMA/grAIgP8juK0VWYws YpRtwGjR+5XLOTkMhByQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtK1-006V1u-3y; Thu, 16 Dec 2021 16:09:33 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtGU-006TSg-H8; Thu, 16 Dec 2021 16:05:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1639670754; x=1671206754; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p5HHJrSYp7xxYPtjPoRgmxeGfWmt/+mPIconMbitaRw=; b=V03VoirFryCsDsSr77xAGJct6Fpdvf6prih7cppGHSoGHWTUWkiu47Bo IyfQAKZgMW2xGpQhF6cXucr/m52rlft0VSbfKrt1FgDdwYWMUDT/1yO/u t7icKp2ecJV+dMijjUpX9xIN44gLGQ1MV9OkzM2T/tj9DExUQa4S+GJB4 RM3VF06te62I2M7k6s78UWccgDc02gjK4bOsvokWrxPvLte2hHkYuYRfn POJowEXvmyQJPX8ErkOtygA0gitomhwcd1M2Y5sV4D6TPBsLW2djdQ8Qh bJMPJ/oL08WGT77Z7GKcWVh5XdaGeJqlAYXZV2YQH+Z7Jcmx+xcKZb3Q/ g==; X-IronPort-AV: E=Sophos;i="5.88,211,1635199200"; d="scan'208";a="21103119" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 16 Dec 2021 17:05:50 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 16 Dec 2021 17:05:50 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 16 Dec 2021 17:05:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1639670750; x=1671206750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p5HHJrSYp7xxYPtjPoRgmxeGfWmt/+mPIconMbitaRw=; b=f47b9sh68caCcc8NOisVj4ILwTT3LSAfRZyDrHH1e+qQgjFvbSZhHAfx xQCH7G2cnpsjy0mYvk/BUbXWfNikW7mgi4tfgEYgLDZRQKM/Yd1J8E7dE wR8dnVtWV8nHhMi21MXLOWvFpzAafSlz5Z1hTGs6v7nMW8VhsWsdkmzSS jCYJncuIIKsPXNiSkuS1V7fkKzRBVBBIUjeIfkH2J+byUKe4IEjb+Vio6 9ONB9waI+ptQGMm90zFo4G8FhO1DVMEH0tR33i4IgeXSmfFdgRVZzahXE n3as5oJbI6v9S8SBkE9xZvbgYHepexc1098UfQyXFO4LzDcti7YFOZi20 A==; X-IronPort-AV: E=Sophos;i="5.88,211,1635199200"; d="scan'208";a="21103118" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 16 Dec 2021 17:05:50 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id CFDAB280075; Thu, 16 Dec 2021 17:05:49 +0100 (CET) From: Alexander Stein To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , NXP Linux Team , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/3] dt-bindings: phy: imx8mq-usb-phy: Add imx8mp specific flags Date: Thu, 16 Dec 2021 17:05:39 +0100 Message-Id: <20211216160541.544974-2-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211216160541.544974-1-alexander.stein@ew.tq-group.com> References: <20211216160541.544974-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_080554_934548_BBCFAD70 X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org This adds bindings for features only available on imx8mp. They allow setting polarity of PWR and OC as well as disabling port power control. Also permanently atteched can be annotated as well. Signed-off-by: Alexander Stein --- Adding properties specific to one compatible globally and disabling them on other compatibles is the way to go? Are there any best practices on the usage of '-' and/or '_' in property names? .../bindings/phy/fsl,imx8mq-usb-phy.yaml | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml index 2936f3510a6a..1d28b7d1c413 100644 --- a/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml +++ b/Documentation/devicetree/bindings/phy/fsl,imx8mq-usb-phy.yaml @@ -16,7 +16,8 @@ properties: - fsl,imx8mp-usb-phy reg: - maxItems: 1 + minItems: 1 + maxItems: 2 "#phy-cells": const: 0 @@ -32,6 +33,28 @@ properties: description: A phandle to the regulator for USB VBUS. + fsl,permanently-attached: + type: boolean + description: + Indicates if the device atached to a downstream port is + permanently attached. + + fsl,disable-port-power-control: + type: boolean + description: + Indicates whether the host controller implementation includes port + power control. Defines Bit 3 in capability register (HCCPARAMS). + + fsl,over-current-active-low: + type: boolean + description: + Over current signal polarity is active low. + + fsl,power-active-low: + type: boolean + description: + Power pad (PWR) polarity is active low. + required: - compatible - reg @@ -39,6 +62,33 @@ required: - clocks - clock-names +if: + properties: + compatible: + contains: + enum: + - fsl,imx8mp-usb-phy + +then: + properties: + reg: + minItems: 2 + maxItems: 2 + items: + - description: PHY register base address + - description: Glue layer base address + +else: + properties: + reg: + maxItems: 1 + items: + - description: PHY register base address + fsl,permanently-attached: false + fsl,disable-port-power-control: false + fsl,over-current-active-low: false + fsl,power-active-low: false + additionalProperties: false examples: From patchwork Thu Dec 16 16:05:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12681547 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 E7214C433F5 for ; Thu, 16 Dec 2021 16:10:20 +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: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=NDj/WW3TsfpF8IxRPt3C4bbhgIYiST+qwi7pX5jp96Q=; b=Pla1H/cFofOdQO rBItSJdAqloJIvm78bUmIIKxM+BFnbTL2pVNgUZDyss/lWUQMsHsFfK0cTLX7ElVQH5PYlKrw+M+w ax7hmwuHVX1RF4tuXZpFxlkmZdi/141LuW8rozNPK2B+XVIjchzktR1DBTnuYWOzJZIYtNlP5m90+ BPrIKZE7mNg8jlfNvTJHmuAu1eCluuCCXw2EtQBsTmQQD9/I1oN/YG+BL+ys7dU+bZq+gg7c5q2fV T8X454JgybXvAbcqvM7hcaV2hHKoB6c8d3LhdRiMesPrV9TFa6pdk1ijpOd8Etjcma5pqmOpUE8fs Ro4wC1LPbf1lYXBT4Vzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtKm-006VO5-6r; Thu, 16 Dec 2021 16:10:20 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtGV-006TU1-Mq; Thu, 16 Dec 2021 16:05:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1639670755; x=1671206755; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FZr6u+Xp8JktssxvogNSfYTefAIcEB7LkldXk4m703w=; b=mQHd29hF+rN1khtfdxhTY/xQQXUHj7q33uT3GHOqUkvvtW/Dvv9MjYha ULmoRax9zqrS2wJWRIBNtXXLtcODuQ9pBBULG1umfy4HPBhSuaVpsO2Rz I9obphSAKHAL0UTTUcs3DQn0FIiIzkE1HMvP87XqH6f5uwo1SbQb1lFlU 0SIYLtftrKr0EKD6l20eUSMSLaBth1r+bGuhJ2NGz7DYTdIaUmT6hdl9y QtnWW9/048IkfU68ivZ58htb4e9AbktFiJysb4xAxyTR+/NsRhWpk7+9D BxXvjv0uOLxx/3QJmCEqXULS+Cpea6Bnsoq5eb0l7Uozijczfa0L7RpZ6 Q==; X-IronPort-AV: E=Sophos;i="5.88,211,1635199200"; d="scan'208";a="21103121" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 16 Dec 2021 17:05:50 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 16 Dec 2021 17:05:50 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 16 Dec 2021 17:05:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1639670750; x=1671206750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FZr6u+Xp8JktssxvogNSfYTefAIcEB7LkldXk4m703w=; b=QyJQekJHD1AnrNHJIV6GFpYdHjDTE75EzOx1S/q4PW43aDchz/drB5yR poqY18ezGtFhMhyA+hZCWfijh1nCFqVt6k9cyKS22UzHFQSLJxJh/O0W4 n7UV4QM5dL6OFxDoQzfmPPgU8P+ZPp2qUDXJrMZ21Fx/ohnLuapuhH8sw VIGJe1FPK+i4r8G4IYbpAHiAA+95DGabW7qJuPZ8oBxagEki0bP2+ClyC ZVoQg7t9QP39Eyix+PBsY/zha6VbgPWS0UUVZJFjyfU1KYGaTXxmLMdFE lezXIN5oSoIr92oS9kSwH9PMkdR4nW+x/p5FsEZPzOHYzEXnyM2C8l6F+ w==; X-IronPort-AV: E=Sophos;i="5.88,211,1635199200"; d="scan'208";a="21103120" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 16 Dec 2021 17:05:50 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 0E6A2280065; Thu, 16 Dec 2021 17:05:50 +0100 (CET) From: Alexander Stein To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , NXP Linux Team , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/3] phy: fsl-imx8mq-usb: Add support for setting fsl specific flags Date: Thu, 16 Dec 2021 17:05:40 +0100 Message-Id: <20211216160541.544974-3-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211216160541.544974-1-alexander.stein@ew.tq-group.com> References: <20211216160541.544974-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_080556_116550_A36148D9 X-CRM114-Status: GOOD ( 18.65 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The i.MX8MP glue layer has support for the following flags: * over-current polarity * PWR pad polarity * controlling PPC flag in HCCPARAMS register * parmanent port attach for usb2 & usb3 port Allow setting these flags by supporting specific flags in the glue node. In order to get this to work an additional IORESOURCE_MEM is necessary actually pointing to the glue layer. For backward compatibility this is purely optional. Signed-off-by: Alexander Stein --- drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c index a29b4a6f7c24..86b61af6a949 100644 --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c @@ -11,6 +11,18 @@ #include #include +/* USB glue registers */ +#define USB_CTRL0 0x00 +#define USB_CTRL1 0x04 + +#define USB_CTRL0_PORTPWR_EN BIT(12) /* 1 - PPC enabled (default) */ +#define USB_CTRL0_USB3_FIXED BIT(22) /* 1 - USB3 permanent attached */ +#define USB_CTRL0_USB2_FIXED BIT(23) /* 1 - USB2 permanent attached */ + +#define USB_CTRL1_OC_POLARITY BIT(16) /* 0 - HIGH / 1 - LOW */ +#define USB_CTRL1_PWR_POLARITY BIT(17) /* 0 - HIGH / 1 - LOW */ + +/* USB phy registers */ #define PHY_CTRL0 0x0 #define PHY_CTRL0_REF_SSP_EN BIT(2) #define PHY_CTRL0_FSEL_MASK GENMASK(10, 5) @@ -35,9 +47,46 @@ struct imx8mq_usb_phy { struct phy *phy; struct clk *clk; void __iomem *base; + void __iomem *glue_base; struct regulator *vbus; }; +static void imx8mp_configure_glue(struct imx8mq_usb_phy *dwc3_imx) +{ + struct device *dev = &dwc3_imx->phy->dev; + u32 value; + + if (!dwc3_imx->glue_base) + return; + + value = readl(dwc3_imx->glue_base + USB_CTRL0); + + if (device_property_read_bool(dev, "fsl,permanently-attached")) + value |= (USB_CTRL0_USB2_FIXED | USB_CTRL0_USB3_FIXED); + else + value &= ~(USB_CTRL0_USB2_FIXED | USB_CTRL0_USB3_FIXED); + + if (device_property_read_bool(dev, "fsl,disable-port-power-control")) + value &= ~(USB_CTRL0_PORTPWR_EN); + else + value |= USB_CTRL0_PORTPWR_EN; + + writel(value, dwc3_imx->glue_base + USB_CTRL0); + + value = readl(dwc3_imx->glue_base + USB_CTRL1); + if (device_property_read_bool(dev, "fsl,over-current-active-low")) + value |= USB_CTRL1_OC_POLARITY; + else + value &= ~USB_CTRL1_OC_POLARITY; + + if (device_property_read_bool(dev, "fsl,power-active-low")) + value |= USB_CTRL1_PWR_POLARITY; + else + value &= ~USB_CTRL1_PWR_POLARITY; + + writel(value, dwc3_imx->glue_base + USB_CTRL1); +} + static int imx8mq_usb_phy_init(struct phy *phy) { struct imx8mq_usb_phy *imx_phy = phy_get_drvdata(phy); @@ -69,6 +118,8 @@ static int imx8mp_usb_phy_init(struct phy *phy) struct imx8mq_usb_phy *imx_phy = phy_get_drvdata(phy); u32 value; + imx8mp_configure_glue(imx_phy); + /* USB3.0 PHY signal fsel for 24M ref */ value = readl(imx_phy->base + PHY_CTRL0); value &= ~PHY_CTRL0_FSEL_MASK; @@ -153,6 +204,7 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct imx8mq_usb_phy *imx_phy; const struct phy_ops *phy_ops; + struct resource *res; imx_phy = devm_kzalloc(dev, sizeof(*imx_phy), GFP_KERNEL); if (!imx_phy) @@ -168,6 +220,15 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev) if (IS_ERR(imx_phy->base)) return PTR_ERR(imx_phy->base); + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + if (!res) { + dev_warn(dev, "Base address for glue layer missing. Continuing without, some features are missing though."); + } else { + imx_phy->glue_base = devm_ioremap_resource(dev, res); + if (IS_ERR(imx_phy->glue_base)) + return PTR_ERR(imx_phy->glue_base); + } + phy_ops = of_device_get_match_data(dev); if (!phy_ops) return -EINVAL; From patchwork Thu Dec 16 16:05:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12681709 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 B81AFC433EF for ; Thu, 16 Dec 2021 16:11:30 +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: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=oGMQExJfSayOH4qRgUEdttOanWp5DoQf6KSAqnVfSF8=; b=zJ/ZHglZc2BlFs l5TURmGcXIjO4+qHg306QBdSrWlqzYEeNGIVyESQda3fDwjHMHkdFTWAlF7khW9TR2ENlp6P2ahf4 e/JVmJQl3QdCLExMOwI9MIcstgxQm2qS6ZXG7xNwPPf8piX6pvWQ6KquPj3W9JQOJ/QOjA/99LtD4 pHlA11k0YTuWcibrq699hFhEQd10L2x1JsiYbRSFje6QuqpyraOXWL4QfdyaL8Cg82Sj7KhpbNskn feeIpDya3jKA52u/ZyS2x1W7f7orahbcapUUnsiTDgMBG+UBDWiJPCmVixQn06lVSUu8Smvmo2BER Jw7enCYTdg8ZaiJl+Ysg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtLt-006Vvt-Vb; Thu, 16 Dec 2021 16:11:29 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxtGW-006TSg-UP; Thu, 16 Dec 2021 16:05:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1639670757; x=1671206757; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cONz2nOUtRuhs7JANm+jEmUdj18wu7MXLwm+z6MjMLs=; b=gH+azwNn5raHvuXMhmmsW7N1CcH30JM452NxFYjNKcaPw2TLlZ4lfbSE mxoGW5l7AoMPEE88sWZsEpsl+HdvU7juXw35SwO+6nhU4dLla+RKBaroC MrpwTN8Idty23/B26BAndexhxuCZfphabDlgrzdiB+gEeEE1VGn7S55ag 0xYgXcSjy5pK59gYCWnfr2Ndllvd7ZyFJiG4kXPLVHumWWAPB6NiCXopO azgUDMgTMQ9FDCtEXaFCGDiXtSSR9cHPJKiov5pSyrwrA3UHVcuxjJrDK WmFwGeMbDXsieL4SjW3CeS49Gavp+s3OL1lF7JjeonaTkMFsHDo4hp45B A==; X-IronPort-AV: E=Sophos;i="5.88,211,1635199200"; d="scan'208";a="21103123" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 16 Dec 2021 17:05:50 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 16 Dec 2021 17:05:50 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 16 Dec 2021 17:05:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1639670750; x=1671206750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cONz2nOUtRuhs7JANm+jEmUdj18wu7MXLwm+z6MjMLs=; b=kEkoPAaiwWtLDz7ayQKA6MTMY4Pjy2JaQu6WAj1GMCvTwZamvQqEFn8q zO7DmdYVdzWsbb7kAOfeGnUECmDDfDuaGEpxWxia+qEyGtYLoD1d5NVnb n0blui9/RnXB/C6ZgoXN/4Qim8J5bj4WCpl3iluvBEgGOfRZajfzdvOck 53Yb85qqe4uyG1XgyoWpustYxjQZ9qEreDo4IuD1nvopddSCJ26lx7t54 PW5mfFax3IyyR3eXzswersF+WO7kehwXuGrELG2okFbVrdUe8F8SCSXDm HHqTVk6PE3RtauordAQdMjIcqV9zaB62jEBmU4m/1Vn/oQIF+uAjX9v0F w==; X-IronPort-AV: E=Sophos;i="5.88,211,1635199200"; d="scan'208";a="21103122" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 16 Dec 2021 17:05:50 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 3F909280075; Thu, 16 Dec 2021 17:05:50 +0100 (CET) From: Alexander Stein To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Alexander Stein , NXP Linux Team , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/3] arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3_phy nodes Date: Thu, 16 Dec 2021 17:05:41 +0100 Message-Id: <20211216160541.544974-4-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211216160541.544974-1-alexander.stein@ew.tq-group.com> References: <20211216160541.544974-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_080557_401649_A9254436 X-CRM114-Status: GOOD ( 12.18 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The USB3 glue layer has 2 areas in the register set, see RM Rev.1 section 11.2.5.2.1 GLUE_usb3 memory map: * USB3 control/status * PHY control/status Provide the memory area to the usb3_phy nodes for accessing the features in the USB3 control area. Signed-off-by: Alexander Stein --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index 6b840c05dd77..4958142da1e4 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -910,7 +910,8 @@ ddr-pmu@3d800000 { usb3_phy0: usb-phy@381f0040 { compatible = "fsl,imx8mp-usb-phy"; - reg = <0x381f0040 0x40>; + reg = <0x381f0040 0x40>, + <0x381f0000 0x20>; clocks = <&clk IMX8MP_CLK_USB_PHY_ROOT>; clock-names = "phy"; assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>; @@ -952,7 +953,8 @@ usb_dwc3_0: usb@38100000 { usb3_phy1: usb-phy@382f0040 { compatible = "fsl,imx8mp-usb-phy"; - reg = <0x382f0040 0x40>; + reg = <0x382f0040 0x40>, + <0x382f0000 0x20>; clocks = <&clk IMX8MP_CLK_USB_PHY_ROOT>; clock-names = "phy"; assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;