Commit graph

299 commits

Author SHA1 Message Date
Fabio Baltieri bd5ea8d552 dts: ite: move pinctrl subdevices up a node
Refactor the pinctrl nodes slightly so that the port devices are not
child of the main pinctrl node. This is because the pinctrl node is
being used as parent for pinctrl setting nodes itself, and having the
port nodes as child end up creating a circular depdency with the edt
child enumeration patch.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-10-25 18:39:31 -07:00
Kevin Wang d3a73cdb0e drivers: dma: Add Andestech atcdmac300 driver.
Support the Andes atcdmac300 dma driver.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-10-20 14:51:08 +02:00
Yong Cong Sin 93cbfcfee9 board: riscv: qemu: increase ndev of PLIC to 1024
Increase the `ndev` of PLIC to the max of 1024 from 53, as
supported by the RISCV PLIC. The total number of IRQs is now
1035(1024 + 11), up from 64(53 + 11).

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-05 06:10:06 -04:00
Yong Cong Sin 39433f0669 drivers: intc: plic: define all registers' offset in the driver
Define all the register offset directly in the driver according
to the RISCV PLIC specification as they are not configurable,
see: https://github.com/riscv/riscv-plic-spec.

Updated devicetrees that has PLIC accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-10-04 09:06:28 -04:00
Tim Lin 6552e05100 ITE: dts: it8xxx2: Correct the clock frequency of baud rate
The baud rate clock frequency is 1.8432MHz.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-10-03 18:26:45 +01:00
Henrik Brix Andersen 9783ed56d9 dts: bindings: can: deprecate the sjw and sjw-data properties
Update the descriptions for the various CAN devicetree timing properties
specified in Time Quanta (TQ) to make it clear that these, if present, are
only used for the initial timing parameters.

Deprecate the (Re-)Synchronization Jump Width (SJW) devicetree properties
for both arbitration and data phase timing as these are now only used in
combination with the other TQ-based CAN timing properties, which are all
deprecated.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-09-28 16:28:56 +02:00
Tim Lin dca9cbff08 ITE: drivers/pinctrl: Add alternate function additional setting
When the alternate setting is configured as func3, in addition to
the setting of func3-gcr, some pins require external setting.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-09-25 09:48:57 +02:00
Franciszek Zdobylak 3975b4596f dts: riscv: niosv: Fix status string
Change malformed status string "disable" -> "disabled".

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-09-19 15:23:36 +01:00
Yong Cong Sin 5b9f82668b riscv: telink_b91: fix compilation
Fix compilation failure due to multilevel interrupt.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-09-18 13:03:45 -04:00
Filip Kokosinski 806c95163a dts/riscv: add missing riscv,isa fields and modify existing ones
This commit adds/modifies `riscv,isa` strings using the following rules:
* the ISA string is lowercase
* multi-letter extensions are preceded with the underscore mark
* if an extension is implied by another one, it is not specified - e.g. the
  D extension implies the F extension, so writing `rv32ifd` is redundant

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-09-14 14:34:34 +02:00
Tim Lin 159fa4888b ITE: drivers/i2c: Channel C/i2c2 cannot use FIFO mode
Sometimes, channel C may write wrong register to the target device.
This issue occurs when FIFO2 is enabled on channel C. The problem
arises because FIFO2 is shared between channel B and channel C.
FIFO2 will be disabled when data access is completed, at which point
FIFO2 is set to the default configuration for channel B.
The byte counter of FIFO2 may be affected by channel B. There is a
chance that channel C may encounter wrong register being written due
to the FIFO2 byte counter wrong write after channel B's write operation.

The current workaround is that channel C cannot use FIFO mode.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-08-04 10:45:48 +02:00
Kevin Wang 3744fe2d49 drivers: mbox: Add Andestech mailbox driver
Support the Andes mailbox driver via software plic.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-07-26 10:51:41 +02:00
Marek Matej e033bf6e7a dts: riscv: esp32c3 rework soc/sip list
Introduce dtsi files representing the
current portfolio of chips and modules
based on the:

- flash size
- psram size
- gpio count
- certification status

Update the boards dts files according
to which SOC/SIP they are using.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Gerard Marull-Paretas e4c43e4cc9 pm: power-states node needs to be a child of cpus
This again aligns with Linux.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-07-25 09:16:14 +02:00
Gerard Marull-Paretas 5eee169cf0 dts: riscv: espressif: esp32: move power-states to soc dts files
CPU idle states are not board specific. This patch moves ESP32 idle
states to the core SoC dts files. Board can always tweak some state
parameters (if needed), but the definition belongs to core SoC dts
files, same as e.g. peripherals.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-07-25 09:16:14 +02:00
Jimmy Zheng ca72a0a47f dts: riscv: andes_v5: update andes_v5_ae350.dtsi
Fix mtimer lack of interrupts-extended and make syscon compatilbe to
atcsmu100.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2023-07-17 10:10:31 +00:00
Dino Li fa49f77973 drivers/crypto/it8xxx2: add support for SHA256 hardware accelerator
Add SHA256 accelerator support for it8xxx2 series.

This driver passes the following test:
tests/crypto/crypto_hash/

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2023-07-07 09:24:47 +02:00
Kevin Wang a9955d3e17 drivers: watchdog: Add Andestech ATCWDT200 driver.
Support the Andes atcwdt200 watchdog driver.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-06-29 10:13:05 +00:00
Manojkumar Subramaniam 80fda53492 dts: riscv: add a initial SoC dtsi for Efinix Sapphire SoC
Sapphire SoC from Efinix

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2023-06-27 12:09:57 +00:00
Conor Paxton ea42995f2e dts: riscv: introduce PolarFire SoC I2C interface
Add support for Microchip's PolarFire SoC I2C interface
Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2023-06-23 12:31:36 -04:00
Khor Swee Aun ad6bf7f456 dts: riscv: Add dts support for INTEL Nios V/g
Add basic dts support for INTEL Nios V/g General Purpose Processor.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-06-17 07:34:05 -04:00
Tyler Ng 1c4889e402 dts: riscv: lowrisc: Add pwrmgr node to OpenTitan Earlgrey devicetree
Adds the pwrmgr devicetree node. This is a simple binding that holds
only the address of the registers for now.

This patch is part of the OpenTitan watchdog (AON Timer) support patch
series. It is needed to ensure that the watchdog reset functionality
is enabled.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
Tyler Ng ae350a9c77 boards: riscv: opentitan_earlgrey: Add the OpenTitan AON Timer
Adds the AON Timer device in the OpenTitan Earlgrey device tree.
Adds overlay files to enable the watchdog and set the alias to
`watchdog0`.

Adds the AON timer (watchdog part) to the supported features section
of the OpenTitan documentation.

Signed-off-by: Tyler Ng <tkng@rivosinc.com>
2023-05-26 09:45:25 -04:00
BJ Chen 215f180296 ITE: drivers/usb/device: Add USB Device Controller Support
Add USB Device Driver (usb_dc) of ITE IT82xx2

TEST=west build -p always -b it82xx2_evb
1. zephyr/sample/subsys/usb/hid
2. zephyr/sample/subsys/usb/hid-mouse

Signed-off-by: BJ Chen <bj.chen@ite.com.tw>
2023-05-26 12:40:18 +02:00
Shawn Nematbakhsh b38158bc3f boards: riscv: opentitan_earlgrey: Add SPI host peripherals
Add 2x SPI host peripherals.

Signed-off-by: Shawn Nematbakhsh <shawn@rivosinc.com>
2023-05-10 16:48:46 +09:00
Filip Kokosinski 7fa108db6a dts/riscv: move mpfs-icicle.dtsi into a common microchip directory
This commit moves the `mpfs-icicle.dtsi` file to a common `microchip`
directory and updates include paths in the `mpfs_icicle` board
devicetree.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-04 10:47:07 +02:00
Filip Kokosinski a30862455e treewide: rename Microsemi to Microchip
Do a treewide Microsemi to Microchip rename and update obsolete links in
the board docs.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2023-05-04 10:47:07 +02:00
Tim Lin 3a55454be4 ITE: dts: it8xxx2: Reduce the min-residency-us
The current configuration is too long and will block soc from
entering sleep mode. This change was made to get better power
number on EVB.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-26 20:07:23 +02:00
Benjamin Björnsson a43a43d4b0 dts: Add missing adc dt-bindings include
Add missing include of adc dt-bindings in top .dtsi
file containing an adc node.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2023-04-20 10:48:33 +02:00
Tim Lin 71b92265d7 ITE: dts: it82xx2: Increase sram to 256KB
1. Increase sram to 256KB.
   A block sram of SCAR0~15 is 4KB.
   A block sram of SCAR16~19 is 16KB.
   A block sram of SCAR20~23 is 32KB.

2. Removed the register of RVILMCR which has no effect.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin 491e3e6477 ITE: drivers/gpio: Add gpio_ite_it8xxx2_v2 driver
This driver is made for it82xx2 series.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin 7f3d61c608 ITE: dts: it8xxx2: Add the option of 512k flash size
Add the option of 512k flash size.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin 68d242de42 ITE: dts: it82xx2: Add the alternate pins of UART2 into pinctrl map
The alternate pins of UART2 have been remapped, and the remapped
alternate pins must be added to the pinctrl map.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin 051bd7098a ITE: dts: it82xx2: Add pinctrl node and kscan's pinctrl
Add the pinctrl node that has been remapped in the chip of it82xx2.
And modify kscan's pinctrl for the it82xx2.
And swap I2C default pins.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin e1ae5c02cb ITE: dts: it82xx2: Add GPIO general control node in it82xx2.dtsi
Add the GPIO general control node that has been remapped in the
chip of it82xx2.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Tim Lin 52178e4b5d ITE: dts: it82xx2: Add I2C device node in it82xx2.dtsi
Add the I2C device nodes that have been remapped in the chip
of it82xx2.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-04-19 03:48:38 -04:00
Ruibin Chang 3fb097c1ff ITE: it82xx2.dtsi: add watchdog device node
With this change, it82xx2 series can use the same
watchdog driver as it81xx2 series.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-04-19 03:48:38 -04:00
Ruibin Chang b9a7340ded ITE drivers/interrupt_controller: add intc_ite_it8xxx2_v2 driver
This driver is made for it82xx2 series.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-04-19 03:48:38 -04:00
Andrew Rossignol 17ca780674 dts: riscv: gd32vf103: Add UART3 and UART4 configuration
These UART devices are present on higher pin count devices.

Signed-off-by: Andrew Rossignol <andrew.rossignol@gmail.com>
2023-04-18 12:47:58 +02:00
Franciszek Zdobylak 8a9be6eb0d dts: riscv: sifive: fu740: add more cpus
Update devicetree to support more cpus.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-04-12 13:06:29 +02:00
Franciszek Zdobylak 00b6f4a8ce boards: hifive_unmatched: update ram size
Update ram size to 16GB.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-04-12 13:05:55 +02:00
Franciszek Zdobylak d9adf2249d dts: riscv: sifive: fu740: add memory controller
Add memory controller to devicetree for FU740 chip.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-04-12 13:05:55 +02:00
Conor Paxton b73f6b3d2b dts: mpfs_icicle: add all uart nodes to the Devicetree
Microchips PolarFire-SoC Icicle Kit has 4x UART interfaces available
via single micro USB and 1x UART for programming and debugging via micro
USB. Add the remaining UARTs to the Devicetree

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2023-03-21 13:39:52 +01:00
Conor Paxton d6df87a92e dts: mpfs_icicle: cleanup use of whitespace
Some lines of the mpfs_icicle Devicetree contained a jumble of white
space and tabs. Just use tabs

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2023-03-21 13:39:52 +01:00
Lucas Tamborrino 1adec07f01 drivers: spi: esp32xx: refactor SPI DMA preprocessor identifiers
Change the preprocessor identifier from CONFIG_SOC_ESP32C3 to
SOC_GDMA_SUPPORTED so it can include ESP32S3 in GDMA routines.

Remove hardcoded values from hal calls to use dma_host instead.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-03-13 14:02:06 +01:00
Hiroki Tada 01a44000e8 samples: die_temp_polling: Add esp32c3 overlay
- Add overlay for the esp32c3 board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32c3 dtsi.

Testing Environment:
esp32c3-devkitC-02

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-03-06 09:34:18 -06:00
Conor Paxton 1462751681 dts: mpfs_icicle: remove incorrect compatible from cpus
remove the microsemi vendor compatible from Microchip's PolarFire SoC
mpfs_icicle platform

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2023-02-21 15:04:56 +01:00
Conor Paxton 978a0eba21 dts: mpfs_icicle: add cpu nodes
Microchip's PolarFire SoC has a core complex consisting of one e51
monitor core and four u54 application cores. Add the remaining cpu nodes
to mpfs-icicle device tree. Add the software and timer interrupt irq's
to the clint for the additional cpu nodes.

Signed-off-by: Conor Paxton <conor.paxton@microchip.com>
2023-02-21 15:04:56 +01:00
Khor Swee Aun 938b152b03 dts: riscv: Add dts support for INTEL NIOSV
Add basic dts support for INTEL NIOSV Microcontroller Core Processor.

Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
2023-02-20 09:29:13 -05:00
Ruibin Chang e3b57c392c ITE drivers/pinctrl/it8xxx2: add default mode function
Add default mode function for pin control.

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
2023-02-19 21:00:14 -05:00