Commit graph

67343 commits

Author SHA1 Message Date
Ruibin Chang 32906a18ec ITE soc/it8xxx2: disable unused integrated cc module
ITE EC chip it81202 and it81302 both have embedded integrated
pd module (support two usbpd ports), this is different from
standalone TCPC. To prevent cc pins leakage, we disable not
active ITE USBPD port cc modules, then cc pins can be used
as gpio if needed.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2022-07-22 10:32:12 +02:00
Martí Bolívar cb86ed692f doc: dts: improve rules for upstream bindings
Try to make the section which contains rules for upstream bindings
clearer. I'm having trouble getting people to do the right thing even
when referring to this section during code reviews, which makes me
think the docs need to be more explicit and contain more examples.

Clean up some section titles while I'm here.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-07-22 10:31:31 +02:00
Martí Bolívar a745ebba5e doc: dts: create zephyr chosen nodes section
Split the API docs on chosen nodes from the reference table of
zephyr-specific chosen nodes. They are related but logically different
and I often want to link to just the table, while skipping the API.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-07-22 10:31:31 +02:00
Martí Bolívar f8df2dadd9 .gitignore: fix !doc/build pattern
There is no doc/guides/build directory. Fix a line referencing this to
refer to the actual directory containing build and configuration
system documentation, doc/build. (This is distinct from the
documentation build directory, which is canonically doc/_build. I
know...).

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-07-22 10:31:31 +02:00
Kumar Gala d96312b9e2 dts: x86: Remove label property from devicetrees
Label properties are not required.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 02:51:45 -05:00
Kumar Gala f45e2a1db1 dts: sparc: Remove label property from devicetrees
Label properties are not required.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 02:51:14 -05:00
Kumar Gala 67da494b48 boards: arm: sensortile_box: Configure I2C if sensors
If a test or sample enables CONFIG_SENSOR=y than any sensor on the
I2C or SPI bus should be available.  We already handle this for
SPI on the board, add I2C as well.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 02:20:18 -05:00
Kumar Gala efc96ecf7e tests: build_all: sensor: remove unnecessary Kconfig symbols
Kconfig will default to enable the drivers based on devicetree so
we don't need to explicitly set the Kconfig symbols.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 02:20:18 -05:00
Kumar Gala f0441fba58 drivers: sensor: Update drivers to use devicetree Kconfig symbol
Update sensor drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-22 02:20:18 -05:00
Peter Mitsis 0476d6ad69 doc: Update mutex priority inheritance description
Updates the priority inheritance description to better explain what
happens during priority inheritance and warn of the consequences of
not following best-practices.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-07-21 21:59:18 -04:00
Benjamin Björnsson 45cecadb35 samples: net: gsm_modem: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 17:26:44 -05:00
Anas Nashif 987693c270 intel_adsp: rename obsolete adsp timer config
Use INTEL_ADSP_TIMER instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 2af59e7d44 intel_adsp: unify timer registers and simplify timer driver
Declare clock control in the shim header per SoC and remove ifdeffry
from the driver simplifiying it and making it ready for the next
platform.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 356779448c intel_adsp: minor header include reorg/fixups
Minor reorg of headers and when they get included.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 9a28930ece intel_adsp: rename power_init_mtl
No need for the suffix here, this is built only for Meteorlake anyways.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 1f1b10eb26 intel_adsp: move register definition from soc.c to shim header
Declare those register in the adsp_shim header instead of the code
applying ifdefs that limit the scope to only specific SoCs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif ad32077108 intel_adsp: move l1 memory definition to header
Move register definition to SoC header instead of hardcoding it where it
is being used.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 01438a1998 intel_adsp: move imr configs to headers
Move those defines and values back to headers. Kconfig is not a good
place for this, later this should move to DTS.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif af3d5331a1 intel-adsp: migrate cavs-mem.h to adsp_memory.h
Move header and make it soc specific.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 3586227a7c intel_adsp: adsp_shim.h: run through clang-format
Run the files through clang-format to clean things up a bit.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 453f37c3d9 intel_adsp: shim: cleanup shim header
Remove conditional code and SOC specific defines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 423264b96b intel_adsp: make shim header soc specific
using once single header to support multiple socs and product
generations is error prone and not easily maintained.

Over time we have been adding conditional code in headers and extending
structs  to support new HW features which becomes a problem.

Goal is to keep platform headers in sync with hardware specification and
allow of introduction of new platforms and hardware features by just
introducing a new SoC with its own set of headers.

This is now just a copy of existing cavs-shim.h with slight changes,
goal is to clean this up long term and sync with hardware datasheets and
align on naming as well.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 51cd0dd682 intel_adsp: move soc headers into include/
Move headers into the include/ folder per soc and rename fw_defs.h to
adsp_memory to align with SOF.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif f72cdeb896 intel_adsp: common: remove unnecessary ifndefs
cavs15 has its own boot path, so no need to check for it in code it does
not run.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Anas Nashif 2f83adae93 intel_adsp: common: build soc.c only for CAVS
build soc.c only for platforms that can use it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-21 17:55:41 -04:00
Francois Ramu 31b9a6acc6 samples: usb: audio application uses static dev declaration
This change the applications to get device from the
compatible of the zephyr_udc0 node.
It is defined by the DTC_OVERLAY_FILE="app.overlay"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2022-07-21 13:24:24 -05:00
Emil Gydesen efb0313e84 Bluetooth: Audio: Fix typo in BT Audio Location
Fix typo in "beck" which should have been "back".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-21 13:13:58 -05:00
Kumar Gala 2d88414c4e drivers: serial: pl011: Remove unused Kconfig symbols
The driver has be DT_INST based for a while so the Kconfig
symbols CONFIG_UART_PL011_PORT0<n> aren't used.  So lets
remove them.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 16:40:28 +00:00
Kumar Gala 894e8814af drivers: serial: rv32m1_lpuart: Remove unused Kconfig symbols
The driver has be DT_INST based for a while so the Kconfig
symbols CONFIG_UART_RV32M1_LPUART_<n> aren't used.  So lets
remove them.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 16:40:28 +00:00
Kumar Gala 2955e3f34d tests: build_all: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 09:09:48 -05:00
Benjamin Björnsson c8ba22f561 samples: sensor_batch_processing: Update sample to remove DT_INST
Update sample to use DT_COMPAT_GET_ANY_STATUS_OKAY in order to remove
DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 14:01:55 +00:00
Kumar Gala 6cfaa9c381 samples: crypto: Convert to use Update sample to use DEVICE_DT_GET_ONE
Update sample to use DEVICE_DT_GET_ONE to remove usage of
device_get_binding if the device is devicetree based.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 14:00:38 +00:00
Hu Zhenyu de40c4e986 test: Update the new ZTEST APIs tests/net/shell
TEST=twister -T tests/net/shell

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-07-21 13:57:47 +00:00
Andrei Emeltchenko b234ddc748 tests: ibecc: Fix IBECC tests
Fix IBECC tests moving common part to setup function.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-07-21 13:57:25 +00:00
Yinfang Wang 8a5bf765bc tests: subsys: edac: move ibecc to new ztest API
move ibecc to new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-07-21 13:57:25 +00:00
Yinfang Wang 6087bac296 tests: subsys: edac: move ibecc_cov to new ztest API
move ibecc_cov to new ztest API.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-07-21 13:57:25 +00:00
Benjamin Björnsson 5ad251b8d2 samples: sensor: tmp116: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 08:28:29 -05:00
Krzysztof Chruscinski 75c6a9050a tests: logging: log_stack: Adjust thresholds
Adjust thresholds after updates in log_output.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Krzysztof Chruscinski a0e79710a0 tests: logging: log_output: Improve test coverage
Improve test coverage for log_output module.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Krzysztof Chruscinski 15fdee04e3 logging: log_output: Add function for processing input arguments
Add function which formats a logging string from input parameters
and not from logging message. This function is more flexible since
it does not require data to be placed in the log message.

Converted a function for message processing to used this new function
internally.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Krzysztof Chruscinski 63c071a713 tests: logging: log_stack: Adjust thresholds
Adjust threshold.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Justin Huang cb5264162d logging: added log process thread priority support
Added Zephyr config items to support setting the priority of the log
process thread at build time.

Signed-off-by: Justin Huang <justinyhuang@fb.com>
2022-07-21 08:59:38 -04:00
Benjamin Björnsson 45adae9118 drivers: gpio: gpio_fxl6408: move driver to use i2c_dt_spec
Simplify driver by using i2c_dt_spec for bus access.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 06:07:02 -05:00
Benjamin Björnsson 706949cf71 samples: drivers: espi: Convert to use DT_NODELABEL
Convert to use DT_NODELABEL to remove usage of DT_INST in sample.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 06:06:02 -05:00
Henrik Brix Andersen bda6455234 drivers: eeprom: Update drivers to use devicetree Kconfig symbol
Update EEPROM drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-21 06:03:04 -05:00
Henrik Brix Andersen 8746b2cb33 drivers: can: Update drivers to use devicetree Kconfig symbol
Update CAN drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol to expose
the driver and enable it by default based on devicetree.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-07-21 06:02:28 -05:00
Benjamin Björnsson 2bed3950c3 samples: drivers: ht16k33: Update sample to remove use of DT_INST
Simplify sample by removing usage of DT_INST.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-21 05:31:57 -05:00
Simon Hein 02cfbfea51 kernel: comply to coding guidelines MISRA C:2012 Rule 14.4
MISRA C:2012 Rule 14.4 (The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.)

Use `bool' instead of `int' to represent Boolean values.
Use `do { ... } while (false)' instead of `do { ... } while (0)'.
Use comparisons with zero instead of implicitly testing integers.

This commit is a subset of the original commit:
5d02614e34a86b549c7707d3d9f0984bc3a5f22a

Signed-off-by: Simon Hein <SHein@baumer.com>
2022-07-21 06:16:16 -04:00
Jaroslaw Stelter fe5ed68356 soc: ace_v1x: check physical memory bounds on page unmap.
This patch fix issue with unmapping of virtual addresses mapped
to non-existing physical memory. MTL TLB table is initialised with
1:1 mapping, however virtual space is much wider than available
physical space. We should not try to free and manage of power for
non-existing physical pages.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2022-07-21 05:32:03 -04:00
Simon Hein c29d0a3c4f soc: arm: comply to coding guidelines MISRA C:2012 Rule 14.4
MISRA C:2012 Rule 14.4 (The controlling expression of an if statement
and the controlling expression of an iteration-statement shall have
essentially Boolean type.)

Use `do { ... } while (false)' instead of `do { ... } while (0)'.

This commit is a subset of the original commit:
5d02614e34a86b549c7707d3d9f0984bc3a5f22a

Signed-off-by: Simon Hein <SHein@baumer.com>
2022-07-21 10:31:00 +02:00