I thought that all of the GPIO pins defaulted to input but I'm seeing that GPIO 7 (so is GPIO 8) is set as an output after boot up. Is it being used by something? If I take it over will I cause something to stop working?

rpi 3B+ vanilla Buster

  • 1
    On a vanilla system GPIO7 and 8 will be set as INPUT. What have you changed?
    – joan
    Feb 3, 2021 at 17:32
  • 1
    I think the default for all the not bus enabled pins (those set for UART, I2C, or SPI) pins is input, but applying a device tree overlay can change that. Some of them are have pull-ups, dunno if that could lead you to the wrong conclusion (eg., if you put an led on one it may light dimly).
    – goldilocks
    Feb 3, 2021 at 19:06
  • Do you mean GPIO7 pinout.xyz/pinout/pin26_gpio7 or pin #7 pinout.xyz/pinout/pin7_gpio4?
    – Dougie
    Feb 3, 2021 at 21:21

2 Answers 2


OK, I must have done something to change the settings. I did hook up an official 7" touch screen briefly and mess around trying to connect to my NAS.

I re-flashed my OS and rebooted and now all of the gpio's on the 40 pin header are coming up as inputs.


I have the same situation with my Raspberry Pi 4. I have the Pi-SPROG DCC hat and it uses SPI communication. Maybe the Pi-SPROG software automatically activates SPI communication at boot time and manually sets the SPI Chip Select GPIOs (07 and 08) High to deselect any SPI slave.

Of course, it would be better if the software would just activate the built-in (pull-up?) chip select instead of doing it manually by setting High, but that's the best explanation I can think of.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.