From patchwork Tue Mar 12 09:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1910926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tv88V6Q2Zz1yWy for ; Tue, 12 Mar 2024 20:52:58 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rjyoQ-0002UM-Ed; Tue, 12 Mar 2024 09:52:47 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rjyoJ-0002Ts-4B for kernel-team@lists.ubuntu.com; Tue, 12 Mar 2024 09:52:40 +0000 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id E4AB73F26F for ; Tue, 12 Mar 2024 09:52:38 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-412e51c20fdso31715385e9.2 for ; Tue, 12 Mar 2024 02:52:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710237158; x=1710841958; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qsCKKLIkktC1Nxi+wlkHFGoTRD+uXoYQ4UK2B55QlII=; b=fGhUMtNwLVtDYOwNTBB/Ocd2y2EpLyzGGHoeoi71+PeLsYucS+Y8HuK0ViaV6tNCkb gO8Ff6b5Cv+sIGoWtQV/pwpxc4TWXk945ig+hYRtL1jIzI5bw4a0cP3A6l0WL++gPVNw oqeJ6kf6A5OWAGxot8ZnC3qKLBERLyvCMLLbY65T7zyUTsZ3po6zs7yA9XSGLX8XtHtW ABb8By7+a/FU4HzmAPE63W4lMrZOJR9eqQWLqCOlg9OGEOP+yko62fmeHz2fCr9orC4y OkYR1ADKNh/1FKdDgmWs3vhmxbsFhWtzrs2j2+IzTl/7ZUoFmnPR62KzY2rdCJiutNJN c65Q== X-Gm-Message-State: AOJu0YxXEcZNPNz/zyZMvnkcY+MmYFWyatMW9OMKBf+nUDBVsb6WGvQM ZSwQP3wY4P18hQhkaHBEVhEAw7sHSh+fNLPMv43VPfEsCZ0wxvtS/xAQm62gBZVWgTwniu+ZIfz KDVDJoturagxpSuC7ESv90+PriFkORv6dVlcrthQpAoBm34Nb7/5tIu7cP00poZys0E94NLG5Fo e5QqFWqsK2oQ== X-Received: by 2002:a05:600c:1ca1:b0:413:2fdc:63cd with SMTP id k33-20020a05600c1ca100b004132fdc63cdmr1894897wms.32.1710237158658; Tue, 12 Mar 2024 02:52:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbLDWNvbmZKDdzjLjcsOZkBqWbGYVv5uUiA++9ZuQ3nxf72sxLzG5rABSEMTOZ7XJ1GEaxvw== X-Received: by 2002:a05:600c:1ca1:b0:413:2fdc:63cd with SMTP id k33-20020a05600c1ca100b004132fdc63cdmr1894888wms.32.1710237158281; Tue, 12 Mar 2024 02:52:38 -0700 (PDT) Received: from localhost ([81.221.247.52]) by smtp.gmail.com with ESMTPSA id n16-20020a05600c501000b00413331845a6sm1865357wmr.13.2024.03.12.02.52.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 02:52:37 -0700 (PDT) From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [SRU][M:raspi][PATCH] ARM: dts: bcm2712-rpi-5-b: Add fan speed dtparams Date: Tue, 12 Mar 2024 10:52:36 +0100 Message-Id: <20240312095236.167959-1-juerg.haefliger@canonical.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Phil Elwell BugLink: https://bugs.launchpad.net/bugs/2054921 Add dtparams for adjusting the Pi 5 cooling fan speeds and temperature thresholds. See: https://github.com/raspberrypi/linux/issues/5820 Signed-off-by: Phil Elwell (backported from commit 83d4e02e4b66625578dc9421e2c69834af392947 rpi-6.6.y) [juergh: Adjusted context.] Signed-off-by: Juerg Haefliger Acked-by: Manuel Diewald Acked-by: Andrei Gherzan --- .../arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts | 13 ++++++++++ arch/arm/boot/dts/overlays/README | 25 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/arch/arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts index 085ff354730e..14eeb769727c 100644 --- a/arch/arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts +++ b/arch/arm/boot/dts/broadcom/bcm2712-rpi-5-b.dts @@ -820,5 +820,18 @@ __overrides__ { act_led_trigger = <&act_led>, "linux,default-trigger"; pwr_led_activelow = <&pwr_led>, "gpios:8"; pwr_led_trigger = <&pwr_led>, "linux,default-trigger"; + + fan_temp0 = <&cpu_tepid>,"temperature:0"; + fan_temp1 = <&cpu_warm>,"temperature:0"; + fan_temp2 = <&cpu_hot>,"temperature:0"; + fan_temp3 = <&cpu_vhot>,"temperature:0"; + fan_temp0_hyst = <&cpu_tepid>,"hysteresis:0"; + fan_temp1_hyst = <&cpu_warm>,"hysteresis:0"; + fan_temp2_hyst = <&cpu_hot>,"hysteresis:0"; + fan_temp3_hyst = <&cpu_vhot>,"hysteresis:0"; + fan_temp0_speed = <&fan>, "cooling-levels:4"; + fan_temp1_speed = <&fan>, "cooling-levels:8"; + fan_temp2_speed = <&fan>, "cooling-levels:12"; + fan_temp3_speed = <&fan>, "cooling-levels:16"; }; }; diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 7f5fda92d623..fb8f8c60e9ba 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -209,6 +209,31 @@ Params: to negotiate. Legal values are 10, 100 and 1000 (default 1000). Pi3B+ only. + fan_temp0 Temperature threshold (in millicelcius) for + 1st cooling level (default 50000). Pi5 only. + fan_temp0_hyst Temperature hysteresis (in millicelcius) for + 1st cooling level (default 5000). Pi5 only. + fan_temp0_speed Fan PWM setting for 1st cooling level (0-255, + default 75). Pi5 only. + fan_temp1 Temperature threshold (in millicelcius) for + 2nd cooling level (default 60000). Pi5 only. + fan_temp1_hyst Temperature hysteresis (in millicelcius) for + 2nd cooling level (default 5000). Pi5 only. + fan_temp1_speed Fan PWM setting for 2nd cooling level (0-255, + default 125). Pi5 only. + fan_temp2 Temperature threshold (in millicelcius) for + 3rd cooling level (default 67500). Pi5 only. + fan_temp2_hyst Temperature hysteresis (in millicelcius) for + 3rd cooling level (default 5000). Pi5 only. + fan_temp2_speed Fan PWM setting for 3rd cooling level (0-255, + default 175). Pi5 only. + fan_temp3 Temperature threshold (in millicelcius) for + 4th cooling level (default 75000). Pi5 only. + fan_temp3_hyst Temperature hysteresis (in millicelcius) for + 4th cooling level (default 5000). Pi5 only. + fan_temp3_speed Fan PWM setting for 4th cooling level (0-255, + default 250). Pi5 only. + hdmi Set to "off" to disable the HDMI interface (default "on")