{"id":2225187,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2225187/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pwm/patch/20260420-rk3576-pwm-v5-6-ae7cfbbe5427@collabora.com/","project":{"id":38,"url":"http://patchwork.ozlabs.org/api/1.1/projects/38/?format=json","name":"Linux PWM development","link_name":"linux-pwm","list_id":"linux-pwm.vger.kernel.org","list_email":"linux-pwm@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260420-rk3576-pwm-v5-6-ae7cfbbe5427@collabora.com>","date":"2026-04-20T13:52:43","name":"[v5,6/6] arm64: dts: rockchip: Add cooling fan to ROCK 4D","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"45f4094731118f8be4bff80ff3bcf6c88fe9de63","submitter":{"id":90188,"url":"http://patchwork.ozlabs.org/api/1.1/people/90188/?format=json","name":"Nicolas Frattaroli","email":"nicolas.frattaroli@collabora.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pwm/patch/20260420-rk3576-pwm-v5-6-ae7cfbbe5427@collabora.com/mbox/","series":[{"id":500617,"url":"http://patchwork.ozlabs.org/api/1.1/series/500617/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pwm/list/?series=500617","date":"2026-04-20T13:52:37","name":"Add Rockchip RK3576 PWM Support Through MFPWM","version":5,"mbox":"http://patchwork.ozlabs.org/series/500617/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225187/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225187/checks/","tags":{},"headers":{"Return-Path":"\n <linux-pwm+bounces-8658-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pwm@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com\n header.a=rsa-sha256 header.s=zohomail header.b=diKJZQKQ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-pwm+bounces-8658-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=collabora.com\n header.i=nicolas.frattaroli@collabora.com header.b=\"diKJZQKQ\"","smtp.subspace.kernel.org;\n arc=pass smtp.client-ip=136.143.188.112","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=collabora.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=collabora.com"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzpTb3FjJz1yD4\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 00:56:19 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id A4583304D0DA\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 14:47:58 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 4DB103242B2;\n\tMon, 20 Apr 2026 13:54:17 +0000 (UTC)","from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com\n [136.143.188.112])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id A660231E83D;\n\tMon, 20 Apr 2026 13:54:15 +0000 (UTC)","by mx.zohomail.com with SMTPS id 1776693229607341.23138685458855;\n\tMon, 20 Apr 2026 06:53:49 -0700 (PDT)"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776693257; cv=pass;\n b=aL4Jnkb3oQWVvd23fcR7E5wZx31qr/5Piwnw/Rk9qYzuP2yATHEdmSvn7xuEHCz+WZ+2FvskNhsEJEP+2fyh1mV+/f/vVj9mymXVlv6DTK2Cd3L7HijcWB5FQ+U3CIxdwQ/+yC80CMF08dMZZkFoHrAExkEU/223DEEBafr1rik=","i=1; a=rsa-sha256; t=1776693232; cv=none;\n\td=zohomail.com; s=zohoarc;\n\tb=ZmRGHhCbVVuntIQN7Lwlw8IHc47PIo9QgzlRXcIOHN1ifbnllB7EL07s2o/T+lVGBVlXcHXQv0vGu0swmOsfkpxB3FzHHc4vyrjEUlWibDWgRNvB2UhV56CcfIKKFLVdMaIiMAlXMG2JID2jBkOgwCshHTFgr1GqpEMTB4Un8ac="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776693257; c=relaxed/simple;\n\tbh=7nxH65M+nVV6F8JGySK3S8PzTWwDQbriCEZGH0kEsio=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=BLtrjzkvpxOyl1MHDqKg/u4jhIdyppo8Sssdyjg+ecMq1TIZOhaejiQbneQvEvQrd2zKHFWsEJyQXXm6LTX/HvS5tZKgAGJSQMviqllYV+cHQa/bjEYlNmDBdLuw5jv5T8L566MyNTV8uUJ42Xd8nH4b4Ykok0/PEPa/puyyPSU=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;\n s=zohoarc;\n\tt=1776693232;\n h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=r4cDyWh6L3sYfjSwYgHFLsyc+ptcJlt/BspUsjzlPPc=;\n\tb=a5NFLqCLaZt8JyFsHCyRJC0Nvrkj1dfRcg3lsoWEmjcSAvBbrd0Afd68nf7Oklpv2jc+HA2GwVgrIgubqW1nzbj3RfwtP5KOQwFylFIpfinJQ4rhqUdiXW0q8V7SHgPjVCBMQOxOqz8sizHxCpap0LgY0MpJfqAX1gByczcDAb8="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=collabora.com;\n spf=pass smtp.mailfrom=collabora.com;\n dkim=pass (1024-bit key) header.d=collabora.com\n header.i=nicolas.frattaroli@collabora.com header.b=diKJZQKQ;\n arc=pass smtp.client-ip=136.143.188.112","i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=nicolas.frattaroli@collabora.com;\n\tdmarc=pass header.from=<nicolas.frattaroli@collabora.com>"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1776693232;\n\ts=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com;\n\th=From:From:Date:Date:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Message-Id:References:In-Reply-To:To:To:Cc:Cc:Reply-To;\n\tbh=r4cDyWh6L3sYfjSwYgHFLsyc+ptcJlt/BspUsjzlPPc=;\n\tb=diKJZQKQ2PpHUhWXUMICWt4DiEYfNOX1onWvh6SxNmsKKVeFvouD/3vXnnmRsw3e\n\t3jTszb8usASmgBb4s4ThmT1nu5QUi+b8JTlpKdLnPeMKDnwR8VW0jDONwK5qnGoydgC\n\tNgxXJXuzOWAx5c8RyovPTJB6YvHfQB2Eb/KhLuOY=","From":"Nicolas Frattaroli <nicolas.frattaroli@collabora.com>","Date":"Mon, 20 Apr 2026 15:52:43 +0200","Subject":"[PATCH v5 6/6] arm64: dts: rockchip: Add cooling fan to ROCK 4D","Precedence":"bulk","X-Mailing-List":"linux-pwm@vger.kernel.org","List-Id":"<linux-pwm.vger.kernel.org>","List-Subscribe":"<mailto:linux-pwm+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pwm+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20260420-rk3576-pwm-v5-6-ae7cfbbe5427@collabora.com>","References":"<20260420-rk3576-pwm-v5-0-ae7cfbbe5427@collabora.com>","In-Reply-To":"<20260420-rk3576-pwm-v5-0-ae7cfbbe5427@collabora.com>","To":"=?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <ukleinek@kernel.org>,\n  Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,\n  Conor Dooley <conor+dt@kernel.org>, Heiko Stuebner <heiko@sntech.de>,\n  Lee Jones <lee@kernel.org>, William Breathitt Gray <wbg@kernel.org>,\n  Damon Ding <damon.ding@rock-chips.com>","Cc":"Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,\n kernel@collabora.com, Jonas Karlman <jonas@kwiboo.se>,\n Alexey Charkov <alchark@gmail.com>, linux-rockchip@lists.infradead.org,\n linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,\n linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n linux-iio@vger.kernel.org","X-Mailer":"b4 0.15.2"},"content":"The ROCK 4D has a header to connect a small cooling fan. This fan is\ndriven by one of the SoC's PWM outputs driving a transistor, that in\nturn controls the fan's power.\n\nWith the introduction of PWM support, add a description of this cooling\nfan, as well as the additional trips and cooling-maps for it.\n\nSigned-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>\n---\n arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts | 50 +++++++++++++++++++++++++\n 1 file changed, 50 insertions(+)","diff":"diff --git a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts\nindex 899a84b1fbf9..2d5ede010ad0 100644\n--- a/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts\n+++ b/arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dts\n@@ -45,6 +45,14 @@ rfkill {\n \t\tshutdown-gpios = <&gpio2 RK_PD1 GPIO_ACTIVE_HIGH>;\n \t};\n \n+\tfan: pwm-fan {\n+\t\tcompatible = \"pwm-fan\";\n+\t\tcooling-levels = <0 180 205 230 255>;\n+\t\tfan-supply = <&vcc_5v0_sys>;\n+\t\tpwms = <&pwm2_8ch_5 0 60000 0>;\n+\t\t#cooling-cells = <2>;\n+\t};\n+\n \tleds: leds {\n \t\tcompatible = \"gpio-leds\";\n \t\tpinctrl-names = \"default\";\n@@ -711,6 +719,36 @@ rgmii_phy0: ethernet-phy@1 {\n \t};\n };\n \n+&package_thermal {\n+\tpolling-delay = <100>;\n+\n+\ttrips {\n+\t\tpackage_fan0: package-fan0 {\n+\t\t\ttemperature = <50000>;\n+\t\t\thysteresis = <2000>;\n+\t\t\ttype = \"active\";\n+\t\t};\n+\n+\t\tpackage_fan1: package-fan1 {\n+\t\t\ttemperature = <60000>;\n+\t\t\thysteresis = <2000>;\n+\t\t\ttype = \"active\";\n+\t\t};\n+\t};\n+\n+\tcooling-maps {\n+\t\tmap1 {\n+\t\t\ttrip = <&package_fan0>;\n+\t\t\tcooling-device = <&fan THERMAL_NO_LIMIT 1>;\n+\t\t};\n+\n+\t\tmap2 {\n+\t\t\ttrip = <&package_fan1>;\n+\t\t\tcooling-device = <&fan 2 THERMAL_NO_LIMIT>;\n+\t\t};\n+\t};\n+};\n+\n &pcie0 {\n \tpinctrl-names = \"default\";\n \tpinctrl-0 = <&pcie_reset>;\n@@ -720,6 +758,13 @@ &pcie0 {\n };\n \n &pinctrl {\n+\tfan {\n+\t\tfan_pwm: fan-pwm {\n+\t\t\trockchip,pins =\n+\t\t\t\t<4 RK_PC5 14 &pcfg_pull_down_drv_level_5>;\n+\t\t};\n+\t};\n+\n \thym8563 {\n \t\thym8563_int: hym8563-int {\n \t\t\trockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;\n@@ -770,6 +815,11 @@ wifi_en_h: wifi-en-h {\n \t};\n };\n \n+&pwm2_8ch_5 {\n+\tpinctrl-0 = <&fan_pwm>;\n+\tstatus = \"okay\";\n+};\n+\n &sai6 {\n \tstatus = \"okay\";\n };\n","prefixes":["v5","6/6"]}