Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: can: convert tcan4x5x.txt to DT schema

Convert binding doc tcan4x5x.txt to yaml.

Added during conversion, required clock-names cclk.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241128-convert-tcan-v3-1-bf2d8005bab5@geanix.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Sean Nyekjaer and committed by
Marc Kleine-Budde
79195755 130727c3

+191 -48
-48
Documentation/devicetree/bindings/net/can/tcan4x5x.txt
··· 1 - Texas Instruments TCAN4x5x CAN Controller 2 - ================================================ 3 - 4 - This file provides device node information for the TCAN4x5x interface contains. 5 - 6 - Required properties: 7 - - compatible: 8 - "ti,tcan4552", "ti,tcan4x5x" 9 - "ti,tcan4553", "ti,tcan4x5x" or 10 - "ti,tcan4x5x" 11 - - reg: 0 12 - - #address-cells: 1 13 - - #size-cells: 0 14 - - spi-max-frequency: Maximum frequency of the SPI bus the chip can 15 - operate at should be less than or equal to 18 MHz. 16 - - interrupt-parent: the phandle to the interrupt controller which provides 17 - the interrupt. 18 - - interrupts: interrupt specification for data-ready. 19 - 20 - See Documentation/devicetree/bindings/net/can/bosch,m_can.yaml for additional 21 - required property details. 22 - 23 - Optional properties: 24 - - reset-gpios: Hardwired output GPIO. If not defined then software 25 - reset. 26 - - device-state-gpios: Input GPIO that indicates if the device is in 27 - a sleep state or if the device is active. Not 28 - available with tcan4552/4553. 29 - - device-wake-gpios: Wake up GPIO to wake up the TCAN device. Not 30 - available with tcan4552/4553. 31 - - wakeup-source: Leave the chip running when suspended, and configure 32 - the RX interrupt to wake up the device. 33 - 34 - Example: 35 - tcan4x5x: tcan4x5x@0 { 36 - compatible = "ti,tcan4x5x"; 37 - reg = <0>; 38 - #address-cells = <1>; 39 - #size-cells = <1>; 40 - spi-max-frequency = <10000000>; 41 - bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>; 42 - interrupt-parent = <&gpio1>; 43 - interrupts = <14 IRQ_TYPE_LEVEL_LOW>; 44 - device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; 45 - device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 46 - reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; 47 - wakeup-source; 48 - };
+191
Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/can/ti,tcan4x5x.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments TCAN4x5x CAN Controller 8 + 9 + maintainers: 10 + - Marc Kleine-Budde <mkl@pengutronix.de> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - items: 16 + - enum: 17 + - ti,tcan4552 18 + - ti,tcan4553 19 + - const: ti,tcan4x5x 20 + - const: ti,tcan4x5x 21 + 22 + reg: 23 + maxItems: 1 24 + 25 + interrupts: 26 + maxItems: 1 27 + description: The GPIO parent interrupt. 28 + 29 + clocks: 30 + maxItems: 1 31 + 32 + clock-names: 33 + items: 34 + - const: cclk 35 + 36 + reset-gpios: 37 + description: Hardwired output GPIO. If not defined then software reset. 38 + maxItems: 1 39 + 40 + device-state-gpios: 41 + description: 42 + Input GPIO that indicates if the device is in a sleep state or if the 43 + device is active. Not available with tcan4552/4553. 44 + maxItems: 1 45 + 46 + device-wake-gpios: 47 + description: 48 + Wake up GPIO to wake up the TCAN device. 49 + Not available with tcan4552/4553. 50 + maxItems: 1 51 + 52 + bosch,mram-cfg: 53 + description: | 54 + Message RAM configuration data. 55 + Multiple M_CAN instances can share the same Message RAM 56 + and each element(e.g Rx FIFO or Tx Buffer and etc) number 57 + in Message RAM is also configurable, so this property is 58 + telling driver how the shared or private Message RAM are 59 + used by this M_CAN controller. 60 + 61 + The format should be as follows: 62 + <offset sidf_elems xidf_elems rxf0_elems rxf1_elems rxb_elems txe_elems txb_elems> 63 + The 'offset' is an address offset of the Message RAM where 64 + the following elements start from. This is usually set to 65 + 0x0 if you're using a private Message RAM. The remain cells 66 + are used to specify how many elements are used for each FIFO/Buffer. 67 + 68 + M_CAN includes the following elements according to user manual: 69 + 11-bit Filter 0-128 elements / 0-128 words 70 + 29-bit Filter 0-64 elements / 0-128 words 71 + Rx FIFO 0 0-64 elements / 0-1152 words 72 + Rx FIFO 1 0-64 elements / 0-1152 words 73 + Rx Buffers 0-64 elements / 0-1152 words 74 + Tx Event FIFO 0-32 elements / 0-64 words 75 + Tx Buffers 0-32 elements / 0-576 words 76 + 77 + Please refer to 2.4.1 Message RAM Configuration in Bosch 78 + M_CAN user manual for details. 79 + $ref: /schemas/types.yaml#/definitions/int32-array 80 + items: 81 + - description: The 'offset' is an address offset of the Message RAM where 82 + the following elements start from. This is usually set to 0x0 if 83 + you're using a private Message RAM. 84 + default: 0 85 + - description: 11-bit Filter 0-128 elements / 0-128 words 86 + minimum: 0 87 + maximum: 128 88 + - description: 29-bit Filter 0-64 elements / 0-128 words 89 + minimum: 0 90 + maximum: 64 91 + - description: Rx FIFO 0 0-64 elements / 0-1152 words 92 + minimum: 0 93 + maximum: 64 94 + - description: Rx FIFO 1 0-64 elements / 0-1152 words 95 + minimum: 0 96 + maximum: 64 97 + - description: Rx Buffers 0-64 elements / 0-1152 words 98 + minimum: 0 99 + maximum: 64 100 + - description: Tx Event FIFO 0-32 elements / 0-64 words 101 + minimum: 0 102 + maximum: 32 103 + - description: Tx Buffers 0-32 elements / 0-576 words 104 + minimum: 0 105 + maximum: 32 106 + minItems: 1 107 + 108 + spi-max-frequency: 109 + description: 110 + Must be half or less of "clocks" frequency. 111 + maximum: 18000000 112 + 113 + wakeup-source: 114 + $ref: /schemas/types.yaml#/definitions/flag 115 + description: 116 + Enable CAN remote wakeup. 117 + 118 + allOf: 119 + - $ref: can-controller.yaml# 120 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 121 + - if: 122 + properties: 123 + compatible: 124 + contains: 125 + enum: 126 + - ti,tcan4552 127 + - ti,tcan4553 128 + then: 129 + properties: 130 + device-state-gpios: false 131 + device-wake-gpios: false 132 + 133 + required: 134 + - compatible 135 + - reg 136 + - interrupts 137 + - clocks 138 + - clock-names 139 + - bosch,mram-cfg 140 + 141 + unevaluatedProperties: false 142 + 143 + examples: 144 + - | 145 + #include <dt-bindings/gpio/gpio.h> 146 + #include <dt-bindings/interrupt-controller/irq.h> 147 + 148 + spi { 149 + #address-cells = <1>; 150 + #size-cells = <0>; 151 + 152 + can@0 { 153 + compatible = "ti,tcan4x5x"; 154 + reg = <0>; 155 + clocks = <&can0_osc>; 156 + clock-names = "cclk"; 157 + pinctrl-names = "default"; 158 + pinctrl-0 = <&can0_pins>; 159 + spi-max-frequency = <10000000>; 160 + bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>; 161 + interrupt-parent = <&gpio1>; 162 + interrupts = <14 IRQ_TYPE_LEVEL_LOW>; 163 + device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; 164 + device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 165 + reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; 166 + wakeup-source; 167 + }; 168 + }; 169 + - | 170 + #include <dt-bindings/gpio/gpio.h> 171 + #include <dt-bindings/interrupt-controller/irq.h> 172 + 173 + spi { 174 + #address-cells = <1>; 175 + #size-cells = <0>; 176 + 177 + can@0 { 178 + compatible = "ti,tcan4552", "ti,tcan4x5x"; 179 + reg = <0>; 180 + clocks = <&can0_osc>; 181 + clock-names = "cclk"; 182 + pinctrl-names = "default"; 183 + pinctrl-0 = <&can0_pins>; 184 + spi-max-frequency = <10000000>; 185 + bosch,mram-cfg = <0x0 0 0 16 0 0 1 1>; 186 + interrupt-parent = <&gpio1>; 187 + interrupts = <14 IRQ_TYPE_LEVEL_LOW>; 188 + reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; 189 + wakeup-source; 190 + }; 191 + };