• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * include/linux/amlogic/media/vout/hdmi_tx/hdmi_config.h
3  *
4  * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  */
17 
18 #ifndef __PLAT_MESON_HDMI_CONFIG_H
19 #define __PLAT_MESON_HDMI_CONFIG_H
20 
21 struct hdmi_phy_set_data {
22 	unsigned long freq;
23 	unsigned long addr;
24 	unsigned long data;
25 };
26 
27 struct vendor_info_data {
28 	unsigned char *vendor_name; /* Max Chars: 8 */
29 	/* vendor_id, 3 Bytes, Refer to
30 	 * http://standards.ieee.org/develop/regauth/oui/oui.txt
31 	 */
32 	unsigned char *product_desc; /* Max Chars: 16 */
33 	unsigned char *cec_osd_string; /* Max Chars: 14 */
34 	unsigned int cec_config; /* 4 bytes: use to control cec switch on/off */
35 	unsigned int vendor_id;
36 };
37 
38 enum pwr_type {
39 	NONE = 0, CPU_GPO = 1, PMU,
40 };
41 
42 struct pwr_cpu_gpo {
43 	unsigned int pin;
44 	unsigned int val;
45 };
46 
47 struct pwr_pmu {
48 	unsigned int pin;
49 	unsigned int val;
50 };
51 
52 struct pwr_ctl_var {
53 	enum pwr_type type;
54 	union {
55 		struct pwr_cpu_gpo gpo;
56 		struct pwr_pmu pmu;
57 	} var;
58 };
59 
60 struct hdmi_pwr_ctl {
61 	struct pwr_ctl_var pwr_5v_on;
62 	struct pwr_ctl_var pwr_5v_off;
63 	struct pwr_ctl_var pwr_3v3_on;
64 	struct pwr_ctl_var pwr_3v3_off;
65 	struct pwr_ctl_var pwr_hpll_vdd_on;
66 	struct pwr_ctl_var pwr_hpll_vdd_off;
67 	int pwr_level;
68 };
69 
70 struct hdmi_config_platform_data {
71 	void (*hdmi_sspll_ctrl)(unsigned int level); /* SSPLL control level */
72 	/* For some boards, HDMI PHY setting may diff from ref board. */
73 	struct hdmi_phy_set_data *phy_data;
74 	struct vendor_info_data *vend_data;
75 	struct hdmi_pwr_ctl *pwr_ctl;
76 };
77 
78 #endif /* __PLAT_MESON_HDMI_CONFIG_H */
79