public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrei Warkentin" <awarkentin@vmware.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"jeremy.linton@arm.com" <jeremy.linton@arm.com>
Cc: "ard.biesheuvel@arm.com" <ard.biesheuvel@arm.com>,
	"leif@nuviainc.com" <leif@nuviainc.com>,
	"pete@akeo.ie" <pete@akeo.ie>,
	"andrey.warkentin@gmail.com" <andrey.warkentin@gmail.com>,
	"samer.el-haj-mahmoud@arm.com" <samer.el-haj-mahmoud@arm.com>
Subject: Re: [edk2-devel] [PATCH 1/7] Platform/RaspberryPi: Update VPU mailbox constants
Date: Tue, 15 Dec 2020 18:15:14 +0000	[thread overview]
Message-ID: <SJ0PR05MB7580B395C60A5AF7BE8858A0B9C60@SJ0PR05MB7580.namprd05.prod.outlook.com> (raw)
In-Reply-To: <20201214232350.1192387-2-jeremy.linton@arm.com>

[-- Attachment #1: Type: text/plain, Size: 11427 bytes --]

LGTM

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Jeremy Linton via groups.io <jeremy.linton=arm.com@groups.io>
Sent: Monday, December 14, 2020 5:23 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuviainc.com <leif@nuviainc.com>; pete@akeo.ie <pete@akeo.ie>; andrey.warkentin@gmail.com <andrey.warkentin@gmail.com>; samer.el-haj-mahmoud@arm.com <samer.el-haj-mahmoud@arm.com>; Jeremy Linton <jeremy.linton@arm.com>
Subject: [edk2-devel] [PATCH 1/7] Platform/RaspberryPi: Update VPU mailbox constants

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 <jeremy.linton@arm.com>
---
 .../RaspberryPi/Include/IndustryStandard/RpiMbox.h | 94 ++++++++++++++++++++--
 1 file changed, 89 insertions(+), 5 deletions(-)

diff --git a/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h b/Platform/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



 #define RPI_MBOX_SET_POWER_STATE                              0x00028001



@@ -58,28 +62,92 @@
 #define RPI_MBOX_POWER_STATE_SPI                              0x00000007

 #define RPI_MBOX_POWER_STATE_CCP2TX                           0x00000008



+#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



+#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



+#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



+#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



 #define RPI_MBOX_GET_COMMAND_LINE                             0x00050001



+#define RPI_MBOX_GET_DMA_CHANNELS                             0x00060001

+

 #define RPI_MBOX_POWER_STATE_ENABLE                           BIT0

 #define RPI_MBOX_POWER_STATE_WAIT                             BIT1



@@ -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



 #endif /* __RASPBERRY_PI_MAILBOX_H__ */

--
2.13.7



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68813): https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F68813&amp;data=04%7C01%7Cawarkentin%40vmware.com%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=8Z49IWiFpGqiotCQbGpVM3jW0%2F7imrrNhTal8spe9bQ%3D&amp;reserved=0
Mute This Topic: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.io%2Fmt%2F78964889%2F4387333&amp;data=04%7C01%7Cawarkentin%40vmware.com%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=8znoOGR4qF8%2FVyGcUf37tgagVZ%2BhQBUOaXL7JfQz4Xs%3D&amp;reserved=0
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&amp;data=04%7C01%7Cawarkentin%40vmware.com%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Ov0gNDiq9CIooyxWSDtnYwpK0Ffh5nLPCsCDQs8ilVs%3D&amp;reserved=0 [awarkentin@vmware.com]
-=-=-=-=-=-=



[-- Attachment #2: Type: text/html, Size: 31522 bytes --]

  reply	other threads:[~2020-12-15 18:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 23:23 [PATCH 0/7] Enable emmc2 controller rpi4 Jeremy Linton
2020-12-14 23:23 ` [PATCH 1/7] Platform/RaspberryPi: Update VPU mailbox constants Jeremy Linton
2020-12-15 18:15   ` Andrei Warkentin [this message]
2020-12-14 23:23 ` [PATCH 2/7] Platform/RaspberryPi: Add further mailbox helpers Jeremy Linton
2020-12-15 18:18   ` [edk2-devel] " Andrei Warkentin
2020-12-14 23:23 ` [PATCH 3/7] Platform/RaspberryPi: Split MMC register defintions Jeremy Linton
2020-12-15 18:17   ` [edk2-devel] " Andrei Warkentin
2020-12-14 23:23 ` [PATCH 4/7] Platform/RaspberryPi/Arasan: Add write delay and voltage/clock config Jeremy Linton
2020-12-15 18:26   ` [edk2-devel] " Andrei Warkentin
2020-12-15 18:46     ` Jeremy Linton
2020-12-15 18:52       ` Andrei Warkentin
2020-12-14 23:23 ` [PATCH 5/7] Platform/RaspberryPi/Arasan: Select the correct base frequency Jeremy Linton
2020-12-15 18:18   ` [edk2-devel] " Andrei Warkentin
2020-12-14 23:23 ` [PATCH 6/7] Platform/RaspberryPi: Power up sd, and tweak GPIOs Jeremy Linton
2020-12-15 18:21   ` [edk2-devel] " Andrei Warkentin
2020-12-15 18:55     ` Jeremy Linton
2020-12-15 19:36       ` Andrei Warkentin
2020-12-15 20:15         ` Jeremy Linton
2020-12-14 23:23 ` [PATCH 7/7] Platform/RaspberryPi: Correct device path removal Jeremy Linton
2020-12-15 18:19   ` [edk2-devel] " Andrei Warkentin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR05MB7580B395C60A5AF7BE8858A0B9C60@SJ0PR05MB7580.namprd05.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox