From patchwork Thu Apr 2 11:57:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suniel Mahesh X-Patchwork-Id: 1265552 X-Patchwork-Delegate: ykai007@gmail.com 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=VtJcH4D1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48tM5w1bYGz9sRN for ; Thu, 2 Apr 2020 22:58:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 610928065B; Thu, 2 Apr 2020 13:58:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.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=amarulasolutions.com header.i=@amarulasolutions.com header.b="VtJcH4D1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5CED2800A9; Thu, 2 Apr 2020 13:58:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (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 4391A800A9 for ; Thu, 2 Apr 2020 13:58:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sunil@amarulasolutions.com Received: by mail-pg1-x544.google.com with SMTP id r4so267298pgg.4 for ; Thu, 02 Apr 2020 04:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=KeosDjoiIPNMBlLlo2Uoh8Dm8mDxaTjJradLqcrkuAA=; b=VtJcH4D10TgTcSpw+t/bEtdJM2EgDCT5trGsM/qLTR6NSNtJ+1//fhLWTCa2IPpepN vEnVAG4LgSoKia3R+aoc9PRZIzc1l0aID4Cg6/Xm+8f+ceSw1mLKzT61QFk0AE9kq9KA jYHbAksDRrvFSbEkxovJaIBCrzeB6qDPFo4eM= 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; bh=KeosDjoiIPNMBlLlo2Uoh8Dm8mDxaTjJradLqcrkuAA=; b=rymyJqzx34F/YdZ34sDfET1H/fCDv5aGQAwADfR9JETQ5jVlHggV0PPAVSqPJuZEWh UjvZyDEe2SnHufKuaQxYe+kY+ugh/+ps9ohWI+b6ItQldCmz9N2o7LP/Tq/f/Bdzqx71 9BhJeCPsN9DSkiVvlO2pxY3WVBIFdeCXREfZ+k7PE5SV++f60Bp++n2kZb+jNpAO+RNA TYB/MGhVsvTFUJ/IdOoywX3CfgeGwiTsdH0v6F/Njld4sDNeG1Pm+CT6Zz5JUpR5tUOa spPmNExIJ2JuKZKMI5HpKF1tnHNCJzCJuIeOVVnhPWbwjYCAN4rSzlEcYYpCp53ebrNL 4roQ== X-Gm-Message-State: AGi0PuZIn01pjVK1MJM1ILFroZwYxaoeIIDjzT9lOWfA6o7KvRS6+ovd p3K4/Pgz+WW80ZQAJwks36kvDV7KWeQ= X-Google-Smtp-Source: APiQypKr+NewRqlxW0pbRz9EflNh9QL/rZO1qRUtJyseQBocLPS4lDKjvhuaWh337Z9a8UbDICUP2Q== X-Received: by 2002:a63:cb4a:: with SMTP id m10mr2960608pgi.259.1585828687860; Thu, 02 Apr 2020 04:58:07 -0700 (PDT) Received: from localhost.localdomain ([49.204.227.108]) by smtp.gmail.com with ESMTPSA id o15sm3272657pgj.60.2020.04.02.04.58.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Apr 2020 04:58:07 -0700 (PDT) From: sunil@amarulasolutions.com To: m.reichl@fivetechno.de, kever.yang@rock-chips.com, djw@t-chip.com.cn Cc: jagan@amarulasolutions.com, u-boot@lists.denx.de, heiko@sntech.de, Suniel Mahesh Subject: [PATCH] Revert "board: roc-pc-rk3399: Add support for onboard LED's and push button to indicate power mode" Date: Thu, 2 Apr 2020 17:27:21 +0530 Message-Id: <1585828641-16429-1-git-send-email-sunil@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean From: Suniel Mahesh In case of a power interruption, human intervention is required which is not desirable if the device is installed at a remote location. Keep red LED as it is to indicate board in full power mode. This reverts partially the commit 5a6d3d1fbca70d7f528c685292d64c4cd0106aa6. Signed-off-by: Suniel Mahesh --- Note: - patch tested on rk3399-roc-pc - code related to button press is removed --- board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c index de9185a..0fe1914 100644 --- a/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c +++ b/board/firefly/roc-pc-rk3399/roc-pc-rk3399.c @@ -10,7 +10,6 @@ #include #include #include -#include #ifndef CONFIG_SPL_BUILD int board_early_init_f(void) @@ -34,26 +33,13 @@ out: #if defined(CONFIG_TPL_BUILD) -#define PMUGRF_BASE 0xff320000 #define GPIO0_BASE 0xff720000 int board_early_init_f(void) { struct rockchip_gpio_regs * const gpio0 = (void *)GPIO0_BASE; - struct rk3399_pmugrf_regs * const pmugrf = (void *)PMUGRF_BASE; - /** - * 1. Glow yellow LED, termed as low power - * 2. Poll for on board power key press - * 3. Once 2 done, off yellow and glow red LED, termed as full power - * 4. Continue booting... - */ - spl_gpio_output(gpio0, GPIO(BANK_A, 2), 1); - - spl_gpio_set_pull(&pmugrf->gpio0_p, GPIO(BANK_A, 5), GPIO_PULL_NORMAL); - while (readl(&gpio0->ext_port) & 0x20); - - spl_gpio_output(gpio0, GPIO(BANK_A, 2), 0); + /* Turn on red LED, indicating full power mode */ spl_gpio_output(gpio0, GPIO(BANK_B, 5), 1); return 0;