Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3239311ybb; Tue, 31 Mar 2020 00:54:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvXwCrcAnEJvy1oYL44g2WDJFhjwj3D9ea0HreyEVGOcjCbj+DudlZVD1PndtJy7NcmK7BW X-Received: by 2002:a9d:7f05:: with SMTP id j5mr12460466otq.312.1585641295303; Tue, 31 Mar 2020 00:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585641295; cv=none; d=google.com; s=arc-20160816; b=TWAbHJOch/HsbfCFj7XvJb8/LQp8TCC2JvHRSTDGFHeb8KcWoF0HHNeDPEiI5WVvbR LLVRxNcIl3NM8Yfryk5CuPm9N47JMajBp5i/rQ+OFku5FfCFXi1DJZblilNYqjIh5lO0 MApg4sBVmEhEh3RdBqgEvIZMTzSZPOvLQsbqpmgfbjU1JRdXv9ZybnupWhcrR0sxv7nZ seM6/xG0eTlfFhsGJMDoBHo2bGbjObP0KGEamjuimWNmiyujTuaX9a+BKq5OPo4Vqmx4 UMQhCBjjKP4SScFqzZf7Tu18nibJcNGdYF90KhyJKmlBNoaLUOXPPGp8f7fG6djL+HnF i1SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=1uPgCl7zqIU8IkGEGi3EPMx+udUdfvUF1olxNisngvQ=; b=v/rW/9+QlWdTAgFRCkrbJj2YhYHyQgrHyaoje3TGKOQDbKQTZECMRrNc7JkiTL85b/ 8UROsgiOvcZdNhk3SysODtAPA8YaagAVRLx9vaFJgZDCL4ZQ6P2rMsSVwvRj7GV8wBY6 CbDmsYQeatGJ7Pmg75/plDf+LwM7vHZj9Jb5rFpa1oZrzSSXFxdBbltu5G5ttizqXWbY 3CMhPuTgzh97+pStfxpmQjPc0s/4rHccHKenDjwIL3k9tRpZKB305q+2cz0euN6gag58 aYGCaFzGJb39ZOrVTcY4WUmbd4BRZA81PpLPn80XUCDJU1qe4xUNKirQzuxnHBRhhx0G RdcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZfWapfoe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u137si6406593oie.160.2020.03.31.00.54.43; Tue, 31 Mar 2020 00:54:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZfWapfoe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730060AbgCaHyU (ORCPT + 99 others); Tue, 31 Mar 2020 03:54:20 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:58112 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726397AbgCaHyU (ORCPT ); Tue, 31 Mar 2020 03:54:20 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02V7s6Gb056302; Tue, 31 Mar 2020 02:54:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1585641246; bh=1uPgCl7zqIU8IkGEGi3EPMx+udUdfvUF1olxNisngvQ=; h=From:To:CC:Subject:Date; b=ZfWapfoe5OiNFCrcZP0PObwnFdziWcCc6FKbPJDVMqCMLz1ezbv4kWTj0e/1H5KPu eQ+wamhOPDjwWXc67kTiTcvGgSV14BetXxESEqGjF5P3EXP0rfAGE+Ki6lgRRJa2sm T5JTCK2VFoFt6cLKnmgHrQTC8BivN741utTcoXfA= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02V7s6NG096904 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 31 Mar 2020 02:54:06 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 31 Mar 2020 02:54:06 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 31 Mar 2020 02:54:06 -0500 Received: from a0393675ula.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 02V7s2gf009443; Tue, 31 Mar 2020 02:54:03 -0500 From: Keerthy To: , , CC: , , , , , , , Subject: [PATCH v5 0/4] thermal: k3: Add support for bandgap sensors Date: Tue, 31 Mar 2020 13:23:52 +0530 Message-ID: <20200331075356.19171-1-j-keerthy@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add VTM thermal support. In the Voltage Thermal Management Module(VTM), K3 AM654 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. Add support for bandgap sensors. Currently reading temperatures is supported. Changes in v5: * Removed thermal work function which was unused. * Removed unused preve_tenmp and a couple more struct variables. * Removed couple of redundant header function include. Changes in v4: * Fixed comments from Daniel to remove trend function. * Mostly cleaned up all the unused variables. * Driver from bool to tristate. Changes in v3: * Fixed errors seen with: dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/thermal/ti,am654-thermal.yaml Changes in v2: * Fixed yaml errors * renamed am654-industrial-thermal.dtsi to k3-am654-industrial-thermal.dtsi to follow the convention for k3 family. Keerthy (4): dt-bindings: thermal: k3: Add VTM bindings documentation thermal: k3: Add support for bandgap sensors arm64: dts: ti: am654: Add thermal zones arm64: dts: ti: am6: Add VTM node .../bindings/thermal/ti,am654-thermal.yaml | 56 ++++ arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi | 11 + .../dts/ti/k3-am654-industrial-thermal.dtsi | 45 +++ drivers/thermal/Kconfig | 10 + drivers/thermal/Makefile | 1 + drivers/thermal/k3_bandgap.c | 268 ++++++++++++++++++ 6 files changed, 391 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/ti,am654-thermal.yaml create mode 100644 arch/arm64/boot/dts/ti/k3-am654-industrial-thermal.dtsi create mode 100644 drivers/thermal/k3_bandgap.c -- 2.17.1