1
/* Copyright (c) 2005 Advanced Micro Devices, Inc.
3
* Permission is hereby granted, free of charge, to any person obtaining a copy
4
* of this software and associated documentation files (the "Software"), to
5
* deal in the Software without restriction, including without limitation the
6
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
* sell copies of the Software, and to permit persons to whom the Software is
8
* furnished to do so, subject to the following conditions:
10
* The above copyright notice and this permission notice shall be included in
11
* all copies or substantial portions of the Software.
13
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21
* Neither the name of the Advanced Micro Devices, Inc. nor the names of its
22
* contributors may be used to endorse or promote products derived from this
23
* software without specific prior written permission.
27
* File Contents: This header file defines the Durango routines and
28
* variables used to access the memory mapped regions.
30
* SubModule: Geode FlatPanel library
39
/* 9211 Rev.C3 Dorado */
41
/* GPIO Pin Configuration Registers */
43
#define DRD_GEODE_GPPIN_SEL 0x20 /* GPIO Pin Configuration Select */
44
#define DRD_GEODE_GPPIN_CFG 0x24 /* GPIO Pin Configuration Access */
45
#define DRD_GEODE_GPPIN_RESET 0x28 /* GPIO Pin Reset */
47
#define DRD_GEODE_GPIO_BASE 0x6400 /* F0 GPIO, IO mapped */
48
#define DRD_GEODE_GPDI0 0x04 /* GPIO Data In 0 */
49
#define DRD_GEODE_GPDO0 0x00 /* GPIO Data Out 0 */
52
#define DRD_CLOCKP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0
53
#define DRD_DATAINP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0
54
#define DRD_DATAOUTP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0
55
#define DRD_CSP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0
58
#define DRD_CLOCKP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0
59
#define DRD_DATAINP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0
60
#define DRD_DATAOUTP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0
61
#define DRD_CSP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0
64
#define DRD_CLOCK9211 0x00000080 /* gpio 7, clock output to 9211 */
65
#define DRD_DATAIN9211 0x00040000 /* gpio 18, data output to 9211 */
66
#define DRD_DATAOUT9211 0x00000800 /* gpio 11, data input from 9211 */
67
#define DRD_CS9211 0x00000200 /* gpio 9, chip select output to 9211
70
/* Gpio CFG values to select in */
71
#define DRD_CLOCK9211CFG 0x00000007 /* gpio 7 */
72
#define DRD_DATAIN9211CFG 0x00000012 /* gpio 18 */
73
#define DRD_DATAOUT9211CFG 0x0000000B /* gpio 11 */
74
#define DRD_CS9211CFG 0x00000009 /* gpio 9 */
76
#define DRD_LCDRESGPIO1 0x00
77
#define DRD_LCDRESGPIO2 0x01
78
#define DRD_LCDRESGPIO3 0x02
79
#define DRD_LCDRESGPIO4 0x04
81
void Dorado9211SetCS(void);
82
void Dorado9211ClearCS(void);
83
void Dorado9211SetDataOut(void);
84
void Dorado9211ClearDataOut(void);
85
unsigned char Dorado9211ReadDataIn(void);
86
void Dorado9211ToggleClock(void);
87
void Dorado9211SetClock(void);
88
void Dorado9211ClearClock(void);
89
void Dorado9211GpioInit(void);
90
unsigned long Dorado9211ReadReg(unsigned short index);
91
void Dorado9211WriteReg(unsigned short index, unsigned long data);
92
void DoradoProgramFRMload(void);
93
void Dorado_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam);
94
void Dorado_Power_Up(void);
95
void Dorado_Power_Down(void);
96
void Dorado_Save_Panel_State(void);
97
void Dorado_Restore_Panel_State(void);
98
void Dorado9211Init(Pnl_PanelStat * pstat);
100
#endif /* !_DORA9211_h */