From patchwork Tue May 19 19:23:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1211 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E44083F086 for ; Tue, 19 May 2020 21:24:25 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id bh7sf666645plb.2 for ; Tue, 19 May 2020 12:24:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1589916264; cv=pass; d=google.com; s=arc-20160816; b=WdV5v7yDVDu13bs06yzDfeh8tbXCTObjpDqcEvvW1i3wGsHdoNy4vBvZGd6pDfBEdz 5JxktP3fr2MXv8/jmZcue7HI9lSMgYJhroroB3En4jlK/CvSh6pQE1k6slyFWRvRydaX 7z02+cDYTV3HWcu23Ysg8xoZsh22X8PJO+8lFyEENhwKYDrDJsBoMJ+7Wm/p0BfuQQNZ ve16MbgIVYcND8cMnhbuaeoUMFH3VbjXoBMkG2Nft7J2GJwWQRpwB4TSv2Ml9b91Rk87 7KViRHyOKZqf9y2AObgWr+xjr1gcwY606MICVgzBEdqq1md69Kj/LO3K+8A6XtZFYYFa R96Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=9HSbyxobZSXUFq3q4BLEe2cP3vrBxkcp5hPpnICOH48=; b=pCLXVaupT41jAVRlr9B9WK4rkbYQaa9jXfIVbe7w0aGm8gfLKyDmqev910UyuEpD// m9o6yadhuM4pz/EYJnlde5qqax/v+KJGyf9UFtLcxTRCmhEzAuiCGB7YQJEXJvB5qoRJ dh8HmCWIgMT47kwQO5NyokdR4lVgPTXqUlR7bV6PjxTupDfsKCgDGO+zLTPkMe2dL2k2 MWUfygyWDgdVlX3oH810tYCaouthglfRmi4ErIQjjokxeYZqtUd23RVnx+zAvG0mDgTo E6l4etOkh+2gQDUqvr6efeHDQMGVl9O46T7SuRKfheft0jJyjouOfS9MnuFDbwM3DVyQ TH8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CHSVmAcy; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=9HSbyxobZSXUFq3q4BLEe2cP3vrBxkcp5hPpnICOH48=; b=DmK3RgBt2gmfXwVt1KciSo6efLW619bS7dTT2B0t2t6wq/UiX8uJ+LnJBqtJ4rLsox uVyPXiQ5dRNRO/EzQ9Jl5kWhu73mzPJaGPJ6B9TL28bI/+i+rsLP7B96WA5nBihuWpCl 7Vo2L0rxYnncSUWkkb2JbSHEmniUVC8Kba2+Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=9HSbyxobZSXUFq3q4BLEe2cP3vrBxkcp5hPpnICOH48=; b=m4nGTQbUu0xEHx5774lDlnFLsJbx2MM3kiuXRNKyHMFE/Xcho9aDI9CUhl1XNyeyni bgmbwje8B3yzduQPz+tCYUtBEU18sqvW30uCTCINCPaHD5h6EqKwqtXxLLMjHDLItIMj piIeodEpW5RIMQpuCk+rLdpw2Sy1yrqk5kMdpff5CTWZRLAFkRXOYp2E0XAqbwuocmEk ecs1I0XckuR4wahUHGt9UFXchteGY1UWQAr5SCUTiH9deEM39bcNVLD+duegeXm4vj+A j9F3P0aQE2o0qd2fhOVxELAcGSIFr8NcunULk9QvEgxCt1WX2yzzX9pER0GsstrvCS0x RLhA== X-Gm-Message-State: AOAM533swKAPRs4NzH86ax9PYZZm68PjQZ3Wp+3Auy4d483rgUYg3lLY GeDbWCAf7T/FAUrl3Fsjz+52pU5Y X-Google-Smtp-Source: ABdhPJyfcHiMDEvmTR6ShThq4Q0Bt3eV9nthnc2Q7jqRY1MUNGFxJbZl1n4KZioP+LuI3ZDL7Zzzow== X-Received: by 2002:a17:90a:24c5:: with SMTP id i63mr1137416pje.98.1589916263723; Tue, 19 May 2020 12:24:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1d93:: with SMTP id d141ls115324pfd.1.gmail; Tue, 19 May 2020 12:24:23 -0700 (PDT) X-Received: by 2002:a62:4e88:: with SMTP id c130mr656285pfb.122.1589916263221; Tue, 19 May 2020 12:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589916263; cv=none; d=google.com; s=arc-20160816; b=JEbpRrqYC9IJu4pbnN2HBP6zh/b78g05ZupAiLDaa8pRwxSIiQb8msIoc5w/5ciuGq 4mFTo3lUq3j/437jgx15TjQq7CSwhP/hmarNBGM8pU3OfO51M6el8YKEfO0d+iN674LO klvcG90T+hAAduwFKzeiIIEDOi+R7frxVsCIlSZKRh6n2yhllHsIsPgkru7R6urx80VE 2Uf0EspxWMZeTbow85eURGThWiMfuDhoTXuSA8apRbQakYGgcTPQl9bsJ8YWYVjBor5X zrcsOWuC1fP1Jl1qDlI1i1xq4Eq66yIBnQjmRGgKhQ9OmsMhpRZjUXdMZN3yPwqg5yYL akVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=T8ugkNs5GpFHxnMQZA02TcWWKNHFxlU+71gDV66vsp0=; b=RYdDIEy0ADyKO4wjjG2Ft4w735AVMMNe30ij4F8lYrBYJtOr7DyPna36hHOQ8KIiJ8 QFQueTeV13PwuupvpplbZ51J/Ohfs1HgbxY+IKrSgpMO8f0HUoN7n3rvRsxewwPJxnfj Vwav3HOGiUvCTaiF1w5Z4oXNGYZ1+cy+urirYRi7b33V4kCMKeKQvxVd1gFz68lKkZJk Xx3XRnqWY0ZXJtHva/Q+HCTyxwywRCuZw/zI0Nr1oj4Y0gBi/q/lrg2cClvVG2I5YPJx 2weicfvbYl4qhuiWYY5xO92ealKXW0b6PUGFuzdXSDQmUgEMPSqDCmWja7ZNtQeVboub 5Fcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CHSVmAcy; 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 s1sor904456pjo.5.2020.05.19.12.24.23 for (Google Transport Security); Tue, 19 May 2020 12:24:23 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:a78f:: with SMTP id f15mr1138497pjq.120.1589916262701; Tue, 19 May 2020 12:24:22 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:713c:4a0a:47eb:ffcd]) by smtp.gmail.com with ESMTPSA id w192sm222553pff.126.2020.05.19.12.24.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 12:24:21 -0700 (PDT) From: Jagan Teki To: Rick Chen , Atish Patra , Palmer Dabbelt , Bin Meng , Paul Walmsley , Anup Patel , Sagar Kadam Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 0/9] riscv: sifive/fu540: Booting from SPI Date: Wed, 20 May 2020 00:53:31 +0530 Message-Id: <20200519192340.16624-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=CHSVmAcy; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series support Boot from SPI on SiFive FU540 HiFive Unleashed board, with improved version of detecting bootmode at runtime. Previous version changes are at [1]. Changes for v2: - fu540 board driver - runtime bootmode detection - rebase on Pragnesh v11 series [1] https://patchwork.ozlabs.org/project/uboot/cover/20200420140514.25847-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (9): spl: Try to get SPL boot device via board_get_int dt-bindings: board: Document sifive,fu540-modeselect riscv: dts: fu540-c000-u-boot: Add sifive,fu540-modeselect drivers: Add fu540 board driver sifive: fu540: Add Booting from SPI env: Enable SPI flash env for SiFive FU540 sifive: fu540: Mark the default env as SPI flash sifive: fu540: Add boot flash script offset, size sifive: fu540: Enable SF distro bootcmd arch/riscv/cpu/fu540/Kconfig | 15 ++++ arch/riscv/dts/fu540-c000-u-boot.dtsi | 7 ++ .../dts/hifive-unleashed-a00-u-boot.dtsi | 12 +++ board/sifive/fu540/Kconfig | 1 + board/sifive/fu540/fu540.c | 12 --- common/spl/spl.c | 14 ++- configs/sifive_fu540_defconfig | 4 + doc/board/sifive/fu540.rst | 41 +++++++++ .../board/sifive,fu540-modeselect.txt | 15 ++++ drivers/board/Kconfig | 8 ++ drivers/board/Makefile | 1 + drivers/board/fu540.c | 86 +++++++++++++++++++ include/board.h | 9 ++ include/configs/sifive-fu540.h | 7 +- 14 files changed, 218 insertions(+), 14 deletions(-) create mode 100644 doc/device-tree-bindings/board/sifive,fu540-modeselect.txt create mode 100644 drivers/board/fu540.c