xref: /linux/drivers/media/platform/qcom/camss/camss-vfe-vbif.c (revision 84318277d6334c6981ab326d4acc87c6a6ddc9b8)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * camss-vfe-vbif.c
4  *
5  * Qualcomm MSM Camera Subsystem - VFE VBIF Module
6  *
7  * Copyright (c) 2025, The Linux Foundation. All rights reserved.
8  *
9  */
10 
11 #include <linux/io.h>
12 
13 #include "camss.h"
14 #include "camss-vfe.h"
15 #include "camss-vfe-vbif.h"
16 
17 #define VBIF_FIXED_SORT_EN	0x30
18 #define VBIF_FIXED_SORT_SEL0	0x34
19 
20 void vfe_vbif_write_reg(struct vfe_device *vfe, u32 reg, u32 val)
21 {
22 	writel_relaxed(val, vfe->vbif_base + reg);
23 }
24 
25 int vfe_vbif_apply_settings(struct vfe_device *vfe)
26 {
27 	vfe_vbif_write_reg(vfe, VBIF_FIXED_SORT_EN, 0xfff);
28 	vfe_vbif_write_reg(vfe, VBIF_FIXED_SORT_SEL0, 0x555000);
29 
30 	return 0;
31 }
32