Commit Graph

15193 Commits

Author SHA1 Message Date
raiden00pl
9bd865301c nrf52: add usb support 2023-03-30 09:28:55 -03:00
Huang Qi
536739d2da tools: Export LLVM style arch info for non-c language
Current Toolchain.defs set the compile flags directly, it's OK for
target specified gcc toolchain.

But some LLVM based toolchains (Rust/Zig etc) use single toolchain to handle all supported paltform.

In this patch, arch level Toolchain.defs export standard LLVM style arch flags, and let <Lang>.defs to map them into internal style,

This will simplify the intergration of non-c language.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-29 09:26:38 -03:00
raiden00pl
d23759d457 arch/nrf53: add tickless support 2023-03-28 19:43:35 -03:00
raiden00pl
f9f41bbd95 arch/nrf53: add RTC support 2023-03-28 19:43:35 -03:00
raiden00pl
bcecf2023f arch/nrf53: add GPIOTE support 2023-03-28 19:43:19 -03:00
raiden00pl
74b0e8c2c8 arch/nrf53: rename nrf53_gpioe.h to nrf53_gpiote.h 2023-03-28 19:43:19 -03:00
Petro Karashchenko
6c6a54b0c9 ld: fix warning reported by GCC 12 linker
warning: nuttx has a LOAD segment with RWX permissions

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-27 12:38:28 +08:00
chao an
0eae218b49 arm/chip/sdio/muxbus: comment all undefined symbols
comment all undefined symbols to avoid build break if CONFIG_SDIO_MUXBUS enabled

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-26 13:04:48 -03:00
Lwazi Dube
21ffb4de72 boards/sama5d3-xplained: Make hot plugging more reliable. 2023-03-26 13:03:21 -03:00
raiden00pl
2ddc96ff66 arch/stm32/stm32.h: do not include stm32_usbdev.h if not supported 2023-03-25 23:41:32 -07:00
raiden00pl
68f6fb2edd {stm32,stm32l4,stm32f0l0g0}/otg: move STM32_NENDPOINTS definitions to header files
This value is useful for users when initializing a USB composite device in a board-specific logic
2023-03-25 23:41:32 -07:00
raiden00pl
2c97c76577 nrf53_clockconfig.c: add comment about oscillator configuration 2023-03-25 22:24:36 +02:00
raiden00pl
1d4d008564 nrf53: UART1 available only on the app core 2023-03-25 22:24:36 +02:00
raiden00pl
bca927e203 nrf52/nrf53/sdc: define BLE max connection if NET_BLUETOOTH=n 2023-03-25 22:24:36 +02:00
raiden00pl
620c6cfd58 nrf52/nrf53: lowputc: fix compilation if flow control enabled 2023-03-25 22:24:36 +02:00
raiden00pl
3571ff3c54 arch/nrf53: add SAADC support 2023-03-25 18:37:51 +02:00
liuxuanfu
87852e8cbe arch/arm/src/stm32/hardware: Fix register define 2023-03-24 14:55:09 -03:00
liuxuanfu
945e4c6d81 arch/arm/src/stm32/hardware: Add stm32g4 rcc apb1 timer enable compatibility 2023-03-24 14:55:09 -03:00
raiden00pl
a1aecd7369 {stm32/stm32l4/stm32f7/stm32h7/efm32}/otgdev: remove invalid use of the priv field for EP
This field is for use in the class driver, not in the controller logic
2023-03-24 09:13:05 -07:00
raiden00pl
13a96c7eb7 {stm32f7,stm32h7}/otg: fix compilation for USBDEV when USB_DEBUG=y 2023-03-24 08:16:06 -07:00
Matthias Grob
d1113110f3 armv7-m irq: avoid uninitialized warning/error
arm-none-eabi-gcc 12.2.0 gives the following warnings:
error: 'primask' is used uninitialized
error: 'primask' may be used uninitialized

We use Werror and the file is indirectly included in different
places. I suggest telling the compiler to ignore these warnings
since primask is initialized on the first assembly line.

This is the only problem I encountered so far when upgrading the compiler.
2023-03-23 04:02:43 -07:00
SPRESENSE
e317af0a84 arch: cxd56xx: Fix SPI transfer without DMA
SPI transfers are dynamically determined to use DMA or not.
The flag to judge is removed in a previous simple refactoring commit.
Revert the logic and fix an issue that SPI transfer fails.
2023-03-23 08:34:29 +01:00
jturnsek
1d7383d4a1 imxrt_flexpwm independent output B support added 2023-03-21 21:03:39 +02:00
Lwazi Dube
84a3ddd79b boards/sama5d3-xplained: Fix OHCI clock.
Choose a divider value that matches the description provided within
the same header file.
Include stddef.h to fix compiler errors because NULL is not defined.
Make logs print protocol, vid and pid consistently, (decimal hex hex).
2023-03-21 14:08:03 -03:00
ligd
bb281eedfa cache: add up_get_xcache_linesize() support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-03-20 17:17:22 +08:00
Lwazi Dube
f5575b1b85 boards/sama5d3-xplained: Add reboot support.
The peripheral reset flag was added to speed up the reboot.
Rebooting takes too long (15 seconds) if this flag is not set.
2023-03-20 09:13:37 +01:00
zhangyuan21
cf56e4113a arch: remove unnecessary sem_setprotocol code
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-17 16:53:19 -03:00
raiden00pl
0976cddd03 arch/nrf52/nrf52_tickless_rtc.c: fix tickless operations - ostest fail without this change 2023-03-15 22:34:07 +01:00
raiden00pl
33b19e967c arch/nrf52/nrf52_tickless_rtc.c: check configuration 2023-03-15 22:34:07 +01:00
raiden00pl
93ac27ff63 arch/nrf53: add PWM support 2023-03-15 22:08:27 +01:00
raiden00pl
c2abd16dd7 arch/nrf53: add pwm register defintions 2023-03-15 22:08:27 +01:00
raiden00pl
8d2451da0c arch/nrf53: add TIM support 2023-03-14 19:22:45 -03:00
raiden00pl
b15244d4b2 arch/nrf52/gpiote: add an interface automatically selecting a free GPIOTE channel for pin interrupts 2023-03-14 19:17:31 -03:00
raiden00pl
bf531fa24a arch/nrf52/gpiote: fix doc strings 2023-03-14 19:17:31 -03:00
raiden00pl
fef4871b01 arch/{nrf52|nrf53}/uid: specify the length of the UID array 2023-03-14 01:28:27 +02:00
raiden00pl
fd7611f144 arch/nrf53: add UID support 2023-03-14 01:28:27 +02:00
raiden00pl
1c9c6e94f0 arch/nrf53: initialize PM 2023-03-13 22:24:28 +02:00
raiden00pl
74158db707 arch/nrf52/nrf52_adc.c: fix device shutdown 2023-03-13 16:25:47 -03:00
zhangyuan21
12bb4f04f1 arch: fixed error in the calculation of nwords caused an out of bounds
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-13 16:12:11 +09:00
Petro Karashchenko
9b72ad4f7d arch/arm/sama5: switch from spaces to TABs in Kconfig
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-09 16:27:07 -03:00
Petro Karashchenko
4581a84064 nuttx: fix indentation issue
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-09 16:27:07 -03:00
raiden00pl
1a0aecb0ce arch/nrf53: initial support for rptun 2023-03-09 14:21:42 +08:00
raiden00pl
fb861c0a29 arch/nrf53: add more register definitions (ported from nrf52) and some cosmetics for nrf52 2023-03-09 03:59:57 +08:00
Karel Kočí
62661600b2 treewide: add DOWNLOAD variable as unification of curl call
This is a followup to the commit
03b164f59c.
2023-03-08 17:05:05 +08:00
chao an
815f40c8f1 armv8-m/cortex-m85: add support of PACBTI(Authentication and Branch Target Identification Extension)
Reference:
https://developer.arm.com/documentation/100748/0617/Security-features-supported-in-Arm-Compiler-for-Embedded/PACBTI-M-extension-mitigations-against-ROP-and-JOP-style-attacks
https://developer.arm.com/documentation/101754/0619/armclang-Reference/armclang-Command-line-Options/-mbranch-protection

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-07 07:34:05 +02:00
Michal Lenc
f97d93903c samv7: add support for dead time delay to PWM driver
This commit adds support for dead time delay to SAMv7 PWM driver. The
dead time can be used to delay an active PWM output at the begining
of the period. This can be used for H bridge control for example.

The values are to be set from the application level. It is required
to allow config option PWM_DEADTIME in order to support dead time delay.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-03-07 01:30:01 +08:00
chao an
b48f9d9b96 arch/arm: correct ARCH_HAVE_DSP to ARM_HAVE_DSP
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-07 01:27:28 +08:00
Karel Kočí
eab9e688d8 samv7: switch from printing numbers as signed to unsigned in QSPI
This switches from PRId32 to PRIu32. Those variables have unsigned type
and thus we should print them as such.
2023-03-06 18:51:50 +02:00
chao an
34a032b486 arm/armv8-m: add missing zig flags
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-06 10:54:08 -03:00
Huang Qi
bcf5700e8a tools/arm: Add missing -mcpu param for zig
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-06 11:27:53 +01:00
raiden00pl
9dc8f27dda arch/nrf53: add SoftDevice support 2023-03-05 19:31:07 -03:00
raiden00pl
5fd321e54d arch/nrf53: add systimer configuration 2023-03-05 19:31:07 -03:00
raiden00pl
3b92819792 arch/nrf53: initial clock configuration 2023-03-05 19:31:07 -03:00
raiden00pl
15a932f8e1 arch/nrf53: add more registers definitions 2023-03-05 19:31:07 -03:00
raiden00pl
242606a7d9 arch/nrf52/nrf52_sdc: fix memory configuration for MULTIROLE 2023-03-05 21:32:11 +02:00
raiden00pl
238b606057 arch/nrf52: fix configuration for SoftDevice, LFCLK is required but it doesn't have to be XTAL 2023-03-05 21:32:11 +02:00
raiden00pl
cf5cd222d6 Revert "arch/nrf52/Kconfig: update comment about SoftDevice used PPI channels"
This reverts commit 688d2bb820.

It's not clear how many PPI channels is required.
Let's assume the worst case scenario, which is the previous version.
2023-03-05 21:32:11 +02:00
Bernd Walter
5ca9adbe61 Copy I2C_M_NOSTART support from sam7v/sam_twihs.c driver 2023-03-06 01:39:21 +08:00
Huang Qi
e7bf464c7a arch/imx6: Fix a compilation error with UBSan
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-05 11:06:48 +02:00
raiden00pl
99b0bad94e arch/armv8-m: DSP extension is optional 2023-03-05 09:43:52 +08:00
Michal Lenc
1d88bceb79 samv7: raise input flow control warning only for serial drivers
Hardware flow control for serial requires the usage of DMAC channels
which is not yet supported for SAMv7 MCU. However the same config option
CONFIG_SERIAL_IFLOWCONTROL is also used for USB CDC/ACM flow control which
works well. Therefore the warning message should be raised only if
flow control is configured for USART driver and not for USB CDC/ACM.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-03-04 23:22:00 +08:00
raiden00pl
84d8b821e0 armv8-m/arm_ramvec_initialize.c: fix printf warning 2023-03-04 22:33:53 +08:00
raiden00pl
342fb22c3f arch/nrf52/.gitignore: clean up after SoftDevice update 2023-03-04 22:33:53 +08:00
raiden00pl
688d2bb820 arch/nrf52/Kconfig: update comment about SoftDevice used PPI channels 2023-03-04 22:33:53 +08:00
raiden00pl
bac798af07 arch/nrf52/sdc: remove no more needed core_cm4.h 2023-03-04 22:33:53 +08:00
raiden00pl
49446c8e76 arch/nrf53: support for APPROTECT, and disable it at default for now 2023-03-04 12:35:14 +09:00
raiden00pl
ad4af9b9c9 arch/nrf53: boot the net core 2023-03-04 12:35:14 +09:00
raiden00pl
150b3622a8 arch/nrf53_gpio: add interface to assign GPIO to the net core 2023-03-04 12:35:14 +09:00
raiden00pl
e3008e13f3 arch/nrf53_gpio: MCUSEL is available only for the app core 2023-03-04 12:35:14 +09:00
raiden00pl
7cbaa98d88 nrf52/nrf53_serial: remove redundant include 2023-03-04 12:35:14 +09:00
raiden00pl
d58753725e arch/nrf53: add initial register definitions for CTRL-AP, RESET and UICR 2023-03-04 12:35:14 +09:00
zhangyuan21
392eebf5e2 arch/armv7-a: fixed scu cpu tagram mask define issue
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-03 11:41:33 +08:00
raiden00pl
eda99e35bb arch/nrf52: use the lates SoftDevice release (v2.3.0)
A list of breaking changes:
- SoftDevice libraries was renamed and libaries are now cmpatible with all platfroms with a given faimily.
- The random number generator was decoupled from the controller and must now be provided by the user.
  We use arc4random_buf NuttX API for this.
- sdc_support_ API must be called before sdc_cfg_set()
- update public API terms to Bluetooth Core Specification v5.3 (mainly change slave/master to central/peripheral)
  NuttX NRF52 configuration options properly updated.
- BLE features are supported only if the proper BLE role is selected
- sdc_hci_evt_get() and sdc_hci_data_get() have been replaced by sdc_hci_get()
2023-03-03 09:41:17 +08:00
jturnsek
081b04f05e iMXRT MCUboot support 2023-03-02 22:40:44 +08:00
Jari Nippula
ab5d6d759a arch/arm/src/stm32f7/stm32_i2c.c: Driver cleanup
Remove unnecessary heap allocation by relocating ops inside priv data
2023-03-02 21:46:44 +08:00
Michal Lenc
93097be705 samv7: add support for PWM fault protection
This commit adds configurable fault protection to SAMv7 PWM driver.
The fault input can be used from peripherals as ADC or GPIO inputs.
Inputs from GPIO have configurable polarity (high or low). The PWM output
is automatically set to zero if fault input is active and restored
if fault input is not actived.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-03-02 11:08:25 +08:00
huxiandong
266455f01c mtd: Extend isbad and markbad func for mtd_dev_s
Signed-off-by: huxiandong <huxiandong@xiaomi.com>
2023-03-01 10:06:56 -03:00
SPRESENSE
b576a26d51 arch: cxd56xx: Fix emmc pin control on initialization error
Fix emmc pin control on initialization error.
2023-03-01 12:29:23 +08:00
SPRESENSE
57ca5c0401 arch: cxd56xx: Disable SubCore to use DMA
Disable SubCore to use SPI transfer with DMA because it may be used
by MainCore.
2023-03-01 12:29:23 +08:00
SPRESENSE
134424da18 arch: cxd56xx: Fix a warning in cxd56_serial.c
Fix a warning by -Wunused-function when CONFIG_UART2_SERIAL_CONSOLE=y.
2023-03-01 12:29:23 +08:00
SPRESENSE
700610e625 arch: cxd56xx: Fix eMMC uninitialize function
- Fix prototype function with prefix of cxd56.
- Add logic to unregister blockdriver.
- Minor fix nxstyle.
2023-03-01 12:29:23 +08:00
SPRESENSE
d643fb8511 arch: cxd56xx: Fix gnss poll when an event has already occurred
Fix an issue that poll with timeout=0 cannot detect events that have
already occurred.
2023-03-01 12:26:06 +08:00
SPRESENSE
1877be8ce9 arch: cxd56xx: Fix a freezing issue caused by power control
- Add retry timeout to prevent inifinite loop
- Change the register operation of power control
- Add exclusive control by semaphore into some functions
- Add short delay until power control is reflected
2023-03-01 12:17:29 +08:00
Huang Qi
8a389a06e1 Don't download tarball if a local git repo found
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-27 23:55:23 +08:00
Xiang Xiao
2c5f653bfd Remove the tail spaces from all files except Documentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
Michal Lenc
49ce1c5df7 samv7: add support for ADC conversion triggering with PWM
This commit enhances ADC and PWM drivers with option to trigger ADC
conversion with events generated by PWM comparison units.

The generation of PWM events is handled by comparison units set up from
Kconfig option SAMV7_PWMx_TRIGn. ADC triggering from PWM can be selected
by AFECn_PWMTRIG option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-26 10:47:12 +08:00
lilei19
38f64f559d change strcpy to strlcpy
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-24 12:15:40 +08:00
Xiang Xiao
8b4ecac6c2 libc: Move math library from libs/libc/math to libs/libm/libm
to prepare the support of other implementation e.g.:
https://github.com/JuliaMath/openlibm
https://gitlab.com/gtd-gmbh/libmcs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-23 10:40:07 +02:00
chao an
0e873b51c6 arm/backtrace/unwind: skip unaligned instruction
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-23 14:06:52 +08:00
Michal Lenc
db6919648b samv7: add support for complementary PWM output
SAMv7 PWM driver supports complementary PWM output if both pins (H and L)
are defined and configured. This commit adds a configuration option to
configure the complementary L pin.

The pin definition has to be provided by board level support.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-22 02:22:10 +08:00
Karel Kočí
60bd4ac13d samv7: fix printf warnings in QSPI 2023-02-22 01:42:49 +08:00
Masayuki Ishikawa
69e6e17407 arch: imxrt: Enable IMXRT_ENET_ENHANCEDBD if !ARMV7M_DCACHE_WRITETHROUGH
Summary:
- I noticed that there are two kinds of descriptors for imxrt_enet.c
- The first one is the legacy descriptor and its size is 8bytes.
- The second one is the enhanced descriptor and its size is 32bytes.
- In both cases, we can not use a descriptor chain like stm32.
- Considering cache line alignment, the second one is perfect because
  one descriptor fits the Cortex-M7 cache line which would fix networking
  stability issues in d-cache write-back mode.

Impact:
- imxrt ethernet in d-cache write-back mode

Testing:
- Tested with ixmrt1060-evk:netnsh_dcache_wb (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-02-22 01:27:54 +08:00
Masayuki Ishikawa
3a4542f3c4 arch: imxrt: Fix CONFIG_IMXRT_ENET_ENHANCEDBD
Summary:
- I noticed that CONFIG_IMXRT_ENET_ENHANCEDBD is not correctly
  used though it is defined in Kconfig.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with imxrt1060-evk:netnsh_dcache_wb (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-02-22 01:27:54 +08:00
chao an
60a0c2ed87 tools/ci: skip -Warray-bounds check due to bug of GCC-12.2
Wrong warning array subscript [0] is outside array bounds:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-21 09:28:57 +08:00
Xiang Xiao
7d3a9b1cbc Revert "STM32 Nucleo: warning: #warning "Default Flash Configuration Used""
This reverts commit 62c15c03d3.

Fix warning: the choice symbol STM32_FLASH_CONFIG_G (defined at arch/arm/src/stm32/Kconfig:1275) is selected by the following symbols, but select/imply has no effect on choice symbols
 - ARCH_CHIP_STM32F412ZG (defined at arch/arm/src/stm32/Kconfig:1014)
2023-02-20 00:02:36 +02:00
Michal Lenc
333707e101 pwm: add PWM overwrite under CONFIG_PWM_OVERWRITE option
Generic drivers shoud not use architecture related config options like
CONFIG_SAMV7_PWM. This commit adds PWM pin overwrite under generic
configuration option CONFIG_PWM_OVERWRITE.

Now the overwrite can be used on other architectures as well or can be
completely disabled for SAMv7.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-19 00:16:41 +08:00
dirksavage88
02fc698e75 Add UART4 & UART5 to high density stm32f103 chips
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2023-02-18 13:32:52 +08:00
Fotis Panagiotopoulos
9bfa9a0b49 stm32_eth: Enabled store-end-forward. 2023-02-18 11:08:46 +08:00
Fotis Panagiotopoulos
87a23f8e38 stm32_eth: Fixed alignment of Ethernet descriptors & buffers. 2023-02-18 11:06:59 +08:00
Michal Lenc
d52e875a99 samv7: fix build error in sam_mcan.c file
Commit d07792a caused a build error in sam_mcan.c file. This commit fixes
the build. The file now succesfully compiles and CAN works.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-02-17 14:58:37 -03:00