Skip to content

Mitigate changes in peripheral enable state after Kconfig replaced by DT status #24745

@pabigot

Description

@pabigot

Recent patches change Zephyr device instance checks to be based on the status property from the devicetree node alone, by eliminating the Kconfig options to enable individual instances. Unfortunately in several cases (often related to shield-exposed functions like Arduino Serial) the Kconfig option disabled a peripheral, while the devicetree node specified it was enabled. As a result peripherals are now enabled that were not in the past; example patches necessary to fix the applications are found in #24423 and #24710. In addition to visable breakage in existing applications this can also silently increase power for peripherals that are suddenly enabled but never used.

A related issue is that the pinmux.c files in some targets leave open the possibility of enabling multiple peripherals on the same pin; for example three distinct pins in frdm_k64f have at least two potentially conflicting peripheral configurations (B10, C16, C17). This is primarily addressed by #25251.

Some tasks that might reduce the amount of future confusion related to this:

  • Clarify in the general recommendations whether shield-based functions like I2C and serial should be default-enabled or default-disabled;
  • Review the removal of Kconfig instance enable flags to determine what peripherals changed default enable state as a consequence;
  • Update devicetree status= defaults to reproduce the behavior that had been the default in the past;
  • Update the pinmux files to produce a build-time diagnostic if multiple peripherals demand the same pin be selected for distinct roles.

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions