Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1638479rdh; Sat, 28 Oct 2023 00:55:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJEbsXrThHMK/aatQjxdM1cqVw/DzgHe443h+pXunfojxPhiX5DFrsNY7J1BSBAhUraY4t X-Received: by 2002:a05:6a21:198:b0:140:3aa:e2ce with SMTP id le24-20020a056a21019800b0014003aae2cemr6838840pzb.42.1698479704446; Sat, 28 Oct 2023 00:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698479704; cv=none; d=google.com; s=arc-20160816; b=LvTKipkuM/VySDsPIbTiOk8vOz3HS5BgDHWQXiR9a85zNFu1OWumOIuV/fhpj/UlLw X9jhpXmT7cF3odsCu2y2uUXVGUKsW2q/cXg7uJfkFWjzBqhUuUiqyhxgsgdf64zlCJev huatfrx2Zn1++kB2XTpjzDCuGTJ+YNIXn1yvboupRY7Kvnj1jJjqjgXN/zcabFTxW5m7 oEojdPNNUWcQEvcBVCa0Si/DWnZ/Wtg4nSmRLUw1qTOSBViWWwYrIX0WzIqeytQW2GS3 NEOcBDy0Kx2LjVp7hLGrN9HEuJviAQBAt7Tl2BZn/qtg5lx9ndPPSGjyh22iXInowegB ayCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HWNJsQxt66edieq3NUjONu874gZwqx0vvF3MCSn9U9E=; fh=JX4hMbFwumCpqj0uc+xcdGEifWiHPJs2VjbxBS6bcRg=; b=K8+QqXwaQNFjxQfhOdzWGcaZwm+CDPQAWniyyNTWLItY6hfoHICJZRsQtEBTlYvmw3 EZC07YaTxwS/AXvo8qfEN4YZ5B/mDrIjU3YQgRAYsGQDun9Uco5ipLrYh7qnnkn9yrF9 icTM3Kp2fbffsvhx92UPfq7eqiNMTVtna4llPUbeFfcRiZilRxP6K5dkdhUeSTxoBMyQ 2pi31IsWY7AJM4yK/QqjklbRCYzdpccMgIWWUm1PLH067xpf8C2yMjVXPdu5NxzMFh/0 oAVrrOUJcaLVosp3Sgq5nCxre8E3R43qnqPZQiho2mR9vo0HmL+hVx8VA9K73GZr6yw4 KG1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CzHS1bE8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id 9-20020a630209000000b00578a7f5a0afsi2132512pgc.357.2023.10.28.00.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 00:55:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CzHS1bE8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 1CFA1824E0E9; Sat, 28 Oct 2023 00:55:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbjJ1Hyz (ORCPT + 99 others); Sat, 28 Oct 2023 03:54:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjJ1Hyy (ORCPT ); Sat, 28 Oct 2023 03:54:54 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2213AF2; Sat, 28 Oct 2023 00:54:52 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso4329131e87.1; Sat, 28 Oct 2023 00:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698479690; x=1699084490; 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=HWNJsQxt66edieq3NUjONu874gZwqx0vvF3MCSn9U9E=; b=CzHS1bE84rwOQuiZ2YP3IJIVIEt8f2U64UuZMM5XsV/RznCyMnrZZPJVCCYQpC1Iaw 6QdjWvns74jnpjSuUSwYN3s8qGMmC1r0FX1RrYMtjJakW9C6rpv8qWs+yo71dpyCBYaj EchXoiIcqmMHluv/JwKiql2CQ1L0YIQtq2UKmkfMy/kPYz1hKzvVGJglM73yUzfZSlRT uzC7VkqrrcnYxuE94nZHMyWMARPgbsXsHe3Od8ueTZrIOvrgj/HvIPFTQe2x7fm5sRu1 HqKQlpR0fdK9kJLnIrFA4xdFp69ImAeIQSWmXbBAThVXrbFJUoAAZQwDTBIzGjdpSz4l Lg3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698479690; x=1699084490; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HWNJsQxt66edieq3NUjONu874gZwqx0vvF3MCSn9U9E=; b=F29VUGRlv8hC8Yqdt9VYcwVtqYdqiul32Rt8HiXghW7FMZdRu3UG5uaeq6p5PH1Kvo 6WPMGii9qkfwpJRh6MFmWCRjF6DctGYeL2O8AZhPXqlJ2unyDeB301OpOzLUxMfB/4Y5 HcoTQrCCP/kXGWmLfg0SHUC28ZoOW3ol5DlwDXe8lPIE5LdqEQV3zqPRsiD2wPGqhfcX 3yv5fIUc9GrdFIIS/a+2OoIILkSv9idblNDfjNm53b7q3C9gHP2k370RETKs10TsDTfc ncKzxbJHvBxDSiAb7WDZryV0e0+ddTRbYfLFU2kESXJ9lbbD9QG25I3G3+KJEZucsIBq DBIA== X-Gm-Message-State: AOJu0YxMu3cxehcCf1bsWuK51+JrqPJq7rMDFfTjBjs+B/77IncTLJab DGftQseXbagwY7T0Zj8GS8E= X-Received: by 2002:a19:8c19:0:b0:507:b9e9:3e8d with SMTP id o25-20020a198c19000000b00507b9e93e8dmr3529803lfd.28.1698479690039; Sat, 28 Oct 2023 00:54:50 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id n15-20020a5d4c4f000000b0032f7e832cabsm250845wrt.90.2023.10.28.00.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 00:54:49 -0700 (PDT) From: Christian Hewitt To: Rob Herring , Krzysztof Kozlowski , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Hewitt , Yuntian Zhang Subject: [PATCH] arm64: dts: meson: radxa-zero2: add pwm-fan support Date: Sat, 28 Oct 2023 07:54:45 +0000 Message-Id: <20231028075445.3515664-1-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 28 Oct 2023 00:55:02 -0700 (PDT) The A311D on Zero2 needs active cooling and the board includes a header to connect a simple fan. Add pwm-fan support with basic thermal properties so the fan runs when connected. Suggested-by: Yuntian Zhang Signed-off-by: Christian Hewitt --- .../dts/amlogic/meson-g12b-radxa-zero2.dts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts index 890f5bfebb03..895b6ea67180 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts @@ -33,6 +33,15 @@ memory@0 { reg = <0x0 0x0 0x0 0x80000000>; }; + fan0: pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; + cooling-min-state = <0>; + cooling-max-state = <4>; + cooling-levels = <0 64 128 192 255>; + pwms = <&pwm_AO_ab 0 40000 0>; + }; + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -286,6 +295,24 @@ &cpu103 { clock-latency = <50000>; }; +&cpu_thermal { + cooling-maps { + map0 { + trip = <&cpu_passive>; + cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + +&ddr_thermal { + cooling-maps { + map0 { + trip = <&ddr_passive>; + cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + &frddr_a { status = "okay"; }; -- 2.34.1