From patchwork Sat Jan 12 13:06:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10760967 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 EACFE6C2 for ; Sat, 12 Jan 2019 13:07:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA45C295E6 for ; Sat, 12 Jan 2019 13:07:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD4BA292F8; Sat, 12 Jan 2019 13:07: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 64B3A292F8 for ; Sat, 12 Jan 2019 13:07:13 +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=Jo0hc+f7PdniUA oJAEz/lMoQDev5OnG7dKrcoNTr+XMnenAFw6IOeWWkNKUeWHZ8fgFR4ehKLvpvsXBJb9MffMQjn82 c4w+Sr4AyAnPqXFVDwHjCpXf4FSDVoLYgG5MNB5/kGhfj+R7ylNL+v1s/LIuCdHSQGW4mjARLAggQ 5ztomDL48iIDGNFEUK9p4+glYbSmyNyl3XXyrpDQyVrWfUmmbjCfpt5Ime3M7h8SqwVU1Nm2RyUzX mk87Uytq9n5V3jkcaYzQaUiwk0b7CQ0KnEQyMGSXqh/IOBFYNNVaWENDzvY8+bpUxecyzb+ERe3HI k4Og9mzrIeySHRkD29Zw==; 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 1giJ0J-00082c-7F; Sat, 12 Jan 2019 13:07:11 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1giJ09-0007qL-1f; Sat, 12 Jan 2019 13:07:04 +0000 Received: by mail-wr1-x441.google.com with SMTP id u4so18056483wrp.3; Sat, 12 Jan 2019 05:06:57 -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=Yi1XJ6K7Egz432Q6FVhEN6C/3Wz7DtElkRVQcCnxd0RxSivuDpK8q6Fy4sKPSOBc5Y KF7oCUIFQ4hDBA6pf8sNBkmVzVaOI+DwzBD8BQN9cZyFjDQ/DEXJVFFAPUpfWn121Cx+ kOGp7knpDmKsIxcz3C8otlQX2y9mM3EXwAN7Eh3QMRA5ICRVf9dY1SPY4aZPvYbIWCEr SbVqbd6vjPf2iXFRWBhif+sldjXS1MsPh6Ee4g4rpESu0Jcd17HgELX902Zle/QWaK2V VleNVBD5v84Y8XlHDv5P0brRHEteQv8KXPGlrVWSX/kBpITgEFBdvLT1yvdBfV6Z++Zn 1nWg== 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=n1TLvAGXv85r8rE4lgRgQZVr2DBVTqXheOn5/QX6/EwgUgGRJJLJ2PZt/KxPRcLdeD blLCLwJLBz5sfuUI+KarPummeT171Ii2CWcrbYy4tdaPrqp1pdLvZeQjfIwQQpJOWR7a EUO9dUpJ4BZEhdW3k5O4rGWvezFCHIBCV+cBYy+DVW/UnTtt9YyD7CvrcME+gaMdDg3v SG9odITc814ClCpuN8Vd0Tko8a5eii9+p6Y8WYFu4/F+Yhm2Rb0WRCznAZBXdAOdeqzA fXXFX6IoiQ5UqP6bVkifdb9ESlb5K1GoWHyNMQgFnKcxEbMA2Ne5EONaWpK7+2HIcSu9 6p6g== X-Gm-Message-State: AJcUukeP+xe4v1wtud2UkJIhv/5Ipjxa0xEi6UuVL9IyxnRooU3xsWKD nQ/oJ5nc2QRhwg+ZX/doq+K+wL4i X-Google-Smtp-Source: ALg8bN6oKrtpJcpBPXFYbJMXhbtYjvdAsL4ZSNLxrD1cptjhN/qZtMmpPqOv9Jsdc+eaZbeZfbXD3g== X-Received: by 2002:adf:f504:: with SMTP id q4mr18065614wro.321.1547298415663; Sat, 12 Jan 2019 05:06:55 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7329F008D685E3E728ED25E.dip0.t-ipconnect.de. [2003:dc:d732:9f00:8d68:5e3e:728e:d25e]) by smtp.googlemail.com with ESMTPSA id o5sm37804630wmg.25.2019.01.12.05.06.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 05:06:54 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 1/6] ARM: dts: meson8m2: use the Meson8m2 specific SAR ADC compatible Date: Sat, 12 Jan 2019 14:06:44 +0100 Message-Id: <20190112130649.23838-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190112130649.23838-1-martin.blumenstingl@googlemail.com> References: <20190112130649.23838-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-20190112_050701_292877_873D2AA0 X-CRM114-Status: UNSURE ( 9.50 ) 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 Sat Jan 12 13:06:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10760975 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 212BA6C2 for ; Sat, 12 Jan 2019 13:07:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10D63295E7 for ; Sat, 12 Jan 2019 13:07:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0545D295E9; Sat, 12 Jan 2019 13:07:49 +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 A9F9D295E7 for ; Sat, 12 Jan 2019 13:07:48 +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=BNr4bYGipGcyhLk5DsTnTCKNvofNKezPmyG+5JCpaU4=; b=kDhCreEIZ5VhCW hywHY2qjM5l/56kV0piOq8KNcOeqKCi2XcFsiWh+JGx0fYvgoX5Tra9kUFG9nZE2m0r/SSj9HgyCz iEuSLeB7teSwPTjhUhJDbW/t33v5DCwvQc7EvCn/08/xBKJgRSPPHyTNcuJhYdCLn7krVJ2UqRHuf obcg78ir+dnZuu6mX+95z+VRdmrxBIucxteuT7LkRW6yfx6FC1fEIjEgNxnbu64vKjV9Yb5cSXtya mfh13kTfNPds5vQt+/lejnv6WvN6S06bKNIp6m0dXB/Max+jyVtfpKf80d8WZj2qP5qFvFeHNQ2Fj W1X31GdcloPabYNH/QLw==; 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 1giJ0r-0000CR-Qp; Sat, 12 Jan 2019 13:07:45 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1giJ09-0007qY-LG; Sat, 12 Jan 2019 13:07:08 +0000 Received: by mail-wr1-x443.google.com with SMTP id q18so18002495wrx.9; Sat, 12 Jan 2019 05:06:58 -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=X0DVle89JG5JTLCgwoLl7aCIrZA7dPHg3+1ZWFBYSeI=; b=YefjpmFXGcXUkogc+OefuH+HXmnqlj1yS0Jg98dnIjm6HZeihAV0wU/LRU5auR7YTp uqHuAfKmwFV8k2s4nHfxVLDQZLhyJ3bibsKX0D/dYvI3G7p1Xd/wVkF1KteeDQfIhf0V 7kf9tgtmJErVPqPXDX44i8sF8l1ABgpTAMjyV+sBUefv4EnTwFqZVny+7VIY9T2y7/LP QpmzBEM/i9+jeuuZZUZuAdJRY78QzhV4sPEEU2I1+SkwCUOhdjCGRoVov1FdmkQlzu/9 3eH/VrVizwjFG9ky5LJmSzHUaCISaMvuXgZHv2vkvMckUpogIGVMGEfXLwkhkcT+2HrW phMg== 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=X0DVle89JG5JTLCgwoLl7aCIrZA7dPHg3+1ZWFBYSeI=; b=bvpvMZyPJXSEfOIlVDDWBkl1jPD07WBnqQJGAXPSWEF/I86ElwrxJevN9Ga4GPm2Zz Bkp0JbY9DyBj6iMEIFIV8XsT9Gi4E+UH4YZHZ8NIzzGEmuuqchxdjXdf07diYPaMV4d6 ltgDhjONNez4xpZtTRkzgGuAkfZSO7FUbpgfPCvuHAZbxRadzyNVEsI8bVy0KwD8EyRy C/XqOYtJ94Sb0QhdkkX0JcHwJO0YQG6KbiWBvxcsvnOMNKS9jVna+6dKieWanTd8Y3kg 65EUvny257tWl0KXq6MCEI63Xa1B4zGfeAja2mTQnW5bf1ANuGC3ntYwnDSNeFZzbBqW Y2pA== X-Gm-Message-State: AJcUuke7qXQZHRPIFEu64NOFNfsKKGdDmz2mMPQDABSZF318t3/VFFLr mihrp2/d9M04UeZnhPENqHfskKpT X-Google-Smtp-Source: ALg8bN4nX9DZBSCv/ZN9AKhcOB2ftMpdxo/Y0q2bKoG9N0pXPd7GoVbuUos6lvj8h+Ugotf/cQapvA== X-Received: by 2002:adf:9b11:: with SMTP id b17mr17690965wrc.168.1547298416777; Sat, 12 Jan 2019 05:06:56 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7329F008D685E3E728ED25E.dip0.t-ipconnect.de. [2003:dc:d732:9f00:8d68:5e3e:728e:d25e]) by smtp.googlemail.com with ESMTPSA id o5sm37804630wmg.25.2019.01.12.05.06.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 05:06:56 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 2/6] ARM: dts: meson8: add the temperature calibration data for the SAR ADC Date: Sat, 12 Jan 2019 14:06:45 +0100 Message-Id: <20190112130649.23838-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190112130649.23838-1-martin.blumenstingl@googlemail.com> References: <20190112130649.23838-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-20190112_050702_024012_4EA652D1 X-CRM114-Status: GOOD ( 11.63 ) 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 83ed92dae892..5c6af73e4fc0 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -456,6 +456,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 { @@ -535,6 +540,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 Sat Jan 12 13:06:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10760969 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 2A6B46C2 for ; Sat, 12 Jan 2019 13:07:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19BCE292F8 for ; Sat, 12 Jan 2019 13:07:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E053295E7; Sat, 12 Jan 2019 13:07:17 +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 98619292F8 for ; Sat, 12 Jan 2019 13:07: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=fAwMAkngDj+1Zg2oRotcFgORlOyBKD1lKoXjLOu5uXg=; b=l5rtk7iYeRpeVb MuG2WJ65peElyI0TG5CQnP6PnjdJu3exxeP28IjEn7+xmnk+eJ1x6hhgIrs3V6FrdOaK6sjQ/oRBN vV14dLskkY2w0ZWEO623ZQUFC+pkLCOoADVq/BC3tlQQcLjDpaLZut8thRLGeOfCZhL9AhFSNLPFd dtfsxUn5Jn75qN5pvKbmspl7SJ8F03hr5pA38KTO0hkPITUsKNkgryTY2YR0S01nvxShLxYWOEToi 1xT+Aq48sh5HfLBaAdCVy4afKmBOujPojlqfby5C9L7RdYPWbS2rSiQpkrD0ZFuFhfci+72PvnpLk JHH0aUTzfHkOc31fklbQ==; 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 1giJ0L-00085V-PA; Sat, 12 Jan 2019 13:07:13 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1giJ09-0007qk-MG; Sat, 12 Jan 2019 13:07:06 +0000 Received: by mail-wr1-x443.google.com with SMTP id u4so18056532wrp.3; Sat, 12 Jan 2019 05:06: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=VArxWMqn4+gFNKzFAJAbEq9HiG68ruiYOWpS8j58A8k=; b=e9qp4v43Avmo8hv1EHr5xbOru1HZCHoJCt5nzMrIOCwwDRB+oqnOA5s1SlIHYZKAxD 3yfZnN4ruhSv6hTsi0YpG5HCG1en9z6gC0k16uImyYUxew1YR19SsRVwHktn6N4aZhsj 7HHX4hsKDpIudhWqhu7MD+HuMrc6pBjpIN5HFs5qzAdusCwx1finklUTgwv2MmH3Fhfa QLPi7oGQtjT9HfdMKLQ6yYUoTQsALPow5rXUUEBIUwd+tmJV2ZP/9vj2S1DWoXbtvang 2/hqQBpMAEq4zwHqJmi4ut7KMiSQYxWjwPQ72gcuqE61j1i9Ej/xCmw9XDfNQMHjJBWj hKrw== 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=VArxWMqn4+gFNKzFAJAbEq9HiG68ruiYOWpS8j58A8k=; b=mL5tK2mSZqHfkuapN6rJ66mQ7cNSgth5sq1KAlO83NllD7bVSGVLOATrvhoui2YLR3 ZBi0WbT5yTG9k53rnWuH+/OnYdrfp33qhsRVA9kOHrFJKrP3CR5e0HvP2uP3Uy9Kw/PO t9dkHkmEPFjcRlH6wirzzXq4Bb4CJH+/8cX9s1SPZd5Tsq+ptCJUd+f5ZQkxobs9OpMd nAnFvH6GB/IX5qjwma4DH1PNd7UAnXzrwsPkCk1ZulrNltceBOTc9m5rK2Ndko8mQgMo NCXdNYjXT7gr1P8gUA3I95MJllqXgrh081lTnxDJsf8q0uTfs3JL42GTJFpSLgoxubIC 2wXg== X-Gm-Message-State: AJcUukdInJqth5irA7rvkFq7YA5fw2GpqgrDfwrAMULrYbaITghXtvV2 cGBPND4/dLvvX/N4rhc5N6TDDT2f X-Google-Smtp-Source: ALg8bN5GFtaKBvE+BM/WiC1dO/9Gl3A1/mpfnM2PjFwHQrQBS4uyt64H3vYdhpb4TjKokQBaHTJ5Tw== X-Received: by 2002:a5d:64c7:: with SMTP id y7mr17041556wrv.207.1547298417878; Sat, 12 Jan 2019 05:06:57 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7329F008D685E3E728ED25E.dip0.t-ipconnect.de. [2003:dc:d732:9f00:8d68:5e3e:728e:d25e]) by smtp.googlemail.com with ESMTPSA id o5sm37804630wmg.25.2019.01.12.05.06.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 05:06:57 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 3/6] ARM: dts: meson8b: add the temperature calibration data for the SAR ADC Date: Sat, 12 Jan 2019 14:06:46 +0100 Message-Id: <20190112130649.23838-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190112130649.23838-1-martin.blumenstingl@googlemail.com> References: <20190112130649.23838-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-20190112_050702_044856_B4333A4B X-CRM114-Status: GOOD ( 11.83 ) 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 57c2a3678110..3bd68cf8f6c0 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -414,6 +414,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 { @@ -504,6 +509,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 Sat Jan 12 13:06:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10760989 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 E7FAB91E for ; Sat, 12 Jan 2019 13:12:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5A0D29282 for ; Sat, 12 Jan 2019 13:12:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9C52292EA; Sat, 12 Jan 2019 13:12: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 8A26329282 for ; Sat, 12 Jan 2019 13:12:08 +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=tWLpEH5a3QADsh Im3QlYJAj9stpk1zO25dm/QBegpLyeT7exVareL7hNMWREybNSkE2LyFC+NGTOIw57SLwn4Lp4jq5 wX5OcPnlrxljPB4qK1FpKEtiPIMc1Zo5fViQRkdNHnf7oc09O6evRcRGY1apQeF2S0hUK9V1cjgut lfcrVB4jcbcdS0udSk4zurWI4ctrcTcr9XPyppr0UpTYMEmb63jLTvSoF7O/r4OI6aZSsYUY+roKF dS6BQDytWHspMvB12Ydwc5Z8EE8D/OGOSNm3xwwXcWgXNxQQDlrIQhynqk74rB5KVtwfSVMXVFyok 81bwqhGuFm88B6f4Oq7g==; 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 1giJ53-0002lS-1V; Sat, 12 Jan 2019 13:12:05 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1giJ09-0007qp-LD; Sat, 12 Jan 2019 13:07:09 +0000 Received: by mail-wr1-x443.google.com with SMTP id 96so18060169wrb.2; Sat, 12 Jan 2019 05:07: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=tvVOVw+uJ/NYlsQPCS926U6L3ZI+t9KgIAVNoiuYO3Q=; b=JtAaer6HEDFiWaLeOIH0/8LzIGdzppw9B1QdfxxmSQ+wBGHNKH/f/y1U7psRoR6bmK 4eDsTGHkMQUl7L+jj5FS1zUIN17JWkFvP5Tu3qsAiBxOLxub7GESVQ3IP6IfDajUrS93 vGiC6vvItxDzIWQCsECTFO9+ANMhYiYUMREycCELnG2ywNblWMSsapKqRfJzwmQIOuE5 HupJHVB1mqJsmP48ey8DNhyjmfX5AhKvaiwnlQd6QrkcXJI+2YI+/oZ1XXMcOOfFQHgz 9PWPwJkjbR/Eu5ir4RX2X1q1AQh2PkWdr8Rh1VQN1sDYCrPXAWAaWgl73Qc84sDb8iED sRHw== 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=lLjPMKBKDdksfS1QzCnpuk2EL4daglv5/1PBwNvUjYXvnEy7oKFvh4zkGr651+QB46 MNEWRSJ5GMUpyLgxMAubFGNlZtnxbZ+XkgbC69CLmmUjB302SC50SsjS+ZoKxBN8SZ3t QdrDrih6/gEAE8HVj3H+LA7c5r5+FwKv3Xku+eFGIW3AnfU6bfqh76QR4dJCwIz9w7JV /+IToFescFVcHbQFCEDaO4srgR3GI3mJKflNj3MAu9hPjXHz0ZMZ5ca4MiXYzDqmpZ+g b0cNiONI4FWpm8lE+DaefZfi2To0wwijZMzYX9pJ2xMGp+hQzLNozGJkSUrTujMQfh8a n2bw== X-Gm-Message-State: AJcUukcQP/KD+DWH/5rX2B62WV53d2sZoqZIGPIES2ce/EURip9B603Y 6MnJ1amM5UG2euOXqhOiZjIkDbNl X-Google-Smtp-Source: ALg8bN4+1n9EJa6KyREXsijp+byyuXSYwf5FBrOHQvmPSU3bVcW8xDYR/SFpgYajq7HzAoZGO3lzcA== X-Received: by 2002:adf:f1cb:: with SMTP id z11mr17100664wro.35.1547298418976; Sat, 12 Jan 2019 05:06:58 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7329F008D685E3E728ED25E.dip0.t-ipconnect.de. [2003:dc:d732:9f00:8d68:5e3e:728e:d25e]) by smtp.googlemail.com with ESMTPSA id o5sm37804630wmg.25.2019.01.12.05.06.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 05:06:58 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 4/6] ARM: dts: meson8b: ec100: add iio-hwmon for the chip temperature Date: Sat, 12 Jan 2019 14:06:47 +0100 Message-Id: <20190112130649.23838-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190112130649.23838-1-martin.blumenstingl@googlemail.com> References: <20190112130649.23838-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-20190112_050702_028311_9387A366 X-CRM114-Status: GOOD ( 10.65 ) 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 Sat Jan 12 13:06:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10760979 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 F1E9F91E for ; Sat, 12 Jan 2019 13:08:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1177292F8 for ; Sat, 12 Jan 2019 13:08:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5BDF295E7; Sat, 12 Jan 2019 13:08:01 +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 B3CBD295E6 for ; Sat, 12 Jan 2019 13:08:00 +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=IBOI1krMuVeMYg XMYmi8D16T67ncNOmTptZhRMyKZO3ZMt9VIaccEhaz/dFvQvmGlxmEHk/R69a7uAHJUnXdKTuHB3l y19o+fJcQ7vEBz5PLTVvWxxmZunx5uDosb78/n6LhbMGrCGoJ3M58M0qRY6/ibgZYZDtuGmlBCyMY x2VKBuIvCI46HeQ0NUmwgBr5fVM+k87sgaYcsbBHhAopeAdR+82cUoYuCkKNxZJp0MgBFV8+NK92H No9A6NO/AH43aHKE/i4LQnoSlgjQ1hiHBlSoWWfj1tSMTJ3qbtUS5LVK0SUcRX27o+Z9X9Iig9YSL QT1FQ6x9IMrsNxsyjdFg==; 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 1giJ14-0000RP-KG; Sat, 12 Jan 2019 13:07:58 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1giJ09-0007ri-Va; Sat, 12 Jan 2019 13:07:10 +0000 Received: by mail-wr1-x444.google.com with SMTP id u4so18056596wrp.3; Sat, 12 Jan 2019 05:07: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=6l6WolcewijNZ7C3qoRDiIawTtYi7pkKh2E+h6KjBjU=; b=Qv1nZQT7lbDeJyhdLuUrTSn4WSa4vTbILXfVwfvX2G13FsMWoYzWsrWXI4iAIHp1sV cPqDmv2lAU+alvmscrDWgkUVXH5hlnzfjfjSxcclVKgWUJ0/mCSTqg4TPeegGOUHZVom mRh6b5yKOUScsQ1vihq7L2YbfWhHXUYcIkWsE5JM3AcwrnlAceM5os/Re2JZDYvFxaj2 tdFonFQdzwtpD143ztPtceU5Oz+EZ3ecZO25usCGikxSnl2DGmbiFvz6tCbp+J4kR7hP 2viFrSvgItDM+Hz9a75GCRI34V4Imvxqd9QCdkIFUjHLR1TiCXpONHHbr+6bpk6CvreM KzJg== 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=JADq+xvur+gbMN+ullwXkrkJDl1+9GD3vC4i4pHkOo9c8CAlxUbu2PwbJ0Qz+Qfa85 qGb+Uwg5Mtks7vonDjH0ATdP9rqoXMV3AHvOn2uJAmL5eMR4b0IwJs0sWP3QXimFWCkw BJCPVG4w67o/038jzLeOA6EUXY0qM5q3A86yW660oQAWpLJ1rb3NZfxNR7H3jettvhzG iHO3NULbKHKfp6b7VC9hNjCb/qFfjUuTExX0ESRVZDhuwPt68eNvZ0vnsaUvPRYM0FkP h0XQiqx9DKMfE53O4xoqZp/A0FK+HB2BrUeVTZJSpiinzQGv5pEmIy0FL8lPsdjGwjMY mxXA== X-Gm-Message-State: AJcUukeHx4njnjAdWUUDoi0oZQynHzt/4NUj6XZhbdFRyx1+eZlpLcOy BZrPx2QKNLVzm0l4Wm+EoxAscjJC X-Google-Smtp-Source: ALg8bN4vldF5n3FNip2AuU3Ba+zsVUgaeBCbCX8DpJ54f65UlIR3VnFy5T6CmGZCPHzXegSLwB03/A== X-Received: by 2002:adf:e78f:: with SMTP id n15mr17666919wrm.115.1547298420120; Sat, 12 Jan 2019 05:07:00 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7329F008D685E3E728ED25E.dip0.t-ipconnect.de. [2003:dc:d732:9f00:8d68:5e3e:728e:d25e]) by smtp.googlemail.com with ESMTPSA id o5sm37804630wmg.25.2019.01.12.05.06.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 05:06:59 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 5/6] ARM: dts: meson8b: odroidc1: add iio-hwmon for the chip temperature Date: Sat, 12 Jan 2019 14:06:48 +0100 Message-Id: <20190112130649.23838-6-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190112130649.23838-1-martin.blumenstingl@googlemail.com> References: <20190112130649.23838-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-20190112_050702_415669_BFBD5BA0 X-CRM114-Status: GOOD ( 10.34 ) 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 Sat Jan 12 13:06:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10760977 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 5437091E for ; Sat, 12 Jan 2019 13:07:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43A8F292F8 for ; Sat, 12 Jan 2019 13:07:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37968295E7; Sat, 12 Jan 2019 13:07:52 +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 DBAC6292F8 for ; Sat, 12 Jan 2019 13:07:51 +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=mlPOHVWDxixhgr aixENY9h360P6SZG+KN/88/IAdhfELkkiVHf+QTVg+O1bAjzFJCgw+IpvESVp0kE0+zqPeU3YJRvK SJeAKMt9inmRXEpR46DDgiNhmY3t3g+EO/NlpIgt8Zm8pN/far9eFamu7oOX0KOs2G8lrqUov3GKM fPy0uaGPYd3svzDeh6CzVylbZXOXvZNIuKh9jEbhoufTTgRkwJykLl/V51td0crmvpo29PuVqyl/F ZTcjB6+BXyXcEUzHJDNfGEiO8hN6GStupCVjR/ozai3Rq4xjI0Pl7YGds2TH2WXJsuY67Yeks4ko6 nu1CI2Wc8KBoU5RgHdHw==; 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 1giJ0v-0000Gm-Ba; Sat, 12 Jan 2019 13:07:49 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1giJ0A-0007t2-V5; Sat, 12 Jan 2019 13:07:09 +0000 Received: by mail-wr1-x441.google.com with SMTP id j2so18107043wrw.1; Sat, 12 Jan 2019 05:07: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=XHAyIX/toFB+9Ta7kl1IOzRCmFz0Mv8bQkAxb45dusY=; b=Bz418p6Jg7WkyPY9KXLFlpbta/vYzsjeaTLzeb6J4i3WYT0eNe4upQPNT76umfNpR1 DeAwnjp/b67tJOm8qsyWeuOSB+wRAvq8hMqqdFMgMBqOLY+wTuroaHo6bqJP23efwvqB YrBmogdcpn4pBaM9741EWTCjAoL/oCbBkEayibpnO24u/zuENoBynQSAKnMwuJ/DAd4P yEGj70Yql5oO0TfqgXogAZhz/LHPaAUToMxymnV+t1dNwwIjtAjtdnJUxhGrvEBJ2MTO Go0u58mnT9mqosC94SQKFk1v2+srJjE9jM6OiaQhosnfZGdckZssIHVnp482ySp2mts8 lOHg== 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=XHSA6CLx4/25irroMxYnei3lI25yJdhPMCTyvGAqlfRC3+OsdT12aQ+Tt4bp1m67/K gu0YazGTSKAMvmfOecBAuiTOQM/ra+XFC+VU6EUil6Y5+aHwFxXTBw47+MxQQiqKTrsw rvamafgQzuSjpujC7jUWGqW2JMzpcAvqEwF6hrsLK9+Fjv0Sp3FL3GQr5bLUFnwOt8cD 1Xbs8UCCum8FsMI0L0nK93dSvgfRNTJ8pla6PLLhijb05pSH3LtvxUd0zDnF34anh4z4 2eKu571isNAdQWiumhm2cUQVUgHK0+Uoz3yf8Bj8sDsi0vZWbsnyfPbx/H1d8kSc+TJR ijOA== X-Gm-Message-State: AJcUukc7ZqIxtwCNy6mXOd8UgGYgXActxDdidoOoHs1/KGC3ZmuvV6LY zhdk31NNYV7qV2SO6q570gq2cDLZ X-Google-Smtp-Source: ALg8bN4K4jHCkjSlK5KlzD08vGrljo6QkafYS6/Nb8v4bi9vW6rau54FGsZu+5ommDt4JWW/SS5ouw== X-Received: by 2002:adf:ce02:: with SMTP id p2mr18780598wrn.185.1547298421224; Sat, 12 Jan 2019 05:07:01 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD7329F008D685E3E728ED25E.dip0.t-ipconnect.de. [2003:dc:d732:9f00:8d68:5e3e:728e:d25e]) by smtp.googlemail.com with ESMTPSA id o5sm37804630wmg.25.2019.01.12.05.07.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jan 2019 05:07:00 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, khilman@baylibre.com Subject: [PATCH 6/6] ARM: dts: meson8m2: mxiii-plus: add iio-hwmon for the chip temperature Date: Sat, 12 Jan 2019 14:06:49 +0100 Message-Id: <20190112130649.23838-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190112130649.23838-1-martin.blumenstingl@googlemail.com> References: <20190112130649.23838-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-20190112_050703_476302_A165C757 X-CRM114-Status: GOOD ( 10.35 ) 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";