Texas Instruments TCAN4x5x CAN Controller
Schema identifier ($id): "http://devicetree.org/schemas/net/can/ti,tcan4x5x.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Marc Kleine-Budde <mkl@pengutronix.de>"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Item 2
Exact value (
const):"ti,tcan4x5x"
Rule 2
Exact value (
const):"ti,tcan4x5x"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
The GPIO parent interrupt.
clocks — required here #
Maximum number of items (maxItems): 1
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"cclk"
reset-gpios — not listed as required here #
Hardwired output GPIO. If not defined then software reset.
Maximum number of items (maxItems): 1
device-state-gpios — not listed as required here #
Input GPIO that indicates if the device is in a sleep state or if the device is active. Not available with tcan4552/4553.
Maximum number of items (maxItems): 1
device-wake-gpios — not listed as required here #
Wake up GPIO to wake up the TCAN device. Not available with tcan4552/4553.
Maximum number of items (maxItems): 1
bosch,mram-cfg — required here #
Message RAM configuration data. Multiple M_CAN instances can share the same Message RAM and each element(e.g Rx FIFO or Tx Buffer and etc) number in Message RAM is also configurable, so this property is telling driver how the shared or private Message RAM are used by this M_CAN controller.
The format should be as follows: <offset sidf_elems xidf_elems rxf0_elems rxf1_elems rxb_elems txe_elems txb_elems> The 'offset' is an address offset of the Message RAM where the following elements start from. This is usually set to 0x0 if you're using a private Message RAM. The remain cells are used to specify how many elements are used for each FIFO/Buffer.
M_CAN includes the following elements according to user manual: 11-bit Filter 0-128 elements / 0-128 words 29-bit Filter 0-64 elements / 0-128 words Rx FIFO 0 0-64 elements / 0-1152 words Rx FIFO 1 0-64 elements / 0-1152 words Rx Buffers 0-64 elements / 0-1152 words Tx Event FIFO 0-32 elements / 0-64 words Tx Buffers 0-32 elements / 0-576 words
Please refer to 2.4.1 Message RAM Configuration in Bosch M_CAN user manual for details.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/int32-array
Array item rules (items) #
Item 1
The 'offset' is an address offset of the Message RAM where the following elements start from. This is usually set to 0x0 if you're using a private Message RAM.
Default value (
default):0
Item 2
11-bit Filter 0-128 elements / 0-128 words
Minimum value (
minimum):0Maximum value (
maximum):128
Item 3
29-bit Filter 0-64 elements / 0-128 words
Minimum value (
minimum):0Maximum value (
maximum):64
Item 4
Rx FIFO 0 0-64 elements / 0-1152 words
Minimum value (
minimum):0Maximum value (
maximum):64
Item 5
Rx FIFO 1 0-64 elements / 0-1152 words
Minimum value (
minimum):0Maximum value (
maximum):64
Item 6
Rx Buffers 0-64 elements / 0-1152 words
Minimum value (
minimum):0Maximum value (
maximum):64
Item 7
Tx Event FIFO 0-32 elements / 0-64 words
Minimum value (
minimum):0Maximum value (
maximum):32
Item 8
Tx Buffers 0-32 elements / 0-576 words
Minimum value (
minimum):0Maximum value (
maximum):32
Minimum number of items (minItems): 1
spi-max-frequency — not listed as required here #
Must be half or less of "clocks" frequency.
Maximum value (maximum): 18000000
ti,nwkrq-voltage-vio — not listed as required here #
Value type (type): "boolean"
nWKRQ Pin GPO buffer voltage configuration. Set nWKRQ to use VIO voltage rail. When not set nWKRQ will use internal voltage rail.
wakeup-source — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag
Enable CAN remote wakeup.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):can-controller.yaml#
Rule 2 #
Shared schema rule (
$ref):/schemas/spi/spi-peripheral-props.yaml#
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)When the condition matches (
then) #Properties and child nodes (
properties)
device-state-gpios— not listed as required here
false— Not permitted by this property rule.
device-wake-gpios— not listed as required here
false— Not permitted by this property rule.
Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names", "bosch,mram-cfg"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
can@0 {
compatible = "ti,tcan4x5x";
reg = <0>;
clocks = <&can0_osc>;
clock-names = "cclk";
pinctrl-names = "default";
pinctrl-0 = <&can0_pins>;
spi-max-frequency = <10000000>;
bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
interrupt-parent = <&gpio1>;
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
ti,nwkrq-voltage-vio;
wakeup-source;
};
};
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
can@0 {
compatible = "ti,tcan4552", "ti,tcan4x5x";
reg = <0>;
clocks = <&can0_osc>;
clock-names = "cclk";
pinctrl-names = "default";
pinctrl-0 = <&can0_pins>;
spi-max-frequency = <10000000>;
bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>;
interrupt-parent = <&gpio1>;
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
wakeup-source;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)