blob: 0995aa47d0f04546c0c794aa471a2f972884900d [file] [log] [blame]
Roy Zang3f7f6b82011-06-09 11:30:52 +08001/*
2 * Copyright (C) 2011 Freescale Semiconductor, Inc.
3 *
4 * Authors: Chunhe Lan <b25806@freescale.com>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 */
12
13#ifndef __BCSR_H_
14#define __BCSR_H_
15
16#include <common.h>
17
18/*
19 * BCSR Bit definitions
20 * BCSR 15 *
21 0 device insertion oriention
22 1 stack processor present
23 2 power supply shut down/normal operation
24 3 I2C bus0 drive enable
25 4 reserved
26 5:7 I2C bus0 select
27 5 - I2C_BUS_0_SS0
28 6 - I2C_BUS_0_SS1
29 7 - I2C_BUS_0_SS2
30*/
31
32/* BCSR register base address is 0xFX000020 */
33#define BCSR_BASE_REG_OFFSET 0x20
34#define BCSR_ACCESS_REG_ADDR (CONFIG_SYS_BCSR_BASE + BCSR_BASE_REG_OFFSET)
35
36#define BCSR15_DEV_INS_ORI 0x80
37#define BCSR15_STACK_PRO_PRE 0x40
38#define BCSR15_POWER_SUPPLY 0x20
39#define BCSR15_I2C_BUS0_EN 0x10
40#define BCSR15_I2C_BUS0_SEG0 0x00
41#define BCSR15_I2C_BUS0_SEG1 0x04
42#define BCSR15_I2C_BUS0_SEG2 0x02
43#define BCSR15_I2C_BUS0_SEG3 0x06
44#define BCSR15_I2C_BUS0_SEG4 0x01
45#define BCSR15_I2C_BUS0_SEG5 0x05
46#define BCSR15_I2C_BUS0_SEG6 0x03
47#define BCSR15_I2C_BUS0_SEG7 0x07
48#define BCSR15_I2C_BUS0_SEG_CLR 0x07
49#define BCSR19_SGMII_SEL_L 0x01
50
51/*BCSR Utils functions*/
52void fixup_i2c_bus0_sel_seg0(void);
53#endif /* __BCSR_H_ */