Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3346,11 +3346,15 @@ Microchip RISC-V Platforms:
- fkokosinski
- kgugala
- tgorochowik
- con-pax
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

way too many maintainers here, are all of those active? @fkokosinski @kgugala @tgorochowik are you still actively maintaining this platform?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, we're still maintaining Microchip RISC-V platforms. @pmoussay-emdalo - feel free to remove relegate @tgorochowik and @kgugala to collaborators

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to give a confirmation, we discussed this offline and we're okay with moving us

- pmoussay-emdalo
files:
- boards/microchip/m2gl025_miv/
- boards/microchip/mpfs_icicle/
- boards/microchip/pic64gx_curiosity_kit/
- dts/riscv/microchip/
- soc/microchip/miv/
- soc/microchip/pic64/
labels:
- "platform: Microchip RISC-V"

Expand Down
6 changes: 6 additions & 0 deletions boards/microchip/pic64gx_curiosity_kit/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2025 Microchip Technology Inc
# SPDX-License-Identifier: Apache-2.0

if BOARD_PIC64GX_CURIOSITY_KIT

endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file needed?

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2025 Microchip Technology Inc
# SPDX-License-Identifier: Apache-2.0

config BOARD_PIC64GX_CURIOSITY_KIT
select SOC_PIC64GX1000_U54 if BOARD_PIC64GX_CURIOSITY_KIT_PIC64GX1000_U54 || \
BOARD_PIC64GX_CURIOSITY_KIT_PIC64GX1000_U54_SMP
select SOC_PIC64GX1000_E51 if BOARD_PIC64GX_CURIOSITY_KIT_PIC64GX1000_E51
13 changes: 13 additions & 0 deletions boards/microchip/pic64gx_curiosity_kit/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-License-Identifier: Apache-2.0

set(OPENOCD_USE_LOAD_IMAGE NO)

board_runner_args(openocd --use-elf --no-load)

if(CONFIG_BOARD_PIC64GX_CURIOSITY_KIT_PIC64GX1000_E51)
board_runner_args(openocd --gdb-client-port=3333)
elseif(CONFIG_BOARD_PIC64GX_CURIOSITY_KIT_PIC64GX1000_U54)
board_runner_args(openocd --gdb-client-port=3334)
endif()

include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
9 changes: 9 additions & 0 deletions boards/microchip/pic64gx_curiosity_kit/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
board:
name: pic64gx_curiosity_kit
full_name: pic64gx_curiosity_kit
vendor: microchip
socs:
- name: pic64gx1000
variants:
- name: smp
cpucluster: u54
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert this photo to webp and compress it using e.g. https://tinypng.com/

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions boards/microchip/pic64gx_curiosity_kit/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
.. zephyr:board:: pic64gx_curiosity_kit
Overview
********

The Microchip pic64gx_curiosity_kit board is a RISC-V based development board with a Microchip PIC64GX1000 SoC.
More information can be found on the `Microchip website <https://www.microchip.com/en-us/development-tool/curiosity-pic64gx1000-kit>`_.

Programming and debugging
*************************

Building
========

Applications for the ``pic64gx_curiosity_kit`` board configuration can be built as usual
(see :ref:`build_an_application`):

.. zephyr-app-commands::
:board: pic64gx_curiosity_kit/pic64gx1000/u54
:goals: build

.. zephyr-app-commands::
:board: pic64gx_curiosity_kit/pic64gx1000/u54/smp
:goals: build

Flashing
========

To Flash to the device, the easiest way to proceed is to load the binary using a sdcard.
The binary on the sdcard can then be loaded by the bootloader at the designated address.

For the bootloader to be able to load the application, a payload file needs to be generated.
Please proceed as follows:

To get the hss-payload-generator tool, please clone the following repository and build the tool:

.. code-block:: bash
git clone https://github.com/pic64gx/pic64gx-hart-software-services.git
cd pic64gx-hart-software-services/tools/hss-payload-generator
make
To generate a payload:

.. code-block:: bash
./hss-payload-generator -c config.yaml -v output.bin
A payload generator config file such as the following should be used to generate a compatible with the Hart Software Services (HSS).
https://github.com/pic64gx/pic64gx-hart-software-services

For single core:

.. code-block:: yaml
set-name: 'Zephyr-DDR'
hart-entry-points: {
u54_1: '0x80000000'
}
payloads:
build/zephyr/zephyr.elf: {
exec-addr: '0x80000000',
owner-hart: u54_1,
priv-mode: prv_m,
skip-opensbi: true,
payload-name: "zephyr"
}
For SMP:

.. code-block:: yaml
set-name: 'Zephyr-SMP-DDR'
hart-entry-points: {
u54_1: '0x80000000',
u54_2: '0x80000000',
u54_3: '0x80000000',
u54_4: '0x80000000'
}
payloads:
build/zephyr/zephyr.elf: {
exec-addr: '0x80000000',
owner-hart: u54_1,
secondary-hart: u54_2,
secondary-hart: u54_3,
secondary-hart: u54_4,
priv-mode: prv_m,
skip-opensbi: true,
payload-name: "zephyr"
}
Please refer to the following README.md for more information on playload generation:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s'/playload/payload/'

https://github.com/pic64gx/pic64gx-hart-software-services/blob/pic64gx/tools/hss-payload-generator/README.md

Then the output payload file needs to be copied to the sdcard (assuming the sdcard is mounted at /dev/sdx).

.. code-block:: bash
sudo dd if=<output_payload_file> of=/dev/sdx
Debugging
=========

Please note that in most use cases, the application must be loaded in the external DDR memory.
And therefore DDR must be initialized before loading the application or debugging the application.

The way to proceed is to load the HSS firmware first, then load the application in DDR memory through
the HSS loader following the instructions in `Flashing`_.

Then proceed to debug the application as usual (ie: :ref:`application_debugging`.)
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/*
* Copyright (c) 2025 Microchip Technology Inc
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <microchip/pic64gx.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <mem.h>

/ {
model = "Microchip PIC64GX Curiosity Kit";
compatible = "microchip,pic64gx-curiosity-kit", "microchip,pic64gx";

Check failure on line 14 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:14 Insert new lines. Expecting 2.
aliases {
led0 = &led1;
sw0 = &sw1;
i2c0 = &i2c0;
i2c1 = &i2c1;
};

soc {
dram: memory@80000000 {
compatible = "mmio-sram";
reg = <0x80000000 0x40000000>;
};
};

leds {
compatible = "gpio-leds";

led1: led1 {
gpios = <&gpio1 2 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_1";
};

Check failure on line 35 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:35 Insert new lines. Expecting 2.
led2: led2 {
gpios = <&gpio1 3 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_2";
};

Check failure on line 39 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:39 Insert new lines. Expecting 2.
led3: led3 {
gpios = <&gpio1 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_3";
};

Check failure on line 43 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:43 Insert new lines. Expecting 2.
led4: led4 {
gpios = <&gpio1 5 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_4";
};

Check failure on line 47 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:47 Insert new lines. Expecting 2.
led5: led5 {
gpios = <&gpio1 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_5";
};

Check failure on line 51 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:51 Insert new lines. Expecting 2.
led6: led6 {
gpios = <&gpio1 7 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_6";
};

Check failure on line 55 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:55 Insert new lines. Expecting 2.
led7: led7 {
gpios = <&gpio1 8 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_7";
};

Check failure on line 59 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:59 Insert new lines. Expecting 2.
led8: led8 {
gpios = <&gpio1 9 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "LED_8";
};
};

keys {
compatible = "gpio-keys";

Check failure on line 67 in boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

boards/microchip/pic64gx_curiosity_kit/pic64gx_curiosity_kit_common.dtsi:67 Insert new lines. Expecting 2.
sw1: sw1 {
gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
label = "SW_1";
zephyr,code = <INPUT_KEY_0>;
};
sw2: sw2 {
gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
label = "SW_2";
zephyr,code = <INPUT_KEY_1>;
};
};
};

&gpio1 {
status = "okay";
mux-hog {
gpio-hog;
gpios = <2 GPIO_ACTIVE_HIGH>, <3 GPIO_ACTIVE_HIGH>,
<4 GPIO_ACTIVE_HIGH>, <5 GPIO_ACTIVE_HIGH>,
<6 GPIO_ACTIVE_HIGH>, <7 GPIO_ACTIVE_HIGH>,
<8 GPIO_ACTIVE_HIGH>, <9 GPIO_ACTIVE_HIGH>;
output-low;
};
};

&spi1 {
status = "okay";
};

&gpio2 {
status = "okay";
};

&i2c0 {
status = "okay";
};

&i2c1 {
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2025 Microchip Technology Inc
# SPDX-License-Identifier: Apache-2.0

CONFIG_BASE64=y
CONFIG_INCLUDE_RESET_VECTOR=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_XIP=n
CONFIG_INIT_STACKS=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
CONFIG_FPU=n
# GPIO driver options
CONFIG_GPIO=y
CONFIG_I2C=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be selected by samples/tests/application that actually use I2C

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2025 Microchip Technology Inc
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include "pic64gx_curiosity_kit_common.dtsi"

/ {
compatible = "microchip,pic64gx-curiosity-kit", "microchip,pic64gx";

cpus {
cpu@1 {
status = "disabled";
};

cpu@2 {
status = "disabled";
};

cpu@3 {
status = "disabled";
};

cpu@4 {
status = "disabled";
};
};

chosen {
zephyr,console = &mmuart0;
zephyr,shell-uart = &mmuart0;
zephyr,sram = &dram;
};
};

&mmuart0 {
status = "okay";
current-speed = <115200>;
clock-frequency = <150000000>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
identifier: pic64gx_curiosity_kit/pic64gx1000/e51
name: Microchip PIC64GX Curiosity kit
type: mcu
arch: riscv
toolchain:
- zephyr
ram: 1024
testing:
ignore_tags:
- net
- bluetooth
vendor: microchip
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) 2025 Microchip Technology Inc
# SPDX-License-Identifier: Apache-2.0

CONFIG_BASE64=y
CONFIG_INCLUDE_RESET_VECTOR=y
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_XIP=n
CONFIG_INIT_STACKS=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
# GPIO driver options
CONFIG_GPIO=y
CONFIG_I2C=y
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2025 Microchip Technology Inc
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include "pic64gx_curiosity_kit_common.dtsi"

/ {
compatible = "microchip,pic64gx-curiosity-kit", "microchip,pic64gx";

cpus {
cpu@0 {
status = "disabled";
};
};

chosen {
zephyr,console = &mmuart1;
zephyr,shell-uart = &mmuart1;
zephyr,sram = &dram;
};
};

&mmuart1 {
status = "okay";
current-speed = <115200>;
clock-frequency = <150000000>;
};
Loading
Loading