Loading...
1/*
2 * Copyright (C) 2013 Red Hat
3 * Author: Rob Clark <robdclark@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "hdmi.h"
19
20static void hdmi_phy_8960_powerup(struct hdmi_phy *phy,
21 unsigned long int pixclock)
22{
23 DBG("pixclock: %lu", pixclock);
24
25 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG2, 0x00);
26 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG0, 0x1b);
27 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG1, 0xf2);
28 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG4, 0x00);
29 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG5, 0x00);
30 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG6, 0x00);
31 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG7, 0x00);
32 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG8, 0x00);
33 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG9, 0x00);
34 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG10, 0x00);
35 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG11, 0x00);
36 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG3, 0x20);
37}
38
39static void hdmi_phy_8960_powerdown(struct hdmi_phy *phy)
40{
41 DBG("");
42
43 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG2, 0x7f);
44}
45
46static const char * const hdmi_phy_8960_reg_names[] = {
47 "core-vdda",
48};
49
50static const char * const hdmi_phy_8960_clk_names[] = {
51 "slave_iface",
52};
53
54const struct hdmi_phy_cfg msm_hdmi_phy_8960_cfg = {
55 .type = MSM_HDMI_PHY_8960,
56 .powerup = hdmi_phy_8960_powerup,
57 .powerdown = hdmi_phy_8960_powerdown,
58 .reg_names = hdmi_phy_8960_reg_names,
59 .num_regs = ARRAY_SIZE(hdmi_phy_8960_reg_names),
60 .clk_names = hdmi_phy_8960_clk_names,
61 .num_clks = ARRAY_SIZE(hdmi_phy_8960_clk_names),
62};
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2013 Red Hat
4 * Author: Rob Clark <robdclark@gmail.com>
5 */
6
7#include "hdmi.h"
8
9static void hdmi_phy_8960_powerup(struct hdmi_phy *phy,
10 unsigned long int pixclock)
11{
12 DBG("pixclock: %lu", pixclock);
13
14 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG2, 0x00);
15 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG0, 0x1b);
16 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG1, 0xf2);
17 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG4, 0x00);
18 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG5, 0x00);
19 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG6, 0x00);
20 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG7, 0x00);
21 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG8, 0x00);
22 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG9, 0x00);
23 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG10, 0x00);
24 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG11, 0x00);
25 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG3, 0x20);
26}
27
28static void hdmi_phy_8960_powerdown(struct hdmi_phy *phy)
29{
30 DBG("");
31
32 hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG2, 0x7f);
33}
34
35static const char * const hdmi_phy_8960_reg_names[] = {
36 "core-vdda",
37};
38
39static const char * const hdmi_phy_8960_clk_names[] = {
40 "slave_iface",
41};
42
43const struct hdmi_phy_cfg msm_hdmi_phy_8960_cfg = {
44 .type = MSM_HDMI_PHY_8960,
45 .powerup = hdmi_phy_8960_powerup,
46 .powerdown = hdmi_phy_8960_powerdown,
47 .reg_names = hdmi_phy_8960_reg_names,
48 .num_regs = ARRAY_SIZE(hdmi_phy_8960_reg_names),
49 .clk_names = hdmi_phy_8960_clk_names,
50 .num_clks = ARRAY_SIZE(hdmi_phy_8960_clk_names),
51};