Message ID | 20181028122629.10144-4-martin.blumenstingl@googlemail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org> 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 0BD8913A4 for <patchwork-linux-amlogic@patchwork.kernel.org>; Sun, 28 Oct 2018 12:27:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECC0729603 for <patchwork-linux-amlogic@patchwork.kernel.org>; Sun, 28 Oct 2018 12:27:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDB0C299CB; Sun, 28 Oct 2018 12:27:53 +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 7E06129603 for <patchwork-linux-amlogic@patchwork.kernel.org>; Sun, 28 Oct 2018 12:27:53 +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: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=me2iFGvlWpGBaV2HrGb73nnagLHIAQi38fymAHlzBUk=; b=GfEwEBVyaob4FF cabeETzDOjGP+BLGV+fA2ObGTeBiLENiKjT/dYLkjfYce7Wktz8i1PN6EBzSxMHAMfy577Cq0ZM2v gmL7mFfTyrl0ftEifD6RhUX0gJ5OgCeXKGqhSmaBhh2hjH1I5hNbUBPNMCI5sBLfL+3y9GDFP+yFj SvnSwpTJgeksZm/gq9EbXFDnwQZ1s79wD1zfenysnIW3MUVRDnTRigIOI2hFyGJxgk+f2BAugKkSX FKWFH42DQetooWjkyq7UkuRgxvG4axCW3NWVFBrh9MQz+vkI+Xhzrhx6hee2tZPAVZx8SOOek96LT er0oi+Y1UWGnXWtU/DJA==; 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 1gGkAV-00038N-29; Sun, 28 Oct 2018 12:27:47 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gGk9e-0001VN-SF for linux-amlogic@lists.infradead.org; Sun, 28 Oct 2018 12:27:15 +0000 Received: by mail-wm1-x342.google.com with SMTP id p2-v6so5325464wmc.2 for <linux-amlogic@lists.infradead.org>; Sun, 28 Oct 2018 05:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/kpheQ08l69z/l+gyVSibpsB09LEwwgtaVsn4Ql83yQ=; b=rs7H9kK9X9aJSBX6iTuKGv7fNN55WDPLd6UJ70ITLl7eaNclfAeGUnpFJFymJD3NrP XWuyEeti4h/RiQyEPHvOoBgcPIE1iaFVgl6QNOY5zBckL3IMt666OgZEf9NNe5iQWo9p efdXnh8btn+Uya4yAMcCFH0blkrM3PuqXrDoMfGEwE4zwfN8CBY9Uo/N8Sw/mZWgWzi2 rVjVlzSLmWqCUOYtwkVucbeXKnGFqM2Q33rW8P1q0f2GKCqj5s1uVR8DjI96YGnYnJJx Jhbbb1SbUDGsJ/IqelAFi0rsND9JMAr7hhFh0spaCgG6A1FjS3uAs2ti/+/cA3TXdDxB 7a1A== 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:mime-version:content-transfer-encoding; bh=/kpheQ08l69z/l+gyVSibpsB09LEwwgtaVsn4Ql83yQ=; b=dTLaDqb8nL5yR0OAgXh01vn+Q3UltVJ3xfTXaSW/Y6SCfpo8jiCVOCbIFxQakxebwJ 0Cwg+0sdTEKFD29lAYtk78gwZYljtHNIowPd8IWh+xYWq8tQTWBU8kdWd7FVmpSrs+mc 7hmf/UiUNemXi1M8P32hJfFZbuExp0N5NP39XE6EXpMCJNWY0HD1q9yh4s8BRZHuQYJC D76pxUEUT9ZHOetwXyAEjzRI1fllrUFJWR4Z1V6aSwALvpe7eoD+QuEpFPKvurewaPRK pnjseexpBtYF8JxMVSAc7PGBtsiAEjegAakpbYUCBDP67I8pfuxVUiPZ5dq4TXVJYOvn Ogsw== X-Gm-Message-State: AGRZ1gJDogPSKU9h1akyg+GppphbopJ0qFbbmK9OF06leqzHkl71jjKU ZvVD2VMjQG0sfJUoDI8Rl+1Qv7I/ X-Google-Smtp-Source: AJdET5ehVd0CTxcBKpSaFROpEglnx8ms52Qyz6GSk1ZD4oOkxMdpF1A9SCPLBRoZiVEOe76od3JEdg== X-Received: by 2002:a7b:c096:: with SMTP id r22-v6mr11145615wmh.40.1540729602891; Sun, 28 Oct 2018 05:26:42 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD7072200691979D1FB980407.dip0.t-ipconnect.de. [2003:dc:d707:2200:6919:79d1:fb98:407]) by smtp.googlemail.com with ESMTPSA id z185-v6sm19334091wmz.47.2018.10.28.05.26.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Oct 2018 05:26:42 -0700 (PDT) From: Martin Blumenstingl <martin.blumenstingl@googlemail.com> To: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, robh+dt@kernel.org, pmeerw@pmeerw.net, lars@metafoo.de, knaack.h@gmx.de, jic23@kernel.org Subject: [PATCH 3/7] ARM: dts: meson8: add the temperature calibration data for the SAR ADC Date: Sun, 28 Oct 2018 13:26:25 +0100 Message-Id: <20181028122629.10144-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181028122629.10144-1-martin.blumenstingl@googlemail.com> References: <20181028122629.10144-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181028_052654_950795_73359E82 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-amlogic.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-amlogic>, <mailto:linux-amlogic-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-amlogic/> List-Post: <mailto:linux-amlogic@lists.infradead.org> List-Help: <mailto:linux-amlogic-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-amlogic>, <mailto:linux-amlogic-request@lists.infradead.org?subject=subscribe> Cc: carlo@caione.org, khilman@baylibre.com, Martin Blumenstingl <martin.blumenstingl@googlemail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" <linux-amlogic-bounces@lists.infradead.org> Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
meson-saradc: add chip temperature support
|
expand
|
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 3e3d9c54cddc..30d4406f63b3 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -304,6 +304,11 @@ compatible = "amlogic,meson8-efuse"; clocks = <&clkc CLKID_EFUSE>; clock-names = "core"; + + temperature_calib: calib@1f4 { + /* only the upper two bytes are relevant */ + reg = <0x1f4 0x4>; + }; }; ðmac { @@ -364,6 +369,9 @@ clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_SAR_ADC>; clock-names = "clkin", "core"; + amlogic,hhi-sysctrl = <&hhi>; + nvmem-cells = <&temperature_calib>; + nvmem-cell-names = "temperature_calib"; }; &sdio {
The SAR ADC can measure the chip temperature of the SoC. This only works if the chip is calibrated and if the calibration data is written to the correct registers. The calibration data is stored in the upper two bytes of eFuse offset 0x1f4. This adds the eFuse cell for the temperature calibration data and passes it to the SAR ADC. We also need to pass the HHI sysctrl node to the SAR ADC because the 4th TSC (temperature sensor calibration coefficient) bit is stored in the HHI region (unlike bits [3:0] which are stored directly inside the SAR ADC's register area). On boards that have the SAR ADC enabled channel 8 can be used to measure the chip temperature. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> --- arch/arm/boot/dts/meson8.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)