drivers: modem_cellular: Add shutdown script for BG95 #93072
+9
−1
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.
This PR adds a shutdown chat-script for BG95 that simply transmits
AT+QPOWD=1
and completes as soon as the modem echoesOK
. A graceful software power-down is preferable to yanking the supply, because it lets the module close the file system cleanly. This shutdown method is equivalent to the pulse shutdown via PWRKEY, but for the designs that do not have PWRKEY exposed this would be the only path: we can now shut the modem down cleanly without toggling a regulator and cutting the power too early.According to the BG95 AT command manual the modem should print “POWERED DOWN” after the final OK, but on the BG95-M3 board I have tested (FW BG95M3LAR02A03_01.204.01.204) that URC never appears (maybe somehow related to CMUX). It appears if I try
AT+QPOWD=0
, which is the Immediate power-down. Since the UART stops replying at that point the lone OK is already a useful confirmation.Note: Only tested on BG95-M3 miniPCIe module. Ideally, this should be also tested on a standard BG95 module, with PWRKEY to confirm that there is no regression