Skip to content

drivers: modem_cellular: Add autostart support for BG95 #93066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petrosyan-van
Copy link
Contributor

In PR #92794 we made mdm-power-gpios optional, as the BG95-M3 Mini-PCIe module boots automatically via its on-module “Automatic Power-On Circuit”. In the current modem_cellular driver we have the autostart property for BG95 hardcoded to false, but that depends on the form factor.

This patch adds a simple autostart boolean to the quectel,bg95 binding and a one-line change to the driver:

.autostarts = DT_PROP_OR(DT_DRV_INST(inst), autostart, (start)),

If the board declares autostart; the driver skips the power-pulse routine; if the property is absent we fall back to the original hard-coded value so existing designs stay exactly as they are.

It might look convenient to assume “no mdm-power-gpios ⇒ autostart”, but in reality we can have mdm-power-gpios routed via PERST# pin of BG95-M3 to use as a reset, but still have the autostart functionality enabled.

image

Tested on a custom board with BG95-M3, with both autostart enabled and disabled. When enabled the driver switches from idle to await power on state immediately.

@petrosyan-van petrosyan-van force-pushed the bg95_autostarts_option branch from 6fe29bd to 3bb62b7 Compare July 13, 2025 10:21
@petrosyan-van petrosyan-van marked this pull request as ready for review July 13, 2025 10:42
@github-actions github-actions bot requested a review from rerickson1 July 13, 2025 10:43
rerickson1
rerickson1 previously approved these changes Jul 14, 2025
Add optional autostarts boolean to the quectel,bg95 binding and make
MODEM_CELLULAR_DEFINE_INSTANCE() use it through DT_PROP_OR().
Boards that carry a BG95-M3 Mini-PCIe card—or any other variant that
boots at VCC can now declare the property and skip the PWRKEY pulse,
while existing designs continue to behave unchanged.

Signed-off-by: Van Petrosyan <van.petrosyan@sensirion.com>
Copy link

Copy link
Contributor

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants