Categories
Community Linux Kernel Open-source

BayLibre contributions to Linux v7.0

Linux v7.0 was released on April 12, 2026. BayLibre contributed 127 authored commits across multiple subsystems.

Driver Core: Bus Method Migration

Uwe Kleine-König continued a cross-subsystem effort to migrate bus drivers away from the generic struct device_driver callbacks to bus-specific equivalents. For FSI, the migration included centralizing bus assignment in fsi_driver_register() and making fsi_bus_type private. For TEE, registration helpers including module_tee_client_driver() were added to reduce boilerplate. For SCSI, scsi_{,un}register_driver() was changed to take a struct scsi_driver directly. For PCI/portdrv, the migration also fixed a potential resource leak. Beyond these, the same pattern was applied to TEE client drivers, SDIO, serdev, SoundWire, ALSA seq, greybus, host1x, MHI, fsl-mc, and gpio stub, with all in-tree drivers in each subsystem converted.

In the au1100fb framebuffer driver, Uwe replaced the license boilerplate with an SPDX header, folded au1100fb.h into its only user, replaced custom printk wrappers with pr_* macros, made the driver compilable on non-MIPS platforms, and moved device-specific data out of global variables.

As PWM maintainer, Uwe emitted native waveform configuration in /sys/kernel/debug/pwm for drivers that support the waveform API. He committed external contributions including Rust PWM abstractions, Devicetree binding fixes, and PWM driver improvements.

IIO

ADXL380

Francesco Lavra optimized FIFO reads in the ADXL380 interrupt handler to use a single regmap_noinc_read() call, enabling 16 kHz sampling on all three axes over a 1 MHz I2C bus. He fixed a FIFO overread by rounding down the entry count to a multiple of the number of enabled scan elements, since the sensor writes one channel sample at a time regardless of how many channels are active. He also added 1 kHz sampling frequency support via the SAR signal path in VLP mode.

ST_LSM6DSX

Francesco fixed st_lsm6dsx_set_fifo_odr() to apply only to the internal accelerometer and gyroscope sensors, preventing incorrect register writes for external sensors accessed via the sensor hub. He removed the buffer sampling frequency sysfs attribute from non-accelerometer sensors to prevent out-of-bounds access to the two-entry odr_table array. He refactored the event management infrastructure to support multiple event types per axis and used it to add tap event detection for the LSM6DSV chip family.

David Lechner fixed big-endian scan buffer issues in vcnl4035 and ti-adc161s626, and added a DMA-safe buffer for spi_read() in the latter. He added an IIO_DECLARE_QUATERNION() macro to enforce 16-byte alignment for quaternion buffer fields and used it to fix hid-sensor-rotation. That same driver also needed a timestamp hack to write timestamps to both the old and new offset, since both locations potentially accumulated years of userspace dependence.

SPI: Multi-Lane Support

David Lechner added multi-lane SPI support to the kernel. He added ctlr->num_data_lanes to indicate multiple physical serializers and a multi_lane_mode field to struct spi_transfer for peripherals that require coordinated access across lanes. The Devicetree bindings were extended: spi-{rx,tx}-bus-width changed from scalar uint32 to arrays where the array length indicates the number of data lanes, and new spi-{tx,rx}-lane-map properties were added for mapping peripheral lanes to controller lanes when lanes are skipped. The AXI SPI Engine driver gained support for SPI_MULTI_LANE_MODE_STRIPE, enabling simultaneous reads from multiple ADC channels with separate SDO lines on the v2.0.0 IP core. Corresponding dt-bindings for the ADI AXI SPI engine and a documentation page for multi-lane support were added.

ARM64: Amlogic Devicetree

Jerome Brunet fixed critical MMC clock issues on Amlogic SoCs, where incorrect settings broke low-speed initialization.

As Amlogic clock maintainer, Jerome Brunet committed clock support for the T7 SoC family (PLL, peripheral, and SCMI clock controllers), video encoder and demodulator clocks for S4, and HDMI PLL output divider constraints for GXL/GXM and G12A/G12B/SM1 SoCs.

ARM: OMAP

As ARM OMAP maintainer, Kevin Hilman committed Devicetree fixes, reference count and error handling corrections, and removal of unused symbols and drivers for the OMAP platform. He also acked the removal of the legacy OMAP cpufreq driver.

DRM

David Lechner fixed bad pixel data in the ST7586 display driver caused by incorrect dbi->write_memory_bpw configuration, which produced a three-column byte swap visible as display corruption.

Francesco Lavra fixed the page start calculation in the Solomon SSD130x display controller for dirty rectangle updates in page addressing mode. The start page value was incorrectly set without taking into account the top-left Y coordinate.

VT

Nicolas Pitre fixed alternate screen support in the virtual terminal: alternate screen switching saved vc_origin but not vc_uni_lines, causing garbled display when returning from the alternate screen. The fix adds vc_saved_uni_lines to mirror the existing save/restore of vc_origin, fixing a regression from commit 23743ba64709.

Summary

Type Count
Authored 127
Signed-off-by 2
Acked-by 4
Reviewed-by 15
Suggested-by 1
Categories
Community Open-source Zephyr

BayLibre contributions to Zephyr v4.4.0

Zephyr v4.4.0 was released on April 14, 2026. BayLibre contributed 256 authored commits spanning cryptography, ARM64 architecture, LoRa/LoRaWAN, and driver support.

Cryptography: Mbed TLS 4.x and TF-PSA-Crypto 1.x

Valerio Setti led the integration of Mbed TLS 4.1 and TF-PSA-Crypto 1.1 into Zephyr. For the time being Mbed TLS 3.6 is retained only for compatibility reasons, because TF-M is still at v2.2 revision, and it will be removed once TF-M will transition to v2.3. The CMake build was completely reshaped to use add_subdirectory() against Mbed TLS and TF-PSA-Crypto’s own CMake files rather than manually selecting sources. Configuration was split into separate Kconfig files, one for each module. Several Kconfig options related to legacy Mbed TLS crypto were removed. Configuration header files have been strongly simplified moving most of the logic at Kconfig level. New Kconfigs for TLS ciphersuites have been added in order to allow the end user to quickly select all the crypto features they need for a TLS connection.

The mbedtls_shim crypto driver was overhauled. Legacy cipher (ECB, CBC), AEAD (CCM, GCM) and hash APIs were replaced with the PSA API.

OpenThread, JWT, HostAP, MCUboot, flash-map, websocket and all samples and tests (1 and 2) were transitioned to use PSA Crypto API instead of legacy Mbed TLS crypto.

Since PSA API does not support (yet) parsing of Elliptic Curve points in compressed format, specific code was added to the uoscore-uedhoc library to overcome this limitation.

A mechanism for automatic enablement of CONFIG_ENTROPY_GENERATOR was added in Random subsystem in order to simplify end user configuration file. A run time deadloop for entropy gathering was also fixed.

ARM64: ARMv9-A Architecture and Security Extensions

Nicolas Pitre added ARMv9-A architecture support with Cortex-A510 as the default processor for generic ARMv9-A targets.

Pointer Authentication (PAC) was added for ARMv8.3+ to protect against ROP attacks, with per-thread key isolation and integration with Zephyr’s thread model. A follow-on fix addressed a crash on SMP secondary CPUs when PAC is enabled. Branch Target Identification (BTI) was added for ARMv8.5+ to protect against JOP attacks. BTI requires the C library to be built with branch protection enabled; Nicolas added the arm*: BTI requires C library built with branch protection check to enforce this. ARM_PAC_PER_THREAD RNG dependency handling was also improved.

SVE context switching was implemented for ARMv9-A, supporting both SVE and SVE2 with lazy context preservation. The implementation is incremental: threads using only FPU instructions get NEON access and preservation; upgrading to SVE instructions upgrades the NEON context to full SVE context from that point on. An ISB was added between SVE trap control and ZCR register writes. CONFIG_ARM64_SVE is now disabled for ARMv9-A when explicitly set to n, and ARM64 stack sizes for userspace with FPU and MAX_XLAT_TABLES for userspace tests were increased to accommodate.

The ARM64 MMU gained arch_mem_domain_deinit() to release page tables back to the pool when a memory domain is de-initialized, using the existing discard_table() mechanism to recursively free sub-tables.

FVP board support was restructured into a unified fvp_base_revc_2xaem board with a common SoC series, adding ARMv9-A variants: v9a, v9a/smp, and v9a/smp/ns (with TFA). Cortex-A320 was added as a board variant. A PM CPU ops driver for Arm FVP enables bare metal SMP without ATF by configuring RVBAR_EL3 to redirect secondary CPU reset vectors to Zephyr’s image header.

Kernel: Heap Hardening and SMP Timer Fixes

CONFIG_SYS_HEAP_CANARIES was introduced to place canary values at the end of each allocation, validated on free. The canary is computed from chunk address and size XORed with a magic value and stored as a trailer to avoid complicating aligned allocation. This was then superseded by the SYS_HEAP_HARDENING tiered Kconfig with five levels: NONE, BASIC (double-free and overflow detection), MODERATE (free list and neighbor consistency), FULL (trailer canary on every allocation), and EXTREME (exhaustive heap validation on every operation). Hardening checks use LOG_ERR + k_panic() rather than __ASSERT, so the configured level is honored regardless of assertion settings.

Z_HEAP_MIN_SIZE was previously defined as hardcoded magic numbers gated by a growing tower of #ifdefs. Nicolas replaced this with build-time computation from the actual C structures using an iterative fixed-point expansion. The underlying infrastructure is a new zephyr_constants_library() CMake function that encapsulates the offsets-style pattern: creating an OBJECT library from GEN_ABSOLUTE_SYM() declarations and generating a header from the resulting symbols.

sys_clock_lock() and sys_clock_announce_locked() were introduced in kernel/timeout to provide a unified timer lock API. The arm_arch_timer, apic_tsc, hpet, xtensa_sys_timer, riscv_machine_timer, and intel_adsp_timer drivers were all migrated to this API, eliminating a race on SMP where sys_clock_elapsed() could observe an updated last_cycle before sys_clock_announce() had advanced curr_tick.

LoRa and LoRaWAN

Carlo Caione restructured the LoRaWAN subsystem and extended the LoRa driver layer.

The LoRaWAN subsystem was refactored to support multiple backends. The loramac-node backend was moved to a subdirectory, directories were renamed to hyphenated form (loramac-node, lora-basics-modem), and region Kconfig symbols were made backend-agnostic.

A native SX126x driver for Semtech SX1261/SX1262 was added that does not depend on loramac-node or lora-basics-modem, enabled by CONFIG_LORA_MODULE_BACKEND_NONE (experimental). The driver was extended with STM32WL sub-GHz radio support for the STM32WL’s internally-integrated SX126x-compatible radio core. Sleep mode power management was added with a PM_DEVICE callback that disconnects RF GPIO pins on suspend and reconfigures them on resume.

Two new API functions were added to the LoRa API: lora_cad() and lora_cad_async() for Channel Activity Detection (with symbol_num, det_peak, and det_min parameters embedded in struct lora_modem_config), and lora_recv_duty_cycle() for hardware-driven RX duty cycling where the radio autonomously alternates between sleep and listening for a preamble without MCU involvement.

The lora-basics-modem module received an initial smtc_modem_hal HAL implementation covering the LoRa Basics Modem HAL layer (Radio Driver HAL and RAL BSP were already handled by the lbm_sx126x drivers). The LBM porting test suite was integrated as a Zephyr test. Remaining HAL stub functions were also added.

Carlo also added a DeviceMmioCheck CI compliance check to check_compliance.py that flags driver files casting DT_REG_ADDR() or DT_INST_REG_ADDR() directly to a pointer without using the device MMIO API — an access pattern that faults on MMU-enabled systems.

Drivers: Microcrystal RV3032

Stoyan Bogdanov added multi-function support for the Microcrystal RV-3032-C7 RTC by introducing an MFD driver to centralize I2C access and interrupt arbitration. The existing RTC driver was reworked to use the MFD parent, allowing parts of the chip that did not fit the RTC API to be exposed through separate drivers.

Three child drivers were added: a counter driver exposing the RV3032’s hardware timer via the counter API, a temperature sensor driver reporting from the chip’s internal sensor with high/low threshold interrupt support, and updated Devicetree bindings. Tests for all three subsystems were added to the build-all test suites.

Boards: phyBOARD-Polis A53 and SMP

Vitor Sato Eschholz ported Zephyr to the quad Cortex-A53 cluster of the phyBOARD-Polis (phyCORE-i.MX 8M Mini/Nano), which previously only ran on the Cortex-M4 core. The port includes SMP support. A UART3 node was added to the imx8mm Devicetree, and board documentation was updated with an A53 core description and a corrected board overview image.

TI CC13xx/CC26xx, PTP, and Documentation

Alexandre Bailon fixed two bugs in the IEEE 802.15.4 cc13xx/cc26xx driver. The channel selection path was stopping and restarting all radio operations even when the channel had not changed; skipping the restart when the channel is unchanged fixed the OpenThread joiner. The frame filter update path was computing new filters but not submitting them to the radio core; the fix restarts RX with the new filters immediately.

Pascal Bodin fixed cc13xx_cc26xx_irq_tx_ready() to check that the TX Ready interrupt occurred rather than checking for free space in the TX FIFO. The original check allowed a race in the OpenThread Spinel protocol implementation when a UART RX interrupt arrived between otPlatUartSend() setting ot_uart.tx_busy and initializing write_length.

Adam Wojasinski fixed an undefined behavior vulnerability in Zephyr’s PTP (Precision Time Protocol) subsystem. The bug was in how the PTP stack computed timeouts — it used interval values sourced directly from incoming PTP management messages as bit-shift counts, without any bounds validation. Shifting by a negative or out-of-range count is undefined behavior in C, and since those interval values could be freely set by a remote peer, a malicious or malformed message could trigger this in a running embedded system — with unpredictable consequences ranging from wrong timing to crashes. The fix clamps both both interval values to [-63, 63] before they touch any shift operation.

Adrien Ricciardi added a documentation link from K_xxx_THREAD_DEFINE to the thread entry point function type.

Summary

Type Count
Authored 256
Categories
Android Community MediaTek Open-source Texas Instruments U-Boot

BayLibre contributions to U-Boot v2026.04

U-Boot v2026.04 was released on April 6, 2026.

MediaTek Clock Driver

David Lechner overhauled the MediaTek clock driver infrastructure in this release.

The first area of work was safety. David added size fields to the core clock data structures. These enable bounds checking on array accesses that currently occur without any range validation. He also added driver-specific of_xlate ops that return -EINVAL when zero args are passed and -ENOENT when the requested ID is out of range, catching out-of-bounds accesses before they reach the clock data arrays. The ops also perform the id_offs_map translation once at of_xlate time and store the mapped ID in clk->id, removing the need to call mtk_clk_get_id() repeatedly later.

Structural cleanup addressed several confusing patterns. The struct mtk_clk_tree.gates_offs field was used in two different contexts depending on whether it referred to the tree’s own gates or a struct mtk_cg_priv‘s gates. David added a dedicated gates_offs field to struct mtk_cg_priv to eliminate the ambiguity. The CLOCK_PARENT_* macro aliases of CLOCK_* were removed, and infrasys functions were reorganized into a coherent group.

On MT8365 specifically, David fixed missing and out-of-order clock entries. Since clocks are looked up by index, any gap or transposition causes the wrong clock to be used. Missing topckgen IDs and incorrect clock parents were also corrected.

The MT8365 topckgen-cg driver was removed. It had been rejected upstream in Linux because it created a separate clock controller in the same address space as the existing topckgen controller. David added gate support directly to topckgen drivers, split struct mtk_clk_tree for MT8365 into three separate structures for apmixedsys, topckgen, and infracfg, and removed the now-unnecessary topckgen-cg driver and its associated Devicetree node. He also implemented dump callbacks for MediaTek clocks to allow inspection of the full clock tree, which is useful for debugging given the hundreds of clocks present on these SoCs.

MediaTek Pinctrl

Vitor Sato Eschholz added the pinctrl driver for the MT8365 SoC and added pinmux_property_set ops support to the MediaTek pinctrl framework.

David Lechner extended the common MediaTek pinctrl driver with support for the mediatek,pctl-regmap Devicetree property. In upstream Linux devicetrees, some pinctrl nodes sit in the interrupt controller address space rather than the pinctrl register space, and a mediatek,pctl-regmap phandle points to the actual pinctrl registers through a syscon node.

Two bugs in the pinctrl driver were fixed. The PUPD/R1/R0 registers cover only a small subset of pins, so mtk_pinconf_bias_set_pupd_r1_r0() normally returns an error for most pins. The error was being propagated up, causing the configuration loop to exit early and leaving some pins in a group unconfigured. David also added PUPD register definitions for MT8365 and fixed the array size for reg_cals.

MediaTek Platform Support

Julien Masson added support for the MediaTek MT8188 SoC. He added basic SoC support including watchdog and tphy support via upstream compatible strings, and a clock driver based on the Linux clk-mt8188-* drivers. He then added MT8390 EVK board support with boot, UART, watchdog, and MMC enabled. MT8390 is based on MT8188.

David Lechner switched the MT8365 EVK to CONFIG_OF_UPSTREAM=y and removed the U-Boot copy of the MT8365 Devicetree source files. In the mtk-sd MMC driver, he replaced separate mask and shift macro definitions with GENMASK and FIELD_GET/FIELD_PREP macros.

Driver Model

Markus Schneider-Pargmann extended the driver model core to allow multiple drivers to match the same compatible string. Previously, when the first matching driver returned -ENODEV, the next compatible string in the device’s list was tried instead of continuing to the next driver with the same compatible. This change moves the iteration so that -ENODEV advances to the next driver rather than the next compatible. A test was added to verify the behavior.

This is required for ti-musb-host and ti-musb-peripheral, which both match the same compatible but differ based on the dr_mode DT property. Each driver checks dr_mode in its bind function and returns -ENODEV if it does not match, allowing the other driver to bind instead.

TI AM335x Video and Display

Markus Schneider-Pargmann added OF graph support to the TI AM335x LCDC driver, enabling panel configuration through the standard OF graph binding rather than requiring board-specific code.

He added a get_modes() operation to the panel uclass. Linux’s simple_panel driver exposes panel timings through get_modes() returning a list of drm_display_mode structs. Markus added a compatible path in U-Boot where get_display_timing() calls either get_display_timing() or get_modes() depending on which panel operation is available. He then added the tfc_s9700rtwv43tr_01b panel with hardcoded timing data using this new infrastructure, and added a simple_panel_drv_data struct to hold a display_timing pointer for panels that are ported from Linux’s simple_panel driver.

For clock support, Markus split the common omap2plus clock functions into a new Kconfig symbol so drivers that need them can select it explicitly, and added a separate CLK_TI_OMAP4_CM Kconfig symbol for the omap4-cm driver. He added a ti-omap-prm power domain stub driver to allow upstream DT to use simple-pm-bus on am33xx, where all power domains are enabled at boot but a probe-capable driver is required. He also made clocks optional in simple-pm-bus to match the binding, which only requires either power domains or clocks, not both.

Android Boot

Guillaume La Roque added bootconfig support for Android vendor boot image version 4, where bootconfig is mandatory. In android_image_get_ramdisk(), after copying both vendor and boot ramdisks, androidboot.* entries are extracted from the kernel command line and written to the bootconfig section. The ramdisk and bootconfig sizes are then updated and the androidboot.* entries are stripped from the kernel command line.

He also added an abootimg get ramdisk command for retrieving ramdisk address and size from Android boot images version 3 and later, which combine vendor ramdisk, boot ramdisk, and bootconfig sections into a single ramdisk. A sandbox memory mapping fix was also included, converting header pointers to physical addresses with map_to_sysmem() in parse_hdr functions and adding map_sysmem()/unmap_sysmem() calls in android_image_get_data().

Video Display and Regulator

Julien Stephan added a read_edid command that retrieves EDID data from a connected display using the read_edid callback from the DISPLAY driver uclass, rather than going through raw I2C as i2c edid does. He also refactored display_read_timing() to reuse display_read_edid(), which had been made unreachable since commit 2dcf143398ad when the display uclass was reorganized.

In the common regulator driver, Julien fixed a compilation failure when CONFIG_DM_GPIO is not enabled. The enable GPIO is optional, so GPIO calls are now conditionally skipped. He also replaced a manual GPIO validity check with dm_gpio_is_valid() and removed an unnecessary debug trace.

Build and Test Infrastructure

David Lechner fixed out-of-tree builds where scripts/Makefile.autoconf was using the relative $(srctree) path (..) when creating a symlink for include/asm/arch, resulting in a broken symlink when the build tree is not adjacent to the source tree. The fix uses $(abs_srctree) instead.

He added a requirements.txt for pylibfdt specifying setuptools>=78.1.1, following the per-tool requirements pattern. He also fixed test.py to check whether the ubconfig file exists before trying to use it, and corrected a spelling error in the source_dir docstring.

Julien Stephan removed the now-unused ufs_post_bind() declaration from include/ufs.h and cleaned up the corresponding includes from drivers that included <ufs.h> solely for that prototype.

Summary

Type Count
Authored 72
Signed-off-by 12
Reviewed-by 2
Tested-by 1
Categories
Community Frontpage Article Linux Kernel Open-source

BayLibre contributions to Linux v6.19

Linus released Linux 6.19 on February 8, 2026. BayLibre contributed 49 authored commits to this release across several subsystems.

IIO

ADC: AD7124

David Lechner fixed a possible out-of-bounds array access in the AD7124 driver where using a non-zero value for the adi,gain-milli devicetree property could trigger the issue. He changed the setup register allocation strategy to allocate registers on-demand during buffered reads, allowing more combinations of different setups at runtime.

He added extended attributes to the temperature channel, including scale, sampling_frequency, and sampling_frequency_available, making the temperature channel configurable like other channels. The driver now supports a debugfs attribute to disable single cycle mode for testing purposes.

Additional cleanups include removing the unused nr field from struct ad7124_channel_config, inlining ad7124_enable_channel(), removing __ad7124_set_channel(), using devm_mutex_init(), using AD7124_MAX_CHANNELS consistently, and removing an internal function.

Media: Mobiveil MG4B

David Lechner fixed two issues in the Mobiveil MG4B media driver. He replaced the custom buffer handling with iio_push_to_buffers_with_ts() for proper timestamp handling and used aligned_s64 for scan data to ensure proper alignment.

IIO Buffer Documentation

David documented calling context requirements for IIO buffer functions. He added documentation that iio_push_to_buffers() and the store_to() callback may be called in any context including interrupt handlers. He documented that iio_push_to_buffers_with_ts_unaligned() may sleep and added a might_sleep() check to enforce this. He documented that iio_push_to_buffers_with_timestamp() is deprecated in favor of iio_push_to_buffers_with_ts() and documented the buffer callback cannot be called in an atomic context.

KUnit

Uwe Kleine-König dropped an unused parameter from kunit_device_register_internal(), removing the unused struct kunit_device *kunit_dev parameter from the function signature.

Accelerometer: ADXL380

Francesco Lavra fixed handling of unavailable INT1 interrupt in the ADXL380 driver. This allows the INT1 interrupt pin of the sensor to be used as an alternative to INT0.

IMU: ST LSM6DSx

Francesco Lavra fixed the channel specification for sensors without event detection in the ST LSM6DSx driver: the event_spec struct member was incorrectly populated for all sensors, causing a potential NULL pointer dereference for sensors without event detection capabilities. He decoupled sensor ODR from FIFO batch data rate, allowing independent control of sensor sampling rate and FIFO batching rate. He also fixed the measurement unit for the odr struct member, documenting it as mHz instead of Hz.

PWM

Core and Drivers

Uwe Kleine-König ensured ioctl() returns negative errno on error by changing the PWM character device to return -ENOTTY instead of positive ENOTTY for unsupported ioctl commands.

He fixed the BCM2835 driver to enable the channel in pwm_request() when hardware was enabled at boot, ensuring the channel remains enabled after request. The MediaTek driver was converted to the waveform API and now uses struct_size() macro for allocation.

He dropped the unused pwm_apply_args() function from the PWM core. Format strings were cleaned up to use %u for unsigned integers and simplified for emitting chip->npwm in debugfs.

Rust PWM Support

As PWM maintainer, Uwe Kleine-König committed Rust PWM infrastructure including Kconfig and basic data structures, complete abstraction layer, module_pwm_platform_driver! macro, and the T-HEAD TH1520 PWM driver. He dropped wrapping of PWM polarity and state to use C types directly from Rust. The Rust PWM support required exporting pwmchip_release for external use and adding namespace import support to the Rust module macro. He also committed fixes for Rust formatting, intra-doc links, and clippy warnings.

Further Uwe Kleine-König committed contributions from external developers including PWM driver fixes, devicetree bindings, and the Airoha EN7581 PWM support.

CAN: M_CAN

Markus Schneider-Pargmann replaced the M_CAN maintainer.

He implemented wakeup support for the M_CAN driver. The driver now maps Wake-on-LAN to device_set_wakeup_enable() and supports pinctrl wakeup state, switching to a wakeup pinctrl configuration when the device is configured as a wakeup source. The corresponding devicetree bindings were updated to include wakeup properties.

He changed error handling in allocation to return ERR_PTR on error instead of NULL, improving error propagation.

Firmware: TI SCI

Markus Schneider-Pargmann added support for transfers without response to the TI SCI firmware driver, allowing fire-and-forget message transmission needed for entering Partial-IO. He implemented Partial-IO support, enabling isolation of IO pads during low power modes on TI platforms.

ARM64: TI Devicetree

Markus Schneider-Pargmann defined possible system states in the devicetree for AM62, AM62A, and AM62P SoCs. He configured wakeup-source system states for the AM62-LP-SK, AM62A7-SK, and AM62P5-SK boards, enabling proper power management configuration.

ARM: OMAP

As ARM OMAP maintainer, Kevin Hilman committed contributions from external developers including devicetree fixes for TI OMAP platforms, PRU Ethernet driver enablement, UART compatible string corrections, and clock API migrations.

Kevin Hilman tested and reviewed patches implementing CPU system wakeup QoS limits for cpuidle and suspend-to-idle, allowing specification of wakeup latency requirements.

GPIO

Francesco Lavra modified the PCA953x driver to enable interrupt latching only on edge-triggered inputs. Level-triggered interrupts don’t require latching, and enabling it can cause the driver to miss an active interrupt condition.

SPI

Axel Haslam added an offset parameter to the SPI offload subsystem which is used to specify delays in between multiple triggers.

ASoC

Francesco Lavra removed the Kconfig dependency on TEGRA20_APB_DMA from the Tegra ASoC drivers. The dependency is no longer correct as these drivers now support Tegra SoCs without the Tegra20 APB DMA controller, such as Tegra234.

ARM64: Amlogic Devicetree

Guillaume La Roque fixed the L2 cache reference for S922X CPUs in the Meson G12B devicetree. The S922X has four Cortex-A73 cores with their own L2 cache, but the devicetree incorrectly referenced the A53 L2 cache for these cores.

Summary

Type Count
Authored 49
Acked-by 2
Reviewed-by 26
Tested-by 6
Suggested-by 2

Categories
Community Conferences Open-source

Our Open Source Journey: A 2025 Retrospective

As we enter 2026, it is a perfect opportunity to look back at 2025 and how we have been involved with and contributed to different open-source ecosystems and communities.

Over the past year, BayLibre has acted as an active contributor and maintainer within projects including the Linux kernel, Zephyr RTOS, the Yocto Project, the GNU Toolchain, Mbed-TLS, U-Boot, AOSP and many others.

While the highlights below capture some key milestones, they are not an exhaustive list of every achievement, as many daily contributions and maintenance tasks are not included.

We want to give kudos to the entire team making this happen, from those upstreaming daily patches to our official maintainers and conference speakers. Our involvement in these communities is a continuous journey intended to exchange ideas, contribute to the wider ecosystem, and help bring products to life with upstream software.

January – March: Bootflows and Subsystem maintenance

We began the year with technical experiments on Android bootflows, exploring U-Boot’s standard boot and the Generic Bootloader Library (GBL) on the BeaglePlay board.

In the Linux kernel, we were ranked among the top 20 contributing companies for the v6.13 release. Our work focused on the IIO and PWM subsystems, as well as introducing support for multiple system-wide low-power states for TI AM62x SoCs.

By March, we contributed to the Zephyr 4.1.0 release, specifically through optimizations to the ZMS storage subsystem and expanded support for the TI CC23x0 SoC family, and again to the Linux kernel v6.14 release (contributions to PM Domains, IIO, PWM, Kernel Infrastructure, IRQ Chip Support and misc).

April – June: Technical Case Studies and Community Events

In April, we shared our expertise in Yocto Project maintenance through a case study on the python3-numpy recipe and a guide on using the Automatic Recipe Upgrade Helper (AUH for build automation.

Our team also participated in the RISC-V Summit Europe, presenting a Compared Analysis of GCC Codegen for AArch64 and RISC-V and a Python Packaging Infrastructure for the RISCV64 Ecosystem.

May was a productive month as we served as the official organizer for Embedded Recipes 2025 in Nice. Among all the high quality talks, the event featured a technical talk on Zephyr’s cryptographic features from BayLibre and dedicated Yocto Project, labgrid, libcamera and Pipewire workshops.

During this quarter, we also delivered an updated Android 14 SDK for MediaTek Genio IoT chipsets, contributed to the Linux kernel v6.15 release (IIO, PWM, Kernel, Clock, GPIO and SPI Offloading infratructures, MediaTek and TI platforms support and other) and introduced the new SPI offloading framework for the Linux kernel during OSS North America.

July – September: Toolchains and the European Tour

The summer was highlighted by the releases of:

  • GCC 15, where our compiler team contributed 395 commits focusing on OpenMP and GPU offloading for high-performance computing and supercomputers. This work is vital for achieving computational capabilities within a sustainable power envelope.
  • The Linux kernel v6.16, where the team continued its work on IIO, PWM and SPI Offload, contributed as well to the VT/Console, RTC, Clock subsystems and provided support for ARM/OMAP and Mediatek platforms.
  • Zephyr 4.2.0 , with contributions on new hardware platform support, Kernel optimizations, Storage subsystem improvements, Power Management and Cryptography / Security enhancements.

In August, eight team members attended OSS Europe in Amsterdam delivering six technical talks:

  • Why Won’t My CPU Sleep? Debugging cpuidle Mysteries on ARM SoCs (Embedded Linux Conference)
  • Do It Faster: How We Supercharged Linux to Work with Blazing Fast ADCs for IIO (Embedded Linux Conference)
  • Powering Up Lab Automation with labgrid and CI (Embedded Linux Conference)
  • Cryptography Support in Zephyr: Recent Changes and Upcomings (Zephyr Developer Summit)
  • Running Zephyr in a Light Bulb (Zephyr Developer Summit)
  • ZMS: a New Lightweight Storage System (Zephyr Developer Summit)

In September, we sponsored the GNU Tools Cauldron in Porto, where our engineers presented and led discussions on:

  • Comparative Analysis of GCC Codegen for AArch64 and RISC-V
  • Parallel Computing, Offloading, OpenMP and OpenACC
  • Toolchain and Linux kernel
  • Quantifying Abstraction Costs in GCC
  • Reviewing refactoring goals and acceptable abstractions in GCC

We also participated in Kernel Recipes in Paris, focusing on the technical components and community of the GNU Compiler Collection.

The Linux kernel v6.17 was also released where we notably contributed across multiple subsystems, focusing on IIO drivers, PWM infrastructure, SPI offload support, and platform improvements. BayLibre was once again among the top 20 contributing companies and some top 10 individual contributors by number of changesets.

October – December: Global Collaboration and Year-End Releases

As the year concluded, we shared results on quantifying abstraction costs in GCC to identify compilation speed or memory consumption regressions.

In November, we hosted a community gathering at Embedded World North America to connect with partners and customers. We also contributed to the Zephyr 4.3.0 release, which included SoC-level power management and improved PSA Crypto API migration.

The year ended with our team traveling to Tokyo for OSSummit Japan and the Linux Plumbers Conference, where we presented on multiple system-wide low-power states.

We remained a significant contributor to the final kernel release of the year, Linux kernel v6.18, which included our work on IIO, PWM, Clock, and ARM subsystems, delivering improved ADC drivers, SPI offloading, and critical SoC support for Amlogic, TI, and Renesas platforms.

Looking Forward to 2026

Our journey continues into the new year as we maintain our efforts in the communities where we hold contribution and maintainership roles, still including Linux kernel, Zephyr RTOS, the Yocto Project, the GNU Toolchain, Mbed-TLS, U-Boot, AOSP and many others.

We are already preparing to host the next edition of Embedded Recipes in Nice on May 27-28, 2026 and our 2026 conference schedule is taking shape with confirmed speakers for several key events (and more to come):

  • SCA/HPC Asia in Osaka
  • FOSDEM in Brussels
  • RISC-V Summit in Bologna
  • OSS / ELC Europe and Linux Plumbers in Prague
  • GNU Tools Cauldron
  • IWOMP 2026 in Vienna
  • SC26 (Supercomputing) in Chicago
Categories
Board Farm Community Open Hardware Open-source

BayLibre open sources Copilot hardware to automate embedded software development workflows

We’re thrilled to announce that BayLibre has open-sourced Copilot!

Don’t worry, this Copilot has nothing to do with Microsoft or AI; it won’t write your code, but it will take care of your Device Under Test (DUT)’s power, serial communication, and GPIOs like a champ.

Originally developed internally at BayLibre, it simplifies embedded system testing and development. By making it publicly available, we hope to empower the embedded community and foster collaboration around practical hardware-software tools.

What is Copilot

Copilot is an open-hardware solution that lets you control a DUT through a single USB connection. It combines power management, serial communication, and GPIO control in one compact board, reducing setup complexity and enabling more efficient development and testing workflows.

Key Features

Single USB Port Management
Control DUT power on/off and serial communication via one USB connection, eliminating extra cables and simplifying test setups.

GPIO Control
Access configurable GPIO pins for signaling, triggering, or controlling other hardware. Automate tests, control LEDs or switches, and integrate Copilot into custom hardware workflows.

Ready-to-Use
No additional software required ; drivers and utilities are provided as part of all standard Linux distributions.

Open Source USB Expansion Board
Need more USB ports? No worries, we have also developed and released an open source USB expansion board!

Use Cases

  • Embedded system automation, testing and debugging
  • Power sequencing for prototypes
  • Serial communication with DUTs
  • GPIO-driven automation for hardware testing

Why Open-Source

At BayLibre, we believe in open collaboration and shared innovation. By releasing Copilot under the MIT license, developers can:

  • Contribute improvements – bug fixes, new features, or hardware extensions.
  • Customize for specific workflows – adapt Copilot to your embedded projects.
  • Share knowledge – learn from community enhancements and best practices.

Getting Started

You can access Copilot on GitHub: https://github.com/BayLibre/Copilot. The repository includes:

  • Complete installation and usage documentation
  • Hardware schematics and software examples
  • Contribution guidelines

We welcome feedback, contributions, and questions from the community. Let’s make embedded development smoother, more reliable, and more fun together.

Categories
Community Open-source Python Yocto

BayLibre contributions to Yocto whinlatter (5.3)

Yocto Whinlatter (5.3) was released in December, it’s the current stable release following Walnascar (5.2). BayLibre contributed 35 authored commits across three Yocto repositories.

openembedded-core

Python Package Maintenance

Trevor Gamblin maintained and upgraded multiple Python packages in openembedded-core. He upgraded Python from 3.13.2 to 3.13.3 and from 3.13.4 to 3.13.5, running ptests and reproducibility checks to verify each upgrade.

The python3-setuptools upgrade from 78.1.0 to 80.8.0 brought notable changes including the removal of the easy_install module (replaced with a temporary compatibility stub) and a temporary LICENSE file removal that was restored in v80.8.0. Trevor also removed the NO_FETCH_BUILD variable from setuptools3 and setuptools3_legacy classes as it was no longer checked.

Multiple python3-numpy upgrades were performed by Trevor (2.2.4 -> 2.2.5 -> 2.2.6 and 2.3.1 -> 2.3.2 -> 2.3.3 -> 2.3.4). He fixed numpy ptests by adding meson and python3-unittest-automake-output to RDEPENDS, converting run-ptest to a shell script that sets PYTEST_DEBUG_TEMPROOT and invokes tests with pytest --automake, configuring IMAGE_ROOTFS_EXTRA_SPACE and QB_MEM settings in core-image-ptest.bb, and moving python3-numpy from PTESTS_PROBLEMS to PTESTS_SLOW.

Other Python packages received routine upgrades: python3-hypothesis (6.138.15 -> 6.139.2 -> 6.142.2), python3-pytest (8.3.5 -> 8.4.1), python3-dbusmock (0.33.0 -> 0.37.0), python3-cython (3.0.12 -> 3.1.0), python3-setuptools-scm (8.2.1 -> 8.3.1), python3-pyparsing (3.2.3 -> 3.2.4), python3-smartypants (2.0.0 -> 2.0.2), python3-referencing (0.36.2 -> 0.37.0), and python3-trove-classifiers (2025.9.8.13 -> 2025.9.11.17).

The python3-colorama recipe was added to openembedded-core by Trevor since pytest lists it as a dependency. He added himself to maintainers.inc for newly-unassigned Python recipes to enable automatic upgrade checking and sorted Python recipes alphabetically in the file.

Build System and Testing

Trevor doubled the gnome-desktop-testing-runner timeout in glib-2.0 run-ptest from 300s to 600s by passing -t 600. This addressed intermittent test failures on qemuriscv64 where codegen.py.test and gi-compile-repository.py.test could exceed the default timeout.

Recipe Utilities

Uwe Kleine-König modified get_recipe_upstream_version in recipeutils to pass ud.name instead of default to latest_revision implementations. While most fetchers ignore this parameter, default is not a valid name in general, and passing ud.name is the correct approach after bitbake commit 2515fbd10824 dropped multiple branch/revision support for single git urls.

In meta/lib/oe/recipeutils.py, Uwe added support for multi-repo recipes in upgrade checks. For recipes using multiple git repos (like linux-yocto with SRCREV_machine and SRCREV_meta), rd.getVar("SRCREV") yields INVALID. He used bb.fetch2‘s exposed revision information from ud instead of relying on a single SRCREV variable.

meta-openembedded

Trevor removed the distutils classes from meta-openembedded since distutils was removed from Python as of 3.12 and nothing in the layer was using these classes.

The python3-pychromecast recipe received a build fix for setuptools 80.x compatibility through backported patches that fixed pyproject.toml versions around setuptools. Trevor also removed the python3-colorama recipe from meta-openembedded and the meta-python packagegroup after moving it to openembedded-core.

meta-riscv

Trevor added a SECURITY.md file to meta-riscv and updated riscv-common.inc to use KERNEL_CLASSES ?= "kernel-fit-extra-artifacts" instead of KERNEL_CLASSES ?= "kernel-fitimage" and KERNEL_IMAGETYPE ?= "fitImage", reflecting the latest configuration in Yocto Project documentation.

Nezha Board Support

Trevor set KERNEL_IMAGETYPE to Image in nezha-common since KERNEL_IMAGETYPE defaults to zImage from ARCH_DEFAULT_KERNELIMAGETYPE for all architectures except x86, but building for nezha with this value resulted in “No rule to make target ‘zImage'” errors. He increased CONFIG_SPL_SYS_MALLOC_SIZE to 2MB in the nezha configuration to fix boot failures with “Could not get FIT buffer of 1074176 bytes” errors. He also added an Image + fdtcontroladdr boot step to tftp-mmc-boot.txt since nezha now uses the Image kernel format, relying on fdtcontroladdr holding the dtb location.

Trevor removed KERNEL_FEATURES_RISCV from linux-allwinnerd1-dev to eliminate build error messages about missing config fragments when the kernel version is not sufficiently new.

Summary

Type Count
Authored 35
Tested-by 2
Categories
Community Open-source U-Boot

BayLibre contributions to U-Boot v2026.01


U-Boot v2026.01 was released on January 5, 2026.

TI AM6x Board Support

Guillaume La Roque refactored board detection code for the TI AM6x family. He added two generic functions to board/ti/common/: do_board_detect_am6() and setup_serial_am6(). The do_board_detect_am6() function reads the on-board EEPROM at the configured address, with fallback logic to try CONFIG_EEPROM_CHIP_ADDRESS + 1 if the first read fails. The setup_serial_am6() function converts the serial number from EEPROM hexadecimal string format to 16-character hexadecimal representation and stores it in the serial# environment variable. Both functions are protected by CONFIG_IS_ENABLED(TI_I2C_BOARD_DETECT).

Guillaume then migrated three AM6x boards to use these generic functions. AM62x gained EEPROM reading support, storing board name and revision data at the end of SRAM, updating environment variables, and printing board info during boot. AM64x and AM65x replaced their board-specific do_board_detect() and setup_serial() implementations with calls to the generic functions.

A subsequent fix restored the do_board_detect wrapper functions for AM64x, AM62x, and AM65x that were accidentally removed during the refactoring, resolving a boot failure on AM64x EVM.

Markus Schneider-Pargmann fixed a configuration guard in the TI AM335x board code. The scale_vcores_generic() function calls functions implemented in tps65910.c, not tps65910_dm.c, so the guard was changed from CONFIG_DM_PMIC_TPS65910 to CONFIG_SPL_POWER_TPS65910.

Android Boot Standard

Nicolas Belin added support for the bootargs environment variable in Android bootflows. Previously, script-based bootflows used bootargs to customize the kernel commandline at boot time. The bootstandard Android implementation now concatenates the bootflow commandline with the contents of the bootargs environment variable to maintain this behavior.

Documentation

David Lechner fixed pytest documentation errors. He corrected environment variable names in hook script documentation from UBOOT_ prefix to U_BOOT_ prefix. He documented missing environment variables U_BOOT_BUILD_DIR_EXTRA and U_BOOT_RESULT_DIR_EXTRA that were added in a previous commit but left undocumented. He also fixed a typo in the hook script name from u-boot-test-flash1 to u-boot-test-flash.

David also removed duplicate documentation for the @parent field in struct mtk_composite in the MediaTek clock driver and fixed a spelling error in the field name.

Summary

Type Count
Authored 10
Signed-off-by 2
Categories
Community Linux Kernel Open-source

BayLibre contributions to Linux v6.18

Linus released Linux 6.18 on November 30, 2025. BayLibre contributed to this release across several subsystems. (** image generated by bots.  There may be mistakes. )

IIO

ADC Drivers

AD7124

David Lechner extended the AD7124 ADC driver with filter support, allowing selection of different filter types (sinc3, sinc4, and variants with post filters). The filter type influences the effective sampling frequency, with different factors for each filter type. The driver tracks the requested sampling frequency to maintain the closest possible value when switching filter types.

He added clock support, including both external clock input and internal clock output modes. The driver can enable the internal clock output if the #clock-cells devicetree property is present. External clock support was also implemented, with the driver checking for both clocks and #clock-names properties to avoid conflicts.

He implemented several fixes addressing issues with temperature channel measurements, multi-channel sampling rates, and fractional sampling frequencies. The driver now uses guard(mutex) to simplify return paths and implements read_avail() for scale_available. Additional cleanups include using clamp() for value clamping.

David Lechner fixed devicetree bindings by correcting the clocks properties for adi,ad7124 and adding the clock-output-names property for adi,axi-clkgen.

AD7173

David Lechner added SPI offload support to the AD7173 driver, enabling hardware-accelerated data acquisition with the ad411x_ad717x HDL project. The implementation uses 32-bit data words as per the HDL project specification. He also added filter type selection, with support for changing the filter type on individual channels.

Other ADC Work

David Lechner fixed ad7280_store_balance_timer() in the AD7280a driver and corrected the SPI offload trigger rate in the AD7380 driver. He refactored the ti-adc081c driver to use individual model structures instead of an array.

Proximity Sensors

David Lechner converted multiple proximity sensor drivers to use stack-allocated scan buffers instead of DMA-safe buffers in driver state structures. This change affects srf08, sx9500, vl53l0x-i2c, pulsedlight-lidar-lite-v2, and mb1232 drivers. Stack allocation is appropriate when buffers are used only within a single function and don’t require DMA safety.

IMU

Francesco Lavra fixed array sizing issues in the st_lsm6dsx driver. The decimator and batch fields of struct st_lsm6dsx_settings were corrected to use appropriate array sizes: decimator now uses ST_LSM6DSX_ID_MAX instead of ST_LSM6DSX_MAX_ID, and batch uses a fixed size of 2 since it applies only to accelerometer and gyroscope.

SPI and ADI AXI Infrastructure

David Lechner added a version check function adi_axi_pcore_ver_gteq() to adi-axi-common.h for checking ADI AXI IP core versions using semantic versioning. This enables drivers to check minor versions for backward-compatible feature enablement. The axi-spi-engine driver was updated to use this function.

Francesco Lavra removed the Kconfig dependency on TEGRA20_APB_DMA from the tegra114 SPI driver, as the driver supports Tegra SoCs without the Tegra20 APB DMA controller, such as Tegra234.

PCI: Non-Transparent Bridge

Jerome Brunet extended vNTB EPF driver to allow arbitrary BAR mapping instead of assuming incremental BAR numbers from MW1. This new support allows Renesas Rcar S4 to use vNTB for PCIe-to-PCIe links.

Clock: Amlogic

Jerome refactored the Amlogic clock driver infrastructure with probe helpers and composite clock macros. New macros help define simple composite clocks following the sel/div/gate pattern, reducing controller verbosity for recurring clock definitions. The meson-clkcee module was dropped and its syscon-based controller registration helper moved to clkc-utils with a more descriptive name.

Clocksource: ARM Global Timer

Markus Schneider-Pargmann added prescaler auto-detection for the ARM global timer driver to support CPU frequency scaling on am43xx. The am43xx clock tree has the global timer clock as an indirect child of the CPU clock, causing the hardcoded prescaler to reject frequency changes across CPU OPPs. The auto-detection calculates platform-specific prescaler values: 50 for am43xx (initial_freq/GCD of all OPP frequencies), 2 for zynq-7000, and 1 for other platforms. The Kconfig option defaults to 0 for auto-detection while allowing manual override.

Serial: 8250 OMAP

Markus Schneider-Pargmann added wakeup support to the 8250 OMAP driver for am62 suspend-to-RAM. When the device is wakeup-enabled, the driver selects the ‘wakeup’ pinctrl state on suspend and restores the default state on resume. The corresponding devicetree bindings were updated to include default and wakeup pinctrl states.

ASoC: Amlogic

Valerio Setti fixed bit clock polarity in the Meson AIU I2S encoder. According to I2S specs, audio data is sampled on the rising clock edge and changes on the falling edge. The Amlogic SoC behaves inversely in normal mode, requiring clock polarity inversion.

ARM64: Amlogic Devicetree

Valerio Setti removed UHS capability from the SD card node on gxbb-odroidc2 to fix reboot failures. The issue occurs because switching from HS to UHS mode requires reducing bus voltage from 3.3V to 1.8V via the vqmmc regulator. The ROM bootloader only supports HS mode (3.3V), and during reboot the voltage is not restored to 3.3V, causing the bootloader to hang. Removing UHS modes limits SD card speed to HS (25 MB/s) instead of UHS DDR50 (50 MB/s) but enables reliable reboots.

ARM: OMAP

As ARM OMAP maintainer, Kevin Hilman committed contributions from external developers including devicetree fixes for OMAP platforms, clock API migrations from round_rate() to determine_rate(), and UART compatible string corrections.

PWM

PCA9685

Uwe Kleine-König refactored the PCA9685 driver to prepare for waveform API conversion. GPIO support was temporarily dropped (to be restored via the PWM core’s optional GPIO chip for waveform API drivers). The driver was converted to use regmap register caching and bulk write operations for atomic register updates. The .free() callback no longer disables hardware state.

MediaTek

The MediaTek PWM driver gained a .get_state() callback implementation, enabling pwm_get_state_hw() and improving /sys/kernel/debug/pwm usefulness. Clock handling was reworked to lock and cache the clock rate. The driver now initializes clocks when hardware is enabled at probe time. Channel offset representation was simplified, and additional register defines were introduced. Various issues in the .apply() callback were fixed. Parameters for the clock helper function were reworked.

TI EHRPWM

Multiple fixes addressed calculation errors in the TI EHRPWM driver. Off-by-one errors in duty-cycle calculation were corrected for Up-Count Mode, where the period length is (TBPRD + 1) * T_TBCLK. The value written to TBPRD didn’t account for the +1 in that formula yielding slightly inexact output. Handling for 100% duty-cycle was fixed to account for potential overflow when TBPRD is 0xffff. Clock divisor calculation was corrected for corner cases. The driver no longer drops runtime PM references in .free().

PWM Core

Uwe Kleine-König added GPIO device support for waveform drivers in the PWM core. A PWM can function as an output-only GPIO when duty_length = period_length (active) or duty_length = 0 (inactive). The waveform abstraction allows tighter control about the hardware settings than the legacy .apply() callback. This ensures PWMs that cannot generate constant signals at both levels error out appropriately.

Debug checks were updated: polarity tests now check actual period and duty_cycle values, and PWM_DEBUG checks are disabled for disabled states.

Other PWM Work

The TIECAP driver received documentation for hardware disable behavior. The Renesas RZ-MTU3 devicetree bindings were updated to use #pwm-cells = <3>.

As PWM maintainer, Uwe Kleine-König committed contributions from external developers including fixes for ADP5585 register addressing, Samsung Exynos8890 bindings, NXP FSL FTM driver S32G support, and various other driver fixes.

Backlight

Uwe Kleine-König cleaned up the mp3309c backlight driver by initializing properties without memset() and dropping pwm_apply_args().

Summary

Type Count
Authored 80
Signed-off-by 1
Acked-by 7
Reviewed-by 45
Tested-by 10
Suggested-by 3

List of contributions

Hash Subject Role Person
3dcf44ab56e1 spi: tegra114: remove Kconfig dependency on TEGRA20_APB_DMA Author Francesco Lavra
3af0c1fb1cdc iio: imu: st_lsm6dsx: fix array size for st_lsm6dsx_settings fields Author Francesco Lavra
517d066dc080 MAINTAINERS: Add entry for TQ-Systems AM335 device trees Committer Kevin Hilman
74b84d1be022 driver core: fw_devlink: Don’t warn about sync_state() pending reviewed-by Kevin Hilman
1c4b87c921fb clocksource/drivers/arm_global_timer: Add auto-detection for initial prescaler values reviewed-by tested-by Kevin Hilman
bb676996ed58 ARM: OMAP2+: clock: convert from round_rate() to determine_rate() Committer Kevin Hilman
e2c0510935c5 ARM: OMAP1: clock: convert from round_rate() to determine_rate() Committer Kevin Hilman
0b5fe1c4ab3c pmdomain: ti-sci: Set PD on/off state according to the HW state reviewed-by tested-by Kevin Hilman
21e2e1abd432 arm: omap2: use string choices helper Committer Kevin Hilman
d8a97749bab7 clk: ti: fapll: convert from round_rate() to determine_rate() reviewed-by tested-by Kevin Hilman
48f8fb402a4f clk: ti: dra7-atl: convert from round_rate() to determine_rate() reviewed-by tested-by Kevin Hilman
7760b3e17298 clk: ti: divider: convert from round_rate() to determine_rate() reviewed-by tested-by Kevin Hilman
849804453d5a clk: ti: composite: convert from round_rate() to determine_rate() reviewed-by tested-by Kevin Hilman
e465ad7ef57a clk: ti: dpll: convert from round_rate() to determine_rate() reviewed-by tested-by Kevin Hilman
fa55aea3dcdb clk: ti: dpll: change error return from ~0 to -EINVAL reviewed-by tested-by Kevin Hilman
ec70154c8a5f clk: ti: dpll: remove round_rate() in favor of determine_rate() reviewed-by tested-by Kevin Hilman
74139a64e8ce ARM: OMAP2+: pm33xx-core: ix device node reference leaks in amx3_idle_init Committer Kevin Hilman
27322753c8b9 ARM: dts: omap: am335x-cm-t335: Remove unused mcasp num-serializer property Committer Kevin Hilman
5af5b85505bc ARM: dts: ti: omap: omap3-devkit8000-lcd: Fix ti,keep-vref-on property to use correct boolean syntax in DTS Committer Kevin Hilman
9658a92fad18 ARM: dts: ti: omap: am335x-baltos: Fix ti,en-ck32k-xtal property in DTS to use correct boolean syntax Committer Kevin Hilman
9df7366a2919 ARM: dts: omap: Minor whitespace cleanup Committer Kevin Hilman
7d7df1bc644a ARM: dts: omap: dm816x: Split ‘reg’ per entry Committer Kevin Hilman
46179394d4e4 ARM: dts: omap: dm814x: Split ‘reg’ per entry Committer Kevin Hilman
045e81d8d7e6 ARM: OMAP2+: use IS_ERR_OR_NULL() helper Committer Kevin Hilman
ca8be8fc2c30 ARM: dts: am33xx-l4: fix UART compatible Committer Kevin Hilman
8a6506e1ba0d ARM: AM33xx: Implement TI advisory 1.0.36 (EMU0/EMU1 pins state on reset) Committer Kevin Hilman
7c3e113ef09d ARM: dts: ti: omap4: Use generic “ethernet” as node name Committer Kevin Hilman
f84fd5bec502 pwm: adp5585: Correct mismatched pwm chip info Committer Uwe Kleine-König
e2cc390a6629 iio: adc: ad7124: fix temperature channel reviewed-by Uwe Kleine-König
8f2689f194b8 pwm: cros-ec: Avoid -Wflex-array-member-not-at-end warnings Committer Uwe Kleine-König
ebd524a3ac3a dt-bindings: pwm: samsung: add exynos8890 compatible Committer Uwe Kleine-König
d322a0e01d9e dt-bindings: pwm: apple,s5l-fpwm: Add t6020-fpwm compatible Committer Uwe Kleine-König
efedb508591e dt-bindings: pwm: nxp,lpc1850-sct-pwm: Minor whitespace cleanup in example Committer Uwe Kleine-König
ce1116446098 pwm: pca9586: Convert to waveform API Author Uwe Kleine-König
42f18ae36f3f pwm: pca9685: Drop GPIO support Author Uwe Kleine-König
3d4c42172380 pwm: pca9685: Make use of register caching in regmap Author Uwe Kleine-König
de5855613263 pwm: pca9685: Use bulk write to atomicially update registers Author Uwe Kleine-König
ca478d8a4b6d pwm: pca9685: Don’t disable hardware in .free() Author Uwe Kleine-König
d8af3812b1e8 pwm: Add the S32G support in the Freescale FTM driver Committer Uwe Kleine-König
3513752cfe6f dt-bindings: pwm: fsl,vf610-ftm-pwm: Add compatible for s32g2 and s32g3 Committer Uwe Kleine-König
ed5902a24648 pwm: mediatek: Lock and cache clock rate Author Uwe Kleine-König
849b064c1697 pwm: mediatek: Fix various issues in the .apply() callback Author Uwe Kleine-König
edd6a37e06f3 pwm: mediatek: Implement .get_state() callback Author Uwe Kleine-König
a911f15745fd pwm: mediatek: Initialize clks when the hardware is enabled at probe time Author Uwe Kleine-König
f43e1280731c pwm: mediatek: Rework parameters for clk helper function Author Uwe Kleine-König
88863c9d81bb pwm: mediatek: Introduce and use a few more register defines Author Uwe Kleine-König
c95ab56a7ad6 pwm: mediatek: Simplify representation of channel offsets Author Uwe Kleine-König
a2f77ae4778d pwm: tiecap: Document behaviour of hardware disable Author Uwe Kleine-König
e7c9b66b1069 pwm: Provide a gpio device for waveform drivers Author Uwe Kleine-König
b871d093f1ca pwm: Check actual period and duty_cycle for ignored polarity test Author Uwe Kleine-König
5364e70b013c pwm: Disable PWM_DEBUG check for disabled states Author Uwe Kleine-König
09cbe5468124 dt-bindings: timer: renesas,rz-mtu3: Use #pwm-cells = <3> Author Uwe Kleine-König
00f83f0e07e4 pwm: tiehrpwm: Fix corner case in clock divisor calculation Author Uwe Kleine-König
bc7ce5bfc504 pwm: tiehrpwm: Fix various off-by-one errors in duty-cycle calculation Author Uwe Kleine-König
878dbfc12cc5 pwm: tiehrpwm: Make code comment in .free() more useful Author Uwe Kleine-König
21a5e91fda50 pwm: tiehrpwm: Don’t drop runtime PM reference in .free() Author Uwe Kleine-König
afe872274edc pwm: Fix incorrect variable used in error message Committer Uwe Kleine-König
3a4b9d027e40 pwm: berlin: Fix wrong register in suspend/resume Committer Uwe Kleine-König
75604e9a5b60 pwm: loongson: Fix LOONGSON_PWM_FREQ_DEFAULT Committer Uwe Kleine-König
fe85a39d8402 backlight: mp3309c: Initialize backlight properties without memset Author Uwe Kleine-König
2720c87b7621 backlight: mp3309c: Drop pwm_apply_args() Author Uwe Kleine-König
e2cc390a6629 iio: adc: ad7124: fix temperature channel Author David Lechner
bd886cdcbf9e iio: adc: ad7280a: fix ad7280_store_balance_timer() Author David Lechner
3db847df994d iio: buffer-dmaengine: enable .get_dma_dev() reviewed-by David Lechner
f9c198c3ccaf iio: buffer-dma: support getting the DMA channel reviewed-by David Lechner
a514bb109ead iio: buffer: support getting dma channel from the buffer reviewed-by David Lechner
632757312d7e iio: adc: ad7380: fix SPI offload trigger rate Author David Lechner
9b45744bf09f iio: adc: rtq6056: Correct the sign bit index reviewed-by David Lechner
ffc74ad53913 iio: adc: ad4030: Fix _scale value for common-mode channels reviewed-by David Lechner
671b9b6d7f4f iio: pressure: bmp280: Use gpiod_set_value_cansleep() reviewed-by David Lechner
6233067494ae iio: pressure: bmp280: Remove noisy dev_info() reviewed-by David Lechner
bf99115eb2b8 iio: ABI: add filter types for ad7173 Author David Lechner
ff06b39be1a1 iio: adc: ad7173: support changing filter type Author David Lechner
27901cbc5bbc iio: adc: ad7173: rename odr field Author David Lechner
63cc48ea772e iio: adc: ad7173: rename ad7173_chan_spec_ext_info Author David Lechner
29cc0ac502a4 iio: ABI: document “sinc4+rej60” filter_type Author David Lechner
f1496949c75d iio: adc: ad7124: add filter support Author David Lechner
b2dbba2b9388 iio: adc: ad7124: support fractional sampling_frequency Author David Lechner
d904b8e6d4ef iio: adc: ad7124: use guard(mutex) to simplify return paths Author David Lechner
1b4956cac19b iio: adc: ad7124: use read_avail() for scale_available Author David Lechner
faf7f9e72a57 iio: adc: ad7124: use clamp() Author David Lechner
08a9e5f8bb1e iio: adc: ad7124: fix sample rate for multi-channel use Author David Lechner
f15bc37d8c33 iio: add IIO_ALTCURRENT channel type reviewed-by David Lechner
30db1b21fa37 spi: axi-spi-engine: use adi_axi_pcore_ver_gteq() Author David Lechner
67a529b7d3c5 include: adi-axi-common: add version check function Author David Lechner
661facba437e iio: imu: inv_icm42600: use guard() to release mutexes reviewed-by David Lechner
9fd569aa3d70 iio: imu: inv_icm42600: Use devm_regulator_get_enable() for vdd regulator reviewed-by David Lechner
dfbbee0907fb iio: adc: ad7124: add clock output support Author David Lechner
ed231e253ff2 iio: adc: ad7124: add external clock support Author David Lechner
aead8e4cc046 iio: adc: ad7124: do not require mclk Author David Lechner
a52bdee13ed7 dt-bindings: iio: adc: adi,ad7124: fix clocks properties Author David Lechner
c0d3f6969bb4 media: pci: mg4b: fix uninitialized iio scan data Author David Lechner
46809b9f43b4 iio: mcp9600: Add support for thermocouple-type reviewed-by David Lechner
5efd60c974a2 iio: mcp9600: Recognize chip id for mcp9601 reviewed-by David Lechner
74cae3eb72a0 iio: mcp9600: White space and fixed width cleanup reviewed-by David Lechner
f6a52403fd2c dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints reviewed-by David Lechner
d6d389646a35 dt-bindings: iio: mcp9600: Set default 3 for thermocouple-type reviewed-by David Lechner
086e410063be staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call reviewed-by David Lechner
788c57f4766b docs: iio: ad3552r: Fix malformed code-block directive reviewed-by David Lechner
4340feb4972e iio: adc: adc128s052: Support ROHM BD7910[0,1,2,3] reviewed-by David Lechner
9e9b0b97b0c7 iio: adc: adc128s052: Rename channel structs reviewed-by David Lechner
7fe5b83fbcef iio: adc: adc128s052: Simplify matching chip_data reviewed-by David Lechner
f1bbfc405e3d dt-bindings: iio: adc: Add BD7910[0,1,2,3] reviewed-by David Lechner
0056b4103557 spi: offload trigger: adi-util-sigma-delta: clean up imports Author David Lechner
07826c02eda9 MAINTAINERS: merge TRIGGER SOURCE sections Author David Lechner
35e3d0cd8e89 iio: imu: inv_icm42600: use min() to improve code reviewed-by David Lechner
8ffc13805971 iio: dac: ad5791: drop unused member of struct ad5791_state reviewed-by David Lechner
e819000c692a iio: iio_format_list() should set stride=1 for IIO_VAL_CHAR reviewed-by David Lechner
b515c701bbdf iio: adc: ad799x: add reference voltage to ad7994 reviewed-by David Lechner
ed187a201be1 iio: adc: ad799x: add reference voltage capability to chip_info reviewed-by David Lechner
33c52b2d85b7 iio: ABI: alphabetize filter types Author David Lechner
329cb8be1519 iio: adc: ad7173: add SPI offload support Author David Lechner
972b1d5dee9e iio: adc: ti-adc081c: use individual model structures instead of array Author David Lechner
97b262d24ae2 iio: accel: bma180: use stack allocated buffer for scan Author David Lechner
c9100ef6db6e iio: proximity: srf08: use stack allocated scan buffer Author David Lechner
5335f93d2814 iio: proximity: sx9500: use stack allocated struct for scan data Author David Lechner
b76c739c3d11 iio: fix iio_push_to_buffers_with_ts() typo Author David Lechner
ff2501ff5c32 iio: proximity: vl53l0x-i2c: use stack allocated scan struct Author David Lechner
8e7a21e103d7 iio: proximity: pulsedlight-lidar-lite-v2: use stack allocated scan struct Author David Lechner
f235ec59343b iio: proximity: mb1232: use stack allocated scan struct Author David Lechner
d75c7021c08e iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register reviewed-by David Lechner
6793ca9a43c8 dt-bindings: clock: adi,axi-clkgen: add clock-output-names property Author David Lechner
a9e30a22d6f2 can: m_can: fix CAN state in system PM reviewed-by Markus Schneider-Pargmann
4942c42fe184 can: m_can: m_can_chip_config(): bring up interface in correct state reviewed-by Markus Schneider-Pargmann
3d9db29b45f9 can: m_can: m_can_handle_state_errors(): fix CAN state transition to Error Active reviewed-by Markus Schneider-Pargmann
ba569fb07a7e can: m_can: m_can_plat_remove(): add missing pm_runtime_disable() reviewed-by Markus Schneider-Pargmann
1c4b87c921fb clocksource/drivers/arm_global_timer: Add auto-detection for initial prescaler values Author Markus Schneider-Pargmann
ed68411e879e serial: 8250: omap: Support wakeup pinctrl state on suspend Author Markus Schneider-Pargmann
49fce0730fd3 dt-bindings: serial: 8250_omap: Add wakeup pinctrl state Author Markus Schneider-Pargmann
4c4ed5e073a9 ASoC: meson: aiu-encoder-i2s: fix bit clock polarity Author Valerio Setti
663bfe77b6f7 arm64: dts: amlogic: gxbb-odroidc2: remove UHS capability for SD card Author Valerio Setti
4c4ed5e073a9 ASoC: meson: aiu-encoder-i2s: fix bit clock polarity reviewed-by tested-by Jerome Brunet
006824a1cb3b NTB: epf: Add Renesas rcar support Author Jerome Brunet
5ad865862a0f NTB: epf: Allow arbitrary BAR mapping Author Jerome Brunet
7e2e4e32cd47 clk: amlogic: fix recent code refactoring reviewed-by Jerome Brunet
663bfe77b6f7 arm64: dts: amlogic: gxbb-odroidc2: remove UHS capability for SD card reviewed-by Jerome Brunet
01f3a6d1d59b clk: amlogic: c3-peripherals: use helper for basic composite clocks Author Jerome Brunet
9bada5ff4bf7 clk: amlogic: align s4 and c3 pwm clock descriptions Author Jerome Brunet
955e18baeb93 clk: amlogic: add composite clock helpers Author Jerome Brunet
b7358d14f176 clk: amlogic: use the common pclk definition Author Jerome Brunet
aaee6f3bce3f clk: amlogic: introduce a common pclk definition Author Jerome Brunet
c3f369363a13 clk: amlogic: pclk explicitly use CLK_IGNORE_UNUSED Author Jerome Brunet
cf03071b7c3f clk: amlogic: drop CLK_SET_RATE_PARENT from peripheral clocks Author Jerome Brunet
32ee5475f7e3 clk: amlogic: move PCLK definition to clkc-utils Author Jerome Brunet
2aeeb649ead2 clk: amlogic: aoclk: use clkc-utils syscon probe Author Jerome Brunet
d7c001bd76b7 clk: amlogic: use probe helper in mmio based controllers Author Jerome Brunet
480197ceece7 clk: amlogic: add probe helper for mmio based controllers Author Jerome Brunet
e256a6602aa0 clk: amlogic: drop meson-clkcee Author Jerome Brunet
4c4e17f27013 clk: amlogic: naming consistency alignment Author Jerome Brunet
152a09361bb2 Documentation: PCI: endpoint: Document BAR assignment Author Jerome Brunet

Categories
Community Open-source Zephyr

BayLibre contributions to Zephyr v4.3.0

Drivers: TI CC23x0

Stoyan Bogdanov and Julien Panis worked on CC23x0 SoC support.

Stoyan added I2C controller mode support, PWM support for LGPT0-3, RTC timer driver and configuration to select between RTC and SYSTIM. He implemented SoC-level power management with runtime-idle, standby, and soft-off states. He added power management to GPIO, I2C, PWM, LGPT counter and RTC counter drivers. He also added I2C and PWM support to the lp_em_cc2340r5 board along with a board overlay in BME280 sample. He become collaborator for TI SimpleLink Platforms.

Julien Panis added power management support to ADC, crypto, DMA, serial, and SPI drivers. He also added Devicetree bindings and board support for the external 32.768 kHz crystal oscillator (LFXT) connected across X32P and X32N pins on the lp_em_cc2340r5 board.

Kernel

ARM64

Nicolas Pitre fixed SMP TLB invalidation on ARM64 by using Inner Shareable (IS) instructions TLBI VMALLE1IS and TLBI VAE1IS to broadcast invalidations to all CPUs. He also fixed GICv2 on SMP systems by masking the source processor bits (12-10) from GICC_IAR for SGIs, preventing IPIs from non-CPU0 cores from being rejected. He reverted useless cache handling in the MMU code and added FPU debug traces with PC addresses.

Scheduler

Nicolas fixed an assertion race in z_get_next_switch_handle() where the shared dummy thread structure could be clobbered by concurrent CPUs during thread halting. The fix ignores validity tests when the dummy thread is involved. He also set switch_handle to a clearly invalid value for halting threads and fixed CPU stats retrieval in z_sched_cpu_usage().

Memory Management

Nicolas fixed a locking typo in k_mem_page_frame_evict() when CONFIG_DEMAND_PAGING_ALLOW_IRQ is set. He also added validation of alignment arguments in k_heap_aligned_alloc() to enforce proper power-of-two values now that the internal dependency with z_alloc_helper() no longer exists.

RISC-V

Nicolas moved the null pointer trap first in the PMP configuration to improve PMP slot optimization.

Cryptography

Mbed TLS

Valerio Setti upgraded Mbed TLS from 3.6.4 to 3.6.5 and added CONFIG_PSA_CRYPTO to automatically select a PSA Crypto API provider (TF-M or Mbed TLS) without manual configuration. He renamed several Kconfig symbols to align with Mbed TLS build symbols. He also improved the mechanism for enabling CSPRNG (Cryptographically-Secure Pseudo Random Number Generator) based on devicetree configuration and platform driver support.

PSA Crypto API Migration

Valerio migrated several subsystems from legacy Mbed TLS crypto to PSA Crypto API (IPv6, McuMGR, UpdateHub, UUID generation and JWT) and he deprecated legacy Mbed TLS crypto in flash_map.

Storage

ZMS

Riadh Ghaddab fixed ZMS initialization for devices requiring erase before write. ZMS now verifies that the next available location in the open sector is filled with erase_value by adding a check at init.

Drivers

MFD

Valerio Setti split the AXP192 and AXP2101 MFD drivers into separate implementations. He added IRQ and power button support to the AXP2101 driver and enabled it on the LilyGO T-Watch S3 board.

Networking

PTP

Adam Wojasinski fixed a compilation error in the PTP library when PTP_UDP_IPv6_PROTOCOL is enabled. The issue was that mcast_addr was defined as an IPv6 structure without an s_addr member. He added a union to represent both IPv4 and IPv6 configurations without introducing preprocessor-guarded code blocks.

Testing and Samples

Nicolas Pitre fixed format specifiers for size_t in LWM2M LOG_DBG calls and for uint16_t in MQTT-SN tests. He added delays in the SMP abort test and POSIX environment sample to ensure proper circular dependencies and timing. He filtered SMP from zbus benchmark and message subscriber pool exhaustion tests. He fixed the nested IRQ test for ARM’s GIC in non-secure state and corrected the MPSC test consumer node return logic in lockfree tests.

Task Watchdog

Adrien Ricciardi added a dummy Task Watchdog implementation via CONFIG_TASK_WDT_DUMMY. This allows disabling the Task Watchdog during debugging sessions when breakpoints would otherwise trigger watchdog timeouts.

Summary

Type Count
Authored 92
Signed-off-by 1

List of contributions

Hash Subject Role Person
f60f04d7dc53 doc: release-notes: notify about Mbed TLS version upgrade Author Valerio Setti
f6d24f7aa41a manifest: mbedtls: bump to 3.6.5 Author Valerio Setti
26ca2cfd6c13 drivers: entropy: nrf5: add dependency on MULTITHREADING Author Valerio Setti
25a71f39727c modules: mbedtls: let CSPRNG_AVAILABLE select ENTROPY_GENERATOR Author Valerio Setti
1962ab564a3d modules: mbedtls: fix prompts and help messages for Kconfigs Author Valerio Setti
fd932e15c9a2 doc: migration-guide: add note for Mbed TLS’ Kconfigs renaming Author Valerio Setti
a60803bebe30 modules: mbedtls: add a specific file for deprecated Kconfigs Author Valerio Setti
315fbc593249 modules: mbedtls: rename MBEDTLS_HMAC_DRBG_ENABLED Author Valerio Setti
f8c94f2f4435 modules: mbedtls: rename MBEDTLS_CTR_DRBG_ENABLED Author Valerio Setti
69e27673fabd modules: mbedtls: rename MBEDTLS_TLS_SESSION_TICKETS Author Valerio Setti
62f0b2c5c81c modules: mbedtls: rename MBEDTLS_TLS_VERSION_1_3 Author Valerio Setti
fa911df90c07 modules: mbedtls: rename MBEDTLS_DTLS Author Valerio Setti
f960db846c9f modules: mbedtls: rename MBEDTLS_TLS_VERSION_1_2 Author Valerio Setti
851a20481b46 modules: mbedtls: rename MBEDTLS_LMS Author Valerio Setti
e1117f18fc49 modules: mbedtls: rename MBEDTLS_MD Author Valerio Setti
b43dbf149a96 doc: release-notes: fix typo in JWT note Author Valerio Setti
9c13bfd5d7f9 net: ip: ipv6: replace legacy crypto with PSA API Author Valerio Setti
d33c4ef96f5f tests: net: iface: increase main stack size in net.iface.iid.stable Author Valerio Setti
6115d590ca7a west: mbedtls: include a fix for static key slot key material buffer size Author Valerio Setti
00eee1ad78e9 jwt: deprecate CONFIG_JWT_SIGN_RSA_LEGACY Author Valerio Setti
fc422beb68da lib: uuid: replace legacy crypto support with PSA API Author Valerio Setti
e2c054be2cbe doc: migration-guide: add note for crypto updates in McuMGR Author Valerio Setti
bed1cd1ea9a1 tests: subsys: mgmt: mcumgr: remove selection of Mbed TLS in tests Author Valerio Setti
f779adf8e072 mgmt: mcumgr: remove usage of legacy Mbed TLS crypto for hash Author Valerio Setti
fe1ff7f973ff doc: migration-guide: add note for changes in UpdateHub Author Valerio Setti
0854d239bf0c samples: subsys: updatehub: remove PSA overlay and test case Author Valerio Setti
db7bafbcdbbf mgmt: updatehub: simplify code Author Valerio Setti
b2dd3b4ba96d mgmt: updatehub: remove legacy Mbed TLS crypto support Author Valerio Setti
4ecb6d3cf7de storage: flash_map: deprecate legacy Mbed TLS crypto Author Valerio Setti
34259fa2c3a5 doc: releases: add note about CONFIG_PSA_CRYPTO addition in Mbed TLS Author Valerio Setti
019e26aecfc6 bluetooth: mesh: use new Kconfig CONFIG_PSA_CRYPTO Author Valerio Setti
1bc2db575f7e modules: mbedtls: add new helper Kconfig symbol PSA_CRYPTO Author Valerio Setti
7b7b4fcde20c drivers: bluetooth: hci: do not select MBEDTLS_ENTROPY_C in BT_SILABS_EFR32 Author Valerio Setti
76037cec3655 drivers: bluetooth: esp32: remove selection of MBEDTLS_PSA_CRYPTO_C Author Valerio Setti
46614ded36f0 modules: openthread: fix dependency for OPENTHREAD_CRYPTO_PSA Author Valerio Setti
6f301ca94a04 doc: update documentation for AXP192/2101 changes Author Valerio Setti
102d17b49bd8 boards: lilygo: twatch_s3: add support for axp2101 power button Author Valerio Setti
97478d5fcef8 drivers: mfd: axp2101: add irq and power button support Author Valerio Setti
71e28e267afc drivers: mfd: split axp192 and axp2101 drivers Author Valerio Setti
f5f258f0cc85 tests: kernel: smp_abort: add delay to ensure circular dependency Author Nicolas Pitre
408da59cc418 net: lwm2m: fix format specifiers for size_t in LOG_DBG Author Nicolas Pitre
bd5806d82809 samples: zbus: benchmark: also filter SMP from MSG_SUBSCRIBERS test Author Nicolas Pitre
af7ae5d61fb6 kernel: sched: plug assertion race in z_get_next_switch_handle() Author Nicolas Pitre
1c8f1c86470c kernel: sched: use clearly invalid value for halting thread switch_handle Author Nicolas Pitre
6c6f1a5e9987 arch: arm64: mmu: revert useless cache handling Author Nicolas Pitre
5b43674098bb arch: arm64: Fix SMP TLB invalidation on SMP systems Author Nicolas Pitre
b0d4580422e2 tests: lib: lockfree: Fix MPSC test consumer node return logic Author Nicolas Pitre
c03653eab9c4 samples: posix: env: Add delay before printing environment variables Author Nicolas Pitre
16905f547517 riscv: pmp: move the null pointer trap first Author Nicolas Pitre
b5363d5ffffc kernel: usage: Fix CPU stats retrieval in z_sched_cpu_usage() Author Nicolas Pitre
8d1da57d57e6 kernel: mmu: k_mem_page_frame_evict() fix locking typo Author Nicolas Pitre
d93561da682e samples: zbus: benchmark: Filter SMP from benchmark_sync test Author Nicolas Pitre
43371bc7ee01 samples: zbus: msg_subscriber: Filter SMP from pool exhaustion tests Author Nicolas Pitre
4c30a9b40529 tests: interrupt: Fix nested_irq test for Arm’s GIC in Non-Secure state Author Nicolas Pitre
d9141b2b9be2 tests: net: mqtt_sn: Fix format specifier for uint16_t Author Nicolas Pitre
6780dddbcad4 arch: arm64: Enhance FPU debug traces with PC addresses Author Nicolas Pitre
e6ff6b0843cc arm64: isr_wrapper.S: make GICv2 usable on SMP systems Author Nicolas Pitre
8140680e6b27 k_heap_aligned_alloc: validate the alignment argument Author Nicolas Pitre
eadd4d57b700 drivers: counter: cc23x0: Add power management to LGPT Author Stoyan Bogdanov
2b646bf702ae drivers: counter: cc23x0: Add power management to RTC Author Stoyan Bogdanov
d7bf8c0644b6 drivers: i2c: cc23x0: Add power management Author Stoyan Bogdanov
afd2962dfc2e drivers: pwm: cc23x0: Add power management Author Stoyan Bogdanov
f3f332c40ede MAINTAINERS: Add cc23xx and collaborator for TI SimpleLink Platforms Author Stoyan Bogdanov
31abf236b467 drivers: gpio: cc23x0: Add power management to GPIO Author Stoyan Bogdanov
bc9fce18f273 drivers: serial: cc23x0: Replace incorrect macros Author Stoyan Bogdanov
ad77e1036205 dts: arm: ti: cc23x0: Add power management support Author Stoyan Bogdanov
f393ae607f17 soc: ti: cc23x0: Add support for RTC alarms in power.c Author Stoyan Bogdanov
a286540dbcdc soc: ti: cc23x0: Add conditions for RTC as timer in power.c Author Stoyan Bogdanov
f5bcee5d8d85 soc: ti: cc23x0: Add power management Author Stoyan Bogdanov
9ec8ad9b478a soc: ti: cc23x0: Add clock definition for RTC Author Stoyan Bogdanov
b82e7418c57c drivers: counter: cc23x0: Add dependency for RTC Author Stoyan Bogdanov
6bb5378fbe3b drivers: timer: cc23x0: Add option to select between RTC and SYSTIM Author Stoyan Bogdanov
ca6b18d808bd drivers: timer: Add RTC timer driver for cc23x0 Author Stoyan Bogdanov
84de5b841713 samples: sensors: bme280: Add lp_em_cc2340r5 overlay Author Stoyan Bogdanov
4fbf028ff57e boards: ti: lp_em_cc2340r5: Add I2C support Author Stoyan Bogdanov
82e1baae6357 dts: arm: ti: cc23x0: Add I2C support Author Stoyan Bogdanov
49ef7d460c30 drivers: i2c: Add support for cc23x0 I2C Author Stoyan Bogdanov
6559af8ef421 boards: ti: lp_em_2340r5: Add PWM led support Author Stoyan Bogdanov
285453a77f04 boards: ti: lp_em_cc2340r5: Add pinctrl support for PWM Author Stoyan Bogdanov
9dad848fe05e dts: arm: ti: cc23x0: Add LGPT PWM support Author Stoyan Bogdanov
ff2328522a2a drivers: pwm: Add support for cc23x0 LGPT PWM Author Stoyan Bogdanov
a5f0c965c5ef zms: fix init if a faulty bit is detected in the next free location Author Riadh Ghaddab
052ded1682a9 drivers: spi: cc23x0: Add power management Author Julien Panis
a473d268c3ac boards: ti: lp_em_cc2340r5: Add external low-frequency oscillator Author Julien Panis
13c0a98acc82 dts: bindings: clock: Add TI cc23x0 external low-frequency oscillator Author Julien Panis
c625853b19f7 drivers: serial: cc23x0: Add power management Author Julien Panis
051539e867c9 drivers: dma: cc23x0: Add power management Author Julien Panis
22d04f7f9336 drivers: crypto: cc23x0: Add power management Author Julien Panis
afc5b6cb0d1b drivers: adc: cc23x0: Add power management Author Julien Panis
d494f86ea40e doc: releases: Add Dummy Task Watchdog Kconfig Author Adrien Ricciardi
8fd797e95a43 task_wdt: Add dummy implementation Author Adrien Ricciardi
8fb7f8a19d76 net: lib: ptp: Fix PTP_UDP_IPv6_PROTOCOL compilation error Author Adam Wojasinski

Categories
binutils Community Compiler Conferences GCC GDB GLIBC Open-source Toolchain

BayLibre at the GNU Tools Cauldron 2025 in Porto

BayLibre at the GNU Tools Cauldron 2025

Over 140 attendees interested in the GNU Compiler Collection (GCC), GLIBC, Binutils, GNU Debugger (GDB), and related GNU Toolchain packages gathered for three days in Porto at the end of September 2025, including five toolchain developers from BayLibre. With sixty talks and BoFs in up to four parallel sessions, it was the most packed GNU Tools Cauldron so far!

The attending BayLibrers enjoyed the conference a lot, and would like to thank the Department of Informatics Engineering (DEI) of the Faculty of Engineering (FEUP) of the University of Porto for hosting the conference, the conference organizers, all the sponsors — including BayLibre as one of the GNU Tools Cauldron sponsors.


Comparative Analysis of GCC Codegen for AArch64 and RISC-V

In the talk, Paul-Antoine Arras of BayLibre showed the results of exploring possible improvements in GCC code generation for RISC-V. This was done by collecting dynamic instruction counts from selected SPEC CPU 2017 benchmarks and comparing the results with AArch64.

Findings revealed that prominent compiler weaknesses include:

  • missing instruction patterns
  • extra move instructions
  • unused load offsets
  • functionally dead code

Additionally, vectorising library functions, like memset and mathematical operations, are crucial for maximising RISC-V efficiency.


Parallel Computing, Offloading, OpenMP and OpenACC

In the talk, Thomas Schwinge and Tobias Burnus of BayLibre presented the progress, current status, future work, and ideas for features important for (not only) scientific computation.

Highlights and Status Updates:

  • AMD GPUs: One of the highlights in GCC 15 is generic architecture support (finally added by AMD to their runtime in April 2025, and already supported in GCC 15). For GCC 16, to be released in spring 2026, support of AMD’s MI300 accelerators is planned, in addition to the usual bug fixes, and performance improvements.
  • Nvidia GPUs: The global constructor support added in GCC 15 means not only better support for C++, but also enables device-side Fortran screen output.
  • OpenACC support keeps getting extended.
  • OpenMP 5.x and 6.0: Several features have already been released as part of GCC 15, such as interop, permitting interoperability with NVIDIA CUDA and AMD HIP libraries (for example, for fast Fourier transform (FFT) or linear algebra routines), loop transformations, dynamic context selectors. Development of additional features is ongoing for GCC 16.
  • For OpenMP, full coverage of 5.2 is in sight, several omissions are expected to land soon. Other features are still in early stages of development, such as OMPT (tools) support and, in particular, OMPD (debugging) support.
  • Thomas did a live demo of Arijit Kumar Das’ Google Summer of Code (GSoC) project: “Implementation of a simple in-memory file system for running offloading tests on NVIDIA GPUs”, which Thomas had been the mentor for, with help by Tobias.
  • Future Ideas (BoF discussion): Amongst other miscellaneous topics, the BoF discussion included a proposal for adding to GCC a low-overhead GPU kernel language, to enable programming at an abstraction level similar to NVIDIA CUDA or AMD HIP language extensions. This also serves as foundational work for support of related new functionality that’s currently in process of standardization in the upcoming OpenMP 6.x and 7.0 specifications.

Toolchain and Linux kernel

As part of this BoF, Thomas Schwinge of BayLibre gave a short report of his Kernel Recipes 2025 conference participation the week before. In his KR2025 presentation (“Recipe for baking a GCC: Ingredients and community of the GNU Compiler Collection, 2025”), he had primarily covered history and structure of the GNU Compiler Collection (GCC) project and community, but after that one, a number of related technical discussions also took place, including on Rust programming language support in GCC, and GCC’s support for BPF (eBPF) code generation. In the Cauldron BoF, some of these topics then got discussed in further detail.

For the Cauldron BoF audience, he also repeated the live demo of Piyush Raj’s Google Summer of Code (GSoC) project to develop “tooling for running BPF GCC tests on a live kernel”,which he had helped co-mentor, in collaboration with José E. Marchesi and David Faust of Oracle’s Toolchain/Compilers team.


Quantifying Abstraction Costs in GCC
GCC BOF: Reviewing refactoring goals and acceptable abstractions

Software benefits from occasional cleanup and refactoring. Not only should the generated code be fast, but building the compiler and compiling user programs should also be fast and avoid excessive memory usage.

Therefore, Waffl3x of BayLibre explored the topic of measuring the GCC performance. This measurement is crucial for detecting regressions and for checking that refactoring work has no unintended effects on compilation speed or memory consumption.

In the BoF part, ways to improve the internal representation in GCC were discussed.


More about the GNU Tools Cauldron

The slides and recordings are available at:

The Cauldron was also covered by LWN:

Categories
Community Linux Kernel Open-source

BayLibre contributions to Linux v6.17

Linus released Linux 6.17 on September 28, 2025. BayLibre contributed to this release across multiple subsystems, focusing on IIO drivers, PWM infrastructure, SPI offload support, and platform improvements. BayLibre was once again among the top 20 contributing companies by number of changesets, while David Lechner ranked in the top 10 individual contributors by number of changesets.

IIO (Industrial I/O)

AD7606 Calibration and Power Management

Angelo Dureghello implemented comprehensive calibration support for the AD7606 family of ADCs. He added gain calibration using resistor values configured in Devicetree, specifically for external RFilter calibration as documented in the ad7606c-16 datasheet. The implementation supports offset and phase calibration for devices with software mode capability: ad7606b, ad7606c-16, and ad7606c-18.

Angelo added a new channel extension IIO_CHAN_INFO_CONVERSIONDELAY and the corresponding conversiondelay sysfs attriubte suffix. For the AD7606, this is used to calibrate the phase delay of the ADC. This attribute is more general to allow for other channel delay use cases in other chips as well. He also implemented power supply support by enabling the VDRIVE power supply and adding optional VREFIN reference voltage support for proper ADC operation.

The ad7606 driver received validation improvements to exit cleanly when invalid Devicetree schema properties are detected, and the channel scaling structure was renamed from chan_scale to the more generic chan_info to better reflect its broader usage.

DAC Infrastructure

Angelo optimized the adi-axi-dac driver by implementing a unified bus free check function, reducing code duplication and ensuring consistent error handling with timeout detection.

Sigma-Delta ADC Infrastructure and SPI Offload

David Lechner implemented SPI offload support for the ad_sigma_delta module, enabling high-performance buffered reads using SPI controller offload capabilities instead of RDY interrupt triggers. Drivers using this module can opt into SPI offload support through the supports_spi_offload flag, allowing gradual enablement for a number of ADCs that use this shared module.

He added the ADI Util Sigma-Delta SPI FPGA IP driver and corresponding Devicetree bindings. This IP bloc separates the data ready signal from SPI data on a shared pin, allowing it to trigger the SPI offload at the appropriate time.

David fixed buffer management issues in ad_sigma_delta by changing from postdisable to predisable callbacks, ensuring proper state handling when update_scan_mode operations fail.

ADC Driver Fixes and Improvements

David implemented fixes across multiple ADC drivers. In the AD7173 family, he corrected output data rate register initialization for the AD7177 chip, which has different reset values than other variants, and fixed channel lookup in system calibration functions. The AD7380 driver received a fix for missing max_conversion_rate_hz on the adaq4381-4 variant.

For the AD4000 family, David removed unnecessary usage of shift_right() functionality. He also fixed several endianness and buffer safety issues: corrected buffered reads on big-endian systems in the isl29501 proximity sensor, fixed uninitialized scan data in the sca3300 accelerometer, and addressed DMA-safe memory usage in temperature sensors.

IIO Framework and ABI Improvements

David corrected the IIO ABI documentation for I and Q channel modifiers, updating it to reflect actual usage patterns in drivers like admv1013, admv1014, and adrf6780. He removed unused attributes and fixed differential channel naming for RF/microwave applications.

Code Quality and Modernization

David conducted extensive code modernization across the IIO subsystem, replacing memset() calls with designated initializers (= { }) in over 20 drivers for cleaner, more readable code. He also made numerous data structures const where appropriate, improving memory safety and compiler optimization.

The ADA4250 amplifier driver received improvements including the use of devm_regulator_get_enable_read_voltage() for simplified power management, better error handling with dev_err_probe(), and fixes to chip ID validation logic.

SPI, GPIO, and Infrastructure Improvements

David enhanced GPIO handling by updating drivers to use gpiod_multi_set_value_cansleep() in the virtuser and mdio-mux-gpio drivers, reducing code verbosity.

David converted the Sitronix ST7586 display controller binding from text to YAML format and added datasheet links for improved documentation.

ARM64 Platform and Power Management

Guillaume La Roque cleaned up ARM64 Kconfig dependencies for TI K3 platforms by removing unnecessary selects from ARCH_K3 after improvements to the TI_MESSAGE_MANAGER and TI_SCI_PROTOCOL drivers. This allows these drivers to be built as modules and simplifies the dependency chain.

He also fixed power domain configuration by changing TI_SCI_PM_DOMAINS to select PM_GENERIC_DOMAINS instead of depending on it, ensuring proper power management functionality and preventing build issues since PM_GENERIC_DOMAINS is an implicit symbol that can only be enabled via select.

Clock Infrastructure

Jerome Brunet added new clk_hw helper functions clk_hw_get_dev() and clk_hw_get_of_node() to allow clock drivers to access device-related functionality such as devres and dev_ prints. He also added corresponding test coverage for these new helpers.

Jerome authored and committed modernization improvements to the Amlogic clock driver architecture. He removed clk_regmap tracking tables and moved initialization to the .init() operation of clk_regmap, reducing memory usage and simplifying maintenance. He cleaned up unused data in the S4 clock driver and removed unnecessary headers across Amlogic clock drivers.

Jerome authored the migration of the AXG-audio clock driver to use the auxiliary reset driver infrastructure, removing the local reset implementation and using the reset framework on the auxiliary bus.

PCI Endpoint Infrastructure

Jerome enhanced the PCI Virtual Non-Transparent Bridge (vNTB) endpoint function by adding configurable BAR assignment via configfs. This addresses platform-specific limitations on Renesas hardware where BAR_4 is a fixed 256B region better suited for doorbells than memory windows.

Driver Infrastructure and Auxiliary Bus

Jerome contributed to auxiliary bus infrastructure improvements, migrating the ti-sn65dsi86 bridge driver to use auxiliary devices and adding auxiliary device creation helpers for the Lenovo Yoga C630 platform. He also updated the Microchip PolarFire reset driver to use auxiliary device creation helpers, reducing boilerplate code.

ARM/OMAP Platform Support

As ARM/OMAP subsystem maintainer, Kevin Hilman committed platform improvements including BeagleBone Green Eco board support, AM335x RS-485 transceiver fixes, and various Devicetree cleanups.

Core Math Functions

Nicolas Pitre fixed division-by-zero behavior in mul_u64_u64_div_u64() by changing from compile-time undefined instruction generation to proper runtime division-by-zero exceptions, making the behavior consistent with other division operations.

Devicetree Bindings

Sukrut Bellary modernized TI clock Devicetree bindings by converting autoidle and fixed-factor-clock bindings from text to YAML format. He clarified that autoidle is a derivative feature of basic clocks rather than a standalone clock type, and updated examples to meet current standards.

PWM Infrastructure

Uwe Kleine-König authored the new pwmchip character device interface, enabling faster userspace access via ioctl instead of sysfs and reducing configuration time by more than 60% on STM32MP13 hardware. He systematically removed driver-local locking from eight PWM drivers (sun4i, fsl-ftm, microchip-core, lpc18xx-sct, twl-led, atmel, clps711x, sti) as the framework now provides adequate protection.

Uwe authored critical fixes for the MediaTek PWM driver, separating hardware enable and clock enable handling and fixing duty cycle and period setting issues. He enhanced PWM integration with other subsystems: improved the clock PWM driver to use non-sleeping PWMs when possible and return real duty cycles, added #pwm-cells = <3> support to the ADT7475 hwmon driver, and optimized PWM configuration in max8997 haptic and max77693 input drivers.

He also authored Devicetree updates adding PWM cell properties to LPC32xx and BCM958625 platforms, ARM STM32 nvmem-cells for constant MAC addresses, ACPI EINJ resource leak fixes, devfreq sun8i-a33-mbus simplifications, RTC calculation optimizations, and networking driver naming standardization.

As PWM subsystem maintainer, Uwe committed contributions from external developers including SiFive PWM fixes, LPC32xx binding conversions, and support for new hardware platforms.

Summary

Type Count
Authored 151
Signed-off-by 3
Acked-by 6
Reviewed-by 25
Tested-by 1

List of contributions

Hash Subject Role Person
43c0f6456f80 iio: pressure: bmp280: Use IS_ERR() in bmp280_common_probe() reviewed-by David Lechner
b04e4551893f iio: adc: ad7380: fix missing max_conversion_rate_hz on adaq4381-4 Author David Lechner
197e299aae42 iio: adc: ad7124: fix channel lookup in syscalib functions Author David Lechner
ae5bc07ec9f7 iio: temperature: maxim_thermocouple: use DMA-safe buffer for spi_read() Author David Lechner
1cfb22c277c7 iio: adc: ad7173: prevent scan if too many setups requested Author David Lechner
de18e978d0cd iio: proximity: isl29501: fix buffered read on big-endian systems Author David Lechner
4e5b705cc614 iio: accel: sca3300: fix uninitialized iio scan data Author David Lechner
0a686b9c4f84 iio: adc: ad_sigma_delta: Select IIO_BUFFER_DMAENGINE and SPI_OFFLOAD reviewed-by David Lechner
6fa908abd19c iio: adc: ad7173: fix setting ODR in probe Author David Lechner
1d9a21ffb43b iio: adc: ad7173: fix calibration channel Author David Lechner
92c247216918 iio: adc: ad7173: fix num_slots Author David Lechner
0eb8d7b25397 iio: adc: ad7173: fix channels index for syscalib_mode Author David Lechner
66d4374d97f8 iio: adc: ad_sigma_delta: change to buffer predisable Author David Lechner
9b71d269d10a iio: ABI: fix correctness of I and Q modifiers Author David Lechner
50467d899a3f iio: imu: bno055: make bno055_sysfs_attr const Author David Lechner
399b883ec828 iio: imu: bno055: fix OOB access of hw_xlate array Author David Lechner
1b0dc9385895 iio: adc: ad4000: don’t use shift_right() Author David Lechner
219da3ea842a iio: adc: ad_sigma_delta: add SPI offload support Author David Lechner
db63e45a7da0 iio: adc: ad_sigma_delta: use spi_optimize_message() Author David Lechner
1519bedf884c iio: adc: ad_sigma_delta: refactor setting read address Author David Lechner
86d8d6b8b9a7 iio: adc: ad_sigma_delta: audit included headers Author David Lechner
e916934b5915 iio: adc: ad_sigma_delta: use BITS_TO_BYTES() macro Author David Lechner
1a913da6cfda iio: adc: ad_sigma_delta: use sizeof() in ALIGN() Author David Lechner
11d58620dfd0 iio: adc: ad_sigma_delta: use u8 instead of uint8_t Author David Lechner
67189665e063 iio: adc: ad_sigma_delta: sort includes Author David Lechner
5a2f15c5a8e0 iio: adc: ad_sigma_delta: don’t overallocate scan buffer Author David Lechner
0f7797f6a819 iio: pressure: dlhl60d: Use separate structures rather than an array for chip info Author David Lechner
50df70430369 iio: light: cm3232: make struct cm3232_als_info const Author David Lechner
8f02a8d6a7bf iio: light: cm3232: move calibscale to struct cm3232_chip Author David Lechner
2ef920e0e5c0 iio: imu: adis16400: Use separate structures rather than an array for chip info Author David Lechner
00a468c93126 iio: adc: ad7768-1: add low pass -3dB cutoff attribute reviewed-by David Lechner
5eef68d672b7 iio: adc: ad7124: Use separate structures rather than array for chip info Author David Lechner
b1a6eac557f3 iio: proximity: vcnl3020: make vcnl3020_property const Author David Lechner
96337ede9435 iio: proximity: vcnl3020: pass struct vcnl3020_property by pointer Author David Lechner
5b322dc49a1b iio: pressure: abp060mg: make abp_config const Author David Lechner
54fde97fa8eb iio: light: zopt2201: make zopt2201_scale const Author David Lechner
d94fc241a948 iio: light: isl76682: make isl76682_range_table const Author David Lechner
076a2f3d54a9 dt-bindings: pwm: adi,axi-pwmgen: Update documentation link Author David Lechner
bae712b66cbc iio: imu: bmi160: make bmi160_regs const Author David Lechner
ca494204c646 iio: dac: ltc2688: make ltc2688_dither_ext_info const Author David Lechner
f7f9a33734c0 iio: dac: ad5770r: make ad5770r_rng_tbl const Author David Lechner
f391719dd1b8 iio: common: hid-sensor-attributes: make unit_conversion const Author David Lechner
1e9e9669ff3d iio: chemical: atlas-ezo-sensor: make atlas_ezo_devices const Author David Lechner
9d531de209fd iio: amplifiers: ad8366: make ad8366_info const Author David Lechner
0084ccd7dcd7 iio: adc: stm32-adc: make stm32_adc_trig_info const Author David Lechner
89b971055a3e iio: adc: qcom-vadc: make scale_adc5_fn const Author David Lechner
bf9b1ffe157b iio: adc: mp2629_adc: make mp2629_channels const Author David Lechner
fc0f5322a371 iio: adc: axp20x_adc: make axp717_maps const Author David Lechner
1ca58056bc2a iio: adc: at91_adc: make at91_adc_caps const Author David Lechner
89c3d59a9252 iio: adc: ad7091r8: make ad7091r_init_info const Author David Lechner
0e919ffcc73f iio: adc: ad7091r5: make ad7091r5_init_info const Author David Lechner
3307461aead6 iio: accel: mma9553: make mma9553_event_info const Author David Lechner
31c3bed202dd iio: accel: adxl345: make adxl345_events const Author David Lechner
8956547c5063 iio: adc: ad7380: remove unused oversampling_ratio getter Author David Lechner
b1c5f11dd183 iio: adc: ad7173: simplify clock enable/disable Author David Lechner
3fcd3d2fe44d spi: offload trigger: add ADI Util Sigma-Delta SPI driver Author David Lechner
e47a324d6f07 dt-bindings: trigger-source: add ADI Util Sigma-Delta SPI Author David Lechner
c3aa8c7278ae clk: clk-axi-clkgen: fix coding style issues reviewed-by David Lechner
34e42e9a92cf clk: clk-axi-clkgen move to min/max() reviewed-by David Lechner
236ab6ad215b clk: clk-axi-clkgen: detect axi_clkgen_limits at runtime reviewed-by David Lechner
6fc942f777b1 include: adi-axi-common: add new helper macros reviewed-by David Lechner
2ad26b7bedcd include: linux: move adi-axi-common.h out of fpga reviewed-by David Lechner
9933b833d9ee clk: clk-axi-clkgen: make sure to include mod_devicetable.h reviewed-by David Lechner
ce8a90966995 clk: clk-axi-clkgen: fix fpfd_max frequency for zynq reviewed-by David Lechner
8540a6f93a70 iio: temperature: tmp006: use = { } instead of memset() Author David Lechner
88bcfc9e7b94 iio: proximity: irsd200: use = { } instead of memset() Author David Lechner
ca2ec0786009 iio: pressure: zpa2326: use = { } instead of memset() Author David Lechner
73f31d9f8c81 iio: pressure: mprls0025pa: use = { } instead of memset() Author David Lechner
b2dead596238 iio: pressure: mpl3115: use = { } instead of memset() Author David Lechner
9e664cddd128 iio: pressure: bmp280: use = { } instead of memset() Author David Lechner
174818e102e8 iio: magnetometer: af8133j: use = { } instead of memset() Author David Lechner
f646c99adef6 iio: light: veml6030: use = { } instead of memset() Author David Lechner
acddd6098119 iio: light: opt4060: use = { } instead of memset() Author David Lechner
19ae7344cc17 iio: light: ltr501: use = { } instead of memset() Author David Lechner
6ee8e56aedc0 iio: light: bh1745: use = { } instead of memset() Author David Lechner
3ee3c09d2d76 iio: imu: inv_mpu6050: use = { } instead of memset() Author David Lechner
352112e2d9aa iio: imu: inv_icm42600: use = { } instead of memset() Author David Lechner
46868e362f2a iio: dac: ad3552r: use = { } instead of memset() Author David Lechner
d2614c43af75 iio: chemical: sunrise_co2: use = { } instead of memset() Author David Lechner
5226b48b57e1 iio: chemical: scd30: use = { } instead of memset() Author David Lechner
27d782612a33 iio: chemical: scd4x: use = { } instead of memset() Author David Lechner
00b1c247670e iio: adc: ti-tsc2046: use = { } instead of memset() Author David Lechner
4c4ef744d512 iio: adc: ti-lmp92064: use = { } instead of memset() Author David Lechner
6c25238a74a3 iio: adc: ti-ads1119: use = { } instead of memset() Author David Lechner
6d1db00273d7 iio: adc: ti-ads1015: use = { } instead of memset() Author David Lechner
a3e20daaa206 iio: adc: stm32-adc: use = { } instead of memset() Author David Lechner
708d98459d0c iio: adc: rtq6056: use = { } instead of memset() Author David Lechner
dfa806ce04f9 iio: adc: rockchip_saradc: use = { } instead of memset() Author David Lechner
b8f008100a34 iio: adc: mt6360-adc: use = { } instead of memset() Author David Lechner
3a780d29aece iio: adc: dln2-adc: use = { } instead of memset() Author David Lechner
08ef45efc23d iio: accel: msa311: use = { } instead of memset() Author David Lechner
f448fb868a27 iio: accel: adxl372: use = { } instead of memset() Author David Lechner
51180f03eb6f iio: amplifiers: ada4250: use dev_err_probe() Author David Lechner
e905b3dd3a73 iio: amplifiers: ada4250: move offset_uv in struct Author David Lechner
3712f11b4ed7 iio: amplifiers: ada4250: use devm_regulator_get_enable_read_voltage() Author David Lechner
f8a7be248f73 iio: amplifiers: ada4250: don’t fail on bad chip ID Author David Lechner
788d6060f19b iio: amplifiers: ada4250: used dev local variable Author David Lechner
fb1d3b24ebf5 iio: adc: ad7768-1: add filter type and oversampling ratio attributes reviewed-by David Lechner
74e16c0cd61f iio: adc: ad7768-1: replace manual attribute declaration reviewed-by David Lechner
74790e84ffbb iio: adc: ad7768-1: add support for Synchronization over SPI reviewed-by David Lechner
54da2aeb7160 iio: adc: ad7768-1: add multiple scan types to support 16-bits mode reviewed-by David Lechner
96b6e814afd2 iio: adc: ad7768-1: add regulator to control VCM output reviewed-by David Lechner
0dd88eaa7126 dt-bindings: trigger-source: add generic GPIO trigger source reviewed-by David Lechner
a8daa0a8f13d iio: adc: stm32-adc: Use dev_fwnode() reviewed-by David Lechner
1763bd3a0c03 iio: adc: ad7173: check return value of spi_setup() Author David Lechner
dced5bda1411 iio: adc: adi-axi-adc: add axi_adc_oversampling_ratio_set reviewed-by David Lechner
97e6882ed1a1 iio: backend: update iio_backend_oversampling_ratio_set reviewed-by David Lechner
56e5ec2d856a iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update reviewed-by David Lechner
0a99f2d8ff5b gpio: virtuser: use gpiod_multi_set_value_cansleep() Author David Lechner
ed2cfae6b845 net: mdio: mux-gpio: use gpiod_multi_set_value_cansleep Author David Lechner
5e61d44d0f46 dt-bindings: display: convert sitronix,st7586 to YAML Author David Lechner
7e54d932873d iio: adc: ad7768-1: Ensure SYNC_IN pulse minimum timing requirement reviewed-by David Lechner
c5858465a695 iio: amplifiers: ada4250: use DMA-safe memory for regmap_bulk_read() Author David Lechner
b21d1fbb97c8 ACPI: APEI: EINJ: Fix resource leak by remove callback in .exit.text Author Uwe Kleine-König
d1dfcdd30140 pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch reviewed-by Uwe Kleine-König
61c6fef7c4b0 Input: max77693 – convert to atomic pwm operation Author Uwe Kleine-König
65c6f742ab14 pwm: imx-tpm: Reset counter if CMOD is 0 Committer Uwe Kleine-König
f21d136caf81 pwm: mediatek: Fix duty and period setting Author Uwe Kleine-König
704d918341c3 pwm: mediatek: Handle hardware enable and clock enable separately Author Uwe Kleine-König
68b9272ca7ac pwm: raspberrypi-poe: Fix spelling mistake “Firwmware” -> “Firmware” Committer Uwe Kleine-König
a02b105fe9f2 hwmon: add support for MC33XS2410 hardware monitoring Committer Uwe Kleine-König
28517c8b6275 pwm: mc33xs2410: add hwmon support Committer Uwe Kleine-König
ae48d3542783 rtc: Optimize calculations in rtc_time64_to_tm() Author Uwe Kleine-König
05a0ffe37c44 dt-bindings: hwmon: adt7475: Allow and recommend #pwm-cells = <3> Author Uwe Kleine-König
50f16073d175 hwmon: (adt7475) Implement support for #pwm-cells = <3> Author Uwe Kleine-König
c3bc361393b2 PM / devfreq: sun8i-a33-mbus: Simplify by using more devm functions Author Uwe Kleine-König
a582469541a3 pwm: img: Remove redundant pm_runtime_mark_last_busy() calls Committer Uwe Kleine-König
edd3bcb1801e pwm: Expose PWM_WFHWSIZE in public header Committer Uwe Kleine-König
4cd2f417a0ac dt-bindings: pwm: Convert lpc32xx-pwm.txt to yaml format Committer Uwe Kleine-König
10e9b32d9a14 docs: pwm: Adapt Locking paragraph to reality Author Uwe Kleine-König
2c06a2178926 pwm: twl-led: Drop driver local locking Author Uwe Kleine-König
dce0df8ac14f pwm: sun4i: Drop driver local locking Author Uwe Kleine-König
d2c8bdc72fa9 pwm: sti: Drop driver local locking Author Uwe Kleine-König
9470e7d11fe2 pwm: microchip-core: Drop driver local locking Author Uwe Kleine-König
33d73bde06e9 pwm: lpc18xx-sct: Drop driver local locking Author Uwe Kleine-König
7c1a529a240b pwm: fsl-ftm: Drop driver local locking Author Uwe Kleine-König
f0d91b16dcb3 pwm: clps711x: Drop driver local locking Author Uwe Kleine-König
62df49917eb4 pwm: atmel: Drop driver local locking Author Uwe Kleine-König
0191c80e8a28 pwm: argon-fan-hat: Add Argon40 Fan HAT support Committer Uwe Kleine-König
f6bd99a2d24e dt-bindings: pwm: argon40,fan-hat: Document Argon40 Fan HAT Committer Uwe Kleine-König
6fdd4d8c84f3 dt-bindings: vendor-prefixes: Document Argon40 Committer Uwe Kleine-König
e47026facf73 pwm: pwm-mediatek: Add support for PWM IP V3.0.2 in MT6991/MT8196 Committer Uwe Kleine-König
d4f1e7a2fe02 pwm: pwm-mediatek: Pass PWM_CK_26M_SEL from platform data Committer Uwe Kleine-König
3bb994892178 dt-bindings: pwm: mediatek,mt2712-pwm: Add support for MT6991/MT8196 Committer Uwe Kleine-König
56ad79b848d4 dt-bindings: pwm: convert lpc1850-sct-pwm.txt to yaml format Committer Uwe Kleine-König
0b4d1abe5ca5 pwm: rockchip: Round period/duty down on apply, up on get Committer Uwe Kleine-König
fd0b06972a8f pwm: stm32: add support for stm32mp25 Committer Uwe Kleine-König
076a2f3d54a9 dt-bindings: pwm: adi,axi-pwmgen: Update documentation link Committer Uwe Kleine-König
21d5daad9354 pwm: sophgo-sg2042: Add support for SG2044 Committer Uwe Kleine-König
8c805dfafd9b pwm: sophgo-sg2042: Reorganize the code structure Committer Uwe Kleine-König
2b66b67530b8 dt-bindings: pwm: sophgo: Add pwm controller for SG2044 Committer Uwe Kleine-König
6df3aac763fa pwm: sifive: Fix rounding and idempotency issues in apply and get_state Committer Uwe Kleine-König
7dbc4432ea6b pwm: sifive: Fix PWM algorithm and clarify inverted compare behavior Committer Uwe Kleine-König
f4bcf818e5d6 riscv: dts: sifive: unleashed/unmatched: Remove PWM controlled LED’s active-low properties Committer Uwe Kleine-König
27b5dfe4b4ea pwm: pxa: Allow to enable for SpacemiT K1 SoC Committer Uwe Kleine-König
52d2d14d9e49 pwm: pxa: Add optional reset control Committer Uwe Kleine-König
08e0b981231f dt-bindings: pwm: marvell,pxa-pwm: Add SpacemiT K1 PWM support Committer Uwe Kleine-König
9c06f26ba5f5 pwm: Add support for pwmchip devices for faster and easier userspace access Author Uwe Kleine-König
998adc8cd5cb ARM: dts: stm32: Add nvmem-cells to ethernet nodes for constant mac-addresses Author Uwe Kleine-König
36bbb14ee743 ARM: dts: lpc32xx: Add #pwm-cells property to the two SoC PWMs Author Uwe Kleine-König
e96ee511c906 net: tulip: Rename PCI driver struct to end in _driver Author Uwe Kleine-König
b9ac2ae0008d net: atlantic: Rename PCI driver struct to end in _driver Author Uwe Kleine-König
54e626d097b0 Input: max8997_haptic – optimize PWM configuration Author Uwe Kleine-König
f5f792f07bd2 clk: pwm: Make use of non-sleeping PWMs Author Uwe Kleine-König
91d10161226c clk: pwm: Don’t reconfigure running PWM at probe time Author Uwe Kleine-König
574c79582963 clk: pwm: Convert to use pwm_apply_might_sleep() Author Uwe Kleine-König
6ae97be59c7b clk: pwm: Let .get_duty_cycle() return the real duty cycle Author Uwe Kleine-König
41edd08b669c docs: usb: gadget: Reindent numbered list Author Uwe Kleine-König
8df00d6bdb0a ARM: dts: bcm958625-meraki-mx6x: Use #pwm-cells = <3> Author Uwe Kleine-König
a3a4be32b69c arm: dts: ti: omap: Fixup pinheader typo Committer Kevin Hilman
539e87dd661f ARM: dts: am335x-pdu001: Fix RS-485 transceiver switching Committer Kevin Hilman
6d04ead94d49 arm: dts: omap: Add support for BeagleBone Green Eco board Committer Kevin Hilman
23c7d1976f52 dt-bindings: omap: Add Seeed BeagleBone Green Eco Committer Kevin Hilman
297bd457c893 arm: dts: omap: am335x-bone-common: Rename tps to generic pmic node Committer Kevin Hilman
8eb22dcfe50e Revert “ARM: dts: Update pcie ranges for dra7” Committer Kevin Hilman
dccb920a0838 ARM: dts: omap: am335x: Use non-deprecated rts-gpios Committer Kevin Hilman
6beb4ec0f9fd driver core: auxiliary bus: fix OF node leak cc reviewed-by Jerome Brunet
e7cd58d2fdf8 PCI: endpoint: pci-epf-vntb: Allow BAR assignment via configfs Author Jerome Brunet
8a65268500b0 clk: amlogic: s4: remove unused data Author Jerome Brunet
4cb53fff9db2 clk: amlogic: drop clk_regmap tables Author Jerome Brunet
21ed19d11863 clk: amlogic: get regmap with clk_regmap_init Author Jerome Brunet
328d4a7eb073 clk: amlogic: remove unnecessary headers Author Jerome Brunet
9d33595c0227 reset: mpfs: use the auxiliary device creation Author Jerome Brunet
a079d83c4afd PCI: endpoint: pci-epf-vntb: Align MW naming with config names Author Jerome Brunet
7ea488cce732 PCI: endpoint: pci-epf-vntb: Return -ENOENT if pci_epc_get_next_free_bar() fails Author Jerome Brunet
301b96e0668a clk: amlogic: axg-audio: use the auxiliary reset driver Author Jerome Brunet
ac32d031f508 clk: tests: add clk_hw_get_dev() and clk_hw_get_of_node() tests Author Jerome Brunet
b06ba1c353b8 clk: tests: Make clk_register_clk_parent_data_device_driver() common Author Jerome Brunet
5f4081d6fafe clk: add a clk_hw helpers to get the clock device or device_node Author Jerome Brunet
6526b02e1020 drm/bridge: ti-sn65dsi86: use the auxiliary device Author Jerome Brunet
d2b16853ad70 platform: arm64: lenovo-yoga-c630: use the auxiliary device creation helper Author Jerome Brunet
fcddcb7e8f38 pmdomain: ti: Select PM_GENERIC_DOMAINS Author Guillaume La Roque
631ce8f743a5 arm64: Kconfig.platforms: remove useless select for ARCH_K3 Author Guillaume La Roque
e795000e755c mul_u64_u64_div_u64: fix the division-by-zero behavior Author Nicolas Pitre
f1180ca37abe tty: vt: use _IO() to define ioctl numbers reviewed-by Nicolas Pitre
866380bcf10c tty: vt: use sane types for userspace API reviewed-by Nicolas Pitre
126cbd0deb9b iio: adc: ad7606: add gain calibration support Author Angelo Dureghello
cc2eca43091e iio: adc: ad7606: rename chan_scale to a more generic chan_info Author Angelo Dureghello
9dc4ef3a5b9f iio: adc: ad7606: exit for invalid fdt dt_schema properties Author Angelo Dureghello
e986466a92da dt-bindings: iio: adc: adi,ad7606: add gain calibration support Author Angelo Dureghello
48d487dc6445 iio: adc: ad7606: add offset and phase calibration support Author Angelo Dureghello
342c52dde2f0 iio: core: add ADC delay calibration definition Author Angelo Dureghello
c86b60189f35 Documentation: ABI: IIO: add new convdelay documentation Author Angelo Dureghello
3125a5ca45f4 iio: adc: ad7606: add enabling of optional Vrefin voltage Author Angelo Dureghello
82f4ed3a01b2 iio: adc: ad7606: enable Vdrive power supply Author Angelo Dureghello
9182f3b4c370 iio: dac: adi-axi-dac: use unique bus free check Author Angelo Dureghello
358df002da77 dt-bindings: clock: ti: add ti,autoidle.yaml reference Author Sukrut Bellary
a7953b62de55 dt-bindings: clock: ti: Convert fixed-factor-clock to yaml Author Sukrut Bellary
5ffe2d2f53eb dt-bindings: clock: ti: Convert autoidle binding to yaml Author Sukrut Bellary
Categories
Community Conferences ELC Linux Kernel Open-source Partners Texas Instruments Yocto Zephyr

BayLibre at OSS Europe 2025, Amsterdam


Last August, BayLibre sent eight of its collaborators to the Open Source Summit Europe, the Linux Foundation’s flagship open-source conference in Amsterdam (Netherlands). Over three packed days, we delivered six technical talks from five different speakers, participated in sponsored sessions and workshops, represented BayLibre in multiple open-source communities… and had fun together! It was an amazing opportunity as usual, not just to share what we are building, but to reconnect with the wider open-source ecosystem.

Table of Contents

  • Our talks & sessions
  • BayLibre representation at co-located events
  • Why this matters for BayLibre
  • Looking forward
  • Thank You

Our talks & sessions

Our speakers covered a range of topics, reflecting key areas we are passionate about: Embedded Linux, Zephyr, Yocto and CI/CD workflows.

Here are some highlights:

Embedded Linux Conference (ELC)

Why Won’t My CPU Sleep? Debugging cpuidle Mysteries on ARM SoCs

by Kevin Hilman, CTO & co-founder (co-presented with Dhruva Gole, Senior Embedded Software Engineer at Texas Instruments)

In this talk, Kevin and Dhruva dive into the challenges of debugging CPUIdle on ARM SoCs and offers practical solutions.

Full video available here

Kevin and Dhruva - CPU sleep

Do It Faster: How We Supercharged Linux to Work with Blazing Fast ADCs for IIO

by Trevor Gamblin, Senior Software Engineer

In this talk, Trevor explains how BayLibre optimized Linux to work with Analog Devices’ blazing-fast analog-to-digital converters (ADCs).

Full video available here

Trevor - Dot it faster with ADCs

Powering Up Lab Automation with labgrid and CI

by Trevor Gamblin (co-presented with Tim Orling, Principal Software Engineer at Konsulko Group)

In this session, Trevor and Tim demonstrate how to use Labgrid and Continuous Integration (CI) to build robust and efficient lab automation for embedded systems, making development and testing faster and more reliable. This is a must-watch for anyone looking to streamline their lab setup and CI workflows.

Full video available here

Trevor and Tim - Lab automation

Zephyr Developer Summit

Cryptography Support in Zephyr: Recent Changes and Upcomings

by Valerio Setti, Senior Software Engineer and Zephyr TSC representative

In this session, Valerio dives into the latest developments in the Zephyr RTOS cryptography subsystem and provides a sneak peek into what’s coming next. This is a must-watch for anyone building secure embedded systems.

Full video available here

Valerio - Crypto Zephyr

Running Zephyr in a Light Bulb

by Alexandre Bailon, Senior Software Engineer and co-founder

Alexandre explores how to develop a Zephyr firmware for an existing connected light bulb, focusing on a solution that is more robust, secure, and privacy-respecting than many commercial alternatives. Watch the full talk to learn how open-source software can power a smarter, more secure home.

Full video available here

Alexandre - Zephyr in a light bulb

ZMS: a New Lightweight Storage System

by Riadh Ghaddab, Senior Software Engineer and Zephyr maintainer

In this talk, Riadh, Senior Software Engineer at BayLibre and Zephyr Project maintainer, presents this new storage system that he designed, a crucial solution for embedded systems where space and resources are limited.

Full video available here

Riadh - ZMS

Open Source Leadership

Sponsored session

In this this session Kevin Hilman, alongside Stefan Müller-Klieser (Group Leader, Phytec), Jon Oster (Principal Product & Security Architect, Toradex), Jason Kridner (President and Founder, BeagleBoard.org Foundation), Thomas Petazzoni (Co-founder, Bootlin) & Andrei Aldea / Neha Francis / Vishnu Singh (Texas Instruments), focused on how to bring products to life with upstream software.

Full video available here

BayLibre representation at co-located events

In addition to our main conference talks, our team members played key leadership and community roles at co-located events and workshops:

  • Zephyr Project TSC (Technical Steering Committee): Valerio Setti represented BayLibre, contributing to governance and future strategic direction
  • Yocto Project Developer Day: Trevor Gamblin was a BayLibre representative and presented a talk, as a maintainer, outlining the recent agreement to make RISC-V a fully supported architecture within the Yocto Project community trhrough RISC-V International and RISE Project funding and support.
  • KernelCI workshop: Kevin Hilman led a hands-on session as part of the KernelCI project, drawing in developers interested in continuous integration for kernel testing.

Why this matters for BayLibre

This kind of engagement goes to the heart of who we are at BayLibre. Here are some reasons why being at OSS Europe, among other conferences, is more than just giving talks:

  • Community & contribution: We don’t see open source just as a tool, it’s a community ecosystem. Whether it’s Linux, Zephyr, Yocto, AOSP,… we believe in being active contributors, not just users. Events like OSS Europe allow us to exchange ideas, learn about the latest work, and contribute back—code, patches, feedback, and more.
  • Face-to-face is irreplaceable: There’s something special about meeting people in person, from collaborators, maintainers, users, partners, speakers and other companies. Conversations over coffee, hallway encounters, serendipitous brainstorming, these generate ideas and trust that often lead to long-standing collaborations.
  • Shared moments within the team: Events like this also strengthen us internally. It was as always an opportunity for our attendees to work together, share knowledge, get inspired, and return with renewed energy. These shared experiences build mutual respect, bring out latent ideas, and help us grow professionally and personally.

BayLibre team at OSS Europe Amsterdam

Looking forward

Our participation at OSS Europe is not a one-off. We see it as part of a continuous journey. Plans are already underway for increased contributions to Linux Kernel, Zephyr Project, Yocto Project, AOSP, CI/CD infrastructure (KernelCI and related tooling).

Thank You

We’d like to thank the organizers of OSS Europe, the Linux Foundation, all the speakers, maintainers, contributors, and attendees who made the event special. To our friends in the community: it was a pleasure catching up, learning together, and pushing open source forward.

Here’s to many more conferences, more ideas, more code, and more open collaboration.

Categories
Community Open-source Zephyr

BayLibre contributions to Zephyr v4.2.0

The Zephyr Project released version 4.2.0 on July 19th, 2025. BayLibre contributed new hardware platform support, kernel optimizations, and storage subsystem improvements.

CC23x0 SoC platform support

Julien Panis and Stoyan Bogdanov implemented drivers for Texas Instruments’ CC23x0 SoC family. The implementation covers ADC, crypto/AES, DMA, SPI, UART, timer/counter, and watchdog peripherals.

The ADC driver supports 16-channel operation with single channel conversion and sequence mode for up to 4 channels. The crypto driver implements AES module support with ECB encryption, CTR, and CCM modes.

The DMA controller provides 8-channel configurable transfers with memory-to-peripheral, peripheral-to-memory, and memory-to-memory operations. DMA integration was added to ADC, crypto, SPI, and UART modules.

Support for the TI LP-EM-CC2340R5 LaunchPad was added across all implemented peripherals. Sample applications and device tree overlays were created for ADC, crypto, and counter functionality.

Stoyan Bogdanov implemented LGPT counter support (LGPT0-LGPT3) and RTC counter drivers. Hardware information support provides reset cause detection. The watchdog driver implements start/feed functionality with hardware limitations. Flash driver optimization removed VIMS calls specific to CC23x0.

Kernel and memory optimizations

Nicolas Pitre optimized the memory allocation code paths for those cases where memory alignment is unnecessary, improving performances by up to 12%.

The ring buffer implementation was modified to reduce struct ring_buf size by 12 bytes. The implementation maintains the 32KB default limit with optional 2GB support. He also optimized the ring buffer management by consolidating duplicated code.

Kernel pipe poll support was fixed by addressing missing condition checks and misplaced event handling. The fix ensures proper synchronization in pipe-based communication. Test coverage was added for k_malloc() functionality and heap alignment testing.

Storage and settings

Riadh Ghaddab added two Settings API functions: settings_load_one() for loading single entries instead of complete subtrees, and settings_get_val_len() for value length retrieval without full value reads.

When Settings subsystem is used, ZMS got an option to optimize the cache function taking into account the linked list hash design. A Kconfig option was added in order to disable deleting linked list hashes for some applications that use a fix set of storage IDs.

Adding more robustness for the ZMS backend of Settings in edge cases like power loss during a write, and add more functional tests to cover ZMS backend functionality. In addition to that, clean some part of ZMS subsystem and update the documentation.

Power management and wireless

Adrien Ricciardi implemented task watchdog power management integration. The task_wdt_suspend() and task_wdt_resume() APIs enable operation during system power state transitions. A Kconfig option allows pausing hardware watchdog during sleep modes. Workqueue naming was added to ICBMSG for better debugging visibility in kernel shell commands.

Alexandre Bailon added Energy Detection (ED) scanning support for CC13xx/CC26xx platforms. This enables channel selection and network discovery for mesh networking protocols. Beacon filtering was fixed to prevent OpenThread network discovery issues.

Board support and drivers

Valerio Setti added initial support for the LilyGo T-Watch S3 board. In this scope he added support for the charging feature of the X-Powers AXP2101 PMIC and a couple of Kconfig fixes for the BMA4xx sensor and PCF8563 RTC.

Cryptography and security

Valerio Setti continued his reorganization of the Mbed TLS module by removing unused configuration header files.

UOSCORE and UEDHOC crypto dependencies were moved out of the Mbed TLS’ Kconfig file into their respective Kconfig file. Moreover, since these protocols are EC key based, RSA support was also removed.

Finally support for UUID v5 was disabled in TF-M platforms due to the unavailability of SHA-1 algorithm in TF-M.

Summary

Type Count
Authored 89
Signed-off-by 6

List of contributions

Hash Subject Role Person
a631df5cd8c8 tests: drivers: spi: spi_loopback: Add testcase for cc23x0 Author Julien Panis
5b728969cef9 drivers: spi: cc23x0: Add loopback mode option Author Julien Panis
7a12801623be dts: arm: ti: cc23x0: Add DMA mode support to SPI module Author Julien Panis
11cbfeafe62b drivers: spi: cc23x0: Add support for DMA mode Author Julien Panis
2289fa177063 samples: drivers: crypto: Add entry to sample.yaml for cc23x0 Author Julien Panis
2d98ac0f0bb1 dts: arm: ti: cc23x0: Add DMA mode support to AES module Author Julien Panis
e0f02d93a6f9 drivers: crypto: cc23x0: Add support for DMA mode Author Julien Panis
a92339b8cd15 dts: arm: ti: cc23x0: Add DMA mode support to UART module Author Julien Panis
fa199b6f6cfd drivers: serial: cc23x0: Add support for DMA mode Author Julien Panis
b3a32a95d181 dts: arm: ti: cc23x0: Add DMA mode support to ADC module Author Julien Panis
45a8a0f0c63c drivers: adc: cc23x0: Add support for DMA mode Author Julien Panis
42ad57972a54 samples: drivers: adc_sequence: Add lp_em_cc2340r5 DT overlay Author Julien Panis
0acad3e404c8 samples: drivers: adc_dt: Add lp_em_cc2340r5 DT overlay Author Julien Panis
0800aa094c3d boards: ti: lp_em_cc2340r5: Add ADC support Author Julien Panis
d9134b3a8a8b dts: arm: ti: cc23x0: Add ADC support Author Julien Panis
dd5ed02146ee drivers: adc: Add support for cc23x0 ADC Author Julien Panis
2bbba4420519 boards: ti: lp_em_cc2340r5: Add SPI support Author Julien Panis
eca9c92ed508 dts: arm: ti: cc23x0: Add SPI support Author Julien Panis
45895ecfea2e drivers: spi: Add support for cc23x0 SPI Author Julien Panis
23a296f26bc3 soc: ti: cc23x0: Add helper macros for device tree Author Julien Panis
27ddc762476d boards: ti: lp_em_cc2340r5: Add DMA support Author Julien Panis
e1ec6de94ad7 dts: arm: ti: cc23x0: Add DMA support Author Julien Panis
d8dbf5653eb2 drivers: dma: Add support for cc23x0 DMA Author Julien Panis
52ceb6ab86dd samples: drivers: crypto: Add support for cc23x0 Author Julien Panis
30ed81d66ae3 boards: ti: lp_em_cc2340r5: Add crypto support Author Julien Panis
66749d72e191 dts: arm: ti: cc23x0: Add crypto support Author Julien Panis
fa8d5177c132 drivers: crypto: Add support for cc23x0 AES Author Julien Panis
b09a3df131a7 modules: uoscore-uedhoc: enable legacy Mbed TLS crypto support in TF-M Author Valerio Setti
a03b06fd0492 tests: modules: uoscore: remove unnecessary dependencies Author Valerio Setti
9e190f6d92b0 modules: uoscore-uedhoc: select required PSA Crypto features Author Valerio Setti
df3485360a37 modules: mbedtls: don’t enable RSA support for UOSCORE or UEDHOC Author Valerio Setti
31e38c83b38e lib: uuid: do not support UUID_v5 on TF-M platforms Author Valerio Setti
52dcb2593a89 Bluetooth: Host: remove useless select in BT_HOST_CRYPTO_PRNG Author Valerio Setti
843776035d89 tests: drivers: build_all: add support for “x-powers,axp2101-charger” Author Valerio Setti
5d78ef3d5dcb boards: twatch_s3: enable battery charger Author Valerio Setti
65a7e79eabfd drivers: charger: add charger support in X-Powers AXP2101 Author Valerio Setti
d75c2113a99b drivers: sensors: bma4xx: add I2C_RTIO Kconfig for I2C Author Valerio Setti
5309e11df240 boards: lilygo: add initial support for T-Watch S3 Author Valerio Setti
c9d8d57eb079 mbedtls: rename tls-generic Kconfig and configuration header file Author Valerio Setti
470f404eb6ef mbedtls: remove unnecessary headers Author Valerio Setti
13270a43c1c2 cmake: modules: dts: print error message if DTC fails Author Valerio Setti
e2344739ace2 drivers: rtc: pcf8563: some fixes to the driver Author Valerio Setti
2f1746542196 ipc: icbmsg: Add a workqueue name Author Adrien Ricciardi
c53fb67f568b task_wdt: Add suspend and resume API functions Author Adrien Ricciardi
6ca9bffe48df task_wdt: Kconfig: Allow to pause the hardware watchdog in sleep Author Adrien Ricciardi
58431564e1a7 dts: arm: ti: cc23x0: Add LGPT support Author Stoyan Bogdanov
cfe7a58a2858 drivers: counter: Add support for cc23x0 LGPT Author Stoyan Bogdanov
bdca32d88fa1 drivers: flash: Remove VIMS calls for cc23x0 Author Stoyan Bogdanov
198230bef2d2 samples: drivers: counter: alarm: Add lp_em_cc2340r5 overlay Author Stoyan Bogdanov
a6db5c783ba3 dts: arm: ti: cc23x0: Add RTC support Author Stoyan Bogdanov
dddbfcce76db drivers: counter: Add support for cc23x0 RTC counter Author Stoyan Bogdanov
f1b4c122374c drivers: hwinfo: cc23x0: Add support for cc23x0 in hwinfo Author Stoyan Bogdanov
5104d6d5c311 boards: ti: lp_em_cc2340r5: Add watchdog to aliases Author Stoyan Bogdanov
e298412b38ca dts: arm: ti: cc23x0: Add watchdog support Author Stoyan Bogdanov
741879b36222 drivers: watchdog: cc23x0: Add support for watchdog Author Stoyan Bogdanov
457ade48b46e settings: zms: code style clean up Author Riadh Ghaddab
7f716f15226f doc: settings: new API functions Author Riadh Ghaddab
7ae14ebf5801 settings: zms: use the safe function strnlen instead of strlen Author Riadh Ghaddab
cad2f1c103ae settings: add new API function settings_get_val_len() Author Riadh Ghaddab
6279943831c1 settings: zms: recover linked list if broken Author Riadh Ghaddab
5a978f4ab4e7 settings: zms: add more robustness to the save function Author Riadh Ghaddab
dffdec18c2b3 tests: settings: add functional test for ZMS Author Riadh Ghaddab
a903b4b0d164 tests: settings: add a functional test for settings_load_one Author Riadh Ghaddab
831da04247c9 settings: add an API function to load only one settings entry Author Riadh Ghaddab
bf20b7854332 settings: zms: add cache for linked list hash Author Riadh Ghaddab
ae461510a766 settings: zms: load only subtree in the argument Author Riadh Ghaddab
5c38c58f0c25 zms: optimize cache for settings subsystem Author Riadh Ghaddab
42b9b5a9d79e zms: remove non needed lookup cache before writing Author Riadh Ghaddab
c0a75da08430 settings: zms: add option to disable updating linked list Author Riadh Ghaddab
2eba2e9c9c75 zms: add more robustiness in extreme cases Author Riadh Ghaddab
15cbe9fd18e2 zms: fix the detection of gc_done ATE Author Riadh Ghaddab
e8e7290abace tests: zms: decrease verbosity Author Riadh Ghaddab
db496c7a7617 drivers: ieee802154: cc13xx_cc26xx: Don’t filter beacon for OpenThread Author Alexandre Bailon
c1bce30fe591 drivers: ieee802154: cc13xx/26xx: Add support of 802.15.4 ED Scan Author Alexandre Bailon
f087aa264e91 kernel/pipe: fix poll support Author Nicolas Pitre
e29c0c178310 tests: poll: add pipe coverage Author Nicolas Pitre
11021cdd4fa9 kernel: sys_heap: decouple realloc from aligned_realloc Author Nicolas Pitre
457fa60bfc7b kernel: mempool: decouple simple alloc from aligned_alloc Author Nicolas Pitre
7c9f464b708f kernel: kheap: workaround for Percepio’s TraceRecorder kludge Author Nicolas Pitre
9da06456f208 kernel: kheap: decouple simple alloc from aligned_alloc Author Nicolas Pitre
31244724a283 kernel: k_aligned_alloc: simplify assertion Author Nicolas Pitre
ea7a96920426 tests: benchmarks: sys_kernel: add k_malloc() test Author Nicolas Pitre
023daf2331fa tests/lib/heap_align: improve test some more Author Nicolas Pitre
b5bc30701960 net: lwm2m: encapsulate ring buffer internals Author Nicolas Pitre
7fb92c9eb125 tests: lib: multi_heap: fix stack overflow Author Nicolas Pitre
c7467f0c65c6 ring_buffer: constify some arguments Author Nicolas Pitre
e1eead3925d5 ring_buffer: shrink size of struct ring_buf Author Nicolas Pitre
b97f11a752cb ring_buffer: simplify code some more Author Nicolas Pitre
fa73b8b06110 ring_buffer: update Kconfig help text Author Nicolas Pitre
Categories
Community Linux Kernel Open-source

BayLibre contributions to Linux v6.16

Linus released Linux 6.16 on July 27, 2025. BayLibre contributed to this release across several subsystems.

IIO (Industrial I/O)

ADC Infrastructure and Drivers

David Lechner implemented buffer safety improvements across the IIO subsystem through new macros IIO_DECLARE_BUFFER_WITH_TS and IIO_DECLARE_DMA_BUFFER_WITH_TS for proper timestamp alignment on 32-bit architectures.

For the AD7606 family, David added SPI offload support enabling high-speed sampling, fixed raw readings for 18-bit chips, and added missing max sample rates. Angelo Dureghello contributed register access protection and SPI offload functionality to the ad7606 driver.

David added the AD7380 series by adding AD7389-4 support, fixing adi,gain-milli property parsing, and moving internal reference voltage handling to chip_info structures.

Uwe Kleine-König fixed the 3db filter usage in the ad7124 driver.

DAC Drivers and Backend Support

Angelo Dureghello added the AD3552R-HS driver with debugfs register access and internal ramp support for debugging purposes. He also contributed to the AD3530R/AD3531R driver implementation for 16-bit buffered voltage output DACs.

Angelo added data source get support to the IIO backend infrastructure and AXI-DAC controller, improving integration with FPGA-based data acquisition systems.

PWM

Framework and Driver Improvements

Uwe Kleine-König added the PWM framework to handle hardware limitations that require rounding parameters up rather than down. The pwm_set_waveform_might_sleep() function was modified to return consistent values and handle exact but impossible requests.

Uwe Kleine-König added actual hardware state information to the PWM debugfs output, providing visibility into the difference between requested and actual hardware settings. Trevor Gamblin reviewed this work.

David Lechner and Trevor Gamblin fixed issues in the axi-pwmgen driver where missing separate external clock support was causing incorrect timing when ASYNC_CLK_EN=1. Devicetree bindings were updated to support dual clock configurations while maintaining backward compatibility.

As PWM subsystem maintainer, Uwe Kleine-König committed support for the Loongson PWM controller and NXP MC33XS2410 high-side switch. The RZ/G2L GPT PWM controller was also committed through his maintainer role to expand hardware support.

SPI Offload and Framework

David Lechner made performance improvements to the axi-spi-engine driver by optimizing bits-per-word handling for offload operations, removing unnecessary SYNC instructions from offload sequences, and preventing redundant mode configurations.

He added the SPI offload framework with trigger validation through match callback checking and removed unnecessary trigger operation checks.

The SPI framework gained a spi_bpw_to_bytes() helper function for converting bits-per-word to bytes with proper power-of-two alignment.

VT/Console Subsystem

Unicode Processing Enhancements

Nicolas Pitre implemented Unicode support by moving Unicode processing to a separate file and creating Python generators for UCS width, fallback, and recomposition tables. The implementation handles zero-width and double-width Unicode code points.

Unicode recomposition support was added for glyph correspondence, with fallback mechanisms when characters are unavailable in the console font.

Console API Improvements

Nicolas Pitre added the VT_GETCONSIZECSRPOS ioctl to retrieve console size and cursor position without the 255-character limitation that exists with legacy interfaces. This addresses limitations with high-resolution displays.

Bracketed paste support was implemented with detection and insertion of bracketed paste markers. The TIOCL_GETBRACKETEDPASTE interface allows user space daemons to determine when to insert bracketed paste markers around copied content.

RTC

Alexandre Mergnat fixed date handling issues in the RTC subsystem. The rtc-mt6397 driver received offset calculation fixes for negative start_secs values. The rtc_time64_to_tm() function was extended to support dates before 1970, addressing limitations in hardware with restricted date ranges. This is required for the mt6357 to work with dates after 2027.

For this new support of dates before 1970 testing infrastructure was added with modified coverage for time and weekday calculations, support for testing dates from 1900, and test output formatting.

MT6357 PMIC RTC support was added as a compatible variant of the MT6358 implementation.

Clock Infrastructure

As Amlogic clock subsystem maintainer, Jerome Brunet committed a fix (authored by Da Xue) for SPI clock configuration issues in the Meson G12A SoC by adding the missing fclk_div2 to SPICC clock sources. This resolved incorrect clock rates that were running at 2.5x the expected frequency when certain clock indices were selected.

Jerome also committed changes to disable compile testing defaults for Meson clocks to prevent unnecessary build overhead.

ARM/OMAP Platform Support

Sukrut Bellary resolved STANDBY mode issues in OMAP2+ power management. The l4ls clock domain was prevented from sleeping during STANDBY to avoid CM3 PM firmware wake-up failures. STANDBY handling of the PER power domain was also corrected.

Sukrut Bellary authored devicetree improvements including setting wakeup-source for UART0 on AM335x. As ARM/OMAP subsystem maintainer, Kevin Hilman committed these patches and other OMAP-related changes including fixes for Bluetooth and Wi-Fi resource configuration on OMAP4 Panda boards.

Driver Core and Infrastructure

Jerome Brunet added the auxiliary bus infrastructure with device creation helper functions and fixed IS_ERR() vs NULL handling in __devm_auxiliary_device_create().

For PCI endpoint support, Jerome added fixed-size BAR retention alongside aligned size in the endpoint framework, simplified ctrl SPAD space allocation in pci-epf-vntb, and set ep BAR4 fixed size for rcar-gen4.

Display and Media

MediaTek HDMI driver modernization was contributed by AngeloGioacchino Del Regno, converting mtk_cec, mtk_hdmi, and mtk_hdmi_ddc drivers to the module_platform_driver architecture. Alexandre Mergnat reviewed this work.

Guillaume Ranquet migrated the MediaTek HDMI driver from direct iomem access to regmap for register management and prepared the foundation for supporting new HDMI IP versions.

Summary

Type Count
Authored 151
Signed-off-by 3
Acked-by 3
Reviewed-by 120
Tested-by 1
Suggested-by 2

List of contributions

Hash Subject Role Person
505b730ede7f pwm: mediatek: Ensure to disable clocks in error path Author Uwe Kleine-König
9ee124caae1b pwm: Fix invalid state detection Author Uwe Kleine-König
a8841dc3dfbf pwm: axi-pwmgen: fix missing separate external clock Committer Uwe Kleine-König
e683131e64f7 dt-bindings: pwm: adi,axi-pwmgen: Fix clocks Committer Uwe Kleine-König
ccb2dba3c19f rtc: test: Test date conversion for dates starting in 1900 Author Uwe Kleine-König
da62b49830f8 rtc: test: Also test time and wday outcome of rtc_time64_to_tm() Author Uwe Kleine-König
46351921cbe1 rtc: test: Emit the seconds-since-1970 value instead of days-since-1970 Author Uwe Kleine-König
fe9f5f96cfe8 rtc: Fix offset calculation for .start_secs < 0 reviewed-by Uwe Kleine-König
7df4cfef8b35 rtc: Make rtc_time64_to_tm() support dates before 1970 reviewed-by Uwe Kleine-König
c0c980f237e8 dt-bindings: timer: renesas,tpu: remove binding documentation Committer Uwe Kleine-König
9c5e285f602f pwm: adp5585: make sure to include mod_devicetable.h Committer Uwe Kleine-König
25ac4834cae9 pwm: Tidyup PWM menu for Renesas Committer Uwe Kleine-König
84e351d8a575 pwm: Restore alphabetic ordering in Kconfig and Makefile Author Uwe Kleine-König
d041b76ac9fb pwm: Formally describe the procedure used to pick a hardware waveform setting Author Uwe Kleine-König
164c4ac754ab pwm: Let pwm_set_waveform_might_sleep() return 0 instead of 1 after rounding up Author Uwe Kleine-König
e866834c8baa pwm: Let pwm_set_waveform_might_sleep() fail for exact but impossible requests Author Uwe Kleine-König
5d6c7d34a82f MAINTAINERS: Generalize ARM/RISC-V/RENESAS ARCHITECTURE Author Uwe Kleine-König
2006016ec6b3 pwm: add support for NXPs high-side switch MC33XS2410 Committer Uwe Kleine-König
8b872a912aa1 dt-bindings: pwm: add support for MC33XS2410 Committer Uwe Kleine-König
e373991eb9ff pwm: rzg2l-gpt: Accept requests for too high period length Author Uwe Kleine-König
b6b5683e9692 dt-bindings: pwm: vt8500-pwm: Convert to YAML Committer Uwe Kleine-König
769aa27801d2 dt-bindings: pwm: mediatek,pwm-disp: Add compatible for MT6893 Committer Uwe Kleine-König
7f8ce4d88b42 pwm: Fix various formatting issues in kernel-doc Author Uwe Kleine-König
7df3a6eb5c39 iio: adc: ad7124: Make register naming consistent Author Uwe Kleine-König
7dd17a4e9873 iio: adc: ad7124: Remove ability to write filter_low_pass_3db_frequency Author Uwe Kleine-König
8712e4986e7c iio: adc: ad7124: Fix 3dB filter frequency reading Author Uwe Kleine-König
061f087f5d0b pwm: Add support for RZ/G2L GPT Committer Uwe Kleine-König
9549d22684f1 dt-bindings: pwm: Add RZ/G2L GPT binding Committer Uwe Kleine-König
e463b05d10da pwm: Better document return value of pwm_round_waveform_might_sleep() Author Uwe Kleine-König
bd897149e40c pwm: loongson: Fix an error code in probe() Committer Uwe Kleine-König
dcb882bd436e pwm: loongson: Fix u32 overflow in waveform calculation Author Uwe Kleine-König
29f1d5cac294 pwm: pca9685: Use new GPIO line value setter callbacks Committer Uwe Kleine-König
96d20cfd16e7 pwm: Do stricter return value checking for .round_waveform_tohw() Author Uwe Kleine-König
fa829c1f40b7 pwm: stm32: Emit debug output also for corner cases of the rounding callbacks Author Uwe Kleine-König
4cbeffc40798 pwm: stm32: Don’t open-code TIM_CCER_CCxE() Author Uwe Kleine-König
461d68d43d69 pwm: Add actual hardware state to pwm debugfs file Author Uwe Kleine-König
7cfe1e208b86 pwm: Make chip parameter to pwmchip_get_drvdata() a const pointer Author Uwe Kleine-König
df08fff8add2 pwm: pxa: Improve using dev_err_probe() Author Uwe Kleine-König
2b62c89448dd pwm: Add Loongson PWM controller support Committer Uwe Kleine-König
90cd430f04d0 dt-bindings: pwm: Add Loongson PWM controller Committer Uwe Kleine-König
08d8c9f593c7 pwm: meson: Simplify meson_pwm_cnt_to_ns() Committer Uwe Kleine-König
5dca8a93b015 pwm: meson: Enable constant and polarity features for g12, axg, s4 Committer Uwe Kleine-König
3a44aacf1560 pwm: meson: Use separate device id data for axg and g12 Committer Uwe Kleine-König
dd4d280ac558 pwm: meson: Support constant and polarity bits Committer Uwe Kleine-König
8c22e890402a pwm: meson: Simplify get_state() callback Committer Uwe Kleine-König
144616a80889 ARM: dts: socfpga: Add basic support for Terrasic’s de10-nano Author Uwe Kleine-König
9e8a6b190256 dt-bindings: altera: Add compatible for Terasic’s DE10-nano Author Uwe Kleine-König
1131e70558bc iio: dac: ad3530r: Fix incorrect masking for channels 4-7 in powerdown mode reviewed-by David Lechner
24fa69894ea3 iio: adc: ad7380: fix adi,gain-milli property parsing Author David Lechner
7b8648263278 iio: adc: ad7949: use spi_is_bpw_supported() Author David Lechner
6ac609d1fba1 iio: adc: adi-axi-adc: fix ad7606_bus_reg_read() Author David Lechner
a8841dc3dfbf pwm: axi-pwmgen: fix missing separate external clock Author David Lechner
e683131e64f7 dt-bindings: pwm: adi,axi-pwmgen: Fix clocks Author David Lechner
018f50909e66 iio: bmp280: zero-init buffer Author David Lechner
27737b840758 HID: sensor-hub: Fix typo and improve documentation reviewed-by David Lechner
6cdb4009c201 iio: admv1013: replace redundant ternary operator with just len reviewed-by David Lechner
805bbd3ac96d iio: chemical: mhz19b: Fix error code in probe() reviewed-by David Lechner
04c129077689 iio: adc: at91-sama5d2: use IIO_DECLARE_BUFFER_WITH_TS Author David Lechner
edeb67fbbf4b iio: accel: sca3300: use IIO_DECLARE_BUFFER_WITH_TS Author David Lechner
6d06978f918d iio: adc: ad7380: use IIO_DECLARE_DMA_BUFFER_WITH_TS Author David Lechner
76a67e394d11 iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS Author David Lechner
51924ff5ab16 iio: adc: ad4695: use IIO_DECLARE_DMA_BUFFER_WITH_TS Author David Lechner
63fc53526d30 iio: introduce IIO_DECLARE_BUFFER_WITH_TS macros Author David Lechner
fa19c303254b iio: make IIO_DMA_MINALIGN minimum of 8 bytes Author David Lechner
666eae6c6dab iio: pressure: zpa2326_spi: remove bits_per_word = 8 Author David Lechner
5b6bfe1354be iio: pressure: ms5611_spi: remove bits_per_word = 8 Author David Lechner
10918e71ac93 iio: pressure: bmp280-spi: remove bits_per_word = 8 Author David Lechner
3108b5e0bc4f iio: magnetometer: rm3100-spi: remove bits_per_word = 8 Author David Lechner
c48919febc15 iio: magnetometer: hmc5843_spi: remove bits_per_word = 8 Author David Lechner
6a1ebdb8a352 iio: imu: adis: remove bits_per_word = 8 Author David Lechner
3de7492148c7 iio: gyro: adxrs450: remove bits_per_word = 8 Author David Lechner
bfc50ab35a22 iio: dac: ltc2688: remove bits_per_word = 8 Author David Lechner
3cdd2953b367 iio: dac: ad5791: remove bits_per_word = 8 Author David Lechner
57e382e67ca3 iio: dac: ad5766: remove bits_per_word = 8 Author David Lechner
f92bb6b71b04 iio: dac: ad5761: remove bits_per_word = 8 Author David Lechner
2fa33f8710f7 iio: chemical: bme680_spi: remove bits_per_word = 8 Author David Lechner
0115e17e9fde iio: adc: ti-tsc2046: remove bits_per_word = 8 Author David Lechner
02b70dfe2f61 iio: adc: ad4030: remove bits_per_word = 8 Author David Lechner
157517b5e88d iio: ti-adc128s052: Drop variable vref reviewed-by David Lechner
ce45446e520c iio: adc: ad4000: Avoid potential double data word read suggested-by reviewed-by David Lechner
15c82338b364 iio: adc: ad4695: use u16 for buffer elements Author David Lechner
93583174a3df iio: dac: ad3530r: Add driver for AD3530R and AD3531R reviewed-by David Lechner
6856e3617158 dt-bindings: iio: dac: Add adi,ad3530r.yaml reviewed-by David Lechner
0cec113181c5 iio: ABI: add new DAC powerdown mode reviewed-by David Lechner
7e00d74eacf7 HID: sensor-hub: Fix typo and improve documentation for sensor_hub_remove_callback() reviewed-by David Lechner
413e1d6a95fc iio: adc: ad7606: explicit timestamp alignment Author David Lechner
017294e5a68a iio: adc: ad7606_spi: add offload scan mask check Author David Lechner
872c8014e05e iio: pressure: bmp280: drop sensor_data array Author David Lechner
52c43d80fa83 iio: adc: PAC1934: fix typo in documentation link reviewed-by David Lechner
dadf2477e3d6 iio: adc: stm32: add oversampling support reviewed-by David Lechner
b31a74075cb4 iio: orientation: hid-sensor-rotation: remove unnecessary alignment Author David Lechner
6b7c0e9ddacc iio: adc: hx711: use struct with aligned_s64 timestamp Author David Lechner
8f2d5147dd58 iio: addac: ad74413r: use aligned_s64 for timestamp Author David Lechner
c88ec0d8ad8f iio: adc: mt6360-adc: use aligned_s64 for timestamp Author David Lechner
f4cd499970cc iio: magnetometer: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
77e8a16a7d82 iio: pressure: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
886a446b76af iio: pressure: zpa2326: Use aligned_s64 for the timestamp reviewed-by David Lechner
fc11c42dd137 iio: proximity: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
175c3f72154e iio: proximity: irsd200: Use a struct for scan and iio_push_to_buffers_with_ts() reviewed-by David Lechner
85eb82b3c2a4 iio: resolver: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
1a715f5a4726 iio: temperature: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
cb4691913d9e iio: chemical: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
838a65c1d650 iio: accel: hid: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
edfafbd82f1d iio: accel: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
c65d3f3f9386 iio: adc: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. reviewed-by David Lechner
4d15307225ff iio: adc: ti-ads131e08: Use new iio_push_to_buffers_with_ts() to provide length sanity check. reviewed-by David Lechner
2d1168263bcb iio: dummy: Switch to iio_push_to_buffers_with_ts() and provide size of storage reviewed-by David Lechner
fda643a9530c iio: dummy: Use a fixed structure to build up scan to push to buffers. reviewed-by David Lechner
8f08055bc67a iio: introduced iio_push_to_buffers_with_ts() that takes a data_total_len argument. reviewed-by David Lechner
7cdfbc0113d0 iio: adc: ad7944: mask high bits on direct read Author David Lechner
89944d88f879 iio: adc: ad7606_spi: fix reg write value mask Author David Lechner
3f5fd1717ae9 iio: adc: ad7606: fix raw read for 18-bit chips Author David Lechner
c553aa1b0371 iio: adc: ad7173: fix compiling without gpiolib Author David Lechner
e6702c44c2ad spi: axi-spi-engine: omit SYNC from offload instructions Author David Lechner
087591c9e4fd spi: axi-spi-engine: optimize bits_per_word for offload Author David Lechner
8fc13b822c74 spi: axi-spi-engine: don’t repeat mode config for offload Author David Lechner
1d0ee0c9df31 spi: axi-spi-engine: wait for completion in setup Author David Lechner
70788d26ae1c iio: normalize array sentinel style Author David Lechner
ef24ea86eff5 iio: adc: ad7768-1: Move buffer allocation to a separate function reviewed-by David Lechner
1fa0f4ea5660 iio: adc: ad7768-1: Add reset gpio reviewed-by David Lechner
3f4bc0b11684 iio: adc: ad7768-1: convert driver to use regmap reviewed-by David Lechner
e96d35faf357 iio: adc: ad7606: add SPI offload support reviewed-by David Lechner
89e1f95a61e5 doc: iio: ad7606: describe offload support reviewed-by David Lechner
81fe5529e812 dt-bindings: iio: adc: adi,ad7606: add SPI offload properties reviewed-by David Lechner
81a481f62564 Documentation: iio: ad7380: add AD7389-4 Author David Lechner
98a002674856 iio: adc: ad7380: add ad7389-4 Author David Lechner
d63a749bf75a iio: adc: ad7380: move internal reference voltage to chip_info Author David Lechner
abb97cc0ff56 iio: adc: ad7380: rename internal_ref_only Author David Lechner
ebe0b2a86a9e dt-bindings: iio: adc: ad7380: add AD7389-4 Author David Lechner
5d1dff5b45b7 iio: Adjust internals of handling of direct mode claiming to suit new API. reviewed-by David Lechner
692760702f80 staging: iio: ad5933: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
e2729d5e04b9 iio: temp: maxim_thermocouple: Drop unused mutex.h include. reviewed-by David Lechner
333248709901 iio: temp: maxim_thermocouple: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
0ed4424478d3 iio: proximity: sx9500: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
3e3f57659b3d iio: proximity: pulsed-light: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
9dc7ed3bfe43 iio: proximity: hx9023s: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
66024cb953d2 iio: pressure: zpa2326: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
71a998e791d8 iio: pressure: rohm-bm1390: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
1bfa7698bc9f iio: pressure: ms5611: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
d2de91b3eded iio: pressure: mpl3115: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
770ee1a2c5d9 iio: pressure: mpl3115: factor out core of IIO_INFO_RAW read to simplify code flow reviewed-by David Lechner
b2a3a51000a7 iio: pressure: icp10100: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
74fc7aacda0f iio: pressure: dlhl60d: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
e0a4d6a93eb1 iio: magnetometer: rm3100: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
587895606e11 iio: magnetometer: mag3110: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
b5228482ebb9 iio: magnetometer: mag3110: Factor out core of read/write_raw() and use guard() to simplify code flow. reviewed-by David Lechner
0daeba3edabf iio: imu: st_lsm6dsx: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
a332a90eacd1 iio: imu: st_lsm6dsx: Switch to sparse friendly claim/release_direct() reviewed-by David Lechner
ee56bbcaad71 iio: imu: st_lsm6dsx: Factor out parts of st_lsm6dsx_shub_write_raw() to allow direct returns reviewed-by David Lechner
59d3109aabf1 iio: imu: smi240: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
4455bc5c303b iio: imu: inv_mpu6050: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
cbff19a382bb iio: imu: inv_icm42600: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
ca75b9fb28d6 iio: humidity: hts211: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
db532a4114c7 iio: humidity: hts211: Factor out everything under direct mode claim into helper functions. reviewed-by David Lechner
35a34861ce8f iio: humidity: hdc2010: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
0d51e888e030 iio: humidity: hdc100x: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
d9e6b59e5ba9 iio: humidity: hdc100x: Use guard(mutex) to simplify code flow reviewed-by David Lechner
6c9dc1e8f296 iio: health: max30102: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
fcc065fdf52f iio: gyro: adxrs290: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
f664ab98b238 iio: common: st_sensors: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
0ceb75d0afae iio: common: scmi: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
ba22e78635f9 iio: chemical: scd4x: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
3976dc832340 iio: chemical: atlas-sensor: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
e9786c540804 iio: chemical: ccs811: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
fef6da136ef2 iio: chemical: ccs811: Factor out handling of read of IIO_INFO_RAW to simplify error paths. reviewed-by David Lechner
36ee4794dd79 iio: addac: ad74115: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
8c411d4b9655 Documentation: iio: ad4000: Describe offload support reviewed-by David Lechner
d66b2c84fb67 Documentation: iio: ad4000: Add IIO Device characteristics section reviewed-by David Lechner
66ac23150833 Documentation: iio: ad4000: Add new supported parts reviewed-by David Lechner
ff2e2a5c524f iio: adc: ad7944: drop bits_per_word hack Author David Lechner
cac2bc675bcf iio: light: vcnl4035: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
8d7c205ff9ff iio: light: vcnl4000: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
abce31c33db6 iio: light: tcs3472: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
65a6ce5aeb82 iio: light: tcs3414: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
565e9c17e4dc iio: light: st_uvis25: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
43622f88b06d iio: light: si1145: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
e0dc0feb991b iio: light: rpr0521: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
9c97c7d2a901 iio: light: rpr0521: Factor out handling of IIO_INFO_RAW and use guard() reviewed-by David Lechner
e08acc4c82a3 iio: light: rohm-bu27034: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
7e8c0ec196e7 iio: light: opt4060: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
2983ad971d02 iio: light: ltr501: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
5a7387f208e5 iio: light: ltr501: Factor out core of write_raw() where direct mode claim is held. reviewed-by David Lechner
05e50a1da592 iio: light: ltr501: Factor out IIO_INFO_RAW leg of read_raw() callback. reviewed-by David Lechner
6025d20bc3ed iio: light: as73211: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
8dd92667f0a5 iio: light: as73211: Use guard() and move mode switch into inner write_raw fucntion reviewed-by David Lechner
d793d614dc3f iio: light: isl29125: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
403443117b02 iio: light: gp2ap020a00f: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
354eedf0083f iio: light: apds9306: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
c86f8e8f9f56 iio: adc: rcar: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
e6d364b40862 iio: adc: mxs-lradc: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
ee4ef2cbf40e iio: adc: ti-ads1015: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
5655ba5ada99 iio: adc: ti-ads1015: Use guard(mutex) and factor out code for INFO_RAW reviewed-by David Lechner
3ba3800286bb iio: adc: ti-ads1100: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
d36adc77ee43 iio: adc: ti-ads1100: Use guard(mutex) to allow direct returns reviewed-by David Lechner
5fe8331928c6 iio: adc: vf610: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
16d92b70b261 iio: adc: vf610: Move claim of direct mode to caller of vf610_read_sample and use guard(mutex) reviewed-by David Lechner
dc0e07126ed4 iio: adc: ad7606_par: add ad7606c chips Author David Lechner
3b5b55ca9407 iio: adc: ad7606: dynamically allocate channel info Author David Lechner
c1f571c3ca17 iio: adc: ad7606: drop ch param from ad7606_scale_setup_cb_t Author David Lechner
f504e35293f3 iio: adc: ad7606: don’t use address field Author David Lechner
050cf84f0b2a iio: adc: ad7606: use kernel identifier name style Author David Lechner
450f44b71a2c iio: adc: ad7606: fix kernel-doc comments Author David Lechner
37fd5e6e0f33 iio: adc: ad7606: use devm_mutex_init() Author David Lechner
40fa5f535dd7 iio: adc: ad7606: add missing max sample rates Author David Lechner
4d71bf602181 iio: adc: ad7606_spi: check error in ad7606B_sw_mode_config() Author David Lechner
3c8fd200a731 iio: dac: ad3552r-hs: add debugfs reg access reviewed-by David Lechner
296e8d289bdd spi: offload: remove unnecessary check on trigger->ops reviewed-by David Lechner
fcab1637bb11 spi: offload: check for match callback when a trigger is being registered reviewed-by David Lechner
e30b7a75666b spi: dw: Use spi_bpw_to_bytes() helper reviewed-by David Lechner
163ddf1fea59 spi: Add spi_bpw_to_bytes() helper and use it reviewed-by David Lechner
78e6b545e558 ARM: davinci: remove support for da830 reviewed-by David Lechner
9415c8b5b9b7 iio: adc: ad4030: explain rearranging raw sample data Author David Lechner
15ffee89c7c6 iio: adc: ad4030: don’t store scan_type in state Author David Lechner
efaa981e679a iio: adc: ad4030: move setting mode to update_scan_mode Author David Lechner
dc78e71d7c15 iio: adc: ad4030: remove some duplicate code Author David Lechner
de67f28abe58 iio: adc: ad4030: check scan_type for error Author David Lechner
43d8c4a3a3c7 dt-bindings: iio: adc: adi,ad7606: fix dt_schema validation warning Author Angelo Dureghello
0b9c738f9c4d docs: iio: ad3552r: fix malformed table Author Angelo Dureghello
921fece3268c iio: dac: adi-axi-dac: fix bus read Author Angelo Dureghello
89944d88f879 iio: adc: ad7606_spi: fix reg write value mask reviewed-by Angelo Dureghello
b1c5d68ea66e iio: dac: ad3552r-hs: add support for internal ramp Author Angelo Dureghello
ca74d0eb06e0 iio: dac: adi-axi-dac: add data source get Author Angelo Dureghello
208632157642 iio: backend: add support for data source get Author Angelo Dureghello
ede84c455659 docs: iio: add documentation for ad3552r driver Author Angelo Dureghello
029035636de3 iio: dac: adi-axi-dac: add cntrl chan check Author Angelo Dureghello
e96d35faf357 iio: adc: ad7606: add SPI offload support Author Angelo Dureghello
89e1f95a61e5 doc: iio: ad7606: describe offload support Author Angelo Dureghello
81fe5529e812 dt-bindings: iio: adc: adi,ad7606: add SPI offload properties Author Angelo Dureghello
3c8fd200a731 iio: dac: ad3552r-hs: add debugfs reg access Author Angelo Dureghello
ff78538e07fa vt: add missing notification when switching back to text mode Author Nicolas Pitre
81cf4d7d2379 vt: add VT_GETCONSIZECSRPOS to retrieve console size and cursor position Author Nicolas Pitre
80fa7a033785 vt: bracketed paste support Author Nicolas Pitre
c4c7ead7b86c vt: remove VT_RESIZE and VT_RESIZEX from vt_compat_ioctl() Author Nicolas Pitre
63f0d28dcabe vt: process the full-width ASCII fallback range programmatically Author Nicolas Pitre
6802f3591fdc vt: make use of ucs_get_fallback() when glyph is unavailable Author Nicolas Pitre
fe26933cf1e1 vt: add ucs_get_fallback() Author Nicolas Pitre
de45d93f00e2 vt: create ucs_fallback_table.h_shipped with gen_ucs_fallback_table.py Author Nicolas Pitre
5071ddc18e17 vt: introduce gen_ucs_fallback_table.py to create ucs_fallback_table.h Author Nicolas Pitre
bb9a15167652 vt: move glyph determination to a separate function Author Nicolas Pitre
68e7a421ab4f vt: make sure displayed double-width characters are remembered as such Author Nicolas Pitre
a16014c0db3a vt: ucs.c: fix misappropriate in_range() usage Author Nicolas Pitre
5ee558c5d9e9 vt: add new dynamically generated files to .gitignore reviewed-by Nicolas Pitre
c2d2c5c0d631 vt: move UCS tables to the “shipped” form Author Nicolas Pitre
d8f81c82b13f vt: refresh ucs_width_table.h and adjust code in ucs.c accordingly Author Nicolas Pitre
ad934777f0f1 vt: update gen_ucs_width_table.py to make tables more space efficient Author Nicolas Pitre
ffae2340a6af vt: remove zero-width-space handling from conv_uni_to_pc() Author Nicolas Pitre
5617aeb14a43 vt: pad double-width code points with a zero-width space Author Nicolas Pitre
b5c574995d84 vt: support Unicode recomposition Author Nicolas Pitre
9bd738409357 vt: create ucs_recompose_table.h with gen_ucs_recompose_table.py Author Nicolas Pitre
03c6de017b2a vt: introduce gen_ucs_recompose_table.py to create ucs_recompose_table.h Author Nicolas Pitre
54cda9201c67 vt: use new tables in ucs.c Author Nicolas Pitre
05ea6d71aa7a vt: create ucs_width_table.h with gen_ucs_width_table.py Author Nicolas Pitre
b11a041179e7 vt: introduce gen_ucs_width_table.py to create ucs_width_table.h Author Nicolas Pitre
95b05de0a566 vt: properly support zero-width Unicode code points Author Nicolas Pitre
07bc3f442f47 vt: move unicode processing to a separate file Author Nicolas Pitre
d066989a3d41 vt: minor cleanup to vc_translate_unicode() Author Nicolas Pitre
8bfabff0bfff vt: fix comment vs definition mismatch Author Nicolas Pitre
b35f7a773cbc vt: remove zero-white-space handling from conv_uni_to_pc() Author Nicolas Pitre
547f57b88d5f vt: pad double-width code points with a zero-white-space Author Nicolas Pitre
c7cb5b0779d7 vt: update ucs_width.c following latest gen_ucs_width.py Author Nicolas Pitre
119ff0b0f454 vt: update gen_ucs_width.py to produce more space efficient tables Author Nicolas Pitre
cd6937d42bca vt: support Unicode recomposition Author Nicolas Pitre
54af55b990ed vt: create ucs_recompose.c using gen_ucs_recompose.py Author Nicolas Pitre
f2347b0cdf65 vt: introduce gen_ucs_recompose.py to create ucs_recompose.c Author Nicolas Pitre
3a1ab63aa05b vt: update ucs_width.c using gen_ucs_width.py Author Nicolas Pitre
26c94eb4842a vt: introduce gen_ucs_width.py to create ucs_width.c Author Nicolas Pitre
e88391f730e4 vt: properly support zero-width Unicode code points Author Nicolas Pitre
2acaf27cd7f4 vt: move unicode processing to a separate file Author Nicolas Pitre
74045f6658f1 vt: minor cleanup to vc_translate_unicode() Author Nicolas Pitre
a8841dc3dfbf pwm: axi-pwmgen: fix missing separate external clock reviewed-by Trevor Gamblin
76a67e394d11 iio: adc: ad4695: rename AD4695_MAX_VIN_CHANNELS reviewed-by Trevor Gamblin
51924ff5ab16 iio: adc: ad4695: use IIO_DECLARE_DMA_BUFFER_WITH_TS reviewed-by Trevor Gamblin
15c82338b364 iio: adc: ad4695: use u16 for buffer elements reviewed-by Trevor Gamblin
461d68d43d69 pwm: Add actual hardware state to pwm debugfs file reviewed-by Trevor Gamblin
3d8b44b104fb rtc: mt6359: Add mt6357 support Author Alexandre Mergnat
fe9f5f96cfe8 rtc: Fix offset calculation for .start_secs < 0 Author Alexandre Mergnat
7df4cfef8b35 rtc: Make rtc_time64_to_tm() support dates before 1970 Author Alexandre Mergnat
957cac22a82d drm/mediatek: mtk_hdmi: Convert to module_platform_driver macro reviewed-by Alexandre Mergnat
c241118b6216 drm/mediatek: mtk_hdmi_ddc: Switch to register as module_platform_driver reviewed-by Alexandre Mergnat
1e914a89ab7e drm/mediatek: mtk_cec: Switch to register as module_platform_driver reviewed-by Alexandre Mergnat
e5327a655636 PCI: endpoint: pci-epf-vntb: Simplify ctrl/SPAD space allocation Author Jerome Brunet
793908d60b87 PCI: endpoint: Retain fixed-size BAR size as well as aligned size Author Jerome Brunet
0afce85ed26c clk: meson: Do not enable by default during compile testing Committer Jerome Brunet
daf004f87c35 clk: meson-g12a: add missing fclk_div2 to spicc Committer Jerome Brunet
2806c6b8f3d1 driver core: auxiliary bus: Fix IS_ERR() vs NULL mixup in __devm_auxiliary_device_create() reviewed-by Jerome Brunet
b584ab12d59f PCI: rcar-gen4: set ep BAR4 fixed size Author Jerome Brunet
eaa0d30216c1 driver core: auxiliary bus: add device creation helpers Author Jerome Brunet
36795548dcc8 pmdomain: ti: Fix STANDBY handling of PER power domain Author Sukrut Bellary
550e5608c25e ARM: dts: am335x: Set wakeup-source for UART0 Author Sukrut Bellary
47fe74098f3d ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY Author Sukrut Bellary
36795548dcc8 pmdomain: ti: Fix STANDBY handling of PER power domain reviewed-by Kevin Hilman
550e5608c25e ARM: dts: am335x: Set wakeup-source for UART0 Committer Kevin Hilman
47fe74098f3d ARM: OMAP2+: Fix l4ls clk domain handling in STANDBY Committer Kevin Hilman
a2db9bbcf64a ARM: dts: omap4: panda: cleanup bluetooth Committer Kevin Hilman
1132bb4df237 ARM: dts: omap4: panda: fix resources needed for Wifi Committer Kevin Hilman
7d25c4e23763 bus: ti-sysc: PRUSS OCP configuration Committer Kevin Hilman
78e6b545e558 ARM: davinci: remove support for da830 reviewed-by Kevin Hilman
7397daf1029d ARM: omap: pmic-cpcap: do not mess around without CPCAP or OMAP4 Committer Kevin Hilman
614665105d12 ARM: dts: nokia n900: remove useless io-channel-cells property Committer Kevin Hilman
ce424c3051de ARM: omap2plus_defconfig: enable I2C devices of GTA04 Committer Kevin Hilman
36305857b1ea Revert “bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first” Committer Kevin Hilman
d6e25b3590a0 drm/mediatek: hdmi: Use regmap instead of iomem for main registers Author Guillaume Ranquet
Categories
GCC Open-source Toolchain Uncategorized

BayLibre is Powering Supercomputers with GCC Enhancements

For the past couple of years, BayLibre’s Compiler team has been at the forefront of GCC enhancement, mandated by Oak Ridge National Laboratory to deliver advancements for GPU accelerator offloading. This work is vital for the world’s most powerful supercomputers, ensuring they achieve necessary computational capabilities within an affordable power envelope.

A Legacy of Open-Source Contribution

Composed of GNU toolchain maintainers and contributors, many of whom joined BayLibre in 2024 from CodeSourcery/Mentor/Siemens, the BayLibre Compiler Services Team has a proven track record. Their upstream contributions date back to the early 2000s, with current team members having committed over 3,000 patches to the GCC mainline repository since 2010, and more than 1,500 since 2019.

Beyond features development, the team regularly contributes bug fixes, cleanups, documentation, and code reviews for GCC code supporting accelerator programming languages (OpenMP and OpenACC), NVPTX and AMD GCN back ends, and more. In addition, the team actively participates in the OpenMP and OpenACC specification process.

Key Achievements in Accelerator Support

In 2020, the team began integrating missing OpenMP 4.5 features into GCC, supporting both AMD and Nvidia GPUs. Mandated by ORNL, significant milestones have been achieved in the following, including:

  • Adding OpenMP 5.0 / 5.1 / 5.2 support for AMD and Nvidia
  • Adding OpenACC 2.7 support for AMD and Nvidia
  • Adding GPU C++ Freestanding Standard Library for AMD and Nvidia
  • Adding OpenMP Interoperability Support for Nvidia’s CUDA, and AMD’s HIP and HSA
  • Taking the first steps in performance optimization

The Road Ahead: Performance and Portability

The team is now preparing for the next phase of this work. This involves porting compiler support to the latest versions of base languages (C, C++, Fortran) and upgrading to the newest OpenMP and OpenACC specifications. Another key focus will be defining a general methodology for performance improvement, including optimizing both GPU kernel launch times and code generation to make best use of GPU capabilities.

All the work completed and ongoing by the BayLibre Compiler Services Team, being open-source solutions, offers benefits to supercomputer users worldwide. By facilitating the portability of user code between systems with and without accelerators, they are participating in shaping the future of high-performance computing.

BayLibre’s development work to improve this well-known tool (GCC) has the potential to benefit the whole HPC community,” said David Bernholdt, distinguished R&D staff member at Oak Ridge National Laboratory.

We are excited about the continued impact of these contributions on the supercomputing landscape!

Categories
GCC Open-source Toolchain Uncategorized

BayLibre contributions to GCC 15

The GNU Compiler Collection project made its major annual release on April 25, 2025, with the publication of GCC 15.1.  BayLibre’s Compiler & Toolchain Services team — the “Sourcerers” — were major contributors to this release, with 395 commits by team members.  Three Sourcerers (Thomas Schwinge, Tobias Burnus, and Sandra Loosemore) were in the top 25 contributors by number of commits for this release cycle (GCC 15 release notes).

OpenMP and Offloading

BayLibre’s contributions to GCC 15 are primarily focused on OpenMP and GPU offloading.  OpenMP permits thread-parallel execution and offloading of program parts to GPUs via directive-based language extensions and the run-time library.  It is widely used in scientific programs, ranging from laptops to large supercomputers.

Specific improvements in this area that were contributed by BayLibre engineers for the GCC 15 release include:

  • Support for the “unified_shared_memory” and “self_maps” requirements, when supported by the hardware.
  • Additional features on Nvidia GPUs, including support for GCC’s “constructor” and “destructor” attributes, stack unwinding, and basic Fortran output.
  • Update the list of supported AMD GPUs, including removing support for the obsolete gfx803 “Fiji” target and adding initial support for generic offload targets.
  • Improve vectorizer tuning for AMD offload targets.
  • Add a predefined allocator for pinned memory.
  • Support for constructors and destructors for “declare target” static aggregates.
  • Support for mapping of Fortran objects with allocatable components.
  • Implement the “metadirective” directive, and support for dynamic context selectors in both “metadirective” and “declare variant”.
  • Implement the OpenMP “dispatch” directive and the “adjust_args” clause for “declare variant”, including the “need_device_addr” and “need_device_ptr” modifiers.
  • Implement the “interop” construct and the “interop” modifier to the “declare variant” “append_args” clause.
  • Support for using the standard C++ library in offloaded code on both AMD and Nvidia targets.
  • Numerous bug fixes, internal code improvements, improved error   checking and diagnostic messages, additional test cases.

Documentation

A secondary focus for the Sourcerers in this release cycle was improving GCC’s user-facing documentation.  In addition to updates to the GNU Offloading and Multi Processing Runtime Library manual, many long-standing bugs in the main GCC user manual were fixed, obsolete material was removed, and there was a major reorganization of the section on GCC extensions to the C language family.  A number of fixes and improvements were also made to the GNU Fortran manual.

More about GCC 15

The GCC 15 release notes cover changes in this version of GCC beyond BayLibre’s contributions listed above.  Some items of particular note are that support for the ISO C23 standard is complete and this is now GCC’s default dialect; and the addition of an ISO-compliant COBOL front end.

About BayLibre’s Compiler & Toolchain Services Team

BayLibre’s Compiler Services team includes several former CodeSourcery engineers who joined Baylibre in early 2024, bringing more than 100 person-years of experience with compilers and related technologies such as linkers and debuggers.  Team members have produced complete open-source toolchains targeting everything from bare-metal embedded processors for consumer and automotive applications to the world’s most powerful supercomputers.  Previously at BayLibre, the team also contributed to GCC 14.

Categories
Community Linux Kernel MediaTek Open-source Texas Instruments

BayLibre contributions to Linux v6.15


Linux 6.15

Linus released Linux 6.15 on May 26, 2025. BayLibre contributed to this release across several subsystems.

IIO

Infrastructure

While reviewing the subsystem-wide conversion from iio_push_to_buffers_with_timestamp() to iio_push_to_buffers_with_ts(), David Lechner found and fixed a number of bugs related to 64-bit timestamps that could be incorrectly aligned on some 32-bit architectures.

Guillaume Ranquet introduced the FAULT event type to the IIO framework for reporting hardware error conditions such as open-wire detection in ADC drivers. The ad7173 driver received openwire detection for single conversions.

ADC Drivers

David Lechner fixed bugs in ADC drivers, including correcting event threshold scaling in the ad7380 driver and resolving a crash in SPI offload functionality where the driver attempted to use the SPI bus while offload was still enabled.

Angelo Dureghello implemented SPI offload support for the ad7380 driver, allowing sampling at 2 MSPS with single SDO line configurations. He also fixed register access issues in the ad7606 driver, correcting sequential register reads that failed due to improper chip select handling.

Julien Stephan added alert functionality to the ad7380 driver for out-of-range detection during conversions. Julien also enabled regmap caching to reduce SPI bus accesses and added support for the adaq4381-4 variant.

Uwe Kleine-König implemented system-level and internal calibration for the ad7124 sigma-delta ADC driver. The calibration framework allows users to trigger zero-scale and full-scale calibrations through sysfs interfaces, similar to the ad7173 implementation. Automatic internal calibration was added during probe time for all configured channels, with special handling for gain-1 measurements where full-scale calibration is not supported.

Esteban Blanc added support for the ad4030 family of ADCs, including the ad4030-24, ad4630-16, ad4630-24, ad4632-16, and ad4632-24 variants. The driver implementation provides averaging support and handles timing requirements of these converters.

Guillaume Stols implemented software mode configuration for the ad7606 driver with IIO backend operations. The refactoring moved common software functions into shared code paths, allowing register access through both SPI and parallel interfaces when using the adi-axi-adc backend.

Trevor Gamblin added oversampling functionality to the ad4695 driver, building on David Lechner’s SPI offload foundation. The implementation includes custom regmap bus callbacks to handle conversion mode transitions required for operation with FPGA-based data acquisition systems.

DAC Drivers

Axel Haslam added SPI offload support to the ad5791 DAC driver for waveform generation capabilities. The DAC can operate at maximum throughput when paired with FPGA-based streaming systems.

PWM

Uwe Kleine-König implemented improvements to waveform handling and driver robustness in the PWM framework. As the PWM subsystem maintainer, he enhanced the core framework to handle cases where hardware limitations require rounding up parameters rather than down, ensuring consistency between different API entry points. Work on the axi-pwmgen driver improved the rounding logic for ADC timing requirements.

Uwe also addressed precision issues in the STM32 PWM driver, fixing duty cycle calculations when period modifications are restricted due to shared hardware resources between channels. In the R-Car PWM driver, he resolved calculation problems including integer overflow on 32-bit architectures and precision loss from nested divisions by implementing 64-bit arithmetic operations.

As part of his maintainer duties, Uwe handled the PWM subsystem’s review and maintenance processes to ensure code quality and consistency across the framework.

Clock Infrastructure

Jerome Brunet addressed clock management issues in Amlogic SoCs. He fixed incorrect parent clock references in the G12B cluster A CPU clock configuration that were causing wrong hardware pointers to be used, potentially leading to system instability. Work on the G12A MMC peripheral clock corrected bit index errors that could have caused conflicts between Ethernet and MMC controllers.

Jerome also cleaned up legacy clock definitions by removing non-existent 32K clock references in the GXBB controller and correcting misplaced divider flags that had been placed in wrong register fields. These changes improved both code clarity and runtime reliability.

SPI Offload Infrastructure

David Lechner added a new SPI offloading framework that allows high-speed data acquisition without CPU intervention. The work includes the core offload APIs for TX/RX streaming, hardware trigger support through a PWM trigger driver, and integration with the axi-spi-engine for FPGA-based acceleration. This infrastructure supports sampling rates up to several MSPS by delegating data transfer operations to dedicated hardware, reducing system latency and CPU overhead.

David will be giving a talk describing this work in more detail at the Open Source Summit North America in June.

GPIO Infrastructure

David Lechner added the gpiod_multi_set_value_cansleep() helper function to the GPIO subsystem, which simplifies patterns where multiple GPIO lines need to be controlled simultaneously. This addition reduces code verbosity avoids the temptation to hard-code the number of descriptors in the array, which can lead to buggy code.

DRM and MediaTek Support

Alexandre Mergnat added DRM capabilities for the MT8365 SoC, including device tree binding examples with power domain configurations. This work enables graphics acceleration and display output on MediaTek MT8365-based systems. Alexandre also contributed to USB-C support for the MT8395 Genio-1200 evaluation kit, adding Type-C connector functionality with power delivery profiles and dual-role switching capabilities.

TI Platform Support

Markus Schneider-Pargmann added serial aliases to device tree configurations for the AM62A7 and AM62X development boards. These changes ensure consistent UART device naming across boot stages and runtime operation for reliable console access and automated testing infrastructure.

Guillaume La Roque set defaults for ARCH_K3 systems in the TI SCI firmware driver configuration, streamlining the kernel configuration process for TI’s newer SoC families and ensuring that required firmware communication capabilities are enabled.

Kernel Infrastructure

Uwe Kleine-König continued his work on module namespace usage and GPL compliance enforcement. He created framework for identifying GPL violations and established mechanisms for addressing licensing issues before they reach mainline. His work on header dependency cleanup in the LP3943 MFD driver removed unnecessary PWM namespace imports, reducing module loading overhead.

Additionally, Uwe maintained his focus on reducing error-prone patterns across the kernel by cleaning up unnecessary driver_data initializations and improving symbol namespace organization in subsystems including I2C, hardware monitoring, and DRM drivers.

Summary

Type Count
Authored 133
Co-developed-by 4
Signed-off-by 8
Acked-by 22
Reviewed-by 83
Tested-by 9
Suggested-by 3

List of contributions

Hash Subject Role Person
80fbee76ebbd mailmap: map Uwe’s BayLibre addresses to a single one Author Uwe Kleine-König
a85e08a05bf7 pwm: axi-pwmgen: Let .round_waveform_tohw() signal when request was rounded up Author Uwe Kleine-König
fda6e0034e9d pwm: stm32: Search an appropriate duty_cycle if period cannot be modified Author Uwe Kleine-König
00e53d0f4bae pwm: Let pwm_set_waveform() succeed even if lowlevel driver rounded up Author Uwe Kleine-König
928446a5302e pwm: fsl-ftm: Handle clk_get_rate() returning 0 Author Uwe Kleine-König
e7327c193014 pwm: rcar: Improve register calculation Author Uwe Kleine-König
7ca59947b5fc pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config() Committer Uwe Kleine-König
860e98066f5e mfd: lp3943: Drop #include <linux/pwm.h> from header Author Uwe Kleine-König
ecd5b508c10b iio: adc: ad7124: Benefit of dev = indio_dev->dev.parent in ad7124_parse_channel_config() Author Uwe Kleine-König
df1f2e1470fa iio: adc: ad7124: Implement system calibration Author Uwe Kleine-König
47036a03a303 iio: adc: ad7124: Implement internal calibration at probe time Author Uwe Kleine-König
780c9dbb160f iio: adc: ad_sigma_delta: Add error checking for ad_sigma_delta_set_channel() Author Uwe Kleine-König
7d33bdabf304 iio: adc: ad4130: Adapt internal names to match official filter_type ABI Author Uwe Kleine-König
7b6033ed5a9e iio: adc: ad7173: Fix comparison of channel configs Author Uwe Kleine-König
05a5d874f732 iio: adc: ad7124: Fix comparison of channel configs Author Uwe Kleine-König
280acb198246 iio: adc: ad4130: Fix comparison of channel setups Author Uwe Kleine-König
fb3a0811a7bc iio: adc: ad_sigma_delta: Disable channel after calibration Author Uwe Kleine-König
6df320abbb40 dt-bindings: pwm: imx: Add i.MX93, i.MX94 and i.MX95 support Committer Uwe Kleine-König
20f23ad37759 dt-bindings: pwm: rockchip: Add rockchip,rk3528-pwm Committer Uwe Kleine-König
08808b3ef384 iio: adc: ad7192: Grab direct mode for calibration Author Uwe Kleine-König
7021d97fb89b iio: adc: ad7173: Grab direct mode for calibration Author Uwe Kleine-König
a2b8191ab695 pwm: stmpe: Allow to compile as a module Author Uwe Kleine-König
4b31eb55dbc6 pwm: Check for CONFIG_PWM using IS_REACHABLE() in main header Author Uwe Kleine-König
058210e84b48 dt-bindings: pwm: rockchip: Add rockchip,rk3562-pwm Committer Uwe Kleine-König
ed531feda785 drm/bridge: ti-sn65dsi86: Check for CONFIG_PWM using IS_REACHABLE() Author Uwe Kleine-König
9dc016eaba3a ASoC: SOF: Intel: Don’t import non-existing module namespace Author Uwe Kleine-König
e8af7c083520 pwm: Strengthen dependency for PWM_SIFIVE Author Uwe Kleine-König
f2037a3ee9b4 pwm: clps711x: Drop of_match_ptr() usage for .of_match_table Author Uwe Kleine-König
b2693edd0963 pwm: pca9685: Drop ACPI_PTR() and of_match_ptr() Committer Uwe Kleine-König
e71e46a6f19c pwm: Add support for pwm nexus dt bindings Committer Uwe Kleine-König
963f117530e0 dt-bindings: pwm: Add support for PWM nexus node Committer Uwe Kleine-König
895fe4537cc8 pwm: Add upgrade path to #pwm-cells = <3> for users of of_pwm_single_xlate() Author Uwe Kleine-König
e903868b4ce7 iio: adc: ad7124: Really disable all channels at probe time Author Uwe Kleine-König
cf67879bd428 iio: adc: ad7124: Micro-optimize channel disabling Author Uwe Kleine-König
e320a24059f8 pwm: gpio: Switch to use hrtimer_setup() Committer Uwe Kleine-König
c98e66144b7d pwm: sophgo: add driver for Sophgo SG2042 PWM Committer Uwe Kleine-König
d893760cedbf dt-bindings: pwm: sophgo: add PWM controller for SG2042 Committer Uwe Kleine-König
444053e3c42a pwm: lpss: Only include <linux/pwm.h> where needed Author Uwe Kleine-König
112f5e0917cf pwm: lpss: Actually use a module namespace by defining the namespace earlier Author Uwe Kleine-König
c42a407beeb9 pinctrl: intel: Import PWM_LPSS namespace for devm_pwm_lpss_probe() Author Uwe Kleine-König
0713a1b3276b can: mcan: m_can_class_unregister(): fix order of unregistration calls reviewed-by Markus Schneider-Pargmann
037ada7a3181 can: rockchip_canfd: rkcanfd_remove(): fix order of unregistration calls reviewed-by Markus Schneider-Pargmann
dcaeeb8ae84c can: m_can: m_can_class_allocate_dev(): initialize spin lock on device probe reviewed-by Markus Schneider-Pargmann
5a74aef88218 arm64: dts: ti: k3-am62a7-sk: Add serial alias Author Markus Schneider-Pargmann
3e7f622685e8 arm64: dts: ti: k3-am62x-sk-common: Add serial aliases Author Markus Schneider-Pargmann
f083f8a21cc7 iio: adc: ad7606: fix serial register access Author Angelo Dureghello
82c51ac74071 iio: adc: ad7380: disable offload before using SPI bus reviewed-by Angelo Dureghello
8dbeb413806f doc: iio: ad7380: describe offload support Author Angelo Dureghello
bbeaec81a03e iio: ad7380: add support for SPI offload Author Angelo Dureghello
25331775b5b4 iio: dac: adi-axi-dac: add io_mode check Author Angelo Dureghello
0f65f59e632d iio: adc: ad7606: protect register access Author Angelo Dureghello
a4ab57debde2 iio: adc: adi-axi-adc: add platform children support Author Angelo Dureghello
c4330d081775 iio: adc: adi-axi-adc: add struct axi_adc_info Author Angelo Dureghello
1ec0d78dec8d iio: dac: ad3552r-hs: update function name (non functional) Author Angelo Dureghello
350d1ebfce82 iio: dac: ad3552r-hs: add ad3541/2r support Author Angelo Dureghello
67a0f04095e4 iio: dac: ad3552r: share model data structures Author Angelo Dureghello
21889245fb53 iio: dac: ad3552r-hs: use instruction mode for configuration Author Angelo Dureghello
96873eeaa795 iio: dac: ad3552r-hs: fix message on wrong chip id Author Angelo Dureghello
8ab67b37b81d iio: dac: adi-axi-dac: add bus mode setup Author Angelo Dureghello
6cc60bc38e84 iio: dac: adi-axi-dac: modify stream enable Author Angelo Dureghello
f083f8a21cc7 iio: adc: ad7606: fix serial register access reviewed-by David Lechner
ffcd19e9f4cc iio: pressure: mprls0025pa: use aligned_s64 for timestamp Author David Lechner
e4570f4bb231 iio: imu: adis16550: align buffers for timestamp Author David Lechner
52d349884738 iio: adc: ad7266: Fix potential timestamp alignment issue. reported-by reviewed-by David Lechner
ffbc26bc91c1 iio: adc: ad7768-1: Fix insufficient alignment of timestamp. reported-by reviewed-by David Lechner
5097eaae98e5 iio: adc: dln2: Use aligned_s64 for timestamp reported-by reviewed-by David Lechner
1bb942287e05 iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64 reported-by reviewed-by David Lechner
f79aeb6c631b iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer. reviewed-by David Lechner
6ffa69867405 iio: chemical: pms7003: use aligned_s64 for timestamp Author David Lechner
bb49d940344b iio: chemical: sps30: use aligned_s64 for timestamp Author David Lechner
1d2d8524eaff iio: imu: inv_mpu6050: align buffer for timestamp Author David Lechner
2d7b60f33da3 iio: adc: ad7380: fix event threshold shift Author David Lechner
5257d80e22bf iio: adc: ad7606: check for NULL before calling sw_mode_config() Author David Lechner
82c51ac74071 iio: adc: ad7380: disable offload before using SPI bus Author David Lechner
809d605d1380 iio: adc: ad7768-1: remove unnecessary locking reviewed-by David Lechner
8236644f5ecb iio: adc: ad7768-1: Fix conversion result sign reviewed-by David Lechner
9525c66de334 docs: iio: add AD7191 reviewed-by David Lechner
2e3ae10c3591 iio: adc: ad7191: add AD7191 reviewed-by David Lechner
f52b5daf3921 dt-bindings: iio: adc: add AD7191 reviewed-by David Lechner
aac287ec80d7 docs: iio: ad7380: add adaq4381-4 reviewed-by David Lechner
7131fcdba97f dt-bindings: iio: adc: ad7380: add adaq4381-4 compatible parts reviewed-by David Lechner
f66d625c4d48 iio: adc: ad7380: add adaq4381-4 support reviewed-by David Lechner
7867a0d1dd8c MAINTAINERS: remove adi,ad7606.yaml from SEPS525 Author David Lechner
9b4b9791dd51 Documentation: iio: Add ADC documentation reviewed-by David Lechner
38f898e0b54f iio: adc: ad4695: simplify getting oversampling_ratio Author David Lechner
cafeb8a99746 iio: adc: ad4695: fix out of bounds array access Author David Lechner
d477cda71a3a iio: adc: adi-axi-adc: replace of.h with mod_devicetable.h reviewed-by David Lechner
6d5dd486c715 iio: core: make use of simple_write_to_buffer() reviewed-by David Lechner
035b4989211d iio: backend: make sure to NULL terminate stack buffer reviewed-by David Lechner
3cb26cba4a60 iio: accel: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
18a53d40122d iio: accel: msa311: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
60a0cf2ebab9 iio: accel: msa311: Fix failure to release runtime pm if direct mode claim fails. reviewed-by David Lechner
6c21fc09c3e6 iio: accel: kx022a: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
305f655d059d iio: accel: kx022a: Factor out guts of write_raw() to allow direct returns reviewed-by David Lechner
9ab72adb9039 iio: accel: mma8452: Switch to sparse friendly iio_device_claim/release_direct() reviewed-by David Lechner
cce9172f3d40 iio: accel: mma8452: Factor out guts of write_raw() to simplify locking reviewed-by David Lechner
df330c808182 iio: accel: mma8452: Ensure error return on failure to matching oversampling ratio reviewed-by David Lechner
66e80e2f2176 iio: resolver: ad2s1210: use bitmap_write Author David Lechner
d1a09c610027 MAINTAINERS: adjust the file entry in SPI OFFLOAD reviewed-by David Lechner
d50a7908df16 phy: mapphone-mdm6600: use gpiod_multi_set_value_cansleep Author David Lechner
35d950a66f1f mux: gpio: use gpiod_multi_set_value_cansleep Author David Lechner
aac4be9341dd mmc: pwrseq_simple: use gpiod_multi_set_value_cansleep Author David Lechner
76ce6e6e5c49 iio: resolver: ad2s1210: use gpiod_multi_set_value_cansleep Author David Lechner
a927e72925c7 iio: amplifiers: hmc425a: use gpiod_multi_set_value_cansleep Author David Lechner
f23209e9758a iio: adc: ad7606: use gpiod_multi_set_value_cansleep Author David Lechner
4c571885898c iio: Drop iio_device_claim_direct_scoped() and related infrastructure reviewed-by David Lechner
668d7167fc78 iio: light: bh1745: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
0bee1bf85a9e iio: imu: bmi323: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
73dad3ec96ae iio: dummy: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
41a316c8e531 iio: dac: ad8460: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
798fa301e19f iio: dac: ad3552r-hs: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
5e802eed70b1 iio: chemical: ens160: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
e4c569742b60 iio: addac: ad74413r: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
69deb972f9aa iio: adc: ti-ads1119: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
dc100956600c iio: adc: ti-adc161s626: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
27ac40b6275d iio: adc: rtq6056: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
5fd89f430d9e iio: adc: max1363: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
7b22c000308a iio: adc: ad9467: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
82a0760c109f iio: adc: ad7779: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
48a24fd21d11 iio: adc: ad7625: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
8a1812d040c0 iio: adc: ad7606: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
20a57c2714a8 iio: adc: ad4695: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
b70fb3c1951e iio: adc: ad4130: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
e48c56d1503c iio: adc: ad4000: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
7c00c85a635b iio: accel: adxl367: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
7b7f7e6ee01b iio: proximity: sx9360: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
ec59a125ea25 iio: proximity: sx9324: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
f238f1efc2ae iio: proximity: sx9310: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
bcbd26d8662b iio: temperature: tmp006: Stop using iio_device_claim_direct_scoped() reviewed-by David Lechner
403f0f9b3609 iio: chemical: scd30: Switch to sparse friendly claim/release_direct() reviewed-by David Lechner
5feb5532870f iio: chemical: scd30: Use guard(mutex) to allow early returns reviewed-by suggested-by David Lechner
d795e38df4b7 iio: core: Rework claim and release of direct mode to work with sparse. reviewed-by David Lechner
fc9156c04566 iio: adc: adi-axi-adc: add interface type reviewed-by David Lechner
22894e0be908 iio: backend: add API for oversampling reviewed-by David Lechner
fc3fdb835eeb iio: backend: add support for data size set reviewed-by David Lechner
4018ab42636c iio: backend: add API for interface get reviewed-by David Lechner
e957c96455e8 spi: offload: fix use after free Author David Lechner
d795a052b0dd spi: fix missing offload_flags doc Author David Lechner
ad0fbcebb5f6 ASoC: adau1701: use gpiod_multi_set_value_cansleep Author David Lechner
d5808b5b17e8 auxdisplay: seg-led-gpio: use gpiod_multi_set_value_cansleep Author David Lechner
eb2e9c308d28 gpio: max3191x: use gpiod_multi_set_value_cansleep Author David Lechner
91931af18bd2 gpiolib: add gpiod_multi_set_value_cansleep() Author David Lechner
c91c294c722e iio: dac: ad5791: sort include directives Author David Lechner
5031c9df4af0 doc: iio: ad4695: add SPI offload support Author David Lechner
f09f140e3ea8 iio: adc: ad4695: Add support for SPI offload Author David Lechner
b7c1e069f546 dt-bindings: iio: adc: adi,ad4695: add SPI offload properties Author David Lechner
f06a9c36729b doc: iio: ad7944: describe offload support Author David Lechner
cbc986cda57a iio: adc: ad7944: add support for SPI offload Author David Lechner
ff4d4158ef91 spi: spi-offload-trigger-pwm: add extra headers Author David Lechner
fcd7ace9a725 spi: offload: types: include linux/bits.h Author David Lechner
503d20ed8cf7 iio: adc: ad7944: don’t use storagebits for sizing Author David Lechner
79f24971b4ff iio: buffer-dmaengine: add devm_iio_dmaengine_buffer_setup_with_handle() Author David Lechner
4fe7fd17fe66 iio: buffer-dmaengine: split requesting DMA channel from allocating buffer Author David Lechner
0c5d8af2a5fd iio: adc: ad4130: Add filter_type attributes reviewed-by suggested-by David Lechner
c7eb65a37671 Documentation: ABI: IIO: Re-add sysfs-bus-iio-adc-ad4130 reviewed-by David Lechner
fdaa9b763e36 Documentation: ABI: IIO: Add filter_type documentation reviewed-by David Lechner
7530ed2aaa3f iio: adc: ad7173: add openwire detection support for single conversions reviewed-by David Lechner
34934d799655 iio: introduce the FAULT event type reviewed-by David Lechner
3ea0944dca9b iio: dac: ad5791: fix storage Author David Lechner
1ec0d78dec8d iio: dac: ad3552r-hs: update function name (non functional) reviewed-by David Lechner
67a0f04095e4 iio: dac: ad3552r: share model data structures reviewed-by David Lechner
5a19e1985d01 spi: axi-spi-engine: implement offload support Author David Lechner
e1101373df5c spi: dt-bindings: axi-spi-engine: add SPI offload properties Author David Lechner
700a281905f2 spi: add offload TX/RX streaming APIs Author David Lechner
ebb398ae1e05 spi: offload-trigger: add PWM trigger driver Author David Lechner
83f37ba7b76a dt-bindings: trigger-source: add generic PWM trigger source Author David Lechner
d7231be4b465 spi: offload: add support for hardware triggers Author David Lechner
8e02d1886988 spi: add basic support for SPI offloading Author David Lechner
c2a756660324 counter: ti-eqep: add direction support Author David Lechner
37f7a388b3f1 tools/counter: add direction change event to watcher Author David Lechner
a1cd339599a8 counter: add direction change event Author David Lechner
bbb89c177208 tools/counter: gitignore counter_watch_events Author David Lechner
1093f83b2cfb iio: adc: ad4695: add custom regmap bus callbacks reviewed-by tested-by suggested-by David Lechner
998d20e4e99d iio: adc: ad4695: make ad4695_exit_conversion_mode() more robust reviewed-by tested-by David Lechner
4310e15b3140 iio: adc: ad7173: don’t make copy of ad_sigma_delta_info struct Author David Lechner
470cb490d1b7 iio: adc: ad7173: move fwnode_irq_get_byname() call site Author David Lechner
7ad920ce3429 docs: iio: ad7380: add alert support reviewed-by David Lechner
27d1a4dbe1e1 iio: adc: ad7380: add alert support reviewed-by David Lechner
adc59fe0c222 iio: adc: ad7380: do not store osr in private data structure reviewed-by David Lechner
85e5605279df iio: adc: ad7380: enable regmap cache reviewed-by David Lechner
2d7b60f33da3 iio: adc: ad7380: fix event threshold shift reviewed-by Julien Stephan
aac287ec80d7 docs: iio: ad7380: add adaq4381-4 Author Julien Stephan
7131fcdba97f dt-bindings: iio: adc: ad7380: add adaq4381-4 compatible parts Author Julien Stephan
f66d625c4d48 iio: adc: ad7380: add adaq4381-4 support Author Julien Stephan
7ad920ce3429 docs: iio: ad7380: add alert support Author Julien Stephan
27d1a4dbe1e1 iio: adc: ad7380: add alert support Author Julien Stephan
adc59fe0c222 iio: adc: ad7380: do not store osr in private data structure Author Julien Stephan
85e5605279df iio: adc: ad7380: enable regmap cache Author Julien Stephan
39bc50e00f8c iio: adc: ad7380: do not use iio_device_claim_direct_scoped anymore Author Julien Stephan
38f898e0b54f iio: adc: ad4695: simplify getting oversampling_ratio reviewed-by Trevor Gamblin
cafeb8a99746 iio: adc: ad4695: fix out of bounds array access reviewed-by Trevor Gamblin
48a24fd21d11 iio: adc: ad7625: Stop using iio_device_claim_direct_scoped() reviewed-by Trevor Gamblin
c26b0854eb2b doc: iio: ad4695: describe oversampling support Author Trevor Gamblin
67d63185db79 iio: adc: ad4695: add offload-based oversampling support Author Trevor Gamblin
1093f83b2cfb iio: adc: ad4695: add custom regmap bus callbacks Author Trevor Gamblin
998d20e4e99d iio: adc: ad4695: make ad4695_exit_conversion_mode() more robust Author Trevor Gamblin
8ec5a6fc3b58 iio: adc: ad7625: drop BSD license tag Author Trevor Gamblin
9a9b7cd77b24 firmware: config: ti-sci: Default set to ARCH_K3 for the ti sci driver reviewed-by Kevin Hilman
ea07a4775df0 ARM: dts: omap4-panda-a4: Add missing model and compatible properties Committer Kevin Hilman
a4ec13e6101e dt-bindings: omap: Add TI Pandaboard A4 variant Committer Kevin Hilman
13203d24dd00 ARM: dts: ti/omap: omap4-serial: fix interrupts syntax Committer Kevin Hilman
10a71ea10324 ARM: dts: ti: omap: Align GPIO hog name with bindings Committer Kevin Hilman
6ef4ea3c944b Input: tsc2007 – accept standard properties Committer Kevin Hilman
b3c221e752c4 clk: amlogic: a1: fix a typo Committer Jerome Brunet
7915d7d5407c clk: amlogic: gxbb: drop non existing 32k clock parent Author Jerome Brunet
f38f7fe4830c clk: amlogic: gxbb: drop incorrect flag on 32k clock Author Jerome Brunet
8995f8f108c3 clk: amlogic: g12b: fix cluster A parent data Author Jerome Brunet
0079e77c08de clk: amlogic: g12a: fix mmc A peripheral clock Author Jerome Brunet
dcb166ee43c3 drm/mediatek: dsi: fix error codes in mtk_dsi_host_transfer() reviewed-by Mattijs Korpershoek
cd5b6ba77705 drm/mediatek: add MT8365 SoC support Author Fabien Parent
5823f0453c2a dt-bindings: display: mediatek: dpi: add power-domains example Author Fabien Parent
b232a43b5c60 arm64: dts: mediatek: mt8395-genio-1200-evk: add support for TCPC port Author Fabien Parent
b232a43b5c60 arm64: dts: mediatek: mt8395-genio-1200-evk: add support for TCPC port reviewed-by Alexandre Mergnat
3aeff53c57c8 dt-bindings: usb: mtu3: Add ports property reviewed-by Alexandre Mergnat
b7b5052f6b13 arm64: dts: mediatek: add display support for mt8365-evk Author Alexandre Mergnat
ec207ea7f6f9 arm64: dts: mediatek: add display blocks support for the MT8365 SoC Author Alexandre Mergnat
9a9b7cd77b24 firmware: config: ti-sci: Default set to ARCH_K3 for the ti sci driver Author Guillaume La Roque
ac856912f210 iio: adc: ad7606: add support for writing registers when using backend Author Guillaume Stols
5efb0a3cc6c8 iio: adc: ad7606: change channel macros parameters Author Guillaume Stols
79c47485e438 iio: adc: adi-axi-adc: add support for AD7606 register writing Author Guillaume Stols
d2477887f667 iio: adc: ad7606: move software functions into common file Author Guillaume Stols
f2a62931b394 iio: adc: ad7606: move the software mode configuration Author Guillaume Stols
f2ae18092607 dt-bindings: iio: dac: adi-axi-adc: add ad7606 variant Author Guillaume Stols
b29050e8b3b9 docs: iio: ad4030: add documentation Author Esteban Blanc
ec25cf6f1ee3 iio: adc: ad4030: add support for ad4632-16 and ad4632-24 Author Esteban Blanc
c8ed843c4860 iio: adc: ad4030: add support for ad4630-24 and ad4630-16 Author Esteban Blanc
949abd1ca5a4 iio: adc: ad4030: add averaging support Author Esteban Blanc
0cb8b324852f iio: adc: ad4030: add driver for ad4030-24 Author Esteban Blanc
8de148c0189e dt-bindings: iio: adc: add ADI ad4030, ad4630 and ad4632 Author Esteban Blanc
192b669b930c iio: dac: ad5791: Add offload support Author Axel Haslam
7530ed2aaa3f iio: adc: ad7173: add openwire detection support for single conversions Author Guillaume Ranquet
34934d799655 iio: introduce the FAULT event type Author Guillaume Ranquet
Categories
Community Open-source Zephyr

Why and How to Migrate from Bare Metal to Zephyr RTOS?

Introduction:

At BayLibre we are often asked by our customers to help them select the right software for their embedded mission. For a long time, “bare metal” (direct programming on hardware) has been the norm, mainly due to particularly limited hardware resources. However, with the increasing complexity of projects and the need to rationalize software developments, real-time operating systems (RTOS) like Zephyr are becoming essential. This is a similar situation to when people moved away from assembly to C programming.

In this article, we will explore the reasons for this migration and the steps to follow.

Why Migrate from Bare Metal to Zephyr RTOS?

Complexity Management: Modern embedded projects often involve multiple simultaneous tasks, network protocols, user interfaces, etc. An RTOS simplifies the management of these complexities through task scheduling, synchronization, and inter-process communication.

Code Reusability: Zephyr offers a Hardware Abstraction Layer (HAL) that facilitates code porting between different platforms. This significantly reduces development time and effort when changing hardware. It would be safer for product development companies to consider multi-hardware suppliers, and Zephyr could be the solution as a cross-platform OS. Today most of the well known hardware vendors provide a decent Zephyr SDK, such as STM, Nordic, NXP, … 

Community and Support: Zephyr benefits from an active community and solid support, with many examples, libraries, and tools available. This accelerates development and problem-solving. If features are missing, the Zephyr contributors are very active and will be helping with completing the features’ implementation.

Security: Zephyr integrates security features such as memory protection, task isolation, and secure updates. These features are essential for critical applications.

Compliance : Zephyr provides tools for generating a SBOM of the firmware, which is going to be legally required at some point. There is an effort to provide an IEC 61508 subset of features for functional safety requirements

Modularity: Zephyr is highly configurable and modular, allowing you to include only the necessary components. This optimizes memory footprint and power consumption. Being extremely modular, it’s even possible to use it without multi-thread support. Here is an example showing how to reduce Zephyr size down to 2-3KB (https://docs.zephyrproject.org/latest/samples/basic/minimal/README.html) of ROM.

Long Term Support: Zephyr Long Term Support (LTS) releases are published every 2 years and are branched and maintained independently of the main tree for at least 2.5 years after it was released. That is crucial for markets like IoT and industrial, which requires up to 10 years of SW support. 

Steps to migrate from Bare Metal to Zephyr RTOS:

First of all, be careful about the selection of the relevant target hardware. Check if your target hardware platform provider has already provided an upstreamed Zephyr basic support, which will significantly ease your Zephyr migration. For example, today in Zephyr community, Nordic is one of the most active actors. Many of their software releases very closely follow Zephyr’s upstreamed code and release cadence.

Then, you need to do your current project evaluation. Analyze your existing bare metal code, identify the main tasks, interrupts, shared resources, and hardware dependencies. While Zephyr is perfectly suited for MCU-based devices with connectivity (BT, WIFI…), it is “heavier” than bare metal, so it’s important to check your constraints in terms of Real-Time performance and ensure that Zephyr will be able to meet the needs.

It is important to consider a quick Zephyr training. If your R&D team is discovering Zephyr, it is strongly recommended to take a Zephyr training beforehand, to understand the philosophy of Zephyr and to be able to carry out the implementation with good practices. The link of training partners of Zephyr project is here.

Further, you could start Zephyr environment configuration. Install the Zephyr tools (SDK, Ninja, etc.) and configure your development environment.

After this, it is time for Zephyr project creation. Initialize a new Zephyr project for your target platform. Use the examples and templates provided to get started quickly.

Regarding Code Porting, it is important to perform the following steps:

  • Hardware Abstraction: Replace direct access to hardware registers with Zephyr’s HAL APIs.
  • Task Management: Transform your main loops into Zephyr tasks. Use the scheduling and synchronization APIs (mutex, semaphore, etc.).
  • Interrupt Management: Adapt your interrupt handlers to use Zephyr’s interrupt APIs.

It’s essential to structure your code using the Zephyr framework as much as possible. This will allow you to leverage the full power of the Zephyr architecture, and mainly lower drastically the maintenance of your application, making it really easy to port to newer versions of Zephyr. The pitfall to avoid would be to reinvent the software stack without respecting the Zephyr’s framework designed for. For instance, if you need to write custom drivers, we highly recommend sticking to the Zephyr driver model. This may seem an useless burden at the beginning if you plan to call your driver functions directly from your application code, like you would do for a bare-metal application. However, this becomes very handy when you need to add the power management support to your whole application, allowing Zephyr to call your custom driver power management callbacks at the correct moment and interfacing with all the power management subsystems flawlessly.

When it comes to Testing and Debugging, please use Zephyr’s debugging tools to test your application. Check task behavior, synchronization, and performance.

Once your porting is almost done, you can adjust the Zephyr configuration to optimize memory footprint, power consumption, and performance according to your needs.

Last but not least, please think about upstreaming any changes you had to do to get your platform to run, whether it was simple fixes or new mpu/peripheral/device/platform support.

Conclusion:

Migrating from bare metal to Zephyr RTOS may seem daunting at first, but the advantages in terms of complexity management, code reusability, and security are worth it. By following these steps, you can successfully make your transition and take advantage of the many features offered by Zephyr RTOS.

Keywords: 

Zephyr RTOS, bare metal, embedded, migration, embedded development, real-time operating system, IoT.

Categories
Android MediaTek

BayLibre delivers updated Android 14 SDK for MediaTek Genio family of IoT chipsets

BayLibre, in close partnership with MediaTek, has pioneered the development of AOSP and Yocto SDKs for the Genio platform since 2018. We collaborate with hardware IDHs and ODMs, assisting OEM customers to bring their products to market using AOSP and Yocto Linux on Genio platforms. Furthermore, Baylibre is actively involved in enhancing Genio support within open-source communities. 

BayLibre has continuously updated AOSP for the MediaTek Genio family of chips. With the update to Android 14 we have added support for the Genio 350, Genio 510, and Genio 700 chipsets. This software development kit (SDK) closely follows the mainline Android software developed by Google, providing an excellent solution for OEMs developing CRA-compliant IoT devices with longevity in mind. Key benefits include:

Increased autonomy for OEMs – Comprehensive online documentation for an easier product development

Easy feature customization –  Minimal modifications to AOSP generic Git repositories enable quick customization, including security-related features.

Long-term maintenance flexibility – The SDK will be GKI compliant, so all future security patches from Google will be automatically updated thanks to a simple configuration file change (manifest). 

No barriers to kernel and Android upgrades – OEMs can seamlessly integrate kernel updates, new Android versions, and security patches over the years.

Unified SDK for multiple chipsets – A single SDK single repo supports all chipsets, significantly reducing maintenance efforts for OEMs using multiple Genio platforms. A single patch applies across all platforms.

Transparent development process – Customers can follow the Git repositories to track progress and see development in real-time.

Ezurio, a MediaTek SOM partner, has shared their feedback after evaluation:”AOSP support of Genio is simply the best Android BSP we have been working with. Not only is it very well architected, it follows all the AOSP guidelines and leverages the latest features (GKI, bazel etc..).

As it relies on upstream support for all features, none of the AOSP core repositories are modified which means it is easy to maintain and upgrade in the future.”

Ologic, a MediaTek hardware IDH and system integrator partner, shared their experience:” Partnering with BayLibre has been a game-changer for OLogic. The Open Android SDK solution brings a seamless AOSP experience to MediaTek IoT platforms, making it the perfect complement to Pumpkin Genio 350, 510, and 700 boards. By combining BayLibre’s deep Android expertise with our versatile hardware, we’re able to offer developers a powerful, production-ready solution for IoT applications. This collaboration accelerates development, optimizes performance, and helps bring innovative Android-based edge computing devices to market faster. Together, we’re creating a streamlined, open-source Android environment that is shaping the future of intelligent IoT solutions.”

Need to leverage the power of AOSP customization to bring your unique product vision to life? Our expert team specializes in customized AOSP implementations, providing hardware enablement with OTA update solutions, and comprehensive sustaining engineering. Please contact us to discuss how we can partner to realize your specific use case and unlock the full potential of your hardware with a customized AOSP experience based on Mediatek Genio platforms.

For more details, visit our public documentation: 

https://baylibre.pages.baylibre.com/mediatek/rita/device/mediatek/mtk-android-14/

Keywords: Genio, Mediatek, AOSP, embedded, IoT, Android.

Categories
Community Linux Kernel Open-source

BayLibre contributions to Linux v6.14

Linus released Linux 6.14 on March 24, 2025. Once more, BayLibre was a significant contributor to the Linux kernel. Here are some of the areas we worked on.

PM Domains

Kevin Hilman introduced new features to the TI SCI PM domains driver to handle low power constraints. Any drivers which have set PM QoS constraints will have these constraints communicated to the low-power firmware such that the firmware can make an informed decision about the low-power state chosen. This enhancement includes handling wake IRQs for IO daisy chain wakeups, adding wakeup constraint management, and implementing per-device latency constraint management.

Kevin also continues to maintain legacy OMAP SoCs where various cleanups and new features keep coming in. As the maintainer, he reviewed, applied, and committed several important patches from the community addressing DTS issues for TI platforms, fixing PM issues caused by SPI modules, correcting IRQ configuration on Nokia 770, and improving bus and interrupt-related functionality.

IIO

Uwe Kleine-König made significant improvements to the AD7124 driver and the supporting sigma-delta framework. He implemented temperature measurement in the AD7124 driver, improved error reporting during probe, fixed multiple race conditions in the ad_sigma_delta framework, added support for reading IRQ status using a GPIO, and implemented better device tree validation.

David Lechner continued the initiative to use the new devm_regulator_get_enable_read_voltage() helper function across multiple DAC drivers. He converted the max5821, ltc2688, ltc2632, ad8801, and ad5686 drivers to use this function. Additionally, David fixed struct names in documentation comments, removed unused fields, and improved ABI documentation.

Angelo Dureghello worked on bug fixes for the AD3552R DAC and AD7606 ADC drivers. He corrected the wrong scale value in the AD7606 driver, fixed PWM names in ADI AXI ADC device tree bindings, addressed the reset status flag issue in the AD3552R driver, and fixed the ad3541/2r DAC ranges. These fixes were necessary groundwork for upcoming features in the next kernel release.

David Lechner also improved the IIO framework by combining current input sections in the IIO ABI, using channel number ‘Y’ consistently, converting DMA bindings to YAML schema, and improving documentation.

PWM

Working on the PWM framework, Uwe Kleine-König made several improvements including ensuring callbacks exist before calling them and converting PWM device tree bindings from text to YAML format. He handled the PWM subsystem’s review and maintenance as usual.

Kernel Infrastructure

Uwe Kleine-König worked on improving module symbol namespaces by fixing actual usage of I2C_DW_COMMON and I2C_DW symbol namespaces in the Designware I2C driver, improving usage of the HWMON_NCT6775 symbol namespace, and updating documentation for DEFAULT_SYMBOL_NAMESPACE.

Additionally, Uwe addressed GPL compliance issues, which was covered by LWN. By creating a patch to add a potential GPL offender to the block list, the company was incentivized to fix their issues quickly, avoiding being added to the mainline block list.

IRQ Chip Support

Guillaume La Roque added module build support for ti-sci-inta and ti-sci-intr. This work was done for Android context, where GKI (Generic Kernel Image) support requires SoC drivers to be modular instead of built-in.

Summary

Type Count
Authored 68
Signed-off-by 3
Acked-by 4
Reviewed-by 17
Tested-by 3
Suggested-by 3

List of contributions

Hash Subject Role Person
45d5fe1c53ba ARM: davinci: da850: fix selecting ARCH_DAVINCI_DA8XX Author David Lechner
5d702aa2a47b iio: proximity: Fix use-after-free in hx9023s_send_cfg() reviewed-by David Lechner
012b8276f08a iio: dac: ad3552r-hs: clear reset status flag reviewed-by David Lechner
1e758b613212 iio: dac: ad3552r-common: fix ad3541/2r ranges reviewed-by David Lechner
577a66e2e634 iio: iio-mux: kzalloc instead of devm_kzalloc to ensure page alignment reviewed-by David Lechner
bed883e4f040 iio: adc: ad7944: Fix sign and use aligned_s64 for timestamp. reviewed-by David Lechner
b5fd1849c684 iio: ABI: combine current input sections Author David Lechner
84b6b55584d2 iio: dac: ad7293: enable power before reset Author David Lechner
6ade82946f4c iio: ABI: use Y consistently as channel number Author David Lechner
06d5363296db dt-bindings: dma: adi,axi-dmac: deprecate adi,channels node Author David Lechner
788726fcea1f dt-bindings: dma: adi,axi-dmac: convert to yaml schema Author David Lechner
c3948d090080 iio: adc: ad4000: Add support for PulSAR devices reviewed-by David Lechner
fc8f63009549 iio: adc: ad4000: Use device specific timing for SPI transfers reviewed-by David Lechner
646acd46fc90 iio: adc: ad4000: Add timestamp channel suggested-by reviewed-by David Lechner
c437190ceaaa iio: trigger: stm32-timer-trigger: Add check for clk_enable() reviewed-by David Lechner
cb3e9a446763 iio: adc: ad_sigma_delta: add tab to align irq_line Author David Lechner
a05dc8b4d4aa iio: buffer-dmaengine: document iio_dmaengine_buffer_setup_ext Author David Lechner
2d6941932974 dt-bindings: iio: adc: adi,ad4695: change include path Author David Lechner
435004291c9a iio: adc: ad4695: move dt-bindings header Author David Lechner
9598866317fc iio: dac: max5821: use devm_regulator_get_enable_read_voltage() Author David Lechner
6f0588607864 iio: dac: ltc2688: use devm_regulator_get_enable_read_voltage() Author David Lechner
3ebb535f4f92 iio: dac ltc2632: drop driver remove function Author David Lechner
c15031ef6ef3 iio: dac: ltc2632: use devm_regulator_get_enable_read_voltage() Author David Lechner
276821d1e04c iio: dac ad8801: drop driver remove function Author David Lechner
451bdc1dc9cb iio: dac: ad8801: use devm_regulator_get_enable_read_voltage() Author David Lechner
6c009e55924a iio: dac: ad5686: use devm_regulator_get_enable_read_voltage() Author David Lechner
f596651dd6be iio: dac: ad5686: fix struct name in doc comment Author David Lechner
d6d9c45c90ef iio: dac: ad5624r: fix struct name in doc comment Author David Lechner
83f616a38427 iio: adc: ad7173: remove unused field Author David Lechner
b28fb1f2ef45 modpost: Fix a few typos in a comment Author Uwe Kleine-König
c8e0bd579ed3 module: Put known GPL offenders in an array Author Uwe Kleine-König
da6b35378699 pwm: Ensure callbacks exist before calling them Author Uwe Kleine-König
752b6e3af374 pwm: microchip-core: fix incorrect comparison with max period Committer Uwe Kleine-König
e8c59791ebb6 pwm: stm32: Add check for clk_enable() Committer Uwe Kleine-König
f0a4e9fa656c i2c: designware: Actually make use of the I2C_DW_COMMON and I2C_DW symbol namespaces Author Uwe Kleine-König
3c838184407f gpio: altera: Drop .mapped_irq from driver data Author Uwe Kleine-König
fcf22a957ff8 doc: module: DEFAULT_SYMBOL_NAMESPACE must be defined before #includes Author Uwe Kleine-König
3008178ef371 doc: module: Fix documented type of namespace Author Uwe Kleine-König
78dcad6daa40 dt-bindings: pwm: Correct indentation and style in DTS example Committer Uwe Kleine-König
f5ab868af55f iio: adc: ad7625: Add ending newlines to error messages Author Uwe Kleine-König
e439c72499a0 iio: adc: ad_sigma_delta: Use unsigned int instead of plain unsigned Author Uwe Kleine-König
cce16e7f6216 pwm: stm32-lp: Add check for clk_enable() Committer Uwe Kleine-König
4ccf7e3553fe dt-bindings: pwm: marvell,berlin-pwm: Convert from txt to yaml Author Uwe Kleine-König
a0b67429fc41 dt-bindings: pwm: sprd,ums512-pwm: convert to YAML Committer Uwe Kleine-König
10435e0d2377 pwm: Replace deprecated PCI functions Committer Uwe Kleine-König
e490ceff433f spi: spidev: Align ordering of spidev_spi_ids[] and spidev_dt_ids[] Author Uwe Kleine-König
d5f9e83ca631 ARM: dts: socfpga_cyclone5_mcvevk: Drop unused #address-cells/#size-cells Author Uwe Kleine-König
a4ea3e41befd hwmon: (isl28022) Drop explicit initialization of struct i2c_device_id::driver_data to 0 Author Uwe Kleine-König
2505f87eb3af hwmon: (nct6775): Actually make use of the HWMON_NCT6775 symbol namespace Author Uwe Kleine-König
b690f5d955e0 drm: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Author Uwe Kleine-König
6eaf3f60ab45 iio: adc: ad7124: Implement temperature measurement Author Uwe Kleine-König
abc61acde13c iio: adc: ad7124: Add error reporting during probe Author Uwe Kleine-König
132d44dc6966 iio: adc: ad_sigma_delta: Check for previous ready signals Author Uwe Kleine-König
07a28874bb49 iio: adc: ad_sigma_delta: Store information about reset sequence length Author Uwe Kleine-König
f522589c139d iio: adc: ad_sigma_delta: Fix a race condition Author Uwe Kleine-König
90b8b2fe60eb iio: adc: ad_sigma_delta: Handle CS assertion as intended in ad_sd_read_reg_raw() Author Uwe Kleine-König
a87ef09b1fdf iio: adc: ad_sigma_delta: Add support for reading irq status using a GPIO Author Uwe Kleine-König
fa6068fb7828 dt-bindings: iio: adc: adi,ad7{124,173,192,780}: Allow specifications of a gpio for irq line Author Uwe Kleine-König
9ecad7f404b5 iio: adc: ad7124: Refuse invalid input specifiers Author Uwe Kleine-König
cc597af18092 iio: adc: ad7124: Don’t create more channels than the driver can handle Author Uwe Kleine-König
7041ed0dde83 extcon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Author Uwe Kleine-König
b32913a5609a ptp: Switch back to struct platform_driver::remove() Author Uwe Kleine-König
8359ea9c1195 ASoC: Drop explicit initialization of struct i2c_device_id::driver_data to 0 Author Uwe Kleine-König
35e21de48e69 regulator: core: let dt properties override driver init_data Author Jerome Brunet
72bb8275a3b0 reset: amlogic: aux: drop aux registration helper Author Jerome Brunet
ccfba09ceecc reset: amlogic: aux: get regmap through parent device Author Jerome Brunet
e436d4355176 ASoC: dapm: add support for preparing streams suggested-by reviewed-by Jerome Brunet
d4e91adfc261 ASoC: soc-dai: add snd_soc_dai_prepare() and use it internally suggested-by reviewed-by Jerome Brunet
339bca4ffdaa hwmon: (pmbus/tps25990) Add initial support Author Jerome Brunet
83bed3c159f4 hwmon: (pmbus/core) add wp module param Author Jerome Brunet
f40452577557 hwmon: (pmbus/core) improve handling of write protected regulators Author Jerome Brunet
bead181694df iio: adc: ad7606: fix wrong scale available Author Angelo Dureghello
02ccd7e5d81a dt-bindings: iio: dac: adi-axi-adc: fix ad7606 pwm-names Author Angelo Dureghello
e17b9f20da7d iio: dac: ad3552r: clear reset status flag Author Angelo Dureghello
012b8276f08a iio: dac: ad3552r-hs: clear reset status flag Author Angelo Dureghello
1e758b613212 iio: dac: ad3552r-common: fix ad3541/2r ranges Author Angelo Dureghello
90b8b2fe60eb iio: adc: ad_sigma_delta: Handle CS assertion as intended in ad_sd_read_reg_raw() reviewed-by Trevor Gamblin
b8b26ae398c4 irqchip/ti-sci-inta : Add module build support Author Nicolas Frayer
2d95ffaecbc2 irqchip/ti-sci-intr: Add module build support Author Nicolas Frayer
b5fc9453651d pmdomain: ti_sci: add per-device latency constraint management reviewed-by Markus Schneider-Pargmann
dd504db5cd4a ARM: dts: ti/omap: omap3-gta04: use proper touchscreen properties Committer Kevin Hilman
3623e1024efc ARM: dts: ti: am437x-l4: remove autoidle for UART Committer Kevin Hilman
0cfbd7805fe1 ARM: dts: ti/omap: gta04: fix pm issues caused by spi module Committer Kevin Hilman
ad455e48bba7 ARM: omap1: Fix up the Retu IRQ on Nokia 770 Committer Kevin Hilman
643cc5ca01ce ARM: omap2plus_defconfig: enable charger of TWL603X Committer Kevin Hilman
b06bc4727991 pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups Author Kevin Hilman
9d8aa0dd3be4 pmdomain: ti_sci: add wakeup constraint management Author Kevin Hilman
b5fc9453651d pmdomain: ti_sci: add per-device latency constraint management Author Kevin Hilman
c1472ec1dc44 ARM: dts: dra7: Add bus_dma_limit for l4 cfg bus Committer Kevin Hilman
19ee9e4cded4 ARM: OMAP2+: Fix a typo Committer Kevin Hilman
3623e1024efc ARM: dts: ti: am437x-l4: remove autoidle for UART reviewed-by Sukrut Bellary
0fb0d3602181 arm64: dts: mediatek: mt8516: add keypad node reviewed-by Mattijs Korpershoek
6139d9e9e397 arm64: dts: mediatek: add per-SoC compatibles for keypad nodes reviewed-by Mattijs Korpershoek
3b19239ad420 dt-bindings: mediatek,mt6779-keypad: add more compatibles reviewed-by Mattijs Korpershoek
c969c1e56264 dt-bindings: iio: dac: ad5791: ldac gpio is active low Author Axel Haslam
954c06ddabb0 iio: adc: ad7606: Fix hardcoded offset in the ADC channels Author Guillaume Stols
4d112ebd02d1 iio: adc: ad-sigma-delta: Document ABI for sigma delta adc Author Guillaume Ranquet
031bdc8aee01 iio: adc: ad7173: add calibration support Author Guillaume Ranquet
Categories
Community GCC Open-source RISC-V Toolchain

Optimising GCC performance for RISC-V

We have delved into compiler optimisations and their impact on performance, specifically focusing on the GCC toolchain and its code generation for RISC-V. This work is conducted as a collaboration between BayLibre and Rivos and sponsored as part of the RISE Project. It is centered around the SPEC CPU 2017 benchmark suite, aiming to identify and analyse performance discrepancies between AArch64 and RISC-V implementations, with a view to bridging this gap.

Compiler and architecture interactions

The study examined several aspects, including compiler optimisations, Instruction Set Architecture (ISA) features, and library interactions. The goal was to understand how these elements contribute to overall performance and pinpoint areas of improvement so as to make the quality of the code generated by GCC for RISC-V closer to AArch64.

Areas of investigation

Several areas were identified with potential opportunities for performance improvement. These included:

  • Vectorisation and parallelism: The study analysed how the compiler leveraged vector instructions and how architectural parameters influenced the degree of parallelism achieved. Differences in vector length multipliers and their impact on instruction counts were observed.
  • Addressing modes: Variations in addressing modes between architectures were examined, particularly their effects on memory access patterns and instruction efficiency. The absence of scaled addressing modes in the RISC-V ISA was noted as a significant factor.
  • Library optimisations: The study also considered how library implementations, such as `memset` and math functions, affected overall performance. Differences in optimised implementations and their impact on execution time were analysed. For instance, we found the lack of vectorised routines in RISC-V’s libc had a notable effect.
  • Compiler code generation: The compiler’s ability to generate efficient code for specific instruction patterns was investigated. Instances where the compiler could produce more optimal instructions, such as vector-scalar operations, were identified.

Implications for performance

The findings highlight the complex interplay between compiler optimisations, architectural features and library support. The study suggests that performance can be significantly influenced by:

  • Compiler strategies: How the compiler chooses to vectorise code, utilise addressing modes, and handle library calls.
  • ISA characteristics: The specific instructions and addressing modes available in the target architecture.
  • Library implementations: The availability of optimised library functions tailored to the architecture.

Ongoing work and future presentation

The study represents an ongoing effort to improve compiler performance and understand the nuances of different architectures. Further investigations are planned to explore additional areas for improvement. We will shortly be submitting patches addressing some of the weaknesses identified in GCC code generation for RISC-V.

A more in-depth presentation of this analysis and its findings will be shared at the upcoming RISC-V Summit Europe 2025 (https://riscv-europe.org/summit/2025/).

Categories
Community Open-source Yocto

Maintaining the Yocto Project: Monitoring Recipes with AUH


Introduction

Yocto Project maintenance frequently involves upgrading many recipes in a layer to a more recent upstream version. The benefits of doing so include pulling in bugfixes, new features and tests, retaining compatibility with other packages, and so on. Manually, this might be done with six or seven main steps as follows:

  1. Determine the appropriate version (usually a stable release) to upgrade to;
  2. Use git mv to change the recipe file’s name to reflect the new version;
  3. Change recipe variables such as SRCREV, SRC_URI, LIC_FILES_CHKSUM, and so on (as required) to match;
  4. Setup a build area with source oe-init-build-env and confirm that the recipe builds with no new warnings or errors;
  5. Build the recipe to be sure that there are no errors and rule out unexpected license or QA changes;
  6. If it has ptests, build core-image-ptest-<recipe>, run the image, and check that there are no regressions when running ptest-runner <recipe>;
  7. Compile all of the changes made into a patch with a description of what you’ve done and submit it for review. Note that this should also include a copy of the changelog for the new version, and/or a link to it (if the list is long). Depending on the changelog contents, you may have to perform additional steps to make the recipe upgrade work.

Depending on the particular recipes and the number of them to upgrade, however, this could be quite tedious. Luckily, the Yocto Project includes a tool called the Automatic Recipe Upgrade Helper (AUH) to simplify this process. Combined with a CI system and a reasonably powerful system with which to perform builds, the AUH can be used to make the maintainer’s recipe upgrade process smoother and less repetitive.

Setting up a Nightly AUH Job

The Job Script

For this example, Laminar CI will be used for setting up a nightly run, but your choice of CI system should work if you’re building Yocto images there already. Laminar jobs are just Bash scripts marked as executable in <laminar_home_dir>/cfg/jobs and with the .run extension (e.g. auh.run),

A very basic AUH job might look like this:

#!/bin/bash -ex

# clone poky and setup
git clone --depth=1 https://git.yoctoproject.org/poky
cd poky
source oe-init-build-env build-auh

# get AUH
git clone --depth=1 https://git.yoctoproject.org/auto-upgrade-helper
mkdir upgrade-helper

# copy the customized upgrade-helper.conf config file
cp /workspace/laminar/yoctocache/upgrade-helper.conf upgrade-helper

# build
./auto-upgrade-helper/upgrade-helper.py all

We use a shallow clone here (--depth=1) to reduce the load on upstream. Another good way to handle this would be by referencing or using a local clone of the repo.

Customizing AUH

Note this line from the script above:

cp /workspace/laminar/yoctocache/upgrade-helper.conf upgrade-helper

upgrade-helper.conf is a configuration file specifically for AUH. By default, AUH will try to upgrade everything, which is probably too broad a scope for your needs (and your build machine). One of the key overrides to set in there is maintainers_whitelist, a space-separated list of maintainers’ email addresses to check against maintainers.inc and attempt upgrades for matching recipes. For example, if you wanted to automate the building of any recipes without assigned maintainers in your AUH job, you might put the following in upgrade-helper.conf:

maintainers_whitelist=unassigned@yoctoproject.org

If you are listed as a maintainer for any recipes, you could also check yours by instead setting

maintainers_whitelist=yourname@youremail.com

or you could monitor both, with

maintainers_whitelist=unassigned@yoctoproject.org yourname@youremail.com

Periodic Execution

Now it’s a good time to actually make it work. You can use your automation method of choice, but for this example, we’ll trigger the nightly AUH script with cronjob in a format like so:

0 22 * * * LAMINAR_REASON="Daily AUH build" laminarc queue auh

(remember that you should replace auh with whatever the name is for your job script)

In this case, it’s scheduled to run on the 22nd hour of every day. Even with the scope of your AUH job narrowed down, it’s probably still a good idea to have it run overnight to avoid bogging down your system while you use it. When you log into the Laminar web UI and view the output logs from the latest AUH run, you’ll see a handy summary of the AUH run (just like you had run it manually):

INFO: Generating work tarball in /auto/laminar/run/auh/162/poky/build-auh/upgrade-helper/20240524220028.tar.gz ...
INFO: Recipe upgrade statistics:

    * Succeeded: 8
        bind, 9.18.27, Unassigned <unassigned@yoctoproject.org>
        dhcpcd, 10.0.8, Unassigned <unassigned@yoctoproject.org>
        libslirp, 4.8.0, Unassigned <unassigned@yoctoproject.org>
        python3-setuptools, 70.0.0, Unassigned <unassigned@yoctoproject.org>
        libxcb, 1.17.0, Unassigned <unassigned@yoctoproject.org>
        xserver-xorg, 21.1.13, Unassigned <unassigned@yoctoproject.org>
        xwayland, 24.1.0, Unassigned <unassigned@yoctoproject.org>
        wireless-regdb, 2024.05.08, Unassigned <unassigned@yoctoproject.org>
    * Failed (devtool error): 3
        ovmf, edk2-stable202405, Unassigned <unassigned@yoctoproject.org>
        libgit2, 1.8.1, Unassigned <unassigned@yoctoproject.org>
        pinentry, 1.3.0, Unassigned <unassigned@yoctoproject.org>
    * Failed(do_compile): 1
        cmake, 3.29.3, Unassigned <unassigned@yoctoproject.org>

    TOTAL: attempted=12 succeeded=8(66.67%) failed=4(33.33%)

Recipe upgrade statistics per Maintainer:

    Unassigned <unassigned: attempted=12 succeeded=8(66.67%) failed=4(33.33%)

From here you can use the information and build results to get the upgrades upstream as required.

Conclusion

What I’ve described is a relatively low-effort way to automate tracking of recipe upgrades, which is one of the best places to contribute to Yocto. However, there are lots of little steps that could be taken to improve this process:

  • proper sstate/workspace reuse in the AUH job script and in CI setup
  • Archiving the result tarballs
  • Configuring email so AUH can send out the results to the user – not the official mailing list, because there’s already a service doing that!
  • Adding testimage and other runtime checks

In the next installment of this series, I’ll discuss what to do with a recipe whose AUH upgrade failed.

See Also

Categories
Community Conferences Open-source RISC-V Yocto

Maintaining the Yocto Project: Case Study: python3-numpy


Introduction

Yocto Project maintenance frequently involves upgrading many recipes in a layer to a more recent upstream version. The benefits of doing so include pulling in bugfixes, new features and tests, retaining compatibility with other packages, and so on. Manually, this might be done with six or seven main steps as follows:

  1. Determine the appropriate version (usually a stable release) to upgrade to;
  2. Use git mv to change the recipe file’s name to reflect the new version;
  3. Change recipe variables such as SRCREV, SRC_URI, LIC_FILES_CHKSUM, and so on (as required) to match;
  4. Setup a build area with source oe-init-build-env and confirm that the recipe builds with no new warnings or errors;
  5. Build the recipe to be sure that there are no errors and rule out unexpected license or QA changes;
  6. If it has ptests, build core-image-ptest-<recipe>, run the image, and check that there are no regressions when running ptest-runner <recipe>;
  7. Compile all of the changes made into a patch with a description of what you’ve done and submit it for review. Note that this should also include a copy of the changelog for the new version, and/or a link to it (if the list is long). Depending on the changelog contents, you may have to perform additional steps to make the recipe upgrade work.

However, what happens when steps 4, 5, and/or 6 don’t go smoothly? In this post we’ll walk through an already-completed upgrade for the python3-numpy recipe, which will be illustrative as to why and what might need to be done. Every recipe and associated project is different, though, so what you see here might not work elsewhere.

Some Background Context

I’ve been maintainer for the python3-numpy recipe in the openembedded-core layer since August 2023. It turns out that this is one of the more complicated Python recipes to maintain, given that much of the module is compiled, rather than simply being redistributed Python code. Pretty much every new upstream release results in one or more of the following upgrade blockers occurring for the recipe:

  1. Carried patches (backports, embedded-specific, etc.) no longer apply, because:
    1. the target files have changed too much for the appropriate modifications to be completed in do_patch;
    2. the changes are already present (i.e. the patch was a backport and its changes are included in the release you’re upgrading to);
  2. Architecture-specific build issues, which are often already identified and patched, but not included in the latest available numpy release;
  3. New reproducibility issues are identified;
  4. Breakages now occur for other recipes that depend on it – packages like numpy are relied on by many others, and other layers (e.g. meta-openembedded) may test builds for recipes like python3-pandas that could break if a python3-numpy upgrade is merged to oe-core without corresponding changes being made. This is feedback that is usually received when an upgrade patch is pulled into the Yocto Autobuilder for testing, but it’s good to use prior knowledge of these dependencies or otherwise check for them to avoid delays in your submissions being merged.

We’ll see a few of these below, as we walk through the upgrade from numpy version 1.26.4 to 2.1.3.

Setup

Since this upgrade has been merged into master for a while, let’s find it using git log --oneline --grep="numpy":

e0e5dd1e434 python3-numpy: upgrade 2.2.1 -> 2.2.2
991cbf2336e python3-numpy: upgrade 2.1.3 -> 2.2.1
e16e725fb51 Revert "python3-numpy: upgrade 2.1.3 -> 2.2.0"
48b0c58b34e python3-numpy: upgrade 2.1.3 -> 2.2.0
0b625064112 python3-numpy: inherit pkgconfig
ea8594d4a0b python3-numpy: upgrade 1.26.4 -> 2.1.3
0650c1194e5 python3-hypothesis: upgrade 6.111.2 -> 6.112.1
...

We can see the commit ID is ea8594d4a0b. Since we want to walk through the process ourselves, we need to checkout the commit before it:

git checkout ea8594d4a0b^

And now the output of git log --oneline looks like:

edfab1a3ceb (HEAD) python3-meson-python: upgrade 0.16.0 -> 0.17.1
c584cfaa3fe meson: don't look on the host for GTest when cross-compiling
d3576eab8ec linux: Modify kernel configuration to fix runqlat issue
9fe2d717541 migration-guides: document ZSTD_COMPRESSION_LEVEL change
9620944507f ref-manual: document ZSTD_COMPRESSION_LEVEL
b95959a56bc ref-manual: merge two separate descriptions of RECIPE_UPGRADE_EXTRA_TASKS
a11bc1d3209 migration-guides: add release notes for 5.0.4
...

The Upgrade

Let’s start by modifying the recipe file and starting bitbake on the recipe. We know this won’t work since the sha256sum in the recipe hasn’t been changed to match, but it’ll tell us what bitbake sees when it tries to download the new package version, and we can check it to make sure it’s correct:

~/workspace/yocto/poky $ git mv meta/recipes-devtools/python/python3-numpy_1.26.4.bb meta/recipes-devtools/python/python3-numpy_2.1.3.bb
~/workspace/yocto/poky $ git status
HEAD detached at edfab1a3ceb
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        renamed:    meta/recipes-devtools/python/python3-numpy_1.26.4.bb -> meta/recipes-devtools/python/python3-numpy_2.1.3.bb

~/workspace/yocto/poky $ source oe-init-build-env build/
~/workspace/yocto/poky/build $ bitbake python3-numpy
Loading cache: 100% |                                                                                                                                                                                                                         | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes:  98% |#####################################################################################################################################################################################################################   | ETA:  0:00:00

...

And the expected error:

WARNING: python3-numpy-2.1.3-r0 do_fetch: Renaming /home/tgamblin/workspace/yocto/poky/build/downloads/numpy-2.1.3.tar.gz to /home/tgamblin/workspace/yocto/poky/build/downloads/numpy-2.1.3.tar.gz_bad-checksum_aa08e04e08aaf974d4458def539dece0d28146d866a31
WARNING: python3-numpy-2.1.3-r0 do_fetch: Checksum failure encountered with download of https://github.com/numpy/numpy/releases/download/v2.1.3/numpy-2.1.3.tar.gz - will attempt other sources if available
WARNING: python3-numpy-2.1.3-r0 do_fetch: Checksum mismatch for local file /home/tgamblin/workspace/yocto/poky/build/downloads/numpy-2.1.3.tar.gz
Cleaning and trying again.
WARNING: python3-numpy-2.1.3-r0 do_fetch: Renaming /home/tgamblin/workspace/yocto/poky/build/downloads/numpy-2.1.3.tar.gz to /home/tgamblin/workspace/yocto/poky/build/downloads/numpy-2.1.3.tar.gz_bad-checksum_aa08e04e08aaf974d4458def539dece0d28146d866a31
ERROR: python3-numpy-2.1.3-r0 do_fetch: Checksum failure fetching https://github.com/numpy/numpy/releases/download/v2.1.3/numpy-2.1.3.tar.gz
ERROR: python3-numpy-2.1.3-r0 do_fetch: Bitbake Fetcher Error: ChecksumError('Checksum mismatch!nFile: '/home/tgamblin/workspace/yocto/poky/build/downloads/numpy-2.1.3.tar.gz' has sha256 checksum 'aa08e04e08aaf974d4458def539dece0d28146d866a39da56395)
ERROR: Logfile of failure stored in: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_fetch.3240682
ERROR: Task (/home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1358 tasks of which 999 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_fetch
    log: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_fetch.3240682
Summary: There were 5 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
~/workspace/yocto/poky/build $

So we modify the SRC_URI line in the recipe file. The bitbake output indicates the new checksum of the downloaded archive, but it’s important to also check this against the checksum published upstream.

~ SRC_URI[sha256sum] = "aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761"

Patch Tweaks

Now we try bitbake again:

~/workspace/yocto/poky/build $ bitbake python3-numpy
...

NOTE: Executing Tasks
ERROR: python3-numpy-2.1.3-r0 do_patch: Applying patch '0001-numpy-core-Define-RISCV-32-support.patch' on target directory '/home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/numpy-2.1.3'
CmdError('quilt --quiltrc /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/recipe-sysroot-native/etc/quiltrc push', 0, "stdout: Applying patch 0001-numpy-core-Define-RISCV-32-support.patch
can't find file to patch at input line 19
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
|From: Khem Raj <raj.khem@gmail.com>
|Date: Sun, 15 Nov 2020 15:32:39 -0800
|Subject: [PATCH] numpy/core: Define RISCV-32 support
|
|Helps compile on riscv32
|
|Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
|Signed-off-by: Khem Raj <raj.khem@gmail.com>
|---
| numpy/core/include/numpy/npy_cpu.h    | 3 +++
| numpy/core/include/numpy/npy_endian.h | 1 +
| 2 files changed, 4 insertions(+)
|
|diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
|index 78d229e..04be511 100644
|--- a/numpy/core/include/numpy/npy_cpu.h
|+++ b/numpy/core/include/numpy/npy_cpu.h
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 40
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
|index 5e58a7f..0926212 100644
|--- a/numpy/core/include/numpy/npy_endian.h
|+++ b/numpy/core/include/numpy/npy_endian.h
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch 0001-numpy-core-Define-RISCV-32-support.patch does not apply (enforce with -f)

stderr: ")
ERROR: Logfile of failure stored in: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_patch.3277955
ERROR: Task (/home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1394 tasks of which 1363 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_patch
    log: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_patch.3277955
Summary: There was 1 ERROR message, returning a non-zero exit code.
~/workspace/yocto/poky/build $

So one of the patches we carry fails to apply now. A look at the upstream numpy repo shows that the PR mentioned in its commit message has been merged, but isn’t in this release (at this point it’s showing up in v2.2.x and later tags), seen here.

Usually when something like this occurs, you can fix it by doing the following:

  1. Cloning a copy of the upstream repo
  2. Checking out the tag for your target version (in this case, v2.1.3)
  3. Doing git am /path/to/the/yocto/recipe/patch/file.patch
  4. Resolving conflicts manually and/or with the help of a tool such as wiggle

Let’s try that:

~/workspace/git/pythonsrc/numpy $ git checkout v2.1.3
Note: switching to 'v2.1.3'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 98464cc0cb Merge pull request #27690 from charris/prepare-2.1.3

~/workspace/git/pythonsrc/numpy $ git am ~/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
Applying: numpy/core: Define RISCV-32 support
error: numpy/core/include/numpy/npy_cpu.h: does not exist in index
error: numpy/core/include/numpy/npy_endian.h: does not exist in index
Patch failed at 0001 numpy/core: Define RISCV-32 support
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
~/workspace/git/pythonsrc/numpy $ wiggle -r -p ~/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
wiggle: Cannot find files to patch: please specify --strip
wiggle: aborting

Interestingly, it seems that the files can’t be found at all. Seems odd, right? A quick glance at the numpy subdirectory inside that project repo shows us why (core has been renamed to _core):

~/workspace/git/pythonsrc/numpy $ ls numpy/
_array_api_info.py   compat            _core          _distributor_init.py  dtypes.pyi             f2py                    __init__.pxd  linalg     meson.build       _pytesttester.pyi  strings  typing
_array_api_info.pyi  __config__.py.in  core           distutils             exceptions.py          fft                     __init__.py   ma         polynomial        py.typed           testing  _utils
_build_utils         _configtool.py    ctypeslib.py   doc                   exceptions.pyi         _globals.py             __init__.pyi  matlib.py  _pyinstaller      random             tests    version.pyi
char                 conftest.py       ctypeslib.pyi  dtypes.py             _expired_attrs_2_0.py  __init__.cython-30.pxd  lib           matrixlib  _pytesttester.py  rec                _typing

So we can modify the paths inside the patch file to match. Then it applies:

~/workspace/git/pythonsrc/numpy $ vim ~/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
~/workspace/git/pythonsrc/numpy $ wiggle -r -p ~/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
~/workspace/git/pythonsrc/numpy $ git status
HEAD detached at v2.1.3
You are in the middle of an am session.
  (fix conflicts and then run "git am --continue")
  (use "git am --skip" to skip this patch)
  (use "git am --abort" to restore the original branch)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   numpy/_core/include/numpy/npy_cpu.h
        modified:   numpy/_core/include/numpy/npy_endian.h

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        numpy/_core/include/numpy/npy_cpu.h.porig
        numpy/_core/include/numpy/npy_endian.h.porig
        venv/

no changes added to commit (use "git add" and/or "git commit -a")
~/workspace/git/pythonsrc/numpy $ git add numpy/_core/include/numpy/npy_cpu.h numpy/_core/include/numpy/npy_endian.h
~/workspace/git/pythonsrc/numpy $ git am --continue
Applying: numpy/core: Define RISCV-32 support
~/workspace/git/pythonsrc/numpy $ git format-patch -1
0001-numpy-core-Define-RISCV-32-support.patch

At this point, update the carried version of the patch:

~/workspace/git/pythonsrc/numpy $ cp 0001-numpy-core-Define-RISCV-32-support.patch ~/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch

Now it should apply. In a real upgrade scenario, you’d also want to modify that patch’s commit message to say what was done, e.g. at least to say it was reworked to apply on version v2.1.3.

License Update!

Let’s try building again:

~/workspace/yocto/poky/build $ bitbake python3-numpy
Loading cache: 100% |##########################################################################################################################################################################################################################| Time: 0:00:00
Loaded 1969 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.9.1"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "5.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp
meta-selftest        = "HEAD:edfab1a3cebc454e4d63caae0134e02d169260c6"

Sstate summary: Wanted 258 Local 11 Mirrors 0 Missed 247 Current 464 (4% match, 65% complete)############################################################################################################################                      | ETA:  0:00:00
Initialising tasks: 100% |#####################################################################################################################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
ERROR: python3-numpy-2.1.3-r0 do_populate_lic: QA Issue: python3-numpy: The LIC_FILES_CHKSUM does not match for file://LICENSE.txt;md5=a752eb20459cf74a9d84ee4825e8317c
python3-numpy: The new md5 checksum is 1de863c37a83e71b1e97b64d036ea78b
python3-numpy: Here is the selected license text:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Copyright (c) 2005-2024, NumPy Developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.

...
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python3-numpy: Check if the license information has changed in /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/numpy-2.1.3/LICENSE.txt to verify that the LICENSE value "BSD-3-Clause & BSD-2-Clause & PSF-2.0 & A]
ERROR: python3-numpy-2.1.3-r0 do_populate_lic: Fatal QA errors were found, failing task.
ERROR: Logfile of failure stored in: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_populate_lic.3304105
ERROR: Task (/home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_populate_lic) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1408 tasks of which 1392 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_populate_lic
    log: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_populate_lic.3304105
Summary: There were 2 ERROR messages, returning a non-zero exit code.

Right away we got another failure. Let’s look at the diff between v1.26.4 and v2.1.3 in the numpy repo to see what happened to the LICENSE.txt file:

~/workspace/git/pythonsrc/numpy $ git diff v1.26.4..v2.1.3 LICENSE.txt
diff --git a/LICENSE.txt b/LICENSE.txt
index 014d51c98d..6ccec6824b 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2005-2023, NumPy Developers.
+Copyright (c) 2005-2024, NumPy Developers.
 All rights reserved.

 Redistribution and use in source and binary forms, with or without

It’s only the copyright year that changed, but we’ll need to go and edit the numpy recipe file again to update LIC_FILES_CHKSUM:

~ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1de863c37a83e71b1e97b64d036ea78b"

This change should also be indicated in the upgrade patch’s commit message, with a line like:

License-Update: Change copyright year to 2024

Build Backend Change

Let’s invoke bitbake yet again:

~/workspace/yocto/poky/build $ bitbake python3-numpy
Loading cache: 100% |##########################################################################################################################################################################################################################| Time: 0:00:00
Loaded 1969 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################################################################################| Time: 0:00:00
Parsing of 993 .bb files complete (992 cached, 1 parsed). 1969 targets, 56 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.9.1"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "5.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp
meta-selftest        = "HEAD:edfab1a3cebc454e4d63caae0134e02d169260c6"

Sstate summary: Wanted 256 Local 11 Mirrors 0 Missed 245 Current 466 (4% match, 66% complete)############################################################################################################################                      | ETA:  0:00:00
Removing 1 stale sstate objects for arch core2-64: 100% |######################################################################################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
...

This time it takes a lot longer before we get any sort of feedback, but when we do (surprise!), it’s another error:

ERROR: python3-numpy-2.1.3-r0 do_compile: 'python3 setup.py bdist_wheel ' execution failed.
ERROR: python3-numpy-2.1.3-r0 do_compile: Execution of '/home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/run.do_compile.4016285' failed with exit code 1
ERROR: Logfile of failure stored in: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_compile.4016285
Log data follows:
| DEBUG: Executing shell function do_compile
| /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/recipe-sysroot-native/usr/bin/python3-native/python3: can't open file '/home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.y
| ERROR: 'python3 setup.py bdist_wheel ' execution failed.
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_compile) failed with exit code '1'

It appears that when do_compile tries to go and make use of numpy’s setup.py file, it can’t find it. Looking at the top-level repo contents, it’s indeed missing, but what you may notice is that there are files present for the meson build backend:

~/workspace/git/pythonsrc/numpy $ ls
0001-numpy-core-Define-RISCV-32-support.patch  azure-steps-windows.yml  branding                CITATION.bib  environment.yml  LICENSES_bundled.txt  meson.build  meson_options.txt  pavement.py     pytest.ini  requirements  tools           venv
azure-pipelines.yml                            benchmarks               building_with_meson.md  doc           INSTALL.rst      LICENSE.txt           meson_cpu    numpy              pyproject.toml  README.md   THANKS.txt    vendored-meson

So let’s try updating the recipe file to use that now. For Python recipes, you can do this by replacing setuptools3 in the inherit line with python_mesonpy:

~ inherit ptest python_mesonpy github-releases cython

Round and Round

After another bitbake invocation:

~/workspace/yocto/poky/build $ bitbake python3-numpy                                                                                                                                                        
Loading cache: 100% |##########################################################################################################################################################################################################################| Time: 0:00:00
Loaded 1969 entries from dependency cache.                                                                                                                                                                                                                    
Parsing recipes: 100% |########################################################################################################################################################################################################################| Time: 0:00:00
Parsing of 993 .bb files complete (992 cached, 1 parsed). 1969 targets, 56 skipped, 0 masked, 0 errors.                                                                                                                                                       
NOTE: Resolving any missing task queue dependencies                                                                                                                                                                                                           
                                                                                                                                                                                                                                                              
Build Configuration:                                                                                                                                                                                                                                          
BB_VERSION           = "2.9.1"                                                                                                                                                                                                                                
BUILD_SYS            = "x86_64-linux"                                                                                                                                                                                                                         
NATIVELSBSTRING      = "universal"                                                                                                                                                                                                                            
TARGET_SYS           = "x86_64-poky-linux"                                                                                                                                                                                                                    
MACHINE              = "qemux86-64"                                                                                                                                                                                                                           
DISTRO               = "poky"                                                                                                                                                                                                                                 
DISTRO_VERSION       = "5.1"                                                                                                                                                                                                                                  
TUNE_FEATURES        = "m64 core2"                                                                                                                                                                                                                            
TARGET_FPU           = ""                                                                                                                                                                                                                                     
meta                                                                                                                                                                                                                                                          
meta-poky                                                                                                                                                                                                                                                     
meta-yocto-bsp                                                                                                                                                                                                                                                
meta-selftest        = "HEAD:edfab1a3cebc454e4d63caae0134e02d169260c6"                                                                                                                                                                                        
                                                                                                                                                                                                                                                              
Sstate summary: Wanted 92 Local 18 Mirrors 0 Missed 74 Current 655 (19% match, 90% complete)#############################################################################################################################                      | ETA:  0:00:00
Removing 7 stale sstate objects for arch x86_64: 100% |########################################################################################################################################################################################| Time: 0:00:00
Removing 1 stale sstate objects for arch core2-64: 100% |######################################################################################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks                                                                                                                                                                                                                                         
ERROR: python3-numpy-2.1.3-r0 do_compile: Execution of '/home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/run.do_compile.4143925' failed with exit code 1
ERROR: Logfile of failure stored in: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_compile.4143925                                                                                                   
Log data follows:                                                                                                                                                                                                                                             
| DEBUG: Executing shell function do_compile       
| * Getting build dependencies for wheel...                                                                                                                                                                                                                   
| * Building wheel...                                                                                                          
| + /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/recipe-sysroot-native/usr/bin/nativepython3 /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/numpy-2.1.3/vendored-mei
| The Meson build system             
| Version: 1.5.2                  
| Source dir: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/numpy-2.1.3
| Build dir: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/build
| Build type: cross build    
| Project name: NumPy       
| Project version: 2.1.3          
| C compiler for the host machine: x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/tgamblin/workspace/yocto/poky)
| C linker for the host machine: x86_64-poky-linux-gcc -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/tgamblin/workspace/yocto/poky/b1
| C++ compiler for the host machine: x86_64-poky-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/tgamblin/workspace/yocto/po)
| C++ linker for the host machine: x86_64-poky-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/tgamblin/workspace/yocto/poky1
| Cython compiler for the host machine: cython3 (cython 3.0.11)                                                                
| C compiler for the build machine: gcc (gcc 12.2.0 "gcc (Debian 12.2.0-14) 12.2.0")
| C linker for the build machine: gcc ld.bfd 2.40
| C++ compiler for the build machine: g++ (gcc 12.2.0 "g++ (Debian 12.2.0-14) 12.2.0")
| C++ linker for the build machine: g++ ld.bfd 2.40
| Cython compiler for the build machine: cython3 (cython 3.0.11)
| Build machine cpu family: x86_64
| Build machine cpu: x86_64
| Host machine cpu family: x86_64
| Host machine cpu: x86_64
| Target machine cpu family: x86_64
| Target machine cpu: x86_64
| Program python3 found: YES (/home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/recipe-sysroot-native/usr/bin/nativepython3)
| Did not find pkg-config by name 'pkg-config'
| Found pkg-config: NO
| Run-time dependency python found: NO (tried pkgconfig, pkgconfig and sysconfig)
| 
| ../numpy-2.1.3/meson.build:41:12: ERROR: Python dependency not found
| 
| A full log can be found at /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/build/meson-logs/meson-log.txt
| 
| ERROR Backend subprocess exited when trying to invoke build_wheel
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2085 tasks of which 1949 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_compile
    log: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_compile.4143925
Summary: There was 1 ERROR message, returning a non-zero exit code.

Let’s edit the inherit line again to look like:

~ inherit pkgconfig ptest python_mesonpy github-releases cython

and try again.

Closer, Closer…

This time, when we try to build we see some QA warnings:

~/workspace/yocto/poky/build $ bitbake python3-numpy
Loading cache: 100% |##########################################################################################################################################################################################################################| Time: 0:00:00
Loaded 1969 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################################################################################| Time: 0:00:00
Parsing of 993 .bb files complete (992 cached, 1 parsed). 1969 targets, 56 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.9.1"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "5.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp
meta-selftest        = "HEAD:edfab1a3cebc454e4d63caae0134e02d169260c6"

Sstate summary: Wanted 27 Local 10 Mirrors 0 Missed 17 Current 720 (37% match, 97% complete)#############################################################################################################################                      | ETA:  0:00:00
Initialising tasks: 100% |#####################################################################################################################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
ERROR: python3-numpy-2.1.3-r0 do_package_qa: QA Issue: File /usr/lib/python3.13/site-packages/numpy/__config__.py in package python3-numpy contains reference to TMPDIR [buildpaths]
ERROR: python3-numpy-2.1.3-r0 do_package_qa: QA Issue: non -staticdev package contains static .a library: python3-numpy path '/usr/lib/python3.13/site-packages/numpy/_core/lib/libnpymath.a' [staticdev]
ERROR: python3-numpy-2.1.3-r0 do_package_qa: QA Issue: File /usr/lib/python3.13/site-packages/numpy/__pycache__/__config__.cpython-313.pyc in package python3-numpy contains reference to TMPDIR [buildpaths]
ERROR: python3-numpy-2.1.3-r0 do_package_qa: Fatal QA errors were found, failing task.
ERROR: Logfile of failure stored in: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_package_qa.39587
ERROR: Task (/home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_package_qa) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2118 tasks of which 2080 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb:do_package_qa
    log: /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.1.3/temp/log.do_package_qa.39587
Summary: There were 4 ERROR messages, returning a non-zero exit code.

This is a common problem known as “host contamination”, where for various reasons (e.g. build files carrying the full path to a compiler binary), the final copies of binaries, libraries, and other files to be deployed contain references to the contents of the system they were created on. This sort of issue conflicts with one of the key goals of the Yocto Project, which is to support reproducible builds. There are a lot of reasons for doing this, so it’s probably better to read about them on the Yocto docs page.

Fixes for host contamination related to TMPDIR can vary a lot from recipe to recipe, but they often involve some sort of post-compile stripping of the paths from relevant files. In python3-numpy‘s case, we have to add a do_install:append() function to the recipe to strip various build paths from the __config__.py file and recompile it:

+ # Remove references to buildpaths from numpy's __config__.py
+ do_install:append() {
+     sed -i 
+         -e 's|${S}=||g' 
+         -e 's|${B}=||g' 
+         -e 's|${RECIPE_SYSROOT_NATIVE}=||g' 
+         -e 's|${RECIPE_SYSROOT_NATIVE}||g' 
+         -e 's|${RECIPE_SYSROOT}=||g' 
+         -e 's|${RECIPE_SYSROOT}||g' ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
+
+     nativepython3 -mcompileall -s ${D} ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
+ }
+

If you look at the recipe closely, you’ll also see that the FILES:${PN}-staticdev variable still uses the old core (not _core) path, so update that too:

~ FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/_core/lib/*.a 
+                           ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a 
+ "

Success (Sort of)

Finally, bitbake succeeds:

~/workspace/yocto/poky/build $ bitbake python3-numpy
Loading cache: 100% |##########################################################################################################################################################################################################################| Time: 0:00:00
Loaded 1969 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################################################################################| Time: 0:00:00
Parsing of 993 .bb files complete (992 cached, 1 parsed). 1969 targets, 56 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.9.1"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "5.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp
meta-selftest        = "HEAD:edfab1a3cebc454e4d63caae0134e02d169260c6"

Sstate summary: Wanted 17 Local 10 Mirrors 0 Missed 7 Current 730 (58% match, 99% complete)##############################################################################################################################                      | ETA:  0:00:00
Removing 1 stale sstate objects for arch qemux86_64: 100% |####################################################################################################################################################################################| Time: 0:00:00
Removing 5 stale sstate objects for arch core2-64: 100% |######################################################################################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 2119 tasks of which 2109 didn't need to be rerun and all succeeded.

At this point you could summarize your changes and submit them, but there’s more due diligence that you should ideally do first as a maintainer:

  1. This initial update and build targeted the default x86_64 architecture, and we want to ensure it works for others (especially since we modified a patch for RISCV32 support). There’s a handy script available in oe-core/poky called buildall-qemu that will take some time (and space!) to complete, but it’ll work through every supported qemu architecture and LIBC (i.e. glibc and musl) combo, trying to build the target for them and reporting the outcome. You can invoke it for python3-numpy by doing buildall-qemu python3-numpy. When it’s done, you should find a file named something like python3-numpy-buildall.log in your build directory with a summary that you can include in your commit message.
  2. Reproducibility tests! The setup details can be found here. This is another step that will take a long time, but it’s important to do to ensure that one of the project maintainers doesn’t reject your patch after it reaches the Autobuilder for integration testing (and it makes them feel better about taking your patches!).
  3. Generally, it’s a good idea to some sort of actual runtime testing. For most recipes, you can simply do something like IMAGE_INSTALL:append = "python3-numpy" to your local.conf file and build core-image-minimal, then run it with runqemu kvm nographic (the kvm part assumes you have access to that on your build host). At this point you can login and do some sort of simple check – in most Python modules’ case, you can just start the interpreter with python3 and then trying import <package>, which at bare minimum tests that the recipe already pulls in all of the module’s other dependencies. If your recipe supports ptests (ptest should be in the inherit line), then you can instead do bitbake core-image-ptest-<recipename> and run that, then run ptest-runner <recipename> and see how those results come out.

Post-Submission Surprises

If you were looking closely in the Setup section, you might have noticed that there was a separate commit for adding pkgconfig to numpy:

0b625064112 python3-numpy: inherit pkgconfig

At some point while readying my upgrade patch for submission, I accidentally stripped that addition out of the recipe, and the patch went upstream without it. This caused a fair bit of confusion once it hit testing on the Yocto Autobuilder, as it only seemed to fail on certain hosts such as Fedora 41, and I couldn’t reproduce it locally. Simply submitting the patch to add pkgconfig again was part of the solution, but doing so alone only masked the real issue at play. It’s probably better for you to read the Bugzilla entry for more details on the problem and its solution, but the message here is to understand that even if you are doing your part and testing the changes you make as much as possible, the Yocto Project is a complex system, and even the best-tested upgrades can cause strange and challenging problems to occur once they are introduced to the wider ecosystem.

Conclusion

This has hopefully been an informative and interesting exploration into some of the obstacles that can arise when trying to upgrade package recipes for the Yocto Project. Usually, they’re a lot simpler than this, but I found this particular upgrade to be a great example because it touches on so many different build issues at once. If you’d like to see the final version of the upgrade as it is in the upstream repositories, you can find it here.

It’s worth noting that this walkthrough covers only the final version of the python3-numpy upgrade from v1.26.4 and v2.1.3. There were previous attempts (now found only in the oe-core mail archive) to v2.0.1 and v2.1.2, along with various related changes to recipes like piglit happening around the same time. The content here doesn’t quite capture the amount of effort and discussion that ultimately went into the upgrade, which goes to show how complicated maintaining the project can really be sometimes when you extrapolate that to the entire core layer – and that’s just one of many.

This may be the last Yocto-focused post for a while, although some of the concepts may feature in future writing about build/test automation and making use of development boards such as the BeaglePlay.

See Also

Categories
Community Open-source Zephyr

BayLibre contributions to Zephyr v4.1.0


The Zephyr Project recently released version 4.1 on March 7th 2025. BayLibre is proud to have contributed to this release in several areas.

Storage

Riadh Ghaddab continued his work on the ZMS storage susbsystem where he added some optimization to avoid unnecessary reads.

He also designed a new backend for the Settings subsystem in order to add support for ZMS as storage solution.

Board support

Julien Panis and Stoyan Bogdanov greatly improved the support for the Texas Instruments’ CC23x0 SOC family by adding drivers for pinctrl, flash memories, UART, GPIO and SysTim (system timer).

They also enabled support for UART, LED, GPIO and Flash memory on the LaunchPad LP-EM-CC2340R5 so that it’s now possible to easily run most of the basic Zephyr samples on this development kit.

Alexandre Bailon extended the OpenOCD configuration file for the Texas Instruments LP-CC1352P7 so that it’s possible to specify the serial number for the board to be flashed. This is really helpful in case there are multiple boards connected simultaneously at the same PC.

GPIO/DAC

Stoyan Bogdanov implemented the driver for ADI MAX22190 industrial GPIO expanders. This chip is an 8 channel industrial input over SPI interface including various advanced diagnostics for input channels such as wire break, over voltage, under voltage and others.

Guillaume Ranquet added DAC and GPIO drivers for the MFD Analog Devices MAX22017 which provides a two 16-channel analog outputs and 6 GPIOs.

OpenThread

Alexandre Bailon added a really nice sample code which shows how to use OpenThread and its CoAP API. The sample allows to build both server and client sides of the OpenThread network. Once the 2 boards are flashed and turned on, the network is automatically created and from there on it will be possible to control LEDs on the server side by acting on the GPIOs on the client one.

PTP

Adam Wojasinski continued improving the PTP network protocol by fixing potential issues reported by coverity tool.

Kernel

Nicolas Pitre’s contributions include improvements to the way the currently running thread is represented, simplifications and optimizations to the new pipe mechanism, and cleanups to the ring buffer code.

Crypto

Valerio Setti completed the deprecation of TinyCrypt by removing it also from Bluetooth subsystem and replacing it with PSA API.

He also worked on reducing the Mbed TLS footprint and heap usage. On the former point now hardware entropy drivers are automatically enabled if the platform support this feature. On the latter static key slot buffers can be used while building the PSA Crypto core.

Valerio also fixed a build failure for the HTTP-server sample code and took the opportunity to move it from legacy Mbed TLS crypto to PSA API.

Summary

Type Count
Authored 111
Signed-off-by 23
Categories
Community Linux Kernel Open-source

BayLibre contributions to Linux v6.13

Linus released Linux 6.13 on January 19, 2025. Once more, BayLibre was among the top 20 companies that contributed to the Linux kernel (LWN. Here are some of the areas we worked on.

IIO

In order for the write_event_config callback’s signature to match that of the user input handling iio_ev_state_store() function, Julien Stephan updated it. The user input is transformed into a bool and sent to the write_event_config. Thus, an int argument is not necessary. He could also get rid of several input checks in drivers by changing the former to bool.

Two dedicated macros for non-differential channels and one generic macro are available in the IIO subsystem for creating event identifiers. It made no sense to expect differential channels to use the generic macro. Julien updated the descriptions of the existing macros to make their usage more explicit and introduced a special helper macro for differential channels to improve clarity.

The IIO subsystem has macros to create event identifiers: one generic macro and two specific ones for non-differential channels. Differential channels were expected to use the generic macro, which wasn’t intuitive. To improve clarity, Julien introduced a dedicated helper macro for differential channels and updated the descriptions of the existing macros to make their usage more explicit.

Analog Devices

All ADI drivers that could make use of the new devm_regulator_get_enable_read_voltage() helper function have been converted, thanks to the efforts of David Lechner. In addition, he performed a few minor ADI driver cleanups and fixes.

To get the ad7124 driver to function on the DE10-Nano Development Kit, Uwe Kleine-König began resolving several bugs in the driver itself and the ad_sigma_delta shim used by it.

Trevor Gamblin resolved an issue on the ad4695 where the device failed to correctly exit conversion mode, potentially leading to data corruption with sequential buffered reads.

Additionally, Trevor added a new driver for the 16-Bit 6MSPS Differential ADC, AD7625.

Guillaume Stols added support for the parallel interface using the IIO backend framework and PWM triggering in the ad7606 ADC driver along with a few minor fixes.

Work on adding support for AD7606-C16 and AD7606-C18 was done by Alexandru Ardelean. These are two relatively recent additions to the ADI AD7606 chip family. 16-bit precision is supported by the C16, and 18-bit precision by the C18. Only 16-bit precision were supported by the Linux driver up until this point. Additionally, these new devices support a more sophisticated SoftwareMode that allows distinct voltage ranges to be defined for each channel. Before code supporting these two devices could be added, the ad7606 driver had to undergo some rework.

In addition to the aforementioned upgrades, Alexandru expanded the functionality of the driver to accommodate AD7607, AD7608, and AD7609.

Alexandru found and fixed a bug while he was working on the ad7606 driver. While debugging, he also discovered an approximately 9-year-old bug in the generic find_closest() macro. Only a small number of iio and hwmon drivers were impacted by this bug. Additionally, Alexandru added a unit test to prevent regressions in the future.

Julien Stephan added support for two more compatible chips, ADAQ4380-4 and ADAQ4370-4, and corrected the oversampling formula in the ad7380 driver.

The AD3552r is a SPI-controlled, 16-bit, dual-channel, 33 MUPS DAC. A specific QSPI + DDR interface (double data rate) must be available at the controller side in order to achieve the maximum speed of 33MUPS. To support this, ADI developed a dedicated FPGA HDL for AXI DACs. To support it, Angelo Dureghello expanded the driver and the DAC backend module that manages the HDL.

Axel Haslam enhanced the devicetree bindings and driver for the ad5791 digital/analog converter.

PWM

Working on the PWM framework, Uwe Kleine-König added new waveform consumer API functions. Additionally, he implemented waveform callbacks for a number of drivers (such as axi-pwmgen), which made it possible to express and meet the requirements for high-speed ADC readings.

He handled the PWM subsystem’s review and maintenance as usual.

PM

In order to support multiple system-wide low-power states, Kevin Hilman added support for utilizing PM QoS constraints to communicate with the power-management co-processor on TI AM62x SoCs. Kevin also continues to maintain legacy OMAP SoCs where various cleanups and new features keep coming in.

To support suspend/resume on am62 SoCs, Markus Schneider-Pargmann submitted patches that were authored by several individuals.

I2C

In multiple patches, Uwe attempts to eliminate null assignments of i2c_device_id::driver_data in order to eventually eliminate a large number of casts pertaining to i2c_device_id. This work will continue into the next release as it is not completed in this one.

Misc

Nicolas Pitre went over his years-old implementations of do_div() for 32-bit systems, both generic and ARM-specific; in particular, he focused on changing constant divisors into reciprocal multiplications. More optimization and numerous simplifications that were added to upstream Linux were still possible.

A number of patches that Uwe Kleine-König submitted improve small aspects he noticed during his routine work on the kernel, specifically in the areas of SPI, GPIO, UAPI, and other subsystems.

Additionally, Uwe provided clarification regarding “GPL” and “Proprietary” licensing. This came about as a consequence of the GPL conversation with Tuxedo and was also discussed on LWN.

Uwe kept working on moving drivers to the less error-prone platform_driver::remove(). Linus completed this work here.

Summary

Type Count
Authored 208
Co-developed-by 1
Signed-off-by 9
Acked-by 8
Reviewed-by 51
Tested-by 15
Suggested-by 3
Categories
Community Linux Kernel MediaTek Open-source Texas Instruments

Baylibre contributions to Linux v6.11 and v6.12


Linus Torvalds released the Linux kernel version 6.11 on September 15th and version 6.12 on November 17th.

We were among the top 20 contributors by employer in the v6.11 release.

PWM

Uwe Kleine-König introduced a new PWM waveform abstraction to the PWM subsystem fulfilling one of his Visions for the Linux Kernel PWM Subsystem. This also lead to some fixes and improvements in the STM32 PWM driver as it was the first driver to support this new abstraction.

Uwe also reviewed and merged patches as well as authored a number of housekeeping patches as part of his maintainer duties.

Trevor Gamblin added a new driver for the AXI PWM generator, a FPGA IP core, which also supports the new waveform abstraction. This driver was the second to be converted to the new PWM abstraction and so the gained flexibility could be used to improve the ad7625 driver.

Analog Devices

Guillaume Stols made his first contributions to the Linux kernel with a bunch of fixes for the ad7606 analog/digital converter driver to prepare for adding new features to this driver.

Similarly, Angelo Dureghello made preparatory patches to the ad3552r digital/analog converter driver to get ready for adding support for high-speed support using an FPGA. He also added support for two additional chips to this driver.

Julien Stephan and David Lechner added a new driver for the ad7380 family of analog/digital converters. Julien then continued this work to add support for more chips in this family and additional features in the driver.

David Lechner added a new driver for the ad4695 family of analog/digital converters. He also continued his work on making use of the devm_regulator_get_enable_read_voltage() helper to simplify code across the IIO subsystem as well as continuing to make improvements to the AXI SPI Engine driver.

Trevor Gamblin audited the entire IIO subsystem to make use of regmap_set_bits() and regmap_clear_bits() where appropriate.

Mediatek

Alexandre Mergnat added sound and video support for the MT8365 SoC.

Nicolas Pitre added thermal support to Mediatek MT8186 and MT8188 SoCs.

Fabien Parent, Nicolas Belin, and Julien Panis contributed a few additional patches.

Texas Instruments

Markus Schneider-Pargmann fixed several issues in the m_can driver. This is a CAN driver for a hardware unit that can be embedded in a SoC and is also available as a SPI device.

Markus also added support for the wakeup-source property to the omap 8250 serial driver. This prevents the SoC from always waking up on UART activity and now only wakes up when explicitly enabled.

Nicolas Pitre fixed some bugs in the am65-cpsw ethernet driver.

Miscellaneous

Nicolas Pitre improved the precision of the mul_u64_u64_div_u64() function in some cases.

Jérôme Brunet made various cleanups and fixes for Amlogic and ASoC code.

Summary

v6.11

Type Count
Authored 168
Co-developed-by 4
Signed-off-by 8
Acked-by 52
Reviewed-by 18
Tested-by 5
Suggested-by 41

v6.12

Type Count
Authored 119
Signed-off-by 7
Acked-by 6
Reviewed-by 65
Tested-by 14
Categories
Android Community U-Boot

Android bootflow: experiments with U-Boot and GBL

Booting Android is fairly different from traditional Linux distributions. There are multiple partitions involved, the bootloader needs to pick a boot slot and decide which boot mode will be used. Because of this, Android has specific bootloader requirements. The AOSP documentation gives an overview of these.

In this blog post, we will explore how to boot Android on the BeaglePlay board using U-Boot’s standard boot and the Generic Bootloader Library (GBL).

Getting started

Let’s prepare our board with pre-built Android images to avoid rebuilding it ourselves. Texas Instruments provides Android releases for the BeaglePlay.

  1. Download the TI AM62X SDK 10.0 release image.
  2. Follow the BeaglePlay instructions to flash Android on the BeaglePlay’s eMMC.

Android bootmeth via standard boot (U-Boot)

U-Boot has many ways of loading various OS such as boot scripts, distro bootcmd and more. The most recent way of booting is named standard boot.

Standard boot has the concept of bootmeth, which describes how U-Boot should boot a particular OS.

Since U-Boot v2024.10, the Android bootmeth provides support for booting Android using standard boot.

Given that the TI AM62X SDK 10.0 shipped with U-Boot v2024.04, standard boot support is not included. Let’s see how we can enable it on our BeaglePlay.

Building U-Boot

The U-Boot BeaglePlay documentation explains how to fetch and build everything we need.

Let’s give it a try:

$ mkdir ~/src/beagleplay-bootloaders && cd $_
$ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
$ git clone https://github.com/OP-TEE/optee_os.git
$ git clone https://git.ti.com/git/processor-firmware/ti-linux-firmware.git -b ti-linux-firmware
$ git clone https://source.denx.de/u-boot/u-boot.git

At the time of writing, we are experimenting using U-Boot v2025.01-rc4. Let’s make sure we use the same here:

$ cd u-boot
$ git fetch origin --tags && git checkout v2025.01-rc4

Follow the build procedure. Make sure to use the Android defconfig fragment as documented:

$ export UBOOT_CFG_CORTEXR="${UBOOT_CFG_CORTEXA} am62x_a53_android.config"

Flashing the new U-Boot on the BeaglePlay

After we are done building, we can reboot our BeaglePlay in bootloader mode and reflash the new images.

# Prepare tispl.bin and u-boot.img
$ dd if=/dev/zero of=bootloader.img bs=1048576 count=8
$ mkfs.vfat bootloader.img
$ mcopy -i bootloader.img u-boot/tispl.bin ::tispl.bin
$ mcopy -i bootloader.img u-boot/u-boot.img ::u-boot.img

# Flash everything to eMMC
$ adb reboot bootloader
$ fastboot flash tiboot3 u-boot/tiboot3.bin
$ fastboot flash bootloader bootloader.img

Then, we can reboot into our new bootloaders:

$ fastboot reboot

Make sure to halt in the U-Boot console:

U-Boot 2025.01-rc4 (Dec 16 2024 - 14:28:36 +0100)

SoC:   AM62X SR1.0 GP
Model: BeagleBoard.org BeaglePlay
DRAM:  2 GiB
Core:  109 devices, 31 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Press SPACE to abort autoboot in 2 seconds
=>

Run

To interact with standard boot, we can use the bootflow command.

=> bootflow scan -l

Will show us that there is an Android bootmeth available

Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning bootdev 'mmc@fa10000.bootdev':
  0  android      ready   mmc          0  mmc@fa10000.bootdev.whole
No more bootdevs
---  -----------  ------  --------  ----  ------------------------  ----------------
(1 bootflow, 1 valid)

Let’s select it and print some information:

=> bootflow select 0
=> bootflow info
Name:      mmc@fa10000.bootdev.whole
Device:    mmc@fa10000.bootdev
Block dev: mmc@fa10000.blk
Method:    android
State:     ready
Partition: 0
Subdir:    (none)
Filename:  <NULL>
Buffer:    (not loaded)
Size:      0 (0 bytes)
OS:        Android
Cmdline:   androidboot.slot_suffix=_a androidboot.bootloader=2025.01-rc4 androidboot.force_normal_boot=1
Logo:      (none)
FDT:       <NULL>
Error:     0

Finally, we can start Android with:

=> bootflow boot

While developping bootmeth_android, we also discovered that Google was working on a new initiative: the Generic Bootloader Library (GBL).

Generic Bootloader Library (EFI application)

At Linux Plumbers 2024, the Android system developers presented The Generic Bootloader Library (GBL). This efforts aims to help SoC vendors to keep up with Android’s evolving bootloader requirements.

GBL is implemented as an EFI application, written in rust. The official documentation is available here

While GBL is still in early development phases, it would be nice to run it on the BeaglePlay as well. Let’s give it a try!

Building GBL

Fetch the code with:

$ mkdir ~/src/uefi-gbl-mainline && cd $_
$ repo init -u https://android.googlesource.com/kernel/manifest -b uefi-gbl-mainline
$ repo sync -j16

Build the EFI executable:

$ ./tools/bazel run //bootable/libbootloader:gbl_efi_dist --extra_toolchains=@gbl//toolchain:all

We now have an EFI executable here:

$ ls out/gbl_efi
gbl_aarch64.efi  gbl_riscv64.efi  gbl_x86_32.efi  gbl_x86_64.efi

In our case, we will use gbl_aarch64.efi.

Bundling GBL into an EFI partition

To make sure that U-Boot can start gbl_aarch64.efi, let’s put it in a dedicated partition.

We can create an efi.img file that we can then flash via fastboot on our BeaglePlay.

$ dd if=/dev/zero of=efi.img bs=1048576 count=2 status=none
$ mkfs.vfat efi.img

$ mcopy -i efi.img 
    ~/src/uefi-gbl-mainline/out/gbl_efi/gbl_aarch64.efi 
    ::gbl_aarch64.efi

Here we have a efi.img file that we can flash into a dedicated 2MiB efi partition.

Modify U-Boot

Let’s change U-Boot in order to:

  • Add our new efi partition
  • Configure a new boot option
  • Change BootOrder to boot GBL

BeaglePlay’s eMMC partitions are defined in the board’s environment file. With the following diff, we can add the efi partition:

diff --git a/board/beagle/beagleplay/beagleplay.env b/board/beagle/beagleplay/beagleplay.env
index fc29d49712db..c3dc6efe1b03 100644
--- a/board/beagle/beagleplay/beagleplay.env
+++ b/board/beagle/beagleplay/beagleplay.env
@@ -42,6 +42,7 @@ partitions+=name=vbmeta_vendor_dlkm_b,size=64K,uuid=${uuid_gpt_vbmeta_vendor_dlk
 partitions+=name=super,size=4608M,uuid=${uuid_gpt_super};
 partitions+=name=metadata,size=64M,uuid=${uuid_gpt_metadata};
 partitions+=name=persist,size=32M,uuid=${uuid_gpt_persist};
+partitions+=name=efi,size=2M,uuid=${uuid_gpt_efi};
 partitions+=name=userdata,size=-,uuid=${uuid_gpt_userdata}
 fastboot_raw_partition_tiboot3="0x0 0x800 mmcpart 1"

To configure the new boot option and so on, we can use the efidebug command from U-Boot.

With the following diff, we add a new boot entry named GBL which will use eMMC 0, partition 0x13 (efi) and load the gbl_aarch64.efi binary:

diff --git a/include/env/ti/android.env b/include/env/ti/android.env
index a058beb7fc42..8084d11a7cf6 100644
--- a/include/env/ti/android.env
+++ b/include/env/ti/android.env
@@ -26,6 +26,6 @@ fastboot.partition-type:metadata=f2fs

 boot_targets=mmc0
 mmcdev=0
-bootmeths=android
+bootmeths=efi_mgr
 vendor_boot_comp_addr_r=0xd0000000
-bootcmd=bootflow scan -lb
+bootcmd=efidebug boot add -b 0001 GBL mmc 0:13 gbl_aarch64.efi; efidebug boot order 0001; bootflow scan -lb

These changes are also available on our gitlab.

Modify Android

In order to boot GBL, we also need some small Android modifications. Mostly because GBL and U-Boot don’t use the same lz4 compression algorithm for the kernel.

To avoid any issues, we are going to disable kernel compression.

Download Android 15 source code following our documentation. After building everything, we can apply the following diff in device/ti/am62x:

diff --git a/device-common.mk b/device-common.mk
index 9d41f5dd38d4..e9e5475d08e8 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -21,7 +21,7 @@ TARGET_AVB_ENABLE := true
 endif
 
 # Kernel part
-LOCAL_KERNEL := device/ti/am62x-kernel/kernel/$(TARGET_KERNEL_USE)/Image.lz4
+LOCAL_KERNEL := device/ti/am62x-kernel/kernel/$(TARGET_KERNEL_USE)/Image
 LOCAL_DTB := device/ti/am62x-kernel/kernel/$(TARGET_KERNEL_USE)
 
 PRODUCT_COPY_FILES += 

Let’s reflash our Android 15 build by following the docs and then install our new bootloaders with EFI support and GBL.

Flashing the new bootloaders on the board

After flashing the modified Android 15 system, we can now flash our new bootloaders:

# Prepare tispl.bin and u-boot.img
$ dd if=/dev/zero of=bootloader.img bs=1048576 count=8
$ mkfs.vfat bootloader.img
$ mcopy -i bootloader.img u-boot/tispl.bin ::tispl.bin
$ mcopy -i bootloader.img u-boot/u-boot.img ::u-boot.img

# flash new bootloaders to eMMC
$ fastboot flash tiboot3 u-boot/tiboot3.bin
$ fastboot flash bootloader bootloader.img
$ fastboot reboot bootloader

After reboot, efi_mgr will fail to boot. Let’s enable fastboot manually via the commandline to continue:

=> fastboot usb 0

Then we can continue flashing:

$ fastboot oem format
$ fastboot continue
# Go back to U-Boot shell and re-enable fastboot again
$ fastboot flash efi efi.img

Because we re-partitioned, the userdata partition shrunk a bit. We also need to reflash userdata and metadata to start from a clean state.

$ fastboot flash userdata userdata.img
$ fastboot flash metadata metadata.img

Then reboot:

$ fastboot reboot

With that, we can see GBL running:

U-Boot 2025.01-rc4-00002-gf304c165fa06 (Dec 18 2024 - 14:45:27 +0100)

SoC:   AM62X SR1.0 GP
Model: BeagleBoard.org BeaglePlay
DRAM:  2 GiB
Core:  109 devices, 31 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Press SPACE to abort autoboot in 2 seconds
MMC: no card present
Card did not respond to voltage select! : -110
Cannot persist EFI variables without system partition
Scanning for bootflows in all bootdevs
Seq  Method       State   Uclass    Part  Name                      Filename
---  -----------  ------  --------  ----  ------------------------  ----------------
Scanning global bootmeth 'efi_mgr':
  0  efi_mgr      ready   (none)       0  <NULL>
** Booting bootflow '<NULL>' with efi_mgr
Booting: GBL
****Generic Bootloader Application****
Image path: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6d00000000000000)/eMMC(0)/eMMC(0)/HD(19,GPT,0de54c28-dd18-2843-b86b-de2ba80d8232,0x98f600,0x1000)
Block #0 GPT sync result: Found valid GPT.
Proceeding as Android
Block #0 GPT sync result: Found valid GPT.
Press Backspace to enter fastboot
Try booting as Android
boot mode from BCB: AndroidBootMode::Normal
boot image size: 36837888
boot image cmdline: ""
boot ramdisk size: 0
boot dtb size: 0
vendor ramdisk size: 18329592
vendor cmdline: "cma=512M console=ttyS2,115200 printk.devkmsg=on init=/init quiet firmware_class.path=/vendor/firmware mem_sleep_default=deep 8250.nr_uarts=10 bootconfig"
vendor dtb size: 248680
init_boot image size: 2121415
WARNING: UEFI GblEfiAvbProtocol.validate_vbmeta_public_key implementation is missing. This will not be permitted in the future.
WARNING: UEFI GblEfiAvbProtocol.read_rollback_index implementation is missing. This will not be permitted in the future.
WARNING: UEFI GblEfiAvbProtocol.read_rollback_index implementation is missing. This will not be permitted in the future.
WARNING: UEFI GblEfiAvbProtocol.read_rollback_index implementation is missing. This will not be permitted in the future.
WARNING: UEFI GblEfiAvbProtocol.read_rollback_index implementation is missing. This will not be permitted in the future.
WARNING: UEFI GblEfiAvbProtocol.read_is_device_unlocked implementation is missing. This will not be permitted in the future.
WARNING: UEFI GblEfiAvbProtocol.read_is_device_unlocked implementation is missing. This will not be permitted in the future.
final bootconfig: "androidboot.vbmeta.device=PARTUUID=00000000-0000-0000-0000-000000000000nandroidboot.vbmeta.avb_version=1.3nandroidboot.vbmeta.device_state=unlockednandroidboot.vbmeta.hash_alg=sha256nandroidboot.vbmeta.size=14400nandroidboot.vbmeta.digest=2a0d38d8b37524a1743372a3900a40f3fa6716a398259f087d59b718fa52c0a0nandroidboot.vbmeta.invalidate_on_error=yesnandroidboot.veritymode=enforcingnandroidboot.verifiedbootstate=orangenandroidboot.slot_suffix=_anandroidboot.force_normal_boot=1nandroidboot.hardware=am62xnandroidboot.load_modules_parallel=truenandroidboot.fstab_suffix=am62.mmc.avbnandroidboot.boot_devices=bus@f0000/fa10000.mmcn"
Applying 0 overlays
Overlays applied
linux,initrd-start: 0xe7400000
linux,initrd-end: 0xe8781146
final cmdline: "cma=512M console=ttyS2,115200 printk.devkmsg=on init=/init quiet firmware_class.path=/vendor/firmware mem_sleep_default=deep 8250.nr_uarts=10 bootconfig"

Booting kernel @ 0xe8800000, ramdisk @ 0xe7400000, fdt @ 0xe8781148

Note that GBL is in early development. While experimenting, we have noticed the following limitations:

  • No support for A/B slot (slot _a is hard-coded).
  • No fastboot over USB support.

To conclude

While standard boot (U-Boot) remains the most practical and well-supported for booting Android on the BeaglePlay, GBL is an exciting technology to watch. It shows potential for simplifying bootloader development in the long term but is not production-ready. Developers interested in exploring the bleeding edge of Android bootloader can experiment with GBL, but production devices should continue to rely on more mature solutions like standard boot (U-Boot).

Categories
Community Conferences GCC Open-source Toolchain

BayLibre at Supercomputing 2024

BayLibre has been a key player in the field of Open Source, particularly in embedded systems, for over a decade. Since our founding, we have actively participated in technical conferences around the world where we regularly deliver insightful technical presentations.

SC24

In January 2024, we launched a new Compiler Services business unit, further expanding our commitment to the Open Source ecosystem. This new group specializes in toolchains, particularly GCC, and is staffed by renowned technical experts. BayLibre engineers hold maintainer roles for GCC and contribute to its Fortran programming language support (gfortran), Nvidia and AMD GPU support as well as definition & implementation of the OpenMP/OpenACC programming language extensions.

TS_OpenACC

In November 2024, we attended Supercomputing 2024 (SC24) in Atlanta, Georgia, USA, a conference dedicated to bringing the High-Performance Computing (HPC) industry and academia together.

During SC24, Thomas Schwinge of BayLibre delivered two well-received presentations on the current state of GCC’s support for OpenMP & OpenACC at their respective BoFs. These talks sparked engaging discussions with industry leaders, including representatives from AMD, HPE/Cray, Intel and Nvidia, along with prominent national laboratories focused on advancing the state-of-the-art for HPC.

We are proud of BayLibre’s successful debut at SC24, which has helped to announce our entry into the world of high-performance computing. Looking ahead, we remain dedicated to promoting and advancing Open Source solutions. By tackling cutting-edge technical challenges, we aim to contribute to a better, more innovative future.

Categories
Community Open-source RISC-V Zephyr

BayLibre contributions to Zephyr v4.0

The Zephyr Project recently released version 4.0 on November 16th 2024. BayLibre is proud to have contributed to this release in several areas.

Storage / ZMS

Riadh Ghaddab worked on one of the major features of the Zephyr 4.0 release: Zephyr Memory Storage (ZMS). This is a new storage system that is designed to work with all types of non-volatile storage technologies. It supports classical on-chip NOR flash as well as new technologies like RRAM and MRAM that do not require a separate erase operation at all.

Both the Non-Volatile Storage (NVS) and Zephyr Memory Storage (ZMS) subsystems of Zephyr internally feature a garbage collector that kind of “defragments” the storage space when available space becomes too low to write a new chunk of data. Such garbage collection permits the effective removal of the deleted entries and may recover some free space. However, this is a time-consuming process that is triggered automatically when required, without user control. On this topic Adrien Ricciardi introduced new APIs to give the application more granularity to control when the NVS garbage collector is triggered. This feature is really important in real-time scenarios when the application could not afford loosing the garbage collection time during critical computations. Finally he also improved the initial code for computing available free space.

Board support

Alexandre Bailon added support for the TI CC1352P7 single core Cortex M4F with sub-1 GHz and 2.4-GHz embedded radio capabilities.

LLEXT

Adam Wojasinski added support for AARCH64 in LLEXT (Linkable Loadable Extensions) subsystem. The subsystem provides possibility to extend application at runtime with linkable and loadable code. Extensions are precompiled executables in ELF and can be loaded and linked with main Zephyr binary.

Adam introduced a new filesystem based LLEXT loader that allows to load extension directly from the filesystem mounted in the device. The new loader is equipped with extra shell commands allowing user to load extension and execute functions from the extension manually using console.

Nicolas Pitre adjusted memory permissions for MMU systems so that, once the LLEXT blob is loaded and relocated, .text section of the loaded LLEXT is set as executable.

Networking

Alexandre Bailon added support to OpenThread for the newly added TI CC1352P7. This support can easily be extended to other boards of the same family.

Valerio Setti added support for TLS 1.3 in socket connections using the Mbed TLS library. This extends Zephyr connection capabilities toward a more modern and secure standard. To be noted also that the TLS 1.3 implementation in Mbed TLS is much more PSA Crypto API friendly than the TLS 1.2 one and this greatly helps in the Zephyr transition toward this new crypto API standard.

Adam Wojasinski supported fixing second overflow/underflow issue found in PTP stack.

Security

Following the Zephyr’s plan to reduce the number of crypto libraries available in code base, Valerio Setti started the deprecation process for the TinyCrypt library. The process is not completed yet and, as of 4.0 release, its usage has been removed from the JWT (JSON Web Token) and Random subsystems. The work is still in progress though and plans are to complete it by the 4.1 release.

GPIO

Stoyan Bogdanov added drivers for MAX14906 (4 channel industrial Input/Output) and MAX14916 (8 channel industrial Output) industrial GPIO expanders with advanced diagnostics capabilities as part of GPIO subsystem. Both of them are with SPI are interface and have programmable global diagnostics for whole chip and per channel.

Power management

Riadh Ghaddab changed how the kernel handles policy events by waking up the system some time before the event happens by taking into account the exit latency of the current power state.

Memory management

Nicolas Pitre implemented demand paging for ARM64 and x86 architectures. This allows to load properly tagged read-only data and functions only when requested, in order not to exhaust all available RAM. This feature was made available also for SMP configurations. He also fixed a potential deadlock loop for the LRU algorithm.

Arm64 and RISC-V architectures

Nicolas Pitre improved the arm64 linker script by minimizing the generated output binary file and removing old ARM32 remnants.

Nicolas Pitre also contributed to a fix for correctly computing the remaining stack space for all CPU’s IRQs.

Summary

Type Count
Authored 88
Signed-off-by 2
Categories
Community Open-source U-Boot

BayLibre contributions to U-Boot v2024.10

The latest version of U-Boot, 2024.10, was released in October 2024. To get all U-Boot 2024.10 release statistics look at the U-Boot documentation.

Mattijs Korpershoek, Julien Masson and Guillaume La Roque tried to give a lot of valuable feedback and reviews to other contributors. Mattijs also spend a lot of time maintaining and picking up patches for the code he maintains.

Android

Boot Flow and Ramdisk

Mattijs Korpershoek fixed a regression introduced by a previous fix. The regression caused the ramdisk to not be copied when using a boot image version 2. This has been resolved. Mattijs also fixed compressed image loading when CONFIG_SYS_BOOTM_LEN cannot fit the uncompressed image.

Bootloader Control Block (BCB)

Mattijs Korpershoek fixed a segfault that could occur when using an invalid block device. The segfault was caused by a printf statement that dereferenced a NULL pointer in the BCB code. Additionally, he fixed a build regression that occurred when building without the BCB command.

Android Boot Flow

Mattijs Korpershoek implemented a boot method for Android as a generic bootflow implementation for bootstd. This functionality was previously typically implemented as complex boot scripts. Having it implemented in U-Boot itself helps avoid unmaintainable scripts. He also added tests and documentation for the Android boot method.

In this release, only boot image v4 is supported but we are planning to contribute boot image v2 support as well. Note that this development collides with Google’s GBL. In the future, this may be converted to use GBL instead.

MMC

Mattijs Korpershoek fixed an issue where the environment was not loading correctly from MMC when the configured partition was not 0.

Mattijs also contributed a couple of fixes for the bootstd documentation.

Summary

Type Count
Authored 11
Reviewed-by 62
Tested-by 26
Categories
Community Open-source RISC-V Zephyr

BayLibre contributions to Zephyr v3.7


The Zephyr Project recently released version 3.7 on July 27th 2024. Baylibre is proud to have contributed to this release in several areas.

Cryptography

Improvements to PSA crypto APIs

Zephyr’s long-term plan for cryptography involves moving towards PSA Crypto APIs. In this scope Valerio Setti:

  • contributed to update the Mbed TLS version used in Zephyr to 3.6 (LTS release).
  • added support for CONFIG_PSA_WANT_xxx Kconfigs which are used to explicitly enable crypto features on the Mbed TLS’s PSA core instead of automatically guessing them from legacy build symbols.
  • added support for the Mbed TLS’s software optimized version of the NIST P-256 elliptical curve.
  • replaced and/or added PSA crypto alternatives to TinyCrypt in several places on Zephyr’s code base (ex: TCP’s ISN and Bluetooth LE).

Valerio was also recognized as a collaborator for both “Mbed TLS” and “TF-M integration.”

OpenPGP Support

Adrien Ricciardi added support for the OpenPGP 24-bit CRC algorithm, enhancing data integrity.

Networking

PTP Protocol Introduction

Adam Wojasiński introduced the PTP (Precision Time Protocol) in Zephyr v3.7.0. This network protocol, implemented in the application layer, synchronizes clocks in a computer network with sub-microsecond accuracy. It is based on the IEEE 1588 standard. The implementation supports both IPv6 and IPv4 as transport protocols.

Network Packet Timestamps

Adam Wojasiński also added support for passing network packet timestamps to the BSD Sockets API using the SO_TIMESTAMPING socket option. Additionally, minor improvements were made to the network stack related to timestamping.

Non-Volatile Storage (NVS)

Adrien Ricciardi improved the reliability of the NVS by adding an optional 32-bit CRC to each data field. Previously, only filesystem metadata was protected with a CRC. This feature can be enabled through Kconfig. He also fixed issues with the nvs_calc_free_space() function and implemented stricter checks to identify and reject corrupted NVS items.

Riadh Ghaddab fixed a broken test case in the NVS test suite related to the cache after garbage collection.

DesignWare SPI Enhancements

Julien Panis added support for multiple interrupt lines for errors in the DesignWare SPI driver. This allows for individual lines for each of the four DW SPI error interrupts (TX overrun, RX underrun, RX overflow, and master error) instead of a single line for all errors.

Another contribution by Julien manages the DW SPI driver’s MMIO (Memory-Mapped I/O) region, ensuring proper operation on 64-bit platforms.

Memory Management

Nicolas Pitre refined the core demand paging code and prepared it for ARM64 support. He also implemented an LRU (Least Recently Used) eviction algorithm for demand paging.

Additionally, Nicolas fixed issues with the ARM64 MMU code and added formal test cases to ensure future stability.

Timers

Nicolas Pitre addressed several timer-related issues, including removing unnecessary runtime division, handling maximum periods correctly, and implementing optimizations and bug fixes.

RISC-V Improvements

Nicolas Pitre contributed to improvements in the RISC-V exception handling and Physical Memory Protection code.

Analog Devices Support

Axel Haslam and Philip Molloy enhanced the Analog Devices SDP-K1 evaluation board by incorporating USB CDC support. This enables the transmission of debug logs to the host computer while simultaneously streaming data from an analog-to-digital converter (ADC).

Stoyan Bogdanov introduced a definition for the SDP-120 pin connector, making it compatible with the 120-pin connector on the ADI SDP-K1 board. This simplifies the process of working with the board as pins can now be accessed using their respective names. This feature was particularly beneficial when combined with the SDP-I-PMOD and an attached devkit.

Angelo Dureghello focused on refining the ADIN2111 PHY driver, implementing several fixes and improvements. Additionally, support for the ADIN1100 device was added.

Code Cleanups

Adrien Ricciardi introduced the SIZEOF_FIELD() macro, aligning it with the Linux implementation. This macro eliminates the need for redundant code in various parts of Zephyr that previously relied on direct code manipulation to achieve the same goal. By centralizing this functionality, code consistency and maintainability are improved.

Summary of BayLibre contributions in Zephyr v3.7.0

  
Authored153
Co-developed-by1
Signed-off-by2
Categories
Uncategorized

BayLibre contributions to Linux v6.8, v6.9 and v6.10

Linus Torvalds released the Linux kernel version 6.8 on March 10th, version 6.9 on May 12th, and version 6.10 on July 14th.

PWM

PWM Subsystem maintainer Uwe Kleine-König joined BayLibre near the end of the 6.10 kernel development cycle. He had just enough time to make some STM32 PWM driver fixes using his new email address while preparing for bigger changes in the next kernel release.

Video

Mattijs Korpershoek fixed a kernel panic in the wave5 video driver which happened in rare occasions.

Analog Devices

As part of the ADI project, David Lechner has been making fixes and adding new features to the core SPI code and the AXI SPI Engine SPI controller driver for use with high-performance ADCs and DACs.

He also added a few new features to the AD2S1210 resolver to digital converter driver that was moved out of staging in the previous release and added a new IIO driver for the AD7944 family of analog/digital converters.

Additionally, he added a new devm_regulator_get_enable_read_voltage() helper function to reduce boilerplate code when using a voltage regulator to supply a reference voltage and has been working on converting drivers that can benefit from this.

Mediatek

With the addition of thermal nodes and zones to the MT8192 devicetree files contributed by Bernhard Rosenkränzer, LVTS support for the MT8192 chipset is now complete.

Julien Panis and Nicolas Pitre enhanced the Mediatek thermal driver robustness and added support for the MT8186 and MT8188 chipsets.

Julian Stephan upstreamed a MIPI CSI PHY driver for MT8365.

Texas Instruments

Jerome Neanne added support for the TPS6594 PMIC Power Management IC. This PMIC provides voltage regulators as well as GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor), and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC.

Julien Panis added eXpress Data Path (XDP) basic support in the AM65 CPSW Ethernet Linux driver. XDP can be used to achieve high-performance packet processing, primarily by bypassing the kernel. This greatly reduces the overhead needed for the kernel because it does not need to process context switches, network layer processing, interrupts, and so on.

Miscellaneous

Markus Schneider-Pargmann made KCONFIG_CONFIG work when merging configs using make *.config. KCONFIG_CONFIG is used to provide a specific path for the kernels config files.

Bernhard Rosenkränzer made the special keys and fan controls on his Acer PH18-71 laptop work and fixed building RPi configurations with debugfs disabled.

Summary of BayLibre contributions in Linux v6.8

Authored 42
Signed-off-by 3
Reviewed-by 20
Tested-by 2
Suggested-by 1

Summary of BayLibre contributions in Linux v6.9

Authored 60
Co-developed-by 1
Signed-off-by 3
Acked-by 6
Reviewed-by 14
Tested-by 1

Summary of BayLibre contributions in Linux v6.10

Authored 63
Signed-off-by 1
Acked-by 7
Reviewed-by 23
Categories
Community Frontpage Article GCC Open-source Toolchain

BayLibre’s contributions to GCC 14

GCC 14 was released on May 7, 2024, extending the support for C23 (including _BitInt), C++23 and C++26, adding first Fortran 2023 features and the experimental gccrs RUST compiler, but also extending Ada, Go and Modula-2. GCC 14 also improves the static analyser, support for AArch64, x86-64, LoongArch, RISC-V, … and includes a plethora of other improvements.

GCC 14 also extends the support for OpenMP and OpenACC, which permit thread-parallel execution and offloading of program parts to GPUs via directive-based language extensions and the run-time library.  Both OpenMP and OpenACC are widely used in scientific programs, running from laptops to large supercomputers such as the pictured Frontier system (photo: OLCF at ORNL, which also runs that system). GCC supports offloading to Nvidia and AMD GPUs – and is also one of the main compilers on Frontier, where each node has compute GPUs.

BayLibre’s newly formed Compiler & Toolchain Services team contributed to GCC 14 with 72 commits by 7 developers – since the team was formed mid/end of January. See below for GCC 14’s OpenMP, OpenACC and GPU offloading highlights, as BayLibre’s GCC contributions were mostly in that area.

AMD GPU Support

In GCC 14, the low-latency memory allocator for OpenMP was added, performance improvements especially for the high-end Instinct MI100 (gfx908) and MI200 (gfx90a) series were made,  and offloading is now also supported on the following consumer cards: AMD Radeon gfx90c (GCN5), gfx1030, gfx1036 (RDNA2), gfx1100 and gfx1103 (RDNA3).

The BayLibre developers (in particular, Andrew Stubbs and Thomas Schwinge) solved several issues to properly support the gfx10 and gfx11 cards and enabled the gfx1103 which can be found as APU in laptops. Andrew Stubbs, as one of GCC’s GCN maintainers, additionally reviewed several patches, including the ones adding the gfx90c and gfx1036 support.

OpenMP

GCC 14 extended the coverage of the OpenMP 5.0, 5.1, and 5.2 specifications.

In particular, the memory management was extended on all ends, such as implementing the allocate and allocators directives, supporting the libnuma library or adding low-latency allocators on GPUs. Imperfectly nested loops are now permitted, as is the present modifier in map clauses or invoking function pointers on the GPU that point to a host function – if the latter is declared target with the indirect clause. On the OpenMP 5.2 side, OMP_TARGET_OFFLOAD=mandatory follows now the new semantic, Fortran’s pure procedures are now more widely permitted, semantic changes for firstprivate and syntax changes for the destroy clause are now also honored. The OpenMP 6.0 preview TR12 added the ‘decl’ attribute to C++ and, as C23 now also supports attribute, also attribute support to C – and GCC 14 already supports this!

On the performance side, omp_target_memcpy_rect got a boost when copying noncontiguous memory to or from GPU devices. Also the documentation was largely improved, especially the coverage of library routines, memory management and environment variables.

BayLibre developers (in particular Kwok Cheung Yeung and Tobias Burnus) added the indirect clause, contributed to the documentation, fixed a corner-case issue with firstprivate of C++ member variables and fixed a couple of bugs. Tobias Burnus, as one of GCC’s OpenMP maintainers, also reviewed some patches.

OpenACC

The OpenACC 2.7 support was extended.   The self clause was added to be used on compute constructs and the default clause for data constructs. The readonly modifier is now handled in the copyin clause and cache directive. Additionally, OpenACC 3.2 made the memory-handling API routines available to Fortran (header and module file), which were previously only supported in C and C++.

BayLibre developers contributed to this work, in particular Chung-Lin Tang added support for the readonly modifier and adjusted the reference-counter handing for acc_map_data acc_unmap_data to match OpenACC 2.7 – while Tobias Burnus added the Fortran interface for the memory-handling routines. Thomas Schwinge did some housekeeping work and reviewed – as GCC’s main OpenACC maintainer – several patches.

Categories
Community RISC-V Zephyr

BayLibre contributions to Zephyr v3.6

The Zephyr Project recently released version 3.6 on February 23rd 2024. BayLibre is proud to have contributed to this release in several areas.

RISC-V

Nicolas Pitre made several improvements to the RISC-V floating-point support in Zephyr. As a frequent contributor to RISC-V, Nicolas is now listed as a collaborator in the project’s MAINTAINERS file.

POSIX

Semaphores

Nicolas Pitre optimized the implementation of POSIX semaphores within Zephyr.

sysconf()

As part of a larger effort to enhance Zephyr’s POSIX API layer, Adam Wojasinski introduced a basic sysconf() function. To minimize runtime overhead, Adam implemented the function’s complexity at compile time. Due to Zephyr’s resource-constrained environment, error checking was intentionally omitted. This makes the function non-compliant with the full POSIX standard but better suited for Zephyr’s typical use cases. The possibility of a fully compliant implementation through Kconfig was discussed. Contributions are welcome, and a compliant POSIX sysconf() implementation could be a great project for newcomers.

_POSIX_MESSAGE_PASSING option

To fully support the API provided by the POSIX _POSIX_MESSAGE_PASSING option, Adam Wojasinski implemented the mq_notify() function. This function alerts a process when a message becomes available. It offers two modes: basic mode, where a notification function is called upon message transmission, and thread mode, where a thread is spawned for incoming messages. In addition to the function itself, Adam included comprehensive tests demonstrating mq_notify() usage.

I2C DesignWare Controller

The I2C reading code previously used an undersized signed Adrien Ricciardi fixed a bug causing computation overflow in the DesignWare I2C integer to calculate free bytes in the receive FIFO. This could lead to negative values even when space was available. Negative results mistakenly exited the function before clearing receive interrupt flags, resulting in an infinite interrupt loop.

ADI support

Analog Devices (ADI) produces the ADIN2111/1110 series, low-power single/dual-port 10BASE-T1L transceivers designed for industrial Ethernet applications. These chips comply with the IEEE® 802.3cg-2019™ standard for long-reach, 10 Mbps single-pair Ethernet (SPE).

Angelo Dureghello and Philip Molloy contributed support for the ADIN2111/1110 evaluation boards (eval-adin2111ebz and eval-adin1110ebz) to this Zephyr release. The related eth_adin2111 driver is functional and continues to see improvements in features and performance.

Summary of BayLibre contributions in Zephyr v3.6.0

Authored 22
Co-developed-by 2
Signed-off-by 3
Categories
Uncategorized

BayLibre expands Open Source Business to include Compiler Services

Exciting news at BayLibre! 

We’re thrilled to announce our expansion into the Compiler & Toolchain Services space.  This marks a significant leap forward in our commitment to cutting-edge Open Source system solutions.

This week, we welcomed a team of talented veteran compiler engineers, formerly known as Sourcerers, bringing their 100+ person-years of expertise to enhance our capabilities and drive innovation. This is the same team behind CodeSourcery’s GCC toolchains that many of us relied on in the early days of ARMv7 & ARMv8.  More recently, this team has been responsible for enhancing the GNU Compiler Collection on state of the art AMD CPUs with cutting-edge GPU processing in support for the world’s fastest and first exascale supercomputer – Frontier.

Commitment to Growth:

BayLibre is actively expanding our investment in the toolchain business. We’re on the lookout for top-tier talent to further amplify our capabilities and continue pushing the boundaries of HPC & embedded systems development. Areas of interest include AI/ML compilation, experience with new architectures like RISC-V, LLVM, performance optimization, offload standards like OpenACC and OpenMP, and diverse programming languages like C/C++/Fortran/Rust.

Looking Forward:

BayLibre is excited to forge ahead, building upon this team’s storied legacy. Join us as we shape the future of embedded systems and High-Performance Compute technology.

Categories
Community Linux Kernel MediaTek Open-source

BayLibre contributions to Linux 6.7

Linux 6.7 was released on January 7th. LWN has great coverage of the 6.7 merge window (part 1part 2).

Here is a summary of the contributions made by BayLibre engineers in this release:

Amlogic SoCs

BayLibre continues to maintain and improve support for Amlogic SoCs in the kernel. 

Jerome Brunet added support for the Libretech cottonwood board family.  The 2 boards are based on the same PCB with an RPi B form factor.  The “Alta” board uses an A311D SoC while the “Solitude” variant uses an S905D3 SoC.

He also fixed audio support for the U200 and added the onboard audio devices.  The U200 is a reference board manufactured by Amlogic with the Amlogic S905D2 ARM Cortex-A53 quad-core SoC.

In addition, Jerome extended the TDM maximum sample rate to 384kHz for the Meson AXG and made a fix for the HDMI audio driver.

Analog Devices

ADI has engaged BayLibre to improve and expand support for their devices in the upstream Linux kernel.  As part of this effort, David Lechner has made a number of improvements to the AD2S1210 driver that allowed it to be promoted to a proper Linux kernel driver after 13 years in staging.  The AD2S1210 is a resolver-to-digital converter that can measure rotational position and speed of a motor.  David also made fixes to the Industrial I/O (iio) subsystem.

MediaTek SoCs

BayLibre continued to support MediaTek SoCs during this kernel release.

Bernhard Rosenkränzer contributed full LVTS support (MCU thermal domain + AP thermal domain) to MediaTek MT8192 SoC. In addition, the patch series add suspend and resume support to LVTS Driver (all SoCs), and updated the documentation that describes the Calibration Data Offsets.

Alexandre Mergnat added IOMMU support to MT8365 SoC which includes System Power Manager, MultiMedia Memory Management Unit “M4U” (IOMMU), Smart Multimedia Interface “SMI”, Local arbiter “LARB”.

Markus Schneider-Pargmann added power management domain support for the Mediatek MT8365 which is included in v6.7. This work was based patches from Alexandre Bailon plus some redesigning of the driver.

Texas Instruments SoCs

BayLibre continues to provide upstream support for TI parts.

Julien Panis added support for TPS6593 PMIC on the SK-AM62A-LP starter kit which provides regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC.

Summary of BayLibre contributions in Linux 6.7

  Lines added: 4482
Lines removed: 1329
Files changed: 109
Commits: 75
Signed-off-by: 15
Reviewed-by: 41
Acked-by: 10
Tested-by: 5
Categories
Open-source U-Boot

Our U-Boot contributions in 2023

U-Boot is an important open source bootloader used in many embedded Linux systems. U-Boot has a fixed release interval of every 3 months.  BayLibre engineers contributed to each release in 2023:

U-Boot v2023.01

  • Alexandre Mergnat enabled the MT81813 Pumpkin board to boot via extlinux
  • Julien Masson made it possible to store boot splashscreen images on raw eMMC storage
  • Mattijs Korpershoek fixed a fastboot issue that occurred when changing hardware partitions
  • Mattijs also contributed a fix to ensure USB is detached on fastboot reboot commands

U-Boot v2023.04

  • Mattijs updated USB OTG support for Amlogic Meson S905X2 to use the U-Boot Driver Model

U-Boot v2023.07

  • Safae Ouajih added Android Boot image v3 and v4 support. This allows implementing modern (Android 11+) boot flows which are mandatory for Android Generic Kernel Image (GKI).
  • Mattijs continued improving support for the Khadas VIM3 board by fixing the reset logic in the serial driver.

U-Boot v2023.10

  • Julien Panis made a fix for SPI transfers on TI OMAP3 family SoCs.
  • Mattijs fixed a performance regression on Android fastboot writing over USB.

Future contributions

Mattijs reviewed 84 patches and tested 44 patches in 2023. Mattijs has now become a co-maintainer of the USB DFU subsystem in U-Boot and has sent pull requests for the upcoming U-Boot v2024.01 release.

Categories
Community Uncategorized

Contributions to MbedTLS 3.5

Mbed TLS is an open source library which implements cryptographic primitives, X.509 certificate manipulation and the SSL/TLS and DTLS protocols. It provides a reference implementation of the ARM Platform Security Architecture (PSA) Cryptography API. The project also supports the PSA Cryptoprocessor Driver Interface which enables support for cryptoprocessor drivers. The small code footprint makes the project suitable for embedded systems. It has many users, including TF-ATF-M and OP-TEE.

MbedTLS v3.5 was released on October 5th with several contributions from BayLibre. Valerio Setti focused mainly on enabling elliptic curve keys and algorithm acceleration through PSA drivers. It is now possible to completely accelerate ECDH, ECDSA and ECJPAKE without any need to rely on library’s builtin implementations. We also contributed to the PK module reshaping and improvements for private/public key parsing and management. Other interesting improvements included in this release concern TLS 1.2/1.3, x509, code’s footprint reductions (which is particularly interesting for embedded platforms) as well as drivers’ acceleration support for FFDH algorithm with DH keys, hashes and HMAC.

Categories
Community Linux Kernel MediaTek Open-source

BayLibre contributions to Linux 6.6

Linux 6.6 was released on October 29th. LWN has great coverage of the 6.6 merge window (part 1part 2).

Here is a summary of our contributions per SoC family:

Amlogic SoCs

BayLibre continues to maintain and improve support for Amlogic SoCs in the kernel. 

Jerome Brunet made an ASoC driver fix. For SPDIF input to report the locked rate correctly, even when no capture is running, the HW and reference clock must be started as soon as the DAI (digital audio interface) is probed.

MediaTek SoCs

BayLibre continued to support of MediaTek SoCs during this kernel release.

Alexandre Mergnat and Guillaume La Roque added support for the Startek KD070FHFID015, which is a 7-inch TFT LCD display using MIPI DSI interface.

Texas Instruments SoCs

BayLibre continues to provide upstream support for TI parts.  The TI TCAN is an external CAN-FD controller and transceiver which is currently supported in Linux in its current version 4550. Markus Schneider-Pargmann added support for two new chip versions (4552 and 4553) to the existing driver and did a few cleanups while working on the driver.

The J784S4 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge.  Apelete Seketeli and Esteban Blanc fixed the range of some GPIO banks on J784S4 System-on-Module (SoM). This was needed in order to use these GPIO lines as an interrupt trigger.

The AM335x-EVM started producing boot errors because of subtle timing changes.  Julien Panis fixed the issue by using the appropriate sleep function in sysc reset.

Jerome Neanne fixed a kernel crash detected in the TI testing farm when the TPS6594 regulator driver is added.

T-Head RISC-V SoC

The T-Head TH1520 is a multi-core 64-bit RISC-V SoC used in RISC-V development boards such as the BeagleV Ahead.  Drew Fustini added the BeagleV Ahead board device tree to the Linux 6.6 release which allows users to boot to a basic shell.  Drew is continuing to work on adding support for additional TH1520 hardware peripherals like eMMC and microSD.

Summary of BayLibre contributions in Linux 6.6

  Lines added: 737
Lines removed: 83
Files changed: 24
Commits: 16
Signed-off-by: 24
Reviewed-by: 30
Reported-by: 1
Tested-by: 3

Categories
Community

Our contributions to Yocto 4.3

The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded system deployments in connected edge devices, servers, or virtual environments, regardless of the hardware architecture. Yocto 4.3 (codename “nanbield”) was recently released. It includes Linux kernel 6.5 and 6.1, gcc 13, glibc 2.38, LLVM 17, and over 300 other recipe upgrades.

BayLibre engineers made the following contributions to Yocto 4.3:

openembedded-core

We contributed a total of 82 patches across several areas:

  • Eilís ‘pidge’ Ní Fhlannagáin
    • Provided fixes for nativesdk-intercept ownership logic and path setup
    • Added a workaround for update_mandb issues when populating the SDK
  • Julien Stephan
    • Added bblock, a tool for locking and unlocking recipes during build, along with associated selftests
    • Upgraded less recipe
    • Added ptest support for less and libexif recipes
    • Miscellaneous fixes for sstatesig, vulkan-samples, scripts.patch.py, and automake
  • Trevor Gamblin
    • Migrated core patchtest code into openembedded-core and refactored the test suite as part of the 2023 Yocto Project RFQ. Maintenance for patchtest is ongoing in openembedded-core master branch, and in meta-patchtest – Layer supporting the test framework for community patches.
    • Improvements to ptests and dependencies for python3 and glib-networking
    • Added new recipes for: python3-calver and python3-trove-classifiers
    • Upgraded numerous recipes: bind, diffoscope, git, icu, iproute2, linux-firmware, nfs-utils, p11-kit, pciutils, qemu, vim, xeyes, python3-cython, python3-dbusmock, python3-dtc, python3-dtschema, python3-git, python3-hatchling, python3-hypothesis, python3-more-itertools, python3-numpy, python3-poetry, python3-poetry-core, python3-pygments, python3-pytest, python3-setuptools, python3-sphinx, python3-trove-classifiers, python3-webcolors

bitbake

  • Julien Stephan
    • Added a new function to retrieve task signatures in bitbake

meta-openembedded

54 patches were contributed:

  • Trevor Gamblin
    • Added recipes for: python3-arrow, python3-git-pw, python3-platformdirs, python3-pytest-mock, python3-tomlkit, python3-versioneer
    • Ptest, dependency, and other metadata fixes for: python3-bandit, python3-bitstring, python3-blinker, python3-flask, python3-kivy, python3-py-cpuinfo, python3-pylint, python3-pytest-mock
    • Recipe upgrades for: python3-aiofiles, python3-alembic, python3-argcomplete, python3-arpeggio, python3-astroid, python3-autobahn, python3-awesomeversion, python3-bandit, python3-beautifulsoup4, python3-binwalk, python3-bitarray, python3-bitstring, python3-bitstruct, python3-blinker, python3-cppy, python3-django, python3-dnspython, python3-execnet, python3-fastjsonschema, python3-flask, python3-greenstalk, python3-humanize, python3-ipython, python3-jsonpatch, python3-m2crypto, python3-matplotlib, python3-pandas, python3-parse, python3-pyaudio, python3-pybind11, python3-pylint, python3-pyperf, python3-rdflib, python3-semver, python3-send2trash, python3-sh, python3-snagboot, python3-sqlalchemy, python3-sqlparse, python3-werkzeug

yocto-docs

  • Trevor Gamblin
    • Updated the dev-manual’s testimage instructions to match the new IMAGE_CLASSES approach
Categories
Community Open-source Zephyr

Our contributions to Zephyr v3.5

Zephyr is an open source RTOS (real-time operating system) project that is being widely adopted for resource-constrained systems, from environmental sensors to smart watches and IoT wireless gateways. BayLibre is a member of the Zephyr Project and has been a core contributor since the project began.  We have ported Zephyr to the 64-bit ARM and 64-bit RISC-V architectures. Our engineers also maintain core parts of Zephyr.

Zephyr v3.5 was released last month:

Zephyr 3.5 introduces numerous enhancements to its various connectivity options to keep them aligned with latest developments in the various standards (Wi-Fi, Bluetooth, etc.), secure, and easier to maintain going forward. This will greatly simplify the lives of connected product developers.

What’s more, whether you’re looking at building IoT devices or not, several significant improvements were made to help build applications that are small, modular, and well tested (and if this sounds like a pretty generic statement to you, it’s because I want you to read further to see what I mean by that!).

BayLibre engineers made the following contributions to this release:
 
Nicolas Pitre
  • Created a timepoint API for events (typically expiration deadlines) tied to absolute time. This replaces open coded implementations that were prone to mistakes and sometimes lacked coherency and efficiency.
  • Added 64-bits cycle reporting to the systick timer driver.
  • Improved the ability to configure the whole timer subsystem out when unneeded in order to reduce the final binary size.
Carlo Caione
  • Added support for the CLIC vectored mode on RISC-V
  • Added support for the stack unwinding on ARM64 at run-time
  • IPC service with the OpenAMP backend now takes into account the cache line size and alignment. This is done to align and pad structs in the cacheable shared memory so that invalidation operations can be performed safely.
  • There is a pretty complex work ongoing about adding a new `zephyr,memory-attr` property to the memory nodes in the DT. This new property is used to describe properties and capabilities of the associated memory region. A library helper can use this information to do several different things. Currently the library is only used to configure the MPU region associated to the memory region but the idea is to extend that to be able to allocate memory heaps with different capabilities (cacheable, non-cacheable memory, etc…)
Riadh Ghaddab
  • Fixed an issue in the IPC service which occured when it could not find enough memory.

If your team needs help with Zephyr or any other embedded software such as Linux or Android, then please don’t hesitate to reach out to the experts at BayLibre.

You can also follow BayLibre on TwitterLinkedIn and Mastodon for more.

Our contributions to Zephyr v3.0.0

BayLibre is a member of the Zephyr Project and has been a core contributor from the beginning with over 650 commits. Zephyr v3.0.0 is the most recent release, and these are the contributions from our team.
Categories
Conferences

BayLibre at Linux Plumbers Conference 2023

BayLibre CTO Kevin Hilman, along with BayLibre engineers Alexandre Bailon, Nicolas Pitre and Drew Fustini, are attending Linux Plumbers Conference 2023 in Richmond, Virginia.

Alexandre will speak at the Power Management and Thermal Control micro-conference on Tuesday:

Sensors aggregation
Alexandre Bailon
Nov 14, 2023, 2:30 PM
Livestream: “James River Salon B” (Omni Richmond Hotel)

Nicolas Pitre will be speaking at the IoT micro-conference on Wednesday:

Shared FPU Support in Zephyr for ARM64 and RISC-V
Nicolas Pitre
Nov 15, 2023, 4:30 PM Eastern
Livestream: “James River Salon A” (Omni Richmond Hotel)

BayLibre is a live stream sponsor, and all the tracks at Linux Plumbers are streamed live on YouTube so everyone can view the content. The livestream URLs are now available on the Schedule Overview page. Find the track you want and click the paperclip on the upper right corner to bring up the Live Stream Link. You can also visit the Linux Plumbers Conference YouTube channel to view all the live streams:

Categories
Community Linux Kernel MediaTek Open-source

BayLibre contributions to Linux 6.4 and 6.5

Linux 6.4 was released on June 25th, 2023, and Linux 6.5 was released on August 27th, 2023.  BayLibre contributed to both of these releases.  LWN has great coverage of the 6.4 merge window (part 1part 2) and 6.5 merge windows (part 1part 2).

Here is a summary of our contributions per SoC family:

MediaTek SoCs

BayLibre continued to improve support of MediaTek SoCs during this kernel release.

Alexandre Mergnat and Bernhard Rosenkränzer contributed improved support for the MT8365 EVK board and the MT8365 SoC, also known as the Genio i350. The new functionality includes:

  • Dynamic frequency and voltage scaling (DVFS) including generic Operating  Performance Points support (OPP) for cpufreq support
  • MMC controller including AEMMC support on mmc0 (internal memory) and SD-UHS support on mmc1 (external memory).
  • USB controller including Extensible Host Controller Interface (EHCI) for host mode, and SuperSpeed USB in OTG mode on the micro USB connector.  Markus Schneider-Pargmann also contributed a fix for USB in the MT8365 clock driver.
  • Ethernet 10/100 MAC controller including power management with Energy Efficient Ethernet and Wake-on-LAN specification. Flow control is provided for half-duplex and full-duplex mode.
  • MT6357 PMIC support to manage regulators along with Power and Home keys
  • I2C controller including the four I2C master channels.  The I2C0 bus provides communication with integrated RT9466 switching battery charger and MT6691 LP4X buck converter.
  • Support for the HDMI bridge (IT66121) and MIPI DSI panel (Startek,kd070fhfid015)
  • Watchdog peripheral

Amjad Ouled-Ameur contributed MT8365 CPU Idle support including multi-core deep idle state.  Amjad also added support for the MT8365 thermal sensors.

Balsam Chihi added AP thermal domain support to LVTS Driver for the MediaTek MT8195 SoC.

Guillaume Ranquet added support for HDMI phy on MT8195 and fixed the clock rate calculation.

Amlogic SoCs

BayLibre continues to maintain and improve support for Amlogic SoCs in the kernel. 

Jerome Brunet made improvements to AXG SoC audio support. This changed the way slots are activated on the TDM lanes to follow what the HW does and make sure each channel always get mapped to the same slot/lane.

Jerome also enabled use of the MDIO mux driver on GXL SoCs.  This fixes a problem where the internal PHY path was broken. 

Carlo Caione relaxed the supported mode checks in the drm/meson/meson_venc driver.
This allows 480×1920 and 400×1280 resolutions to be used.

Texas Instruments SoCs

Markus Schneider-Pargmann improved the TI m_can driver and tested those changes on the TCAN455X CAN-FD controller. The optimizations included keeping interrupts enabled during peripheral read, disabling unused interrupts, and always acknowledging all interrupts.

Julien Panis, along with Jerome Neanne and Esteban Blanc, added support for the TI TPS6594 Power Management IC (PMIC), It provides regulators and others features like ESMs (Error Signal Monitor), and PFSM (Pre-configurable Finite State Machine). The SoC and the PMIC can communicate through the I2C or SPI interfaces.

Jerome Neanne added support the GPIO interface on the TPS65219 PMIC.  Jerome also added support for soft shutdown via sys-off API.  This allows the TI AM62-LP-SK dev board to take benefit of the latest released API for shutdown and reset management.

Summary of BayLibre contributions in Linux 6.4

  Lines added: 2,251
Lines removed: 113
Files changed: 57
Commits: 47
Signed-off-by: 57
Reviewed-by: 15
Reported-by: 1
Tested-by: 5
Acked-by: 1

Summary of BayLibre contributions in Linux 6.5

  Lines added: 4,276
Lines removed: 30
Files changed: 47
Commits: 26
Signed-off-by: 43
Reviewed-by: 49
Tested-by: 20

Categories
Conferences ELC Linux Kernel Open-source RISC-V

Embedded Open Source Summit 2023 recap

The Linux Foundation recently published a recap of the Embedded Open Source Summit 2023 which took place in Prague back in June:

Embedded Open Source Summit, a new umbrella event for open source embedded projects and developer communities, came together for essential collaboration, discussions, and education. EOSS was composed of 6 micro conferences including Embedded Linux Conference, Zephyr Developer Summit, Automotive Linux Summit Europe, Embedded IoT Summit, Safety-Critical Software Summit, and LF Energy Embedded Summit.

The event gathered 1,387 total attendees with 844 attending in person in Prague, from 375 organizations across 56 countries around the globe. 83% of attendees were in technical positions.

The event included over 180 talks across the 6 micro conferences that made up the event.

We are proud to see that BayLibre engineer Bernhard (“bero”) Rosenkränzer was listed in the Top 10 Attended Sessions. You can watch the recording of his talk online:

Toolchain Options in 2023: What’s New in Compilers and Libcs? (slides)

All the talks from EOSS are available in a playlist on the Linux Foundation YouTube channel.

Included in the playlist is the “RISC-V and Open Source Hardware BoF” (slides) by BayLibre engineer Drew Fustini:

Note: “BoF” stands for “Birds of a Feather” which is short presentation followed by a discussion amongst the people in the room


Categories
Uncategorized

BayLibre presentations from EOSS Prague

Several BayLibre engineers made presentations last week during the Embedded Open Source Summit (EOSS) which includes the Embedded Linux ConferenceVideos for all of the talks should be posted in 6 to 8 weeks on the Linux Foundation’s YouTube channel.

 
screenshot of slides

 

“Customize your CROPS containers with crops-generator”

Screenshot of slides

“Toolchain Options in 2023: What’s New in Compilers and Libcs?”

    • Speaker: Bernhard Rosenkraenzer (“Bero”)
    • Event: Embedded Linux Conference
    • SLIDES
  •  
RISC-V and Open Hardware BoF

“RISC-V and Open Source Hardware BoF”

    • Speaker Drew Fustini
    • Event: Embedded Linux Conference
    • Note: “BoF” stands for “Birds of a Feather” which is short presentation followed by a discussion amongst the people in the room
    • SLIDES
Categories
Uncategorized

Embedded Linux Conference coming to Prague

The Embedded Linux Conference is now part of the newly formed Embedded Open Source Summit. EOSS will take place in Prague next week from Tuesday, June 27th, through Friday, June 30th.  There will be additional events like the Yocto Project Dev Day taking place before EOSS on on Monday, June 26th.

The creation of EOSS means that there will no longer be an ELC North America and ELC Europe every year.  Instead there will just be a single ELC each year as part of EOSS, and EOSS will likely switch between continents year to year.

View the EOSS Schedule

BayLibre logo

BayLibre will be in Prague for the Embedded Open Source Summit all week so don’t hesitate to reach out if you are attending to:

BayLibre will have 3 speakers during the week:

Categories
Linux Kernel Open-source

BayLibre contributions to Linux 6.2 and 6.3

BayLibre contributed to both kernel releases so far in 2023.  Linux 6.2 was released on February 19th, and Linux 6.3 was released on April 23rd.  LWN has great coverage of the 6.2 merge window (part 1, part 2) and 6.3 merge windows (part 1, part 2).

Here is a summary of our contributions per SoC family:

Texas Instruments SoCs

BayLibre recently developed the Android SDK for the new TI AM62x SoC family.  The Android Open Source Platform (AOSP) now encourages all drivers to be built as loadable kernel modules.  In order to support this, Kevin Hilman enabled the UDMA driver and PSIL lib to be built and loaded as modules. In addition, Guillaume La Roque and Nicolas Frayer enabled the MFD (multi-function device) driver for the TI PMIC (power management IC) and the Davinci GPIO driver to be built as modules.

Jerome Neanne contributed a MFD driver to support the TI TPS65219 series of Power Management ICs (PMIC). These include voltage regulators, GPIO lines and a power button that is often used in portable devices.

Markus Schneider-Pargmann contributed many improvements to the TI TCAN and M_CAN drivers reducing the SPI transfers necessary for operation.

MediaTek SoCs

BayLibre continued to improve support of MediaTek SoCs during this kernel release.  Bernhard Rosenkränzer (bero) added minimal support for the MT8365 SoC and MT8365-EVK board.

Alexandre Mergnat added MFD, PMIC keys, and regulator support for the MT6357 PMIC.  Alexandre also added MT8365 IOMMU support and improved the device tree binding documentation for multiple MediaTek parts.

Balsam Chihi added a driver for the Low Voltage Thermal Sensor (LVTS). Each thermal domain contains up to seven controllers, and each thermal controller handle up to four thermal sensors. Balsam also fixed a problem that prevented modes to be set or cleared for some pins the MT8385 SoC.

Fadwa Chiby added PWRAP support for the MT8365. The PMIC Wrapper serves as a bridge for the communication between CPU and PMIC.

Amlogic SoC

BayLibre continues to maintain and improve support for Amlogic SoCs in the kernel.  Amjad Ouled-Ameur fixed a problem with the SPI controller on Meson GXL and GXBB that occurred when a GPIO line was used as Chip Select (CS).

Carlo Caione fixed a problem that led to corrupt pixel data on Amlogic S905X-based boards when interfacing with ILI9486 LCD panels.  The ILI9486 driver had been forcing 8-bit transactions for SPI controllers that do support 16-bit transactions, so Carlo changed the driver to support the maximum transfer size allowed by the SPI controller.  Carlo also enabled autoloading of the driver for 3.5 inch Raspberry Pi displays (rpi-lcd-35 and piscreen).

In addition, Carlo improved the Meson DRM display driver to reduce the FIFO lines held when AFBC (Amlogic FBC decoder) is not used. This solved displays issues including a small vertical offset in the displayed image.

Jerome Brunet converted several Device Tree bindings to the preferred YAML format for audio peripherals in the Meson AXG: audio FIFOs, SPDIF input/output, sound card controls.

Rockchip SoCs

The Rockchip crypto driver was broken and do not pass self-tests. Corentin Labbe worked methodically improve the driver to the point where it was usable and passed self-tests.  Corentin tested this work on the rk3328-rock64, rk3288-miqi and rk3399-khadas-edge-v boards.

Corentin Labbe also added support for the RK3399 SoC which has two rk3288 compatible crypto devices.

Miscellaneous

Corentin Labbe added DDR support for SPD (serial presence detect) which a standardized way to automatically access information about a memory module.  This enabled the Samsung X05 laptop to successfully instantiate the SPD AT24 EEPROM on its memory modules.

In addition, Corentin updated the device tree for the the intel-ixp42x-welltech-epbx100 to add an Ethernet node for the first port.  Corentin also removed the ide-disk LED trigger as no users remained in the kernel.

Louis Rannou fixed a shift-out-of-bounds error in the SPI NOR flash driver that was detected by UBSAN (Undefined Behavior Sanitizer) runtime checker in the Linux kernel.

Summary of BayLibre contributions in Linux 6.2

  Lines added: 3,415
Lines removed: 1,037
Files changes: 129
Commits: 79
Signed-off-by: 19
Reviewed-by: 11
Tested-by: 3
Acked-by: 5

Summary of BayLibre contributions in Linux 6.3

  Lines added: 2,924
Lines removed: 446
Files changes: 72
Commits: 38
Signed-off-by: 9
Reviewed-by: 13
Tested-by: 1
Acked-by: 6

 

Categories
Linux Kernel News Open-source

Our contributions to the Linux 6.1 kernel

Linux v6.1 was released on December 11th, 2022. As usual, LWN covered the 6.1 merge window (part 1part 2).  Here’s a summary of our contributions per SoC family and kernel subsystem:

MediaTek SoCs

BayLibre continued to improve support of MediaTek SoCs during this kernel release.

Markus Schneider-Pargmann added an embedded DisplayPort (eDP) driver for the MT8195 (Kompanio 1200) which is used in Acer Chromebooks.  It supports DisplayPort 1.4 with up to 4 lanes.  Markus also helped upstream the clock driver for the MT8365 (Genio 350).

Guillaume Ranquet added DisplayPort audio support for the MT8195 with up to 8 channels.  Guillaume also added external DisplayPort support to the MT8195 eDP driver.

Mattijs Korpershoek added double key support for MT6779 keypad matrix controller.  Double key support exists to minimize cost, since it reduces the number of pins required for physical keys.  Mattijs has now become the maintainer of the MT6779 keypad driver, and also reviews patches for a variety of other input drivers.

Fabien Parent added keypad support to enable two buttons on the MT8183 Pumpkin board.   Fabien also added clock drivers for the MT8365.

Amlogic SoCs

BayLibre continues to maintain and improve support for Amlogic SoCs in the kernel.  For the Linux 6.1 release, Philippe Boos fixed Meson GXBB SoC watchdog driver to keep the watchdog running if it was already started by bootloader.

Texas Instruments SoCs

Julien Panis added a new capture driver to support the TI eCAP (enhanced capture) peripheral in the TI AM62x SoC.  ECAP can be used to timestamp events (falling/rising edges) detected on an input signal.

Jerome Neanne added support for the TPS65219 PMIC (power management IC).  The regulator set consists of 3 buck DC-DC converters and 4 LDOs.  The output voltages are configurable and are meant to supply power to the main processor and other components.  Jerome also contributed a fix for the AM62-SP-SK dev board to avoid the TPS65219 LDO1 (SDMMC rail) to be shut down after boot completion.

Gemini SoCs

Corentin Labbe re-enabled gigabit speed Ethernet for the Gemini SoC in the NS2502 and SSI1328 NAS (network attached storage) devices.

Summary of BayLibre contributions in Linux 6.1

  Lines added: 6,722
Lines removed: 44
Files changes: 50
Commits: 27
Signed-off-by: 18
Reviewed-by: 14
Reported-by: 2
Tested-by: 1
Acked-by: 1

 

Categories
News

The Year of the Rabbit

The BayLibre teams wishes you good health, wealth and prosperity in the Year of the Rabbit!

Categories
News

BayLibre wishes you a Happy New Year!

Bonne Année! The BayLibre team around the world wishes everyone a great 2023.

Categories
Uncategorized

Our contributions to Linux kernel 6.0

Linux v6.0 was released on October 2nd, 2022. As usual, LWN covered the 6.0 merge window (part 1part 2).  Here’s a summary of our contributions per SoC family and kernel subsystem:

MediaTek SoCs

BayLibre continued to improve support of MediaTek SoCs during this kernel release.

Guillaume Ranquet added supported for the DisplayPort interface hardware unit (DP_INTF) on the MT8195 (Kompanio 1200).   Guillaume improved flexibility in the MediaTek DisplayPort interface driver by moving several properties to SoC specific config.  Guillaume also fixed potential screen glitches by enabling the DisplayPort interface only after a bridge is enabled.

Markus Schneider-Pargmann added a new driver to support the integrated DisplayPort PHY found on Mediatek SoCs like the MT8195 (Kompanio 1200).  Markus also added support for DP_INTF to the MediaTek DPI driver.  DP_INTF is similar to DPI but does not have the exact same feature set or register layouts.  DP_INTF is the sink of the display pipeline that is connected to the DisplayPort controller and encoder unit.

Fabien Parent added the DPI/HDMI display path for MT8365 (Genio 350).  Fabien also added PWM support and improved device tree bindings for the MT8365.  In addition, Fabien added support for the PMIC keys, regulator, and RTC in the MT6357 PMIC.

Mattijs Korpershoek contributed to input drivers for MediaTek SoCs including implementation of row/column selection for the MT6778 keypad.  Mattijs also changed the the row/column calculation to better match organization of the MT6779 keypad hardware.

Texas Instruments SoCs

We continue to provide upstream support for TI SoCs such as AM335x, AM437x and AM57xx.  Guillaume La Roque enabled ramoops functionality to improve the debugging experience on the TI K3 AM625 SK dev board.

Crypto subsystem

Corentin Labbe reviewed and tested several fixes for the cryptographic accelerators found in Allwinner SoCs.

 

Bar graph of Linux 6.0 contributions per each BayLibre engineer
Linux 6.0 contributions per each BayLibre engineer
Categories
Community Linux Kernel Open-source

Our contributions to Linux kernel 5.19

Linux v5.19 was released on July 31, 2022. As usual, LWN covered the 5.19 merge window (part 1part 2). Kernel Newbies has more details on all of the changes. Here’s a summary of our contributions per each SoC family and kernel subsystem:

MediaTek SoCs

BayLibre also continued to support MediaTek SoCs with contributions from Fabien Parent:

  • Added device tree to support the the MediaTek MT8195 Demo board with MT8195 SoC, the MT6359 and MT6360 PMICs, and the MT7921 connectivity chip.
  • Added device tree bindings to support the MTU3 driver on the MT8195 SoC.
  • Enabled drivers for the MT6359 and MT6360 PMIC in the arm64 defconfig. These drivers are essential for some MediaTek MT8195 based boards to boot properly.
  • Added resources in order to be able to probe and use the keyboard driver for the MT6359 PMIC.
  • Fixed bad thermistor node name in device tree for the MT8183 Pumpkin board.
  • Fixed invalid allowed mode for the MT6315 regulator.

Texas Instruments SoCs

We continue to provide upstream support for TI SoCs such as AM335x, AM437x and AM57xx.

The AM335x and AM437x SoC families use a small Cortex M3 co-processor to help with various low power tasks like deep sleep states that cannot be controlled from the main processor core. The wkup_m3_ipc driver handles communication between the main processor and power management firmware on the CM3.

Drew Fustini upstreamed several improvement to the wkup_m3_ipc driver:

  • Converted device tree bindings from text to the preferred json-schema format
  • Added support for I2C PMIC Voltage Scaling. This allows the driver to pass the name of a binary file to load into the CM3 memory. The binary data is the I2C sequences for the CM3 to send out to the PMIC during low power mode entry.
  • Added support for VTT Toggle with a GPIO pin. On some boards like the AM335x EVM-SK and the AM437x GP EVM, a GPIO pin is connected to the enable pin on the DDR VTT regulator. This allows the regulator to be disabled to save power upon suspend and enabled upon resume.
  • Added support for IO Isolation. On AM437x SoCs, certain pins can be forced into an alternate state to save power when the system is in deep sleep.

DRM subsystem

Nicolas Belin added I2S audio support to it66121 HDMI bridge driver. The ITE IT66121 HDMI bridge is a high-performance and low-power single channel HDMI transmitter, fully compliant with HDMI 1.3a, HDCP 1.2 and backward compatible to DVI 1.0 specifications.

Crypto subsystem

Corentin Labbe made several contributions contributions to the sun8i-ce driver for the hardware cryptographic offloader on Allwinner H3/A64/H5/H2+/H6/R40 SoCs:

  • Improved handling of scatter-gather lists for the sun8i-ce crypto engine driver
  • Added function for handling hash padding the sun8i-ce crypto engine driver
  • do not allocate memory when handling requests. Instead of allocate memory on each requests, it is easier to pre-allocate buffer for IV. This made error path easier.

Corentin also made several contributions to the sun8i-ss driver for the hardware cryptographic offloader for Allwinner A80/A83T SoCs:

  • Rework handling of IV (initialization vector) to avoid failure when doing decryption of multiple SGs in-place.
  • If sun8i-ss does not handle hmac(sha1) directly, then provide one which use the already supported acceleration of sha1.
  • Do not zeroize all pad, instead of memset all pad buffer, it is faster to only put 0 where needed.
  • Do not allocate memory when handling hash requests Instead of allocate memory on each requests, it is easier to pre-allocate buffers. This made error path easier.

Corentin also made a fix to Triple-DES support in the driver for Marvell’s Cryptographic Engine and Security Accelerator (CESA).

Miscellaneous Fixes

  • Corentin Labbe fixed invalid sytax in the ASoC device tree bindings.
  • Corentin also fixed a typo in the thermal_of driver that was causing a sparse warning.
  • Corentin fixed styles issues in hwmon driver for acpi_power_meter.
Linux 5.19 contributions per each BayLibre engineer
Categories
Amlogic Open-source U-Boot

U-Boot v2022.07 released, our contributions

BayLibre contributed to U-Boot v2022.07 which was on July 11th. U-Boot development takes place in release cycles which normally span two months.

Amlogic

Neil Armstrong maintains support for Amlogic SoCs in U-Boot. During this development cycle, Neil reviewed and merged patches that added support for the ADC found on the Amlogic AXG SoC family and enabled the ADC peripheral for the JetHome Jethub D1 home automation-controller. Neil also merged patches to support for the AO clock controller in the Amlogic G12A which provides the clock to various controllers within the Always-On part of the SoC.

Texas Instruments

Neil Armstrong added the necessary drivers and device tree nodes to support the TPS65219 PMIC in the E4 revision of the TI AM64 SK EVM. The TPS65219 PMIC features 3 Buck converters and 4 linear regulators, 2 GPOs, 1 GPIO, and 3 multi-function-pins.

Corentin Labbe fixed a regression with the TI AM335x HS (high security) EVM. The HS variant has about half of the available SRAM in the non-HS part. The regression occurred when an unrelated change caused the TI Ethernet driver to be unnecessarily probed which then exhausted the available memory resulting in a crash. U-Boot SPL only supports MMC/SD and UART boot methods on the TI AM335x HS, so the regression was fixed by disabling all network-based boot methods for the HS part.

Categories
Community Linux Kernel Open-source

Linux kernel 5.18 released, our contributions

Linux v5.18 was released on May 22, 2022. As usual, LWN covered the 5.18 merge window (part 1part 2). Kernel Newbies has more details on all of the changes. Here’s a summary of our contributions per each SoC family and kernel subsystem:

Amlogic SoCs

Neil Armstrong reviewed and merged many patches from the developer community as the maintainer of Amlogic SoC support in the Linux kernel. In addition, BayLibre engineers contributed several fixes:

  • Neil fixed a frame clipping and rotation issue in the Amlogic 2D Graphic Acceleration Unit driver
  • Neil fixed system crashes that occured when using audio on Amlogic G12A/G12B and SM1 systems by reverting two commits from previous releases which were found to be the responsible
  • Amjad Ouled-Ameur fixed shared reset control usage in Meson USB2 PHY drivers

MediaTek SoCs

BayLibre also continued to support MediaTek SoCs:

  • Julien Stephan made an improvement to the MediaTek DSI display driver to allow commands to be sent during video mode. Previously, commands could only be sent during panel initialization.
  • Mattijs Korpershoek added support for the MT6358 PMIC in the mtk-pmic-keys driver and enabled the power and home keys on MediaTek boards with a MT6358 PMIC.
  • Mattijs has become the maintainer of the device tree bindings for MT6779 keypad controller
  • Mattijs fixed the IES control pins in the pinctrl table on the MT8365 SoC
  • Alexandre Bailon cleaned up logging in the MediaTek MMC driver

Texas Instruments SoCs

We continue to provide upstream support for the several families TI SoCs such as AM335x, AM437x and AM57xx:

  • Drew Fustini discovered and fixed a timer conflict that caused IPU2 (an image processing unit) to fail to boot on the AM5728 SoC which is used in boards like the BeagleBoard X15.
  • The AM335x and AM437x SoC families use a small Cortex M3 co-processor to help with various low power tasks like deep sleep states that cannot be controlled from the main processor core. The wkup_m3_ipc driver handles communication between the main processor and power management firmware on the CM3. To prepare for upstreaming additional power saving functionality, Drew moved a necessary address translation function to the public remoteproc API header file, so that the wkup_m3_ipc driver can utilize it.

Network Attached Storage SoCs

The Cortina Systems Gemini SoCs which are notably used in Network Attached Storage (NAS) devices:

  • Corentin Labbe added the ability in the the Cortina Gemini Ethernet driver to set the MAC address from a device tree property
  • Corentin converted the device tree bindings for the Faraday Technology FTGPIO010 GPIO controller (which is used in the Gemini SoCs) to YAML which enables the device tree source files using to be validated against the schema. This helps to avoid common mistakes in device tree source files.
  • Corentin also converted the device tree bindings for the Gemini SoC ethernet controller to YAML.
  • Corentin converted the device tree bindings for the Gemini SoC-internal SATA bridge too.
  • Corentin was able to eliminate a Gemini SoC specific device bindings file by adding properties for the Gemini flash memory to the mtd-physmap device tree schema.

Neil Armstrong maintains support for the Oxford Semiconductor OX810SE SoC which is used in NAS devices like the Western Digital My Book World Edition:

  • Neil updated the OX810SE device tree to add the embedded Synopsys DWMAC Ethernet controller

Crypto Engine drivers

Corentin Labbe continued to improve crypto drivers in this release with a special focus on getting crypto self-tests to running smoothly:

  • Corentin Labbe fixed an issue in the the block request crypto engine framework to hit spinlock recursion bug while handling IPsec traffic. The issue is now resolved for the Amlogic GXL crypto accelerator, Allwinner sun8i-ce crypto engine and Allwinner sun8i-ss crypto offloader, and the Cortina SL3516 crypto offloader.
  • Corentin also fixed the Cavium ZIP driver to register its algorithm only if hardware is present. This resolved an issue on the Renesas Salvator-X, where the Cavium driver was failing crypto self-tests, even though there is nothing related to Cavium on the system.
  • Corentin prevented the ZynqMP SHA driver from probing on non-Xilinx hardware. This avoids unnecessary crypto self-test failures in the kernel log.
  • Corentin fixed a warning that occured when the Rockchip SoC crypto driver module was loaded.

DRM drivers

The Direct Rendering Manager (DRM) is vital part of how Linux displays graphics. Neil Armstrong maintains DRM drivers for Amlogic SoCs and DRM bridge chips including the ITE IT66121 HDMI bridge.

  • Neil Armstrong fixed an issue in the Synopsys DesignWare HDMI transmitter driver (dw-hdmi) when it is in the first place of the bridge chain. Previously, the dw-hdmi negotiation code only worked when the dw-hdmi bridge was in last position of the bridge chain or behind another bridge also supporting input and output format negotiation.
  • Neil added necessary callbacks to the Silicon Image sii902x HDMI driver to keep the bridge working.
  • Fabien Parent added a missing Kconfig option select to avoid invalid configuration for the ITE IT6505 HDMI bridge driver.

Media drivers

Coretine Labbe maintains the Zoran driver for video capture cards and continues to improve it:

  • Added debugfs support to display zoran debug and stats information.
  • Fixed count handling to avoid a warning after every capture that there is unused buffer space.
  • Reduced the size of the probe function by adding I2C init and exit functions.
  • Fixed error handling of the DMA size setting.

Miscellaneous Fixes

  • Guillaume Ranquet improved error handling in code used by device tree-based clocksource drivers.
  • Corentin Labbe cleaned code in the High Precision Event Timer (HPET) driver.
  • Corentin also cleaned up code in the MacIO ASIC driver.

Bar graph of Linux 5.18 contributions per each BayLibre engineer
Linux 5.18 contributions per BayLibre engineer
Categories
Community Open-source Zephyr

Our contributions to Zephyr v3.1.0

Zephyr is an open source RTOS (real-time operating system) project that is being widely adopted for resource-constrained systems, from environmental sensors to smart watches and IoT wireless gateways.  BayLibre is a member of the Zephyr Project and has been a core contributor since the project began.  We have ported Zephyr to the 64-bit ARM and 64-bit RISC-V architectures. Our engineers also maintain core parts of Zephyr.

Zephyr v3.1.0 was released at the beginning of June, and four BayLibre engineers contributed 111 commits to the release.  This includes Valerio Setti who we are excited to have as our newest contributor to Zephyr.

Architecture support: ARM64

  • Nicolas Pitre simplified the user mode transition code to make it smaller and faster.
  • Nicolas made an improvement to avoid executing ISRs (interrupt service routines) using the thread stack as it might not be appropriately sized, and the IRQ stack is already set up for this use.
  • Nicolas optimized the arch_switch() implementation for lower latency by avoiding a full exception roundtrip on every context switch.

Architecture: RISC-V

  • Nicolas Pitre contributed a new implementation of RISC-V PMP support.  Physical Memory Protection (PMP) is RISC-V parlance for a memory protection unit (MPU). The PMP entries, also known as slots, allow machine mode (the most privileged mode) to protect certain memory regions from user mode threads.
  • Nicolas also added a new Stackguard implementation. Stackguard uses the PMP to prevent many types of stack overflow by making any access to the bottom stack area raise a CPU exception. Each thread has its set of pre-computed PMP entries and those are written to PMP registers at context switch time.  Previously, the stackguard wasn’t properly enforced and that is now fixed.
  • Nicolas greatly simplified and optimized the exception handling code
  • Nicolas added RISC-V support for semi-hosting with QEMU or OpenOCD.  Semi-hosting is a mechanism that enables code running on the microcontroller board to communicate and use the input/output facilities on a host computer that is running a debugger.
  • Nicolas cleaned up the RISC-V assembly code quite extensively to improve its readability.

Board support

  • Valerio Setti added support for R-Car H3 Salvator-X board.

Core

  • Nicolas simplified the ring buffer implementation, the code is now entirely relying only on simple ALU operations (add, sub and compare).
  • Nicolas made it possible to use memset/memcpy alternatives during early boot for architectures that can’t safely use the regular optimized memset because hardware isn’t yet sufficiently initialized may override this with their own safe implementation.
  • Carlo Caione improved device tree handling during build time by adding a new cmake function

External Memory

  • External flash is extremely useful when a large application code doesn’t entirely fit on the internal flash.  Part of the application can be stored in flash and the processor can XIP (execute-in-place) the code directly from flash.  However, Zephyr lacked a way at build time to move code to a different memory region.
  • Carlo Caione used the code_relocation feature to dynamically build linker script snippets so that code can be XIP-ed from the destination region.
  • Carlo extended the nocopy sample to the Nordic nRF5340dk board which has external QSPI flash that can be used to do XIP from.
  • Carlo added functionality for Zephyr to generate memory regions based on the new device tree ‘zephyr,memory-region’ attribute.  Variables can then be placed in these sections by using compiler attributes.

IPC (Inter Processor Communication)

  • Carlo Caione added a nocopy function to the IPC service API.  The function can be called to get an empty TX buffer so that the application can directly put its data into the sending buffer without copying it from an application buffer.
  • Carlo also added this new nocopy capability to the static vrings backend.

PCIe

  • Neil Armstrong continued work on PCIe Host Controller support on non-x86 platforms by adding:
    • Generic controller MSI/MSI-X API
    • Generic core functions for Generic Host PCIe Controllers
    • Implementation of MSI/MSI-X support for generic controllers & ECAM
    • API for the ARM GIC ITS (Interrupt Translation Service) to retrieve the MSI base address to be configured in the MSI/MSI-X table.

Logging

  • Valerio Setti introduced a new config option to print the timestamp as the Linux’s kernel format. This can be utilized by AMP (asymmetric multi-processor) platforms in which logs from Linux and Zephyr must be interleaved in order to get a comprehensive view of the entire system.
  • Valerio also fixed the logging subsystem to properly handle both 64-bit and 32-bit timestamps

System Calls

  • System call arguments have been working properly for 64-bit builds with normal compiler optimizations enabled, but Nicolas Pitre discovered this was not the case for 64-bit debug builds.  Nicolas explains his journey to fix system call argument marshalling in his recent Embedded Recipes talk in Paris.
  • The end results is that Nicolas removed the pointer dereference roundtrip and associated casts which fixed the corruption of the system call arguments in 64-bit debug builds.  Nicolas also introduced a union to perform the type transition which produces the same assembly code while also making the silencing warnings from the compiler.

If your team needs help with Zephyr or any other embedded software such as Linux or Android, then please don’t hesitate to reach out to the experts at BayLibre

You can also follow BayLibre on TwitterLinkedIn and Mastodon for more.

Our contributions to Zephyr v3.0.0

BayLibre is a member of the Zephyr Project and has been a core contributor from the beginning with over 650 commits. Zephyr v3.0.0 is the most recent release, and these are the contributions from our team.
Categories
Conferences Frontpage Article Linux Kernel News Open-source

Embedded Recipes and Kernel Recipes 2022 recap

Paris was paradise for Linux kernel developers and embedded software engineers last week with Embedded Recipes and Kernel Recipes returning for the first time since 2019. The BayLibre team enjoyed reconnecting with our fellow open source collaborators while also welcoming newcomers into the Linux development community.

Three engineers from BayLibre made presentations and then fielded questions from those in the audience who managed to catch the famous “flying microphone” box:


Zephyr system call argument marshaling war story – Nicolas Pitre (jump to 4h 28m)

Have no fear, this isn’t a military tale! Rather an overview of the mechanism used to implement system calls in the Zephyr operating system. This presentation will quickly introduce the Zephyr system call model, then focus on how it is implemented. We’ll discuss the unsuspected minefield of portable argument passing across different architectures, then the pitfalls of compiler optimization (or lack thereof) and look at various attempt at making it work for everyone all the time. While Zephyr material is used, this presentation ultimately is more about how to (ab)use the C language in such a low-level context so no prior Zephyr knowledge is necessary.


A path to upstream AI/ML accelerators – Alexandre Bailon (jump to 5h 3m)

Currently, to support AI/ML hardware accelerators, SoC vendors develop their own drivers, reimplementing a lot of features common to many hardware accelerators.

libAPU aims to provide a stack generic enough to support many AI/ML hardware accelerators. libAPU relies on DRM to manage memory and schedule requests. It uses RPMsg to communicate with the hardware accelerator. It uses remoteproc to power up the hardware accelerator and load the firmware.

Alexandre Bailon will present the libAPU, talks about what has been already implemented, what remains to do and the upcoming challenges.


Linux on RISC-V – Drew Fustini (jump to 7h 40m)

It is an exciting time for Linux on RISC-V, the open instruction set (ISA) that is quickly gaining critical mass.  I will introduce the pieces needed to boot Linux on RISC-V including the Privileged Architecture, OpenSBI and U-Boot, and how that fits into the upcoming RISC-V Platform Specification.  I will break down support for existing hardware and current upstreaming efforts.  I will also discuss how the arch/riscv maintenance guidelines try to avoid unnecessary churn as the landscape of RISC-V extensions continues to evolve.

The presentation is on Google Slides.

Follow BayLibre on Twitter, LinkedIn and Mastodon for more.

https://twitter.com/BayLibre/status/1531912361631797249
Categories
Conferences Frontpage Article Linux Kernel News Open-source

Embedded Recipes and Kernel Recipes return to Paris

The BayLibre team is very excited that one of our favorites weeks of the year is about to begin – for the first time in 3 years!

Embedded Recipes starts this Monday, May 30th, in Paris at the Fondation Biermans-Lapôtre. The event will be streamed live, and two BayLibre engineers will present starting at 16h:

Zephyr system call argument marshaling war story – Nicolas Pitre

Have no fear, this isn’t a military tale! Rather an overview of the mechanism used to implement system calls in the Zephyr operating system. This presentation will quickly introduce the Zephyr system call model, then focus on how it is implemented. We’ll discuss the unsuspected minefield of portable argument passing across different architectures, then the pitfalls of compiler optimization (or lack thereof) and look at various attempt at making it work for everyone all the time. While Zephyr material is used, this presentation ultimately is more about how to (ab)use the C language in such a low-level context so no prior Zephyr knowledge is necessary.

A path to upstream AI/ML accelerators – Alexandre Bailon

Currently, to support AI/ML hardware accelerators, SoC vendors develop their own drivers, reimplementing a lot of features common to many hardware accelerators.

libAPU aims to provide a stack generic enough to support many AI/ML hardware accelerators. libAPU relies on DRM to manage memory and schedule requests. It uses RPMsg to communicate with the hardware accelerator. It uses remoteproc to power up the hardware accelerator and load the firmware.

Alexandre Bailon will present the libAPU, talks about what has been already implemented, what remains to do and the upcoming challenges.

After Embedded Recipes concludes on Tuesday, the venue then transitions to Kernel Recipes. The 3-day event kicks off Wednesday, June 1st, and it will also be live streamed. Drew Fustini from BayLibre will speak on Friday morning at 10h:

Linux on RISC-V

It is an exciting time for Linux on RISC-V, the open instruction set (ISA) that is quickly gaining critical mass.  I will introduce the pieces needed to boot Linux on RISC-V including the Privileged Architecture, OpenSBI and U-Boot, and how that fits into the upcoming RISC-V Platform Specification.  I will break down support for existing hardware and current upstreaming efforts.  I will also discuss how the arch/riscv maintenance guidelines try to avoid unnecessary churn as the landscape of RISC-V extensions continues to evolve.

Follow BayLibre on Twitter, LinkedIn and Mastodon for updates during the week.

Categories
Community Open-source Zephyr

Our contributions to Zephyr v3.0.0

Zephyr is an open source RTOS (real-time operating system) project that is being adopted in industry for resource-constrained systems, from environmental sensors and wearables, to smart watches and IoT wireless gateways. Zephyr supports multiple hardware architectures, optimized for resource constrained devices, and built with security in mind.

BayLibre is a member of the Zephyr Project and has been a core contributor since the project began in 2016 with over 650 commits by 8 engineers:

Graph of BayLibre contributions to Zephyr
All contributions made by BayLibre to the Zephyr Project

We have ported Zephyr to 64-bit RISC-V processors and implemented 64-bit support for Arm v8 cores. Our engineers also maintain core parts of Zephyr.

Zephyr v3.0.0 is most recent release, and these are the contributions from our team:

Networking

  • Nicolas Pitre introduced a network packet filter framework. It provides the infrastructure to construct custom rules for accepting and/or denying packet transmission and reception. This can be used to create a basic firewall, control network traffic, and more.
  • Nicolas also contributed a Synopsys DesignWare Ethernet MAC driver. It was implemented and tested on the STM32H7X series of microcontrollers.
  • Nicolas fixed locking for network sockets on SMP (multi-processor) systems.

PCIe

  • Neil Armstrong contributed Generic Host PCIe controller support so that Zephyr can now use PCIe devices on non-x86 platform like ARM64.  It supports Root Complexes with Root Complex Integrated Endpoint such as an embedded systems with internal-only PCIe Endpoints on bus 0.
  • Neil added a public API for Device Tree ranges properties which is used for used for PCIe I/O and memory regions, and he added a Device Tree chosen property to identify the main PCIe Controller node of the system.
  • Neil implemented support for the optional Interrupt Translation Service (ITS) module of the ARM GICv3 Interrupt Controller.  It is designed to support MSI/MSI-X interrupt delivery in a future release.

IPC (Inter Processor Communication)

  • ARM64 architecture maintainer Carlo Caione is now also a maintainer of the IPC subsystem.
  • Carlo added support for multiple IPC service backends. Previously, the IPC service code assumed that only one IPC instance could exist which was a big limitation.
  • Carlo also extended RPMsg data structures to accommodate for the introduction of new IPC backends.
  • Carlo introduced a new mailbox driver class. The MBOX API supports multi-channel signalling and data exchange by extending the outdated IPM (inter-processor mailbox) communication API.
  • Carlo also bumped support of the OpenAMP framework to the latest version and added an OpenAMP performance test.

Core

  • Carlo improved memory management by adding a shared multi-heap memory pool manager.
  • Carlo fixed a problem with the build system that effected incremental builds.
  • Carlo corrected the tick count on the ARM architecture timer when SMP is enabled.
  • Nicolas added bitfield macros to simply interaction with hardware device registers.
  • Nicolas reduced the heap options to a single type which allows for smaller and faster heap code due to not having a bunch of runtime conditionals based on the heap size.

Bar graph of BayLibre contributions to Zephyr 3.0.0
BayLibre contributions to Zephyr 3.0.0

 

If your team needs help with Zephyr or any other embedded software such as Linux or Android, then please don’t hesitate to reach out to the experts at BayLibre

Categories
Amlogic MediaTek Open-source U-Boot

U-Boot v2022.04 released, our contributions

BayLibre contributed to U-Boot v2022.04 which was released in early April. U-Boot development takes place in release cycles which normally span two months. Here are our contributions in this release organized by SoC family, and a graph of the contributions by each engineer.

Amlogic

Mattijs Korpershoek added support to flash and boot Android on the Khadas VIM3 and VIM3L boards. Prior to this release, these boards required the vendor’s fork of U-Boot to run AOSP.

Neil Armstrong added documentation for pre-generated FIP files from Amlogic. Firmware Image Package (FIP) is a packaging format used by Arm Trusted Firmware (TF-A) to package firmware images in a single binary. Neil also updated documentation for the Amlogic P200 and P201 reference boards.

MediaTek

Julien Masson shaved 5 seconds off the boot time by fixing a regression during MMC initialization. Julien implemented a function to wait for DAT0 line state change, and this eliminated the need to delay 500 ms after every mode switch.

Texas Instruments

Amjad Ouled-Ameur added support for IPU (image processing unit) early boot on the AM57xx and DRA7 SoC families. These SoCs contain multiple heterogeneous cores with the Cortex A15 cores usually running Linux. Typically, U-Boot would boot Linux on an A15 core, and then Linux remoteproc drivers would boot co-processors like the IPU. However, this may not be suitable for automotive applications with tight time constraints like a rear view camera. With this new release, U-Boot can now boot the IPU without waiting for Linux to be running on the A15 cores.

Amjad enabled boards with the AM335x SoC, like the AM3359 Industrial Communications Engine (ICE), to choose Ethernet port configuration (CPSW or PRUSS) based on jumper settings. Amjad also added USB mass storage in U-Boot SPL for the AM43xx-HS-EVM board.

Categories
Community Linux Kernel Open-source

Linux kernel 5.17 released, our contributions

Linux v5.17 was released on March 20th, 2022. As usual, LWN covered the 5.17 merge window (part 1part 2) and Kernel Newbies has a detailed breakdown of the features in the 5.17 release.

Here’s a summary of our contributions, organized by SoC family, and a graph of contributions by each engineer.

Amlogic SoCs

Our engineers continue to maintain and improve support for Amlogic SoCs in the kernel. Jerome Brunet added sound card support for the S805X-based Amlogic P241 board to play audio through HDMI and the internal DAC.

Amjad Ouled-Ameur fixed shared reset control in the USB driver used by the Meson S905X2.

Neil Armstrong made improvements in the DRM subsystem for Amlogic. This will assist the development of a HDMI transceiver driver for the older Meson8 SoCs, and sets the proper architecture for future MIPI-DSI support.

MediaTek SoCs

We also continued to support MediaTek SoCs. Kevin Hilman improved platforms like the MT8183 Pumpkin board where the watchdog is enabled by bootloader, and the kernel driver needs to be enabled to avoid the watchdog firing and causing reboot part way through kernel boot.

Fabien Parent improved the MT8183 evaluation board device tree to able to read the temperature for the thermistor connected to AUXIN0. Fabien also made improve the device tree for MT8192 and MT8516 SoCs.

Texas Instruments SoCs

We continue to upstream improvements for TI SoCs. Corentin Labbe increased priority of DES/3DES crypto accelerator to make sure it is picked before software implementation. Neil Armstrong improved the handling of display modes in the DRM driver used by many TI SoCs. Drew Fustini enabled the RTC driver to power off certain boards with an AM335x SoC like the BeagleBone Black.

Rockchip SoCs

Corentin Labbe made device tree improvements for the crypto-controller in RK3288 SoC.

Networking

Neil Armstrong added support for the PLX Technology OX810SE SoC which is used in some Western Digital Network Attached Storage (NAS) devices.

Misc

Neil Armstrong made improvements in the DRM subsystem including the driver for Synopsys DesignWare HDMI IP. Drew Fustini fixed a warning in a timer driver used on the Imagination Pistachio SoC.

Categories
Amlogic MediaTek Open-source U-Boot

U-Boot v2022.01 released, our contributions


BayLibre contributed to U-Boot v2022.01, the first release this year of the popular open source bootloader.

For those unfamiliar, U-Boot development takes place in release cycles which normally span two months. The merge window for the next release is open until the first release candidate. BayLibre was in the top 10 of companies contributing changesets during this cycle.

Neil Armstrong contributed many improvements for the Amlogic SoC family in this release:

  • Added new hardware support for:
    • Banana Pi M5
    • Beelink GS-King X
    • Odroid-HC4
  • Fix Android boot loop issue that could arise after updating the bootloader
  • Fix USB failure that occurs when PCIe link fails

Guillaume La Roque merged MediaTek SoC board configs to simplify build logic.

Amjad Ouled-Ameur fixed a GPIO issue at boot time on Texas Instrument SoCs by enabling the TI clock controller driver.

Categories
News

Year of the Water Tiger

Wishing you Good Health, Wealth and Prosperity in the Year of the Water Tiger!

虎年到,祝您:猛虎踏平门,祝福处处存,家人天天笑,喜事朝朝来!

Categories
News

The BayLibre team wishes you a Happy New Year!

Bonne Année! The BayLibre team around the world wishes everyone a great 2022.

Categories
Community Linux Kernel Open-source

Linux Kernel v5.16 released, our contributions

Linux v5.16 marks the first kernel release of 2022. As usual, LWN covered the 5.16 merge window (part onepart two) and Kernel Newbies has a detailed breakdown of the features in the 5.16 release.

Here’s a summary of our contributions, organized by SoC family, and a summary graph of contributions by each developer.

Amlogic SoCs

We continued to maintain and improve support for Amlogic SoCs in the kernel. Jerome Brunet fixed an audio sync issue on the AXG SoC family where the FIFO may get out of sync with the TDM decoder. Neil Armstrong made it possible to reduce the kernel image size by building the Amlogic GPIO IRQ controller as a module.

MediaTek SoCs

We also continued to support MediaTek SoCs. Markus Schneider-Pargmann contributed a fix for runtime power management of the hardware RNG (random number generator).

Gemini SoCs

Corentin Labbe improved support for Gemini based systems with the addition of device trees for two network attached storage (e.g. NAS) systems: the SSI 1328 with a SL3516 SoC and the Edimax NS2502 with a SL3516 SoC. Device tree improvements were also made for USB, IDE, flash and Ethernet peripherals as well as the addition of 2 new vendor prefixes.

Texas Instruments SoCs

We continue to upstream improvements for TI SoCs. Drew Fustini updated the AM3358-based PocketBeagle device tree to make use of a new feature in the OMAP GPIO driver that allows userspace libraries to set bias (e.g. pull up and pull down) on GPIO lines.

Categories
MediaTek Uncategorized

Pumpkin i350 Edge AI EVK now available

The Pumpkin i350 EVK Smart Hub Edition is now available on the new OLogic store! The board supports both Yocto and AOSP, developed in partnership by BayLibre and MediaTek:

The i350 EVK is an Edge AI platform designed for mainstream AI + IoT applications that require vision and voice edge processing, such as facial, object, gesture, motion recognition, LPR, voice activation and speed recognition, sound isolation, bio-tech and biometric measurements, and more. Built on the success of our high-end Pumpkin i500, the new i350 is a lower cost, mid-range performance platform that enables engineering teams to design for wider market adoption use cases such as door entry systems, personal gym trainers, child sleep companion robots, and much more.

Built using an ultra-efficient 14nm process, this highly integrated Edge AI platform incorporates a dedicated APU (AI processor) and DSP to enable vision and voice edge AI, with considerably greater performance and power efficiency in common applications.

With the advent of higher-performing AI-integrated chips, such as the MediaTek i350 SoC and development board designed by OLogic, we accelerate your engineering, shorten your development cycle, helping you to launch your new product faster at a lower development cost and faster ROI. 

Read more…

Categories
Community Frontpage Article Linux Kernel Open-source Uncategorized

Linux Kernel v5.15 released, our contributions

Linux v5.15, the latest version of the kernel, was released this past Sunday, October 31st. Linus marked the occasion by updating the code name to “Trick or Treat”. LWN covered the 5.15 merge window (part onepart two) and Kernel Newbies has a detailed breakdown of the features in the 5.15 release.

Here’s a summary of our contributions, organized by SoC family, and a summary graph of contributions by each developer.

Amlogic SoCs

We continued to help maintain support for Amlogic SoCs in the kernel. Notably, Neil Armstrong fixed a regression in the mmc driver for the Amlogic Meson GX SoCs.

MediaTek SoCs

We also continued to improve MediaTek SoC support. Fabien Parent improved DSI support for the MT8167 and MT8365 SoCs including updates to the device tree bindings. Markus Schneider-Pargmann made an improvement to the driver for the interrupt controller to allow registered IRQs to be used as a wakeup-source. This is the first upstream kernel contribution that Markus has made since joining the BayLibre team and will benefit power management functionality.

Gemini SoCs

Corentin Labbe continued to support Cortina Systems Gemini SoCs which are used in Network Attached Storage (NAS) devices. Corentin improved the device tree bindings for the Faraday FTPCI100 PCI host bridge used in the Gemini SoCs.

Texas Instruments SoCs

We continue to upstream improvements for TI SoCs and Kevin Hilman forward ported support for the DRA762 ABZ package.

Categories
Uncategorized

U-Boot v2021.10 released, our contributions

BayLibre has continued contribution to the open-source community as seen with this new version of U-Boot v2021.10, released on 4th October 2021.

For those unfamiliar, U-Boot development takes place in release cycles which normally span two months. The merge window for the next release (v2022.01) is open until the first release candidate (-rc1) on October 25th. The release of v2022.01 is expected on 10th January 2022 but that is only an estimate.

Our engineers Mattijs Korpershoek, Guillaume La Roque and Neil Armstrong focused on improving support of the Amlogic SoC family in this release. Notable contributions include:

Summary graph of contributions by each developer
Categories
Community Conferences ELC

Embedded Linux Conference 2021

The usual cadence of ELC North America and ELC Europe has changed this year due to the ongoing pandemic, and there is a single Embedded Linux Conference which begins next week: Monday, September 27th, through Wednesday, September 30th. The Linux Foundation is running ELC as a hybrid event which means there will both be in-person attendees and speakers onsite in Seattle and there will also be attendees and speakers attending remotely. Registration is still open and online attendance is only $50.

The schedule is full of interesting talks, and BayLibre is excited to have our team presenting 4 talks:

Introduction to Pin Muxing and GPIO Control Under Linux – Neil Armstrong

Monday, September 27 • 11:15am – 12:05pm

In the last 10 years, the GPIO and PINCTRL subsystem matured to support almost every possible handling of Programmable Input/Outputs and more generally multiplexing of multiple functions on single “Pins” or group of “Pins”. However, what is a “Pin”? What is a multiplexed “Function”? How programmable I/Os and pin functions are designed on the majority of System-On-Chips? Neil will describe this from the Hardware design Point-Of-View, the constraints and the requirements. Then Neil will explain how this particular subject was handled over the years in the Linux kernel, to finally get to the current GPIO & PINCTRL subsystems, and how it articulates with the Device Tree and other Firmware based protocols.

The Future of Linux on RISC-V – Drew Fustini

Tuesday, September 28 • 12:00pm – 12:50pm

This talk will explore the future of Linux on RISC-V, an open instruction set (ISA). I will introduce the open source FPGA ecosystem including Migen and LiteX, and explain how they make it possible to quickly implement SoC designs in an FPGA capable of running Linux on a RISC-V. I will also explore Linux-capable open source RISC-V implementations, and how some are being used in both academia and industry. I will look at what Linux-capable “hard” RISC-V SoC’s currently exist and what is on the horizon. I will also talk about how support in Linux for RISC-V is continuing to evolve such as the introduction of KVM RISC-V support and look at RISC-V hardware support that is in the process of being upstreamed. I will describe how the upcoming RISC-V Platform Specification is trying to standardize boot and runtime requirements.

“Plan to Throw One Away” – Pitfalls of API Design for Low-level User-space Libraries and Kernel Interfaces – Bartosz Golaszewski

Wednesday, September 29 • 10:30am – 11:20am

Ever wondered why so many of the popular plumbing-layer user-space libraries are usually called libfoobar2, gstreamer1.0 etc.? Why we have cgroup and crgroup2? Why a lot of kernel uAPI headers define SOMETHING_SOMETHING_IOCTL_V2? Unlike the in-kernel interfaces, user-space libraries usually promise a certain level of stability of the API and ABI – especially across a single major release. The kernel is even more strict on that – user-space programs must not be broken with incompatible changes to the kernel uAPI and it’s extremely rare to see any kernel interface modified or removed. This presentation will try to answer the question: why is it so difficult to design new programming interfaces correctly the first time? Why are minor, backward-compatible changes often not enough to address design issues and why do we need to always “plan to throw one away”? The author has hands-on experience with this problem – having helped design the GPIO uAPI and developed the user-space part of the kernel interface, only to see the kernel interface redesigned and ending up working on version 2 of the userland library. This presentation hopes to shed light on the aspects of good API design and help programmers avoid having to release multiple major versions of their open-source projects.

A New user(space): Adding RISC-V Support to Zephyr RTOS – Kevin Hilman & Alexandre Mergnat

Wednesday, September 29 • 2:45pm – 3:35pm

The use of RISC-V in embedded & IoT is continually growing, and Zephyr is one of the RTOSes that is seeing lots of RISC-V activity. This talk will cover how various RISC-V hardware features were used to implement protected memory, isolated userspace and hardware stack protection in the Zephyr RTOS kernel. 

Seattle-based Kevin Hilman and Portland-based Drew Fustini will be attending in person. We look forward to seeing you at ELC, either in-person or online!

Categories
Community Frontpage Article Linux Kernel Open-source

Linux Kernel v5.14 released, our contributions

Linux v5.14, the latest version of the kernel, marks the 30th anniversary of Linux! As always, LWN.net has in-depth coverage including the merge window (part one, part two) and the statistics from the 5.14 development cycle.

Here’s a summary of our contributions, organized by SoC family, and a summary graph of contributions by each developer.

Amlogic SoCs

We again did a lot of Amlogic development contributing 18 patches:

  • Jerome Brunet
    • improved HDMI audio on Amlogic Khadas VIM3
    • improved Meson AXG Audio Clock Controller Driver
    • contributed fix in Amlogic Meson-G12A Clock Controller Driver
  • Neil Armstrong
    • added support for the Banana PI BPI-M5 board
    • added support for the TOACODEC found in Amlogic SM1 SoCs
    • made fixes for the ODROID-C4 and ODROID-HC4
    • made UART fix for Amlogic Meson AXG, G12, GX
    • improved the Amlogic Meson serial port driver
    • made fix to Amlogic Meson HDMI-TX DRM driver

MediaTek SoCs

We also worked on supporting MediaTek SoCs with 19 patches:

  • Fabien Parent
    • added driver and DT bindings for MT8365 pin controller.
    • enabled cpufreq support of MediaTek MT8365 SoC
    • converted MediaTek RNG DT bindings to YAML format
    • added support for the MediaTek MT8167 power domains
    • improved support of MediaTek MT8167 peripherals
  • Neil Armstrong
    • added HDMI DT bindings for MediaTek MT8167
    • converted MediaTek HDMI dt bindings to use graph schema
  • Mattijs Korpershoek added support for PMIC keys for MT6358

Gemini SoCs

Corentin Labbe contributed 15 patches for Cortina Systems Gemini SoCs which are notably used in Network Attached Storage (NAS) devices:

  • added new driver for hardware cryptographic offloader for Storlink SL3516 SoC
  • added support for Welltech EPBX100
  • contributed improvements for:
    • D-Link DNS-313 1-Bay NAS
    • D-Link DIR-685 Xtreme N Storage Router
    • D-Link DNS-313 1-Bay Network Storage Enclosure
    • ITian Square One SQ201
    • Raidsonic NAS IB-4220-B
    • Storlink Semiconductor Gemini324 EV-Board
    • Teltonika RUT1xx
    • Wiliboard WBD-111
    • Wiliboard WBD-222

Texas Instruments SoCs

Kevin Hilman continued to upstream fixes for TI SoCs and EVM boards

Audio

Jerome Brunet contributed fixes to the USB gadget audio driver

Crypto

Corentin Labbe made improvements to the Intel IXP4XX crypto driver and has become a maintainer of the driver

DRM

Phong LE and Neil Armstrong added a new driver and DT bindings for ITE IT66121 HDMI bridge chip

Kernel CI

Corentin Labbe made it possible for Gentoo’s KernelCI to boot test the alpha arch

Various

  • Nicolas Pitre added clock management to ARM SCMI Generic power domain support
  • Corentin Labbe
    • made fixes to the Zoran video capture drivers
    • converted DT bindings to YAML format for:
      • Faraday Technology FTRTC010 Real Time Clock
      • Faraday TV Encoder TVE200
      • ARM PrimeCells PL080 and PL081 DMA controller
      • MDIO on GPIOs
plot of 5.14 contributions per developer
Categories
Community Frontpage Article Open-source RISC-V Zephyr

RISC-V PMP and Zephyr RTOS — a new user(space) has entered

Introduction

Adoption of the RISC-V open standard ISA continues to grow, along with increased market acceptance of solutions based on RISC-V designs. With this adoption comes more and more use cases & requirements to bring products to market, including security requirements.

One of those new use cases is the growing use of RISC-V with the Zephyr open source real-time operating system (RTOS).  Until recently, Zephyr only supported basic features for MCU-class RISC-V SoCs, but demand for security features such as hardware memory protection and stack protection has been growing.  

The RISC-V architecture supports these features in hardware, but support was missing in Zephyr.  To meet that demand, BayLibre recently implemented memory protection for the RISC-V architecture in Zephyr.

In this article, we’ll give a brief introduction to some Zephyr features, and related RISC-V hardware features before diving into how we used those features to implement memory protection, stack protection and user-mode threads for the 32-bit RISC-V architecture (aka RV32.)

Overview of generic Zephyr features

Before getting into the details of RISC-V, this section will give a very brief overview of the Zephyr features and terminology used throughout the article.  For more detailed documentation, please see the Zephyr project documentation. Specifically, the User Mode section and the Memory Protection sections provide very useful background information.

Privilege modes

By default, Zephyr has a single privilege mode called kernel mode. This is the privilege level of the OS kernel itself.  For hardware platforms without an unprivileged mode, threads will also run in privileged mode along with the kernel.  On these platforms, a buggy or malicious thread could corrupt other threads or the kernel itself.  This is obviously undesirable.

User mode threads

For hardware architectures that support additional modes with reduced privileges, Zephyr offers the option to run threads at a reduced privilege level.  This privilege level is called user-mode.

The primary goal of this work was to take advantage of the RISC-V hardware privilege levels to run threads at the lowest privilege mode, thus keeping threads isolated from other threads and from the kernel.  

Stack protection

Zephyr supports hardware stack protection if supported by the underlying hardware.  Hardware stack protection is an optional feature which detects stack buffer overflows when the system is running in supervisor mode. This catches issues when the entire kernel stack buffer has overflowed, but not for individual stack frames.  However Zephyr supports optional compiler features which enable stack canaries for individual frames.

Stack separation

Along with stack overflow protection, Zephyr provides the ability to have per-thread stacks separated from the kernel stack.  When combined with a memory protection unit (MPU), this provides for MPU backed userspace.

Memory Domains 

When the underlying hardware provides memory protection, unprivileged user threads may only access the required memory regions and nothing else.  The minimum regions for a user thread are

  • program text and read-only data
  • its own stack

In addition, Zephyr provides a memory domain API to grant access to additional blocks of memory to a user thread.  The number of memory regions available is limited by the available number of regions which can be defined by the MPU.  Many RISC-V cores have a very limited number of MPU regions, so care must be taken to not use too many domains on these platforms.  Conceptually, a memory domain is a collection of some number of memory partitions. The maximum number of memory partitions in a domain is limited by the number of available MPU regions. This is why it is important to minimize the number of boot-time MPU regions.

Overview of relevant RISC-V hardware features

In this section, we’ll introduce the RISC-V hardware capabilities that will enable us to implement the memory protection and userspace features needed.

Privilege modes in hardware

The RISC-V architecture defines three primary privilege modes, from most privileged to least:

  • Machine mode (M)
  • Supervisor mode (S)  (optional)
  • User mode (U) (optional)

Note that machine mode, more commonly called M-mode, is the only mandatory mode. The other modes are optional.  This means that by default, the Zephyr port for RISC-V must run in M-mode.  Commonly used RISC-V cores for embedded applications, such as the E family of cores from SiFive provide M and U modes, but no S mode.  The primary project described below was based on an E31 core from this family.

Before this work, the RISC-V port for Zephyr only supported M-mode, so a big chunk of the work needed was the infrastructure for switching back and forth between privilege modes.  Switching from a lower privilege mode to a higher one happens by explicit calls to higher privilege levels (e.g. system calls) or by code performing an operation that is not permitted at that privilege level, causing an exception.  These exceptions will typically cause traps to the next higher privilege level where they can be properly handled.  The implementation of this switching will be described in more detail below.

Physical Memory Protection (PMP)

The Zephyr documentation for memory protection refers to processors with memory protection units (MPUs).  On RISC-V designs, the MPU is an optional part of the spec, and if present is provided by hardware called the Physical Memory Protection (PMP) unit.   The PMP provides per-CPU control registers to allow physical memory access privileges (read, write, execute) to be specified for each physical memory region.  PMP checks are applied to all memory accesses when the CPU is in supervisor (S) or user (U) mode.  

Optionally, PMP checks may additionally apply to machine (M) mode accesses, in which case the PMP registers themselves are locked, so that even M-mode software cannot change them without a system reset. In effect, PMP can grant permissions to S and U modes, which by default have none, and can revoke permissions from M-mode, which by default has full permissions.

The granularity of PMP access control settings are platform-specific and within a platform may vary by physical memory region, but the standard PMP encoding supports regions as small as four bytes.

The RISC-V ISA specification for PMP defines up to 16 PMP entries, but the actual number of entries present in each design is vendor defined and varies from platform to platform.  For example, the SiFive E31 core used for this project only has 8 entries.  The limited number of PMP entries leads to complexities and trade-offs in the implementation choices which will be discussed in more detail later.

Each PMP entry is defined by a config register and an address register.  To further complicate the already limited number of PMP entries, two entries must be used in order to define an arbitrary memory range: one to define the start address and another for the end address.  Using two slots for each memory range consumes the limited number of PMP slots very quickly.  

A more efficient usage of the PMP entries can be done if the memory regions to be protected are a naturally aligned power of two, referred to as NAPOT in the RISC-V spec.  Using  NAPOT memory regions, a single PMP entry can be used to define each region.  Therefore, the limited number of PMP entries leads to careful consideration of memory layout and regions to be protected. 

The full details of the PMP entries can be found in the RISC-V ISA specification, Volume II: Privileged Architecture.

New features / What we added

Now that we have an overview of relevant Zephyr features and RISC-V hardware capabilities, we can get into the implementation details for how these features were added for a 32-bit E31 core from SiFive. 

User mode threads /  CONFIG_USERSPACE

The Zephyr architecture porting guide describes the details of the APIs needed to support user mode threads.  Here we’ll describe the implementation of the main parts of this new functionality.  

Privilege mode detection

First, Zephyr provides an API call for detecting whether the current privilege level is user mode.  

arch_is_user_context():

return non-zero if the CPU is currently running in user mode. 

This will be called from different places, and can be called from any privilege mode.  Unfortunately, RISC-V does not have a CPU register readable from all privilege modes to get this information, so two possible solutions were evaluated.

  1. Use an ECALL (Environment Call) instruction or a machine mode instruction.  Either option would trigger a fault when running in user mode and trap to machine mode where  the privilege level could be checked.  This approach would lead to additional complexity in the kernel fault handlers, but more importantly it would add significant overhead.  This function is used often, so a solution that traps to kernel mode for every call is not good for overall performance.
  2. Declare a global variable, protected by PMP and made read only for user mode. This variable is then updated every time the privilege mode changes.  This approach has no performance overhead, but does consume one of our limited PMP entries to protect this variable.  The smallest region that can be described by the RISC-V PMP is a 4-byte region, so a 4-bytes in RAM is reserved for this variable. 

After experimentation, the second solution was chosen since it was secure and significantly faster.

User syscalls

Zephyr provides a set of system call APIs for user mode threads to call kernel mode functionality with arguments. For RISC-V, these are built on top of the ECALL instruction.  ECALL is the RISC-V instruction used to trigger a change in privilege mode.  The bulk of the work for adding user mode threads was in making changes to the kernel mode ECALL handler to handle the transitions between privilege modes.

Before we started this work, the core infrastructure for system calls was already in place, since system calls are used from kernel mode as well.  In kernel mode, the system call logic is also used for context switching and IRQ offload.

However, to support user mode, quite a bit of additional functionality was needed.  Focusing on just the logic involved for the newly added user-mode threads, here’s a high-level overview of the steps involved for handling a system call from user mode:

User mode:

  1. User mode thread invokes a system call function
  2. syscall wrapper prepares arguments 
  3. syscall wrapper issues ECALL instruction which traps to M-mode

Machine mode: ECALL exception handler

  1. save exception stack frame (ESF), SoC context
  2. Clear is_user flag
  3. kernel ECALL?
    1. is this a return from user-mode syscall? –> return_from_syscall
  4. handle user ECALL
  5. load syscall args from ESF
  6. switch to privileged (kernel) stack
  7. validate syscall ID
  8. do_syscall()
  9. syscall return does a (nested) ECALL  (back to step 1.)

Machine mode: return_from_syscall

  • set is_user flag
  • restore registers (ESF)
  • restore thread stack pointer
  • return to user (MRET instruction)

Note that the ECALL handler is used for all interrupt and exception handling for the RISC-V port of Zephyr.  This leads to some complexity in the code, but it’s well worth it for the amount of code reuse.  RISC-V has special “machine trap delegation” registers (medeleg / mideleg) which could be useful for separating kernel and user mode exception and interrupt handling.  This will be discussed later in the Future Work section.

Physical Memory Protection (PMP)

In this section, we’ll describe in more detail how the PMP is configured.  But first, an overview of the memory regions that need to be protected

User regions, per-thread

Each user mode thread should only be allowed access to the minimum required memory regions.  By default, these regions are:

  • program executable “text” and read-only .data section (RX, per-thread)
  • thread stack (includes TLS for thread data & bss sections) (RW, per-thread)

The text and read-only data sections are next to each other so are protected by a single PMP region.  This region is enabled with read (R) and execute (X) privileges.  Next is the thread stack.  The thread stack also includes thread-local storage (TLS) which includes the data (.tdata) and bss (.tbss) sections for the thread, and is marked as read-write.

Now, remember from the overview section on PMP above, that two PMP entries are required to define an arbitrary memory region.  So for these two regions, we are already using 4 out of 8 available PMP slots.   If we can restrict the read-only region and thread stack to naturally-aligned power-of-two (NAPOT), we can reduce this to one entry each.  This can be decided at build time by enabling CONFIG_PMP_POWER_OF_TWO_ALIGNMENT, which turns on CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT.

User regions, shared

In addition to the per-thread regions, one additional region is required to protect the current privilege level. 

  • current privilege mode (read-only, all threads)

As discussed above in the Privilege mode detection section, a global variable was created to keep track of the current privilege mode.  This variable needs to be readable from all privilege modes, but read-only from user mode, so a single PMP entry is used to protect this 4-byte variable.  Since this region is only 4-bytes, it can be defined with a single PMP entry.

How many PMP entries are needed?

To summarize, in order to protect the minimum regions for user-mode threads, 5 PMP entries are required for the general case, but this could be reduced to 3 for the special case of NAPOT regions for read-only memory and thread stack.

Memory Domains

If the memory API is enabled, additional PMP entries are required to protect each additional partition of a memory domain.  However, the number of entries available for memory domains is limited by the maximum number of PMP entries available, which is up to 16, but more commonly 8.  

Considering that up to 5 entries may already be used for user-mode thread protection, that leaves only 3 available PMP entries for memory domain partitions.   If the memory partitions themselves are NAPOT, then up to 3 can be defined.  But if they are not NAPOT, 2 PMP entries per region are required, meaning that only a single memory partition can be defined.

The RISC-V architecture implementation will define a maximum number of PMP entries available for memory domains, and this value will be returned by arch_mem_domain_max_partitions_get().  This API call is used by core kernel code to ensure that dynamic requests for memory domains do not exceed the maximum number of MPU entries that can be managed by the underlying hardware. 

Future work / Issues / Tricky stuff

While working on this project, we ran into several challenges and areas for potential future work.  Some of those areas have already been mentioned above, but a few others will be described in this section.

Syscalls

In order to support memory protected userspace, we added quite a bit of complexity to the system call handler for ECALL.  Additional complexity is needed because this main trap handler must handle exceptions and interrupts from both kernel space and userspace.  A potential improvement can be done by splitting this handler by using the RISC-V machine trap delegation registers (medeleg and mideleg.)  This has not yet been explored, but it could potentially improve the readability and maintenance of the exception and interrupt handling for the RISC-V port of Zephyr.

Hardware Stack Protection

In this article, we only discussed isolation of the thread stacks.  Using the same underlying PMP hardware, hardware stack overflow protection was implemented for the kernel stack as well, but discussion of this implementation will be left for a future article.

QEMU support

While developing the software for this effort, the RISC-V support in QEMU was often useful for adding new features.  However, we discovered that the PMP emulation in QEMU was not fully functional.  We have proposed some modifications to QEMU to improve this functionality, but more work is needed to make the PMP support fully functional in QEMU.

RISC-V 64-bit support

Many of the 64-bit RISC-V (aka RV64) platforms support supervisor (S) mode in addition to machine mode and user mode.  It should be explored whether it could be useful in Zephyr to support S-mode on these cores in a similar way that the Linux port to RV64 does: OpenSBI in M-mode, Zephyr in S-mode and threads in U-mode. 

Multi-core

This work for adding RISC-V PMP support to Zephyr was primarily developed on single-core embedded processors (e.g. SiFive E family) with only a single CPU.  Some features like the is_user flag that was added need additional work to support SoCs with multiple CPUs and to ensure they are safe for symmetric multi-processor (SMP) platforms.

BayLibre & Zephyr

In addition to the RISC-V PMP work done for this project, BayLibre is active in the Zephyr community where we are collaborators and maintainers of core parts of Zephyr.  

While the solution discussed in this article was targeted to the SiFive E34 MCU with floating point unit, BayLibre has also implemented support in Zephyr for more capable 64-bit RISC-V MPUs.  Speaking of 64-bit, BayLibre also implemented the 64-bit support for Arm v8 cores.

If your team needs help with RISC-V, Zephyr or any other embedded software such as Linux or Android, don’t hesitate to reach out to the experts at BayLibre.  

Categories
Uncategorized

The BayLibre team wishes you a Happy New Year!

Categories
Frontpage Article Partners Uncategorized

Baylibre announces partnership with Mender.io to deliver Secure OTA updates to the Internet of Things

BayLibre is delighted to announce a partnership with Mender.io to bring secure over-the-air (SOTA) updates to our customers & their products. Mender.io SOTA ensures that every IoT device is patched, protected, and running with the latest fixes. Mender has become a core component for many of our Linux projects, including our AIoT Linux SDK developed in partnership with MediaTek.

Secure and frequent OTA updates have become table stakes for IoT and embedded systems. BayLibre required a solution that would be flexible and extensible enough to integrate with systems built for different purposes. Our customers required an advanced solution that struck a balance between turnkey readiness and configurability. Mender.io offers multiple levels of security paired with a turn-key backend hosting solution at affordable prices. Above all else, Mender.io delivers a reliable service that we feel confident recommending to our partners & customers.

“BayLibre has successfully deployed Mender.io SOTA in the field across our customer base and the diverse set of devices that we help our customers build”, said Michael Turquette, CEO at BayLibre. “In addition to the flexibility and security of Mender’s solution, we have seen a strong customer response to the commercial hosting solution provided by Mender. Of course, customers have the choice to host the SOTA back-end themselves or through Mender.io, and we’ve seen great success for customers that trust the team at Mender with their SOTA hosting needs.”

Categories
Frontpage Article Linux Kernel

Linux Kernel v5.4 released, our contributions

Linux v5.4, the latest version of the kernel, was released on Monday November 25th. An excellent summary of this release can be found over on KernelNewbies. As always, LWN.net has in-depth coverage of the statistics from the 5.4 development cycle, where BayLibre is once again in the top 20 list of most active employers.

This time Neil Armstrong made it onto the list of most active developers by number of lines changed, coming in at 12th place with a whopping 7370 changed lines. Also, Kevin Hilman was recognized as one of the most prolific testers in the 5.4 cycle and ranked in 5th position for developers providing the most Tested-by tags.

Here’s a summary of our contributions, organized by SoC family, and a summary graph of contributions by developer.

Amlogic SoCs

This was another Amlogic-heavy development cycle for us, and we collectively contributed 119 patches to improve or extend the kernel’s Amlogic support. Those changes were added by Neil Armstrong, Maxime Jourdan, Jerome Brunet, Alexandre Mergnat, Julien Masson, and Kevin Hilman, and they included:

  • Adding support for the SM1-based Khadas VIM3L board
  • Adding support for the SM1-based SEI610 board
  • Enabling DVFS for the SEI610, Odroid-N2, U200, SEI520, and X96-MAX boards
  • Also adding support for USB and HDMI display for the SEI610 board
  • Replacing the VPU-centric power domain controller with the generic Everything-Else power domain controller for G12-based boards
  • Miscellaneous fixes for the GXBB, G12A, and GXL boards
  • Converting various device tree bindings to YAML to take advantage of DT validation

MediaTek

Fabien Parent continued his work on MediaTek’s SoCs and added MT8516 SoC support to the PWM and CPUFreq subsystems in the Linux kernel 5.4 release.

Texas Instruments

This release, Bartosz Golaszewski contributed a variety of patches for the TI DaVinci family of SoCs.

  • Convert DA850 EVM boards to use the GPIO backlight driver
  • Support multiplatform build for ARM
  • Switch all DaVinci boards that use device tree or the old board files to the new clocksource driver
  • A range of cleanups and patches to simply the fbdev code

DRM

Jerome Brunet and Julien Masson contributed changes to the DRM subsystem.

  • Add support for more i2s formats to the Synopsys DesignWare I2S audio driver
  • Various fixes and improvements for the Synopsys DesignWare DRM driver

And Neil Armstrong was added to the MAINTAINERS file as co-maintainer of DRM bridge drivers.

Audio

Once again, Jerome Brunet provided fixes and cleanups for the ASoC subsystem.

Categories
Frontpage Article kernelci

The history of the KernelCI project

The KernelCI project brings automated build and boot testing to anyone wanting to check the quality and stability of Linux kernel releases. What started as a spare time project has gradually grown into a community-driven open source project that’s used by the likes of Google and the Automotive Grade Linux project to verify the quality of the kernels included in their products. Here at BayLibre, we’ve been contributing to the KernelCI project since its founding and we routinely use it in our customer work — it’s become one of our most indispensable tools.

But the success of the project wasn’t always so certain. When the KernelCI project initially started, it was just two kernel hackers sharing bash and expect scripts to automatically apply patches and build ARM kernels. The journey from spare time tool to Linux Foundation project has been one of struggles and uncertainty.

Let’s break the evolution of the KernelCI project down into three phases.

Phase 1: Spare time project

The arm-soc tree is a Linux kernel git repository that’s used to collect patches for the kernel’s ARM sub architectures, and every release tens of developers submit pull requests to the arm-soc tree. When it was initially created in 2012, the co-maintainers (Arnd Bergmann, Olof Johansson and Kevin Hilman) had to apply patches to the tree by hand and there was no way to easily test that the patches they were merging worked correctly for the all of the 120 kernel configs. The end result was that build errors were accidentally incorporated, especially for less popular boards where it was easier for problems to go unnoticed.

Independently, both Kevin and Olof came up with the same solution to stop this from happening: a set of scripts to automate the task of applying patches and make building kernels easier. Over time, the two co-maintainers merged their scripts together to create a single collections of maintainer tools.

This was still early days though, and this embryonic version of KernelCI was missing many features that are taken for granted in a modern CI tool. For one, when the tools detected that a patch caused the kernel to stop building, the maintainers would have to manually send emails to the submitter telling them about the build failure. It was a very time-consuming process.

The next step was to reduce the effort of mailing build reports by automatically notifying authors whenever they submitted git pull requests that didn’t build across all ARM defconfigs. Once building and error reporting were automated, the arm-soc maintainers set their sights on run time testing every kernel that they built. And that meant booting kernels on real hardware.

Over the years, Kevin and Olof had collected a small pile of different ARM boards and platforms, so they diligently wrote the code to automatically boot freshly built kernels on their boards. This code uploaded kernels to the test device and booted it to a shell inside of a ramdisk. With this new functionality supported, the KernelCI code grew a new testing dimension. Now, not only could Kevin and Olof perform basic checks to ensure kernels built , but they could also ensure that those kernels would pass the slightly more strict requirement of booting to a shell. This meant that the automated testing could not only detect when patches “broke the build” but also when patches “broke the boot” too.

Around 2013, other kernel subsystem maintainers started asking for access to the KernelCI build and boot reports. Linaro engineers Tyler Baker and Milo Casagrande registered the kernelci.org domain and began work on building a website using the existing maintainer tools as a backend. To give the wider audience the information they required, a new frontend was written by Milo that would allow users to view the build and boot reports. 

It was at this point that the KernelCI project as we know it today was officially born.

Phase 2: Finding a community

Fast forward to early 2016 and Kevin was now at BayLibre and continuing his work on KernelCI. All of the founding developers had changed companies and were still involved, to varying degrees, with the project in their spare time. But without corporate backing a question naturally arose: is the KernelCI project sustainable?

Now the future of the entire project was in doubt and faced a kind of existential crisis. The developers knew they would be able to allocate dedicated time to work on the KernelCI project, but only if there was enough demand. The project needed to move beyond a spare time effort into one with a self-sustaining community.

KernelCI began to see adoption beyond the arm-soc tree as other kernel maintainers began making heavy use of the project. In particular, Greg Kroah-Hartman and Sasha Levin (the stable tree maintainers) were using KernelCI to ensure that every new release they produced was just as stable as the previous versions. In addition, BayLibre productized KernelCI.org for the Automotive Grade Linux project. This proved that the KernelCI.org project was a viable choice for projects focused on market verticals such as automotive and IVI.

This was a major turning point and KernelCI became a legitimate open source project. All of the code was moved to GitHub and mailing lists were created for developers and users to report bugs and discuss new features. With the backing of various companies, things began happening much more quickly.

The increased popularity of the project meant that the feature wishlist started growing faster than the small group of developers were able to finish tasks. It turned out that there was so much interest for the project that the developer were unable to keep up. So the next phase of the project was searching for a permanent home and a source of funding.

Phase 3: Going mainstream

Once the project started to be adopted as a foundational continuous integration tool for kernel developers and stable maintainers, the KernelCI developers began looking for a way to permanently fund the work and pay for the infrastructure to take the project to the next level.

A number of methods were considered, but ultimately the project decided on working with the Linux Foundation to achieve their ambitious goals, and there’ll be an official announcement of the project joining the Linux Foundation at the upcoming OSS Summit Europe 2019 conference.

One of the issues that the re-invigorated KernelCI project wants to tackle is the fragmentation that exists  in the Linux kernel testing space. There are currently dozens of kernel testing projects that duplicate work to varying degrees, and consolidating them into a single project — or establishing common test and reporting formats — would go along way towards avoiding that duplicate work.

The next chapter for KernelCI

Even though the KernelCI project has been going for seven years now, we’ve got no plans to slow down. New features are proposed all the time and the list of tasks just keeps growing.

Perhaps the biggest request the project has received is to make it easy for developers and product owners using stable kernels to switch to newer versions. Today, this is a challenge because there’s no standard way to compare the quality of two stable kernel releases, so you never know if you’re going to run into bugs when moving to a newer release. That means products ship with known bugs because developers are discouraged from updating.

If you’d like to help shape the future of Linux Kernel quality and the Continuous Integration ecosystem join the LF KernelCI project today. To find out more about the project, head on over to kernelci.org to see the latest results or join in the discussions on the mailing list.

Categories
Frontpage Article kernelci

KernelCI Joins Linux Foundation

We’re thrilled to announce that the KernelCI project has officially joined the Linux Foundation and that BayLibre is a founding member company along with Google, Collabora, Red Hat, Foundries.io and Microsoft. BayLibre’s Kevin Hilman was one of the original founders of kernelci.org in 2014, and since then Kevin and the BayLibre team have continued to contribute changes. This announcement is a milestone for the project, and the support from the Linux Foundation demonstrates how essential automated testing at scale is for the Linux kernel community.

KernelCI is a true battle-tested open-source project and is a vital tool for the upstream Linux kernel maintainers, allowing them to merge large numbers of changes during the merge window while still maintaining quality and stability. Thanks to the collection of board farms located in hardware labs around the world, new changes are boot and runtime tested across a wide range of devices and hardware, and results are checked via the KernelCI infrastructure before being applied to the official maintainer repositories.

We think this is the start of a really exciting time for KernelCI. With the help of the Linux Foundation, infrastructure costs will be covered and the overall operation of the service will be improved. Which means the project’s members will be able to focus on new ways to grow the testing service and make it even better.

We’re looking forward to the next stage of the KernelCI project, and continuing to help increase the long-term maintainability of the Linux kernel.

If you want to learn more about KernelCI, including how you can get involved, check out the kernelci.org website and the mailing list.

Categories
Frontpage Article Linux Kernel

Linux Kernel v5.3 released, our contributions

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 5.3, released on Sunday, September 15th 2019.  An excellent summary of this release can be found at KernelNewbies.

If you check out LWN.net’s 5.3 Kernel development cycle statistics article, you’ll see that BayLibre made it onto the top 20 contributors list, showing that we were one of the most active companies (when measured by changes) this development cycle.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

AmLogic SoCs

This release we contributed heavily to Amlogic Meson SoCs mainline support with lots of work from Neil Armstrong, Jerome Brunet, and Maxime Jourdan for the G12A (S905X2/S905D2) and G12B SoCs including:

  • Initial support for new G12B Soc family 
  • Enabling the IR controller on the SEI510, u200, and X96 Max boards
  • Fixups for the AXG TDM formatter driver
  • Adding support for dynamic OTG switching with the ID change interrupt
  • Enabling the sound card on the Hardkernel Odroid-N2
  • Increasing the Bluetooth bus speed to 2Mbaud/s
  • Enabling the WiFi SDIO module
  • Adding gigabit ethernet support for the X96 Max board
  • Enabling the hwrng module for the next generation SM1 SoC family
  • Enabling SD and eMMC on the g12a u200 board
  • A V4L2 m2m video decoder driver
  • Support for the XBGR8888 and ABGR8888 formats to the graphics controller

GPIO subsystem

Bartosz Golaszewski contributed changes for the GPIO subsystem including:

  • Fixes for warnings when the gpiolib is disabled
  • A fix for a use-after-free bug 
  • Various other cleanups and fixes

RISC-V

With the continued interest and adoption of RISC-V, we wanted an easy way to build an upstream kernel for the SiFive Unleashed board. Loys Ollivier submitted a patch that enables support in the default RISC-V kernel config.

DaVinci SoC

We’ve talked about updating the existing TI DaVinci SoC timer driver in the past, and this release Bartosz Golaszewski implemented a much simpler — and more modern — version with clockevents and clocksource support. He also enabled cpufreq support.

Misc

Beyond the above, we’ve also contributed patches to various subsystems and drivers.

  • Jerome Brunet contributed miscellaneous fixes and cleanups for the ASoC subsystem
  • Fabien Parent added AUDSYS clock support for MediaTek’s MT8516 SoC
  • Neil Armstorng enabled the Lima driver (ARM Mali 400/450 GPU) for arm64 and ARMv7 boards because it will be useful for KernelCI boot and runtime testing. 
  • Bartosz Golaszewski contributed cleanup patches for the at24 EEPROM driver and a new selector stepping option for voltage regulators.

BayLibre Linux 5.3 contributions

Categories
Frontpage Article Zephyr

When 32 bits isn’t enough — Porting Zephyr to RISCV64

Conventional wisdom says you should normally apply small microcontrollers to dedicated applications with constrained resources. 8-bit microcontrollers with a few kilobytes of memory are still plentiful today. 32-bit microcontrollers with a couple of dozen kilobytes of memory are also very popular. In the latter case, it is typical to rely on a small RTOS to provide basic software interfaces and services.

The Zephyr Project provides such an RTOS. Many ARM-based microcontrollers are supported, but other architectures including ARC, XTENSA, RISC-V (32-bit) and X86 (32-bit) are also supported.

Yet some people are designing products with computing needs that are simple enough to be fulfilled by a small RTOS like Zephyr, but with memory addressing needs that cannot be described by kilobytes or megabytes, but that actually require gigabytes! So it was quite a surprise when BayLibre was asked to port Zephyr to the 64-bit RISC-V architecture.

Where to start

The 64-bit port required a lot of cleanups. Initially, we were far from concerned by the actual RISCV64 support. Zephyr supports a virtual “board” configuration faking basic hardware on one side and interfacing with a POSIX environment on the other side which allows for compiling a Zephyr application into a standard Linux process. This has enormous benefits such as the ability to use native Linux development tools. For example, it allows you to use gdb to look at core dumps without fiddling with a remote debugging setup or emulators such as QEMU.

Until this point, this “POSIX” architecture only created 32-bit executables. We started by only testing the generic Zephyr code in 64-bit mode. It was only a matter of flipping some compiler arguments to attempt a 64-bit build. But unsurprisingly, it failed.

The 32-bit legacy

Since its inception, the Zephyr RTOS targeted 32-bit architectures. The assumption that everything can be represented by an int32_t variable was everywhere. Code patterns like the following were ubiquitous:

static inline void mbox_async_free(struct k_mbox_async *async)
{
        k_stack_push(&async_msg_free, (u32_t)async);
}

Here the async pointer gets truncated on a 64-bit build. Fortunately, the compiler does flag those occurrences:

In function ‘mbox_async_free’:
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
k_stack_push(&async_msg_free, (u32_t)async);
^

Therefore the actual work started with a simple task: converting all u32_t variables and parameters that may carry pointers into uintptr_t. After several days of work, the Hello_world demo application could finally be built successfully. Yay!

But attempting to execute it resulted in a segmentation fault. The investigation phase began.

Chasing bugs

While the compiler could identify bad u32_t usage when a cast to or from a pointer was involved, some other cases could be found only by manual code inspection. Still, Zephyr is a significant body of code to review and catching all issues, especially the subtle ones, couldn’t happen without some code execution tracing in gdb.

A much more complicated issue involved linked list pointers that ended up referring to non-existent list nodes for no obvious reason, and the bug only occurred after another item was removed from the list. This issue was only noticeable with a subsequent list search that followed the rogue pointer into Lalaland. And it didn’t trigger every time.

The header file for list operations starts with this:

#ifdef __LP64__
typedef u64_t unative_t;
#else
typedef u32_t unative_t;
#endif

So one would quickly presume that the code is already 64-bit ready. From a quick glance, it does use unative_t everywhere. What is easily missed is this:

#define SYS_SFLIST_FLAGS_MASK 0x3U

static inline sys_sfnode_t *z_sfnode_next_peek(sys_sfnode_t *node)
{
        return (sys_sfnode_t *)(node->next_and_flags & ~SYS_SFLIST_FLAGS_MASK);
}

Here we return the next pointer after masking out the bottom 2 flag bits. But 0x3U is interpreted by the compiler as an unsigned int and therefore a 32-bit value, meaning that ~0x3U is equal to 0xFFFFFFFC. Because node->next_and_flags is an u64_t, our (unsigned) 0xFFFFFFFC is promoted to 0x00000000FFFFFFFC, effectively truncating the returned pointer to its 32 bottom bits. So everything worked when the next node in the list was allocated in heap memory which is typically below the 4GB mark, but not for nodes allocated on the stack which is typically located towards the top of the address space on Linux.

The fix? Turning 0x3U into 0x3UL. The addition of that single character required many hours of debugging, and this is only one example. Other equally difficult bugs were also found.

The unsuspecting C library

One major change with most 64-bit targets is the width of pointers, but another issue is the change in width of long integer variables. This means that the printf() family of functions have to behave differently when the “l” conversion modifier is provided, as in “%ld”. On a 32-bit only target, all the printf() modifiers can be ignored as they all refer to a 32-bit integer (except for “%lld” but that isn’t supported by Zephyr). For 64-bit, this shortcut can no longer be used.

Alignment considerations are different too. For example, memory allocators must return pointers that are naturally aligned to 64-bit boundaries on 64-bit targets which has implications for the actual allocator design. The memcpy() implementation can exploit larger memory words to optimize data transfer but a larger align is necessary. Structure unions may need adjustments to remain space efficient in the presence of wider pointers and longs.

Test, test and test

One great thing about Zephyr is its extensive test suite. Once all the above was dealt with, it was time to find out if the test suite was happy. And of course it wasn’t. In fact, the majority of the tests failed. At least the Hello_world demo application worked at that point.

Writing good tests is difficult. The goal is to exercise code paths that ought to work, but it is even better when tests try to simulate normal failure conditions to make sure the core code returns with proper error codes. That often requires some programming trickery (read: type casting) within test code that is less portable than regular application code. This means that many tests had to be fixed to be compatible with a 64-bit build. And when core code bugs only affecting 64-bit builds were found, fixing them typically improved results in large portions of the tests all at once.

OK, but where does RV64 fit in this story?

We wrote the RV64 support at the very end of this project. In fact, it represented less than 10% of the whole development effort. Once Zephyr reached 64-bit maturity, it was quite easy to abstract register save/restore and pointer accesses in the assembly code to support RV64 within the existing RV32 code thanks to RISC-V’s highly symmetric architecture. Testing was also easy with QEMU since it can be instructed to use either an RV32 or an RV64 core with the same machine model.

Taking full advantage of 64-bit RISC-V cores on Zephyr may require additional work depending on the actual target where it would be deployed. For example, Zephyr doesn’t support hardware floating point context switching or SMP with either 32-bit or 64-bit RISC-V flavors yet.

But the groundwork is now done and merged into the mainline Zephyr project repository. Our RV64 port makes Zephyr RTOS 2.0.0 a milestone release — it’s the first Zephyr version to support both 32-bit and 64-bit architectures.

Categories
Uncategorized

Introducing The Thermo-regulated Power Measurement Platform

Effective power management is a top priority for embedded Linux devices, and while components such as power governors which select power configurations often get the most attention, an equally important consideration is: what configurations does the device actually support?

For many embedded Linux platforms, the list of supported power options is described by Operating Performance Points (OPPs) — a list of frequency and voltage pairs. Creating those OPPs requires a laborious process of hardware testing known as characterization. Characterization is usually an extremely manual task, and it’s not unusual for it to take a full day to test a single board.

When one of our customers asked us to help define the OPPs for the NXP iMX8MQ EVK, we wanted to use our expertise in building custom silicon and automating software testing to create a better solution. What we built was a device to not just monitor but control the on-die temperature of the iMX8MQ.

We’re calling that device the Thermo-regulated Power Measurement Platform (TPMP).

 

How Does Characterization Work?

The characterization process is a step in semiconductor manufacturing that involves testing wafers with various voltages, clock frequencies, and temperatures to see how the properties of the wafer change. The results are plotted in a shmoo plot which clearly shows the points at which the properties of the wafer deviate from the desired behavior..

One of the characterization techniques, known as a process corner, is PVT or Process, Voltage, and Temperature. Each of these variables is modified in turn during wafer testing while the other two remain constant. Process control is done at the fab and cannot be altered afterwards. Controlling voltage is fairly straightforward thanks to the wide range of hardware tools available, such as the ACME Cape, which can precisely alter the voltage supplied to the wafer. But it’s a different story for monitoring and controlling temperature.

Unlike voltage, wafer temperature is influenced by factors that are usually outside the testers control — for example, the temperature of the room where the testing is taking place. Ensuring proper testing of the PVT process corner requires precisely monitoring the temperature, and then heating or cooling the wafer using a Peltier device.

As you can image, controlling temperature on the wafer surface is a difficult problem to solve which means equipment is very expensive: paying $15,000 is not unusual. And even after spending large sums of money on the equipment, engineers still need to expend their time to manually test each point.

Given our experience building power-measurement hardware devices and automating software testing, we figured we could do better.

 

The Thermo-regulated Power Measurement Platform

The TPMP allows fine-grained control and measurement of the NXP iMX8MQ die temperature and it’s built using just five components:

The TEC-1091 controls both the Peltier element and the fan to heat and cool the die and maintain a specified temperature, which the controller monitors based on feedback from the heatsink and chip external temperature sensors.

The TPMP can handle die temperatures from 12°C to 115°C, but the measured and actual die temperature differs by about 2°C for low-temperature ranges and 8°C for high-temperature ranges. This is because it’s impossible to get a temperature reading directly on the die surface due to thermal resistance. Fortunately, accounting for this delta is easy to do in software by calibrating the chip external sensor before measurement.

How quickly can the TPMP adjust the die temperature? Pretty quickly. It takes between 5 and 10 minutes to ramp from 25°C ambient to 115°C and stabilize. And to make it easier for our engineers to check the temperature, we attached an LCD display that shows a rolling display of the Peltier element temperature, the voltage, and the current supplied.

 

TPMP LCD display

 

We chose Python3 when writing the software so that it can be easily integrated into an automated test framework. Using this software we can correlate the on-die temperature of the IMX8MQ with the Peltier sensor temperature, which means the TPMP can fully regulate the system and maintain a constant temperature.

You can get the software for regulating the Peltier element from here: ssh://git@bitbucket.sw.nxp.com/mps/tpmp_ctrl.git. Inside you’ll find scripts to:

  • Set the die temperature
  • Launch tests and save the results
  • Post-processing tools to analyze test results

Here’s an example of the output from running the regulation script to set the die temperature to 30℃:

 

Summary

In total, this project took three months to complete and cost about ten times less to build than standard off-the-shelf products. And if the huge cost savings weren’t enough, the integrated automation of the TPMP means it’s much easier to use.

Now we can wire up a board and run hundreds of test scripts to check each of the PVT variables in around two hours. When the tests are complete, we get a detailed report with all the results. If we did this manually, it would easily require a full day for each board.

Since the TPMP was so successful, our next step is to expand its use to a broader set of boards as part of our automated Linux kernel testing. To do that, we plan on integrating the TPMP software with kernelCI. Stay tuned for updates in a future blog post.

Categories
Open-source Partners

Announcing our work with MediaTek’s Rich IoT program

The team here at BayLibre is proud to join MediaTek US in announcing our involvement in their Rich IoT initiative. As the software Independent Design House for this program, we have developed Rity, an open source software stack focused on voice assistant, connected display and smart camera solutions. We have also developed an Android release that merges support for multiple application processors and connectivity solutions into a single SDK. We’re excited to enable the next generation of disruptive IoT products based on MediaTek solutions and BayLibre software.

 

For more information drop us a line at rich-iot@baylibre.com.

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

Linux Kernel 5.0 released, our contributions

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 5.0, released on Sunday, March 3rd 2019.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • new board: S805X-based “La Frite” from Libre Computer
  • audio: support S/PDIF input on AXG SoC family
  • audio: enable sound modules for S400 board
  • clocks: added new clock measure driver
  • display: support HDMI 1.4 4K modes

Ti DaVinci SoC Family:

  • fix label names in GPIO lookup entries
  • use nvmem to lookup MAC address

Misc:

  • Corentin Labbe: several fixes and cleanups in the crypto subsystem
  • Carlo Caione: fix boot from eMMC on i.MX8MQ
  • Bartosz Golaszewski: nexted IRQ fixes in GPIO subsystem

Categories
Linux Kernel

Our Upstream Kernel Contributions for TI SoCs

Texas Instruments (TI) supplies chips to roughly 100,000 customers around the world, with product life cycles measured in years and decades. These long-tail chips include TI’s DaVinci SoC which is particularly popular in IP network cameras, video communications, and portable media players, and also include the OMAP SoC, featured heavily on single-board computer development platforms such as the BeagleBone and the PandaBoard.

A large portion of the devices containing these SoCs will run Linux, and that makes Linux kernel support a priority. However, because the Linux kernel is routinely updated with bug fixes and new features, ensuring on-going support for TI’s SoCs requires constant development effort to keep out-of-tree patches up to date.

Luckily, there’s a way to lessen the load: by keeping TI’s SoCs supported in the upstream kernel.

The Business Case for Upstreaming

The biggest headache with supporting long-tail chips for years with out-of-tree patches is that it requires forward porting those patches to newer Long-Term Support (LTS) kernel releases. It’s a huge investment of engineering time, not just to update the patches, but also because every time that happens tests need to be run to check that no bugs have been introduced.

Merging TI SoC support upstream doesn’t completely eliminate this problem but does make it much more manageable. Instead of having to deal with migrating patches to a brand new LTS version, code can be updated piecemeal, as and when things like new APIs and bug fixes are merged.

And this is where BayLibre comes in. We’ve been working on the upstream kernel to ensure that, not only does every release work on the DaVinci and OMAP SoCs, but that those SoCs also take advantage of the latest bug fixes and features.

Our Upstream Contributions

BayLibre TI Contributions vs Linux Kernel Release bar chart

The majority of our work has been on the DaVinci SoC. In the last two years, we’ve contributed 99 patches to the Linux kernel. Bartosz Golaszewski and Kevin Hilman added support to the Video Port Interface (VPIF) driver to allow it to be initialised with device tree (DT) bindings; for many SoCs, DT bindings are the preferred way to describe hardware characteristics. In addition, Bartosz and Kevin added support for raw image capture with sensors supporting the 10-bit SGRBG10 format. Along the way, the guys cleaned up a slew of hard-coded assumptions about image formats in the VPIF driver that came from it only previously being tested with a single sensor that supported a single 8-bit format.

We’ve also worked on performance improvements by taking advantage of the DMA hardware in DaVinci SoCs. Fabian Parent enabled DMA channels for the SPI driver so that it correctly maps data buffers passed from the MTD layer. And Alex Baildon made CCPI DMA work on the DA850/OMAP-L138/AM18xx platforms to improve the performance of USB. Both of these efforts reduce the work the CPU has to do when transferring data to and from devices, which means a more stable workload.

Lastly, we helped with a large effort to move DaVinci to the common clock framework (CCF). This work involved rewriting hand-crafted clock drivers to use the CCF. A huge part of the migration to the CCF was done by an independent developer, David Lechner, and he deserves special mention. From BayLibre, Bartosz modified some of the clock driver consumers, including updating the remoteproc driver to use the reset framework and deduplicated code that existed in both the platform-specific support and the generic aemif driver.

Plans for 2019

As we said at the beginning of this post, maintaining support upstream requires on-going effort and we have further plans for the TI SoC code in 2019. We’ll be creating a proper clocksource driver to tidy up the random bits in the platform support, enabling support for sparse interrupts (critical for supporting some hardware), and eventually building DaVinci as part of the multi_v5_defconfig kernel config.

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

U-Boot v2019.01 released, our contributions

BayLibre has continued contribution to the open-source community as seen with this new version of U-Boot v2019.01, released on 14th January 2019.

This release introduces a big rework for Amlogic Meson SoC support in order to:

  • Add support for the new AXG platform and ease support for G12A/G12B platforms
  • Ease support for new boards based on Amlogic Reference Design

Starting with this release, Neil Armstrong now maintains the Amlogic SoC support with an U-Boot Custodian tree, similar to a kernel.org maintainer tree, now collecting patches for the Amlogic SoC support (board, arch, clock, pinctrl, …) and sending pull-requests to Tom Rini, the U-Boot maintainer.

Since U-Boot v2017.11, BayLibre engineers have pushed:

  • 75 patches
  • 14804 line changes
  • 292 files changes

Here is a summary of our contributions for this release:

Amlogic SoC family:

  • Add boot device mode, usable with pyamlboot
  • Add support for AXG family
    • pinctrl
    • dts
    • clock
    • network
    • mmc
  • Rework GX support by:
    • moving all P212 boards variants under the P212 board code
    • moving Khadas VIM2 support under the Q200 board code
    • moving Nanopi-K2 support under the Odroid-C2 board code
  • Add SPIFC flash controller for the upcoming “La Frite” board
  • Add VPU Power domain and VPU clocks support for upcoming video support

 

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

Linux Kernel 4.20 released, our contributions

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 4.20, released on Sunday, 23rd December 2018.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Added AXG PDM Input support, with Devicetree Nodes
  • Added common “Canvas” provider for DRM Display and upcoming V4L2 Decoder Driver
  • Added support for Serial Number readout from sysfs
  • Various Pinctrl, DRM, Audio and clock fixes

Ti DaVinci SoC Family:

  • fixed a GPIO-related regression present since v4.19
  • Finally killed davinci_clk_reset_assert/deassert()

Misc:

  • Bartosz Golaszewski became co-maintainer of the GPIO sub-system
  • nvmem: Bartosz fixed problems with the nvmem consumer API
  • Still some cleanups from Corentin in Crypto, Network and various other sub-systems
  • Fabien Parent added support for dedicated power supply in ChromeOS’s charger driver

 

 

Categories
Frontpage Article Open-source

The Top 3 Innovative Features of the Automotive Grade Linux UCB

Last month the Automotive Grade Linux (AGL) Unified Code Base (UCB) was listed as a CES Innovation Awards Honouree. AGL is a game-changing project for the automotive industry focused on bringing a fully-open software stack to the connected car, and we’re proud to have recently been named one of the top contributing companies. CES innovation awards 2019

AGL provides an operating system, middleware and application, known as the Unified Code Base (UCB), on top of which its nearly 140 member companies can rapidly build stable products. With all of those companies contributing to the project, there are plenty of innovative software features to talk about. Here, in our opinion, are the top 3:

1. Over-the-air (OTA) Updates

Today’s cars are collections of embedded systems, each running their own software stacks. As security issues are uncovered, updates need to be rolled out across fleets of cars as quickly as possible. Plus, with product life-cycles growing longer, software needs to be supported in production for longer and that often means shipping new features to older vehicles.

OTA updates prevent the need to recall cars simply to apply software updates. The ability to apply updates with cars still on the road is a major advantage because recalls inconvenience customers and can lead to reputational damage for manufacturers. They’re also extremely expensive.

As of the Electric Eel release, the AGL UCB includes a software layer for OTA upgrades. AGL uses the OSTree and Aktualizr projects to provide atomic, full file-system upgrades with rollback capability. As OSTree uses the file system to perform updates, it minimizes the network bandwidth and data storage requirements.

2. A Wide Range of Hardware Board Support

One of AGL’s goals for the UCB is to provide a single software platform for the entire automotive industry, and the UCB provides 70-80% of a finished product out of the box. That obviously includes applications, connectivity, and graphics, but it also includes a wide range of hardware board support for vendors such as Renesas, Qualcomm Technologies, Intel, Texas Instrument, NXP and Raspberry Pi.

And developers continue to contribute new support. Initial 64-bit ARM support was merged for the Electric Eel release earlier this year with the addition of the Renesas R-CAR Generation 3. Now, Renesas is working on contributing support for the ARM big.LITTLE architecture which can provide substantial performance improvements and power savings when combined with Energy-Aware Scheduler (EAS) patch series that’s part of the Renesas BSP.

3. Automated Continuous Integration and Testing

AGL is a “code first” project which means that it favors working code over writing lengthy specifications. All of that code has to be tested, and testing quickly and thoroughly is an important part of accelerating time-to-market with AGL’s shared software platform.

AGL has built extensive infrastructure for testing code changes. Defining the architecture of that testing infrastructure is the job of the Continuous Integration and Test (CIAT) expert group who, like all AGL expert groups, meet regularly to plan and coordinate development efforts.

Within the CIAT infrastructure, open-source software projects such as Fuego, LAVA, and Kernel CI provide comprehensive testing and allow every gerrit submission to be built and smoke tested on a range of hardware. But new changes aren’t just tested in isolation: daily snapshots are built and tested to catch any integration issues as early as possible.

We’ve written previously about how BayLibre contributed changes to both Kernel CI and AGL to harness the power of scalable automated testing, and we even housed a temporary Kernel CI backend in our office while the AGL project transitioned to their own instance. To see AGL’s Kernel CI instance in action visit https://kernelci.automotivelinux.org/.

Check out the AGL Booth at CES 2019

These are just some of the technical highlights of the AGL UCB. With over 2000 commits so far in 2018, new features and bug fixes are shipped in every release. If you’re attending CES 2019, January 8-11 in Las Vegas, be sure to check out the AGL Demo Showcase (Westgate Hotel Pavilion, booth 1614) to see the UCB on display.

Categories
Amlogic Community Conferences ELC Frontpage Article Linux Kernel Open-source

Hardware Accelerated Video Decoding and System Load Monitoring Demos

In the past few months, BayLibre engineers Maxime Jourdan, Alexandre Bailon and Neil Armstrong showcased two demos to illustrate some of their recent work: fully hardware-accelerated video decoding which was linked to non-intrusive System Load monitoring via JTAG.

While these two demos seem unrelated, the non-intrusive System Load monitoring via JTAG developed by Alexandre Bailon was a good way to prove that the Amlogic Video Decoder driver from Maxime Jourdan and the Amlogic Video Processing Unit graphics output work well together, and that it’s possible to monitor system load without causing video frames to be dropped.

First of all, Maxime Jourdan did a talk at Embedded Recipes 2018 in Paris about his work on developing and upstreaming the Amlogic Video Decoder driver for the Amlogic S905, S905X, S9095D and S9012 SoCs.

You can access the talk here :

And slides at: https://www.slideshare.net/ennael/embedded-recipes-2018-upstream-multimedia-on-amlogic-so-cs-from-fiction-to-reality-maxime-jourdan

Then, Alexandre Bailon and Patrick Titiano spoke about their “libSoCCA” project which gets the real-time statistics of a running system via the well-known JTAG interface without interfering with the system’s execution or requiring any modifications to the code.

The ultimate demonstration was to show, in real-time, the CPU Load and CPU Bus accesses of a Libre Computer AML-S905X-CC system (running the LibreELEC Kodi distribution) with a steady 10% load decoding 50mbps 4K H.264 and 4K H.265 10-bit video samples from the JellyFish Video Bitrate test files http://jell.yfish.us/. And all without changing a single byte of the Linux filesystem or Kodi binaries.

The most interesting fact of this demo is that Kodi doesn’t have any platform-specific code to handle Accelerated Hardware Video decoding, nor does FFmpeg which speaks to the decoder driver.

All of this is made possible thanks to the Linux DRM (Direct Rendering Manager) KMS (Kernel Mode Setting) GBM (Graphics Buffer Management) display support handled in Kodi, and the V4L2 (Video For Linux 2) Memory2Memory Hardware Decoder support from FFmpeg.

With these two graphics subsystems combined, decoded frames from the V4L2 interface can be passed to the DRM Video driver and scaled, blended and displayed. And thanks to the Linux DMA-BUF framework, none of the frames need to be copied.

Categories
Community kernelci

We’re a Top Contributor to Automotive Grade Linux

At the Automotive Grade Linux (AGL) All-Member Meeting in Dresden last month, a list of top contributors to the project was announced which included both BayLibre and our very own Kevin Hilman. Walt Miner presented slides that showed the top individual contributors along with the top contributions broken down by company. Kevin is a top 20 contributor to the project, clocking in 26 commits in the first three quarters of the year, and BayLibre is in ninth place (with 45 commits) on the companies list.

We’ve had the pleasure of working closely with the AGL project over the last couple of years. Primarily, we’ve enhanced the Kernel CI project for use with AGL, but our AGL contributions have covered everything from Kernel CI backend support to new tests.

Since the beginning of 2018 the team at BayLibre have contributed:

  • Yocto-ptest fixes and improvements
  • CAN bus tests fixes and improvements
  • Changes to add USB host controller emulation to the QEMU template
  • A new layer for energy aware (EAS) scheduling patches

Plus, we offered the use of our own version of the AGL backend (running from inside our lab) while the official AGL backend was under development and transitioning to kernelci-docker code.

It’s fantastic to see the recognition for our hard work and to be listed alongside such impressive engineers and companies. We’re looking forward to the continued success of the AGL project and the part we get to play in that.

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

Linux Kernel 4.19 released, our contributions

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 4.19, released on Sunday, 21th October 2018.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Initial support of the audio hardware on the Amlogic AXG SoC : A113D
    • Audio clock controller
    • Audio reset controller
    • Pinctrl missing configurations
    • ALSA SoC card
    • TDM input/output
    • SPDIF output
    • HW FIFOs handling
    • es7134 codec support
    • tas517x support
    • DT audio and pinctrl nodes
  • Add S805X based P241 board
  • Finally enable graphics output on the FriendlyElec Nanopi-K2
  • Enable DMT (Display Monitor Timing) HDMI output to support generic, non-HDMI monitors (DVI, VGA via HDMI->VGA dongle or monitors with custom timings in EDID)

Ti DaVinci SoC Family:

  • switch davinci SoCs to use the ti-aemif driver
  • switch to the reset framework for the DSP remoteproc

Misc:

  • Lots of cleanup and some code removal from Corentin
  • Various Clock & ALSA SoC fixups to make AXG Audio work
  • Add support for the CEC functionality on the upcoming Asus ChromeBox via the Embedded Controller interface and the Linux CEC Framework maintained by Hans Verkuil

 

 

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

U-Boot v2018.07 released, our contributions

BayLibre has continued contribution to the open-source community as seen with this new version of U-Boot v2018.07, released on 27th July 2018.

This release permits booting over an USB Mass Storage (USB Stick or Hard Drive) with EFI on the Libre Computer AML-S905X-CC board !

With U-Boot 2018.07, you can download the nighly Debian-Installer or OpenSuse  TumbleTweed, copy U-boot to a blank SDCard, copy the installer to an USB, plug USB and SDCard, boot and install !

Here is a summary of our contributions:

Amlogic SoC family:

  • Add support for the USB PHY and Controller on the Meson GXL (S905X, S905D) SoC based on the Linux version done by Martin Blumenstingl
  • Add Analog-to-Digital (ADC) driver based on the Linux version done by Martin Blumenstingl
  • Add Amlogic Reset Controller
  • Add ADC cli command
  • Sync DT with Linux 4.17

Misc :

  • Add “bulk” commands for Reset and Clocks + tests
  • Add dwc3-of-simple USB DWC3 simple Glue driver based on the Linux version
  • Add support for any number of PHYs for the DWC3 controller
Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

Linux Kernel 4.18 released, our contributions

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 4.18, released on Sunday, 12th August 2018.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Multiple fixups/enhancements for the AXG A113D SoC (I2C, TDM)
  • Add write support for NVMEM
  • MMC/SDCard Fixups
  • Boot fixup with SCPI

Ti DaVinci SoC Family:

  • Fixup for NAND support
  • Fixups for RemoteProc support
  • Fixups for AEMIF support

Misc:

  • Lots of cleanup and some code removal

 

 

Categories
ACME Frontpage Article

Announcing the ACME Firmware Beta 3 Release

On 8th June 2018, BayLibre released a new version of the ACME Firmware, Beta 3. This important release contains a fix for a critical issue that can cause incorrect reporting of current and voltage data.

We recommend that everyone upgrade to this latest release right away.

A high-level summary of the changes can be found in the changelog, but in the rest of this article we’ll look at them in more detail.

 

Fix for Incorrect Shunt Resistor Values

The Beta 3 release includes a fix for a major bug that can manifest as incorrect current and voltage data being reported at the application level.

The issue is that shunt resistor values are incorrectly copied from the probe EEPROM when creating entries in the Linux sysfs file system. Depending on the configuration of inserted probes, the value from the probe in the first slot may actually be copied to the sysfs entry for the second slot, the value from the probe in the second slot may be copied to the sysfs entry for the third slot, and so on. In other words, it’s possible for all sysfs entries to contain incorrect shunt resistor values.

The bug is caused by a mismatch between the way probes are numbered by ‘dut-dump-probe’ (starting at 1) and the way the OS enumerates devices in sysfs (starting at 0). Because of this off-by-one bug, it’s impossible to initialize the shunt resistor value for the first slot on the ACME cape, and the default value of 10mohm is always used. Note that users of JACK probes may not be affected by this issue since the shunt resistor value for this probe happens to be identical to the default value.

 

An Upgrade to the Latest Yocto Krogoth Release

We’ve also upgraded to the latest version of the community-maintained Yocto Krogoth release (2.1.3), which includes both functional and security fixes, bringing the latest software updates to ACME users.

You can find instructions for downloading the ACME Firmware Beta 3 release here.

Categories
Frontpage Article Linux Kernel

An Overview of Generic Power Domains (genpd) on Linux

The saying goes that most programming problems can be solved with another layer of abstraction. Generic Power domains (genpd) are a (relatively) new Linux kernel power management abstraction that model the way power is controlled for components on SoCs. In other words, genpd describes the relationship between devices and power controllers. Generic power domains allow these relationships to be declared outside of device drivers, which means these device groups can be updated at runtime.

Static versus Dynamic power management

Linux supports two types of idle power management: static and dynamic. Static power management is the term for suspend and resume operations; it controls system-wide power. This is the traditional way to suspend a system and comes from the original support for laptop PCs where the whole system would be suspended at once. A good example of this is closing the laptop lid.

Dynamic power management, on the other hand, controls power to individual devices, allowing flexible power management based on activity in different parts of the SoC/platform.

Dynamic power management for device drivers is implemented inside of the kernel with the runtime PM framework (dynamic power management for CPUs is handled differently, via the CPUfreq and CPUidle subsystems). Device drivers use the struct dev_pm_ops data object to hook up their callbacks:

These callbacks allow devices to be powered up or down, or enter a low-power idle state when they go idle, such as when a transaction is finished. Each individual driver decides when the device is idle.

Device drivers can inform the PM core when devices are going idle. Idleness is controlled using the pm_runtime_get() and pm_runtime_put() functions. This API maintains a reference counter for each device to track whether the device is in-use at any time. pm_runtime_get() blocks the device from entering a low-power mode until the last pm_runtime_put().

But controlling power on a per-device level, while better than system-wide, isn’t the most efficient way to save power. Instead, hardware vendors have long provided a way to control power to groups of devices through power islands, or power domains.

 

What are power domains?

Devices and SoCs have separate power rails with devices connected to them. Power domains are a hardware concept for managing devices sharing power rails. Their power voltages are correlated. While the hardware power islands have existed for many years, the kernel has only recently added support for them.

Linux power domain drivers sit above devices in the PM hierarchy, at the same level as bus_type.

Power management core hierarchy diagram

These relationships need to be modeled inside of the kernel because the same IP blocks and chip families might have different groups depending on the hardware. For example, the same ARM IP can be used in different SoC vendor products and they might group things differently. So you need a way to describe this fixed relationship. Some examples are whether all CPUs/clusters share a power rail or have independent rails, or whether video-centric IP shares a power rail with the display IP.

A solution is needed that abstracts this so that the driver doesn’t need to care. And these power domain relationships need to be described in a way that does not require updating drivers for every new platform and configuration.

Crucially, we don’t want a driver to care whether it’s running on an AmLogic or Qualcomm chip — it should work on both, independent of how the power rails are configured on those platforms.

 

Generic Power Domains (genpd)

Generic power domains are an abstraction on top of Linux kernel power domains. They provide a number of benefits over regular power domains because they support:

  • Domain hierarchies
  • Adding and removing devices from domains at runtime
  • Power governors
  • Device Tree support

Generic power domain drivers control the entire domain’s power when an entire group of devices goes idle. A typical action is sending a command to a microcontroller or writing to a register to disable a voltage rail. The genpd framework takes care of running the callbacks for every genpd driver in a hierarchy, a feature that makes it possible to control the nested power domains available on some SoCs.

genpd drivers can be both IRQ-safe and always-on. The former (enabled with the GENPD_FLAG_IRQ_SAFE) is useful for domains that can be powered on/off in atomic context. This feature is particularly useful for devices that have low suspend and resume latency, and can be powered on or off quickly.

Always-on genpd drivers make sense if you have devices that must not be powered off. For example, CPUs that are behind a power microcontroller. Whether or not genpd drivers set the GENPD_FLAG_ALWAYS_ON flag can be platform-dependent.

In addition, there are optional driver callbacks that can be used if drivers want to know when new devices are attached or detached from a generic power domain. These callbacks are used to execute power domain-specific actions.

Generic power domains are described in the device tree, so the configuration can be described on a per-platform basis. Storing the configuration data inside device tree also makes it easy to update since the genpd driver requires no changes when new SoCs are released; a single driver can support all platform configurations.

Here’s a simple genpd example:

Here’s how it would be used by a device:

genpd also provides governors which add another level of control in between the PM core and the device drivers. Every generic power domain can have its own governor. Governors decide whether power should be gated to a generic power domain, and their decisions are based on simple heuristics. There are two available in the kernel: the simple QoS governor and the always-on governor.

As the name implies, the always-on governor prevents devices from being powered off. The simple QoS governor is more interesting — it considers the time it takes to power devices on and off, known as suspend and resume latency. If a power domain is predicted to be resumed before power can be turned off to all devices, the simple QoS governor will prevent the power domain from suspending.

Governors have a standard plugin-architecture, so you can write custom versions for specific platforms as well.

 

Performance states

A recent addition to the kernel, in v4.15, is support for power domain performance states. This new feature makes it possible to finely tune the power consumption of devices by varying the voltage to power rails. genpd drivers implement this with the (*set_performance_state) callback. Sadly, there are no upstream users of this API yet, but one is currently being reviewed on the kernel mailing lists.

 

Resources

The genpd framework provides an extremely flexible API for finely controlling power domains. If you want to learn more, here is a list of resources:

And here’s the video of Kevin’s talk on generic power domains at Kernel Recipes 2017.

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

Linux Kernel 4.17 released, our contributions

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 4.17, released on June, 3rd 2018.  An excellent summary of this release can be found at KernelNewbies.

We’re happy to report BayLibre is once again featured in the LWN stats for this release. Corentin Labbe from our team is a Top 10 developer and BayLibre is a Top 20 employer, both by Lines Changed.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • clocks: major rework to switch to regmap; misc. cleanups
  • improve DT support for WeTek hub and play2
  • MMC: reduce max speed for Odroid-C2 boards after multiple problems reported
  • AXG family: enable hardware RNG
  • HDMI: Add support for DMT modes

Misc:

  • Lots of cleanup and dead code removal (see Lines removed by Corentin)

 

 

Categories
Frontpage Article Zephyr

Shipping the Zephyr RTOS in Consumer Electronics Products

Baylibre collaborates with manufacturers of consumer electronics, providing custom firmware solutions and specializing in Linux-based IoT devices. We’ve worked on several embedded consumer products using the Zephyr Project, including the Sensor Hub in the Blocks modular smartwatch and Ellcie Healthy glasses, and the Embedded Controller for the Gnarbox.

When choosing our Real Time Operating System (RTOS) for these projects, we had quite a few options because the RTOS market is increasingly fragmented. Top of our priority list was a project using a permissive license, and providing a free solution. This eliminated FreeRTOS from consideration since it was still under a GPL or proprietary license at the time. Mbed OS was another contender, but we felt it was too dependant on the Mbed ecosystem. We considered using NuttX or building a bespoke OS, but ultimately decided that Zephyr best met our needs.

Zephyr is an RTOS hosted by the Linux Foundation. It is scalable, supports multiple hardware architectures, is optimized for resource-constrained devices (everything is statically allocated), and built with security in mind. Collaboration is also actively encouraged, from individual coders to major companies contributing. We liked that it is similar in many ways to Linux (in its coding style and build process), has a strong community focus, and fantastic documentation. The permissive Apache 2.0 license was also an advantage.

Zephyr’s release cycle is three to four months, with (approximately) an 11-week merge window and 3-week stabilization period. Each release is a combination of planned new features and community contributions.

Those community contributions meant that Zephyr gave us a lot of what we wanted out of the box, and made it easy for us to upstream the elements we added for our customers’ products: support for the STMicroelectronics STM32L4 and STM32F0 MCUs. STM32F1 was already supported, so we were able to copy that example, simplifying our development work. That also made porting very fast. We completed a basic port in a day and a half, and a fully-tested port in less than one week.

Overall, we found Zephyr to be well-structured and simple to use. Most of the port time was spent on I2C/SPI testing. Once porting was complete, the Zephyr upstreaming process was straightforward. We

  • Read the contribution guidelines
  • Cleaned up our patch to follow Zephyr’s coding standards (with help from uncrustify)
  • Verified that the patch met the coding standards using checkpatch
  • Committed our changes to github
  • Awaited reviews

Fortunately, the Zephyr project provides a community of reviewers and we were able to contact the maintainers on the Zephyr IRC channel to assist with getting patches merged.

Despite challenges during the review process, overall we found Zephyr easy to get started with thanks to its similarities to Linux, thorough documentation, and an active community. This RTOS’s design is good for low memory usage, and as the software and development processes evolve with growing community input and support, flaws are quickly fixed.

If you’d like to hear more about our experience with Zephyr to power consumer electronics products, check out our presentation from Embedded Linux Conference 2017:

 

 

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

Linux Kernel 4.16 released, our contributions

Linux Kernel 4.16 released

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 4.16, released on April, 1st 2018.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

This release is important since it’s the first Linux release that can boot an Amlogic SoC with graphics with u-boot mainline, both unchanged !

  • Finally enable the Video Processing Unit power domain and all the missing bit :
    • drm/meson: Add missing VPU init
    • drm/meson: dw_hdmi: Add support for an optional external 5V regulator
    • ARM64: dts: odroid-c2: Add HDMI and CEC Nodes
    • ARM64: dts: meson-gx: grow reset controller memory zone
    • ARM64: dts: meson-gx: Add HDMI_5V regulator on selected boards
    • ARM64: dts: meson-gx: add VPU power domain
    • dt-bindings: display: amlogic, meson-dw-hdmi: Add optional HDMI 5V regulator
    • dt-bindings: display: amlogic, meson-vpu: Add optional power domain property
    • This means you can download Linux v4.16 and U-Boot v2018.01, build them, flash them and you will be able to boot to graphics with HDMI on most Amlogic S905, S905X and S912 supported boards !
  • drm/meson: fix vsync buffer update : fix a long-time issue causing glitches when rendering directly using GBM
  • Jerome improved the Meson S905X/S905D/S912 internal ethernet PHY support by :
    • net: phy: meson-gxl: add interrupt support
    • net: phy: meson-gxl: use genphy_config_init
    • net: phy: meson-gxl: add read and write helpers for banked registers
    • net: phy: meson-gxl: define control registers
    • net: phy: meson-gxl: check phy_write return value
    • ARM64: dts: meson-gxl: add internal ethernet PHY irq
  • Jerome added the “clock protection” feature to the clock framework

Misc:

  • Add support for the the Variscite DART-MX6 SoM and Carrier board with LVDS display
  • media: uvcvideo: Add a quirk for Generalplus Technology Inc. 808 Camera
  • ARM: davinci: fix the GPIO lookup for omapl138-hawk
  • i2c: davinci: fix the cpufreq transition
  • Corentin did some cleanup in the crypto directory and some overall remove of unused code/documentation

 

 

Categories
Community Frontpage Article Open-source Zephyr

Zephyr 1.11.0 released, BayLibre contributions

A full changelog of this release are available on the project releases page.

For these last 3 Zephyr releases, BayLibre engineer Neil Armstrong worked to add a better support for the STM32F0 SoC family by adding SPI, I2C, and internal Flash support, following his work on the previous Zephyr release on the overall STM32 Microcontrollers.
A hard time was spent adding SPI Slave and I2C Slave support on Zephyr for the whole STM32 Microcontroller family, to align with other RTOS and Linux for the I2C Slave part.

Since Zephyr 1.8, supported in Zephyr :

Along the following STM32 Microcontrollers features :

And ongoing features still in discussions :

The last Pull Request is done in cooperation with Daniel Wagenknecht, and triggered a lot of technical discussions ! Thanks Daniel !

 

Categories
ACME Board Farm Community Lab

The BayLibre LAVA Box: An Embedded Linux CI Lab Inside a PC Case

At BayLibre, we have the pleasure of working with the world’s best OEMs and silicon vendors on a wide range of projects. We get to play with the latest technology to ensure that it’s supported in the upstream Linux kernel, which means we use a lot of development boards every day.

And as any embedded Linux developer will tell you, it can be a real pain to work with multiple boards while you’re writing and testing code. Connecting up new boards, power-cycling, plugging in peripherals. Doing things by hand consumes a lot of time. That’s time better spent fixing bugs and writing new features. Not to mention the office mess that occurs when you’ve got over 10 boards connected with serial, power, and USB peripherals.

To illustrate the point, here’s a picture of Kevin Hilman’s home lab. It shows how quickly things can get out of hand when you’re doing Continuous Integration (CI) and helping kernelci.org to perform 2,680 boots of the latest kernel changes across 271 unique boards every day.

This got us thinking: is there a way to contain the mess and simplify administration of our boards? Fitting everything inside a single case was a hard requirement since some of our staff work from home and don’t have the space to house industrial-grade racks. We also wanted to encourage new kernelci.org labs and have something that would provide a foundation for custom CI solutions for our partners.

For a BOM cost of under €400 (for brand-new components), we built an entire lab inside of a PC case that ticked all of these boxes and validated our idea. Kevin Hilman and Patrick Titiano unveiled the project at Embedded Linux Conference Europe 2017. We call it the “LAVA Box”.

 

LAVA Box Design

Because the LAVA box provides an entire CI solution, it contains both hardware and software parts. The software portion is made up of LAVA server (master) and dispatcher (slave). The server provides a web interface and handles things like job scheduling and priorities, and board description files which greatly simplifies administration.

The dispatcher manages connections between the boards and the real world. It provides services like DHCP, TFTP, NFS, etc, handles USB fastboot and mass storage, and power switching for all devices under test (DUT). Serial connections are handled by the dispatcher and udev rules are used to ensure that serial consoles have the same device path every time they come up. Once you’ve connected your devices and written the description files, the day-to-day tasks are completely automated.

Both the server and dispatcher run inside of individual containers which are managed with docker-compose. While it’s possible to run the two containers separately for a scaled-out lab, we host everything on one machine for the LAVA Box proof of concept.

On the hardware side, everything is neatly housed inside a PC case. Boards are mounted to the case’s drive bays which makes it simple to swap them out for maintenance or administration. A standard PC PSU is able to supply enough power rails (molex/ATX connections) for the host computer and 5 DUTs with connectivity (network, power control, USB, etc). It would be possible to power even more devices with a more powerful PSU and a bigger case (or if you’re willing to run cables outside of the case).

We found that the +5v and +12v rails from a standard ATX PSU worked well for powering our DUTs. Though the lack of configurable voltages is a minor limitation, we were able to live with it. A critical piece of functionality is power switching for DUTs and there are lots of inexpensive options available on the market, such as USB-controlled relays. We used the fully-open ACME Cape because, apart from controlling power, it also measures power consumption.

All the DUTs communicate on an 8-port switch and sit on an internal network that is isolated from the outside world. Even though the LAVA box master requires Internet access in our configuration (to pull down CI jobs from kernelci.org), it is possible to run in a LAN-only mode for local jobs.

Our prototype is just one possible way to configure the LAVA Box. Due to the modularity of the design, and the open documentation and software, you can build your own “lab in a box” using different hardware components and software provided it uses the kernelci API.

The Automotive Grade Linux project has taken advantage of this flexibility to build their own LAVA box. We improved the KernelCI API to level-up the quality of their releases and the new API allows AGL to run platform, AGL-specific, and automotive-specific tests everytime new code is committed. In a group with over 100 member companies, scaling engineering effort is super important and our automation and CI work has significantly improved the overall quality of the AGL CI loop.

 

The hard things about building labs

It took us a long time to build our LAVA box prototype. But we learned some valuable lessons along the way that will save you time and energy if you want to build your own.

1. You need to balance DUT power consumption

One of our wishlist items was more power rails. This doesn’t necessarily mean we want more power, simply that we want more rails to connect more DUTs. In the future, we’ll move to a more powerful ATX unit since they usually come with an increase in the number of connectors.

2. Cheap USB cables are flaky

There are lots of brands that produce low-cst USB serial cables. Few of them work for very long. We had many issues with connectors only working for a short period of time and requiring unplugging before they’d work again. We ended up settling on FTDI cables as we found them to be much more reliable than other brands.

3. There’s not a lot of space inside a PC case

Things are tightly packed inside the case which means that cooling may become an issue if your DUTs run hot. We specifically purchased a PC case with front and rear fans to keep the internal temperature down.

4. There’s no standard DC power jack

Every DUT has its own connector, so you need to be comfortable pulling out the soldering iron to connect the power. This obviously isn’t for everyone and right now we don’t have a good solution for this. Hopefully this problem will eventually be solved by increased adoption of USB Power Delivery via Type-C connectors, but for now, board rework is often required.

 

Future plans for the LAVA box

We poured all of our embedded systems experience into designing and building the LAVA box and validating our idea. Based on the feedback we’ve received from AGL, and from what we’ve seen in our own labs, it’s been a roaring success. The LAVA box has productized the CI workflow for embedded Linux.

We’re not done yet and we have some more tweaks in mind for the current design such as improving connectivity by adding Wi-Fi and Bluetooth. Ater that, we’re going to take the things we learned and address new scenarios like building a cost-effective solution for single-board labs and scaling up to professional-grade labs in racks. That way, labs of all sizes can benefit from the power of CI.

If you want to join in you can start by reading the documentation and contributing to the KernelCI project on GitHub. This entire project is open source and community contributions are greatly appreciated.

Or perhaps you want to talk to us about building your own lab in a box? Reach us at contact@baylibre.com to see how we can help!

Categories
Amlogic Community Frontpage Article Linux Kernel News Open-source

Linux Kernel 4.15 released, our contributions

Linux Kernel 4.15 released

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 4.15, released on January, 28th 2018.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Finally GPIO IRQ Support for Amlogic SoCs
  • Pinctrl cleanup for AXG future support
  • Meson GXL/GXM Internal PHY fixup for reliability
  • Support for new boards :
    • Vega S96
    • Khadas VIM2
  • Driver support for the Video Processing Unit Power Domain for mainline U-Boot support
  • Level Reset support for GX Family

Misc:

  • Support for the Winbond w25q16dw present on the Khadas VIM2
  • usb: musb: da8xx: Remove duplicated defines

 

 

Categories
Frontpage Article

The BayLibre team wishes you a Happy New Year!