From patchwork Tue Nov 20 17:52:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10690999 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 4C3B515A7 for ; Tue, 20 Nov 2018 17:55:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39EDC2983D for ; Tue, 20 Nov 2018 17:55:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D6FB298A8; Tue, 20 Nov 2018 17:55:47 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 BD6C92983D for ; Tue, 20 Nov 2018 17:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type: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=T6aNQ4pVqHjqNysvff3LqlqFCoFiJXAxq5lID+1AHu8=; b=CSSljwh/Jc/KR1fn5A4l8P8fRT 8kvooytceB47hjDngFTxG5M9ElbTh7ANcBzcziyFA9dju01JXvJ4g+DlI13xEOwzgR3vr5PqeqdIV GjN90ZpimhqOAuar4RocxVJ88Hk7GsJ3eFPA/UmNwhDsFghN8Hh2mo5kQhbJxXkqEoEiqRR1DZa3M uSHBi6ROD4bPWxxTn1qRnGpIYSgkI4Qmgupg1EQv4h44cEQnzxTh6iosY+GhcfEitWGxptY1iKP9x wWRuMeEXLlYNlPHUnPJZRGExYyCpufSotiUPVWLJ6Q4u5ffF9m/0l6K0W+KmFXgwRntHldAwNmxbH TCLeGPJw==; 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 1gPAFP-0000HE-FR; Tue, 20 Nov 2018 17:55:39 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAEv-0006CV-Qw for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:55:11 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id 6B37B20790; Tue, 20 Nov 2018 18:52:27 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736346; x= 1545328347; bh=j3Vl2TNmgvtTSUry15fj4Q/WOZ4rGD+1mEVBj65G2EA=; b=j QUshi1dTw7vd1JvLh7mvyKcPN4wCyG4Kkm0Ctl1vnb6G5OWIgaugN4GpS2oveJQZ VcB+KEsE5q6lrmfzTZ5XMVUFJHFy9evVG/hXsrJtLLXtYxZ0OYAJ0qn8A47OtJwT ghdgxpmJXdFzqOQnoKnxyK6tFwhkrKIx0jKfslhcB9CaqAUi2WwASbNTTrj0b0XO F5ay/m1aU/v/3/c0VxnMlrkOABZPYVmkzhZtMEzoiGTywUhk/dZcyembR0wEN7MZ m55IukQ+Ban8rQE6PXoerC1cIEcLpA32fElSSue7K9NDReo2vOdoJ/kF5lsVc7W7 in7tF3JzJawW3ZkQLzTwDJ6BLtppIJmysf10Te32VXfR3fUpMp6si+eOg8YEdKYs /PtRj9t90/iz8sc1pE3M2xigJ9srzQD7+N2G1duagyhxWCIhQ+k/c1R+5JTzKXIv nJUIojCP2GeAI/wk7tYvJ+2zdruydAIXg0WIRFeiqKC9UkLHmSka1qpni6nPsJpC o3+KTyqdSPfmpFGOgOVn1cZPF6TlQObfScwyR0kt9bSXarS1c4liZGenkiC5VW5d GrswLZc8V62iy3TCLTPq4eZilEEpjJja+qMQmZadG++dKcBPf+kW2OGAxPaINgEZ YK10AAhoVW5baIctYFGKwxYEJfIYMGfhET2iBoVAtI= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4uSEDpi4Hvr3; Tue, 20 Nov 2018 18:52:26 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id DEECE1FBED; Tue, 20 Nov 2018 18:52:25 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 1/8] dt-bindings: power: supply: axp20x: add AXP813 AC power DT binding Date: Tue, 20 Nov 2018 19:52:04 +0200 Message-Id: <20181120175211.3913-2-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095510_086944_5AA5E4DC X-CRM114-Status: UNSURE ( 9.56 ) 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 AXP803/AXP813 AC power supply can limit input current and voltage. Signed-off-by: Oskari Lemmela Reviewed-by: Rob Herring Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Reviewed-by: Sebastian Reichel Tested-by: Vasily Khoruzhick --- .../devicetree/bindings/power/supply/axp20x_ac_power.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/power/supply/axp20x_ac_power.txt b/Documentation/devicetree/bindings/power/supply/axp20x_ac_power.txt index 826e8a879121..7a1fb532abe5 100644 --- a/Documentation/devicetree/bindings/power/supply/axp20x_ac_power.txt +++ b/Documentation/devicetree/bindings/power/supply/axp20x_ac_power.txt @@ -4,6 +4,7 @@ Required Properties: - compatible: One of: "x-powers,axp202-ac-power-supply" "x-powers,axp221-ac-power-supply" + "x-powers,axp813-ac-power-supply" This node is a subnode of the axp20x PMIC. @@ -13,6 +14,8 @@ reading ADC channels from the AXP20X ADC. The AXP22X is only able to tell if an AC power supply is present and usable. +AXP813/AXP803 are able to limit current and supply voltage + Example: &axp209 { From patchwork Tue Nov 20 17:52:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10690991 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 9FCA915A7 for ; Tue, 20 Nov 2018 17:54:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D668296D7 for ; Tue, 20 Nov 2018 17:54:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80EC429865; Tue, 20 Nov 2018 17:54:53 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 D8188296D7 for ; Tue, 20 Nov 2018 17:54:52 +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=tpiFJTtFJ5MVfybcB3+Ykna4sQJyb51wooBq78r2qdE=; b=Odd9/c654ZwLE+aLsPDG6Su2Ub dmMyzbD3x3MYKOTqBpYfqoRJJBvmHzMajiSzGh3fXvgdP9UzheDl1GhAPRQvgT9Zo376OEM98Fd8x 1NvXdaZEkLRkbQvFXBPI4sMZIdzcW6kax6o3E7i8eMmtUAYY3bMGfvVxH92qDaMvpWZtdOukL5E7u klhVx+qFDC1um377Lawm6ID+sYYk9To/JKkMELEVI4v4ZnStD7fw8K1KTsEer6EePquLDfNfBkDSp mBN+v/J3gtbemzWez+zu+DsvIQIAYg15cnDstH/gIm1+NYUeYmC74sjUeoh2YHXVdKkW6poKNu8Cj 5G0+6CnQ==; 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 1gPAEe-0006Xj-5M; Tue, 20 Nov 2018 17:54:52 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAEU-000695-Uh for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:54:45 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id D368E202F8; Tue, 20 Nov 2018 18:52:27 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736347; x= 1545328348; bh=jXIX8izX1CAuHrKZL/jrJD5rwgJGf7wij/BFmTD06Lw=; b=V 3BoHLrhaO+Px60Sli9GHuJAHr8FwKiaxe776bYN5iyqCvnjqtUaDQmPZwmia0LM+ le5HupPmqJb9j5rPL0++8wYB6A7CtaUnys2CJBObntGLNqme4nZAm80rFYKmFJXt YikTAVdjmFJNMJt7espFodEM1v4NtRwJ9qfc+4fkLlKbwMqJYg9H/Wszww4RRPW9 Vj22qpmzXkuzmYWBk3lamVsEu0bp63V0EjydRFNpV/ckMOEJ9PaimPb/X9pVBYDq gGhbcILcbMxkPU74zgqnkreCBuXLt0FrXCUbiz8NGtq6svvJM5HDGJfQXR9UIqZa RfQNfnjyc7ffiSOeWfBnfP0XBytIdZ29t8/fm9+zQRVnOMG8EDDoM9xrpQuxMAvl ee/6hc57pU9jLdX4Du/xAOeXRHD+p5oyYbfDM/XPhZGXQ6jAobgz7FsG1bxwQCUu ZcUJWHUE4mhPt4gsKZf6UVDthUgOzj8TxydF9fh56qB27LkrfOTtN++PSnzYaeAe wwWj3CXS05AF9UDc2me6yP1tZovs8nuXe1ztBE3S/vRjoRfMOGSzUagXAlAgadj7 803E4fwKOCuU9dfbUqpro2f2Jy5/BhxkHkZzP4aeEI2awo3SS/FpHeRicXTfWOhz I6CpoZZS4wshA9k3sXjOFgswzKIfDObmiLlNR3tWDU= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zE5kbDa9qa9w; Tue, 20 Nov 2018 18:52:27 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id 90CB81F943; Tue, 20 Nov 2018 18:52:26 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 2/8] ARM: dts: axp81x: add AC power supply subnode Date: Tue, 20 Nov 2018 19:52:05 +0200 Message-Id: <20181120175211.3913-3-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095443_133692_4F9A0D42 X-CRM114-Status: UNSURE ( 9.74 ) 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 AC power supply subnode for AXP81X PMIC. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick --- arch/arm/boot/dts/axp81x.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index 043c717dcef1..bd83962d3627 100644 --- a/arch/arm/boot/dts/axp81x.dtsi +++ b/arch/arm/boot/dts/axp81x.dtsi @@ -48,6 +48,11 @@ interrupt-controller; #interrupt-cells = <1>; + ac_power_supply: ac-power-supply { + compatible = "x-powers,axp813-ac-power-supply"; + status = "disabled"; + }; + axp_adc: adc { compatible = "x-powers,axp813-adc"; #io-channel-cells = <1>; From patchwork Tue Nov 20 17:52:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10691015 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 3297E15A7 for ; Tue, 20 Nov 2018 17:59:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F4AC2AA10 for ; Tue, 20 Nov 2018 17:59:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12E6A2AA1A; Tue, 20 Nov 2018 17:59: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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 B04942AA10 for ; Tue, 20 Nov 2018 17:59:53 +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=75sQVyWNcnRxm8G2SP1ZpDgArtCiciac57w913ssXpQ=; b=XPCAtPU6uobHCzUVvQ3Par2ki1 +mf40RIF0vGME65uLzoms0fLXS6p8JMNduDZjSKchJAnyHxRxoPaTPmCO21trUV2/vJyQUaLA+zyu ZXxdFQJaXYffhQzBm5UKfkI9L0iS3xIsBNlJNWMRFL2/kNjzr9u7aDFRDKy3JCX3o9Sf6WXLRa+fi uKV8BrgcoeTTgKiL0WAb3qmyF9zyu6c6Hnf9JbQRgklqkXJZ07qNu9ZD52ID5vthd0uMtklDG7zE+ 1NOX3ZhcC1QxVt0v/DWhUxC7dPd8M/HquwZDm/enDbExuet5hrUILHYioLhY0FmVM+gYDgavAVmf5 b0p0YJUA==; 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 1gPAJL-0001gZ-Jp; Tue, 20 Nov 2018 17:59:43 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAEi-0006R3-R6 for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:55:01 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id A0E791F943; Tue, 20 Nov 2018 18:52:33 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736347; x= 1545328348; bh=QYpt9U4kN0fxfLWGOuGgh6WV6Aux5m8kaZEfxenP2QE=; b=L mgm03KumE7jaGn7c64AZJQR3h4TVGb/OVIrSKFyIZ5gOBYTS2raHzdAVcKboLjCb xa1+H55WOgm0jKjxZrxiC2mssHldaYO2A0YzYK4AEj4A3KjMNnTD8l8cpnEeb4xK iVPB8gnXkeS9bEQfh4kuU/BrtEeNCsGgZ7tHfDDzCCMFIz0dqgJmGApBzQ0D+x51 0MwUTndrVLWcXI28Sag4PhNrOAQCWlHoUTOUg0HBrauDjvan0/UJe64UGOsHp+ke /z1OEKksz6mgl3zU/64t1E08QlKB6I9USvwL7eH3Cno6WcI4DZ3wUtBcHuJqXp0s IjIP/wk7lTEnQxj1MXI3FvhuSN6hgOxPxUaUVEmSJ8R/dbIGb/GG11+HGlm8QZOp QRztDkTno2/LrE281Dv4sJPnM34sCZJVB1nJN0PoKBSf3q+YLDkgjUX++nCoEURn ev+IGo5yXoTcmYmXkvgNdegzaqDHXbzcDE0nWCr70/Q07C4T1/x5ysfls8gJwDOd VfR2TXqMZDOX5ZVC9pd67UZiBUJQMdeM6daL6BVT2spvV7cI1vMG1BH8T8CVJhTs Ghhhejs4iByfKCw2K6Us8jfn1CYYgfUU01iL4DlvFyzxT9BSf2+lxdyzOtlrCpFn 9QJfgpIvXAiyQh/7VpTNyB8UVW2mI9MxaLO1jCbtN8= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iFqO0yA123U8; Tue, 20 Nov 2018 18:52:27 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id 3DC631F99C; Tue, 20 Nov 2018 18:52:27 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 3/8] arm64: dts: allwinner: axp803: add AC and battery power supplies Date: Tue, 20 Nov 2018 19:52:06 +0200 Message-Id: <20181120175211.3913-4-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095457_693946_EF6A18B8 X-CRM114-Status: GOOD ( 10.06 ) 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 Parts of the AXP803 are compatible with their counterparts on the AXP813. Add DT nodes ADC, GPIO, AC and battery power supplies. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick --- arch/arm64/boot/dts/allwinner/axp803.dtsi | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/axp803.dtsi b/arch/arm64/boot/dts/allwinner/axp803.dtsi index e5eae8bafc42..c3a618e1279a 100644 --- a/arch/arm64/boot/dts/allwinner/axp803.dtsi +++ b/arch/arm64/boot/dts/allwinner/axp803.dtsi @@ -49,6 +49,39 @@ interrupt-controller; #interrupt-cells = <1>; + ac_power_supply: ac-power-supply { + compatible = "x-powers,axp803-ac-power-supply", + "x-powers,axp813-ac-power-supply"; + status = "disabled"; + }; + + axp_adc: adc { + compatible = "x-powers,axp803-adc", "x-powers,axp813-adc"; + #io-channel-cells = <1>; + }; + + axp_gpio: gpio { + compatible = "x-powers,axp803-gpio", "x-powers,axp813-gpio"; + gpio-controller; + #gpio-cells = <2>; + + gpio0_ldo: gpio0-ldo { + pins = "GPIO0"; + function = "ldo"; + }; + + gpio1_ldo: gpio1-ldo { + pins = "GPIO1"; + function = "ldo"; + }; + }; + + battery_power_supply: battery-power-supply { + compatible = "x-powers,axp803-battery-power-supply", + "x-powers,axp813-battery-power-supply"; + status = "disabled"; + }; + regulators { /* Default work frequency for buck regulators */ x-powers,dcdc-freq = <3000>; From patchwork Tue Nov 20 17:52:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10690993 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 79F9714E2 for ; Tue, 20 Nov 2018 17:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64F5D296D7 for ; Tue, 20 Nov 2018 17:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 576CB29865; Tue, 20 Nov 2018 17:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 0A694296D7 for ; Tue, 20 Nov 2018 17:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type: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=nS858YbnElHE8uf5jkH4q6LYCUEavw5IbIT8QDSMYJE=; b=UJPbcyuk3XAX4U+mYXymmoiYTZ c+czwI40qo4rLEBe5o2WQRmunpct6ZEx4cQFMZQhafJvNRMlhCMWHVDGAQE4X5bJK+fwJiyx6cOaN zG2TCcFBd5DTN83sWzdzr61+njkvmablx3PTBVUBN6tAnUHeNkbxkwXxRVTV9wj7unsTFIkv0J+x2 MVOVfSiCp7Dl8kCybKCz8pzs3JwYfMa+M1WztJ+zzcPF3p9TKcs3kgNYsG7rw+gugsBN7e8cwhk9K lB3YlDK3AQ9RU/4aABfB7RuS997bO9QeXm2WyMy/+aCLd2ugx2qWkUfH7uhXL7i7prOOGMvrknXQS SV4wLi2w==; 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 1gPAEY-0006R5-Li; Tue, 20 Nov 2018 17:54:46 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAEU-000696-VG for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:54:45 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id A241C20929; Tue, 20 Nov 2018 18:52:29 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736348; x= 1545328349; bh=2Ufa8g2X6gl38LQeXSxK1nafFVhKZ/h1m5RVhJnwc00=; b=a I+tVJXWnzsw9cb8oAZ7TmrOjO/iPJBLyHH9Y/lJ5eJmsMi9sfrS6RrQOib0/lE0w mvWiIUm86pg8WrRNcaN8JVfwY8hcLqQD5g1fjwFSUbyOuDcGP6FHWzHYiK/CqNSD VFSoVytKDJw8b/IayLbixVwPj0nGYLKXBkknU0aP0HOgqkGBNIKN8tFFU25CpN94 PTS7HxEIZX9316+KROFkltfDZGJOcVRnux2BKFOsQKku9V986J6IhHxF0WL6TkdT emOjxuqHYuze8Z/tA/HIu6pbq0v2NfIOJ2r8A9c9fTQd7fs/G1KgURCtwUX3irLL aS/l8oqIL2ELFQFmKNEyxvHIYrVumtPIhlsTgeE/Pf891QdIjqLnogeI9nlJ9aNb 3LUoP3KTCg+s75StFGQHAIQE9Xz1c8LNPjQV7g2+diExrBKrtV099q7FvfEbiavv rkzBUZXg9VJyew0J9A7fXcOIpwvQ+DcLgBVfiPG3FTyBzQFov9un0KhLp4YCe7Zt 0yahpjyi7X7agxigZZqxnAgrpg4ok+YaTfcll2iFR3X7I5/pI20HS2VAlklR57In yFtHsgeRkTin51USwQnLVQD0yHCX5UQVhhydInMuZIO4g9SHne9wJYUuCo0lRkSI XsCaw+31m6UnVuYjr57FJT3BO8N6sCEu43bAwzr/tQ= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OpzGnfHXYq_h; Tue, 20 Nov 2018 18:52:28 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id DAF9E1F943; Tue, 20 Nov 2018 18:52:27 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 4/8] arm64: dts: allwinner: a64: sopine-baseboard: enable power supplies Date: Tue, 20 Nov 2018 19:52:07 +0200 Message-Id: <20181120175211.3913-5-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095443_148960_3478A520 X-CRM114-Status: GOOD ( 10.27 ) 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 AXP803 ACIN pins are routed from SOM to the DC jack on the baseboard. AXP803 charger pins BATSENSE, LOADSENSE, N_BATDRV, LX_CHG, VIN_CHG and IPSOUT are connected via PMOS driver to SOM VBAT pins. VBAT and AXP803 TS pins are routed to the baseboard 3-pin battery connector. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai --- .../boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts index 53fcc9098df3..4695b0d407b6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts @@ -80,6 +80,14 @@ }; }; +&ac_power_supply { + status = "okay"; +}; + +&battery_power_supply { + status = "okay"; +}; + &de { status = "okay"; }; From patchwork Tue Nov 20 17:52:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10690995 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 0D25E14E2 for ; Tue, 20 Nov 2018 17:55:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF0DD296D7 for ; Tue, 20 Nov 2018 17:55:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E35BE29865; Tue, 20 Nov 2018 17:55:20 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 CC9CE296D7 for ; Tue, 20 Nov 2018 17:55:19 +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=mLoTjZtH9vK4IzDIMpQp95wIDqdChSnB/+1bLaHi/Qo=; b=ifdwmL1HSFwf9z5niu6sEVi3DI khmTvHj017X2frTikcXIhBkB3pbj5XO6Rsh7/ZZtrZJ52lhA8mHmY+SUy1D4KZIXyuTMK3B0F8ARY Pbv8u2lzggrvK7gg1LM+kpxekacrh8gpnXFL6Zg8zW1WeD4y8kxSEIkwctCIRZcoa+T6tfpIMZ8cM 15hOkU4Od7DLUvQ2eZJij/1CUm6xHBMHhf39BJJz0GRW6hhOmZqOndgwBqfo/Ized1rFySkzthAYo fTyxKw1NLKPvirMAvcAh4iS1zgegAACHg1dMfPhrFr9rGjDjcgF1h4p2X+HDOSMSZ+ElUPvd+9Pg4 egajWxSg==; 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 1gPAF2-0008Ep-7C; Tue, 20 Nov 2018 17:55:16 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAEU-000699-Vi for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:54:46 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id 442951FBED; Tue, 20 Nov 2018 18:52:30 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736349; x= 1545328350; bh=YtsaaInLaSJV+mW4ZGJfvOx1QGYgTi0mgpQkgtrzmII=; b=s CMVWVK1Gu9a7P93wNqOpwsr2/VdtiBo36dS/3O8p0QKhrcGBiKROMjcfTu8DkKbR r7mpnLXLQz/nbxTx/JtVQ09BXGcA11DXyQf41ourlnIIPgopu0KnZOfcyuVfiynu uPwRjchccKmcyOkKAS8WB0Z2NhWh4qCQ6v2UHKt1B1CKJHqkjST8dbpDgaaJMc8I AEz5eNEI/pPvVoOl1wYVaQD2Qa7J+uwnwU/xudkItxRML4w0FS+hm5gLzRYrzSHT LmVlw7Lau+HjQLsrtKDMyD/mcrnNgCyxWF2JCxxD42ziqzS/pHslHI9vF6eHyOYE cLT8so+wAhyYdug4Ev2GvtUnaOPeOElDkHPzHHuADmq38UNUmFackd9Co8PqXYvM 0o/iPDYelj4cdK2QyrgF+xW+ftpOkXYaTcXRNN6ckMrNMKhqfSniGPs+vJt2GyB8 uKrZbPZzf2BkzFZ5BSDC1d+pemZL5IZOXNVswzbUtFNfTWgLizxANxYhpp2uUUc1 q76/H1NhLWxbXov4pw/Z7Kl0CCvzMI2tkQtDC5eVcV2O1B9OeXRl5zCzMbOAMt8V UMb0dnb1v7BiTW3vi6BiHI6ZHDpNq1jU0+XhOOGVnZI7nQa0s4VjjtcO9k58BKsW t0yI5AZA/nJuhZMEu2Ktyf32wekoeL+UngseODHWFc= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GuKFiLuNcU_c; Tue, 20 Nov 2018 18:52:29 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id 87D5420791; Tue, 20 Nov 2018 18:52:28 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 5/8] arm64: dts: allwinner: a64: pinebook: enable power supplies Date: Tue, 20 Nov 2018 19:52:08 +0200 Message-Id: <20181120175211.3913-6-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095443_162026_D25649E9 X-CRM114-Status: UNSURE ( 9.94 ) 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 From: Vasily Khoruzhick Pinebook has ACIN connector and 10000 mAh battery. Signed-off-by: Vasily Khoruzhick Signed-off-by: Oskari Lemmela Reviewed-by: Chen-Yu Tsai --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts index 77fac84797e9..6a1402bf0362 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts @@ -148,6 +148,14 @@ #include "axp803.dtsi" +&ac_power_supply { + status = "okay"; +}; + +&battery_power_supply { + status = "okay"; +}; + ®_aldo1 { regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; From patchwork Tue Nov 20 17:52:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10691013 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 A2D7B14E2 for ; Tue, 20 Nov 2018 17:59:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 907202AA10 for ; Tue, 20 Nov 2018 17:59:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 847122AA1A; Tue, 20 Nov 2018 17:59:51 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 168582AA10 for ; Tue, 20 Nov 2018 17:59: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: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=HRl9ZPRxiidJZib32tiWbAyb8cAWhOFMU/2/DvkWLFE=; b=JZ401wfZVcabzzBCt09ptkPAJv tPtpPP240FpiDkmdPQLyNVekHUfxkMVvTV5DigjnzCa4zEEDFxWXzTSaXNwQ96rQTUDMZmD3p03gs tP1cunTd3mRnyFBEgOWZNGhW9SL+/9L7ltcgfoBqui1GYwLgVwEvx7Px/X7U14q0NqW+n4EmgRWeq iBECIjuhDQNkpTUVlrIfFFqg5qGv68yXkNQORvOQ3GB8YNb/ksPsOsqY3K6Qa0K6FC3yEyzyWj2J3 aOrG/mbV5Gs21M+ieS6W8TZDRE1zxHnEH1yM/YK0s/pIBAO55HVv1/TbdeQvUXg7GzimZUBjgmGKf kHlVw32g==; 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 1gPAJQ-0001mk-VZ; Tue, 20 Nov 2018 17:59:48 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAEi-0006R2-R7 for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:55:07 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id 292E920791; Tue, 20 Nov 2018 18:52:31 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736350; x= 1545328351; bh=McHTmJfwqv5vT4ak3tr5W+9VZ0cs/KhRnl4KNDz2q2E=; b=p zZkF1WklDQo/6xhMiQjkiOFYPi6md2vt0MNYfTYA1xGFis2nklWby8iWH80Us0jS LoXoUstHkxihnhnulB6HHNCIXBM5sTuvCP3mPmZ/oURpnPBWuY7K2gYWbGT4LKxQ nNLNUHdQr4+uP1jlHFFfQN9YzlfatCUwq+b3ax7GwHcMQYRSwcOUoRuBNcV8+nrZ P7z/KSAb3MX2ItcFEKXaijZvVq5xQlcECQKhxC/MT4YNNPjamXFB1J043Jo9GadW Wdfi/s9fefOrghBGQ4owj/S+wuh/YDRYFkCSgmBoHepRiub6OkNdm29pkAOmBOhV sMS3pAOonQT+sX6NoRmv8cdSLEalVU97t5s1Xj34N88zAFsuTKPLdpRdF/Y7eT5S 7RtP+y2qtceWAcv8Q2F96xOIu0jXmFHi/Wyg+o6awJZvUPeFITlzEiAH9+X1FDEp Ge3MxnU9j3aclQbs4Km29FjBgUgC4OP7pvW7NVeHG7JMyyCZHdyw24dI37Gdx/9h lhQcK0GjuP9NtJYXN+ndQKTdFkdEPi0o88zIFIpEVzJVlb5wGgv4qiO6HVCmz7Hc olhHsyNSsKivXrHlE9PMpGx8myyMfRYNek8cpwwwqYu8yrj+lH3Sw3T82ArqG7JS baB+Qc4VHvYuGJCVBxB2l/Oo4JIv53kvg1nxleC7XA= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jhQKm35LsGka; Tue, 20 Nov 2018 18:52:30 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id 2CC6820926; Tue, 20 Nov 2018 18:52:29 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 6/8] power: supply: add AC power supply driver for AXP813 Date: Tue, 20 Nov 2018 19:52:09 +0200 Message-Id: <20181120175211.3913-7-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095457_709241_E9A09FE1 X-CRM114-Status: GOOD ( 15.11 ) 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 AXP813 and AXP803 PMICs can control input current and minimum voltage. Both of these values are configurable. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Acked-by: Lee Jones --- drivers/power/supply/axp20x_ac_power.c | 94 ++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 1 + 2 files changed, 95 insertions(+) diff --git a/drivers/power/supply/axp20x_ac_power.c b/drivers/power/supply/axp20x_ac_power.c index 0771f951b11f..59b4c8d3b961 100644 --- a/drivers/power/supply/axp20x_ac_power.c +++ b/drivers/power/supply/axp20x_ac_power.c @@ -27,6 +27,16 @@ #define AXP20X_PWR_STATUS_ACIN_PRESENT BIT(7) #define AXP20X_PWR_STATUS_ACIN_AVAIL BIT(6) +#define AXP813_VHOLD_MASK GENMASK(5, 3) +#define AXP813_VHOLD_UV_TO_BIT(x) ((((x) / 100000) - 40) << 3) +#define AXP813_VHOLD_REG_TO_UV(x) \ + (((((x) & AXP813_VHOLD_MASK) >> 3) + 40) * 100000) + +#define AXP813_CURR_LIMIT_MASK GENMASK(2, 0) +#define AXP813_CURR_LIMIT_UA_TO_BIT(x) (((x) / 500000) - 3) +#define AXP813_CURR_LIMIT_REG_TO_UA(x) \ + ((((x) & AXP813_CURR_LIMIT_MASK) + 3) * 500000) + #define DRVNAME "axp20x-ac-power-supply" struct axp20x_ac_power { @@ -102,6 +112,57 @@ static int axp20x_ac_power_get_property(struct power_supply *psy, return 0; + case POWER_SUPPLY_PROP_VOLTAGE_MIN: + ret = regmap_read(power->regmap, AXP813_ACIN_PATH_CTRL, ®); + if (ret) + return ret; + + val->intval = AXP813_VHOLD_REG_TO_UV(reg); + + return 0; + + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: + ret = regmap_read(power->regmap, AXP813_ACIN_PATH_CTRL, ®); + if (ret) + return ret; + + val->intval = AXP813_CURR_LIMIT_REG_TO_UA(reg); + /* AXP813 datasheet defines values 11x as 4000mA */ + if (val->intval > 4000000) + val->intval = 4000000; + + return 0; + + default: + return -EINVAL; + } + + return -EINVAL; +} + +static int axp813_ac_power_set_property(struct power_supply *psy, + enum power_supply_property psp, + const union power_supply_propval *val) +{ + struct axp20x_ac_power *power = power_supply_get_drvdata(psy); + + switch (psp) { + case POWER_SUPPLY_PROP_VOLTAGE_MIN: + if (val->intval < 4000000 || val->intval > 4700000) + return -EINVAL; + + return regmap_update_bits(power->regmap, AXP813_ACIN_PATH_CTRL, + AXP813_VHOLD_MASK, + AXP813_VHOLD_UV_TO_BIT(val->intval)); + + case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT: + if (val->intval < 1500000 || val->intval > 4000000) + return -EINVAL; + + return regmap_update_bits(power->regmap, AXP813_ACIN_PATH_CTRL, + AXP813_CURR_LIMIT_MASK, + AXP813_CURR_LIMIT_UA_TO_BIT(val->intval)); + default: return -EINVAL; } @@ -109,6 +170,13 @@ static int axp20x_ac_power_get_property(struct power_supply *psy, return -EINVAL; } +static int axp813_ac_power_prop_writeable(struct power_supply *psy, + enum power_supply_property psp) +{ + return psp == POWER_SUPPLY_PROP_VOLTAGE_MIN || + psp == POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT; +} + static enum power_supply_property axp20x_ac_power_properties[] = { POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_PRESENT, @@ -123,6 +191,14 @@ static enum power_supply_property axp22x_ac_power_properties[] = { POWER_SUPPLY_PROP_ONLINE, }; +static enum power_supply_property axp813_ac_power_properties[] = { + POWER_SUPPLY_PROP_HEALTH, + POWER_SUPPLY_PROP_PRESENT, + POWER_SUPPLY_PROP_ONLINE, + POWER_SUPPLY_PROP_VOLTAGE_MIN, + POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT, +}; + static const struct power_supply_desc axp20x_ac_power_desc = { .name = "axp20x-ac", .type = POWER_SUPPLY_TYPE_MAINS, @@ -139,6 +215,16 @@ static const struct power_supply_desc axp22x_ac_power_desc = { .get_property = axp20x_ac_power_get_property, }; +static const struct power_supply_desc axp813_ac_power_desc = { + .name = "axp813-ac", + .type = POWER_SUPPLY_TYPE_MAINS, + .properties = axp813_ac_power_properties, + .num_properties = ARRAY_SIZE(axp813_ac_power_properties), + .property_is_writeable = axp813_ac_power_prop_writeable, + .get_property = axp20x_ac_power_get_property, + .set_property = axp813_ac_power_set_property, +}; + struct axp_data { const struct power_supply_desc *power_desc; bool acin_adc; @@ -154,6 +240,11 @@ static const struct axp_data axp22x_data = { .acin_adc = false, }; +static const struct axp_data axp813_data = { + .power_desc = &axp813_ac_power_desc, + .acin_adc = false, +}; + static int axp20x_ac_power_probe(struct platform_device *pdev) { struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); @@ -234,6 +325,9 @@ static const struct of_device_id axp20x_ac_power_match[] = { }, { .compatible = "x-powers,axp221-ac-power-supply", .data = &axp22x_data, + }, { + .compatible = "x-powers,axp813-ac-power-supply", + .data = &axp813_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, axp20x_ac_power_match); diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 517e60eecbcb..2302b620d238 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -266,6 +266,7 @@ enum axp20x_variants { #define AXP288_RT_BATT_V_H 0xa0 #define AXP288_RT_BATT_V_L 0xa1 +#define AXP813_ACIN_PATH_CTRL 0x3a #define AXP813_ADC_RATE 0x85 /* Fuel Gauge */ From patchwork Tue Nov 20 17:52:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10691007 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 D0D6A15A7 for ; Tue, 20 Nov 2018 17:56:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC71A2983D for ; Tue, 20 Nov 2018 17:56:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACB4B29938; Tue, 20 Nov 2018 17:56:30 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 43E232983D for ; Tue, 20 Nov 2018 17:56:30 +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=rrs3d8TB4Cydo3PYt89hdp04GOqC0bRHk49vsy5ZGic=; b=s2oNfJa8bIrEf0dmAZ4d1uop7r zAF+1eXwFdEJIge12GsBUU++JT35aBHiySSA3zg8W8TZ4bjKchOIsENsvLlChFqAnrA4u6MKgkOE/ G17x0jb5st/3UeqKPrPUvTSRPRHrWOSgsnTUV7fEf4TOfuswmeX5DSMqh4x22egdVQtwvXPVSQi2e AQy9yRdElM+AoIiU6TId+bsadDKZi9J541I2ZN/0ZNeeT6MK8N4X0yqbdgmcwyQEwYoQDf5Z97z8D gsf2zLtC+Vkldoj+4ShtueZmB3C2SFzSdElZ7T18iKZwhiJa/PEs683jONZzdc7BT5SF4m4RZTNsy bC1T+JRQ==; 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 1gPAG9-00011g-98; Tue, 20 Nov 2018 17:56:25 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAFC-0008Eq-SF for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:56:03 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id C405A20926; Tue, 20 Nov 2018 18:52:31 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736351; x= 1545328352; bh=cfMh6AcbyeWrvCk50dMKmOhXsNrpnTzv4+nFyu7Nu5E=; b=c mvtkqQpzHlrpHu/zYaF3/aIyhUsdZUPnKctZwJ3ihutH/4m7ThlbYAnBFq8xhrW4 I+K5Yki5PPV+Gl9RWZMR+1yX8Wf0UiMlpALoPCWeVChurJHBapnTfPQfKmdOik3H 4Zv9hASyDwGpzldCQ//I+PSb/hMu58RwBHiKMW2/VRB6AIcicBwAJ2fBInkxbDxT Skndilb9UO5DbsNFwhnUFWy8F5+vnPkVfuRISnc7TL6w0000G8/co0+QNlCBMqmD 998M/roye82baLOtLfe934JTX/Z0iLqGlqrqjP3cfzRIYw3fzwhMC/P1PFGYLy/F zM/0ZYQGr6TIK5ivaTP3TnzrQOjoa1tu4kDfcS4LlYu1qY9Ff/dWif4ZdBMgESXJ DdWYlCbqPsj+/u1XhRbbLAvIQiYqin559alv5+yk7yUqScMJe/sPc4/ebjj5Okye LOBstRV51+TYl6lxUR6b3qh8WWXhM9fnhXGjsLO77QH7VoNtSVxEZylRPdae9S2b 9/GPFFHYp3CX1cBFriF3AZvf4FGMhI4DDawYJdrQWc5H7aE6PvexJtAvWW2LJc3C M5pXB8FUmZ/bru+UGWZyFrR+3qdHDsdDtZvVsSOqiR5IT8+Z8NxiS0+lEijH27Bq 1iUntVya1iLEVhKrO3sO8e9x6gvq1N5ch+QtaFmD9g= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SJ2k2z5qujiY; Tue, 20 Nov 2018 18:52:31 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id CD18C1F943; Tue, 20 Nov 2018 18:52:29 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 7/8] mfd: axp20x: Add AC power supply cell for AXP813 Date: Tue, 20 Nov 2018 19:52:10 +0200 Message-Id: <20181120175211.3913-8-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095527_609426_1A75CEC4 X-CRM114-Status: GOOD ( 10.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 As axp20x-ac-power-supply now supports AXP813, add a cell for it. Signed-off-by: Oskari Lemmela Reviewed-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick --- drivers/mfd/axp20x.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 0be511dd93d0..dfc3cff1d08b 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -778,6 +778,11 @@ static const struct mfd_cell axp813_cells[] = { }, { .name = "axp20x-battery-power-supply", .of_compatible = "x-powers,axp813-battery-power-supply", + }, { + .name = "axp20x-ac-power-supply", + .of_compatible = "x-powers,axp813-ac-power-supply", + .num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources), + .resources = axp20x_ac_power_supply_resources, }, }; From patchwork Tue Nov 20 17:52:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Oskari_Lemmel=C3=A4?= X-Patchwork-Id: 10690997 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 873FB14E2 for ; Tue, 20 Nov 2018 17:55:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 762B0296D7 for ; Tue, 20 Nov 2018 17:55:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A24A29865; Tue, 20 Nov 2018 17:55:25 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 228FD296D7 for ; Tue, 20 Nov 2018 17:55:25 +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=SkKAl/pWODxequoVRJQKq0xQR6uOu9Jv39JXj7e3RCU=; b=Tx3hAgcq/OSJ9pXiqcwzyyFEQC g6BSHDAkLbG0OPqTsOFbFwJ4z3yDhYoFTUdbcWf2KiroStOByP2JnnpHte9YnOUAMhBc/sP5xnbAn 14LoRoaPE0YUVeDb/2UR+ovjvBeWINPBRX5SHWQbqRiEdsruvnzDKHGSQbA11ppbPgtqR+1UnJldM DnX0EY8quN6Y1DsSuy8ZHuHdkZnChFXdw9dVnxI+0hzw0eNr8r0cVY9KX78zQ6mz/rOsepPNC+zgv 3tO7G1kw2YuFExA+V1LoiqqpmL84UJUksEcxu/0ZNbCjP9ETCoxgAqDO5pCTHEyOUC59Y1EV8foH+ a922dynA==; 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 1gPAF9-0008NX-NR; Tue, 20 Nov 2018 17:55:23 +0000 Received: from mail1.kuutio.org ([92.222.216.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPAEi-0006R4-R5 for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 17:55:01 +0000 Received: from localhost (localhost [127.0.0.1]) by mail1.kuutio.org (Postfix) with ESMTP id 794B32092C; Tue, 20 Nov 2018 18:52:32 +0100 (CET) Authentication-Results: mail1.kuutio.org (amavisd-new); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=lemmela.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lemmela.net; h= references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received:received; s=dkim; t=1542736351; x= 1545328352; bh=pL7NHtztiwu1dc+uHme9yVhRXUCkKyzAdI+4FDYSySk=; b=D asz/sL71DL4WFNvSmxfSSmJSRLHoheUxvhjAvCuIHBB6ABAER5j+9wl9SjoFLDts 2h288bdzOPZ+ZkrY2hKC+HCVcCcdoRsBV2A3ymclUf21K8HZoWWlPzuxMOYvtO2N UGPga3uspnJvkvmBBqIG0nNUkKxSlBFpLHNO7WT2TOOoVOft4W6OxXDXTcqOm17x sAUlV/FMWxlDaKfN/1tqPXletlgSUJno8RwjOoENopM5zLfuHcqPi9iOa8mq3bIL S+a9fRu5mA3/6OZPfOyqFw2y+njYJiDdJaI6LeMNXIe6Zrg75n7F5MoYlAYynFW3 WrveiZ57PsUoKdP1uJDxBHiWCQFq4e35iW2XuN4Lc9U/+T1oTcXMqWdrotJAQP20 7I+UooMZPKNtu8Cpm2V7CXCXV3nFbzTDWpfdiHdbpjgH5AqYHQU8iSBZIkTHFV19 Nl8YAHquL3N8xoH5VVmnAHb1lXyU9Rzfsr6JdQY7PYqqe9Jkvmo1hlNsmJPtKDcQ mUjo+9hAW8tRPLJjkn5VzhfML/D0iQUZPOwrPnEXnJPx64VU/fR3gNjgTnKRoPEz VuGDQ7sVl0NxuosC3oh5TYML3xRSCOYo+S//dYigVWjqvHTCCtDOzh0kCf9yEpSg Z9iRAtixYH2TupWaoUDjROZhwo35eKm108qF9N8G0M= X-Virus-Scanned: amavisd-new at kuutio.org Received: from mail1.kuutio.org ([127.0.0.1]) by localhost (mail1.kuutio.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XGCP2iq9fzti; Tue, 20 Nov 2018 18:52:31 +0100 (CET) Received: from build.kuutio.org (unknown [IPv6:2001:998:13:e4::69]) by mail1.kuutio.org (Postfix) with ESMTPSA id 7C9F02092A; Tue, 20 Nov 2018 18:52:30 +0100 (CET) From: Oskari Lemmela To: Sebastian Reichel , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v6 8/8] mfd: axp20x: Add supported cells for AXP803 Date: Tue, 20 Nov 2018 19:52:11 +0200 Message-Id: <20181120175211.3913-9-oskari@lemmela.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120175211.3913-1-oskari@lemmela.net> References: <20181120175211.3913-1-oskari@lemmela.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_095457_698884_CE14F2D9 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, Quentin Schulz , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vasily Khoruzhick , Oskari Lemmela , Lee Jones , 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 Parts of the AXP803 are compatible with their counterparts on the AXP813. These include the GPIO, ADC, AC and battery power supplies. Signed-off-by: Oskari Lemmela Reviewed-by: Chen-Yu Tsai Tested-by: Vasily Khoruzhick --- drivers/mfd/axp20x.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index dfc3cff1d08b..e415b967d38c 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -728,11 +728,26 @@ static const struct mfd_cell axp288_cells[] = { static const struct mfd_cell axp803_cells[] = { { + .name = "axp20x-gpio", + .of_compatible = "x-powers,axp813-gpio", + }, { .name = "axp221-pek", .num_resources = ARRAY_SIZE(axp803_pek_resources), .resources = axp803_pek_resources, }, { .name = "axp20x-regulator" }, + { + .name = "axp813-adc", + .of_compatible = "x-powers,axp813-adc", + }, { + .name = "axp20x-battery-power-supply", + .of_compatible = "x-powers,axp813-battery-power-supply", + }, { + .name = "axp20x-ac-power-supply", + .of_compatible = "x-powers,axp813-ac-power-supply", + .num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources), + .resources = axp20x_ac_power_supply_resources, + }, }; static const struct mfd_cell axp806_self_working_cells[] = {