Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. APQ_GPIO_70 not responding to /sys/class/gpio

APQ_GPIO_70 not responding to /sys/class/gpio

Scheduled Pinned Locked Moved Ask your questions right here!
13 Posts 2 Posters 2.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Ed SutterE Offline
    Ed SutterE Offline
    Ed Sutter
    Regular
    wrote on last edited by
    #4

    Thanks Alex! It was a trivial change on our hardware, but good to know.

    1 Reply Last reply
    0
    • Alex KushleyevA Offline
      Alex KushleyevA Offline
      Alex Kushleyev
      ModalAI Team
      wrote on last edited by
      #5

      OK, no problem. Since this is resolved on your end, i did not verify the simple fix of just disabling ADSP using systemd, but the what did work in the past was disabling the ADSP using systemd AND makding the device tree change I mentioned above.

      Just to clarify what is happening, the GPIO can be accessed from CPU and other sub devices in the SoC and in this case if ADSP is enabled, once ADSP starts up, it configures those pins for some audio clock/data functionality and CPU loses control over them. The behavior is such that during the system boot, the CPU initially (first few seconds) seems to have control over the pins, but then ADSP starts up and takes over, and it even sends some clock/data on these pins (a short burst). Therefore, disabling ADSP allows CPU to maintain control over these GPIO pins.

      Ed SutterE 1 Reply Last reply
      0
      • Alex KushleyevA Alex Kushleyev

        OK, no problem. Since this is resolved on your end, i did not verify the simple fix of just disabling ADSP using systemd, but the what did work in the past was disabling the ADSP using systemd AND makding the device tree change I mentioned above.

        Just to clarify what is happening, the GPIO can be accessed from CPU and other sub devices in the SoC and in this case if ADSP is enabled, once ADSP starts up, it configures those pins for some audio clock/data functionality and CPU loses control over them. The behavior is such that during the system boot, the CPU initially (first few seconds) seems to have control over the pins, but then ADSP starts up and takes over, and it even sends some clock/data on these pins (a short burst). Therefore, disabling ADSP allows CPU to maintain control over these GPIO pins.

        Ed SutterE Offline
        Ed SutterE Offline
        Ed Sutter
        Regular
        wrote on last edited by
        #6

        @Alex-Kushleyev
        Just to clarify, I went ahead and did some preliminary tests, and it appears that just doing the systemctrl disable adsp.service does not allow /sys/class/gpio to control GPIO70.
        I did the following before disabling adsp:

        / # echo 70 > /sys/class/gpio/export
        / # echo out > /sys/class/gpio/gpio70/direction
        / # echo 1 > /sys/class/gpio/gpio70/value
        / # cat /sys/class/gpio/gpio70/value
        0
        

        Note that I set value to 1, but it didn't stick (expected at this point). I followed this with systemctl disable adsp.service and rebooted. Then I repeated the above steps and still got a 0 for gpio70/value.

        1 Reply Last reply
        0
        • Ed SutterE Offline
          Ed SutterE Offline
          Ed Sutter
          Regular
          wrote on last edited by
          #7

          @Alex-Kushleyev
          By the way, the reason I picked GPIO70 was because it appeared to be used for other modems in the voxl-modem script. As a result, I mistakenly took for granted that this pin was "available" for use in bringing up our custom modem module.

          It would probably be wise to update that voxl-modem script.

          1 Reply Last reply
          0
          • Alex KushleyevA Offline
            Alex KushleyevA Offline
            Alex Kushleyev
            ModalAI Team
            wrote on last edited by
            #8

            Thank you for trying disabling the systemd service.. I suspected that it alone might not work..

            So, with the service disabled, do you mind just running the following command and see if you have any kernel messages about adsp?

            From my notes, i see that under normal boot, you would see the following messages:

            dmesg | grep adsp
            "[2.477108] systemd[1]: [/lib/systemd/system/adsprpcd.service:11] Failed to parse service restart specifier, ignoring: yes"
            "[5.707124] adsp-loader soc:qcom,msm-adsp-loader: adsp_loader_do: scheduling work to load ADSP fw"
            "[6.263373] subsys-pil-tz 9300000.qcom,lpass: adsp: Power/Clock ready interrupt received"
            

            Thank you for noting the voxl-modem script, I will check with the team!

            Alex

            1 Reply Last reply
            0
            • Ed SutterE Offline
              Ed SutterE Offline
              Ed Sutter
              Regular
              wrote on last edited by Ed Sutter
              #9

              Sure... here is the output...

              / # dmesg | grep adsp
              [    0.000000] Reserved memory: allocated memory for 'adsp_region' node: base 0x00000000ff800000, size 4 MiB
              [    0.000000] Reserved memory: initialized node adsp_region, compatible id shared-dma-pool
              [    0.336712] platform soc:qcom,msm-adsprpc-mem: assigned reserved memory node adsp_region
              [    0.337300] platform soc:qcom,msm-mdsprpc-mem: assigned reserved memory node adsp_region
              [    0.661470] platform soc:qcom,ion:qcom,ion-heap@22: assigned reserved memory node adsp_region
              [    0.662328] ION heap adsp created at 0x00000000ff800000 with size 400000
              [    0.688677] gdsc_hlos1_vote_lpass_adsp: no parameters
              [    1.740246] subsys-pil-tz 9300000.qcom,lpass: for adsp segments only will be dumped.
              [    1.786834] fastrpc soc:qcom,msm-adsprpc-mem: for adsp_rh segments only will be dumped.
              [    1.788263] adsprpc: channel link type: 0
              [    2.438965] systemd[1]: [/lib/systemd/system/adsprpcd.service:11] Failed to parse service restart specifier, ignoring: yes
              [    4.909223] SELinux:  Context u:object_r:adsprpcd_file:s0 is not valid (left unmapped).
              [    5.451916] adsp-loader soc:qcom,msm-adsp-loader: adsp_loader_do: scheduling work to load ADSP fw
              [    5.455155] subsys-pil-tz 9300000.qcom,lpass: adsp: loading from 0x000000008ea00000 to 0x0000000090400000
              [    5.912485] subsys-pil-tz 9300000.qcom,lpass: adsp: Brought out of reset
              [    5.937106] subsys-pil-tz 9300000.qcom,lpass: adsp: Power/Clock ready interrupt received
              [    5.950516] 'opened /dev/adsprpc-smd c 224 0'
              [    6.056923] sysmon-qmi: sysmon_clnt_svc_arrive: Connection established between QMI handle and adsp's SSCTL service
              [    8.476656] type=1130 audit(1330.153:70): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0-s15:c0.c1023 msg='unit=ads
              p comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
              

              Note that this is after disabling it...

              1 Reply Last reply
              0
              • Ed SutterE Offline
                Ed SutterE Offline
                Ed Sutter
                Regular
                wrote on last edited by
                #10

                This seems odd...

                / # systemctl status -l adsp.service
                ● adsp.service - slpi start service
                   Loaded: loaded (/etc/initscripts/adsp.sh; disabled; vendor preset: enabled)
                   Active: failed (Result: exit-code) since Thu 1970-01-01 00:22:10 UTC; 53 years 2 months ago
                  Process: 2032 ExecStart=/etc/initscripts/adsp.sh start (code=exited, status=1/FAILURE)
                
                Jan 01 00:22:06 apq8096 systemd[1]: Starting slpi start service...
                Jan 01 00:22:10 apq8096 systemd[1]: adsp.service: Control process exited, code=exited status=1
                Jan 01 00:22:10 apq8096 systemd[1]: Failed to start slpi start service.
                Jan 01 00:22:10 apq8096 systemd[1]: adsp.service: Unit entered failed state.
                Jan 01 00:22:10 apq8096 systemd[1]: adsp.service: Failed with result 'exit-code'.
                Jan 01 00:22:10 apq8096 adsp.sh[2032]: Starting adsp: [INFO] Bringing adsp out of reset
                Jan 01 00:22:10 apq8096 adsp.sh[2032]: [ERROR] adsp fail to boot
                

                Seems like it tried to startup (despite being disabled) and failed.

                1 Reply Last reply
                0
                • Alex KushleyevA Offline
                  Alex KushleyevA Offline
                  Alex Kushleyev
                  ModalAI Team
                  wrote on last edited by
                  #11

                  thank you, makes sense.. The systemd service most likely provides some higher level software bridge between CPU and ADSP, but the Kernel starts the ADSP independently of that.

                  Another thing to note, the ADSP firmware is located in /firmware/image/

                  I just tried the following command and rebooted and no longer seeing adsp bring-up messages from kernel:

                  /firmware/image # mv adsp.mdt adsp.mdt.bak
                  

                  So it seems you can just disable the ADSP this way (the board does not crash).

                  i also tested setting the output to 1 using your commands it after disabling the adsp firmware, the pin reports 1 (did not check actual signal level)

                  Ed SutterE 1 Reply Last reply
                  0
                  • Alex KushleyevA Alex Kushleyev

                    thank you, makes sense.. The systemd service most likely provides some higher level software bridge between CPU and ADSP, but the Kernel starts the ADSP independently of that.

                    Another thing to note, the ADSP firmware is located in /firmware/image/

                    I just tried the following command and rebooted and no longer seeing adsp bring-up messages from kernel:

                    /firmware/image # mv adsp.mdt adsp.mdt.bak
                    

                    So it seems you can just disable the ADSP this way (the board does not crash).

                    i also tested setting the output to 1 using your commands it after disabling the adsp firmware, the pin reports 1 (did not check actual signal level)

                    Ed SutterE Offline
                    Ed SutterE Offline
                    Ed Sutter
                    Regular
                    wrote on last edited by
                    #12

                    @Alex-Kushleyev
                    Ok, good to know.
                    Thanks

                    1 Reply Last reply
                    0
                    • Alex KushleyevA Offline
                      Alex KushleyevA Offline
                      Alex Kushleyev
                      ModalAI Team
                      wrote on last edited by
                      #13

                      I am not sure about that adsp.service error.. Hmm. Would need to actually look into what it's doing. but it seems like if you just (re)move the firmware, the GPIO works.

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      ModalAI
                      Categories Recent Tags ModalAI.com Docs
                      © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups