From patchwork Wed Dec 16 07:51:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344497 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp163725ejs; Tue, 15 Dec 2020 23:52:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJychHgCzOG6jywW4VQtTYd8Nj97pGDHLGFCuXDsHgI4FdqFyBELAJJEk9PNC2cwzvBoL3Ws X-Received: by 2002:a05:6402:22ea:: with SMTP id dn10mr32312460edb.67.1608105142345; Tue, 15 Dec 2020 23:52:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608105142; cv=none; d=google.com; s=arc-20160816; b=cJwjWFaU5PigA8R+HljejIwqrzbqt0fkTIH15qV8gN5Lyq1qYV6rmbhBify6FL7ztJ e+ZJasD7FEw2wf6BaksuHxhWlGl9VmJ6zDEXXAnJPR0A7IidDLHl/5nkVBIr2wlh2OGE 9fXA8/E1e66yP8XGChaDh0hD4B0TIpvQZvbCY+GjlVtKu1zq/Ij0Z7sJuu4IHoAJCaJ6 QSiDpuf+3FfL3OVikqBB4OEUtQQDbRWff2gmTjfA6rEJsymrVwKNotImdnnyhBSKxblE IbCkr+atmT6ARwxxbyVfAZjNNn/76wNAsNpdBzAvmw9cSV59lhyBLvuOguZCQZmcwNdP e7Pw== 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=tqiyrcofRXDD8+Jvxf8Hvi5HLF9twruT3mGu/SaynC8=; b=cKr3sgxVxdcxOroXSQ33c08w+iw7TE0YJ/NemtGJLaG5wPM3Iop3dfqVqPkPbAdLyC IPij8hWFmn1bG2yH6YiC1PbIMlfwV291GSdQthwxAMBGLQcn2UPfc/STjFkydQ33WH+/ JakSSzG7u9DADJnjlLqNiza1dA4NiCuuGtdE6xSTrZ0PqYhuExXuzgqWLyjkoUgoNakM Fh2lTNv+eS+24fbAbEVFYnxWexxM830XJAbFJxX/31EsA6PUkUPgLoUNoDLZq6KkLQS0 3V89N7qANt+9FUJT4WmkBRNEy2i3Iwy+TM2BfHmCnSRR7IgfILBJHCQEt55esbdCKsMF I6Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Se4pgzbs; 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 y15si476104ejp.228.2020.12.15.23.52.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 23:52:22 -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=Se4pgzbs; 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 AD4E682A48; Wed, 16 Dec 2020 08:52: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="Se4pgzbs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EC20382A4B; Wed, 16 Dec 2020 08:52:18 +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 BEE26828C0 for ; Wed, 16 Dec 2020 08:52:15 +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 20201216075205euoutp02240e7e209fd8fce8b8768f82244d10b4~RIxdWY2q82686326863euoutp021 for ; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201216075205euoutp02240e7e209fd8fce8b8768f82244d10b4~RIxdWY2q82686326863euoutp021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608105125; bh=tqiyrcofRXDD8+Jvxf8Hvi5HLF9twruT3mGu/SaynC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Se4pgzbsmuGBPpmcb1FX/mRnv14VezkWxdPAD4TKm1hfrxr58X894KLNMFynn0PS/ ZAb8cXrVXrm2hIixsnrOw8nOVWmWPlk65tmt987AUC+sU1Y0bbs2vF221GJcnC2ksT Wbyv7Z2BqNPF9qfFOGEerCmjQ4Vnir3B+xyrX3iU= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201216075204eucas1p2d21d5fc6b533e10eb3e5136b922d4ab2~RIxc72zYW0743307433eucas1p2S; Wed, 16 Dec 2020 07:52:04 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 8F.01.27958.4ACB9DF5; Wed, 16 Dec 2020 07:52:04 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201216075204eucas1p253957263c68d1091d6cd4f83872f35ba~RIxcn5VHs1128511285eucas1p2H; Wed, 16 Dec 2020 07:52:04 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201216075204eusmtrp2981b336317172195c2a2249bb09ded45~RIxcnOkUp0040100401eusmtrp2y; Wed, 16 Dec 2020 07:52:04 +0000 (GMT) X-AuditID: cbfec7f2-efdff70000006d36-52-5fd9bca4fc76 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A0.5A.16282.4ACB9DF5; Wed, 16 Dec 2020 07:52:04 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201216075203eusmtip204e833ad2557c506d812ee2b0a739c4d~RIxcGGEqt1788017880eusmtip26; Wed, 16 Dec 2020 07:52:03 +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 v3 1/6] clk: meson: add minimal driver for g12a-ao clocks Date: Wed, 16 Dec 2020 08:51:53 +0100 Message-Id: <20201216075158.16458-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216075158.16458-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSaUwTURSF82am7bRaHQqRBxoxNWjQCKIkjIgNuMQxwaj8IdFoqTCySIG0 oOCWCmqgQawo0lCVJVDZF6kV3C1LcaECTbUScI3iAkjBSEEUKYP677vn3nPPzcvDUUEWyx2P iU+iZfGSOCGbh+nbxk2rSu68FK9ufbSErFfXskjrxBkW2T9kRsjqlj4OacjeQ2Y0LyV/6PSA zFFNsMnBu5kcsjl3GATxqG/W0xxKo+jCqKv57Rg1bNtHFWSOIVRHbyOgsnUVgKrXPkB34rt5 gZF0XMwhWuYjCudFt6aNYIk9C1Lquz+zFCDdWQm4OCT8YNXtHLYS8HABUQagNq+cwxTfAbQP 1GBMMQrg2KQN+WvpaWjiOFhAXAOw5GXQP8eApmumwSZ8oXJQyXawC7EGdqc1zmxCiV4EKi8o MEfDmdgGzfc+sRyMEZ5QbaubMfCJDfCjoQQwaR6wsu4B6mAuIYLNegXiWASJFhyWFf/CmKHN MDfPOsvO8ItRx2F4EZxqKpg1pAP41lTNYYosAM1p6tmI9bDXNDEdjU/f5wVrb/kwcjA8ZSmc kSExD1oHnRwyOo05+jyUkfkw44yAmV4G8401/2IfdnajDFMwM9c0+4znAXxzfwxTAY/8/2GF AFQAVzpZLo2i5b7x9GFvuUQqT46P8o5IkF4H0x/myW/jSCO48sXmbQAIDgwA4qjQhT85aBUL +JGS1CO0LEEsS46j5QawEMeErvwKTZVYQERJkuiDNJ1Iy/52EZzrrkCQzpO7WFPauWGqZ3NP c/wtN4JpN43Ev20XCx15fydm2MWytqsk4F5BONkfG2dPeTJF0iuPrkVDGg4Ya3u3l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KblNQFnBaHuNzK4tDQpLW3RfbZv6JFRz6nKBq3U7joeW7/CX55AwN/orbHrQ8ULyIcaf zsx79mhW7Dj+7db6yfPO5R3zkOiu4XtVMKtD/MNyjreqqemfnf4qJ2VsMMyPcBUt0+b6f0HQ t7PX4eWUxFK3Qoae/Scap1k1/5PyWsUbvfXNtw860defZjX4PDiq/OWwTqbbOm0lluKMREMt 5qLiRACmIKHGAAMAAA== X-CMS-MailID: 20201216075204eucas1p253957263c68d1091d6cd4f83872f35ba X-Msg-Generator: CA X-RootMTR: 20201216075204eucas1p253957263c68d1091d6cd4f83872f35ba X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201216075204eucas1p253957263c68d1091d6cd4f83872f35ba References: <20201216075158.16458-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 Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- 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 diff --git a/drivers/clk/meson/Makefile b/drivers/clk/meson/Makefile index c873d6976f..7204383e17 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 0000000000..7a0abea77c --- /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 Wed Dec 16 07:51:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344498 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp163804ejs; Tue, 15 Dec 2020 23:52:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbluuTHAMpn/VHzt90QipbYHoWEWVTf/w0vQQEYBJDG4gQ7ZlE9h5ayM0TlYJ/PSKUm/i3 X-Received: by 2002:aa7:c492:: with SMTP id m18mr4505068edq.236.1608105152250; Tue, 15 Dec 2020 23:52:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608105152; cv=none; d=google.com; s=arc-20160816; b=P9r7JPm4XBhP/vWx0n47THiiJW/d+DOGqm8fOfJxlXjAJTVj8oMQKFYgpqJ6FZTXud UtB1Xbg+zWqaW1LHNu212bVF7HBBM95+itWfW/uYyWvDG2L9L+Dro0XJrxPWYmAY5TkN O77ypTexpFJn5EIMlxeLF+dE2EI9/tA23PxiMO10awMVlX9LHhdeNnEvJnoX3gSoHqhC tj723319goSdtHXgBN6kHk6LvVXmnmX6u6PDz86WcT820HnsLSvp123QzdCWm+6LBvac tR0w1kl3VFDwVFZ6ADla6RIOZs2nVuGE/I6/3wWllfH0z60RcNbtqnZrhb15tjSkJoZ/ wQVg== 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=knAMYuM5Fv2FwCCrJdg7R7ZZOjjU0BpAeAqjZRDnCJ4=; b=dlYxad8vjr2iQ9h9AnScaofpZPrOekDVzbcWKCHCP1e9zeU7q1NvmQPV1LlHcs2rOI vEeo2RHptrfhOqwJt7onpNCswERuWkpcCJoz+75PVuea6R+rMf5miOMlDISxeUukcFXh TdEITCtezrFyd+eaxoy3Any9owT9YCEEGBLJbNGe8yEEwFzA2aXhAOhKvXBfsMQIUbbI /KGcC+VHcgor5fnoRZ+h5nQoFVqvCM86oVpe+BK5VA/iNO9DguGj9csTzx7nS4GkFNu3 A+k7Yfp1WybwOfQTx+nTTuFonJC/JxrV7NNXEXGhsi8P2nsX5SwiArlyyI7ExeUPwh5q RfCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=BsKbcrFj; 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 t21si2071190eds.390.2020.12.15.23.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 23:52:32 -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=BsKbcrFj; 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 CB29782A52; Wed, 16 Dec 2020 08:52:23 +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="BsKbcrFj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9166182A48; Wed, 16 Dec 2020 08:52:19 +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 C665E82907 for ; Wed, 16 Dec 2020 08:52: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=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201216075206euoutp026a4f487c0b0c1e430a7f11393f979adf~RIxel5G-N2686326863euoutp022 for ; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201216075206euoutp026a4f487c0b0c1e430a7f11393f979adf~RIxel5G-N2686326863euoutp022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608105126; bh=knAMYuM5Fv2FwCCrJdg7R7ZZOjjU0BpAeAqjZRDnCJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BsKbcrFjm7gjfYP7F3B3K+mQ7holmGOjGja+T+HabVliStlnmPJReh+asbz9cuvj1 AwLx/uiWbENMYPLjaWYSBjdxTO5PT+nMD9XOjRMijvExVcLa4AV8lW6bctZn0wC2Ic ADqEFbL5KjBofaluLFfW5xXVGwhae16H8PIA6+Ew= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201216075206eucas1p115ad299904c1b0088461e872ed7b2f10~RIxeSL4ra0891808918eucas1p1u; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 5C.5B.45488.5ACB9DF5; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201216075205eucas1p2043cffb1d821e8a367522c3bc4313e97~RIxd05EHV0926809268eucas1p2H; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201216075204eusmtrp1d4a3244d0d8fa471f4959c8c9f9c853e~RIxdDM12q1371913719eusmtrp1B; Wed, 16 Dec 2020 07:52:04 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-5e-5fd9bca5265d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 85.9C.21957.4ACB9DF5; Wed, 16 Dec 2020 07:52:04 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201216075204eusmtip2de6ac2b36edc782c0faaec815270780d~RIxch-EPr1905519055eusmtip2T; Wed, 16 Dec 2020 07:52:04 +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 v3 2/6] adc: meson-saradc: add G12A variant Date: Wed, 16 Dec 2020 08:51:54 +0100 Message-Id: <20201216075158.16458-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216075158.16458-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42LZduzned2le27GG2y9b2OxccZ6Vosbv9pY LZ6/u8xksfbIXXaLQ33RFh2HlS2+bdnGaDFpwi82i7d7O9ktDk/9wOjA5fH+Riu7x+yGiywe 82adYPH48DHOY37ndyaPs3d2MHr0bVnF6LFx2QHmAI4oLpuU1JzMstQifbsErozXz9+wF9xh q1jwvImtgfEKaxcjJ4eEgInEocuLmboYuTiEBFYwSiz59gHK+cIo8Xn9KSjnM6PExUnzWGBa vjS9YYZILGeUeNv1FqGl+fAhZpAqNgFDia63XWwgtoiAkcSlph0sIEXMAneYJLomN4CNEhaw lmi7+hesgUVAVeLR2f9gV/EK2Eo8fPoGap28xOoNB8BqOAXsJA5vawDbJiFwhEPi7IsLjBBF LhKz+trYIWxhiVfHt0DZMhKnJ/ewQDQ0M0o8PLeWHcLpYZS43DQDqtta4s65X0C3cgDdpymx fpc+iCkh4CjRdT4FwuSTuPFWEKSYGcictG06M0SYV6KjTQhihprErOPr4LYevHCJGcL2kHi3 8w0LJIAmMkrMvXKGfQKj/CyEXQsYGVcxiqeWFuempxYb56WW6xUn5haX5qXrJefnbmIEJpjT /45/3cG44tVHvUOMTByMhxglOJiVRHj/vL0RL8SbklhZlVqUH19UmpNafIhRmoNFSZx319Y1 8UIC6YklqdmpqQWpRTBZJg5OqQYmE+eyVqOvD280nd3FesEqs8MufoJ6iz1n/Ns51qna4aWc tvO6gpLKYoMLdV599HdW1nTjU01JZrpq2TD1lNKmb769c659e3jsDsPNeVZxickGJnuf7F9Q WbeE1Vkjh7/pEXNf6P3K/UxvWkryUuaFR2wN+V/04v/BTbM41/u/f7Rqlm1tULR8+rTTZ6w8 hEq+O7MxLezJsb5f9k++RKRRXq5X9ajM1S1Pt0dOZfOZ/M3wpvkWVQ7utPVOzrH2+l+79us0 uYV6N/HceCWS3utscJItgXv/raWl/zfc9r8/ie1EM9/R7k2ansumzpOsO9pQM3+uvr9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AAMAAA== X-CMS-MailID: 20201216075205eucas1p2043cffb1d821e8a367522c3bc4313e97 X-Msg-Generator: CA X-RootMTR: 20201216075205eucas1p2043cffb1d821e8a367522c3bc4313e97 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201216075205eucas1p2043cffb1d821e8a367522c3bc4313e97 References: <20201216075158.16458-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 Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/adc/meson-saradc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 72b0cc4e5b..998cef24d8 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 Wed Dec 16 07:51:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344499 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp163874ejs; Tue, 15 Dec 2020 23:52:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlgbNdinrjYx4qj5KHKBmQr+P3h/REvB8W4cwFFk0YQdJEFLIzUBFQ8Vfo2+3o9FcU8o/T X-Received: by 2002:a17:906:890:: with SMTP id n16mr14282777eje.463.1608105162679; Tue, 15 Dec 2020 23:52:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608105162; cv=none; d=google.com; s=arc-20160816; b=MaiFgnmhoVSPQzbl1AyXj0VnG3T/HBJ4XKijdZ1fR51Ir4RpQcrImnIAjFqDVmhFgw uWbzJYJZj33o6NqFnxv7WE47gT3/rWgt5MQF8Yo1t40w2jjcsPB0A48SG8H8oePFmSVA Ke5xaNog9+a1nUMKZE72zY5ln7CZrzSAzd98yGjiqStumBAgLry3LUP93Jm2AJ8QK6Ll 3PHkfdlK7VmIe1FTNuaWhDN32J1NksfEHZF+EV6xSgt65Q3IxWesg22G3DFfF61InxCO DDRXpQX1H5xAqZYlkKTvXVxR/jBZAJXS8jIoOICHsLdO++KsFalDJdItlKbFNjNihhtZ FHwA== 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=niKH6BNL1ADCXiwc4ADswQfLUZeqREE5EgoAsfjsh+8=; b=q1f82uSDpbvsq+QPpFam6HpWngikaYb9BFoSSt10WWYtIaphs1jD14Bq0c+39WTdn2 2GRqBXdw/zl9z/Zs2uPviAC9FEumjYCBXPBjvi3K+7hapAR+IaNx1HRcDygTwMjW9+WL GJpU0nESDunVgX3da90tMley4R8uEJb6tuagNHO3qMXL1L9UE8fDGtpiQeiGTt4UBbOg 5+tim7bvXGjWcCqUX/eWcLQY4JypBHmljKLyUz1ckFdfvMVETev8MO5azILVWhqtQVxM ddxyEDXgngGhJfn8+lxWOwOGdCZZttM0ekKYVSAl0NHp/KrYbQzc0nbc/8EXE2bdjP2F 5K8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VAUdGGmb; 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 dm6si538527ejc.159.2020.12.15.23.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 23:52:42 -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=VAUdGGmb; 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 1A95E82A63; Wed, 16 Dec 2020 08:52:26 +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="VAUdGGmb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BCB2082A45; Wed, 16 Dec 2020 08:52:21 +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 0C2C182A45 for ; Wed, 16 Dec 2020 08:52:17 +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 20201216075206euoutp02a44c08452488e1ebf9d1e6c2d8d2c9af~RIxev1oGB2646526465euoutp02O for ; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201216075206euoutp02a44c08452488e1ebf9d1e6c2d8d2c9af~RIxev1oGB2646526465euoutp02O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608105126; bh=niKH6BNL1ADCXiwc4ADswQfLUZeqREE5EgoAsfjsh+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VAUdGGmbARHLCI1wxMWw2VNMxkZskTbPSzpiU+9oz6f87v12xb1gBZWckdNR89Pph uPgFdSiB32fY/b8MysbU5e0mDAnGDZ1U/Ob1RLjOUaajv/xg+WyQpo2m2zu59dDzHu 19/InrgT4rreaRgIbR91JAO1wytJbpLh4EmRTGCw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201216075206eucas1p22d10b85b2cd90bd3571738b53926d84e~RIxeVx60P0937409374eucas1p21; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 50.11.27958.6ACB9DF5; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201216075205eucas1p1d1c5e19ec9e1cdd2867daddee81eb28e~RIxdxBzKx1281112811eucas1p1B; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201216075205eusmtrp2c2c899aa08cf2fac4e7f7f63ac9d119e~RIxdfEipf0040100401eusmtrp22; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-55-5fd9bca67692 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 66.9C.21957.5ACB9DF5; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201216075204eusmtip243ff9ad9d9a5cbc41e31629c854721e3~RIxc-35tb1697116971eusmtip2F; Wed, 16 Dec 2020 07:52:04 +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 v3 3/6] adc: meson-saradc: skip hardware init only if ADC is enabled Date: Wed, 16 Dec 2020 08:51:55 +0100 Message-Id: <20201216075158.16458-4-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216075158.16458-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupileLIzCtJLcpLzFFi42LZduzned1le27GG9y+wWyxccZ6Vosbv9pY LZ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ator: CA X-RootMTR: 20201216075205eucas1p1d1c5e19ec9e1cdd2867daddee81eb28e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201216075205eucas1p1d1c5e19ec9e1cdd2867daddee81eb28e References: <20201216075158.16458-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 Reviewed-by: Neil Armstrong Tested-by: Jaehoon Chung Reviewed-by: Jaehoon Chung --- drivers/adc/meson-saradc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 998cef24d8..ce7ae990ad 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 Wed Dec 16 07:51:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344500 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp163941ejs; Tue, 15 Dec 2020 23:52:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwccOU6TvseINSfcur7HwHX4bXRTwELOvwl8+qDP97RnFMHk8KedJl8GG0c9OR/57Xv09J/ X-Received: by 2002:a05:6402:30ac:: with SMTP id df12mr33895029edb.175.1608105173017; Tue, 15 Dec 2020 23:52:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608105173; cv=none; d=google.com; s=arc-20160816; b=nLSsGLvI/t4sCHDQv6LL9k6B4VV8JLFBCSJQ+Dol0j4nldsReQcG6rwlyDlZsGV4W5 Nhf7bKTQC84dAzaSmcxm3VCOLsR72jAwf+6WOsyJ8ZfDqKzhS6ZBrEaUCDiC6by0DMfQ OMgHMULHJ6PLi150sTPWIrmXzLWp1DS+LWx3U+UvOjQq4C6EtDoLS+WsLIG0U5lKGxFo vPYII22IaJ0Y48CSsE3Of7S6yjYLeSeAJcpLlAMRdm013JpON3xJBXWkNMOm+GhYgAki myIasIV5EH9QZKj4wEGkB/VfllX4Q0Gd/zbyix6tvhQ5Jieifv2sBdOiM3Yfz5+AR9J2 2/LA== 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=gjXQ1LSUIoC9r/p9kpzsq/9uKmzmzHDc8vSPPzXpUDo=; b=CBBiAW6kZMEVsWM9OS4hA+BwKkBR+gtuMAjRT6qLlX1IanrGWwAzsgq6LTXyHjwJ4t 3/ywXecZTal13WW3IZPhmagI4utry6uFl8LFzBjp7h20jUL3ada0x+mbDQl1IEpnQlxN 2kN4K99yYLeCmaP4zFS2oN/O88K+t/b/B/21lOh2cuGTI0LblTzCcUHZCNwFTpXBeSpB l2J715HeS/HKZLoUvYhnH2FpJGk1jDl856hyrpkBUshb0wnOuEBnjlSOk8Loo7DnHHdg ovbat+eUtvXIN3cLIN1kLyU8D+FrcpRgTK/mRvElNxUrDH2GW4ZM7eDIpu+pLLcUNVQv IraQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Gd8twKJ5; 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 j5si465642ejb.653.2020.12.15.23.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 23:52:53 -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=Gd8twKJ5; 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 CA8CA82A64; Wed, 16 Dec 2020 08:52:28 +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="Gd8twKJ5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1F43382A52; Wed, 16 Dec 2020 08:52:22 +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 2A4B082A46 for ; Wed, 16 Dec 2020 08:52:17 +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 20201216075206euoutp0274505dd18dec1830ebb177ca6311985e~RIxe8Ewf92686326863euoutp024 for ; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201216075206euoutp0274505dd18dec1830ebb177ca6311985e~RIxe8Ewf92686326863euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608105126; bh=gjXQ1LSUIoC9r/p9kpzsq/9uKmzmzHDc8vSPPzXpUDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gd8twKJ5/s9pSAxrSjiUCw+IQgkUbDfXqZZrFOswKjf9Dc3hSTYA52AjkcG/tTXoV MkJO1UC7dzRQWhjo6oAGGBGBneR1cw+XOIKlHcg0tP5TTyC7qhsmK2TK2wxJfwbH/y hzMoh/I0pQisMARgZfYjpn/CaFJWcZHoi6o87GZw= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201216075206eucas1p24ac8966a1c13ee54c15368522783d327~RIxeaRvDx1127211272eucas1p2N; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 3D.5B.45488.6ACB9DF5; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201216075205eucas1p2a5f90911b5f213f56dca1709eb71843a~RIxeBl_G31128511285eucas1p2J; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201216075205eusmtrp252b2638cbab048f121f25c09823266d2~RIxeA8Gyf0040100401eusmtrp24; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) X-AuditID: cbfec7f5-c5fff7000000b1b0-61-5fd9bca69d08 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 32.5A.16282.5ACB9DF5; Wed, 16 Dec 2020 07:52:05 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201216075205eusmtip2fa6b2b1349c161358e2b1c503d3dc485~RIxdbNQez1430914309eusmtip2w; Wed, 16 Dec 2020 07:52:05 +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 v3 4/6] configs: khadas-vim3: enable ADC device support Date: Wed, 16 Dec 2020 08:51:56 +0100 Message-Id: <20201216075158.16458-5-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216075158.16458-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmleLIzCtJLcpLzFFi42LZduznOd1le27GG3zZyGmxccZ6Vos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A X-RootMTR: 20201216075205eucas1p2a5f90911b5f213f56dca1709eb71843a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201216075205eucas1p2a5f90911b5f213f56dca1709eb71843a References: <20201216075158.16458-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 Analog to Digital Converter device (Meson SARADC) will be used for probing 'Function' button state. Signed-off-by: Marek Szyprowski --- configs/khadas-vim3_defconfig | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 9d7ba72d44..5d16652fd6 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -29,6 +29,8 @@ 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_DM_I2C=y CONFIG_SYS_I2C_MESON=y CONFIG_DM_MMC=y From patchwork Wed Dec 16 07:51:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344503 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp164128ejs; Tue, 15 Dec 2020 23:53:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQvmO9yzUdKz37woKhz9i+UzPuVotbeHIxH65m4wvtcAgk0DwRfD0GcqaZAfI/XCemOm05 X-Received: by 2002:a17:906:eb5b:: with SMTP id mc27mr7909190ejb.163.1608105204091; Tue, 15 Dec 2020 23:53:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608105204; cv=none; d=google.com; s=arc-20160816; b=P9UHXnNAas3z8eZBPW4aH4VQZAU4BU19C/FFwHpPkbswXun7Hz9GgTs9pykg7sXaYE zm53ifHaX/yBOSi7/PlY17dD3ij5DXS/wxdKHV8WVQPt/DwshXmjo9YIRjs3GaNrzZMq ZI0HcvJQqlAsqbVZGRd4cZFjFJtjmgVGPSYsk+4DdsU0gFjDmRUQAXu3k+LRrl31wK0i 4D4+EgHndNHFfkilTrwtq+/QJLChAY9ys1pc9aNoTMlVB7haJQ8P69yxL/v8/6Q6NfWz ZWpxL4+TR4Wv/a0232PKPf+M4UKw2He11yYH3Xng+/7qbbJOGUyMrk/H6n5JRCfh/cdl nxjg== 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=pHBtryC0Ld+lVOexE/L2KV+9JDID/+FVmOF7eZus5jw=; b=UMZfq1T1Z+jl5OZj2OXrBpSE4JiiECVzvLt1Ngb1MXD6aLxs/XSuxsYwJ0sR2fH211 kB4csFdSUBYzqUzPFU29PnMOjyXTaRb2px0OtxnDisbl3UlnJxb40z1l9Viz2pw3DU84 1QdsLlYioJOBCw7kUzx92PWY22ar3NHitRKJBX2p2u4pI9HaLCbBWN4QbIYUYjbb0sKX zXzQJZE9g6e+Mt+UypNeJWAjmf5yMoajtMfB/eVLfMN+TTh62mcF9fWaR+dBIVahQ6LA R03heLy7wxBy8Cu0c5qrs7QsjSszpX4a/GRrd6AtrKE1sQcYn3WUEHuS90C0yWpGAm3Q MDZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=tgcuAUXq; 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 c3si2158850eds.266.2020.12.15.23.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 23:53:24 -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=tgcuAUXq; 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 8095D82A78; Wed, 16 Dec 2020 08:52:36 +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="tgcuAUXq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EEA5682A6E; Wed, 16 Dec 2020 08:52:28 +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 74FF182A50 for ; Wed, 16 Dec 2020 08:52:23 +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 20201216075213euoutp014e750751e57c0dae4a79353d93520877~RIxk0RUZP2594025940euoutp01j for ; Wed, 16 Dec 2020 07:52:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201216075213euoutp014e750751e57c0dae4a79353d93520877~RIxk0RUZP2594025940euoutp01j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608105133; bh=pHBtryC0Ld+lVOexE/L2KV+9JDID/+FVmOF7eZus5jw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tgcuAUXqksGxWPtK0S5j9bKu8cjVrJ6bykVrBu18lMhYGzjmzLdtCCrXC++CjFkOv S6hJ6deHk0mV1+nB3p4cUADOzwtx/43lU3BxyST2uOe9PINdNWFC3jmAWIQDkMbLQE GdhtrXcFPz3vL41ocn9zVN1F3NCw1jEx6c6taR3E= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201216075206eucas1p2a6c762f8cb2a16e8a8b476933a053f98~RIxezWdmb1128511285eucas1p2K; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 3A.BB.44805.6ACB9DF5; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201216075206eucas1p18bb5415110b6f1dfcbf96728061d7eb9~RIxeZlPJY0401404014eucas1p1F; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20201216075206eusmtrp2b2c4171df69bbb79b920595e4f3a0c58~RIxeY5hr60040100401eusmtrp26; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) X-AuditID: cbfec7f4-b37ff7000000af05-8e-5fd9bca68404 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 13.5A.16282.6ACB9DF5; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201216075205eusmtip2c2bb935c9668ca17ac906511593cb619~RIxd5BDDz1788017880eusmtip28; Wed, 16 Dec 2020 07:52:05 +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 v3 5/6] button: add a simple ADC-based button driver Date: Wed, 16 Dec 2020 08:51:57 +0100 Message-Id: <20201216075158.16458-6-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216075158.16458-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSe0hTYRztu/e63Y0mtxn5zQxhmvbyWdSNciT5x80gQyLByLnyYpLO2DSz sG6Wr2m1FLXMVAyd+MyaY5VK6Zo9VyrlbFsPpAxrPmoVrYc5r9V/55zf+X3n8OPDUWGxmxee LE+nFXJZipjDx3TG76bAhq4RaYjzli/ZcaHdjTQ789zIsYkhhGw12Lhk79k9ZEGfL/lVqwNk idrJIe3dhVyyr2wKbOFTk+ZcLnWJGcCo6sp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Z+/sYPTo27KK0WPjsgPMARxRejZF+aUlqQoZ+cUltkrRhhZGeoaW FnpGJpZ6hsbmsVZGpkr6djYpqTmZZalF+nYJehmnv/xhLpigVHF+5zqmBsbr0l2MnBwSAiYS T1/dZuti5OIQEljKKLHu+ARmiISMxMlpDawQtrDEn2tdUEWfGCXaP14FK2ITMJToeguS4OQQ AZp0susSK0gRs8AjJomnXc3sIAlhAReJ9tUNQA0cHCwCqhIT3tiAhHkFbCUWnbnBBrFAXmL1 hgNgMzkF7CQOb2tgArGFgGr6rs5jmcDIt4CRYRWjSGppcW56brGRXnFibnFpXrpecn7uJkZg sG879nPLDsaVrz7qHWJk4mA8xCjBwawkwvvn7Y14Id6UxMqq1KL8+KLSnNTiQ4ymQGdMZJYS Tc4HxlteSbyhmYGpoYmZpYGppZmxkjivyZE18UIC6YklqdmpqQWpRTB9TBycUg1M+YsmXHWW Om3Uo3FGbUtr+4Xyy72X3DfIJ3zYI678POhLm+mdYourGTuq7fIi3thpVBT1p6YpnZXNtWD5 rKpz6MaJR3wL/Zgf+r45Y7Qibc2Vl/k32bP+aT9fEtX5w481Xl+yqWdj3P9fTuyhPCc/Tm+u +C7i22V9sN142bx1q1LCrghNm3lt7YY3jV4zcvgKbF8K3L954UAFx93TCRX8Zgweb5RWyQhO nB3QkxR24Ii67VanTWleEhUhC5SDPga8/Z32Xvkg76IAWyY5tjlhTdp5PJIN2x+x+GUKqW+W fF0560c044layyN5wecLVec+XnVTwLG1a7to3ILivVoHmre0HLWes1JBUuBS8mwlluKMREMt 5qLiRACOAigv/wIAAA== X-CMS-MailID: 20201216075206eucas1p18bb5415110b6f1dfcbf96728061d7eb9 X-Msg-Generator: CA X-RootMTR: 20201216075206eucas1p18bb5415110b6f1dfcbf96728061d7eb9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201216075206eucas1p18bb5415110b6f1dfcbf96728061d7eb9 References: <20201216075158.16458-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 Analog to Digital Converter device based button driver. This driver binds to the 'adc-keys' device tree node. Signed-off-by: Marek Szyprowski --- 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 6b3ec7e55d..6db3c5e93a 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 Analog to Digital + Converter device. 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 fcc10ebe8d..bbd18af149 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 0000000000..086c676c02 --- /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 Wed Dec 16 07:51:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 344502 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp164074ejs; Tue, 15 Dec 2020 23:53:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpzd8Tls7Ecepp6jnkETu0RY4upCFIFbE5cZIG/P4F40H9llsuAhJx+eYdhV4FGjh6Xhtx X-Received: by 2002:a50:ed17:: with SMTP id j23mr33014953eds.218.1608105194970; Tue, 15 Dec 2020 23:53:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608105194; cv=none; d=google.com; s=arc-20160816; b=sAmqVMrU/mMFzW8I/It8EALCcvb+b71J1aL1OotwO/WnmB2a3Fj8OioXSsCWTjjBSD odGMLvwf1zIC+OgxWDBSux4F4II8+R11E08TeI+maRuz6/RvlPMVNBwqAeY3x5PiLVGa aCOJ9jC5j8uqHXBCqkTuiiEv0e4KC0MhhXz5FiiUg3sc5+z16JCQKYFrv/Wg33a4lrOS f0vI17EiBJHgoqsoz8SkYXpFJzsZ/E9MUti4DKCGGZJgiaOO6aenXrqF2aVQ9MJaixnf bZqF0zDd/SexbemqISH8yPIHT0jYFQuvlPQRwv7pZVBDcUpzopjoGLS/ApF4zUS+jQHo BNTw== 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=zjNcJlCouTC2Ts3manBXqRKhnVIrhQC65zXuYnlUoQ8=; b=FFH5dQ1m5nFgYTEHWtMd5bi8owt3BnQdJbt7rVIqODjMPje6EPDzNPNDgNjkClk2p4 8LiJOK8D5ZSYCYI6QymumCpS8DKzi3ae636uWsMzFV8kM1KrtcQr8orNTvFl8FmvL07v 5tAgZbgAIOwPYQ0q52a25OHSVie9uTiMt+3GUQFppixMflbG5GmDI8zxTbTG+uAKwYYS 7K5eJPo7H9zyrNtjBMmqS1j/IKOTMbGhbDeuj/KFI2s79Tgb+9vHZO8zXkxBQDm+8jL7 bK2A81tnVNUCzm28nrkh/7aALsB2V2Ooh+vPwpLd8j/HYK243KkYHaj/pnPaFYKAwbwe CkMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=GHXLtHCw; 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 nw24si455160ejb.647.2020.12.15.23.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 23:53:14 -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=GHXLtHCw; 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 5F1B382A6E; Wed, 16 Dec 2020 08:52:34 +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="GHXLtHCw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 96B5182A64; Wed, 16 Dec 2020 08:52:26 +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 F0C6E82A46 for ; Wed, 16 Dec 2020 08:52: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=m.szyprowski@samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20201216075212euoutp02607c5a9d129fbc53171793332a84f2bc~RIxkXihzI2701927019euoutp02t for ; Wed, 16 Dec 2020 07:52:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20201216075212euoutp02607c5a9d129fbc53171793332a84f2bc~RIxkXihzI2701927019euoutp02t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1608105132; bh=zjNcJlCouTC2Ts3manBXqRKhnVIrhQC65zXuYnlUoQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GHXLtHCwbRIe/1ZGF4wa12jhrD+nlyLoz231AUUrkdAUUpjMzihSpK2pjEfWlGDa5 rz/pcV2HB7gZvGgf0nQ2MohHyZ5rleSdY1cmmKQBnmHLa32N/9Fk/NUBcqAgJz9IEb MB5yyaHTejRFGOFi7+MMtSSBYJGrmKNNuqnou8o4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20201216075207eucas1p2d3a84ba063760fbeff2820de62ab80fa~RIxfXdCwX0936609366eucas1p21; Wed, 16 Dec 2020 07:52:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 51.11.27958.7ACB9DF5; Wed, 16 Dec 2020 07:52:07 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20201216075206eucas1p2b61e6298a430419f039a7089567db1de~RIxe7pSMG1258912589eucas1p2F; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201216075206eusmtrp1bc59263415a1705621060976cddb20c3~RIxe6j9HL1371713717eusmtrp1N; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) X-AuditID: cbfec7f2-f15ff70000006d36-59-5fd9bca791c2 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 18.9C.21957.6ACB9DF5; Wed, 16 Dec 2020 07:52:06 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20201216075206eusmtip22f3bfcb5c41af652d92b0e54cd376b32~RIxeU7exZ1905519055eusmtip2V; Wed, 16 Dec 2020 07:52:06 +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 v3 6/6] configs: khadas-vim3: enable Function button support Date: Wed, 16 Dec 2020 08:51:58 +0100 Message-Id: <20201216075158.16458-7-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201216075158.16458-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42LZduzned3le27GG0z5zGGxccZ6Vosbv9pY LZ6/u8xksfbIXXaLQ33RFh2HlS2+bdnGaDFpwi82i7d7O9ktDk/9wOjA5fH+Riu7x+yGiywe 82adYPH48DHOY37ndyaPs3d2MHr0bVnF6LFx2QHmAI4oLpuU1JzMstQifbsErowJF78zFXxg qVj0YS97A+Mcli5GTg4JAROJF6c2ANlcHEICKxglpjbuY4JwvjBK3D63mBXC+cwosX3+K1aY lkUtx8HahQSWM0ocW2cA17Hn9mI2kASbgKFE19suMFtEwEjiUtMOsB3MAneYJLomN4B1Cwv4 SDTffMkOYrMIqEq8+X+YEcTmFbCVWP17FxvENnmJ1RsOMIPYnAJ2Eoe3NYDdJyFwgENi64bv UEUuEgefnYM6T1ji1fEt7BC2jMTpyT0sEA3NjBIPz61lh3B6GCUuN81ghKiylrhz7hfQJA6g +zQl1u/Shwg7Suw6vpQRJCwhwCdx460gSJgZyJy0bTozRJhXoqNNCKJaTWLW8XVwaw9euMQM YXtIbJ/7HRqMExkl3n79wjiBUX4WwrIFjIyrGMVTS4tz01OLDfNSy/WKE3OLS/PS9ZLzczcx AhPM6X/HP+1gnPvqo94hRiYOxkOMEhzMSiK8f97eiBfiTUmsrEotyo8vKs1JLT7EKM3BoiTO u2r2mnghgfTEktTs1NSC1CKYLBMHp1QDkxljvmCWfvDjzwniByVe3j4VG+8rcK57jxHjsTlS 3vXeU7X/9VVN0JkS7pIwuanhdNxU56uSEqd6ryq3Xr3iyFWorOzerbi15khBcbWi4IKoav67 YbqL/506Um3fFFA9cYvPqcgQvQUnXTx022oDmwQSunfktT0487Cy31b1vPIhJ/0X+ve/qR/L Yjiy+fAV3eXKO9QKnp7ZtvjBwx1ickKhzJbSs2O0ZLp7107xyLmjWTnlyMQVnveuFW56d6D5 lcB7qe7edqUJ7nlKV6N05C+fu+he0Bdi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v3ksj1dw/Li76PHB90osxRmJhlrM RcWJABFuce0AAwAA X-CMS-MailID: 20201216075206eucas1p2b61e6298a430419f039a7089567db1de X-Msg-Generator: CA X-RootMTR: 20201216075206eucas1p2b61e6298a430419f039a7089567db1de X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201216075206eucas1p2b61e6298a430419f039a7089567db1de References: <20201216075158.16458-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 | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 5d16652fd6..bc17430569 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -31,6 +31,8 @@ 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