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: 156162 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6079396jaa; Sun, 20 Jan 2019 23:39:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN7i9iPyZAfn8Kdrxft8tPNLTMYK0eeCH05sNGIwIr2hIyA0PndsR1NVzz0cI50IHTG427uz X-Received: by 2002:a62:c505:: with SMTP id j5mr28729574pfg.149.1548056395102; Sun, 20 Jan 2019 23:39:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548056395; cv=none; d=google.com; s=arc-20160816; b=o+JUikEAdN0sSB1FhhZ26uujgp/chg4eMNEkPpaFZKoDkyXapX3HKetYA50IWhaKv3 +IUiJRFQsNn4boOMkCKhUVf6Pcto+veaZubNEElVkmZL2T7YGV1w+QQOioyB5TIfJk0+ DC3ZfFVyWu1YQft7p0Dw+bG9A1KJQsvAzs2BPWOZ2rkV+NsqDws6s8krIiqlpD8Trftr 7j+3t8UZgQyXriyh/HFvNVv0Jx41jzk/7aNRJpKGYaeWCLUQz73tM7BXhQfjiLrWL/Tf +dzeaSrBihoSLTFXQ/mDhnPNzS75o1jWoh1k2+8Nafp3/2dI7SZ5J1pDbvR/GJfTsVfK Q2rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=5wfuddSW6tp5kYw+zApWLVum/WpZ+TiS9aNH3MKdYzo=; b=HsBqEtxBfa2kkuAx3kzFVnWBLbYK3esJnGQxi6LGE3fzw3W+c0E5xfY15rA8Z0NCUW 8Isvs6uYnZ850DNtY19fy4jzcJp5AYZfshvdgPqoerhyVWbYycWWLF4ayDJAVUnan7xB dTziq2chq+8/KuIo+jmjuBDMMrnibxEoZh+KZhx0V+gafzIzwcyVO5zRUDelw7fVGS1V I6cLe0qfVOeYtNbEJdcGkf//V5p0Aj9KmgR+Oj4l66HbQuCLsVC33F5JzvxZzuGV5Nqj 9/ara8fPe5Ayw63Q1y8EvPoI6D8VPlT2j7d2YEfTLxytWkqIxi33wWQaExSaURGQyCyA FoQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TBJVsmq9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si10906931plb.209.2019.01.20.23.39.54; Sun, 20 Jan 2019 23:39:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TBJVsmq9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728891AbfAUHjb (ORCPT + 24 others); Mon, 21 Jan 2019 02:39:31 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33459 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728778AbfAUHj3 (ORCPT ); Mon, 21 Jan 2019 02:39:29 -0500 Received: by mail-pl1-f194.google.com with SMTP id z23so9416878plo.0 for ; Sun, 20 Jan 2019 23:39:28 -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=EcM7DvkmW6t8c0U1VecIB4l9idLOqOesw4orSlx2ErP966s7ghAz5tqGvWGMYFOZ4J VrJ3d/Tefjl+08lajSIW+KkDUaNBHpRwU45+Z5ptuPotfOtgwQ+axwnd0GCOnon1QmK4 Hw5vJLXHOVVxEXG+euK3uFcCGAJ1eOpjzEZ/JdReH6+QDJpfnXsyBg01qPmCD5pYQSZM dyXpuE7fcJYESF6kIKiU1U2r8mtGK9s1kzWcwYXrmoDzL8PoC4yMFF+H5o+Djt1Q8KqW xJ04uidad0aeFJHnWYyIE93jTTwhZEIvO7rSaXQN1a14Q0tRfZKZGPWKy6dNM4BZqoK0 40FA== X-Gm-Message-State: AJcUukdG222jcZYvx7W+D+sW7fnISE+MRL86pcRvPvXTCFkJw+Ur3WQg 4KVzOW4Yx3d4PzlZcmDhebwg7w== 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 Cc: devicetree@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 1.7.9.5 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: 156159 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6079233jaa; Sun, 20 Jan 2019 23:39:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN5J2CC6XBhJ/pHl2y06dtHizOFQAspmy3RAB4e2+Ck3bA6I6daxUXx45tzVfgvhETdjO3Cc X-Received: by 2002:a17:902:32c3:: with SMTP id z61mr29066147plb.114.1548056378490; Sun, 20 Jan 2019 23:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548056378; cv=none; d=google.com; s=arc-20160816; b=i38d6SF4GoCF5Pta0qLW+JTLza8SUIHH/BuirO+2htCcZe7Lt5mxbxObEbvUklBP26 TSkMr0J8vTkbMMHukmgYCJmqVlRDI+ocor3U/XLkhjsmDC24m6l7qg/SlZR7ppIsj/pt 7LcMqEgrpTK9qKa3/4vE5ewO9eZSaIqlG8vDYKHtOHeULoCUEQ7hSbcIMjZY4R7iNupS df8kNxhhCDvlkg672cZIlgn7lvyBuUu8w6qi8AFHER1g2N9icg3d/8VQ/2DF/vfP+2XO B5+zfFo8+26fhxyB0A/P32mWwDzmibBVQokSi0FIudp0YsW6pQ/drT4OaMvvufJ76fyi sZ0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=TsYSQ/G0YznTAgTKSekGveHgCX9PxIa5Y7B9m7W0j9A=; b=DGenWVGeXKK52xtU4BUtujgeo+ms9WpVS4geeZGhrim2Qq7QumDtuq5KI0HNKSkgbT EE3mB9zjh6TxHXx88K9AO1wjBUZ61kPVJd21VhnzsrU+T5vaAQzGQDQz1A6uyJ4w4heh v+JRg4wkzfaSq3EeATLUPPLpvdzUl1pePe0OHrycZKZCFcIU3nDQa/fLrpDfcgCxHAl7 mH8vlOBD/UlgqPl5LPAAggqGSrv2364X9FajrIDo8LdSOKoaWW1XSKZ7Wh6MkabzMUWg QsUark9+o/QDhLakBbHb6Wb0UpHVtpCLtVl06c9ZNiY0EDeWAV/vKHDZUy4XyMNR4FUF FEMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lqbj5P2A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g59si12168597plb.302.2019.01.20.23.39.38; Sun, 20 Jan 2019 23:39:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lqbj5P2A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728928AbfAUHjh (ORCPT + 24 others); Mon, 21 Jan 2019 02:39:37 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36297 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbfAUHjf (ORCPT ); Mon, 21 Jan 2019 02:39:35 -0500 Received: by mail-pf1-f196.google.com with SMTP id b85so9731247pfc.3 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=KSeTovPAzvzDnTucdMyqL2nD7gdEKFM+JmeWyrwE7rBgFdMRDk565NndnN6IUFGjTD qpR8pNNfdxg2vfX5Xl503vBLKN0rprTgUxeqsF1X+ckBBxdXacIHQOGRZcNLEIx0wzme N+xDl8KDsMRE63BEWSEmL6ojKf8rJZAB4+pIR//1aI2Ii+l8UZyxIgfqu4Tp6bkj0bun jCVwW3pbnxpedDU1Kl30axjDgXM92Pgn/sYmji7zgXSjkVq4XKo3oMF8r50vfisNHPXz pHf7xPhx3Lx7+j5MNYpf9N33oC2vI+TN2SaOHr7CL4sgdlx6nTpVFp/WtPM6X02d1SuW ZBJg== X-Gm-Message-State: AJcUukcMAcl/y7ut+8EKbNithd7Nw/gOeRlvkQE8efOD0McuRQYhYng9 Z2p57/4hs1nkv41bSGAGA8ijGQ== 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 Cc: devicetree@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 1.7.9.5 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: 156160 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6079278jaa; Sun, 20 Jan 2019 23:39:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN5UEKZnO+jEoae8fCMwtKkWZdVXUihnaUiKOlLRg0TmhmuVCCt1HKqPuYKfzCPgNkkCkyc0 X-Received: by 2002:a17:902:298a:: with SMTP id h10mr29337755plb.312.1548056383281; Sun, 20 Jan 2019 23:39:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548056383; cv=none; d=google.com; s=arc-20160816; b=w8X7scG4nXA8Mk21m/h2Awj/1UQOfRsF7gf/oOtkl9DX/P9PR54rl96DgYiqYFwP0P YfJT53b7ID0HOiSQ9ZOdbUiv/yA2OUrYAGV68Y2iw9FeQA75al6Ef4RirWfqaSeS8mZl GdLaaEyNvvoo0RFG9marwDgBxzHhvpSLYpPAFY8QFJ4ktvAaQCReuLS8WCBx3yW7Efhv BrhqHgLTNpnYPVDDIRREY9ulj3yqRoE6UX5m7SsLmweO8CXfqNlT9mGjslgchl0KEiZT SPrVeUbWUF1PxSZpLyvKsoqG4tSGsefn+dxYZRAU8J/ZPgNfVLieMIeEx149jd8k7LsT oopg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=WoGfmBXbkp22eB752R6+rnQEzLObCNo8qMMo8guRvqY=; b=yHEwwcsLpkykthR//wZy8yFFywikIapr7g+2ssZkKh1FM8ul7QqlDGUh3SVlCb2Zkt CcYV7AIjYYYMohI0RdAkNErnVoP+yAksjmy8gBhkMIj2rhAV4JTAQzZzHlq+B46d6i9t fCSbFwqoa55hreg4Szv3mChfSYzIQ9GuPiCzXaNoW8BAMVxN95ce6U32XqbT4XXjrODq 1DN9NAyWF5WBp6gWBUQ1lXPDV+iaT4IBLcHgkAKGVWnkg5cf1qcZCZ10IB8N21xC9bBy p7MVZPx043dLXfGk1BJeUsOgnspRMZnpmNnyu6xrt6Fzkm3+xgMgjXE68w/JIMOkogjS FqhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DsjVkACW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t186si11838643pfd.68.2019.01.20.23.39.43; Sun, 20 Jan 2019 23:39:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DsjVkACW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728945AbfAUHjl (ORCPT + 24 others); Mon, 21 Jan 2019 02:39:41 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44305 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbfAUHjj (ORCPT ); Mon, 21 Jan 2019 02:39:39 -0500 Received: by mail-pl1-f194.google.com with SMTP id e11so9384786plt.11 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=XIwU5btIwuJ0IhjK5Tf97ujRCVfKmLFpfrDChsKOpP7PbUw2xOKJazhCaJ84YBmqRz cB2mFw9HDGDgV9Gctsm2t33E6BgPE5L1QyRd5wvTweJlfirMUXSjh+1OQrnp5CGgcpBE K9PHmzdZjN9meTd3mJOzQ9UIHkQ5B78DyXCgk84PO8DrOCDufpKLVO5AoVDAh5wEMmRQ V0ifSrOWLPFUBiSfH30XB8ir92NeTPAiqe8FH+XqkM2OY/PjopmtgfWhiVojgcPVsoKG mPUKJbxpyRtmkzwb30opR9lTXeNHeyeN0ZVCk6H3gNE/LDqIxAxJdIdcNLCyRGcMLg35 34Pg== X-Gm-Message-State: AJcUukeq9pgq2sHBHHCED1mJ2nUN90VS7d5EYSH89rAA2Wzqz62/Yzqg LfVexoN6Cba7TtqW4aIrRe+1ZJVABJZjNw== 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 Cc: devicetree@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 1.7.9.5 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: 156161 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6079320jaa; Sun, 20 Jan 2019 23:39:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Wh8nRTTEflx0LQENasCMpCmWFNp9/EWepWGAz06qnYwi5kPHY/itGUeSgAN3YI1w2BkiR X-Received: by 2002:a17:902:142:: with SMTP id 60mr29932270plb.330.1548056387475; Sun, 20 Jan 2019 23:39:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548056387; cv=none; d=google.com; s=arc-20160816; b=IEEZ6/pz6qr/YwPcVwn9gIyQS2pX7ZThC33XlYD+YPyZnzm+ShRrO4lw+rFGz9alzS gJ6ANyb2pMRp90alUglG1rmirKD7XvDMhVcjTQDlQAkrmwXpUmvHhQNIfNMvjd1yaJea C34TOBtON+3icTnIrrN7hdBHJRc4A+Jf3GlWLQOXk4NmhyL2IB2DTT3OpzdEINvwww/D QTas8SDkgrsqf6Izt3DYsEWFmADjt7J73A/nQc4kgvY3zONcpstac3MOr9hlIATUEj+9 bnGea+/LF2rvM0MLN0PSufNEzJUn9dVF9oZRLMGXY1TNE+GUG8qWpd72BvEBDwp01i6D gIDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=WBoPfqiD62qTyJHnIBLq11r66Gu0wg7pVtNBOKSgwDA=; b=kIrnaR7lQhsecNXf7hJOBl6BlL1akFLboMqO/n9pWmMQjADUGEFF6oYKCdu4+ftdsk ylhVrMt9146lCXdtG5XLOg9YBe+IG1PX8XUzVgqlfqsTZvULfmWNNDxIWARLE9MD8WKR zxtYzHnEM1MKhq32ZqK6lqkY6LPw5CbJJkgdRry5SRprlbtc3ZIW0B6xnlG/FDv5Q77z Qy8hEQL4aH8H3hCkITHsbvHFmEuQXgHvqkr9N/HGvpU1jXXdmMKCAQFA9wFR0R7nwnM4 Si4VSPMS6/5XhbJJuVOWz/BYPlUezFNZ+F+giHj9gVaAgmcV66Vjlv5pDod8CczBQhh8 2GAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gq03+voe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t186si11838643pfd.68.2019.01.20.23.39.47; Sun, 20 Jan 2019 23:39:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gq03+voe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728956AbfAUHjq (ORCPT + 24 others); Mon, 21 Jan 2019 02:39:46 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34338 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728573AbfAUHjn (ORCPT ); Mon, 21 Jan 2019 02:39:43 -0500 Received: by mail-pl1-f196.google.com with SMTP id w4so9409889plz.1 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=EwMD5PMp8mMJennOZ0n+kVO386pQTCSZ5YuqgodqpuPElMbTCRY2R5q5Ib04iZ8gfn qYb24eEKYPhv8eYA6KQxAYgyin02MiZcW2b6RbKl1dOY81zW0Egxpfx5GGlouuCqg+/y s1KGXDtiI5vfYKxfpoeZcLsJNDeemFSuaaIgDgRfi6or+7r8t6Quzlg073H49NvI3Ce0 DPqRO0sFU7Wio8zPrU8G8YN7TiISDyBCOpSLqyNGVVlabWnx8g0feIsWNvLJZCuQvJeO ODCNheKkV3fmayxT42WPbBa4R3q8VMjqKtVC/o8vUKqURbwc+Io/PNospurB7oa4IsfY nCmQ== X-Gm-Message-State: AJcUukeiZ5KOpIymAa8FJw2/tQDpCYUiS34g9aYORXf21zMTjDHYpZ/k h2CmluBnxtvT6ZRxqsHIu1PR/A== 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 Cc: devicetree@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 1.7.9.5 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>;