From patchwork Tue May 17 17:29:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 573610 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 132FCC433F5 for ; Tue, 17 May 2022 17:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346397AbiEQR3l (ORCPT ); Tue, 17 May 2022 13:29:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235561AbiEQR3k (ORCPT ); Tue, 17 May 2022 13:29:40 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43FE136B71; Tue, 17 May 2022 10:29:37 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 24HHTW31027902; Tue, 17 May 2022 12:29:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1652808572; bh=GGaWzv0XZo+/v48et4y0JyL0RDgIw6ucMpSmKq2lOMI=; h=From:To:CC:Subject:Date; b=Xu1jnlu6NXxI/jDXlFOUFMgEDcW5m8BxuLPWYcp+bzuO8ielQQGjaW+EtONdWgCaQ yn6j65a+GSI05oo7YgsCtXo6v0svBYJN7UY1P8Ah8EszT/Z2mAvCuplsRLhCJBXhrJ t9cQnVqwBTn2auTYLRKCzfEhaJ9QRwSg7OLLbRrU= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 24HHTW99104909 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 May 2022 12:29:32 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 17 May 2022 12:29:32 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Tue, 17 May 2022 12:29:32 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 24HHTRYD079003; Tue, 17 May 2022 12:29:28 -0500 From: Keerthy To: , , , , , CC: , , , , , Subject: [PATCH v9 0/2] thermal: k3_j72xx_bandgap: Add the bandgap driver support Date: Tue, 17 May 2022 22:59:18 +0530 Message-ID: <20220517172920.10857-1-j-keerthy@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add VTM thermal support. In the Voltage Thermal Management Module(VTM), K3 J72XX supplies a voltage reference and a temperature sensor feature that are gathered in the band gap voltage and temperature sensor (VBGAPTS) module. The band gap provides current and voltage reference for its internal circuits and other analog IP blocks. The analog-to-digital converter (ADC) produces an output value that is proportional to the silicon temperature. Currently reading temperatures only is supported. There are no active/passive cooling agent supported. J721e SoCs have errata i2128: https://www.ti.com/lit/pdf/sprz455 The series also incorporates workaround for Errata i2128. Changes in v9: * Fixed indentation in DT binding documentation * Added Rob's Reviewed-by Changes in v8: * Removed redundant items from compatible in the Documentation patch Changes in v7: * Separated the DT patches from this series. * Fixed description of reg property in the DT documentation patch. Changes in v6: * Fixed the DT comments that were missed in v5. * Changed the offsets, bit masks to 2-D array. * Clean up Changes in v5: * Simplified the computation of the table. * Removed unnecessary members in the structures. Changes in v4: * Fixed compilation warning with W=1. Changes in v3: * Removed static look up tables & added functions to dynamically generate them. Changes in v2: * Fixed DT binding errors. Keerthy (2): dt-bindings: thermal: k3-j72xx: Add VTM bindings documentation thermal: k3_j72xx_bandgap: Add the bandgap driver support .../bindings/thermal/ti,j72xx-thermal.yaml | 63 ++ drivers/thermal/Makefile | 2 +- drivers/thermal/k3_j72xx_bandgap.c | 566 ++++++++++++++++++ 3 files changed, 630 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/thermal/ti,j72xx-thermal.yaml create mode 100644 drivers/thermal/k3_j72xx_bandgap.c