171d7fec4Smrg/* $XFree86$ */ 271d7fec4Smrg/* 371d7fec4Smrg * $Workfile: dora9211.h $ 471d7fec4Smrg * $Revision: 1.1.1.1 $ 571d7fec4Smrg * 671d7fec4Smrg * File Contents: This header file defines the Durango routines and 771d7fec4Smrg * variables used to access the memory mapped regions. 871d7fec4Smrg * 971d7fec4Smrg * SubModule: Geode FlatPanel library 1071d7fec4Smrg * 1171d7fec4Smrg */ 1271d7fec4Smrg 1371d7fec4Smrg/* 1471d7fec4Smrg * NSC_LIC_ALTERNATIVE_PREAMBLE 1571d7fec4Smrg * 1671d7fec4Smrg * Revision 1.0 1771d7fec4Smrg * 1871d7fec4Smrg * National Semiconductor Alternative GPL-BSD License 1971d7fec4Smrg * 2071d7fec4Smrg * National Semiconductor Corporation licenses this software 2171d7fec4Smrg * ("Software"): 2271d7fec4Smrg * 2371d7fec4Smrg * Geode graphics driver for panel support 2471d7fec4Smrg * under one of the two following licenses, depending on how the 2571d7fec4Smrg * Software is received by the Licensee. 2671d7fec4Smrg * 2771d7fec4Smrg * If this Software is received as part of the Linux Framebuffer or 2871d7fec4Smrg * other GPL licensed software, then the GPL license designated 2971d7fec4Smrg * NSC_LIC_GPL applies to this Software; in all other circumstances 3071d7fec4Smrg * then the BSD-style license designated NSC_LIC_BSD shall apply. 3171d7fec4Smrg * 3271d7fec4Smrg * END_NSC_LIC_ALTERNATIVE_PREAMBLE */ 3371d7fec4Smrg 3471d7fec4Smrg/* NSC_LIC_BSD 3571d7fec4Smrg * 3671d7fec4Smrg * National Semiconductor Corporation Open Source License for Durango 3771d7fec4Smrg * 3871d7fec4Smrg * (BSD License with Export Notice) 3971d7fec4Smrg * 4071d7fec4Smrg * Copyright (c) 1999-2001 4171d7fec4Smrg * National Semiconductor Corporation. 4271d7fec4Smrg * All rights reserved. 4371d7fec4Smrg * 4471d7fec4Smrg * Redistribution and use in source and binary forms, with or without 4571d7fec4Smrg * modification, are permitted provided that the following conditions 4671d7fec4Smrg * are met: 4771d7fec4Smrg * 4871d7fec4Smrg * * Redistributions of source code must retain the above copyright 4971d7fec4Smrg * notice, this list of conditions and the following disclaimer. 5071d7fec4Smrg * 5171d7fec4Smrg * * Redistributions in binary form must reproduce the above 5271d7fec4Smrg * copyright notice, this list of conditions and the following 5371d7fec4Smrg * disclaimer in the documentation and/or other materials provided 5471d7fec4Smrg * with the distribution. 5571d7fec4Smrg * 5671d7fec4Smrg * * Neither the name of the National Semiconductor Corporation nor 5771d7fec4Smrg * the names of its contributors may be used to endorse or promote 5871d7fec4Smrg * products derived from this software without specific prior 5971d7fec4Smrg * written permission. 6071d7fec4Smrg * 6171d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 6271d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 6371d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 6471d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 6571d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 6671d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 6771d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 6871d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 6971d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 7071d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 7171d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 7271d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 7371d7fec4Smrg * OF SUCH DAMAGE. 7471d7fec4Smrg * 7571d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 7671d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with 7771d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under 7871d7fec4Smrg * CURRENT (2001) U.S. export regulations this software 7971d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or 8071d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 8171d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 8271d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S. 8371d7fec4Smrg * has embargoed goods and services. 8471d7fec4Smrg * 8571d7fec4Smrg * END_NSC_LIC_BSD */ 8671d7fec4Smrg 8771d7fec4Smrg/* NSC_LIC_GPL 8871d7fec4Smrg * 8971d7fec4Smrg * National Semiconductor Corporation Gnu General Public License for Durango 9071d7fec4Smrg * 9171d7fec4Smrg * (GPL License with Export Notice) 9271d7fec4Smrg * 9371d7fec4Smrg * Copyright (c) 1999-2001 9471d7fec4Smrg * National Semiconductor Corporation. 9571d7fec4Smrg * All rights reserved. 9671d7fec4Smrg * 9771d7fec4Smrg * Redistribution and use in source and binary forms, with or without 9871d7fec4Smrg * modification, are permitted under the terms of the GNU General 9971d7fec4Smrg * Public License as published by the Free Software Foundation; either 10071d7fec4Smrg * version 2 of the License, or (at your option) any later version 10171d7fec4Smrg * 10271d7fec4Smrg * In addition to the terms of the GNU General Public License, neither 10371d7fec4Smrg * the name of the National Semiconductor Corporation nor the names of 10471d7fec4Smrg * its contributors may be used to endorse or promote products derived 10571d7fec4Smrg * from this software without specific prior written permission. 10671d7fec4Smrg * 10771d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 10871d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 10971d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 11071d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 11171d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 11271d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 11371d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 11471d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 11571d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 11671d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 11771d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 11871d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 11971d7fec4Smrg * OF SUCH DAMAGE. See the GNU General Public License for more details. 12071d7fec4Smrg * 12171d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 12271d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with 12371d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under 12471d7fec4Smrg * CURRENT (2001) U.S. export regulations this software 12571d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or 12671d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 12771d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 12871d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S. 12971d7fec4Smrg * has embargoed goods and services. 13071d7fec4Smrg * 13171d7fec4Smrg * You should have received a copy of the GNU General Public License 13271d7fec4Smrg * along with this file; if not, write to the Free Software Foundation, 13371d7fec4Smrg * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 13471d7fec4Smrg * 13571d7fec4Smrg * END_NSC_LIC_GPL */ 13671d7fec4Smrg 13771d7fec4Smrg#include "panel.h" 13871d7fec4Smrg#include "92xx.h" 13971d7fec4Smrg 14071d7fec4Smrg#ifndef _DORA9211_h 14171d7fec4Smrg#define _DORA9211_h 14271d7fec4Smrg 14371d7fec4Smrg/* 9211 Rev.C3 Dorado */ 14471d7fec4Smrg 14571d7fec4Smrg/* GPIO Pin Configuration Registers */ 14671d7fec4Smrg 14771d7fec4Smrg#define DRD_GEODE_GPPIN_SEL 0x20 /* GPIO Pin Configuration Select */ 14871d7fec4Smrg#define DRD_GEODE_GPPIN_CFG 0x24 /* GPIO Pin Configuration Access */ 14971d7fec4Smrg#define DRD_GEODE_GPPIN_RESET 0x28 /* GPIO Pin Reset */ 15071d7fec4Smrg 15171d7fec4Smrg#define DRD_GEODE_GPIO_BASE 0x6400 /* F0 GPIO, IO mapped */ 15271d7fec4Smrg#define DRD_GEODE_GPDI0 0x04 /* GPIO Data In 0 */ 15371d7fec4Smrg#define DRD_GEODE_GPDO0 0x00 /* GPIO Data Out 0 */ 15471d7fec4Smrg 15571d7fec4Smrg/* Data Ports in */ 15671d7fec4Smrg#define DRD_CLOCKP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0 15771d7fec4Smrg#define DRD_DATAINP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0 15871d7fec4Smrg#define DRD_DATAOUTP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0 15971d7fec4Smrg#define DRD_CSP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0 16071d7fec4Smrg 16171d7fec4Smrg/* Data Ports out */ 16271d7fec4Smrg#define DRD_CLOCKP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0 16371d7fec4Smrg#define DRD_DATAINP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0 16471d7fec4Smrg#define DRD_DATAOUTP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0 16571d7fec4Smrg#define DRD_CSP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0 16671d7fec4Smrg 16771d7fec4Smrg/* Pin MASKS */ 16871d7fec4Smrg#define DRD_CLOCK9211 0x00000080 /*;gpio 7, clock output to 9211 */ 16971d7fec4Smrg#define DRD_DATAIN9211 0x00040000 /*;gpio 18, data output to 9211 */ 17071d7fec4Smrg#define DRD_DATAOUT9211 0x00000800 /*;gpio 11, data input from 9211 */ 17171d7fec4Smrg#define DRD_CS9211 0x00000200 /*;gpio 9, chip select output to 9211 */ 17271d7fec4Smrg 17371d7fec4Smrg/* Gpio CFG values to select in */ 17471d7fec4Smrg#define DRD_CLOCK9211CFG 0x00000007 /* ;gpio 7 */ 17571d7fec4Smrg#define DRD_DATAIN9211CFG 0x00000012 /* ;gpio 18 */ 17671d7fec4Smrg#define DRD_DATAOUT9211CFG 0x0000000B /* ;gpio 11 */ 17771d7fec4Smrg#define DRD_CS9211CFG 0x00000009 /* ;gpio 9 */ 17871d7fec4Smrg 17971d7fec4Smrg#define DRD_LCDRESGPIO1 0x00 18071d7fec4Smrg#define DRD_LCDRESGPIO2 0x01 18171d7fec4Smrg#define DRD_LCDRESGPIO3 0x02 18271d7fec4Smrg#define DRD_LCDRESGPIO4 0x04 18371d7fec4Smrg 18471d7fec4Smrgvoid Dorado9211SetCS(void); 18571d7fec4Smrgvoid Dorado9211ClearCS(void); 18671d7fec4Smrgvoid Dorado9211SetDataOut(void); 18771d7fec4Smrgvoid Dorado9211ClearDataOut(void); 18871d7fec4Smrgunsigned char Dorado9211ReadDataIn(void); 18971d7fec4Smrgvoid Dorado9211ToggleClock(void); 19071d7fec4Smrgvoid Dorado9211SetClock(void); 19171d7fec4Smrgvoid Dorado9211ClearClock(void); 19271d7fec4Smrgvoid Dorado9211GpioInit(void); 19371d7fec4Smrgunsigned long Dorado9211ReadReg(unsigned short index); 19471d7fec4Smrgvoid Dorado9211WriteReg(unsigned short index, unsigned long data); 19571d7fec4Smrgvoid DoradoProgramFRMload(void); 19671d7fec4Smrgvoid Dorado_Get_9211_Details(unsigned long flags, PPnl_PanelParams pParam); 19771d7fec4Smrgvoid Dorado_Power_Up(void); 19871d7fec4Smrgvoid Dorado_Power_Down(void); 19971d7fec4Smrgvoid Dorado_Save_Panel_State(void); 20071d7fec4Smrgvoid Dorado_Restore_Panel_State(void); 20171d7fec4Smrgvoid Dorado9211Init(Pnl_PanelStat * pstat); 20271d7fec4Smrg 20371d7fec4Smrg#endif /* !_DORA9211_h */ 204