Changeset 8b203e2 in rtems-docs
- Timestamp:
- 07/22/19 04:12:32 (3 years ago)
- Branches:
- 5, am, master
- Children:
- 8037cbb
- Parents:
- 735bcd7
- git-author:
- Vijay Kumar Banerjee <vijaykumar9597@…> (07/22/19 04:12:32)
- git-committer:
- Christian Mauderer <oss@…> (07/27/19 11:26:16)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
user/bsps/arm/beagle.rst
r735bcd7 r8b203e2 6 6 ====== 7 7 8 This BSP supports four variants, `beagleboardorig`, `beagleboardxm`, `beaglebonewhite`9 and `beagleboneblack`. The basic hardware initialization is not performed by 10 the BSP. A boot loader with device tree support must be used to start the BSP, 11 e.g.U-Boot.8 This BSP supports four variants, `beagleboardorig`, `beagleboardxm`, 9 `beaglebonewhite` and `beagleboneblack`. The basic hardware initialization is 10 not performed by the BSP. A boot loader with device tree support must be used 11 to start the BSP, e.g., U-Boot. 12 12 13 13 TODO(These drivers are present but not documented yet): … … 34 34 ---------------------------- 35 35 36 The Device Tree Blob (dtb) is needed to load the device tree while starting up36 The Device Tree Blob (DTB) is needed to load the device tree while starting up 37 37 the kernel. We build the dtb from the FreeBSD source matching the commit hash 38 38 from the libbsd HEAD of freebsd-org. For example if the HEAD is at 39 39 "19a6ceb89dbacf74697d493e48c388767126d418" 40 Then the right dtsfile is:40 Then the right Device Tree Source (DTS) file is: 41 41 https://github.com/freebsd/freebsd/blob/19a6ceb89dbacf74697d493e48c388767126d418/sys/gnu/dts/arm/am335x-boneblack.dts 42 42 43 .. code-block:: none 43 .. code-block:: shell 44 :linenos: 44 45 45 46 #building the dtb 46 47 #We will use the script from https://github.com/freebsd/freebsd/blob/19a6ceb89dbacf74697d493e48c388767126d418/sys/tools/fdt/make_dtb.sh 47 48 48 export MACHINE='arm' #The make_dtb.sh script uses environment variable MACHINE 49 #The make_dtb.sh script uses environment variable MACHINE 50 export MACHINE='arm' 51 49 52 SCRIPT_DIR=$HOME/freebsd/sys/tools/fdt 53 50 54 #The arguments to the script are 51 55 # $1 -> Build Tree 52 56 # $2 -> DTS source file 53 57 # $3 -> output path of the DTB file 58 54 59 ${SCRIPT_DIR}/make_dtb.sh ${SCRIPT_DIR}/../../ \ 55 60 ${SCRIPT_DIR}/../../gnu/dts/arm/am335x-boneblack.dts \ 56 61 $(pwd) 62 57 63 Writing the uEnv.txt file 58 64 ------------------------- 59 65 60 66 The uEnv.txt file is needed to set any environment variable before the kernel is 61 loaded. Each line is a u-boot command that the uboot will execute during 62 startingup.67 loaded. Each line is a u-boot command that the uboot will execute during start 68 up. 63 69 64 70 Add the following to a file named uEnv.txt: … … 73 79 ---------- 74 80 75 This BSP uses the I2C framework and is registered using 76 ``am335x_i2c_bus_register()`` the function prototype is given below: 81 For registering the `/dev/i2c-0` device, a wrapper function is provided, 82 ``bbb_register_i2c_0()`` similarly ``bbb_register_i2c_1()`` and 83 ``bbb_register_i2c_2()`` are respectively used to register `i2c-1` and `i2c-2`. 84 85 For registering an I2C device with a custom path (say `/dev/i2c-3`) the 86 function ``am335x_i2c_bus_register()`` has to be used. 87 88 The function prototype is given below: 77 89 78 90 .. code-block:: C … … 85 97 ); 86 98 87 This function is needed only while registering with custom path with custom88 values. For registering the `/dev/i2c-0` device, a wrapper function is provided,89 ``bbb_register_i2c_0()`` similarly ``bbb_register_i2c_1()`` and90 ``bbb_register_i2c_2()`` are respectively used to register `i2c-1` and `i2c-2`.91 92 99 SPI Driver 93 100 ---------- 94 101 95 The SPI device `/dev/spi-0` can be registered with ``bbb_register_spi_0()``` 102 The SPI device `/dev/spi-0` can be registered with ``bbb_register_spi_0()`` 103 104 For registering with a custom path, the ``bsp_register_spi()`` can be used. 105 106 The function prototype is given below: 107 108 .. code-block:: C 109 110 rtems_status_code bsp_register_spi( 111 const char *bus_path, 112 uintptr_t register_base, 113 rtems_vector_number irq 114 );
Note: See TracChangeset
for help on using the changeset viewer.