On Fri, Dec 31, 2021 at 10:17 PM Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> wrote: > On Fri 31 Dec 09:05 PST 2021, Bryan O'Donoghue wrote: > The reason for seeing this issue is typically that the pins are related > to some I2C bus that is used for some secure application, i.e. they are > reserved for TZ to use. In the best of all worlds TZ should be telling us what it is using for itself. > Unfortunately I don't know how to determine the list of protected GPIOs, > other than trial and error. > > But once you have the list, you can use "gpio-reserved-ranges" (a series > of offset, count pairs) in the TLMM DT node to mark off these gpios as > reserved. This is the right thing to do. If I'm not mistaken the TZ can modify the device tree during boot just as well as the boot loader can, or it can tell the boot loader to modify the device tree, and add reserved GPIOs to the gpio-reserved-ranges. I think the real problem is that some system manager didn't think about resource reservation even though we have mechanisms in place to do them. Yours, Linus Walleij