From patchwork Fri Jan 18 22:52:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10771755 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 BA27913B4 for ; Fri, 18 Jan 2019 22:53:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A951A308EA for ; Fri, 18 Jan 2019 22:53:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D9B830918; Fri, 18 Jan 2019 22:53:05 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 33E92308EA for ; Fri, 18 Jan 2019 22:53:05 +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=j5fvqOZa1RrDfywJjsOz1vOBrR/A2HkcUjW8SVxnU2s=; b=tf3cE4R3ZFVl1X wNIG2p1OPBfSfGyf4ck6EjS8qUt0p0CFxFxBth90tDOedpoaCYiocQ1sh/eLgWpUI1j6tm3pZubD6 NOO2axvYijG17toUUxC1kOdX+r3Pa3HhzAMDfJisfiDPna8s2UbuLyqofwluVR/TF68SUxqIxJ2YD PfKOy0P+9xBy2vfkw772hz77DYeqeNmTc2XxeEptU68/yW074ynYIbE9zDjwn2iaMgdU/lf3zfVmB bG7cXcCc3SqIx5udg4iU5NPgY57T+dLPFNamX45cO9ipGgQP7Xrm7oajSg8wvNqxY00JaVVmfBlgJ wqsoYppRLVFUuqgWZA1Q==; 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 1gkd0Z-0000pR-Gh; Fri, 18 Jan 2019 22:53:03 +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 1gkd0V-0000nc-FC; Fri, 18 Jan 2019 22:53:00 +0000 Received: by mail-wm1-x342.google.com with SMTP id y8so5916075wmi.4; Fri, 18 Jan 2019 14:52:59 -0800 (PST) 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=LV+y+UpHX9FeIZtZHWd/evuufcRscKJVbJ2RwwXxQPM=; b=pzZL7ZNt9u6bmL3/3BjOTXM3b2jHFnFqkUqqPUBOiQp/vy6sLqRmmzhTIn1SXuYqxl 2tkBC/X6AEwB5/ktBUfMoRFD9CYANBLWN2FLGPFeRzUa+4GsC+Aw6pwqyyrKFRXrtA5K SjiHnVyRodk6wleHwO5ygboxyUr/FhfTz1K6RB++av/vWXE3nUmPG0pnvo1yIp38zz7K YadipCLWhOQOc2evYad9scx46AhiJtcu2h7s3IYPCSUdU1YTP2yEE2rgEzpSarkiCqz9 YYG+G+3ANvzYTL9vX3jmZrhHaCXpISdGgWxDuMb/k6qTX8DDt/TvBpMVpXXV00rGy1hR F/sA== 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=LV+y+UpHX9FeIZtZHWd/evuufcRscKJVbJ2RwwXxQPM=; b=ny9KWZEt5PcwJAgD5el2c6nVgzQXG/7ZacBgzpwXbBlmS2Ez3fLxCZ2TeBFgL80uao 9lB9gkHpaAH5/ZZk3BsQ+iuRvAlV1Cxg2vKve/o++RBpg0vz7stx1VPjLfUGE8LSS+YO 1p2u5+GXQA5mqQgMoZChIo+HXSmDSLB9RXf+lg/fz/Zx2febfj7c9hh3qfQROFEzS7om Tcrtr33sSArvZXl9LHzKReuJGnG36GcWDvZt83DfcT1COlawLhMP6KZcKkUD/ezzMTXH 1+7vTfnu6DxiirwXxvO2AAwcXB5hpLf0ncQz5UUIcTPfL+6AGPcBbDAjWmdskIRaIxam dVAg== X-Gm-Message-State: AJcUukedv3VamsZ56Xjgw01P5nvIk0+q1y54KikUi1lWqbaSXFufnwFu Q+tYl8EgvkKFscE5TfM1IIhoX/Yi X-Google-Smtp-Source: ALg8bN6MmlJcNtUsMaN+yz3jO+4reckkyzHvE3QfUYFgBlWA5UvDA3cTPMgLNR5P2ZOhqA7hkhACag== X-Received: by 2002:a1c:2501:: with SMTP id l1mr17817293wml.102.1547851977684; Fri, 18 Jan 2019 14:52:57 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A810039E290CB771389D7.dip0.t-ipconnect.de. [2003:dc:d73a:8100:39e2:90cb:7713:89d7]) by smtp.googlemail.com with ESMTPSA id x186sm51197352wmg.41.2019.01.18.14.52.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 14:52:56 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH v2 1/7] ARM: dts: meson: switch the clock controller to the HHI register area Date: Fri, 18 Jan 2019 23:52:21 +0100 Message-Id: <20190118225227.6516-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118225227.6516-1-martin.blumenstingl@googlemail.com> References: <20190118225227.6516-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-20190118_145259_536444_9238F151 X-CRM114-Status: GOOD ( 11.54 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, Neil Armstrong Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The clock controller on Meson8/Meson8m2 and Meson8b is part of a register region called "HHI". This register area contains more functionality than just a clock controller: - the clock controller - some reset controller bits - temperature sensor calibration data (on Meson8b and Meson8m2 only) - HDMI controller Allow access to this HHI register area as "system controller". Also migrate the Meson8 and Meson8b clock controllers to this new node. Signed-off-by: Martin Blumenstingl Acked-by: Neil Armstrong --- arch/arm/boot/dts/meson.dtsi | 7 +++++++ arch/arm/boot/dts/meson8.dtsi | 15 ++++++++------- arch/arm/boot/dts/meson8b.dtsi | 15 ++++++++------- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index 2ab74860d962..61486a7402f9 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi @@ -72,6 +72,13 @@ #size-cells = <1>; ranges = <0x0 0xc1100000 0x200000>; + hhi: system-controller@4000 { + compatible = "amlogic,meson-hhi-sysctrl", + "simple-mfd", + "syscon"; + reg = <0x4000 0x400>; + }; + assist: assist@7c00 { compatible = "amlogic,meson-mx-assist", "syscon"; reg = <0x7c00 0x200>; diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 83ed92dae892..829984be4ed8 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -327,13 +327,6 @@ }; &cbus { - clkc: clock-controller@4000 { - #clock-cells = <1>; - #reset-cells = <1>; - compatible = "amlogic,meson8-clkc"; - reg = <0x8000 0x4>, <0x4000 0x400>; - }; - reset: reset-controller@4404 { compatible = "amlogic,meson8b-reset"; reg = <0x4404 0x9c>; @@ -468,6 +461,14 @@ status = "okay"; }; +&hhi { + clkc: clock-controller { + compatible = "amlogic,meson8-clkc"; + #clock-cells = <1>; + #reset-cells = <1>; + }; +}; + &hwrng { compatible = "amlogic,meson8-rng", "amlogic,meson-rng"; clocks = <&clkc CLKID_RNG0>; diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index 57c2a3678110..aa798259bf88 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -276,13 +276,6 @@ }; &cbus { - clkc: clock-controller@4000 { - #clock-cells = <1>; - #reset-cells = <1>; - compatible = "amlogic,meson8b-clkc"; - reg = <0x8000 0x4>, <0x4000 0x400>; - }; - reset: reset-controller@4404 { compatible = "amlogic,meson8b-reset"; reg = <0x4404 0x9c>; @@ -437,6 +430,14 @@ status = "okay"; }; +&hhi { + clkc: clock-controller { + compatible = "amlogic,meson8-clkc"; + #clock-cells = <1>; + #reset-cells = <1>; + }; +}; + &hwrng { compatible = "amlogic,meson8b-rng", "amlogic,meson-rng"; clocks = <&clkc CLKID_RNG0>; From patchwork Fri Jan 18 22:52:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10771761 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 09F781580 for ; Fri, 18 Jan 2019 22:53:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC65230910 for ; Fri, 18 Jan 2019 22:53:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDFBB3091F; Fri, 18 Jan 2019 22:53:34 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 6213C30910 for ; Fri, 18 Jan 2019 22:53:34 +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=M+bxALqdCPmAPH+P8QaT2dKbE79tYA0wBFq28O9FcsY=; b=jlb65GhRjYhobq amDuToTBws+4ncEFucyalaNqxuKihuCgwDqzx7Z54LrDZ2kwhf39G36x4KtK5p8qRofKGRazBuB6P WaP/og9gJGX4CR2xY0fmOCkfyYmgWHp3LU9US3pUB0RBS5+84W9qwziBo3bzFZQJV1D2q3x6yBIjK Dvewc2+nMYxDNIe0Uw5fArj0H2HoZIi5Qdgc1dTkgYPwKm4wYuXd9oWDmRcxe53N1krBqQ12lW5RS RnTcl2UXvy536ZP4mHnEuwEv0JyH8FYWEPwcSsEhOPxKwY6bZumTRSERr4MqqQsfe56qUdza2hoDU 8utBoPjgedIkng08MBFw==; 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 1gkd13-0001Jx-8m; Fri, 18 Jan 2019 22:53:33 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkd0X-0000o3-V7; Fri, 18 Jan 2019 22:53:03 +0000 Received: by mail-wm1-x341.google.com with SMTP id y185so1968948wmd.1; Fri, 18 Jan 2019 14:53:00 -0800 (PST) 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=1uHQ4bAZjvNO49qpkLTZD4pYtUclz2GooyqEYvlGNx0=; b=dRFkUbJ6IGzje6D+VET6gsTh/ZjYPhWYBbeV61KPF+HUZIEwt6SXj5jf88xlt5N4RI Erfhk84Da9q4KJJYH6kNRrBrBh0KR6pRYWio6UCCKvKCPObQYbU17RcXAlNzYr6KTpsu 6CC+/YnvZRPEG043ZOanOHkpDymcDdnkE01YZyzvu3LmWrFgWzTc9tUeFcnbJCNc/44T HV4r+4r8ZYRVQobt0ODe+shr3UmuagdS/mYXDJf5AqhG+nmy2RCNogPKFnk7jxrN6Ukm PAJDr5H9PrK3Zvohidx21tzscZlCEET3T87TPKp5Pv6N2iHE7mVWKpdcktY820ycIyeX F7vQ== 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=1uHQ4bAZjvNO49qpkLTZD4pYtUclz2GooyqEYvlGNx0=; b=aXn2AH+x7PZPX6TND1MlBLv1nx+47z5a9SFLTajYs9FQxSMvRPDSxG9S8fpaRcE95t okG+6TPo5VfGpSi2dA/VYpzs9JbdiYQ/vjOodhMxIb1xmbyT8qb9dCUdIOqqrhtiD28O n5iDp79rwA1WymELSAtgIRTm7nJvgAF1MZVdY9RDyQ+WEEoBwECZP/B2sbpuZQJ79JFq r8mflcAmdIkd+ZbZ3cje+ScaUeFk9ooi2G0ltgJgzyZlnQDPZnstG1aHG3xSOwVJb/Yn A3E+Oysqoq98qWq1f53b7eX1wQjV9fhArr6Qz/59ZftYd7RSQmxyl72QzLj7QI6tZm75 dWXA== X-Gm-Message-State: AJcUukdumoioqtZ1Gx2OGSmw7TigJtKkeUDi+Iqb+kFPZhK4okZm+brs uVv51Sm+gzfBlBVyLGhDa6XeRY6f X-Google-Smtp-Source: ALg8bN67jUtPjRE1LtRIFfm8521swZA7ULIsqmd/pnuISNKUHE2Asev8OkNGLDZ3EbbxTIwHNBQ/lA== X-Received: by 2002:a7b:c181:: with SMTP id y1mr17370378wmi.10.1547851978844; Fri, 18 Jan 2019 14:52:58 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A810039E290CB771389D7.dip0.t-ipconnect.de. [2003:dc:d73a:8100:39e2:90cb:7713:89d7]) by smtp.googlemail.com with ESMTPSA id x186sm51197352wmg.41.2019.01.18.14.52.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 14:52:58 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH v2 2/7] ARM: dts: meson8m2: use the Meson8m2 specific SAR ADC compatible Date: Fri, 18 Jan 2019 23:52:22 +0100 Message-Id: <20190118225227.6516-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118225227.6516-1-martin.blumenstingl@googlemail.com> References: <20190118225227.6516-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-20190118_145301_998148_8D6F6804 X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The SAR ADC on Meson8m2 is slightly different compared to Meson8. The ADC functionality is identical but the calibration of the internal thermal sensor is different. Use the Meson8m2 specific compatible so the temperature sensor is calibrated correctly on boards using the Meson8m2 SoC. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8m2.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/meson8m2.dtsi b/arch/arm/boot/dts/meson8m2.dtsi index d1a28c2adac5..bb87b251e16d 100644 --- a/arch/arm/boot/dts/meson8m2.dtsi +++ b/arch/arm/boot/dts/meson8m2.dtsi @@ -50,6 +50,10 @@ }; }; +&saradc { + compatible = "amlogic,meson8m2-saradc", "amlogic,meson-saradc"; +}; + &wdt { compatible = "amlogic,meson8m2-wdt", "amlogic,meson8b-wdt"; }; From patchwork Fri Jan 18 22:52:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10771763 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 C351D1580 for ; Fri, 18 Jan 2019 22:53:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1AA5308EA for ; Fri, 18 Jan 2019 22:53:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A55A230918; Fri, 18 Jan 2019 22:53:36 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 55141308EA for ; Fri, 18 Jan 2019 22:53:36 +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=nnPbduBwXvBVrQOmtBgJc8YY4OTettNaScyMt14ajJM=; b=NjJ8KsGZELL26x HMzonVfvD3nvGzuLOHDO9pSJKeNXiPUrzw15fCKCeb8IS3sy9zk7eulTwBpdxy8Q+qQrADo5Yte6q jV2Tp1igvgAFDI5/hek8N/bABRF70isEdKF/T5siKZcr68pzEs2UI+P2siqwtoNme8aYy1T5vOtaT GTtFNBSnbi+p7nzceUmGInIl0dpAsAd4kO819SfDjj9OWaVVRlcocRLgVl1eiM5cJk2Jq49YBXBJl pc5Xqo3FqEY5IyxLMDk7QOunNDpLYHsMR1/eWf+MdsTUVjdeuLQEsGDDaMXSayYR3ry1xP+J8gMMZ VEmCs1CiikEmx8BlEaQA==; 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 1gkd15-0001Mc-9a; Fri, 18 Jan 2019 22:53:35 +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 1gkd0X-0000o5-IF; Fri, 18 Jan 2019 22:53:02 +0000 Received: by mail-wm1-x342.google.com with SMTP id y185so1968960wmd.1; Fri, 18 Jan 2019 14:53:01 -0800 (PST) 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=5llSdIDYBFr0D2hZn/CaNdENBIdD2RMZQMIhtJVQII8=; b=MrkxwyVuM/VrYzj6MfmBklx7MzwFAEQIs1gfYfaA6tn4rJHOfg9APHhUL46whRp2BC 3fZt86+ZfVuhgbl9vUwcY7EMNCbqezFJA3J5CmtT7x1Ywa/ayOht8NXh2J5eSJhdtaCd KK0iWHaent6ROazwLewuC8vn+naTUfYaooWXan86ZYkvFHW1c6KUz64EMly2tUi3CwF9 WsfKvNvy4oV0r/Hc/cnrWE8pNvp7OqIy5b7FfJYXiisBeQKF/lF0Na3SL8Ge4/pEPaAR JUVRTpyz0XI8FswEM64kNLXuKQtTH6XCyYp5NItNpTGB0SKuw3IZDdJMe3UG9GcWzZs1 oVDA== 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=5llSdIDYBFr0D2hZn/CaNdENBIdD2RMZQMIhtJVQII8=; b=knGfEVu4kCtvsyS0L7PRufrrFkLit8aYsBwtptUeYjwe9uxaKHQ5xLXbNLL0XQHxvM ClIWJCYlyjWS+2I1cvuaQvBwllFISVpeWbt59BMthW84l9imETEMBgMJfhqVpaeXqUBr Ap0Y9Eq71EyKJxCTkeOMNqAvI3OZiPuk/XfnvI89vLemn6JOKmDBqM5G9Lj0toHJotf9 /QQuN+qv8g6EwwK0yvv25K+rPC5IxCnpKKj7bursPofJTB/HDVv40BuQ4rKpAh/wyglw nSa3xxBz9xnjmmKFaufsRJLEbZfHbIEpbvBQmudoDOlXu/lfxR5IOxCz/FNNSM96Ec3a nklg== X-Gm-Message-State: AJcUukcmZ/8Fj9tPl7l8e+TEH2Ek/jB/1klET+bKKjiheWQY6dVzNNtB K8MOBqWtGCEy6IW2amKsXUev42Fu X-Google-Smtp-Source: ALg8bN6eJLlKs2a/VmCQZuefCkTrGEhlPszBp6t/Hjlia6Y1TZYYAmxKHbB50kFASV1Men1u1VOmvQ== X-Received: by 2002:a1c:ac85:: with SMTP id v127mr15414023wme.62.1547851979902; Fri, 18 Jan 2019 14:52:59 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A810039E290CB771389D7.dip0.t-ipconnect.de. [2003:dc:d73a:8100:39e2:90cb:7713:89d7]) by smtp.googlemail.com with ESMTPSA id x186sm51197352wmg.41.2019.01.18.14.52.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 14:52:59 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH v2 3/7] ARM: dts: meson8: add the temperature calibration data for the SAR ADC Date: Fri, 18 Jan 2019 23:52:23 +0100 Message-Id: <20190118225227.6516-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118225227.6516-1-martin.blumenstingl@googlemail.com> References: <20190118225227.6516-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-20190118_145301_605047_BE349436 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arch/arm/boot/dts/meson8.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 829984be4ed8..c9bd46120cb5 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -449,6 +449,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 { @@ -536,6 +541,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 { From patchwork Fri Jan 18 22:52:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10771769 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 8B3B9186E for ; Fri, 18 Jan 2019 22:54:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AD9A289EC for ; Fri, 18 Jan 2019 22:54:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F340304B7; Fri, 18 Jan 2019 22:54:03 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 1AB282F8F5 for ; Fri, 18 Jan 2019 22:54:03 +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=lvQqbpXT4LC0hVGFtlh65Rf0AefwtKuISo67EG9nDZY=; b=p8Dd0jILRAk3zP 0jwPCcCJL1csppmC+BDLKSnhEsQmOGNyb23k55egwePmiyvA88BFcpOCb8e4WugKNaugBMPoQee7q HFJUSFGC+wtBb+9hRSvnWn+yxaUBkiNVcNfxQ9ixTyUii2vNlCs1vIDvJhywqoPduvEdtl60XRSWN EER6LMOQSPGRqyj1t0jMRmjOC7hjuu+d8n7rVkaLamProndg/UlTAdWUxHTUmh/cl8OUhnXpW14V0 gltDRpWD5n2KXuYJN0R9Y/Y1XF49JcxZ6EUhvNOFwW+2WkMb1qIuAMtF9syhpnLr4tgPyqxtINrsb xlb4LleLJet6xHVKxFHw==; 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 1gkd1V-0001iE-Hf; Fri, 18 Jan 2019 22:54:01 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkd0Y-0000ob-UX; Fri, 18 Jan 2019 22:53:06 +0000 Received: by mail-wm1-x343.google.com with SMTP id t200so5986384wmt.0; Fri, 18 Jan 2019 14:53:02 -0800 (PST) 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=mSoJoNiVuuVYiLJVgbPvy3JD62Wplt9eEYD0+F3PTB0=; b=d4hHNgAZyvzae5v2zh1Ll3Qi9XUIEaKUAV3RErLVrvkQWpIYQtBn6hKWmTEpLplmNL 4w4pnsPsysvOvnhkwIzFqHOIMbw7TOGn23yNkbkL3CbmlPQ7eYM3H0JpilwItaEi829c TjYjB9wOyqSZpDYgHHar6xhympJVy2iuZyEBysDZvdBKwKPny81Pu57S1JzDQWSi6MPG 6EP4z/QfoVbQ1QRJbmL+IRKY84MACWn/qdGfU+SsTBg5pf12E121TrRXUHVzh7JG/ec1 x2j4CslpkxBdi/I8E4nJV0JCIBb20GeDJlE/sin2tvsKfy2c6oQOhIX2QU2zgfn9IqpZ /Hqg== 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=mSoJoNiVuuVYiLJVgbPvy3JD62Wplt9eEYD0+F3PTB0=; b=Q1NyXGT81e1626etnYDJmaYO5YJZBkmzSiDfuSUJzAIptBythCa1o4P4pqCfYAYRF+ HK7JmsNdMzqK9f/qOLd8xksWvpjMEZRNgz7Y7bfk5K1xqt3onkkviBtjjGT6VbZXdnQD fc3OD/Pf6D26a7kVG6BJctkuc0J3PuRwUXIGIhEQCdYVPKYV+ZYNPa2iV9GwzXPQ4US4 obrQvoIB+la124eyE/mdseo14w4rg69S2xwItXgU91EEAe2moq6WIpPqOcH9X9TtzIZT N/9V6WSjzb8MfneDY3DrGlSZj2HCCPvPPy9V9yVv5df2VqYBfKG6zdCAxKUtpS1rmKl9 NQ5Q== X-Gm-Message-State: AJcUukdrHMIviXfYlJ4xawNoF8xwQMP9KJkRxpGEe+G9ttjlzYWoafPd VcU7ao+/vfDI9Ol7lSPvxohLz/6Y X-Google-Smtp-Source: ALg8bN6C/8JdRdDYCyPGTGtx64w9j+HpICtJLSzkshKHLMeOqSnHkbGQSUxc+Hs2Z9SRvrhEbDM77A== X-Received: by 2002:a1c:6607:: with SMTP id a7mr16568023wmc.129.1547851980879; Fri, 18 Jan 2019 14:53:00 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A810039E290CB771389D7.dip0.t-ipconnect.de. [2003:dc:d73a:8100:39e2:90cb:7713:89d7]) by smtp.googlemail.com with ESMTPSA id x186sm51197352wmg.41.2019.01.18.14.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 14:53:00 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH v2 4/7] ARM: dts: meson8b: add the temperature calibration data for the SAR ADC Date: Fri, 18 Jan 2019 23:52:24 +0100 Message-Id: <20190118225227.6516-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118225227.6516-1-martin.blumenstingl@googlemail.com> References: <20190118225227.6516-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-20190118_145303_200426_C94CC509 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arch/arm/boot/dts/meson8b.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index aa798259bf88..7cec76158856 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -407,6 +407,11 @@ compatible = "amlogic,meson8b-efuse"; clocks = <&clkc CLKID_EFUSE>; clock-names = "core"; + + temperature_calib: calib@1f4 { + /* only the upper two bytes are relevant */ + reg = <0x1f4 0x4>; + }; }; ðmac { @@ -505,6 +510,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 { From patchwork Fri Jan 18 22:52:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10771767 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 43D1813B4 for ; Fri, 18 Jan 2019 22:54:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FF8E289EC for ; Fri, 18 Jan 2019 22:54:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FF82308EA; Fri, 18 Jan 2019 22:54:03 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 C1E7D289EC for ; Fri, 18 Jan 2019 22:54:02 +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=OgXficcnMKI0/c/aTlDa0KuFz8em7W/Ud2HL3K71xaI=; b=cIEtxEY97XdRXW pdF2W0QPb7qYENhxG1jw27kva7q7Hr/t/uhP0J3a63BA73KfVSJlNjmuPjDJT+9ETSuhjKgywj3Ha Xu1FqQubEikAw+tf2CcfDtPZtG8u+ZVDUuBu0Y5HPhh+ZMP7H49XWmJq7Uw3zGDoU6O5EjW6fulWy kj2EA+voFLFFrnlDWlz60getUfJC52TSf1Xz2BpIhW+VCjZhsywfiA4wQe0ljpZqNZSSZAkmo6+jV tWDCbpzQuisec2kftmmCh/MhBhvy0DfFwEuCMx5hAGTcfrkWeXAIX5fDe0R7qr9/NlRROpPgID8AF ClABm+eSg8kbo0l/aCsQ==; 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 1gkd1T-0001gq-Id; Fri, 18 Jan 2019 22:53:59 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkd0Z-0000ov-Kx; Fri, 18 Jan 2019 22:53:08 +0000 Received: by mail-wm1-x341.google.com with SMTP id y185so1969013wmd.1; Fri, 18 Jan 2019 14:53:03 -0800 (PST) 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=tvVOVw+uJ/NYlsQPCS926U6L3ZI+t9KgIAVNoiuYO3Q=; b=nvZkz3AiE1dxyyclBHPE2lr0GIAQR0H2GjEGwnDKSgGwzmCvjXvYDYeUETqPUKA1ka 0c52ZkAPQ+3ssNomHuSjyV/MWfu95fTB2RIY0Zt7ZLxW2SgU4J9w+9ALpyJctevmLziG Ptn/4YTTq1ziOetiIRm2SmuWuseqAy/eJPGrtZiua+CgF7uTOCKhI7VcCLjTQHFW63zh 2K8F9TzA6eeIW+1sAnSEdtisNjWJgqcGtkDAYw+CqC7MmWJEIg6UU+RlJu/DVEgMisLx 13Aq0/kVZwz0GncCbkXYxrf9awbqCeA0/5a3yY0DvuM3Rf9mx+2vVrSZFAVKmnRbqSr0 dryA== 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=tvVOVw+uJ/NYlsQPCS926U6L3ZI+t9KgIAVNoiuYO3Q=; b=Ya/HwVtUQsFaNhcq0gn4nYKmXbWSa0TAp3+AHni11rzt6KqND8uP8pN7Ky9x+MRBQQ N32bUDJWawtZgK1rYJCMo8iS42ZFRN5FhcY/yets5Xq+jkKPCRYh0BfQNMG0g/8uOHNy +onngLKfEhtqRE2KkD6cGtANetlAYukcgwRZMDn7tKCY1ATBVvk6gVjpe2DA2MV+HL3k SOhHErZqYciNvBUfeFtmLz+djwV8pzWPn7wP3RCE5vAfMVDhxkZlbi8VOAw32KYBsgu1 R3TuXTW+ZCmRt0k2laSVvAGOzRqOmBRcGLqxlwIe60EJLfgNtY+VtQyZQ/5zpfiXSXJw y6rA== X-Gm-Message-State: AJcUukd0ZOQl8nhPN64dS68bsO2J6HRzwkuZ7LXn56UsVg0hxtEVtfld UaD9zXjy3O1FK1iScZeNgfrvSDuK X-Google-Smtp-Source: ALg8bN6up0q3vhV1gscILKcvjXn2DcWjvO6ZrLKaLxu54MUOLJeIujFcYcYsmQCUs6W9JWvlipdznQ== X-Received: by 2002:a7b:c142:: with SMTP id z2mr17908657wmi.102.1547851981905; Fri, 18 Jan 2019 14:53:01 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A810039E290CB771389D7.dip0.t-ipconnect.de. [2003:dc:d73a:8100:39e2:90cb:7713:89d7]) by smtp.googlemail.com with ESMTPSA id x186sm51197352wmg.41.2019.01.18.14.53.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 14:53:01 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH v2 5/7] ARM: dts: meson8b: ec100: add iio-hwmon for the chip temperature Date: Fri, 18 Jan 2019 23:52:25 +0100 Message-Id: <20190118225227.6516-6-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118225227.6516-1-martin.blumenstingl@googlemail.com> References: <20190118225227.6516-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-20190118_145304_085202_5DDDE955 X-CRM114-Status: GOOD ( 10.40 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP SAR ADC enabled channel 8 can be used to measure the chip temperature. This can be made available to the hwmon subsystem by using iio-hwmon. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-ec100.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-ec100.dts b/arch/arm/boot/dts/meson8b-ec100.dts index d50fc2f60fa3..cba0006e2de0 100644 --- a/arch/arm/boot/dts/meson8b-ec100.dts +++ b/arch/arm/boot/dts/meson8b-ec100.dts @@ -64,6 +64,11 @@ timeout-ms = <20000>; }; + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&saradc 8>; + }; + leds { compatible = "gpio-leds"; From patchwork Fri Jan 18 22:52:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10771771 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 717BC13B4 for ; Fri, 18 Jan 2019 22:54:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60E95289EC for ; Fri, 18 Jan 2019 22:54:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55189304B7; Fri, 18 Jan 2019 22:54:08 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 EC08B289EC for ; Fri, 18 Jan 2019 22:54:07 +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=NaVBfw3NH2Q6O3EZU7JWmqNTbl7yHlKEMY1CKUFSz7Q=; b=V8tbpSkgaAlkt7 FvF8MAaDoZX+KWgBsT54Lg6UN02fF+IG7kAJYLacH9BVH/Mc+UTgqLBcVSLhFsZcKl7lrWHVq5/Gh vt7gTXRZYhP38xX1XgW8wVq/vIXchavJIoED6DaklCZ12p2lDK1F0vzRONSACDWzODJK4751PIKE8 iM+5rewUMzGZep2Jxa3wAeLfHpySOPG2Vva91XiQ0AQPM0b3sm3XmiqHtIJ4zfL06qmIc7MzLMMqx ScyquiaXv9WKcly3RTk+QqC4QQClnAez/9wHC02dls00tvZyd9AYsf1aRZh8UB28zVU/mHv9CGrLU 661KkmXCXQhRcafrv7Hg==; 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 1gkd1a-0001mL-Du; Fri, 18 Jan 2019 22:54:06 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkd0b-0000pt-Cy; Fri, 18 Jan 2019 22:53:10 +0000 Received: by mail-wm1-x344.google.com with SMTP id y8so5916185wmi.4; Fri, 18 Jan 2019 14:53:04 -0800 (PST) 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=6l6WolcewijNZ7C3qoRDiIawTtYi7pkKh2E+h6KjBjU=; b=HL+pGmWDAVhAT1PB2aUZ8XgfmbJHy70tti9LHkfD4OsKNxWEOiN3jLbw5z8txIZH6Z DV9IvPL+1MfzcsMyTMejp4MydpgoNQKHMZd4+Ad26AtCJNNTBOzI2lRd/nczVwyp40Db g2jqFz9VAbEj9z6Pp5xdWRsIMjXG9xC66zycUK1BPLX1PP3qalJDhXjl2hyitEpJAF0h RcNqjAp5/e0Z77p/Otg6XRN1F21kCsRAgLf00jl2BMiLgBTGdJAMheoQV3zKZ2j0Of5a SRyDa4qkiDKXm0T9tNZTogEI8YMLlCVFwZsNbCqMyQ773zIuZC03XLivgQmp0LGOGSJD cqsA== 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=6l6WolcewijNZ7C3qoRDiIawTtYi7pkKh2E+h6KjBjU=; b=Fa+ibocNJWp6IHMOKXDtqymThnjIWk5FHmLNJinaDgSRjMWAJFVSz/A1XtpQDr5nEz C5y49alSeKEIUXNxjzkayPaLRAkC7TvgWXBQHw/DrfHk4U+WMJyhwlRhW9aEoSS9MIHd TfKDeGIk4xbRjYpksJ50sDZ6kXANshZ2K7nrqbZW/pexZIYNtSAcdGUCshqOatyClRJi SFrOsegUGhoOEpmz3YqlvJ4fuvVRslL1yABRXB8Unod/UxpZBO6XDK4GU8Z0R/PNCa4A H5mGsU6IyWioBSzzUQHJ/96i/02xG4f5LLLRVR+eqfggaNFnNEHFVgcvss1xLZR2zdVZ 9GDw== X-Gm-Message-State: AJcUukftDhwuzR2p6ej9t3A/tJLRs76QKtzhWJ5kY4nC7UTwEDuLK6ir iz6PpBqyzMbMIAc8S/HpAKAYx/0V X-Google-Smtp-Source: ALg8bN77H2e9JWrslAM3lXtLXmX98Pb1y2gXqef1vDYVPhEZ/qIQTlZCbnUdKnhtyy242R4P5cHKgg== X-Received: by 2002:a1c:410b:: with SMTP id o11mr17324158wma.109.1547851983053; Fri, 18 Jan 2019 14:53:03 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A810039E290CB771389D7.dip0.t-ipconnect.de. [2003:dc:d73a:8100:39e2:90cb:7713:89d7]) by smtp.googlemail.com with ESMTPSA id x186sm51197352wmg.41.2019.01.18.14.53.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 14:53:02 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH v2 6/7] ARM: dts: meson8b: odroidc1: add iio-hwmon for the chip temperature Date: Fri, 18 Jan 2019 23:52:26 +0100 Message-Id: <20190118225227.6516-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118225227.6516-1-martin.blumenstingl@googlemail.com> References: <20190118225227.6516-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-20190118_145306_014513_371B8124 X-CRM114-Status: GOOD ( 10.30 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP SAR ADC enabled channel 8 can be used to measure the chip temperature. This can be made available to the hwmon subsystem by using iio-hwmon. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8b-odroidc1.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index 0f0a46ddf3ff..8c83590810a8 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -118,6 +118,11 @@ 1800000 1>; }; + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&saradc 8>; + }; + vcc_1v8: regulator-vcc-1v8 { /* * RICHTEK RT9179 configured for a fixed output voltage of From patchwork Fri Jan 18 22:52:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10771799 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 CF6A217FB for ; Fri, 18 Jan 2019 23:06:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCCA62E425 for ; Fri, 18 Jan 2019 23:06:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF5EC30393; Fri, 18 Jan 2019 23:06:45 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 585942E425 for ; Fri, 18 Jan 2019 23:06:45 +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=xyHQ12Y9hsV8z7ga/HpJJrRFQZOJMwOxS/sMO+XIpLs=; b=PKTcw3RMGLnSCW HyNcveZ9boMiGJM10v5AVtq4U78pRvZP0Z0RzyFtl6p6ormD6A1w8kKJKQb69yiUGYquJdRaxHn0E Hjm/ToYKLVQUXgNr5l3liwdGD+WVDUSbu2u63+s2th/aJ34mqH5Y6RqnDNPL2AhAoiSd86oxVgD4g CBoKUkk5TcAhxvZqMHd+aaqCimNUmgt7/ugv0j0GfUkhY+/0PlXsxjmkSXJfPG22BxpB8fBJB3Q/1 x/G8KWpVRs2VQ8/N5kUp4peho4+thxwUu879jw+mRwl8Fv/Ien9h0aJwrX69O2uX/8GZrHtohSuF9 xtTgBYMI+d8Nqt2WVu3A==; 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 1gkdDm-0008IZ-Fm; Fri, 18 Jan 2019 23:06:42 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkd0c-0000qx-Ft; Fri, 18 Jan 2019 22:53:10 +0000 Received: by mail-wr1-x442.google.com with SMTP id 96so16991990wrb.2; Fri, 18 Jan 2019 14:53:05 -0800 (PST) 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=XHAyIX/toFB+9Ta7kl1IOzRCmFz0Mv8bQkAxb45dusY=; b=AiK57wVds52nn6QJg53PbOCAcYW296rGCUedqC+FQni5tlIuSdWo0BUBNZdpGnxtsf cCStOpHLoCqH+OWWa3mgwhI6b9IaKvycbwGD4EkKlhtCcqEln2XcawykeU94+0fHiX3k qWaISpU1rH7AxiHS5u9tlalroZcHEftwgMAW5ioh9UDHokifNQGa9QB9cxN6apNmUuym 8E3XZxbMAXE86ZQ1p5SOvKLMZ++UUoH2lVd3elYvO5NqgvsXQCo6mCPT6lKOEQnPxB27 5KE6VuiKS23la9kdsr3A39M7Lpq+qWGqZ24g1BXB0osvLmJ0IQP46djNPpSZ02eZXUkS 03+A== 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=XHAyIX/toFB+9Ta7kl1IOzRCmFz0Mv8bQkAxb45dusY=; b=KMplHh8Y3zZQa/FFgCk8AUN9sU8f19E09huM9I+Eywt/jd6TS1fVJnu+OHX4Mx7GIa 6E/mhh/G/qcWN6fnwrvTrSaYR/SAfna1Aodwwj4EGCbaUGMMAT+/gphmitqJF/5msbgs bZJoQOMVWIBp5rUnSscYIBCC+gVFtMEjgNARpHbLOScMt/p5iRksjTNAPrNiTck3wYBM TaGIKMsgrtUGMdS2xmiCiZIewdxS5YV0xs9KXlFpCEW3SSv+0v1ufzWzfPugtVpz9XL/ DBCaYQcoZy4lstX/qozIB+qdhkEbCjPYMenO7GfVET4C8TXW0OtK4p9IySbtiD7tCNi6 mX1Q== X-Gm-Message-State: AJcUukdpQRphrAxXftQBaDhD3yNN4jg8I8tgpP6/MRLoSI6ViCueE7ZU 6rLm/MaNf1zVXfFXFRil1FAl4k3X X-Google-Smtp-Source: ALg8bN5jdNYU2yyXDTlrdZB1aSUJW/AGqD93TZkQYdLLIuMDXkrbR3h7Pr6YOpx2NsJDe+j9SpQrxg== X-Received: by 2002:adf:fa05:: with SMTP id m5mr17987223wrr.155.1547851984140; Fri, 18 Jan 2019 14:53:04 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73A810039E290CB771389D7.dip0.t-ipconnect.de. [2003:dc:d73a:8100:39e2:90cb:7713:89d7]) by smtp.googlemail.com with ESMTPSA id x186sm51197352wmg.41.2019.01.18.14.53.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 14:53:03 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH v2 7/7] ARM: dts: meson8m2: mxiii-plus: add iio-hwmon for the chip temperature Date: Fri, 18 Jan 2019 23:52:27 +0100 Message-Id: <20190118225227.6516-8-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118225227.6516-1-martin.blumenstingl@googlemail.com> References: <20190118225227.6516-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-20190118_145307_073858_88BE0B63 X-CRM114-Status: GOOD ( 10.30 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP SAR ADC enabled channel 8 can be used to measure the chip temperature. This can be made available to the hwmon subsystem by using iio-hwmon. Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts index 6ac02beb5fa7..18528101376b 100644 --- a/arch/arm/boot/dts/meson8m2-mxiii-plus.dts +++ b/arch/arm/boot/dts/meson8m2-mxiii-plus.dts @@ -44,6 +44,11 @@ }; }; + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&saradc 8>; + }; + vcc_3v3: regulator-vcc3v3 { compatible = "regulator-fixed"; regulator-name = "VCC3V3";