I have built customize image using yocto for Rpi 4B. I want to use GPIO0 and GPIO1 as input/output with /sys/class interface Can I use them?

I don't need any Rpi HAT or EEPROM.

I have googled so much not clarified answer.

Anyone can clarify ?

1 Answer 1


The quickest way to come up with a definitive answer is to try.

The only problem I see is that GPIO 0 and 1 may be probed during boot to see if a HAT is present. Only you can know if that will upset your system.

After boot you should be able to use GPIO 0 and 1 as normal.

You can actually stop the probe of GPIO 0 and 1 by adding the following entry to `/boot/config.txt'


See config.txt documentation.

  • Thank you @joan What if I use PoE HAT designed by me which has nothing to do with EEPROM? May 29, 2020 at 13:49
  • @KeyurThumar That will not make any difference. If the GPIO are probed they will still be probed regardless of whether a HAT is present ot not.
    – joan
    May 29, 2020 at 16:48
  • The rule from RPF is that these pins should not be used at all unless it's for a HAT. James has stated this previously on the forum and in the tech docs. Given the large number of pins available I would not risk it and who knows - you may need a HAT one day.
    – user115418
    May 29, 2020 at 18:07
  • Thanks everyone for your answers. Jun 3, 2020 at 9:41

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.