1.. zephyr:board:: adi_eval_adin2111ebz 2 3Overview 4******** 5 6The EVAL-ADIN2111EBZ is a flexible platform enabling quick evaluation of the ADIN2111, robust, 7low power 10BASE-T1L 2-Port Ethernet switch. The evaluation board provides 2 10BASE-T1L channels 8with 10Mbit per second Single Pair Ethernet (SPE) connections reaching up to 1.7km of link distance. 9 10The ADIN2111 internal switch can be configured in store and forward mode between the two 10BASE-T1L 11channels and the SPI host. Cut through mode is also available between Port 1 and Port 2 and can 12be used without the need of the SPI host (unmanaged configuration). 13 14The evaluation board offers two modes of operation for maximum flexibility: Connected to a PC 15via USB port, the full set of ADIN2111 register settings and features such as link quality 16monitoring and diagnostics can be accessed over the USB using the serial command interface 17implemented in the evaluation firmware. 18 19Alternatively, the board can operate in cut-through mode between Port 1 and Port 2 (unmanaged 20configuration without firmware) where the EVAL-ADIN2111EBZ acts as a network switch forwarding 21packets between the 2x 10BASE-T1L ports. The 2x links are configured by setting the ADIN2111 22hardware configuration pins jumper and switches. The 2x On-board Activity LEDs provide Link 23activity status indication for each port. 24 25Custom firmware can also be developed and the ADIN2111 driver support package includes simple 26project examples to start a custom implementation. 27 28The SPI interface provides access to the management registers required for the switch configuration, 29the 2 PHYs configuration and data exchange between SPI host and ports. 30 31.. important:: 32 33 S1 DIP switches are shipped in Open Alliance SPI mode. The current Zephyr 34 default board configuration is set to work as "Generic SPI, CRC enabled", 35 so the S1 DIP switches must be set as ``SPI_CFG0 OFF and SPI_CFG1 OFF``. 36 An inconsistent S1 DIP switches configuration will halt the boot. 37 38Hardware 39******** 40 41The ADI EVAL-ADIN2111EBZ hardware features list is available here: 42 43https://wiki.analog.com/resources/eval/user-guides/eval-adin2111ebz-user-guide 44 45 46Supported Features 47================== 48 49The ADI adi_eval_adin2111ebz board configuration supports the 50following hardware features: 51 52+--------------+------------+-------------------------------------+ 53| Interface | Controller | Driver/Component | 54+==============+============+=====================================+ 55| NVIC | on-chip | nested vector interrupt controller | 56+--------------+------------+-------------------------------------+ 57| UART | on-chip | serial port-polling; | 58| | | serial port-interrupt | 59+--------------+------------+-------------------------------------+ 60| PINMUX | on-chip | pinmux | 61+--------------+------------+-------------------------------------+ 62| GPIO | on-chip | gpio | 63+--------------+------------+-------------------------------------+ 64| I2C | on-chip | i2c | 65+--------------+------------+-------------------------------------+ 66| SPI | on-chip | spi | 67+--------------+------------+-------------------------------------+ 68| PWM | on-chip | pwm | 69+--------------+------------+-------------------------------------+ 70| WATCHDOG | on-chip | independent watchdog | 71+--------------+------------+-------------------------------------+ 72| ADIN2111 | spi | adin2111 10BASE-T1L mac/phy | 73+--------------+------------+-------------------------------------+ 74| FT232 | uart | usb-uart | 75+--------------+------------+-------------------------------------+ 76 77 78The default configuration can be found in the defconfig file: 79 80 :zephyr_file:`boards/adi/eval_adin2111ebz/adi_eval_adin2111ebz_defconfig` 81 82 83Connections and IOs 84=================== 85 86ADI ADIN2111EBZ evaluation board has 7 GPIO controllers (from A to G). 87These controllers are responsible for pin muxing, input/output, pull-up, etc. 88 89For mode details please refer to `EVAL-ADIN2111EBZ User Guide <https://wiki.analog.com/resources/eval/user-guides/eval-adin2111ebz-user-guide>`_. 90 91Default Zephyr Peripheral Mapping: 92---------------------------------- 93 94- UART_1 TX/RX : PA9/PA10 (UART to FT232, console) 95- SPI1 SCK/MISO/MOSI : PA5/PA6/PA7 (SPI to external nor flash IS25LP128) 96- SPI2 SCK/MISO/MOSI : PB13/PB14/PB15 (SPI to external ADIN2111) 97- LED1 : POWER (Green LED) 98- UC_LED1 : PB6 (Blue LED) 99- MOD LED1 : PE2 (SR LED) 100- MOD LED2 : PE6 (BG LED) 101- NET LED1 : PB10 (SR LED) 102- NET LED2 : PB11 (BG LED) 103 104 105System Clock 106------------ 107 108EVAL-ADIN2111EBZ System Clock could be driven by an internal or external oscillator, as well as the 109main PLL clock. By default the System clock is driven by the PLL clock at 80MHz, driven by the 11016MHz high speed internal oscillator. 111 112Serial Port 113----------- 114 115EVAL-ADIN2111EBZ has 1 U(S)ART. The Zephyr console output is assigned to UART1 that is connected 116to a FT232, available through Micro USB connector. Default settings are 115200 8N1. 117Same UART1 TX and RX cmos signals are available before the FT232, at P9 connector. 118 119 120Programming and Debugging 121************************* 122 123Flashing 124======== 125 126EVAL-ADIN2111EBZ includes an ST-LINK/V2-1 JTAG/SWD 10 or 20 pin connector. This interface is 127supported by the openocd version included in Zephyr SDK. 128 129Flashing an application to Discovery kit 130----------------------------------------- 131 132Connect the EVAL-ADIN2111EBZ to your host computer using the USB port, then run a serial host 133program to connect with your ADI board. For example: 134 135.. code-block:: console 136 137 $ minicom -D /dev/serial/by-id/usb-ADI_EVAL-ADIN2111EBZ_XXXXXX-12-if00-port0 138 139where XXXXXX is the serial number of the connected device. 140Then, build and flash in the usual way. Here is an example for the :zephyr:code-sample:`hello_world` application. 141 142.. zephyr-app-commands:: 143 :zephyr-app: samples/hello_world 144 :board: adi_eval_adin2111ebz 145 :goals: build flash 146 147You should see the following message on the console: 148 149.. code-block:: console 150 151 Hello World! adi_eval_adin2111ebz 152 153Debugging 154========= 155 156You can debug an application in the usual way. Here is an example for the :zephyr:code-sample:`hello_world` 157application. 158 159.. zephyr-app-commands:: 160 :zephyr-app: samples/hello_world 161 :board: adi_eval_adin2111ebz 162 :maybe-skip-config: 163 :goals: debug 164 165.. _EVAL-ADIN2111EBZ evaluation board website: 166 https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-adin2111.html 167 168.. _EVAL-ADIN2111EBZ board User Guide: 169 https://wiki.analog.com/resources/eval/user-guides/eval-adin2111ebz-user-guide 170 171.. _ADIN2111 Datasheet: 172 https://www.analog.com/media/en/technical-documentation/data-sheets/adin2111.pdf 173 174.. _STM32L4S5QII3P reference manual: 175 https://www.st.com/resource/en/reference_manual/rm0432-stm32l4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf 176