blob: 2f2c92bbb5053fc0b84541c5f8a4293e273a63c4 [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2019 MediaTek Inc.
4 * Author: Ming-Fan Chen <ming-fan.chen@mediatek.com>
5 */
6
7
8#ifndef __DT_BINDINGS_INTERCONNECT_MTK_MMQOS_H
9#define __DT_BINDINGS_INTERCONNECT_MTK_MMQOS_H
10
11#define MTK_MMQOS_MAX_BW (0x10000000)
12
13#define MTK_MMQOS_NODE_COMMON (0x1)
14#define MTK_MMQOS_NODE_COMMON_PORT (0x2)
15#define MTK_MMQOS_NODE_LARB (0x3)
16#define MTK_MMQOS_NODE_LARB_PORT (0x4)
17
18
19#define SLAVE_COMMON(common) \
20 ((MTK_MMQOS_NODE_COMMON << 16) | ((common) & 0xffff))
21#define MASTER_COMMON_PORT(common, port) \
22 ((MTK_MMQOS_NODE_COMMON_PORT << 16) | \
23 (((common) & 0xff) << 8) | ((port) & 0xff))
24
25#define SLAVE_LARB(larb) \
26 ((MTK_MMQOS_NODE_LARB << 16) | ((larb) & 0xffff))
27#define MASTER_LARB_PORT(port) \
28 ((MTK_MMQOS_NODE_LARB_PORT << 16) | ((port) & 0xffff))
29
30#endif