From patchwork Tue Jan 24 13:17:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 47703 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2143940wrn; Tue, 24 Jan 2023 05:20:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXsn/JiFScvMic7XT+qgvsTeRQGfQ+OMpjQ75HrgjUHO9QC+7ILLkIADswlo9PeBKhRSJpH1 X-Received: by 2002:a05:6a21:3946:b0:9d:efbe:e607 with SMTP id ac6-20020a056a21394600b0009defbee607mr31650707pzc.35.1674566403575; Tue, 24 Jan 2023 05:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674566403; cv=none; d=google.com; s=arc-20160816; b=eWjFdeSd6DyWCC2Npum1GPFCc0f0CbEFB/eHsOYXlMJ7APo3EdeN8rPHOgyP0Fss2H HDcsjEFJrl4tShsUHlvuuA1WJaJEHHzMbY3T4VNoiBIRBw7ZvJysjXLAoPEMJ3LOIjHo QhUmM4E9EmWI+4u2hT5uQxjJbxygGy0qUeEE63l1dfYaSKPbKp+c8JdSNGtUJW1o/M6P n9oFw0bYGCVoRbkeVntngAzL5keTsbR+iLx2hr6kzV3Fvksk4HpAWq5YCsEIaLSVjmaK oo28UbvKH3xyshHZPPikAmFsEK0SMqKRSxzwV7I8Aiq2QCyVfFGsnRL++LCIeePtodkr z7tw== 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=VYZQGFlPP5P/RkMABIrbs0eSZjZa02mf4fdtuwRY9mc=; b=Pwx3mpjvfnD0BG3UMdvX5lOv59EJlMzw36Ld8UAZQQ5oYLD8GNUCZEQo4Dq1hbzfP4 qxey8T7PzosXOf5yUg8HppD39t3E4EE+d1HYICNpbUEJ9Ulifri6sliN0XvZmrOMg5gT M8EMhQOHvj5G5GQtT+9x8DsWvM5pBiTYDPOCkX/kDcKjXMASydo+iUav/WODmKKXYMJy 5t9/bL7BXe+OA+Do3+8PNsXIWYPgZRT+ENGs6DfsqQlWauprJTe63Z60efqhQYIwdXBz +48jsIbsVCSU0Ipl9G4h8ljWeD6LC2FRuhtzJeIgnxFAT9HlZaerxFE4eAbF2jeuWgup F1sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=LvzJ5qej; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v202-20020a6361d3000000b004d08be9515dsi2232310pgb.124.2023.01.24.05.19.50; Tue, 24 Jan 2023 05:20:03 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=LvzJ5qej; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234079AbjAXNRs (ORCPT + 99 others); Tue, 24 Jan 2023 08:17:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233859AbjAXNRl (ORCPT ); Tue, 24 Jan 2023 08:17:41 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 237F745BDF for ; Tue, 24 Jan 2023 05:17:26 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id b7so13859137wrt.3 for ; Tue, 24 Jan 2023 05:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VYZQGFlPP5P/RkMABIrbs0eSZjZa02mf4fdtuwRY9mc=; b=LvzJ5qejfKsGezJgZ0/qaFtlHArz8tyPy2zcpYrl3qtC+Md2S1iHJ5ZsZ5wgCO6dCi jn2efJJ09102dQxMA8YGKJdPa4B3GxCvLdyoGxA/3hixN9zVk0defqqVTFJdr0kOXQvi d4CI0xfE0gMAn8IwdZm1YdNL/qUxrMPP+T7P9RpUx10hzjrvU0VtOwNOx7Esq6Sq3wy/ ySLC1M37orcjxu7ivMppTIyYUkBpdA/t0auKXNDeCW3GgOPR5r9g/IHv2DQw8PW8s+Ui XI0N2i+GcazkL9WFtRcnRxx8tb8VN3R9FudUFaE9PZhcVqVZHLbS9SSzfeWKwhlh7eCA hb+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VYZQGFlPP5P/RkMABIrbs0eSZjZa02mf4fdtuwRY9mc=; b=PBGzqNTUKWKXTtx/7aEaXBF0786hivhyEJXep5Tik/rkJ1ZiO7LHzW0ApKeiYdz9sX 6y812Fd8jcD2X2k2yFzOc1Rj2dLwzEKc61Fup+yAAEqxk7OzB58kim9heMyEG8XaDroi p5ruYRKIlrmotaX4/cJX76AwKMd07oUB+9L99yGXsFBrRIc3JUPImIqTFCexM698j3yt D3lrDAo2gISsEyMJY69SE9wWBM50EThu/K7pnIHEK7XVmoutB3rgssMJHYdr6NHSHV6V tmbAZUJS+G2NcQXwJuZtmvjgZfQCs3eun2U/xsULLEMBRe8TEAVwMVW7xGBt/WRIl2mR rY6A== X-Gm-Message-State: AFqh2kpGQgO66OCIM7pz/j9l38g3mi1Dg+tv9u2aNkq1MUFrWGlLm8yi RbCfvW2FJTjyWqM1/26j1FwE9A== X-Received: by 2002:a5d:6186:0:b0:2bd:dc24:cade with SMTP id j6-20020a5d6186000000b002bddc24cademr19692374wru.16.1674566245280; Tue, 24 Jan 2023 05:17:25 -0800 (PST) Received: from t480-bl003.civfrance.com (58.188.158.77.rev.sfr.net. [77.158.188.58]) by smtp.gmail.com with ESMTPSA id a5-20020adfeec5000000b002bfb5ebf8cfsm49427wrp.21.2023.01.24.05.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 05:17:25 -0800 (PST) From: bchihi@baylibre.com To: daniel.lezcano@linaro.org, angelogioacchino.delregno@collabora.com, rafael@kernel.org, amitk@kernel.org, rui.zhang@intel.com, matthias.bgg@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, rdunlap@infradead.org, ye.xingchen@zte.com.cn, p.zabel@pengutronix.de Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, khilman@baylibre.com, james.lo@mediatek.com, rex-bc.chen@mediatek.com Subject: [PATCH v11 5/6] arm64/dts/mt8195: Add thermal zones and thermal nodes Date: Tue, 24 Jan 2023 14:17:16 +0100 Message-Id: <20230124131717.128660-6-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230124131717.128660-1-bchihi@baylibre.com> References: <20230124131717.128660-1-bchihi@baylibre.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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?1755910141185685475?= X-GMAIL-MSGID: =?utf-8?q?1755910141185685475?= From: Balsam CHIHI Add thermal zones and thermal nodes for the mt8195. Signed-off-by: Balsam CHIHI Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 129 +++++++++++++++++++++++ 1 file changed, 129 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index 09df105f4606..636676f4ba25 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -14,6 +14,7 @@ #include #include #include +#include / { compatible = "mediatek,mt8195"; @@ -954,6 +955,17 @@ spi0: spi@1100a000 { status = "disabled"; }; + lvts_ap: thermal-sensor@1100b000 { + compatible = "mediatek,mt8195-lvts-ap"; + reg = <0 0x1100b000 0 0x1000>; + interrupts = ; + clocks = <&infracfg_ao CLK_INFRA_AO_THERM>; + resets = <&infracfg_ao MT8195_INFRA_RST0_THERM_CTRL_SWRST>; + nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>; + nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2"; + #thermal-sensor-cells = <1>; + }; + spi1: spi@11010000 { compatible = "mediatek,mt8195-spi", "mediatek,mt6765-spi"; @@ -1114,6 +1126,17 @@ mmc2: mmc@11250000 { status = "disabled"; }; + lvts_mcu: thermal-sensor@11278000 { + compatible = "mediatek,mt8195-lvts-mcu"; + reg = <0 0x11278000 0 0x1000>; + interrupts = ; + clocks = <&infracfg_ao CLK_INFRA_AO_THERM>; + resets = <&infracfg_ao MT8195_INFRA_RST4_THERM_CTRL_MCU_SWRST>; + nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>; + nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2"; + #thermal-sensor-cells = <1>; + }; + xhci1: usb@11290000 { compatible = "mediatek,mt8195-xhci", "mediatek,mtk-xhci"; @@ -2387,4 +2410,110 @@ dp_tx: dp-tx@1c600000 { status = "disabled"; }; }; + + thermal_zones: thermal-zones { + cpu0-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU0>; + trips { + cpu0_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU1>; + trips { + cpu1_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu2-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU2>; + trips { + cpu2_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu3-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_LITTLE_CPU3>; + trips { + cpu3_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu4-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU0>; + trips { + cpu4_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu5-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU1>; + trips { + cpu5_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu6-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU2>; + trips { + cpu6_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cpu7-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_mcu MT8195_MCU_BIG_CPU3>; + trips { + cpu7_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + }; };