source: rtems-docs/user/bsps/bsps-arm.rst @ 808ef17

5
Last change on this file since 808ef17 was 808ef17, checked in by Sebastian Huber <sebastian.huber@…>, on 03/18/19 at 09:27:19

user: Add basic lpc24xx description

Update #3724.
Update #3725.

  • Property mode set to 100644
File size: 9.4 KB
Line 
1.. SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. Copyright (C) 2017, 2019 embedded brains GmbH
4.. Copyright (C) 2017, 2019 Sebastian Huber
5
6arm (ARM)
7*********
8
9altera-cyclone-v (Intel Cyclone V)
10==================================
11
12This BSP offers only one variant, the `altcycv_devkit`.  This variant supports
13the Intel Cyclone V system on chip.  The basic hardware initialization is not
14performed by the BSP.  A boot loader with device tree support must be used to
15start the BSP, e.g. U-Boot.
16
17The BSP is known to run on these boards:
18
19* `Cyclone V SoC Development Kit <https://www.intel.com/content/www/us/en/programmable/products/boards_and_kits/dev-kits/altera/kit-cyclone-v-soc.html>`_
20
21* `Enclustra Mars MA3 SoC Module <https://www.enclustra.com/en/products/system-on-chip-modules/mars-ma3/>`_
22
23* `Terasic DE10-Standard Development Kit <https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=165&No=1081>`_
24
25Boot via U-Boot
26---------------
27
28The application executable file (ELF file) must be converted to an U-Boot
29image.  Use the following commands:
30
31.. code-block:: none
32
33    arm-rtems5-objcopy -O binary app.exe app.bin
34    gzip -9 -f -c app.bin > app.bin.gz
35    mkimage -A arm -O linux -T kernel -a 0x00300000 -e 0x00300000 -n RTEMS -d app.bin.gz app.img
36
37Use the following U-Boot commands to boot an application via TFTP download:
38
39.. code-block:: none
40
41    tftpboot ${loadaddr} app.img && run loadfdt && bootm ${loadaddr} - ${fdt_addr} ; reset
42
43The ``loadfdt`` command may be not defined in your U-Boot environment.  Just
44replace it with the appropriate commands to load the device tree at
45``${fdt_addr}``.
46
47Clock Driver
48------------
49
50The clock driver uses the `Cortex-A9 MPCore Global Timer`.
51
52Console Driver
53--------------
54
55The console driver supports up to two on-chip NS16550 UARTs.  The console
56driver does not configure the pins.
57
58I2C Driver
59----------
60
61There is a legacy I2C driver.  It should be converted to the I2C driver framework.
62
63Network Interface Driver
64------------------------
65
66The network interface driver is provided by the `libbsd`.  It is initialized
67according to the device tree.  It supports checksum offload.
68
69MMC/SDCard Driver
70-----------------
71
72The MMC/SDCard driver is provided by the `libbsd`.  It is
73initialized according to the device tree.  Pin re-configuration according to
74the serial clock frequency is not supported.  DMA transfers are supported.
75
76USB Host Driver
77---------------
78
79The USB host driver is provided by the `libbsd`.  It is initialized according
80to the device tree.  The driver works in polled mode.
81
82Caveats
83-------
84
85The clock and pin configuration support is quite rudimentary and mostly relies
86on the boot loader.
87
88atsam
89=====
90
91TODO.
92
93beagle
94======
95
96TODO.
97
98csb336
99======
100
101TODO.
102
103csb337
104======
105
106TODO.
107
108edb7312
109=======
110
111TODO.
112
113gdbarmsim
114=========
115
116TODO.
117
118gumstix
119=======
120
121TODO.
122
123imx (NXP i.MX)
124==============
125
126This BSP offers only one variant, the `imx7`.  This variant supports the i.MX
1277Dual processor.  The basic hardware initialization is not performed by the
128BSP.  A boot loader with device tree support must be used to start the BSP,
129e.g. U-Boot.
130
131Build Configuration Options
132---------------------------
133
134The following options are available at the configure command line.
135
136``BSP_PRESS_KEY_FOR_RESET``
137    If defined to a non-zero value, then print a message and wait until pressed
138    before resetting board when application terminates.
139
140``BSP_RESET_BOARD_AT_EXIT``
141    If defined to a non-zero value, then reset the board when the application
142    terminates.
143
144``BSP_PRINT_EXCEPTION_CONTEXT``
145    If defined to a non-zero value, then print the exception context when an
146    unexpected exception occurs.
147
148``BSP_FDT_BLOB_SIZE_MAX``
149    The maximum size of the device tree blob in bytes (default is 262144).
150
151``CONSOLE_USE_INTERRUPTS``
152    Use interrupt driven mode for console devices (enabled by default).
153
154``IMX_CCM_IPG_HZ``
155   The IPG clock frequency in Hz (default is 67500000).
156
157``IMX_CCM_UART_HZ``
158   The UART clock frequency in Hz (default is 24000000).
159
160``IMX_CCM_AHB_HZ``
161   The AHB clock frequency in Hz (default is 135000000).
162
163Boot via U-Boot
164---------------
165
166The application executable file (ELF file) must be converted to an U-Boot
167image.  Use the following commands:
168
169.. code-block:: none
170
171    arm-rtems5-objcopy -O binary app.exe app.bin
172    gzip -9 -f -c app.bin > app.bin.gz
173    mkimage -A arm -O linux -T kernel -a 0x80200000 -e 0x80200000 -n RTEMS -d app.bin.gz app.img
174
175Use the following U-Boot commands to boot an application via TFTP download:
176
177.. code-block:: none
178
179    tftpboot ${loadaddr} app.img && run loadfdt && bootm ${loadaddr} - ${fdt_addr} ; reset
180
181The ``loadfdt`` command may be not defined in your U-Boot environment.  Just
182replace it with the appropriate commands to load the device tree at
183``${fdt_addr}``.
184
185Clock Driver
186------------
187
188The clock driver uses the `ARMv7-AR Generic Timer`.
189
190Console Driver
191--------------
192
193The console driver supports up to seven on-chip UARTs.  They are initialized
194according to the device tree.  The console driver does not configure the pins.
195
196I2C Driver
197----------
198
199I2C drivers are registered by the ``i2c_bus_register_imx()`` function.  The I2C
200driver does not configure the pins.
201
202.. code-block:: c
203
204    #include <assert.h>
205    #include <bsp.h>
206
207    void i2c_init(void)
208    {
209      int rv;
210
211      rv = i2c_bus_register_imx("/dev/i2c-0", "i2c0");
212      assert(rv == 0);
213    }
214
215SPI Driver
216----------
217
218SPI drivers are registered by the ``spi_bus_register_imx()`` function.  The SPI
219driver configures the pins according to the ``pinctrl-0`` device tree property.
220SPI transfers with a continuous chip select are limited by the FIFO size of 64
221bytes.  The driver has no DMA support.
222
223.. code-block:: c
224
225    #include <assert.h>
226    #include <bsp.h>
227
228    void spi_init(void)
229    {
230      int rv;
231
232      rv =  spi_bus_register_imx("/dev/spi-0", "spi0");
233      assert(rv == 0);
234    }
235
236Network Interface Driver
237------------------------
238
239The network interface driver is provided by the `libbsd`.  It is initialized
240according to the device tree.  It supports checksum offload and interrupt
241coalescing.  IPv6 transmit checksum offload is not implemented.  The interrupt
242coalescing uses the MII/GMII clocks and can be controlled by the following
243system controls:
244
245 * ``dev.ffec.<unit>.int_coal.rx_time``
246 * ``dev.ffec.<unit>.int_coal.rx_count``
247 * ``dev.ffec.<unit>.int_coal.tx_time``
248 * ``dev.ffec.<unit>.int_coal.tx_count``
249
250A value of zero for the time or count disables the interrupt coalescing in the
251corresponding direction.
252
253MMC/SDCard Driver
254-----------------
255
256The MMC/SDCard driver (uSDHC module) is provided by the `libbsd`.  It is
257initialized according to the device tree.  Pin re-configuration according to
258the serial clock frequency is not supported.  Data transfers are extremely
259slow.  This is probably due to the missing DMA support.
260
261Caveats
262-------
263
264The clock and pin configuration support is quite rudimentary and mostly relies
265on the boot loader.  For a pin group configuration see
266``imx_iomux_configure_pins()``.  There is no power management support.
267
268lm3s69xx
269========
270
271TODO.
272
273lpc176x
274=======
275
276TODO.
277
278lpc24xx (NXP LPC17XX/LPC24XX/LPC40XX)
279=====================================
280
281This BSP offers only several variants.  The following variants support the
282`Embedded Artits LPC4088 Developer's Kit <https://www.embeddedartists.com/products/lpc4088-developers-kit/>`_
283and earlier board generations:
284
285* lpc17xx_ea_ram
286
287* lpc17xx_ea_rom_int
288
289* lpc24xx_ea
290
291* lpc40xx_ea_ram
292
293* lpc40xx_ea_rom_int
294
295They can be used as a base line for customization.  The basic hardware
296initialization is performed by the BSP.  It can be customized via configuration
297options and configuration tables.  See also
298`<bsp/start-config.h> <https://git.rtems.org/rtems/tree/bsps/arm/lpc24xx/include/bsp/start-config.h>`_.
299
300Clock Driver
301------------
302
303The clock driver of the Cortex-M variants uses the `ARMv7-M Systick`.  The
304older ARM7TDMI variants use the `TMR0` timer module.
305
306Console Driver
307--------------
308
309The console driver supports up to four on-chip UARTs.  Initialization can be
310customized via the ``lpc24xx_uart_probe_1()``, ``lpc24xx_uart_probe_2()`` and
311``lpc24xx_uart_probe_3()`` functions.
312
313I2C Bus Driver
314--------------
315
316I2C bus drivers are registered by the ``lpc24xx_register_i2c_0()``,
317``lpc24xx_register_i2c_1()`` and ``lpc24xx_register_i2c_2()`` functions.  The
318I2C driver does not configure the pins.  See also
319`<bsp/i2c.h> <https://git.rtems.org/rtems/tree/bsps/arm/lpc24xx/include/bsp/i2c.h>`_.
320
321SPI Bus Driver
322--------------
323
324SPI bus drivers are registered by the ``lpc24xx_register_ssp_0()``,
325``lpc24xx_register_ssp_1()`` and ``lpc24xx_register_ssp_2()`` functions.  The
326SSP driver does not configure the pins.  See also
327`<bsp/ssp.h> <https://git.rtems.org/rtems/tree/bsps/arm/lpc24xx/include/bsp/ssp.h>`_.
328
329Network Interface Driver
330------------------------
331
332Only a legacy network driver is support.  For a `libbsd` base driver the
333platform support is missing, see
334`if_lpe.c <https://git.rtems.org/rtems-libbsd/tree/rtemsbsd/sys/arm/lpc/if_lpe.c>`_.
335
336USB Driver
337----------
338
339The USB host driver (OHCI) is provided by the `libbsd`.
340
341Framebuffer Driver
342------------------
343
344For a custom framebuffer driver see
345`<bsp/lcd.h> <https://git.rtems.org/rtems/tree/bsps/arm/lpc24xx/include/bsp/lcd.h>`_.
346
347RTC Driver
348----------
349
350There is a standard RTC driver available using the on-chip RTC module.
351
352lpc32xx
353=======
354
355TODO.
356
357raspberrypi
358===========
359
360TODO.
361
362realview-pbx-a9
363===============
364
365TODO.
366
367rtl22xx
368=======
369
370TODO.
371
372smdk2410
373========
374
375TODO.
376
377stm32f4
378=======
379
380TODO.
381
382tms570
383======
384
385TODO.
386
387xilinx-zynq
388===========
389
390TODO.
Note: See TracBrowser for help on using the repository browser.