From patchwork Mon Jun 1 20:42:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11582651 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ADFDF913 for ; Mon, 1 Jun 2020 20:42:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C57720825 for ; Mon, 1 Jun 2020 20:42:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="afnXGafJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="lpM+7QC7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C57720825 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zhV/bF7JO27dKU/QhsGewRKF5On8cgRaWRcAL1otncQ=; b=afnXGafJN+7vbw swmgXue/Ym4h0RYQb5+h5MQq6ikC7LDtJMI2lnFTOXOn/IbjltpHSk4rbe/6nTO9XE+j3MOLURN3J omGNxVOiMxS83GaEcxt/z89ixNWk2/r/70CXpMr2XoV8E25FM0Iw0lVH2gmsmKM3dLu7j5vATJlaN HaDzsvAG11wELa7lWuWWdolduPo8QyWljyuXi006GSj16oYHv4TCe1VZJ24WfWXJ+rGAxqcrotqxu /q+pTVOQcRWVKg/oLDIU54T5fFakfg9OsYQZdvRdPycDeUTKj4tysT77BbkA6o875GN+rrc7EIxCN GVwAWmxxebUR2zmKBq2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGZ-0002NW-4Q; Mon, 01 Jun 2020 20:42:39 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGW-0002M8-M8 for linux-rockchip@lists.infradead.org; Mon, 01 Jun 2020 20:42:37 +0000 Received: by mail-pj1-x1044.google.com with SMTP id 5so363504pjd.0 for ; Mon, 01 Jun 2020 13:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BNexMqhtjdTh16Uq9oCW3PAfLr/10uATBtmxs/MmdRw=; b=lpM+7QC7A6/oXNUxAXaghs4+w/QTBzzl+mZP5BXCmNM8cNAggn2+bd5BTIRqHH9jl2 s0HbBay0AOhlx8AiG5XBwUkU682Bg47nUZzeuoBN63SIkRO0JqrQWws72wBC4WHSOXEw Blhl8jz+Jvwqg+3WQcdSdyjn/NXeq+W0BQkCU= 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; bh=BNexMqhtjdTh16Uq9oCW3PAfLr/10uATBtmxs/MmdRw=; b=DiacEgtnh34pUOMpJ0xr/69Sqy487Ty8LvWNSm0zYTEAbWbT80NgvHQEY730EAdrNo dfjoCcFdBjX8K5dLsPMJ70wARTVFgbSNJbRlri6i+d7pYpWny2QLueTXSJ6LQxmg/vu4 6yOjFW9TMok1BARdlfVLu07b6G0wF+wvsGGkaMef+Q9xfJxoRt5eNynbq12hma9P/oDB SKhuqcl2uQbMYQLWM9wBaWD6VKbcdky4NV9Kr4CzelDZ/aBhioEinzlrfkNrY8YE3gIX 4eZfm/uaJv7+/ET6CakbrzbV6Uw9yQxBKFWPQEqW2fZ+jJw413xhh3Zj2iDI1bGzv/YT HIdQ== X-Gm-Message-State: AOAM530K1JrdE6jNpB38OXpEeBMMWXUyrqr6wTekM7NKLXeFs7qgpCbc AL3o4mmLGZK+zA6NruiBUIXkLA== X-Google-Smtp-Source: ABdhPJxNwTerv8RZKMN0AWruqEXqCEYJA40YoJ2iptY1HVlJi1bx99QFsXnSTA3Nm1LAjRHYEJWRoQ== X-Received: by 2002:a17:90a:1919:: with SMTP id 25mr1196124pjg.7.1591044156215; Mon, 01 Jun 2020 13:42:36 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:658b:ecbc:7ea4:1996]) by smtp.gmail.com with ESMTPSA id k7sm283581pga.87.2020.06.01.13.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 13:42:35 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass , Hugh Cole-Baker Subject: [PATCH v2 1/4] Makefile: Drop to handle rkspi image type Date: Tue, 2 Jun 2020 02:12:10 +0530 Message-Id: <20200601204213.466120-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200601204213.466120-1-jagan@amarulasolutions.com> References: <20200601204213.466120-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200601_134236_719187_1D510C50 X-CRM114-Status: UNSURE ( 8.20 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1044 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org On rockchip platforms, SPI boot image creation is not straightforward like MMC boot image creation where former requires to specify tpl, spl in multimage format in mkimage, and later simply do a concatenate mkimaged-tpl with spl. On this note, let drop rkspi image type creation via kbuild and let inform via rockchip.rst Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Makefile | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 3851dd9fa0..db3b6b9991 100644 --- a/Makefile +++ b/Makefile @@ -1438,22 +1438,15 @@ u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE ifeq ($(CONFIG_ARCH_ROCKCHIP),y) -# rockchip image type -ifeq ($(CONFIG_SPL_SPI_LOAD),y) -ROCKCHIP_IMG_TYPE := rkspi -else -ROCKCHIP_IMG_TYPE := rksd -endif - # TPL + SPL ifeq ($(CONFIG_SPL)$(CONFIG_TPL),yy) -MKIMAGEFLAGS_u-boot-tpl-rockchip.bin = -n $(CONFIG_SYS_SOC) -T $(ROCKCHIP_IMG_TYPE) +MKIMAGEFLAGS_u-boot-tpl-rockchip.bin = -n $(CONFIG_SYS_SOC) -T rksd tpl/u-boot-tpl-rockchip.bin: tpl/u-boot-tpl.bin FORCE $(call if_changed,mkimage) idbloader.img: tpl/u-boot-tpl-rockchip.bin spl/u-boot-spl.bin FORCE $(call if_changed,cat) else -MKIMAGEFLAGS_idbloader.img = -n $(CONFIG_SYS_SOC) -T $(ROCKCHIP_IMG_TYPE) +MKIMAGEFLAGS_idbloader.img = -n $(CONFIG_SYS_SOC) -T rksd idbloader.img: spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) endif From patchwork Mon Jun 1 20:42:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11582653 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4619E739 for ; Mon, 1 Jun 2020 20:42:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 250A5206E2 for ; Mon, 1 Jun 2020 20:42:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ze5Lr4OC"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="YVRUBa8V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 250A5206E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZTRFEayd0jPhSRwrKw9cP5MVeK55woBplgYbzjJsAqw=; b=Ze5Lr4OCnxdMTV ROYZTLZnTTgJQFzUdc+6Gbp4pbgLbjpvInthVHGBrqQOM3O360KLrwBuJtNWMt/0hyhtMEt0unkFS rE8SiQyqb8ty/LmCHVPkWBZ281fLSHcUgL/zYYXqwA7rtNeTdsinHRfEm2rV1eHgFIUK2j4FdKYJ1 m0EXeiKyArizb3tRf8KrCTTQUGG27IIlun+pp1FQk7+nSxPuOgqMTbRVQG36zQLwPG96TwGoYlkAp JfNBWfQCncY84+PtNzZCuA1LXmRijrsjyEDngH8rtjy0sZMWydRwmAcH6/12u7zIUeNau5+NugA3c n44wXNEPJyGU46uMsCxQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGe-0002R7-Nt; Mon, 01 Jun 2020 20:42:44 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGc-0002Q1-Is for linux-rockchip@lists.infradead.org; Mon, 01 Jun 2020 20:42:43 +0000 Received: by mail-pg1-x542.google.com with SMTP id p30so4012787pgl.11 for ; Mon, 01 Jun 2020 13:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1663iTZ5e5aTWKWbP4uDTDzqUziSAFV8rcNoh8d/2XY=; b=YVRUBa8VLFcring4Q9OTAcifWRq5ezx9f0FriaaHlzT/si0ndG5Kr7cLm5D3ZgpGDn fwO8b7iG/P4W6qFt6tI85yb5gGsr1FG8Gda6nx3wFKpTiVuPCU6I3PhpCbKynprLKBvd 2Y1emgn9cfGd6Qlr+f/AyNX+5abzQymAksOeA= 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; bh=1663iTZ5e5aTWKWbP4uDTDzqUziSAFV8rcNoh8d/2XY=; b=PQJ5TWefYHKAkuM9NnYO1UmR2YqOUlVXbvGLc7hIOcMij80AC7sOipjYque1LFIE63 gl+49EJCq07jHpVLgN1iPKH1gwhh52ndE+x+WixvkWmFCrsfRJVz1DtHLtvjsbwEfcFs 93P3POfNUcnNMGusur6OZbPgi3RedViUHE8RR5ORnhcj2TjSwHOPMYU1ZdqZqb3lCcKP kWaB9V3klkQroCei9Uu9YHpRJYfybUBdzM4QkJ2XsRDkWPsNOOU/9QJPPO9NqL1JeFR+ rjeJuT+qDXTGxGkLUUcq8C39EdIcxrZDgnssZcD/859i4CN1SGKQWl6YcrDQzBus9M/w QS/w== X-Gm-Message-State: AOAM5319QysZhEykksDhFixJ6jk/PnJmKSFNP+kArWRMLS5kc/kNdWUl 4HMn7C4hEcYmlCjV1x/qxawC8A== X-Google-Smtp-Source: ABdhPJxe4dPxUS5yrnZ66P8Rk0EWTAnZfjkj4n6po76yv47vCBCNFifOoTE6KuUTjVI0zC72xtDeuA== X-Received: by 2002:a62:1a45:: with SMTP id a66mr9533075pfa.54.1591044161735; Mon, 01 Jun 2020 13:42:41 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:658b:ecbc:7ea4:1996]) by smtp.gmail.com with ESMTPSA id k7sm283581pga.87.2020.06.01.13.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 13:42:41 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass , Hugh Cole-Baker Subject: [PATCH v2 2/4] roc-rk3399-pc: Mark default env from SPI Date: Tue, 2 Jun 2020 02:12:11 +0530 Message-Id: <20200601204213.466120-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200601204213.466120-1-jagan@amarulasolutions.com> References: <20200601204213.466120-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200601_134242_627117_D2C55B60 X-CRM114-Status: UNSURE ( 9.36 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:542 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Mark the default U-Boot environment as SPI flash since this is an on board flash device. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- configs/roc-pc-rk3399_defconfig | 3 ++- include/configs/roc-pc-rk3399.h | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index 76e76c160e..18c343f9f9 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -1,6 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_ROCKCHIP=y CONFIG_SYS_TEXT_BASE=0x00200000 +CONFIG_ENV_SIZE=0x8000 CONFIG_ENV_OFFSET=0x3F8000 CONFIG_ROCKCHIP_RK3399=y CONFIG_TARGET_ROC_PC_RK3399=y @@ -24,7 +25,7 @@ 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_MMC=y +CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y diff --git a/include/configs/roc-pc-rk3399.h b/include/configs/roc-pc-rk3399.h index d4cbc3532e..59fe22289c 100644 --- a/include/configs/roc-pc-rk3399.h +++ b/include/configs/roc-pc-rk3399.h @@ -13,10 +13,6 @@ #include -#if defined(CONFIG_ENV_IS_IN_MMC) -# define CONFIG_SYS_MMC_ENV_DEV 0 -#endif - #define SDRAM_BANK_SIZE (2UL << 30) #endif From patchwork Mon Jun 1 20:42:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11582655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25CC8739 for ; Mon, 1 Jun 2020 20:42:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 04B7D206E2 for ; Mon, 1 Jun 2020 20:42:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rFZxC2w/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="n2PD2ota" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04B7D206E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gwvdSr2u+TeToli0zaneHAI7R7BpEm/Mh5DxPYNSEMs=; b=rFZxC2w/C8pKLN eFS1qiBwp+b8hGxAsmFYFJBHR58pOARsXF9w005+8uqgzjmhmD/XLIDhV7vxHdSLDuYO4aJOb2Cuw dktgdsUFC0xwFxzJsWLRW9A7StI6jXRZoKK1qYKeM3c9o7/6tERSrSyXa7z6HfhsLz5Hmse0HYXlx skdymE0agI5043w6PeV+AIkmf4rL/EJ4v7xVWwNQIonDhO5NOQdcJacCxrT4fnBTluZzMIvcYlKiZ kQ+6HRvHCSMFT6ByRRBQl7SBil0J/s8+LA91XQqNrY787qXhzqBnObNK5Z5X3OARlGSUqHVc1sp9b D65/dVaNLk2kfZipQWVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGk-0002UH-Bo; Mon, 01 Jun 2020 20:42:50 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGh-0002T9-My for linux-rockchip@lists.infradead.org; Mon, 01 Jun 2020 20:42:49 +0000 Received: by mail-pj1-x1043.google.com with SMTP id i12so325830pju.3 for ; Mon, 01 Jun 2020 13:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DOxyptf9FQQNcFAfnmKvWlTL2iTcXIqsnIhBYOAg8BQ=; b=n2PD2otatXqkk61mnrJVoAZ9QgAMae4SEu7hOH1RC3RNr+Ht/pZF4NAjO6kMKfL7d0 pEji9lUMNG2w6t5d6l5jMT+ZG7FSgf2E/5Lb1MYohySdDs2LLoX8Rygf9oneZ90+QLYJ vJ2RFrwdGhebqrgXBSP3T2zOS5O3SdUmWuZC0= 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; bh=DOxyptf9FQQNcFAfnmKvWlTL2iTcXIqsnIhBYOAg8BQ=; b=ovLy9As6RpNsEi/W5Iom5QEkhTLt8JbOAv2Yb0iJJ2MnGqEzIiaEbKquUDwCCK9UsO JXqQCgvs2zF0WNCzZI47gCA4W/wF++yTD2WFI9VOGQNv94ucnWjQY3PeUzOsp/8F8FnQ zk2SKfOE5z3itYBKSYcwhFgb2JkUUK++Cwi/8Gl0l0aHSOGvlGCSZ1Mfu+t9zS8tiZOs tM9IA7VMHrb/OD88KG00UwdB70MTV7MepRzwylYFV+pmw1ri8akKhBM4awR9envm79+M DPlF0a4MCfAFRwAlsOzvofcwj/Cr30ohx8xDFH2n56VQ+8PWBRiW5g1c/4RG6HUwSS3U h3Ng== X-Gm-Message-State: AOAM531lDe5Yr1VtfmBL0Ant9gZMUo959M2mu9nXRBP2xXeLISpSeMLk yieSnczxmmKdJoZb9JgEvUcjRokch642VA== X-Google-Smtp-Source: ABdhPJwXTsXGVUc4v1yqEwdw3PWCqvVqC91JLCsYeV0dwP4bGIlavRDcG79FIrU4CPWQqKN5e46Ylw== X-Received: by 2002:a17:90b:110d:: with SMTP id gi13mr1316899pjb.173.1591044166947; Mon, 01 Jun 2020 13:42:46 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:658b:ecbc:7ea4:1996]) by smtp.gmail.com with ESMTPSA id k7sm283581pga.87.2020.06.01.13.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 13:42:46 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass , Hugh Cole-Baker Subject: [PATCH v2 3/4] roc-rk3399-pc: Add SPI boot Date: Tue, 2 Jun 2020 02:12:12 +0530 Message-Id: <20200601204213.466120-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200601204213.466120-1-jagan@amarulasolutions.com> References: <20200601204213.466120-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200601_134247_755341_1DDD877D X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1043 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org U-Boot TPL 2020.07-rc3-00090-gd4e919f927-dirty (Jun 01 2020 - 23:45:53) Channel 0: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: LPDDR4, 50MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride 256B stride lpddr4_set_rate: change freq to 400000000 mhz 0, 1 lpddr4_set_rate: change freq to 800000000 mhz 1, 0 Trying to boot from BOOTROM Returning to boot ROM... U-Boot SPL 2020.07-rc3-00087-ga21e9fd385 (Jun 02 2020 - 00:09:45 +0530) Trying to boot from MMC1 NOTICE: BL31: v2.2(release): NOTICE: BL31: Built : 15:05:37, May 12 2020 U-Boot 2020.07-rc3-00087-ga21e9fd385 (Jun 02 2020 - 00:09:45 +0530) SoC: Rockchip rk3399 Reset cause: POR Model: Firefly ROC-RK3399-PC Board DRAM: 3.9 GiB PMIC: RK808 MMC: mmc@fe320000: 1, sdhci@fe330000: 0 Loading Environment from SPI Flash... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Model: Firefly ROC-RK3399-PC Board Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- arch/arm/dts/rk3399-roc-pc-u-boot.dtsi | 12 +++++++++++- configs/roc-pc-mezzanine-rk3399_defconfig | 3 +++ configs/roc-pc-rk3399_defconfig | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi index 141dd0b306..fc155e6903 100644 --- a/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi +++ b/arch/arm/dts/rk3399-roc-pc-u-boot.dtsi @@ -12,7 +12,11 @@ }; chosen { - u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; + u-boot,spl-boot-order = "same-as-spl", &spi_flash, &sdhci, &sdmmc; + }; + + config { + u-boot,spl-payload-offset = <0x60000>; /* @ 384KB */ }; vcc_hub_en: vcc_hub_en-regulator { @@ -40,6 +44,12 @@ vin-supply = <&vcc_vbus_typec0>; }; +&spi1 { + spi_flash: flash@0 { + u-boot,dm-pre-reloc; + }; +}; + &vdd_log { regulator-min-microvolt = <430000>; regulator-init-microvolt = <950000>; diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig index 1c1539bcb9..4b98dd9cfc 100644 --- a/configs/roc-pc-mezzanine-rk3399_defconfig +++ b/configs/roc-pc-mezzanine-rk3399_defconfig @@ -7,12 +7,15 @@ CONFIG_TARGET_ROC_PC_RK3399=y CONFIG_NR_DRAM_BANKS=1 CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEBUG_UART=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc-mezzanine.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 +CONFIG_SPL_SPI_LOAD=y CONFIG_TPL=y CONFIG_TPL_GPIO_SUPPORT=y CONFIG_CMD_BOOTZ=y diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index 18c343f9f9..e5ff570b87 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -8,12 +8,15 @@ CONFIG_TARGET_ROC_PC_RK3399=y CONFIG_NR_DRAM_BANKS=1 CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEBUG_UART=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 +CONFIG_SPL_SPI_LOAD=y CONFIG_TPL=y CONFIG_TPL_GPIO_SUPPORT=y CONFIG_CMD_BOOTZ=y From patchwork Mon Jun 1 20:42:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11582657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7EC47913 for ; Mon, 1 Jun 2020 20:42:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D576206E2 for ; Mon, 1 Jun 2020 20:42:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I4xiACXg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="dG9IOu+U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D576206E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L3r/vGM0EhpS0R0iIhxlSwjk7HF2VVoO2XuJ+lad1t8=; b=I4xiACXgQSWplh gi4VNQL8XGz7iK9tnOj/PHAf8ca3ZgXpR9e3wZaP6q6QDFcAjIsiAdrF54CANTc46KpiBHePo9uM6 sHBmsEp/mbtQqE/VmV8N8TFx3cs0G13yn/md06k7FrCcYQyVw3zOghea7UcK4jiOJHKI+bB3u6swF 1LUEYY8niqn9qcCwHYskB+sHQf9m5mjZhUi+XUk1Shx+kG3kdejteEv3sytAvAT0twUunh5zho8cj bin6HWBgJ8eklYYZzPVOsHze9AllCxLLCGXC5EDwlH9oZ+qhLGozAHVvqkKFWC9J1105G3oldMKbO ChHhFvFeEb83K5F5eHSA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGp-0002XS-Eb; Mon, 01 Jun 2020 20:42:55 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfrGm-0002Vw-E6 for linux-rockchip@lists.infradead.org; Mon, 01 Jun 2020 20:42:53 +0000 Received: by mail-pl1-x641.google.com with SMTP id q16so419288plr.2 for ; Mon, 01 Jun 2020 13:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HH7Sg1d2KszYZfdSHi2ym0vvLWaCRPg8r9+mwlDQliw=; b=dG9IOu+UbkC9mz0Qyhf8FTz8T+HzBdmQxgqZt03TFJsM7G7oowwHlrHNR2FQTq9Yya BffcTy41E0Ytu8wxdgxteYgfdogDCBm3naJe/iyr565e8EhY9of1JDiBvtzcJ2F2kjMr 0j8DmmWoynhbtvjtYD7MgepRMHyT9+tFkhJ9o= 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; bh=HH7Sg1d2KszYZfdSHi2ym0vvLWaCRPg8r9+mwlDQliw=; b=esL7rW/rfNJtgB6YrQ5R71QR0r7B2joShl6/2NkcHPrdJZuN3OwSCHgjDI3mwmdeIf XVAnK/9yaQlcH2B6NAm9wRTDZ+tSXoHi9pzQevje1ixH4Bd9cttUfplgB83xZJZY5r59 FzZyz62YQj2XiawqZaVo8ZH6/y7a5NZchzYPHZPwXgIIp+H0d4tPxl1xfbBWLe8g0AdR AJzIjk7ZTCohqUlUAePgCReCYNN8TLsmOTPsbw9TZyk+TSucDf2ATZnsObBML+y485jQ HPetWgz3m5NrZWu/dT5ypo058T0MiI5JY2U6QrN3VLpjmnNEZFEUk1fTJEgD63uc//dv X4NA== X-Gm-Message-State: AOAM532ciLcyFvWpccDXhpYd1zR5REYwtsY0tDNfPkA7CF5rHyUsyPDu isL8IyoA/gjyHe7BKV4YlBJ0uw== X-Google-Smtp-Source: ABdhPJyfqApA9JhFuf02HQYPOe5x+HH+2sSRzO0z7I9L13AUzrb2JQg6J0U1CL6kYCb8D/k5OMx9tg== X-Received: by 2002:a17:90b:4d06:: with SMTP id mw6mr1397351pjb.190.1591044171668; Mon, 01 Jun 2020 13:42:51 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:658b:ecbc:7ea4:1996]) by smtp.gmail.com with ESMTPSA id k7sm283581pga.87.2020.06.01.13.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 13:42:50 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass , Hugh Cole-Baker Subject: [PATCH v2 4/4] doc: rockchip: Document SPI flash program steps Date: Tue, 2 Jun 2020 02:12:13 +0530 Message-Id: <20200601204213.466120-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200601204213.466120-1-jagan@amarulasolutions.com> References: <20200601204213.466120-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200601_134252_481452_2ABEDD7D X-CRM114-Status: UNSURE ( 8.28 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:641 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Document SPI flash program steps for rockchip platforms. Suggested-by: Hugh Cole-Baker Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- doc/board/rockchip/rockchip.rst | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst index 7b72fab496..76b228a046 100644 --- a/doc/board/rockchip/rockchip.rst +++ b/doc/board/rockchip/rockchip.rst @@ -162,6 +162,30 @@ Program the flash:: Note: for rockchip 32-bit platforms the U-Boot proper image is u-boot-dtb.img +SPI +^^^ + +Generating idbloader for SPI boot would require to input a multi image +image format to mkimage tool instead of concerting (like for MMC boot). + +SPL-alone SPI boot image:: + + ./tools/mkimage -n rk3399 -T rkspi -d spl/u-boot-spl.bin idbloader.img + +TPL+SPL SPI boot image:: + + ./tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl.bin:spl/u-boot-spl.bin idbloader.img + +Copy SPI boot images into SD card and boot from SD:: + + sf probe + load mmc 1:1 $kernel_addr_r idbloader.img + sf erase 0 +$filesize + sf write $kernel_addr_r 0 ${filesize} + load mmc 1:1 ${kernel_addr_r} u-boot.itb + sf erase 0x60000 +$filesize + sf write $kernel_addr_r 0x60000 ${filesize} + TODO ---- @@ -171,4 +195,4 @@ TODO - Add missing SoC's with it boards list .. Jagan Teki -.. Sunday 24 May 2020 10:08:41 PM IST +.. Tuesday 02 June 2020 12:18:57 AM IST