Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1341639ybl; Wed, 18 Dec 2019 17:04:41 -0800 (PST) X-Google-Smtp-Source: APXvYqwZo64E90PtCiSjHtlM4RR9zhKzLajfwTP7y67hnl9gboxRk+o5IcEb/scgG0mAX1qkmnJs X-Received: by 2002:a05:6808:197:: with SMTP id w23mr1794940oic.46.1576717481467; Wed, 18 Dec 2019 17:04:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576717481; cv=none; d=google.com; s=arc-20160816; b=y/VjCvYWmYBfpPuinCoCuLZbyZqW+D6/UM29nD6YO+Hts43P2Kc01n2CeZ5qTIe/PE VssD0NtQ9nOUXXle8q7LxaYjTesUIYj04+xKsurIkIa1VCqCGtRzbeQesdaaxOuOaWXu QHh2CmPT51/vDjp4j4PUJDsICpEVrhH34OLjO7PZ5o8sJ+yd/F/KLqQvj9KBw0e2cKjV 5IYBqh0/ynhGn1B9X4eADrgR3HQ1UikfQRIQDBj2cne3l2AN1gaIT8ZeTNAMbIiLAKX7 plzS3qtnHDjlbPbgC6JlxQiCgu5LjZ23XqHgV5phdwzLp9JscuewY+SS7Qko87xwTpnC FYow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=MChbRqDqWzHs9v9RFwk9x8nxaKuRQkh9cjHIEVKb7qM=; b=fwhjlLUJlmDZJr0LHQn4KohcovSVeSgx5ny0nIJI9vcQAnZzidBu35hcHAS8PRZUHO /LIgw/L48rvzLeA07Hm2JoOzUckX+YliJ4q3bKYtuR3S3oYyOXVyLINjIW0nNzdgIn1G x+v8FlmNgJQnlVJT8nqBbjSPCiH092EVIpBUcvJ7xNeOZtXPS3VaHGJFn7QCIAufO5dn HfSv07y13NC+Y3uSiLaW13RNcUJTAsvCRdpw6cbyrhrYLPqLIf/+YWbUEO19iHSncODP fqokhsOrPo9Lq3vBOUZCh67yPe2aj7Dj0kEAeJxBYhQ/mDoPJiGNF5fxjbC9gjld8357 JAyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=U716KQDW; 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=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f203si1397386oib.56.2019.12.18.17.04.29; Wed, 18 Dec 2019 17:04:41 -0800 (PST) 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=@megous.com header.s=mail header.b=U716KQDW; 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=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726716AbfLSBDZ (ORCPT + 99 others); Wed, 18 Dec 2019 20:03:25 -0500 Received: from vps.xff.cz ([195.181.215.36]:41788 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfLSBDY (ORCPT ); Wed, 18 Dec 2019 20:03:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1576717401; bh=hTtYEKPfKcEQF9zxM3iLzPQCOmc0v1ZBKSXbqSJHaxk=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=U716KQDW0NA1TYZk7/LCB8IjiqPyVfh9ZWp0+sI9GXC506EcUxTq1F+OZsKQRtAu/ Yajp1L7cH5MqaUqoqofwt4pNzAdsOS9z3h8zPpFu6tlAYgFipDLkk7z6riPtwr9VNd zTYBOItSg+xmlAc37i9nGe0+tpt1nuvwHkQ2C2Iw= Date: Thu, 19 Dec 2019 02:03:21 +0100 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Vasily Khoruzhick Cc: Chen-Yu Tsai , Yangtao Li , Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Maxime Ripard , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , "open list:THERMAL" , devicetree , linux-arm-kernel , linux-kernel Subject: Re: [PATCH v7 6/7] arm64: dts: allwinner: h6: Add thermal sensor and thermal zones Message-ID: <20191219010321.kri5e7knjhc5d6ts@core.my.home> Mail-Followup-To: Vasily Khoruzhick , Chen-Yu Tsai , Yangtao Li , Zhang Rui , Daniel Lezcano , Amit Kucheria , Rob Herring , Mark Rutland , Maxime Ripard , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , "open list:THERMAL" , devicetree , linux-arm-kernel , linux-kernel References: <20191218042121.1471954-1-anarsoul@gmail.com> <20191218042121.1471954-7-anarsoul@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 18, 2019 at 03:18:51PM -0800, Vasily Khoruzhick wrote: > On Tue, Dec 17, 2019 at 8:32 PM Chen-Yu Tsai wrote: > > > > On Wed, Dec 18, 2019 at 12:22 PM Vasily Khoruzhick wrote: > > > > > > From: Ondrej Jirman > > > > > > There are two sensors, one for CPU, one for GPU. > > > > > > Signed-off-by: Ondrej Jirman > > > Signed-off-by: Vasily Khoruzhick > > > --- > > > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 33 ++++++++++++++++++++ > > > 1 file changed, 33 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > > index 29824081b43b..cdcb1a36301a 100644 > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > > @@ -11,6 +11,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > > > > / { > > > interrupt-parent = <&gic>; > > > @@ -233,6 +234,12 @@ dma: dma-controller@3002000 { > > > sid: efuse@3006000 { > > > compatible = "allwinner,sun50i-h6-sid"; > > > reg = <0x03006000 0x400>; > > > + #address-cells = <1>; > > > + #size-cells = <1>; > > > + > > > + ths_calibration: thermal-sensor-calibration@14 { > > > + reg = <0x14 0x6>; > > > > Nit: my preference is to use words as the smallest increment, so this > > would have a size of 8 instead of 6. Same goes for the A64 dts. > > > > AFAICT this doesn't impact the driver in any way. > > H6 has only 2 sensors, so it should be 4. That's my overlook, I'll > change it to 4 for H6 and to 8 for A64. No it's correct. There's 2 bytes reference temperature and 2x 2 byte values for individual sensor calibration constants. regards, o. > > > > ChenYu > > > > > > > + }; > > > }; > > > > > > watchdog: watchdog@30090a0 { > > > @@ -856,5 +863,31 @@ r_i2c: i2c@7081400 { > > > #address-cells = <1>; > > > #size-cells = <0>; > > > }; > > > + > > > + ths: thermal-sensor@5070400 { > > > + compatible = "allwinner,sun50i-h6-ths"; > > > + reg = <0x05070400 0x100>; > > > + interrupts = ; > > > + clocks = <&ccu CLK_BUS_THS>; > > > + clock-names = "bus"; > > > + resets = <&ccu RST_BUS_THS>; > > > + nvmem-cells = <&ths_calibration>; > > > + nvmem-cell-names = "calibration"; > > > + #thermal-sensor-cells = <1>; > > > + }; > > > + }; > > > + > > > + thermal-zones { > > > + cpu-thermal { > > > + polling-delay-passive = <0>; > > > + polling-delay = <0>; > > > + thermal-sensors = <&ths 0>; > > > + }; > > > + > > > + gpu-thermal { > > > + polling-delay-passive = <0>; > > > + polling-delay = <0>; > > > + thermal-sensors = <&ths 1>; > > > + }; > > > }; > > > }; > > > -- > > > 2.24.1 > > >