Commit Graph

14 Commits

Author SHA1 Message Date
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 e2e9155dd5 boards: remove unused tag from supported list
All IEEE 802.15.4 tests/samples use DT-based filter now, so the
ieee802154 tag can be deleted.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Gerard Marull-Paretas 846bed99c3 boards: enable IEEE 802.15.4 devices and add choice
Enable the IEEE 802.15.4 radio node on all boards that listed
'ieee802154' in the supported field.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-10 11:57:34 +02:00
Kumar Gala 722b529f64 boards: arm: ubx_evkninab{3,4}: Update docs to use DEVICE_DT_GET
Update docs for boards ubx_evkninab3_nrf52840 and ubx_evkninab4_nrf52833
to use DEVICE_DT_GET as we phase out "label" usage and thus the
device_get_binding() reference wouldn't work.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-28 08:54:24 -05:00
Benjamin Björnsson ab4a926c27 boards: Add alias to boards with watchdog enabled
Add alias to boards with watchdog enabled to facilitate the
move of samples/drivers/watchdog to use DT_ALIAS.

Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
2022-07-19 09:28:43 -05:00
Andrzej Głąbek 793362ae5a boards: nrf: Align with recent changes made to pwm_nrfx driver
... and "nordic,nrf-pwm" binding:

- use channel indexes instead of pin numbers in `pwms` properties that
  define PWM LEDs
- add the period and flags cells to `pwms` properties in all PWM LED
  definitions; use the commonly used period of 20 ms (giving 50 Hz)
  as a default setting

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-22 09:43:26 +02:00
Andrzej Głąbek b4b2b2ef98 boards: nrf52: Suppress DTC warnings about duplicate unit-address
Prevent "unique_unit_address_if_enabled" warnings from being reported
for nRF52 Series SoCs, where certain nodes need to be enabled with
the same base addresses. These can be (depending on a given SoC):
- power@40000000 & clock@40000000
- power@40000000 & clock@40000000 & bprot@40000000
- acl@4001e000 & flash-controller@4001e000

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00
Carles Cufi 1568b665a8 boards: nrf: Fix jlink invocation strings
The jlink executable expects a fully qualified IC name, and not just the
family. Apply to all Nordic boards.

Fixes #37294

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-03-25 13:39:28 +01:00
Gerard Marull-Paretas e83de45f66 boards: arm: ubx_evkninab4_nrf52833: migrate to pinctrl
Use pinctrl instead of `-pin` properties.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-21 15:09:28 +01:00
Gerard Marull-Paretas 95fb0ded6b kconfig: remove Enable from boolean prompts
According to Kconfig guidelines, boolean prompts must not start with
"Enable...". The following command has been used to automate the changes
in this patch:

sed -i "s/bool \"[Ee]nables\? \(\w\)/bool \"\U\1/g" **/Kconfig*

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-09 15:35:54 +01:00
Erwan Gouriou 7c25fd3c2e boards: doc: Clarify a generic statement
This sentence ("Other hardware features are not supported by the
Zephyr kernel."), which could be found in a high number of boards
documentation, is misleading on two levels:
- peripheral support is not a kernel business
- in most of cases, features are actually supported but not enabled.

Fix this.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-01-11 11:54:22 +01:00
Johann Fischer e4f894788a boards: add zephyr_udc0 nodelabel to all boards with USB support
USB devicetree nodes in Zephyr have different names,
mostly derived from the designations in data sheets.
Add zephyr_udc0 (USB device controller) nodelabel to
specific USB node to allow generic USB sample to be build.

Follow up on commit b4242a8 ("boards: add USB node aliases")

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-19 16:56:54 +02:00
Johann Fischer 9512ae488a boards: remove USB option for nRF based boards
It is enough to set the USB_DEVICE_STACK option to enable
USB device support. Also the option USB_NRFX is not necessary
here because it is selected in drivers/usb/device/Kconfig anyway.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-03 19:00:12 -04:00
Bob Recny 81f839b157 boards: arm: Add u-blox EVK-NINA-B4
Add support for u-blox EVK-NINA-B4, which uses the nRF52833

This board is similar to the nrf52833dk_nrf52833, though it
uses a u-blox NINA-B40x openCPU module with DC-DC support
included.
Simplified pwm LED aliases
Corrected LED assignments for red, green, and blue
Addressed review comments (spi & gpio 0 0)

Tested with blinky, button, and Bluetooth peripheral_hr

Signed-off-by: Bob Recny <bob.recny@u-blox.com>
2021-04-29 09:52:19 -04:00