From patchwork Sat Dec 21 07:54:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 939 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 908523F08E for ; Sat, 21 Dec 2019 08:54:57 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id o21sf6567658pgm.11 for ; Fri, 20 Dec 2019 23:54:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914896; cv=pass; d=google.com; s=arc-20160816; b=RafbYygiRxqGmrHoHDFsQfgYIxqW1s6fpu+Rq67RgHFD2O3Z1YnA7YkXm20ZBgb2Rk DEC55+HvE/jr3FU794S85v+aPuiI/fjr2Iuw7EIADTT7vbC850faJum9ZBNBj42BVXOl xB+VdW6XMH4yBsgsJzhwo7q7yqXgA3MKByO6fGOYn2Xa6UM4q01EUQJjYKvL1QM9h92h l40ctGYGR9IstGDxiNK7XZd3SMJgjoXGUCfZPI+vFAx08f0xsQ255hNeDcvgCaA+cwu+ 3pdcsi3dN6rr5waBTIGoswZBK2QsLX/DWe0UjAqga0Sb525POC3O89n7Ls8wJeLBhWLa pIzw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6pWyPzPaFQnPuFtnbH0koTdXKujwjV5xSVdKDlY0agk=; b=uohbpiqtJxiOoil2uBZbjwHbU8dgfFnoUgdhPoFdOzxlaDC/GPssIz1XhBWd2vb0tc B5PFGcPDLxANshofornzs1LB3eg9zQ4fTy2PYsbT/BBnpnnwyJHNWs0fnoqbtcC+EFeb r4xUVLlu6X5lmPCGihd+2V+MlzHv/2gikC2GucBAzlEXjyz9/EtRKrgZFO/Ov25vqEak HrCPAYLzrBhiqc1MqWjl8gTExZ1xLjHJLd6URwCV9U2XScxBmv/5SxYPswBNCRL0yig7 MBeGY6ljAeGKU+FaQ68CIjk1JcbxMOUjHLFguzwiP8oQYpt5rTCk4slNDWjwzwOWCNAk jMWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="gNXy/wa3"; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=6pWyPzPaFQnPuFtnbH0koTdXKujwjV5xSVdKDlY0agk=; b=LsKRKAAZX7zA4U7sGbYIa9M4iZYn1TJRAyGN+VnbFqL81rzLOzwmu5UkGPdz4tAioO OmkCzhMzXS0KR7MmVRvvlT+aF8pV6O98V8obKlNzDGtGF0aXPU5mzMM5SlfmzPnwDLly M28F7YceLEwGm9bwQy/1fdsNQC4KOdDMihTuU= 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:in-reply-to :references: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=6pWyPzPaFQnPuFtnbH0koTdXKujwjV5xSVdKDlY0agk=; b=muSE5L2XoGwpuG0jEa5xZ+wnWiwZWo1/A+MqrgCqgf5xYb1fMV5hZiQe0Mn8WqVm0b i9gu5YCIkNJv7QhanefBwjWgftjoea/iXnpIVbS3d+ZjKfJYnN1l+qPtI73QbT9B8uB3 QSWYHV5XMk6KDMc/mC5LWORmfw/jwVf5foldrTc0hjNYD5abnUrH4F9HXNRHjEcAme11 KZPZIPP9Un/3CLRhRryobafxkkddb17LpdWJdh2K/RsotRBwjqXZk+pSfze5b+9i4QEC XPJ0nLeyiF/mpR7c1LkRcHnnyEE5YvIVgRKTy/bdLx2v1koXbBoNxCa/xEfF0WaX+mmF 2+Fw== X-Gm-Message-State: APjAAAWkDNBaGAC1WXVPYQuOnloxgDzDqnMaZUEHRcrLqmbJbibCbpDc 0npj1P9wIEUroIkL6vZziBXJReeZ X-Google-Smtp-Source: APXvYqz3WiV6GPqrstw5AiaoZPJX2xX0YdbAtTe83LySMyAGRxKXUikrco7a8iWdf5YMyG1aOlJQ9Q== X-Received: by 2002:a65:55cd:: with SMTP id k13mr18684540pgs.197.1576914896180; Fri, 20 Dec 2019 23:54:56 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:cc:: with SMTP id e12ls2949154pfj.6.gmail; Fri, 20 Dec 2019 23:54:55 -0800 (PST) X-Received: by 2002:a63:cc4a:: with SMTP id q10mr19177430pgi.241.1576914895674; Fri, 20 Dec 2019 23:54:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914895; cv=none; d=google.com; s=arc-20160816; b=Ps+qiQ7XtpIpPf4Oh3dcerODAPk99X9SqF5G1klCNhpa0BWecQOcI0teTUHWhBZerg iQ/bEFTqcxRpM1weh0PwscbLio5w9eXHFnyyS8/QuE4mSuZ5a5rRHBSr4j5FWTUlpZ3v dEaDiN4wovVo7BtrX5CBGjrJoNNYHkBJxhHfs2+VvSh8WC4XEOk6XPlh6yLeN1egSD6z DXrXnmdJlOb/xZB6wxReVnLFG9FTGLKxnfcxOmn4Yowp3dVuU00lexha74LLT4zpCPMO j96yb9T7XVJghIGE/4jiox1lmyoCmfMjoP3xwmyguhO+uwlptHjo+xsbBJqEjqOS3Mqn fqdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cYR9K4kgo/za5EQis/Lt7xEEmwhFpfJkJx6G1IMWPMk=; b=wROWy2OByeez9v5bEz3hGl1iP5qvoZ7alAVRWFJ6wsAosQgTwKbpxhAb2rml81A6U/ hJqT0GGwPCWaQuqVmR0Rosh8h8mf6PM+SK8rBzaBR/XZs2DjkzW89ksrpqiXVV9lS2pi OKVpeCilDgdxVrRVRt9q141PyPvLcZV2E6wdVSPpmK1HP7Af9ti6hZkaODNYQQjWAIb8 Ng0bMRFhTFRC3R9V225N+r9G2wr0UIuUFUf7DS4VdJ7Ybi2QRnbxM/D0rutWi0KC9B41 oN3GOe5mzDgeL8g/Ml4IY2NbL3NcSASeG0xe7UZioJ8uYi45SR7TrNqIspiWKj0GwrMP HTSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="gNXy/wa3"; 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 v6sor12479894plp.69.2019.12.20.23.54.55 for (Google Transport Security); Fri, 20 Dec 2019 23:54:55 -0800 (PST) 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:6544:: with SMTP id d4mr20136327pln.278.1576914894562; Fri, 20 Dec 2019 23:54:54 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:54:54 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 01/11] spi: rk: Limit transfers to (64K - 1) bytes Date: Sat, 21 Dec 2019 13:24:30 +0530 Message-Id: <20191221075440.6944-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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="gNXy/wa3"; 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: , The Rockchip SPI controller's length register only supports 16-bits, yielding a maximum length of 64KiB (the CTRLR1 register holds "length - 1"). Trying to transfer more than that (e.g., with a large SPI flash read) will cause the driver to hang. Now, it seems that while theoretically we should be able to program CTRLR1 with 0xffff, and get a 64KiB transfer, but that also seems to cause the core to choke, so stick with a maximum of 64K - 1 bytes -- i.e., 0xffff. Note, that the size is further divided into 'minus 1' while writing into CTRLR1. This change fixed two different read issues, 1. sf read failure when with > 0x10000 2. Boot from SPI flash failed during spi_flash_read call in common/spl/spl_spi.c Observed and Tested in - Rockpro64 with Gigadevice flash - ROC-RK3399-PC with Winbond flash Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- drivers/spi/rk_spi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c index c04535ac44..95eeb8307a 100644 --- a/drivers/spi/rk_spi.c +++ b/drivers/spi/rk_spi.c @@ -27,6 +27,12 @@ /* Change to 1 to output registers at the start of each transaction */ #define DEBUG_RK_SPI 0 +/* + * ctrlr1 is 16-bits, so we should support lengths of 0xffff + 1. However, + * the controller seems to hang when given 0x10000, so stick with this for now. + */ +#define ROCKCHIP_SPI_MAX_TRANLEN 0xffff + struct rockchip_spi_params { /* RXFIFO overruns and TXFIFO underruns stop the master clock */ bool master_manages_fifo; @@ -367,7 +373,7 @@ static inline int rockchip_spi_16bit_reader(struct udevice *dev, * represented in CTRLR1. */ if (data && data->master_manages_fifo) - max_chunk_size = 0x10000; + max_chunk_size = ROCKCHIP_SPI_MAX_TRANLEN; // rockchip_spi_configure(dev, mode, size) rkspi_enable_chip(regs, false); @@ -451,7 +457,7 @@ static int rockchip_spi_xfer(struct udevice *dev, unsigned int bitlen, /* This is the original 8bit reader/writer code */ while (len > 0) { - int todo = min(len, 0x10000); + int todo = min(len, ROCKCHIP_SPI_MAX_TRANLEN); rkspi_enable_chip(regs, false); writel(todo - 1, ®s->ctrlr1); From patchwork Sat Dec 21 07:54:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 940 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C5F763F08E for ; Sat, 21 Dec 2019 08:54:59 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id r17sf7763399pfl.2 for ; Fri, 20 Dec 2019 23:54:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914898; cv=pass; d=google.com; s=arc-20160816; b=LhwP4aIDFPSCLW/0l0aYmvLSlA829FSVCYvPLI6VyoScfIWVtxskznMgBa9JQ3MgE7 +ZEW9fVODUZK20fu4nNHrnePfZPqhr5DoyAR4BJ3oFaVmLC2mVimBLXDJsWp2/xAqw4c wRt2jumQM1qJ6EjsflREfEihwANv7OtIqWOlkwH7GT0AVpa7yIZDCw1SWS+OF5p0jcJ8 Vgbmpgzayp29dZlbdz38UjHLPunlNj45ZB+fU0JmcyD6oS/vbTZEKlN8hwolWcT1E88l 63ePRXk2p/41hIKgAaCF3O2AXgyW91+HvCV+VHaYQnNzXgrAOtQl9RHhYHEc1xAX2P1O U4pg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Tm5NqBKEVBnOdzW2FSonNB+atSaRJ4sknf++zPRRtVQ=; b=YvF79EDhSZS5WffwKSvHxCj1rvSr4G+3kFGllnFZgXAfA7hYXs514UnThTq0YE7p3z xcdbLVsMRuYnAcie015roXBJugzy4g0YDlDieQdCwo6jffQkzRmJdEZcHMuD9ESAK3wE 5+k+SfEUU96uwKcykLzDnPmSMVgZxD76fZ+zMii6nauYuwuxEGJ9cdlLmitr8p+JyBc1 swWIhu5RL6NqkI0E2Uu7NKbpxN5M8MQVWyUl2xVPwSViphJdjsxSFdp2mn5q3E8NFLDG ceR4NZMpfEAgGBZCHQ5fg5tsvqzgEx+7TUVvlEO30+Oz8yOrkKW8MURsMCLf/er3sY0G PILg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rXgiNGgr; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Tm5NqBKEVBnOdzW2FSonNB+atSaRJ4sknf++zPRRtVQ=; b=XmRzfDP3dts9tQUkZqX/lxxMhvOrfEbrCbps1oxECWnlwObshYrL0JAcWUT1bHHTuQ C2n1C3CUJz2H68nWtVY7q2kcJGcCTTGDrLou3/Tq5v8oLILPIWRsiiTCCz81v5WAw8Mr d18KuiWqo3N0B/N7aGfrXG+QQGhX+ITpM1JIE= 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:in-reply-to :references: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=Tm5NqBKEVBnOdzW2FSonNB+atSaRJ4sknf++zPRRtVQ=; b=uSojOiZ06js309JH4Q4vCaZYlMXF4rr4s8Egod6aiyCnU0J6nsqT483VObXH4H8/1F PmlVW1S+srqYuVTRHEBUnyHZAIMEwDgKWY/i7ub4k3IMq8BK8IpvuMvtkVk1kUKUJq0W nRilPRITlklHBdVUmciVvxsioSn+sFNRrM6Xfm67jg87XnqxHQtlnVL6Bu4bb87On1A4 NTuOq5jba/VL1uxO2ROE09RkLr5PLL/nvJE9spPmth88djSU8aaPiVNlDT5ETtQ3tlLK q+hgyQl5jqlNAzbRvYlMtrX9mQzcTuP6GM+qBA+VLQcCrl7ouUi72MnB5tvCrQnoEuvw B2tA== X-Gm-Message-State: APjAAAX141Dlimg1k41V1YwRokdby5S9pChm0yKtF5MFGylzurZextK5 f1dIkVpMVJ7Ujw3pRAbBH8Gg6JyL X-Google-Smtp-Source: APXvYqyCc/42Kt69Z9q7B7CQPMgsEvF1AIlMvvDMNiRhIG9vQ6tmyrhB5A6xIlF4e1D+5qHUQKe0yA== X-Received: by 2002:aa7:9729:: with SMTP id k9mr21056125pfg.72.1576914898650; Fri, 20 Dec 2019 23:54:58 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8d43:: with SMTP id s3ls3045453pfe.14.gmail; Fri, 20 Dec 2019 23:54:58 -0800 (PST) X-Received: by 2002:a63:2cc8:: with SMTP id s191mr19285838pgs.206.1576914898144; Fri, 20 Dec 2019 23:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914898; cv=none; d=google.com; s=arc-20160816; b=cda6apd8b5gixni/AAiCy7wP5jZePStGj35wvsfwJzUEcLd4zLYgy9Tl0Xx9chJ5vr PxhKowq8X7FAD2XsRwcCPpF2RxPKvHwYzk2uUke1KpXHoi3Rzq10YCWpCMgbO/pONRNh v/ao3EJD/bFBi6rnv2qlBN+cnosKo3nUQmHxVhqa96s+PwiS4yQIb8bJ+yFQBK8Q1lpi tkf3ijfwIYq8fcp0vQvOjQ7N8c2INbbUkVFKfnPDZNUCHWbsJARmxdkVbZQfAQAe07q8 ieWTF3Wvf205/eW4mxoq33H0L9RD6FSES2YhjMEJSCsKtzKdjHh4PKQOHcd4fhvWkJ7n DgTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=jM8vNSgXmvPlNxsqNzC3s3ZZdWuXAaTtjcTjHWND2aE=; b=j/RGdQ8mAncB1oCz87KiNsSqRSLqJHg/QFtvWCCm8mn5l3PBuw0/c2pFz1oTDmkDx+ VuAEKmKQzulFuSDEdo7dm/EIDj+nFCH1Y/y9lAF65Cu7nb+D87k6eH4c/Lphr0h2gjsE Lugj7M9hK4HO7SaufY3UcQV+vFWB7jF0HURmGujJvgvnhAtVzMoPOGnLfIq1uEQ1h6Ug fUt+Ytk33FH4LBioXc2vXcGviZiLuyyHICkvbQ91GxyXmzLg87Lo7R5quJqVHr8Kah86 CM87Oz1F/88hLz+AmDugL7HOmIDbCQyKnoZr3hWJDs71UQlu4Q7gXM5F+MxeN6pdhArA cA+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rXgiNGgr; 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 jx16sor12823609pjb.7.2019.12.20.23.54.57 for (Google Transport Security); Fri, 20 Dec 2019 23:54:57 -0800 (PST) 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:90a:7781:: with SMTP id v1mr21241475pjk.57.1576914897548; Fri, 20 Dec 2019 23:54:57 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:54:57 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki , Tom Rini Subject: [PATCH 02/11] distro_bootcmd: Add SF support Date: Sat, 21 Dec 2019 13:24:31 +0530 Message-Id: <20191221075440.6944-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=rXgiNGgr; 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: , Add distro boot command support for SPI flash. This distro boot will read the boot script at specific location at the flash and start sourcing the same. The common macro like BOOTENV_SHARED_FLASH would help to extend the support for nand flash in future. Cc: Tom Rini Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- include/config_distro_bootcmd.h | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index fc0935fa21..d68b79e290 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -43,6 +43,22 @@ #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \ #devtypel #instance " " +#define BOOTENV_SHARED_SF_BODY(devtypel) \ + "if " #devtypel " probe ${devnum}; then " \ + "devtype=" #devtypel "; " \ + "run scan_flash_for_scripts; " \ + "fi\0" + +#define BOOTENV_SHARED_FLASH(devtypel) \ + #devtypel "_boot=" \ + BOOTENV_SHARED_SF_BODY(devtypel) + +#define BOOTENV_DEV_FLASH(devtypeu, devtypel, instance) \ + BOOTENV_DEV_BLKDEV(devtypeu, devtypel, instance) + +#define BOOTENV_DEV_NAME_FLASH(devtypeu, devtypel, instance) \ + BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) + #ifdef CONFIG_SANDBOX #define BOOTENV_SHARED_HOST BOOTENV_SHARED_BLKDEV(host) #define BOOTENV_DEV_HOST BOOTENV_DEV_BLKDEV @@ -398,6 +414,18 @@ BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE #endif +#if defined(CONFIG_CMD_SF) +#define BOOTENV_SHARED_SF BOOTENV_SHARED_FLASH(sf) +#define BOOTENV_DEV_SF BOOTENV_DEV_FLASH +#define BOOTENV_DEV_NAME_SF BOOTENV_DEV_NAME_FLASH +#else +#define BOOTENV_SHARED_SF +#define BOOTENV_DEV_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF +#define BOOTENV_DEV_NAME_SF \ + BOOT_TARGET_DEVICES_references_SF_without_CONFIG_CMD_SF +#endif + #define BOOTENV_DEV_NAME(devtypeu, devtypel, instance) \ BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance) #define BOOTENV_BOOT_TARGETS \ @@ -412,6 +440,7 @@ BOOTENV_SHARED_USB \ BOOTENV_SHARED_SATA \ BOOTENV_SHARED_SCSI \ + BOOTENV_SHARED_SF \ BOOTENV_SHARED_NVME \ BOOTENV_SHARED_IDE \ BOOTENV_SHARED_UBIFS \ @@ -436,6 +465,12 @@ "echo SCRIPT FAILED: continuing...; " \ "fi\0" \ \ + "scan_flash_for_scripts=" \ + "${devtype} read ${scriptaddr} " \ + "${script_offset_f} ${script_size_f}; " \ + "source ${scriptaddr}; " \ + "echo SCRIPT FAILED: continuing...\0" \ + \ "boot_a_script=" \ "load ${devtype} ${devnum}:${distro_bootpart} " \ "${scriptaddr} ${prefix}${script}; " \ From patchwork Sat Dec 21 07:54:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 941 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EA6C73F08E for ; Sat, 21 Dec 2019 08:55:02 +0100 (CET) Received: by mail-pl1-f200.google.com with SMTP id f10sf6232268plr.22 for ; Fri, 20 Dec 2019 23:55:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914901; cv=pass; d=google.com; s=arc-20160816; b=TVL3nK4Lhe9DHCGOLd6lzpmM5NnP9I3qN/qUFz2VB5QdwnJ36CLnYXaLgszJ4cxDKT oksBih2F7Q9CW6vsI+sGZzudUWuYZla6PP9ibFjy7rgEGfQu8cuMZ/GK/9D8++mMaD7E 24KxWSLn7NdZ2fBVmN8jpr0rCr+glT+RbT/e+HvhUN9Ii3yKisQ/T41uT8L88dWAuaaM trH8aiuTdxRtBL3RRjcuIO6Y+tiD6APy5/24DFfnvchmBKLz9pHiZMBFFCYRQSpmz2/C f706MbkctMVJdH1mHbYKdzfoCaep8GLf6ojvkSjyYgisEBd1vJn8eMA6q24OS51v+V1B UH7Q== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=5UUA4ET7w3pXv2pVw6emT+HAaowc3n2h2T5SUBTY0h4=; b=kE3I2twQZHhq0MZ8HVv+Zsn1MGAdXS0QsX4Iats5TMmK58jB5jzRkNKYLqSnOT4SLq 8WmmOV/1b4yZXmMlLhTevtKwvSnG3X0wv9iHffXmbxpcCpQQ5BtIjm2yToeHpBNSIipD rSqjCHXxEwX28Q8GoZ+in6guATj5jM2L5KJtFEv2fsFD5cEvev/8d+NJZ9otvoMCU6v/ /4X2aX6IDLeBNP4kHOOh7QnSU0Wb+O+NyXjyy3srHtPHhDzxqx7WX0l/umgRR4Zc4k7c 7IK5WS6J6aHmvbNtSYzQSOaEaDl9tvGm9qCdppJ4pZsySyWl/tAQUT1x8/ib8UEXkVbt vkew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FbQ88WBF; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=5UUA4ET7w3pXv2pVw6emT+HAaowc3n2h2T5SUBTY0h4=; b=bdflymYKwupQRPcmCwsUd8sAs1goyaqjmgySODBGBjAzW8FEDncSsp48k7KN8gBsg1 TU4xC9GhDUBcnu4k3h1gT9snjLw7YfJhYXITd2rV7yHuStTDxMDpSWlqPdV5yA8mr5Zv 4Epq7AgbHEBypjuR/kH6229xlXmNiTWU4txTA= 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:in-reply-to :references: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=5UUA4ET7w3pXv2pVw6emT+HAaowc3n2h2T5SUBTY0h4=; b=VD0hxNsF/D+F3A1hdJJEirkE3DOxTLZiKaiIaRYZHhWKp37ASNAacPg1gIg+sroEw5 YB/gZmVpVdR9looxQCrZmEjsdKNHTRvAhHa8TN4j1UOtEKtJUf/hhv5KQYkwAb0bIfNJ 2e6eN5ZTLjXgCXCLO2cvVpOVoAEnqBTecYOqBckol2H2xciqnLq/M0X21nbqpkBvH0iS M2pjKh0Y9GrfA+ZgYfNtNg6SbjDL2e/OEKZ9FYHvz9KIxv9f/84enH8TZLimyShEaBAp A3I4Dka0fhLmuVymP2/TE4KIbd6d2lR3pDfRbw8F4/+6Jq4ynk/wdHuUawHsVdczMbLF oPKw== X-Gm-Message-State: APjAAAX/vhMuLtoTNR0YWaiUIxIKX5vRdnq6WgfRJGrFATruXejaUxkG xa8f6/vHSLwdcPiyAnSIO3rB4P/N X-Google-Smtp-Source: APXvYqyMZqAc05ka/sD2F5hDprxRfnpio2L1X8Dfo4LpYfj2nq4fs+yXv/msoor7ZEy6J0ygZhgMsA== X-Received: by 2002:a62:2643:: with SMTP id m64mr6544143pfm.123.1576914901033; Fri, 20 Dec 2019 23:55:01 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:f8d:: with SMTP id 13ls3077796pjz.0.gmail; Fri, 20 Dec 2019 23:55:00 -0800 (PST) X-Received: by 2002:a17:90a:bf0c:: with SMTP id c12mr20201446pjs.112.1576914900600; Fri, 20 Dec 2019 23:55:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914900; cv=none; d=google.com; s=arc-20160816; b=YbeYsZI6jvQ7BB2lC73Z2EMaKjJkAASiSfqyK0LJdIr2wWlPIeuaROJzxk3vxifyXV 7PmWf5l3BNFn0ia4N27EOzADgdJtYpc4B7nrN4vNWnafdoWNSCdYZ/gYXvFdCSR5o4BN ylLE/iCzaaSdfLq5GnR6sCC36f3j1P3trD8mtRRWjJKPfuF7aUluD3cUC4htP4P5jgEI 3Sex/O5cZ5lMvyR2FXev3eVlNOwpqq1C/9j6pvCrATiwNDgADrWS6ZYg6t3eTidEfYRT Ffg6zqYV+I4p599Lga+jPgXrcwAnUOT3KOFSWPnXjZ9/uVoOK/NjW2RHuoHP9kMPOwud igwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=lYNhFDqASRdOPyZEBfOp9gs20cntUjKWm7qO55vCvyc=; b=giYPDqxGKD4gFYUM5kFNy6EdF/eJl2ylcsPiljc1fJGURMozlOUQkvuVTI8kAE2qIm EBaCKW8lZU2YNpwq9s8TT4DCLG0/TPl9FmtwT14a8zkkWD7DDwPKFHLOLPo+FnqUIgnV TnVxIkUXaLv6ACGiI/WywX9W28siaykgZtRJUNF03kxTkE/zWDwlXMBit7UBq7DyXB7P I1Wvdrgh1smAx/C99VeLznxkPaTiHTC+PLAMQ3DNtcN/ogE+btjKbJZ3XYXJ0PTAFrOE Pm8hrAzq62TQrHrt3h8wuc6UxEK/tnVQ1Lz8MpyYP2HNhaL0zw8IFfGtznF4YT8RnwRg c4PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FbQ88WBF; 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 59sor5027027pla.67.2019.12.20.23.55.00 for (Google Transport Security); Fri, 20 Dec 2019 23:55:00 -0800 (PST) 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:820b:: with SMTP id x11mr19733982pln.196.1576914900253; Fri, 20 Dec 2019 23:55:00 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:54:59 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 03/11] rockchip: Include SF on distrocmd devices Date: Sat, 21 Dec 2019 13:24:32 +0530 Message-Id: <20191221075440.6944-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=FbQ88WBF; 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: , Include the SPI flash device on distro boot targets. Included at the beginning of the target devices list since the rockchip platform has a boot order start from SPI Flash. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- include/configs/rockchip-common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h index 68e1105a4b..4e6d6e98d9 100644 --- a/include/configs/rockchip-common.h +++ b/include/configs/rockchip-common.h @@ -11,6 +11,12 @@ #ifndef CONFIG_SPL_BUILD +#if CONFIG_IS_ENABLED(CMD_SF) +# define BOOT_TARGET_SF(func) func(SF, sf, 0) +#else +# define BOOT_TARGET_SF(func) +#endif + /* First try to boot from SD (index 0), then eMMC (index 1) */ #if CONFIG_IS_ENABLED(CMD_MMC) #define BOOT_TARGET_MMC(func) \ @@ -39,6 +45,7 @@ #endif #define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_SF(func) \ BOOT_TARGET_MMC(func) \ BOOT_TARGET_USB(func) \ BOOT_TARGET_PXE(func) \ From patchwork Sat Dec 21 07:54:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 942 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1DA3D3F08E for ; Sat, 21 Dec 2019 08:55:05 +0100 (CET) Received: by mail-pg1-f200.google.com with SMTP id d9sf4302449pgd.10 for ; Fri, 20 Dec 2019 23:55:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914904; cv=pass; d=google.com; s=arc-20160816; b=y7wHNaMhtvOctPgrGyLz/BKPNbesGiR76ltmBM87/Tzsypq+4gRj1g7rnij3QaaeaZ r+MzgngNUGa1HwluOVrCwP26lA9m6L/LmSdJhsjJ/lLwLwSAb0WGfg4kd4ZyOKh/v2zn 4H+E7lw6UXKYD8gNeYTUTBO6xvVH10vMLZQ2yTtNvVLx+4x98jEtI492wPcQ6+9EscMu wuJd3kBquq1pl59Vc+dG982/weEcPdLfTPV6CQK67r5noR4I05/iI1afypval7HX4e+G UtApYW3F53coBjE3gNA5mhZhv0WlBfaI+NZR5r6j6F4eFrUmo3Tg4ld+YKRrZVpRTWCj JQRw== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=o6u0vfLSRV8cwd5G/rNrsjSR+h6TNOweiOZhOATnNS4=; b=eCPN1fVaeIRW7nRm17X6Y6exrtoMNdQg2dXXUSY7kppf2xgzYHD03MenIjImGGtO3A /KcAk8FRJvS/Uin5XT+CrBW3dYRIxfyo3/scNYtgrOOzbPTxd4KOe/y67DOsKtE0lwvg TYvEHJknjVi+zhMadNphS/UKnAeJteqoXMTznO7bgZhx9PsiWEvwnKdEiAYWVeeKmsGL Cm5ceridMkN75l1H76GbPszYZk9Bv8GCrFOX0yT2ob+3xJTeIECfPE0NK0IaHJYygMfK vvEzmGWBucQW3bLrZnTvRtXbL7c5A3qXX51Xk2LepnItUgn1og9RT4pdowI5dmEom+Hr EX5A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QlsOmyiX; 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:in-reply-to:references :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=o6u0vfLSRV8cwd5G/rNrsjSR+h6TNOweiOZhOATnNS4=; b=Xq5CfqtqJDF93lt9DlmG/0i71XxRpsU2huLbRIpnqWaUNsT7iskxi6loYHrFeqZyA7 XElvsAPF2zqC5X5rz3R9xLNSw6BGTlO4Lhna8+1qVHHYoLv9qL0UEBpaKspqolWS+e02 MYyBTwi3eZBa4Um8Lh0DevgPEAcJn1ZgoTxmM= 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:in-reply-to :references:mime-version:content-transfer-encoding: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=o6u0vfLSRV8cwd5G/rNrsjSR+h6TNOweiOZhOATnNS4=; b=KeeScl1DjjrU/Lb25pCcy3QXZ2IrhpUmMjF8fyFtdCpDs5tNpJ/MzU1HMTSgnDyQWC l2mxG9Mt9o0hznErYis+SHlf8WhS4SioN8DxBd7yllQi/PAXnLn/fTb0pGu3qhGiBm2r m9WRW/Kqsw5pEK1wqxwN85U1LDo3XRGO/5yatCYARX41IKqu6jwxatyKPpO3j91mxQNF YW0HTCzZjFJwPrrQR+FsbRx4pv/leBh4Lw0SzxHbb9Des7E4NQn/sRzEWu/BSPNUcvBd FpmvgkOKm065lK/7ik8ZkKEmA0ApOXSb2eGE+mZbrqQJQFaR63SZ8tYzms0Q6prkof7b xn6g== X-Gm-Message-State: APjAAAWpNq8igYTQdovA1dLNH7I2GmcJSql5nkRin8d2toUyyQ0d4lgJ stCGsxkGdYkkmV0RhmRxgq5M6DQb X-Google-Smtp-Source: APXvYqxnnt0FPWA8fdqDZdIlCU4lsVPc5laa3YAs/P6/WC9Bfj0gZ0/xwJMv70XlJ7E7GZFUu1EcrQ== X-Received: by 2002:a17:902:6ac2:: with SMTP id i2mr19447664plt.221.1576914903820; Fri, 20 Dec 2019 23:55:03 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:880e:: with SMTP id l14ls2206496pfd.13.gmail; Fri, 20 Dec 2019 23:55:03 -0800 (PST) X-Received: by 2002:a63:3089:: with SMTP id w131mr20091666pgw.453.1576914903348; Fri, 20 Dec 2019 23:55:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914903; cv=none; d=google.com; s=arc-20160816; b=m+x/Je5gxdkS5ujnkNwnfpgJ8Iw9zQdNlh7GKxwf5PqWuPY76oxQ7a1cR1w9sEjhWY pcsxlNrW8SnutC7fneUOa/xcij69vg/QkEsc9TU8KovCFyD49BVmbKqH2DHeh+Uvi2ol 7F99lc7ibFRc1F0/vooYlaMFOoT1fCSSmVxuxIauvJGiKTq4LFJgEB+dszMgRVD/K7t3 jpOKV7qt/HTfDqbOueE0ac0DVxhkjWgBJqp+Jl8MpHqqLTYyV7j200yvC9MpJ0EgPYE8 squok4+ecfzBxZCqtlk6Hdu22AXYf0NCH0LCXREXixC4OflVfGPXqkw0CISXXLFi7nay rCZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=PD7PDJsuTgCP1UNeKowZcnqFlFTcD11r0cEdAJpebdc=; b=q+jOvbWouX6b8hQ8NBEQdIuvurw97nrOMgcNI309v6kzk8+PvqMgTN47j2CWCelg6l TWj2nKejwwJKUtyyaA3fskkc1EhcEW+BxitzHz4j+TZZV1C36piQp6Hu2FJ/fnhOj54H 7jjJkI56SO1JmiLi5+g5Z9XVg6S/MGO2sYDNfaatvW6ebXuntj1rSlls2JQsm+A+5y+q rwYCtYSAPQlThOvf0yatxi64EFfjhb1+x9WBtFs7pkgYyrPOtzWNXTs7K/NY+aG3hBf1 +2/tBN9lOfhSwb0NQqzmdt1McaExtdbJDhWiczLi6/aCPavZ4nVS3tVIPjJSlj0BmZVZ qcnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QlsOmyiX; 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 6sor13434472pgi.43.2019.12.20.23.55.03 for (Google Transport Security); Fri, 20 Dec 2019 23:55:03 -0800 (PST) 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:a63:1853:: with SMTP id 19mr18839965pgy.170.1576914902953; Fri, 20 Dec 2019 23:55:02 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:02 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 04/11] rk3399: Add boot flash script offet, size Date: Sat, 21 Dec 2019 13:24:33 +0530 Message-Id: <20191221075440.6944-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QlsOmyiX; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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: , Most of the SPI flash devices in rockchip (rk3399) are 16MiB size. So, let's use the script offset at the end of 8K.  This way it cannot overlap any offsets being used by software components in flash layout. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- include/configs/rk3399_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index 127ca1f09c..92eb5cb750 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -48,6 +48,8 @@ #define ENV_MEM_LAYOUT_SETTINGS \ "scriptaddr=0x00500000\0" \ + "script_offset_f=0xffe000\0" \ + "script_size_f=0x2000\0" \ "pxefile_addr_r=0x00600000\0" \ "fdt_addr_r=0x01f00000\0" \ "kernel_addr_r=0x02080000\0" \ From patchwork Sat Dec 21 07:54:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 943 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AB0B23F08E for ; Sat, 21 Dec 2019 08:55:07 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id q1sf6564505pge.12 for ; Fri, 20 Dec 2019 23:55:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914906; cv=pass; d=google.com; s=arc-20160816; b=GpotcKFcdoz/DOXaKNmmbO/NI60Yu5UKuj6gkZ7V4or95Qih0bpBCc2yxYZEjORcgU g03VD4m00Mqn69IqJJAR5jSXjqf6pA9GokgslLxzx6jm1txucVvf0l5XtIhFz8jkH6r4 Y92lTDY35JJ/zHtkx64fDnfW/7mCply5RkajWr+hD/GQlp1D4UqEmExMCTDA4YiEBXdG N6fW00qEzdSeb57W3JYjZFbJC2m0JygLeTokXTiT2Fv7bucUk6gGsbopI2CZLRIusY9t 0y1Z9TgSSiXGzD2/matyt3/NqWPXJfyUu0c18WDMEMPKp/oine+Z9g/XJkt3YfGJo2Kr lPpQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=aSdlyVqgQOdeodSDs2ZmK7NBCHeQdWML4pLVVcnC/xQ=; b=0KlAOw5tTCwTdbUQkkHdurjuWEaMlDTioFvqmX8Na12PtRR6n0kFt+gHL9foiGVyBB KalpoNYZxMGiUh61kCMEXOlaH+8F2IWsKmqdJpRbpu1QvFPCO2+/qskZXkIwEdeCb5gy KjEcgBKBt7EXsZ23f9R6TrTebq5jAQfKiqQpQavtGoHmQUL8HP76+KuZ0LzsO9pIM2l1 rRjFa5ZxtJRoUmCrB8vFnY7WtOfximeahQKjaoeRH3OOIl5fAE42l70Tn+7/Sebb6qmw 3fgKX7E0nW1VU2qzEUS11g65oU5/dvD4FRwostgWuUDAsGUQ4mVV8/8o26SpNNKFaT6P ekxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Isn9ZuSC; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=aSdlyVqgQOdeodSDs2ZmK7NBCHeQdWML4pLVVcnC/xQ=; b=P4Ok04FzUpr4X+tOE9wKv4AU/iGHUPD7J9ja/z0zsDsd8QYf+EIok/y6MOWhbxFtOv fQ9oVRza0/S2RWhWEk2QORCRu7ZclZHhNEzG3cKbPWnT1i3Y+qjJ4N9lDuLRnYoi7F96 Pk9wE0YrIh8VwnpmJl7gayj1IgGFYbDFWjLjQ= 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:in-reply-to :references: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=aSdlyVqgQOdeodSDs2ZmK7NBCHeQdWML4pLVVcnC/xQ=; b=hQ88a5BrG/CwgpYRMdgCHjxii18ykCQ6GmL0F/VnZTlVBGhREa9roga4DmibLkCUxE afT7hDqzUyuMEC0I1zj1uTQ4EHQvwwVTnXDSGDlvzTdoUNJstpEty2bEuOoDoXitZGL7 lgyTd5cIUq6K7M/4i1X2RueFBSz517GVjQtZnFf6El14L6HwQhJ7W5pa7XS3uihqbx0K /8jKV4pNh2ida/13mIwmv++OJv3IbzJl9ep+MC/QywMcV9O0kKKm6PQcez28pUauthlX Wr7XRh9+XFRfU6KxtRTcuAq+rkFwugbGV3rzCQg/t5scWa1xHwZbYtNH0CyWhm72JF9y wlnw== X-Gm-Message-State: APjAAAW1smCzc4vJty6j0wXwp7WUQAJkd6JmoTX5LiSfCvhMve0QOLkR bN5lybwAcOcANpKD293jC2rKmmo0 X-Google-Smtp-Source: APXvYqxD4PcDdZwpkzCBAIpXRn6UxL2CGOo3FD9E89UYD9i+DDbXAWCkA0wEhsQ5cwXqScMJHIO5/Q== X-Received: by 2002:aa7:951c:: with SMTP id b28mr20331700pfp.97.1576914906529; Fri, 20 Dec 2019 23:55:06 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:84d9:: with SMTP id x25ls3050266pfn.2.gmail; Fri, 20 Dec 2019 23:55:06 -0800 (PST) X-Received: by 2002:a65:4206:: with SMTP id c6mr19584992pgq.46.1576914905995; Fri, 20 Dec 2019 23:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914905; cv=none; d=google.com; s=arc-20160816; b=svgVWxXUrzv4aC0b3G6f2HkRaet9YlajELMCNsfw41zgi+KCejyvNwpt5ZWNrqV7Tc cbvGLCm4cCa1iUiuRxEa/pYl2jKLxMJflFDIpCugGNtaHHzioIQhRsr03aEGZHduE3j9 7Hdlwo3dY9D8RgMQrx/IjlwRftK6tOM6XTX18F/q2FAxhmMh1XZP0Usp/3akc2zFOS6l Oy9udQtYhC1t4VY+/jyHDMFwXQV26adEYFVEra1+5IyopXpGx5Fm7ZCIgH7EQRQsHNM2 4qpa5t8+mnFcnQOC3YGsYM8sWaScyccAgZp9JSWhBxiumeleyDip940+gdpD6AsAFf38 25Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EuID1Upv3NvQK3+qZN8HCyunOqQiAwANLQfiZfbMwY0=; b=i4PgJBAc67GPWk7KDIg7lEVEnPWsSd4DuWJ7stWgyUqfLHzo3WFWxYsSOXMACW0zGi G9tRE3Eaad4Beo7fXt/vBNVobMNXtG1lIkjQNjYJT7SbmA083PbrC00WEvUF3RGu7ITM B0PXAdvoPwvGxyhl3UkeERwRTh2ouDvZLzAzZ/hS5n7fvTc9azzinEFgqoaNri8Q1THd ZqN2IdCmNRkk4O842wUR0LY7cECzqf/D/nkHCwmyYSA1/uP8tX22lvEA3H+TL0Y0Bu3o il9FXbcEvyf8bEsYox1WMrJIsCN1fdGy1gDC9524fswSDLoC/rKMCATZotBf+jitVphq iMpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Isn9ZuSC; 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 33sor13349851pgq.35.2019.12.20.23.55.05 for (Google Transport Security); Fri, 20 Dec 2019 23:55:05 -0800 (PST) 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:a63:d802:: with SMTP id b2mr19334351pgh.414.1576914905694; Fri, 20 Dec 2019 23:55:05 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:05 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 05/11] rk3399: Check MMC env while defining it Date: Sat, 21 Dec 2019 13:24:34 +0530 Message-Id: <20191221075440.6944-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=Isn9ZuSC; 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: , rk3399 do support SPI flash as well, so there is a possibility of using flash environment for those usecases. So define env device for MMC only when it is used by specific configuration. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- include/configs/evb_rk3399.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/configs/evb_rk3399.h b/include/configs/evb_rk3399.h index b9c4d683f4..c0b0358893 100644 --- a/include/configs/evb_rk3399.h +++ b/include/configs/evb_rk3399.h @@ -8,7 +8,9 @@ #include -#define CONFIG_SYS_MMC_ENV_DEV 0 +#if defined(CONFIG_ENV_IS_IN_MMC) +# define CONFIG_SYS_MMC_ENV_DEV 0 +#endif #define SDRAM_BANK_SIZE (2UL << 30) From patchwork Sat Dec 21 07:54:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 944 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8569D3F08E for ; Sat, 21 Dec 2019 08:55:10 +0100 (CET) Received: by mail-pj1-f70.google.com with SMTP id 14sf6734562pjo.3 for ; Fri, 20 Dec 2019 23:55:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914909; cv=pass; d=google.com; s=arc-20160816; b=XZwWCXDJ0GYjW/2fKXZAqFGezt4PqfuixVeD0KZJIXGqKJ1rjGQLZQx67XinLn4RwC 9hyUJoD6lGGift4MtIyMWSzSoV82uGRTimXQ2bAmFnYofhiOJDwPiLywZtuNMRA8YHgH SD3vVSx9Ha48n5gXUrSDXqZoJP4OWlBOnGyscuzsbgJ4nL46WiZqmgvvRR/LYV0wpjXD 87UvLuTCB5nEcthWc6089rcUKJyLygtY+/FNUTPJuEQjg1yytL6yJkz3du1ov5WcKQOJ UU+65jLCtzZrkP3rP0/FHRK0jX5n1swoegCXN7NQo7mW+ttf9WmsBaWMkqPczRt7YvMi Mv3A== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=I1xauwLPZLUDXpsw7rF7VImoXX85FitTLpC1PkElKAY=; b=AT7rUy/jiRvaYtrBS3crwaMfAH/nDPA8heT1MaWE9oXkQV9+fTW5p234Gy5Zoh3Sl6 azA+Yd4yTmznOccv2kkMZjfGTZzcGi9tBlUVSaWwB9zAPhga11vjVdFFEjJmy04WXjzk iPsUFImrnbC5WVwGGvFv4MKc6+ZbEhdD6fkKyoqFHvx7vDOCs60VGU0+ZKDaevkCFHtZ tykjQmMQlQGK3dr3O2/N+gc+t35HAQDRMrMNP7AvX68Kro1QD3+rrdfaBP4klZijoktT Pg7HVAAvZ6oGH+DDPywXBlsfuzfNTJkwDbx0L5McR375El37Wi3d+TUTZFvBObY3dWmK rhzg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QfZmlyqP; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=I1xauwLPZLUDXpsw7rF7VImoXX85FitTLpC1PkElKAY=; b=YRBejRcsnz2vr1twFHeI7hEk6K7Tt1x26/t7/EcGoHIFm+zP2E235P8tzN/LTjBN9U bEhEInDnbcueeo7xGMGhgGk8W4ttn5pL/B7TTXh4yDWFL4DjJ2RW0x1YGBuvjJciEBfU g/Pmkobxjo1VesTa7XROK2pJvgTFiQEWzp94E= 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:in-reply-to :references: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=I1xauwLPZLUDXpsw7rF7VImoXX85FitTLpC1PkElKAY=; b=imZog1PbdY8tN3kpgdCMwO9Qk5RnKiReEBiSpdo5Mc+nCbqfzxfcTNuI2Ab7DGzJ0Z 9ND3Y3JmOyHJQ7Zm4Qkoc6JL11cRd+CDEM982zB249gRwReTyULbgIm9duUlZ8pB2hne ZhQGIqcseiy7sj+gCfPEbBESJmwPz0WKAfcm5zSe2bsRgWGBOe4UZu1RamW+8Lf8P0ph zJztgJDEPMkkCBXa1D4AvEAXV5cERxlzGYdm9dtcxKdsXVbaQgEEfO8Oypn+5XF4p/Op amJaL+xexNTPbkGSw/cIHnu8P4tN7VmYRMSAhL4COojCg9lLV0RRJgbUlgRKR+xZSWOx QnjA== X-Gm-Message-State: APjAAAXkaZhIek6Ck57XhGJvMw21ymceACLf5Dr66ZSV0OrqqOBPOAhn f3W92lOMVv/mpyPuYJYOIpZqDOoU X-Google-Smtp-Source: APXvYqxZy8RWIcE+xpIvSrPmH3OXaGmcD2GFXNsvNnnPlNfLAg214p1Es00piTc00qN2K0EauUTuMg== X-Received: by 2002:a63:1908:: with SMTP id z8mr19464179pgl.350.1576914909267; Fri, 20 Dec 2019 23:55:09 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8048:: with SMTP id y8ls3047240pfm.10.gmail; Fri, 20 Dec 2019 23:55:08 -0800 (PST) X-Received: by 2002:a63:604:: with SMTP id 4mr20168483pgg.406.1576914908684; Fri, 20 Dec 2019 23:55:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914908; cv=none; d=google.com; s=arc-20160816; b=KZyCFwUTWE9CN89yQJyDvSJVmWoxKMzUn0NvnZWUS1FhTGIEw/Z7WXY1D9RwNVEgQH m6/aLV/iZfAQQVIVH3ByFETp5DTtMxwDfvodUsHOJj8NbGpDXXssw2j0Ce7Tp7lbcUYB ODZDuYJtMAP7zdTVUHQbBcKd9H++5NZjFTgvHozYMfp7qMCcSKQEsckDSZ65xehxxbOB DwvEKXv12+9dKgdZ6Ncdu33ia8a+jkLFVjBEeU6pvJ5Uw4VEQepoqbzi/1jyncY9qyYR rJ2w4etsu0IB4cBwgLbg3knkLcWtXfVzGc54FAjFyTK/LKpWRJMRq9Dskcyg1mIMhP7E jQRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WGB90yvfu/qbXtiS6a4vXKmXBIXqxoljZrUUSd4jX/4=; b=CV8VQ4RCHvVKCTMrYfkaBXgeQ4LFnrBJbAIxYF3efqDUwZ0Uze+BEvUP03csJ9Zurd 8TXtqC3oeE1gNQfLZzxBMufgvy5RWiz1iNjL6HYbmxQf+lkBiX4LoqgD/bKGVeUReKsV +qfMxz9oEhTiLY872TXjKS8qJjZveM8B8Xe5+Z0loK2QmC4j6HQKYDsL4lwRPjFQ3esQ 1odNcsQ5RooywEw4VtIi3iLd4Ovcw9IOyM+pPhqVavBgmnnsFqMkvAaD4uxq3WcKrlop fQJYsisanOgWZE/wgOhum/0EvR5KTOM46xPJLHJPYqHa2X1qLcofV7bfZwWiJ3zCW5bQ vV3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QfZmlyqP; 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 k11sor13320725pgr.29.2019.12.20.23.55.08 for (Google Transport Security); Fri, 20 Dec 2019 23:55:08 -0800 (PST) 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:a63:590e:: with SMTP id n14mr19041557pgb.10.1576914908356; Fri, 20 Dec 2019 23:55:08 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:07 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 06/11] env: kconfig: Restrict rockchip env for MMC Date: Sat, 21 Dec 2019 13:24:35 +0530 Message-Id: <20191221075440.6944-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=QfZmlyqP; 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: , Rockchip do support SPI flash as well, so there is a possibility of using flash environment for those use cases. So, restrict the current env offset, size for MMC. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- env/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/env/Kconfig b/env/Kconfig index ed12609f6a..9416a70022 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -488,7 +488,7 @@ config ENV_OFFSET hex "Environment offset" depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \ ENV_IS_IN_SPI_FLASH - default 0x3f8000 if ARCH_ROCKCHIP + default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC default 0x88000 if ARCH_SUNXI default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP @@ -511,7 +511,8 @@ config ENV_SIZE hex "Environment Size" default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP default 0x20000 if ARCH_SUNXI || ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91 - default 0x8000 if ARCH_ROCKCHIP || ARCH_ZYNQMP || ARCH_VERSAL + default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC + default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x4000 if ARC default 0x1f000 help From patchwork Sat Dec 21 07:54:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 945 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2D7C23F08E for ; Sat, 21 Dec 2019 08:55:13 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id a4sf6548841pgq.23 for ; Fri, 20 Dec 2019 23:55:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914912; cv=pass; d=google.com; s=arc-20160816; b=OZgJ/RUKQl7fy0KFDBSYMtmdsQwBl9NGWVkVhKLy9jd4msBmmGwP8Q+RC+JxzuDFND sG5umh2+YkITFRMRUejeEk8PV0dePkel4jxQ3xMKuDWaZSvtdZ/tfbXW2QVeT4JJpC7a XAskWE4xgPKcE6deEDEoGpS9lsa77ev8quQOXcaRea6lAqFy5tMsnP0G4dC+YgakX19c R4yAlF2CTr+YdRAtB8y00udiE+dlpIPyidB2Gl4WqzNXTWl5Z5u2Lf+9Jz7N/V49sj76 V3xK+2HApl/SRlrvHAbBc+x0SlMzOOnwiewYayaiiXc4d42Ste2w1aDIdhoLD+jq5qcV Uy5w== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=AUiYCZkZEHVgNzgPOAMxYjpW3FPF9pEMimyRcjLzaj0=; b=SUVy5KLT81xyTchZ62BPIlAmvyQoTayFinyRQU1lDZiJv64+4azYDz1EeiSlNb4mNG lSNqmbDCBq0HvY1sTfyvcSvI/bZSB3tbRj7FrF2xd3s0B8CLIk3VfE8w59kPMqfVXN9M nuypTfGOBd8UuJSGAwKL9cX7edjV7YwAMGChQMHBJHJU9aHQuO1rzOptxpzPPf51Z4Up q5Nm9U3SjXbWb8k85u82EswXem2M9bfFotDU6VbL2qkWsgwAczT9oZwO0k4NmZHXlflA 8/wyLigurJi/kedO2Rp1GExa3FFU6MOx/tJToGxmNO+vosmGFqbWdPjNC4CgMUuExyeb gKIg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ibrsttwv; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=AUiYCZkZEHVgNzgPOAMxYjpW3FPF9pEMimyRcjLzaj0=; b=T5Ymj5zh4PfNNo3NVCPMiujBAQYG9KIFA7AMnohuCJXer/mVafpibgWKFFc5IIpp5S APb+oueO+v9nxnRUMxsDe5i/oTU2xLcjLLY23fWQ7ND+qls41B2XTm2H42DgSPLgXxbJ o0GXnSQMUL6meGH7v7TgB8c5/0N5oKSgO8pR8= 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:in-reply-to :references: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=AUiYCZkZEHVgNzgPOAMxYjpW3FPF9pEMimyRcjLzaj0=; b=b444Ga3n2lBbo6CnjbrbPC/5jQAU5xfaIXIwWMR3h0vptGrlZTHNUd241lV3fiXWrm 0VoDZATmxG9piieDqjxxwmv12ApeXX95+RdxMYqXm5B3hq4qZcfaZLbJr8uAvhOda0ih 6yfJWWcptMbNXr5MRbeQ+qfYIc3MbSdByviXQB31bOEc1qS52NszhtW/DmXZa4iOUfaZ npb5hf6+mDKek0NiBFeyFVs3Z0rkYJLdRB20uLDO6j7gCNUdU+Zkw9JEQZHVIKJaHEkn Y8VnYJP0JeRpwMOIXY3/yZ48SViZEFK0XtSgM25SssQvXlTBtqUS+PjVg7kIGtDK+xax /A2w== X-Gm-Message-State: APjAAAUZA476Wj1iZRyMyAl2VSFIcxuNEisyYe8UojUK/ucOoU+xs8k+ BoIfMMMFlv7kqoYUBJp8HvzojYw0 X-Google-Smtp-Source: APXvYqw6Op19uFcjcGpssY9dRT/qkRnxvHYXpw/dnGDXrPJhSphHV5KI1fnKnTS8REv+J2UDrExUsA== X-Received: by 2002:a63:ed48:: with SMTP id m8mr18986239pgk.399.1576914911859; Fri, 20 Dec 2019 23:55:11 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:cc:: with SMTP id e12ls2949282pfj.6.gmail; Fri, 20 Dec 2019 23:55:11 -0800 (PST) X-Received: by 2002:a63:1953:: with SMTP id 19mr19034788pgz.157.1576914911380; Fri, 20 Dec 2019 23:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914911; cv=none; d=google.com; s=arc-20160816; b=Emq6kb+feMyI1/BjkDeoWEulw5M8nPLDvMy8H+tfD/rEuGipiZC6p6owyy9MYzLVGl +DglPv5GGwi/Vuy8sNm26CDLIy0EQXFY40GC1CcpuLnVH7oXqNj0AGVvvGw4SxVw6KvB BIuTS8zM0v+1xe+k5mJuSIMkNWBs2QKZR+tVuZrmo5/UVsY00UcZeiRMHGRRUi6B2oyP 4/29LaK+2c2gyQ2MtaUKibNYlDOZt0WhW2KK/bygUawMiR1d5bsET7jfpKjbqQmNJsY6 zxZIY8uoxxsMch8IJLbLIdsCMOZrz7kCEjCqPnQ5HirBTMpy8dxpaco53a5LIlHIWoF4 Z9TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=O6MjjW/9J3RipD1dwouziFiSfBSsJxtZgCC8FcpGAZ8=; b=0+C0QWa4FDDiEdQOuJjFEUTuDrhwM2VzxkqpUPOOU7IudKW4lO2rNlFUzvsqVGwkKC ah700Fcr4krNQqUit/EGpOIiaMPuw6GaI4RwuwYEefSbsHp5ciFMA6IbX7Wrw05v57jM df6fOClJvPX6i3sNwaoeGGl5aKfs+ctBcVgFzJ23F1+SNfjQuwTrS8Zcy1T61UnSI5qm P9eh40xFBYHTbZQL5p8DfMmjq1xQFIACgHbvWLn0V67sbsce0Z0wv12b7t0IkmDVurcG DbFw1bg3UnhS6OnSlm5KNJiNwTc2q3BmfY/2xMvRzifOcBaGHQ45b92fMa5OrCBCG69b HsUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ibrsttwv; 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 x15sor13399558pgf.28.2019.12.20.23.55.11 for (Google Transport Security); Fri, 20 Dec 2019 23:55:11 -0800 (PST) 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:a63:fb05:: with SMTP id o5mr19647783pgh.355.1576914911075; Fri, 20 Dec 2019 23:55:11 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:10 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 07/11] env: Enable SPI flash env for rockchip Date: Sat, 21 Dec 2019 13:24:36 +0530 Message-Id: <20191221075440.6944-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=ibrsttwv; 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: , Most of the SPI flash devices in rockchip are 16MiB size. So, keeping U-Boot proper offset start from 128MiB with 1MiB size and then start env of 8KiB would be a compatible location between all variants of flash sizes. This patch add env start from 0x14000 with a size of 8KiB. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- env/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/env/Kconfig b/env/Kconfig index 9416a70022..1bb3e1078e 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -489,6 +489,7 @@ config ENV_OFFSET depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \ ENV_IS_IN_SPI_FLASH default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC + default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH default 0x88000 if ARCH_SUNXI default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP @@ -512,6 +513,7 @@ config ENV_SIZE default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP default 0x20000 if ARCH_SUNXI || ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91 default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC + default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x4000 if ARC default 0x1f000 @@ -521,6 +523,7 @@ config ENV_SIZE config ENV_SECT_SIZE hex "Environment Sector-Size" depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH + default 0x2000 if ARCH_ROCKCHIP default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91 help From patchwork Sat Dec 21 07:54:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 946 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C65373F08E for ; Sat, 21 Dec 2019 08:55:16 +0100 (CET) Received: by mail-pf1-f198.google.com with SMTP id d85sf5940513pfd.4 for ; Fri, 20 Dec 2019 23:55:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914915; cv=pass; d=google.com; s=arc-20160816; b=ma8eF/StsnbEmGppBWJxLbY4fOTTzNVP14v/b4sBtixeoOj4HapVyobvRSNSmBQTc5 kkdCYL6K+jA0zfP+dNiZhbjcguqz85o5G4GOtkMbLWY04vns9Mycbl7E9/iAUbHBqSl2 Upf77HyvHVGH5GP2l+aT/LBpdhvizr7jxi8YrCOVNSiHqSxN4GFuoBrwDS3RCZFaLXtt 2mtOoZjV16DGICUI40q2aVob94N8BBxDreV4bR35X/MRXXHnzawGQ61GssdDWePcnAIN eKy4KM8IjBJ2/uZMCf0bQBrFeO+jdyvo2FeTCqE6C1T1ir0qaP+IEUKtQyWYgNW7v1g4 nTeQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=oUfxl2rbHToTRHjqrvL4MxTJi59l7zWGYeVXrMpTZu8=; b=AjT5z0m2CslkBKt6D/woPsNKPGPIVksEj8CV2lax2JLTFLf61CN2balZV7sz8jKtx+ myp4eyzgdhlyaMYZT4R2Kj5N9OGrr0WslBjf349lCToScLuxZ4hhMUg2PQm5TTAgxRYS LRicjXZJz/fCh8XIepp/2xqUvaQW1MRFc6ujCkEd99G7oXzhWTzLuM03uWHPYbAWbkwz mwar3B9UNwIyAs6y3SB8jwq6IjTeNy5LdH5U/t/YceoelaNH18bZbOpA0A9lSdUs/p6W ERcpFA5UpCoSwCg4B+H9a4g6Xhjr6/wAq2Jl51Uzm6E2zTcC2wrT80/h3L6lGGEcFc/o P50Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=brmegbe3; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=oUfxl2rbHToTRHjqrvL4MxTJi59l7zWGYeVXrMpTZu8=; b=T3S9387Etgqr7dnBu9CK20gWO/IRKnA1P5/phqxkrJVtso5S6Zo7zD/0r0dAxAubkI IhRpG1Nj57Gbwrwxo7Bs6RT5UgLKueAgFqDGh1DstCcNqBacT8miBjbvv32oJbH+WtUk LUGJ9mk4E0BOzrtlSs53xqa4JnuhzYL9ZKc4g= 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:in-reply-to :references: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=oUfxl2rbHToTRHjqrvL4MxTJi59l7zWGYeVXrMpTZu8=; b=KCNLgICpOjP9SlMszxjhFnVC5Vw0mTt5zA5PESVe+/T04xxZTuG55Dev5Y+SfNjRaU zgkIGxN5+dhA7OvstMn7o6y13dD+J8LpTuLmjyQHpFq0YMjbTlVSM3gDk7ryXpzN31BR 64kW/s5YMorS42NVs9voneY12QFCB6YDpXgfAeeQ6ftR/fr/956L/shPyCuqkvoZuyG9 rnawBaKkN5iAwY6QCUXyQkWFfAGeFxJY9FfCthQ63O/ZZ9DQgZORIkLhm9N9lf0lyjLC ISZGo4+VhkDsfIt7cKtuo/GeJZw2uiRKtfWIj+GSWZt1szm0r8yyNY5pwrssUHXtcpEz NbhQ== X-Gm-Message-State: APjAAAViGtz7iluavdlxnUNG0/aMuygGCvXmijYBbPu1DSxSYa9JvV9S 6yV1P1UU3fLTpLAY4AtLnCgUcE8e X-Google-Smtp-Source: APXvYqxaYkdcpTUccjg871i7xVsx0b/YIodoGQUAxat2EzKDfR5JK6CrHtQ3SBiCFDhsbuiuUHCLvg== X-Received: by 2002:a65:4109:: with SMTP id w9mr19222158pgp.383.1576914915256; Fri, 20 Dec 2019 23:55:15 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:cd83:: with SMTP id o125ls635765pfg.5.gmail; Fri, 20 Dec 2019 23:55:14 -0800 (PST) X-Received: by 2002:aa7:914b:: with SMTP id 11mr21382021pfi.69.1576914914667; Fri, 20 Dec 2019 23:55:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914914; cv=none; d=google.com; s=arc-20160816; b=ZV6p1HrAB2GCWt61RSBnaL1ykNflQMkcAMqCHrGhxALHC9nfZq+TZF9ciCctdVwDtY 2TFeWiD39699ZRQkQJ1Mo7xpxSyWFR54QF6Ca66UCfA/S+RxYfNn+SA92nLNW0jT7TOQ vBf+OZhAfg4Se9XZdvfWk9ipDl3urH5sQ/6M0nMFnE+7xvaKDHW967GH4Cn/o1kl/vVz WlbK5aFKzychCJ4X76MZgwl/ud/4CIu+oPPPIsjpWJnO7qRDhf+6IJ55ra+uxueePE6m BNf7CPZOdw/ZwRzbibjs1T35zMvdSUPFmS2QdFsxLuxWn6nrjReZ31BNftVc3eKxGkVm 7DIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1p48KCDAuS1haBz54BrvKXFNHldZPt//BRLsOL1HOuI=; b=DPIGeFVe7kjWDN7FbvX8ZBRTH7ykyPI7RNt1beWjlu81ZpriWzKrymkuK48irj6gBM OKs5XlKpcYaD9kJbIEvDPVwuohzOKbqZGXTV6/sAhDWVQW3k8lg+vmKsdK+bL+KQ4cZs EgXVNwfA9Em2GccZg2MzVSi/6CKdMsiPQYdnkkSL6DUOO0ltkslTp8VxlSqkW9lZLyhk rOKtvmrl7tnDoaGSNrkESNXEpiYsw6DTne9A8mvWD0hNYsIHwgUYvtrARSyBfbN9h9Tn 8ctD5ZPRDxJ5XYUXGBVInwT17BV3hCx5RVaL7mzB09Cb4kfrrJ4wmF7wVYjSos/QBjMK glXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=brmegbe3; 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 e5sor12659525pjg.10.2019.12.20.23.55.14 for (Google Transport Security); Fri, 20 Dec 2019 23:55:14 -0800 (PST) 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:90a:c389:: with SMTP id h9mr13389769pjt.128.1576914913924; Fri, 20 Dec 2019 23:55:13 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:13 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 08/11] rockchip: dts: Sync ROC-RK3399-PC changes from Linux Date: Sat, 21 Dec 2019 13:24:37 +0530 Message-Id: <20191221075440.6944-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=brmegbe3; 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: , Sync the ROC-RK3399-PC device tree changes from Linux with below commit details: commit ("arm64: dts: rockchip: Enable MTD Flash on rk3399-roc-pc") Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- arch/arm/dts/rk3399-roc-pc.dts | 673 +------------------------- arch/arm/dts/rk3399-roc-pc.dtsi | 813 ++++++++++++++++++++++++++++++++ 2 files changed, 816 insertions(+), 670 deletions(-) create mode 100644 arch/arm/dts/rk3399-roc-pc.dtsi diff --git a/arch/arm/dts/rk3399-roc-pc.dts b/arch/arm/dts/rk3399-roc-pc.dts index 257543d069..6a909e4eef 100644 --- a/arch/arm/dts/rk3399-roc-pc.dts +++ b/arch/arm/dts/rk3399-roc-pc.dts @@ -4,677 +4,10 @@ */ /dts-v1/; -#include -#include "rk3399.dtsi" -#include "rk3399-opp.dtsi" +#include "rk3399-roc-pc.dtsi" / { model = "Firefly ROC-RK3399-PC Board"; - compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399"; - - chosen { - stdout-path = "serial2:1500000n8"; - }; - - backlight: backlight { - compatible = "pwm-backlight"; - pwms = <&pwm0 0 25000 0>; - }; - - clkin_gmac: external-gmac-clock { - compatible = "fixed-clock"; - clock-frequency = <125000000>; - clock-output-names = "clkin_gmac"; - #clock-cells = <0>; - }; - - sdio_pwrseq: sdio-pwrseq { - compatible = "mmc-pwrseq-simple"; - clocks = <&rk808 1>; - clock-names = "ext_clock"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_enable_h>; - - /* - * On the module itself this is one of these (depending - * on the actual card populated): - * - SDIO_RESET_L_WL_REG_ON - * - PDN (power down when low) - */ - reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; - }; - - vcc_vbus_typec0: vcc-vbus-typec0 { - compatible = "regulator-fixed"; - regulator-name = "vcc_vbus_typec0"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - }; - - /* - * should be placed inside mp8859, but not until mp8859 has - * its own dt-binding. - */ - dc_12v: mp8859-dcdc1 { - compatible = "regulator-fixed"; - regulator-name = "dc_12v"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <12000000>; - regulator-max-microvolt = <12000000>; - vin-supply = <&vcc_vbus_typec0>; - }; - - /* switched by pmic_sleep */ - vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 { - compatible = "regulator-fixed"; - regulator-name = "vcc1v8_s3"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - vin-supply = <&vcc_1v8>; - }; - - vcc3v3_sys: vcc3v3-sys { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3_sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - vin-supply = <&vcc_sys>; - }; - - /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */ - vcc5v0_host: vcc5v0-host-regulator { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc5v0_host_en &hub_rst>; - regulator-name = "vcc5v0_host"; - regulator-always-on; - vin-supply = <&vcc_sys>; - }; - - vcc_vbus_typec1: vcc-vbus-typec1 { - compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&vcc_vbus_typec1_en>; - regulator-name = "vcc_vbus_typec1"; - regulator-always-on; - vin-supply = <&vcc_sys>; - }; - - vcc_sys: vcc-sys { - compatible = "regulator-fixed"; - regulator-name = "vcc_sys"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - vin-supply = <&dc_12v>; - }; - - vdd_log: vdd-log { - compatible = "pwm-regulator"; - pwms = <&pwm2 0 25000 1>; - regulator-name = "vdd_log"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <800000>; - regulator-max-microvolt = <1400000>; - vin-supply = <&vcc_sys>; - }; -}; - -&cpu_l0 { - cpu-supply = <&vdd_cpu_l>; -}; - -&cpu_l1 { - cpu-supply = <&vdd_cpu_l>; -}; - -&cpu_l2 { - cpu-supply = <&vdd_cpu_l>; -}; - -&cpu_l3 { - cpu-supply = <&vdd_cpu_l>; -}; - -&cpu_b0 { - cpu-supply = <&vdd_cpu_b>; -}; - -&cpu_b1 { - cpu-supply = <&vdd_cpu_b>; -}; - -&emmc_phy { - status = "okay"; -}; - -&gmac { - assigned-clocks = <&cru SCLK_RMII_SRC>; - assigned-clock-parents = <&clkin_gmac>; - clock_in_out = "input"; - phy-supply = <&vcc_lan>; - phy-mode = "rgmii"; - pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; - snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - snps,reset-delays-us = <0 10000 50000>; - tx_delay = <0x28>; - rx_delay = <0x11>; - status = "okay"; -}; - -&hdmi { - ddc-i2c-bus = <&i2c3>; - pinctrl-names = "default"; - pinctrl-0 = <&hdmi_cec>; - status = "okay"; -}; - -&i2c0 { - clock-frequency = <400000>; - i2c-scl-rising-time-ns = <168>; - i2c-scl-falling-time-ns = <4>; - status = "okay"; - - rk808: pmic@1b { - compatible = "rockchip,rk808"; - reg = <0x1b>; - interrupt-parent = <&gpio1>; - interrupts = <21 IRQ_TYPE_LEVEL_LOW>; - #clock-cells = <1>; - clock-output-names = "xin32k", "rk808-clkout2"; - pinctrl-names = "default"; - pinctrl-0 = <&pmic_int_l>; - rockchip,system-power-controller; - wakeup-source; - - vcc1-supply = <&vcc_sys>; - vcc2-supply = <&vcc_sys>; - vcc3-supply = <&vcc_sys>; - vcc4-supply = <&vcc_sys>; - vcc6-supply = <&vcc_sys>; - vcc7-supply = <&vcc_sys>; - vcc8-supply = <&vcc3v3_sys>; - vcc9-supply = <&vcc_sys>; - vcc10-supply = <&vcc_sys>; - vcc11-supply = <&vcc_sys>; - vcc12-supply = <&vcc3v3_sys>; - vddio-supply = <&vcc1v8_pmu>; - - regulators { - vdd_center: DCDC_REG1 { - regulator-name = "vdd_center"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_cpu_l: DCDC_REG2 { - regulator-name = "vdd_cpu_l"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <750000>; - regulator-max-microvolt = <1350000>; - regulator-ramp-delay = <6001>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_ddr: DCDC_REG3 { - regulator-name = "vcc_ddr"; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-on-in-suspend; - }; - }; - - vcc_1v8: DCDC_REG4 { - regulator-name = "vcc_1v8"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcca1v8_codec: LDO_REG1 { - regulator-name = "vcca1v8_codec"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc1v8_hdmi: LDO_REG2 { - regulator-name = "vcc1v8_hdmi"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc1v8_pmu: LDO_REG3 { - regulator-name = "vcc1v8_pmu"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1800000>; - }; - }; - - vcc_sdio: LDO_REG4 { - regulator-name = "vcc_sdio"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <3000000>; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcca3v0_codec: LDO_REG5 { - regulator-name = "vcca3v0_codec"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_1v5: LDO_REG6 { - regulator-name = "vcc_1v5"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <1500000>; - regulator-max-microvolt = <1500000>; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <1500000>; - }; - }; - - vcca0v9_hdmi: LDO_REG7 { - regulator-name = "vcca0v9_hdmi"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <900000>; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc_3v0: LDO_REG8 { - regulator-name = "vcc_3v0"; - regulator-always-on; - regulator-boot-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-state-mem { - regulator-on-in-suspend; - regulator-suspend-microvolt = <3000000>; - }; - }; - - vcc3v3_s3: vcc_lan: SWITCH_REG1 { - regulator-name = "vcc3v3_s3"; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vcc3v3_s0: SWITCH_REG2 { - regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - }; - }; - - vdd_cpu_b: regulator@40 { - compatible = "silergy,syr827"; - reg = <0x40>; - fcs,suspend-voltage-selector = <1>; - pinctrl-names = "default"; - pinctrl-0 = <&vsel1_gpio>; - regulator-name = "vdd_cpu_b"; - regulator-min-microvolt = <712500>; - regulator-max-microvolt = <1500000>; - regulator-ramp-delay = <1000>; - regulator-always-on; - regulator-boot-on; - vin-supply = <&vcc_sys>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; - - vdd_gpu: regulator@41 { - compatible = "silergy,syr828"; - reg = <0x41>; - fcs,suspend-voltage-selector = <1>; - pinctrl-names = "default"; - pinctrl-0 = <&vsel2_gpio>; - regulator-name = "vdd_gpu"; - regulator-min-microvolt = <712500>; - regulator-max-microvolt = <1500000>; - regulator-ramp-delay = <1000>; - regulator-always-on; - regulator-boot-on; - vin-supply = <&vcc_sys>; - - regulator-state-mem { - regulator-off-in-suspend; - }; - }; -}; - -&i2c1 { - i2c-scl-rising-time-ns = <300>; - i2c-scl-falling-time-ns = <15>; - status = "okay"; -}; - -&i2c3 { - i2c-scl-rising-time-ns = <450>; - i2c-scl-falling-time-ns = <15>; - status = "okay"; -}; - -&i2c4 { - i2c-scl-rising-time-ns = <600>; - i2c-scl-falling-time-ns = <20>; - status = "okay"; - - fusb1: usb-typec@22 { - compatible = "fcs,fusb302"; - reg = <0x22>; - interrupt-parent = <&gpio1>; - interrupts = <1 IRQ_TYPE_LEVEL_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&fusb1_int>; - vbus-supply = <&vcc_vbus_typec1>; - status = "okay"; - }; -}; - -&i2c7 { - i2c-scl-rising-time-ns = <600>; - i2c-scl-falling-time-ns = <20>; - status = "okay"; - - fusb0: usb-typec@22 { - compatible = "fcs,fusb302"; - reg = <0x22>; - interrupt-parent = <&gpio1>; - interrupts = <2 IRQ_TYPE_LEVEL_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&fusb0_int>; - vbus-supply = <&vcc_vbus_typec0>; - status = "okay"; - }; -}; - -&i2s0 { - rockchip,playback-channels = <8>; - rockchip,capture-channels = <8>; - status = "okay"; -}; - -&i2s1 { - rockchip,playback-channels = <2>; - rockchip,capture-channels = <2>; - status = "okay"; -}; - -&i2s2 { - status = "okay"; -}; - -&io_domains { - audio-supply = <&vcca1v8_codec>; - bt656-supply = <&vcc_3v0>; - gpio1830-supply = <&vcc_3v0>; - sdmmc-supply = <&vcc_sdio>; - status = "okay"; -}; - -&pmu_io_domains { - pmu1830-supply = <&vcc_3v0>; - status = "okay"; -}; - -&pinctrl { - lcd-panel { - lcd_panel_reset: lcd-panel-reset { - rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - pmic { - vsel1_gpio: vsel1-gpio { - rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; - }; - - vsel2_gpio: vsel2-gpio { - rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; - }; - }; - - sdio-pwrseq { - wifi_enable_h: wifi-enable-h { - rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - pmic { - pmic_int_l: pmic-int-l { - rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; - - usb2 { - vcc5v0_host_en: vcc5v0-host-en { - rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; - }; - - hub_rst: hub-rst { - rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>; - }; - }; - - usb-typec { - vcc_vbus_typec1_en: vcc-vbus-typec1-en { - rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; - }; - }; - - fusb30x { - fusb0_int: fusb0-int { - rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; - }; - - fusb1_int: fusb1-int { - rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; - }; - }; -}; - -&pwm0 { - status = "okay"; -}; - -&pwm2 { - status = "okay"; -}; - -&saradc { - vref-supply = <&vcca1v8_s3>; - status = "okay"; -}; - -&sdmmc { - bus-width = <4>; - cap-mmc-highspeed; - cap-sd-highspeed; - cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; - disable-wp; - max-frequency = <150000000>; - pinctrl-names = "default"; - pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>; - status = "okay"; -}; - -&sdhci { - bus-width = <8>; - mmc-hs400-1_8v; - mmc-hs400-enhanced-strobe; - non-removable; - status = "okay"; -}; - -&tcphy0 { - status = "okay"; -}; - -&tcphy1 { - status = "okay"; -}; - -&tsadc { - /* tshut mode 0:CRU 1:GPIO */ - rockchip,hw-tshut-mode = <1>; - /* tshut polarity 0:LOW 1:HIGH */ - rockchip,hw-tshut-polarity = <1>; - status = "okay"; -}; - -&u2phy0 { - status = "okay"; - - u2phy0_otg: otg-port { - phy-supply = <&vcc_vbus_typec0>; - status = "okay"; - }; - - u2phy0_host: host-port { - phy-supply = <&vcc5v0_host>; - status = "okay"; - }; -}; - -&u2phy1 { - status = "okay"; - - u2phy1_otg: otg-port { - phy-supply = <&vcc_vbus_typec1>; - status = "okay"; - }; - - u2phy1_host: host-port { - phy-supply = <&vcc5v0_host>; - status = "okay"; - }; -}; - -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_xfer &uart0_cts>; - status = "okay"; -}; - -&uart2 { - status = "okay"; -}; - -&usb_host0_ehci { - status = "okay"; -}; - -&usb_host0_ohci { - status = "okay"; -}; - -&usb_host1_ehci { - status = "okay"; -}; - -&usb_host1_ohci { - status = "okay"; -}; - -&usbdrd3_0 { - status = "okay"; -}; - -&usbdrd_dwc3_0 { - status = "okay"; -}; - -&usbdrd3_1 { - status = "okay"; -}; - -&usbdrd_dwc3_1 { - status = "okay"; - dr_mode = "host"; -}; - -&vopb { - status = "okay"; -}; - -&vopb_mmu { - status = "okay"; -}; - -&vopl { - status = "okay"; -}; - -&vopl_mmu { - status = "okay"; + compatible = "libretech,roc-rk3399-pc", "firefly,roc-rk3399-pc", + "rockchip,rk3399"; }; diff --git a/arch/arm/dts/rk3399-roc-pc.dtsi b/arch/arm/dts/rk3399-roc-pc.dtsi new file mode 100644 index 0000000000..9a1ce3a4ae --- /dev/null +++ b/arch/arm/dts/rk3399-roc-pc.dtsi @@ -0,0 +1,813 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd + */ + +/dts-v1/; +#include +#include +#include "rk3399.dtsi" +#include "rk3399-opp.dtsi" + +/ { + model = "Firefly ROC-RK3399-PC Board"; + compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399"; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm0 0 25000 0>; + }; + + clkin_gmac: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "clkin_gmac"; + #clock-cells = <0>; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1500000>; + poll-interval = <100>; + + recovery { + label = "Recovery"; + linux,code = ; + press-threshold-microvolt = <18000>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_key_l>; + + power { + debounce-interval = <100>; + gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; + label = "GPIO Key Power"; + linux,code = ; + wakeup-source; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>, <&yellow_led_gpio>; + + work-led { + label = "green:work"; + gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; + default-state = "on"; + linux,default-trigger = "heartbeat"; + }; + + diy-led { + label = "red:diy"; + gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "mmc1"; + }; + + yellow-led { + label = "yellow:yellow-led"; + gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "mmc0"; + }; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + + /* + * On the module itself this is one of these (depending + * on the actual card populated): + * - SDIO_RESET_L_WL_REG_ON + * - PDN (power down when low) + */ + reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; + }; + + vcc_vbus_typec0: vcc-vbus-typec0 { + compatible = "regulator-fixed"; + regulator-name = "vcc_vbus_typec0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + /* + * should be placed inside mp8859, but not until mp8859 has + * its own dt-binding. + */ + dc_12v: mp8859-dcdc1 { + compatible = "regulator-fixed"; + regulator-name = "dc_12v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + vin-supply = <&vcc_vbus_typec0>; + }; + + /* switched by pmic_sleep */ + vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 { + compatible = "regulator-fixed"; + regulator-name = "vcc1v8_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_1v8>; + }; + + vcc3v0_sd: vcc3v0-sd { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc3v0_sd_en>; + regulator-name = "vcc3v0_sd"; + regulator-boot-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + vin-supply = <&vcc3v3_sys>; + }; + + vcc3v3_sys: vcc3v3-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&dc_12v>; + }; + + vcca_0v9: vcca-0v9 { + compatible = "regulator-fixed"; + regulator-name = "vcca_0v9"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + vin-supply = <&vcc3v3_sys>; + }; + + /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */ + vcc5v0_host: vcc5v0-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_host_en &hub_rst>; + regulator-name = "vcc5v0_host"; + regulator-always-on; + vin-supply = <&vcc_sys>; + }; + + vcc_vbus_typec1: vcc-vbus-typec1 { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc_vbus_typec1_en>; + regulator-name = "vcc_vbus_typec1"; + regulator-always-on; + vin-supply = <&vcc_sys>; + }; + + vcc_sys: vcc-sys { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc_sys_en>; + regulator-name = "vcc_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&dc_12v>; + }; + + vdd_log: vdd-log { + compatible = "pwm-regulator"; + pwms = <&pwm2 0 25000 1>; + regulator-name = "vdd_log"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <450000>; + regulator-max-microvolt = <1400000>; + pwm-supply = <&vcc3v3_sys>; + }; +}; + +&cpu_l0 { + cpu-supply = <&vdd_cpu_l>; +}; + +&cpu_l1 { + cpu-supply = <&vdd_cpu_l>; +}; + +&cpu_l2 { + cpu-supply = <&vdd_cpu_l>; +}; + +&cpu_l3 { + cpu-supply = <&vdd_cpu_l>; +}; + +&cpu_b0 { + cpu-supply = <&vdd_cpu_b>; +}; + +&cpu_b1 { + cpu-supply = <&vdd_cpu_b>; +}; + +&emmc_phy { + status = "okay"; +}; + +&gmac { + assigned-clocks = <&cru SCLK_RMII_SRC>; + assigned-clock-parents = <&clkin_gmac>; + clock_in_out = "input"; + phy-supply = <&vcc_lan>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 50000>; + tx_delay = <0x28>; + rx_delay = <0x11>; + status = "okay"; +}; + +&gpu { + mali-supply = <&vdd_gpu>; + status = "okay"; +}; + +&hdmi { + ddc-i2c-bus = <&i2c3>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_cec>; + status = "okay"; +}; + +&hdmi_sound { + status = "okay"; +}; + +&i2c0 { + clock-frequency = <400000>; + i2c-scl-rising-time-ns = <168>; + i2c-scl-falling-time-ns = <4>; + status = "okay"; + + rk808: pmic@1b { + compatible = "rockchip,rk808"; + reg = <0x1b>; + interrupt-parent = <&gpio1>; + interrupts = <21 IRQ_TYPE_LEVEL_LOW>; + #clock-cells = <1>; + clock-output-names = "xin32k", "rk808-clkout2"; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc3v3_sys>; + vcc2-supply = <&vcc3v3_sys>; + vcc3-supply = <&vcc3v3_sys>; + vcc4-supply = <&vcc3v3_sys>; + vcc6-supply = <&vcc3v3_sys>; + vcc7-supply = <&vcc3v3_sys>; + vcc8-supply = <&vcc3v3_sys>; + vcc9-supply = <&vcc3v3_sys>; + vcc10-supply = <&vcc3v3_sys>; + vcc11-supply = <&vcc3v3_sys>; + vcc12-supply = <&vcc3v3_sys>; + vcc13-supply = <&vcc3v3_sys>; + vcc14-supply = <&vcc3v3_sys>; + vddio-supply = <&vcc_3v0>; + + regulators { + vdd_center: DCDC_REG1 { + regulator-name = "vdd_center"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_cpu_l: DCDC_REG2 { + regulator-name = "vdd_cpu_l"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc_1v8: DCDC_REG4 { + regulator-name = "vcc_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcca1v8_codec: LDO_REG1 { + regulator-name = "vcca1v8_codec"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc1v8_hdmi: LDO_REG2 { + regulator-name = "vcc1v8_hdmi"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc1v8_pmu: LDO_REG3 { + regulator-name = "vcc1v8_pmu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc_sdio: LDO_REG4 { + regulator-name = "vcc_sdio"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3000000>; + }; + }; + + vcca3v0_codec: LDO_REG5 { + regulator-name = "vcca3v0_codec"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v5: LDO_REG6 { + regulator-name = "vcc_1v5"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1500000>; + }; + }; + + vcca0v9_hdmi: LDO_REG7 { + regulator-name = "vcca0v9_hdmi"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_3v0: LDO_REG8 { + regulator-name = "vcc_3v0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3000000>; + }; + }; + + vcc3v3_s3: vcc_lan: SWITCH_REG1 { + regulator-name = "vcc3v3_s3"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3_s0: SWITCH_REG2 { + regulator-name = "vcc3v3_s0"; + regulator-always-on; + regulator-boot-on; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; + + vdd_cpu_b: regulator@40 { + compatible = "silergy,syr827"; + reg = <0x40>; + fcs,suspend-voltage-selector = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&vsel1_gpio>; + regulator-name = "vdd_cpu_b"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1500000>; + regulator-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc3v3_sys>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vdd_gpu: regulator@41 { + compatible = "silergy,syr828"; + reg = <0x41>; + fcs,suspend-voltage-selector = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&vsel2_gpio>; + regulator-name = "vdd_gpu"; + regulator-min-microvolt = <712500>; + regulator-max-microvolt = <1500000>; + regulator-ramp-delay = <1000>; + vin-supply = <&vcc3v3_sys>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +}; + +&i2c1 { + i2c-scl-rising-time-ns = <300>; + i2c-scl-falling-time-ns = <15>; + status = "okay"; +}; + +&i2c3 { + i2c-scl-rising-time-ns = <450>; + i2c-scl-falling-time-ns = <15>; + status = "okay"; +}; + +&i2c4 { + i2c-scl-rising-time-ns = <600>; + i2c-scl-falling-time-ns = <20>; + status = "okay"; + + fusb1: usb-typec@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <&gpio1>; + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&fusb1_int>; + vbus-supply = <&vcc_vbus_typec1>; + status = "okay"; + }; +}; + +&i2c7 { + i2c-scl-rising-time-ns = <600>; + i2c-scl-falling-time-ns = <20>; + status = "okay"; + + fusb0: usb-typec@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <&gpio1>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&fusb0_int>; + vbus-supply = <&vcc_vbus_typec0>; + status = "okay"; + }; +}; + +&i2s0 { + rockchip,playback-channels = <8>; + rockchip,capture-channels = <8>; + status = "okay"; +}; + +&i2s1 { + rockchip,playback-channels = <2>; + rockchip,capture-channels = <2>; + status = "okay"; +}; + +&i2s2 { + status = "okay"; +}; + +&io_domains { + audio-supply = <&vcca1v8_codec>; + bt656-supply = <&vcc_3v0>; + gpio1830-supply = <&vcc_3v0>; + sdmmc-supply = <&vcc_sdio>; + status = "okay"; +}; + +&pmu_io_domains { + pmu1830-supply = <&vcc_3v0>; + status = "okay"; +}; + +&pinctrl { + buttons { + pwr_key_l: pwr-key-l { + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + lcd-panel { + lcd_panel_reset: lcd-panel-reset { + rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + leds { + diy_led_gpio: diy_led-gpio { + rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + work_led_gpio: work_led-gpio { + rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + yellow_led_gpio: yellow_led-gpio { + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + vsel1_gpio: vsel1-gpio { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + vsel2_gpio: vsel2-gpio { + rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; + + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + sdmmc { + vcc3v0_sd_en: vcc3v0-sd-en { + rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + usb2 { + vcc5v0_host_en: vcc5v0-host-en { + rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + vcc_sys_en: vcc-sys-en { + rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + hub_rst: hub-rst { + rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>; + }; + }; + + usb-typec { + vcc_vbus_typec1_en: vcc-vbus-typec1-en { + rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + fusb30x { + fusb0_int: fusb0-int { + rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + fusb1_int: fusb1-int { + rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&pwm0 { + status = "okay"; +}; + +&pwm2 { + status = "okay"; +}; + +&saradc { + vref-supply = <&vcca1v8_s3>; + status = "okay"; +}; + +&sdmmc { + bus-width = <4>; + cap-sd-highspeed; + cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; + disable-wp; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>; + sd-uhs-sdr104; + vmmc-supply = <&vcc3v0_sd>; + vqmmc-supply = <&vcc_sdio>; + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + non-removable; + status = "okay"; +}; + +&spi1 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; + +&tcphy0 { + status = "okay"; +}; + +&tcphy1 { + status = "okay"; +}; + +&tsadc { + /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-mode = <1>; + /* tshut polarity 0:LOW 1:HIGH */ + rockchip,hw-tshut-polarity = <1>; + status = "okay"; +}; + +&u2phy0 { + status = "okay"; + + u2phy0_otg: otg-port { + phy-supply = <&vcc_vbus_typec0>; + status = "okay"; + }; + + u2phy0_host: host-port { + phy-supply = <&vcc5v0_host>; + status = "okay"; + }; +}; + +&u2phy1 { + status = "okay"; + + u2phy1_otg: otg-port { + phy-supply = <&vcc_vbus_typec1>; + status = "okay"; + }; + + u2phy1_host: host-port { + phy-supply = <&vcc5v0_host>; + status = "okay"; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_xfer &uart0_cts>; + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +&usbdrd3_0 { + status = "okay"; +}; + +&usbdrd_dwc3_0 { + status = "okay"; +}; + +&usbdrd3_1 { + status = "okay"; +}; + +&usbdrd_dwc3_1 { + status = "okay"; + dr_mode = "host"; +}; + +&vopb { + status = "okay"; +}; + +&vopb_mmu { + status = "okay"; +}; + +&vopl { + status = "okay"; +}; + +&vopl_mmu { + status = "okay"; +}; From patchwork Sat Dec 21 07:54:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 947 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9996E3F08E for ; Sat, 21 Dec 2019 08:55:18 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id v30sf6531565pga.22 for ; Fri, 20 Dec 2019 23:55:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914917; cv=pass; d=google.com; s=arc-20160816; b=eIJevT7OpwZyb12tYbcHlhWBfil2r7dZ9bOy5EG3jCCtGBLG0qL+HJVyXuyQmqGn2P HD48b/RdzDTTVxYN5w0D7DFCDzyW4Yb8cwMB5ZL5quGeKJw869MBRlL7agoYFaLml0TU duldHQd5zQGA1jv6J13Vfn/RLuLzf4X/rqfCufTGqHuHqU0AJui6+FbB1YUmoqw75vDd iiDOWWq0mdj9zfobZfAXbNHwTqqhsMsuOdAEq7reLB5YL6O+umjN4aDdRcK9DfPAK8ZU NCzLh7A+OU/tIs5UTh9a+oWipDF3fIbZx9ZVKIad8ddKolBjpSpa0+ARtzHYSBtVBAuZ T0Jg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0rfolINRXN4jsaoZJ23PyzTfimM41D4DNPO5Mcp6N58=; b=zb8dlUosgo/6LqnaQOoTggoRkC65kMVgXYHiuFWRWEInqW/HD1GyU//dCuAnRLJ9KE Gpp8/sTxl0inlWeIN/CRF9PdcS0N7qU/sKlIRSDwEdooB9YW7RImWGxukINyepChP0cd GRTZfpFpTw1fUH8YInhriXE7ckEEGqiKuBYOpSp13ubRY+UDOpCIvBACu5lcfmTGSmO+ IHxKxEQczpZ6Ol50RY/bo2izq5Li9GOAgaoyxg8055kXCgvGeD0FWC7GqccwR9yv5TXU +LdPia1rAgTQkI+rwOMUUW9luxZ/sFgQYiX+NeiQEfOKrdQy2ue1TES1IU+OZtTVjlM3 M3cA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=h8LfcJbC; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=0rfolINRXN4jsaoZJ23PyzTfimM41D4DNPO5Mcp6N58=; b=d0BeQg8/6mbO1/n3+G4n7xS46GF90yYNefp98L4FtfoqvVfzkMOdYPsIFkVwzcKoYh V6aVjn+TsLnO/ApIaioIHGE2nktY32CzSl0wLqT5Iq+T+zge+S6gmckJfseeM7Z9cjfE 6TbuvPxYz9bFB8hheb9x+VxSmy3nVcBTE/oaA= 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:in-reply-to :references: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=0rfolINRXN4jsaoZJ23PyzTfimM41D4DNPO5Mcp6N58=; b=q173Ay80G0n33AKrG17SBdFaHwF3m7V9DvOjSk9E0+sPO0eiD4kdtASyJtjMFfgtT4 5rC5fg2GKnclv0iTpIPQDYkCZ7TpISVi3mNVclGS3gz6QHQcA3K80CYLXGhtjitYJiK8 MsnXQWSCCm94WWaMHzh0NP72x7lvaYhZ4C9vFDM2rxM0hZjNqmGKcvuUe7xkQSGpzBUF +NcOJkKkDrhs6LNH3TkSKKjya+85MS+Tp+HQYe3FjmF8k+QeQxYXeBOJvEYhUypDiw0G Z0+GRlTWpZWhDURrbbDlc1vTmSxzBpUiiSov/o5moNhTPQ8yYfwBvRFShfg37iXB0krG bSZQ== X-Gm-Message-State: APjAAAUnhN9u86sxm/jcU/iRSfBAUb9LzHEJKWgZGDKCcSpahAp3AgoB aZhOdpR9OLhcjbRx4ulbboveHGR2 X-Google-Smtp-Source: APXvYqzAoYvv6j7TZRjk8vS1QR1wrv2npdu4R4ifTFs9N8bmsS2nyjMWV97TubjBT8XiZW+vkDTc5Q== X-Received: by 2002:a17:902:8bc9:: with SMTP id r9mr19366408plo.48.1576914917324; Fri, 20 Dec 2019 23:55:17 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8c8c:: with SMTP id t12ls2968049plo.9.gmail; Fri, 20 Dec 2019 23:55:16 -0800 (PST) X-Received: by 2002:a17:90a:300b:: with SMTP id g11mr18550339pjb.123.1576914916761; Fri, 20 Dec 2019 23:55:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914916; cv=none; d=google.com; s=arc-20160816; b=Yr67wr90Rju+duaxxyEgnxTmoRS95xS52/1wu1z2YRoEdK1j6s7UuXMgCtxtub5xQz uEDXsdm07slm1ejzuwnXIcplK330C7opXzstnfIzbJwY358IuuQNnr95sL+KS3yizl9t Lbs6bagA9QaSgGhnBW5bqQ1QDcRUNkM6MQUQ5m5jT5hH3Xsbl9Qy1r1fd9yg+JHfrzIk 4NBPgw56eZAGl+7a74PubkJDMRsGgxc2+Ntlr8w4QbYtifq9d71EKtEy9tfDhA2dZWMI IDskpuJBj1AkvIyMOpnaqmnOrLiVCTtJ2VOp+S1RGKjEwvb39x67InGVqxwV7aBE/Enq dNYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=C8CZ20aKDd2zOhw5EtsYbeLPT+q6TypZtOf3+Yy7v1E=; b=ZQViPebX0tTixjX4A2ym1MTb79fZpFpskPLVxqXtXqzXObpBgUiJjbN/yIf/eX4pNZ ktlR6raZ5TRRYcglI1yOAUxZFG1iY5jXqLZSNmuEK3z5wcPZmZVAHVKI3eBAlO5JrrEB f2qzdGCtdarBcRkefi9dpqcEayADXEZT9rHhnHa0NOqn+IAbgK1Gviy0au4hJNTNeSE2 zH8k3g0Qcpvc3Hkewfg5dTjYY+RogGIpGjKsO+CNZwcFpCpKDZ9Ld6WI5run45UeersQ ikVBJyc9Mq7mSopHgVSGBkeqkY5cKiJLzGaSBy9Yquuf6sP+OILWH7Lm0nFrZfkPRz5A OzNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=h8LfcJbC; 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 2sor13129522pfv.21.2019.12.20.23.55.16 for (Google Transport Security); Fri, 20 Dec 2019 23:55:16 -0800 (PST) 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:aa7:991e:: with SMTP id z30mr20358616pff.259.1576914916537; Fri, 20 Dec 2019 23:55:16 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:16 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 09/11] roc-pc-rk3399: Enable SPI Flash Date: Sat, 21 Dec 2019 13:24:38 +0530 Message-Id: <20191221075440.6944-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=h8LfcJbC; 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: , Enable winbond SPI flash for ROC-PC-RK3399 board. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 4 ++++ configs/roc-pc-rk3399_defconfig | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index 77d5cf5d3c..5746442981 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -7,6 +7,10 @@ #include "rk3399-sdram-lpddr4-100.dtsi" / { + aliases { + spi0 = &spi1; + }; + chosen { u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; }; diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index 305baa712c..f37a7bda00 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -42,6 +42,8 @@ CONFIG_RAM_RK3399_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y +CONFIG_SPI_FLASH_WINBOND=y +CONFIG_ROCKCHIP_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y From patchwork Sat Dec 21 07:54:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 948 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4B9DF3F08E for ; Sat, 21 Dec 2019 08:55:21 +0100 (CET) Received: by mail-pg1-f200.google.com with SMTP id o21sf6568115pgm.11 for ; Fri, 20 Dec 2019 23:55:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914920; cv=pass; d=google.com; s=arc-20160816; b=BIll9j+tLxXZkzpwzo7OY5pWBga6d1ly+4PmgCUnulVl7HT8ChYXRBwMZLusdwZH5s MlnhUQf+aGSpA4hanw/uFvhBEOGM28sjZECx+MAJZ3foTaGZFW8rv3GkV7B+8e7Bgq6t yc3ibFjTjVTfR68W/aIwbZpgQYc/t6qGz5SxkvTC8admaRb5E4X+/I25GvOLc+mVljkP YENoDeegAYCZmK/0xlNY6Y+e195c+7mwLVxWKXE9XkBDbEebJSm9id9UiFXAnKsMGhUq EcXlbNnYZ77AmtmeX22H2mOcUVt4HVj7+InIyN+KyegmXizvKgc5hZ7LfVb2L/bxVaOm lo/A== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=AKTTl0sNrhWvYjUq2zEaMZAnTL1uMzzvZ8GsQ1N8e7g=; b=RWzn6rgcxAf1PDzf2QUGp5NicleEfTGLenAls/3wkBtuN/L0XGOSBWHB/OgTQ0cjpK 3LeNdVR3GlgqV/K+WWWMemQKAbTWMf2XLFYfIZTwbQRngIsINI3A0ExC2vhQr2XWWHVS 2eOm0B6f9/FsX79r2iabGXIq+RvgXubdUo5vnEWHMsgpFm15J+vTaw0xfqlfgUrWqiOF ANaew9OoekpDCt9EKzaJ7VjX07d13uaSg8uRnlJ0so1lp10Zp5XdIXOEjpBpjFjNfkHo /VFm7hMvNdZP2/i93W+1wpz+f7KCk2XGTDrDGspmkuGXM66K66q5vvJL5Vk+ba3WIRvT FbeQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SQJ3pma0; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=AKTTl0sNrhWvYjUq2zEaMZAnTL1uMzzvZ8GsQ1N8e7g=; b=gZPzQeM3TrjOrGd8OxQxpUnFbcYOhBinGbLddqryCy78jlWVw8KOTBsDa4i/1X6HvB o2c4XayoPS//CUS555DtbFIeOSl+OfhX6j2MucCNfZ5NTqo5ARJSGWuX3ETtbIZJV7uJ jh74PASj1cyKwIrXLMQpqCLsBjlyjxC/WfiVo= 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:in-reply-to :references: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=AKTTl0sNrhWvYjUq2zEaMZAnTL1uMzzvZ8GsQ1N8e7g=; b=P32X1HfaZT6q14MmYIbPUs6j9QohA5GtdON+B6LFTTpWPuo7DuE03pAjq+Qeg680N4 /W0kObdTFGytAVD6qDHOvXx52jCdTnSJ4+NaIpDNLHLlDI5nNhwoEaQpMfzePb4xM89w zfxC8zVINr7VBc/CCLmU4bT1IZXFpwkJkhlKGejJkB5Q83MQtT/gdqKg5L2FHOt8S1BO JV4IQqbL0HVZFc9/M5WU5T82g2TWWfZmLuyM2tZQzfMqXkNwbMq4kg8UMfOaHsyOAAj2 fQTOTKlgRTsvv21WW/gmanZH7PLg/lb2AfqrpRUFbOHPlY/EK7J7xewu4oFAcVycYKHG nD/w== X-Gm-Message-State: APjAAAV676ZTPzg3baAljRmbb3SzO/30AIO7UXn6n2rBfFtOR3+Fv/XJ 7zEPxIk46Ns4ppt4Z3Ut1nMWCeft X-Google-Smtp-Source: APXvYqwFFWCQDjQ7kI6C6n0sw2cfVDcufI+2/zW00foKromxC5HjdgdhYPogtEbUYKVnupXr1QteVg== X-Received: by 2002:a63:e0c:: with SMTP id d12mr18696065pgl.3.1576914920037; Fri, 20 Dec 2019 23:55:20 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:c244:: with SMTP id l4ls34623pgg.2.gmail; Fri, 20 Dec 2019 23:55:19 -0800 (PST) X-Received: by 2002:a63:a84a:: with SMTP id i10mr19124342pgp.6.1576914919510; Fri, 20 Dec 2019 23:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914919; cv=none; d=google.com; s=arc-20160816; b=VhwVBiXBG4FzpU2GJ2QyqFvzegf2pzZX+JvFLT2I32Jddhjf/Nr/5bUECeUBImOUrS ftb2wSoIn04CfLUqf+HCsiv+9TKnu++xgp8iX1mJp0kdQcUeGSGDb85C7FFAA0fbdyMb Wo/zviSYPcthwN5OsRtXVnKGrgVkRqr+6QJ4NQASRPjIpO1oPQsFtJA7x4VOwI0CyK/b zzg9utTkIjmENwH0uS+P6sm7zhDJGqxfzk1rLMWkLAR/EwbWfTabC6jZ4F0CxqVLHqw8 UAWHOKMKCnPtp20Jk2mgE21FfE3i9o4uX3j8eokeCDlzBnqKUZqbCmmU6JItDwqEW7bz II4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ACNZQw9K81BypFIzBx5+GIgdZYxnDvmql6PQXJKzzj4=; b=z3W6y242lQYbSg9//9u4YxGrqLERPjPIIWGC7RNJLaZmptgyeFHOMrNAGKbAXvpjVk 7/KqGGQy6Ze7KLMfWLEll11um/2m4qNRw87n9a55ORdnxbkOxABEsptZ8U8Hxa4Zo3sS +w309nR5zvvP/cfXyU80f8WnspmwuE3PiOlh0His+xYyjXEkmH2dSAW5DP3KkX3sCaz4 rToO/bjwJxJNpIJ2MdH7+Zh+XOfQEVC9NJloMJw0KHWOHiEh3MLIK0Y6mD2+wImpMjOv 2X2+8w0G/o6Tq03V4MRY7c6VYAr8eLF//EQBmM+9Aa+vfv/E+4uAywfHhdBma+rvCCYm mULg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SQJ3pma0; 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 g22sor13178365pgl.73.2019.12.20.23.55.19 for (Google Transport Security); Fri, 20 Dec 2019 23:55:19 -0800 (PST) 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:a65:56c9:: with SMTP id w9mr18701357pgs.296.1576914919229; Fri, 20 Dec 2019 23:55:19 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:18 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 10/11] rockpro-rk3399: Enable SPI Flash Date: Sat, 21 Dec 2019 13:24:39 +0530 Message-Id: <20191221075440.6944-11-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=SQJ3pma0; 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: , Enable winbond SPI flash for ROC-PC-RK3399 board. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- arch/arm/dts/rk3399-rockpro64-u-boot.dtsi | 4 ++++ configs/rockpro64-rk3399_defconfig | 2 ++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi index 4648513ea9..deaa3efd39 100644 --- a/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi +++ b/arch/arm/dts/rk3399-rockpro64-u-boot.dtsi @@ -6,6 +6,10 @@ #include "rk3399-u-boot.dtsi" #include "rk3399-sdram-lpddr4-100.dtsi" / { + aliases { + spi0 = &spi1; + }; + chosen { u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci; }; diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig index 49e27c91cb..6a50ec7dbc 100644 --- a/configs/rockpro64-rk3399_defconfig +++ b/configs/rockpro64-rk3399_defconfig @@ -46,6 +46,8 @@ CONFIG_RAM_RK3399_LPDDR4=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYSRESET=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_ROCKCHIP_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y From patchwork Sat Dec 21 07:54:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 949 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1156A3F08E for ; Sat, 21 Dec 2019 08:55:24 +0100 (CET) Received: by mail-pj1-f71.google.com with SMTP id u91sf5996363pjb.0 for ; Fri, 20 Dec 2019 23:55:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576914923; cv=pass; d=google.com; s=arc-20160816; b=xGuW4EpUyLAohVMjr7o4fwCBHjbDKWtirO7/eH+Yert77TY+L0UYOfDfKfboQg+h4n 2wLo5jq65rIN+1dwHZ4RrFiL9jb+5ICCmw4YA6wIbT/Wi2jvAU3KqNcpwU+zCSQ6d7Nr KgYjiqa6Tt3J/uWXAglOFDo2FrrE9+6P9KNXkF+BaHtisEigFYrzTF5CQ47BdxGE3xvr TcE9UPJz0p5vZL97BBx0vAQ2fbw9izkznzMf958aegSTjOSZL7vVkDU2ZiIQROOnSzH7 2WUJQa3pjJSQCmyalIFLYB6XPg8Ubs3Ivd8HjCIQf9gbNKwEG+wHXPYlpRHb3mLfHJnJ lf3A== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=dl3AfhaMt+uofTRhfzz6WKu6BEGRZwMJf83GmCGl8N0=; b=vSWEWQK7Ec/POCciB4pHzLtV8zJ9aBT+VVrIuWlXT9dlygM8Qm0+op5ipJIETZ20sS XN3VX+ch8MkiS5f/RLj5E1C/f/zB5SE2sP40F2lCVX9013/PsMjAa0/mNEG7zRYyNUwC g2byp0ignV0M40F8sQe8lMRzV9QRiyXLUU8wW8phrlNiFlpU3uznlaYAX+J5pHoXtLeI z2ef3rlgX7OaYF4AtZRN15HbRMkSribQIKE8P4AvDI4kYNwAywpjVH/GUY2wX++EgQUN RbHlNYA8jnYN9k64yHWfKMVQfbmmMCG7YsOdKP5qVRG6REsaJzr/AesHiEJ7K2hI04Fo Qzrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K42a2wG3; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=dl3AfhaMt+uofTRhfzz6WKu6BEGRZwMJf83GmCGl8N0=; b=C9JkcTQGBsmlUOoucz68SyafXOCh7+r++a3AdJQI+c3nZbSZtGal03DbIkKfZSH6ji 0+k+XtF+XBiek9NDiDT1KRwEsAwkXcEGhRH1NxOCUmAhTpDUzotqS6vqz8A1Mcw+NrgY 4yGNZqVg0wdYn1ckqEDUW4DNiUGpoJSsLl5cE= 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:in-reply-to :references: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=dl3AfhaMt+uofTRhfzz6WKu6BEGRZwMJf83GmCGl8N0=; b=IvK8QAIM/CF6W2RFLgb+RtntgogJOVGwNCI+Z/zhpe3DAcrBxltB+0Dq1S4HPPIKNE ehMz8mF+/6tz6oxf8G7+EUjTu+Evt4HXykBZLFLMOsR02n7ACKIGOp8vqIXoCTO2gd+E 3EqbDBaH8qZAmNtJJ4sIqWkyGGy0Xo4YohlQ+DOIy/rhliKMzKkXB4KuE9l5KBTV8oAr mjVXMqnrlRKDf8gveujS0Pbj3qv82usWwn6lNxcd381+XTfJIKgDaxrQqeMBASesdHm3 0+O1ja/2rr+KRhrLwtzasj1ETZrOFxNkfJFb2RBhzs2q0P4f9erFqn/NV52XWza2hqn2 ycxA== X-Gm-Message-State: APjAAAVUjyrWUTgXTnzM93nLVAM9ts+1Dc0YqJG53MWX3qosRhR6FAmy EZ3jbSektD+6qkU9qRIQj0Nsw6xx X-Google-Smtp-Source: APXvYqzLMAvb4+YpGRTfgvHXNVBTKsmX6qcajAPGV4/tvObuZ3Hb/kJlA3PZqrWAHFseWNDFqETdkg== X-Received: by 2002:a17:902:8a8d:: with SMTP id p13mr18701085plo.296.1576914922788; Fri, 20 Dec 2019 23:55:22 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:208:: with SMTP id 8ls2619237pgc.16.gmail; Fri, 20 Dec 2019 23:55:22 -0800 (PST) X-Received: by 2002:aa7:9d87:: with SMTP id f7mr20620738pfq.138.1576914922313; Fri, 20 Dec 2019 23:55:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576914922; cv=none; d=google.com; s=arc-20160816; b=Hz6yiu/5JwY1ZNqAqNKGGPTCFLxuzC6wMHtPpllYUpUtpQaTnr4baJbT5/FYsXjijg cvOgenkPouKsNv8GV9K0GBkBltf+mahYEUpwYTPwjZTNXgfrJPsvKMMOpLZtOQ/UW4rF lKKDSp/jR3wCc+o4fJkb8s8kZ8ea721nB11dIeXZrsmJklU0/7iRHmbdz/nh7rfOdVjW lQvblNzSEtixJsbSn0XEmdokX2j7LsY/MzNscTnXXTDhfctXQdo19mSP4CtHTYoTA4CW FUsRhDYfzBkyFtYiDWtS1SozCyThq349plMI0vPjb/Srd1os3wBASOc6VMOMkL3TRe+q zWvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=23zjubrNc7IltllaEclaYRxJEAN8c0zQDSXNZ1bkeFg=; b=Uzw9+fzHN7ujzF+zADDKA+Ub1PJduUPTTk9Y3voq1RvqKuKcE3mTIBCBOY5dy72V0Y ZzFJ8PnKrRyZ/IN+KmfsWK4hNGifPGdp6cAuWPonIGWUN8IaF7bR8i3c4uPkkeOpEUYO toot+z2400JcR478LMOkZBhEjz5O02Rh/ScYDvNH8gr6mMC4+QWAuzbHSSbzj/I7ikex QUORj15Ufw4coOGpU7PxoW2sGv+aBUxiL9H/lU8Z1zkxDdpcjzeCSzFLsRraxGUYN1VL BMmT4QgpKOrPHXBOoEcojdsTVcpJDeiyGVwG7l0WAzeP9Yo4HC6KOoGoFNBffPyp4W2D 4kiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=K42a2wG3; 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 x34sor13210593pgl.70.2019.12.20.23.55.22 for (Google Transport Security); Fri, 20 Dec 2019 23:55:22 -0800 (PST) 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:a63:7045:: with SMTP id a5mr19924750pgn.49.1576914921951; Fri, 20 Dec 2019 23:55:21 -0800 (PST) Received: from localhost.localdomain ([49.206.202.177]) by smtp.gmail.com with ESMTPSA id i9sm15551018pfk.24.2019.12.20.23.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 23:55:21 -0800 (PST) From: Jagan Teki To: Simon Glass , Kever Yang , Philipp Tomsich Cc: u-boot@lists.denx.de, linux-amarula , linux-rockchip@lists.infradead.org, Jagan Teki Subject: [PATCH 11/11] roc-rk3399-pc: Add SPI boot support Date: Sat, 21 Dec 2019 13:24:40 +0530 Message-Id: <20191221075440.6944-12-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191221075440.6944-1-jagan@amarulasolutions.com> References: <20191221075440.6944-1-jagan@amarulasolutions.com> 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=K42a2wG3; 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: , Add SPI boot support for ROC-RK3399-PC board. This would add separate config file for SPI along with dts changes. Signed-off-by: Jagan Teki --- arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 12 ++++- board/rockchip/evb_rk3399/MAINTAINERS | 2 + configs/roc-pc-rk3399-spi_defconfig | 62 ++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 configs/roc-pc-rk3399-spi_defconfig diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index 5746442981..6e43c7c71b 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -11,8 +11,18 @@ spi0 = &spi1; }; + config { + u-boot,spl-payload-offset = <0x40000>; /* @ 256KB */ + }; + chosen { - u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; + u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdhci, &sdmmc; + }; +}; + +&spi1 { + spi_flash: flash@0 { + u-boot,dm-pre-reloc; }; }; diff --git a/board/rockchip/evb_rk3399/MAINTAINERS b/board/rockchip/evb_rk3399/MAINTAINERS index eab4c4c525..8de6ec88f1 100644 --- a/board/rockchip/evb_rk3399/MAINTAINERS +++ b/board/rockchip/evb_rk3399/MAINTAINERS @@ -57,8 +57,10 @@ F: arch/arm/dts/rk3399-orangepi-u-boot.dtsi ROC-RK3399-PC M: Levin Du +M: Jagan Teki S: Maintained F: configs/roc-pc-rk3399_defconfig +F: configs/roc-pc-rk3399-spi_defconfig F: arch/arm/dts/rk3399-roc-pc-u-boot.dtsi ROCK-PI-4 diff --git a/configs/roc-pc-rk3399-spi_defconfig b/configs/roc-pc-rk3399-spi_defconfig new file mode 100644 index 0000000000..1fdfb10101 --- /dev/null +++ b/configs/roc-pc-rk3399-spi_defconfig @@ -0,0 +1,62 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SYS_TEXT_BASE=0x00200000 +CONFIG_ROCKCHIP_RK3399=y +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_DEBUG_UART_BASE=0xFF1A0000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART=y +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc.dtb" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +# CONFIG_SPL_MMC_SUPPORT is not set +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SPL_TEXT_BASE=0xff8c2000 +CONFIG_SPL_STACK_R=y +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="rk3399-roc-pc" +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_ROCKCHIP=y +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PMIC_RK8XX=y +CONFIG_REGULATOR_PWM=y +CONFIG_REGULATOR_RK8XX=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM_RK3399_LPDDR4=y +CONFIG_BAUDRATE=1500000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYSRESET=y +CONFIG_SPI_FLASH_WINBOND=y +CONFIG_ROCKCHIP_SPI=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_HOST_ETHER=y +CONFIG_USB_ETHER_ASIX=y +CONFIG_USB_ETHER_ASIX88179=y +CONFIG_USB_ETHER_MCS7830=y +CONFIG_USB_ETHER_RTL8152=y +CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_ERRNO_STR=y