From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v5 00/33] riscv: Add Sipeed Maix support
Date: Fri, 28 Feb 2020 16:05:18 -0500 [thread overview]
Message-ID: <20200228210552.615672-1-seanga2@gmail.com> (raw)
This patch series adds support for Sipeed Maix boards and the Kendryte
K210 CPU. Currently, only the Maix Bit V2.0 is supported, however other
models are similar. This series depends on
<https://patchwork.ozlabs.org/patch/1215327/>
(clk: Include missing headers for linux/clk-provider.h).
This will (hopefully) be the last version of this series adding any new
functionality, other than that needed to fix the bugs below.
Known Bugs/Limitations:
- Accessing the AI ram hangs, limiting available ram to 6M
- The MMC cannot be accessed with the dw_spi driver
- Trying to boot an image with bootm fails with
ERROR: Failed to allocate 0x7d60 bytes below 0x80000000.
To flash u-boot to a maix bit, run
kflash -tp /dev/<your tty here> -B bit_mic u-boot-dtb.bin
Boot output should look like the following:
U-Boot 2020.04-rc2-00087-g2221cc09c1-dirty (Feb 28 2020 - 13:53:09 -0500)
DRAM: 8 MiB
WDT: Started with servicing (60s timeout)
MMC: spi at 53000000:slot at 0: 0
In: serial at 38000000
Out: serial at 38000000
Err: serial at 38000000
Hit any key to stop autoboot: 0
SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
Reading 5242880 byte(s) at offset 0x00000000
## Starting application at 0x80000000 ...
Changes for v5:
- Rebase onto master
- Add pinconf support
- Add gpio support
- Store environment in spi flash
- Group patches by prefix
- Add additional documentation
- Add SMP support
- Add WDT support
Changes for v4:
- Linted several patches
- Updated the copyright year for several files
- Added tests for syscon-reset, simple-pm-bus, and the pll calc_rate function
- Added/updated documentation
- Fixed SPI for the nor flash
- Fixed PLLs not enabling/setting rate properly
- RISCV_PRIV_1_9_1 now (un)defines all diferring CSRs, and also disables VM
- More devicetree changes
Changes for v3:
- Remove patch to set RV64I as default
- Remove patch for a separate sysctl driver
- Split off cpu frequency patch into its own series
- Reorder support/devicetree patches to come last
- Add patch for reset driver
- Add simple-pm-bus for busses with their own clocks
- Add additional documentation
- Reword mcounteren patch to refer to the RISC-V priv spec 1.9.1
- Many devicetree changes
- Switch to "make savedefconfig" to generate the config
Changes for v2:
- Many bugfixes for the device tree
- Modify the config to build without errors
- Add support for keeping internal PLL frequencies in-range
- Fix several rebase-induced artifacts
Sean Anderson (33):
clk: Always use the supplied struct clk
clk: Check that ops of composite clock components exist before calling
clk: Unconditionally recursively en-/dis-able clocks
clk: Add functions to register CCF clock structs
clk: Add K210 pll support
clk: Add a bypass clock for K210
clk: Add K210 clock support
doc: Fix typo in FIT documentation
dm: Add support for simple-pm-bus
dm: Fix error handling for dev_read_addr_ptr
reset: Add generic reset driver
lib: Always set errno in hcreate_r
pinctrl: Add support for Kendryte K210 FPIOA
gpio: sifive: Use generic reg read function
gpio: dw: Fix warnings about casting int to pointer
gpio: dw: Add a trailing underscore to generated name
gpio: dw: Return output value when direction is out
led: gpio: Default to using node name if label is absent
spi: dw: Add device tree properties for fields in CTRL1
spi: dw: Rename "cs-gpio" to "cs-gpios"
spi: dw: Use generic function to read reg address
spi: dw: Speed up transfer loops
spi: dw: Properly set rx_end when not recieving
spi: dw: Add mem_ops
wdt: Move asm/utils.h to log2.h
riscv: Add headers for asm/global_data.h
riscv: Fix race conditions when initializing IPI
riscv: Add option to support RISC-V privileged spec 1.9
riscv: Allow use of reset drivers
riscv: Try to get cpu frequency from a "clocks" node if it exists
riscv: Enable cpu clock if it is present
riscv: Add device tree for K210 and Sipeed Maix BitM
riscv: Add Sipeed Maix support
MAINTAINERS | 9 +
arch/arc/dts/axs10x_mb.dtsi | 3 +-
arch/arc/dts/hsdk.dts | 3 +-
arch/arm/cpu/armv7/cache_v7.c | 2 +-
arch/arm/mach-davinci/spl.c | 2 +-
arch/arm/mach-omap2/clocks-common.c | 2 +-
arch/arm/mach-omap2/emif-common.c | 2 +-
arch/arm/mach-omap2/omap4/emif.c | 2 +-
arch/arm/mach-omap2/omap5/dra7xx_iodelay.c | 2 +-
arch/arm/mach-omap2/omap5/emif.c | 2 +-
arch/arm/mach-omap2/omap5/hwinit.c | 2 +-
arch/arm/mach-socfpga/spl_a10.c | 2 +-
arch/arm/mach-socfpga/spl_agilex.c | 2 +-
arch/arm/mach-socfpga/spl_gen5.c | 2 +-
arch/arm/mach-socfpga/spl_s10.c | 2 +-
arch/riscv/Kconfig | 14 +
arch/riscv/cpu/cpu.c | 18 +
arch/riscv/dts/Makefile | 1 +
arch/riscv/dts/k210-maix-bit.dts | 333 +++++++++
arch/riscv/dts/k210.dtsi | 649 +++++++++++++++++
arch/riscv/include/asm/csr.h | 40 ++
arch/riscv/include/asm/global_data.h | 3 +
arch/riscv/include/asm/smp.h | 43 ++
arch/riscv/lib/andes_plic.c | 34 +-
arch/riscv/lib/reset.c | 2 +
arch/riscv/lib/sbi_ipi.c | 5 +
arch/riscv/lib/sifive_clint.c | 33 +-
arch/riscv/lib/smp.c | 68 +-
arch/sandbox/dts/test.dts | 21 +
arch/sandbox/include/asm/clk.h | 1 +
board/sipeed/maix/Kconfig | 72 ++
board/sipeed/maix/MAINTAINERS | 11 +
board/sipeed/maix/Makefile | 5 +
board/sipeed/maix/maix.c | 54 ++
configs/sandbox_defconfig | 2 +
configs/sipeed_maix_bitm_defconfig | 16 +
doc/board/index.rst | 1 +
doc/board/sipeed/index.rst | 9 +
doc/board/sipeed/maix.rst | 223 ++++++
.../bus/simple-pm-bus.txt | 44 ++
.../mfd/kendryte,k210-sysctl.txt | 33 +
.../pinctrl/kendryte,k210-fpioa.txt | 116 +++
.../reset/syscon-reset.txt | 36 +
.../spi/snps,dw-apb-ssi.txt | 43 ++
doc/imx/clk/ccf.txt | 63 +-
doc/uImage.FIT/source_file_format.txt | 2 +-
drivers/clk/Kconfig | 1 +
drivers/clk/Makefile | 1 +
drivers/clk/clk-composite.c | 145 ++--
drivers/clk/clk-divider.c | 62 +-
drivers/clk/clk-fixed-factor.c | 3 +-
drivers/clk/clk-gate.c | 44 +-
drivers/clk/clk-mux.c | 12 +-
drivers/clk/clk-uclass.c | 60 +-
drivers/clk/imx/clk-gate2.c | 4 +-
drivers/clk/imx/clk-imx8mp.c | 2 +-
drivers/clk/kendryte/Kconfig | 12 +
drivers/clk/kendryte/Makefile | 1 +
drivers/clk/kendryte/bypass.c | 270 +++++++
drivers/clk/kendryte/clk.c | 478 +++++++++++++
drivers/clk/kendryte/pll.c | 600 ++++++++++++++++
drivers/core/Kconfig | 7 +
drivers/core/Makefile | 1 +
drivers/core/read.c | 2 +-
drivers/core/simple-pm-bus.c | 56 ++
drivers/cpu/riscv_cpu.c | 39 +-
drivers/gpio/dwapb_gpio.c | 33 +-
drivers/gpio/sifive-gpio.c | 2 +-
drivers/led/led_gpio.c | 7 +-
drivers/pinctrl/Kconfig | 1 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 2 +-
drivers/pinctrl/kendryte/Kconfig | 7 +
drivers/pinctrl/kendryte/Makefile | 1 +
drivers/pinctrl/kendryte/pinctrl.c | 663 ++++++++++++++++++
drivers/pinctrl/kendryte/pinctrl.h | 325 +++++++++
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 +-
drivers/reset/Kconfig | 5 +
drivers/reset/Makefile | 1 +
drivers/reset/reset-syscon.c | 80 +++
drivers/spi/designware_spi.c | 212 ++++--
drivers/watchdog/designware_wdt.c | 3 +-
include/configs/sipeed-maix.h | 24 +
include/dm/read.h | 4 +-
include/dt-bindings/clock/k210-sysctl.h | 56 ++
include/dt-bindings/mfd/k210-sysctl.h | 38 +
include/dt-bindings/pinctrl/k210-pinctrl.h | 12 +
include/dt-bindings/reset/k210-sysctl.h | 38 +
include/kendryte/bypass.h | 31 +
include/kendryte/clk.h | 35 +
include/kendryte/pll.h | 57 ++
include/linux/clk-provider.h | 9 +
.../arm/include/asm/utils.h => include/log2.h | 4 +-
include/test/export.h | 16 +
lib/hashtable.c | 8 +-
test/dm/Makefile | 3 +
test/dm/k210_pll.c | 95 +++
test/dm/simple-pm-bus.c | 45 ++
test/dm/syscon-reset.c | 58 ++
99 files changed, 5344 insertions(+), 368 deletions(-)
create mode 100644 arch/riscv/dts/k210-maix-bit.dts
create mode 100644 arch/riscv/dts/k210.dtsi
create mode 100644 board/sipeed/maix/Kconfig
create mode 100644 board/sipeed/maix/MAINTAINERS
create mode 100644 board/sipeed/maix/Makefile
create mode 100644 board/sipeed/maix/maix.c
create mode 100644 configs/sipeed_maix_bitm_defconfig
create mode 100644 doc/board/sipeed/index.rst
create mode 100644 doc/board/sipeed/maix.rst
create mode 100644 doc/device-tree-bindings/bus/simple-pm-bus.txt
create mode 100644 doc/device-tree-bindings/mfd/kendryte,k210-sysctl.txt
create mode 100644 doc/device-tree-bindings/pinctrl/kendryte,k210-fpioa.txt
create mode 100644 doc/device-tree-bindings/reset/syscon-reset.txt
create mode 100644 doc/device-tree-bindings/spi/snps,dw-apb-ssi.txt
create mode 100644 drivers/clk/kendryte/Kconfig
create mode 100644 drivers/clk/kendryte/Makefile
create mode 100644 drivers/clk/kendryte/bypass.c
create mode 100644 drivers/clk/kendryte/clk.c
create mode 100644 drivers/clk/kendryte/pll.c
create mode 100644 drivers/core/simple-pm-bus.c
create mode 100644 drivers/pinctrl/kendryte/Kconfig
create mode 100644 drivers/pinctrl/kendryte/Makefile
create mode 100644 drivers/pinctrl/kendryte/pinctrl.c
create mode 100644 drivers/pinctrl/kendryte/pinctrl.h
create mode 100644 drivers/reset/reset-syscon.c
create mode 100644 include/configs/sipeed-maix.h
create mode 100644 include/dt-bindings/clock/k210-sysctl.h
create mode 100644 include/dt-bindings/mfd/k210-sysctl.h
create mode 100644 include/dt-bindings/pinctrl/k210-pinctrl.h
create mode 100644 include/dt-bindings/reset/k210-sysctl.h
create mode 100644 include/kendryte/bypass.h
create mode 100644 include/kendryte/clk.h
create mode 100644 include/kendryte/pll.h
rename arch/arm/include/asm/utils.h => include/log2.h (93%)
create mode 100644 include/test/export.h
create mode 100644 test/dm/k210_pll.c
create mode 100644 test/dm/simple-pm-bus.c
create mode 100644 test/dm/syscon-reset.c
--
2.25.0
next reply other threads:[~2020-02-28 21:05 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-28 21:05 Sean Anderson [this message]
2020-02-28 21:05 ` [PATCH v5 01/33] clk: Always use the supplied struct clk Sean Anderson
2020-02-28 21:05 ` [PATCH v5 02/33] clk: Check that ops of composite clock components exist before calling Sean Anderson
2020-02-28 21:05 ` [PATCH v5 03/33] clk: Unconditionally recursively en-/dis-able clocks Sean Anderson
2020-03-04 6:50 ` Rick Chen
2020-02-28 21:05 ` [PATCH v5 04/33] clk: Add functions to register CCF clock structs Sean Anderson
2020-02-28 21:05 ` [PATCH v5 05/33] clk: Add K210 pll support Sean Anderson
2020-02-28 21:05 ` [PATCH v5 06/33] clk: Add a bypass clock for K210 Sean Anderson
2020-02-28 21:05 ` [PATCH v5 07/33] clk: Add K210 clock support Sean Anderson
2020-03-04 6:58 ` Rick Chen
2020-03-04 14:54 ` Sean Anderson
2020-02-28 21:05 ` [PATCH v5 08/33] doc: Fix typo in FIT documentation Sean Anderson
2020-03-02 2:21 ` Bin Meng
2020-02-28 21:05 ` [PATCH v5 09/33] dm: Add support for simple-pm-bus Sean Anderson
2020-02-28 21:05 ` [PATCH v5 10/33] dm: Fix error handling for dev_read_addr_ptr Sean Anderson
2020-03-02 2:22 ` Bin Meng
2020-03-02 19:46 ` Simon Glass
2020-02-28 21:05 ` [PATCH v5 11/33] reset: Add generic reset driver Sean Anderson
2020-02-28 21:05 ` [PATCH v5 12/33] lib: Always set errno in hcreate_r Sean Anderson
2020-03-02 2:24 ` Bin Meng
2020-02-28 21:05 ` [PATCH v5 13/33] pinctrl: Add support for Kendryte K210 FPIOA Sean Anderson
2020-03-04 6:47 ` Rick Chen
2020-03-04 15:00 ` Sean Anderson
2020-02-28 21:05 ` [PATCH v5 14/33] gpio: sifive: Use generic reg read function Sean Anderson
2020-03-02 2:24 ` Bin Meng
2020-02-28 21:05 ` [PATCH v5 15/33] gpio: dw: Fix warnings about casting int to pointer Sean Anderson
2020-03-02 2:27 ` Bin Meng
2020-03-02 3:50 ` Sean Anderson
2020-02-28 21:05 ` [PATCH v5 16/33] gpio: dw: Add a trailing underscore to generated name Sean Anderson
2020-02-28 21:05 ` [PATCH v5 17/33] gpio: dw: Return output value when direction is out Sean Anderson
2020-02-28 21:05 ` [PATCH v5 18/33] led: gpio: Default to using node name if label is absent Sean Anderson
2020-02-28 21:05 ` [PATCH v5 19/33] spi: dw: Add device tree properties for fields in CTRL1 Sean Anderson
2020-03-04 6:15 ` Rick Chen
2020-03-04 15:01 ` Sean Anderson
2020-02-28 21:05 ` [PATCH v5 20/33] spi: dw: Rename "cs-gpio" to "cs-gpios" Sean Anderson
2020-02-28 21:05 ` [PATCH v5 21/33] spi: dw: Use generic function to read reg address Sean Anderson
2020-02-28 21:05 ` [PATCH v5 22/33] spi: dw: Speed up transfer loops Sean Anderson
2020-02-28 21:05 ` [PATCH v5 23/33] spi: dw: Properly set rx_end when not recieving Sean Anderson
2020-02-29 17:47 ` Sean Anderson
2020-02-28 21:05 ` [PATCH v5 24/33] spi: dw: Add mem_ops Sean Anderson
2020-02-28 21:05 ` [PATCH v5 25/33] wdt: Move asm/utils.h to log2.h Sean Anderson
2020-02-28 21:46 ` Marek Vasut
2020-02-28 22:43 ` Sean Anderson
2020-02-28 23:27 ` Marek Vasut
2020-03-03 6:58 ` Rick Chen
2020-03-03 14:11 ` Sean Anderson
2020-02-28 21:05 ` [PATCH v5 26/33] riscv: Add headers for asm/global_data.h Sean Anderson
2020-02-28 21:05 ` [PATCH v5 27/33] riscv: Fix race conditions when initializing IPI Sean Anderson
2020-03-02 9:08 ` Rick Chen
2020-03-02 15:43 ` Sean Anderson
2020-03-02 23:15 ` Lukas Auer
2020-03-03 8:27 ` Rick Chen
2020-03-05 2:18 ` Rick Chen
2020-03-02 23:17 ` Lukas Auer
2020-03-02 23:43 ` Sean Anderson
2020-03-03 21:53 ` Lukas Auer
2020-03-03 21:57 ` Sean Anderson
2020-03-04 15:25 ` Lukas Auer
2020-02-28 21:05 ` [PATCH v5 28/33] riscv: Add option to support RISC-V privileged spec 1.9 Sean Anderson
2020-03-04 6:20 ` Rick Chen
2020-02-28 21:05 ` [PATCH v5 29/33] riscv: Allow use of reset drivers Sean Anderson
2020-02-28 21:05 ` [PATCH v5 30/33] riscv: Try to get cpu frequency from a "clocks" node if it exists Sean Anderson
2020-02-28 21:05 ` [PATCH v5 31/33] riscv: Enable cpu clock if it is present Sean Anderson
2020-02-28 21:05 ` [PATCH v5 32/33] riscv: Add device tree for K210 and Sipeed Maix BitM Sean Anderson
2020-02-28 21:05 ` [PATCH v5 33/33] riscv: Add Sipeed Maix support Sean Anderson
2020-03-04 6:04 ` Rick Chen
2020-03-04 7:47 ` Rick Chen
2020-03-04 15:11 ` Sean Anderson
2020-03-05 3:40 ` Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200228210552.615672-1-seanga2@gmail.com \
--to=seanga2@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox