Commit Graph

90310 Commits

Author SHA1 Message Date
Gerson Fernando Budke e9b26b5eb6 soc: sam0: samd: Fix switching between clocks
The clock z_arm_platform_init hangs switching between clocks when using
MCUboot. This fixes the issue using the 8MHz internal clock as gclk_main
source when configuring PLL/DFLL.

Fixes: #67220

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-01-20 14:36:30 +01:00
Ryan McClelland 83c298cd32 drivers: spi: dw: define max-xfer-size
The max size was determined by looking at the ARCH of the cpu. This really
comes from the ip configuration when generated. Add `max-xfer-size`
property to the devicetree.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-01-20 13:11:42 +01:00
Ryan McClelland ff99687862 drivers: spi: dw: fix hw cs and slave return rx len
Only toggle the hw cs if the cs is not set as a gpio. SPI trancieve
should also return the rx len when in slave configuration.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-01-20 13:11:42 +01:00
Ryan McClelland 909da582c5 drivers: spi: dw: cleanup instantiation macro
This cleans up the instantiation macro. DBG_COUNTER was also removed
as that appears to be unnecessary. This also allows for if it is a
serial target to be configured from the devicetree.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-01-20 13:11:42 +01:00
Ryan McClelland 330dba0861 drivers: spi: dw: fix naming convention of aux-reg
aux-reg should be defined with a hyphen in the bindings

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-01-20 13:11:42 +01:00
Ryan McClelland 2ee2b6ac08 drivers: spi: dw: remove HAS_SPI_DW Kconfig
The HAS_SPI_DW Kconfig is rather unncessary. If the synopsys designware
spi is to be included. It should come from the devicetree.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-01-20 13:11:42 +01:00
Daniel DeGrasse 429188723e drivers: sdhc: sdhc_spi: wait for card response until cmd timeout
In sdhc_spi_response_get, the logic for slow cards previously only
retried reads 16 times. Instead of using this approach, read from the
card every 10 ms until the command timeout is reached or it responds.
This way, the command timeout will be respected for cards that do not
respond.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-01-20 12:44:02 +01:00
Jai Arora ba7b7ffff2 posix: Adds test to check getpid() is not NULL
Adds test to check getpid() function is not NULL

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2024-01-20 12:41:28 +01:00
Jai Arora b103dece67 posix: Adds test for clock_getcpuclockid()
Adds test for clock_getcpuclockid() to
make sure clock_id is equal to CLOCK_PROCESS_CPUTIME_ID
after a successful call

Fixes #59954

Signed-off-by: Jai Arora <infolinesoni@gmail.com>
2024-01-20 12:41:28 +01:00
Martin Kiepfer 5a3f53551f drivers: display: gc9a01a: Add support for SPI display controller gc9a01a
Adding driver for GC9A01A 240x240 based LCD displays.
Should be working with GC9C01 as well (untested).

Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
2024-01-20 12:40:15 +01:00
Christopher Friedt 18c23dec5f tests: posix: common: free resource in after() for timer suite
Create a separate ZTEST_SUITE() to properly manage resources
that are shared between test cases. Add some assertions where
they were missing.

Additionally, we don't need verbose printing in this testsuite,
so change `printk()` to `LOG_DBG()`

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2024-01-19 13:14:56 -05:00
Peter Mitsis d8108369bc tests: smp_suspend: Tweak duration and timeouts
Reduces the number of seconds that the test runs to 15 seconds
(down from 30 seconds). This should still be sufficient time
to determine if there is anything amiss with the synchonous
thread suspend/resume. Furthermore, the test itself has been
tagged as being slow and its timeout increased to 10 minutes
(600 seconds) as some simulators are rather slow.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-01-19 12:13:30 -05:00
Parthiban Nallathambi db429004fd drivers: modem: gsm fix rssi range
rssi 31 will be -51dBm or greater, where -51 is valid. Fix the
range by allowing until -51.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2024-01-19 15:15:03 +00:00
Fabio Baltieri 5f989e4378 input: add a keymap driver
Add a "input-keymap" driver to translate keyboard matrix event into key
events.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-19 15:14:25 +00:00
Fabio Baltieri 8a313c152a input: event-codes: define 0 as reserved
Define code 0 as INPUT_KEY_RESERVED, same as linux.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-19 15:14:25 +00:00
Tanmay Kathpalia d267298af2 CODEOWNERS: Update codeowners for SDHC Cadence
Updated codeowners for SDHC Cadence Driver files.

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@intel.com>
2024-01-19 15:14:17 +00:00
Tanmay Kathpalia aeb25e3da1 drivers: sdhc: Cadence SDHC driver bug fixes and other improvements
* Internal Clock not getting stable during initialization
* SD clock was not enabled
* Removed duplicate file.
* Removed write to readonly registers
* Moved function pointer structure from data section to RO section
* Wrong macro names
* Refactoring of lower layer header file.

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@intel.com>
2024-01-19 15:14:17 +00:00
Gerard Marull-Paretas 48dbcf5479 soc: riscv: remove empty soc.h files
Because they're just not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas e7cc2fafb4 arch: riscv: remode redundant soc.h includes
They are just not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 788fda525a soc: riscv: virt: reduce the scope of SIFIVE_SYSCON_TEST
It was used nowhere else, there's no need to expose it publicly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 874513439b soc: riscv: sifive_freedom: move PRCI base address to prci.h
Instead of soc.h. This likely needs to be DT-ized at some point.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas cce467034f soc: riscv: opentitan: reduce the scope of some definitions
Some definitions were only used in soc.c, there's no need to expose them
in a public header like soc.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 95c573f02e soc: riscv: openisa_rv32m1: add missing includes
<soc.h> is needed to pull some APIs defined in soc.h.
<fsl_device_registers.h> is needed to access EVENT0/1 addresses.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 0c5a2b1fe4 soc: riscv: microchip_miv: miv: move MIV_UART_0_LINECFG to driver
Instead of soc.h, since it's not used by anything else.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas c5699fac7f soc: riscv: ite_ec: add missing soc_common.h include
File uses some API declared in soc_common.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 3765b90c77 soc: riscv: ite_ec: it8xxx2: reduce the scope of some definitions
Do not expose them in soc.h, just move them to the module making use of
them.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 68a0f0a377 soc: riscv: andes_v5: ae350: remove redundant include
<soc.h> is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 13e02a00f0 soc: riscv: andes_v5: include soc_v5.h
Instead of catch-all soc.h (which was now just being a proxy for
soc_v5.h).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 636a5990b5 manifest: update hal_espressif
Pull an include fix (missing soc.h).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas a63591c5cb drivers: timer: litex: add missing include
<soc.h> is needed to access IO R/W functions like litex_read8.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas ed166915bb drivers: spi: rv32m1_lpspi: add missing include
Add <soc.h>, for INST_DT_CLOCK_IP_NAME.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 893a338f05 drivers: serial: opentitan: remove redundant include
<soc.h> is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 5e17b89804 drivers: serial: liteuart: add missing include
soc.h was missing to access custom IO read/write functions, e.g.
litex_read8.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 183dd20424 drivers: serial: neorv32: add missing include
<soc.h> is needed for some NEORV32_SYSINFO_* definition.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 7e3b3dd258 drivers: pinctrl: sifive: use DT ngpios property
Instead of hardcoded definitions from soc.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 3381fb4b3d drivers: intc: plic: remove redundant include
<soc.h> is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 436a9f2211 drivers: intc: nuclei_eclic: remove unnecessary include
soc.h is empty for this platform.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 1a0c13d4ae drivers: i2c: mchp_mss: remove redundant include
<soc.h> is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 0e9084ff9c drivers: i2c: litex: add missing include
soc.h was missing for some IO r/w functions, e.g. litex_write8.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 9e8bd2f976 drivers: gpio: sifive: remove unnecessary check
The API already asserts for invalid pin based on DT `ngpios` property.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 0363b74b38 drivers: gpio: mchp_mss: remove redundant include
<soc.h> is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas d17405f255 drivers: gpio: atcgpio100: remove redundant include
<soc.h> is not needed.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 8edd33bf27 drivers: clock_control: litex: add missing include
Drivers uses custom IO read/write API defined in soc.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas c42ef7117d dts: riscv: sifive: fu540: add missing ngpios property
FU540 SoC has 16 GPIOs, this way, the GPIO API can perform correct
asserts when a pin is provided. Note that default is 32, correct for eg
FE310.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 27f14eb3a8 bluetooth: controller: ll_sw: RV32M1: add missing include
cntr.c accesses some registers defined in fsl_device_registers.h.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas a5ded8aa9f arch: riscv: smp: define MSIP_BASE
Instead of relying on definitions included indirectly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
Gerard Marull-Paretas 7af4f7eb8a arch: riscv: offsets: fix header race condition
It looks like some soc_offsets.h files need to be included before
kernel_offsets, otherwise there are some header race conditions due to
the infamous soc.h. This problem is exposed if all soc.h are removed
from RISC-V arch header files (see the upcoming commits). It can be
reproduced by building rv32m1_vega_ri5cy board after applying all the
patches in this series (excluding this one, of course).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-19 15:13:53 +00:00
TOKITA Hiroshi 3578a9e646 tests: drivers: display: add read() and write() test
Add test for `display_read()` and `display_write()` api.

Note: The CI environment has no display device, which makes it fail
the tests. So, I make this test case `build_only`. But it can run in
a display device available environment.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-19 15:13:25 +00:00
TOKITA Hiroshi 6489255648 drivers: display: sdl: add SDL_DISPLAY_MONO_MSB_FIRST option
Added config for specifying bit order when using monochrome format.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-19 15:13:25 +00:00
TOKITA Hiroshi 321389df92 drivers: display: sdl: Correcting `display_read()`
Fixed an issue where `display_read()` in the SDL driver was not working.

In the current implementation, use texture to represent screen images.
To read this, draw it once on another surface and then read it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-19 15:13:25 +00:00