All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 00/22] RISC-V SiFive FU540 support SPL
@ 2020-05-02 10:06 Pragnesh Patel
  2020-05-02 10:06 ` [PATCH v7 01/22] misc: add driver for the SiFive otp controller Pragnesh Patel
                   ` (22 more replies)
  0 siblings, 23 replies; 118+ messages in thread
From: Pragnesh Patel @ 2020-05-02 10:06 UTC (permalink / raw)
  To: u-boot

This series add support for SPL to FU540.U-Boot SPL can boot from
L2 LIM (0x0800_0000) and jump to OpenSBI(FW_DYNAMIC firmware) and
U-Boot proper from MMC devices.

How to test this patch:
1) Go to OpenSBI-dir : make PLATFORM=generic FW_DYNAMIC=y
2) export OPENSBI=<path/to/opensbi/install_dir/platform/generic/firmware/fw_dynamic.bin>
3) Change to u-boot-dir
4) make sifive_fu540_defconfig
5) make all
6) Format the SD card (make sure the disk has GPT, otherwise use gdisk to switch)

	# sudo sgdisk --clear \
	> --set-alignment=2 \
	> --new=1:34:2081 --change-name=1:loader1 --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \
	> --new=2:2082:10273 --change-name=2:loader2 --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \
	> --new=3:10274: --change-name=3:rootfs --typecode=3:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \
	> /dev/sda

7) sudo dd if=spl/u-boot-spl.bin of=/dev/sda seek=34
8) sudo dd if=u-boot.itb of=/dev/sda seek=2082 


Changes in v7:
- Standardize SD gpt partition layout
- Add delay for SiFive OTP driver
- Use DM way for corepll and ddrpll
- Add new cpu fu540 (arch/riscv/cpu/fu540)
- Update document for FU540 (doc/board/sifive/fu540.rst)

Changes in v6:
- Typo Correction
- Make fu540-c000-u-boot.dtsi and hifive-unleashed-a00-u-boot.dtsi
  Dual Licensed
- Sync Hifive unleashed dts from Linux
- Add arch/riscv/fu540 for FU540 specific code

Changes in v5:
- Return read/write bytes for sifive_otp_read and sifive_otp_write
- Correct Palmer's email address

Changes in v4:
- Split misc DM driver patch into multiple patches
- Added new SPL_CRC7_SUPPORT Kconfig option
- Added DM driver for DDR
- Added clk_enable and clk_disable ops in SiFive PRCI driver
- Added early clock initialization for SPL in SiFive PRCI driver
- Added SPL config options in sifive_fu540_defconfig instead of
  creatiing a new config file for SPL
- Update fu540.rst on how to build and flash U-boot SPL

Changes in v3:
- Remove arch-fu540 and arch-sifive from arch/riscv/include/asm/
- Split SPL patches into DDR and SPL and spl defconfig
- Update fu540/MAINTAINERS file
- Update fu540.rst on how to build and flash U-boot SPL

Changes in v2:
- Add DM driver Sifive OTP
- Split SPL patches into multiple patches
- Add a seprate patch for _image_binary_end and crc7.c
- Add a seprate patch to add board -u-boot.dtsi files
- Update FU540 RISC-V documentation


Pragnesh Patel (22):
  misc: add driver for the SiFive otp controller
  riscv: sifive: fu540: Use OTP DM driver for serial environment
    variable
  riscv: Add _image_binary_end for SPL
  lib: Makefile: build crc7.c when CONFIG_MMC_SPI
  riscv: sifive: dts: fu540: Add board -u-boot.dtsi files
  sifive: fu540: add ddr driver
  sifive: dts: fu540: Add DDR controller and phy register settings
  riscv: sifive: dts: fu540: add U-Boot dmc node
  clk: sifive: fu540-prci: Add clock enable and disable ops
  clk: sifive: fu540-prci: ddr and ethernet clock initialization in SPL
  riscv: dts: sifive: Sync hifive-unleashed-a00 dts from linux
  sifive: dts: fu540: Enable gpio in U-Boot SPL
  riscv: cpu: fu540: Add support for cpu fu540
  riscv: Add place-holder for driver compilation
  riscv: sifive: dts: fu540: Add clock for cpus node
  riscv: Enable cpu clock if it is present
  riscv: sifive: fu540: add SPL configuration
  configs: fu540: Add config options for U-Boot SPL
  sifive: dts: fu540: Enable L2 Cache in U-Boot
  riscv: sifive: fu540: enable all cache ways from U-Boot proper
  doc: sifive: fu540: Add description for OpenSBI generic platform
  doc: sifive: fu540: Add description for RISC-V FU540 U-Boot SPL

 arch/riscv/Kconfig                            |    1 +
 arch/riscv/cpu/fu540/Kconfig                  |   15 +
 arch/riscv/cpu/fu540/Makefile                 |   12 +
 arch/riscv/cpu/fu540/cache.c                  |   53 +
 arch/riscv/cpu/fu540/cpu.c                    |   22 +
 arch/riscv/cpu/fu540/dram.c                   |   38 +
 arch/riscv/cpu/fu540/spl.c                    |   23 +
 arch/riscv/cpu/u-boot-spl.lds                 |    1 +
 arch/riscv/dts/fu540-c000-u-boot.dtsi         |   91 +
 arch/riscv/dts/fu540-c000.dtsi                |   37 +-
 ...fu540-hifive-unleashed-a00-sdram-ddr4.dtsi | 1489 +++++++++++++++++
 .../dts/hifive-unleashed-a00-u-boot.dtsi      |   22 +
 arch/riscv/dts/hifive-unleashed-a00.dts       |    9 +
 arch/riscv/include/asm/arch-fu540/cache.h     |   14 +
 arch/riscv/include/asm/arch-fu540/clk.h       |   14 +
 arch/riscv/include/asm/arch-fu540/gpio.h      |   38 +
 arch/riscv/include/asm/arch-fu540/spl.h       |   14 +
 board/sifive/fu540/Kconfig                    |   14 +-
 board/sifive/fu540/Makefile                   |    4 +
 board/sifive/fu540/fu540.c                    |  143 +-
 board/sifive/fu540/spl.c                      |   72 +
 common/spl/Kconfig                            |    6 +
 configs/sifive_fu540_defconfig                |    9 +
 doc/board/sifive/fu540.rst                    |  395 ++++-
 drivers/clk/sifive/fu540-prci.c               |  193 ++-
 drivers/cpu/riscv_cpu.c                       |   33 +
 drivers/misc/Kconfig                          |    7 +
 drivers/misc/Makefile                         |    1 +
 drivers/misc/sifive-otp.c                     |  273 +++
 drivers/mmc/Kconfig                           |    1 +
 drivers/ram/Kconfig                           |    1 +
 drivers/ram/Makefile                          |    2 +
 drivers/ram/sifive/Kconfig                    |   13 +
 drivers/ram/sifive/Makefile                   |    6 +
 drivers/ram/sifive/sdram_fu540.c              |  416 +++++
 include/configs/sifive-fu540.h                |   18 +
 lib/Makefile                                  |    1 +
 37 files changed, 3403 insertions(+), 98 deletions(-)
 create mode 100644 arch/riscv/cpu/fu540/Kconfig
 create mode 100644 arch/riscv/cpu/fu540/Makefile
 create mode 100644 arch/riscv/cpu/fu540/cache.c
 create mode 100644 arch/riscv/cpu/fu540/cpu.c
 create mode 100644 arch/riscv/cpu/fu540/dram.c
 create mode 100644 arch/riscv/cpu/fu540/spl.c
 create mode 100644 arch/riscv/dts/fu540-c000-u-boot.dtsi
 create mode 100644 arch/riscv/dts/fu540-hifive-unleashed-a00-sdram-ddr4.dtsi
 create mode 100644 arch/riscv/include/asm/arch-fu540/cache.h
 create mode 100644 arch/riscv/include/asm/arch-fu540/clk.h
 create mode 100644 arch/riscv/include/asm/arch-fu540/gpio.h
 create mode 100644 arch/riscv/include/asm/arch-fu540/spl.h
 create mode 100644 board/sifive/fu540/spl.c
 create mode 100644 drivers/misc/sifive-otp.c
 create mode 100644 drivers/ram/sifive/Kconfig
 create mode 100644 drivers/ram/sifive/Makefile
 create mode 100644 drivers/ram/sifive/sdram_fu540.c

-- 
2.17.1

^ permalink raw reply	[flat|nested] 118+ messages in thread

end of thread, other threads:[~2020-05-12  7:45 UTC | newest]

Thread overview: 118+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 10:06 [PATCH v7 00/22] RISC-V SiFive FU540 support SPL Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 01/22] misc: add driver for the SiFive otp controller Pragnesh Patel
2020-05-02 12:28   ` Bin Meng
2020-05-02 15:37   ` Jagan Teki
2020-05-02 15:42     ` Pragnesh Patel
2020-05-02 15:50       ` Jagan Teki
2020-05-02 16:18         ` Pragnesh Patel
2020-05-10  9:04           ` Jagan Teki
2020-05-11  5:39             ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 02/22] riscv: sifive: fu540: Use OTP DM driver for serial environment variable Pragnesh Patel
2020-05-02 12:28   ` Bin Meng
2020-05-02 10:06 ` [PATCH v7 03/22] riscv: Add _image_binary_end for SPL Pragnesh Patel
2020-05-02 12:28   ` Bin Meng
2020-05-02 10:06 ` [PATCH v7 04/22] lib: Makefile: build crc7.c when CONFIG_MMC_SPI Pragnesh Patel
2020-05-02 10:29   ` Heinrich Schuchardt
2020-05-02 11:47     ` Bin Meng
2020-05-02 12:58       ` Heinrich Schuchardt
2020-05-02 15:33         ` Jagan Teki
2020-05-04  5:45           ` Pragnesh Patel
2020-05-05 15:55             ` Pragnesh Patel
2020-05-08  5:59               ` Pragnesh Patel
2020-05-03  9:54         ` Pragnesh Patel
2020-05-02 12:28   ` Bin Meng
2020-05-02 10:06 ` [PATCH v7 05/22] riscv: sifive: dts: fu540: Add board -u-boot.dtsi files Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 06/22] sifive: fu540: add ddr driver Pragnesh Patel
2020-05-02 12:28   ` Bin Meng
2020-05-02 15:59   ` Jagan Teki
2020-05-02 16:32     ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 07/22] sifive: dts: fu540: Add DDR controller and phy register settings Pragnesh Patel
2020-05-02 12:28   ` Bin Meng
2020-05-02 14:41     ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 08/22] riscv: sifive: dts: fu540: add U-Boot dmc node Pragnesh Patel
2020-05-02 12:29   ` Bin Meng
2020-05-02 10:06 ` [PATCH v7 09/22] clk: sifive: fu540-prci: Add clock enable and disable ops Pragnesh Patel
2020-05-02 12:29   ` Bin Meng
2020-05-02 10:06 ` [PATCH v7 10/22] clk: sifive: fu540-prci: ddr and ethernet clock initialization in SPL Pragnesh Patel
2020-05-02 12:28   ` Bin Meng
2020-05-02 14:49     ` Pragnesh Patel
2020-05-09 11:29       ` Pragnesh Patel
2020-05-02 16:14   ` Jagan Teki
2020-05-02 16:35     ` Pragnesh Patel
2020-05-02 16:44       ` Jagan Teki
2020-05-03  8:57         ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 11/22] riscv: dts: sifive: Sync hifive-unleashed-a00 dts from linux Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 12/22] sifive: dts: fu540: Enable gpio in U-Boot SPL Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 13/22] riscv: cpu: fu540: Add support for cpu fu540 Pragnesh Patel
2020-05-02 12:32   ` Bin Meng
2020-05-02 14:38     ` Pragnesh Patel
2020-05-02 16:34   ` Jagan Teki
2020-05-03  9:16     ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 14/22] riscv: Add place-holder for driver compilation Pragnesh Patel
2020-05-02 12:43   ` Bin Meng
2020-05-02 16:27   ` Jagan Teki
2020-05-03  9:17     ` Pragnesh Patel
2020-05-10  9:12       ` Jagan Teki
2020-05-11  5:58         ` Pragnesh Patel
2020-05-11  6:53           ` Jagan Teki
2020-05-11  7:10             ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 15/22] riscv: sifive: dts: fu540: Add clock for cpus node Pragnesh Patel
2020-05-02 12:43   ` Bin Meng
2020-05-02 16:50   ` Jagan Teki
2020-05-03  8:55     ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 16/22] riscv: Enable cpu clock if it is present Pragnesh Patel
2020-05-02 12:55   ` Bin Meng
2020-05-02 18:15   ` Sean Anderson
2020-05-03  7:12     ` Pragnesh Patel
2020-05-03 17:17       ` Sean Anderson
2020-05-04  5:20         ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 17/22] riscv: sifive: fu540: add SPL configuration Pragnesh Patel
2020-05-02 12:55   ` Bin Meng
2020-05-02 10:06 ` [PATCH v7 18/22] configs: fu540: Add config options for U-Boot SPL Pragnesh Patel
2020-05-02 12:55   ` Bin Meng
2020-05-02 14:37     ` Pragnesh Patel
2020-05-02 17:04     ` Jagan Teki
2020-05-02 16:51   ` Jagan Teki
2020-05-04 15:48     ` Pragnesh Patel
2020-05-02 17:15   ` Jagan Teki
2020-05-03  7:20     ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 19/22] sifive: dts: fu540: Enable L2 Cache in U-Boot Pragnesh Patel
2020-05-02 16:18   ` Jagan Teki
2020-05-02 16:42     ` Pragnesh Patel
2020-05-02 17:13       ` Jagan Teki
2020-05-03  7:27         ` Pragnesh Patel
2020-05-10  9:31           ` Jagan Teki
2020-05-11  6:05             ` Pragnesh Patel
2020-05-11  6:54               ` Jagan Teki
2020-05-11  7:07                 ` Pragnesh Patel
2020-05-11  7:25                   ` Jagan Teki
2020-05-11  7:45                     ` Pragnesh Patel
2020-05-11  8:48                       ` Jagan Teki
2020-05-11  9:00                         ` Bin Meng
2020-05-11  9:05                           ` Jagan Teki
2020-05-11  9:34                             ` Pragnesh Patel
2020-05-11  9:47                               ` Bin Meng
2020-05-11  9:55                                 ` Pragnesh Patel
2020-05-11 10:10                                   ` Bin Meng
2020-05-11 10:35                                     ` Pragnesh Patel
2020-05-12  1:20                                       ` Bin Meng
2020-05-12  7:45                                   ` Jagan Teki
2020-05-02 10:06 ` [PATCH v7 20/22] riscv: sifive: fu540: enable all cache ways from U-Boot proper Pragnesh Patel
2020-05-02 12:55   ` Bin Meng
2020-05-02 14:34     ` Pragnesh Patel
2020-05-02 10:06 ` [PATCH v7 21/22] doc: sifive: fu540: Add description for OpenSBI generic platform Pragnesh Patel
2020-05-02 12:55   ` Bin Meng
2020-05-02 14:30     ` Pragnesh Patel
2020-05-02 15:16       ` Bin Meng
2020-05-02 15:22         ` Pragnesh Patel
2020-05-02 15:27           ` Bin Meng
2020-05-02 15:29             ` Pragnesh Patel
2020-05-03  4:36             ` Anup Patel
2020-05-02 10:06 ` [PATCH v7 22/22] doc: sifive: fu540: Add description for RISC-V FU540 U-Boot SPL Pragnesh Patel
2020-05-02 12:55   ` Bin Meng
2020-05-02 16:22   ` Jagan Teki
2020-05-02 16:53     ` Pragnesh Patel
2020-05-03  4:34   ` Anup Patel
2020-05-03  6:13     ` Pragnesh Patel
2020-05-02 17:18 ` [PATCH v7 00/22] RISC-V SiFive FU540 support SPL Jagan Teki
2020-05-03  7:19   ` Pragnesh Patel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.