1 /*=============================================================================
2 Copyright (C) 2016 Kristina Brooks
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
16 Glue code for Broadcom's register definitions as well as certain registers
17 that are missing from the release. This is also used by ARM.
19 =============================================================================*/
23 #define VPU_KILL_COMMAND 0xAAAAFFFF
25 #define VC4_PERIPH_BASE 0x7E000000
26 #define ARM_PERIPH_BASE 0x3F000000
28 #define VC4_TO_ARM_PERIPH(addr) ((addr - VC4_PERIPH_BASE) + ARM_PERIPH_BASE)
30 #define VC4_CPUID_BCM2709_PLUS 0x40
33 #define HW_REGISTER_RW(addr) (*(volatile unsigned int *)(VC4_TO_ARM_PERIPH(addr)))
34 #define HW_REGISTER_RO(addr) (*(const volatile unsigned int *)(VC4_TO_ARM_PERIPH(addr)))
36 #define HW_REGISTER_RW(addr) (*(volatile unsigned int *)(addr))
37 #define HW_REGISTER_RO(addr) (*(const volatile unsigned int *)(addr))
40 #define mmio_read32(addr) HW_REGISTER_RW(addr)
41 #define mmio_write32(addr, value) (HW_REGISTER_RW(addr) = value)
43 #include "hardware_vc4.h"
46 * this is not included by hardware_vc4.h
48 #include "bcm2708_chip/aux_io.h"
49 #include "bcm2708_chip/testbus.h"
51 #define RAM_SIZE_1GB 0
52 #define RAM_SIZE_512MB 1
53 #define RAM_SIZE_256MB 2
54 #define RAM_SIZE_128MB 3
55 #define RAM_SIZE_UNKNOWN 4
58 * LPDDR mode registers.
60 #define LPDDR2_MR_DEVICE_INFO 0
61 #define LPDDR2_MR_DEVICE_FEATURE_1 1
62 #define LPDDR2_MR_DEVICE_FEATURE_2 2
63 #define LPDDR2_MR_IO_CONFIG 3
64 #define LPDDR2_MR_TEMPERATURE 4
65 #define LPDDR2_MR_MANUFACTURER_ID 5
66 #define LPDDR2_MR_REV_1 6
67 #define LPDDR2_MR_REV_2 7
68 #define LPDDR2_MR_METRICS 8
69 #define LPDDR2_MR_CALIBRATION 10
73 #define CM_SRC_TESTDEBUG0 2
74 #define CM_SRC_TESTDEBUG1 3
75 #define CM_SRC_PLLA_CORE 4
76 #define CM_SRC_PLLA_PER 4
77 #define CM_SRC_PLLC_CORE0 5
78 #define CM_SRC_PLLC_PER 5
79 #define CM_SRC_PLLC_CORE1 8
80 #define CM_SRC_PLLD_CORE 6
81 #define CM_SRC_PLLD_PER 6
82 #define CM_SRC_PLLH_AUX 7
83 #define CM_SRC_PLLC_CORE1 8
84 #define CM_SRC_PLLC_CORE2 9
This page took 0.074091 seconds and 5 git commands to generate.