wireless/cc1101: Add Kconfig option to bypass strict version check#18463
Open
AuroraRAS wants to merge 1 commit intoapache:masterfrom
Open
wireless/cc1101: Add Kconfig option to bypass strict version check#18463AuroraRAS wants to merge 1 commit intoapache:masterfrom
AuroraRAS wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
|
@AuroraRAS please run: Then fix the issues, create a new commit with the fix and squash in the previous commit, more info: |
Many third-party CC1101 modules (such as those populated on the Evil Crow RF V2) feature clone silicon that hardcodes the VERSION register to 0x00 instead of the official 0x14. Previously, the cc1101_checkpart() function strictly enforced VERSION == 0x14, which caused cc1101_register() to return -ENODEV (-19) and abort initialization on these compatible modules. This commit introduces the CONFIG_WL_CC1101_IGNORE_VERSION Kconfig option. - When disabled (default), the driver maintains strict official silicon validation. This preserves the diagnostic ability to catch hardware faults, such as a MISO line shorted to GND (which also reads as 0x00). - When enabled, the driver explicitly permits VERSION == 0x00, allowing successful initialization and interoperability with clone chips while printing a warning to the syslog. Signed-off-by: Chip L. <chplee@gmail.com>
acassis
approved these changes
Feb 26, 2026
linguini1
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a Kconfig option (
CONFIG_WL_CC1101_IGNORE_VERSION) to bypass strict version validation in the CC1101 driver, allowing the initialization of third-party clone silicon.Problem:
The
cc1101_checkpart()function indrivers/wireless/cc1101.cstrictly enforces the silicon version to match the official Texas Instruments value (CC1101_VERSION_VALUE == 0x14). Many low-cost CC1101 modules in the wild (such as those populated on the Evil Crow RF V2 hardware) utilize compatible clone silicon that hardcodes theVERSIONregister to0x00. When the driver encounters these chips, it aborts initialization and returns-ENOTSUP(which propagates as-ENODEV).Solution:
Added
CONFIG_WL_CC1101_IGNORE_VERSIONtodrivers/wireless/Kconfig.When enabled, the driver explicitly permits
VERSION == 0x00and issues awlwarnindicating a clone chip was detected. The option defaults ton(disabled) to preserve the driver's ability to diagnose actual hardware faults, such as a MISO line shorted to GND (which also results in a0x00read).Impact
default n).Testing
Host Machine: Fedora 43 (x86_64)
Target Hardware: ESP32-PICO-D4 (Rev 1.1) on Evil Crow RF V2 board (containing two CC1101 clone modules).
Verification Procedure:
CONFIG_WL_CC1101=yandCONFIG_WL_CC1101_IGNORE_VERSION=y./dev/radio0and/dev/radio1) in NSH.Logs: