[edk2-devel] [edk2-platforms][PATCH 03/15] Silicon/Bcm283x: Add GPU/VideoCore and Power Management constants

Pete Batard pete at akeo.ie
Fri Feb 28 10:38:43 UTC 2020


Whereas these devices are not explicitly described in the BCM2835
ARM Peripheral guide, they come as standard with the SoC and their
constants can easily be found in the Device Trees for Bcm283x based
devices.

Create 2 new Silicon headers to host these constants.

Signed-off-by: Pete Batard <pete at akeo.ie>
---
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h | 48 ++++++++++++++++++++
 Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h | 34 ++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h
new file mode 100644
index 000000000000..4eea4cf22fd8
--- /dev/null
+++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Gpu.h
@@ -0,0 +1,48 @@
+/** @file
+ *
+ *  Copyright (c) 2020, Pete Batard <pete at akeo.ie>
+ *
+ *  SPDX-License-Identifier: BSD-2-Clause-Patent
+ *
+ **/
+
+#include <IndustryStandard/Bcm2836.h>
+
+#ifndef __BCM2836_GPU_H__
+#define __BCM2836_GPU_H__
+
+/* VideoCore constants */
+
+#define BCM2836_VCHIQ_OFFSET                                0x0000B840
+#define BCM2836_VCHIQ_BASE_ADDRESS                          (BCM2836_SOC_REGISTERS + BCM2836_VCHIQ_OFFSET)
+#define BCM2836_VCHIQ_LENGTH                                0x00000010
+
+#define BCM2836_V3D_BUS_OFFSET                              0x00C00000
+#define BCM2836_V3D_BUS_BASE_ADDRESS                        (BCM2836_SOC_REGISTERS + BCM2836_V3D_BUS_OFFSET)
+#define BCM2836_V3D_BUS_LENGTH                              0x00001000
+
+#define BCM2836_HVS_OFFSET                                  0x00400000
+#define BCM2836_HVS_BASE_ADDRESS                            (BCM2836_SOC_REGISTERS + BCM2836_HVS_OFFSET)
+#define BCM2836_HVS_LENGTH                                  0x00006000
+
+#define BCM2836_PV0_OFFSET                                  0x00206000
+#define BCM2836_PV0_BASE_ADDRESS                            (BCM2836_SOC_REGISTERS + BCM2836_PV0_OFFSET)
+#define BCM2836_PV0_LENGTH                                  0x00000100
+
+#define BCM2836_PV1_OFFSET                                  0x00207000
+#define BCM2836_PV1_BASE_ADDRESS                            (BCM2836_SOC_REGISTERS + BCM2836_PV1_OFFSET)
+#define BCM2836_PV1_LENGTH                                  0x00000100
+
+#define BCM2836_PV2_OFFSET                                  0x00807000
+#define BCM2836_PV2_BASE_ADDRESS                            (BCM2836_SOC_REGISTERS + BCM2836_PV2_OFFSET)
+#define BCM2836_PV2_LENGTH                                  0x00000100
+
+#define BCM2836_HDMI0_OFFSET                                0x00902000
+#define BCM2836_HDMI0_BASE_ADDRESS                          (BCM2836_SOC_REGISTERS + BCM2836_HDMI0_OFFSET)
+#define BCM2836_HDMI0_LENGTH                                0x00000600
+
+#define BCM2836_HDMI1_OFFSET                                0x00808000
+#define BCM2836_HDMI1_BASE_ADDRESS                          (BCM2836_SOC_REGISTERS + BCM2836_HDMI1_OFFSET)
+#define BCM2836_HDMI1_LENGTH                                0x00000100
+
+#endif /* __BCM2836_MISC_H__ */
diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h
new file mode 100644
index 000000000000..e2581b8901ad
--- /dev/null
+++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836Pwm.h
@@ -0,0 +1,34 @@
+/** @file
+ *
+ *  Copyright (c) 2020, Pete Batard <pete at akeo.ie>
+ *
+ *  SPDX-License-Identifier: BSD-2-Clause-Patent
+ *
+ **/
+
+#include <IndustryStandard/Bcm2836.h>
+
+#ifndef __BCM2836_PWM_H__
+#define __BCM2836_PWM_H__
+
+/* Power Management constants */
+
+#define BCM2836_PWM_DMA_OFFSET                              0x00007B00
+#define BCM2836_PWM_DMA_BASE_ADDRESS                        (BCM2836_SOC_REGISTERS + BCM2836_PWM_DMA_OFFSET)
+#define BCM2836_PWM_DMA_LENGTH                              0x00000100
+
+#define BCM2836_PWM_CLK_OFFSET                              0x001010A0
+#define BCM2836_PWM_CLK_BASE_ADDRESS                        (BCM2836_SOC_REGISTERS + BCM2836_PWM_CLK_OFFSET)
+#define BCM2836_PWM_CLK_LENGTH                              0x00000008
+
+#define BCM2836_PWM_CTRL_OFFSET                             0x0020C000
+#define BCM2836_PWM_CTRL_BASE_ADDRESS                       (BCM2836_SOC_REGISTERS + BCM2836_PWM_CTRL_OFFSET)
+#define BCM2836_PWM_CTRL_LENGTH                             0x00000028
+
+#define BCM2836_PWM_BUS_BASE_ADDRESS                        0x7E20C000
+#define BCM2836_PWM_BUS_LENGTH                              0x00000028
+
+#define BCM2836_PWM_CTRL_UNCACHED_BASE_ADDRESS              0xFF20C000
+#define BCM2836_PWM_CTRL_UNCACHED_LENGTH                    0x00000028
+
+#endif /* __BCM2836_PWM_H__ */
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#55065): https://edk2.groups.io/g/devel/message/55065
Mute This Topic: https://groups.io/mt/71605840/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list