Commit Graph

20365 Commits

Author SHA1 Message Date
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
qinwei1
e3f0f86514 arm64: add arm64_serialinit/arm64_earlyserialinit
Summary:

   add arm64_serialinit/arm64_earlyserialinit function prototype
to arm64_internal.h as common function for arm64 based chip.
   Testing with ostest in SP and SMP

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-05 09:44:51 +08: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
Xiang Xiao
454921eac7 arch/boards: Rename up_lowputc to [arm64|renesas]_lowputc
follow other arch coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-04 11:08:00 +02:00
Gustavo Henrique Nihei
312d6223d3 xtensa: Remove non-supported options from CPUs' specs
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-04 12:56:58 +08:00
Gustavo Henrique Nihei
bf9951f939 xtensa/esp32: Move attribution to CMN_ASRCS to common makefile
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-04 12:56:58 +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
0af63cfc48 sim/usb: add sim usb host
signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-03 14:31:30 -03:00
zhangyuan21
c61c694a77 sim/usb: add sim usb device
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-03 14:31:30 -03: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
aeddec2ec5 clear i2c ints before the transfer starts
If transfer is restarted in irq handler the interrupts shall be
cleared before the start bit is set in control register. This is
to avoid ints being accidentally cleared before they are handled leading
to timeout error.
2023-03-02 22:25:56 +08:00
Jari Nippula
6ba906691a clear spi int before the transfer starts
In spi_irq handler the data is written into txfifo and transfer
is started before the TXDONE interrupt is cleared. If the bus/memory
access is in some cases delayed, the spi transfer may have been
finished already before the interrupt register is cleaned for the
transfer. This leads the early arrived interrupt to be just removed
and never handled, which would cause a timeout error.
This patch moves the clearing of the interrupt to the place before
the tx is started, so the interrupt is not missed in above cases.
2023-03-02 22:05:25 +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
qinwei1
d2d954f691 arm64: ARMv8-r(Cortex-R82) support( add FVP platform )
Summary:
   Adding virtual evaluate platform FVP. This FVP board configuration
will be used to emulate generic ARM64v8-R (Cotex-R82)series hardware
platform and provide support for these devices:

 - GICv3 interrupt controllers for ARMv8-r
 - PL011 UART controller(FVP)

Note:
1. ostest is PASSED at fvp ( single core and SMP)
2. the FVP tools can be download from ARM site, please check FVP
  board readme.txt

TODO: merge PL011 UART driver to common place

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-02 13:33:15 +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
qinwei2004
fa359e355c Update arm64_head.S 2023-03-01 13:23:48 +08:00
qinwei1
518eb4076e arm64: ARMv8-r(Cortex-R82) support(mpid fix)
Summary
  Different ARM64 Core will use different Affn define, the mpidr_el1
value is not CPU number, So we need to change CPU number to mpid
and vice versa, the patch change the mpid define into platform

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
d5c6b8a94b arm64: add 64-bit time for all arm64 platform
Summary
  For ARM64 architecture, the arch timer is 64-bit,
the CONFIG_SYSTEM_TIME64 need to be enabled just like
x86_64 and risc-v 64

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
4cb5ff3353 arm64: ARMv8-r(Cortex-R82) support(add ARCH_SET_VMPIDR_EL2 option)
Summary

   VMPIDR_EL2 holds the value of the Virtualization Multiprocessor ID.
From architecture manual of AArch64, the behave is:
  -reading register MPIDR_EL1 in EL2, it's return real MPIDR_EL1
  -reading register MPIDR_EL1 in EL1, it's return VMPIDR_EL2
  So since NuttX for SMP is running at EL1 to read MPIDR_EL1 for
  identify CPU id, it's need to set VMPIDR_EL2 to MPIDR_EL1 for
  every CPU at boot EL2 stage.
  For some platform, the bootloader or hypervisor will do that at
  the EL2 stage, but not all.

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
0841f4dbaa arm64: ARMv8-r(Cortex-R82) support
Summary:

  Adding armv8-r(Cortex-R82) support and modify some common code to
fit the change, the change including:

1. ARM Single Security State Support, ARMv8-R support only single
   security state, and some GIC configure need to change and fit
2. For ARMv8-R, only have EL0 ~ EL2, the code at EL3 is not necessary
   and system register for EL3 is not accessible(gcc will failed when
   access these registers)
3. add base MPU configure for the platform.

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
4240723b78 arm64: add ARCH_EARLY_PRINT support
Summary:
  The aarch64 have EL0~El3 execute level and NS/S (security state),
the NuttX should be execute at EL1 in NS(ARmv8-A) or S(ARmv8-R)
state. but booting NuttX have different ELs and state while with
different platform, if NuttX runing at wrong ELs or state it will
be not normal anymore. So we need to print something in arm64_head.S
to debug this situation.
Enabling this option will need to implement up_earlyserialinit and
up_lowputc functions just you see in qemu, if you not sure,
keeping the option disable.

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08:00
qinwei1
e5564a9872 arm64: PSCI config support
Summory
   This Power State Coordination Interface (PSCI) defines a standard
interface for power management. the PCSI need to implement handling
firmware at EL2 or EL3 for ARM64. the PSCI maybe not applicable
for arm core without PCSI firmware interface implement.
  Add configure option for it.

Note:
1. ostest is PASSED at qemu and fvp ( single core and SMP)

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-03-01 13:23:48 +08: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
Gustavo Henrique Nihei
e4d219ca06 risc-v/esp32c3: Remove erroneous interrupt disable
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-28 22:14:54 +02:00