From patchwork Sat Nov 3 23:10:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10666797 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 93CAC3E9D for ; Sat, 3 Nov 2018 23:10:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 795A629D2C for ; Sat, 3 Nov 2018 23:10:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C72129D2E; Sat, 3 Nov 2018 23:10:35 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B25E29D2C for ; Sat, 3 Nov 2018 23:10:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728733AbeKDIXS (ORCPT ); Sun, 4 Nov 2018 03:23:18 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34016 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727238AbeKDIXR (ORCPT ); Sun, 4 Nov 2018 03:23:17 -0500 Received: by mail-wr1-f68.google.com with SMTP id j26-v6so5538220wre.1; Sat, 03 Nov 2018 16:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4zmw7WqkVRQ/0TV8taxAMCaY15v5WirqxC3Kf3Mibi4=; b=Ga2Ls98JjJLWysXZ79+oXdmZVpA3/8X9dTOmal8T6OTrh3Kn+pUOCVsJ+tb5kZ5WI+ rupTCleNX82Mwa/zdvd7qYu+7WuEpkhpuxrfGgQs7KL2cKbpt9xihmPS7TjJLH3oyhoy LTL0frSCYB+0Gpwo2g23/igvr0/zAyhFj4OZjbK7gWKKz1ETBBV2Dyn2PiepYhGQRuvE Epn7gvWFc7TXpb0oc/C1oDSKAcE4km49EDq+9+/th3P+NZwhU687cMCZRblw7NDklFM+ pO3IXOpW6qa8SYM6A2g7eDoarCQym7jg7LG4503FVoFv8A/JDWYl6Cgvf0mh63rcqERe noYQ== 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=4zmw7WqkVRQ/0TV8taxAMCaY15v5WirqxC3Kf3Mibi4=; b=AyeiGg3Yh4tVpzzz7UipJzoxCIIxKTN8wFMAXADN3Eiqvxv+sIWqa20vkv7KwzAral 73oBHSLSfZ4aYMOnOukjwp/me66py6cKvDC4W2b9qcZWnNeFBdlDsfWF+UgxxpllXNew TGFyeOFG2u9o6CoEMUuCSCTKk24iX/n5QDkNrrXyVD6JpWlB+to6AOd0o48RL8ODe0fQ n03i45KvwB6l7zAED4K54hT53O54QyFlKKfEavtq/fx5SC5TvTd4iSRQLiny6a4oqqoU PKlONA7wTaH8N+pVESnlrjjlhWcWZmic7hIxQxhzfK5RXhgGd6jdrZXNBgKg3AXtnF6e 1l2g== X-Gm-Message-State: AGRZ1gJcgRrEf9wc2+8b1oUcnMDQ4UjHtT4pSkrZLJXO2zoADolStf8o 4qioBTkb0z1wU0nXOdj+gTz2zNeD8iQ= X-Google-Smtp-Source: AJdET5fHPXqwiFVhzza0rpVKnejweS64cobAQDrtXrXxql/LqTDrYIZSydo9/hnKgNKBzdEum9Xksg== X-Received: by 2002:a5d:4450:: with SMTP id x16-v6mr14668123wrr.308.1541286632260; Sat, 03 Nov 2018 16:10:32 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD732B10011F5E51309F23E8D.dip0.t-ipconnect.de. [2003:dc:d732:b100:11f5:e513:9f2:3e8d]) by smtp.googlemail.com with ESMTPSA id 21-v6sm22673935wmv.5.2018.11.03.16.10.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Nov 2018 16:10:31 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, robh+dt@kernel.org, pmeerw@pmeerw.net, lars@metafoo.de, knaack.h@gmx.de, jic23@kernel.org Cc: Martin Blumenstingl Subject: [PATCH v2 1/2] dt-bindings: iio: adc: meson-saradc: add temperature sensor support Date: Sun, 4 Nov 2018 00:10:23 +0100 Message-Id: <20181103231024.659-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181103231024.659-1-martin.blumenstingl@googlemail.com> References: <20181103231024.659-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The 32-bit Meson8 SoC can use the SAR ADC to read the chip temperature. This requires setting the correct TSC (temperature sensor coefficient), which is programmed into the eFuse during the manufacturing process. Meson8b and Meson8m2 are not supported yet because they have a 5-bit TSC and only the first four bits are stored inside the SAR ADC registers. Signed-off-by: Martin Blumenstingl Reviewed-by: Rob Herring --- .../devicetree/bindings/iio/adc/amlogic,meson-saradc.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt index 54b823f3a453..325090e43ce6 100644 --- a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt +++ b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt @@ -22,6 +22,12 @@ Required properties: - vref-supply: the regulator supply for the ADC reference voltage - #io-channel-cells: must be 1, see ../iio-bindings.txt +Optional properties: +- nvmem-cells: phandle to the temperature_calib eFuse cells +- nvmem-cell-names: if present (to enable the temperature sensor + calibration) this must contain "temperature_calib" + + Example: saradc: adc@8680 { compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";