Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2774669imm; Tue, 4 Sep 2018 09:47:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaYCqlPaSTc2DGDP6QEEPXlxh11TmKkAehlFQXnAATRjwPzdSov9tnu3WdSgHxp8axCqDyB X-Received: by 2002:a17:902:9302:: with SMTP id bc2-v6mr34994075plb.280.1536079669466; Tue, 04 Sep 2018 09:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536079669; cv=none; d=google.com; s=arc-20160816; b=rSPza1j9pMackwi7MxMjZvz+28EPkt54cbmlTJi9N2z8N40ZR+lRAAbLyUa4kkijlm 6B1hNg0mFMM6qn/vR6bWoDOgPME2fkSFfBEJ5CXQRSdh/I97X+u8lZ4HWbgdNT/E/Vi2 Az5j9RpqbODgBl5KoEditaPrKmpDDU9Btaztv43CjmaF/2Epfqerzau+1vbIr3WDr+j5 ILKkKHO5BBY9i460Etb1UQ/X6yXsC9vbfyEbaQZpqlj2/J3me27t7DhIF9BteUHGF31W 8s+XXV9KAlVajXbwQnVRHPYZjLz3qz/VHCIqvQd1EbVaFkVX43uOIos76QoZk/sGq9OF 1XLg== 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:subject:cc:to:from:date :domainkey-signature:dkim-signature:arc-authentication-results; bh=klQhOHrEMll//fReXu1r2Hz6imn5xZXoW6qkoo7PvhQ=; b=jc79N6mlt9uZHqtSRE2aGP1itYFR8U3BC0hNWBg4gL3UXw9h6XwFgDCo91zXkfQHmB MeW6BJoWJf048m3KlDDUAGJYcWftBQB6a1TWPvz7mUkNQNsNLupbkrlxdwPc/QxfRKyU DikBbUNXKyaPK6IsGtx1iuJuTYlWHxSHnTOTFMIY/3onBfHhKkJy2aoF0+++N93p/I/I 9LPHsQkj3a5pagDlwcxheumrYQ5bbWNvWI83t0C7qO7OqanzitOGSOckGrF6962QyutD T3JLV56Nx0rPuC6DJ9db4GcxvxQLx/hnfLdk8Di64ss8AsiqGo7pxsr7HQ3YAOZDqS1r U5TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bidouilliste.com header.s=mail header.b=KczURCAC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24-v6si21144627pgx.314.2018.09.04.09.47.33; Tue, 04 Sep 2018 09:47:49 -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=@bidouilliste.com header.s=mail header.b=KczURCAC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727505AbeIDVMW (ORCPT + 99 others); Tue, 4 Sep 2018 17:12:22 -0400 Received: from mail.blih.net ([212.83.177.182]:57667 "EHLO mail.blih.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbeIDVMV (ORCPT ); Tue, 4 Sep 2018 17:12:21 -0400 Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id f311de5b; Tue, 4 Sep 2018 18:46:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=uSJ6UYRJXet2HMO71h9xlEAjfi0=; b=KczURCACHBttCOn8muVF/h14Pz/w k4z85/n2Fpu1jmclRZci3k0S4nQX0YoJZqAK9TS/2eYgyNjWXzqV2FhL0jqir4Q+ 9F39mVHuIdPGhQ+LEdhpQREFlc8o0QvkA6LyFf7op4JuCKd++MoDj5JgLd0CGRJz IAiKlLDPgHOPyyg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=B1YVLF8JEW37MxokHzXqY0wYqeKO3LvrBDKlzjtNcS/Sx+xGK9P9y+KC YUr+KGxxzY49bXWAmwKJIqIh34XFjSw7vYhN7f5GAPodhEzK3ZBqfQWy/MQ2C+CF eOxV+giP5UrDaAx9IWueDzF0Q5y9UCft7UXKnHD0qputbKNmijM= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id b1c04b4f TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 4 Sep 2018 18:46:23 +0200 (CEST) Date: Tue, 4 Sep 2018 18:46:23 +0200 From: Emmanuel Vadot To: Philipp Rossak Cc: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 27/30] ARM: dts: sun8i: h3: use calibration for ths Message-Id: <20180904184623.e4386b8e6b657b1b25e90c09@bidouilliste.com> In-Reply-To: <20180830154518.29507-28-embed3d@gmail.com> References: <20180830154518.29507-1-embed3d@gmail.com> <20180830154518.29507-28-embed3d@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Philipp, On Thu, 30 Aug 2018 17:45:15 +0200 Philipp Rossak wrote: > The H3 SID is supported by the kernel so we can add a NVMEM Data cell, > that contains the calibration data. > > On the H3 the eFuses are located at the offset 0x200. The thermal data > itself has an offset of 0x34 from the eFuse base. So we end on an offset > of 0x234. > > Signed-off-by: Philipp Rossak > --- > arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi > index 1866aec69ec1..0fc447f0c02a 100644 > --- a/arch/arm/boot/dts/sun8i-h3.dtsi > +++ b/arch/arm/boot/dts/sun8i-h3.dtsi > @@ -106,8 +106,15 @@ > > soc { > sid: eeprom@1c14000 { > + #address-cells = <1>; > + #size-cells = <1>; > compatible = "allwinner,sun8i-h3-sid"; > reg = <0x01c14000 0x400>; > + > + /* Data cells */ > + thermal_calibration: calib@234 { > + reg = <0x234 0x8>; > + }; You are declaring 8 bytes of calibration data but to my knowledge it's only 2 bytes per sensor, so 2 bytes for H3. Am I missing something ? Thanks, > }; > }; > > @@ -227,4 +234,6 @@ > &ths { > compatible = "allwinner,sun8i-h3-ths"; > #thermal-sensor-cells = <0>; > + nvmem-cells = <&thermal_calibration>; > + nvmem-cell-names = "calibration"; > }; > -- > 2.11.0 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Emmanuel Vadot