From patchwork Thu Nov 25 10:41:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 12693627 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 132C0C433EF for ; Thu, 25 Nov 2021 10:43:56 +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: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:In-Reply-To:References: List-Owner; bh=1aXLmEJ0qybstSBMfbFCagfXK9uvouievkD0mAfM3N8=; b=xQrtxOq4fehAVi LsVS+vgUJf62SkgzvG3kLPg6MPnnpR+VlADPQ/7S0mTCKBAhM5m6zbLdigW+Cae0MKeYVdlfBlnfX lNcVl/0VAw4OG7KtEUAZq7YDIrvbIW4wuBC+rdAU/Syv8N22t7YR+rzodJIxsKkllBaeMRPPrkgqd j01eYQsHvPx2cIs3HL8qocjmQrCZAvhOSJ423iq0vN9/kWyJt3vSf9DK8m1eKTaLTLoURMbUVZbP1 wsH6umWDg/Y9By1j9s2y2XQbkXDenM0H4wsI9901aqTnrVbGZkwKqjG/KHrTQIuv7fph9GIvFS2ZL fH5p84vnjQjQV5PNv2jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqCC3-0076MN-EY; Thu, 25 Nov 2021 10:41:31 +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 1mqCBt-0076Lc-JR for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 10:41:29 +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=1637836884; x=1669372884; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=pztQnbrwCx68JVTd7OT6gI7AxNaPkGR0G99HUWRYEPI=; b=ZAzHtRSVsSWX7wdPUYUK//dPSPOwQusuiSJ9mzZmUs7maqRYR4D7JA0O zeP693SsdTkO0hZAS+AHp0WHnh1Uj5beiZxIFzuWFgAU1z9wesueAqvK3 Gim5ZSnyvUxcGJhVk8AxI9dxJpmsBzKYNWnTGlqNQA/kWJAkhRmx0mhCw 7k5PYwY+XMJyyKEYebhgQ6I1KKpD3ZDasntCwnUtOoxVxPs9r1ktniBV6 /5zSCPCX6MJjIOz5BxIGq1UkqJNf9zRxIf96T/E7qisuw5RGkpqj1zpTj a+wKCCWerouNbeOXUnH72jtQ3nvl4ENv1dd/6tOS7ky7bFX0b6XcSMNay g==; X-IronPort-AV: E=Sophos;i="5.87,263,1631570400"; d="scan'208";a="20673120" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 25 Nov 2021 11:41:13 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 25 Nov 2021 11:41:13 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 25 Nov 2021 11:41:13 +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=1637836873; x=1669372873; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=pztQnbrwCx68JVTd7OT6gI7AxNaPkGR0G99HUWRYEPI=; b=aueM0Rc5r3YcsTl/XwhBiKLlFXiXp4n8NF1Lhl5yrhb/UvKARA3jU8tO LOry3bcNR9Xgp+lQs0eJI7UoHtT1rO7Ssn41jB4o/mosOSkRidNfwvhQW TYE19Gz4Aphu213NHChR86TZKovCveQU5Arpxv3p3DYifQD0NAParnFxr TEAapXL58Y+jvZEUncDBayURimYQfQUnAy6hPR0r85rENQpbNRnQoix+I tL1fLtF5Zp//gQIQXqL7koATvboBMbMgTPK6oZ/hK/s/7iHZO5s9gUJBr mjJvcVl8TCn7JpIqJ/PoQWENNu8gT79hO2AnpByqyHQ2V4kP7t71N+I5n g==; X-IronPort-AV: E=Sophos;i="5.87,263,1631570400"; d="scan'208";a="20673119" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 25 Nov 2021 11:41:13 +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 B612B280065; Thu, 25 Nov 2021 11:41:13 +0100 (CET) From: Alexander Stein To: Shawn Guo , Sascha Hauer Cc: Alexander Stein , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [RFC PATCH 0/2] i.MX8MP: more USB3 glue layer feature support Date: Thu, 25 Nov 2021 11:41:02 +0100 Message-Id: <20211125104104.1416523-1-alexander.stein@ew.tq-group.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-20211125_024127_888481_373536D4 X-CRM114-Status: GOOD ( 17.25 ) 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 This patchset aims to support flags for e.g. over-current active low or port permanantly attached which are provided in the USB3 glue layer. There is already a glue layer driver dwc3-imx8mp, but unfortunately this driver does not use the glue area at all, it only handles wakeup-support which is done in the HSIO BLK_CTRL area (0x32f10100), accordingly the driver only uses the hsio clock. The driver which actually uses the USB3 glue area is phy-fsl-imx8mq-usb. As the name indicates PHY is configured in the corresponding registers, which are part of the USB3 glue layer. This make is it unclear for me which driver should handle the required features above. dwc3-imx8mp, the glue layer driver, does not touch the glue area at all, but the HSIO BLK_CTRL area. phy-fsl-imx8mq-usb only touches the PHY registers in the glue layer. Neither does map the USB3 control register from the glue layer. I would like to get some feedback which approach should be done. The proposed patchset adds the support to the PHY driver for the simple reason, that phy clock is already used. Although semantically the glue layer driver makes more sense. In either case there is need for additional memory areas (and possibly clocks) which need to be made optional to support previously released device trees. I actually don't know what's the best way to add (optional) support for new memory areas in DT/drivers. Thanks for any feedback and best regards, Alexander Alexander Stein (2): phy: fsl-imx8mq-usb: Add support for setting fsl specific flags arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3_phy nodes arch/arm64/boot/dts/freescale/imx8mp.dtsi | 6 ++- drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 60 ++++++++++++++++++++++ 2 files changed, 64 insertions(+), 2 deletions(-)