diff --git a/doc/releases/release-notes-4.0.rst b/doc/releases/release-notes-4.0.rst new file mode 100644 index 0000000000000..49d03f5eb0a2c --- /dev/null +++ b/doc/releases/release-notes-4.0.rst @@ -0,0 +1,326 @@ +:orphan: + +.. _zephyr_4.0: + +Zephyr 4.0.0 (Working Draft) +############################ + +We are pleased to announce the release of Zephyr version 4.0.0. + +Major enhancements with this release include: + +An overview of the changes required or recommended when migrating your application from Zephyr +v3.7.0 to Zephyr v4.0.0 can be found in the separate :ref:`migration guide`. + +The following sections provide detailed lists of changes by component. + +Security Vulnerability Related +****************************** +The following CVEs are addressed by this release: + +More detailed information can be found in: +https://docs.zephyrproject.org/latest/security/vulnerabilities.html + +API Changes +*********** + +* Removed deprecated arch-level CMSIS header files + ``include/zephyr/arch/arm/cortex_a_r/cmsis.h`` and + ``include/zephyr/arch/arm/cortex_m/cmsis.h``. ``cmsis_core.h`` needs to be + included now. + +* Removed deprecated ``ceiling_fraction`` macro. :c:macro:`DIV_ROUND_UP` needs + to be used now. + +* Deprecated ``EARLY``, ``APPLICATION`` and ``SMP`` init levels can no longer be + used for devices. + +Removed APIs in this release +============================ + +Deprecated in this release +========================== + +* Deprecated the :c:func:`net_buf_put` and :c:func:`net_buf_get` API functions in favor of + :c:func:`k_fifo_put` and :c:func:`k_fifo_get`. + +Architectures +************* + +* ARC + +* ARM + +* ARM64 + +* RISC-V + +* Xtensa + +Kernel +****** + +Bluetooth +********* + +* Audio + +* Host + + * Added API :c:func:`bt_gatt_get_uatt_mtu` to get current Unenhanced ATT MTU of a given + connection (experimental). + +* HCI Drivers + +Boards & SoC Support +******************** + +* Added support for these SoC series: + +* Made these changes in other SoC series: + + * NXP S32Z270: Added support for the new silicon cut version 2.0. Note that the previous + versions (1.0 and 1.1) are no longer supported. + +* Added support for these boards: + +* Made these board changes: + + * :ref:`native_posix` has been deprecated in favour of + :ref:`native_sim`. + +* Added support for the following shields: + +Build system and Infrastructure +******************************* + +Drivers and Sensors +******************* + +* ADC + +* Battery + +* CAN + +* Charger + +* Clock control + +* Counter + +* DAC + +* Disk + +* Display + +* Ethernet + + * LiteX: Renamed the ``compatible`` from ``litex,eth0`` to :dtcompatible:`litex,liteeth`. + +* Flash + +* GNSS + +* GPIO + +* Hardware info + +* I2C + +* I2S + +* I3C + +* Input + +* LED + + * lp5569: added ``charge-pump-mode`` property to configure the charge pump of the lp5569. + + * lp5569: added ``enable-gpios`` property to describe the EN/PWM GPIO of the lp5569. + +* LED Strip + +* LoRa + +* Mailbox + +* MDIO + +* MFD + +* Modem + +* MIPI-DBI + +* MSPI + +* Pin control + +* PWM + +* Regulators + +* Reset + +* RTC + +* RTIO + +* SDHC + +* Sensors + +* Serial + + * LiteX: Renamed the ``compatible`` from ``litex,uart0`` to :dtcompatible:`litex,uart`. + +* SPI + +* USB + +* Video + +* Watchdog + +* Wi-Fi + +Networking +********** + +* ARP: + +* CoAP: + +* Connection manager: + +* DHCPv4: + +* DHCPv6: + +* DNS/mDNS/LLMNR: + +* gPTP/PTP: + +* HTTP: + +* IPSP: + +* IPv4: + +* IPv6: + +* LwM2M: + * Location object: optional resources altitude, radius, and speed can now be + used optionally as per the location object's specification. Users of these + resources will now need to provide a read buffer. + +* Misc: + +* MQTT: + +* Network Interface: + +* OpenThread + +* PPP + +* Shell: + +* Sockets: + +* Syslog: + +* TCP: + +* Websocket: + +* Wi-Fi: + +* zperf: + +USB +*** + +Devicetree +********** + +Kconfig +******* + +Libraries / Subsystems +********************** + +* Debug + +* Demand Paging + +* Formatted output + +* Management + +* Logging + +* Modem modules + +* Power management + +* Crypto + +* CMSIS-NN + +* FPGA + +* Random + +* SD + +* State Machine Framework + +* Storage + + * LittleFS: The module has been updated with changes committed upstream + from version 2.8.1, the last module update, up to and including + the released version 2.9.3. + +* Task Watchdog + +* POSIX API + +* LoRa/LoRaWAN + +* ZBus + +HALs +**** + +* Nordic + +* STM32 + +* ADI + +* Espressif + +MCUboot +******* + +OSDP +**** + +Trusted Firmware-M +****************** + +LVGL +**** + +Tests and Samples +***************** + +Issue Related Items +******************* + +Known Issues +============ diff --git a/doc/releases/release-notes-4.1.rst b/doc/releases/release-notes-4.1.rst new file mode 100644 index 0000000000000..6feba5b3fef32 --- /dev/null +++ b/doc/releases/release-notes-4.1.rst @@ -0,0 +1,325 @@ +:orphan: + +.. _zephyr_4.1: + +Zephyr 4.1.0 (Working Draft) +############################ + +We are pleased to announce the release of Zephyr version 4.1.0. + +Major enhancements with this release include: + +An overview of the changes required or recommended when migrating your application from Zephyr +v4.0.0 to Zephyr v4.1.0 can be found in the separate :ref:`migration guide`. + +The following sections provide detailed lists of changes by component. + +Security Vulnerability Related +****************************** +The following CVEs are addressed by this release: + +More detailed information can be found in: +https://docs.zephyrproject.org/latest/security/vulnerabilities.html + +API Changes +*********** + +Removed APIs in this release +============================ + + * The deprecated Bluetooth HCI driver API has been removed. It has been replaced by a + :c:group:`new API` that follows the normal Zephyr driver model. + +Deprecated in this release +========================== + +Architectures +************* + +* Common + + * Introduced :kconfig:option:`CONFIG_ARCH_HAS_CUSTOM_CURRENT_IMPL`, which can be selected when + an architecture implemented and enabled its own :c:func:`arch_current_thread` and + :c:func:`arch_current_thread_set` functions for faster retrieval of the current CPU's thread + pointer. When enabled, ``_current`` variable will be routed to the + :c:func:`arch_current_thread` (:github:`80716`). + +* ARC + +* ARM + +* ARM64 + +* RISC-V + + * Implements :c:func:`arch_current_thread_set` & :c:func:`arch_current_thread`, which can be enabled + by :kconfig:option:`CONFIG_RISCV_CURRENT_VIA_GP` (:github:`80716`). + +* Xtensa + +* native/POSIX + + * :kconfig:option:`CONFIG_NATIVE_APPLICATION` has been deprecated. + * For the native_sim target :kconfig:option:`CONFIG_NATIVE_SIM_NATIVE_POSIX_COMPAT` has been + switched to ``n`` by default, and this option has been deprecated. + +Kernel +****** + +Bluetooth +********* + +* Audio + +* Host + +* HCI Drivers + +Boards & SoC Support +******************** + +* Added support for these SoC series: + +* Made these changes in other SoC series: + +* Added support for these boards: + +* Made these board changes: + +* Added support for the following shields: + +Build system and Infrastructure +******************************* + +Drivers and Sensors +******************* + +* ADC + +* Battery + +* CAN + +* Charger + +* Clock control + +* Counter + +* DAC + +* Disk + +* Display + + * Added flag ``frame_incomplete`` to ``display_write`` that indicates whether a write is the last + write of the frame, allowing display drivers to implement double buffering / tearing enable + signal handling (:github:`81250`) + * Added ``frame_incomplete`` handling to SDL display driver (:dtcompatible:`zephyr,sdl-dc`) + (:github:`81250`) + * Added transparency support to SDL display driver (:dtcompatible:`zephyr,sdl-dc`) (:github:`81184`) + +* Ethernet + +* Flash + +* GNSS + +* GPIO + +* Hardware info + +* I2C + +* I2S + +* I3C + +* Input + +* LED + + * Added a new set of devicetree based LED APIs, see :c:struct:`led_dt_spec`. + * lp5569: added use of auto-increment functionality. + * lp5569: implemented ``write_channels`` api. + +* LED Strip + +* LoRa + +* Mailbox + +* MDIO + +* MFD + +* Modem + +* MIPI-DBI + +* MSPI + +* Pin control + +* PWM + +* Regulators + +* Reset + +* RTC + +* RTIO + +* SDHC + +* Sensors + +* Serial + +* SPI + +* USB + +* Video + +* Watchdog + +* Wi-Fi + +Networking +********** + +* ARP: + +* CoAP: + +* Connection manager: + +* DHCPv4: + +* DHCPv6: + +* DNS/mDNS/LLMNR: + +* gPTP/PTP: + +* HTTP: + +* IPSP: + +* IPv4: + +* IPv6: + +* LwM2M: + +* Misc: + +* MQTT: + +* Network Interface: + +* OpenThread + +* PPP + +* Shell: + +* Sockets: + +* Syslog: + +* TCP: + +* Websocket: + +* Wi-Fi: + +* zperf: + +USB +*** + +Devicetree +********** + +Kconfig +******* + +Libraries / Subsystems +********************** + +* Debug + +* Demand Paging + +* Formatted output + +* Management + +* Logging + +* Modem modules + +* Power management + +* Crypto + +* CMSIS-NN + +* FPGA + +* Random + +* SD + +* State Machine Framework + +* Storage + +* Task Watchdog + +* POSIX API + +* LoRa/LoRaWAN + +* ZBus + +HALs +**** + +* Nordic + +* STM32 + +* ADI + +* Espressif + +MCUboot +******* + +OSDP +**** + +Trusted Firmware-M +****************** + +LVGL +**** + +* Added ``frame_incomplete`` support to indicate whether a write is the last + write of the frame (:github:`81250`) + +Tests and Samples +***************** + +* Fixed incorrect alpha values in :zephyr_file:`samples/drivers/display`. (:github:`81184`) +* Added :zephyr_file:`samples/modules/lvgl/screen_transparency`. (:github:`81184`) + +Issue Related Items +******************* + +Known Issues +============ diff --git a/drivers/led/lp5569.c b/drivers/led/lp5569.c index 9bd1de86022e5..c87a574900dc1 100644 --- a/drivers/led/lp5569.c +++ b/drivers/led/lp5569.c @@ -23,18 +23,19 @@ #include LOG_MODULE_REGISTER(lp5569, CONFIG_LED_LOG_LEVEL); -#define LP5569_NUM_LEDS 9 +#define LP5569_NUM_LEDS 9 /* General Registers */ -#define LP5569_CONFIG 0x00 -#define LP5569_CHIP_EN BIT(6) +#define LP5569_CONFIG 0x00 +#define LP5569_CHIP_EN BIT(6) -#define LP5569_MISC 0x2F -#define LP5569_POWERSAVE_EN BIT(5) -#define LP5569_CP_MODE_SHIFT 3 +#define LP5569_MISC 0x2F +#define LP5569_POWERSAVE_EN BIT(5) +#define LP5569_EN_AUTO_INCR BIT(6) +#define LP5569_CP_MODE_SHIFT 3 /* PWM base Register for controlling the duty-cycle */ -#define LP5569_LED0_PWM 0x16 +#define LP5569_LED0_PWM 0x16 struct lp5569_config { struct i2c_dt_spec bus; @@ -42,8 +43,7 @@ struct lp5569_config { const uint8_t cp_mode; }; -static int lp5569_led_set_brightness(const struct device *dev, uint32_t led, - uint8_t brightness) +static int lp5569_led_set_brightness(const struct device *dev, uint32_t led, uint8_t brightness) { const struct lp5569_config *config = dev->config; uint8_t val; @@ -77,6 +77,23 @@ static inline int lp5569_led_off(const struct device *dev, uint32_t led) return lp5569_led_set_brightness(dev, led, 0); } +static int lp5569_write_channels(const struct device *dev, uint32_t start_channel, + uint32_t num_channels, const uint8_t *buf) +{ + const struct lp5569_config *config = dev->config; + uint32_t i2c_len = num_channels + 1; + uint8_t i2c_msg[LP5569_NUM_LEDS + 1]; + + if ((uint64_t)start_channel + num_channels > LP5569_NUM_LEDS) { + return -EINVAL; + } + + i2c_msg[0] = LP5569_LED0_PWM + start_channel; + memcpy(&i2c_msg[1], buf, num_channels); + + return i2c_write_dt(&config->bus, i2c_msg, i2c_len); +} + static int lp5569_enable(const struct device *dev) { const struct lp5569_config *config = dev->config; @@ -90,15 +107,13 @@ static int lp5569_enable(const struct device *dev) /* flip the enable pin if specified */ if (config->enable_gpio.port) { if (!gpio_is_ready_dt(&config->enable_gpio)) { - LOG_ERR("Enable gpio not ready"); + LOG_ERR("Enable GPIO not ready"); return -ENODEV; } - ret = gpio_pin_configure_dt(&config->enable_gpio, - GPIO_OUTPUT_ACTIVE); + ret = gpio_pin_configure_dt(&config->enable_gpio, GPIO_OUTPUT_ACTIVE); if (ret < 0) { - LOG_ERR("Failed to configure enable_gpio, err: %d", - ret); + LOG_ERR("Failed to configure enable_gpio, err: %d", ret); return ret; } @@ -106,16 +121,15 @@ static int lp5569_enable(const struct device *dev) k_msleep(3); } - ret = i2c_reg_write_byte_dt(&config->bus, LP5569_CONFIG, - LP5569_CHIP_EN); + ret = i2c_reg_write_byte_dt(&config->bus, LP5569_CONFIG, LP5569_CHIP_EN); if (ret < 0) { LOG_ERR("Enable LP5569 failed"); return ret; } ret = i2c_reg_write_byte_dt(&config->bus, LP5569_MISC, - LP5569_POWERSAVE_EN | - (config->cp_mode << LP5569_CP_MODE_SHIFT)); + LP5569_POWERSAVE_EN | LP5569_EN_AUTO_INCR | + (config->cp_mode << LP5569_CP_MODE_SHIFT)); if (ret < 0) { LOG_ERR("LED reg update failed"); return ret; @@ -139,8 +153,7 @@ static int lp5569_init(const struct device *dev) } #ifdef CONFIG_PM_DEVICE -static int lp5569_pm_action(const struct device *dev, - enum pm_device_action action) +static int lp5569_pm_action(const struct device *dev, enum pm_device_action action) { const struct lp5569_config *config = dev->config; int ret; @@ -156,8 +169,7 @@ static int lp5569_pm_action(const struct device *dev, break; case PM_DEVICE_ACTION_TURN_OFF: case PM_DEVICE_ACTION_SUSPEND: - ret = i2c_reg_update_byte_dt(&config->bus, LP5569_CONFIG, - LP5569_CHIP_EN, 0); + ret = i2c_reg_update_byte_dt(&config->bus, LP5569_CONFIG, LP5569_CHIP_EN, 0); if (ret < 0) { LOG_ERR("Disable LP5569 failed"); return ret; @@ -175,24 +187,20 @@ static const struct led_driver_api lp5569_led_api = { .set_brightness = lp5569_led_set_brightness, .on = lp5569_led_on, .off = lp5569_led_off, + .write_channels = lp5569_write_channels, }; -#define LP5569_DEFINE(id) \ - static const struct lp5569_config lp5569_config_##id = { \ - .bus = I2C_DT_SPEC_INST_GET(id), \ - .enable_gpio = GPIO_DT_SPEC_GET_OR(DT_DRV_INST(id), \ - enable_gpios, {0}), \ - .cp_mode = DT_PROP_OR(DT_DRV_INST(id), \ - charge_pump_mode, 0), \ - }; \ - \ - PM_DEVICE_DT_INST_DEFINE(id, lp5569_pm_action); \ - \ - DEVICE_DT_INST_DEFINE(id, &lp5569_init, \ - PM_DEVICE_DT_INST_GET(id), \ - NULL, \ - &lp5569_config_##id, POST_KERNEL, \ - CONFIG_LED_INIT_PRIORITY, \ +#define LP5569_DEFINE(id) \ + static const struct lp5569_config lp5569_config_##id = { \ + .bus = I2C_DT_SPEC_INST_GET(id), \ + .enable_gpio = GPIO_DT_SPEC_INST_GET_OR(id, enable_gpios, {0}), \ + .cp_mode = DT_ENUM_IDX(DT_DRV_INST(id), charge_pump_mode), \ + }; \ + \ + PM_DEVICE_DT_INST_DEFINE(id, lp5569_pm_action); \ + \ + DEVICE_DT_INST_DEFINE(id, &lp5569_init, PM_DEVICE_DT_INST_GET(id), NULL, \ + &lp5569_config_##id, POST_KERNEL, CONFIG_LED_INIT_PRIORITY, \ &lp5569_led_api); DT_INST_FOREACH_STATUS_OKAY(LP5569_DEFINE) diff --git a/dts/bindings/led/ti,lp5569.yaml b/dts/bindings/led/ti,lp5569.yaml index 8464543fa75cd..dff5d9c2ec5f1 100644 --- a/dts/bindings/led/ti,lp5569.yaml +++ b/dts/bindings/led/ti,lp5569.yaml @@ -11,13 +11,15 @@ properties: GPIO used to enable the lp5569. charge-pump-mode: - type: int - default: 0 + type: string + default: "disabled" + enum: + - "disabled" + - "1x" + - "1x5" + - "auto" description: | If provided, configures the internal charge-pump mode in the MISC - register following the datasheet: - 0x00 -> disabled (default) - 0x01 -> 1x - 0x10 -> 1.5x - 0x11 -> auto - any other values are considered as undefined configurations. + register. This can be useful to supply a higher voltage to the LEDs, than + what the lp5569 is being supplied. + The default corresponds to the reset value of the register.