xref: /netbsd-src/sys/arch/evbppc/include/obs266.h (revision 2a7d2f9aed1e388d76a575f9224d3700a9f4937a)
1*2a7d2f9aSrin /*	$NetBSD: obs266.h,v 1.4 2021/03/30 04:08:02 rin Exp $	*/
2b55107dcSshige 
3b55107dcSshige /*
4b55107dcSshige  * Copyright 2004 Shigeyuki Fukushima.
5b55107dcSshige  * All rights reserved.
6b55107dcSshige  *
7b55107dcSshige  * Written by Shigeyuki Fukushima for The NetBSD Project.
8b55107dcSshige  *
9b55107dcSshige  * Redistribution and use in source and binary forms, with or without
10b55107dcSshige  * modification, are permitted provided that the following conditions
11b55107dcSshige  * are met:
12b55107dcSshige  * 1. Redistributions of source code must retain the above copyright
13b55107dcSshige  *    notice, this list of conditions and the following disclaimer.
14b55107dcSshige  * 2. Redistributions in binary form must reproduce the above
15b55107dcSshige  *    copyright notice, this list of conditions and the following
16b55107dcSshige  *    disclaimer in the documentation and/or other materials provided
17b55107dcSshige  *    with the distribution.
18b55107dcSshige  * 3. The name of the author may not be used to endorse or promote
19b55107dcSshige  *    products derived from this software without specific prior
20b55107dcSshige  *    written permission.
21b55107dcSshige  *
22b55107dcSshige  * THIS SOFTWARE IS PROVIDED THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23b55107dcSshige  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24b55107dcSshige  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25b55107dcSshige  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
26b55107dcSshige  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27b55107dcSshige  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28b55107dcSshige  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
29b55107dcSshige  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30b55107dcSshige  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31b55107dcSshige  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
32b55107dcSshige  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
33b55107dcSshige  * DAMAGE.
34b55107dcSshige  */
35b55107dcSshige 
36b55107dcSshige #ifndef	_EVBPPC_OBS266_H_
37b55107dcSshige #define	_EVBPPC_OBS266_H_
38b55107dcSshige 
39*2a7d2f9aSrin #include <dev/ic/comreg.h>
40*2a7d2f9aSrin 
41b55107dcSshige /*
42b55107dcSshige  * Device Properties for OpenBlockS266 (IBM405GPr 266MHz)
43b55107dcSshige  */
44b55107dcSshige 
45b55107dcSshige /* UART Clock */
46b55107dcSshige #define OBS266_COM_FREQ		(COM_FREQ * 4)	/* UART CLK 7.3728 MHz */
47b55107dcSshige 
48b55107dcSshige /* OpenBlockS266 GPIO LED */
49b55107dcSshige #define OBS266_LED1		(1)
50b55107dcSshige #define OBS266_LED2		(2)
51b55107dcSshige #define OBS266_LED4		(4)
52b55107dcSshige #define OBS266_LED_ON		(OBS266_LED1 | OBS266_LED2 | OBS266_LED4)
53b55107dcSshige #define OBS266_LED_OFF		(~OBS266_LED1 & ~OBS266_LED2 & ~OBS266_LED4)
54b55107dcSshige 
55b55107dcSshige #define OBS266_GPIO_LED1	(12)
56b55107dcSshige #define OBS266_GPIO_LED2	(13)
57b55107dcSshige #define OBS266_GPIO_LED4	(14)
58b55107dcSshige 
59b55107dcSshige /*
60b55107dcSshige  * extern variables and functions
61b55107dcSshige  */
62b55107dcSshige extern void obs266_led_set(int led);
63b55107dcSshige 
64b55107dcSshige #endif	/* _EVBPPC_OBS266_H_ */
65