From patchwork Tue Oct 17 19:05:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bernhard_Rosenkr=C3=A4nzer?= X-Patchwork-Id: 13425786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2D90CDB474 for ; Tue, 17 Oct 2023 19:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=dp+tnVn4D1vaqrNfaLUPww2b1myJbActk7xK1AWg9+k=; b=BnJMd2sjnPTo+N Q9018s61PnlI8WozHdk8ul+8Q2BvQqsbPkb8GMatGxb5fyHKNJBgA1xV+bDfqTz/FmAxjdDyVSJ32 Ur/GoWPOmUOqhsqaWGCTgaQ6FwY56ecyuQSigEwgzQKXjn8+oP+G8BMeD5m3+Ws/4DY3j3wH/+1qU poSTEflvsHaCQjAO7wbHUxdF6waceOUN18Y9UzjBFL9FNVkshUMtf/DTIqmCezeGGD1ZK/EqFoPXe Hi6LGQevfGRCXFJO+Os1osALiGErR/82wF7bkAXqoNSU1M4ZRD1+y6Xx2gcayoj0+WbT3r3wnvHQK Hkjzx7HDnG0vl9NZwbMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qspO8-00D2nv-1v; Tue, 17 Oct 2023 19:05:56 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qspO4-00D2l3-0W for linux-arm-kernel@lists.infradead.org; Tue, 17 Oct 2023 19:05:54 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-53dd3f169d8so10233181a12.3 for ; Tue, 17 Oct 2023 12:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1697569547; x=1698174347; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=5T8pyCBsKAygZpdsiydX+RlsNqoe0a3HYugW6rTPXAk=; b=EGPbgbR2lAMSaW8Y0IXNhnYf85YDijNvS3JMXILpd/odv4pNQzctaO0xfrnczdPwtL jBIBWjVP80ivsNSvOgRt++tjZ1p6IoDE2v5cqjxiBNuGzmSzM13ExHnezMCuYZ7Rsh2Q EFtd51KT2zaZTzXADWTI2614rMz+vvPkV2UpOzlFWq0fgi9ribULGLP4+tCb6wUcCeJY JiJlV4XsGHOGZwtRerWXM2ZIKEUaqy/+x95i7tzrKvOUuKKWYFF/j23kZcUZkafrXesK bJTTlRI4cXyhBx42bCibsGJh0vHdJU6RYYLiEnGktIQXAXp1rOG6IDGmfQKUOolTAhyQ MY6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697569547; x=1698174347; 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=5T8pyCBsKAygZpdsiydX+RlsNqoe0a3HYugW6rTPXAk=; b=SCwJScnrj6G1X5bmmGYOnwDcQE5IGaB94x9n55HB2OGpdG2BP+KRkLl5JULJulEKPs nwocirAs3VdWj9CAqmi1ap6tpjYfeVuBwRL1Yap+hSUv4S2E7qrdnaIgJwG5g1usgW4S y9Ihe4CIGKbqO2T+kCj4lbbw5eTI7CurtFF+TZ6jII9tgdEN0livVcRv62kE9Y+TbCk1 al0UneJpkVQwsPj21/Zu6z+Wtk7mErO+hFqt8pVlQQJQM/2V5lRxVI1zYYPVffVP1PIG Jzqx01jvF3rDbx2/BUx6V9D6tlq59Q2VCfM1c1Q2e1zcgTYJntSTBxxYh2v1gXlmBm3Z em9w== X-Gm-Message-State: AOJu0YxC/EMlg2u0Dkms2wamQ9Zoj18Vbwa92w2/JE5ClJiXkQvqKgy9 IKt/z64StijnaRfamRSWyL7n2g== X-Google-Smtp-Source: AGHT+IHIS2pmlJT58sIePf55BkdjnJMp56dc57XPsYb/UA7y89bQ2UAlMws2Jd/KFo1tOI+tOPXEwQ== X-Received: by 2002:a50:ab55:0:b0:52e:1d58:a6ff with SMTP id t21-20020a50ab55000000b0052e1d58a6ffmr2012654edc.35.1697569546785; Tue, 17 Oct 2023 12:05:46 -0700 (PDT) Received: from ryzen9.fritz.box ([2a01:2a8:8f03:b001:fe65:a70:2777:ab31]) by smtp.gmail.com with ESMTPSA id bq14-20020a056402214e00b00537963f692esm1637990edb.0.2023.10.17.12.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 12:05:46 -0700 (PDT) From: =?utf-8?q?Bernhard_Rosenkr=C3=A4nzer?= 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, dunlap@infradead.org, e.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, wenst@chromium.org, ames.lo@mediatek.com, rex-bc.chen@mediatek.com, nfraprado@collabora.com, abailon@baylibre.com, amergnat@baylibre.com, khilman@baylibre.com Subject: [PATCH v5 0/5] Add LVTS support for mt8192 Date: Tue, 17 Oct 2023 21:05:40 +0200 Message-ID: <20231017190545.157282-1-bero@baylibre.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231017_120552_202259_9E04422F X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add full LVTS support (MCU thermal domain + AP thermal domain) to MediaTek MT8192 SoC. Also, add Suspend and Resume support to LVTS Driver (all SoCs), and update the documentation that describes the Calibration Data Offsets. v5 changes are a lot smaller than originally assumed -- commit 185673ca71d3f7e9c7d62ee5084348e084352e56 fixed the issue I was originally planning to work around in this patchset, so what remains for v5 is noirq and cosmetics. Changelog: v5 : - Suspend/Resume in noirq stage - Reorder chipset specific functions - Rebased : base-commit: 4d5ab2376ec576af173e5eac3887ed0b51bd8566 v4 : - Shrink the lvts_ap thermal sensor I/O range to 0xc00 to make room for SVS support, pointed out by AngeloGioacchino Del Regno v3 : - Rebased : base-commit: 6a3d37b4d885129561e1cef361216f00472f7d2e - Fix issues in v2 pointed out by NĂ­colas F. R. A. Prado : Use filtered mode to make sure threshold interrupts are triggered, protocol documentation, cosmetics - I (bero@baylibre.com) will be taking care of this patchset from now on, since Balsam has left BayLibre. Thanks for getting it almost ready, Balsam! v2 : - Based on top of thermal/linux-next : base-commit: 7ac82227ee046f8234471de4c12a40b8c2d3ddcc - Squash "add thermal zones and thermal nodes" and "add temperature mitigation threshold" commits together to form "arm64: dts: mediatek: mt8192: Add thermal nodes and thermal zones" commit. - Add Suspend and Resume support to LVTS Driver. - Update Calibration Data documentation. - Fix calibration data offsets for mt8192 (Thanks to "Chen-Yu Tsai" and "NĂ­colas F. R. A. Prado"). https://lore.kernel.org/all/20230425133052.199767-1-bchihi@baylibre.com/ Tested-by: Chen-Yu Tsai v1 : - The initial series "Add LVTS support for mt8192" : "https://lore.kernel.org/all/20230307163413.143334-1-bchihi@baylibre.com/". Balsam CHIHI (5): dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for mt8192 thermal/drivers/mediatek/lvts_thermal: Add suspend and resume thermal/drivers/mediatek/lvts_thermal: Add mt8192 support arm64: dts: mediatek: mt8192: Add thermal nodes and thermal zones thermal/drivers/mediatek/lvts_thermal: Update calibration data documentation arch/arm64/boot/dts/mediatek/mt8192.dtsi | 454 ++++++++++++++++++ drivers/thermal/mediatek/lvts_thermal.c | 163 ++++++- .../thermal/mediatek,lvts-thermal.h | 19 + 3 files changed, 634 insertions(+), 2 deletions(-)