blob: 215534e6c945171e6d7ddeb09da1ac26d0e9158e [file] [log] [blame]
Andy Fleming67431052007-04-23 02:54:25 -05001/*
2 * Copyright 2007 Freescale Semiconductor.
3 *
Wolfgang Denk3765b3e2013-10-07 13:07:26 +02004 * SPDX-License-Identifier: GPL-2.0+
Andy Fleming67431052007-04-23 02:54:25 -05005 */
6
7#ifndef __BCSR_H_
8#define __BCSR_H_
9
10#include <common.h>
11
12/* BCSR Bit definitions
13 * BCSR 0 *
14 0:3 ccb sys pll
15 4:6 cfg core pll
16 7 cfg boot seq
17
18 * BCSR 1 *
Wolfgang Denk53677ef2008-05-20 16:00:29 +020019 0:2 cfg rom lock
20 3:5 cfg host agent
Andy Fleming67431052007-04-23 02:54:25 -050021 6 PCI IO
22 7 cfg RIO size
23
24 * BCSR 2 *
25 0:4 QE PLL
26 5 QE clock
27 6 cfg PCI arbiter
28
29 * BCSR 3 *
30 0 TSEC1 reduce
31 1 TSEC2 reduce
32 2:3 TSEC1 protocol
Wolfgang Denk53677ef2008-05-20 16:00:29 +020033 4:5 TSEC2 protocol
Andy Fleming67431052007-04-23 02:54:25 -050034 6 PHY1 slave
35 7 PHY2 slave
36
37 * BCSR 4 *
38 4 clock enable
39 5 boot EPROM
40 6 GETH transactive reset
41 7 BRD write potect
42
43 * BCSR 5 *
44 1:3 Leds 1-3
45 4 UPC1 enable
46 5 UPC2 enable
47 6 UPC2 pos
48 7 RS232 enable
49
50 * BCSR 6 *
51 0 CFG ver 0
52 1 CFG ver 1
53 6 Register config led
54 7 Power on reset
55
56 * BCSR 7 *
Wolfgang Denk53677ef2008-05-20 16:00:29 +020057 2 board host mode indication
58 5 enable TSEC1 PHY
59 6 enable TSEC2 PHY
Andy Fleming67431052007-04-23 02:54:25 -050060
61 * BCSR 8 *
62 0 UCC GETH1 enable
63 1 UCC GMII enable
64 3 UCC TBI enable
65 5 UCC MII enable
66 7 Real time clock reset
67
68 * BCSR 9 *
69 0 UCC2 GETH enable
70 1 UCC2 GMII enable
71 3 UCC2 TBI enable
72 5 UCC2 MII enable
73 6 Ready only - indicate flash ready after burning
74 7 Flash write protect
75*/
76
Anton Vorontsovad162242007-10-22 18:12:46 +040077#define BCSR_UCC1_GETH_EN (0x1 << 7)
78#define BCSR_UCC2_GETH_EN (0x1 << 7)
79#define BCSR_UCC1_MODE_MSK (0x3 << 4)
80#define BCSR_UCC2_MODE_MSK (0x3 << 0)
81
Andy Fleming67431052007-04-23 02:54:25 -050082/*BCSR Utils functions*/
83
84void enable_8568mds_duart(void);
85void enable_8568mds_flash_write(void);
86void disable_8568mds_flash_write(void);
Andy Flemingda9d4612007-08-14 00:14:25 -050087void enable_8568mds_qe_mdio(void);
Andy Fleming67431052007-04-23 02:54:25 -050088
Anton Vorontsovad162242007-10-22 18:12:46 +040089#if defined(CONFIG_UEC_ETH1) || defined(CONFIG_UEC_ETH2)
90void reset_8568mds_uccs(void);
91#endif
92
Andy Fleming67431052007-04-23 02:54:25 -050093#endif /* __BCSR_H_ */