From patchwork Mon Dec 14 11:24:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 343489 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2911691jai; Mon, 14 Dec 2020 03:25:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJz101KEXLJ1+HIJN3t+Z1C2RSvtMJp0izxoLu+Z3U2CdtuvJOAv6zzDLQiTbI67ytF+FjZ2 X-Received: by 2002:a17:906:ca47:: with SMTP id jx7mr22968438ejb.237.1607945146224; Mon, 14 Dec 2020 03:25:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607945146; cv=none; d=google.com; s=arc-20160816; b=PwYlCIkxA/KLAX8t7nDnNrbAqnumJK1pBSE+tU0lnro0pMx+vfZ2aywic+/2Wtu8Mt jj+GD1QtFhs7Jh256985PQ/IjDXSAyK+JTQWJnYtOx0FHmpW5Gb0KG7peAbN/qHx1g3t F2sSISk1N3hxOUlmn8Kt6oOxz6gH0pryI3iJ1I0hHybycvH4MMPZxRhv02PANoqsUTdq szWe7z9es2LTnWaFk4Ep6knKkypteto9DrtbARGh37DI6Qolw59An0TajVvaOgL/zYG/ fgI4WR7vqArNcW90vgzmnncnjLwlxPA3WHx9L84hoogc+19TJhkrTVEDHNTLxCkUo5q8 vocQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=+0e8dKAiob1OcjRvD9TwFvbIOMafBCQMSn4wKEe4suE=; b=vun9mvFNXOfU42FcDfuTWKxzLEw4KfA3ExNsq1eJ7gx1TuGoh4lpmqLHPva3wEBnOy KUchQMpBkn8SKnv+SdUnFGZ6zgzrlZfrN7iz+QeL3BRqYolmbx6bkT0PanFI/CP7d00z yWs9RqRHJUl75HMVqAQL9sbibd6KVeLT2WbPQUcpmlfq+OLTj0MDNOfkpFBazysR1d61 mWeHHECD5fzPXHrinqeYu7KrHTLdqCm7rlaf0mQUlzyLpjXU6ISs3ecX1EeLj82y/+Y1 Q8/cjQ/qbhM8dOFoUby72QwBtZLM0BMYcqc8by/kZQWtQ94iHZfHgyEg5kv/mPp26ikm v3vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rb7dwA+7; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id k4si9945648eds.355.2020.12.14.03.25.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 03:25:46 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rb7dwA+7; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CD6068282A; Mon, 14 Dec 2020 12:25:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="rb7dwA+7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EAD0F82824; Mon, 14 Dec 2020 12:25:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DD7EC82817 for ; Mon, 14 Dec 2020 12:25:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201214112455euoutp017dcb82e5ee80409a9b74548f753ac441~QkYt7PBuH0070700707euoutp011 for ; Mon, 14 Dec 2020 11:24:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201214112455euoutp017dcb82e5ee80409a9b74548f753ac441~QkYt7PBuH0070700707euoutp011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607945095; bh=+0e8dKAiob1OcjRvD9TwFvbIOMafBCQMSn4wKEe4suE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rb7dwA+7u37qygmrBg2xePmK/E4pvgumvD5h2EU0eA3gS1gdL+ShPbkXe5mYa+uHF sg/PXzIgoXXK8zeHS0o8ns4IbXHIdbYDuwqV9yplfPFS1ljcJR6yNh4Y8igh+hPm3z cNGOeiTOb64T8c3HofDicemscX0KykJN6lEcQfhE= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201214112449eucas1p18733e741986e7895c7df2f3be40abfdf~QkYo9ao513049230492eucas1p1b; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F9.C0.45488.18B47DF5; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201214112449eucas1p2ce0ef939e0d7f468e64be3555f29ea04~QkYom2uOJ0277402774eucas1p2y; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201214112449eusmtrp1b84153b97bd4b2d80989ab1ae0945405~QkYomP8_r1608516085eusmtrp1f; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) X-AuditID: cbfec7f5-c5fff7000000b1b0-2b-5fd74b814fef Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 08.9B.21957.18B47DF5; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201214112448eusmtip1b672ed5236197e535684c1d28db028a8~QkYoERjR72707027070eusmtip1O; Mon, 14 Dec 2020 11:24:48 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Marek Szyprowski , Neil Armstrong , Lukasz Majewski , Philippe Reynes , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH 1/6] clk: meson: add minimal driver for g12a-ao clocks Date: Mon, 14 Dec 2020 12:24:32 +0100 Message-Id: <20201214112437.18757-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201214112437.18757-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkleLIzCtJLcpLzFFi42LZduznOd1G7+vxBn2PjCw2zljPanHjVxur xfN3l5ks1h65y25xqC/aouOwssW3LdsYLSZN+MVm8XZvJ7vF4akfGB24PN7faGX3mN1wkcVj 3qwTLB4fPsZ5zO/8zuRx9s4ORo++LasYPTYuO8AcwBHFZZOSmpNZllqkb5fAlXFp0xKmgq+i FQsPn2BvYFwl1MXIySEhYCIx69wJVhBbSGAFo8TTo4FdjFxA9hdGiVOPrrJDOJ8ZJTafv8nY xcgB1tHepQsRX84o0bRuJTtcx9zbi9hARrEJGEp0ve0Cs0UEjCQuNe1gASliFrjDJNE1uYEF ZJKwgJtE+7UakBoWAVWJfQs/g4V5BWwl7s8xhrhOXmL1hgPMIDangJ3Exrlr2UDGSAgc4ZD4 9GMNC0SRi8SKa5PZIGxhiVfHt7BD2DISpyf3sEA0NDNKPDy3lh3C6WGUuNw0gxGiylrizrlf bCCbmQU0Jdbv0ocIO0qsOd/DCvExn8SNt4IgYWYgc9K26cwQYV6JjjZoKKpJzDq+Dm7twQuX mCFsD4lHn7qYIOEzEeiEVZuYJzDKz0JYtoCRcRWjeGppcW56arFxXmq5XnFibnFpXrpecn7u JkZgajn97/jXHYwrXn3UO8TIxMF4iFGCg1lJhPd3/eV4Id6UxMqq1KL8+KLSnNTiQ4zSHCxK 4ry7tq6JFxJITyxJzU5NLUgtgskycXBKNTAt4vuSHX2uTTF51wyL38/YS7/F7p+VsOOiBeOK EG9z9r9vBFbWOx348ed1+8xw5bW97A0XSkV5/+7ddfyDvdKqDxLHz8Tcf3S/ZXvStIKsUEeV /8cuvLR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mB 5ZeLMcEvjPcprJihYHdZ9P/51gSV7Kdrluia9n+IzhDNZ5WMdtHXsPp6ynPDQ+kTEg+WGGhX CTz6Mrst7MczOWVf/iphxq0tdaf/6DYHadn7NF2ctKeWx2entixfVdg987rLd+scdmTqLTlc xbzWKritIdn5V9x5ocPyqz8UrMtXEbrr+33qmbgbxStuzWu5sehjIwvTXb7mUCslluKMREMt 5qLiRAC2S1xK/QIAAA== X-CMS-MailID: 20201214112449eucas1p2ce0ef939e0d7f468e64be3555f29ea04 X-Msg-Generator: CA X-RootMTR: 20201214112449eucas1p2ce0ef939e0d7f468e64be3555f29ea04 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201214112449eucas1p2ce0ef939e0d7f468e64be3555f29ea04 References: <20201214112437.18757-1-m.szyprowski@samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add minimal driver AO clocks on meson G12A family. Only ADC related clocks are supported. Signed-off-by: Marek Szyprowski Change-Id: I0c91848bc55493e19570db333e7da6020d687907 --- drivers/clk/meson/Makefile | 1 + drivers/clk/meson/g12a-ao.c | 83 +++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 drivers/clk/meson/g12a-ao.c -- 2.17.1 Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung diff --git a/drivers/clk/meson/Makefile b/drivers/clk/meson/Makefile index c873d6976fa..7204383e173 100644 --- a/drivers/clk/meson/Makefile +++ b/drivers/clk/meson/Makefile @@ -6,4 +6,5 @@ obj-$(CONFIG_CLK_MESON_GX) += gxbb.o obj-$(CONFIG_CLK_MESON_AXG) += axg.o obj-$(CONFIG_CLK_MESON_G12A) += g12a.o +obj-$(CONFIG_CLK_MESON_G12A) += g12a-ao.o diff --git a/drivers/clk/meson/g12a-ao.c b/drivers/clk/meson/g12a-ao.c new file mode 100644 index 00000000000..7a0abea77c4 --- /dev/null +++ b/drivers/clk/meson/g12a-ao.c @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "clk_meson.h" + +struct meson_clk { + struct regmap *map; +}; + +#define AO_CLK_GATE0 0x4c +#define AO_SAR_CLK 0x90 + +static struct meson_gate gates[] = { + MESON_GATE(CLKID_AO_SAR_ADC, AO_CLK_GATE0, 8), + MESON_GATE(CLKID_AO_SAR_ADC_CLK, AO_SAR_CLK, 8), +}; + +static int meson_set_gate(struct clk *clk, bool on) +{ + struct meson_clk *priv = dev_get_priv(clk->dev); + struct meson_gate *gate; + + if (clk->id >= ARRAY_SIZE(gates)) + return -ENOENT; + + gate = &gates[clk->id]; + + if (gate->reg == 0) + return 0; + + regmap_update_bits(priv->map, gate->reg, + BIT(gate->bit), on ? BIT(gate->bit) : 0); + + return 0; +} + +static int meson_clk_enable(struct clk *clk) +{ + return meson_set_gate(clk, true); +} + +static int meson_clk_disable(struct clk *clk) +{ + return meson_set_gate(clk, false); +} + +static int meson_clk_probe(struct udevice *dev) +{ + struct meson_clk *priv = dev_get_priv(dev); + + priv->map = syscon_node_to_regmap(dev_get_parent(dev)->node); + if (IS_ERR(priv->map)) + return PTR_ERR(priv->map); + + return 0; +} + +static struct clk_ops meson_clk_ops = { + .disable = meson_clk_disable, + .enable = meson_clk_enable, +}; + +static const struct udevice_id meson_clk_ids[] = { + { .compatible = "amlogic,meson-g12a-aoclkc" }, + { } +}; + +U_BOOT_DRIVER(meson_clk_axg) = { + .name = "meson_clk_g12a_ao", + .id = UCLASS_CLK, + .of_match = meson_clk_ids, + .priv_auto_alloc_size = sizeof(struct meson_clk), + .ops = &meson_clk_ops, + .probe = meson_clk_probe, +}; From patchwork Mon Dec 14 11:24:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 343492 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2912140jai; Mon, 14 Dec 2020 03:26:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxjj/zfRjQrC7t1UmlqoiSMSRdp/2qK7+ZF0Jl5U9cIxSGRIZ7juNRYJ9PkpsFHwJZ5oxLL X-Received: by 2002:a17:906:9345:: with SMTP id p5mr11306197ejw.40.1607945180735; Mon, 14 Dec 2020 03:26:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607945180; cv=none; d=google.com; s=arc-20160816; b=LY11SetYoWnrKZ2VxgKaK2BLkCK7vSo14/UGEmLXcbfRDHP30DciDDj+yggk1Rcr7u /uf/uSJ8kzS4AAmSolHhL4PUE+kaaBbPiIbuL/tmVIcI5FjSIZxk+KMJSmGQXu//L+iZ FmJrLcgZ/Of/CMyUbrPi3cazMjGBR0+Wm+4BAL7U8Uu7zjFTnRbQnS5qlfHv4oj/UL8o RvJsHtpFXhB/I+biA7IqepHWsM380egE3yq5dUB7vCsUjVD6nJTU+Ts8vTNJd2xfk5LL hmnzxPoPwNhNTDDKPKwzQt/9wunXjiwSvMV51rdqnv8Yn48uyNqMH6iq+deX/rHMyT9H S0/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=UvIxNi3SeCIAlgAY7lX/+fWuWj62UXOqAKk1o2uM3lE=; b=ksTaNNQehEf9Q1MppJj16FLRIV4JdXX+9h3ursSWmu5nMQzuCeZDP9peHX1NMBdbcb iDMNkJYr2bW90ltXlLMJM0e1arX7FUwDar7dyffVeMHVsdorjtRtcw646ikZ7uT6QInP Rmm9TNjN58CWnqObv1VuR6T//pIsqeF3hTFVc+9/hnm5TkYsAGK1ooSRBoWGpFbS34j0 UMsf/UQHFNM2CIJWL+Jcr6qfeaoidKA3dqbWzBfliGcO8fEBncFyuSpeCMS9FJQYDpP8 xFslRsSN/fOjvM29a3eVzAA2yYDN4UkSUzgX73T6VHXImlZFCggIT/GbCbrOoqpkTg8g Ljxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="sE/jnDgS"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id i8si10823380ejj.262.2020.12.14.03.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 03:26:20 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="sE/jnDgS"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D748782833; Mon, 14 Dec 2020 12:25:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="sE/jnDgS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A3CCF8282E; Mon, 14 Dec 2020 12:25:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1DCE28281A for ; Mon, 14 Dec 2020 12:25:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201214112455euoutp01bbe20338e74d3078bb38d81cd323b19c~QkYuWuNzf0131301313euoutp01a for ; Mon, 14 Dec 2020 11:24:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201214112455euoutp01bbe20338e74d3078bb38d81cd323b19c~QkYuWuNzf0131301313euoutp01a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607945095; bh=UvIxNi3SeCIAlgAY7lX/+fWuWj62UXOqAKk1o2uM3lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sE/jnDgSXy15b3A5oI/1vexess6umkrMcEzgeEMDJxzgigINTIDF+vZocOdfb7z1g yAchnXqlvPre32eGWvDVYW8U4Vc2ub9n8a6hGYn3Wz/BMOChfYaDS+1s9TNwwIAmt5 LwBHEl4szhYXpzZTrk/ECc4Qij/o2AmrvZ9A6kvk= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201214112450eucas1p1a10d20874a9eb4ae1b23a8f6c5ff826e~QkYpdwOcQ2031520315eucas1p13; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id AF.72.44805.28B47DF5; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201214112449eucas1p1ebcf51e2b91ed2bac7fc4d309a174499~QkYpBgodn3046030460eucas1p1r; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201214112449eusmtrp277f99f81cc68e67f3eed87549caea12a~QkYpA2rn60874808748eusmtrp21; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) X-AuditID: cbfec7f4-b4fff7000000af05-bd-5fd74b8274f7 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 2A.E8.16282.18B47DF5; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201214112449eusmtip1566a9a2d9713703f47496f7250dbab50~QkYofopli2707027070eusmtip1P; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Marek Szyprowski , Neil Armstrong , Lukasz Majewski , Philippe Reynes , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH 2/6] adc: meson-saradc: add G12A variant Date: Mon, 14 Dec 2020 12:24:33 +0100 Message-Id: <20201214112437.18757-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201214112437.18757-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSfUhTYRTGe++9266ryXUOOvQ1shKStDSr25fYF9yyICKIVmSrbtOas7Ys kyhzaWsrS9OyRZkRGurUmQytFbqVCpmVQlmsRMrM1ZaWX60P23at/vudc57nfc778pK42MCb RCaqDrFqlVwZwhcSlsbvreEZcS/j5506GUybCyp5dIcni0f3uNsx2vTwjYC2ZW+jdfYZ9FCN BdG5Fzx82nX/jIC25/ehWCHzpSNTwFxNf04w143NBNPXv4MpPDOMMU8ctYjJrilFjLm4Ht9I yoTL9rDKxMOsem7MTmHCM1MDdmCQl/pm6BYvHX0n9CiABCoazpY3CHwspm4jaHkJeiT08gCC THsnxhXfEOQXlqO/jlJ7MZ8blCCwO99h/yw/HYO4T8WnIkHv0vN9LKGioC2jlvCJcMqBgf5i uj88mKJhsOKKP5ygZsGvbo/fLKKWQ++QTsDFSaGsqt7fD6BiwHzN5I8Gqp6E98VanBOthnuj 3TyOg8HZVDNmngKjdYUYZ9Ai6Go1CbjiLIL2jIKxGy0FR6vHeyzp3W82VN6d60OgVkBJFcNh IHS4gnxi3Iu5lss41xaBLkvMnREKxqaKf6kNz9rGNmMgz1SJcw+Ug8CWaUEXkNT4P+sGQqVo IpuiSVKwmigVeyRCI0/SpKgUEbuTk6qR9788/t00UItKnP0RNoSRyIaAxEMkoh8n2uPFoj3y o2msOjlenaJkNTY0mSRCJop21ZTHiymF/BC7n2UPsOq/U4wMmJSOWSJtAYEG9/gnyt8PIPat u+hgi87QKft88qPb3TVVO2yu/vyhalS74WZadugMRZwtOm6BbPFbTCn5uCrPseaTdfOiQpdi ++uF44zVIy2p9Tm5yi/9sanTO9moO9rd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cH8prui2QxpicVhS4Mbdvm2hjw4OYWPmkB6zPPdXRZZuRa5rNtvr2m xH3BrGP9ajYWJj0nXPRu+yj2ZLJJRs53rPewlbtT6LtMeBHz+SJX+aun45Kqkm+8VS251DD3 +bWyRrZTUjYzmUx3lqV+Vdi28erlMjGlQovcfZ/fKS5Zukvbf4lb3MmKTqaXSizFGYmGWsxF xYkAUnM8CwADAAA= X-CMS-MailID: 20201214112449eucas1p1ebcf51e2b91ed2bac7fc4d309a174499 X-Msg-Generator: CA X-RootMTR: 20201214112449eucas1p1ebcf51e2b91ed2bac7fc4d309a174499 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201214112449eucas1p1ebcf51e2b91ed2bac7fc4d309a174499 References: <20201214112437.18757-1-m.szyprowski@samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add support for the SARADC variant found on the G12A SoCs family. Signed-off-by: Marek Szyprowski Change-Id: If519d333e9773d089f37a8c7b4ccb144be68925b --- drivers/adc/meson-saradc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 72b0cc4e5bd..998cef24d88 100644 --- a/drivers/adc/meson-saradc.c +++ b/drivers/adc/meson-saradc.c @@ -711,6 +711,8 @@ static const struct udevice_id meson_saradc_ids[] = { .data = (ulong)&gxl_saradc_data }, { .compatible = "amlogic,meson-gxm-saradc", .data = (ulong)&gxl_saradc_data }, + { .compatible = "amlogic,meson-g12a-saradc", + .data = (ulong)&gxl_saradc_data }, { } }; From patchwork Mon Dec 14 11:24:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 343486 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2911334jai; Mon, 14 Dec 2020 03:25:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+vn6mO+l1NR7lYBXH2bpFYIa4wMF2sTS+PpinilUJscIjxWy4dJN7RYM1z5ubIsL5tE7d X-Received: by 2002:a17:907:2131:: with SMTP id qo17mr21835079ejb.546.1607945114481; Mon, 14 Dec 2020 03:25:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607945114; cv=none; d=google.com; s=arc-20160816; b=CX18TO78nqNR6f4zTnObKsDIqH5N7B8sKOuBe13h0KQBl8fnj1HJVqHvNo5BnjHpG+ kBLuxAxtSUCefdbsLyqHm4m9VmL69pLzqPm4t/1WMNR/R4P5Mcm76J2l4oZWMU4UyGYX z4Lq5s7IOx6ElFveByCJ11pWd5bPUJ2TIlx8OEj7vaoTk7G4kS1s1somymvDmKTaprK0 vSKDSGNqKWWQeflRvZ2R7gbwjTOil1YE2pHr735vlVGEzsT32QGddhZg4GhV/nBW8niF ++qybvwRK0fvCw7jYO/fdBsat9RsyReX+2A/WsaKC0AWo2kEsn5ivJSug9P4xeOfLJTH KXPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=2H9BBNyv5/vxNOUw1+2E7KnTxYztD616hrCcE1zfDEs=; b=mwee4+4jpHDhKJQM0rZuDAs/LeLBUtN5U5OZNUL3kOJHVVBVs3S9iRhFrj2kLSsNeS 9LP/QLtZXarY64l9ASpYopb6E55cC6ZbZTHLD4GvPVAeGoAALCKafvfkeANlQdJJc2WW wfYleitlmhKqOPxOhLZ7K+I9WHQRhsug39KmoOXZgtr3J3cGGpSpFDrJ6a3DYijtaHkM /IiZ6e3AjmLY5srwppR8UGmLk2dEmMrhI0q5HbUckhlhaB1JDJto+fTmIVGIDNz84hQ4 tgj3GK7bOPeFnj3u2mgtiDFPF3pJAbIdaVjUKr2izxJkqxHyD9KroS/Qd+r0ZjIcR3MA 80cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KII3jivT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id g13si2583680edk.411.2020.12.14.03.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 03:25:14 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KII3jivT; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E3FAE82815; Mon, 14 Dec 2020 12:25:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="KII3jivT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 546A582821; Mon, 14 Dec 2020 12:25:06 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0D8598280C for ; Mon, 14 Dec 2020 12:25:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201214112451euoutp021d21fa2452ee7837e8fef62cdffcfb68~QkYqQ904Q2239122391euoutp02T for ; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201214112451euoutp021d21fa2452ee7837e8fef62cdffcfb68~QkYqQ904Q2239122391euoutp02T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607945091; bh=2H9BBNyv5/vxNOUw1+2E7KnTxYztD616hrCcE1zfDEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KII3jivTQTsOdpnQ/fO2aOBlqDESmLS4GS14qo0yxlWoO/ZFw83xvUbUGtKcvTyCX SAe4sZOLAOmoI963kjPPx45Do12RO52Mk1aIRW6nxCzRH4iBRPrrLx1XeuB4y9dJaW hJBoxbss11EsXLO0g6HyJWwiaAvWbh0PzuWuf6Xo= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201214112450eucas1p22e6c1144407bc381b9b28fdc26b660ea~QkYp8TWT61573015730eucas1p2L; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 61.07.27958.28B47DF5; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201214112450eucas1p1e7ad389bceaaf1082c9afdcb0733e9c0~QkYpf61Ya3050030500eucas1p1y; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201214112450eusmtrp2de2e1eb793855741b3c7ee58b955feb4~QkYpfQYJk0877908779eusmtrp2l; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) X-AuditID: cbfec7f2-efdff70000006d36-d0-5fd74b82d913 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id AB.E8.16282.28B47DF5; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201214112449eusmtip1f99c9ee74846e05c1c02ca06b0a853d6~QkYo9QalF1812918129eusmtip1b; Mon, 14 Dec 2020 11:24:49 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Marek Szyprowski , Neil Armstrong , Lukasz Majewski , Philippe Reynes , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH 3/6] adc: meson-saradc: skip hardware init only if ADC is enabled Date: Mon, 14 Dec 2020 12:24:34 +0100 Message-Id: <20201214112437.18757-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201214112437.18757-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkleLIzCtJLcpLzFFi42LZduzned0m7+vxBsfOmVhsnLGe1eLGrzZW i+fvLjNZrD1yl93iUF+0RcdhZYtvW7YxWkya8IvN4u3eTnaLw1M/MDpweby/0cruMbvhIovH vFknWDw+fIzzmN/5ncnj7J0djB59W1YxemxcdoA5gCOKyyYlNSezLLVI3y6BK2PllKksBds5 Kub0rmdsYJzK3sXIwSEhYCJx7KlwFyMnh5DACkaJ8zd5uhi5gOwvjBI3zm1ng3A+M0pMnd3O BlIF0vDh0luoxHJGiVszt7DAtXw4/IwJpIpNwFCi620XWIeIgJHEpaYdYEXMAneYJLomN7CA JIQFgiV2P20Gu4NFQFXieGsiSJhXwFbi370ZjBDb5CVWbzjADGJzCthJbJy7FmyzhMABDonp XQ9ZIYpcJE7P28AOYQtLvDq+BcqWkfi/cz4TREMzo8TDc2vZIZweRonLTTArrCXunPvFBnIF s4CmxPpd+hBhR4mVbd9YIIHEJ3HjrSBImBnInLRtOjNEmFeio00IolpNYtbxdXBrD164BFXi IdG8Nh0SPhMZJY7+ucA6gVF+FsKuBYyMqxjFU0uLc9NTiw3zUsv1ihNzi0vz0vWS83M3MQJT y+l/xz/tYJz76qPeIUYmDsZDjBIczEoivL/rL8cL8aYkVlalFuXHF5XmpBYfYpTmYFES5101 e028kEB6YklqdmpqQWoRTJaJg1OqgWlWvtMjkbtLrpctaahYc8+0SevFhoCKH9PFWJdGTD1/ SkhD25hvWwWHp39x/0cvo/Xt/Ikq8xav/zwlxFHXWeSj+/1d+1b6O738da3uloobX9CfJWH2 ss4+nz+mfmDSXB+Zu/f5t7M78y+WOP6+9sR/k4vezPdMq6TtIv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dfeQxKOR/8WZd+XW/mt SELN/X32rJvTpNZdCK2a0qX97M39zZuVn35pyFudPcN+adSbyFkNQlrf7idNL86Qe6ZSfD7R ZG7WRem3VjurLS2FPeefU8+p4rzPxb0orWONzjkhy5AMXqd1h2Ysirq3319gthJLcUaioRZz UXEiAFFjhGv+AgAA X-CMS-MailID: 20201214112450eucas1p1e7ad389bceaaf1082c9afdcb0733e9c0 X-Msg-Generator: CA X-RootMTR: 20201214112450eucas1p1e7ad389bceaaf1082c9afdcb0733e9c0 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201214112450eucas1p1e7ad389bceaaf1082c9afdcb0733e9c0 References: <20201214112437.18757-1-m.szyprowski@samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The driver skips hardware initialization if it is already configured by the earlier bootloader stage (BL30). Skip the initialization only if the hardware is really initialized and enabled. Signed-off-by: Marek Szyprowski Change-Id: I3e2e2d270ad3e7e7f38e2bc3ce2a924a47b164af --- drivers/adc/meson-saradc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 998cef24d88..ce7ae990ad0 100644 --- a/drivers/adc/meson-saradc.c +++ b/drivers/adc/meson-saradc.c @@ -512,8 +512,11 @@ static int meson_saradc_init(struct meson_saradc_priv *priv) * reading the temperature sensor. */ regmap_read(priv->regmap, MESON_SAR_ADC_REG3, ®val); - if (regval & MESON_SAR_ADC_REG3_BL30_INITIALIZED) - return 0; + if (regval & MESON_SAR_ADC_REG3_BL30_INITIALIZED) { + regmap_read(priv->regmap, MESON_SAR_ADC_REG3, ®val); + if (regval & MESON_SAR_ADC_REG3_ADC_EN) + return 0; + } meson_saradc_stop_sample_engine(priv); From patchwork Mon Dec 14 11:24:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 343491 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2911987jai; Mon, 14 Dec 2020 03:26:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5XCf0navJuvYxgBDL6PucuNHnsiOdH93pgL9E2b6q5Z0Grc9dG4bc7MAdbYMg3bH/Z8b8 X-Received: by 2002:a17:906:b096:: with SMTP id x22mr882882ejy.471.1607945168650; Mon, 14 Dec 2020 03:26:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607945168; cv=none; d=google.com; s=arc-20160816; b=a7F62Fil2bNFNDAnuBQ2tFT+ouyQK4O6W4fFj/DbhFmBxsk6EFjuglj8Ka0kQeXZkY kJyRmVTdRLV9djj2mRxHq/Z+JgoLOOTqAEjLSQgg4UVJPyBTaiVhJcIQzPiyftvud5ns FsFqBUHGP06vsLjAjQPrqZFHrH+467ice1WHt3st6/uYB3EeluPwnQs7tOUHP9GC9MqB SYN/83UxBWLB0Fdm4UxcFG/Bsis0eZdokWPwuGQaY62zAsNW2B1dkmZLeDneb6WeQRjb 2aygg3jfFWTQq9B1lr9UIZrILnGbMWLgvls7YO0MLvewn76nU+FJMajtYNiOgYSPZvsd a7fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=tt9bTK9Dr3R0toeu3fq55aabU8D9eXACSsnCgn5G89Y=; b=eed4AOhCOyUKBPmR6JHQ1WEZ13RFnQd1hwOAxGxPfuVif6NmukbJczk3oZeBCnq5nc Q3FBqCJAnxNzVDVts1Jsavsq5XEUMEYF0HugnqwN1wIggPGZAoch+O9CP6a5V5s2PvgI zP1ElR5mQ+9F4tEH6gUDMBZp9FYHmhE69dhRyOgfPnJsJ4OLzOCo7C5pC3TuvRs+t+qE uXVHvGrJHe/JPIDAj6Qbwm3Kp7453NnExUO9nBrpxIvK1a+oTSiLdXgK83FF4GkHBV9r muy8dK0YzzVMiLlkkDIyN3PFeAESN8qM3fBegJvdeg8Yzaq3kNq9z4bgFnpym0SHfm5n 3eJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=DP2vB5AQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id o10si9148416ejg.80.2020.12.14.03.26.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 03:26:08 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=DP2vB5AQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B55438283D; Mon, 14 Dec 2020 12:25:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="DP2vB5AQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3276D82820; Mon, 14 Dec 2020 12:25:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 242018280C for ; Mon, 14 Dec 2020 12:25:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201214112456euoutp01454358bdd71dac987067301f14c1446b~QkYvXi3EE0131301313euoutp01b for ; Mon, 14 Dec 2020 11:24:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201214112456euoutp01454358bdd71dac987067301f14c1446b~QkYvXi3EE0131301313euoutp01b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607945096; bh=tt9bTK9Dr3R0toeu3fq55aabU8D9eXACSsnCgn5G89Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DP2vB5AQ2D70ee9lclZ+5D9BB5FxFV5nfo639Jgm+VMK/zSsLCN6EY8nEx2pNpup0 wqWsNruQGitk4ERmc+PCPEvOCV0nWshbrgg0uArYjKE6/Qug87PbpxjCuFc0ktZ3jb Cd/cnS2dfiKKmjacK9nuI14tJy9wtE1oJpRMIzv8= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201214112451eucas1p1d652e1231c6f62614fdd02f9366612e7~QkYqfAkEc3050030500eucas1p1z; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 7B.C0.45488.38B47DF5; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201214112450eucas1p18b98479811b98d883196c72b0f6deebd~QkYp9ZsRn3050430504eucas1p1o; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201214112450eusmtrp2cff93c101f4b8e8fddefadb59a45c070~QkYp8tYwP0874808748eusmtrp24; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) X-AuditID: cbfec7f5-c5fff7000000b1b0-33-5fd74b83593c Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id AF.E8.16282.28B47DF5; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201214112450eusmtip1f84a10a77b6b4e9dc8fb2135891a3290~QkYpbGZGO1812918129eusmtip1c; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Marek Szyprowski , Neil Armstrong , Lukasz Majewski , Philippe Reynes , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH 4/6] button: add a simple ADC-based button driver Date: Mon, 14 Dec 2020 12:24:35 +0100 Message-Id: <20201214112437.18757-5-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201214112437.18757-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42LZduznOd1m7+vxBv0PpSw2zljPanHjVxur xfN3l5ks1h65y25xqC/aouOwssW3LdsYLSZN+MVm8XZvJ7vF4akfGB24PN7faGX3mN1wkcVj 3qwTLB4fPsZ5zO/8zuRx9s4ORo++LasYPTYuO8AcwBHFZZOSmpNZllqkb5fAlfF31TSWgilK Fe/ebmNtYHwg3cXIySEhYCKxYMsrti5GLg4hgRWMEhO7m9ghnC+MEnvWHmGBcD4zStxY28gK 03Kr/QELiC0ksJxRovlmOFzHjUPNTCAJNgFDia63XWwgtoiAkcSlph1gk5gF7jBJdE1uAOsW FnCUuPd3A1gRi4CqxIXPd8BsXgFbiTtP57NAbJOXWL3hADOIzSlgJ7Fx7lqwYyUEjnBI7Oi/ ywZR5CKx/vABqPOEJV4d38IOYctI/N85nwmioZlR4uG5tewQTg+jxOWmGYwQVdYSd879AprE AXSfpsT6XfogpgTQdRNmFEKYfBI33gqCFDMDmZO2TWeGCPNKdLQJQcxQk5h1fB3c1oMXLjFD 2B4SLf87oEE6kVFi99WZ7BMY5Wch7FrAyLiKUTy1tDg3PbXYOC+1XK84Mbe4NC9dLzk/dxMj ML2c/nf86w7GFa8+6h1iZOJgPMQowcGsJML7u/5yvBBvSmJlVWpRfnxRaU5q8SFGaQ4WJXHe XVvXxAsJpCeWpGanphakFsFkmTg4pRqYFldG+farztuiHd3xqdSPiVeaoZ+D0UnSv33limdN Z+QF3Pg+/b4TuZjx0cOpAs/8TmXtzth+W//ykV2JM5z95h/hbVrmFbF4ldzNW/Mn2C038sr9 2frx0bHkvZ99li2cc0b3z6dDy86nyEj9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vsq0K1d/3YhkLdxm5PPL2/ayXfWp3lm6MTYb7939uKu6 +NyJuavnXJXK3tCkGL/D/kF5vlfZm8vJH334Oeev770vd/b0bOcnATOEEuxtvL6ee27BXM9m ZG77xHaS9pQ59pm8b971h7btTe9eYVxm8Oh3iWd0n0TM9pcSv9qes15cJyldqXtViaU4I9FQ i7moOBEA979LTwADAAA= X-CMS-MailID: 20201214112450eucas1p18b98479811b98d883196c72b0f6deebd X-Msg-Generator: CA X-RootMTR: 20201214112450eucas1p18b98479811b98d883196c72b0f6deebd X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201214112450eucas1p18b98479811b98d883196c72b0f6deebd References: <20201214112437.18757-1-m.szyprowski@samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add a simple ADC-based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski Change-Id: I6da7101eff3ce53766d899f49f5839d728d52fb3 --- drivers/button/Kconfig | 8 +++ drivers/button/Makefile | 1 + drivers/button/button-adc.c | 117 ++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 drivers/button/button-adc.c -- 2.17.1 diff --git a/drivers/button/Kconfig b/drivers/button/Kconfig index 6b3ec7e55de..283367f2bd3 100644 --- a/drivers/button/Kconfig +++ b/drivers/button/Kconfig @@ -9,6 +9,14 @@ config BUTTON can provide access to board-specific buttons. Use of the device tree for configuration is encouraged. +config BUTTON_ADC + bool "Button adc" + depends on BUTTON + help + Enable support for buttons which are connected to ADC lines. The ADC + driver must use driver model. Buttons are configured using the device + tree. + config BUTTON_GPIO bool "Button gpio" depends on BUTTON diff --git a/drivers/button/Makefile b/drivers/button/Makefile index fcc10ebe8db..bbd18af1494 100644 --- a/drivers/button/Makefile +++ b/drivers/button/Makefile @@ -3,4 +3,5 @@ # Copyright (C) 2020 Philippe Reynes obj-$(CONFIG_BUTTON) += button-uclass.o +obj-$(CONFIG_BUTTON_ADC) += button-adc.o obj-$(CONFIG_BUTTON_GPIO) += button-gpio.o diff --git a/drivers/button/button-adc.c b/drivers/button/button-adc.c new file mode 100644 index 00000000000..086c676c02a --- /dev/null +++ b/drivers/button/button-adc.c @@ -0,0 +1,117 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2020 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * Author: Marek Szyprowski + */ + +#include +#include +#include +#include +#include +#include +#include + +struct button_adc_priv { + struct udevice *adc; + int channel; +}; + +static enum button_state_t button_adc_get_state(struct udevice *dev) +{ + struct button_adc_priv *priv = dev_get_priv(dev); + unsigned int val, mask; + int ret; + + ret = adc_start_channel(priv->adc, priv->channel); + if (ret) + return ret; + + ret = adc_channel_data(priv->adc, priv->channel, &val); + if (ret) + return ret; + + ret = adc_data_mask(priv->adc, &mask); + if (ret) + return ret; + + /* getting state is simplified a bit */ + if (ret == 0) + return (val < mask / 2) ? BUTTON_ON : BUTTON_OFF; + + return ret; +} + +static int button_adc_probe(struct udevice *dev) +{ + struct button_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct button_adc_priv *priv = dev_get_priv(dev); + struct ofnode_phandle_args args; + int ret; + + /* Ignore the top-level button node */ + if (!uc_plat->label) + return 0; + + ret = dev_read_phandle_with_args(dev->parent, "io-channels", + "#io-channel-cells", 0, 0, &args); + if (ret) + return ret; + + ret = uclass_get_device_by_name(UCLASS_ADC, ofnode_get_name(args.node), + &priv->adc); + if (ret) + return ret; + + priv->channel = args.args[0]; + + return ret; +} + +static int button_adc_bind(struct udevice *parent) +{ + struct udevice *dev; + ofnode node; + int ret; + + dev_for_each_subnode(node, parent) { + struct button_uc_plat *uc_plat; + const char *label; + + label = ofnode_read_string(node, "label"); + if (!label) { + debug("%s: node %s has no label\n", __func__, + ofnode_get_name(node)); + return -EINVAL; + } + ret = device_bind_driver_to_node(parent, "button_adc", + ofnode_get_name(node), + node, &dev); + if (ret) + return ret; + uc_plat = dev_get_uclass_platdata(dev); + uc_plat->label = label; + } + + return 0; +} + +static const struct button_ops button_adc_ops = { + .get_state = button_adc_get_state, +}; + +static const struct udevice_id button_adc_ids[] = { + { .compatible = "adc-keys" }, + { } +}; + +U_BOOT_DRIVER(button_adc) = { + .name = "button_adc", + .id = UCLASS_BUTTON, + .of_match = button_adc_ids, + .ops = &button_adc_ops, + .priv_auto_alloc_size = sizeof(struct button_adc_priv), + .bind = button_adc_bind, + .probe = button_adc_probe, +}; From patchwork Mon Dec 14 11:24:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 343487 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2911466jai; Mon, 14 Dec 2020 03:25:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNof5mj82jJ++HNXa2b57dJcO5N+kuXBQELF6AeZwJ4D9eGApAHK7QOciGuzVD6V1En4EL X-Received: by 2002:a17:907:2108:: with SMTP id qn8mr21825106ejb.127.1607945125662; Mon, 14 Dec 2020 03:25:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607945125; cv=none; d=google.com; s=arc-20160816; b=qVVrqqUvd+US/bongQEngyouK2aDkOG02lE1OG9hpgLL4CoiciVYCXsdQz0RBces9H LBlrvlKXurXhKXmfbeYuwQTXZkduU7OuIUp63IyVF1tcEuS4NXhhKF9KizPz6PcyjSQl IdEo5wOQ+yMZOnAnHL1CIHTIyGmJ93NQJS4xDgoieXVoez2l2fky2WXHI9oNAxAR0iHo y2xNrxR49Pd3waJy45wZoJL9lzGjLCYckVecs88UdfH5kzT8lf8bIKvsXH2MPB+AvI2G YEgmQNkISQ6URGQUkzUc/C2g5Wc1VxqPDmJPqoJQryVzshKlTtETHnn+NFGsEymrgbQO LBow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=R7mNm5ML53RHW9zx3apeGR+lOQFHGzETqEb+IveRrCE=; b=Oim+1w+6BPNv48zyi0kXggY1Kq/YyXea6VPtX6SoId8xvlAC209NPz3/XXlvVgJ/cd PBxR3FSLAMEgdleg3JxHPVWn5/UgRflTSfNRPzyXzWzZdjtxgqyy/a35kL8Hxtn5KUMh NbkYTKdgBTm7wx7ZXPUR6OysZIt3gWT/zLPT5daVYPO/561yHs2sXK5USKAamtp1dwy5 L5epAgLYmCGkDhgj8xzkqORFtMuqUQ5nSZgiLAzOD03BpTKdvgSVNN6xdCEkNmyN0npG x9HtRYygupGMXIo+owQ8jthxI3c4oEcTR0mMShsawMU44y12sISe+HccCkCIERQh1RKC nECw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ApqfuTFR; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id u2si8868125ejo.423.2020.12.14.03.25.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 03:25:25 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ApqfuTFR; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 84E408282B; Mon, 14 Dec 2020 12:25:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="ApqfuTFR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BA92882816; Mon, 14 Dec 2020 12:25:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D9BE58280D for ; Mon, 14 Dec 2020 12:25:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201214112452euoutp02af925c7fce52442ba0bfd04f2e0df293~QkYrYeWIn2120021200euoutp02b for ; Mon, 14 Dec 2020 11:24:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201214112452euoutp02af925c7fce52442ba0bfd04f2e0df293~QkYrYeWIn2120021200euoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607945092; bh=R7mNm5ML53RHW9zx3apeGR+lOQFHGzETqEb+IveRrCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ApqfuTFR1PaQmppypk8eD63YqcGAlU3tpRCoDPESQU0zsjxoLf/8+qbqma+TES84U aBmq47Ik80/Qj7cuiTlwWIoldUFkiZs284Tvld3m9oBBJZxoLYQVmLiwuA99xMoHCR JqagSMRz/5g3leQS/Q8kNTe7tQbdef2+FMkMHnos= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201214112452eucas1p1ba1547665e1d3dea4982b35ea4b3d87a~QkYq9qNja3050430504eucas1p1p; Mon, 14 Dec 2020 11:24:52 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id A2.82.44805.38B47DF5; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201214112451eucas1p2ace7794301c6791761fd130c158f3d08~QkYqnmX4e1087810878eucas1p2V; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201214112451eusmtrp2def4372ad2ef1e2b919c6782b4769024~QkYqm9gA30874808748eusmtrp26; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) X-AuditID: cbfec7f4-b4fff7000000af05-c5-5fd74b83efa7 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 11.F8.16282.38B47DF5; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201214112450eusmtip1639af7dc990c4e3e89249ac13ec2d32c~QkYp2oFQz2707027070eusmtip1S; Mon, 14 Dec 2020 11:24:50 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Marek Szyprowski , Neil Armstrong , Lukasz Majewski , Philippe Reynes , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH 5/6] cmd: button: store button state in the 'button' env Date: Mon, 14 Dec 2020 12:24:36 +0100 Message-Id: <20201214112437.18757-6-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201214112437.18757-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSe1BMYRztu/fu3rub5doyPjGaqRivXsaMS+RRuCONjOdgrMUtsVvZVV4z euixu5OUnaamRSZNsYl2NdvSGHRTQouNWtqIoYhK2hGZkd1u+O+c8zvnO7/5zUeg4tM8LyI2 7jCjiJPKfPhCzNTw0+J/KqJNEvTSFEIZCq/zKNtwJo/q7mtBqMr6Dpyqy9lBqVhf6nu1CVBn c4f5VO9tNU6x+V/BciHdb8vAaV3KM4y+UPQAo78O7KKL1UMI3Ww3AzqnWg9oQ9ldNIrYLlyy j5HFJjGKwNDdwv3ZrS/RhA7e0dLOHiQFPMc0QEBAcgHMKulHNUBIiMnLANamqwBHHAAOmN7x ODII4GtjI/I3YvlgRbhBOYDlqZ3Iv4jOkA5cLj4ZDDW9Gr4Le5LzoTXNjLlMKGlHoEabMtru QdKw4MrAKMbIGTDDfAF3YRG5FH6+w/K5Om9YUXUXdWEBGQoN5yv5rocgWU/A9DelOGcKh+pu 41jAA/Y0Vo/p0+DIzWKEC5wC8K2lEudINoAtaYWAc4VAu2XYmSac+82G128FcvIKqPtYNipD cjy09U50yagTnjUVoJwsgqpMMeeeCYsar/2rvffUinKYhq2d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YKDWUmE93f95Xgh3pTEyqrUovz4otKc1OJDjKZAd0xklhJN zgdGXF5JvKGZgamhiZmlgamlmbGSOK/JkTXxQgLpiSWp2ampBalFMH1MHJxSDUxymfse3Dyw XG3i6Ymb7v35VblU1OiNNlvOoxvcUSreK6bYcYs6PP1jxqH29VSRROvyDE6uRay2u0zZ57yZ /uBgwNdSx/KN0XcN/63/xHFK+vXDHY+j8ndbMnge2bu8cu4mf69FeldX3NnsO/f5l1Ah8e2F T/s11Mou878+t+XNrAXvzs+JExfyCvzFWRduLfXu1GmVCRVscvW2bB8jDv6RTZPS4Iz5oqRi WKcimTrD0uvDCpbLL+2efGzYp/rzFd+C8nWunsd01CaUrFm5c4GAYv/RkpearF6KweouF3fJ uy2rObd7Spjp5gP9nvLsnYXvHnh9OBBw5QA3+54Va1vS1b85WGUxT/Aqv+PC/7JNiaU4I9FQ i7moOBEAcuvPQwADAAA= X-CMS-MailID: 20201214112451eucas1p2ace7794301c6791761fd130c158f3d08 X-Msg-Generator: CA X-RootMTR: 20201214112451eucas1p2ace7794301c6791761fd130c158f3d08 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201214112451eucas1p2ace7794301c6791761fd130c158f3d08 References: <20201214112437.18757-1-m.szyprowski@samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Save examined button state in 'button' environment variable to enable checking button state in the scripts. Signed-off-by: Marek Szyprowski Change-Id: I78b539e1516573fcfea4401f75469291844daae4 --- cmd/button.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/cmd/button.c b/cmd/button.c index 64c5a8fa046..8da911068a4 100644 --- a/cmd/button.c +++ b/cmd/button.c @@ -23,8 +23,10 @@ static int show_button_state(struct udevice *dev) ret = button_get_state(dev); if (ret >= BUTTON_COUNT) ret = -EINVAL; - if (ret >= 0) + if (ret >= 0) { printf("%s\n", state_label[ret]); + env_set("button", state_label[ret]); + } return ret; } From patchwork Mon Dec 14 11:24:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 343488 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2911577jai; Mon, 14 Dec 2020 03:25:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+IsmnW6JBC5iX0yDeUCf9Z/pmr7z2W2jFxUXyplPG78ZjhIlQ7nc6ZZno4UrPVD2xWeJt X-Received: by 2002:a17:906:7784:: with SMTP id s4mr22185226ejm.93.1607945136160; Mon, 14 Dec 2020 03:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607945136; cv=none; d=google.com; s=arc-20160816; b=XNMLmfSUJKb2K1GYAytzfJEg7razrk81O2DZvwCYP3vtTUbALngKd8sZsflhsDtJC4 ZlBoeFjwDOo5c4pBGPATRMiEEdaONqtI/kylFIjG60pumRZa3WEckUe/KKh3UcaFszSM dhvyIiIyyJEuYnE/NgCwMq7xUp78GkiVcuYO5LQUzVqDjoZMbce4Sc+jlVSEFyzBuF1S 89PD5cZs+kd52mkoLE3xFcbpjTRbbRzFsbdHyQ0/Z8I4BZBkry7R3exFhdwt8oaoFYVe TIjHk94wpuvXHmMpGihjNfguNpx9gAHd4EeOoYuwrZ23bk9XD6yvoCXfGI6QRUqVtXhY VUhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=A9WjImsRKdoFjKRWlhDpsz9eyqtnsUDUVBr8f2Ofub4=; b=om3F3AZkEA4HNMr5C24y9yMMkm4pgqxNm/9LcxQBXjfoCs42NqutL7VtmrmRlYlLnj hNPjfJBnmf1cKj4uuIJrV4DeTnm+GMJHEYXbHBOv3Hb5zU0D39ooB57CwvsQtDhrX6tx rxUTTZHeciHq1yMQS/6e5GfrUnLf5EDHfqayMRhq3TYoaak4aROdcLlT8C8xAFqVs3ae eKBDXm6uIeq9JVnfvGiYjp9FxSrZ72I3kdDa2p5Dpkh1ViULwLb9ZIKtt9uzhaRhhUtr HAVtG/gJgSGUrrOwal67KxzaIG8QUGtibLo0f9bfi8x7CBOkf+sut82KOC96l0zOXk3c loBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=eSrDDT7f; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id k6si9339862ejq.297.2020.12.14.03.25.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 03:25:36 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=eSrDDT7f; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F17F882820; Mon, 14 Dec 2020 12:25:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.b="eSrDDT7f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6DFFF82825; Mon, 14 Dec 2020 12:25:10 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8EA788280E for ; Mon, 14 Dec 2020 12:25:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201214112453euoutp029769d21e6b6a6faa0946bf7e644cbb32~QkYsAMlLd2089520895euoutp02a for ; Mon, 14 Dec 2020 11:24:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201214112453euoutp029769d21e6b6a6faa0946bf7e644cbb32~QkYsAMlLd2089520895euoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607945093; bh=A9WjImsRKdoFjKRWlhDpsz9eyqtnsUDUVBr8f2Ofub4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eSrDDT7fiJhsmkHKEoOdZzbQjImorC03BjsCwedJPcI2dwkY/lsXHY3B88Q4exNvO amKFSSDtnlP373uALdh4G+aZ0iYs91Y15u+XNZWH3ePeC557VJhXudzCU5oltz5Uq0 f9CM6lZj8dIRYMdG4Eg/npInfGw2q0YW6XwiZG98= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201214112452eucas1p11fd13d339143a0813079f998b97a3063~QkYrgrHbH2050920509eucas1p1M; Mon, 14 Dec 2020 11:24:52 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id EC.C0.45488.48B47DF5; Mon, 14 Dec 2020 11:24:52 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201214112452eucas1p2ceb557dffa15ea073f922bf59afb8578~QkYrIPj431086610866eucas1p2N; Mon, 14 Dec 2020 11:24:52 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201214112452eusmtrp1307b9bdb217a24243b329e96f5be15e7~QkYrHeqz21608516085eusmtrp1o; Mon, 14 Dec 2020 11:24:52 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-38-5fd74b843928 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4A.9B.21957.48B47DF5; Mon, 14 Dec 2020 11:24:52 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201214112451eusmtip1180e7416b217cc32045844c7a8ea0cab~QkYqjVbre2725427254eusmtip1B; Mon, 14 Dec 2020 11:24:51 +0000 (GMT) From: Marek Szyprowski To: u-boot@lists.denx.de, u-boot-amlogic@groups.io Cc: Marek Szyprowski , Neil Armstrong , Lukasz Majewski , Philippe Reynes , Simon Glass , Heinrich Schuchardt , Jaehoon Chung , Bartlomiej Zolnierkiewicz Subject: [PATCH 6/6] configs: khadas-vim3: enable Function button support Date: Mon, 14 Dec 2020 12:24:37 +0100 Message-Id: <20201214112437.18757-7-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201214112437.18757-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupileLIzCtJLcpLzFFi42LZduzned0W7+vxBjvPKlhsnLGe1eLGrzZW i+fvLjNZrD1yl93iUF+0RcdhZYtvW7YxWkya8IvN4u3eTnaLw1M/MDpweby/0cruMbvhIovH vFknWDw+fIzzmN/5ncnj7J0djB59W1YxemxcdoA5gCOKyyYlNSezLLVI3y6BK+Ph4ZeMBUtY KybcOsfYwHiGpYuRk0NCwETi6sSTzCC2kMAKRolPF127GLmA7C+MEt83nWaBcD4zSly6vZoN puPbrn5miMRyRomLX4+zwrXc7rsKVsUmYCjR9bYLzBYRMJK41LQDbBSzwB0mia7JDWDLhQU8 JU5OnMYIYrMIqEr8+LgaKM7BwStgK7F8ihPENnmJ1RsOgN3HKWAnsXHuWjaQORICRzgk2lva mSCKXCRO9c+AsoUlXh3fwg5hy0icntzDAtHQzCjx8Nxadginh1HictMMRogqa4k7536xgWxm FtCUWL9LHyLsKLHz0hd2kLCEAJ/EjbeCIGFmIHPStunMEGFeiY42IYhqNYlZx9fBrT144RIz hO0h8WnGOlZI+E5klGhbnTiBUX4Wwq4FjIyrGMVTS4tz01OLjfNSy/WKE3OLS/PS9ZLzczcx ApPL6X/Hv+5gXPHqo94hRiYOxkOMEhzMSiK8v+svxwvxpiRWVqUW5ccXleakFh9ilOZgURLn 3bV1TbyQQHpiSWp2ampBahFMlomDU6qBacuqM/wHq/pONOUU/y/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zEG57bvKQ6eOmPblGBhY/mt5XVgSf 2JEmk+okN++zt8fW1qDYhy6Kr+QWhzQWnJgl1FBvwL9l4n3V7pNKak8VY+6XFL5zvje1vXn+ om6+c/Hvdj+/bWn/RuXms9a+ExLqHz9HMtcs2BG1Y3vSvx+nZv+L+BDQf44t4Jqn2Y5nNx/Z vP6l/VPefbN44qkfkif+xXw38K89do7v8Vbn1Anz06bwN5gV5Xw/99duh7zW2ychkxfsKZ8f ftff2ST3xtsVj1QrFr4Wt31v0bhfvvrpSps5F2JfWms+sb1WGMz/JOSRaNqtY148AUosxRmJ hlrMRcWJALE0KML/AgAA X-CMS-MailID: 20201214112452eucas1p2ceb557dffa15ea073f922bf59afb8578 X-Msg-Generator: CA X-RootMTR: 20201214112452eucas1p2ceb557dffa15ea073f922bf59afb8578 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201214112452eucas1p2ceb557dffa15ea073f922bf59afb8578 References: <20201214112437.18757-1-m.szyprowski@samsung.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Add options required to check the 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 9d7ba72d440..bc174305692 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -29,6 +29,10 @@ CONFIG_CMD_REGULATOR=y CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_ADC=y +CONFIG_SARADC_MESON=y +CONFIG_BUTTON=y +CONFIG_BUTTON_ADC=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MESON=y CONFIG_DM_MMC=y