Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp950787pxf; Thu, 11 Mar 2021 20:45:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLUzFzfnayTonxBlaiEJXnmJaiQQVvKPSi/GJxsO2flDlWaLr+2mIT2d/5H98y6VRnRGzK X-Received: by 2002:a17:906:1e4f:: with SMTP id i15mr6319379ejj.349.1615524301828; Thu, 11 Mar 2021 20:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615524301; cv=none; d=google.com; s=arc-20160816; b=Bz2wvpLe/3k7MkU+ws2jCqTOg8q98z33fK+tXqOGsIFcbpaxUjOWa6kVQ1rzYL+lV+ K2WH8I9aY+1JvUwqhDLcMgJYlXsYPGPH3LU7Dz4w4U7cSCq88qOxL7dsQMBrZXuhJ2kZ 10jkJgnk3BeSEy4ItimQQUxEMlx32gkvhvKNOp/UO6Bo9/sjMkiffqbcmulwfgpPCsf8 0YLWAieFtVUZxzkNgWbQJjSFZ79Z2dqfGNr3PiwMTVxEy28A4kNPgHAhIh4uKFBcdRSQ RXxwhZfSYYuc23sbpmK7pviveJS9rZTN8le4CqSccByyV4M8XG2S9sHks/X2LPGjBKzM Hw+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=DgEkYFCBJ5WLvcmAhC4MvkMsrqYi2mB8pDOZcvmcLgU=; b=H4Sqbyh3y5SJn8xwE/DgFjCZEgs+sLWHYBfjLak1CObHrEsvPBpt4Y5XQI36hVRzpG fXfzau1c63F0ysW1spt69oXn6wvmHH316hqgwlTMm0Z3tL/ctQ9UEDPHOZzg1cICqOzo sPFirvnImd0E148KGe9ab1Htw0waeLRudeu5olzW2QeXbHItaULusn0h7ry17YgDu4mP A186TeU83bcpEDZ+xA9lumOoJZqD7i6VPUxq8aYOaxqHmDY4C9qnosThpIheFYt0In4V BTmTwADqUGq3dpnfWb1I32YNkalaRWxU2Gxt1kNiqpyxKJOr4l9tu2OQ7o/T8u+wnWrB 3FxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si2805129edb.10.2021.03.11.20.44.39; Thu, 11 Mar 2021 20:45:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231834AbhCLDk0 (ORCPT + 99 others); Thu, 11 Mar 2021 22:40:26 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:46629 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S231816AbhCLDkZ (ORCPT ); Thu, 11 Mar 2021 22:40:25 -0500 X-UUID: 8f6dea06bdc145759f0b089a88e1d1bc-20210312 X-UUID: 8f6dea06bdc145759f0b089a88e1d1bc-20210312 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1749655158; Fri, 12 Mar 2021 11:40:19 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 12 Mar 2021 11:40:18 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 12 Mar 2021 11:40:17 +0800 From: Michael Kao To: , Zhang Rui , Daniel Lezcano , , CC: Eduardo Valentin , Rob Herring , Mark Rutland , Matthias Brugger , , , , , Subject: [v3,0/3] thermal: mediatek: Add LVTS architecture thermal controller Date: Fri, 12 Mar 2021 11:40:15 +0800 Message-ID: <20210312034018.17437-1-michael.kao@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch move thermal files related to Mediatek to the mediatek folder. And introduce the new architecture LVTS (low pressure thermal sensor) driver to report the highest temperature in the SoC and record the highest temperature sensor, each sensor as a hot zone. The LVTS body is divided into two parts, the LVTS controller and the LVTS device. The LVTS controller can connect up to 4 LVTS devices, and each LVTS device can connect up to 7 TSMCUs. The architecture will be the first to be used on mt6873 and mt8192. Change in v3: - [2/3] - change the expression in the lvts_temp_to_raw to dev_s64. Change in v2: - Rebase to kernel-5.11-rc1. - [2/3] - sort headers - remove initial value 0 of msr_raw in the lvts_temp_to_raw. - disconstruct the api of lvts_read_tc_msr_raw. - add the initial value max_temp = 0 and compare e.q. in the lvts_read_all_tc_temperature. - add the return with invalid number in the lvts_init. This patch depends on [1]. [1]https://patchwork.kernel.org/project/linux-mediatek/cover/1608642587-15634-1-git-send-email-weiyi.lu@mediatek.com/ Michael Kao (3): thermal: mediatek: Relocate driver to mediatek folder thermal: mediatek: Add LVTS drivers for SoC theraml zones dt-bindings: thermal: Add binding document for mt6873 thermal controller .../thermal/mediatek-thermal-lvts.yaml | 81 ++ drivers/thermal/Kconfig | 14 +- drivers/thermal/Makefile | 2 +- drivers/thermal/mediatek/Kconfig | 33 + drivers/thermal/mediatek/Makefile | 2 + .../{mtk_thermal.c => mediatek/soc_temp.c} | 0 drivers/thermal/mediatek/soc_temp_lvts.c | 1287 +++++++++++++++++ drivers/thermal/mediatek/soc_temp_lvts.h | 312 ++++ 8 files changed, 1720 insertions(+), 11 deletions(-) create mode 100644 Documentation/devicetree/bindings/thermal/mediatek-thermal-lvts.yaml create mode 100644 drivers/thermal/mediatek/Kconfig create mode 100644 drivers/thermal/mediatek/Makefile rename drivers/thermal/{mtk_thermal.c => mediatek/soc_temp.c} (100%) create mode 100644 drivers/thermal/mediatek/soc_temp_lvts.c create mode 100644 drivers/thermal/mediatek/soc_temp_lvts.h -- 2.18.0