Commit Graph

9 Commits

Author SHA1 Message Date
Sylvio Alves cff71c8d2b driver: systimer: increase esp32c3 tick resolution
hal_espressif systimer HAL calls are based on 1MHz reference.
This changes systimer driver to allow max clocking reference of 16MHz
and increases soc tick resolution by reducing min delay interval.

This also sets all ESP32-C3 socs to 16MHz hardware cycles reference.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-01-04 14:24:25 +01:00
Fabio Baltieri 7f41f795ac board: icev_wireless: enable i2c
Enable the i2c0 node so that the corresponding driver gets compiled.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-19 16:35:51 +00:00
Fabio Baltieri 2db0bd73e8 board: esp32c3: drop sda-gpios and scl-gpios i2c properties
Drop scl and sda gpio properties from two esp32c3 boards. According to
the dts description these are not required, and the corresponding driver
has an explicit check to fail the build if these are defined when the
platform has SOC_I2C_SUPPORT_HW_CLR_BUS defined.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-19 16:35:51 +00:00
Gerard Marull-Paretas e81e92dbb9 boards: convert images to JPEG and reduce image size
The boards folder uses ~142.8 MB, being the largest in the repository.
This is due mostly to board images, which are in most cases not
optimized for web content. This patch tries to address this problem by
converting all pictures to JPEG (quality 75) and by adjusting its size
up to 750 px (the width of the documentation content). Images that
specified a fixed width in rst files are converted down to that value
instead.

With this patch, folder goes down to ~53.5 MB from 142.8 MB (-~63%).
Note that this patch introduces a new set of binary files to git
history, though (bad).

The process has been automated using this quickly crafted Python script:

```python
from pathlib import Path
import re
import subprocess

def process(doc, image, image_jpeg, size):
    subprocess.run(
        (
	     f"convert {image}"
	     "-background white -alpha remove -alpha off -quality 75"
	     f"-resize {size}\> {image_jpeg}"
	),
        shell=True,
        check=True,
        cwd=doc.parent,
    )
    if image != image_jpeg:
        (doc.parent / image).unlink()

for doc in Path(".").glob("boards/**/*.rst"):
    with open(doc) as f:
        content = ""
        image = None
        for line in f:
            m = re.match(r"^(\s*)\.\. (image|figure):: (.*)$", line)
            if m:
                if image:
                    process(doc, image, image_jpeg, size)

                image = Path(m.group(3))
                if image.suffix not in (".jpg", ".jpeg", ".png"):
                    content += line
                    image = None
                    continue

                image_jpeg = image.parent / (image.stem + ".jpg")
                size = 750
                content += (
                    f"{m.group(1)}.. {m.group(2)}:: {image_jpeg}\n"
                )
            elif image:
                m = re.match(r"\s*:height:\s*[0-9]+.*$", line)
                if m:
                    continue

                m = re.match(r"\s*:width:\s*([0-9]+).*$", line)
                if m:
                    size = min(int(m.group(1)), size)
                    continue

                content += line
                if line == "\n":
                    process(doc, image, image_jpeg, size)
                    image = None
            else:
                content += line

    with open(doc, "w") as f:
        f.write(content)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-29 10:18:18 +02:00
Christopher Friedt 1d428ded92 boards: riscv: icev_wireless: add watchdog to aliases in dts
Add watchdog alias to track change in #47912.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2022-08-18 11:34:16 +00:00
Christopher Friedt afb99a77fa boards: icev_wireless: doc: add blank line before bullet list
The documentation was not properly rendered due to a missing
blank line before bullet lists.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2022-08-17 17:07:32 +02:00
Kumar Gala f2fa572561 entropy: remove Kconfig.defconfig* setting of entropy drivers
Now that entropy drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-09 23:37:33 -05:00
Kumar Gala 35d93ef7bc drivers: i2c: esp32: Rework SDA/SDL pins as gpios in devicetree
For the !SOC_I2C_SUPPORT_HW_CLR_BUS in which we implement bus
reset via GPIOs, change the devicetree properties to be actual
gpio properties and update the code to reflect this.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 12:10:58 -05:00
Christopher Friedt 5a9c4e110f boards: riscv: add ICE-V Wireless board
The ICE-V Wireless includes an ESP32-C3, an iCE40UP5k-SG48 FPGA,
and an 8MB PSRAM connected directly to the FPGA.

This change adds initial support for the ESP32-C3 RISC-V
application processor.

For more information, please see
https://github.com/ICE-V-Wireless/ICE-V-Wireless

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2022-07-26 08:49:03 +02:00