From nobody Sat Feb 7 15:59:57 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F36292BF006 for ; Sun, 25 Jan 2026 18:12:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769364781; cv=none; b=Yb7aznspSVTMZRhbzqYRs2e9bTX4BJxOdpCJZFlVF14U41J93E1yBZozK/GqMqy9uVrYdQBtLGCVy4A5UNm8tDkon5iOv3z6rXklA7jGJn6SkiY/+5eKM7tYP5HTxrVe3dKZBZqbWuQ8S7cEzqwBwKy1FdYeWthbwmvUPYN98Mw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769364781; c=relaxed/simple; bh=K/tlQ4PyynKHOkqZ6O8CCgQMCglnXCVZ3PU/lDcyZR0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=fz8hnE7HAVDjjc+9ayWpXCV1QXLyoFO8pVXf0OkDvUxFcPjxiX37yXms+cOF0j6tuehl87PeX8VMXIBd4MY1MOMItrcrSXM25utXXp0Kgzev9GOb18+TlqsgZxg4pIJy3HL1YWbM66fNSLqvQwOM4LenNpguBdJfA0M9yKjaq0g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KPx5jyYj; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KPx5jyYj" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-48049955f7fso31899685e9.0 for ; Sun, 25 Jan 2026 10:12:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769364778; x=1769969578; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+KgUVWqzHwJ5YQYyVy8QnSy/op2C+C4KeJA5ZeUsIuI=; b=KPx5jyYjL/4cvNSH9U1H1qPEJZijQLSvAPMoIMxpxG5E1hJywIMRL0XlyJALNt+QAZ HvBvXe3QSZP3Pc/AubSXeSOIumY7zEdNEfjFpuPFOmw6/FyjhqPf7YKkV6d4p/zKq0ei Z9Cwt03hCIaiEdgcLHwmA2YSMoAQ5gcgj8oIBC/48Nd4DE501LBNJvez1kC4p8bpuKpC 5jVh2a1bS74TKpF2mEeckg/7JQZNN8d1rgenMA3t3pCO0Vegws2FjgMFb9r9RKcsrMH1 6KlYKNBg+2lLSJT44dTVJcA4+WyiAWLxOHIYnE8DR8NMwafsrghQOx7IvqxZ1wpdOqrG J1Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769364778; x=1769969578; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+KgUVWqzHwJ5YQYyVy8QnSy/op2C+C4KeJA5ZeUsIuI=; b=T57QZowPIFcnRD7GDD8zTeiXE2doV373cP68cioOg+l3jrE2IBVurSRLn6jUo4oaLa tLgj+ONjR16NbRPQxf9G87xNgigmuNzkSnyqRIWYBQwwLdh4CVr8cbq1yGhI+uYqRdF8 eLOwjSjDqIbrPkTF8CeZ3Obke263+mtLT8mteTxB9VEHhBNuzPDJ9WoHeBe5qESul6QF IwmI9nOrBxf3uU0L6esGYXQIjHEdx0Oq7Pnn5dN6ArcQ51Ip83ryQ05plAjDCdRMF1yc hCe7mSCRU41tWXIRb8d7AbTX2ma83sI4G8jtIaH57BgYAnFRSsRm7+NbyaCx5NhmryEc N7Mw== X-Forwarded-Encrypted: i=1; AJvYcCV6IR2+QrTIWVrlswLSwqW1dG7nRuc1CGg9IQ5xXdSaAndsGzIxihIEDe5Vyyq+O7+lrltZkOVfaLE708s=@vger.kernel.org X-Gm-Message-State: AOJu0Yz/vx3vVhOS/dz9QmGEKevEDRnmRYUe8e1PkFiWbDYZfYwmkoaj AyT+2XmqRuHXGh1KnKNKIWkAeozQxZsgYfAWeOQBgXUnbvoPfYDia2T1 X-Gm-Gg: AZuq6aJ8b9ZrB973338odftJG0695ynlXJJ0LdVjPkIkVQYDcfUUlusCuRvHWi6MQ4N v0tyVng9eCr2KTZ900blhoHVIg5DV6KnYBTLDPd/6s5w5ccIAQesIxes/+u/NAa42RtmCre7Sqw KdtBP4c48IyVJXHu/Pu2vDct1OrtmGhEY9dRbnUBglP/7CS5XFgFjpAdp7HAYIpO+k+4BszFPys PjZljtsEYOCjR8wlEKOa42PUcnl0oNRQUabUI/pZzOwWdjpJOUWsoh7rdhkUcBOuF0QXWTMcSVU cUUvpq0IG3WgMi4TYFQPe4AicujaxkcJ3XLDsY7H7aoTLTlszyrfBNo2xBseb3De+bphsl96ckf LQAht3cjmhg8OePBV8UN/A9tBl8PyBZY9D/ORGNNRIu37fweDZqzczv7s2i4PNg3ZDDt/kTcOb7 1eY9MF7ms/YS19XtXq8OKird4rt6sEZKPavF0tFjaIPg== X-Received: by 2002:a05:600c:b96:b0:480:4d39:84b3 with SMTP id 5b1f17b1804b1-4805cd4090fmr36093185e9.6.1769364778155; Sun, 25 Jan 2026 10:12:58 -0800 (PST) Received: from apple.sigmaris.info ([2a02:8010:6606:0:fd30:74ec:a5b0:107a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4804d8a5b67sm215302305e9.10.2026.01.25.10.12.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jan 2026 10:12:57 -0800 (PST) From: Hugh Cole-Baker To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Dragan Simic , Alexey Charkov , Hugh Cole-Baker , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] arm64: dts: rockchip: add pwm-fan for NanoPC-T6 Date: Sun, 25 Jan 2026 18:10:14 +0000 Message-ID: <20260125181228.25145-1-sigmaris@gmail.com> X-Mailer: git-send-email 2.50.1 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 FriendlyELEC offers an optional heatsink and fan addon [1] for the NanoPC-T6 and T6 LTS, which plugs in to the fan connector on the board driven by pwm1. Add the fan as an active cooling device for the SoC package. The PWM duty cycle values are taken from the vendor's source [2]. Signed-off-by: Hugh Cole-Baker [1]: https://www.friendlyelec.com/index.php?route=3Dproduct/product&product= _id=3D305 [2]: https://github.com/friendlyarm/kernel-rockchip/blob/4944602540b62f5aad= 139fe602a76cf7c3176128/arch/arm64/boot/dts/rockchip/rk3588-nanopi6-rev01.dt= s#L75-L90 Reviewed-by: Dragan Simic --- Changes from v2: https://lore.kernel.org/linux-rockchip/20251109192128.7252= 7-1-sigmaris@gmail.com/ * Set trip points to 55 and 65=C2=B0C (Dragan) Changes from v1: https://lore.kernel.org/linux-rockchip/20251026194858.9246= 1-1-sigmaris@gmail.com/ * add the fan to the base board dtsi instead of overlay (Heiko) * just use 2 trip points for warm and hot temperatures (Dragan, Alexey) .../boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm6= 4/boot/dts/rockchip/rk3588-nanopc-t6.dtsi index 90e7fe254491b..84b6b53f016ab 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "rk3588.dtsi" =20 @@ -89,6 +90,14 @@ usr_led: led-1 { }; }; =20 + fan: pwm-fan { + compatible =3D "pwm-fan"; + cooling-levels =3D <0 35 64 100 150 255>; + fan-supply =3D <&vcc5v0_sys>; + pwms =3D <&pwm1 0 50000 0>; + #cooling-cells =3D <2>; + }; + sound { compatible =3D "simple-audio-card"; pinctrl-names =3D "default"; @@ -590,6 +599,36 @@ &i2s6_8ch { status =3D "okay"; }; =20 +&package_thermal { + polling-delay =3D <1000>; + + trips { + package_warm: package-warm { + temperature =3D <55000>; + hysteresis =3D <2000>; + type =3D "active"; + }; + + package_hot: package-hot { + temperature =3D <65000>; + hysteresis =3D <2000>; + type =3D "active"; + }; + }; + + cooling-maps { + map0 { + trip =3D <&package_warm>; + cooling-device =3D <&fan THERMAL_NO_LIMIT 1>; + }; + + map1 { + trip =3D <&package_hot>; + cooling-device =3D <&fan 2 THERMAL_NO_LIMIT>; + }; + }; +}; + &pcie2x1l0 { reset-gpios =3D <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; vpcie3v3-supply =3D <&vcc_3v3_pcie20>; --=20 2.50.1 (Apple Git-155)