From patchwork Tue Mar 7 15:45:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 65669 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:570d:b0:a1:2e52:cf23 with SMTP id h13csp1992036dyk; Tue, 7 Mar 2023 08:12:08 -0800 (PST) X-Google-Smtp-Source: AK7set9YjID6QCivqvkon0GuONweNUbMxy5q+oxpgqDNOCjF1VQItVxWSifd1bxvUcZqfUyjxnK7 X-Received: by 2002:a05:6402:383:b0:4ac:bd84:43d8 with SMTP id o3-20020a056402038300b004acbd8443d8mr14045271edv.8.1678205528615; Tue, 07 Mar 2023 08:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678205528; cv=none; d=google.com; s=arc-20160816; b=E0ajhhS4kvwduddAKvz3evX1ruPJsZcRaCUASITrr2/8YjDkE1gngosZ2H4gP3iTid h9OFNgMTT/XybssHKdLopG5r2QZvcp3EwW0aW44w5oP3CzW437yEmWFwGYPcO3yN1lSV owCpceZpZhhX7CK9GUtZHtvLEtPqZ9u4zuC0Iebw2HoYErykAZOeSN6GLgDPGqzb3bf0 5f1dMtdQwA7TJ1IJ3MmhhM9JZyQFJcgqkpkoLf6pZmMmZ9pd/Y/vTdexr5IAfTiZ1ZnN TXsPCm5rSzMhWjGlmx3hkvnGwRHZetrkrxXzS2XAADvzlzaWjwF5FRx6V/R7KK50/Pti 4iZA== 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=+OFCWs6sMvmcACVP359vGdpDLS8nF6pX77Um/B5ZzBQ=; b=EIGpb6gTOBTAe2Fronsu2axx+FSOawfAidOsF7/7RGC++doyvyYTX0Eb9n3bDZtp3v z5+NM3lha1qCHORkDlkTD9sEPsYCcqr95KuQlu8LgJeJ6a0s/FSbLsIRo06T6lop6a2b l1EgjrXlvBwbIz/mz7q1ZWMZ0vfB7jLindygI6FHBLR9IWMtMRJeDKcOPvEw6iZSm0ii bY1jfX/X+BaChScHDOOyhiHR0d0QHoj4e0FKNKpvTQxocLPzfGzMZn0jJfxlXTerHvLp VOuvIFTYy5g7cHWyjc9Tap45dgnAWYMbgqcbOj1QTDAJsqxM04J+L5j8XxfnBXKgu2t4 +QUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=I4Km7Kvr; 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 n16-20020a056402515000b004c0e68fc53csi11831481edd.267.2023.03.07.08.11.44; Tue, 07 Mar 2023 08:12:08 -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=I4Km7Kvr; 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 S231368AbjCGPpi (ORCPT + 99 others); Tue, 7 Mar 2023 10:45:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230468AbjCGPpc (ORCPT ); Tue, 7 Mar 2023 10:45:32 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E443E4ECC2 for ; Tue, 7 Mar 2023 07:45:29 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id r18so12595299wrx.1 for ; Tue, 07 Mar 2023 07:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678203928; 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=+OFCWs6sMvmcACVP359vGdpDLS8nF6pX77Um/B5ZzBQ=; b=I4Km7KvrsZJjag+t2OnVfY3qj3nEqw18rDA/g/UnXtDjeMVyd4k+jsQmwXhiEHzOOo kus9JATGqXhXUaxRpv72NOs1h97nszn7FihQqNJoWCZ4lJ2nBUxLH8V90eL0TPDQu0QI QnkjKYyyNt80BDehpoieSDTVidG4vOfOz8QARoAuzl0FpUgYUQFqaeYZtm8H+1GNymNh e/F9JasTMspKNjy0jKFrRUHz1uU3XzRE/rshBmRHo6TedQ2ljZi4b5ko1viqH4ExiODT mezb4sGJN4y4TEdKqBJ9b97gThmeClR1kvXXs5KWMhrroBsc9N/cws97ENwz8+QX6NQ7 CQ3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678203928; 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=+OFCWs6sMvmcACVP359vGdpDLS8nF6pX77Um/B5ZzBQ=; b=3jtb7oA2rAyM/rjEDBpDgnqEml5Q481v8tfdJCA9YKCr8ZXx2osOxuKvK7Xd3r0nzt UlTCdByui4MqT1aWuHETt0U1pcn94N+fiMaPWDOdWTjFXSqlpjICQTa5J4vkIakFYtiF EQ9rkbT+KvVV5LOhBMSOe30ZpYENo5C970L2CLabMsBL7CH03IdmUhTKb4NJXJ/Dvp7D 9Xgj1evzNnEXiLE7/GCe0JAQgbR0kfDvbcupoSUgExv984oX2lhaoRWh2tYJpwZ+OIa3 VYOxyK+HOk5cYCK3/zfAi4NbktKQ8w9LgA76rl08kRdj56Tt1eZ/PHqXK5HezQ1F7Ea4 5fuA== X-Gm-Message-State: AO0yUKUKz1PQwljy/OerA6Vbs3XJmW8kHAMNVaomqINSyPW6jrvP85dy 7MDjLJvU1BSQmovAdP52Y1zMIQ== X-Received: by 2002:a5d:4089:0:b0:2c7:3ee7:a44c with SMTP id o9-20020a5d4089000000b002c73ee7a44cmr8371471wrp.65.1678203928444; Tue, 07 Mar 2023 07:45:28 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-248-155.w90-24.abo.wanadoo.fr. [90.24.137.155]) by smtp.gmail.com with ESMTPSA id f2-20020a5d50c2000000b002c704271b05sm12697905wrt.66.2023.03.07.07.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 07:45:28 -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 1/4] dt-bindings: thermal: mediatek: Add AP domain to LVTS thermal controllers for mt8195 Date: Tue, 7 Mar 2023 16:45:21 +0100 Message-Id: <20230307154524.118541-2-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307154524.118541-1-bchihi@baylibre.com> References: <20230307154524.118541-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?1759726040692948917?= X-GMAIL-MSGID: =?utf-8?q?1759726040692948917?= From: Balsam CHIHI Add AP Domain to LVTS thermal controllers dt-binding definition for mt8195. Signed-off-by: Balsam CHIHI Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring --- include/dt-bindings/thermal/mediatek,lvts-thermal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/dt-bindings/thermal/mediatek,lvts-thermal.h b/include/dt-bindings/thermal/mediatek,lvts-thermal.h index c09398920468..8fa5a46675c4 100644 --- a/include/dt-bindings/thermal/mediatek,lvts-thermal.h +++ b/include/dt-bindings/thermal/mediatek,lvts-thermal.h @@ -16,4 +16,14 @@ #define MT8195_MCU_LITTLE_CPU2 6 #define MT8195_MCU_LITTLE_CPU3 7 +#define MT8195_AP_VPU0 8 +#define MT8195_AP_VPU1 9 +#define MT8195_AP_GPU0 10 +#define MT8195_AP_GPU1 11 +#define MT8195_AP_VDEC 12 +#define MT8195_AP_IMG 13 +#define MT8195_AP_INFRA 14 +#define MT8195_AP_CAM0 15 +#define MT8195_AP_CAM1 16 + #endif /* __MEDIATEK_LVTS_DT_H */ From patchwork Tue Mar 7 15:45:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 65659 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:570d:b0:a1:2e52:cf23 with SMTP id h13csp1988425dyk; Tue, 7 Mar 2023 08:07:42 -0800 (PST) X-Google-Smtp-Source: AK7set9JON2HwmqJfa/wmRHXekfXr+W0LgwFiEV0ftLWTaVgA37a+c/DFMTiy3Zn8CttJjOkHGAD X-Received: by 2002:a17:90b:3142:b0:237:a50e:1781 with SMTP id ip2-20020a17090b314200b00237a50e1781mr15735304pjb.24.1678205262459; Tue, 07 Mar 2023 08:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678205262; cv=none; d=google.com; s=arc-20160816; b=h9SwY6ykVwGEi1SHaJpDhvCsYZj48J/4gn3I16iZ+klZeFQlnp3rx/Xio8dazz4QAB ryGkyh69JjP6f4ErAA5uK+Jzl6pvPhzK/3GPLr10bQCKaGSFXlMyOC/k/5+x4+Bb2z5E A6p2/maLmcdTo67t25pj0WXQOqXDL1LuvJzJRIiQ2lQxwBzpauy5RXgYBblZW/p3AgLH xuvYfz6n3DcQU4i88Ey6FY2Ze0CXWphn5jJ5mFEZ/wYOQ3WjW4MFuiGTN7nCrW0PTHPF ak0a9HhDL41FyWjsUcVAvlWFvY9p5WVsCp+JmwoT4XjooynHnSbrOIBTbNuPRTh3PucR dq2g== 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=mDUOEs+XSiOfyiNiOvW3qp6/s0S8NXRmgJF421g68As=; b=cSGM7EgkaUlBUShzfz7ur1IUJEY/xCj8XGezamGinhZd0IjnZxc6FreruWV9axaYOM v5W6xRSeJFLPgZ7XK6Fs2i4s6jpIROKpkkQlOSjWZz/OwCb6CTuj/seC3XE4g3fiE4ff yxphn1j4FhhSxHz6ITni0g8BaKctHWH4vVTmsT+DxoekgYjivKDz5+0UiWmdRTz0P6uy gY4UvkSXO2aDzBBJUCzJawwN8D7YYLXskksVrEerN8ROvaR7zHesZX75L0tZEJ2H9Is5 IfjWpfdlSI6lUR8HYTLxAuknmnMsCqKl+MWpE48EMbixBz/PP9ISC6eFLtyZvDU8eHqQ SfjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="T2+UqBQ/"; 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 lp5-20020a17090b4a8500b00234ba1cfad4si13817339pjb.182.2023.03.07.08.07.29; Tue, 07 Mar 2023 08:07:42 -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="T2+UqBQ/"; 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 S231441AbjCGPpm (ORCPT + 99 others); Tue, 7 Mar 2023 10:45:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231234AbjCGPpd (ORCPT ); Tue, 7 Mar 2023 10:45:33 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94EA8838B8 for ; Tue, 7 Mar 2023 07:45:30 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id bx12so12554544wrb.11 for ; Tue, 07 Mar 2023 07:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678203929; 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=mDUOEs+XSiOfyiNiOvW3qp6/s0S8NXRmgJF421g68As=; b=T2+UqBQ/B0o7lX4P+fFNGS8AxIhdRQnYL4u4eNa7vRwBpDax96IfUm5+btsWfAbHcK Sdr3j0hYKmTAbAHYv/qL/mPpQQJJPqyKnKMepnHYk3PdPsyrRt5pQVsB4wYuygFJ7jg5 H0Ic8Yt+QpJOslls+C9511LK9mHgITHGmgRC6e4n2N8NOVMCiP2ueRTdPubfescwcybS 61uLpz+0u8U9qoUSjalcknogymte+g8ZLweUlmmH0L/cH0M4DaN7UOYZVZZ7MHUOBmzM L97fKVMk6hNpf4IT17R9VddhXt8Rr0OKI/efvPyffo6FYMDI7YjO9u0YsRXDmxX0e8TL uXfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678203929; 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=mDUOEs+XSiOfyiNiOvW3qp6/s0S8NXRmgJF421g68As=; b=0JsRYaf+pBc8PPEvlB2AX0zq6TlG6s5sTDpCHPo5a+YyBZddHd8SX04x/Kk+v2Rz3r 0x501U6SOyS4qGIHHJpPtb81vE4IB/G+QICze3lGAYNFyHzggedMFNDu9mj+ja2Xmlti K2gGphz9ISB8rk04rCmo8DkJYoprbNImSQQemahHypUQlsANp90kuSgtRDQEQPiXcfmS WWjbhmNaPbgXT8tWIpWmFdUdWxLH4GVkcHXlbqoREMPIQCjhJara+ZWgvHm/Yd0BG2E1 kH5thKXsEKiGgNTpdqMLMVH3OnCd4qOaQpSGZfqRDhcx6OSRFMQW39j6xGrJ5PzhhGsC ZBIg== X-Gm-Message-State: AO0yUKVID81R+Ibdj2Yyb3gTaSTGqh/7T6VNqpFteg2D67fruSvnlkrr 2vpJhZuWonhkB+AY1QT5uX6pKg== X-Received: by 2002:a5d:634d:0:b0:2c7:ae57:5acc with SMTP id b13-20020a5d634d000000b002c7ae575accmr9993378wrw.26.1678203929163; Tue, 07 Mar 2023 07:45:29 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-248-155.w90-24.abo.wanadoo.fr. [90.24.137.155]) by smtp.gmail.com with ESMTPSA id f2-20020a5d50c2000000b002c704271b05sm12697905wrt.66.2023.03.07.07.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 07:45:29 -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 2/4] thermal/drivers/mediatek/lvts_thermal: Add AP domain for mt8195 Date: Tue, 7 Mar 2023 16:45:22 +0100 Message-Id: <20230307154524.118541-3-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307154524.118541-1-bchihi@baylibre.com> References: <20230307154524.118541-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?1759725761621478052?= X-GMAIL-MSGID: =?utf-8?q?1759725761621478052?= From: Balsam CHIHI Add MT8195 AP Domain support to LVTS Driver. Signed-off-by: Balsam CHIHI --- drivers/thermal/mediatek/lvts_thermal.c | 94 +++++++++++++++++++------ 1 file changed, 74 insertions(+), 20 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 5dbc80ba961b..7565def6b27c 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -528,29 +528,33 @@ static int lvts_sensor_init(struct device *dev, struct lvts_ctrl *lvts_ctrl, * The efuse blob values follows the sensor enumeration per thermal * controller. The decoding of the stream is as follow: * - * <--?-> <----big0 ???---> <-sensor0-> <-0-> - * ------------------------------------------ - * index in the stream: : | 0x0 | 0x1 | 0x2 | 0x3 | 0x4 | 0x5 | 0x6 | - * ------------------------------------------ + * stream index map for MCU Domain : * - * <--sensor1--><-0-> <----big1 ???---> <-sen - * ------------------------------------------ - * | 0x7 | 0x8 | 0x9 | 0xA | 0xB | OxC | OxD | - * ------------------------------------------ + * <-----mcu-tc#0-----> <-----sensor#0-----> <-----sensor#1-----> + * 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 | 0x09 * - * sor0-> <-0-> <-sensor1-> <-0-> .......... - * ------------------------------------------ - * | 0x7 | 0x8 | 0x9 | 0xA | 0xB | OxC | OxD | - * ------------------------------------------ + * <-----mcu-tc#1-----> <-----sensor#2-----> <-----sensor#3-----> + * 0x0A | 0x0B | 0x0C | 0x0D | 0x0E | 0x0F | 0x10 | 0x11 | 0x12 * - * And so on ... + * <-----mcu-tc#2-----> <-----sensor#4-----> <-----sensor#5-----> <-----sensor#6-----> <-----sensor#7-----> + * 0x13 | 0x14 | 0x15 | 0x16 | 0x17 | 0x18 | 0x19 | 0x1A | 0x1B | 0x1C | 0x1D | 0x1E | 0x1F | 0x20 | 0x21 + * + * stream index map for AP Domain : + * + * <-----ap--tc#0-----> <-----sensor#0-----> <-----sensor#1-----> + * 0x22 | 0x23 | 0x24 | 0x25 | 0x26 | 0x27 | 0x28 | 0x29 | 0x2A + * + * <-----ap--tc#1-----> <-----sensor#2-----> <-----sensor#3-----> + * 0x2B | 0x2C | 0x2D | 0x2E | 0x2F | 0x30 | 0x31 | 0x32 | 0x33 + * + * <-----ap--tc#2-----> <-----sensor#4-----> <-----sensor#5-----> <-----sensor#6-----> + * 0x34 | 0x35 | 0x36 | 0x37 | 0x38 | 0x39 | 0x3A | 0x3B | 0x3C | 0x3D | 0x3E | 0x3F + * + * <-----ap--tc#3-----> <-----sensor#7-----> <-----sensor#8-----> + * 0x40 | 0x41 | 0x42 | 0x43 | 0x44 | 0x45 | 0x46 | 0x47 | 0x48 * * The data description gives the offset of the calibration data in * this bytes stream for each sensor. - * - * Each thermal controller can handle up to 4 sensors max, we don't - * care if there are less as the array of calibration is sized to 4 - * anyway. The unused sensor slot will be zeroed. */ static int lvts_calibration_init(struct device *dev, struct lvts_ctrl *lvts_ctrl, const struct lvts_ctrl_data *lvts_ctrl_data, @@ -1163,7 +1167,7 @@ static int lvts_remove(struct platform_device *pdev) return 0; } -static const struct lvts_ctrl_data mt8195_lvts_data_ctrl[] = { +static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { { .cal_offset = { 0x04, 0x07 }, .lvts_sensor = { @@ -1198,13 +1202,63 @@ static const struct lvts_ctrl_data mt8195_lvts_data_ctrl[] = { } }; +static const struct lvts_ctrl_data mt8195_lvts_ap_data_ctrl[] = { + { + .cal_offset = { 0x25, 0x28 }, + .lvts_sensor = { + { .dt_id = MT8195_AP_VPU0 }, + { .dt_id = MT8195_AP_VPU1 } + }, + .num_lvts_sensor = 2, + .offset = 0x0, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT8195, + }, + { + .cal_offset = { 0x2e, 0x31 }, + .lvts_sensor = { + { .dt_id = MT8195_AP_GPU0 }, + { .dt_id = MT8195_AP_GPU1 } + }, + .num_lvts_sensor = 2, + .offset = 0x100, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT8195, + }, + { + .cal_offset = { 0x37, 0x3a, 0x3d }, + .lvts_sensor = { + { .dt_id = MT8195_AP_VDEC }, + { .dt_id = MT8195_AP_IMG }, + { .dt_id = MT8195_AP_INFRA }, + }, + .num_lvts_sensor = 3, + .offset = 0x200, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT8195, + }, + { + .cal_offset = { 0x43, 0x46 }, + .lvts_sensor = { + { .dt_id = MT8195_AP_CAM0 }, + { .dt_id = MT8195_AP_CAM1 } + }, + .num_lvts_sensor = 2, + .offset = 0x300, + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT8195, + } +}; + static const struct lvts_data mt8195_lvts_mcu_data = { - .lvts_ctrl = mt8195_lvts_data_ctrl, - .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_data_ctrl), + .lvts_ctrl = mt8195_lvts_mcu_data_ctrl, + .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_mcu_data_ctrl), +}; + +static const struct lvts_data mt8195_lvts_ap_data = { + .lvts_ctrl = mt8195_lvts_ap_data_ctrl, + .num_lvts_ctrl = ARRAY_SIZE(mt8195_lvts_ap_data_ctrl), }; static const struct of_device_id lvts_of_match[] = { { .compatible = "mediatek,mt8195-lvts-mcu", .data = &mt8195_lvts_mcu_data }, + { .compatible = "mediatek,mt8195-lvts-ap", .data = &mt8195_lvts_ap_data }, {}, }; MODULE_DEVICE_TABLE(of, lvts_of_match); From patchwork Tue Mar 7 15:45:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 65664 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:570d:b0:a1:2e52:cf23 with SMTP id h13csp1989933dyk; Tue, 7 Mar 2023 08:09:30 -0800 (PST) X-Google-Smtp-Source: AK7set8RPTyDSfw1pUhornQ8+gpAIGDee/gxeyXMX/fx6a7nKGOJKX0JjPGTwbkHH37BFNd2UylO X-Received: by 2002:aa7:d958:0:b0:4ac:bf55:e943 with SMTP id l24-20020aa7d958000000b004acbf55e943mr14025482eds.34.1678205370157; Tue, 07 Mar 2023 08:09:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678205370; cv=none; d=google.com; s=arc-20160816; b=lcIvBiv7TMZSVYxnZKPpFdsGLU0QoHiIuBQCJ/YLyhl6UWHiUt1YO6FlxqbUgPN6dz Wt2RFgczW1KnK6WU8BwdruENvYjbP/M9I7+/m42DNTVw6f0glKakVfRq+AzOtiNUshiT UTRgeAbd+Ly+6lTsdH9KB0hN3nHa7WnX84IKz3jwfFWDDc9YaE6Izuh7UahdZm2hskRI p8zFYJINBooQsxlx3B5gEn95FQZXGtLJEG7kBjDg3Acom6Nvy0eqE8HrVDk0SeLBRftx 9x7h+7EyyWFzga1pFYijNcjtNN4DlyZvTYN0ZrVsNmLe3hwdz3NLh5gd0CcKKvyKcKeI mT2A== 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=TK38rfMZIYSCE09aA82gNal1pzr6tS/kIcgasbLVBmk=; b=unhAb8yPBZAeO7t87HSc8lCpaDOwFQ1RgB2GjhRRa3/dFN0fxw7EIyzxpvomE7MikQ WjmWZQY9gWkX5pT/X0BAYDt14Gd9fgyFYlZOvURTGfG3At3ahk+zYGJY56wvijJTH+mr i5v3QoQObd17NyAFTjrmkKoFXiqIIpdoZ4Ic32dw+vtM8Ww0n2LQE7UvBq5QD5WLbHtH x22qx8BnqpZLJNkFYOCRHyIZJpqCgWWQM7hXtGAk2yIrn8kCV0FifRnS/Z9Yy7krkLZ3 jBWidtMk4joh2jFhskAJrkbHUGCMftrWwff83CWbPIjRDWIZ5xmmXm1ADRnlmgNQghrO GloQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=3rRyCvaU; 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 k21-20020a05640212d500b004acc84affc2si2155326edx.4.2023.03.07.08.09.06; Tue, 07 Mar 2023 08:09:30 -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=3rRyCvaU; 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 S231234AbjCGPpq (ORCPT + 99 others); Tue, 7 Mar 2023 10:45:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231274AbjCGPpd (ORCPT ); Tue, 7 Mar 2023 10:45:33 -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 6634C84F63 for ; Tue, 7 Mar 2023 07:45:31 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id h14so12585976wru.4 for ; Tue, 07 Mar 2023 07:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678203930; 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=TK38rfMZIYSCE09aA82gNal1pzr6tS/kIcgasbLVBmk=; b=3rRyCvaUzbr48hyBZ2CFsD0pYrm9ofuBZ9w+ixhFmH+Wi43j+31NC/s814q6QNIxTy HhHe5i0C48LNdFjlVsmS6Qi3HTGBBAOkw+atIdb+RrvET+vqUuPqOuy10ch/rbOBIJqq Gu8Q074hLUlXgXMc+9Jru5M/pXPg8DI4UHy0rYtxZIqMsTvRGHf2NF4iBLKfIxa6TeD9 Ytg6qE0d5W3AVCzQpeXahs23kDYVx7eDGgdSX5WI3HzCk4EFU8VUyhiqoAa0q2VbZF/C DVRY4k2cCL6PX/NelxjSBxLwWI6/M0ycf6DfFO850jb8z4Kef6mdyadtYQeW4oe/5Nes I+Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678203930; 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=TK38rfMZIYSCE09aA82gNal1pzr6tS/kIcgasbLVBmk=; b=Jh9n+CiWdvc8y9RfJgGxJw4NFafPCF+hvQWlTQRZt5kiAPhf4Jf+4gY/+6l68Dijsr 49/4vBKDeAqXZlBG9Ta9VmHbRIwdKtt4Xhykxwjem4iXBC2FqH7YEmkBVK1UlDgpUJ5V HxtjHTcb3ktCSfHQw0s33L5uJyEF1QFeuF0O5X+Wb96sm72hsgt9hFwQIeGIdsaJJ49m xLW34LvI0V5uvi1092Dxbogd2EOe9+bOofZgfADGZWNLfcpFZABnF8LhDq8T8NllLL4W 1doNEqeiratiZGk9ch15jpocUssUjF4gUxSQA3+5swr0ZEoEKJqABgWFmz6yTSvC4SCK dY8A== X-Gm-Message-State: AO0yUKVaq24p3xAofq5J1amN8cych+KvTBF7whkAH+PY37gQ50yje90A KVww4ClE3XfmztI2FwwE8qu36g== X-Received: by 2002:a5d:4005:0:b0:2c9:5179:41a5 with SMTP id n5-20020a5d4005000000b002c9517941a5mr9632960wrp.8.1678203929903; Tue, 07 Mar 2023 07:45:29 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-248-155.w90-24.abo.wanadoo.fr. [90.24.137.155]) by smtp.gmail.com with ESMTPSA id f2-20020a5d50c2000000b002c704271b05sm12697905wrt.66.2023.03.07.07.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 07:45:29 -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 3/4] arm64: dts: mediatek: mt8195: Add AP domain thermal zones Date: Tue, 7 Mar 2023 16:45:23 +0100 Message-Id: <20230307154524.118541-4-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307154524.118541-1-bchihi@baylibre.com> References: <20230307154524.118541-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?1759725874118416946?= X-GMAIL-MSGID: =?utf-8?q?1759725874118416946?= From: Balsam CHIHI Add AP Domain thermal zones for the mt8195. Signed-off-by: Balsam CHIHI --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 126 +++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index 10c8fb0856bc..b066d1eab1dc 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -2652,5 +2652,131 @@ map0 { }; }; }; + + vpu0-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_VPU0>; + + trips { + vpu0_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vpu1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_VPU1>; + + trips { + vpu1_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + gpu0-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_GPU0>; + + trips { + gpu0_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + gpu1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_GPU1>; + + trips { + gpu1_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + vdec-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_VDEC>; + + trips { + vdec_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + img-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_IMG>; + + trips { + img_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + infra-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_INFRA>; + + trips { + infra_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cam0-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_CAM0>; + + trips { + cam0_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; + + cam1-thermal { + polling-delay = <0>; + polling-delay-passive = <0>; + thermal-sensors = <&lvts_ap MT8195_AP_CAM1>; + + trips { + cam1_crit: trip-crit { + temperature = <100000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + }; }; }; From patchwork Tue Mar 7 15:45:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balsam CHIHI X-Patchwork-Id: 65662 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:570d:b0:a1:2e52:cf23 with SMTP id h13csp1989633dyk; Tue, 7 Mar 2023 08:09:07 -0800 (PST) X-Google-Smtp-Source: AK7set8LS2S8lDK5krB0SaXTpRnnSOPHk3IvtOFBFNGni9mvtfP9nnQqAud1i4NQcxsuEopSyjCV X-Received: by 2002:a17:90a:804a:b0:237:8f8a:6e4c with SMTP id e10-20020a17090a804a00b002378f8a6e4cmr15372327pjw.30.1678205347459; Tue, 07 Mar 2023 08:09:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678205347; cv=none; d=google.com; s=arc-20160816; b=QXCnFQPZHwL9L3KIJ7k95RuP6qfvyuuesvSVNRFZfj+Ffq7iagJhgxfZhOTohnw6x5 iqhgS//LlMBNPiT+6cuF7UsA/WZwprul7vLjdlHRYKV5eTmD02p1/tddZT0CXaykbwFe JG97CKR7EhGPYDlqcKplXFz6CfXBUZbmudbuPE4+RdmYMQrkR2ejGkc1hIAJn9VlXkoJ TLkqtAUYOcbpKStkYg0MFGWz3/irVi39tRuUQkyKDQLfn6xS9KQUgiYL8zfeMKzPy6h6 CrcMalaqrxok+18b6uzjjnX8lwS20naYeJJUuPDiRLl5GwDevKlKbpZOmPn9nzHS9ZKr zp0A== 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=JY0Ro4rQcxnhRsiPxJHCXtVEYXHerbDIXQMmbNIdWm4=; b=Tfbf6fNrDNLZ1BPBc6gaBqmzVskPgP1R1Cbhr935wsDyv8deQ8N3ncDCeaXaYNa/hM uq81S5DXLTfc29Rjl1M6Kp7ojIqil88pUBzyT03FJ4q9Uw01UxFNlP9Ey5YaCxDsIW2U AqGRWZUDBFl1WCSUBn2QWWVi6QJ2l1/gGf8g01G2FQcN6lsO/G+IJBV36NU4vT0VFNEM kMM3UNnzg+KgI79pUPsX7npYRTXeo4pONpegiyhql8angvb1JlNnvbJScCNwUWWnfzFC QJ+lmX2GqLRmF0UrSTZjGwL37+5pmeSm4UYeFxdSDY8rasLTXVsktLliBJOaAK1SfrYe OHgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=HPRCUxRS; 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 188-20020a6305c5000000b004fc2f2d8d45si13325116pgf.162.2023.03.07.08.08.54; Tue, 07 Mar 2023 08:09:07 -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=HPRCUxRS; 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 S230458AbjCGPpt (ORCPT + 99 others); Tue, 7 Mar 2023 10:45:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231312AbjCGPph (ORCPT ); Tue, 7 Mar 2023 10:45:37 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2935E85345 for ; Tue, 7 Mar 2023 07:45:32 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id j2so12560901wrh.9 for ; Tue, 07 Mar 2023 07:45:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1678203930; 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=JY0Ro4rQcxnhRsiPxJHCXtVEYXHerbDIXQMmbNIdWm4=; b=HPRCUxRSNyyA/oVsmJzaxnWi/aGeU+cplMFkWIaR2F7aOlur6xHyVOmHaPAKxhi6S5 6HE4UAsO2+d0XsL5fLTME2qD1b9iemXabrKBz99/HFrLWyXgqZ10sOYFVcFPsXlzy/AS qt417U9I2jHYrPuL5Wu4SH7jhN8rWtLitFhGDLuldeq4REKk8ZLMdIpSTJm9bOwakbQI bsD2NwGi2p+IwZVSEEGnUIqRmG3GS4QFXwJ5n7Mx+wZ+zK+dywTlSMSeZp+gLtCSjkZ6 JYg57EDiQZ3V7pMCmUA9qHRyOz+/J/8UADAxwLqYYLNvcg7sDXZnmTRvVIWvty46O2Yi E0Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678203930; 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=JY0Ro4rQcxnhRsiPxJHCXtVEYXHerbDIXQMmbNIdWm4=; b=FsWu4z28Tn1rLi3RWOxf+zOIe33NoFwM6oeoR+aQ37ArigS69F64uxvNLZdo0GEfAs ZVBd2X1PlY/GmyEEkWN3YFaJKcu2Uk5iSUJQVOu/2IrzRyYkY6ooj8kUfXCxffYXsPX/ Kmoxjx9v+Jvqqkz33dY9UZQD3oBKn8eZNciowEXB41zqhhHYb13E3r6jMNmWa8QrI5z6 qxGIfM7ZGveC6WVFGaI/y5xRNwx0wOnyBHm63kyJ+EFsfAw4UbrGSc+ZSO6GZNAxMBxu iSQz9OJRajQssYTd+rPsNqn2f9ckuEZ++e9KEQXWHadDo6imU6aWbc01DwiAq4q8N2/n vXXg== X-Gm-Message-State: AO0yUKWRnLh7v0C/HfUoWPbYKZ4RoG/7sEPfGkwuj9WRdL13wLs+dE7V rRQhRjtFSPS+VFG+tlg7M1ioFyh3zZeXptlXLCM= X-Received: by 2002:a5d:6a48:0:b0:2c7:dec:77a7 with SMTP id t8-20020a5d6a48000000b002c70dec77a7mr8356572wrw.71.1678203930693; Tue, 07 Mar 2023 07:45:30 -0800 (PST) Received: from localhost.localdomain (laubervilliers-657-1-248-155.w90-24.abo.wanadoo.fr. [90.24.137.155]) by smtp.gmail.com with ESMTPSA id f2-20020a5d50c2000000b002c704271b05sm12697905wrt.66.2023.03.07.07.45.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 07:45:30 -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 4/4] arm64: dts: mediatek: mt8195: Add AP domain temperature thresholds Date: Tue, 7 Mar 2023 16:45:24 +0100 Message-Id: <20230307154524.118541-5-bchihi@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307154524.118541-1-bchihi@baylibre.com> References: <20230307154524.118541-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=ham 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?1759725850405099716?= X-GMAIL-MSGID: =?utf-8?q?1759725850405099716?= From: Balsam CHIHI Specify the targeted temperature thresholds. Signed-off-by: Balsam CHIHI --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 90 +++++++++++++++++++----- 1 file changed, 72 insertions(+), 18 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index b066d1eab1dc..0dab67d283a6 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -2654,11 +2654,17 @@ map0 { }; vpu0-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_VPU0>; trips { + vpu0_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + vpu0_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2668,11 +2674,17 @@ vpu0_crit: trip-crit { }; vpu1-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_VPU1>; trips { + vpu1_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + vpu1_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2682,11 +2694,17 @@ vpu1_crit: trip-crit { }; gpu0-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_GPU0>; trips { + gpu0_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + gpu0_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2696,11 +2714,17 @@ gpu0_crit: trip-crit { }; gpu1-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_GPU1>; trips { + gpu1_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + gpu1_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2710,11 +2734,17 @@ gpu1_crit: trip-crit { }; vdec-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_VDEC>; trips { + vdec_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + vdec_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2724,11 +2754,17 @@ vdec_crit: trip-crit { }; img-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_IMG>; trips { + img_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + img_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2738,11 +2774,17 @@ img_crit: trip-crit { }; infra-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_INFRA>; trips { + infra_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + infra_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2752,11 +2794,17 @@ infra_crit: trip-crit { }; cam0-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_CAM0>; trips { + cam0_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + cam0_crit: trip-crit { temperature = <100000>; hysteresis = <2000>; @@ -2766,11 +2814,17 @@ cam0_crit: trip-crit { }; cam1-thermal { - polling-delay = <0>; - polling-delay-passive = <0>; + polling-delay = <1000>; + polling-delay-passive = <250>; thermal-sensors = <&lvts_ap MT8195_AP_CAM1>; trips { + cam1_alert: trip-alert { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + cam1_crit: trip-crit { temperature = <100000>; hysteresis = <2000>;