From 2576317c23f69c7a15684fae204914251ce36676 Mon Sep 17 00:00:00 2001 From: Van Petrosyan Date: Sun, 13 Jul 2025 11:56:30 +0200 Subject: [PATCH] drivers: modem_cellular: Add autostarts support for BG95 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/modem/modem_cellular.c | 2 +- dts/bindings/modem/quectel,bg95.yaml | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/modem/modem_cellular.c b/drivers/modem/modem_cellular.c index c3f73a1dbbb64..dc020240dc9e3 100644 --- a/drivers/modem/modem_cellular.c +++ b/drivers/modem/modem_cellular.c @@ -2635,7 +2635,7 @@ MODEM_CHAT_SCRIPT_DEFINE(sqn_gm02s_periodic_chat_script, .reset_pulse_duration_ms = (reset_ms), \ .startup_time_ms = (startup_ms), \ .shutdown_time_ms = (shutdown_ms), \ - .autostarts = (start), \ + .autostarts = DT_INST_PROP_OR(inst, autostarts, (start)), \ .set_baudrate_chat_script = (set_baudrate_script), \ .init_chat_script = (init_script), \ .dial_chat_script = (dial_script), \ diff --git a/dts/bindings/modem/quectel,bg95.yaml b/dts/bindings/modem/quectel,bg95.yaml index 80aa8816f479c..9b1f6c734be41 100644 --- a/dts/bindings/modem/quectel,bg95.yaml +++ b/dts/bindings/modem/quectel,bg95.yaml @@ -10,3 +10,11 @@ include: uart-device.yaml properties: mdm-power-gpios: type: phandle-array + + autostarts: + type: boolean + description: | + Set for modem variants or carrier boards that start the module + automatically when supply voltage is applied—that is, the modem + asserts PWRKEY internally and does not require an external PWRKEY + pulse.