xref: /linux/drivers/gpu/drm/verisilicon/vs_hwdb.h (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
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 
6*dbf21777SIcenowy Zheng #ifndef _VS_HWDB_H_
7*dbf21777SIcenowy Zheng #define _VS_HWDB_H_
8*dbf21777SIcenowy Zheng 
9*dbf21777SIcenowy Zheng #include <linux/regmap.h>
10*dbf21777SIcenowy Zheng #include <linux/types.h>
11*dbf21777SIcenowy Zheng 
12*dbf21777SIcenowy Zheng struct vs_formats {
13*dbf21777SIcenowy Zheng 	const u32 *array;
14*dbf21777SIcenowy Zheng 	unsigned int num;
15*dbf21777SIcenowy Zheng };
16*dbf21777SIcenowy Zheng 
17*dbf21777SIcenowy Zheng struct vs_chip_identity {
18*dbf21777SIcenowy Zheng 	u32 model;
19*dbf21777SIcenowy Zheng 	u32 revision;
20*dbf21777SIcenowy Zheng 	u32 customer_id;
21*dbf21777SIcenowy Zheng 
22*dbf21777SIcenowy Zheng 	u32 display_count;
23*dbf21777SIcenowy Zheng 	const struct vs_formats *formats;
24*dbf21777SIcenowy Zheng };
25*dbf21777SIcenowy Zheng 
26*dbf21777SIcenowy Zheng int vs_fill_chip_identity(struct regmap *regs,
27*dbf21777SIcenowy Zheng 			  struct vs_chip_identity *ident);
28*dbf21777SIcenowy Zheng 
29*dbf21777SIcenowy Zheng #endif /* _VS_HWDB_H_ */
30