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