From patchwork Wed Nov 4 20:34:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 318257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA992C55179 for ; Wed, 4 Nov 2020 20:34:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C4E72087D for ; Wed, 4 Nov 2020 20:34:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U2ezc04e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732133AbgKDUeU (ORCPT ); Wed, 4 Nov 2020 15:34:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732126AbgKDUeU (ORCPT ); Wed, 4 Nov 2020 15:34:20 -0500 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 072FDC0613D3; Wed, 4 Nov 2020 12:34:20 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id m16so24407221ljo.6; Wed, 04 Nov 2020 12:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uupHzSrvUEtYcD/DIawVysd4yXQgmE4vD+y7+qxt6Iw=; b=U2ezc04ej10ExV+0CyLzp4uqgAZAPzYkXBIJ4y2peICC07SPbkYjroOvm3uO9YeQGv +C8zJxQJMHrt1u+SL3sGbag4fiKg/zfdV+NBK2Hmyfx+3P+DAm4EauKJgbgH023QzoUz ngO3wg82SW46XUV5EyILcGNeGoIowLFVlx93HKv+ZOF5n2sBgDgX49Qw4NUcNVNf2euj wDYK0P88tsu+rGsbPBfCR38tmuWSRzTdhUhiSgXB9z3SnRC3a3kmHBZOH7zrpJxonLX/ uAN+pIXl+DwD1nvLF26M0pg02Tos8bGac5euFUTP8LB8mlbFnBFxNIGwDsqFNWTykqCB qiGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uupHzSrvUEtYcD/DIawVysd4yXQgmE4vD+y7+qxt6Iw=; b=Omou78XoNpjktU7uoFPGxYrcrMOAT0Y9XuLYrRvSdJ5u0UKTT+2sFg3pkuC3RW89jp 2kZZYgf3w2api33+OkRYRtj07AsTlmjGvloFo0WkpeZytzNd3rRIR8f3UBFS5DTods5b K3jv6gXFyt54YFneDi7iimg2gIN+Wlp9uppuDerqnjwkklY1+66nAHxOH3xeKGISoJml jubYpsBZ6NH9s2UA2Shn+yzkzKodnkzTnBS0lo9eSomn2ODdaDZ8GorVenpQ95xMoY/L CzfSyLFVc9pN0TCBbupxhVYunhzVqzMNbmMzB7l/r+oUzyKPL3vlhwlXFRbG7d4PXeXl GfTg== X-Gm-Message-State: AOAM530L0ZRcljXpgrYhr7iPG5XFH7OKmmMpmpMLJ0D2fV9d+dTsPWQp o6/JcXn+RwJPAKY4iZb6IiE= X-Google-Smtp-Source: ABdhPJxGq5biOfdM5okW6Eec6fIh7ZyYN13nU6kKvftLBxvRrRbwWYLAfWcEjdQXJubPSyIqi7160g== X-Received: by 2002:a2e:9148:: with SMTP id q8mr11976153ljg.182.1604522058483; Wed, 04 Nov 2020 12:34:18 -0800 (PST) Received: from localhost.localdomain (109-252-192-83.dynamic.spd-mgts.ru. [109.252.192.83]) by smtp.gmail.com with ESMTPSA id u22sm615084ljk.45.2020.11.04.12.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 12:34:17 -0800 (PST) From: Dmitry Osipenko To: Lee Jones , Rob Herring , Thierry Reding , Jonathan Hunter , Dan Murphy , Sebastian Reichel Cc: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/4] dt-bindings: mfd: Add ENE KB930 Embedded Controller binding Date: Wed, 4 Nov 2020 23:34:00 +0300 Message-Id: <20201104203403.24937-2-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201104203403.24937-1-digetx@gmail.com> References: <20201104203403.24937-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add binding document for the ENE KB930 Embedded Controller. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko --- .../devicetree/bindings/mfd/ene-kb930.yaml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml diff --git a/Documentation/devicetree/bindings/mfd/ene-kb930.yaml b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml new file mode 100644 index 000000000000..635c8966ca22 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/ene-kb930.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/ene-kb930.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ENE KB930 Embedded Controller bindings + +description: | + This binding describes the ENE KB930 Embedded Controller attached to an + I2C bus. + +maintainers: + - Dmitry Osipenko + +properties: + compatible: + items: + - enum: + - acer,a500-iconia-ec # Acer A500 Iconia tablet device + - enum: + - ene,kb930 + reg: + maxItems: 1 + + monitored-battery: true + power-supplies: true + system-power-controller: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + battery: battery-cell { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <3260000>; + energy-full-design-microwatt-hours = <24000000>; + operating-range-celsius = <0 40>; + }; + + mains: ac-adapter { + compatible = "gpio-charger"; + charger-type = "mains"; + gpios = <&gpio 125 0>; + }; + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + embedded-controller@58 { + compatible = "acer,a500-iconia-ec", "ene,kb930"; + reg = <0x58>; + + system-power-controller; + + monitored-battery = <&battery>; + power-supplies = <&mains>; + }; + }; + +... From patchwork Wed Nov 4 20:34:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 318256 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E06CC4741F for ; Wed, 4 Nov 2020 20:34:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C2FE20782 for ; Wed, 4 Nov 2020 20:34:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lqP2jOnX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732160AbgKDUeY (ORCPT ); Wed, 4 Nov 2020 15:34:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732126AbgKDUeX (ORCPT ); Wed, 4 Nov 2020 15:34:23 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CB4BC061A4A; Wed, 4 Nov 2020 12:34:23 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id 184so28913432lfd.6; Wed, 04 Nov 2020 12:34:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WKT9yCY9G74xRdzuzOYreE2TSI0A3c590q95kWmR0gE=; b=lqP2jOnXcgZ6lV2k7SBWomSKz8TeVPz1pFaKDBUJm5I/18KOvwsyxHwpjbZ8evWEH8 ON/9H9C/B6D6NyubgDCOKi97Bw+fzHN3rqHvbhYgmZ6+eFW5d/A+3N3xc3ciOif9Jc27 ENGVDjCemHkSLOZK2SPQymavs6t0eJDA6hQK4cEYyhGy0pNesU2i0YNKtib6JFlkC9vH I0uu67iQv+8e4GwX4emfW3InNs/kXiTquqBmH2qO0yICRnJm+wqbF83s6FS2WNcTFCHb EM42NcwvZSbYEWWqeMhOQSI0l5pFGZe1UU2jIAMecogW0tEZyMdm3OQTkXCleH6h8UEU 5/Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WKT9yCY9G74xRdzuzOYreE2TSI0A3c590q95kWmR0gE=; b=FOXjS5EM4SHQCbzbvuCbYzJTYhXtgIfdDhdIHbsfLc6phqUFmZIHBnQtDP2+z0eS2Y Wj+Fr+wgycursTIrx8r/V01nuhTq4/rAy1S8SEBxwAmW1EAqPBkOF1UOWxWiiNbv6JMS k8F+nFeYWCERiapxggAGPHAgRd3qIaDpp48JvqqeF6P9yWq2383P8ZNfNkIAVixtFTKA 8vnsiOiFSHTRTTkw+DbAPX9MNyPAMtLJsUtENFSGV4JyGYDiG5d37YIeDzB4BG4fADGY N3LiefQjIQTp5wK2LDPcOnSzXa+pvGlCE76nkTSmVVPIIUs3yH6Ydy9FR84jvxvjcDN5 oYkA== X-Gm-Message-State: AOAM530XseWZ6TDY/AlkReXI2HXAA4B4xygZikmgacn4LDAjyPK73BLG wGL2EIYlhwI0bo9Rb0X1mkg= X-Google-Smtp-Source: ABdhPJzfD7jLtgKzs4Af7JCwmX7xio1vG47w4LofjydiYDgTi8aU+pacgbFhucTbGOw6yRfrID0l2w== X-Received: by 2002:a19:f605:: with SMTP id x5mr10315928lfe.39.1604522061646; Wed, 04 Nov 2020 12:34:21 -0800 (PST) Received: from localhost.localdomain (109-252-192-83.dynamic.spd-mgts.ru. [109.252.192.83]) by smtp.gmail.com with ESMTPSA id u22sm615084ljk.45.2020.11.04.12.34.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 12:34:21 -0800 (PST) From: Dmitry Osipenko To: Lee Jones , Rob Herring , Thierry Reding , Jonathan Hunter , Dan Murphy , Sebastian Reichel Cc: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 4/4] ARM: tegra: acer-a500: Add Embedded Controller Date: Wed, 4 Nov 2020 23:34:03 +0300 Message-Id: <20201104203403.24937-5-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201104203403.24937-1-digetx@gmail.com> References: <20201104203403.24937-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This patch adds device-tree node for the Embedded Controller which is found on the Picasso board. The Embedded Controller itself is ENE KB930, it provides functions like battery-gauge/LED/GPIO/etc and it uses firmware that is specifically customized for the Acer A500 device. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts b/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts index 5ab6872cd84c..3b9ac3324fd5 100644 --- a/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +++ b/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts @@ -533,6 +533,16 @@ panel_ddc: i2c@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; + + embedded-controller@58 { + compatible = "acer,a500-iconia-ec", "ene,kb930"; + reg = <0x58>; + + system-power-controller; + + monitored-battery = <&bat1010>; + power-supplies = <&mains>; + }; }; }; @@ -820,6 +830,13 @@ backlight: backlight { default-brightness-level = <20>; }; + bat1010: battery-2s1p { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <3260000>; + energy-full-design-microwatt-hours = <24000000>; + operating-range-celsius = <0 40>; + }; + /* PMIC has a built-in 32KHz oscillator which is used by PMC */ clk32k_in: clock@0 { compatible = "fixed-clock";