From nobody Tue Feb 10 05:46:17 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+69725+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+69725+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1609864476; cv=none; d=zohomail.com; s=zohoarc; b=luZu0prq05yuuYX3Sie1EEL61BWFhPXS8YrfwTM45ZbyokmIKyeMjRvrsUN8x0WbCto2IKwIT4W0Ex/+UWNV3yQwmlO68BfPMFIQmAA6DyLsn/4YYTPggC5nOAQAWpHNi25EnnQJn+DE/Q2Dg09BOBGiOmHrwH8fpLMI2IDoab4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609864476; 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=Fkoj2YF+a0oWiTQNkgfDz8qTrsWj4Km8VXBkFRtC89M=; b=BlGf6h8D2oiZ7XICdHj6QME5ICx44f/0UHqNmdADhmr3AnyJu79gF1nw6Ed6KgbeeESicp4WAlL8F4OyvyhRRo40Y4c+nqXZknQohLZK6cNP4Rmy/GmQ//oYhcDrPoyzf9cdZDZ9hgZsoVfcIsE+EoHUa/4YHTGzGX1FpjMv2cQ= 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+69725+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 1609864476922640.4939111105236; Tue, 5 Jan 2021 08:34:36 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id KvEaYY1788612xlPPWGHKKfn; Tue, 05 Jan 2021 08:34:36 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.7983.1609864476096590202 for ; Tue, 05 Jan 2021 08:34:36 -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 BAC0B11D4; Tue, 5 Jan 2021 08:34:25 -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 A98423F70D; Tue, 5 Jan 2021 08:34:25 -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, awarkentin@vmware.com, Jeremy Linton Subject: [edk2-devel] [PATCH v4 1/7] Platform/RaspberryPi: Update VPU mailbox constants Date: Tue, 5 Jan 2021 10:34:14 -0600 Message-Id: <20210105163420.1711652-2-jeremy.linton@arm.com> In-Reply-To: <20210105163420.1711652-1-jeremy.linton@arm.com> References: <20210105163420.1711652-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: xIsxQXIjhnNHFc8SqMD9tv7bx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1609864476; bh=Sv5ZOvJTK69GcWn8qThREEUmsxqFzQlv2236bE6iERk=; h=Cc:Date:From:Reply-To:Subject:To; b=eswW/RtXf6HnPR/m5BJeN70tZX7w1hHsS6uQOMLStHQ46HuigbN1nUsoYoAN2d99Olf u6gVKmQCw8LNGar+jyZLqEkfjS69YA11J4DsnxaDWytY4olbGjMlBhfFugaPmU1KQmHfl zETOD4fJyH7boGwNgdFuKAV/eqbUXVI20qE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Lets sync our mailbox commands with the known/Linux constants so that we have a more complete view of what we can request from the VPU. Signed-off-by: Jeremy Linton Reviewed-by: Andrei Warkentin --- .../RaspberryPi/Include/IndustryStandard/RpiMbox.h | 94 ++++++++++++++++++= ++-- 1 file changed, 89 insertions(+), 5 deletions(-) diff --git a/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h b/Plat= form/RaspberryPi/Include/IndustryStandard/RpiMbox.h index 7104068998..551c2b82e5 100644 --- a/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h +++ b/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h @@ -45,6 +45,10 @@ #define RPI_MBOX_GET_BOARD_SERIAL 0x00010004 #define RPI_MBOX_GET_ARM_MEMSIZE 0x00010005 #define RPI_MBOX_GET_VC_MEMSIZE 0x00010006 +#define RPI_MBOX_GET_CLOCKS 0x00010007 + +#define RPI_MBOX_GET_POWER_STATE 0x00020001 +#define RPI_MBOX_GET_TIMING 0x00020002 =20 #define RPI_MBOX_SET_POWER_STATE 0x00028001 =20 @@ -58,28 +62,92 @@ #define RPI_MBOX_POWER_STATE_SPI 0x00000007 #define RPI_MBOX_POWER_STATE_CCP2TX 0x00000008 =20 +#define RPI_MBOX_GET_CLOCK_STATE 0x00030001 #define RPI_MBOX_GET_CLOCK_RATE 0x00030002 +#define RPI_MBOX_GET_VOLTAGE 0x00030003 #define RPI_MBOX_GET_MAX_CLOCK_RATE 0x00030004 +#define RPI_MBOX_GET_MAX_VOLTAGE 0x00030005 +#define RPI_MBOX_GET_TEMPERATURE 0x00030006 #define RPI_MBOX_GET_MIN_CLOCK_RATE 0x00030007 - +#define RPI_MBOX_GET_MIN_VOLTAGE 0x00030008 +#define RPI_MBOX_GET_TURBO 0x00030009 +#define RPI_MBOX_GET_MAX_TEMPERATURE 0x0003000a +#define RPI_MBOX_GET_STC 0x0003000b +#define RPI_MBOX_ALLOCATE_MEMORY 0x0003000c +#define RPI_MBOX_LOCK_MEMORY 0x0003000d +#define RPI_MBOX_UNLOCK_MEMORY 0x0003000e +#define RPI_MBOX_RELEASE_MEMORY 0x0003000f +#define RPI_MBOX_EXECUTE_CODE 0x00030010 +#define RPI_MBOX_EXECUTE_QPU 0x00030011 +#define RPI_MBOX_SET_ENABLE_QPU 0x00030012 +#define RPI_MBOX_GET_DISPMANX_RESOURCE_MEM_HANDLE 0x00030014 +#define RPI_MBOX_GET_EDID_BLOCK 0x00030020 +#define RPI_MBOX_GET_CUSTOMER_OTP 0x00030021 +#define RPI_MBOX_GET_DOMAIN_STATE 0x00030030 +#define RPI_MBOX_GET_GPIO_STATE 0x00030041 +#define RPI_MBOX_GET_GPIO_CONFIG 0x00030043 +#define RPI_MBOX_GET_PERIPH_REG 0x00030045 +#define RPI_MBOX_GET_THROTTLED 0x00030046 +#define RPI_MBOX_GET_CLOCK_MEASURED 0x00030047 +#define RPI_MBOX_NOTIFY_REBOOT 0x00030048 +#define RPI_MBOX_GET_POE_HAT_VAL 0x00030049 +#define RPI_MBOX_SET_POE_HAT_VAL 0x00030050 #define RPI_MBOX_NOTIFY_XHCI_RESET 0x00030058 =20 +#define RPI_MBOX_SET_CLOCK_STATE 0x00038001 #define RPI_MBOX_SET_CLOCK_RATE 0x00038002 +#define RPI_MBOX_SET_VOLTAGE 0x00038003 +#define RPI_MBOX_SET_TURBO 0x00038009 +#define RPI_MBOX_SET_CUSTOMER_OTP 0x00038021 +#define RPI_MBOX_SET_DOMAIN_STATE 0x00038030 #define RPI_MBOX_SET_GPIO 0x00038041 +#define RPI_MBOX_SET_SDHOST_CLOCK 0x00038042 +#define RPI_MBOX_SET_GPIO_CONFIG 0x00038043 +#define RPI_MBOX_SET_PERIPH_REG 0x00038045 =20 +#define RPI_MBOX_ALLOC_FB 0x00040001 +#define RPI_MBOX_FB_BLANK 0x00040002 #define RPI_MBOX_GET_FB_GEOMETRY 0x00040003 -#define RPI_MBOX_GET_FB_LINELENGTH 0x00040008 +#define RPI_MBOX_GET_FB_VIRTUAL_WIDTH_HEIGHT 0x00040004 #define RPI_MBOX_GET_FB_COLOR_DEPTH 0x00040005 -#define RPI_MBOX_GET_FB_REGION 0x00040001 +#define RPI_MBOX_GET_FB_PIXEL_ORDER 0x00040006 +#define RPI_MBOX_GET_FB_ALPHA_MODE 0x00040007 +#define RPI_MBOX_GET_FB_LINELENGTH 0x00040008 +#define RPI_MBOX_GET_FB_VIRTUAL_OFFSET 0x00040009 +#define RPI_MBOX_GET_FB_OVERSCAN 0x0004000a +#define RPI_MBOX_GET_FB_PALETTE 0x0004000b +#define RPI_MBOX_GET_FB_TOUCHBUF 0x0004000f +#define RPI_MBOX_GET_FB_GPIOVIRTBUF 0x00040010 + +#define RPI_MBOX_TEST_FB_PHYSICAL_WIDTH_HEIGHT 0x00044003 +#define RPI_MBOX_TEST_FB_VIRTUAL_WIDTH_HEIGHT 0x00044004 +#define RPI_MBOX_TEST_FB_DEPTH 0x00044005 +#define RPI_MBOX_TEST_FB_PIXEL_ORDER 0x00044006 +#define RPI_MBOX_TEST_FB_ALPHA_MODE 0x00044007 +#define RPI_MBOX_TEST_FB_VIRTUAL_OFFSET 0x00044009 +#define RPI_MBOX_TEST_FB_OVERSCAN 0x0004400a +#define RPI_MBOX_TEST_FB_PALETTE 0x0004400b +#define RPI_MBOX_TEST_FB_VSYNC 0x0004400e =20 +#define RPI_MBOX_FREE_FB 0x00048001 #define RPI_MBOX_SET_FB_PGEOM 0x00048003 #define RPI_MBOX_SET_FB_VGEOM 0x00048004 #define RPI_MBOX_SET_FB_DEPTH 0x00048005 -#define RPI_MBOX_ALLOC_FB 0x00040001 -#define RPI_MBOX_FREE_FB 0x00048001 +#define RPI_MBOX_SET_FB_PIXEL_ORDER 0x00048006 +#define RPI_MBOX_SET_FB_ALPHA_MODE 0x00048007 +#define RPI_MBOX_SET_FB_VIRTUAL_OFFSET 0x00048009 +#define RPI_MBOX_SET_FB_OVERSCAN 0x0004800a +#define RPI_MBOX_SET_FB_PALET TE 0x0004800b +#define RPI_MBOX_VCHIQ_INIT 0x00048010 +#define RPI_MBOX_SET_FB_TOUCHBUF 0x0004801f +#define RPI_MBOX_SET_FB_GPIOVIRTBUF 0x00048020 +#define RPI_MBOX_SET_FB_VSYNC 0x0004800e +#define RPI_MBOX_SET_FB_BACKLIGHT 0x0004800f =20 #define RPI_MBOX_GET_COMMAND_LINE 0x00050001 =20 +#define RPI_MBOX_GET_DMA_CHANNELS 0x00060001 + #define RPI_MBOX_POWER_STATE_ENABLE BIT0 #define RPI_MBOX_POWER_STATE_WAIT BIT1 =20 @@ -93,5 +161,21 @@ #define RPI_MBOX_CLOCK_RATE_SDRAM 0x000000008 #define RPI_MBOX_CLOCK_RATE_PIXEL 0x000000009 #define RPI_MBOX_CLOCK_RATE_PWM 0x00000000a +#define RPI_MBOX_CLOCK_RATE_HEVC 0x00000000b +#define RPI_MBOX_CLOCK_RATE_EMMC2 0x00000000c +#define RPI_MBOX_CLOCK_RATE_M2MC 0x00000000d +#define RPI_MBOX_CLOCK_RATE_PIXEL_BVB 0x00000000d + +#define RPI_EXP_GPIO_DIR_IN 0 +#define RPI_EXP_GPIO_DIR_OUT 1 + +#define RPI_EXP_GPIO_BT 0 +#define RPI_EXP_GPIO_WIFI 1 +#define RPI_EXP_GPIO_LED 2 +#define RPI_EXP_GPIO_RESET 3 +#define RPI_EXP_GPIO_SD_VOLT 4 +#define RPI_EXP_GPIO_CAMERA 5 +#define RPI_EXP_GPIO_SD_POWER 6 +#define RPI_EXP_GPIO_POWER_LED 7 =20 #endif /* __RASPBERRY_PI_MAILBOX_H__ */ --=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 (#69725): https://edk2.groups.io/g/devel/message/69725 Mute This Topic: https://groups.io/mt/79453716/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-