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