From nobody Tue Feb 10 01:33:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+69610+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69610+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1609781886; cv=none; d=zohomail.com; s=zohoarc; b=hsnsMPCxQIXAVOSTEpWQ5tDsMolvUG5tDX4cAdZJ9V1Pd6IhtFxK/byrHoZ1kKnydgk7IGh8/Mx16v+g3IvuS4CPZF4xK/G7BdFWt11UJXzR5aPM1LR6AtoPz3YImJG7qEMGJA0S7uC6I20BmV2Idg/UxBnDSFfdQPtAAfWePu8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609781886; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=0aYK/39ziEbVxLRhB23LbU33UXmx+d/86euqogK2JxI=; b=UpRH7JEkgv987HXRqFLdY722O7MW502/e0WA3ak+NOcrtiSTB0bg7Sx90+A81h7l5u9oqLxgLb+wM/2+aZ4JGfzD0ksVzSS30NG/x4ebarN3z7ecv0DOuaaqgXfNiUiGnqVogLiCM3LcN2oc83zq8iRz4bzAGC6dI1b2JR/pWtA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69610+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1609781886168831.9275142980473; Mon, 4 Jan 2021 09:38:06 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id Nne0YY1788612xG2uLEDWb7y; Mon, 04 Jan 2021 09:38:00 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.17074.1609781876750647973 for ; Mon, 04 Jan 2021 09:37:56 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 666CA11D4; Mon, 4 Jan 2021 09:37:56 -0800 (PST) X-Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6037F3F66E; Mon, 4 Jan 2021 09:37:56 -0800 (PST) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie, samer.el-haj-mahmoud@arm.com, Jeremy Linton , Andrei Warkentin Subject: [edk2-devel] [PATCH v3 6/7] Platform/RaspberryPi: Power up sd, and tweak GPIOs Date: Mon, 4 Jan 2021 11:37:30 -0600 Message-Id: <20210104173731.1413044-7-jeremy.linton@arm.com> In-Reply-To: <20210104173731.1413044-1-jeremy.linton@arm.com> References: <20210104173731.1413044-1-jeremy.linton@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,jeremy.linton@arm.com X-Gm-Message-State: NlF189TgfDCkdftkEImlXkb8x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1609781880; bh=cMX3cZYbPLjrIBhti7Om/J6t54uAVNt61Qp1oXQgPwk=; h=Cc:Date:From:Reply-To:Subject:To; b=hrNpUQT5S/O7FtDfqY6Nwy+9ltnTVqS9YHqemqsBRTHjZLDdDIPA13NMKO3yc5rpFhk wV6B5+4b91TttFLGT3Y3Mw/o6yys6mkBF+2CLQlroF9D0xsBxoyH0eEH2uOJoITgeOd8o sFVvvB5OshsIzjFsd00myJPqmcdYttJIgII= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" It seems we should be powering up the sd cards, and possibly the clocks as well to assure they are setup properly before we attempt to access the controller. Signed-off-by: Jeremy Linton Reviewed-by: Andrei Warkentin --- Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/= RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c index 28f57438c5..e55ed63efa 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c @@ -552,6 +552,16 @@ ApplyVariables ( GpioPinFuncSet (37, GPIO_FSEL_ALT3); GpioPinFuncSet (38, GPIO_FSEL_ALT3); GpioPinFuncSet (39, GPIO_FSEL_ALT3); + + /* + * power and clock everything by default + */ + Status =3D mFwProtocol->SetPowerState (RPI_MBOX_POWER_STATE_SDHCI, + TRUE, TRUE); //SD on with wait + Status =3D mFwProtocol->SetGpioConfig (RPI_EXP_GPIO_SD_VOLT,=20 + RPI_EXP_GPIO_DIR_OUT, TRUE); //= 3.3v + Status =3D mFwProtocol->SetClockState (RPI_MBOX_CLOCK_RATE_EMMC2, TR= UE); + Status =3D mFwProtocol->SetClockState (RPI_MBOX_CLOCK_RATE_EMMC, TRU= E); } } else { DEBUG ((DEBUG_ERROR, "Model Family %d not supported...\n", mModelFamil= y)); --=20 2.13.7 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#69610): https://edk2.groups.io/g/devel/message/69610 Mute This Topic: https://groups.io/mt/79429634/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-