diff --git a/snippets/rpi_5_xen_domd/README.rst b/snippets/rpi_5_xen_domd/README.rst new file mode 100644 index 00000000000000..37a7c271e90970 --- /dev/null +++ b/snippets/rpi_5_xen_domd/README.rst @@ -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 diff --git a/snippets/rpi_5_xen_domd/rpi_5_xen_domd.conf b/snippets/rpi_5_xen_domd/rpi_5_xen_domd.conf new file mode 100644 index 00000000000000..cd989de2f6250d --- /dev/null +++ b/snippets/rpi_5_xen_domd/rpi_5_xen_domd.conf @@ -0,0 +1,3 @@ +CONFIG_ARM64_VA_BITS_40=y +CONFIG_ARM64_PA_BITS_40=y +CONFIG_UART_INTERRUPT_DRIVEN=n diff --git a/snippets/rpi_5_xen_domd/rpi_5_xen_domd.overlay b/snippets/rpi_5_xen_domd/rpi_5_xen_domd.overlay new file mode 100644 index 00000000000000..0074cdae2464bc --- /dev/null +++ b/snippets/rpi_5_xen_domd/rpi_5_xen_domd.overlay @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2024 EPAM Systems. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + 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>; + }; + }; +}; diff --git a/snippets/rpi_5_xen_domd/snippet.yml b/snippets/rpi_5_xen_domd/snippet.yml new file mode 100644 index 00000000000000..ef650dc0c2328b --- /dev/null +++ b/snippets/rpi_5_xen_domd/snippet.yml @@ -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