1:orphan:
2
3.. _migration_3.6:
4
5Migration guide to Zephyr v3.6.0
6################################
7
8This document describes the changes required when migrating your application from Zephyr v3.5.0 to
9Zephyr v3.6.0.
10
11Any other changes (not directly related to migrating applications) can be found in
12the :ref:`release notes<zephyr_3.6>`.
13
14.. contents::
15    :local:
16    :depth: 2
17
18Build System
19************
20
21* The deprecated ``prj_<board>.conf`` Kconfig file support has been removed, projects that use
22  this should switch to using board Kconfig fragments instead (``boards/<board>.conf``).
23
24* Until now ``_POSIX_C_SOURCE``, ``_XOPEN_SOURCE``, and ``_XOPEN_SOURCE_EXTENDED`` were defined
25  globally when building for the native (``ARCH_POSIX``) targets, and ``_POSIX_C_SOURCE`` when
26  building with PicolibC. Since this release, these are set only for the files that need them.
27  If your library or application needed this, you may start getting an "implicit declaration"
28  warning for functions whose prototypes are only exposed if one of these is defined.
29  If so, you can fix it by defining the corresponding macro in your C source file before any
30  include, or by adding the equivalent of
31  ``target_compile_definitions(app PRIVATE _POSIX_C_SOURCE=200809L)`` to your application
32  or ``zephyr_library_compile_definitions(_POSIX_C_SOURCE=200809L)`` to your library.
33
34* Build type by setting ``CONF_FILE`` to ``prj_<build>.conf`` is now deprecated, users should
35  instead use the new ``-DFILE_SUFFIX`` feature :ref:`application-file-suffixes`.
36
37Kernel
38******
39
40* The system heap size and its availability is now determined by a ``K_HEAP_MEM_POOL_SIZE``
41  define instead of the :kconfig:option:`CONFIG_HEAP_MEM_POOL_SIZE` Kconfig option. Subsystems
42  can specify their own custom system heap size requirements by specifying Kconfig options with
43  the prefix ``CONFIG_HEAP_MEM_POOL_ADD_SIZE_``. The old Kconfig option still exists, but will be
44  overridden if the custom requirements are larger. To force the old Kconfig option to be used,
45  even when its value is less than the indicated custom requirements, a new
46  :kconfig:option:`CONFIG_HEAP_MEM_POOL_IGNORE_MIN` option has been introduced (which defaults
47  being disabled).
48
49* STM32H7 and STM32F7 should now activate the cache (Icache and Dcache) by setting explicitly
50  the  ``CONFIG_CACHE_MANAGEMENT`` to ``y``.
51
52Boards
53******
54
55* The deprecated Nordic SoC Kconfig option ``NRF_STORE_REBOOT_TYPE_GPREGRET`` has been removed,
56  applications that use this should switch to using the :ref:`boot_mode_api` instead.
57* NXP: Enabled :ref:`linkserver<linkserver-debug-host-tools>` to be the default runner on the
58  following NXP boards: ``mimxrt685_evk_cm33``, ``frdm_k64f``, ``mimxrt1050_evk``, ``frdm_kl25z``,
59  ``mimxrt1020_evk``, ``mimxrt1015_evk``
60
61Modules
62*******
63
64Optional Modules
65================
66
67The following modules have been made optional and are not downloaded with `west update` by default
68anymore:
69
70* ``canopennode`` (:github:`64139`)
71
72To enable them again use the ``west config manifest.project-filter -- +<module
73name>`` command, or ``west config manifest.group-filter -- +optional`` to
74enable all optional modules, and then run ``west update`` again.
75
76MCUboot
77=======
78
79* MCUboot's deprecated ``CONFIG_ZEPHYR_TRY_MASS_ERASE`` Kconfig option has been removed. If an
80  erase is needed when flashing MCUboot, this should now be provided directly to the ``west``
81  command e.g. ``west flash --erase``. (:github:`64703`)
82
83zcbor
84=====
85
86* If you have zcbor-generated code that relies on the zcbor libraries through Zephyr, you must
87  regenerate the files using zcbor 0.8.1. Note that the names of generated types and members has
88  been overhauled, so the code using the generated code must likely be changed.
89  For example:
90
91  * Leading single underscores and all double underscores are largely gone,
92  * Names sometimes gain suffixes like ``_m`` or ``_l`` for disambiguation.
93  * All enum (choice) names have now gained a ``_c`` suffix, so the enum name no longer matches
94    the corresponding member name exactly (because this broke C++ namespace rules).
95
96* The function :c:func:`zcbor_new_state`, :c:func:`zcbor_new_decode_state` and the macro
97  :c:macro:`ZCBOR_STATE_D` have gained new parameters related to decoding of unordered maps.
98  Unless you are using that new functionality, these can all be set to NULL or 0.
99
100* The functions :c:func:`zcbor_bstr_put_term` and :c:func:`zcbor_tstr_put_term` have gained a new
101  parameter ``maxlen``, referring to the maximum length of the parameter ``str``.
102  This parameter is passed directly to :c:func:`strnlen` under the hood.
103
104* The function :c:func:`zcbor_tag_encode` has been renamed to :c:func:`zcbor_tag_put`.
105
106* Printing has been changed significantly, e.g. :c:func:`zcbor_print` is now called
107  :c:func:`zcbor_log`, and :c:func:`zcbor_trace` with no parameters is gone, and in its place are
108  :c:func:`zcbor_trace_file` and :c:func:`zcbor_trace`, both of which take a ``state`` parameter.
109
110Device Drivers and Devicetree
111*****************************
112
113Devicetree Labels
114=================
115
116* Various deprecated macros related to the deprecated devicetree label property
117  were removed. These are listed in the following table. The table also
118  provides replacements.
119
120  However, if you are still using code like
121  ``device_get_binding(DT_LABEL(node_id))``, consider replacing it with
122  something like ``DEVICE_DT_GET(node_id)`` instead. The ``DEVICE_DT_GET()``
123  macro avoids run-time string comparisons, and is also safer because it will
124  fail the build if the device does not exist.
125
126  .. list-table::
127     :header-rows: 1
128
129     * - Removed macro
130       - Replacement
131
132     * - ``DT_GPIO_LABEL(node_id, gpio_pha)``
133       - ``DT_PROP(DT_GPIO_CTLR(node_id, gpio_pha), label)``
134
135     * - ``DT_GPIO_LABEL_BY_IDX(node_id, gpio_pha, idx)``
136       - ``DT_PROP(DT_GPIO_CTLR_BY_IDX(node_id, gpio_pha, idx), label)``
137
138     * - ``DT_INST_GPIO_LABEL(inst, gpio_pha)``
139       - ``DT_PROP(DT_GPIO_CTLR(DT_DRV_INST(inst), gpio_pha), label)``
140
141     * - ``DT_INST_GPIO_LABEL_BY_IDX(inst, gpio_pha, idx)``
142       - ``DT_PROP(DT_GPIO_CTLR_BY_IDX(DT_DRV_INST(inst), gpio_pha, idx), label)``
143
144     * - ``DT_SPI_DEV_CS_GPIOS_LABEL(spi_dev)``
145       - ``DT_PROP(DT_SPI_DEV_CS_GPIOS_CTLR(spi_dev), label)``
146
147     * - ``DT_INST_SPI_DEV_CS_GPIOS_LABEL(inst)``
148       - ``DT_PROP(DT_SPI_DEV_CS_GPIOS_CTLR(DT_DRV_INST(inst)), label)``
149
150     * - ``DT_LABEL(node_id)``
151       - ``DT_PROP(node_id, label)``
152
153     * - ``DT_BUS_LABEL(node_id)``
154       - ``DT_PROP(DT_BUS(node_id), label)``
155
156     * - ``DT_INST_LABEL(inst)``
157       - ``DT_INST_PROP(inst, label)``
158
159     * - ``DT_INST_BUS_LABEL(inst)``
160       - ``DT_PROP(DT_BUS(DT_DRV_INST(inst)), label)``
161
162Multi-level Interrupts
163======================
164
165* For platforms that enabled :kconfig:option:`CONFIG_MULTI_LEVEL_INTERRUPTS`, the ``IRQ`` variant
166  of the Devicetree macros now return the as-seen value in the devicetree instead of the Zephyr
167  multilevel-encoded IRQ number. To get the IRQ number in Zephyr multilevel-encoded format, use
168  ``IRQN`` variant instead. For example, consider the following devicetree:
169
170  .. code-block:: devicetree
171
172    plic: interrupt-controller@c000000 {
173            riscv,max-priority = <7>;
174            riscv,ndev = <1024>;
175            reg = <0x0c000000 0x04000000>;
176            interrupts-extended = <&hlic0 11>;
177            interrupt-controller;
178            compatible = "sifive,plic-1.0.0";
179            #address-cells = <0x0>;
180            #interrupt-cells = <0x2>;
181    };
182
183    uart0: uart@10000000 {
184            interrupts = <10 1>;
185            interrupt-parent = <&plic>;
186            clock-frequency = <0x384000>;
187            reg = <0x10000000 0x100>;
188            compatible = "ns16550";
189            reg-shift = <0>;
190    };
191
192  ``plic`` is a second level interrupt aggregator and ``uart0`` is a child of ``plic``.
193  ``DT_IRQ_BY_IDX(DT_NODELABEL(uart0), 0, irq)`` will return ``10``
194  (as-seen value in the devicetree), while ``DT_IRQN_BY_IDX(DT_NODELABEL(uart0), 0)`` will return
195  ``(((10 + 1) << CONFIG_1ST_LEVEL_INTERRUPT_BITS) | 11)``.
196
197  Drivers and applications that are supposed to work in multilevel-interrupt configurations should
198  be updated to use the ``IRQN`` variant, i.e.:
199
200  * ``DT_IRQ(node_id, irq)`` -> ``DT_IRQN(node_id)``
201  * ``DT_IRQ_BY_IDX(node_id, idx, irq)`` -> ``DT_IRQN_BY_IDX(node_id, idx)``
202  * ``DT_IRQ_BY_NAME(node_id, name, irq)`` -> ``DT_IRQN_BY_NAME(node_id, name)``
203  * ``DT_INST_IRQ(inst, irq)`` -> ``DT_INST_IRQN(inst)``
204  * ``DT_INST_IRQ_BY_IDX(inst, idx, irq)`` -> ``DT_INST_IRQN_BY_IDX(inst, idx)``
205  * ``DT_INST_IRQ_BY_NAME(inst, name, irq)`` -> ``DT_INST_IRQN_BY_NAME(inst, name)``
206
207Analog-to-Digital Converter (ADC)
208=================================
209
210* The io-channel cells of the following devicetree bindings were reduced from 2 (``positive`` and
211  ``negative``) to the common ``input``, making it possible to use the various ADC DT macros with TI
212  LMP90xxx ADC devices:
213
214  * :dtcompatible:`ti,lmp90077`
215  * :dtcompatible:`ti,lmp90078`
216  * :dtcompatible:`ti,lmp90079`
217  * :dtcompatible:`ti,lmp90080`
218  * :dtcompatible:`ti,lmp90097`
219  * :dtcompatible:`ti,lmp90098`
220  * :dtcompatible:`ti,lmp90099`
221  * :dtcompatible:`ti,lmp90100`
222
223* The io-channel cells of the :dtcompatible:`microchip,mcp3204` and
224  :dtcompatible:`microchip,mcp3208` devicetree bindings were renamed from ``channel`` to the common
225  ``input``, making it possible to use the various ADC DT macros with Microchip MCP320x ADC devices.
226
227Bluetooth HCI
228=============
229
230* The optional :c:func:`setup()` function in the Bluetooth HCI driver API (enabled through
231  :kconfig:option:`CONFIG_BT_HCI_SETUP`) has gained a function parameter of type
232  :c:struct:`bt_hci_setup_params`. By default, the struct is empty, but drivers can opt-in to
233  :kconfig:option:`CONFIG_BT_HCI_SET_PUBLIC_ADDR` if they support setting the controller's public
234  identity address, which will then be passed in the ``public_addr`` field.
235
236  (:github:`62994`)
237
238* The :dtcompatible:`st,hci-spi-v1` should be used instead of :dtcompatible:`zephyr,bt-hci-spi`
239  for the boards which are based on ST BlueNRG-MS.
240
241Controller Area Network (CAN)
242=============================
243
244* The native Linux SocketCAN driver, which can now be used in both :ref:`native_posix<native_posix>`
245  and :ref:`native_sim<native_sim>` with or without an embedded C-library, has been renamed to
246  reflect this:
247
248  * The devicetree compatible was renamed from ``zephyr,native-posix-linux-can`` to
249    :dtcompatible:`zephyr,native-linux-can`.
250  * The main Kconfig option was renamed from ``CONFIG_CAN_NATIVE_POSIX_LINUX`` to
251    :kconfig:option:`CONFIG_CAN_NATIVE_LINUX`.
252
253* Two new structures for holding common CAN controller driver configuration (``struct
254  can_driver_config``) and data (``struct can_driver_data``) fields were introduced. Out-of-tree CAN
255  controller drivers need to be updated to use these new, common configuration and data structures
256  along with their initializer macros.
257
258* The optional ``can_get_max_bitrate_t`` CAN controller driver callback was removed in favor of a
259  common accessor function. Out-of-tree CAN controller drivers need to be updated to no longer
260  supply this callback.
261
262* The CAN transceiver API function :c:func:`can_transceiver_enable` now takes a :c:type:`can_mode_t`
263  argument for propagating the CAN controller operational mode to the CAN transceiver. Out-of-tree
264  CAN controller and CAN transceiver drivers need to be updated to match this new API function
265  signature.
266
267* The ``CAN_FILTER_FDF`` flag for filtering classic CAN/CAN FD frames was removed since no known CAN
268  controllers implement support for this. Applications can still filter on classic CAN/CAN FD frames
269  in their receive callback functions as needed.
270
271* The ``CAN_FILTER_DATA`` and ``CAN_FILTER_RTR`` flags for filtering between Data and Remote
272  Transmission Request (RTR) frames were removed since not all CAN controllers implement support for
273  individual RX filtering based on the RTR bit. Applications can now use
274  :kconfig:option:`CONFIG_CAN_ACCEPT_RTR` to either accept incoming RTR frames matching CAN filters
275  or reject all incoming CAN RTR frames (the default). When :kconfig:option:`CONFIG_CAN_ACCEPT_RTR`
276  is enabled, applications can still filter between Data and RTR frames in their receive callback
277  functions as needed.
278
279* The :dtcompatible:`st,stm32h7-fdcan` CAN controller driver now supports configuring the
280  domain/kernel clock via devicetree. Previously, the driver only supported using the PLL1_Q clock
281  for kernel clock, but now it defaults to the HSE clock, which is the chip default. Boards that
282  use the PLL1_Q clock for FDCAN will need to override the ``clocks`` property as follows:
283
284  .. code-block:: devicetree
285
286    &fdcan1 {
287            clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000100>,
288                     <&rcc STM32_SRC_PLL1_Q FDCAN_SEL(1)>;
289    };
290
291Display
292=======
293
294* ILI9XXX based displays now use the MIPI DBI driver class. These displays
295  must now be declared within a MIPI DBI driver wrapper device, which will
296  manage interfacing with the display. Note that the `cmd-data-gpios` pin has
297  changed polarity with this update, to align better with the new
298  `dc-gpios` name. For an example, see below:
299
300  .. code-block:: devicetree
301
302    /* Legacy ILI9XXX display definition */
303    &spi2 {
304        ili9340: ili9340@0 {
305            compatible = "ilitek,ili9340";
306            reg = <0>;
307            spi-max-frequency = <32000000>;
308            reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
309            cmd-data-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
310            rotation = <270>;
311            width = <320>;
312            height = <240>;
313        };
314    };
315
316    /* New display definition with MIPI DBI device */
317
318    mipi_dbi {
319        compatible = "zephyr,mipi-dbi-spi";
320        reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
321        dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
322        spi-dev = <&spi2>;
323        #address-cells = <1>;
324        #size-cells = <0>;
325
326        ili9340: ili9340@0 {
327            compatible = "ilitek,ili9340";
328            reg = <0>;
329            mipi-max-frequency = <32000000>;
330            rotation = <270>;
331            width = <320>;
332            height = <240>;
333        };
334    };
335
336Flash
337=====
338
339* The :dtcompatible:`st,stm32-ospi-nor` and :dtcompatible:`st,stm32-qspi-nor` give the nor flash
340  base address and size (in Bytes) with the **reg** property as follows.
341  The <size> property is not used anymore.
342
343  .. code-block:: devicetree
344
345    mx25lm51245: ospi-nor-flash@70000000 {
346            compatible = "st,stm32-ospi-nor";
347            reg = <0x70000000 DT_SIZE_M(64)>; /* 512 Mbits*/
348    };
349
350General Purpose I/O (GPIO)
351==========================
352
353* The :dtcompatible:`nxp,pcf8574` driver has been renamed to
354  :dtcompatible:`nxp,pcf857x`. (:github:`67054`) to support pcf8574 and pcf8575.
355  The Kconfig option has been renamed from :kconfig:option:`CONFIG_GPIO_PCF8574` to
356  :kconfig:option:`CONFIG_GPIO_PCF857X`.
357  The Device Tree can be configured as follows:
358
359  .. code-block:: devicetree
360
361    &i2c {
362      status = "okay";
363      pcf8574: pcf857x@20 {
364          compatible = "nxp,pcf857x";
365          status = "okay";
366          reg = <0x20>;
367          gpio-controller;
368          #gpio-cells = <2>;
369          ngpios = <8>;
370      };
371
372      pcf8575: pcf857x@21 {
373          compatible = "nxp,pcf857x";
374          status = "okay";
375          reg = <0x21>;
376          gpio-controller;
377          #gpio-cells = <2>;
378          ngpios = <16>;
379      };
380    };
381
382Input
383=====
384
385* Touchscreen drivers :dtcompatible:`focaltech,ft5336` and
386  :dtcompatible:`goodix,gt911` were using the incorrect polarity for the
387  respective ``reset-gpios``. This has been fixed so those signals now have to
388  be flagged as :c:macro:`GPIO_ACTIVE_LOW` in the devicetree. (:github:`64800`)
389
390Interrupt Controller
391====================
392
393* The function signature of the ``isr_t`` callback function passed to the ``shared_irq``
394  interrupt controller driver API via :c:func:`shared_irq_isr_register()` has changed.
395  The callback now takes an additional `irq_number` parameter. Out-of-tree users of
396  this API will need to be updated.
397
398  (:github:`66427`)
399
400Renesas RA Series Drivers
401=========================
402
403* Several Renesas RA series drivers Kconfig options have been renamed:
404
405  * ``CONFIG_CLOCK_CONTROL_RA`` -> :kconfig:option:`CONFIG_CLOCK_CONTROL_RENESAS_RA`
406  * ``CONFIG_GPIO_RA`` -> :kconfig:option:`CONFIG_GPIO_RENESAS_RA`
407  * ``CONFIG_PINCTRL_RA`` -> :kconfig:option:`CONFIG_PINCTRL_RENESAS_RA`
408  * ``CONFIG_UART_RA`` -> :kconfig:option:`CONFIG_UART_RENESAS_RA`
409
410Sensors
411=======
412
413* The :dtcompatible:`st,lsm6dsv16x` sensor driver has been changed to support
414  configuration of both int1 and int2 pins. The DT attribute ``irq-gpios`` has been
415  removed and substituted by two new attributes, ``int1-gpios`` and ``int2-gpios``.
416  These attributes must be configured in the Device Tree similarly to the following
417  example:
418
419  .. code-block:: devicetree
420
421    / {
422        lsm6dsv16x@0 {
423            compatible = "st,lsm6dsv16x";
424
425            int1-gpios = <&gpioa 4 GPIO_ACTIVE_HIGH>;
426            int2-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
427            drdy-pin = <2>;
428        };
429    };
430
431Serial
432======
433
434* Runtime configuration is now disabled by default for Nordic UART drivers. The motivation for the
435  change is that this feature is rarely used and disabling it significantly reduces the memory
436  footprint.
437
438Timer
439=====
440
441* The :dtcompatible:`st,stm32-lptim` lptim which is selected for counting ticks during
442  low power modes is identified by **stm32_lp_tick_source** in the device tree as follows.
443  The stm32_lptim_timer driver has been changed to support this.
444
445  .. code-block:: devicetree
446
447    stm32_lp_tick_source: &lptim1 {
448            status = "okay";
449    };
450
451Bluetooth
452*********
453
454* ATT now has its own TX buffer pool.
455  If extra ATT buffers were configured using :kconfig:option:`CONFIG_BT_L2CAP_TX_BUF_COUNT`,
456  they now instead should be configured through :kconfig:option:`CONFIG_BT_ATT_TX_COUNT`.
457* The HCI implementation for both the Host and the Controller sides has been
458  renamed for the IPC transport. The ``CONFIG_BT_RPMSG`` Kconfig option is now
459  :kconfig:option:`CONFIG_BT_HCI_IPC`, and the ``zephyr,bt-hci-rpmsg-ipc``
460  Devicetree chosen is now ``zephyr,bt-hci-ipc``. The existing sample has also
461  been renamed, from ``samples/bluetooth/hci_rpmsg`` to
462  ``samples/bluetooth/hci_ipc``. (:github:`64391`)
463* The BT GATT callback list, appended to by :c:func:`bt_gatt_cb_register`, is no longer
464  cleared on :c:func:`bt_enable`. Callbacks can now be registered before the initial
465  call to :c:func:`bt_enable`, and should no longer be re-registered after a :c:func:`bt_disable`
466  :c:func:`bt_enable` cycle. (:github:`63693`)
467* The Bluetooth UUID has been modified to rodata in ``BT_UUID_DECLARE_16``, ``BT_UUID_DECLARE_32``
468  and ``BT_UUID_DECLARE_128`` as the return value has been changed to ``const``.
469  Any pointer to a UUID must be prefixed with ``const``, otherwise there will be a compilation
470  warning. For example change ``struct bt_uuid *uuid = BT_UUID_DECLARE_16(xx)`` to
471  ``const struct bt_uuid *uuid = BT_UUID_DECLARE_16(xx)``. (:github:`66136`)
472* The :c:func:`bt_l2cap_chan_send` API no longer allocates buffers from the same pool as its `buf`
473  parameter when segmenting SDUs into PDUs. In order to reproduce the previous behavior, the
474  application should register the `alloc_seg` channel callback and allocate from the same pool as
475  `buf`.
476* The :c:func:`bt_l2cap_chan_send` API now requires the application to reserve
477  enough bytes for the L2CAP headers. Call ``net_buf_reserve(buf,
478  BT_L2CAP_SDU_CHAN_SEND_RESERVE);`` at buffer allocation time to do so.
479* `BT_ISO_TIMESTAMP_NONE` has been removed and the `ts` parameter of :c:func:`bt_iso_chan_send` has
480  as well. :c:func:`bt_iso_chan_send` now always sends without timestamp. To send with a timestamp,
481  :c:func:`bt_iso_chan_send_ts` can be used.
482* The ``CONFIG_BT_HCI_RESERVE`` and ``CONFIG_BT_HCI_RAW_RESERVE`` Kconfig options were removed. All
483  buffers get by default one byte of headroom now, which HCI transport implementations can rely on
484  (whether they need it or not).
485
486Bluetooth Mesh
487==============
488
489  * The Bluetooth Mesh ``model`` declaration has been changed to add prefix ``const``.
490    The ``model->user_data``, ``model->elem_idx`` and ``model->mod_idx`` field has been changed to
491    the new runtime structure, replaced by ``model->rt->user_data``, ``model->rt->elem_idx`` and
492    ``model->rt->mod_idx`` separately. (:github:`65152`)
493  * The Bluetooth Mesh ``element`` declaration has been changed to add prefix ``const``.
494    The ``elem->addr`` field has been changed to the new runtime structure, replaced by
495    ``elem->rt->addr``. (:github:`65388`)
496  * Deprecated :kconfig:option:`CONFIG_BT_MESH_PROV_DEVICE`. This option is
497    replaced by new option :kconfig:option:`CONFIG_BT_MESH_PROVISIONEE` to
498    be aligned with Mesh Protocol Specification v1.1, section 5.4. (:github:`64252`)
499  * Removed the ``CONFIG_BT_MESH_V1d1`` Kconfig option.
500  * Removed the ``CONFIG_BT_MESH_TX_SEG_RETRANS_COUNT``,
501    ``CONFIG_BT_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST``,
502    ``CONFIG_BT_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP``, ``CONFIG_BT_MESH_SEG_ACK_BASE_TIMEOUT``,
503    ``CONFIG_BT_MESH_SEG_ACK_PER_HOP_TIMEOUT``, ``BT_MESH_SEG_ACK_PER_SEGMENT_TIMEOUT``
504    Kconfig options. They are superseded by the
505    :kconfig:option:`CONFIG_BT_MESH_SAR_TX_SEG_INT_STEP`,
506    :kconfig:option:`CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_COUNT`,
507    :kconfig:option:`CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_WITHOUT_PROG_COUNT`,
508    :kconfig:option:`CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_INT_STEP`,
509    :kconfig:option:`CONFIG_BT_MESH_SAR_TX_UNICAST_RETRANS_INT_INC`,
510    :kconfig:option:`CONFIG_BT_MESH_SAR_TX_MULTICAST_RETRANS_COUNT`,
511    :kconfig:option:`CONFIG_BT_MESH_SAR_TX_MULTICAST_RETRANS_INT`,
512    :kconfig:option:`CONFIG_BT_MESH_SAR_RX_SEG_THRESHOLD`,
513    :kconfig:option:`CONFIG_BT_MESH_SAR_RX_ACK_DELAY_INC`,
514    :kconfig:option:`CONFIG_BT_MESH_SAR_RX_SEG_INT_STEP`,
515    :kconfig:option:`CONFIG_BT_MESH_SAR_RX_DISCARD_TIMEOUT`,
516    :kconfig:option:`CONFIG_BT_MESH_SAR_RX_ACK_RETRANS_COUNT` Kconfig options.
517
518Bluetooth Audio
519===============
520
521  * The ``BT_AUDIO_CODEC_LC3_*`` values from ``<zephyr/bluetooth/audio/lc3.h>`` have moved to
522    ``<zephyr/bluetooth/audio/audio.h>`` and have the ``LC3`` part of their names replaced by a
523    more semantically correct name: e.g.
524    ``BT_AUDIO_CODEC_LC3_CHAN_COUNT`` is now ``BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT``,
525    ``BT_AUDIO_CODEC_LC3_FREQ`` is now ``BT_AUDIO_CODEC_CAP_TYPE_FREQ``, and
526    ``BT_AUDIO_CODEC_CONFIG_LC3_FREQ`` is now ``BT_AUDIO_CODEC_CFG_FREQ``, etc.
527    Similarly the enumerations have also been renamed.
528    E.g. ``bt_audio_codec_config_freq`` is now ``bt_audio_codec_cfg_freq``,
529    ``bt_audio_codec_capability_type`` is now ``bt_audio_codec_cap_type``,
530    ``bt_audio_codec_config_type`` is now ``bt_audio_codec_cfg_type``, etc. (:github:`67024`)
531  * The `ts` parameter of :c:func:`bt_bap_stream_send` has been removed.
532    :c:func:`bt_bap_stream_send` now always sends without timestamp.
533    To send with a timestamp, :c:func:`bt_bap_stream_send_ts` can be used.
534  * The `ts` parameter of :c:func:`bt_cap_stream_send` has been removed.
535    :c:func:`bt_cap_stream_send` now always sends without timestamp.
536    To send with a timestamp, :c:func:`bt_cap_stream_send_ts` can be used.
537
538Networking
539**********
540
541* The CoAP public API has some minor changes to take into account. The
542  :c:func:`coap_remove_observer` now returns a result if the observer was removed. This
543  change is used by the newly introduced :ref:`coap_server_interface` subsystem. Also, the
544  ``request`` argument for :c:func:`coap_well_known_core_get` is made ``const``.
545  (:github:`64265`)
546
547* CoAP observer events have moved from a callback function in a CoAP resource to the Network Events
548  subsystem. The ``CONFIG_COAP_OBSERVER_EVENTS`` configuration option has been removed.
549  (:github:`65936`)
550
551* The CoAP public API function :c:func:`coap_pending_init` has changed. The parameter
552  ``retries`` is replaced with a pointer to :c:struct:`coap_transmission_parameters`. This allows to
553  specify retransmission parameters of the confirmable message. It is safe to pass a NULL pointer to
554  use default values.
555  (:github:`66482`)
556
557* The CoAP public API functions :c:func:`coap_service_send` and :c:func:`coap_resource_send` have
558  changed. An additional parameter pointer to :c:struct:`coap_transmission_parameters` has been
559  added. It is safe to pass a NULL pointer to use default values. (:github:`66540`)
560
561* The IGMP multicast library now supports IGMPv3. This results in a minor change to the existing
562  api. The :c:func:`net_ipv4_igmp_join` now takes an additional argument of the type
563  ``const struct igmp_param *param``. This allows IGMPv3 to exclude/include certain groups of
564  addresses. If this functionality is not used or available (when using IGMPv2), you can safely pass
565  a NULL pointer. IGMPv3 can be enabled using the Kconfig ``CONFIG_NET_IPV4_IGMPV3``.
566  (:github:`65293`)
567
568* The network stack now uses a separate IPv4 TTL (time-to-live) value for multicast packets.
569  Before, the same TTL value was used for unicast and multicast packets.
570  The IPv6 hop limit value is also changed so that unicast and multicast packets can have a
571  different one. (:github:`65886`)
572
573* The Ethernet phy APIs defined in ``<zephyr/net/phy.h>`` are removed from syscall list.
574  The APIs were marked as callable from usermode but in practice this does not work as the device
575  cannot be accessed from usermode thread. This means that the API calls will need to made
576  from supervisor mode thread.
577
578* The zperf ratio between mbps and kbps, kbps and bps is changed to 1000, instead of 1024,
579  to align with iperf ratios.
580
581* For network buffer pools maximum allocation size was added to a common structure
582  ``struct net_buf_data_alloc`` as a new field ``max_alloc_size``. Similar member ``data_size`` of
583  ``struct net_buf_pool_fixed`` that was specific only for buffer pools with a fixed size was
584  removed.
585
586Other Subsystems
587****************
588
589LoRaWAN
590=======
591
592* The API to register a callback to provide battery level information to the LoRaWAN stack has been
593  renamed from ``lorawan_set_battery_level_callback`` to
594  :c:func:`lorawan_register_battery_level_callback` and the return type is now ``void``. This
595  is more consistent with similar functions for downlink and data rate changed callbacks.
596  (:github:`65103`)
597
598MCUmgr
599======
600
601* MCUmgr applications that make use of serial transports (shell or UART) must now select
602  :kconfig:option:`CONFIG_CRC`, this was previously erroneously selected if MCUmgr was enabled,
603  when for non-serial transports it was not needed. (:github:`64078`)
604
605Shell
606=====
607
608* The following subsystem and driver shell modules are now disabled by default. Each required shell
609  module must now be explicitly enabled via Kconfig (:github:`65307`):
610
611  * :kconfig:option:`CONFIG_ACPI_SHELL`
612  * :kconfig:option:`CONFIG_ADC_SHELL`
613  * :kconfig:option:`CONFIG_AUDIO_CODEC_SHELL`
614  * :kconfig:option:`CONFIG_CAN_SHELL`
615  * :kconfig:option:`CONFIG_CLOCK_CONTROL_NRF_SHELL`
616  * :kconfig:option:`CONFIG_DAC_SHELL`
617  * :kconfig:option:`CONFIG_DEBUG_COREDUMP_SHELL`
618  * :kconfig:option:`CONFIG_EDAC_SHELL`
619  * :kconfig:option:`CONFIG_EEPROM_SHELL`
620  * :kconfig:option:`CONFIG_FLASH_SHELL`
621  * :kconfig:option:`CONFIG_HWINFO_SHELL`
622  * :kconfig:option:`CONFIG_I2C_SHELL`
623  * :kconfig:option:`CONFIG_LOG_CMDS`
624  * :kconfig:option:`CONFIG_LORA_SHELL`
625  * :kconfig:option:`CONFIG_MCUBOOT_SHELL`
626  * :kconfig:option:`CONFIG_MDIO_SHELL`
627  * :kconfig:option:`CONFIG_OPENTHREAD_SHELL`
628  * :kconfig:option:`CONFIG_PCIE_SHELL`
629  * :kconfig:option:`CONFIG_PSCI_SHELL`
630  * :kconfig:option:`CONFIG_PWM_SHELL`
631  * :kconfig:option:`CONFIG_REGULATOR_SHELL`
632  * :kconfig:option:`CONFIG_SENSOR_SHELL`
633  * :kconfig:option:`CONFIG_SMBUS_SHELL`
634  * :kconfig:option:`CONFIG_STATS_SHELL`
635  * :kconfig:option:`CONFIG_USBD_SHELL`
636  * :kconfig:option:`CONFIG_USBH_SHELL`
637  * :kconfig:option:`CONFIG_W1_SHELL`
638  * :kconfig:option:`CONFIG_WDT_SHELL`
639
640* The ``SHELL_UART_DEFINE`` macro now only requires a ``_name`` argument. In the meantime, the
641  macro accepts additional arguments (ring buffer TX & RX size arguments) for compatibility with
642  previous Zephyr version, but they are ignored, and will be removed in future release.
643
644* :kconfig:option:`CONFIG_SHELL_BACKEND_SERIAL_API` now does not automatically default to
645  :kconfig:option:`CONFIG_SHELL_BACKEND_SERIAL_API_ASYNC` when
646  :kconfig:option:`CONFIG_UART_ASYNC_API` is enabled, :kconfig:option:`CONFIG_SHELL_ASYNC_API`
647  also has to be enabled in order to use the asynchronous serial shell (:github:`68475`).
648
649ZBus
650====
651
652* The ``CONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_DYNAMIC`` and
653  ``CONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_STATIC`` zbus options are renamed. Instead, the new
654  :kconfig:option:`CONFIG_ZBUS_MSG_SUBSCRIBER_BUF_ALLOC_DYNAMIC` and
655  :kconfig:option:`CONFIG_ZBUS_MSG_SUBSCRIBER_BUF_ALLOC_STATIC` options should be used.
656  (:github:`65632`)
657
658* To enable the zbus HLP priority boost, the developer must call the
659  :c:func:`zbus_obs_attach_to_thread` inside the attaching thread. The observer will then assume the
660  attached thread priority which will be used by zbus to calculate HLP priority. (:github:`63183`)
661
662Userspace
663*********
664
665* A number of userspace related functions have been moved out of the ``z_`` namespace
666  and into the kernel namespace.
667
668  * ``Z_OOPS`` to :c:macro:`K_OOPS`
669  * ``Z_SYSCALL_MEMORY`` to :c:macro:`K_SYSCALL_MEMORY`
670  * ``Z_SYSCALL_MEMORY_READ`` to :c:macro:`K_SYSCALL_MEMORY_READ`
671  * ``Z_SYSCALL_MEMORY_WRITE`` to :c:macro:`K_SYSCALL_MEMORY_WRITE`
672  * ``Z_SYSCALL_DRIVER_OP`` to :c:macro:`K_SYSCALL_DRIVER_OP`
673  * ``Z_SYSCALL_SPECIFIC_DRIVER`` to :c:macro:`K_SYSCALL_SPECIFIC_DRIVER`
674  * ``Z_SYSCALL_OBJ`` to :c:macro:`K_SYSCALL_OBJ`
675  * ``Z_SYSCALL_OBJ_INIT`` to :c:macro:`K_SYSCALL_OBJ_INIT`
676  * ``Z_SYSCALL_OBJ_NEVER_INIT`` to :c:macro:`K_SYSCALL_OBJ_NEVER_INIT`
677  * ``z_user_from_copy`` to :c:func:`k_usermode_from_copy`
678  * ``z_user_to_copy`` to :c:func:`k_usermode_to_copy`
679  * ``z_user_string_copy`` to :c:func:`k_usermode_string_copy`
680  * ``z_user_string_alloc_copy`` to :c:func:`k_usermode_string_alloc_copy`
681  * ``z_user_alloc_from_copy`` to :c:func:`k_usermode_alloc_from_copy`
682  * ``z_user_string_nlen`` to :c:func:`k_usermode_string_nlen`
683  * ``z_dump_object_error`` to :c:func:`k_object_dump_error`
684  * ``z_object_validate`` to :c:func:`k_object_validate`
685  * ``z_object_find`` to :c:func:`k_object_find`
686  * ``z_object_wordlist_foreach`` to :c:func:`k_object_wordlist_foreach`
687  * ``z_thread_perms_inherit`` to :c:func:`k_thread_perms_inherit`
688  * ``z_thread_perms_set`` to :c:func:`k_thread_perms_set`
689  * ``z_thread_perms_clear`` to :c:func:`k_thread_perms_clear`
690  * ``z_thread_perms_all_clear`` to :c:func:`k_thread_perms_all_clear`
691  * ``z_object_uninit`` to :c:func:`k_object_uninit`
692  * ``z_object_recycle`` to :c:func:`k_object_recycle`
693  * ``z_obj_validation_check`` to :c:func:`k_object_validation_check`
694  * ``Z_SYSCALL_VERIFY_MSG`` to :c:macro:`K_SYSCALL_VERIFY_MSG`
695  * ``z_object`` to :c:struct:`k_object`
696  * ``z_object_init`` to :c:func:`k_object_init`
697  * ``z_dynamic_object_aligned_create`` to :c:func:`k_object_create_dynamic_aligned`
698
699Architectures
700*************
701
702Xtensa
703======
704
705* :kconfig:option:`CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC` no longer has a default in
706  the architecture layer. Instead, SoCs or boards will need to define it.
707
708* Scratch registers ``ZSR_ALLOCA`` has been renamed to ``ZSR_A0SAVE``.
709
710* Renamed files with hyhphens to underscores:
711
712  * ``xtensa-asm2-context.h`` to ``xtensa_asm2_context.h``
713
714  * ``xtensa-asm2-s.h`` to ``xtensa_asm2_s.h``
715
716* ``xtensa_asm2.h`` has been removed. Use ``xtensa_asm2_context.h`` instead for
717  stack frame structs.
718
719* Renamed functions out of ``z_`` namespace into ``xtensa_`` namespace.
720
721  * ``z_xtensa_irq_enable`` to :c:func:`xtensa_irq_enable`
722
723  * ``z_xtensa_irq_disable`` to :c:func:`xtensa_irq_disable`
724
725  * ``z_xtensa_irq_is_enabled`` to :c:func:`xtensa_irq_is_enabled`
726