Commit 591050cd authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Basic VGA666 support - configure GPIOs for DPI use

parent 699a746a
......@@ -34,9 +34,14 @@
[ :LNOT: :DEF: BCM2835_Hdr
GBLL BCM2835_Hdr
; VGA666 board support
; Prevents the use of UART, I2C, SPI
GBLL VGA666
VGA666 SETL {FALSE}
; Debugging in the serial port (HAL_DebugTX, HAL_DebugRX)
GBLL Debug
Debug SETL {FALSE}
Debug SETL {FALSE} :LAND: :LNOT: VGA666
; Debug messages from the HAL itself
GBLL HALDebug
......
......@@ -366,16 +366,12 @@ GPIO_InitDevices
MOV a1, #0
ADRL a2, GPIO0Device
STR v1, [a2, #WkspType]
[ :LNOT: JTAG ; Play it safe, we don't want software messing with the JTAG GPIOs
CallOS OS_AddDevice ; register device0
]
MOV a1, #0
ADRL a2, GPIO1Device
STR v1, [a2, #WkspType]
[ :LNOT: JTAG ; Play it safe, we don't want software messing with the JTAG GPIOs
CallOS OS_AddDevice ; register device1
]
EXIT
GPIO_Activate
......
......@@ -794,7 +794,27 @@ HAL_Init
BL CMOS_Init
BL Interrupt_Init ; initialise our interrupts
BL Timer_Init
[ VGA666
DoMemBarrier a1
; Configure GPIOs 2-21 inclusive for ALT2 mode
; This prevents the use of I2C, UART & SPI
LDR a2, PeriBase
ADD a3, a2, #GPIO_Base
LDR a2, [a3, #GPFSel0]
AND a2, a2, #8_0000000077
LDR a1, =8_6666666600
ORR a2, a2, a1
STR a2, [a3, #GPFSel0] ; 2-9
ORR a1, a1, #8_66
STR a1, [a3, #GPFSel1] ; 10-19
LDR a2, [a3, #GPFSel2]
BIC a2, a2, #8_77
ORR a2, a2, #8_66
STR a2, [a3, #GPFSel2] ; 20-21
DoMemBarrier a1
|
BL IIC_Init
]
[ HALDebug
BL HAL_DebugTXStrInline
......@@ -989,10 +1009,14 @@ HAL_InitDevices
BL Video_InitDevices ; Must be before DMA_InitDevices
BL SDIO_InitDevices
BL DMA_InitDevices
[ :LNOT: (JTAG :LOR: VGA666) ; Play it safe, we don't want software messing with the JTAG GPIOs
BL GPIO_InitDevices
]
BL VCHIQ_InitDevices
BL RTC_InitDevices
[ :LNOT: VGA666
BL SPI_InitDevices
]
BL Touch_InitDevices
BL BCMMBox_InitDevices
BL DBell_InitDevices
......
......@@ -112,12 +112,17 @@ r SETS "a1"
; Return number of UART ports
;
HAL_UARTPorts
[ VGA666
MOV a1, #0 ; VGA666 uses all the UART GPIOs
|
MOV a1, #1 ; Currently we only support the main UART (PL011-compatible)
]
MOV pc, lr
; void StartUp(int port)
;
HAL_UARTStartUp
[ :LNOT: VGA666
DataSyncBarrier a2 ; resync before writing peripheral
LDR a2, PeriBase ; first turn on the serial pins
ADD a3, a2, #GPIO_Base ; (for setting pins up)
......@@ -125,6 +130,7 @@ HAL_UARTStartUp
BIC a2, a2, #8_00770000 ;
ORR a2, a2, #8_00440000 ; set GPIO 14 + 15 to alt0 (100)
STR a2, [a3, #GPFSel1] ;
]
DataSyncBarrier a2 ; resync before writing peripheral
BaseAddr
StopUART a2
......
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