From nobody Sun Feb 8 17:13:38 2026 Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CABD51B4F1A for ; Mon, 25 Nov 2024 16:37:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732552665; cv=none; b=rkcptwMXzUBGjCmKPL6Vgs333jOk1SWJzKpCas+vKH+/F+g2Ec7+XtGVVHGEJGTFTXHNNBmazioWO+RYg1bBWGllLmX7MTe3EaZ8YdFt33eRZ/047SAwBYDeWbYol7B/6lV5EuhfQJWsYxly7cEGs9QozaMnPItjqJoZ9x258aI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732552665; c=relaxed/simple; bh=Ho9yE+w80J7VIUHdPNx6owMyuxUaKBtNAwOmDj2W8xQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NuaceRIGcm8/F278H+1BGauH39nEAaoviIxVJtMy9c2XH8sLS6kFpQoHcVKVdbIFDKYEJIa057oy5M3se4MqpVUf9GwsRATRr5JvF5hTFSjntCHJQEU34nE0heIqYYEltHLuToLkxg2pDcLQjg7n/9OcKmQu7WMrv+PGMY1l+x0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linumiz.com; spf=pass smtp.mailfrom=linumiz.com; dkim=pass (2048-bit key) header.d=linumiz.com header.i=@linumiz.com header.b=EwcZSLE5; arc=none smtp.client-ip=44.202.169.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linumiz.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linumiz.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linumiz.com header.i=@linumiz.com header.b="EwcZSLE5" Received: from eig-obgw-6002a.ext.cloudfilter.net ([10.0.30.222]) by cmsmtp with ESMTPS id FMzLt1FbziA19Fc5gtnvqd; Mon, 25 Nov 2024 16:37:37 +0000 Received: from md-in-79.webhostbox.net ([43.225.55.182]) by cmsmtp with ESMTPS id Fc5etSMb665gFFc5ftBZL0; Mon, 25 Nov 2024 16:37:36 +0000 X-Authority-Analysis: v=2.4 cv=Z58nH2RA c=1 sm=1 tr=0 ts=6744a7d0 a=LfuyaZh/8e9VOkaVZk0aRw==:117 a=kofhyyBXuK/oEhdxNjf66Q==:17 a=IkcTkHD0fZMA:10 a=VlfZXiiP6vEA:10 a=-pn6D5nKLtMA:10 a=vU9dKmh3AAAA:8 a=jHB5UwbQy1EK6tLgU6AA:9 a=QEXdDO2ut3YA:10 a=rsP06fVo5MYu2ilr0aT5:22 a=ZCPYImcxYIQFgLOT52_G:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linumiz.com ; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZkaQrEJQKXqjJUPUIzJYYL/fozoFlM4O9eaEZj14tUU=; b=EwcZSLE5Y7T94mFQ+8wbjatkn5 pP4PisXppncniVSlpyNhFVZ4SR70T9cZFSy+M+nBUXyOvhl7p6H2GPNI/ROkJRg/Qsv3j1DSipVRN O7ChBvYyTop5neO+hDDI90+OMYEgFMZQx6alJR+bo2oyLAqn3LZCxg6zQeZIZ8DmFXADmwpFLZ2+Z wIAfOdtxh4vcqnxBiS+KnioSWsMGDt4Jyioe/V6qIe3J1ZwDaWLdjhCmizZmQQZVk1e2PnSChBufD Z9Hkx7d2/fePr/lXN0/MjJ+0uUGfA/oLSr2IfGjtbX33e2TWSAKFAZMBBvJbGl2mAu/IjqOpkNWUO LNSYIbqw==; Received: from [122.165.245.213] (port=38110 helo=[127.0.1.1]) by md-in-79.webhostbox.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1tFc5Z-001iXQ-2q; Mon, 25 Nov 2024 22:07:29 +0530 From: Parthiban Nallathambi Date: Mon, 25 Nov 2024 22:07:03 +0530 Subject: [PATCH 1/2] dt-bindings: gpu: add reset control property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241125-pvr-reset-v1-1-b437b8052948@linumiz.com> References: <20241125-pvr-reset-v1-0-b437b8052948@linumiz.com> In-Reply-To: <20241125-pvr-reset-v1-0-b437b8052948@linumiz.com> To: Frank Binns , Matt Coster , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Parthiban Nallathambi X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732552647; l=764; i=parthiban@linumiz.com; s=20241125; h=from:subject:message-id; bh=Ho9yE+w80J7VIUHdPNx6owMyuxUaKBtNAwOmDj2W8xQ=; b=buSZC0mE82qD1h/SzkH5xIZDHBjoFSR9kNvw2We8/zoqNTYp/mcovVjufRcXBuJG6Vp+QMov1 jDbtSsXSmdACKwUzKF3xbkMLNPcJ5t90ukYAR67bwY0MKgjIXjcVOh+ X-Developer-Key: i=parthiban@linumiz.com; a=ed25519; pk=PrcMZ/nwnHbeXNFUFUS833wF3DAX4hziDHEbBp1eNb8= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - md-in-79.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - linumiz.com X-BWhitelist: no X-Source-IP: 122.165.245.213 X-Source-L: No X-Exim-ID: 1tFc5Z-001iXQ-2q X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([127.0.1.1]) [122.165.245.213]:38110 X-Source-Auth: parthiban@linumiz.com X-Email-Count: 17 X-Org: HG=dishared_whb_net_legacy;ORG=directi; X-Source-Cap: bGludW1jbWM7aG9zdGdhdG9yO21kLWluLTc5LndlYmhvc3Rib3gubmV0 X-Local-Domain: yes X-CMAE-Envelope: MS4xfCvm1HMnFYUEWzwmmghWdyYTeMxM+nQ0twe1tnq5mZ9W0cYBj2M0PJe+dlH1kaYsBur5N/bwFaa1Zx40vUfeh5bAtwZYxNRSkmvJOABh9fOrgWQ+rC8k /kmJhE3Cfry7i+CUNRBbD+eKvD7w1EQu7YREo1V/2aOS/iLW4+nzn2ihdyLQUIRUC77BH2n8BOoomdeAHVNQb15pbSA0/wnz+EI= GE8300 in Allwinner A133 have reset control from the ccu. Add the resets property as optional one to control it. Signed-off-by: Parthiban Nallathambi --- Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml b= /Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml index 256e252f8087..bb607d4b1e07 100644 --- a/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml +++ b/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml @@ -37,6 +37,9 @@ properties: power-domains: maxItems: 1 =20 + resets: + maxItems: 1 + required: - compatible - reg --=20 2.39.2 From nobody Sun Feb 8 17:13:38 2026 Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BD8E1B395F for ; Mon, 25 Nov 2024 16:37:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732552664; cv=none; b=LyRCSBXwuZUBPbCfk3F18hMPs/Lt//lU82lYnG7ClkNk0c6hWe+/TjaKQPX+6DAmp0aXmZwHkXQTSDaPtIj0v4xm7YZdZSHxKB6IeouFPef5YWsBedgqtKCm4ytrmt007oMB3aZamJ27rmgJNozn2FqU4JADRGmsdGzj9S7f4Ws= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732552664; c=relaxed/simple; bh=fOL6L5TlnzXNAKOAwbLxcTtHOaazgxdBU1plUoQ8Jzw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pbefuivVbUtXzbKor/olPk/dPhN9f/YsGWAx0c+qfUY21jyPH7f5+LYzu/1uBfI5lqZqk9Xk1JDN0SAJCXXANTbk2e6R/nB3Wf1+68Mx+mbBubuTRWqa6KTGBhFdMss6fgMrxsjTQ/9OQ/AgU6F3QzQhCm7ekYqbxw3ZNILFhAM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linumiz.com; spf=pass smtp.mailfrom=linumiz.com; dkim=pass (2048-bit key) header.d=linumiz.com header.i=@linumiz.com header.b=MQ98TSnw; arc=none smtp.client-ip=44.202.169.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linumiz.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linumiz.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linumiz.com header.i=@linumiz.com header.b="MQ98TSnw" Received: from eig-obgw-6005a.ext.cloudfilter.net ([10.0.30.201]) by cmsmtp with ESMTPS id FRCet1hxZiA19Fc5ktnvsE; Mon, 25 Nov 2024 16:37:40 +0000 Received: from md-in-79.webhostbox.net ([43.225.55.182]) by cmsmtp with ESMTPS id Fc5ftVS1fxK8vFc5htL97i; Mon, 25 Nov 2024 16:37:38 +0000 X-Authority-Analysis: v=2.4 cv=T/9HTOKQ c=1 sm=1 tr=0 ts=6744a7d2 a=LfuyaZh/8e9VOkaVZk0aRw==:117 a=kofhyyBXuK/oEhdxNjf66Q==:17 a=IkcTkHD0fZMA:10 a=VlfZXiiP6vEA:10 a=-pn6D5nKLtMA:10 a=vU9dKmh3AAAA:8 a=_CNdjClPJo_0AlPSAu4A:9 a=QEXdDO2ut3YA:10 a=rsP06fVo5MYu2ilr0aT5:22 a=ZCPYImcxYIQFgLOT52_G:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linumiz.com ; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gwl6rW5/vPt5JBHz3XIzY0yjV5RcrGlmAAilgoFy4TQ=; b=MQ98TSnwomYCUUnXHh8qPIN7PN guT2WXlfQJF3o7wz9lwrLrmT2sV+0xMr5i3xi5ldOtzWvJcGplaTE7j7q63irxFNEZl7ZkoOoUQhH y/7XnyJvulT7fPPW1oWQBJId0FLENybgIbVOLUMOUUz/2+PG0pSLcLDzYW+Cq+9pRlw7If/vCedSf Mzv2J5oav3E+eMsHES6NP17G8tBKUSiYipwSJQE68hqftT9+2gJbH0i5ezbiW8m0zbt/bYOqnhjxO ETJ6ln+Z9rG8MypNNjF1bEtNGVAFzx/iN5mJrz/KLLltZqN/U1Um85s4Sfc/e7RCnTxZD94rp1czj uDlvU6vg==; Received: from [122.165.245.213] (port=38110 helo=[127.0.1.1]) by md-in-79.webhostbox.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1tFc5b-001iXQ-17; Mon, 25 Nov 2024 22:07:31 +0530 From: Parthiban Nallathambi Date: Mon, 25 Nov 2024 22:07:04 +0530 Subject: [PATCH 2/2] drm/imagination: add reset control support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241125-pvr-reset-v1-2-b437b8052948@linumiz.com> References: <20241125-pvr-reset-v1-0-b437b8052948@linumiz.com> In-Reply-To: <20241125-pvr-reset-v1-0-b437b8052948@linumiz.com> To: Frank Binns , Matt Coster , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Parthiban Nallathambi X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732552647; l=3446; i=parthiban@linumiz.com; s=20241125; h=from:subject:message-id; bh=fOL6L5TlnzXNAKOAwbLxcTtHOaazgxdBU1plUoQ8Jzw=; b=b5t26Ndgj56MR2TOf8LgFXM36QxrcEz5U7oErfYXAw6qN5v+DaZzO20DX4Zb3bWg+evkKxHFo 9guvoLRCY90BWvRlawQIweJXlrhUKyTqVGlXyIyWttA0QtEzkD76Hkh X-Developer-Key: i=parthiban@linumiz.com; a=ed25519; pk=PrcMZ/nwnHbeXNFUFUS833wF3DAX4hziDHEbBp1eNb8= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - md-in-79.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - linumiz.com X-BWhitelist: no X-Source-IP: 122.165.245.213 X-Source-L: No X-Exim-ID: 1tFc5b-001iXQ-17 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([127.0.1.1]) [122.165.245.213]:38110 X-Source-Auth: parthiban@linumiz.com X-Email-Count: 31 X-Org: HG=dishared_whb_net_legacy;ORG=directi; X-Source-Cap: bGludW1jbWM7aG9zdGdhdG9yO21kLWluLTc5LndlYmhvc3Rib3gubmV0 X-Local-Domain: yes X-CMAE-Envelope: MS4xfMH2sKtb9ywg1JvxnP7wCFLr2UXqlIPDxtsVp1BCGlWNLo6b/QBkri+/vwS7Yv3mLiryytO699T9KYEiFtsXw/QGlx9e7Ip84M9YOdURFoBnjNnIUAPa OJpcqQOz09X+VzGjr+7/etZ52sgDgmJlJa/sxze27kHvvl4XwXSChYGgZzbM142DlYUEO5THz7OmyRfZz41W+Se5IX83pasX2Lw= On some platforms like Allwinner A133 with GE8300 includes reset control from reset control unit. Add reset control optionally from the devicetree. Signed-off-by: Parthiban Nallathambi --- drivers/gpu/drm/imagination/pvr_device.h | 8 ++++++++ drivers/gpu/drm/imagination/pvr_drv.c | 5 +++++ drivers/gpu/drm/imagination/pvr_power.c | 16 +++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imagination/pvr_device.h b/drivers/gpu/drm/ima= gination/pvr_device.h index 6d0dfacb677b..21ec7dd64415 100644 --- a/drivers/gpu/drm/imagination/pvr_device.h +++ b/drivers/gpu/drm/imagination/pvr_device.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -131,6 +132,13 @@ struct pvr_device { */ struct clk *mem_clk; =20 + /** + * @reset: Optional reset control + * + * This may be used on some platforms to reset the GPU module/IP. + */ + struct reset_control *reset; + /** @irq: IRQ number. */ int irq; =20 diff --git a/drivers/gpu/drm/imagination/pvr_drv.c b/drivers/gpu/drm/imagin= ation/pvr_drv.c index fb17196e05f4..d9b918410ea9 100644 --- a/drivers/gpu/drm/imagination/pvr_drv.c +++ b/drivers/gpu/drm/imagination/pvr_drv.c @@ -36,6 +36,7 @@ #include #include #include +#include #include =20 /** @@ -1427,6 +1428,10 @@ pvr_probe(struct platform_device *plat_dev) pm_runtime_use_autosuspend(&plat_dev->dev); pvr_watchdog_init(pvr_dev); =20 + pvr_dev->reset =3D devm_reset_control_get_optional_exclusive(&plat_dev->d= ev, "ahb"); + if (PTR_ERR(pvr_dev->reset) =3D=3D -EPROBE_DEFER) + return PTR_ERR(pvr_dev->reset); + err =3D pvr_device_init(pvr_dev); if (err) goto err_watchdog_fini; diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imag= ination/pvr_power.c index ba7816fd28ec..a24ed85f36c7 100644 --- a/drivers/gpu/drm/imagination/pvr_power.c +++ b/drivers/gpu/drm/imagination/pvr_power.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -252,6 +253,9 @@ pvr_power_device_suspend(struct device *dev) clk_disable_unprepare(pvr_dev->sys_clk); clk_disable_unprepare(pvr_dev->core_clk); =20 + if (!IS_ERR(pvr_dev->reset)) + reset_control_assert(pvr_dev->reset); + err_drm_dev_exit: drm_dev_exit(idx); =20 @@ -270,9 +274,15 @@ pvr_power_device_resume(struct device *dev) if (!drm_dev_enter(drm_dev, &idx)) return -EIO; =20 + if (!IS_ERR(pvr_dev->reset)) { + err =3D reset_control_reset(pvr_dev->reset); + if (err) + goto err_drm_dev_exit; + } + err =3D clk_prepare_enable(pvr_dev->core_clk); if (err) - goto err_drm_dev_exit; + goto err_reset_exit; =20 err =3D clk_prepare_enable(pvr_dev->sys_clk); if (err) @@ -301,6 +311,10 @@ pvr_power_device_resume(struct device *dev) err_core_clk_disable: clk_disable_unprepare(pvr_dev->core_clk); =20 +err_reset_exit: + if (!IS_ERR(pvr_dev->reset)) + reset_control_assert(pvr_dev->reset); + err_drm_dev_exit: drm_dev_exit(idx); =20 --=20 2.39.2