Commit e04a653f authored by ROOL's avatar ROOL 🤖
Browse files

This commit was manufactured by cvs2git to create tag 'BCM2835-0_75-2'.

Sprout from master 2018-04-10 19:40:00 UTC Robert Sprowson <rsprowson@gitlab.riscosopen.org> 'Debug UART typo & clarification'
Cherrypick from master 2018-12-01 17:59:05 UTC Robert Sprowson <rsprowson@gitlab.riscosopen.org> 'Appease Thor':
    s/GPIO
    s/SDIO
Cherrypick from Pi3APlus 2018-10-26 19:31:38 UTC Ben Avison <bavison@gitlab.riscosopen.org> 'Add support for Pi model 3A+':
    hdr/BCM2835
parent 8c7c60d9
......@@ -364,6 +364,7 @@ BoardRevision_Model_Zero * 9 :SHL: BoardRevision_Model_Shift
BoardRevision_Model_Compute3 * 10 :SHL: BoardRevision_Model_Shift
BoardRevision_Model_ZeroW * 12 :SHL: BoardRevision_Model_Shift
BoardRevision_Model_B3Plus * 13 :SHL: BoardRevision_Model_Shift
BoardRevision_Model_A3Plus * 14 :SHL: BoardRevision_Model_Shift
BoardRevision_Rev_Shift * 0
BoardRevision_Rev_Mask * 15 :SHL: BoardRevision_Rev_Shift
......
......@@ -213,6 +213,7 @@ GPIORevision_RaspberryPi_Zero # 1 ; Model Zero
GPIORevision_RaspberryPi_ZeroW # 1 ; Model ZeroW
GPIORevision_RaspberryPi_Mk3_B # 1 ; Model Pi 3 B
GPIORevision_RaspberryPi_Mk3_BPlus # 1 ; Model Pi 3 B+
GPIORevision_RaspberryPi_Mk3_APlus # 1 ; Model Pi 3 A+
GPIORevision_RaspberryPi_Max # 0
Name_B_1 = "Raspberry Pi B PCB 1.0", 0
......@@ -227,6 +228,7 @@ Name_Zero = "Raspberry Pi Zero", 0
Name_ZeroW = "Raspberry Pi Zero W", 0
Name_Mk3_B = "Raspberry Pi 3 Model B", 0
Name_Mk3_BPlus = "Raspberry Pi 3 Model B+", 0
Name_Mk3_APlus = "Raspberry Pi 3 Model A+", 0
Name_Unknown = "Raspberry Pi Unknown", 0
ALIGN
......@@ -243,6 +245,7 @@ GPIO_Board_Names_Table ; same order as GPIORevision_RaspberryPi types
DCD Name_ZeroW
DCD Name_Mk3_B
DCD Name_Mk3_BPlus
DCD Name_Mk3_APlus
ASSERT (.-GPIO_Board_Names_Table) :SHR: 2 = GPIORevision_RaspberryPi_Max
; Lookup table to determine board type (old style)
......@@ -303,6 +306,8 @@ GPIO_Board_Conversion_Table
DCD GPIORevision_RaspberryPi_ZeroW
DCD BoardRevision_Mem_1G+BoardRevision_Model_B3Plus+(3:SHL:BoardRevision_Rev_Shift)
DCD GPIORevision_RaspberryPi_Mk3_BPlus
DCD BoardRevision_Mem_512M+BoardRevision_Model_A3Plus+(0:SHL:BoardRevision_Rev_Shift)
DCD GPIORevision_RaspberryPi_Mk3_APlus
DCD &FF
; Initialise our HAL devices
......@@ -862,73 +867,6 @@ GPIO_FuncSelect_Table
FuncSelectTable 53
ALIGN
[ {FALSE}
; Alt table 8 bytes per port 1st byte = mode 0 etc, &FF = not available
; Ref: section 6.2 of BCM2835 ARM peripherals datasheet
GPIO_Alt_Table
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 0
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 1
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 2
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 3
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, 2_010 ; 4
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, 2_010 ; 5
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, 2_010 ; 6
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 7
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 8
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 9
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 10
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 11
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, 2_010 ; 12
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, 2_010 ; 13
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, 2_010 ; 14
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, 2_010 ; 15
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, 2_010 ; 16
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, 2_010 ; 17
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, 2_010 ; 18
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, 2_010 ; 19
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, 2_010 ; 20
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, 2_010 ; 21
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, &FF ; 22
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, &FF ; 23
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, &FF ; 24
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, 2_011, &FF ; 25
DCB 2_000, 2_001, &FF, &FF, &FF, 2_111, 2_011, &FF ; 26
DCB 2_000, 2_001, &FF, &FF, &FF, 2_111, 2_011, &FF ; 27
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, &FF, &FF ; 28
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, &FF, &FF ; 29
DCB 2_000, 2_001, &FF, 2_101, 2_110, &FF, &FF, 2_010 ; 30
DCB 2_000, 2_001, &FF, 2_101, 2_110, &FF, &FF, 2_010 ; 31
DCB 2_000, 2_001, 2_100, 2_101, &FF, 2_111, &FF, 2_010 ; 32
DCB 2_000, 2_001, 2_100, 2_101, &FF, 2_111, &FF, 2_010 ; 33
DCB 2_000, 2_001, &FF, 2_101, &FF, 2_111, &FF, 2_010 ; 34
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, &FF, &FF ; 35
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, &FF, &FF ; 36
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, &FF, &FF ; 37
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, &FF, &FF ; 38
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, &FF, &FF ; 39
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, 2_011, 2_010 ; 40
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, 2_011, 2_010 ; 41
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, 2_011, 2_010 ; 42
DCB 2_000, 2_001, 2_100, 2_101, &FF, &FF, 2_011, 2_010 ; 43
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, 2_011, &FF ; 44
DCB 2_000, 2_001, 2_100, 2_101, 2_110, &FF, 2_011, &FF ; 45
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 46
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 47
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 48
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 49
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 50
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 51
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 52
DCB 2_000, 2_001, &FF, &FF, &FF, &FF, &FF, &FF ; 53
ALIGN
]
; Available pins per target board
; Ref: http://elinux.org/RPi_BCM2835_GPIOs
GPIOFreeToUse
......@@ -956,6 +894,9 @@ GPIOFreeToUse
DCD 2_00000000000000000000000000000000
DCD 2_00001111111111111111111111111111 ; 3B+
DCD 2_00000000000000000000000000000000
DCD 2_00001111111111111111111111111111 ; 3A+
DCD 2_00000000000000000000000000000000
ASSERT (.-GPIOFreeToUse) :SHR: 3 = GPIORevision_RaspberryPi_Max
; Pin enumerations
GPIO_Port0_Table
......
......@@ -388,6 +388,7 @@ SDIO_InitDevices ROUT
ADDHS a2, a2, #GetCardDetect_BPlus_Compute - GetCardDetect_AB
TEQ a3, #BoardRevision_Model_B3
TEQNE a3, #BoardRevision_Model_B3Plus
TEQNE a3, #BoardRevision_Model_A3Plus
ADREQL a1, SetActivity_B3
STR a1, SDHCIDevice + HALDevice_SDHCISetActivity
STR a2, SDHCIDevice + HALDevice_SDHCIGetCardDetect
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment