forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snippets: add rpi_5_xen_domd to demo hw passing to xen domain
Add rpi_5_xen_domd snippet to demonstrate enabling RPI 5 HW in Xen domain. Only GPIO LED is supported. Signed-off-by: Grygorii Strashko <[email protected]>
- Loading branch information
Grygorii Strashko
committed
May 3, 2024
1 parent
c8d922a
commit e8daa5b
Showing
4 changed files
with
69 additions
and
0 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,17 @@ | ||
.. _rpi_5_xen_domd: | ||
|
||
RPI 5 Xen DomD: snippet for XEN HW domain | ||
######################################### | ||
|
||
Overview | ||
******** | ||
|
||
This snippet allows user to build Zephyr `xenvm` with RPI 5 hardware support as | ||
a Xen hardware domain (DomD) to demonstrate how RPI 5 hardware can be passed to Xen domain. | ||
Only GPIO LED is supported for now. | ||
|
||
For example: | ||
|
||
.. code-block:: console | ||
west build -b xenvm -S rpi_5_xen_domd samples/basic/blinky |
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 @@ | ||
CONFIG_ARM64_VA_BITS_40=y | ||
CONFIG_ARM64_PA_BITS_40=y | ||
CONFIG_UART_INTERRUPT_DRIVEN=n |
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,45 @@ | ||
/* | ||
* Copyright (C) 2024 EPAM Systems. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <mem.h> | ||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
|
||
/ { | ||
compatible = "raspberrypi,5-model-b-domd", "raspberrypi,5-model-b", "brcm,bcm2712"; | ||
model = "Raspberry Pi 5 Xen DomD"; | ||
|
||
chosen { | ||
zephyr,shell-uart = &xen_hvc; | ||
}; | ||
|
||
aliases { | ||
led0 = &led_act; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led_act: led-act { | ||
gpios = <&gio_aon 9 GPIO_ACTIVE_LOW>; | ||
label = "ACT"; | ||
}; | ||
}; | ||
|
||
gpio2@107d517c00 { | ||
compatible = "simple-bus"; | ||
reg = <0x10 0x7d517c00 0x0 0x40>; | ||
|
||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
gio_aon: gpio@0 { | ||
compatible = "brcm,brcmstb-gpio"; | ||
reg = <0>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
ngpios = <17>; | ||
}; | ||
}; | ||
}; |
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,4 @@ | ||
name: rpi_5_xen_domd | ||
append: | ||
EXTRA_DTC_OVERLAY_FILE: rpi_5_xen_domd.overlay | ||
EXTRA_CONF_FILE: rpi_5_xen_domd.conf |