Commit Graph

1939 Commits

Author SHA1 Message Date
Simon Glass 49f2167974 emul: i2c: Add support for I2C emulators
Add an emulation controller which routes I2C traffic to attached
emulators depending on the I2C address selected. This allows drivers
for I2C peripherals to be tested on systems that don't have that
peripheral attached, with the emulator handling the I2C traffic.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-01 14:30:46 -04:00
Mulin Chao 288e35ab1a driver: uart: add wake-up support for uart device.
This CL configures the UART wake-up event triggered from a falling edge
(START condition) on CR_SIN pin. It also includes:

1. Introduce wui_maps property in yaml file to present relationship
   between Wake-Up Input (WUI) and UART device.
2. Implement wake-up mechanism by MIWU api functions.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-09-01 13:35:25 +02:00
Mulin Chao 6deb68a517 driver: gpio: add gpio driver support in NPCX series
Add gpio support for Nuvoton NPCX series. This CL includes:

1. Add GPIO device tree declarations.
2. Introduce wui_maps property in yaml file to present relationship
   between Wake-Up
   Input (WUI) and 8 IOs belong to the device.
3. Zephyr GPIO api implementation.
4. GPIO callback functions implementation with MIWU api functions.
5. Overlay file for gpio basic tests

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-09-01 13:35:25 +02:00
Mulin Chao 84d90e456a driver: intc: add MIWU driver support in NPCX series.
The device Multi-Input Wake-Up Unit (MIWU) supports the embedded
controller (EC) to exit 'Sleep' or 'Deep Sleep' power state which allows
chip has better power consumption. Also, it provides signal conditioning
such as 'Level' and 'Edge' trigger type and grouping of external
interrupt sources of NVIC. The NPCX series has three identical MIWU
modules: MIWU0, MIWU1, MIWU2. Together, they support a total of over 140
internal and/or external wake-up sources.

In this CL, we use device tree files to present the relationship bewteen
MIWU and the other devices in different npcx series. For npcx7 series,
it include:
1. npcx7-miwus-int-map.dtsi: it presents relationship between MIWU group
   and NVIC interrupt in npcx7. Please notice it isn't 1-to-1 mapping.
2. npcx7-miwus-wui-map.dtsi: it presents relationship between input of
   MIWU and its source device such as gpio, timer, eSPI VWs and so on.

This CL also includes:
1. Add MIWU device tree declarations.
2. MIWU api function declarations and implementation to configure signal
   conditions and callback function mechanism. They can be be classified
   into two types. One is for GPIO which connects original gpio callback
   implemetation and the other is for generic devices such as timer,
   eSPI, and so on.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-09-01 13:35:25 +02:00
Alexandre Bourdiol e141b77ca0 dts: arm: st: add interrupts property to rng node
Need to add interrupts property for stm32 rng rework

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-09-01 13:31:38 +02:00
Andrzej Głąbek c519184211 soc: nordic_nrf: Add definition of nRF52805 SoC
Add definition of the nRF52805 SoC together with the corresponding
dts files.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-08-31 15:40:19 +02:00
Ryan Erickson eca8842b67 drivers: modem: add Sierra Wireless HL7800 Modem Driver
The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the
normal handling of IP packets, and instead uses a socket-like
UART interface to handle incoming and outgoing data via AT commands.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-08-31 10:46:33 +02:00
Mahesh Mahadevan f75f8bec20 MXRT600: Add DMA support
Add DMA support for MCUX LPC SoC's

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-08-28 14:24:21 -05:00
Maxime Bittan 808e9b1d58 boards: arm: faze: add ASM2364 node
This commit adds a node for the ASMedia 2364 controller that acts as an
I2C master on the I2C0 bus. This node contains the GPIO used by the MCU
to notify the ASM2364 that data are available to read.

Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-08-28 16:36:19 +02:00
Simon Guinot 4f591e5a8a dts: add binding for TI LP503x LED controllers
This patch adds a DTS binding for the Texas Instruments LP5030 and
LP5036 I2C LED controllers. They are respectively providing up to 30
and 36 channels (i.e. 10 or 12 RGB LEDs).

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-08-28 15:04:35 +02:00
Simon Guinot 9d729acc37 dts: introduce binding for LED controllers
The led-controller DT binding gathers some common properties for LED
controllers and for the LED child nodes.

One notable property is "color-mapping" which allows to define a channel
to color mapping for multicolor LEDs.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
2020-08-28 15:04:35 +02:00
Laurent Meunier ea491b3a9f dts: bindings: Add optional timings capability
By default the I2C timing (I2C_TIMINGR register) of I2C V2 peripheral is
computed depending on clocks at runtime with relatively low precision.

This optional property allows to provide a list of pre-computed values
(typically computed from STM32CubeMX SW tool) instead of using runtime
algorithm.

The precomputed value is only valid for a given clock configuration and
I2C speed setting, so this valid configuration is provided with each
value entry.

Signed-off-by: Laurent Meunier <laurent.meunier@st.com>
2020-08-28 11:36:58 +02:00
Peter Bigot 77aa89bcb5 drivers: flash: remove W25QXXDV driver
The spi_flash_w25qxxdv driver has been superseded by the generic
spi_nor driver for over a year.  The only non-refactoring change to
the W25Q driver in the last 18 months was done to support a backport
to 1.14.

All devices supported by spi_flash_w25qxxdv driver are expected to be
supported by the spi_nor driver, using the standard `jedec,spi-nor`
devicetree compatible.  No in-tree devicetree files make use of this
driver.

Remove the confusion about which driver to select by removing the
unmaintained redundant driver.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-27 17:39:21 +02:00
Alexandre Bourdiol 5ae149a17b board: arm: nucleo_f207zg: add DAC support
Add DAC support to nucleo_f207zg:

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-27 16:06:34 +02:00
Pawel Sagan cc30fb871b drivers: i2s: Add LiteX I2S controller driver
This introduces LiteX I2S driver supporting the following features:
    - 8,16,24,32 bit sample width,
    - mono/stereo sound,
    - different sample frequencies
    - big/little-endian data format,
    - concatenated channels mode (for selected sample widths only),
    - slave/master mode operation.

Signed-off-by: Pawel Sagan <psagan@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-08-26 08:17:42 -04:00
Martin Jäger ca92d2eb8c dts: stm32g4: Fix TIM8 clock enable register
PWM driver didn't work because clock was not enabled.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-08-26 12:33:07 +02:00
Henrik Brix Andersen c9de28d5e4 dts: bindings: add Xilinx Quad SPI devicetree binding
Add devicetree binding for the Xilinx Quad SPI v3.2 IP.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Kwon Tae-young 2aeed81202 drivers: dac: Added driver for TI DACx0508
TI's DACx0508 is a DAC chip that supports SPI.
Gain and Reference can be set through the register.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-08-26 12:24:43 +02:00
Ioannis Glaropoulos 00a4da1d99 dts: nordic: nrf5340_cpunet: fix number of MPU regions on Network MCU
In the SoC that comes on the nRF5340 DK the number of MPU
regions in the nRF5340 Network MCU is 8, instead of 16. We
fix this in DTS by introducing different .dtsi headers for the
different SoC part variants: the nrf340 Engineering A (first
SoC revision, present in the nRF5340 PDK) and the nrf5340
(second SoC revision, present on nRF5340 DK).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-08-25 09:33:31 +02:00
Jamie McCrae 4cf1832fa8 drivers: sensors: sm351lt: Add new driver
Adds sm351lt magnetoresitive sensor driver.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2020-08-24 16:48:47 -05:00
Peter Bigot c789ea87ef dts: nordic,nrf-twim: rename non-hardware property
As a general rule devicetree properties should correspond to hardware
description or configuration.  In cases where a Zephyr driver receives
instance-specific configuration data from a devicetree property that
property should be marked as being Zephyr-specific.  Rename
concat-buf-size to zephyr,concat-buf-size to follow this guideline.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-24 16:35:29 -05:00
Peter Bigot afdb98a4a9 drivers: i2c_nrfx_twim: restore previous behavior without concat buffer
The Nordic TWIM peripheral generates a start condition for each bus
transaction.  Devices such as the SSD1306 display and some NXP sensors
can only tolerate the presence of a start condition and device address
after a stop condition.  Those devices will not operate correctly when
these signals are observed while the bus is already active.  This
motivated the addition of a RAM buffer into which message fragments
could be collected so TWIM can transmit them without injecting
unnecessary start conditions.

However many I2C devices interpret these signals as a repeated start
and ignore them and so function properly without a buffer
concatenating the message fragments.

There is no default for the concat-buf-size property, and the previous
strict requirement for one when performing scatter/gather I/O
transactions broke working drivers for devices that tolerate the
repeated starts.  Allow those drivers to work by respecting the
property description and attempting to concatenate messages only if a
buffer in which to place them has been provided.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-24 16:35:29 -05:00
Mahesh Mahadevan fe2b393fff MXRT600: Add support for SPI
Enable access to the arduino pins on the mxrt600 evk board

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-08-24 16:19:12 -05:00
Andrei Emeltchenko 58b7c875ff soc: intel_apl_adsp: Add mailbox to the board
Add mailbox to the board DTS.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-08-24 13:38:33 -04:00
Andrei Emeltchenko 198709245f dts: Add intel ADSP mailbox bindings
Add bindings for ADSP mailbox.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-08-24 13:38:33 -04:00
Hake Huang 93efb9a8f4 dts: enable pit0 in k6s device tree
enable pit0 in NXP k6s

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-08-21 14:27:59 -05:00
Hake Huang 5382673bea counter: add pit in k8s board support
enable frdm_k82f with pit counter driver
this driver can be used as period hardware trigger

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-08-21 14:27:59 -05:00
Hake Huang 7fb938710b dts: add pit as counter
add dts for kinetis pit counter driver

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2020-08-21 14:27:59 -05:00
Timo Dammes 751efe1f6d drivers: uart_gecko: added support for hardware flow control
Added support for hardware flow control in EFM32 UART driver.

Signed-off-by: Timo Dammes <timo.dammes@lemonbeat.com>
Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
2020-08-19 11:33:39 -05:00
Peter A. Bigot 810920f8d5 drivers: flash: spi_nor: read erase support and page size from SFDP
Use the new SFDP infrastructure to read the supported erase type sizes
and commands from the Basic Flash Parameters block.  This removes the
need for explicit reference to most block sizes from this driver.

We're also seeing devices where the page size is not 256 bytes.
Accommodate them.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Peter A. Bigot d316f9d907 dts: mtd: jedec,spi-nor-common: make some properties optional
With SFDP support we no longer need to get the JEDEC ID or device size
from devicetree.  Make them optional in drivers that have been
converted to support SFDP.  When runtime SFDP is not enabled the
presence of the required properties will be verified at build-time.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Peter A. Bigot d213706e99 dts: mtd: jedec,spi-nor: support SFDP Basic Flash Parameters
Allow the devicetree binding for a jedec,spi-nor device to provide the
device capabilities by encoding the Serial Flash Discoverable
Parameters Basic Flash Parameters table in the devicetree node.  This
supports applications where a specific flash device will be used and
runtime discovery of device capabilities is not desired.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-08-17 13:38:14 -04:00
Manivannan Sadhasivam 0533d4eae1 drivers: serial: Add NXP IUART driver
Add IUART driver based on MCUX SDK. This driver is used to provide
serial console support on i.MX8M Mini SoC.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-08-14 14:51:50 -05:00
Manivannan Sadhasivam 8ab4d7d53e dts: arm: nxp: Add i.MX8M Mini devicetree support
Add devicetree support for NXP i.MX8M Mini SoC for utilizing cortex M4
core.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-08-14 14:51:50 -05:00
Henrik Brix Andersen d8b5a81c67 dts: bindings: gpio: add bindings for Xilinx AXI GPIO IP
Add devicetree bindings for the Xilinx AXI GPIO v2 IP. This GPIO
controller has an optional "GPIO2" port, which is not always present.

The Xilinx specific devicetree property names and their meaning match a
subset of what can automatically be generated based on the FPGA logic
design using https://github.com/Xilinx/device-tree-xlnx. These
properties are also used by the Linux kernel.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen a3758eceae dts: bindings: serial: add devicetree binding for the Xilinx UART Lite IP
Add devicetree binding for the Xilinx UART Lite IP.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen 8c8d2d4b40 dts: bindings: arm: itcm: add devicetree binding the ARM ITCM
Add devicetree binding for the ARM Cortex-M Instruction Tightly Coupled
Memory (ITCM).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen 12205abd53 dts: bindings: arm: dtcm: ARM DTCM is not Cortex-M7 specific
Change the documentation for the arm,dtcm (Data Tightly Coupled Memory)
to reflect that it is not specific to the Cortex-M7 (but also present
on e.g. the Cortex-M1).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Henrik Brix Andersen 661f2d49f2 dts: bindings: add devicetree binding for the ARM Cortex-M1 CPU
Add devicetree binding for the ARM Cortex-M1 CPU.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-14 13:35:39 -05:00
Richard Osterloh 9377bdb6a8 dts: st: Define spi3 on stm32l43x devices
Define SPI3 for stm32l432 devices and consequently for stm32l433

Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
2020-08-14 18:02:28 +02:00
Erwan Gouriou c44515bab6 dts: stm32h7: Fix number of mpu regions
On stm32h7 series, there are up to 16 mpu regions.


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-08-14 13:34:00 +02:00
Mulin Chao cd296f41a3 boards: arm: npcx7m6fb_evb: Add npcx7m6fb_evb board
Skeleton board support for the npcx7m6fb evaluation board from Nuvoton
Technology. This CL also includes:

1. Add ecst python scripts to append the header used by NPCX ROM.
2. Add openocd configuration scripts for "west flash".
3. Add monitor FW binary file for programing/verifying embedded flash
   in NPCX series.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Mulin Chao 1162747574 driver: serial: Add UART support in NPCX series.
Add UART support for Nuvoton NPCX series. This CL includes:

1. Add UART controller device tree declarations.
2. UART controller driver implementation.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Mulin Chao 9cb73abbdc driver: pinctrl: Add pin control support in NPCX series.
Add pin controller support for Nuvoton NPCX series
Add pin-mux controller support for Nuvoton NPCX series.

This CL includes:
1. Add pin controller device tree declarations and introduce alt-cells
   to select pads' functionality.
2. Add npcx7-alts-map.dtsi since the mapping between IO and controller
   is irregular and vary in each chip series.
3. Add nuvoton,npcx-pinctrl-def.yaml and its declarations to change all
   pads' functionality to GPIO by default.
4. Pinmux controller driver implementation.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Mulin Chao 0245a27bc5 driver: clock: Add clock controller support in NPCX series.
Add clock controller support for Nuvoton NPCX series. This CL includes:

1. Add clock controller device tree declarations.
2. Introduce clock-cells in yaml file clock tree to get module's source
clock and turn off/on the its clock
3. Clock controller driver implementation.

Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Mulin Chao ec50b1846f soc: arm: Add Nuvoton NPCX7M6FB SoC
Initial support for Nuvoton NPCX7M6FB SoC of NPCX series which is a chip
family of embedded controllers (EC) and targeted for a wide range of
portable applications. We implemented the SoC skeleton in
soc/arm/nuvoton_npcx since there're many chip families in Nuvoton and
aim to different markets such as PC, General MCU, and Audio. The
architectures and hardware modules are different between them. Hence, we
suggest using the company name plus with chip series for better
understanding.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2020-08-13 16:42:20 +02:00
Pawel Sagan 137d1d78b1 dts: riscv: Fix a label in litex-vexriscv DTS
This commit fixes a wrong "serial@e0002800" label
in riscv32-litex-vexriscv.dtsi.

Signed-off-by: Pawel Sagan <psagan@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-08-12 16:40:07 -05:00
Gerard Marull-Paretas ca9dce0d7d drivers: kscan: generalize and improve FT5336 driver
The FT5336 driver has been improved and generalized so that multiple
Focaltech touch controllers can be supported using the same single
driver. According to specifications the following list of controller
variants should be supported: FT5x06, FT5606, FT5x16, FT6x06, Ft6x36,
FT5x06i, FT5336, FT3316, FT5436i, FT5336i and FT5x46.

Tested using ER-TFTM028-4 display module (FT6X06).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-12 12:35:04 +02:00
Steven Lemaire fc64f2c522 drivers: watchdog: gecko: Add support for Gecko Series 2 SoC
The EFR32MG21 uses a different kind of clock for watchdogs.
It requires an additional peripheral-id parameter in the dts to get the
proper clock as it is based on the watchdog's ID i.e., cmuClock_WDOG#.

Signed-off-by: Steven Lemaire <steven.lemaire@zii.aero>
2020-08-06 11:49:16 +02:00
Steven Lemaire 3ae6c67771 soc: silabs_exx32: Add support for SiLabs EFR32MG21 SoC
This commit adds support for Silicon Labs EFR32MG21 (Mighty Gecko) SoC.

Signed-off-by: Steven Lemaire <steven.lemaire@zii.aero>
2020-08-06 11:49:16 +02:00