Commit Graph

43192 Commits

Author SHA1 Message Date
Eero Nurkkala
c34b9620db mpfs: clockconfig: add clock initialiation sequence
Add clock initialization sequence especially for systems
containing no bootloader.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-10-21 22:40:26 -05:00
Eero Nurkkala
bc72ccdf6a mpfs: Kconfig/Make: add DDR support flag
This adds the proper flag for introducing the DDR
support. Also call the mpfs_ddr_init() at the
proper location.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-10-21 22:40:26 -05:00
Eero Nurkkala
3b330089d5 mpfs: ddr: add DDR training
This adds DDR training. The training has a small chance of failing,
and then the training is restarted.

DDR training cannot be done meaningfully while the software is
in DDR. If the system is intended to run from eNVM, like a
bootloader, the linker script should be tuned to utilize the envm
region as follows:

  envm (rx)   : ORIGIN = 0x20220100, LENGTH = 128K - 256
  l2lim (rwx) : ORIGIN = 0x08000000, LENGTH = 1024k

256 bytes are reserved for the system; The fixed block may be
installed from the 'hart-software-services' -repository:
https://github.com/polarfire-soc/hart-software-services.git

For example, the 256-byte image: hss-envm-wrapper-bm1-dummySbic.bin
may be prepended on the nuttx bootloader image in the following
manner:

 cat hss-envm-wrapper-bm1-dummySbic.bin > nuttx_bootloader.bin
 cat nuttx.bin >> nuttx_bootloader.bin
 riscv64-unknown-elf-objcopy -I binary -O ihex --change-section-lma
  *+0x20220000 nuttx_bootloader.bin flashable_image.hex

This provides an image 'flashable_image.hex' that may be flashed on
the eNVM region via Microsemi Libero tool.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-10-21 22:40:26 -05:00
Jukka Laitinen
c5b11f42b6 mpfs_head.S: Support for booting on different harts and from eNVM
- Fix the FPU enabling code
- If booting from eNVM, all harts start booting. With CONFIG_MPFS_BOOTLOADER,
  one can allow just one hart booting and rest are stuck in wfi.
- Check that mtvec is actually updated before continuing the boot
- Create 5 IRQ stacks, one for each hart

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-21 22:40:26 -05:00
Jukka Laitinen
37761c293d mpfs_head.S: Fixes for booting on different harts
- Jump to mpfs_start with mhartid in a0 as the comment says
- Don't invalidate mmu tlb on e51 (it doesn't have mmu)
- Fix FPU initialization flags on e54 (it fires IRQ5 and crashes)

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-21 22:40:26 -05:00
Jukka Laitinen
e5843db282 mpfs: Add configuration flags to configure NuttX booting on single hart
The bootloader hart also configures the needed clocks and peripherals.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-10-21 22:40:26 -05:00
Eero Nurkkala
d909b0f635 mpfs: hardware/memorymap: add more base addresses
Add a number of missing base addresses.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2021-10-21 22:40:26 -05:00
chao.an
bd7cb1aae5 sim/bluetooth: remove the WIRELESS_BLUETOOTH depends if native host is in use
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-10-21 11:24:46 -05:00
anjiahao
0aa14f832d mq_open: add long file name check and parameter check
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-21 11:01:45 -03:00
Alin Jerpelea
40b467420f author: Florian Olbrich : update licenses to Apache
Gregory Nutt has submitted the SGA
Florian Olbrich has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-10-21 10:14:11 +02:00
Kenneth Thompson
0e2a3ecdf8 drivers/can: Fix can_poll() POLLOUT calculation
can_poll() would indicate that there is no space in the TX FIFO if there is
already one element in the FIFO.
2021-10-21 02:05:17 -05:00
Xiang Xiao
7183009400 ioexpander/gpio: Remove the hardcode 100 limitation
it's very easy to have more than 100 GPIOs on the modern SoC

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-20 10:10:50 -07:00
Jiuzhu Dong
f1f0bcc521 driver/sensor: support new sensor type:ECG,PPG,Imdepance
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-20 09:55:18 -05:00
丁欣童
26fedb2770 fakesensor: transform ddmm.mmmm to dd.mmmmmm.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-20 09:55:18 -05:00
Gustavo Henrique Nihei
2a8e7b064d boards/esp32: Return proper error code on esp32_spiflash_init
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-10-20 09:54:25 -05:00
Gustavo Henrique Nihei
7368f7a2c8 xtensa/esp32: Make SPI Flash initialization common to all ESP32 boards
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-10-20 09:54:25 -05:00
Abdelatif Guettouche
018aa8eb8d esp32c3_serial.c: Remove the stub implementations of the early serial
functions as they are only called when the configuration is enabled.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-20 10:22:10 -03:00
Xiang Xiao
1efc9fbac6 sim/rptun: Trigger the callback only the sequnece number change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-20 10:21:54 -03:00
zhangguoliang
12b2b7c240 fix: charger: change the operations of battery ioctl to common
Almost all charger chip need the same oprations, which was not
appropriate only for BQ2429X. Therefore, open the operations to
all charger chips.

Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com>
2021-10-20 09:52:21 +02:00
weizhifang
2a6673bcdd feature: charge: modify battery_gauge code
add temperature and current ioctl api

Signed-off-by: weizhifang <weizhifang@xiaomi.com>
2021-10-20 09:52:11 +02:00
Abdelatif Guettouche
9235d6605b boards/esp32&esp32c3: Remove crypto accelerators' defconfigs.
Since the tests were removed from the drivers, there is no need for
these defconfigs anymore.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Abdelatif Guettouche
55e8b17974 boards/risc-v/esp32c3: Remove the flash encryption test.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Abdelatif Guettouche
c83c1071cc esp32c3_bignum.c & esp32c3_sha.c: Fix some trivial nxstyle complaints.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Abdelatif Guettouche
e424241d09 arch/risc-v/esp32c3: Remove the bignum test from the driver.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Abdelatif Guettouche
91cb9dafaf arch/risc-v/esp32c3: Remove the RSA test from the driver.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Abdelatif Guettouche
652d77efd2 arch/risc-v/esp32c3: Remove the SHA test from the driver.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Abdelatif Guettouche
5d1c01aea7 arch/risc-v/esp32c3: Remove the AES test from the driver.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Abdelatif Guettouche
8288a04a0b arch/xtensa/esp32: Remove the AES test from the driver.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-19 18:41:57 -03:00
Gustavo Henrique Nihei
b99852872c Documentation: Update "Using QEMU" section for ESP32
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-10-19 23:23:43 +02:00
Gustavo Henrique Nihei
0299e7d35d tools/esp32: Refactor generation of QEMU-compatible image
Use the merge_bin builtin function from esptool.py.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-10-19 23:23:43 +02:00
Xiang Xiao
970cbff638 fs/partition: Make parse_ptable_partition to partition.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-19 08:03:12 -03:00
Xiang Xiao
eb720388ca fs/partition: Make read_partition_block callable outside ptable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-19 08:03:12 -03:00
zhuyanlin
b5134565fa arch:xtens:mpu: modify acc and memtype to uint32_t
The uint8_t and uint16_t will overflow in MPU_ENTRY_AR marco.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-10-19 00:24:31 -05:00
anjiahao
9b52e4e311 littlefs:fix rmdir can remove a file
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2021-10-19 00:12:45 -05:00
Alexander Lunev
6bdc737f5c bcm43xxx: supported high-speed timing mode with a clock rate up to 50MHz 2021-10-18 21:58:03 -05:00
Xiang Xiao
9e60c33d4d binfmt: Remove umm_initialize from elf_load
since umm_try_initialize will do it automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-18 22:51:18 -03:00
chao.an
5ff4e33e3f binfmt/Makefile: remove the specified prefix from target variables
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-10-19 00:35:35 +02:00
Xiang Xiao
91398e73eb arch/xtensa/Kconfig: add quotes in source to clean warnings from setconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-19 00:33:51 +02:00
Jari van Ewijk
177acf57c2 S32K1XX boards: Implement userled_getall function 2021-10-18 12:30:18 -07:00
Jari van Ewijk
b1d5eff52d Userled driver: Add option to check actual pin state with getall 2021-10-18 12:30:18 -07:00
daviepeng
9a0146f15f add include battery_ioctl.h 2021-10-18 14:14:09 -03:00
Jiuzhu Dong
7e59a6a31e cpuload: fix crash because of the member of g_pidhash is NULL
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-18 15:13:52 +02:00
Michal Lenc
3e1ce5f770 arch/arm/src/imxrt/hardware: add header file for ADC_ETC module
This commit adds header file imxrt_adc_etc.h for external ADC trigger
module. This contains only definitions of ADC_ETC registers and separate
bits, implementation of ADC_ETC driver is yet to be done.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-10-17 16:50:59 +02:00
Abdelatif Guettouche
7549de49b4 arch/*_cpupause:Allow a spin before taking the g_cpu_wait spinlock.
If we repeatedly call up_cpu_pause and up_cpu_resume, there would be
cases where the next call to up_cpu_pause happens while the other CPU is
still responding to the previous resume request. In this case the
DEBUGASSERT will trigger. We should allow the first CPU to wait until the
other CPU has finished responding to the resume request.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-17 21:10:23 +09:00
Xiang Xiao
643e34efde sdio: Update the defintion to the latest spec
and correct the comment:
https://www.sdcard.org/downloads/pls/
https://www.jedec.org/standards-documents/technology-focus-areas/flash-memory-ssds-ufs-emmc/e-mmc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-17 06:29:13 -03:00
Matheus Castello
5c15fe6ec1 boards: k210: Add initial gpio user space support
Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2021-10-17 17:29:59 +09:00
Xiang Xiao
4a7915e72b sched: Check g_pidhash[hash_ndx] isn't NULL before access pid field in nxsched_get_tcb
Fix the regression by commit:
commit 8b67944c75
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Thu Oct 14 11:03:07 2021 +0800

    sched: Remove pidhash_s and move ticks to tcb_s

    simplify the code logic and reduce memory a little bit

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-17 17:28:57 +09:00
Abdelatif Guettouche
7b43d11435 esp32_spiflash.c: Allocate only one variable to hold the cache state in
single CPU mode.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-16 22:56:21 -07:00
Abdelatif Guettouche
f54a929001 esp32_spiflash.c: Keep the index of the other CPU between SPI Flash
operations.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-16 22:56:21 -07:00
Abdelatif Guettouche
eeb68bda3d xtensa_testset.c: Simplify the test-set function and remove some old
comments.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-16 22:56:21 -07:00