public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 12/12] riscv: Add initial Sipeed Maix support
Date: Tue, 4 Feb 2020 09:49:12 -0500	[thread overview]
Message-ID: <409036c3-cfca-4bb0-8c64-cefea9669b53@gmail.com> (raw)
In-Reply-To: <CAEUhbmWMuAYwzXT=pqUmB-nhvkFhBhdLUYqMi4M1Arh-oyo1yw@mail.gmail.com>

On 2/4/20 9:42 AM, Bin Meng wrote:
> Hi Sean,
> 
> On Tue, Feb 4, 2020 at 10:26 PM Sean Anderson <seanga2@gmail.com> wrote:
>>
>> On 2/4/20 6:38 AM, Bin Meng wrote:
>>> Hi Sean,
>>>
>>> On Mon, Feb 3, 2020 at 4:11 AM Sean Anderson <seanga2@gmail.com> wrote:
>>>>
>>>> The Sipeed Maix series is a collection of boards built around the RISC-V
>>>> Kendryte K210 processor. This processor contains several peripherals to
>>>> accelerate neural network processing and other "ai" tasks. This includes a "KPU"
>>>> neural network processor, an audio processor supporting beamforming reception,
>>>> and a digital video port supporting capture and output at VGA resolution. Other
>>>> peripherals include 8M of sram (accessible with and without caching);
>>>> remappable pins, including 40 GPIOs; AES, FFT, and SHA256 accelerators; a DMA
>>>> controller; and I2C, I2S, and SPI controllers. Maix peripherals vary, but
>>>> include spi flash; on-board usb-serial bridges; ports for cameras, displays, and
>>>> sd cards; and ESP32 chips. Currently, only the Sipeed Maix Bit V2.0 (bitm) is
>>>> supported, but the boards are fairly similar.
>>>>
>>>> Documentation for Maix boards is located at <http://dl.sipeed.com/MAIX/HDK/>.
>>>> Documentation for the Kendryte K210 is located at
>>>> <https://kendryte.com/downloads/>. However, hardware details are rather lacking,
>>>> so most technical reference has been taken from the standalone sdk located at
>>>> <https://github.com/kendryte/kendryte-standalone-sdk>.
>>>>
>>>> Signed-off-by: Sean Anderson <seanga2@gmail.com>
>>>> ---
>>>>   Changes for v3:
>>>>   - Reorder to be last in the patch series
>>>>   - Add documentation for the board
>>>>   - Generate defconfig with "make savedefconfig"
>>>>   - Update Kconfig to imply most features we need
>>>>   - Update MAINTAINERS
>>>>   Changes for v2:
>>>>   - Select CONFIG_SYS_RISCV_NOCOUNTER
>>>>   - Imply CONFIG_CLK_K210
>>>>   - Remove spurious references to CONFIG_ARCH_K210
>>>>   - Remove many configs from defconfig where the defaults were fine
>>>>   - Add a few "not set" lines to suppress unneeded defaults
>>>>   - Reduce pre-reloc malloc space, now that clocks initialization happens later
>>>>
>>>>  arch/riscv/Kconfig                 |  4 +++
>>>>  board/sipeed/maix/Kconfig          | 51 ++++++++++++++++++++++++++++++
>>>>  board/sipeed/maix/MAINTAINERS      | 10 ++++++
>>>>  board/sipeed/maix/Makefile         |  5 +++
>>>>  board/sipeed/maix/maix.c           |  9 ++++++
>>>>  configs/sipeed_maix_bitm_defconfig | 10 ++++++
>>>>  doc/board/index.rst                |  1 +
>>>>  doc/board/kendryte/index.rst       |  9 ++++++
>>>>  doc/board/kendryte/k210.rst        | 46 +++++++++++++++++++++++++++
>>>>  include/configs/sipeed-maix.h      | 19 +++++++++++
>>>>  10 files changed, 164 insertions(+)
>>>>  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/kendryte/index.rst
>>>>  create mode 100644 doc/board/kendryte/k210.rst
>>>>  create mode 100644 include/configs/sipeed-maix.h
>>>>
>>>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>>> index 87c40f6c4c..81ab35dd2d 100644
>>>> --- a/arch/riscv/Kconfig
>>>> +++ b/arch/riscv/Kconfig
>>>> @@ -20,6 +20,9 @@ config TARGET_QEMU_VIRT
>>>>  config TARGET_SIFIVE_FU540
>>>>         bool "Support SiFive FU540 Board"
>>>>
>>>> +config TARGET_SIPEED_MAIX
>>>> +       bool "Support Sipeed Maix Board"
>>>> +
>>>>  endchoice
>>>>
>>>>  config SYS_ICACHE_OFF
>>>> @@ -53,6 +56,7 @@ source "board/AndesTech/ax25-ae350/Kconfig"
>>>>  source "board/emulation/qemu-riscv/Kconfig"
>>>>  source "board/microchip/mpfs_icicle/Kconfig"
>>>>  source "board/sifive/fu540/Kconfig"
>>>> +source "board/sipeed/maix/Kconfig"
>>>>
>>>>  # platform-specific options below
>>>>  source "arch/riscv/cpu/ax25/Kconfig"
>>>> diff --git a/board/sipeed/maix/Kconfig b/board/sipeed/maix/Kconfig
>>>> new file mode 100644
>>>> index 0000000000..b23d2448d9
>>>> --- /dev/null
>>>> +++ b/board/sipeed/maix/Kconfig
>>>> @@ -0,0 +1,51 @@
>>>> +# SPDX-License-Identifier: GPL-2.0+
>>>> +# Copyright (C) 2019 Sean Anderson <seanga2@gmail.com>
>>>> +
>>>> +if TARGET_SIPEED_MAIX
>>>> +
>>>> +config SYS_BOARD
>>>> +       default "maix"
>>>> +
>>>> +config SYS_VENDOR
>>>> +       default "sipeed"
>>>> +
>>>> +config SYS_CPU
>>>> +       default "generic"
>>>> +
>>>> +config SYS_CONFIG_NAME
>>>> +       default "sipeed-maix"
>>>> +
>>>> +config SYS_TEXT_BASE
>>>> +       default 0x80000000
>>>> +
>>>> +config DEFAULT_DEVICE_TREE
>>>> +       default "k210-maix-bit"
>>>> +
>>>> +config NR_CPUS
>>>> +       default 2
>>>> +
>>>> +config NR_DRAM_BANKS
>>>> +       default 2
>>>> +
>>>> +config BOARD_SPECIFIC_OPTIONS
>>>> +       def_bool y
>>>> +       select GENERIC_RISCV
>>>> +       select RISCV_PRIV_1_9_1
>>>> +       imply DM_SERIAL
>>>> +       imply SIFIVE_SERIAL
>>>> +       imply SIFIVE_CLINT
>>>> +       imply CLK_CCF
>>>> +       imply CLK_COMPOSITE_CCF
>>>> +       imply CLK_K210
>>>> +       imply DM_RESET
>>>> +       imply RESET_SYSCON
>>>> +       imply SYSRESET
>>>> +       imply SYSRESET_SYSCON
>>>> +       imply SPI
>>>> +       imply DESIGNWARE_SPI
>>>> +       imply SPI_FLASH_GIGADEVICE
>>>> +       imply MMC
>>>> +       imply MMC_SPI
>>>> +       imply MMC_BROKEN_CD
>>>> +       imply CMD_MMC
>>>> +endif
>>>> diff --git a/board/sipeed/maix/MAINTAINERS b/board/sipeed/maix/MAINTAINERS
>>>> new file mode 100644
>>>> index 0000000000..43cf61fb64
>>>> --- /dev/null
>>>> +++ b/board/sipeed/maix/MAINTAINERS
>>>> @@ -0,0 +1,10 @@
>>>> +Sipeed Maix BOARD
>>>> +M:     Sean Anderson <seanga2@gmail.com>
>>>> +S:     Maintained
>>>> +F:     arch/riscv/dts/k210.dtsi
>>>> +F:     arch/riscv/dts/k210-maix-bit.dts
>>>> +F:     board/sipeed/maix/
>>>> +F:     configs/sipeed_maix_defconfig
>>>> +F:     drivers/clk/kendryte/
>>>> +F:     include/configs/sipeed-maix.h
>>>> +F:     include/dt-bindings/*/k210-sysctl.h
>>>> diff --git a/board/sipeed/maix/Makefile b/board/sipeed/maix/Makefile
>>>> new file mode 100644
>>>> index 0000000000..4acff5b31e
>>>> --- /dev/null
>>>> +++ b/board/sipeed/maix/Makefile
>>>> @@ -0,0 +1,5 @@
>>>> +# SPDX-License-Identifier: GPL-2.0+
>>>> +#
>>>> +# Copyright (c) 2019 Western Digital Corporation or its affiliates.
>>>> +
>>>> +obj-y += maix.o
>>>> diff --git a/board/sipeed/maix/maix.c b/board/sipeed/maix/maix.c
>>>> new file mode 100644
>>>> index 0000000000..f8e773acf7
>>>> --- /dev/null
>>>> +++ b/board/sipeed/maix/maix.c
>>>> @@ -0,0 +1,9 @@
>>>> +// SPDX-License-Identifier: GPL-2.0+
>>>> +/*
>>>> + * Copyright (C) 2019 Sean Anderson <seanga2@gmail.com>
>>>> + */
>>>> +
>>>> +int board_init(void)
>>>> +{
>>>> +       return 0;
>>>> +}
>>>> diff --git a/configs/sipeed_maix_bitm_defconfig b/configs/sipeed_maix_bitm_defconfig
>>>> new file mode 100644
>>>> index 0000000000..22d814ec7f
>>>> --- /dev/null
>>>> +++ b/configs/sipeed_maix_bitm_defconfig
>>>> @@ -0,0 +1,10 @@
>>>> +CONFIG_RISCV=y
>>>> +CONFIG_TARGET_SIPEED_MAIX=y
>>>> +CONFIG_ARCH_RV64I=y
>>>> +# CONFIG_LEGACY_IMAGE_FORMAT is not set
>>>> +# CONFIG_AUTOBOOT is not set
>>>> +# CONFIG_NET is not set
>>>> +# CONFIG_INPUT is not set
>>>> +# CONFIG_MTD is not set
>>>> +# CONFIG_DM_ETH is not set
>>>> +# CONFIG_EFI_LOADER is not set
>>>> diff --git a/doc/board/index.rst b/doc/board/index.rst
>>>> index 00e72f57cd..2bd740589b 100644
>>>> --- a/doc/board/index.rst
>>>> +++ b/doc/board/index.rst
>>>> @@ -13,6 +13,7 @@ Board-specific doc
>>>>     freescale/index
>>>>     google/index
>>>>     intel/index
>>>> +   kendryte/index
>>>
>>> We should use the board vendor name: sipeed/index>
>>
>> That's what I thought, but everything else in this directory is
>> organized by CPU manufacturer. For example, it is
> 
> No it's organized by the board manufacturer. It's just the same vendor
> that happens to the the CPU manufacturer.

Ah, ok. I will change this for v4 then.

>> doc/board/sifive/fu450.rst, not hifive.rst. Hence the naming scheme
> 
> I would vote for changing it to hifive_unleashed.
> 
>> below.
>>
>>>>     renesas/index
>>>>     sifive/index
>>>>     xilinx/index
> 
> [snip]
> 
> Regards,
> Bin
> 

      reply	other threads:[~2020-02-04 14:49 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-02 19:56 [PATCH v3 00/12] riscv: Add Sipeed Maix support Sean Anderson
2020-02-02 19:58 ` [PATCH v3 01/12] clk: Always use the supplied struct clk Sean Anderson
2020-02-06 21:21   ` Lukasz Majewski
     [not found]     ` <752D002CFF5D0F4FA35C0100F1D73F3FA46D30F5@ATCPCS16.andestech.com>
2020-02-12  1:23       ` Rick Chen
2020-02-02 19:58 ` [PATCH v3 02/12] clk: Check that ops of composite clock components, exist before calling Sean Anderson
2020-02-06 21:41   ` Lukasz Majewski
2020-02-02 19:59 ` [PATCH v3 03/12] clk: Unconditionally recursively en-/dis-able clocks Sean Anderson
2020-02-06 21:45   ` Lukasz Majewski
2020-02-02 20:01 ` [PATCH v3 04/12] reset: Add generic reset driver Sean Anderson
2020-02-03  0:04   ` Simon Glass
2020-02-03 23:14     ` Sean Anderson
2020-02-04 11:06   ` Bin Meng
2020-02-04 14:14     ` Sean Anderson
2020-02-02 20:02 ` [PATCH v3 05/12] dm: Add support for simple-pm-bus Sean Anderson
2020-02-03  0:04   ` Simon Glass
2020-02-03 23:15     ` Sean Anderson
2020-02-05  0:16       ` Simon Glass
2020-02-04 11:13   ` Bin Meng
2020-02-02 20:04 ` [PATCH v3 06/12] riscv: Add headers for asm/global_data.h Sean Anderson
2020-02-04 11:17   ` Bin Meng
2020-02-02 20:05 ` [PATCH v3 07/12] riscv: Add option to support RISC-V privileged spec 1.9.1 Sean Anderson
2020-02-04 11:21   ` Bin Meng
2020-02-04 14:19     ` Sean Anderson
2020-02-04 14:38       ` Bin Meng
2020-02-04 14:48         ` Sean Anderson
2020-02-04 16:04           ` Bin Meng
2020-02-04 16:07             ` Sean Anderson
2020-02-02 20:06 ` [PATCH v3 08/12] riscv: Allow use of reset drivers Sean Anderson
2020-02-04 11:22   ` Bin Meng
2020-02-02 20:07 ` [PATCH v3 09/12] riscv: Add K210 pll support Sean Anderson
2020-02-02 20:07 ` [PATCH v3 10/12] riscv: Add K210 clock support Sean Anderson
2020-02-06 21:51   ` Lukasz Majewski
2020-02-02 20:10 ` [PATCH v3 11/12] riscv: Add device tree for K210 Sean Anderson
2020-02-04 11:32   ` Bin Meng
2020-02-04 14:23     ` Sean Anderson
2020-02-04 14:40       ` Bin Meng
2020-02-02 20:10 ` [PATCH v3 12/12] riscv: Add initial Sipeed Maix support Sean Anderson
2020-02-04 11:38   ` Bin Meng
2020-02-04 14:26     ` Sean Anderson
2020-02-04 14:42       ` Bin Meng
2020-02-04 14:49         ` Sean Anderson [this message]

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=409036c3-cfca-4bb0-8c64-cefea9669b53@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