Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Kconfig and Devicetree abstractions, more documentation #178

Merged
merged 10 commits into from
Jan 9, 2024
14 changes: 10 additions & 4 deletions boards/arm/waveshare_rp2040/waveshare_rp2040_eth.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
#include "rpipico_reduced_r3_connector.dtsi"

rpipico_serial: &uart0 {};
rpipico_spi: &spi0 {};
rpipico_i2c: &i2c0 {};
rpipico_spi0: &spi0 {};
rpipico_spi: &rpipico_spi0 {};
rpipico_i2c1: &i2c1 {};
rpipico_i2c0: &i2c0 {};
rpipico_i2c: &rpipico_i2c0 {};

pico_serial: &rpipico_serial {};
pico_spi: &rpipico_spi {};
pico_i2c: &rpipico_i2c {};
pico_spi0: &rpipico_spi0 {};
pico_spi: &pico_spi0 {};
pico_i2c1: &rpipico_i2c1 {};
pico_i2c0: &rpipico_i2c0 {};
pico_i2c: &pico_i2c0 {};

#include "waveshare_rp2040-mini-tweaks.dtsi"
8 changes: 6 additions & 2 deletions boards/arm/waveshare_rp2040/waveshare_rp2040_geek.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@
#include "rpigeek_connectors.dtsi"

rpipico_serial: &uart1 {};
rpipico_i2c: &i2c0 {};
rpipico_i2c1: &i2c1 {};
rpipico_i2c0: &i2c0 {};
rpipico_i2c: &rpipico_i2c0 {};
rpipico_adc: &adc {};

pico_serial: &rpipico_serial {};
pico_i2c: &rpipico_i2c {};
pico_i2c1: &rpipico_i2c1 {};
pico_i2c0: &rpipico_i2c0 {};
pico_i2c: &pico_i2c0 {};
pico_adc: &rpipico_adc {};

#include "waveshare_rp2040-geek-tweaks.dtsi"
14 changes: 10 additions & 4 deletions boards/arm/waveshare_rp2040/waveshare_rp2040_lcd_0_96.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
#include "rpipico_r3_connector.dtsi"

rpipico_serial: &uart0 {};
rpipico_spi: &spi0 {};
rpipico_i2c: &i2c0 {};
rpipico_spi0: &spi0 {};
rpipico_spi: &rpipico_spi0 {};
rpipico_i2c1: &i2c1 {};
rpipico_i2c0: &i2c0 {};
rpipico_i2c: &rpipico_i2c0 {};

pico_serial: &rpipico_serial {};
pico_spi: &rpipico_spi {};
pico_i2c: &rpipico_i2c {};
pico_spi0: &rpipico_spi0 {};
pico_spi: &pico_spi0 {};
pico_i2c1: &rpipico_i2c1 {};
pico_i2c0: &rpipico_i2c0 {};
pico_i2c: &pico_i2c0 {};

&led0 {
label = "BL";
Expand Down
14 changes: 10 additions & 4 deletions boards/arm/waveshare_rp2040/waveshare_rp2040_plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
#include "rpipico_r3_connector.dtsi"

rpipico_serial: &uart0 {};
rpipico_spi: &spi0 {};
rpipico_i2c: &i2c0 {};
rpipico_spi0: &spi0 {};
rpipico_spi: &rpipico_spi0 {};
rpipico_i2c1: &i2c1 {};
rpipico_i2c0: &i2c0 {};
rpipico_i2c: &rpipico_i2c0 {};

pico_serial: &rpipico_serial {};
pico_spi: &rpipico_spi {};
pico_i2c: &rpipico_i2c {};
pico_spi0: &rpipico_spi0 {};
pico_spi: &pico_spi0 {};
pico_i2c1: &rpipico_i2c1 {};
pico_i2c0: &rpipico_i2c0 {};
pico_i2c: &pico_i2c0 {};

#include "waveshare_rp2040-pico-tweaks.dtsi"
102 changes: 91 additions & 11 deletions boards/extensions/mimxrt1010_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,110 @@ Overview

This is a set of Bridle's extension to the original Zephyr upstream board
:ref:`zephyr:mimxrt1010_evk` with some adaptions and improvement on
Devicetree level.
Kconfig and Devicetree level.

List of extensions
******************

- overwrite the Arduino UNO R3 specific edge connecor binding:
.. rubric:: Kconfig

- :devicetree:`&arduino_header {...};`
- :bbl:`activate` self powered USB explicitly and set the maximum of
electrical current consumption to :bbl:`0㎃`:

- :kconfig:option:`CONFIG_USB_SELF_POWERED`
- :kconfig:option:`CONFIG_USB_MAX_POWER`

.. list-table::
:align: left
:width: 25%
:widths: 100

* - .. rubric:: NXP MIMXRT1010-EVK

* - .. literalinclude:: ../mimxrt1010_evk.conf
:caption: mimxrt1010_evk.conf
:language: cfg
:encoding: ISO-8859-1
:start-at: CONFIG_USB_SELF_POWERED
:end-at: CONFIG_USB_MAX_POWER

.. rubric:: Devicetree

- overwrite the Arduino UNO R3 specific edge connecor binding
:devicetree:`&arduino_header {...};` with additional closed
connections

.. list-table::
:align: left
:width: 50%
:widths: 100

* - .. rubric:: NXP MIMXRT1010-EVK

* - .. literalinclude:: ../arduino_r3_connector.dtsi
:caption: arduino_r3_connector.dtsi
:language: DTS
:encoding: ISO-8859-1
:emphasize-lines: 12,13,17
:start-at: &arduino_header {
:end-at: };

.. note::

On :ref:`zephyr:mimxrt1010_evk` pin D4 (GPIO), D5 (GPIO/PWM), and
D9 (GPIO/PWM) are disconnected in default and can be closed optionally.
With this GPIO map overwrites the resistors R793, R795 and R800 must be
fitted for proper use. But keep in mind that the signals are already
connected to other on-board header for the NXP special motor driver
add-on board.

- enable ARM Cortex-M Data Cache (DTCM) with Zephyr chosen entry:

- :devicetree:`/ { chosen { zephyr,dtcm = &dtcm; }; };`
.. list-table::
:align: left
:width: 50%
:widths: 100

* - .. rubric:: NXP MIMXRT1010-EVK

* - .. literalinclude:: ../mimxrt1010_evk.overlay
:caption: mimxrt1010_evk.overlay
:language: DTS
:encoding: ISO-8859-1
:emphasize-lines: 3
:prepend: / {
:start-at: chosen {
:end-at: };
:append: };

- add a :dtcompatible:`zephyr,flash-disk` node linked to the
:devicetree:`partition = <&storage_partition>;` with the hard defined
mass storage disk name :devicetree:`disk-name = "NAND";` – also set
the mass storage disk name hard on Kconfig level by a new board config
file with :kconfig:option:`CONFIG_MASS_STORAGE_DISK_NAME`

.. note::
.. list-table::
:align: left
:width: 50%
:widths: 100

* - .. rubric:: NXP MIMXRT1010-EVK

* - .. literalinclude:: ../mimxrt1010_evk.overlay
:caption: mimxrt1010_evk.overlay
:language: DTS
:encoding: ISO-8859-1
:emphasize-lines: 5
:prepend: / {
:start-at: msc_disk0 {
:end-at: };
:append: };

On :ref:`zephyr:mimxrt1010_evk` pin D4 (GPIO), D5 (GPIO/PWM), and
D9 (GPIO/PWM) are disconnected in default and can be closed optionally.
With this GPIO map overwrites the resistors R793, R795 and R800 must be
fitted for proper use. But keep in mind that the signals are already
connected to other on-board header for the NXP special motor driver
add-on bard.
.. literalinclude:: ../mimxrt1010_evk.conf
:caption: mimxrt1010_evk.conf
:language: cfg
:encoding: ISO-8859-1
:emphasize-lines: 21
:prepend: #
:start-at: NOTES for the disk name (CONFIG_MASS_STORAGE_DISK_NAME):
:end-at: CONFIG_MASS_STORAGE_DISK_NAME=
5 changes: 4 additions & 1 deletion boards/extensions/mimxrt1010_evk/mimxrt1010_evk.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright (c) 2023 TiaC Systems
# Copyright (c) 2023-2024 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

CONFIG_USB_SELF_POWERED=y
CONFIG_USB_MAX_POWER=0

#
# WARNINGS and NOTES for the disk name (CONFIG_MASS_STORAGE_DISK_NAME):
#
Expand Down
88 changes: 87 additions & 1 deletion boards/extensions/mimxrt1060_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,99 @@ Overview

This is a set of Bridle's extension to the original Zephyr upstream board
:ref:`zephyr:mimxrt1060_evk` with some adaptions and improvement on
Devicetree level.
Kconfig and Devicetree level.

List of extensions
******************

.. rubric:: Kconfig

- :bbl:`activate` self powered USB explicitly and set the maximum of
electrical current consumption to :bbl:`0㎃`:

- :kconfig:option:`CONFIG_USB_SELF_POWERED`
- :kconfig:option:`CONFIG_USB_MAX_POWER`

.. list-table::
:align: left
:width: 75%
:widths: 33, 33, 33

* - .. rubric:: NXP MIMXRT1060-EVK
- .. rubric:: NXP MIMXRT1060-EVKB
- .. rubric:: NXP MIMXRT1060-EVK Hyper Flash

* - .. literalinclude:: ../mimxrt1060_evk.conf
:caption: mimxrt1060_evk.conf
:language: cfg
:encoding: ISO-8859-1
:start-at: CONFIG_USB_SELF_POWERED
:end-at: CONFIG_USB_MAX_POWER
- .. literalinclude:: ../mimxrt1060_evkb.conf
:caption: mimxrt1060_evkb.conf
:language: cfg
:encoding: ISO-8859-1
:start-at: CONFIG_USB_SELF_POWERED
:end-at: CONFIG_USB_MAX_POWER
- .. literalinclude:: ../mimxrt1060_evk_hyperflash.conf
:caption: mimxrt1060_evk_hyperflash.conf
:language: cfg
:encoding: ISO-8859-1
:start-at: CONFIG_USB_SELF_POWERED
:end-at: CONFIG_USB_MAX_POWER

.. rubric:: Devicetree

- add a :dtcompatible:`zephyr,flash-disk` node linked to the
:devicetree:`partition = <&storage_partition>;` with the hard defined
mass storage disk name :devicetree:`disk-name = "NAND";` – also set
the mass storage disk name hard on Kconfig level by a new board config
file with :kconfig:option:`CONFIG_MASS_STORAGE_DISK_NAME`

.. list-table::
:align: left
:width: 75%
:widths: 100

* - .. rubric:: NXP MIMXRT1010-EVK(B/Hyper Flash)

* - .. literalinclude:: ../mimxrt1060_evk.dtsi
:caption: mimxrt1060_evk.dtsi
:language: DTS
:encoding: ISO-8859-1
:emphasize-lines: 5
:prepend: / {
:start-at: msc_disk0 {
:end-at: };
:append: };

.. list-table::
:align: left
:width: 75%
:widths: 33, 33, 33

* - .. rubric:: NXP MIMXRT1060-EVK
- .. rubric:: NXP MIMXRT1060-EVKB
- .. rubric:: NXP MIMXRT1060-EVK Hyper Flash

* - .. literalinclude:: ../mimxrt1060_evk.conf
:caption: mimxrt1060_evk.conf
:language: cfg
:encoding: ISO-8859-1
:emphasize-lines: 1
:start-at: CONFIG_MASS_STORAGE_DISK_NAME=
:end-at: CONFIG_MASS_STORAGE_DISK_NAME=
- .. literalinclude:: ../mimxrt1060_evkb.conf
:caption: mimxrt1060_evkb.conf
:language: cfg
:encoding: ISO-8859-1
:emphasize-lines: 1
:start-at: CONFIG_MASS_STORAGE_DISK_NAME=
:end-at: CONFIG_MASS_STORAGE_DISK_NAME=
- .. literalinclude:: ../mimxrt1060_evk_hyperflash.conf
:caption: mimxrt1060_evk_hyperflash.conf
:language: cfg
:encoding: ISO-8859-1
:emphasize-lines: 1
:start-at: CONFIG_MASS_STORAGE_DISK_NAME=
:end-at: CONFIG_MASS_STORAGE_DISK_NAME=
5 changes: 4 additions & 1 deletion boards/extensions/mimxrt1060_evk/mimxrt1060_evk.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright (c) 2023 TiaC Systems
# Copyright (c) 2023-2024 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

CONFIG_USB_SELF_POWERED=y
CONFIG_USB_MAX_POWER=0

#
# WARNINGS and NOTES for the disk name (CONFIG_MASS_STORAGE_DISK_NAME):
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright (c) 2023 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

CONFIG_USB_SELF_POWERED=y
CONFIG_USB_MAX_POWER=0

#
# WARNINGS and NOTES for the disk name (CONFIG_MASS_STORAGE_DISK_NAME):
#
Expand Down
3 changes: 3 additions & 0 deletions boards/extensions/mimxrt1060_evk/mimxrt1060_evkb.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Copyright (c) 2023 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

CONFIG_USB_SELF_POWERED=y
CONFIG_USB_MAX_POWER=0

#
# WARNINGS and NOTES for the disk name (CONFIG_MASS_STORAGE_DISK_NAME):
#
Expand Down
Loading
Loading