From patchwork Thu Aug 30 15:45:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10582209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9F74920 for ; Thu, 30 Aug 2018 16:02:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D81262C0FF for ; Thu, 30 Aug 2018 16:02:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBA482C102; Thu, 30 Aug 2018 16:02:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 412D62C0FF for ; Thu, 30 Aug 2018 16:02:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=zO0tmN/ZBNxpUCIcawgs5VzgVKeA8/IlkM4RdfufI0I=; b=sZXPme3AJyIL9jSD6BKPuJZnwD Md7Pm53C77Q2yKeuaexL23N+DPbF/1aISV9ZibSOpNwthxaqI5hUd7Aa17m8rWZf/S1yznBGT3xrY AP6m132DAY1sMfQ6mIO8hoTHBXfW5F0CNW6mgkuZF6zp022MTjFdYaAGQz1qNIsQkUzq+ewQcnG2J Z9Yq0jywM12lC7fb41mYBUylfjxzmj9VNXQ9o2nvT+ezk9eGUCH83T5bLl6ViriaG3xf/xpXpvBT1 CGcQqoB/oRThLSl1ob4VdxoQgBhyvmpSQSj2NGs09NGtXRKRlRHnbJ9431OKt/dQ13biMgur5Zrvx Hk598azQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvPP3-0003gT-6H; Thu, 30 Aug 2018 16:02:37 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvP8r-0001lf-EL for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 15:45:55 +0000 Received: by mail-wm0-x242.google.com with SMTP id y2-v6so2487127wma.1 for ; Thu, 30 Aug 2018 08:45:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uL+RlF1B8X/odxljz0MZSNmhjxVAqq2N7EvHMawx/vQ=; b=sTH3nV6t6alJ644hRiZ1vJjRhtz7c2syDksMfEE0JxXa+Woh1JxBWUovFdbpuw8uzV Xo4/UrH5Li9xXOkir35nIx0HeDLVJKSXIrI0U3KbXNBlIz4731zitPTit7jObJu+hTEd HTtHbzNT0rDImceTuciYxQIKotQbzw/DEK59yGvvp6wb/MDsJiejbJ0Djd9Eg8g05g7w eokB9Cq3ZUzoIEP4cq2UIS1EhQ5ALtYbQ6HUWfcAGvWIDZAaf2axj7LSm5puMhRvutHU rhPI5yleS7mM7Svzn3NR5dK5X4TGHGC7qCdetgr2HpUrP4Q0874BabnexHcftqaT6CDa PMrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uL+RlF1B8X/odxljz0MZSNmhjxVAqq2N7EvHMawx/vQ=; b=BCiA1NsA9qLcqSut3KulC+bgEoD2maIN+glNcnOkLTShTGP284c5rUeP9xOcKiytja ZvZ2t1rrqfhJ8SIkl2xrczGcTwzZJg8TwtxSr1mo4Sy8oxwqYpOPeZpVHAo9/nyyeSxp 5IAIJ8ImpcXW4bXIoGt1eD6bz9n619oz7AWiSSOYLEZRQ6Mgv/At/nfMc/QSESlM+1MU Bi2NZ97UkKJk9wF4a94IhHkjnxbvD2Gavzbh7N17LEgejPAQJ+c34nLZTwsCJ8HrBcZa PNJEShtK6bSh1s4cr+cGwiQJPBifpxfNVC3De5/dqvnqTd2STUqpAxScIWIZE2MGnbG+ ok8w== X-Gm-Message-State: APzg51B0HbcSFZTvtqTV8PKkxGb68rvYp7LbagpmItZW+WfZaHwObwdw +VJ/BNQZj+pgN5BV4Dw84Eg= X-Google-Smtp-Source: ANB0VdbcppwMi0pbfqC1/1hcsx8Wa1g8hjNqGUhDOM+NvoVaj4+RzzJnlnPWk8L6qomTrkarfHUCig== X-Received: by 2002:a1c:1f48:: with SMTP id f69-v6mr2114357wmf.152.1535643948953; Thu, 30 Aug 2018 08:45:48 -0700 (PDT) Received: from debian-hp.wlan.uni-ulm.de (eduroam170-020.wlan.uni-ulm.de. [134.60.170.20]) by smtp.gmail.com with ESMTPSA id j20-v6sm1362759wmh.9.2018.08.30.08.45.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 08:45:48 -0700 (PDT) From: Philipp Rossak To: 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 Subject: [PATCH v3 27/30] ARM: dts: sun8i: h3: use calibration for ths Date: Thu, 30 Aug 2018 17:45:15 +0200 Message-Id: <20180830154518.29507-28-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180830154518.29507-1-embed3d@gmail.com> References: <20180830154518.29507-1-embed3d@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_084553_584466_78B8062B X-CRM114-Status: GOOD ( 14.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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>; + }; }; }; @@ -227,4 +234,6 @@ &ths { compatible = "allwinner,sun8i-h3-ths"; #thermal-sensor-cells = <0>; + nvmem-cells = <&thermal_calibration>; + nvmem-cell-names = "calibration"; };