Skip to content

Commit e97f098

Browse files
kartbendkalowsk
authored andcommitted
dts: bindings: can: remove deprecated bus-speed properties
Remove the "bus-speed" and "bus-speed-data" CAN controller devicetree properties, deprecated in Zephyr 3.7 when they were renamed to "bitrate" and "bitrate-data". The nested DT_PROP_OR() fallbacks in CAN_DT_DRIVER_CONFIG_GET() collapse to a single DT_PROP_OR() on the new property names. Both bindings and the header must change together, as can-fd-controller.yaml includes can-controller.yaml. Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org> Assisted-by: Claude:opus-5
1 parent c0a8c41 commit e97f098

5 files changed

Lines changed: 11 additions & 20 deletions

File tree

doc/releases/migration-guide-4.5.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ Controller Area Network (CAN)
290290
are processed in the order received on the bus. Out-of-tree users may want to update any
291291
``bosch,mram-cfg`` devicetree property overrides to allocate all FIFO elements to RX FIFO0.
292292

293+
* The deprecated ``bus-speed`` and ``bus-speed-data`` CAN controller devicetree properties have
294+
been removed. Use ``bitrate`` and ``bitrate-data`` instead.
295+
293296
Counter
294297
=======
295298

doc/releases/release-notes-4.5.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ Removed APIs and options
119119
``<board>_<revision>_defconfig``
120120
* Pattern expansion in ``zephyr_code_relocate(FILES ...)``, replaced by ``file(GLOB ...)``
121121

122+
* CAN
123+
124+
* ``bus-speed``
125+
* ``bus-speed-data``
126+
122127
* Comparator
123128

124129
* ``nxp,enable-output-pin``, ``nxp,use-unfiltered-output``, ``nxp,high-speed-mode``,

dts/bindings/can/can-controller.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
include: base.yaml
44

55
properties:
6-
bus-speed:
7-
type: int
8-
deprecated: true
9-
description: |
10-
Deprecated. This property has been renamed to bitrate.
11-
12-
Initial bitrate in bit/s. If this is unset, the initial bitrate is set to
13-
CONFIG_CAN_DEFAULT_BITRATE.
146
bitrate:
157
type: int
168
description: |

dts/bindings/can/can-fd-controller.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
include: can-controller.yaml
44

55
properties:
6-
bus-speed-data:
7-
type: int
8-
deprecated: true
9-
description: |
10-
Deprecated. This property has been renamed to bitrate-data.
11-
12-
Initial data phase bitrate in bit/s. If this is unset, the initial data phase bitrate is set
13-
to CONFIG_CAN_DEFAULT_BITRATE_DATA.
146
bitrate-data:
157
type: int
168
description: |

include/zephyr/drivers/can.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,11 @@ struct can_driver_config {
370370
.phy = DEVICE_DT_GET_OR_NULL(DT_PHANDLE(node_id, phys)), \
371371
.min_bitrate = DT_CAN_TRANSCEIVER_MIN_BITRATE(node_id, _min_bitrate), \
372372
.max_bitrate = DT_CAN_TRANSCEIVER_MAX_BITRATE(node_id, _max_bitrate), \
373-
.bitrate = DT_PROP_OR(node_id, bitrate, \
374-
DT_PROP_OR(node_id, bus_speed, CONFIG_CAN_DEFAULT_BITRATE)), \
373+
.bitrate = DT_PROP_OR(node_id, bitrate, CONFIG_CAN_DEFAULT_BITRATE), \
375374
.sample_point = DT_PROP_OR(node_id, sample_point, 0), \
376375
IF_ENABLED(CONFIG_CAN_FD_MODE, \
377-
(.bitrate_data = DT_PROP_OR(node_id, bitrate_data, \
378-
DT_PROP_OR(node_id, bus_speed_data, CONFIG_CAN_DEFAULT_BITRATE_DATA)), \
376+
(.bitrate_data = DT_PROP_OR(node_id, bitrate_data, \
377+
CONFIG_CAN_DEFAULT_BITRATE_DATA), \
379378
.sample_point_data = DT_PROP_OR(node_id, sample_point_data, 0),)) \
380379
}
381380

0 commit comments

Comments
 (0)