From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by mx.groups.io with SMTP id smtpd.web12.7330.1636613871999896965 for ; Wed, 10 Nov 2021 22:57:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NrgnT3pZ; spf=pass (domain: gmail.com, ip: 209.85.167.182, mailfrom: lintonrjeremy@gmail.com) Received: by mail-oi1-f182.google.com with SMTP id n66so9921483oia.9 for ; Wed, 10 Nov 2021 22:57:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m9LHw7lHbvfZucWDAVw0q88uAdn+LR4gxiD/PVv8Vjw=; b=NrgnT3pZyOckPKLFGYwkiXy4ar3yaKJoHRksdkNx7uAcBdq4Djswvrm6EReaDAvpHy u4qrLgYv3EH3FNNCg3VVxWRlINRpKUqVelMvK731VQMxsoYsqaYbXyDI8jPsXexNZeZ0 Do0MJlG+cgSDmdunOrl1HTN2vrW3Z36qXtNxcKo2bLwuSlksqNgOJ17ZW5k/ZkgnIeZn IrN/MMdoVlO/Dc4mc18yjPIXzifuaVz+uQ3ndpjtdDyi9/Zx2obSvtVUz55T3JxyRi4t xzbmKAPgnjVKPTHWyPEi7EQqlSmNHWTCVMDA4ZJJM09SQWbID0AQLwL0V7VXjVKyAJuy 9KfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m9LHw7lHbvfZucWDAVw0q88uAdn+LR4gxiD/PVv8Vjw=; b=OhYOsBCibVb5rCOd/F1JiFIpsb9g1c5VJhNVO7P2DVfNaFt83jW3ZJUvXDDEp9FYOG y3KNOxlWVMmdmK4KZNMgwtIdM3nvSq6tbBbm4mld0lgoVbXKaB6Hudbmjy4K8extYhIy xatRYlGU+LYBM0EDM8IncgWWXohrR2vNeDNTGs17JEmJwSyi2SoLtfziAEq9pRs+KSXQ aMvdihz4jsrb9P1oLR5DyOn5FAArPRrv+1XuKQj3EFzfIglzqRHCjKsU1/3zzVtWXyte ZTUq4TIWZPbJzDwd79sjBxIt52bc8sUsAe/CMST24e4lwhnvntxBqfoezGrAhyFKGP0c Ii0g== X-Gm-Message-State: AOAM533rmRRrJ/qmmd0pY0DkXAK+Cq/iIkMKgC3+u5+NZ1j5FGhoS7Wh ppltcO5Eq6UFJDfLPeK+wEwNeOxiAEnIQw== X-Google-Smtp-Source: ABdhPJzwlgABQtla5kNvCSY0oGW6W2lximbF8KVL6ZQ6ZhhvXg0wq+oPJUT+PNYYpVmaZebvN2YDXg== X-Received: by 2002:aca:df54:: with SMTP id w81mr4227758oig.85.1636613871025; Wed, 10 Nov 2021 22:57:51 -0800 (PST) Return-Path: Received: from dell-suse.jhome.net (072-191-152-022.res.spectrum.com. [72.191.152.22]) by smtp.gmail.com with ESMTPSA id y12sm649206oiv.49.2021.11.10.22.57.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Nov 2021 22:57:50 -0800 (PST) From: lintonrjeremy@gmail.com To: devel@edk2.groups.io Cc: pete@akeo.ie, ardb+tianocore@kernel.org, leif@nuviainc.com, awarkentin@vmware.com, Sunny.Wang@arm.com, samer.el-haj-mahmoud@arm.com, Jeremy Linton Subject: [PATCH 0/4] Platform/RaspberryPi: new GPIO and DT menu items Date: Thu, 11 Nov 2021 00:57:37 -0600 Message-Id: <20211111065742.8923-1-lintonrjeremy@gmail.com> X-Mailer: git-send-email 2.13.7 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Its been reported that some kernel versions still need the XHCI reload while others only work if the reload isn't present. Lets give the user the ability to control that for DT systems. Further, there is now an example persistent variable store implementation that uses the on-board SPI flash rather than trying to rewrite the UEFI firmware image on SD/etc late in the boot cycle. The problem is that we now need to control the GPIO pin mux. This isn't a problem for Linux as such, because it only messes with the pin mux under DT, but windows has some drivers which export the GPIO devices using the ACPI definition. Lets add a menu item to enable the GPIO and default it to off on the RPi4 under the assumption that we can't fix a GPIO pin mux war reliably and instead will simply revert to a mode that fails to persist variables written while the OS is active if the GPIO is enabled. This set also cleans up the ACPI/DT visiblity of a couple nearby menu items as well. Jeremy Linton (4): Platform/RaspberryPi: Cleanup menu visibility Platform/RaspberryPi: Give the user control over the XHCI mailbox Platform/RaspberryPi: Move GPIO/SPI/I2C to SSDT Platform/RaspberryPi: Add menu item to enable/disable GPIO Platform/RaspberryPi/AcpiTables/AcpiTables.inf | 1 + Platform/RaspberryPi/AcpiTables/Dsdt.asl | 7 - Platform/RaspberryPi/AcpiTables/GpuDevs.asl | 125 ---------------- Platform/RaspberryPi/AcpiTables/SsdtGpio.asl | 157 +++++++++++++++++++++ Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 31 ++++ .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf | 2 + .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni | 10 ++ .../RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr | 36 ++++- Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.c | 4 + Platform/RaspberryPi/Drivers/FdtDxe/FdtDxe.inf | 1 + Platform/RaspberryPi/Include/ConfigVars.h | 4 + Platform/RaspberryPi/RPi3/RPi3.dsc | 12 ++ Platform/RaspberryPi/RPi4/RPi4.dsc | 14 ++ Platform/RaspberryPi/RaspberryPi.dec | 2 + 14 files changed, 271 insertions(+), 135 deletions(-) create mode 100644 Platform/RaspberryPi/AcpiTables/SsdtGpio.asl -- 2.13.7