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: 10771759 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 F251B13B4 for ; Fri, 18 Jan 2019 22:53:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0E31308EA for ; Fri, 18 Jan 2019 22:53:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3BF030918; Fri, 18 Jan 2019 22:53:21 +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=unavailable 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 77D6D308EA for ; Fri, 18 Jan 2019 22:53:21 +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=DFy38ek2fo3vWNb+TUD54qywpwPfuv9ddzFkI+MKVUE=; b=NgsAZJwN52iAOW YpEzVIrAG1aAn35XrJtUrhvrvG4dXaKo8k2oSzG4LOXXAC+IJ3B8S66qhrEaelAQQ0yTRp4hr//C9 LBu8jhbeR5cVoUU9U9G4/LlJjge14h5LaCV/87eKwNMstdTa8JQg5YSvFV6gfSGnXoKqj3dV87g8T vK/72llnCPFrOo+NDhXNvIZOBKR0XXVWcmB6Kffs/dmZSyiM+VtHcLj8gnl4V4Y7nU+trBidKdO9+ ZABT2LI5SRl01FG83U1KZmI+Lt4QcsF8/vNhv1OYX+D1BGSvvKIi2fGLoICBWYWtsNNnG/MxPLLum zyeAny5Mf5ODtdv1QBAA==; 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 1gkd0n-000139-QE; Fri, 18 Jan 2019 22:53:17 +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-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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org, Neil Armstrong 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 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: 10771765 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 9BD4013B4 for ; Fri, 18 Jan 2019 22:53:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A103308EA for ; Fri, 18 Jan 2019 22:53:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DC7630918; Fri, 18 Jan 2019 22:53:46 +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 2D178308EA for ; Fri, 18 Jan 2019 22:53:46 +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=tFsbCic2FzZPpauswzEa30TOpzOb9IBTKWFfIIcr9As=; b=HNxYUI4zUChn9Z XMvueT+v96/Y1fjakEX/2eE6pmrmAUSLLH8fNglYEsgok4fgSlwG1+YBtEUl0J8aqOvGTsAKuxKi/ rAlb0vgHObJJ4VCNmxG3ZQd8qKOnZXe5Ka+ZTnAM3hcSgSOxcb1gsOntPWYnlCZZMa2ZVidCBsbvA zpAdIkwVndmre+9XyaQVTsS0k4xoZYSqVSnakAe27u7dmWdgsOQE8ixIQkUbaPVAkCo+DcAHe8ALc pAPmPgWMjXzibKY0FTkVWW+ty1pOIrMES0IIbTRIC7hPAA6WgJDI5nX6PwcbxOegCPZ1OWDurmbxa L+Kz5rrAl/7LQjyylhSw==; 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 1gkd1C-0001RT-By; Fri, 18 Jan 2019 22:53:42 +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-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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 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: 10771779 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 2B57D13B4 for ; Fri, 18 Jan 2019 22:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19A6F308BF for ; Fri, 18 Jan 2019 22:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DCC5308DB; Fri, 18 Jan 2019 22:54:57 +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 AE7B2308BF for ; Fri, 18 Jan 2019 22:54:56 +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=TL4fnsXDoFLnBMcLyb1lKKHd4Pj2k09XFVxtXJy+JCs=; b=eHncF6vyzWu7IB kbajYFlPWPBy1VekrwmSyLAIIVurrVw0DdP4ssEBUPv/+YcdIK46fPwiE2wEtKNtaUJRLFwHd3Pf/ 7e+KVgwVTlFCdV3uOec8RFbgBdOhrDxpYED2BuIYpYoOFTD1IXrRwbV8mXeMFnz5MXBSI/m38/mRb 0bGy6Ognu5SpSvoPSl/IAGaZ1CAGKSK2gI2Osjoox/VXaGxKt6WMNX1+Ka45lpQzyUOYGwvi42OH7 z5lFvGgCJ/Re3IFCOoJpgBnZ5hoqS6d9+ckjlkpNNg/1Vg/c61i5c4IBZrpXEqRtMHEuenrvvzsL/ UCw+H1M7rYsFmT0hYEZg==; 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 1gkd2K-0002T1-Ry; Fri, 18 Jan 2019 22:54:52 +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-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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 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: 10771775 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 4FD941580 for ; Fri, 18 Jan 2019 22:54:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CD0A308BF for ; Fri, 18 Jan 2019 22:54:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30E3E308D4; Fri, 18 Jan 2019 22:54:28 +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 B7E8F303D1 for ; Fri, 18 Jan 2019 22:54:27 +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=r3llUEp03T0yxN3dEEOIc70H/DQfA43KJYmDY95zmJs=; b=Yrsdk9MnRVYWVN wj75S2haCt433+dHmiFT9qNRzw5P0mv1IzdTQhh9MGygCKmBuVR4l/BuR4psKLQk2zgkiY4IRp08J AVWfiQU7xG9syzt+OVyyM1QoU8yWujl2Bf9O7E/pweMiXyFyimLe9cmfrkgkKj7R6pQI3SrU6UBoi nHS0+DfZmIZxeRu6O5VKb/TEY1F9TAwv+SFQ4KsH8eQ+0NODf5kFjix+4O4uOu8CU15wfYBGndlOT yBHE/K2RlSwLBJaj96syG9FA81NFH8BhJ3sZKDueQNWMtD/G7yUDyIs4X1Wkyo1KMS2vABjU9KdOv dRM4muX9tauMKswIHadA==; 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 1gkd1q-00021a-GH; Fri, 18 Jan 2019 22:54:22 +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-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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 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: 10771781 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 D2CE11580 for ; Fri, 18 Jan 2019 22:55:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C21E2308CE for ; Fri, 18 Jan 2019 22:55:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B62F5308DB; Fri, 18 Jan 2019 22:55:16 +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 6F64A308CE for ; Fri, 18 Jan 2019 22:55:16 +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=+0o2FVqWY37R/oR7rKGFMJeltWe04UpReJRQ/Rm3yyQ=; b=Fw05lzVD7OVQPm k/9OWWTE6nsn5JVYRrkLpEq/CfEhn777iyzAbd3+l+KwzcM3m1is96HkWKvH/9jdDK9zaQT2Y8kBr uhySYBiypQCaWMAlcxVaPrrDSURDp3tiETI25hE5cC2Eab+EqRucYMBkEJ+zPcLktSPVoZ9VVGAz/ YPqbgLKXmSNYWXS8ofbrP+Bj+P6Uin5cT3ktCSb+/ePkMkGl7MizaDoxux6EIpA5bZxqFwGrTwZQR uP5uu2eZFk82V0xgM32+yBTW++7HglxDuRLqPcf59gdvyOm3x6h1Kgl48N0HSVevjvoGThARndVzM HJAkncERL2uL4MO2fnSg==; 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 1gkd2e-00033C-Tz; Fri, 18 Jan 2019 22:55:12 +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-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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 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: 10771773 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 5491C13B4 for ; Fri, 18 Jan 2019 22:54:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43ECC289EC for ; Fri, 18 Jan 2019 22:54:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 382F4304B7; Fri, 18 Jan 2019 22:54:13 +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 D0236289EC for ; Fri, 18 Jan 2019 22:54:12 +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=XG4BPJ/TDKHCU490Qip9PKOwSu/cFURKE83v5gJcyzs=; b=TivJI8wzDhnptY FhATooEZUYa/+3IWlrykvq/1UTu4tlOHHgnIjUcz5Jj7Pxjev2v9G5YE3/BJ+tbUNeZBrYsCtMoPI ghl5EPZ0+SwJiUPXheYAOD1+tHHXlO3gUJcXiw3NYIlxaGwJyQoZy1xbKARAeLPelFDsGpKHn//tX afzhQNnnO0BWqOid0HQlzD9RczpliPmk7QX+2f/rhHBVRWPqpAX2D1U1D505lZGAGASmbs3z0h1EW URaUNIiQArq6fsmCuqMwZs0BpoOVdZ9i5Z/TW9sbuARFqXIzr6fOkchqnypBRVK4KscUp+7QkF/Gv UBU3kU9SzQpuEaKT4l2A==; 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 1gkd1c-0001nt-EK; Fri, 18 Jan 2019 22:54:08 +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-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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 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: 10771783 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 E601B1580 for ; Fri, 18 Jan 2019 22:55:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4BB9308CE for ; Fri, 18 Jan 2019 22:55:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8892308DE; Fri, 18 Jan 2019 22:55:31 +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 7BF6B308CE for ; Fri, 18 Jan 2019 22:55:31 +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=byMteWifRY6jkwHnhas/U+kwb0Oe6hM2OWgx7mTKD74=; b=sudhOsN3RJg38t ZYs6jXRmWDnQCFVc9AvNoS+8fjg7t1WIxEQf/ZAc6MKn3jIORMCWmstXceBAyyfjzrqA2AIKqNW8v BYvi+dgSz6g42a01U8nC/J8JNjIN4H8VVu+abCa8iVX/66TthJuFpOQ7VW6/Ij/ObigsnNp6UJlP0 Dnfp/nrBBPiNugFnZjUDkIJdkE5sO3O/0T4RdrjLGr/V4Y4TQVXUul96SyN4ipewD5RvX1pXTJ3E3 eKF74b2rZMoLABburxEAqernZOlqZtwD8jvX7+GjqXV/QCftZJidOj86Rzwnu0p3WGKrrcXsWAOKL wCjR5EiX5+E7Yls9GcoQ==; 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 1gkd2v-00047j-AQ; Fri, 18 Jan 2019 22:55:29 +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-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: Martin Blumenstingl , linux-arm-kernel@lists.infradead.org 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 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";