From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.16965.1609781873078172531 for ; Mon, 04 Jan 2021 09:37:53 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jeremy.linton@arm.com) 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 B45B4101E; Mon, 4 Jan 2021 09:37:52 -0800 (PST) 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 AD1773F66E; Mon, 4 Jan 2021 09:37:52 -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: [PATCH v3 1/7] Platform/RaspberryPi: Update VPU mailbox constants Date: Mon, 4 Jan 2021 11:37:25 -0600 Message-Id: <20210104173731.1413044-2-jeremy.linton@arm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210104173731.1413044-1-jeremy.linton@arm.com> References: <20210104173731.1413044-1-jeremy.linton@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=0D #define RPI_MBOX_GET_ARM_MEMSIZE 0x00010005=0D #define RPI_MBOX_GET_VC_MEMSIZE 0x00010006=0D +#define RPI_MBOX_GET_CLOCKS 0x00010007=0D +=0D +#define RPI_MBOX_GET_POWER_STATE 0x00020001=0D +#define RPI_MBOX_GET_TIMING 0x00020002=0D =0D #define RPI_MBOX_SET_POWER_STATE 0x00028001=0D =0D @@ -58,28 +62,92 @@ #define RPI_MBOX_POWER_STATE_SPI 0x00000007=0D #define RPI_MBOX_POWER_STATE_CCP2TX 0x00000008=0D =0D +#define RPI_MBOX_GET_CLOCK_STATE 0x00030001=0D #define RPI_MBOX_GET_CLOCK_RATE 0x00030002=0D +#define RPI_MBOX_GET_VOLTAGE 0x00030003=0D #define RPI_MBOX_GET_MAX_CLOCK_RATE 0x00030004=0D +#define RPI_MBOX_GET_MAX_VOLTAGE 0x00030005=0D +#define RPI_MBOX_GET_TEMPERATURE 0x00030006=0D #define RPI_MBOX_GET_MIN_CLOCK_RATE 0x00030007=0D -=0D +#define RPI_MBOX_GET_MIN_VOLTAGE 0x00030008=0D +#define RPI_MBOX_GET_TURBO 0x00030009=0D +#define RPI_MBOX_GET_MAX_TEMPERATURE 0x0003000a=0D +#define RPI_MBOX_GET_STC 0x0003000b=0D +#define RPI_MBOX_ALLOCATE_MEMORY 0x0003000c=0D +#define RPI_MBOX_LOCK_MEMORY 0x0003000d=0D +#define RPI_MBOX_UNLOCK_MEMORY 0x0003000e=0D +#define RPI_MBOX_RELEASE_MEMORY 0x0003000f=0D +#define RPI_MBOX_EXECUTE_CODE 0x00030010=0D +#define RPI_MBOX_EXECUTE_QPU 0x00030011=0D +#define RPI_MBOX_SET_ENABLE_QPU 0x00030012=0D +#define RPI_MBOX_GET_DISPMANX_RESOURCE_MEM_HANDLE 0x00030014=0D +#define RPI_MBOX_GET_EDID_BLOCK 0x00030020=0D +#define RPI_MBOX_GET_CUSTOMER_OTP 0x00030021=0D +#define RPI_MBOX_GET_DOMAIN_STATE 0x00030030=0D +#define RPI_MBOX_GET_GPIO_STATE 0x00030041=0D +#define RPI_MBOX_GET_GPIO_CONFIG 0x00030043=0D +#define RPI_MBOX_GET_PERIPH_REG 0x00030045=0D +#define RPI_MBOX_GET_THROTTLED 0x00030046=0D +#define RPI_MBOX_GET_CLOCK_MEASURED 0x00030047=0D +#define RPI_MBOX_NOTIFY_REBOOT 0x00030048=0D +#define RPI_MBOX_GET_POE_HAT_VAL 0x00030049=0D +#define RPI_MBOX_SET_POE_HAT_VAL 0x00030050=0D #define RPI_MBOX_NOTIFY_XHCI_RESET 0x00030058=0D =0D +#define RPI_MBOX_SET_CLOCK_STATE 0x00038001=0D #define RPI_MBOX_SET_CLOCK_RATE 0x00038002=0D +#define RPI_MBOX_SET_VOLTAGE 0x00038003=0D +#define RPI_MBOX_SET_TURBO 0x00038009=0D +#define RPI_MBOX_SET_CUSTOMER_OTP 0x00038021=0D +#define RPI_MBOX_SET_DOMAIN_STATE 0x00038030=0D #define RPI_MBOX_SET_GPIO 0x00038041=0D +#define RPI_MBOX_SET_SDHOST_CLOCK 0x00038042=0D +#define RPI_MBOX_SET_GPIO_CONFIG 0x00038043=0D +#define RPI_MBOX_SET_PERIPH_REG 0x00038045=0D =0D +#define RPI_MBOX_ALLOC_FB 0x00040001=0D +#define RPI_MBOX_FB_BLANK 0x00040002=0D #define RPI_MBOX_GET_FB_GEOMETRY 0x00040003=0D -#define RPI_MBOX_GET_FB_LINELENGTH 0x00040008=0D +#define RPI_MBOX_GET_FB_VIRTUAL_WIDTH_HEIGHT 0x00040004=0D #define RPI_MBOX_GET_FB_COLOR_DEPTH 0x00040005=0D -#define RPI_MBOX_GET_FB_REGION 0x00040001=0D +#define RPI_MBOX_GET_FB_PIXEL_ORDER 0x00040006=0D +#define RPI_MBOX_GET_FB_ALPHA_MODE 0x00040007=0D +#define RPI_MBOX_GET_FB_LINELENGTH 0x00040008=0D +#define RPI_MBOX_GET_FB_VIRTUAL_OFFSET 0x00040009=0D +#define RPI_MBOX_GET_FB_OVERSCAN 0x0004000a=0D +#define RPI_MBOX_GET_FB_PALETTE 0x0004000b=0D +#define RPI_MBOX_GET_FB_TOUCHBUF 0x0004000f=0D +#define RPI_MBOX_GET_FB_GPIOVIRTBUF 0x00040010=0D +=0D +#define RPI_MBOX_TEST_FB_PHYSICAL_WIDTH_HEIGHT 0x00044003=0D +#define RPI_MBOX_TEST_FB_VIRTUAL_WIDTH_HEIGHT 0x00044004=0D +#define RPI_MBOX_TEST_FB_DEPTH 0x00044005=0D +#define RPI_MBOX_TEST_FB_PIXEL_ORDER 0x00044006=0D +#define RPI_MBOX_TEST_FB_ALPHA_MODE 0x00044007=0D +#define RPI_MBOX_TEST_FB_VIRTUAL_OFFSET 0x00044009=0D +#define RPI_MBOX_TEST_FB_OVERSCAN 0x0004400a=0D +#define RPI_MBOX_TEST_FB_PALETTE 0x0004400b=0D +#define RPI_MBOX_TEST_FB_VSYNC 0x0004400e=0D =0D +#define RPI_MBOX_FREE_FB 0x00048001=0D #define RPI_MBOX_SET_FB_PGEOM 0x00048003=0D #define RPI_MBOX_SET_FB_VGEOM 0x00048004=0D #define RPI_MBOX_SET_FB_DEPTH 0x00048005=0D -#define RPI_MBOX_ALLOC_FB 0x00040001=0D -#define RPI_MBOX_FREE_FB 0x00048001=0D +#define RPI_MBOX_SET_FB_PIXEL_ORDER 0x00048006=0D +#define RPI_MBOX_SET_FB_ALPHA_MODE 0x00048007=0D +#define RPI_MBOX_SET_FB_VIRTUAL_OFFSET 0x00048009=0D +#define RPI_MBOX_SET_FB_OVERSCAN 0x0004800a=0D +#define RPI_MBOX_SET_FB_PALET TE 0x0004800b=0D +#define RPI_MBOX_VCHIQ_INIT 0x00048010=0D +#define RPI_MBOX_SET_FB_TOUCHBUF 0x0004801f=0D +#define RPI_MBOX_SET_FB_GPIOVIRTBUF 0x00048020=0D +#define RPI_MBOX_SET_FB_VSYNC 0x0004800e=0D +#define RPI_MBOX_SET_FB_BACKLIGHT 0x0004800f=0D =0D #define RPI_MBOX_GET_COMMAND_LINE 0x00050001=0D =0D +#define RPI_MBOX_GET_DMA_CHANNELS 0x00060001=0D +=0D #define RPI_MBOX_POWER_STATE_ENABLE BIT0=0D #define RPI_MBOX_POWER_STATE_WAIT BIT1=0D =0D @@ -93,5 +161,21 @@ #define RPI_MBOX_CLOCK_RATE_SDRAM 0x000000008= =0D #define RPI_MBOX_CLOCK_RATE_PIXEL 0x000000009= =0D #define RPI_MBOX_CLOCK_RATE_PWM 0x00000000a= =0D +#define RPI_MBOX_CLOCK_RATE_HEVC 0x00000000b= =0D +#define RPI_MBOX_CLOCK_RATE_EMMC2 0x00000000c= =0D +#define RPI_MBOX_CLOCK_RATE_M2MC 0x00000000d= =0D +#define RPI_MBOX_CLOCK_RATE_PIXEL_BVB 0x00000000d= =0D +=0D +#define RPI_EXP_GPIO_DIR_IN 0=0D +#define RPI_EXP_GPIO_DIR_OUT 1=0D +=0D +#define RPI_EXP_GPIO_BT 0=0D +#define RPI_EXP_GPIO_WIFI 1=0D +#define RPI_EXP_GPIO_LED 2=0D +#define RPI_EXP_GPIO_RESET 3=0D +#define RPI_EXP_GPIO_SD_VOLT 4=0D +#define RPI_EXP_GPIO_CAMERA 5=0D +#define RPI_EXP_GPIO_SD_POWER 6=0D +#define RPI_EXP_GPIO_POWER_LED 7=0D =0D #endif /* __RASPBERRY_PI_MAILBOX_H__ */=0D --=20 2.13.7