Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Stranger 932020d700 boards: remove pinmux as supported feature
The tag that marks pinmux as supported is not used by any test or
sample, therefore this doesn't seem needed anymore.

- remove from 3 mec1x boards, they still use pinmux,
  but as the tag is neither used in tests and pinmux
  deprecated anyway no need for it.
- remove from 5 esp32 boards, as they now use pinctrl.
- remove from 2 lpc boards, as they now use pinctrl.
- remove from 1 stm32 board, as it now uses pinctrl.
- remove from 1 npcx board, as it now uses pinctrl.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-19 13:54:48 -05: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
Gerard Marull-Paretas ada8d72888 boards: remove non-minimal peripherals from defconfig
According to the board porting guidelines, boards should "leave
peripherals and their drivers disabled by default". In Zephyr we
tipically enable GPIO and SERIAL, as they are virtually required by all
samples/tests in tree. However, for the rest of peripherals it is up to
the application/test to enable the necessary driver classes. It is also
useful that board's Kconfig.defconfig enables certain driver peripherals
based on a condition, e.g. enable I2C if SENSOR=y.

Ref. https://docs.zephyrproject.org/latest/hardware/porting/
board_porting.html#general-recommendations

This patch removes the following driver classes from defconfig files:

- CONFIG_ADC
- CONFIG_COUNTER
- CONFIG_EEPROM
- CONFIG_ENTROPY
- CONFIG_ESPI
- CONFIG_HWINFO
- CONFIG_I2C
- CONFIG_LED
- CONFIG_NETWORKING
- CONFIG_PS2
- CONFIG_PWM
- CONFIG_SENSOR
- CONFIG_SPI
- CONFIG_SPI_SLAVE
- CONFIG_WATCHDOG

Note that a previous attempt was done in #38510.

Fixes #30694

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-05 12:55:51 +02:00
Kumar Gala 1c1c57b31b gpio: remove defconfig/proj setting of GPIO drivers
Now that gpio drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-26 08:49:38 +02:00
Fabio Baltieri e24314f10f include: add more missing zephyr/ prefixes
Adds few missing zephyr/ prefixes to leftover #include statements that
either got added recently or were using double quote format.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-05-27 15:20:27 -07:00
Daniel DeGrasse 48877f8bdc boards: lpcxpresso11u68: change default console to uart0
UART0 is routed to onboard debugger on LPC11u68 EVK. Change the default
console from UART4 to UART0 to enable output on the onboard debugger
console.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Daniel DeGrasse 7e89ce9f19 drivers: serial: enable pin control for lpc11u6x serial driver
Enable pin control api for lpc11u6x serial driver, and remove pinmux api
usage.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Daniel DeGrasse 069280c8a4 drivers: i2c: i2c_lpc11u6x: enable pin control
Enable pin control for lpc11u6x i2c driver, and remove pinmux usage from
board level DTS files.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Daniel DeGrasse ff8ba4e0f7 boards: lpcxpresso11u68: add pin control nodes to lpcxpresso11u68
Add pin control node definitions to lpcxpresso11u68 board.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-05-10 17:27:44 -05:00
Gerard Marull-Paretas db508379c2 boards: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all boards code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:57:15 +02:00
Maureen Helm c4433bbc54 boards: arm: Add arduino_serial to supported list for NXP boards
Adds arduino_serial to the list of supported features for all NXP boards
that define an arduino_serial node in their device tree. This enables
twister to select these boards for tests or samples the depend on this
feature.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-05-18 12:35:39 +03:00
Kumar Gala c109e7691d dts: atmel/nxp: supress duplicate unit-address warning
A number of SoCs have overlapping devices at the same unit address.
Surpress the warning for those cases:

* Atmel - pinmux@41004400 & gpio@41004400
* Atmel - pinmux@41004480 & gpio@41004480
* Atmel - pinmux@41008000 & gpio@41008000
* NXP - flash@0 & gpio@0
* NXP - syscon@0 & gpio@0

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-02-04 10:05:47 -05:00
Simon Guinot 8e3747348c boards: lpcxpresso11u68: enable BUILD_OUTPUT_HEX
Since commit 3124c02987
("cmake: flash/debug: refactor runner configuration"), BUILD_OUTPUT_HEX
must be selected to pass the .hex file to the runner. It is needed when
running the "west flash" command.

In addition the implicit CORTEX_M_SYSTICK and EEPROM_LPC11U6X options
are removed.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-09-14 12:47:32 -05:00
Kumar Gala d2b0735c12 build: Fix usage of hardcoded zephyr.{elf,bin,hex}
Its possible to rename the executable we build via the Kconfig symbol
CONFIG_KERNEL_BIN_NAME.  So we really should use ${KERNEL_ELF_NAME},
${KERNEL_BIN_NAME} and ${KERNEL_HEX_NAME} variables instead of hardcoded
zephyr.elf, zephyr.bin, and zephyr.elf.

This fixes an build issue with
tests/misc/test_build/buildsystem.kconfig.utf8_in_values on
up_squared_adsp and lpcxpresso11u68 platforms.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-08-14 13:33:49 +02:00
Maxime Bittan 70a277575a boards: arm: add support for lpcxpresso11u68 board
This patch adds support for the LPC11U68 LPCXpresso board based on the
LPC11U68 SoC.

Signed-off-by: Maxime Bittan <maxime.bittan@seagate.com>
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-07-29 20:12:24 +02:00