boards: shields: add TI TCAN4550 evaluation module

Add shield definition for the TI TCAN4550EVM, an evaluation module for the
TI TCAN4x5x CAN controller series.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2023-08-29 13:56:43 +02:00 committed by Carles Cufí
parent 9bd62f16b6
commit 33167d3ad2
5 changed files with 117 additions and 0 deletions

View file

@ -713,6 +713,7 @@ Release Notes:
- str4t0m
files:
- boards/shields/mcp2515/
- boards/shields/tcan4550evm/
- doc/hardware/peripherals/canbus/
- drivers/can/
- drivers/net/canbus.c

View file

@ -0,0 +1,5 @@
# Copyright (c) 2023 Vestas Wind Systems A/S
# SPDX-License-Identifier: Apache-2.0
config SHIELD_TCAN4550EVM
def_bool $(shields_list_contains,tcan4550evm)

View file

@ -0,0 +1,68 @@
.. _tcan4550evm_shield:
Texas Instruments TCAN4550EVM
#############################
Overview
********
The Texas Instruments `TCAN4550EVM`_ features a `TI TCAN4550-Q1`_ automotive system basis chip (SBC)
with integrated CAN FD controller & transceiver.
.. figure:: tcan4550evm.jpg
:align: center
:alt: TCAN4550EVM
TCAN4550EVM (Credit: Texas Instruments)
Requirements
************
This shield can only be used with a board which provides a configuration for Arduino connectors and
defines node aliases for SPI and GPIO interfaces (see :ref:`shields` for more details).
.. note::
This shield configuration limits the maximum SPI clock frequency to 2MHz although the
TCAN4550-Q1 supports up to 18MHz SPI clock frequency. This is done to accommodate the flywires
usually used for connecting the TCAN4550EVM to the board running Zephyr.
Pin Assignments
===============
+-----------------------+---------------------------------------------+
| Shield Connector Pin | Function |
+=======================+=============================================+
| D6 | nWKRQ |
+-----------------------+---------------------------------------------+
| D7 | WAKE_LV |
+-----------------------+---------------------------------------------+
| D8 | RESET |
+-----------------------+---------------------------------------------+
| D9 | nINT |
+-----------------------+---------------------------------------------+
| D10 | nCS |
+-----------------------+---------------------------------------------+
| D11 | SDI |
+-----------------------+---------------------------------------------+
| D12 | SDO |
+-----------------------+---------------------------------------------+
| D13 | SCLK |
+-----------------------+---------------------------------------------+
Programming
***********
Set ``-DSHIELD=tcan4550evm`` when you invoke ``west build``. For example:
.. zephyr-app-commands::
:zephyr-app: tests/drivers/can/api
:board: frdm_k64f
:shield: tcan4550evm
:goals: build
.. _TCAN4550EVM:
https://www.ti.com/tool/TCAN4550EVM
.. _TI TCAN4550-Q1:
https://www.ti.com/product/TCAN4550-Q1

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View file

@ -0,0 +1,43 @@
/*
* Copyright (c) 2023 Vestas Wind Systems A/S
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/gpio/gpio.h>
/ {
chosen {
zephyr,canbus = &tcan4x5x_tcan4550evm;
};
};
&arduino_spi {
status = "okay";
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
tcan4x5x_tcan4550evm: can@0 {
compatible = "ti,tcan4x5x";
reg = <0>;
/* reduced spi-max-frequency to accommodate flywire connections */
spi-max-frequency = <2000000>;
status = "okay";
clock-frequency = <40000000>;
device-state-gpios = <&arduino_header 12 GPIO_ACTIVE_HIGH>; /* D6 */
device-wake-gpios = <&arduino_header 13 GPIO_ACTIVE_HIGH>; /* D7 */
reset-gpios = <&arduino_header 14 GPIO_ACTIVE_HIGH>; /* D8 */
int-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
bosch,mram-cfg = <0x0 15 15 7 7 0 10 10>;
sjw = <1>;
sjw-data = <1>;
sample-point = <875>;
sample-point-data = <875>;
bus-speed = <125000>;
bus-speed-data = <1000000>;
status = "okay";
can-transceiver {
max-bitrate = <8000000>;
};
};
};