| 1 |
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/phy/ti,tcan104x-can.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: TCAN104x CAN TRANSCEIVER PHY |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Aswath Govindraju <[email protected]> |
| 11 |
|
| 12 |
properties: |
| 13 |
$nodename: |
| 14 |
pattern: "^can-phy" |
| 15 |
|
| 16 |
compatible: |
| 17 |
oneOf: |
| 18 |
- items: |
| 19 |
- enum: |
| 20 |
- microchip,ata6561 |
| 21 |
- ti,tcan1051 |
| 22 |
- const: ti,tcan1042 |
| 23 |
- items: |
| 24 |
- const: ti,tcan1046 |
| 25 |
- const: nxp,tja1048 |
| 26 |
- enum: |
| 27 |
- ti,tcan1042 |
| 28 |
- ti,tcan1043 |
| 29 |
- nxp,tja1048 |
| 30 |
- nxp,tja1051 |
| 31 |
- nxp,tja1057 |
| 32 |
- nxp,tjr1443 |
| 33 |
|
| 34 |
'#phy-cells': |
| 35 |
enum: [0, 1] |
| 36 |
|
| 37 |
silent-gpios: |
| 38 |
description: |
| 39 |
gpio node to toggle silent signal on transceiver |
| 40 |
maxItems: 1 |
| 41 |
|
| 42 |
standby-gpios: |
| 43 |
description: |
| 44 |
gpio node to toggle standby signal on transceiver. For two Items, item 1 |
| 45 |
is for stbn1, item 2 is for stbn2. |
| 46 |
minItems: 1 |
| 47 |
maxItems: 2 |
| 48 |
|
| 49 |
enable-gpios: |
| 50 |
description: |
| 51 |
gpio node to toggle enable signal on transceiver |
| 52 |
maxItems: 1 |
| 53 |
|
| 54 |
max-bitrate: |
| 55 |
$ref: /schemas/types.yaml#/definitions/uint32 |
| 56 |
description: |
| 57 |
max bit rate supported in bps |
| 58 |
minimum: 1 |
| 59 |
|
| 60 |
mux-states: |
| 61 |
description: |
| 62 |
mux controller node to route the signals from controller to |
| 63 |
transceiver. |
| 64 |
maxItems: 1 |
| 65 |
|
| 66 |
required: |
| 67 |
- compatible |
| 68 |
- '#phy-cells' |
| 69 |
|
| 70 |
allOf: |
| 71 |
- if: |
| 72 |
properties: |
| 73 |
compatible: |
| 74 |
enum: |
| 75 |
- nxp,tjr1443 |
| 76 |
- ti,tcan1042 |
| 77 |
- ti,tcan1043 |
| 78 |
then: |
| 79 |
properties: |
| 80 |
'#phy-cells': |
| 81 |
const: 0 |
| 82 |
silent-gpios: false |
| 83 |
standby-gpios: |
| 84 |
maxItems: 1 |
| 85 |
|
| 86 |
- if: |
| 87 |
properties: |
| 88 |
compatible: |
| 89 |
contains: |
| 90 |
const: nxp,tja1048 |
| 91 |
then: |
| 92 |
properties: |
| 93 |
'#phy-cells': |
| 94 |
const: 1 |
| 95 |
enable-gpios: false |
| 96 |
silent-gpios: false |
| 97 |
standby-gpios: |
| 98 |
minItems: 2 |
| 99 |
|
| 100 |
- if: |
| 101 |
properties: |
| 102 |
compatible: |
| 103 |
contains: |
| 104 |
const: nxp,tja1051 |
| 105 |
then: |
| 106 |
properties: |
| 107 |
'#phy-cells': |
| 108 |
const: 0 |
| 109 |
standby-gpios: false |
| 110 |
|
| 111 |
- if: |
| 112 |
properties: |
| 113 |
compatible: |
| 114 |
contains: |
| 115 |
const: nxp,tja1057 |
| 116 |
then: |
| 117 |
properties: |
| 118 |
'#phy-cells': |
| 119 |
const: 0 |
| 120 |
enable-gpios: false |
| 121 |
standby-gpios: false |
| 122 |
|
| 123 |
additionalProperties: false |
| 124 |
|
| 125 |
examples: |
| 126 |
- | |
| 127 |
#include <dt-bindings/gpio/gpio.h> |
| 128 |
|
| 129 |
transceiver1: can-phy { |
| 130 |
compatible = "ti,tcan1043"; |
| 131 |
#phy-cells = <0>; |
| 132 |
max-bitrate = <5000000>; |
| 133 |
standby-gpios = <&wakeup_gpio1 16 GPIO_ACTIVE_LOW>; |
| 134 |
enable-gpios = <&main_gpio1 67 GPIO_ACTIVE_HIGH>; |
| 135 |
mux-states = <&mux0 1>; |
| 136 |
}; |