From patchwork Mon Jan 20 01:33:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Araneda X-Patchwork-Id: 1225590 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=N4ZBm5JH; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481Dht6GdPz9sP6 for ; Mon, 20 Jan 2020 12:33:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 432608186F; Mon, 20 Jan 2020 02:33:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N4ZBm5JH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9D3CC8186F; Mon, 20 Jan 2020 02:33:40 +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=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7F37181874 for ; Mon, 20 Jan 2020 02:33:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=luaraneda@gmail.com Received: by mail-qv1-xf43.google.com with SMTP id y8so13332329qvk.6 for ; Sun, 19 Jan 2020 17:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bNc5pgvVO7OzYFmgLvhGK8ldberudFK6R2m2ESala9E=; b=N4ZBm5JHCDxEq4rknWEbizRm4uYYntwL2ndD/0m5ktDPhXlWC9rZmHhVd9Q/7ORXgY HRuR0LLGFmdSZRW4Xee67HGItwpVhQ3/jJF4qWPqi/oPPF3k1DzQ2kHpbuhPoKQcnCtY GWwE6Fgp7yFl+K5TQb8SGQl0lRn0LdyEmcHicnlosr88p2g7BPS7zZsR4DenyFLjggls 4YhOypC67higtBUtL7+lUEirVvrnu7W7gToYRCV3eOpFGkrRUwohY5LdKQgZfbHIu/5K OPdECZnLgEME2GRFESAnmGFhRUx/QcL+7Wu5KZ2kpAOR4T5bcKwwzqPpzH4eF0d6urQZ UdMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bNc5pgvVO7OzYFmgLvhGK8ldberudFK6R2m2ESala9E=; b=RH+GAWVqHsZRnVVI+brWegkJsL7flkupx0Q/0Tis/ZjnJQ4WatklZfX/DkTv6Q+2Yf P4juiLCi8Veur0HTl/BPflRM6+JwmZlNgsm97qf3NsmpaVThoWfDLMyWjVWXIvb+ZrHi mm4vyfVktFgpGpmEW3zcB4ZMKznxlTfJXGhNx31t86pO8klkNy80J894bY5p6S9dV8zs z10pc+oGC69g8G5hGtDXzLsJiM4wE+N4aHRqzIxYZWsUU019NZl3v/vHVGFL/aY8RSdR nLFHJ5jRc3/224vNjYdJ6A5VB3RfwgYojceG9hgxVTxN7V5VZFTdqFqzgJyYkERWMEv6 5UtQ== X-Gm-Message-State: APjAAAVTiQ6oZ5tb2/XjpInewsEt1/T96SKnB1VqMqa9RwmYV60mZt9y yXVnlbbeeYxO7BEFtgsLXbQ= X-Google-Smtp-Source: APXvYqzJJkR33dLRd9GR3RqVMKVuywFjSypTt/iGBhOyXhOXKvbowhwvaLG8qvKy3vgsuvTbNpJ8/g== X-Received: by 2002:ad4:4f94:: with SMTP id em20mr17698527qvb.95.1579484015492; Sun, 19 Jan 2020 17:33:35 -0800 (PST) Received: from asus-S451LA.lan ([190.22.60.63]) by smtp.gmail.com with ESMTPSA id g81sm15187211qkb.70.2020.01.19.17.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jan 2020 17:33:35 -0800 (PST) From: Luis Araneda To: monstr@monstr.eu Subject: [U-Boot] [PATCH] arm: zynq: zybo z7: fix MIO init issue Date: Sun, 19 Jan 2020 22:33:30 -0300 Message-Id: <20200120013330.8709-1-luaraneda@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean From: Milan Obuch The board has two push button connected to MIO pins 50 and 51, which have a pull-down resistor and are connected to 1.8V when pressed. These two pins are wrongly initialized with internal pull-up enabled so they are reported as 1 all the time with no change when pressed. Disable the internal pull-up to fix the issue. Signed-off-by: Milan Obuch Signed-off-by: Luis Araneda --- This changes were originally sent by Milan Obuch using a diff format. As he didn't know how to properly send git patches to the mailing list, I converted them to a git commit, rephrased the commit message and added the Signed-off-by tags. Milan Obuch then review and approved the current state of the patch. Tested on a zybo z7-20 board by me board/xilinx/zynq/zynq-zybo-z7/ps7_init_gpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/xilinx/zynq/zynq-zybo-z7/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zybo-z7/ps7_init_gpl.c index 7c6bc9fa3f..a376ba574e 100644 --- a/board/xilinx/zynq/zynq-zybo-z7/ps7_init_gpl.c +++ b/board/xilinx/zynq/zynq-zybo-z7/ps7_init_gpl.c @@ -219,8 +219,8 @@ static unsigned long ps7_mio_init_data_3_0[] = { EMIT_MASKWRITE(0xF80007BC, 0x00003F01U, 0x00001201U), EMIT_MASKWRITE(0xF80007C0, 0x00003FFFU, 0x000012E0U), EMIT_MASKWRITE(0xF80007C4, 0x00003FFFU, 0x000012E1U), - EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00001200U), - EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00001200U), + EMIT_MASKWRITE(0xF80007C8, 0x00003FFFU, 0x00000200U), + EMIT_MASKWRITE(0xF80007CC, 0x00003FFFU, 0x00000200U), EMIT_MASKWRITE(0xF80007D0, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF80007D4, 0x00003FFFU, 0x00001280U), EMIT_MASKWRITE(0xF8000830, 0x003F003FU, 0x002F0037U),