From patchwork Mon Apr 3 10:50:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 78494 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2211421vqo; Mon, 3 Apr 2023 04:02:20 -0700 (PDT) X-Google-Smtp-Source: AKy350ZlaNw50xk7aE4elpJzMpUlHM8BS0UD8OgIa7lBgFQtkj7W0u5Rcme9SVlmAjqaebhMX1bd X-Received: by 2002:a17:906:9f1a:b0:947:405a:955f with SMTP id fy26-20020a1709069f1a00b00947405a955fmr13107404ejc.31.1680519740239; Mon, 03 Apr 2023 04:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680519740; cv=none; d=google.com; s=arc-20160816; b=Ws3SHnyf10kBHJm772D6+oab/OX5HlsCNvwL9xjKqS3mMMUziKKTPhA/HAVDikY1d+ X4s4YyjLEsNFZUCiMEtYl2TaCObqsd4jWPFgsxb9Nqxwr3lHul0vcyUajklcGQLciwBi EMGv8VOBoBEew2zXrqTfb0605F2sCGlxF00+4YZI0THb1kakTgVFrMmMplJSElwhe2yC lhVCueimEvOKb/2qXLtWcuXI0xxmrHU8VDNZ1l/c18spQlt1I9qZ34l5pA0DSsdlug/y 2sRww9uPeZiM+lGHDlw+PZEYd0008oIrcsRlFU1MjSF6zWvWNPGS6k8o9mB/TODc3uNU YI1w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=othrvWLOseR2iNmEDqc4+hmmB5BmhnCk3/NZ3yg0TFI=; b=N6JJ2ZUVunXOLA9kjYPJ3ES3+plrK2jJnLMcjE27gpdubIkyArrUe0ZQ/9kDfBSSsF H3arDWwVClxWhszoPg+TN4VBL0FGCSxH6o7Uq/CJKJjzr4smifEtOy3/y8Ce0LByeT6u QsRASIGvx1SGDH813pEAzoAA3ylbsTWzF7pmGc/BSmWu+y5GJH28JCsTpfYudirSJLBl pxbuiSyFtJjoQ0BK0x1vVmryUTzCZCQWnqDtHnUW1dtQPjmXbKBMZepMfIpkYEVdMvYJ D8IIq6yXkP7UPtc1wjwgxKiQwA2a268hNu84DG2BDjaPq8F+NUBhUCRk55+6COHMtYJ6 X1/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fGAnFpQP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q24-20020a170906389800b008d4d102a7bcsi61660ejd.216.2023.04.03.04.01.56; Mon, 03 Apr 2023 04:02:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=fGAnFpQP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232059AbjDCKva (ORCPT + 99 others); Mon, 3 Apr 2023 06:51:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231946AbjDCKvE (ORCPT ); Mon, 3 Apr 2023 06:51:04 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12D1F8690; Mon, 3 Apr 2023 03:51:04 -0700 (PDT) Received: from localhost (unknown [188.27.34.213]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id BD0D16602040; Mon, 3 Apr 2023 11:51:02 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680519062; bh=97JLXa1qL1Q6tXE1ABA2Qq1JziV8s4pj8cdLUcAzWyc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fGAnFpQPICXfoOONO/XSV8hsItw5JzWd7biiPsvvPzz1ud77H2sO0uf/KgHo5bGiR jiuWRlGZdIf41QPiW7LDytgPTzv1m//aW7160vN9iZFceJP1VOlueBcyFK1kZ5tSbI rr/VlFchlyQXHHo02/gNsFas7tme0//yhZwTqYT2f3Rjw0RAtePB7vMRMaLwa/STkI I9jBXGxPQ7gXsJwGcyWd2eJs/cfoguSfBRbmG7TGzXt0giy7c1mmZ1uhwEt62N4/qj C3KT0BHEbOdXP+3OQhLZFomKC0BjiyhoTisdjBsj2o4wlackXczgoCOKzSi5f/LYPm 4U+SDeM+e3JtQ== From: Cristian Ciocaltea To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, kernel@collabora.com Subject: [PATCH 2/2] arm64: dts: rockchip: rk3588-rock-5b: Add pwm-fan Date: Mon, 3 Apr 2023 13:50:52 +0300 Message-Id: <20230403105052.426135-3-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403105052.426135-1-cristian.ciocaltea@collabora.com> References: <20230403105052.426135-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762152666805829869?= X-GMAIL-MSGID: =?utf-8?q?1762152666805829869?= Add the necessary DT changes for the Rock 5B board to enable support for the PWM controlled heat sink fan. Signed-off-by: Cristian Ciocaltea Reviewed-by: Christopher Obbard --- arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index 95805cb0adfa..bd74d9da2c17 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts @@ -17,6 +17,14 @@ chosen { stdout-path = "serial2:1500000n8"; }; + fan: pwm-fan { + compatible = "pwm-fan"; + cooling-levels = <0 95 145 195 255>; + fan-supply = <&vcc5v0_sys>; + pwms = <&pwm1 0 50000 0>; + #cooling-cells = <2>; + }; + vcc5v0_sys: vcc5v0-sys-regulator { compatible = "regulator-fixed"; regulator-name = "vcc5v0_sys"; @@ -27,6 +35,10 @@ vcc5v0_sys: vcc5v0-sys-regulator { }; }; +&pwm1 { + status = "okay"; +}; + &sdhci { bus-width = <8>; no-sdio;