1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (c) 2014-2015 Hisilicon Limited.
4  */
5 
6 #ifndef _HNS_DSAF_MISC_H
7 #define _HNS_DSAF_MISC_H
8 
9 #include <linux/of.h>
10 #include <linux/of_address.h>
11 #include <linux/platform_device.h>
12 
13 #include "hns_dsaf_mac.h"
14 
15 #define CPLD_ADDR_PORT_OFFSET	0x4
16 
17 #define HS_LED_ON		0xE
18 #define HS_LED_OFF		0xF
19 
20 #define CPLD_LED_ON_VALUE	1
21 #define CPLD_LED_DEFAULT_VALUE	0
22 
23 #define MAC_SFP_PORT_OFFSET	0x2
24 
25 #define DSAF_LED_SPEED_S 0
26 #define DSAF_LED_SPEED_M (0x3 << DSAF_LED_SPEED_S)
27 
28 #define DSAF_LED_LINK_B 2
29 #define DSAF_LED_DATA_B 4
30 #define DSAF_LED_ANCHOR_B 5
31 
32 struct dsaf_misc_op *hns_misc_op_get(struct dsaf_device *dsaf_dev);
33 struct
34 platform_device *hns_dsaf_find_platform_device(struct fwnode_handle *fwnode);
35 #endif
36