Commit Graph

1542 Commits

Author SHA1 Message Date
Christian Mauderer
02f2316be7 bsp/imxrt1166: Support GPIO CS pins in LPSPI
With this, it is possible to use GPIOs as CS pins in the LPSPI. To avoid
additional complexity, the GPIOs will have the same limitations as the
native (hardware) CS pins.

The GPIO CS feature adds a number of extra code when starting SPI
transfers on this controller. Therefore it is possible to disable the
additional code by just setting the IMXRT_LPSPI_MAX_CS option to 0. In
that case only native CS pins are supported.

At the moment, this feature is only enabled on i.MXRT1166 by default
because it is not tested on i.MXRT1050. But it should work there too.
2023-11-28 13:36:41 +01:00
Christian Mauderer
a38f9c57f9 bsps/imx*: imx_gpio from pointer to fdt property
Device trees allow mixing different kinds of GPIOs in one property. For
that it is usefull to only provide a pointer to an arbitrary location in
the property and initialize a GPIO from that.
2023-11-28 13:36:41 +01:00
Philip Kirkpatrick
793c0f4671 bsps/arm: Add BSP for ZynqMP RPU 2023-11-20 10:43:55 -06:00
Kinsey Moore
001a0a4db6 bsps/clock: Import Xilinx TTC hardware definitions
This imports the TTC hardware definitions for the triple timer counters
on various Xilinx platforms. This was imported as specified in the
VERSION file in this commit.
2023-11-20 10:43:55 -06:00
Kinsey Moore
bb6ed3bed7 bsps/xnandpsu: Always wrap page to device size
The xnandpsu driver conditionally tries to wrap page index to NAND chip
size causing an off-by-one error where the first page of the second chip
is not wrapped correctly. This removes the conditional so that page
index is always wrapped.
2023-10-27 11:33:44 -05:00
Kinsey Moore
3363fabb9d bsps/xnandpsu: Avoid loop counter reset
On configurations where multiple NAND chips are in use, the erasure
loop in XNandPsu_Erase() can reset the loop counter variable once it
gets to blocks in the second chip causing an infinite loop overwriting
parts of the first chip. This change ensures that the loop counter is
not accidentally reset.
2023-10-27 11:33:44 -05:00
Kinsey Moore
3339afb82e bsps/aarch64/zynqmp/nand: Erase using offset
Prefer use of XNandPsu_Erase instead of XNandPsu_EraseBlock since the
XNandPsu driver does not expose the primitives necessary to ensure
device readiness after the operation is complete.
2023-10-27 11:33:44 -05:00
Kinsey Moore
8a2c3af9cf bsps/xil: Adjust Xilinx support code for Cortex-R5
This fixes some issues in the Xilinx support code that are critical to
support the Cortex-R5F cores present in my Xilinx SoCs. The imported
Cortex-R5 xil_cache.c matches the existing information in
bsps/shared/xil/VERSION.
2023-10-24 09:52:27 -05:00
Kinsey Moore
7ea60d29d8 bsps/xil: Import Xilinx Cortex-R5 support
This imports Xilinx support code for the MPU and cache on Cortex-R5
cores. This was imported as specified in bsps/shared/xil/VERSION.
2023-10-24 09:52:27 -05:00
Sebastian Huber
958d517215 bsps/leon3: Use DSU time tag for GR712RC
Close #4954.
2023-10-20 11:20:14 +02:00
Sebastian Huber
601b84c758 bsps/leon3: leon3_counter_use_irqamp_timestamp()
Simplify leon3_counter_use_irqamp_timestamp().

Update #4954.
2023-10-20 11:16:54 +02:00
Sebastian Huber
ffa29bac30 bsps/leon3: Statically initialize get timecount
Update #4954.
2023-10-20 11:16:54 +02:00
Sebastian Huber
8266a8a335 bsps/leon3: Move code blocks
Move code blocks to simplify C preprocessor usage.

Update #4954.
2023-10-20 11:16:54 +02:00
Sebastian Huber
abb2f8bd66 bsps/leon3: Use custom CPU counter implementation
Merge the timecounter and CPU counter support for the leon3 BSP family.
Remove now unused functions from the CPU counter support of the erc32
and leon3 BSPs.

Update #4954.
2023-10-20 11:16:54 +02:00
Sebastian Huber
ff533cec9d bsps/leon3: Simplify clock and CPU counter
Share the timecounter instance between the clock and the CPU counter.
This greatly simplifies the clock driver since we have to do the device
selection only in one place, the CPU counter support.

Update #4954.
2023-10-20 11:16:54 +02:00
Sebastian Huber
3f03a6d2ef bsps/leon3: Make GPTIMER fall back mandatory
Using the auto reload counter which generates the clock ticks for the
timecounter or CPU counter is quite difficult and only works in
uniprocessor configurations.

Update #4954.
2023-10-20 11:16:54 +02:00
Sebastian Huber
b6dc4b4707 sparc: Move CPU counter implementation
Enable a BSP-specific CPU counter implementation.

Update #4954.
2023-10-20 11:16:54 +02:00
Sebastian Huber
8fe0fc4721 bsps/leon3: Optional IRQ(A)MP timestamp support
This is necessary to run the tests on SIS with profiling enabled.

Update #4954.
2023-10-20 11:16:53 +02:00
Sebastian Huber
95cf6e57be bsps/leon3: Update due to register API changes 2023-10-20 11:16:53 +02:00
Tian Ye
a738d69bcf bsps/aarch64: Disable use of TTBR1
Force use of addresses that would be translated by TTBR1 to cause a
translation fault. RTEMS on AArch64 does not use TTBR1 and so attempted
translation of that address range could cause unexpected behavior in the
form of other exception types since TTBR1 is never set.
2023-10-18 10:14:42 -05:00
Kinsey Moore
5b22003411 bsps: Remove unused includes 2023-10-13 19:02:15 -05:00
Sebastian Huber
406ad8a5ae powerpc/t32mppc: Improve terminal settings 2023-10-13 09:51:29 +02:00
Sebastian Huber
ed2817c4c6 powerpc/t32mppc: Remove obsolete config options 2023-10-13 09:51:29 +02:00
Sebastian Huber
8290784378 powerpc/t32mppc: Fix console driver
Make sure that the message buffers are not garbage collected by the
linker.
2023-10-13 09:51:29 +02:00
Kinsey Moore
c5476e2b8c bsps/xilinx-zynqmp: Unify JFFS2 OOB write locking
Ensure that a single locking session is carried over OOB writes
including the OOB read that is sometimes required. This removes the
possibility of another write occurring between the read and write that
would make the write incorrect.
2023-10-12 18:56:43 -05:00
Chris Johns
25a4dff56e bsp/i386/pc686: Clean up warnings 2023-10-04 13:17:13 +11:00
Kinsey Moore
41d43cef6c bsps/xnandpsu: Ensure buffer cache sync
When a buffer is modified by both hardware components such as DMA and by
software components, the buffer cache state must be kept in sync so that
data is not accidentally thrown away during future invalidations.
2023-09-26 09:02:48 -05:00
Kinsey Moore
2b5526aa5e bsps/xnandpsu: Don't rely on usleep for polling
When polling hardware registers in high performance situations, don't
rely on usleep or other standard sleep functions since they will
necessarily rely on kernel ticks to be woken up. This can easily cause
an immense reduction in throughput.
2023-09-26 09:02:48 -05:00
Kinsey Moore
3f3c646dea bsps/xqspipsu: Add SFDP config space read ability
This adds a function to allow reading of the SFDP configuration space
that describes attributes of NOR flash chips.
2023-09-23 09:42:30 -05:00
Kinsey Moore
853429c3f8 bsps/xqspipsu: Break out RDID
Expose a function to read the NOR flash chip ID information beyond the
minimum 3 bytes for the lookup table.
2023-09-23 09:42:30 -05:00
Kinsey Moore
e152c9e06d bsps/zynqmp: Add locking around JFFS2 NAND adapter
The internal JFFS2 locking does not guarantee that delayed writes will
not step on other reads and writes to the device. This adds locking to
prevent that in the JFFS2 NAND interworking layer.
2023-09-06 08:53:02 -05:00
Kinsey Moore
8cea348934 bsps/xnandpsu: Ensure correct cache maintenance
The changes here ensure correct cache maintenance around DMA operations.
One cache flush was missing and two cache invalidations occurred before
the corresponding read that would make them necessary.
2023-09-06 08:53:02 -05:00
Christian Mauderer
094355d4f1 bsps/arm/imxrt: Optimize nocache memory settings
The nocache-memory was set as device memory. It's not necessary to be
that strict. Set it to normal non-cacheable non-shareable memory
instead.
2023-08-21 09:13:16 +02:00
Christian Mauderer
685f193280 bsps/arm/imxrt1166: Enable USB
Enable the USB modules in the FDT.
2023-08-21 09:13:16 +02:00
Christian Mauderer
91b1c7b0a6 bsps/imxrt: Fix enabling USBPHY in fsl_clock
The mcux-sdk tries to enable the USBPHY. But it uses the wrong register
for that. This patch fixes the bug.
2023-08-21 09:13:16 +02:00
Sebastian Huber
ffec9f96fc arm: Fix cache support for ARM926EJ-S
The ARM926EJ-S is an ARMv5T architecture processor and lacks some
features of ARMv6 processors such as the ARM1176JZF-S.

Close #4940.
2023-08-10 08:34:34 +02:00
Sebastian Huber
a96f5df50b bsp/lpc32xx: Fix lpc32xx_magic_zero_size 2023-08-09 07:22:10 +02:00
Sebastian Huber
6cef96b1ab bsp/lpc32xx: Increase SDRAM size to 64MiB
Increase stage 2 bootloader size to 16MiB.
2023-08-09 07:22:10 +02:00
Sebastian Huber
b0285e5c9a bsp/lpc32xx: Remove hard to maintain comments
These comments duplicate the memory and region definitions of the linker
command file.
2023-08-09 07:22:10 +02:00
Sebastian Huber
573a7202e6 bsp/lpc32xx: Restore lpc32xx_set_translation_table_entries()
This implementation disables the MMU during the modification of the
translation table.  This behaviour is required by boot loaders for these
boards.
2023-08-09 07:22:10 +02:00
Sebastian Huber
5c2f2b304a bsp/lpc32xx: Fix warning
The type is a pointer.
2023-08-09 07:22:10 +02:00
Christian Mauderer
5115e6524f bsps/shared: Fix Coverity warning in MCP7940M
Fixes the following Coverity warning:

** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()

Basically coverity warns that (buf[...] & 0x7) can't be bigger than 7.
Just remove the unnecessary comparison.
2023-08-03 07:18:37 +02:00
Karel Gardas
f89f0d8476 Revert "bsps/arm/beagle/dcan: Added DCAN support"
This reverts commit 26d50bdfb6.
2023-08-01 16:00:49 +02:00
Christian Mauderer
38dd86355d bsps/shared: Add MCP7940M RTC driver
The MCP7940M is a I2C RTC chip. The new driver uses the dev/i2c API to
support the RTC. It is written with the intention, that the driver can
be adapted to other RTCs with a similar register layout by just
replacing the initialization function.
2023-08-01 09:24:33 +02:00
Karel Gardas
d01fb75f6c bsps/stm32h7: add modification notice required by Apache License 2.0 2023-07-31 15:47:58 +02:00
Karel Gardas
f08f75f0bd bsps/stm32h7: fix compilation issue after HAL update
Based on:

commit 99494370d6
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Wed Mar 4 12:34:34 2020 +0100

    bsp/stm32h7: New BSP

    Update #3910.
2023-07-31 15:15:10 +02:00
Karel Gardas
ba8ac65929 bsp/stm32h7: Add and use BSP Doxygen group
Inspired by:

commit fe58f6ce4b
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Thu Nov 26 08:13:52 2020 +0100

    bsp/stm32h7: Add and use BSP Doxygen group

    Update #3910.
2023-07-31 15:15:10 +02:00
Karel Gardas
7f3dc31336 bsps/stm32h7: workaround compilation issue with libbsd
Part of the new HAL requires float_t type definition. For that it includes
math.h header file which unfortunately brings a lot of math functions in.
One of them, 'log' conflicts with FreeBSD log function defined in systm.h
Provided hack is really just a crude work around this issue. Never thought
that Motorola 68881 would help me even in 21st century.
2023-07-31 15:15:09 +02:00
Karel Gardas
93bcf4e7a2 bsps/stm32h7: disable ETH_UpdateDescriptor as unused function 2023-07-31 15:15:09 +02:00
Karel Gardas
c2bae70c5d bsps/stm32h7: recreate stm32h7xx_hal_conf.h
Re-apply based on:

    commit 6bb6b69bb6
    Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
    Date:   Tue Apr 6 09:43:23 2021 +0200

        arm/stm32h7: Add STM32H7_HSE_FREQUENCY
2023-07-31 15:15:09 +02:00