-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: add hpmicro hpm6750evkmini board
This is an risc-v board with dual-core processor. Signed-off-by: Weiwei Guo <[email protected]>
- Loading branch information
1 parent
5fcb575
commit d177873
Showing
17 changed files
with
796 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_sources_ifdef(CONFIG_XIP bootstartup.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) 2022 HPMicro | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_HPM6750EVKMINI | ||
bool "HPMicro HPM6750EVKMINI" | ||
depends on SOC_SERIES_ANDES_HPMICRO | ||
depends on SOC_HPM675X | ||
select CPU_HAS_FPU_DOUBLE_PRECISION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (c) 2022 HPMicro | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_HPM6750EVKMINI | ||
|
||
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition | ||
|
||
config BOARD | ||
default "hpm6750evkmini" | ||
|
||
config FLASH_LOAD_OFFSET | ||
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) | ||
|
||
config FLASH_LOAD_SIZE | ||
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) | ||
|
||
endif # BOARD_HPM6750EVKMINI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT CONFIG_XIP) | ||
board_runner_args(openocd "--use-elf") | ||
endif() | ||
board_runner_args(openocd "--config=${BOARD_DIR}/support/probes/ft2232.cfg" | ||
"--config=${BOARD_DIR}/support/soc/hpm6750-single-core.cfg" | ||
"--config=${BOARD_DIR}/support/boards/hpm6750evkmini.cfg") | ||
board_runner_args(openocd --target-handle=_CHIPNAME.cpu0) | ||
|
||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright (c) 2022 HPMicro | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
*/ | ||
|
||
#include <stdint.h> | ||
|
||
#ifdef CONFIG_XIP | ||
/** | ||
* @brief FLASH configuration option definitions: | ||
* option[0]: | ||
* [31:16] 0xfcf9 - FLASH configuration option tag | ||
* [15:4] 0 - Reserved | ||
* [3:0] option words (exclude option[0]) | ||
* option[1]: | ||
* [31:28] Flash probe type | ||
* 0 - SFDP SDR / 1 - SFDP DDR | ||
* 2 - 1-4-4 Read (0xEB, 24-bit address) / 3 - 1-2-2 Read(0xBB, 24-bit address) | ||
* 4 - HyperFLASH 1.8V / 5 - HyperFLASH 3V | ||
* 6 - OctaBus DDR (SPI -> OPI DDR) | ||
* 8 - Xccela DDR (SPI -> OPI DDR) | ||
* 10 - EcoXiP DDR (SPI -> OPI DDR) | ||
* [27:24] Command Pads after Power-on Reset | ||
* 0 - SPI / 1 - DPI / 2 - QPI / 3 - OPI | ||
* [23:20] Command Pads after Configuring FLASH | ||
* 0 - SPI / 1 - DPI / 2 - QPI / 3 - OPI | ||
* [19:16] Quad Enable Sequence (for the device support SFDP 1.0 only) | ||
* 0 - Not needed | ||
* 1 - QE bit is at bit 6 in Status Register 1 | ||
* 2 - QE bit is at bit1 in Status Register 2 | ||
* 3 - QE bit is at bit7 in Status Register 2 | ||
* 4 - QE bit is at bit1 in Status Register 2 and should be programmed by 0x31 | ||
* [15:8] Dummy cycles | ||
* 0 - Auto-probed / detected / default value | ||
* Others - User specified value, for DDR read, the dummy cycles should be | ||
* 2 * cycles on FLASH datasheet | ||
* [7:4] Misc. | ||
* 0 - Not used | ||
* 1 - SPI mode | ||
* 2 - Internal loopback | ||
* 3 - External DQS | ||
* [3:0] Frequency option | ||
* 1 - 30MHz / 2 - 50MHz / 3 - 66MHz / 4 - 80MHz / 5 - 100MHz | ||
* / 6 - 120MHz / 7 - 133MHz / 8 - 166MHz | ||
* | ||
* option[2] (Effective only if the bit[3:0] in option[0] > 1) | ||
* [31:20] Reserved | ||
* [19:16] IO voltage | ||
* 0 - 3V / 1 - 1.8V | ||
* [15:12] Pin group | ||
* 0 - 1st group / 1 - 2nd group | ||
* [11:8] Connection selection | ||
* 0 - CA_CS0 / 1 - CB_CS0 / 2 - CA_CS0 + CB_CS0 | ||
* (Two FLASH connected to CA and CB respectively) | ||
* [7:0] Drive Strength | ||
* 0 - Default value | ||
* option[3] (Effective only if the bit[3:0] in option[0] > 2, | ||
* required only for the QSPI NOR FLASH that not supports | ||
* JESD216) | ||
* [31:16] reserved | ||
* [15:12] Sector Erase Command Option, not required here | ||
* [11:8] Sector Size Option, not required here | ||
* [7:0] Flash Size Option | ||
* 0 - 4MB / 1 - 8MB / 2 - 16MB | ||
*/ | ||
__attribute__ ((section(".nor_cfg_option"))) const uint32_t option[4] = { | ||
0xfcf90001, 0x00000007, 0x0, 0x0 | ||
}; | ||
uint32_t __fw_size__[] = {32768}; | ||
|
||
#endif |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
.. _hpm6750evkmini: | ||
|
||
HPMicro HPM6750EVKMINI | ||
###################### | ||
|
||
Overview | ||
******** | ||
|
||
The HPM6750 is a dual-core flashless MCU running 816Mhz. | ||
It has a 2MB continuous on-chip ram. | ||
Also, it provides various memory interfaces, including SDRAM, Quad SPI NOR Flash, SD/eMMC. | ||
|
||
The figure shows the HPM6750EVKMINI board. | ||
|
||
.. image:: img/hpm6750evkmini.png | ||
:align: center | ||
:alt: HPM6750EVKMINI | ||
|
||
Hardware | ||
******** | ||
|
||
The HPM6750EVKMINI platform integrates 2 cores 32-bit 816MHz RISC-V CPUs, DSP, | ||
2MB RAM, Cache, SPI flash memory, ethernet controller and other peripherals. | ||
|
||
- HPM6750IVM MCU (816Mhz, 2MB OCRAM) | ||
- Onboard Memory | ||
- 128Mb SDRAM | ||
- 64Mb Quad SPI NOR Flash | ||
- Display & Camera | ||
- LCD connector | ||
- Camera (DVP) | ||
- WiFi | ||
- RW007 over SPI | ||
- USB | ||
- USB type C (USB 2.0 OTG) connector x2 | ||
- Audio | ||
- Mic | ||
- DAO | ||
- Others | ||
- TF Slot | ||
- FT2232 | ||
- Beeper | ||
- RGB LED | ||
- Expansion port | ||
- ART-PI extension port | ||
|
||
For more information about the HPMICRO SoC and HPM6750EVKMINI board: | ||
|
||
- `HPMICRO Design Resources`_ | ||
|
||
Supported Features | ||
================== | ||
|
||
The Zephyr hpm6750evkmini board configuration supports the following hardware | ||
features: | ||
|
||
+------------------+------------+-------------------------------------+ | ||
| Interface | Controller | Driver/Component | | ||
+==================+============+=====================================+ | ||
| PLIC | on-chip | interrupt_controller | | ||
+------------------+------------+-------------------------------------+ | ||
| RISC-V Machine | on-chip | timer | | ||
| Timer | | | | ||
+------------------+------------+-------------------------------------+ | ||
| Clock Controller | on-chip | clock_controller | | ||
+------------------+------------+-------------------------------------+ | ||
| UART | on-chip | serial port-polling; | | ||
| | | serial port-interrupt | | ||
+------------------+------------+-------------------------------------+ | ||
| PINMUX | on-chip | pinmux | | ||
+------------------+------------+-------------------------------------+ | ||
| GPIO | on-chip | gpio | | ||
+------------------+------------+-------------------------------------+ | ||
|
||
Connections and IOs | ||
=================== | ||
|
||
.. rst-class:: rst-columns | ||
|
||
- UART0_RX : Y7 | ||
- UART0_TX : Y6 | ||
- LED_R : B19 | ||
- LED_G : B18 | ||
- LED_B : B20 | ||
|
||
System Clock | ||
============ | ||
|
||
HPM6750EVKMINI System Clock is use the PLL clock driven by | ||
external 24MHZ oscillator, By default System clock is 1GHz. | ||
|
||
Serial Port | ||
=========== | ||
|
||
The HPM6750EVKMINI platform has 2 UARTs. | ||
The Zephyr console output is by default assigned to UART0 and the default | ||
settings are 115200 8N1. | ||
|
||
Programming and debugging | ||
************************* | ||
|
||
Building | ||
======== | ||
|
||
You can build applications in the usual way. Here is an example for | ||
the :ref:`hello_world` application. | ||
|
||
.. zephyr-app-commands:: | ||
:board: hpm6750evkmini | ||
:zephyr-app: samples/hello_world | ||
:goals: build | ||
|
||
Flashing | ||
======== | ||
|
||
First, connect the hpm6750evkmini PWR DEBUG usb TypeC to your host | ||
computer to prepare it for flashing. Then build and flash your application. | ||
|
||
If you want to use XIP mode (``CONFIG_XIP=y``). | ||
If ``CONFIG_XIP=n``, you can load the program into RAM directly | ||
and execute it. | ||
|
||
.. zephyr-app-commands:: | ||
:board: hpm6750evkmini | ||
:zephyr-app: samples/hello_world | ||
:goals: flash | ||
|
||
Open a serial terminal with the following settings: | ||
|
||
.. code-block:: console | ||
$ minicom -D /dev/<tty device> | ||
- Speed: 115200 | ||
- Data: 8 bits | ||
- Parity: None | ||
- Stop bits: 1 | ||
|
||
Replace <tty_device> with the port where the FT2232HL can be | ||
found. For example, under Linux, /dev/ttyUSB1. | ||
|
||
you should see the following message in the terminal: | ||
|
||
.. code-block:: console | ||
Hello World! hpm6750evkmini | ||
Debugging | ||
========= | ||
|
||
.. zephyr-app-commands:: | ||
:board: hpm6750evkmini | ||
:zephyr-app: samples/hello_world | ||
:goals: debug | ||
|
||
References | ||
========== | ||
|
||
.. _HPMICRO Design Resources: | ||
http://www.hpmicro.com/resources/resources.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2022 HPMicro | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
#include <zephyr/dt-bindings/pinctrl/hpmicro-pinctrl-common.h> | ||
&pinctrl { | ||
pinmux_uart0: pinmux_uart0 { | ||
group0 { | ||
pinmux = | ||
<HPMICRO_PINMUX(Y, 7, IOC, 0, 2)>, | ||
<HPMICRO_PINMUX(Y, 6, IOC, 0, 2)>, | ||
<HPMICRO_PINMUX(Y, 7, PIOC, 0, 3)>, | ||
<HPMICRO_PINMUX(Y, 6, PIOC, 0, 3)>; | ||
drive-strength = "r000"; | ||
power-source = "3v3"; | ||
}; | ||
}; | ||
}; |
Oops, something went wrong.