<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 10, 2019, 6:13 PM Christian Mauderer <<a href="mailto:list@c-mauderer.de">list@c-mauderer.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 09/06/2019 16:57, Vijay Kumar Banerjee wrote:<br>
> ---<br>
>  user/bsps/bsps-arm.rst | 69 +++++++++++++++++++++++++++++++++++++++++-<br>
>  1 file changed, 68 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/user/bsps/bsps-arm.rst b/user/bsps/bsps-arm.rst<br>
> index eb972c6..e6826cd 100644<br>
> --- a/user/bsps/bsps-arm.rst<br>
> +++ b/user/bsps/bsps-arm.rst<br>
> @@ -93,7 +93,74 @@ TODO.<br>
>  beagle<br>
>  ======<br>
>  <br>
> -TODO.<br>
> +This BSP supports four variants, `beagleboardorig`, `beagleboardxm`, `beaglebonewhite`<br>
> +and `beagleboneblack`. The basic hardware initialization is not performed by<br>
> +the BSP.  A boot loader with device tree support must be used to start the BSP,<br>
> +e.g. U-Boot.<br>
> +<br>
> +TODO(These drivers are present but not documented yet):<br>
> +* Clock driver.<br>
> +* Network Interface Driver.<br>
> +* SDcard driver.<br>
> +* GPIO Driver.<br>
> +* Console driver.<br>
> +* PWM Driver.<br>
> +* RTC driver.<br>
> +<br>
> +Boot via U-Boot<br>
> +---------------<br>
> +To boot via uboot, the ELF must be converted to a U-Boot image like below:<br>
> +<br>
> +.. code-block:: none<br>
> +    arm-rtems5-objcopy hello.exe -O app.bin<br>
> +    gzip 9 app.bin<br>
> +    mkimage -A arm -O linux -T kernel -a 0x80000000 -e 0x80000000 -n RTEMS -d app.bin.gz rtems-app.img<br>
> +<br>
> +Getting the Device Tree Blob<br>
> +----------------------------<br>
> +<br>
> +The Device Tree Blob(dtb) is needed to load the device tree while starting up<br>
> +the kernel. Currently the dtb is built using the linux `device-tree-rebasing<br>
> +<<a href="https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/" rel="noreferrer noreferrer" target="_blank">https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/</a>>`_<br>
<br>
Sorry that I have to nag about that again. I know I suggested that tree.<br>
But it seems that there is a problem with it: If I build the tree from<br>
that source, neither SD nor your I2C overlay driver works. I haven't had<br>
a look at it yet what has been changed.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I looked into that repo and it seems like it doesn't work with overlay because the makefile doesn't use the -@ option in dtc</div><div dir="auto"><br></div><div dir="auto"><a href="https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/Makefile#n119">https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/Makefile#n119</a><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
So either we would have to suggest a (working) branch of that repo or we<br>
should link to some other repo. Most likely the dts files from FreeBSD<br>
would be best source to document for usage with libbsd.<br>
<br>
Please wait with sending a v3 for at least a day or two. Maybe someone<br>
else has a good idea for a source.<br>
<br>
> +repository.<br>
> +<br>
> +Writing the uEnv.txt file<br>
> +-------------------------<br>
> +<br>
> +The uEnv.txt file is needed to set any environment variable before the kernel is<br>
> +loaded. Each line is a u-boot command that the uboot will execute during<br>
> +starting up.<br>
> +<br>
> +Add the following to a file named uEnv.txt:<br>
> +<br>
> +.. code-block:: none<br>
> +   setenv bootdelay 5<br>
> +   uenvcmd=run boot<br>
> +   boot=fatload mmc 0 0x80800000 rtems-app.img ; fatload mmc 0 0x88000000 am335x-boneblack.dtb ; bootm 0x80800000 - 0x88000000<br>
> +<br>
> +I2C Driver<br>
> +----------<br>
> +<br>
> +This BSP uses the I2C framework and is registered using<br>
> +``am335x_i2c_bus_register()`` the function prototype is given below:<br>
> +<br>
> +.. code-block:: C<br>
> +   int am335x_i2c_bus_register(<br>
> +   const char         *bus_path,<br>
> +   uintptr_t           register_base,<br>
> +   uint32_t            input_clock,<br>
> +   rtems_vector_number irq<br>
> +   );<br>
> +<br>
> +This function is needed only while registering with custom path with custom<br>
> +values. For registering the `/dev/i2c-0` device, a wrapper function is provided,<br>
> +``bbb_register_i2c_0()`` similarly ``bbb_register_i2c_1()`` and<br>
> +``bbb_register_i2c_2()`` are respectively used to register `i2c-1` and `i2c-2`.<br>
> +<br>
> +SPI Driver<br>
> +----------<br>
> +<br>
> +The SPI device `/dev/spi-0` can be registered with ``bbb_register_spi_0()```<br>
>  <br>
>  csb336<br>
>  ======<br>
> <br>
<br>
</blockquote></div></div></div>