1:orphan:
2
3.. _migration_3.7:
4
5Migration guide to Zephyr v3.7.0
6################################
7
8This document describes the changes required when migrating your application from Zephyr v3.6.0 to
9Zephyr v3.7.0.
10
11Any other changes (not directly related to migrating applications) can be found in
12the :ref:`release notes<zephyr_3.7>`.
13
14.. contents::
15    :local:
16    :depth: 2
17
18Build System
19************
20
21* Completely overhauled the way SoCs and boards are defined. This requires all
22  out-of-tree SoCs and boards to be ported to the new model. See the
23  :ref:`hw_model_v2` for more detailed information. (:github:`69607`)
24
25* The following build-time generated headers:
26
27  .. list-table::
28     :header-rows: 1
29
30     * - Affected header files
31     * - ``app_version.h``
32     * - ``autoconf.h``
33     * - ``cmake_intdef.h``
34     * - ``core-isa-dM.h``
35     * - ``devicetree_generated.h``
36     * - ``driver-validation.h``
37     * - ``kobj-types-enum.h``
38     * - ``linker-kobject-prebuilt-data.h``
39     * - ``linker-kobject-prebuilt-priv-stacks.h``
40     * - ``linker-kobject-prebuilt-rodata.h``
41     * - ``mcuboot_version.h``
42     * - ``offsets.h``
43     * - ``otype-to-size.h``
44     * - ``otype-to-str.h``
45     * - ``strerror_table.h``
46     * - ``strsignal_table.h``
47     * - ``syscall_list.h``
48     * - ``version.h``
49     * - ``zsr.h``
50
51  as well as syscall headers & sources are now namespaced into the ``zephyr/`` folder. The change is largely
52  automated, and the script can be found in :github:`63973`.
53  For the time being, the compatibility Kconfig (:kconfig:option:`CONFIG_LEGACY_GENERATED_INCLUDE_PATH`)
54  is enabled by default so that downstream applications will continue to compile, a warning message
55  will be generated during CMake configuration time.
56  This Kconfig will be deprecated and eventually removed in the future, developers are advised to
57  update the include paths of these affected headers as soon as possible.
58
59Kernel
60******
61
62* All architectures are now required to define the new ``struct arch_esf``, which describes the members
63  of a stack frame. This new struct replaces the named struct ``z_arch_esf_t``. (:github:`73593`)
64
65* The named struct ``z_arch_esf_t`` is now deprecated. Use ``struct arch_esf`` instead. (:github:`73593`)
66
67* The header file :zephyr_file:`include/zephyr/arch/arch_interface.h` has been moved from
68  ``include/zephyr/sys/`` into ``include/zephyr/arch/``. Out-of-tree source files will need to
69  update the include path. (:github:`64987`)
70
71Boards
72******
73
74* Reordered D1 and D0 in the ``pro_micro`` connector gpio-map for SparkFun Pro Micro RP2040 to match
75  original Pro Micro definition. Out-of-tree shields must be updated to reflect this change. (:github:`69994`)
76* ITE: Rename all SoC variant Kconfig options, e.g., ``CONFIG_SOC_IT82202_AX`` is renamed to
77  :kconfig:option:`CONFIG_SOC_IT82202AX`.
78  All symbols are renamed as follows: ``SOC_IT81202BX``, ``SOC_IT81202CX``, ``SOC_IT81302BX``,
79  ``SOC_IT81302CX``, ``SOC_IT82002AW``, ``SOC_IT82202AX``, ``SOC_IT82302AX``.
80  And, rename the ``SOC_SERIES_ITE_IT8XXX2`` to ``SOC_SERIES_IT8XXX2``. (:github:`71680`)
81* For native_sim/posix: :kconfig:option:`CONFIG_EMUL` is no longer enabled by default when
82  :kconfig:option:`CONFIG_I2C` is set. Users who need this setting enabled should set it in
83  their project config file. (:github:`73067`)
84
85* LiteX: Renamed the ``compatible`` of the LiteX VexRiscV interrupt controller node from
86  ``vexriscv-intc0`` to :dtcompatible:`litex,vexriscv-intc0`. (:github:`73211`)
87
88* ``lairdconnect`` boards are now ``ezurio`` boards. Laird Connectivity has rebranded to `Ezurio <https://www.ezurio.com/laird-connectivity>`_.
89
90Modules
91*******
92
93Mbed TLS
94========
95
96* TLS 1.2, RSA, AES, DES, and all the hash algorithms except SHA-256
97  (SHA-224, SHA-384, SHA-512, MD5 and SHA-1) are not enabled by default anymore.
98  Their respective Kconfig options now need to be explicitly enabled to be able to use them.
99  (:github:`72078`)
100* The Kconfig options previously named ``CONFIG_MBEDTLS_MAC_*_ENABLED`` have been renamed.
101  The ``_MAC`` and ``_ENABLED`` parts have been removed from their names. (:github:`73267`)
102* The :kconfig:option:`CONFIG_MBEDTLS_HASH_ALL_ENABLED` Kconfig option has been fixed to actually
103  enable all the available hash algorithms. Previously, it used to only enable the SHA-2 ones.
104  (:github:`73267`)
105* The ``CONFIG_MBEDTLS_HASH_SHA*_ENABLED`` Kconfig options have been removed. They were duplicates
106  of other Kconfig options which are now named ``CONFIG_MBEDTLS_SHA*``. (:github:`73267`)
107* The ``CONFIG_MBEDTLS_MAC_ALL_ENABLED`` Kconfig option has been removed. Its equivalent is the
108  combination of :kconfig:option:`CONFIG_MBEDTLS_HASH_ALL_ENABLED` and :kconfig:option:`CONFIG_MBEDTLS_CMAC`.
109  (:github:`73267`)
110* The Kconfig options ``CONFIG_MBEDTLS_MAC_MD4_ENABLED``, ``CONFIG_MBEDTLS_CIPHER_ARC4_ENABLED``
111  and ``CONFIG_MBEDTLS_CIPHER_BLOWFISH_ENABLED`` were removed because they are no more supported
112  in Mbed TLS. (:github:`73222`)
113* When there is any PSA crypto provider available in the system
114  (i.e. :kconfig:option:`CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT` is set), desired PSA crypto
115  features must be explicitly enabled using proper ``CONFIG_PSA_WANT_*``. (:github:`72243`)
116* TLS/X509/PK/MD modules will use PSA crypto APIs instead of legacy ones as soon
117  as there is any PSA crypto provider available in the system
118  (i.e. :kconfig:option:`CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT` is set). (:github:`72243`)
119
120Trusted Firmware-M
121==================
122
123* The default MCUboot signature type has been changed from RSA-3072 to EC-P256.
124  This affects builds that have MCUboot enabled in TF-M (:kconfig:option:`CONFIG_TFM_BL2`).
125  If you wish to keep using RSA-3072, you need to set :kconfig:option:`CONFIG_TFM_MCUBOOT_SIGNATURE_TYPE`
126  to ``"RSA-3072"``. Otherwise, make sure to have your own signing keys of the signature type in use.
127
128LVGL
129====
130
131* :kconfig:option:`CONFIG_LV_Z_POINTER_KSCAN` was removed, you need to convert your kscan based
132  driver to the input subsystem and use a :dtcompatible:`zephyr,lvgl-pointer-input` in your
133  devicetree instead. (:github:`73800`)
134
135
136Device Drivers and Devicetree
137*****************************
138
139* The :dtcompatible:`nxp,kinetis-pit` pit driver has changed its compatible
140  to :dtcompatible:`nxp,pit` and has been updated to support multiple channels.
141  To configure the individual channels, you must add a child node with the
142  compatible :dtcompatible:`nxp,pit-channel` and configure as below.
143  The :kconfig:option:`CONFIG_COUNTER_MCUX_PIT` has also been renamed to
144  :kconfig:option:`CONFIG_COUNTER_NXP_PIT` with regards to the renaming
145  of the binding for the pit. (:github:`66336`)
146  example:
147
148  .. code-block:: devicetree
149
150    / {
151        pit0: pit@40037000 {
152            /* Other Pit DT Attributes */
153            compatible = "nxp,pit";
154            status = "disabled";
155            num-channels = <1>;
156            #address-cells = <1>;
157            #size-cells = <0>;
158
159            pit0_channel0: pit0_channel@0 {
160                compatible = "nxp,pit-channel";
161                reg = <0>;
162                status = "disabled";
163            };
164    };
165
166* The :dtcompatible:`nxp,kinetis-ethernet` has been deprecated in favor of
167  :dtcompatible:`nxp,enet`. All in tree SOCs were converted to use this new schema.
168  Thus, all boards using NXP's ENET peripheral will need to align to this binding
169  in DT, which also comes with a different version driver. Alternatively,
170  the Ethernet node can be deleted and redefined as the old binding to use
171  the deprecated legacy driver. The primary advantage of the new binding
172  is to be able to abstract an arbitrary phy through the mdio API. (:github:`70400`)
173  Example of a basic board level ENET DT definition:
174
175  .. code-block:: devicetree
176
177    &enet_mac {
178        status = "okay";
179        pinctrl-0 = <&pinmux_enet>;
180        pinctrl-names = "default";
181        phy-handle = <&phy>;
182        zephyr,random-mac-address;
183        phy-connection-type = "rmii";
184    };
185
186    &enet_mdio {
187        status = "okay";
188        pinctrl-0 = <&pinmux_enet_mdio>;
189        pinctrl-names = "default";
190        phy: phy@3 {
191            compatible = "ethernet-phy";
192            reg = <3>;
193            status = "okay";
194        };
195    };
196
197* The :dtcompatible:`nxp,kinetis-lptmr` compatible string has been changed to
198  :dtcompatible:`nxp,lptmr`. The old string will be usable for a short time, but
199  should be replaced for it will be removed in the future.
200
201* Some of the driver API structs have been rename to have the required ``_driver_api`` suffix. (:github:`72182`)
202  The following types have been renamed:
203
204  * ``emul_sensor_backend_api`` to :c:struct:`emul_sensor_driver_api`
205  * ``emul_bbram_backend_api`` to :c:struct:`emul_bbram_driver_api`
206  * ``usbc_ppc_drv`` to :c:struct:`usbc_ppc_driver_api`
207
208* The driver for :dtcompatible:`maxim,max31790` got split up into a MFD and an
209  actual PWM driver. (:github:`68433`)
210  Previously, an instance of this device could have been defined like this:
211
212  .. code-block:: devicetree
213
214    max31790_max31790: max31790@20 {
215        compatible = "maxim,max31790";
216        status = "okay";
217        reg = <0x20>;
218        pwm-controller;
219        #pwm-cells = <2>;
220    };
221
222  This can be converted to:
223
224  .. code-block:: devicetree
225
226    max31790_max31790: max31790@20 {
227        compatible = "maxim,max31790";
228        status = "okay";
229        reg = <0x20>;
230
231        max31790_max31790_pwm: max31790_max31790_pwm {
232            compatible = "maxim,max31790-pwm";
233            status = "okay";
234            pwm-controller;
235            #pwm-cells = <2>;
236        };
237    };
238
239* The driver for :dtcompatible:`invensense,icm42688` now correctly supports device
240  tree configuration(:github:`74267`). Prior devicetrees may have tried to use
241  the bindings to set sample rate and scale for the accel/gyro without any
242  effect. The devicetree usage should now use the provided defines and include
243  file along with new bindings which take these values.
244
245  For example:
246
247  .. code-block:: devicetree
248
249    #include <zephyr/dt-bindings/sensor/icm42688.h>
250
251    icm42688: icm42688@0 {
252        accel-pwr-mode = <ICM42688_ACCEL_LN>;
253        accel-fs = <ICM42688_ACCEL_FS_16G>;
254        accel-odr = <ICM42688_ACCEL_ODR_2000>;
255        gyro-pwr-mode= <ICM42688_GYRO_LN>;
256        gyro-fs = <ICM42688_GYRO_FS_2000>;
257        gyro-odr = <ICM42688_GYRO_ODR_2000>;
258    };
259
260* :dtcompatible:`st,lis2mdl` property ``spi-full-duplex`` changed to ``duplex =
261  SPI_FULL_DUPLEX``. Full duplex is now the default.
262
263* The DT property ``nxp,reference-supply`` of :dtcompatible:`nxp,lpc-lpadc` driver has
264  been removed, users should remove this property from their devicetree if it is present.
265  Added new phandle-array type DT property ``nxp,references``, the user can use this
266  property to specify the reference voltage and reference voltage value to be used by
267  the lpadc. (:github:`75005`)
268
269 * The DT properties ``mc,interface-type``, ``mc,reset-gpio``, and ``mc,interrupt-gpio`` of
270   the :dtcompatible:`microchip,ksz8081` phy binding have changed to
271   ``microchip,interface-type``, ``reset-gpios``, and ``int-gpios``, respectively (:github:`73725`)
272
273Charger
274=======
275
276* Dropped ``constant-charge-current-max-microamp`` property in ``charger_max20335`` driver because
277  it did not reflect real chip functionality. (:github:`69910`)
278
279* Added enum key to ``constant-charge-voltage-max-microvolt`` property in ``maxim,max20335-charger``
280  binding to indicate invalid devicetree values at build time. (:github:`69910`)
281
282Controller Area Network (CAN)
283=============================
284
285* Removed the following deprecated CAN controller devicetree properties. Out-of-tree boards using
286  these properties can switch to using the ``bitrate``, ``sample-point``, ``bitrate-data``, and
287  ``sample-point-data`` devicetree properties (or rely on
288  :kconfig:option:`CONFIG_CAN_DEFAULT_BITRATE` and
289  :kconfig:option:`CONFIG_CAN_DEFAULT_BITRATE_DATA`) for specifying the initial CAN bitrate:
290
291  * ``sjw``
292  * ``prop-seg``
293  * ``phase-seg1``
294  * ``phase-seg2``
295  * ``sjw-data``
296  * ``prop-seg-data``
297  * ``phase-seg1-data``
298  * ``phase-seg2-data``
299
300  The ``bus-speed`` and ``bus-speed-data`` CAN controller devicetree properties have been
301  deprecated.
302
303  (:github:`68714`)
304
305* Support for manual bus-off recovery was reworked (:github:`69460`):
306
307  * Automatic bus recovery will always be enabled upon driver initialization regardless of Kconfig
308    options. Since CAN controllers are initialized in "stopped" state, no unwanted bus-off recovery
309    will be started at this point.
310  * The Kconfig ``CONFIG_CAN_AUTO_BUS_OFF_RECOVERY`` was renamed (and inverted) to
311    :kconfig:option:`CONFIG_CAN_MANUAL_RECOVERY_MODE`, which is disabled by default. This Kconfig
312    option enables support for the :c:func:`can_recover()` API function and a new manual recovery mode
313    (see the next bullet).
314  * A new CAN controller operational mode :c:macro:`CAN_MODE_MANUAL_RECOVERY` was added. Support for
315    this is only enabled if :kconfig:option:`CONFIG_CAN_MANUAL_RECOVERY_MODE` is enabled. Having
316    this as a mode allows applications to inquire whether the CAN controller supports manual
317    recovery mode via the :c:func:`can_get_capabilities` API function. The application can then
318    either fail initialization or rely on automatic bus-off recovery. Having this as a mode
319    furthermore allows CAN controller drivers not supporting manual recovery mode to fail early in
320    :c:func:`can_set_mode` during application startup instead of failing when :c:func:`can_recover`
321    is called at a later point in time.
322
323Crypto
324======
325
326* The CSS driver has been deprecated on NXP lpc55s36 (:github:`71173`).
327
328Display
329=======
330
331* GC9X01 based displays now use the MIPI DBI driver class. These displays
332  must now be declared within a MIPI DBI driver wrapper device, which will
333  manage interfacing with the display. (:github:`73686`)
334  For an example, see below:
335
336  .. code-block:: devicetree
337
338    /* Legacy GC9X01 display definition */
339    &spi0 {
340        gc9a01: gc9a01@0 {
341            status = "okay";
342            compatible = "galaxycore,gc9x01x";
343            reg = <0>;
344            spi-max-frequency = <100000000>;
345            cmd-data-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
346            reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
347            ...
348        };
349    };
350
351    /* New display definition with MIPI DBI device */
352
353    #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
354
355    ...
356
357    mipi_dbi {
358        compatible = "zephyr,mipi-dbi-spi";
359        dc-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
360        reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
361        spi-dev = <&spi0>;
362        #address-cells = <1>;
363        #size-cells = <0>;
364
365        gc9a01: gc9a01@0 {
366            status = "okay";
367            compatible = "galaxycore,gc9x01x";
368            reg = <0>;
369            mipi-max-frequency = <100000000>;
370            ...
371        };
372    };
373
374
375* ST7735R based displays now use the MIPI DBI driver class. These displays
376  must now be declared within a MIPI DBI driver wrapper device, which will
377  manage interfacing with the display. Note that the ``cmd-data-gpios`` pin has
378  changed polarity with this update, to align better with the new
379  ``dc-gpios`` name. For an example, see below:
380
381  .. code-block:: devicetree
382
383    /* Legacy ST7735R display definition */
384    &spi0 {
385        st7735r: st7735r@0 {
386            compatible = "sitronix,st7735r";
387            reg = <0>;
388            spi-max-frequency = <32000000>;
389            reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
390            cmd-data-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
391            ...
392        };
393    };
394
395    /* New display definition with MIPI DBI device */
396
397    #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
398
399    ...
400
401    mipi_dbi {
402        compatible = "zephyr,mipi-dbi-spi";
403        reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
404        dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
405        spi-dev = <&spi0>;
406        #address-cells = <1>;
407        #size-cells = <0>;
408
409        st7735r: st7735r@0 {
410            compatible = "sitronix,st7735r";
411            reg = <0>;
412            mipi-max-frequency = <32000000>;
413            mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>;
414            ...
415        };
416    };
417
418* UC81XX based displays now use the MIPI DBI driver class. These displays must
419  now be declared within a MIPI DBI driver wrapper device, which will manage
420  interfacing with the display. (:github:`73812`) Note that the ``dc-gpios``
421  pin has changed polarity with this update, for an example, see below:
422
423  .. code-block:: devicetree
424
425    /* Legacy UC81XX display definition */
426    &spi0 {
427        uc8179: uc8179@0 {
428            compatible = "ultrachip,uc8179";
429            reg = <0>;
430            spi-max-frequency = <4000000>;
431            reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
432            dc-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
433            ...
434        };
435    };
436
437    /* New display definition with MIPI DBI device */
438
439    #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
440
441    ...
442
443    mipi_dbi {
444        compatible = "zephyr,mipi-dbi-spi";
445        reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
446        dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
447        spi-dev = <&spi0>;
448        #address-cells = <1>;
449        #size-cells = <0>;
450        uc8179: uc8179@0 {
451            compatible = "ultrachip,uc8179";
452            reg = <0>;
453            mipi-max-frequency = <4000000>;
454            ...
455        };
456    };
457
458* ST7789V based displays now use the MIPI DBI driver class. These displays
459  must now be declared within a MIPI DBI driver wrapper device, which will
460  manage interfacing with the display. (:github:`73750`) Note that the
461  ``cmd-data-gpios`` pin has changed polarity with this update, to align better
462  with the new ``dc-gpios`` name. For an example, see below:
463
464  .. code-block:: devicetree
465
466    /* Legacy ST7789V display definition */
467    &spi0 {
468        st7789: st7789@0 {
469            compatible = "sitronix,st7789v";
470            reg = <0>;
471            spi-max-frequency = <32000000>;
472            reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
473            cmd-data-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
474            ...
475        };
476    };
477
478    /* New display definition with MIPI DBI device */
479
480    #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
481
482    ...
483
484    mipi_dbi {
485        compatible = "zephyr,mipi-dbi-spi";
486        reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
487        dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
488        spi-dev = <&spi0>;
489        #address-cells = <1>;
490        #size-cells = <0>;
491
492        st7789: st7789@0 {
493            compatible = "sitronix,st7789v";
494            reg = <0>;
495            mipi-max-frequency = <32000000>;
496            mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>;
497            ...
498        };
499    };
500
501* SSD16XX based displays now use the MIPI DBI driver class (:github:`73946`).
502  These displays must now be declared within a MIPI DBI driver wrapper device,
503  which will manage interfacing with the display. Note that the ``dc-gpios``
504  pin has changed polarity with this update. For an example, see below:
505
506  .. code-block:: devicetree
507
508    /* Legacy SSD16XX display definition */
509    &spi0 {
510        ssd1680: ssd1680@0 {
511            compatible = "solomon,ssd1680";
512            reg = <0>;
513            spi-max-frequency = <4000000>;
514            reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
515            dc-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
516            ...
517        };
518    };
519
520    /* New display definition with MIPI DBI device */
521
522    #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
523
524    ...
525
526    mipi_dbi {
527        compatible = "zephyr,mipi-dbi-spi";
528        reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
529        dc-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
530        spi-dev = <&spi0>;
531        #address-cells = <1>;
532        #size-cells = <0>;
533
534        ssd1680: ssd1680@0 {
535            compatible = "solomon,ssd1680";
536            reg = <0>;
537            mipi-max-frequency = <4000000>;
538            ...
539        };
540    };
541
542* The ``orientation-flipped`` property has been removed from the SSD16XX
543  display driver, as the driver now supports display rotation. Users should
544  drop this property from their devicetree, and set orientation at runtime
545  via :c:func:`display_set_orientation` (:github:`73360`)
546
547Enhanced Serial Peripheral Interface (eSPI)
548===========================================
549
550* The macros ``ESPI_SLAVE_TO_MASTER`` and ``ESPI_MASTER_TO_SLAVE`` were renamed to
551  ``ESPI_TARGET_TO_CONTROLLER`` and ``ESPI_CONTROLLER_TO_TARGET`` respectively to reflect
552  the new terminology in eSPI 1.5 specification.
553  The enum values ``ESPI_VWIRE_SIGNAL_SLV_BOOT_STS``, ``ESPI_VWIRE_SIGNAL_SLV_BOOT_DONE`` and
554  all ``ESPI_VWIRE_SIGNAL_SLV_GPIO_<NUMBER>`` signals were renamed to
555  ``ESPI_VWIRE_SIGNAL_TARGET_BOOT_STS``, ``ESPI_VWIRE_SIGNAL_TARGET_BOOT_DONE`` and
556  ``ESPI_VWIRE_SIGNAL_TARGET_GPIO_<NUMBER>`` respectively to reflect the new terminology
557  in eSPI 1.5 specification. (:github:`68492`)
558  The Kconfig ``CONFIG_ESPI_SLAVE`` was renamed to  :kconfig:option:`CONFIG_ESPI_TARGET`, similarly
559  ``CONFIG_ESPI_SAF`` was renamed as :kconfig:option:`CONFIG_ESPI_TAF` (:github:`73887`)
560
561GNSS
562====
563
564* Basic power management support has been added to the ``gnss-nmea-generic`` driver.
565  If ``CONFIG_PM_DEVICE=y`` the driver is now initialized in suspended mode and the
566  application needs to call :c:func:`pm_device_action_run` with :c:macro:`PM_DEVICE_ACTION_RESUME`
567  to start up the driver. (:github:`71774`)
568
569Input
570=====
571
572* The ``analog-axis`` deadzone calibration value has been changed to be
573  relative to the raw ADC values, similarly to min and max. The data structures
574  and properties have been renamed to reflect that (from ``out-deadzone`` to
575  ``in-deadzone``) and when migrating to the new definition the value should be
576  scaled accordingly. (:github:`70377`)
577
578* The ``holtek,ht16k33-keyscan`` driver has been converted to use the
579  :ref:`input` subsystem, callbacks have to be migrated to use the input APIs,
580  :dtcompatible:`zephyr,kscan-input` can be used for backward compatibility. (:github:`69875`)
581
582Interrupt Controller
583====================
584
585* The static auto-generation of the multilevel interrupt controller lookup table has been
586  deprecated, and will be compiled only when the new compatibility Kconfig:
587  :kconfig:option:`CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION` is enabled, which will eventually
588  be removed in the coming releases.
589
590  Multi-level interrupt controller drivers should be updated to use the newly created
591  ``IRQ_PARENT_ENTRY_DEFINE`` macro to register itself with the new multi-level interrupt
592  architecture. To make the macro easier to use, ``INTC_INST_ISR_TBL_OFFSET`` macro is made to
593  deduce the software ISR table offset for a given driver instance, for pseudo interrupt controller
594  child, use the ``INTC_CHILD_ISR_TBL_OFFSET`` macro instead. New devicetree macros
595  (``DT_INTC_GET_AGGREGATOR_LEVEL`` & ``DT_INST_INTC_GET_AGGREGATOR_LEVEL``) have been added
596  for an interrupt controller driver instance to pass its aggregator level into the
597  ``IRQ_PARENT_ENTRY_DEFINE`` macro.
598
599LED Strip
600=========
601
602* The property ``in-gpios`` defined in :dtcompatible:`worldsemi,ws2812-gpio` has been
603  renamed to ``gpios``. (:github:`68514`)
604
605* The ``chain-length`` and ``color-mapping`` properties have been added to all LED strip bindings
606  and are now mandatory.
607
608* Added a new mandatory ``length`` function which returns the length (number of pixels) of an LED
609  strip device.
610
611* Made ``update_channels`` function optional and removed unimplemented functions.
612
613* The ``CONFIG_WS2812_STRIP_DRIVER`` kconfig option has been removed.
614  Previously, when using :kconfig:option:`CONFIG_WS2812_STRIP_SPI`,
615  :kconfig:option:`CONFIG_WS2812_STRIP_I2S`, :kconfig:option:`CONFIG_WS2812_STRIP_GPIO`,
616  or :kconfig:option:`CONFIG_WS2812_STRIP_RPI_PICO_PIO`, one of them had to be selected with
617  ``CONFIG_WS2812_STRIP_DRIVER``, but this is no longer necessary. Please set each option directly.
618
619MDIO
620====
621
622* :kconfig:option:`CONFIG_MDIO_NXP_ENET_TIMEOUT` is now in units of
623  microseconds instead of milliseconds. (:github:`75625`)
624
625Sensors
626=======
627
628* The ``chip`` devicetree property from the :dtcompatible:`sensirion,shtcx` sensor driver has been
629  removed. Chip variants are now selected using the matching compatible property (:github:`74033`).
630  For an example of the new shtc3 configuration, see below:
631
632  .. code-block:: devicetree
633
634    &i2c0 {
635        status = "okay";
636
637        shtc3: shtc3@70 {
638            compatible = "sensirion,shtc3", "sensirion,shtcx";
639            reg = <0x70>;
640            measure-mode = "normal";
641            clock-stretching;
642        };
643    };
644
645Serial
646======
647
648* The Raspberry Pi UART driver ``uart_rpi_pico`` has been removed.
649  Use ``uart_pl011`` (:dtcompatible:`arm,pl011`) instead. (:github:`71074`)
650
651Regulator
652=========
653
654* The :dtcompatible:`nxp,vref` driver no longer supports the ground selection function,
655  as this setting should not be modified by the user. The DT property ``nxp,ground-select``
656  has been removed, users should remove this property from their devicetree if it is present.
657  (:github:`70642`)
658
659W1
660==
661
662* The :dtcompatible:`zephyr,w1-gpio` 1-Wire master driver no longer defaults to enabling the
663  internal pull-up resistor of the GPIO pin. The configuration is now taken from the pin's
664  configuration flags specified in devicetree. (:github:`71789`)
665
666Watchdog
667========
668
669* The ``nuvoton,npcx-watchdog`` driver has been changed to extend the max timeout period.
670  The time of one watchdog count varies with the different pre-scalar settings.
671  Removed :kconfig:option:`CONFIG_WDT_NPCX_DELAY_CYCLES` because it is no longer suitable to
672  set the leading warning time.
673  Instead, added the :kconfig:option:`CONFIG_WDT_NPCX_WARNING_LEADING_TIME_MS` to set
674  the leading warning time in milliseconds.
675
676Bluetooth
677*********
678
679Bluetooth HCI
680=============
681
682 * A new HCI driver API was introduced (:github:`72323`) and the old one deprecated. The new API
683   follows the normal Zephyr driver model, with devicetree nodes, etc. The host now
684   selects which driver instance to use as the controller by looking for a ``zephyr,bt-hci``
685   chosen property. The devicetree bindings for all HCI drivers derive from a common
686   ``bt-hci.yaml`` base binding.
687
688  * As part of the new HCI driver API, the ``zephyr,bt-uart`` chosen property is no longer used,
689    rather the UART HCI drivers select their UART by looking for the parent devicetree node of the
690    HCI driver instance node.
691  * As part of the new HCI driver API, the ``zephyr,bt-hci-ipc`` chosen property is only used for
692    the controller side, whereas the HCI driver now relies on nodes with the compatible string
693    ``zephyr,bt-hci-ipc``.
694  * The ``BT_NO_DRIVER`` Kconfig option was removed. HCI drivers are no-longer behind a Kconfig
695    choice, rather they can now be enabled and disabled independently, mostly based on their
696    respective devicetree node being enabled or not.
697  * The ``BT_HCI_VS_EXT`` Kconfig option was deleted and the feature is now included in the
698    :kconfig:option:`CONFIG_BT_HCI_VS` Kconfig option.
699  * The ``BT_HCI_VS_EVT`` Kconfig option was removed, since vendor event support is implicit if
700    the :kconfig:option:`CONFIG_BT_HCI_VS` option is enabled.
701  * The bt_read_static_addr() API was removed. This wasn't really a completely public API, but
702    since it was exposed by the public hci_driver.h header file the removal is mentioned here.
703    Enable the :kconfig:option:`CONFIG_BT_HCI_VS` Kconfig option instead, and use vendor specific
704    HCI commands API to get the Controller's Bluetooth static address when available.
705
706Bluetooth Mesh
707==============
708
709* The model metadata pointer declaration of :c:struct:`bt_mesh_model` has been changed
710  to add ``const`` qualifiers. The data pointer of :c:struct:`bt_mesh_models_metadata_entry`
711  got ``const`` qualifier too. The model's metadata structure and metadata raw value
712  can be declared as permanent constants in the non-volatile memory. (:github:`69679`)
713
714* The model metadata pointer declaration of :c:struct:`bt_mesh_model` has been changed
715  to a single ``const *`` and redundant metadata pointer from :c:struct:`bt_mesh_health_srv`
716  is removed. Consequently, :code:`BT_MESH_MODEL_HEALTH_SRV` definition is changed
717  to use variable argument notation. Now, when your implementation
718  supports :kconfig:option:`CONFIG_BT_MESH_LARGE_COMP_DATA_SRV` and when you need to
719  specify metadata for Health Server model, simply pass metadata as the last argument
720  to the :code:`BT_MESH_MODEL_HEALTH_SRV` macro, otherwise omit the last argument. (:github:`71281`)
721
722Bluetooth Audio
723===============
724
725* :kconfig:option:`CONFIG_BT_ASCS`, :kconfig:option:`CONFIG_BT_PERIPHERAL` and
726  :kconfig:option:`CONFIG_BT_ISO_PERIPHERAL` are no longer enabled automatically when
727  enabling :kconfig:option:`CONFIG_BT_BAP_UNICAST_SERVER`, and these must now be set explicitly
728  in the project configuration file. (:github:`71993`)
729
730* The discover callback functions :code:`bt_cap_initiator_cb.unicast_discovery_complete` and
731  :code:`bt_cap_commander_cb.discovery_complete` for CAP now contain an additional parameter for
732  the set member.
733  This needs to be added to all instances of CAP discovery callback functions defined.
734  (:github:`72797`)
735
736* :c:func:`bt_bap_stream_start` no longer connects the CIS. To connect the CIS,
737  the :c:func:`bt_bap_stream_connect` shall now be called before :c:func:`bt_bap_stream_start`.
738  (:github:`73032`)
739
740* Renamed ``stream_lang`` to just ``lang`` to better fit with the assigned numbers document.
741  This affects the ``BT_AUDIO_METADATA_TYPE_LANG`` macro and the following functions:
742
743  * :c:func:`bt_audio_codec_cap_meta_set_lang`
744  * :c:func:`bt_audio_codec_cap_meta_get_lang`
745  * :c:func:`bt_audio_codec_cfg_meta_set_lang`
746  * :c:func:`bt_audio_codec_cfg_meta_get_lang`
747
748  (:github:`72584`)
749
750* Changed ``lang`` from ``uint32_t`` to ``uint8_t [3]``. This modifies the following functions:
751
752  * :c:func:`bt_audio_codec_cap_meta_set_lang`
753  * :c:func:`bt_audio_codec_cap_meta_get_lang`
754  * :c:func:`bt_audio_codec_cfg_meta_set_lang`
755  * :c:func:`bt_audio_codec_cfg_meta_get_lang`
756
757  The result of this is that string values such as ``"eng"`` and ``"deu"`` can now be used to set
758  new values, and to prevent unnecessary copies of data when getting the values. (:github:`72584`)
759
760* All occurrences of ``set_sirk`` have been changed to just ``sirk`` as the ``s`` in ``sirk`` stands
761  for set. (:github:`73413`)
762
763* Added ``fallback_to_default`` parameter to :c:func:`bt_audio_codec_cfg_get_chan_allocation`.
764  To maintain existing behavior set the parameter to ``false``. (:github:`72090`)
765
766* Added ``fallback_to_default`` parameter to
767  :c:func:`bt_audio_codec_cap_get_supported_audio_chan_counts`.
768  To maintain existing behavior set the parameter to ``false``. (:github:`72090`)
769
770* Added ``fallback_to_default`` parameter to
771  :c:func:`bt_audio_codec_cap_get_max_codec_frames_per_sdu`.
772  To maintain existing behavior set the parameter to ``false``. (:github:`72090`)
773
774* Added ``fallback_to_default`` parameter to
775  :c:func:`bt_audio_codec_cfg_meta_get_pref_context`.
776  To maintain existing behavior set the parameter to ``false``. (:github:`72090`)
777
778Bluetooth Classic
779=================
780
781* The source files of Host BR/EDR have been moved to ``subsys/bluetooth/host/classic``.
782  The Header files of Host BR/EDR have been moved to ``include/zephyr/bluetooth/classic``.
783  Removed the :kconfig:option:`CONFIG_BT_BREDR`. It is replaced by new option
784  :kconfig:option:`CONFIG_BT_CLASSIC`. (:github:`69651`)
785
786Bluetooth Host
787==============
788
789* The advertiser options :code:`BT_LE_ADV_OPT_USE_NAME` and :code:`BT_LE_ADV_OPT_FORCE_NAME_IN_AD`
790  are deprecated in this release. The application need to include the device name explicitly. One
791  way to do it is by adding the following to the advertising data or scan response data passed to
792  the host:
793
794  .. code-block:: c
795
796   BT_DATA(BT_DATA_NAME_COMPLETE, CONFIG_BT_DEVICE_NAME, sizeof(CONFIG_BT_DEVICE_NAME) - 1)
797
798  (:github:`71686`)
799
800* The field :code:`init_credits` in :c:type:`bt_l2cap_le_endpoint` has been removed as it was no
801  longer used in Zephyr 3.4.0 and later. Any references to this field should be removed. No further
802  action is needed.
803
804* :c:macro:`BT_LE_ADV_PARAM` now returns a :code:`const` pointer.
805  Any place where the result is stored in a local variable such as
806  :code:`struct bt_le_adv_param *param = BT_LE_ADV_CONN;` will need to
807  be updated to :code:`const struct bt_le_adv_param *param = BT_LE_ADV_CONN;` or use it for
808  initialization like :code:`struct bt_le_adv_param param = *BT_LE_ADV_CONN;`
809
810  The change to :c:macro:`BT_LE_ADV_PARAM` also affects all of its derivatives, including but not
811  limited to:
812
813  * :c:macro:`BT_LE_ADV_CONN`
814  * :c:macro:`BT_LE_ADV_NCONN`
815  * :c:macro:`BT_LE_EXT_ADV_SCAN`
816  * :c:macro:`BT_LE_EXT_ADV_CODED_NCONN_NAME`
817
818  (:github:`75065`)
819
820* :kconfig:option:`CONFIG_BT_BUF_ACL_RX_COUNT` now needs to be larger than
821  :kconfig:option:`CONFIG_BT_MAX_CONN`. This was always the case due to the design of the HCI
822  interface. It is now being enforced through a build-time assertion.
823
824  (:github:`75592`)
825
826Bluetooth Crypto
827================
828
829* :kconfig:option:`CONFIG_BT_USE_PSA_API` was added to explicitly request use
830  of PSA APIs instead of TinyCrypt for crypto operations. Of course, this is
831  possible only a PSA crypto provider available in the system, i.e.
832  :kconfig:option:`CONFIG_PSA_CRYPTO_CLIENT` is set. (:github:`73378`)
833
834Networking
835**********
836
837* Deprecate the :kconfig:option:`CONFIG_NET_SOCKETS_POSIX_NAMES` option. It is a legacy option
838  and was used to allow user to call BSD socket API while not enabling POSIX API.
839  This could cause complications when building applications that wanted to enable the
840  :kconfig:option:`CONFIG_POSIX_API` option. This means that if the application wants to use
841  normal BSD socket interface, then it needs to enable :kconfig:option:`CONFIG_POSIX_API`.
842  If the application does not want or is not able to enable that option, then the socket API
843  calls need to be prefixed by a ``zsock_`` string.
844  All the sample applications that use BSD socket interface are changed to enable
845  :kconfig:option:`CONFIG_POSIX_API`. Internally the network stack will not enable POSIX API
846  option which means that various network libraries that use sockets, are converted to
847  use the ``zsock_*`` API calls. (:github:`69950`)
848
849* The zperf zperf_results struct is changed to support 64 bits transferred bytes (total_len)
850  and test duration (time_in_us and client_time_in_us), instead of 32 bits. This will make
851  the long-duration zperf test show with correct throughput result. (:github:`69500`)
852
853* Each IPv4 address assigned to a network interface has an IPv4 netmask
854  tied to it instead of being set for the whole interface.
855  If there is only one IPv4 address specified for a network interface,
856  nothing changes from the user point of view. But, if there is more than
857  one IPv4 address / network interface, the netmask must be specified
858  for each IPv4 address separately. (:github:`68419`)
859
860* Virtual network interface API no longer has the ``input`` callback. The input callback was
861  used to read the inner IPv4/IPv6 packets in an IP tunnel. This incoming tunnel read is now
862  implemented in the ``recv`` callback. (:github:`70549`)
863
864* Virtual LAN (VLAN) implementation is changed to use the Virtual network interfaces.
865  There are no API changes, but the type of a VLAN network interface is changed from ``ETHERNET``
866  to ``VIRTUAL``. This could require changes to the code that sets the VLAN tags to a network
867  interface. For example in the :c:func:`net_eth_is_vlan_enabled()` API, the 2nd interface parameter
868  must point to the main Ethernet interface, and not to the VLAN interface. (:github:`70345`)
869
870* Modified the ``wifi connect`` command to use key-value format for the arguments. In the
871  previous implementation, we were identifying an option using its position in the argument string.
872  This made it difficult to deal with optional arguments or extending the support
873  for other options. Having this key-value format makes it easier to extend the options that
874  can be passed to the connect command.
875  ``wifi -h`` will give more information about the usage of connect command.
876  (:github:`70024`)
877
878* The Kconfig :kconfig:option:`CONFIG_NET_TCP_ACK_TIMEOUT` has been deprecated. Its usage was
879  limited to TCP handshake only, and in such case the total timeout should depend
880  on the total retransmission timeout (as in other cases) making the config
881  redundant and confusing. Use :kconfig:option:`CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUT` and
882  :kconfig:option:`CONFIG_NET_TCP_RETRY_COUNT` instead to control the total timeout at the
883  TCP level. (:github:`70731`)
884
885* In LwM2M API, the callback type :c:type:`lwm2m_engine_set_data_cb_t` has now an additional
886  parameter ``offset``. This parameter is used to indicate the offset of the data
887  during a Coap Block-wise transfer. Any post write, validate or some firmware callbacks
888  should be updated to include this parameter. (:github:`72590`)
889
890* The DNS resolver and mDNS/LLMNR responders are converted to use socket service API.
891  This means that the number of pollable sockets in the system might need to be increased.
892  Please check that the values of :kconfig:option:`CONFIG_NET_SOCKETS_POLL_MAX` and
893  :kconfig:option:`CONFIG_POSIX_MAX_FDS` are high enough. Unfortunately no exact values
894  for these can be given as it depends on application needs and usage. (:github:`72834`)
895
896* The packet socket (type ``AF_PACKET``) protocol field in ``socket`` API call has changed.
897  The protocol field should be in network byte order so that we are compatible with Linux
898  socket calls. Linux expects the protocol field to be ``htons(ETH_P_ALL)`` if it is desired
899  to receive all the network packets. See details in
900  https://www.man7.org/linux/man-pages/man7/packet.7.html documentation. (:github:`73338`)
901
902* TCP now uses SHA-256 instead of MD5 for ISN generation. The crypto support for
903  this hash computation was also changed from Mbed TLS to PSA APIs. This was achieved
904  by making :kconfig:option:`CONFIG_NET_TCP_ISN_RFC6528` depend on
905  :kconfig:option:`PSA_WANT_ALG_SHA_256` instead of legacy ``CONFIG_MBEDTLS_*``
906  features. (:github:`71827`)
907
908Other Subsystems
909****************
910
911Flash map
912=========
913
914* The crypto backend for the flash check functions (:kconfig:option:`CONFIG_FLASH_AREA_CHECK_INTEGRITY_BACKEND`),
915  previously provided through either TinyCrypt or Mbed TLS, is now provided through either PSA or Mbed TLS.
916  The updated Mbed TLS implementation has a slightly smaller footprint than the previous TinyCrypt one,
917  and the PSA implementation offers an even greater footprint reduction for devices built with TF-M.
918  PSA is the supported way forward, however as of now you may still use Mbed TLS if you cannot afford the
919  one-time cost of enabling the PSA API (:kconfig:option:`CONFIG_MBEDTLS_PSA_CRYPTO_C` for devices without TF-M).
920  :github:`73511`
921
922hawkBit
923=======
924
925* :kconfig:option:`CONFIG_HAWKBIT_PORT` is now an int instead of a string.
926  :kconfig:option:`CONFIG_SETTINGS` needs to be enabled to use hawkBit, as it now uses the
927  settings subsystem to store the hawkBit configuration. (:github:`68806`)
928
929MCUmgr
930======
931
932* The support for SHA-256 (when using checksum/hash functions), previously provided
933  by either TinyCrypt or Mbed TLS, is now provided by either PSA or Mbed TLS.
934  PSA is the recommended API going forward, however, if it is not already enabled
935  (:kconfig:option:`CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT`) and you have tight code size
936  constraints, you may be able to save 1.3 KB by using Mbed TLS instead.
937
938Modem
939=====
940
941* The ``CONFIG_MODEM_CHAT_LOG_BUFFER`` Kconfig option was
942  renamed to :kconfig:option:`CONFIG_MODEM_CHAT_LOG_BUFFER_SIZE`. (:github:`70405`)
943
944.. _zephyr_3.7_posix_api_migration:
945
946POSIX API
947=========
948
949* The :ref:`POSIX API Kconfig deprecations <zephyr_3.7_posix_api_deprecations>` may require
950  changes to Kconfig files (``prj.conf``, etc), as outlined in the release notes. A more automated
951  approach is available via the provided migration script. Simply run the following:
952
953  .. code-block:: bash
954
955    $ python ${ZEPHYR_BASE}/scripts/utils/migrate_posix_kconfigs.py -r root_path
956
957State Machine Framework
958=======================
959
960* The :c:macro:`SMF_CREATE_STATE` macro now always takes 5 arguments. The amount of arguments is
961  now independent of the values of :kconfig:option:`CONFIG_SMF_ANCESTOR_SUPPORT` and
962  :kconfig:option:`CONFIG_SMF_INITIAL_TRANSITION`. If the additional arguments are not used, they
963  have to be set to ``NULL``. (:github:`71250`)
964* SMF now follows a more UML-like transition flow when the transition source is a parent of the
965  state called by :c:func:`smf_run_state`. Exit actions up to (but not including) the Least Common
966  Ancestor of the transition source and target state will be executed, as will entry actions from
967  (but not including) the LCA down to the target state. (:github:`71675`)
968* Previously, calling :c:func:`smf_set_state` with a ``new_state`` set to NULL would execute all
969  exit actions from the current state to the topmost parent, with the expectation the topmost exit
970  action would terminate the state machine. Passing ``NULL`` is now not allowed. Instead create a
971  'terminate' state at the top level, and call :c:func:`smf_set_terminate` from its entry action.
972
973UpdateHub
974=========
975
976* The SHA-256 implementation used to perform integrity checks is not chosen with
977  :kconfig:option:`CONFIG_FLASH_AREA_CHECK_INTEGRITY_BACKEND` anymore. Instead, the implementation
978  used (now either Mbed TLS or PSA) is chosen based on :kconfig:option:`CONFIG_PSA_CRYPTO_CLIENT`.
979  It still defaults to using Mbed TLS (with a smaller footprint than previously) unless the
980  board is built with TF-M or :kconfig:option:`CONFIG_MBEDTLS_PSA_CRYPTO_C` is enabled. (:github:`73511`)
981
982Architectures
983*************
984
985* Function :c:func:`arch_start_cpu` has been renamed to :c:func:`arch_cpu_start`. (:github:`64987`)
986
987* ``CONFIG_ARM64_ENABLE_FRAME_POINTER`` is deprecated. Use :kconfig:option:`CONFIG_FRAME_POINTER`
988  instead. (:github:`72646`)
989
990* x86
991
992  * Kconfigs ``CONFIG_DISABLE_SSBD`` and ``CONFIG_ENABLE_EXTENDED_IBRS``
993    are deprecated. Use :kconfig:option:`CONFIG_X86_DISABLE_SSBD` and
994    :kconfig:option:`CONFIG_X86_ENABLE_EXTENDED_IBRS` instead. (:github:`69690`)
995
996* POSIX arch:
997
998  * LLVM fuzzing support has been refactored. A test application now needs to provide its own
999    ``LLVMFuzzerTestOneInput()`` hook instead of relying on a board provided one. Check
1000    ``samples/subsys/debug/fuzz/`` for an example. (:github:`71378`)
1001