From patchwork Mon Jun 22 02:59:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lee X-Patchwork-Id: 11617647 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A414090 for ; Mon, 22 Jun 2020 13:00:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 461C22071A for ; Mon, 22 Jun 2020 13:00:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="B2CQtZUf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mpHZSrf0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 461C22071A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=allwinnertech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uOZIkJKDU5npFkMu8oXptWfjXCQmSRUJ9qvZuCjhr0M=; b=B2CQtZUfI/B/02+/fUAukZFQn AVXtokxIbArue2LUR1VKcIeLP25htbLc/KifOlBaSpWrQN4xu4Kqn6ppktRidwBm552VXEV2NtF8J 6QytKBZspOeLa3lelaJL6OlA62wSztpDmUhCUp3MNKJsnKZQ6nDIcRTl9MOzbFK+f5AJghepW9dGY qBrTkWwX2jMMhn83NV2WhzAfSGfNBN1SFGcXcQiJU5uWLlIAUIzfGDPwsA60BwoKCLfRrg+qXddF5 I6A4YrxHpUyb+EOI0K8TL2TcfHf1Hi5YfNQMfz333PDKZawTrXv2kCq57O8SpfguY9FBuxnFWD490 raZF7aegw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnM0g-0005xG-IZ; Mon, 22 Jun 2020 12:57:14 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnLso-0002qm-BS for linux-arm-kernel@merlin.infradead.org; Mon, 22 Jun 2020 12:49:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=9MVTiC+Al1ZWWsaB1by9i4kCceZS+p+sq+Qo4+UWCnE=; b=mpHZSrf0VfaZQzvypJclsOxbCr YigjxsQ163pH2h6FfW+ulE8SuV7Kxx0y8HiqW5V31FI/E7eq/ckDySDIzuTLFhRZLd92B9mwtK7mK r/d0b6vBBSZw/5KkrjkcECKLw9rhQAWUosumXm9APk9AjRrDJ9OAOAuaN7Iv8HBxEsIuLcJag3Oq/ arpjOo29pfieWVV5P5fwUG2rvoO8kUuAg3gq6PQ5AeXDLyQT4IfnuUcQApCnNeICHDPLKkw5H13+3 lCA+Y4Nkjtj1rtSHys8HYfk/fsA19rkbWyNXJ6hJSoDA0d5jt5UygB1spRFXk82XZXv1Jj76JOrtw 6wBWId8g==; Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnChE-0002vB-8F for linux-arm-kernel@lists.infradead.org; Mon, 22 Jun 2020 03:00:37 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1491544|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.0179064-0.000141561-0.981952; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03298; MF=frank@allwinnertech.com; NM=1; PH=DS; RN=27; RT=27; SR=0; TI=SMTPD_---.HqMydez_1592794774; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.HqMydez_1592794774) by smtp.aliyun-inc.com(10.147.40.44); Mon, 22 Jun 2020 11:00:13 +0800 From: Frank Lee To: robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, mturquette@baylibre.com, sboyd@kernel.org, srinivas.kandagatla@linaro.org, linus.walleij@linaro.org, anarsoul@gmail.com, tiny.windzz@gmail.com, rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, p.zabel@pengutronix.de, clabbe@baylibre.com, icenowy@aosc.io, megous@megous.com, karlp@tweak.net.au, bage@linutronix.de Subject: [PATCH v2 08/11] thermal: sun8i: Add A100's THS controller support Date: Mon, 22 Jun 2020 10:59:04 +0800 Message-Id: <20200622025907.32574-9-frank@allwinnertech.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200622025907.32574-1-frank@allwinnertech.com> References: <20200622025907.32574-1-frank@allwinnertech.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200622_040032_874970_EEA898C6 X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [121.197.207.205 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pm@vger.kernel.org, liyong@allwinnertech.com, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, huangshuosheng@allwinnertech.com, Frank Lee , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch add thermal sensor controller support for A100, which is similar to the previous ones. Signed-off-by: Frank Lee Signed-off-by: Yangtao Li --- drivers/thermal/sun8i_thermal.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c index 74d73be..7a69442 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -590,6 +590,19 @@ static int sun8i_ths_remove(struct platform_device *pdev) .calc_temp = sun8i_ths_calc_temp, }; +static const struct ths_thermal_chip sun50i_a100_ths = { + .sensor_num = 3, + .has_bus_clk_reset = true, + .ft_deviation = 8000, + .offset = 187744, + .scale = 672, + .temp_data_base = SUN50I_H6_THS_TEMP_DATA, + .calibrate = sun50i_h6_ths_calibrate, + .init = sun50i_h6_thermal_init, + .irq_ack = sun50i_h6_irq_ack, + .calc_temp = sun8i_ths_calc_temp, +}; + static const struct ths_thermal_chip sun50i_h5_ths = { .sensor_num = 2, .has_mod_clk = true, @@ -619,6 +632,7 @@ static int sun8i_ths_remove(struct platform_device *pdev) { .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths }, { .compatible = "allwinner,sun8i-r40-ths", .data = &sun8i_r40_ths }, { .compatible = "allwinner,sun50i-a64-ths", .data = &sun50i_a64_ths }, + { .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths }, { .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths }, { .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths }, { /* sentinel */ },