From patchwork Thu Mar 9 14:57:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Stein X-Patchwork-Id: 13167723 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 6E428C64EC4 for ; Thu, 9 Mar 2023 15:16: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: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=QvjW8Fp2P0vRsxCqp6dSXsFQwzVYbiSKHrtw7s95kP4=; b=SQrr6dqmbQQzeQ pFp7wL9ONRdk4nY3HEVAOjY3Od2rMls2ALJoChaHmxZKDEPu1yX2/NrvCHtycBHK14TJsAqoSd6FG 21tZsL1MEKgZtym4W+i5SFF0G67AVZuw7QCjWjm8sbEOeI/Czsxp/+TzesdE3Tq5j32+kH+Pq17JF tndoD97/vLs9nml3u7A6vCVS90Bhfinj4TQctQuzMOSdGU4PEimqL1lNNplNiF3B4xxSESNfRy3/F LNGvzATRKhacBAkz0cJ3lG+0XRiYAR1KLuHwDIv6z0Ggt4YXT33Ls7bVdkGi3Bjl+1kmNoHe1YlB6 RFt97NBSDPwvuABukpNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paHz5-00ApLv-Md; Thu, 09 Mar 2023 15:15:13 +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 1paHiN-00AjKf-TW for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 14:57:58 +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=1678373876; x=1709909876; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oR/xwKtmrr5IPsApLnLyAT5487DcN9NNES2UJbh26bM=; b=olTSk18B89BhUPXBBt4OFO32eGefqsm1tCqcl0tb9BuMMNWUdXR/cw5g mGviApTXmXga0wPmHXZwvspB8uVkXVQgtsQOsU8RDqIf7YTt2PgqUydab YqtYyCXH1WAide+NoZHZ/GxqrTY+OCdFQ2zgdyGm0q8CFT880SUX20F2U KD8JkShMSc8CmmwDaAMJ8s1T2MlmYISq89w5yzhGtevrmkTEXn+BZQOEj lms/5qLDf8+AeuV0w5K8wGxzTHQ2Pb5x2QL4uSBA84IRN02UGHeGv8VrP jGTmjZDikXF5yGjM6xDXmBGXPfSrTL+xxJNbaQ/IqhJg5FJ+LQFLGwyW3 w==; X-IronPort-AV: E=Sophos;i="5.98,246,1673910000"; d="scan'208";a="29583580" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 09 Mar 2023 15:57:54 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Thu, 09 Mar 2023 15:57:53 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Thu, 09 Mar 2023 15:57:53 +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=1678373874; x=1709909874; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oR/xwKtmrr5IPsApLnLyAT5487DcN9NNES2UJbh26bM=; b=K4+HtOwW6CBhLaid9JCadBxJj+lye4pvIirLiygoYBNyVWE3aeKYgBQL YIsmDsKOu1G49XJs1tCsXgrtaKL2ir7ODFKx1riYwg+RP0+RxWmKhWBx7 o+LXQZs1D3IA9qPBuwmKAj9X4Gdmp5IHmXEbNejR/kXcmd0INnIaHsTSA X/6BSmCz37m5cs6KksoQDO6/SZbhtReEZxT44XzzMFaiXRsVmJCf20N/H lL5MIQBXOsBNhplWwQ8lST0QmgJQOz0tjQPXalo+aQJP5o+iD1wklkW2n kFQEGaIPcg3xSpq5tO+ywEFAC3PamBp7fWBByqfL6Q/Na70OsCR6ua5ya A==; X-IronPort-AV: E=Sophos;i="5.98,246,1673910000"; d="scan'208";a="29583579" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 09 Mar 2023 15:57:54 +0100 Received: from steina-w.localnet (unknown [10.123.53.21]) (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 7ED5A280056; Thu, 9 Mar 2023 15:57:53 +0100 (CET) From: Alexander Stein To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Cc: Pengutronix Kernel Team Subject: NOC (interconnect) lockup on i.MX8MP during resume Date: Thu, 09 Mar 2023 15:57:50 +0100 Message-ID: <2176690.usQuhbGJ8B@steina-w> Organization: TQ-Systems GmbH MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230309_065756_385942_3B1D1F4A X-CRM114-Status: GOOD ( 11.19 ) 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 Hi, while debugging another issue regarding suspend/resume I noticed that the imx interconnect driver locks up the system when writing into registers. This happens during resume of the 'g2' power domain. imx8m_blk_ctrl_power_on() will eventually call down to imx_icc_node_set(). Using the debug diff furthe down I get this output: [ 71.493062] imx_icc_node_set: node: VPU G2 [ 71.497163] imx_icc_node_set: peak_bw: 1 [ 71.501091] imx_icc_node_set: prio: 0x80000303 Unfortunately there is absolutely no documentation regarding NOC in the reference manual, so no idea whats happening here. This is on next-20230309 using imx8mp-tqma8mpql-mba8mpxl.dts with USB disabled (prevents suspend) and Ethernet-PHY-IRQ disabled (the issue I'm tackling). Is there some idea what do in order to support resume on i.MX8MP? Best regards, Alexander ---8<--- ---8<--- diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 979ed610f704..93ec79cc7c06 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -44,13 +44,18 @@ static int imx_icc_node_set(struct icc_node *node) u32 prio; u64 freq; + pr_info("%s: node: %s\n", __func__, node->name); + pr_info("%s: peak_bw: %u\n", __func__, node->peak_bw); if (node_data->setting && node->peak_bw) { base = node_data->setting->reg + node_data->imx_provider->noc_base; if (node_data->setting->mode == IMX_NOC_MODE_FIXED) { prio = node_data->setting->prio_level; prio = PRIORITY_COMP_MARK | (prio << 8) | prio; + pr_info("%s: prio: %#x\n", __func__, prio); writel(prio, base + IMX_NOC_PRIO_REG); + pr_info("%s: mode: %#x\n", __func__, node_data->setting->mode); writel(node_data->setting->mode, base + IMX_NOC_MODE_REG); + pr_info("%s: ext_control: #%x\n", __func__, node_data->setting->ext_control); writel(node_data->setting->ext_control, base + IMX_NOC_EXT_CTL_REG); dev_dbg(dev, "%s: mode: 0x%x, prio: 0x%x, ext_control: 0x%x\n", node_data->desc->name, node_data->setting->mode, prio,