blob: fee0fe7dbce8237bd377f99e60bc4b55fb6dd3dc [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Haiying Wangbd255372009-03-27 17:02:45 -04002/*
Kumar Gala6a6d9482009-07-28 21:49:52 -05003 * Copyright (C) 2009 Freescale Semiconductor, Inc.
Haiying Wangbd255372009-03-27 17:02:45 -04004 */
5
6#ifndef __BCSR_H_
7#define __BCSR_H_
8
9#include <common.h>
10
11/* BCSR Bit definitions*/
12/****************************************/
13/* BCSR defines */
14/****************************************/
15#define BCSR6_UPC1_EN 0x80
16#define BCSR6_UPC1_POS_EN 0x40
17#define BCSR6_UPC1_ADDR_EN 0x20
18#define BCSR6_UPC1_DEV2 0x10
Anton Vorontsovda225942009-10-15 17:47:06 +040019#define BCSR6_SD_CARD_1BIT 0x08
20#define BCSR6_SD_CARD_4BITS 0x04
Haiying Wangbd255372009-03-27 17:02:45 -040021#define BCSR6_TDM2G_EN 0x02
22#define BCSR6_UCC7_RMII_EN 0x01
23
24#define BCSR7_UCC1_GETH_EN 0x80
25#define BCSR7_UCC1_RGMII_EN 0x40
26#define BCSR7_UCC1_RTBI_EN 0x20
27#define BCSR7_GETHRST_MRVL 0x04
28#define BCSR7_BRD_WRT_PROTECT 0x02
29
30#define BCSR8_UCC2_GETH_EN 0x80
31#define BCSR8_UCC2_RGMII_EN 0x40
32#define BCSR8_UCC2_RTBI_EN 0x20
33#define BCSR8_UEM_MARVEL_RESET 0x02
34
35#define BCSR9_UCC3_GETH_EN 0x80
36#define BCSR9_UCC3_RGMII_EN 0x40
37#define BCSR9_UCC3_RTBI_EN 0x20
38#define BCSR9_UCC3_RMII_EN 0x10
39#define BCSR9_UCC3_UEM_MICREL 0x01
40
41#define BCSR10_UCC4_GETH_EN 0x80
42#define BCSR10_UCC4_RGMII_EN 0x40
43#define BCSR10_UCC4_RTBI_EN 0x20
44
45#define BCSR11_LED0 0x40
46#define BCSR11_LED1 0x20
47#define BCSR11_LED2 0x10
48
49#define BCSR12_UCC6_RMII_EN 0x20
50#define BCSR12_UCC8_RMII_EN 0x20
51
52#define BCSR15_SMII6_DIS 0x08
53#define BCSR15_SMII8_DIS 0x04
Anton Vorontsov0a154a02009-10-15 17:47:13 +040054#define BCSR15_QEUART_EN 0x01
Haiying Wangbd255372009-03-27 17:02:45 -040055
56#define BCSR16_UPC1_DEV2 0x02
57
Anton Vorontsovd8e75822009-10-15 17:47:16 +040058#define BCSR17_nUSBEN 0x80
59#define BCSR17_nUSBLOWSPD 0x40
60#define BCSR17_USBVCC 0x20
61#define BCSR17_USBMODE 0x10
Haiying Wangbd255372009-03-27 17:02:45 -040062#define BCSR17_FLASH_nWP 0x01
63
64/*BCSR Utils functions*/
65
66void enable_8569mds_flash_write(void);
67void disable_8569mds_flash_write(void);
Haiying Wangbc759ee2009-05-20 12:30:37 -040068void enable_8569mds_qe_uec(void);
Haiying Wangbd255372009-03-27 17:02:45 -040069void disable_8569mds_brd_eeprom_write_protect(void);
70
71#endif /* __BCSR_H_ */