diff --git a/boards/shields/max3421e/Kconfig.defconfig b/boards/shields/max3421e/Kconfig.defconfig new file mode 100644 index 00000000000..cf6f2075f9b --- /dev/null +++ b/boards/shields/max3421e/Kconfig.defconfig @@ -0,0 +1,9 @@ +# Copyright (c) 2022 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +if SHIELD_SPARKFUN_MAX3421E + +config UHC_DRIVER + default y + +endif # SHIELD_SPARKFUN_MAX3421E diff --git a/boards/shields/max3421e/Kconfig.shield b/boards/shields/max3421e/Kconfig.shield new file mode 100644 index 00000000000..527f7da5732 --- /dev/null +++ b/boards/shields/max3421e/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2022 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_SPARKFUN_MAX3421E + def_bool $(shields_list_contains,sparkfun_max3421e) diff --git a/boards/shields/max3421e/doc/index.rst b/boards/shields/max3421e/doc/index.rst new file mode 100644 index 00000000000..3ff216365c2 --- /dev/null +++ b/boards/shields/max3421e/doc/index.rst @@ -0,0 +1,58 @@ +.. _max3421e_shield: + +MAX3421E Shield +############### + +Overview +******** + +Support for expansion boards (shields) based on MAX3421E USB Peripheral/Host +controller. + +Sparkfun USB Host Shield +************************ + +Pins Assignment of the Shield Connector +======================================= + ++-----------------------+-----------------------+-----------------------------+ +| Shield Connector Pin | Function | MAX3421E Pin | ++=======================+=======================+=============================+ +| D0 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D1 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D2 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D3 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D4 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D5 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D6 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D7 | RESET pin | | ++-----------------------+-----------------------+-----------------------------+ +| D8 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D9 | INTn | 24 (Interrupt Output) | ++-----------------------+-----------------------+-----------------------------+ +| D10 | SPI CSn | 34 (SPI Chip Select) | ++-----------------------+-----------------------+-----------------------------+ +| D11 | SPI MOSI | 36 (SPI Serial Data Input) | ++-----------------------+-----------------------+-----------------------------+ +| D12 | SPI MISO | 35 (SPI Serial Data Out) | ++-----------------------+-----------------------+-----------------------------+ +| D13 | SPI SCK | 37 (SPI Serial Clock Input) | ++-----------------------+-----------------------+-----------------------------+ +| D14 | not connected | | ++-----------------------+-----------------------+-----------------------------+ +| D15 | not connected | | ++-----------------------+-----------------------+-----------------------------+ + +Programming +*********** + +Set ``-DSHIELD=sparkfun_max3421e`` when you invoke ``west build`` or ``cmake`` +in your Zephyr application. diff --git a/boards/shields/max3421e/sparkfun_max3421e.overlay b/boards/shields/max3421e/sparkfun_max3421e.overlay new file mode 100644 index 00000000000..cbad6a3eef1 --- /dev/null +++ b/boards/shields/max3421e/sparkfun_max3421e.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&arduino_spi { + status = "okay"; + cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */ + + zephyr_uhc0: max3421e@0 { + compatible = "maxim,max3421e_spi"; + spi-max-frequency = <26000000>; + int-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */ + reset-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; /* D7 */ + status = "okay"; + reg = <0>; + }; +};