Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1954944ybh; Fri, 24 Jul 2020 00:13:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIi7TWDIxmdHV50Lku/ocw1oSmNvEPOCukIpvLdH7nK7HHrzDC5H3cCyIveo5PQY67mtb4 X-Received: by 2002:a17:906:7250:: with SMTP id n16mr8242344ejk.290.1595574838919; Fri, 24 Jul 2020 00:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595574838; cv=none; d=google.com; s=arc-20160816; b=u+SAjtB/zH54X5QoVOxfv9xN0w+CFcTmv6p9v14dOWZN7n96uJK7zlpZ1CJHmLFHiN 8jT1hDAfO0gVX2v74LteDxCuVLFKsfp1tccx8lyse0KKBalVuAO8Px4+xuM/aPmSM2vD Thlnum1tY5TIXX8YgrjSbxGWGhddkgjtuUB1k/CWCRkz356BYKNdVrOVXkn5gzUbLk57 9V7MEu73FDQk5w6OMzO+E50VY271+HztpiOibepLckwKKUtd1MAEIcPZxHM14mpoofe2 zRPBfORDqgwE8D4h/QN55Nvni7OoarNXA/fA12fQJBZViQdEVSwIjzu1PcIEdQF0XHSE f86Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=02Ga6ExvlOPgfa8A2ZSRGsruf7MO5P83VYENKtmSE4g=; b=QonY1mSsi2qXeNzsfprNoCG5Cbt12iwL7/jMF9/mxjnB+8PpMuR/L/c9O1K1ESspPD 1lGEzcvsKpW2qq6VsD6KAnu3+/5m/oRhk/VkBgYpYN2lJcAKbng0zAQAZNQV9EueEPEU j+NK2gufwT1tJaJ8Y/g5hqrJoiXhQPOcBJfk56hZKHsri6sSFIQItIBph4gbzaUE3/Xg 47vaZoPpTAs1OkDDdR0DRAgaN5/8fptPmKhIFX0UXBwCslFJjrsgeqjSn9A4ygDO0CJH zy0ZBLyip8Omq8lTaKaX5BglqGNrs+pW3ZjWdNHdiwnjT+ARUMGf7Cw7lr5odmW6L2CO V6wg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si110943ejk.128.2020.07.24.00.13.36; Fri, 24 Jul 2020 00:13:58 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726967AbgGXHMc (ORCPT + 99 others); Fri, 24 Jul 2020 03:12:32 -0400 Received: from smtp2207-205.mail.aliyun.com ([121.197.207.205]:47327 "EHLO smtp2207-205.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbgGXHMb (ORCPT ); Fri, 24 Jul 2020 03:12:31 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.2465674|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.0178585-0.00014203-0.981999;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03293;MF=frank@allwinnertech.com;NM=1;PH=DS;RN=15;RT=15;SR=0;TI=SMTPD_---.I6qVYnt_1595574739; Received: from allwinnertech.com(mailfrom:frank@allwinnertech.com fp:SMTPD_---.I6qVYnt_1595574739) by smtp.aliyun-inc.com(10.147.40.200); Fri, 24 Jul 2020 15:12:27 +0800 From: Frank Lee To: anarsoul@gmail.com, tiny.windzz@gmail.com, rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, linux-pm@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, huangshuosheng@allwinnertech.com, liyong@allwinnertech.com, Yangtao Li Subject: [PATCH v5 09/16] thermal: sun8i: Add A100's THS controller support Date: Fri, 24 Jul 2020 15:11:43 +0800 Message-Id: <48cc75920b5c69027134626157089d8b94942711.1595572867.git.frank@allwinnertech.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yangtao Li This patch add thermal sensor controller support for A100, which is similar to the previous ones. 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 f423d44b9290..f8b13071a6f4 100644 --- a/drivers/thermal/sun8i_thermal.c +++ b/drivers/thermal/sun8i_thermal.c @@ -590,6 +590,19 @@ static const struct ths_thermal_chip sun50i_a64_ths = { .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 const struct of_device_id of_ths_match[] = { { .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 */ }, -- 2.24.0