Skip to content
Merged
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
22 changes: 22 additions & 0 deletions boards/beagle/beaglev_fire/beaglev_fire_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,28 @@
compatible = "beagle,beaglev-fire", "microchip,mpfs";
aliases {
};

beaglev {
#address-cells = <2>;
#size-cells = <1>;

ddr_cached_high: memory@1000000000 {
compatible = "mmio-sram";
reg = <0x10 0x00000000 0x80000000>; /* 2GB */
};
};

chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,sram = &ddr_cached_high;
};
};

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

&gpio2 {
Expand Down
12 changes: 0 additions & 12 deletions boards/beagle/beaglev_fire/beaglev_fire_polarfire_e51.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,4 @@
status = "disabled";
};
};

chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,sram = &sram1;
};
};

&uart0 {
status = "okay";
current-speed = <115200>;
clock-frequency = <150000000>;
};
2 changes: 1 addition & 1 deletion boards/beagle/beaglev_fire/beaglev_fire_polarfire_e51.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: mcu
arch: riscv
toolchain:
- zephyr
ram: 3840
ram: 2048000
testing:
ignore_tags:
- net
Expand Down
12 changes: 0 additions & 12 deletions boards/beagle/beaglev_fire/beaglev_fire_polarfire_u54.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,9 @@
model = "beagle,beaglev-fire";
compatible = "beagle,beaglev-fire", "microchip,mpfs";

chosen {
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,sram = &sram1;
};

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

&uart1 {
status = "okay";
current-speed = <115200>;
clock-frequency = <150000000>;
};
2 changes: 1 addition & 1 deletion boards/beagle/beaglev_fire/beaglev_fire_polarfire_u54.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: mcu
arch: riscv
toolchain:
- zephyr
ram: 3840
ram: 2048000
testing:
ignore_tags:
- net
Expand Down
12 changes: 0 additions & 12 deletions boards/beagle/beaglev_fire/beaglev_fire_polarfire_u54_smp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,4 @@
/ {
model = "beagle,beaglev-fire";
compatible = "beagle,beaglev-fire", "microchip,mpfs";

chosen {
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,sram = &sram1;
};
};

&uart1 {
status = "okay";
current-speed = <115200>;
clock-frequency = <150000000>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: mcu
arch: riscv
toolchain:
- zephyr
ram: 3840
ram: 2048000
testing:
ignore_tags:
- net
Expand Down
54 changes: 53 additions & 1 deletion boards/beagle/beaglev_fire/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ hobbyists, and researchers to explore and experiment with RISC-V technology.
Building
========

There are three board configurations provided for the BeagleV-Fire:

* ``beaglev_fire/polarfire/e51``: Uses only the E51 core
* ``beaglev_fire/polarfire/u54``: Uses the U54 cores
* ``beaglev_fire/polarfire/u54/smp``: Uses the U54 cores with CONFIG_SMP=y

Applications for the ``beaglev_fire`` board configuration can be built as usual:

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: beaglev_fire
:board: beaglev_fire/polarfire/u54
:goals: build

Debugging
Expand Down Expand Up @@ -76,3 +82,49 @@ and load the binary:
load
break main
continue

Flashing
========
When using the PolarFire `Hart Software Services <https://github.com/polarfire-soc/hart-software-services>`_ along with Zephyr, you need to use the `hss-payload-generator <https://github.com/polarfire-soc/hart-software-services/tree/master/tools/hss-payload-generator>`_ tool to generate an image that HSS can boot.

.. code-block:: yaml

set-name: 'ZephyrImage'

# Define the entry point address for each hart (U54 cores)
hart-entry-points:
u54_1: '0x1000000000'

# Define the payloads (ELF binaries or raw blobs)
payloads:
<path_to_zephyr.elf>:
exec-addr: '0x1000000000' # Where Zephyr should be loaded
owner-hart: u54_1 # Primary hart that runs Zephyr
priv-mode: prv_m # Start in Machine mode
skip-opensbi: true # Boot directly without OpenSBI

After generating the image, you can flash it to the board by restarting a board that's connected over USB and UART, interrupting the HSS boot process with a key press, and then running the ``mmc`` and ``usbdmsc`` commands:

.. code-block:: bash

Press a key to enter CLI, ESC to skip
Timeout in 1 second
.[6.304162] Character 100 pressed
[6.308415] Type HELP for list of commands
[6.313276] >> mmc
[10.450867] Selecting SDCARD/MMC (fallback) as boot source ...
[10.457550] Attempting to select eMMC ... Passed
[10.712708] >> usbdmsc
[14.732841] initialize MMC
[14.736400] Attempting to select eMMC ... Passed
[15.168707] MMC - 512 byte pages, 512 byte blocks, 30621696 pages
Waiting for USB Host to connect... (CTRL-C to quit)
. 0 bytes written, 0 bytes read
USB Host connected. Waiting for disconnect... (CTRL-C to quit)
/ 0 bytes written, 219136 bytes read

This will cause the board to appear as a USB mass storage device. You can then then flash the image with ``dd`` or other tools like `BalenaEtcher <https://www.balena.io/etcher/>`_:

.. code-block:: bash

dd if=<path_to_zephyr.elf> of=/dev/sdXD bs=4M status=progress oflag=sync
Loading