From patchwork Mon Jan 21 07:38:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10772709 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 835A913B4 for ; Mon, 21 Jan 2019 07:39:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7186C29C99 for ; Mon, 21 Jan 2019 07:39:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65D3129CA0; Mon, 21 Jan 2019 07:39:54 +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_SIGNED, DKIM_VALID,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 1431F29C99 for ; Mon, 21 Jan 2019 07:39:54 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=oFojoqRGaDSMn9jtdh5TakTJ92R4gnkoTdSJ56+GKKs=; b=tTP40kmHXfPKchyiji9hnqpqA4 fBsw9lgSRf+itQuNP8/R7ZTlrNUGSduGI+gZcKEAcQSeB53DIrr04LLOr/P0ws5N0Ts2BsW7zpxZJ 7KKpbAarzAWoLvin9ym+v6+GFYSEUyrC4ayRzaxom+wHm9NZpYLWQB5UWI9i7npmn+fn7Xp18RLVR a4BzfGCChtLsqgoKbuzhMOkfVEYpd7QcDVPHiFugs83SB3h4kTTn3c6L7YhHb0uZEwvH2KtCBWJ1K B1pzh87KLWSk50nhQhGXxOfsSkUEFXFMsR4YuCuDKHteWyUBvmZjl1qa5NT12+Qt6RuGZEKILoRHe Lw0cx+Lw==; 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 1glUBT-00010o-As; Mon, 21 Jan 2019 07:39:51 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1glUB7-0000eX-5k for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2019 07:39:33 +0000 Received: by mail-pl1-x641.google.com with SMTP id w4so9409583plz.1 for ; Sun, 20 Jan 2019 23:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=5wfuddSW6tp5kYw+zApWLVum/WpZ+TiS9aNH3MKdYzo=; b=TBJVsmq9SwsUa5AhC2yO9XS+8Y2Gb8Kr8LjezLadJmuXsgGfusLZJVottgxoApjWA1 NUBiI3D9z/5C9zLI24XFGOP7gg7sBHd+O6mUScFWUjqS0CaZUep5sD79sl0uH7ydjhB+ HaXic/wvGDMxjQi4MwJa6LzT29QvfIxs6yf/4= 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:in-reply-to:references; bh=5wfuddSW6tp5kYw+zApWLVum/WpZ+TiS9aNH3MKdYzo=; b=A2RTm7u0ivlU42ufVvHsSC+vmK2mVY7SjMOCKydiJ3ql1K9EzPyPf3pCT0RpzE5iA8 YDTsm9omDQPE27mTVF6lBz6Gu6Hvwdj6DZCxy9gbGJfAacQjQiRT3adLcrTDKMLjvUQv ErWCLP19k+IjzuqeW5NbvkCNoqHtjktRGoV1vl1TjvOHsWBKyLy1Gju+c6xIaYWozBXS 2MJ81RwViudTxZUKl1ezurVNiHV+7uKG4YjqOUs0ruX5e8nvc7wSwHSb34UstYvcmYmx qDgGGiYimUNYE6SiXBTtjmkZPy5DU6NUyO7w0V9OBMSv7Vx9dP+PvflOiySG4vDqC+xS EeOg== X-Gm-Message-State: AJcUukfE0D8pXItU6qE1DVcO+YodMYARRMFzk7+l1cQVLBDQaugY3oE3 F0e0RKtokULbcsK6q/Ewh++3LA== X-Google-Smtp-Source: ALg8bN4b+zcG8uMM54HVPij1o+1kGsedHZcVQYga9e1/iukaWsgMw+36iYZJ6Tg0h0ZeRIOKfy2lKQ== X-Received: by 2002:a17:902:b090:: with SMTP id p16mr29147808plr.190.1548056368629; Sun, 20 Jan 2019 23:39:28 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id h19sm15583083pfn.114.2019.01.20.23.39.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Jan 2019 23:39:27 -0800 (PST) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net, orsonzhai@gmail.com, zhang.lyra@gmail.com Subject: [PATCH 1/4] arm64: dts: sprd: Remove PMIC INTC irq trigger type Date: Mon, 21 Jan 2019 15:38:28 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190120_233929_506762_BF674931 X-CRM114-Status: UNSURE ( 9.66 ) 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: devicetree@vger.kernel.org, arm@kernel.org, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Spreadtrum PMIC INTC controller has no registers to set trigger type, since it is always high level trigger as default. So remove its child devices' irq trigger type setting and change #interrupt-cells to 1. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index 82bd642..f2f2aa5 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -13,7 +13,7 @@ spi-max-frequency = <26000000>; interrupts = ; interrupt-controller; - #interrupt-cells = <2>; + #interrupt-cells = <1>; #address-cells = <1>; #size-cells = <0>; @@ -43,14 +43,14 @@ compatible = "sprd,sc27xx-rtc", "sprd,sc2731-rtc"; reg = <0x280>; interrupt-parent = <&sc2731_pmic>; - interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <2>; }; pmic_eic: gpio@300 { compatible = "sprd,sc27xx-eic"; reg = <0x300>; interrupt-parent = <&sc2731_pmic>; - interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <5>; gpio-controller; #gpio-cells = <2>; interrupt-controller; @@ -69,7 +69,7 @@ compatible = "sprd,sc27xx-adc", "sprd,sc2731-adc"; reg = <0x480>; interrupt-parent = <&sc2731_pmic>; - interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <0>; #io-channel-cells = <1>; hwlocks = <&hwlock 4>; }; From patchwork Mon Jan 21 07:38:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10772711 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 43F826C2 for ; Mon, 21 Jan 2019 07:40:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 328B329C9A for ; Mon, 21 Jan 2019 07:40:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2638229CA1; Mon, 21 Jan 2019 07:40: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_SIGNED, DKIM_VALID,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 B86CF29C9A for ; Mon, 21 Jan 2019 07:40: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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=XykL4mtV6XiR65LsgR+Hhl2d+i3LyAXoeuHZNASYryc=; b=dVqWXO2YYqxKU2pOxqV/1G5u8V y0WqAp5JyeetI7Reid5lElH9NsEWYDQxizXIOXOUfAX3I+GJo/zc6hkWvNYcEzQH6ryhAfMRKEde8 qscVPgkBBj8eGNH07e4DhIl3yhNktEErLcB57cLrGadKXT7jSxddHyvIYpqnojMWc7x/KBPpHHux0 pebCzSSWC5EdakU6HIt61cwzuEmjNaBIZrwyE3oyCasBBypvecx9Zx1BWR5BgrjtZoF8hxQEAA/HD xEbobqWcGwLmostaoYXlNlZcb6jWIC2Vep0Ij3oeLROdFojzrfoHTvdGgoQmSzN5T8oK0krC5wq4v lYqzlZ4Q==; 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 1glUBk-0001Uk-NO; Mon, 21 Jan 2019 07:40:08 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1glUBC-0000ku-St for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2019 07:39:41 +0000 Received: by mail-pg1-x543.google.com with SMTP id g189so9080612pgc.5 for ; Sun, 20 Jan 2019 23:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=TsYSQ/G0YznTAgTKSekGveHgCX9PxIa5Y7B9m7W0j9A=; b=Lqbj5P2AYTc1vqNowMzk+9mAq0t5KGdEZRfC24xoBJvA4nPl/uMfeBrkhVSN2uHSGj d+2gB+I+nHU8IWodcM6bxv9M+VjA1cd5vRciX1aP1ZAuAgjtDzMcZwNQL6KBS7llorsb ZfC4/Q79ujUzyOUUPeHPMGd0IqhACkiFM0MHw= 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:in-reply-to:references; bh=TsYSQ/G0YznTAgTKSekGveHgCX9PxIa5Y7B9m7W0j9A=; b=B1l2gbQWNXZazr5OyGdHjjnP2DMyRalq4veFpo6g/TpDFSfIvbrDHPCDzPfBF+29l5 +IqE65YDuLc58BRkL0QqHOE3XXwgg9GeEvxCL9nFQ+3yVBlTQ+LA2R3j6QkNJ5aTy8Vc GvsjdMr0QCglTVWRkNAaOW7gHpTTEfmMNZ4ok9LelR5v2dFLdbMEmVqFhy1a+9GBUBu3 U9t2+KQW0kOQLXcxW1x/GHAw8EPcL0X/n27u8SgxjgxwILPeWDEZzY7zhPmCejXXM3Ma kaBbHulwX/K+ABufDuj63yApMS0b4fn80q+Fduf6cXfs9xUfIL0NgGqviOG5aqhzBQg9 KjDg== X-Gm-Message-State: AJcUukdvhuoiqA4KL2hyqjNDwlXjEUPph6GPng+brSblnIMIJ7gz8uIv 1wGDjGOvEBGoHvW9HW8XoKL7Mg== X-Google-Smtp-Source: ALg8bN70IdbzIK8C757BC1LH/HJ/zz4z4OB64aQ9xlZS8m6j9OciJvs5CGfpUuQSBWuU++MKfEmIhA== X-Received: by 2002:a63:61c8:: with SMTP id v191mr27385499pgb.242.1548056374353; Sun, 20 Jan 2019 23:39:34 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id h19sm15583083pfn.114.2019.01.20.23.39.29 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Jan 2019 23:39:33 -0800 (PST) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net, orsonzhai@gmail.com, zhang.lyra@gmail.com Subject: [PATCH 2/4] arm64: dts: sprd: Add ADC calibration support Date: Mon, 21 Jan 2019 15:38:29 +0800 Message-Id: <0213394a8e432e0ee0809f9032427d971ea9cde2.1548052878.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190120_233935_374910_EFF9B7BA X-CRM114-Status: GOOD ( 10.55 ) 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: devicetree@vger.kernel.org, arm@kernel.org, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 This patch adds phandles to the calibration cells provided by the Efuse device, which is used to calibrate the ADC channel scales. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index f2f2aa5..a2edc25 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -63,6 +63,14 @@ #address-cells = <1>; #size-cells = <1>; hwlocks = <&hwlock 12>; + + adc_big_scale: calib@24 { + reg = <0x24 0x2>; + }; + + adc_small_scale: calib@26 { + reg = <0x26 0x2>; + }; }; pmic_adc: adc@480 { @@ -72,6 +80,8 @@ interrupts = <0>; #io-channel-cells = <1>; hwlocks = <&hwlock 4>; + nvmem-cell-names = "big_scale_calib", "small_scale_calib"; + nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; }; vibrator@ec8 { From patchwork Mon Jan 21 07:38:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10772713 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 9FEDC6C2 for ; Mon, 21 Jan 2019 07:40:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D60829CE4 for ; Mon, 21 Jan 2019 07:40:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8077A29CEB; Mon, 21 Jan 2019 07:40: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_SIGNED, DKIM_VALID,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 2E6E029CE4 for ; Mon, 21 Jan 2019 07:40:28 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=6rOIqtoxIaZOihdnCiI6pdkfGqn4rnU8EHHfEbRfXtg=; b=b/kLPZmQVhXrHoPhYoFYfBCJTn IUMF/tqUEkvIFtcmhEiI11hGhgBIregThWvtUdB9eS+ep8/wWO5EYf8Wx68EVkVjA4sQUiVhR1B3y pY+TlJFefoz59u5ckoVuek1kE3kMpia+DZZkuGBU4ZI15zVEvnGLrr60GlbVbvsKFTsATGIc+8w3j 4LAweFHBFAGGoxW6fNr0W6+vuM9EB5H3f/Vzg1HsU7fgexZg9aE4NpEh6mLHJyN8eIX8xeSzfZWHe nec2b66nPHOdD0TenWP+uCpeWHWH0NCDPGKatCsHisf6BolzVQc/ix8FnEUaJY/n7+Y3Lv3KyOoE/ lNnd4Hmg==; 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 1glUC1-0002XW-LB; Mon, 21 Jan 2019 07:40:25 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1glUBG-0000q7-Tu for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2019 07:39:45 +0000 Received: by mail-pl1-x641.google.com with SMTP id gn14so9390950plb.10 for ; Sun, 20 Jan 2019 23:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=WoGfmBXbkp22eB752R6+rnQEzLObCNo8qMMo8guRvqY=; b=DsjVkACWlqglSNGhM3nJdcZLu4R32jh+mLpC+C0R8ZR2N8fnNBvR0EfJ1B5kSLvCEc 9GJ6T6u0AmmNjTpYIo1ypZtvKSnigJjdVVwpSLIjNnGqHFUjL/PyHAWW7NcqDIFaH5XH SoioOQbIvDHzqYpVTvIJACl9xl/c6lIO4SJLc= 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:in-reply-to:references; bh=WoGfmBXbkp22eB752R6+rnQEzLObCNo8qMMo8guRvqY=; b=pr9/bbC9Ve3NTupMmwzP1WA1KqI3S8VTOFSdxPmQN0g3Za3c8/Zl7W9F94RwVjI5st pf6e1ogAd1Suw03IxOtiaCr5RsU3oHAVF41E8K0p625UY5/zkS+DLHigxeAGBmtSCyz9 rnh1Qk4AUEjiMbzc5lf1AjKmpIZNssiOFai2rxAKlIXMIhKcUoX+f9EfRUzSCpZOnz4G tNjsCWp9+oj6ldfCWA4eRq+d1XcrFTzbOdy63GL+eUrF1zK2KUPZ2Maki8O2LZoN9MRq egU3exhBXVtYeZC7cWnb8UGgxlBDBeA+YkXjvDUI1IPlnHRPOyMRxquCy4ONtTlRXVaP TraA== X-Gm-Message-State: AJcUuke6qVPsZXjqOH8tFWCcisNrXwpZfKcBquonpNF0848y/SuT204V oeuGZHrKBXpIo1XXXxr8DXjCIg== X-Google-Smtp-Source: ALg8bN5phe2gfmZHmrs7HD1M36IyUe38XNvyBx/Zbaen/C/WOb2DfwXvV2jTQT8QrlNCFvhT0I2S1Q== X-Received: by 2002:a17:902:2ec1:: with SMTP id r59mr29453151plb.254.1548056378468; Sun, 20 Jan 2019 23:39:38 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id h19sm15583083pfn.114.2019.01.20.23.39.34 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Jan 2019 23:39:37 -0800 (PST) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net, orsonzhai@gmail.com, zhang.lyra@gmail.com Subject: [PATCH 3/4] arm64: dts: sprd: Add SC2731 charger device Date: Mon, 21 Jan 2019 15:38:30 +0800 Message-Id: <1f57f120e915ea9af75a45f48c8ef2f446d10486.1548052878.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190120_233939_700882_951C171E X-CRM114-Status: UNSURE ( 8.61 ) 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: devicetree@vger.kernel.org, arm@kernel.org, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Add charger device node and related battery node for SC2731 PMIC. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 6 ++++++ arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index a2edc25..b52eaf0 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -17,6 +17,12 @@ #address-cells = <1>; #size-cells = <0>; + charger@0 { + compatible = "sprd,sc27xx-charger", "sprd,sc2731-charger"; + reg = <0x0>; + monitored-battery = <&bat>; + }; + led-controller@200 { compatible = "sprd,sc27xx-bltc", "sprd,sc2731-bltc"; reg = <0x200>; diff --git a/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts b/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts index 3bd18e3..2a963bd 100644 --- a/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts +++ b/arch/arm64/boot/dts/sprd/sp9860g-1h10.dts @@ -41,6 +41,22 @@ #size-cells = <2>; ranges; }; + + bat: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <1900000>; + charge-term-current-microamp = <120000>; + constant_charge_voltage_max_microvolt = <4350000>; + internal-resistance-micro-ohms = <250000>; + ocv-capacity-celsius = <20>; + ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, + <4022000 85>, <3983000 80>, <3949000 75>, + <3917000 70>, <3889000 65>, <3864000 60>, + <3835000 55>, <3805000 50>, <3787000 45>, + <3777000 40>, <3773000 35>, <3770000 30>, + <3765000 25>, <3752000 20>, <3724000 15>, + <3680000 10>, <3605000 5>, <3400000 0>; + }; }; &uart0 { From patchwork Mon Jan 21 07:38:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10772715 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 6065A13B4 for ; Mon, 21 Jan 2019 07:40:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FD5229CE4 for ; Mon, 21 Jan 2019 07:40:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4385729CEB; Mon, 21 Jan 2019 07:40: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_SIGNED, DKIM_VALID,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 D96D029CE4 for ; Mon, 21 Jan 2019 07:40: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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=tjIwAbOyjbYNJodG4u9bhW7DiK/+VEIzZTi5CC+OxWc=; b=ptV/QLsP2n3ch7HFueuTKwC4k+ 8N5U37NJupo9Jh8mNNOTHpoXk4VojUpP61byxOYyA06qNNpZCEX2v2A5NiR/ouupgqDjG/jutKYg5 Q78DJSLt9n844g3lnJEq/P7Ip5L3sKmPBROkb1sHvlA4nlpneycnwAv0Ck5N8B/90n8zqm0lKq1V5 5oH+FV3uBUy5TFnU+bUAdQysUwwOQFk3B5B+Nd9oc/eyr4aL1YIzGDF7OPBo9zqwpkbFAaK4hOw2Q 293H5QpuEfR61lToCq/AThe+T2+Ez1dQkqbCEIS6tcAR9dQAjkqXZEqbgK2EWJJBrrXoi91sSJodM 3N15t3oA==; 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 1glUCH-0002xP-C9; Mon, 21 Jan 2019 07:40:41 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1glUBL-0000vd-GH for linux-arm-kernel@lists.infradead.org; Mon, 21 Jan 2019 07:39:47 +0000 Received: by mail-pl1-x643.google.com with SMTP id e11so9384875plt.11 for ; Sun, 20 Jan 2019 23:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=WBoPfqiD62qTyJHnIBLq11r66Gu0wg7pVtNBOKSgwDA=; b=Gq03+voeUhoaNn1/WdFxKHlzxB7lgh+usqPpa0k3YSSAvc268qEWfw3w701UgteYEX hw0FGqP7PBlt/PdldjvEV+eeasLrF5OnvbajQ1IKtIL6XUfQq6EVX2/WOIApBsQO723B VeDTEqdS9cPQWabO+jhVVaFliQuxwZWcCKeKY= 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:in-reply-to:references; bh=WBoPfqiD62qTyJHnIBLq11r66Gu0wg7pVtNBOKSgwDA=; b=dEDnmPkbe2afewYzCFTApgJt6nekZVpBFcGcJcBqUgVAd1QXVGaz1eGSxP1fJ+pfCD q5vs0clqoZlB+3HJFZXXTbYi7WlE4SJ20W2yzrnWZesvfuMAYBCIAcdFz23Wz5doTo8q 2SqY8xoYlFi/6ZJywa/RzBqKbGaIp1Vi1xwA6guyTjM1IK/zeLii/j/0hMknaf+f75X6 Hbo6LN5AdSA/GeO+ogPatzPRwsfvul+79TmwoIXFoFmHn0kZxhFan15Iu1pnEts+G7JH vuxSWbs29l2wkSWIzOjMtKw0Ue1mmusaTP1gzfWmBUvy9QIlvbfTpFnzRcgMvFf4zgxv hQhQ== X-Gm-Message-State: AJcUukcL8/op9Gd7gJ02mTyk1CP/uZL1U2dPIe8lTrnv/oaOQ4r/+Fiw HuS56J6ibUWC96yh80klmWL3OX/L5l0YKA== X-Google-Smtp-Source: ALg8bN6Nfvze4fYHv/A8yGMcDY1+zsxKPpIb1rosgM7lsw5yc9e8aGDCxHXbpFgdNRnAmdU33X95yQ== X-Received: by 2002:a17:902:7b91:: with SMTP id w17mr29154224pll.111.1548056382729; Sun, 20 Jan 2019 23:39:42 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id h19sm15583083pfn.114.2019.01.20.23.39.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Jan 2019 23:39:42 -0800 (PST) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net, orsonzhai@gmail.com, zhang.lyra@gmail.com Subject: [PATCH 4/4] arm64: dts: sprd: Add SC27XX fuel gauge device Date: Mon, 21 Jan 2019 15:38:31 +0800 Message-Id: <4f66af3b47ba241380f8092e08879aca6d7c35b3.1548052878.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190120_233943_996724_45E4F41E X-CRM114-Status: UNSURE ( 8.61 ) 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: devicetree@vger.kernel.org, arm@kernel.org, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 Add Spreadtrum SC27XX fuel gauge device node to calculate the battery capacity. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index b52eaf0..1110d13 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -70,6 +70,11 @@ #size-cells = <1>; hwlocks = <&hwlock 12>; + fgu_calib: calib@6 { + reg = <0x6 0x2>; + bits = <0 9>; + }; + adc_big_scale: calib@24 { reg = <0x24 0x2>; }; @@ -90,6 +95,19 @@ nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; }; + fgu@a00 { + compatible = "sprd,sc27xx-fgu", "sprd,sc2731-fgu"; + reg = <0xa00>; + bat-detect-gpio = <&pmic_eic 9 GPIO_ACTIVE_HIGH>; + io-channels = <&pmic_adc 3>, <&pmic_adc 6>; + io-channel-names = "bat-temp", "charge-vol"; + monitored-battery = <&bat>; + nvmem-cell-names = "fgu_calib"; + nvmem-cells = <&fgu_calib>; + interrupt-parent = <&sc2731_pmic>; + interrupts = <4>; + }; + vibrator@ec8 { compatible = "sprd,sc27xx-vibrator", "sprd,sc2731-vibrator"; reg = <0xec8>;