Commit graph

1403 commits

Author SHA1 Message Date
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Pete Johanson f525a4b25a usb: stm32wb: Properly lock Sem5 before initializing USB.
* AN5289 notes that Sem5 should be held before configuring
  CLK48 for USB timing.

Signed-off-by: Pete Johanson <peter@peterjohanson.com>
2020-06-02 20:11:30 +02:00
Francois Ramu 992c005ab9 soc: arm: stm32 TICKS value with LPTIM config
This is defining the SYS_CLOCK_TICKS_PER_SEC default value
depending on the LPTIM CLOCK frequency in case of LPTIMER,
to get a TICK value as a divider of the LPTIM clock source.
It gives a better result in formulas when converting
ticks to count unit.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-29 14:13:05 +02:00
Armand Ciejak 9e923ee713 soc: arm: cortex_m: Fix OCRAM config for i.MX RT
OCRAM is attached to the flexram controller like the DTCM.

Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
2020-05-27 16:18:26 +02:00
Armand Ciejak 8781d612d0 soc: arm: cortex_m: Improve error messages
Use a different message for flash and sram.

Signed-off-by: Armand Ciejak <armand@riedonetworks.com>
2020-05-27 16:18:26 +02:00
Jakub Cebulski 7f6dbccba8 soc: litex: Add function for reading 64bit CSRs
This adds a helper function for reading LiteX 64-bit CSRs
to be used by LiteX drivers.

Signed-off-by: Jakub Cebulski <jcebulski@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-05-26 21:43:30 +02:00
Wayne Ren 74be178386 soc: fix the int numbers of emsdp
emsdp is a FPGA based platform, can be loaded with different
configurations. Different configuration have different
interrupts:

* em5d, em7d and em11d have 111 interrupts
* em4 and em6 have 113 interrupts
* em7d_esp has 112 interrupts

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-05-21 10:59:36 +02:00
Daniel Leung ae989e0539 x86: apollo_lake: add mmu regions for UARTs and I2Cs
UARTs and I2C controllers are accessed through MMIO and
these regions need to be added to MMU for proper access.

This also enable MMU for Apollo Lake by default since
serial console is now usable.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-05-19 19:19:51 +02:00
Andy Ross b3231ccd8a soc/x86/apollo_lake: IOAPIC ID's are not a SMP feature
This file consists only of an array of per-CPU IOAPIC ID's that
overrides the weak symbol defined by the architecture.

The IOAPIC IDs are only used when targetting a startup IPI for the
auxiliary right now, but the IDs are the IDs and represent hardware
truth.  They should be correct even if unused.

Using the wrong ones also breaks the tests/kernel/mp test, which calls
arch_start_cpu() when not in SMP mode as a deliberate unit test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-05-19 19:19:51 +02:00
Johan Hedberg 9a7171304f soc: x86: apollo_lake: Fix default timer selection
The APIC timer is not supported e.g. with SMP (which will be enabled
by default soon as well) so the sensible choice is to default to HPET.
Also, the default makes more sense to be on the SoC side, so move it
there from the board defaults.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-05-19 17:25:36 +02:00
Kumar Gala 5496ea2d9b soc: x86: apollo_lake: Fix incorrect DTS gpio nodelabel references
The nodelabel references for the GPIO region MMU setup were incorrect.
The nodelabel names didn't match what is in the dts.  Fix this otherwise
we get a compile error when enabling the functionality.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-14 18:00:37 +02:00
Martí Bolívar 6e8775ff84 devicetree: remove DT_HAS_NODE_STATUS_OKAY
Several reviewers agreed that DT_HAS_NODE_STATUS_OKAY(...) was an
undesirable API for the following reasons:

- it's inconsistent with the rest of the DT_NODE_HAS_FOO names
- DT_NODE_HAS_FOO_BAR_BAZ(node) was agreed upon as a shorthand
  for macros which are equivalent to
  DT_NODE_HAS_FOO(node) && DT_NODE_HAS_BAR(node) &&
- DT_NODE_HAS_BAZ(node), and DT_HAS_NODE_STATUS_OKAY is an odd duck
- DT_NODE_HAS_STATUS(..., okay) was viewed as more readable anyway
- it is seen as a somewhat aesthetically challenged name

Replace all users with DT_NODE_HAS_STATUS(..., okay), which is
semantically equivalent.

This is mostly done with sed, but a few remaining cases were done by
hand, along with whitespace, docs, and comment changes. These special
cases include the Nordic SOC static assert files.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-13 18:24:42 +02:00
Stephanos Ioannidis edeed72869 soc: atmel_sam0: samd21: Fix interrupt line count
The Atmel SAM D21 SoC, according to the original Atmel datasheet
(Atmel-42181N), has 28 interrupt lines (0-27).

There have been mysterious changes in the number of interrupt lines and
on-chip peripherals in the recent Microchip datasheet releases, but
there is no explicit information available for this (e.g. PCN), so we
take the safest approach by assuming the lowest interrupt line number.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-12 17:13:11 +02:00
Johan Hedberg 1108611a3e soc: x86: apollo_lake: Make it possible to disable I2C support
Make it possible for an application to set CONFIG_I2C=n if it wants.
The unconditional select was making this impossible due to resulting
unmet dependencies.

This is also in line with what some other SoC definitions do with I2C.

Fixes #25204

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-05-11 23:03:10 +02:00
Karl Zhang 1a001cc94d arm: mps_an521_nonsecure: Add TFM BL2 support
PSA level 1 requires secure boot. TF-M BL2 is the official
secure boot loader. It needs a BL2_HEADER_SIZE offset.

Align nonsecure address with TF-M's NS slot while TF-M BL2 enabled.

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2020-05-09 16:21:51 +02:00
Parthiban Nallathambi f4adfd52cb drivers: serial: add XMC seris UART support
Add infineon XMC4 series UART support. Driver supports
only poll mode using XMCLib.

Out of 4 available UART's on SoC, only UART1 is confgired
by default in UART mode until GPIO & pinctrl support.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-05-09 14:21:44 +02:00
Parthiban Nallathambi b687d76d09 soc: arm: add infineon_xmc series support
Add infineon xmc series with XMC4500 support. XMC series comes with,
- CPU operates upto 120MHz
- 3 RAM (PSRAM1 - code, DSRAM1 - data and DSRAM2 - communiation)
- upto 1MB flash

init: clock control & gpio is not done, so SoC initialization directly
relies on HAL. Core operating clock is stored in no_init section, which
is kept under DSRAM1. Only DSRAM1 is used until clock support. Using
PSRAM1 and DSRAM1 needs adaptation in linker script - planned for next
revision.

Note: SystemInit cannot be consumed directly due to vector table +
HAL linker dependency.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2020-05-09 14:21:44 +02:00
Andrei Emeltchenko d6a33ef467 soc: intel_adsp: Generalize bootloader
Move bootloader to soc/xtensa/intel_adsp making it available for other
boards.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-05-09 13:07:33 +02:00
Sandeep Tripathy a515934a4b plat: bcm_vk: core specific init
Add initilizations for:
- Cortex-A72 L2 Controller configurations. This initialization to
 be done when cluster is in quiscent state.
- 'ICC_SRE_EL3' init to allow GIC V3 ICC_SRE_ELx system interface.
 This initialization can be done at 'EL3' only.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
2020-05-09 12:23:40 +02:00
Kumar Gala c2135f8721 devicetree: DT_NODE_HAS_COMPAT_STATUS_OKAY -> DT_NODE_HAS_COMPAT_STATUS
Swap this out and make the status a parameter.
Leave a couple of cases of DT_NODE_HAS_COMPAT().

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-08 19:37:18 -05:00
Martí Bolívar 17b8667197 dts: clean up some redundant DT checks
These are redundantly checking a node's status twice.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-08 19:37:18 -05:00
Martí Bolívar 7e0eed9235 devicetree: allow access to all nodes
Usually, we want to operate only on "available" device
nodes ("available" means "status is okay and a matching binding is
found"), but that's not true in all cases.

Sometimes we want to operate on special nodes without matching
bindings, such as those describing memory.

To handle the distinction, change various additional devicetree APIs
making it clear that they operate only on available device nodes,
adjusting gen_defines and devicetree.h implementation details
accordingly:

- emit macros for all existing nodes in gen_defines.py, regardless
  of status or matching binding
- rename DT_NUM_INST to DT_NUM_INST_STATUS_OKAY
- rename DT_NODE_HAS_COMPAT to DT_NODE_HAS_COMPAT_STATUS_OKAY
- rename DT_INST_FOREACH to DT_INST_FOREACH_STATUS_OKAY
- rename DT_ANY_INST_ON_BUS to DT_ANY_INST_ON_BUS_STATUS_OKAY
- rewrite DT_HAS_NODE_STATUS_OKAY in terms of a new DT_NODE_HAS_STATUS
- resurrect DT_HAS_NODE in the form of DT_NODE_EXISTS
- remove DT_COMPAT_ON_BUS as a public API
- use the new default_prop_types edtlib parameter

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-08 19:37:18 -05:00
Mieszko Mierunski 8538e7133a soc: nordic: Add support for nRF52820
This commit adds basic support for nRF52820 SoC.
Changes affect introducing:
 - architecuture files (dtsi)
 - configuration of nrfx drivers
 - adaptation of inclusions based on chosen SoC

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2020-05-08 15:00:41 +02:00
Sahaj Sarup 351f39f9cd board: arm: Add Support For 96Boards Aerocore2
Changes:

- Added all required board files in /boards/arm/96b_aerocore2
- Modified pinmux for stm32f4

Most of the changes in this PR is based on reverse-engineering of the
PCB layout and following commits in the PX4 firmware repository for
the same board. The manufacturer does not provide and or generate
schematics and pinout tables for this board.

This PR includes almost all of the interfaces connected to the STM32
MCU, the only thing not included is the J9 and J8 headers that connect
to a 96Boards baseboard.
These headers are not vital to the functionality of the Aerocore2.

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2020-05-08 07:33:43 -05:00
Sahaj Sarup 161d8c0c21 arm: soc: add support for stm32f427
Add STM32F427. This is mainly aimed towards the stm32f427vi.

Changes:

- Add stm32f427 support based on previous work
done for the stm32f429.
- Rework currunt stm32f429 implimentation to now
be based on stm32f427.
- Introduce dedicated dtsi for the VI variant of both
stm32f427 and stm32f429. This is done to prevent stm32f4.dtsi
from being included twice.

Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
2020-05-08 07:33:43 -05:00
Stephanos Ioannidis 7778c22b60 soc: arm: atmel_sam: samv71: Remove ARM_MPU selection
The SAM V71 SoC configuration currently selects the `ARM_MPU` symbol
and this effectively forces MPU usage on the SoC.

This commit removes `ARM_MPU` selection from the SoC Kconfig since it
is intended to be selected by a board, and the `CPU_HAS_ARM_MPU` symbol
already indicates that the SoC supports ARM MPU.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-08 11:11:59 +02:00
Stephanos Ioannidis 51a2655cca soc: arm: atmel_sam: same70: Remove ARM_MPU selection
The SAM E70 SoC configuration currently selects the `ARM_MPU` symbol
and this effectively forces MPU usage on the SoC.

This commit removes `ARM_MPU` selection from the SoC Kconfig since it
is intended to be selected by a board, and the `CPU_HAS_ARM_MPU` symbol
already indicates that the SoC supports ARM MPU.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-08 11:11:59 +02:00
Arjun Jyothi d18ae2e9fb soc: arm: Add Broadcom Viper SoC support
Add initial support for Broadcom Viper SoC.
It has ARM Cortex-M7 and Cortex-A72 cores.

Signed-off-by: Arjun Jyothi <arjun.jyothi@broadcom.com>
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-05-08 10:46:23 +02:00
Erwan Gouriou f81c5547f2 boards: nucleo_l552ze_q: Set system clock to 110MHz
Use MSI as PLL source. This enables to run system clock at 110MHz.
To achieve this, voltage regulator should be set to scale 0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou 1d3c1f8d2e drivers/serial: Add support for stm32l5 soc
Add serial support for STM32L5 serial driver and instances

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou cdd5856167 driver/gpio: stm32: Add STM32L5 support
Add basic GPIO support. Regarding interface with EXTI,
STM32L5 is similar to STM32G0.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou 1f054a7b31 drivers/exti: stm32: Add support for STM32L5 series
Add support for stm32l5 socs on stm32 external interrupts driver

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou f258199595 drivers/clock_control: Add clock_control on STM32L5 series
Add clock_control driver for STM32L5.
It's based on L4/WB driver since it is similar IP.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Erwan Gouriou 3057d801c7 soc/arm/st_stm32: Add stm32l5 series soc support
This provides basic stm32l5 series SoC support.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Andrei Gansari 0b4cfbebe8 soc: lpc55xxx RNG definiton
Definiton for LPC55xxx family RNG device.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Francois Ramu dc04ce84a4 soc: arm: stm32wb55x series enabling dma and dmamux
This patch defines the dma feature for the stm32wbXX
and the dmamux feature for the stm32wb55x
soc series from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-07 23:03:20 -05:00
Gerard Marull-Paretas cfebfc188e drivers: adc: stm32: add support for H7 series
Add support for ADC on H7 series. Note that ADC1 and ADC2 share the same
register set, so it is added as "adc1_2".

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-07 23:01:59 -05:00
Kumar Gala 10a5c438fc soc: arm: atmel_sam: Remove soc_pinmap.h
All pin configuration for ATMEL SAM SoC come from devicetree so we can
now remove the soc_pinmap.h header files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Kumar Gala 6ae8664889 drivers: i2s: i2s_sam_ssc: Convert to devicetree
Convert i2s_sam_ssc driver to utilize devicetree.  We replace Kconfig
options for specifying the DMA configuration (channel, DMA device name)
with getting that from devicetree.  We also get pincfg from devicetree,
however we still have Kconfig sybmols to specify if the RF or RK pin is
enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Richard Osterloh 6b41ce5b67 soc: stm32g4: Fix typo in include filename for wwdg
Due to a typo compiling the WWDG on the g4 family does not
work. This adds the correct include filename.

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2020-05-07 17:24:20 -05:00
Andrei Gansari 3cc0aa7c62 soc: lpc devices spi clock speed increase
High Speed Flexcomm device that handles high speed SPI transfer are
mapped to the same High Frequency clock that the ARM core uses.
This allows for higher frequency SPI traffic.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 12:47:34 -05:00
Carles Cufi da5aa23af3 soc: ti_simplelink: Port to the new timeout API
Port the usage of the timeouts to the new timeout API, in order to be
able to deselect the legacy timeout option.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-05-07 11:01:55 +02:00
Kumar Gala a58777e251 drivers: dma: atmel_sam0: Convert to use devicetree macros for dma dev
Convert to using DT_INST_LABEL() in the dma driver and convert dma users
to use the DMA property macros to get the dma controller name.  We make
the assumption in the drivers that there is a single DMA controller
instance.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 00:49:32 -05:00
Martí Bolívar edeb555a8b devicetree: fix a couple of late-breaking DT_HAS_NODE()
Replace with DT_HAS_NODE_STATUS_OKAY.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-06 13:59:27 -05:00
Alex Porosanu 7187d624a7 soc: kinetis: add support for TPM PWM module
Some Kinetis SoCs have an instance of the the TPM module
that can be used for PWM control. As such, add the necessary
configurations to enable it on the SoCs that support it, as well as
enable the clock for the module to function.

In this case, the enablement is done only for the KW41Z SoCs,
but there are other SoCs that support it, f.i. KW38Z

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2020-05-06 11:33:37 -05:00
Armando Visconti 5097ce6e35 soc: arm: stm32: Enable I2S_STM32 in the common part
Enable I2S_STM32 in the soc common part, so it will no
longer be required in board default configuration.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2020-05-06 10:33:07 -05:00
Kumar Gala fdd85d5ad7 dts: Rename DT_HAS_NODE macro to DT_HAS_NODE_STATUS_OKAY
Rename DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY so the semantics are
clear.  As going forward DT_HAS_NODE will report if a NODE exists
regardless of its status.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-06 05:25:41 -05:00
Kumar Gala 52a950bbe6 soc: riscv: openisa_rv32m1: Conver to new devicetree macros
Convert DT_CODE_PARTITION_{OFFSET,SIZE} to use new
DT_REG_ADDR/DT_REG_SIZE macros instead based on
DT_CHOSEN(zephyr_code_partition).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 09:23:32 -05:00
Kumar Gala 339e3f79eb riscv: linker: replace DT_FLASH_{BASE_ADDRESS,SIZE} with new macros
The riscv linker scripts utilize DT_FLASH_BASE_ADDRESS and
DT_FLASH_SIZE, as we want to phase out the old generator we need to
replace these defines with macros from devicetree.h.

We support two flash configurations at this point, either a QSPI flash
like on the hifive board or a SoC flash like on the rv32m1_vega.  We
update the linker scripts to check the compat of the zephyr,flash node
and based on if its 'jedec,spi-nor' or 'soc-nv-flash' we determine how
to extract the "flash" base address and size.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 09:23:32 -05:00
Kumar Gala 979904b6af soc: arm: nxp_lpc: Convert from Kconfig to DT_NODELABEL
As we phase out per instance Kconfig symbols convert to utilize
DT_NODELABEL for SPI and I2C instances instead.

Also updated comments to change from FLEXCOMM8 to HSLSPI.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 08:57:45 -05:00
Kumar Gala 463bce59e4 dts: Remove dts_fixup.h
Remove all remaining dts_fixup.h as all defines in the files are no
longer utilized.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-05 15:46:50 +02:00
Kumar Gala 26c2c010ee dts: Remove DT_ADC_{0..2}_NAME references from dts_fixup.h
Remove DT_ADC_{0..2}_NAME from dts_fixup.h, if this casues the
dts_fixup.h file to be empty we remove the file as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 14:00:44 -05:00
Kumar Gala dff8715615 drivers: ethernet: sam_gmac: rework pin config
Reworked sam_gmac driver to get pin ctrl/mux configuration information
from the device tree instead of via Kconfig and defines in soc_pinmap.h

We remove defines from soc_pinmap.h that are no longer needed due to
getting all that information from devicetree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-04 11:32:10 -05:00
Stephanos Ioannidis 7efa38583a soc: arm: same54: Add MPU selection
This commit adds the missing `CPU_HAS_ARM_MPU` selection for the Atmel
SAM E54 series SoC.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 17:14:35 +02:00
Stephanos Ioannidis 319227de20 soc: arm: same53: Add MPU selection
This commit adds the missing `CPU_HAS_ARM_MPU` selection for the Atmel
SAM E53 series SoC.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 17:14:35 +02:00
Stephanos Ioannidis e4c83ddcf4 soc: arm: same51: Add MPU selection
This commit adds the missing `CPU_HAS_ARM_MPU` selection for the Atmel
SAM E51 series SoC.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 17:14:35 +02:00
Stephanos Ioannidis 2c416a9d50 soc: arm: samd51: Add MPU selection
This commit adds the missing `CPU_HAS_ARM_MPU` selection for the Atmel
SAM D51 series SoC.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 17:14:35 +02:00
Stephanos Ioannidis 4d59f4af60 soc: arm: atmel_sam: Add devicetree.h inclusion in soc.h
This commit adds the `devicetree.h` header inclusion in the Atmel SAM-
family SoC header files, as required by the ARM SoC conventions.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 17:14:35 +02:00
Stephanos Ioannidis d1e0bd2c5d soc: arm: atmel_sam0: Add devicetree.h inclusion in soc.h
This commit adds the `devicetree.h` header inclusion in the Atmel SAM0-
family SoC header files, as required by the ARM SoC conventions.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 17:14:35 +02:00
Henrik Brix Andersen 09367b7053 soc: nxp: k6x: enable DAC driver
Enable the driver for the Kinetis Digital-to-Analog (DAC) modules
present in the NXP Kinetis K6x SoC series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen 27f982f1a3 soc: nxp: ke1xf: enable DAC driver
Enable the driver for the Kinetis Digital-to-Analog (DAC32) module
present in the NXP Kinetis KE1xF SoC series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Kumar Gala 491469a895 soc: nrf: Cleanup dts_fixup.h
Remove dts_fixup.h files that are needed anymore, remove defines that
are used, and replace defines with new DT macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-01 11:42:57 -05:00
Henrik Brix Andersen 93c6c913cb soc: arm: nxp: add LPC55S16 support
Add initial support for the NXP LPC55S16.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 10:11:01 -05:00
Kumar Gala be97e40683 soc: nios2: Cleanup linker scripts to use new DTS macros
Move defines for _RAM_ADDR, _RAM_SIZE, _ROM_ADDR, and _ROM_ADDR into
the linker.ld and thus remove dts_fixup.h.  We rework to use
DT_REG_ADDR and DT_REG_SIZE on DT_CHOSEN(zephyr_sram) and
DT_CHOSEN(zephyr_flash).

Also fixup use of _RAM_ADDR/_RAM_SIZE in newlib/libc-hooks.c.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 20:59:13 -05:00
Kumar Gala 42f3b6b786 dts: Remove unused or dead dts_fixup.h
Remove dts_fixup.h files that are not used (empty) or the defines aren't
used anymore and thus can be removed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 18:06:23 -05:00
Kumar Gala ed6138056e soc: lpc55xxx: Remove dts_fixup.h
Remove dts_fixup.h file as the defines in there aren't used anymore.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 17:42:23 -04:00
Kumar Gala 20f568023c soc: nxp_kinetis: Cleanup dts_fixup.h
Remove defines that are not used and replace defines with new DTS macros
in dts_fixup.h.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 17:42:23 -04:00
Kumar Gala 0cc76d75e2 soc: openisa_rv32m1: Remove dts_fixup.h
Remove dts_fixup.h file as the defines in there aren't used anymore.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 17:42:23 -04:00
Kumar Gala e7332f924b soc: arc: Use new dts macros in linker scripts and arc_mpu_regions
Convert linker scripts and arc_mpu_regions.c setup to use new
devicetree.h macros to extract the base address and size of the various
memory regions (DDR, SRAM, FLASH, DCCM, ICCM).  We also remove the
scaling up and down since DT_REG_SIZE() returns the value in bytes.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 13:29:48 -05:00
Kumar Gala 3dd2f610b0 x86: Cleanup linker scripts to use new DTS macros
Rework x86 linker scripts to use DT_REG_ADDR/DT_REG_SIZE on
DT_CHOSEN(zephyr_sram) and DT_CHOSEN(zephyr_flash).  As part of this
we remove the dts_fixup.h.  Using DT_REG_SIZE means we don't have to
adjust the sizes by 1024.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 08:37:18 -05:00
Kumar Gala d4989b4d53 soc: atmel: Cleanup dts_fixup.h
Remove dts_fixup.h files that are needed anymore, remove defines that
are used, and replace defines with new DT macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 08:24:19 -05:00
Kumar Gala 0aebbb1e06 soc: silabs: Cleanup dts_fixup.h
Remove dts_fixup.h files that are needed anymore and remove defines
that are not used.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:48:39 -05:00
Kumar Gala 29e91a6013 soc: snps_arc_iot: replace DT_SNPS_ARCEM_0_CLOCK_FREQUENCY w/new macros
Replace DT_SNPS_ARCEM_0_CLOCK_FREQUENCY with a PATH based reference
to cpu@0 (DT_PATH(cpus, cpu_0)) and than getting the clock_frequency
property:

    DT_SNPS_ARCEM_0_CLOCK_FREQUENCY ->
        DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:46:59 -05:00
Kumar Gala bf44f62b60 soc: arc: snps_emsk: Convert to new dt macros
Convert from DT_MMIO_SRAM_10000000_BASE_ADDRESS to
DT_REG_ADDR(DT_NODELABEL(ddr0)) and similar for
DT_MMIO_SRAM_10000000_SIZE to DT_REG_SIZE().

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:46:59 -05:00
Kumar Gala ca42ba9f35 soc: arc: Remove unused defines
We always have CONFIG_HAS_DTS set so remove block of defines associated
with ifndef CONFIG_HAS_DTS.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:46:59 -05:00
Kumar Gala b9e6339a4e soc: stm32: stm32f1: adc: Remove use of DT_FOO_LABEL defines
Complete STM32 conversion to new DT macros by removing
remaining occurences of DT_ST_STM32_ADC_FOO_LABEL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-30 04:45:08 -05:00
Kumar Gala 908be1545e soc: x86: apollo_lake: Fix MMU setup for GPIO regions
When we converted the GPIO driver to the new GPIO API we didn't update
the MMU mapping defines.  Use the macros from devicetree.h and
nodelabel's to get the register base address and sizes for the GPIO
blocks.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 21:29:07 -05:00
Erwan Gouriou 0f91cdbb43 soc: stm32: adc: Remove use of DT_FOO_LABEL defines
Complete STM32 conversion to new DT macros by removing
remaining occurences of DT_ST_STM32_ADC_FOO_LABEL.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-29 16:09:15 -05:00
Daniel Leung 4962bf3875 soc: intel_s1000: fix SMP build error
During devicetree macro changes, LPSRAM_BOOT_VECTOR_ADDR
pointed to another macro which was renamed to a non-existent
one. Fix it so that SMP builds again.

Fixes #24720

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-29 14:59:33 -05:00
Erwan Gouriou 0d59f63c0a soc: stm32: clean up DT_RTC symbols
Replaced by the DT_INST version

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-29 13:13:58 -05:00
Erwan Gouriou 068e2b9032 soc: stm32: Cleanup DT_FLASH_DEV_NAME
No more needed

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-29 13:13:58 -05:00
Kumar Gala 6d6cf4bb9d soc: x86: atom: sync linker / memory map on atom with ia32
Rework the atom/linker.ld to match how ia32/linker.ld works with regards
to how PHYS_LOAD_ADDR & PHYS_RAM_ADDR are set based on CONFIG_XIP and
from which DT_PHYS_{RAM,LOAD}_ADDR defines.  We update the minnowboard
dts and atom.dtsi files to keep in sync with this.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 10:19:59 -07:00
Erwan Gouriou b53824ce63 soc: stm32: can: remove DT define leftover in fixup files
Could be cleaned up following migration of can driver to new DT API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-29 09:08:13 -05:00
Erwan Gouriou 7989800f9e soc: stm32: lptim: remove DT define leftover in fixup files
Could be cleand up following migration of lptim driver to new DT API.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-29 09:08:13 -05:00
Kumar Gala 5a31ee2175 soc: riscv: openisa_rv32m1: Convert to new dts macros
Convert from DT_OPENISA_RV32M1_INTMUX_INTMUX_LABEL to
DT_LABEL(DT_INST(0, openisa_rv32m1_intmux)).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 08:03:24 -05:00
Kumar Gala aef3cfc332 soc: nxp_imx-rt: Convert to new dt macros in linker.ld
Convert ocram and sdram regions to use new macro DT_REG_ADDR() and
DT_REG_SIZE() with DT_NODELABEL to determine the various memories size
and base address.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 18:23:40 -05:00
Kumar Gala fd021da59a drivers: uart: mcux_lpsci: Convert to DT_INST
Convert driver to use new DT_INST macros throughout.  Removed per
instance Kconfig symbols and replaced with DT_NODELABEL references
where needed.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 16:54:30 -05:00
Erwan Gouriou 826e24ca58 drivers/can: stm32: configure driver thanks to compatible
Remove need to configure from soc/

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Kumar Gala 9eebda6038 soc: arm: beetle: Convert to new dt macros
Convert to using DT_HAS_NODE(DT_NODELABEL()) to determine if a given ip
block is available.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-28 12:22:17 -05:00
Henrik Brix Andersen ac5be4fd08 soc: arm: nxp_kinetis: ke1xf: convert clock ip source code to new DT API
Convert the code for setting the clock IP source of the various IPs
present in the NXP KE1xF SoC series to the new DT API.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-28 10:59:31 -05:00
Anas Nashif 5ed566dda3 soc: apollo_lake: convert older dts macros for i2c
Convert older DT_INST_ macro use the new include/devicetree.h
DT_INST macro APIs

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-04-28 11:40:38 -04:00
Daniel Leung 13ef99831a drivers: gpio: mchp_xec: Convert to using new device tree macros
Convert driver to use the new device tree macro's instead of
dts_fixup.h based macros. This moves us closer to removing both
dts_fixup.h and per instance Kconfig symbols.

The pinmux_mchp_xec is also being updated since it's using DT
from GPIO.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung 5692702248 drivers: pinmux: mchp_xec: Convert to using new device tree macros
Convert driver to use the new device tree macro's instead of
dts_fixup.h based macros. This moves us closer to removing both
dts_fixup.h and per instance Kconfig symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung f59d56b534 drivers: spi: xec_qmspi: Convert to using DT_INST macros
Convert driver to use instance macro's instead of dts_fixup.h based
macros.  This moves us closer to removing both dts_fixup.h and per
instance Kconfig symbols.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Daniel Leung e63f1b278b soc: mec1501: remove ns16550 reg shift macros from dts_fixup.h
These are not used anywhere, so remove them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-04-28 07:43:31 -05:00
Kumar Gala ee255ae548 soc: arm: replace DT_ARM_CORTEX_*_CLOCK_FREQUENCY with new dt macros
Replace DT_ARM_CORTEX_*_0_CLOCK_FREQUENCY with a PATH based reference
to cpu@0 (DT_PATH(cpus, cpu_0)) and than getting the clock_frequency
property:

    DT_ARM_CORTEX_*_CLOCK_FREQUENCY ->
	DT_PROP(DT_PATH(cpus, cpu_0), clock_frequency)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-27 19:38:34 -05:00
Stephanos Ioannidis 0e6ede8929 kconfig: Rename CONFIG_FLOAT to CONFIG_FPU
This commit renames the Kconfig `FLOAT` symbol to `FPU`, since this
symbol only indicates that the hardware Floating Point Unit (FPU) is
used and does not imply and/or indicate the general availability of
toolchain-level floating point support (i.e. this symbol is not
selected when building for an FPU-less platform that supports floating
point operations through the toolchain-provided software floating point
library).

Moreover, given that the symbol that indicates the availability of FPU
is named `CPU_HAS_FPU`, it only makes sense to use "FPU" in the name of
the symbol that enables the FPU.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-27 19:03:44 +02:00
Vincent Wan 2599f705a8 drivers: cc32xx: use DT_INST_FOREACH to reduce code duplication
Use DT_INST_FOREACH macro to combine code used for multiple instances.
Remove unnecessary Kconfig options and dts fixups for GPIO instances.

A side-effect to using DT_INST_FOREACH is that GPIO ports A0 and A3
are now enabled, whereas they were originally disabled by default as
an optimization.

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-04-26 06:05:10 -05:00
Kumar Gala 4d7d3a25c1 boards: arm: sam0: Conver to new dt macros
Convert to using DT_NODELABEL as we phase out the old generated
devicetree macros.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:47:39 -05:00
Kumar Gala 8aeb8a3814 soc: xtensa: rework DT_L2_SRAM and DT_L2_SRAM
Rename DT_L2_SRAM_* to just L2_SRAM_* and set it using new DT macros.
Do something similar for DT_LP_SRAM_* renamed to LP_SRAM_*

Updated the intel_gna driver as it used the DT_L2_SRAM_* defines.

This change also lets us remove dts_fixup.h on intel_s1000 and
intel_apl_adsp SoCs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:32:00 -05:00