Commit graph

1871 commits

Author SHA1 Message Date
Gerard Marull-Paretas 76f0d72e5d drivers: pwm: stm32: add support for polarity
Add support for the polarity flag in the STM32 PWM driver.

STM32 boards using PWM have been updated accordingly.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-06-19 15:18:50 +02:00
Andrzej Głąbek e64f75bae1 dts: nordic: Remove no longer needed peripheral aliases
Aliases defined for peripheral nodes in the nRF SoC definitions were
used in drivers to properly match the hardware instances.
After the drivers were converted to use the new DT API, these aliases
became needless.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-06-18 23:59:40 +02:00
Andrew Boie 87dd0492db x86: add CONFIG_X86_KERNEL_OFFSET
Previously, DTS specification of physical RAM bounds did not
correspond to the actual bounds of system RAM as the first
megabyte was being skipped.

There were reasons for this - the first 1MB on PC-like systems
is a no-man's-land of reserved memory regions, but we need DTS
to accurately capture physical memory bounds.

Instead, we introduce a config option which can apply an offset
to the beginning of physical memory, and apply this to the "RAM"
region defined in the linker scripts.

This also fixes a problem where an extra megabyte was being
added to the size of system RAM.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-06-18 19:35:52 +02:00
Johann Fischer 3f19918041 drivers: ssd16xx: add temperature sensor support
Appropriate WS can be loaded automatically if
the display controller has integrated temperature
sensor or an external sensor is connected.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-06-17 12:31:20 +02:00
Johann Fischer ac19e0f263 drivers: ssd16xx: support to load default WS from OTP
Add support to load default WS from OTP.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-06-17 12:31:20 +02:00
the BASTION 3f5a32a7d4 boards: arm: add ruuvi_ruuvitag
Adds ARM based Ruuvtag baord. This board is based on the nRF52832.

Signed-off-by: the BASTION <thebasti0ncode@gmail.com>
2020-06-17 12:29:41 +02:00
Andrei Gansari 44d32acc43 boards: lpcxpresso55s69 use GPIO as SPI CS
Enable GPIO as a workaround to enable some SPI slaves are not correctly
controlled using the Flexcomm SPI device.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-06-17 08:52:42 +03:00
Francois Ramu 4a04a5b597 dts: arm: stm32l4s5 new supported device
This patch introduces the stm32L4S5xx soc
from STMicroelectronics : based on the stm32l4r5

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-06-16 17:48:31 -05:00
Marcin Niestroj 406a33682a soc: stm32: stm32l0: add stm32l011x4 support
Those MCUs have 2KB RAM and 16KB FLASH memory, but they are still
powerful enough to run small configuration of Zephyr RTOS.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-06-16 19:09:23 +02:00
Mohamed ElShahawi f9e0fa9af3 drivers: esp32/clock_control: support UART, I2C
- Change default CPU Clock to 240MHz
(PLL is activated)
- I2C, UART will use sysclk from clock driver
- esp32_enable_peripheral replaced by
clock_control_on

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2020-06-16 09:00:51 -05:00
Mohamed ElShahawi 4acac3e9ef drivers: esp32/clock_control: Add Clock Driver
- Support PLL for Higher Frequencies 80,160,240 MHz
- Support XTAL Frequencies 26MHz, 40MHz
- Clock Driver can't be disabled, because all of the other drivers
will depend on it to get their operating Frequency based on chosen
clock source (XTAL/PLL).

- Add needed references to BBPLL i2c bus ROM functions.
- Add `rtc` node to Device Tree.
- Since All Peripherals Frequency is depending on CPU_CLK Source,
`clock-source` property added to CPU node

Signed-off-by: Mohamed ElShahawi <ExtremeGTX@hotmail.com>
2020-06-16 09:00:51 -05:00
Abhishek Shah a8a5242249 dts: arm: viper: Add DT node for iProc PCIe EP
dts: arm: Add iProc PCIe EP node in Viper DT

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Signed-off-by: Shivaraj Shetty <shivaraj.shetty@broadcom.com>
2020-06-13 01:35:19 -07:00
Abhishek Shah 455663dbf2 dts: bindings: Add binding for iProc PCIe EP node
Add device tree binding for the iProc PCIe EP present on
Broadcom Valkyrie/Viper SoC series.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-06-13 01:35:19 -07:00
Hake Huang 5582c2f00b dt-bindings: dts/arm/nxp : add MCUX EDMA Support
add MCUX EDMA support for dts binding

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-06-12 13:03:28 -05:00
Ilya Tagunov b899bbf9b9 soc: stm32l1: Enable DAC support
Enable STM32 DAC driver for STM32L1 series.

Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
2020-06-12 11:06:44 +02:00
Francois Ramu 5debc6a94d soc: arm: stm32f2 add rtc feature on this serie
This patch enables the rtc on the stm32f2 soc series
from STMicroelectronics

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-06-10 09:40:21 +02:00
Krzysztof Chruscinski 176d2d9f85 drivers: serial: nrfx_uarte: Use hw-flow-control from device tree
Cleaned up flow control configuration. Added support for using only
cts or only rts.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-06-09 19:06:16 +02:00
Peter Bigot 8e2e7aee51 dts: bindings: combine adc bindings under iio subdirectory
These should have been added in the existing iio/adc subdirectory.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-06-09 10:26:03 -05:00
Andreas Sandberg d4d39f0a43 dts: stm32: Add the RNG peripheral to the STM32L07{2,3}
The STM32L072 and STM32L073 comes with a hardware random number
generator. Add this to the device tree.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-06-09 14:44:25 +02:00
Michael Hope 0882a9cd97 dts: arm: add a name to cpu0
This allows referencing the CPU in the board-specific DTS file.

Also fix warnings by making the addresses lower case.

Signed-off-by: Michael Hope <mlhx@google.com>
2020-06-09 14:29:58 +02:00
Henrik Brix Andersen 8b5b7fcf8d test: lib: devicetree: add tests for DT_ macros for retrieving PWM period
Add tests for DT_ macros for retrieving the 'period' cell value.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-29 14:48:12 +02:00
Francois Ramu 7545b7888a dts: stm32: timer define a new DT binding for LPTIM
Adds a new LPTIM binding for stm32 soc,
based on the timer binding. This will makes a specific filter
on dt_compat_enabled("stm32,lptim")

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-29 14:13:05 +02:00
Martí Bolívar e4a761cffe devicetree: add migration guide documentation and tests
Add test cases that verify various bits and pieces of the legacy
devicetree macros match the new APIs.

Writing these test cases without giving rise to deprecated macro
warnings which might break people's CI if they build with -Werror
requires turning off the __WARN() generation in
devicetree_legacy_unfixed.h. The entire file is deprecated at this
point and must be explicitly enabled with an opt-in Kconfig option, so
there isn't any harm in doing this.

Nevertheless, take a minimally invasive approach to avoiding __WARN()
generation in gen_legacy_defines.py, to avoid the possibility of
breakage. This code is basically frozen anyway, so hacks like this
won't cause maintainability problems since it isn't being actively
maintained.

Use the new tests as fodder for a migration guide from the old API in
the documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-28 22:12:38 +02:00
Martí Bolívar e5418ff5bf doc: devicetree: update binding-template.yaml
Remove some deprecated or obsolete functionality:

- the 'title:' key is now deprecated
- more than 2 levels of child-binding are now supported

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-28 22:12:38 +02:00
Martí Bolívar 930c5807d5 tests: devicetree: test great-grandchild bindings
At some point, "child-binding:" apparently only worked up to 2 levels
deep. That's not the case anymore, but add a regression test to make
sure that doesn't break. 3 levels deep ought to be enough for anyone.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-28 22:12:38 +02:00
Abhishek Shah 681a42fc5a dts: arm: qemu-virt: Modify timer interrupt to be level-sensitive
The interrupts generated by the generic timer behave in
a level-sensitive manner. Change the DT to reflect the same.

Fixes: #25585

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-05-26 16:34:24 +02:00
Martí Bolívar c0fcff9b7d dts: nrf5340_cpuapp: add cryptocell node
Add the missing node and bindings. This is a secure-mapped peripheral,
so do not add it to the common include file
nrf5340_cpuapp_common.dtsi.

Fixes: #25493
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-05-21 20:09:44 +02:00
Abhishek Shah f156057b20 dts: arm: Fix incorrect interrupt cells order
In aarch64 DTs, priority and flags cells have been swapped,
fix the same.

Correct interrupt property per the GIC binding document
looks like:
interrupts = <irq_type irq_num irq_flags irq_priority>;

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
2020-05-21 13:56:00 +02:00
Maureen Helm d9a0dd3967 dts: arm: Add missing adc property for kinetis k8x and kv5x socs
Adds the required #io-channel-cells property to kinetis k8x and kv5x
socs. We are now consistently defining this property for all
nxp,kinetis-adc16 compatible nodes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-05-21 11:01:18 +02:00
Henrik Brix Andersen 784c4728b5 drivers: pwm: mcux_ftm: allow configuring the clock prescaler
Allow configuring the clock prescaler divider for the NXP Kinetis
FlexTimer. Setting the prescaler to a lower value allows for much
higher resolution/accuracy for the generated PWM waveforms.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-20 19:03:14 +02:00
Andrei Gansari 2a75139b7c dts: mikro-bus definition
Adds new Mikro-BUS interface defined by MikroElectronica used
by some expansion boards.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-20 19:02:36 +02:00
Marcin Niestroj a40e8b510d dts: bindings: nordic qspi: fix documentation for writeoc
writeoc is obviously an opcode for writing. Fix that copy-paste type of
bug.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-05-18 19:12:18 +02:00
Christoph Reiter d49e7da7da sensor: add sensor driver for Infineon DPS310
Add driver for Infineon DPS310 temperature and pressure sensor.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2020-05-14 11:02:29 +02:00
Gerard Marull-Paretas b35152ed4b devicetree: add DT_INST_FOREACH_CHILD macro
The macro iterates through the list of child nodes in a DT_DRV_COMPAT
instance and invokes provided macro for each node.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-05-13 21:22:06 +02:00
Kumar Gala df56ce3efb drivers: ethernet: mcux: rework how unique mac is determined
Instead of having a Kconfig property, if there is no local-mac-address
property in the devicetree than we'll generate a unique MAC address
based on unique ID registers on the SoC.

We remove the local-mac-address properties in the SoC dtsi files to
match the default behavior that existed before (ie, unique MAC address)

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-09 16:29:57 +02:00
Kumar Gala ce0d50c2b0 dts: bindings: ethernet: Add zephyr,random-mac-address property
Add definition of zephyr,random-mac-address property that conveys to a
driver to utilize a random MAC address if the driver supports this
feature.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-09 16:29:57 +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
Zide Chen f32eeba925 dts: x86: configure different IO APIC delivery modes for various devices
For HPET devices, configure it with fixed delivery mode because HPET
timer interrupt is needed to fuel the scheduler for all CPUS.

For all other type of devices, like UART, I2C, GPIO, Ethernet, etc.
configure them as lowest priority delivery mode, in which IO APIC
delivers the interrupt to the processor core that is executing at the
lowest priority among all the processors listed in the specified
destination. In this case, the device drivers can avoid the trouble of
handling repeated interrupts delivered to all CPUS.

Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-05-08 22:32:39 -04:00
Anthony Brandon 4aab0464c3 dts: bindings: st,stm32-sdmmc: remove unneeded type
The label property does not need to have its type set
explicitly to string, so remove it.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-05-08 17:49:32 +02:00
Emil Obalski 8d2f13c203 usb: Add USB audio implementation
By this commit USB audio class implementation is introduced
to Zephyr.

The Zephyr USB audio device class follows bellow
documentations:

- Universal Serial Bus specification rev2.0 (usb20.pdf)
- Universal Serial Bus Device Class Definition for Audio Devices
  (audio10.pdf)
- Universal Serial Bus Device Class Definition for Audio Data Formats
  (frmts10.pdf)
- Universal Serial Bus Device Class Definition for Terminal Types
  (termt10.pdf)

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-05-08 15:12:27 +02:00
Johann Fischer 7e95a45222 dts: rename solomon,ssd1673fb.yaml to solomon,ssd16xx.yaml
Rename solomon,ssd1673fb.yaml to more generic solomon,ssd16xx.yaml.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-08 15:11:10 +02:00
Mieszko Mierunski f4a7255677 boards: nordic: Add support for nRF52833dk_nrf52820 board
This commit adds support for nRF52820 development on nRF52833DK.
Changes afffects:
 - Introduce files related to board description.
 - Add blank documentation file (for future update).
 - configuration files for build process.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2020-05-08 15:00:41 +02: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 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
Helge Juul dc0c938359 boards: arm: stm32f746g_disco: enable sdmmc support
Update dtsi and pinmux macros for stm32f7 family. Add sdmmc1 to dts file
for stm32f746g_disco. Also add board specific configuration file for
fat_fs sample.

Signed-off-by: Helge Juul <helge@fastmail.com>
2020-05-08 10:53:10 +02:00
Anthony Brandon a71f77e601 boards: arm: stm32l496g_disco: enable sdmmc support
Update the dtsi for stm32l471 (which the higher SoCs are based on) to
support the stm32-sdmmc disk access device. Enable the device for the
stm32l496g_disco board, and update the pinmuxing.
Note that the stm32l496g_disco board also has a card detect gpio
(MFX_GPIO8), but this is not supported yet. When not specified the
driver will assume a card is present.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-05-08 10:53:10 +02:00
Anthony Brandon 631cad428b disk: add stm32 sdmmc disk access driver
Add a disk access driver for the stm32 sdmmc component. The driver is
based around the stm32 cube HAL and uses the blocking API.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
2020-05-08 10:53:10 +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 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 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 25ac59685f dts/arm/st: Add l5 device tree basics and stm32l552x socs
Add l5 secure and non secure device tree files

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-05-08 00:34:34 -05:00
Johann Fischer 8f983c3654 drivers: ieee802154: add Decawave DW1000 driver
Add initial support for Decawave DW1000
IEEE 802.15.4-2011 UWB transceiver.

Driver has basic functionality. Additional functions such
as reading out timestamps and delayed TX were implemented
for test purposes, but also require support in the 802154
subsystem.

Register, sub-register, and defaults defines in the file
ieee802154_dw1000_regs.h are taken from the Decawave's
DW1000 driver for the Mynewt OS.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-05-07 23:30:58 -05:00
Andrei Gansari bfbbf92ad5 dts: nxp,lpc-rng binding and lpc55xxx RNG node
Binding used for LPC random number generator hardware.
Describes RNG device node in LPC5xxx SoCs device tree peripherals.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Francois Ramu a08e262fa6 dts: arm: stm32wb: configure DMA and DMAMUX
This patch enables the DMA and DMAMUX on the stm32wb55x.
The DMAMUX has 14 channels.

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 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
Kumar Gala 49bab484df drivers: dma: sam_xdmac: Convert to devicetree
Convert sam_xdmac driver to utilize devicetree.  As part of the
controller binding we specify that dmas should contain a channel and the
perid for the DMA transaction.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-05-07 22:24:58 -05:00
Peter A. Bigot e444274e95 drivers: counter: add Maxim DS3231 support
The DS3231 is an I2C real-time clock with internal temperature
compensated oscillator, maintaining civil time to 1 s precision with
nominal 2 ppm accuracy from 0-40 Cel.

The basic functionality is exposed as a counter that is always running
at 1 Hz.  Much more functionality is exposed as driver-specific API,
including the ability to translate between the time scale of the DS3231
and the time scale of the Zephyr uptime clock.  This allows correlation
of events in the system clock to UTC, TAI, or whatever time scale is
used to maintain the DS3231.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-07 19:45:06 +02:00
Andrzej Głąbek 8ee12207ff drivers: flash: Add driver for AT45 compatible SPI flash chips
Add a driver that can handle several instances of AT45 family chips,
which are enabled by specifying DT nodes for them with the "compatible"
property set to "atmel,at45" and other required properties like JEDEC
ID, chip capacity, block and page size etc. configured accordingly.

The driver is only capable of using "power of 2" binary page sizes in
those chips and at initialization configures them to work in that mode
(unless it is already done).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-05-07 14:51:10 +02:00
Peter A. Bigot 99495af802 dts: gpio: add Particle Gen3 header binding
This header is physically related to the Adafruit Feather, but uses a
different pin numbering and exposes a slightly different set of pins.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-07 14:49:49 +02:00
Peter A. Bigot 6b04499331 dts: bindings: add particle vendor identifier
Supports the Particle Gen3 feather header nexus map.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-05-07 14:49:49 +02:00
Alex Porosanu b1236954e8 boards: frdm_kw41z: enable PWM support
Once the TPM driver and the required configs have been added,
now this patch enables the usage of the PWM framework on KW41Z
SoCs. As such, the DTS gets the proper nodes and the pinmuxing
is done according to the configuration requested.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2020-05-06 11:33:37 -05:00
Alex Porosanu f4c36b7beb drivers: pwm: add driver for NXP Kinetis TPM module
The TPM (Timer/PWM Module) is a 2- to 8-channel timer which supports
input capture, output compare, and the generation of PWM signals to
control electric motor and power management applications.

This patch adds the driver and the binding necessary for instantiating
the driver. The work is based on the RV32M1 driver for TPM done by
Henrik Brix Andersen. A later patch will enable this driver to be used
for the KW41Z SoC, if PWM support is requested.

Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
2020-05-06 11:33:37 -05:00
Pauli Salmenrinne 30003ffb86 drivers: serial: stm32: Support for parity in DTS for STM32 uart.
Add support for devicetree property 'parity' for stm32 serial devices.

Signed-off-by: Pauli Salmenrinne <susundberg@gmail.com>
2020-05-06 11:00:12 -05:00
Pete Johanson 91d6139338 boards: arm: nucleo_wb55rg: Enable USB for stm32wb.
* Define USB driver for base stm32wb device.
* Enable USB for the nucleo_wb55rg board.
* Properly initialize USB power + clock for the platform.

Signed-off-by: Pete Johanson <peter@peterjohanson.com>
2020-05-06 10:46:23 -05:00
Henrik Brix Andersen 25cf045b79 dts: arm: nxp: lpc55S1x: add hs_lspi device node
Add high-speed SPI controller device node to the NXP LPC55S1x SoC
series devicetree.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-05 17:03:29 -05:00
Henrik Brix Andersen b782b2b7c6 dts: arm: nxp: lpc55S1x: include I2C devicetree header
Include the I2C devicetree header in the NXP LPC55S1x SoC series
devicetree.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-05 17:03:29 -05:00
Henrik Brix Andersen 521b28ecb4 dts: arm: nxp: lpc55S1x: fix interrupts properties for GPIO nodes
Fix the interrupt properties for GPIO nodes for the NXP LPC55S1x SoC
series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-05 17:03:29 -05:00
Francois Ramu 5d57404c54 dts: bindings: dma add support for dmamux controller
This patch introduces the periph to/from memory dma transfer
using the dmamux feature and define new values
for dma cells on client side

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-05 11:51:25 -05:00
Henrik Brix Andersen ea61a6e3fd dts: bindings: add gpio-i2c devicetree binding
Add devicetree binding for GPIO bit banging I2C controller.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-05-05 10:17:23 -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 d2cd8a71bd dts: arm: atmel: Add MPU node for SAM D5x and E5x
The Atmel SAM D5x and E5x series SoCs include the ARM memory protection
unit that supports up to 8 memory regions.

This commit adds the missing device tree MPU node to `samd5x.dtsi`,
which is used by both the SAM D5x and E5x series SoCs.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-05-04 17:14:35 +02:00
Francois Ramu 28ff24d0ac dts: arm: stm32l4: configure dma instances
This patch is defining the DMA1 & 2 for the sm32l4 series
with 7 channels and support of mem2mem transfers

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-04 09:46:07 -05:00
Francois Ramu 4c5d9da02e dts: bindings: define the bindings for SPI dma client on stm32 series
This includes the dma cells as client for the spi
An example of the client part is defined in the dma.yaml
Consequently, bindings for the dmas property becomes then 'not required'
Including dma.yaml is not needed as dma properties
are now part of base.yaml

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2020-05-04 09:46:07 -05:00
Henrik Brix Andersen f66d2fdd83 dts: nxp: k6x: add device tree node for DAC0 and DAC1
Add device tree nodes for the Digital-to-Analog (DAC) modules present
in the NXP Kinetis K6x series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen 6f05ecfb48 dts: bindings: add NXP Kinetis DAC binding
Add device tree binding for the NXP Kinetis Digital-to-Analog
converter module (DAC).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen 44144a2efe dts: nxp: ke1xf: add device tree node for DAC
Add device tree node for the Digital-to-Analog (DAC32) module present
in the NXP Kinetis KE1xF series.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen 1a2e87e3c8 dts: bindings: add NXP Kinetis DAC32 binding
Add device tree binding for the NXP Kinetis Digital-to-Analog
converter module (DAC32).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 12:35:50 -05:00
Henrik Brix Andersen a5d7946a73 dts: arm: nxp: add initial LPC55S16 devicetree
Add initial devicetree for the NXP LPC55S16. Only non-secure (ns)
access is supported for now.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-05-01 10:11:01 -05:00
Henrik Brix Andersen 9ceb29ac56 dts: introduce shared binding for the NXP FlexTimer
Do not assume in the SoC level device trees that NXP Kinetis FlexTimer
nodes will always be configured as PWM. Instead, configure FlexTimer
nodes for PWM at the board level for NXP Kinetis boards.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-04-30 08:28:48 -05:00
Kumar Gala 689f93bc33 devicetree.h: pwms: Add DT_PWMS_ macros
Add DT_PWMS macros to be used in pwm clients drivers.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 13:11:22 -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
Kumar Gala a918d301fe drivers: adc: adc_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree.

We add a property ('calib-offset') for the SAM{D,E}5x family of SoCs
that is the bit position offset from ADC0 BIASCOMP in the NVM Software
Calibration Area Mapping.  For ADC0 this is typically 0 and for ADC1
this will be 14.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-29 08:02:36 -05:00
Erwan Gouriou 46649f9224 dts/bindings: st,stm32-can: Add optional master-can property
In STM32 can driver CAN2 instance need to know the base address
of CAN1 instance which is referenced as master can.
Add this information as an optional property to stm32 can binding.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-04-28 14:49:55 -05:00
Wayne Ren 21e9ee75d9 board: iotdk: disable unused peripherals in dts
By defaut, only one uart is used as console.
Disable unused peripherals in dts to avoid
conflicts (issue #23475), save memory footprint,
and reduce the boot time.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
2020-04-28 11:53:46 -05: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
Gerson Fernando Budke c755821608 drivers: ieee802154: rf2xx: Add local-mac-address
Add local-mac-address on DT and enable it on rf2xx driver. If user
define local-mac-address this value will be used as default mac address.
Otherwise driver automatically add a random mac address.

On application level user can change default mac address using net_mgmt
command with NET_REQUEST_IEEE802154_SET_EXT_ADDR parameter defined on
include/net/ieee802154_mgmt.h header.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-04-28 10:30:55 +03:00
Kumar Gala 7a15afc1d4 drivers: flash: replace DT_FLASH_DEV_NAME with DT macro
Replace DT_FLASH_DEV_NAME with DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL.
We now set zephyr,flash-controller in the chosen node of the device
tree to the flash controller device.

NOTE: For a SoCs with on die flash, this points to the controller and
      not the 'soc-nv-flash' node.  Typically the controller is the
      parent of the 'soc-nv-flash' node).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-27 18:43:20 -05:00
Alexandre Bourdiol 18a21920e4 dts\arm\st\g4: Fix ADC instances naming
ADC instances start with ADC_1
Fixes #24718

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-04-27 17:06:23 +02:00
Kumar Gala 8eafcc32db drivers: counter: sam0_tc32: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks from devicetree.  Move the prescaler setting
from Kconfig to devicetree as well.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:33:56 -05:00
Kumar Gala fe573b6e23 dts: atmel: sam0: Add clocks for ADC and TCn devices
Add clock references for ADC and TC devices.  Update the bindings for
these devices to require clocks property and update the dtsi files to
have the clock info.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 13:33:56 -05:00
Kumar Gala aa63b07019 drivers: spi: spi_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-spi binding for dma to replace the rxdma and txdma
properties with proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:30:16 -05:00
Kumar Gala b8ade7856d drivers: i2c: i2c_sam0: rework devicetree support
Rework the devicetree to utilize new DT_INST macros and extract per
instance data for clocks and dma from devicetree.  We update the
atmel,sam0-i2c binding for dma to replace the dma property with
proper 'dmas' property.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:30:16 -05:00
Kumar Gala cb8ee73692 dts: atmel sam: Add pinctrl support for SAM SPI
Add pinctl support for the SAM SPI device.  We update the SPI
binding to have pinctrl-0 bindings that are expected to have
at least phandles for MISO, MOSI, and SPCK, but might also have
various chip selects as well.

The pinctrl nodes will have an 'atmel,pins' property that describes the
GPIO port, pin and periphal configuration for that pin.

We update sam*-pinctrl.dtsi files with all the various pin ctrl
configuration operations supported by the given SoC family.  These
files are based on data extracted from the Atmel ASF HAL
(in include/sam<FAMILY>/pio/*.h).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-25 09:29:54 -05:00
Martí Bolívar 644f9ecbf0 dts: nordic: introduce wdt0 / wdt1 distinction
Add wdt0 node labels for all watchdogs. Keep the existing wdt node
labels in place for backwards compatibility.

Add a wdt1 node to the nRF5340 application core .dtsi, but leave it
disabled. Leave the wdt node's label set to "WDT" on this core for
backwards compatibility also, in case any users are getting it with a
string literal instead of asking the devicetree. This can be changed
later after this round of watchdog changes has been shaken out and
tested more.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-04-24 19:35:41 +02:00
Kwon Tae-young 15ed490df0 dts: arm: st: Add support for stm32l433Xb
Add support for the STM32L433Xb SoC.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-04-24 06:36:35 -05:00
Stephanos Ioannidis 845d8852a5 dts: arm: atmel: samd5x: Fix CPU compatible
The SAM D5x and E5x series SoCs include the "Cortex-M4F" core, not the
FPU-less "Cortex-M4" core.

This commit fixes the incorrect CPU compatible for the SAM D5x and E5x
SoCs (note that this file is included by `same5x.dtsi`, which is used
as the base device tree header for the SAM E5x series).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-04-24 06:27:58 -05:00