1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2009 Freescale Semiconductor, Inc.
4  */
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
19 #define BCSR6_SD_CARD_1BIT	0x08
20 #define BCSR6_SD_CARD_4BITS	0x04
21 #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
54 #define BCSR15_QEUART_EN	0x01
55 
56 #define BCSR16_UPC1_DEV2	0x02
57 
58 #define BCSR17_nUSBEN		0x80
59 #define BCSR17_nUSBLOWSPD	0x40
60 #define BCSR17_USBVCC		0x20
61 #define BCSR17_USBMODE		0x10
62 #define BCSR17_FLASH_nWP	0x01
63 
64 /*BCSR Utils functions*/
65 
66 void enable_8569mds_flash_write(void);
67 void disable_8569mds_flash_write(void);
68 void enable_8569mds_qe_uec(void);
69 void disable_8569mds_brd_eeprom_write_protect(void);
70 
71 #endif	/* __BCSR_H_ */
72