From patchwork Mon Jun 8 18:31:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1345 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AB33D3F06D for ; Mon, 8 Jun 2020 20:31:58 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id v16sf4415908pfm.15 for ; Mon, 08 Jun 2020 11:31:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1591641116; cv=pass; d=google.com; s=arc-20160816; b=DJD3/sjrI1scxFMunOiIe4BUJgA+G/yw15JJfOD2syU8M8J+771wwkK+N2Doc/Hd/X FCoOyC+t1MxIQNvUmdw9BnhnOOR8+AnVMWSgz+1RZHJ18BdSikScGK9uCSZwbdPKWW8q gi+zLXqBGxoUs5Kk5OJxWnhQuUfw9BOJ3YFCj+iA6vOCoXznqJMA4PR7JQ5SlUIfH6Bv fw+NNfVRo4ioxhxNERXFE/7dfSdcC3yK7CdCt7zZ21jZHHFcGVlDPAr1iRMHIL6iQMuZ 6QG15fMKxmhhzgoSgYum+fpPBbV0nQHjaxLHFlpp4LgV5hb6VJ+5FWrJ7liJxJq61DRK RM4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=fB0AqcOMv4VLhgqIkuuC2JR2vRF70xBTzT8Mu37a8Gs=; b=vIdMNcqioCyPJm+7aDYNqnFzwSUxNb8CW/NGjx181bDEntZao2GA+eUXG/k9dUJryW QlxBVg9j0fbW7VXatSQWV76fVlzOL5DFU5llCu0wyzaFdHgRbXWQ2ctg0GwC4pFsOYc0 bZJ+KrtbYuw5otItPjFSj4scz1y9Zz1nNAVaM0aaoMocLEfoVIMT3kS9GnsnQMZwplxF pBFRgkrQZuX69IPgky7MdP8Up2X1y7kg0OIzlyKImsMN5do0/pOwpnvLYREa0vh/9NFE OoWOqqMq3paE57D4sG+RZY7uA2A597Fqq+VciqNodBAmIGoiv9JCfxM1Y2mlfOkB5DYI 8Yxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BRMiA+sR; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=fB0AqcOMv4VLhgqIkuuC2JR2vRF70xBTzT8Mu37a8Gs=; b=pRKGPrrK/Cv5vytSbdWCch23IQKEEwtjgbM60urjA7r0wh9rHX9sbFhti+tOzpf+1T T0as0RwOEBsbFrRdWpszUun8FmRca4lKIWdkE58UZ2OR+4fgBeCfJmZHQY6vo85G/tqo 1xKwCnbxQthK1T7GJwj5PvcWLNPssSFJhM7k0= 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=fB0AqcOMv4VLhgqIkuuC2JR2vRF70xBTzT8Mu37a8Gs=; b=bvgUETqQKy2aOh0yWRPlW0B0ceUMHs89o80VpKzd0bn4Q+pcjfB/pEJ7CJD4uG+zMq PKKsNlVivSfIImxNcLA/dKhYcSsuYvD2Gr/PSaxP8NiR3oZIwRrTHYNo8X5GQtMpdRTu DvQAymRx+5tGnio65m6gdws4ews1dRChUfmrTAj29QWyAzf5B8pRu+SIMBWvMZZY2G2y 2cjwenzgrEb0ZiTD0kaX/OGxondSn81G6kyi0peKvEerq8DfrczGFYtEW/0ku2HxMNKT Jai+OaGDfJWGe1eHHZssmOns6HxuSpa2qezx9t3nUjIvsQEFhOna+lCKPQ3FgHX99TpL 6HfQ== X-Gm-Message-State: AOAM530QMFUZ2ISsq38kjUbM1HIhSxC8ASlGjbx4BfgyXJ+WT6ru3EST CcfPLzjXPu3IH2A6z7SAlwD+MqDT X-Google-Smtp-Source: ABdhPJwCOqctbp4ivQIEbJsD+iwIXQ53Jcqlr5YTAgIR9k2h4cVkmWAWXcoqH0GItcyY0iw+USVE+g== X-Received: by 2002:a17:90b:801:: with SMTP id bk1mr626562pjb.28.1591641116502; Mon, 08 Jun 2020 11:31:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8548:: with SMTP id d8ls6434134plo.11.gmail; Mon, 08 Jun 2020 11:31:56 -0700 (PDT) X-Received: by 2002:a17:90b:234c:: with SMTP id ms12mr650200pjb.164.1591641115978; Mon, 08 Jun 2020 11:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591641115; cv=none; d=google.com; s=arc-20160816; b=b5+FaPEq+qnQOItBReTkMKY2ld91NZimoGtN76MDwL+84cPgPoNMfXrX7ymLJRH2rP APviLMMHWLrw/23JYQyzRUyw0L5Tz7YRWTowd26UeQeF5WzKiSANoJfrl0/8f8JJ8VDQ kXY2RF7HMHDKPFS+rtEg2bdBFIuHf5D8usthgSvjBmrm+md4PqDZ1xRU11AeZBp7ie2y 16PK7tl9qc/tzK6jHL6E3vaJe9furjpWsJw5koO1ja5/pnQ37TuHf9hmjPipLvFzjr+0 nZ3soLO57c1dWaTxWq/UlV3Mv1JON1QJMvIu7pqc1tAIYIqnwQ3IcXaYzZOxd5P38eqE QfFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=l3xJDyyoDYrvrez7cy/2VVQYiSOcKcmSKEhJ/nYbfnM=; b=WidoRUI00sp3xmQ13X3e0Rlp5pAG6Wp5ZWiYrINx85f370eZrEp3IUabr7qxGmwHtF 3IrH+UNqGStQt3EBmhhfgasuOMEiwnOE6/CmxR2t0NHSLBHgDO8e26BeNiHRmx3YiNF/ LSJ2NZ50MTGoFnWDW81JQu2aeTSpSvkP+2PUbCwvUKTmM8FG+x7mTXsD7aPMR1GGGPnh jXAobgSde4bhRqOUsrjqU2Nz44j/8u4an7YyCF0xxBWrowzdXGNlAao9zWHfBAx0f7w7 es7OgIGAcIaf22zQaEPLjTIJIZB8XEMNC/n+teD2KtLDxvvwSVdokh6v9z9upF7lWro4 B2zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BRMiA+sR; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m2sor11640319plt.61.2020.06.08.11.31.55 for (Google Transport Security); Mon, 08 Jun 2020 11:31:55 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:7b92:: with SMTP id w18mr90156pll.273.1591641115053; Mon, 08 Jun 2020 11:31:55 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:9043:af95:b7b4:3ade]) by smtp.gmail.com with ESMTPSA id k29sm6680961pgf.77.2020.06.08.11.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 11:31:54 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki Subject: [PATCH v3 0/5] roc-rk3399-pc: Custom SPL init Date: Mon, 8 Jun 2020 14:31:39 -0400 Message-Id: <20200608183144.26809-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BRMiA+sR; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series supports custom initialization code required for roc-rk3399-pc board on SPL stage. I have marked it as v3, since we have tried this before on this series[1]. Now this series is well mature code handling to add custom spl_board_init code parts. roc-rk3399-pc would require custom leds initialization based on user intervention of the power key. This code handles the user intervention via SPI environment variable. If someone or production systems wants this feature then 'pwr_key' has to be set otherwise it is normal like other rk3399 boards in Mainline. Changes for v3: - support leds on SPL - support env 'pwr_key' [1] https://patchwork.ozlabs.org/project/uboot/patch/20200319101251.7354-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (5): rk3399: spl: Add rk_spl_board_init as __weak rk3399: spl: Print SPL banner after relocation roc-rk3399-pc: Move leds setup in SPL rockchip: Separate the reset cause from display cpuinfo roc-rk3399-pc: Set LED only during POR and pwr_key=y arch/arm/include/asm/arch-rockchip/cru.h | 2 + arch/arm/mach-rockchip/Makefile | 5 +- arch/arm/mach-rockchip/cpu-info.c | 20 +++++--- arch/arm/mach-rockchip/rk3399/rk3399.c | 11 +++- arch/arm/mach-rockchip/spl.c | 1 - arch/arm/mach-rockchip/tpl.c | 7 --- board/firefly/roc-pc-rk3399/Makefile | 4 ++ board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 21 -------- board/firefly/roc-pc-rk3399/spl.c | 56 +++++++++++++++++++++ configs/roc-pc-mezzanine-rk3399_defconfig | 6 ++- configs/roc-pc-rk3399_defconfig | 6 ++- 11 files changed, 96 insertions(+), 43 deletions(-) create mode 100644 board/firefly/roc-pc-rk3399/spl.c