xref: /linux/drivers/gpu/drm/verisilicon/vs_dc.h (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2025 Icenowy Zheng <uwu@icenowy.me>
4  *
5  * Based on vs_dc_hw.h, which is:
6  *   Copyright (C) 2023 VeriSilicon Holdings Co., Ltd.
7  */
8 
9 #ifndef _VS_DC_H_
10 #define _VS_DC_H_
11 
12 #include <linux/clk.h>
13 #include <linux/regmap.h>
14 #include <linux/reset.h>
15 
16 #include <drm/drm_device.h>
17 
18 #include "vs_hwdb.h"
19 
20 #define VSDC_MAX_OUTPUTS 2
21 #define VSDC_RESET_COUNT 3
22 
23 struct vs_drm_dev;
24 struct vs_crtc;
25 
26 struct vs_dc {
27 	struct regmap *regs;
28 	struct clk *core_clk;
29 	struct clk *axi_clk;
30 	struct clk *ahb_clk;
31 	struct clk *pix_clk[VSDC_MAX_OUTPUTS];
32 	struct reset_control_bulk_data rsts[VSDC_RESET_COUNT];
33 
34 	struct vs_drm_dev *drm_dev;
35 	struct vs_chip_identity identity;
36 };
37 
38 #endif /* _VS_DC_H_ */
39