1256959Sloos/*-
2256959Sloos * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org>
3256959Sloos * Copyright (c) 2013 Luiz Otavio O Souza <loos@freebsd.org>
4256959Sloos * All rights reserved.
5256959Sloos *
6256959Sloos * Redistribution and use in source and binary forms, with or without
7256959Sloos * modification, are permitted provided that the following conditions
8256959Sloos * are met:
9256959Sloos * 1. Redistributions of source code must retain the above copyright
10256959Sloos *    notice, this list of conditions and the following disclaimer.
11256959Sloos * 2. Redistributions in binary form must reproduce the above copyright
12256959Sloos *    notice, this list of conditions and the following disclaimer in the
13256959Sloos *    documentation and/or other materials provided with the distribution.
14256959Sloos *
15256959Sloos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16256959Sloos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17256959Sloos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18256959Sloos * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19256959Sloos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20256959Sloos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21256959Sloos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22256959Sloos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23256959Sloos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24256959Sloos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25256959Sloos * SUCH DAMAGE.
26256959Sloos *
27256959Sloos * $FreeBSD$
28256959Sloos */
29256959Sloos
30256959Sloos#ifndef	_BCM2835_BSCREG_H_
31256959Sloos#define	_BCM2835_BSCREG_H_
32256959Sloos
33256959Sloos#define	BCM_BSC_CORE_CLK	150000000U
34256959Sloos#define	BCM_BSC_CTRL		0x00
35256959Sloos#define	BCM_BSC_CTRL_I2CEN		(1 << 15)
36256959Sloos#define	BCM_BSC_CTRL_INTR		(1 << 10)
37256959Sloos#define	BCM_BSC_CTRL_INTT		(1 << 9)
38256959Sloos#define	BCM_BSC_CTRL_INTD		(1 << 8)
39256959Sloos#define	BCM_BSC_CTRL_ST			(1 << 7)
40256959Sloos#define	BCM_BSC_CTRL_CLEAR1		(1 << 5)
41256959Sloos#define	BCM_BSC_CTRL_CLEAR0		(1 << 4)
42256959Sloos#define	BCM_BSC_CTRL_READ		(1 << 0)
43256959Sloos#define	BCM_BSC_STATUS		0x04
44256959Sloos#define	BCM_BSC_STATUS_CLKT		(1 << 9)
45256959Sloos#define	BCM_BSC_STATUS_ERR		(1 << 8)
46256959Sloos#define	BCM_BSC_STATUS_RXF		(1 << 7)
47256959Sloos#define	BCM_BSC_STATUS_TXE		(1 << 6)
48256959Sloos#define	BCM_BSC_STATUS_RXD		(1 << 5)
49256959Sloos#define	BCM_BSC_STATUS_TXD		(1 << 4)
50256959Sloos#define	BCM_BSC_STATUS_RXR		(1 << 3)
51256959Sloos#define	BCM_BSC_STATUS_TXW		(1 << 2)
52256959Sloos#define	BCM_BSC_STATUS_DONE		(1 << 1)
53256959Sloos#define	BCM_BSC_STATUS_TA		(1 << 0)
54256959Sloos#define	BCM_BSC_DLEN		0x08
55256959Sloos#define	BCM_BSC_SLAVE		0x0c
56256959Sloos#define	BCM_BSC_DATA		0x10
57256959Sloos#define	BCM_BSC_CLOCK		0x14
58256959Sloos#define	BCM_BSC_DELAY		0x18
59256959Sloos#define	BCM_BSC_CLKT		0x1c
60256959Sloos
61256959Sloos#endif	/* _BCM2835_BSCREG_H_ */
62