123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680 |
- #ifndef _DW_HDMI_PHY_GEN2_H_
- #define _DW_HDMI_PHY_GEN2_H_
- #include <linux/bits.h>
- #include <linux/bitfield.h>
- #include <linux/kernel.h>
- #include <drm/bridge/dw_hdmi.h>
- /* PHY registers */
- #define DW_HDMI_TX_PHY_GEN2_PWRCTRL 0x00
- #define DW_HDMI_TX_PHY_GEN2_SERDIVCTRL 0x01
- #define DW_HDMI_TX_PHY_GEN2_SERCKCTRL 0x02
- #define DW_HDMI_TX_PHY_GEN2_SERCKKILLCTRL 0x03
- #define DW_HDMI_TX_PHY_GEN2_TXRESCALCTRL 0x04
- #define DW_HDMI_TX_PHY_GEN2_OPMODE_PLLCFG 0x06
- #define DW_HDMI_TX_PHY_GEN2_TXCKMEASCTRL 0x07
- #define DW_HDMI_TX_PHY_GEN2_TXMEASCTRL 0x08
- #define DW_HDMI_TX_PHY_GEN2_CKSYMTXCTRL 0x09
- #define DW_HDMI_TX_PHY_GEN2_CMPSEQCTRL 0x0A
- #define DW_HDMI_TX_PHY_GEN2_CMPPWRCTRL 0x0B
- #define DW_HDMI_TX_PHY_GEN2_CMPMODECTRL 0x0C
- #define DW_HDMI_TX_PHY_GEN2_MEASCTRL 0x0D
- #define DW_HDMI_TX_PHY_GEN2_VLEVCTRL_PLLMEASCTRL 0x0E
- #define DW_HDMI_TX_PHY_GEN2_D2ACTRL 0x0F
- #define DW_HDMI_TX_PHY_GEN2_PLLCURRGMPCTRL 0x10
- #define DW_HDMI_TX_PHY_GEN2_PLLDIVCTRL 0x11
- #define DW_HDMI_TX_PHY_GEN2_SUPPLLBGCTRL 0x12
- #define DW_HDMI_TX_PHY_GEN2_PLLCONFCTRL 0x13
- #define DW_HDMI_TX_PHY_GEN2_PLLCTRL 0x14
- #define DW_HDMI_TX_PHY_GEN2_PLLDIGTESTCTRL 0x15
- #define DW_HDMI_TX_PHY_GEN2_PLLMEASCTRL 0x16
- #define DW_HDMI_TX_PHY_GEN2_PLLCLKBISTPHASE 0x17
- #define DW_HDMI_TX_PHY_GEN2_COMPRCAL 0x18
- #define DW_HDMI_TX_PHY_GEN2_TXTERM 0x19
- #define DW_HDMI_TX_PHY_GEN2_PWRSEQ_PATGENSKIP 0x1A
- #define DW_HDMI_TX_PHY_GEN2_PATTERNGEN_BISTSEL 0x1B
- #define DW_HDMI_TX_PHY_GEN2_CTRL_CLKALIGN_PGMODE_BISTPG 0x1C
- #define DW_HDMI_TX_PHY_GEN2_BISTCHSTATUS_CLKALIGN_RCAL 0x1D
- #define DW_HDMI_TX_PHY_GEN2_DIGTXMODE 0x1E
- #define DW_HDMI_TX_PHY_GEN2_CLKALIGN_RCAL_SOFTRESET 0x1F
- #define DW_HDMI_TX_PHY_GEN2_PWRSEQ_PATGENSKIP_RD 0x2E
- #define DW_HDMI_TX_PHY_GEN2_PLLCLKBISTPHASE_RD 0x2F
- #define DW_HDMI_TX_PHY_GEN2_PLLSTATUS 0x30
- #define DW_HDMI_TX_PHY_GEN2_SUPPLLBGSTATUS 0x31
- #define DW_HDMI_TX_PHY_GEN2_D2ASTATUS 0x32
- #define DW_HDMI_TX_PHY_GEN2_CMPMODESTATUS 0x33
- #define DW_HDMI_TX_PHY_GEN2_CMPPWRSTATUS 0x34
- #define DW_HDMI_TX_PHY_GEN2_CMPSEQSTATUS 0x35
- #define DW_HDMI_TX_PHY_GEN2_CKSYMTXSTATUS 0x36
- #define DW_HDMI_TX_PHY_GEN2_TXRESCALSTATUS 0x37
- #define DW_HDMI_TX_PHY_GEN2_SERCKKILLSTATUS 0x38
- #define DW_HDMI_TX_PHY_GEN2_SERCKSTATUS 0x39
- #define DW_HDMI_TX_PHY_GEN2_SERDIVSTATUS 0x3A
- #define DW_HDMI_TX_PHY_GEN2_PWRSTATUS 0x3B
- /* PHY register bitfields */
- #define PWRCTRL_OVERRIDE_0 BIT(15)
- #define PWRCTRL_BIAS_ON BIT(5)
- #define PWRCTRL_TX_PWRON BIT(4)
- #define PWRCTRL_TX_PWRON0 BIT(3)
- #define PWRCTRL_TX_PWRON1 BIT(2)
- #define PWRCTRL_TX_PWRON2 BIT(1)
- #define PWRCTRL_CK_PWRON BIT(0)
- #define OPMODE_PLLCFG_PREP_DIV GENMASK(13, 12)
- #define OPMODE_PLLCFG_MPLL_CKO_DIV GENMASK(10, 9)
- #define OPMODE_PLLCFG_OPMODE GENMASK( 7, 6)
- #define OPMODE_PLLCFG_REF_CNTRL GENMASK( 4, 3)
- #define OPMODE_PLLCFG_MPLL_N_CNTRL GENMASK( 1, 0)
- #define CKSYMTXCTRL_OVERRIDE_5 BIT(15)
- #define CKSYMTXCTRL_SLOPE_BOOST GENMASK(13, 10)
- #define CKSYMTXCTRL_TX_TRAON BIT(9)
- #define CKSYMTXCTRL_TX_TRBON BIT(8)
- #define CKSYMTXCTRL_TX_SYMON GENMASK( 7, 4)
- #define CKSYMTXCTRL_CK_SYMON GENMASK( 3, 0)
- #define VLEVCTRL_PLLMEASCTRL_MPLL_MEAS_17_14 GENMASK(13, 10)
- #define VLEVCTRL_PLLMEASCTRL_SUP_TX_LVL GENMASK( 9, 5)
- #define PLLCURRGMPCTRL_MPLL_GMP_CNTRL GENMASK(13, 12)
- #define PLLCURRGMPCTRL_MPLL_PROP_CNTRL GENMASK(11, 6)
- #define PLLCURRGMPCTRL_MPLL_INT_CNTRL GENMASK( 5, 0)
- #define PLLDIVCTRL_VCO_CNTRL GENMASK(12, 9)
- #define PLLDIVCTRL_MPLL_MULTIPLIER GENMASK( 7, 0)
- #define TXTERM_D_TX_TERM GENMASK( 2, 0)
- #define TXTERM_50_OHM 0x0
- #define TXTERM_57_14_OHM 0x1
- #define TXTERM_66_67_OHM 0x2
- #define TXTERM_80_OHM 0x3
- #define TXTERM_100_OHM 0x4
- #define TXTERM_133_33_OHM 0x5
- #define TXTERM_200_OHM 0x6
- #define TXTERM_OPEN_CIRCUIT 0x7
- #define OPMODE_HDMI_14 0
- #define OPMODE_HDMI_20 1
- struct dw_hdmi_mpll_gen_config{
- u64 pixelclock; /* in kHz */
- u8 colordepth;
- u16 opmode:2;
- struct {
- u16 prep_div:2;
- u16 mpll_cko_div:2;
- u16 ref_cntrl:2;
- u16 mpll_n_cntrl:2;
- u16 vco_cntrl:4;
- u16 mpll_multiplier:8;
- } divider;
- struct {
- u16 gmp_cntrl:2;
- u16 prop_cntrl:6;
- u16 int_cntrl:6;
- } charge_pump;
- struct {
- u16 txterm:3;
- u16 sup_txlvl:5;
- u16 tx_traon:1;
- u16 tx_trbon:1;
- u16 tx_symon:4;
- u16 ck_symon:4;
- } voltage;
- };
- static const struct dw_hdmi_mpll_gen_config mpll_configs[] = {
- {
- .pixelclock = 25175,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x3, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 27000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x3, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 31500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x3, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 33750,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x3, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 35500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x3, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 36000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x1, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x5, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 40000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x1, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x5, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 44900,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x3, .vco_cntrl = 0x1, .mpll_multiplier = 0x28, },
- .charge_pump = { .gmp_cntrl = 0x0, .prop_cntrl = 0xa, .int_cntrl = 0x5, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 49500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 50000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 50350,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 54000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 56250,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 59400,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 65000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 68250,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 71000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x3, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x6, .int_cntrl = 0x3, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 72000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 73250,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 74250,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 75000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 78750,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 79500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 82500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 83500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 85500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 88750,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 90000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x2, .vco_cntrl = 0x1, .mpll_multiplier = 0x14, },
- .charge_pump = { .gmp_cntrl = 0x1, .prop_cntrl = 0x5, .int_cntrl = 0x2, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 94500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 99000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 100700,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 101000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 102250,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 106500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 108000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 115500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 117500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 118800,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 119000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 121750,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x3, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x3, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 148500,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x1, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x2, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 154000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x1, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x2, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 162000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x1, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x2, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 165000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x1, .vco_cntrl = 0x1, .mpll_multiplier = 0xa, },
- .charge_pump = { .gmp_cntrl = 0x2, .prop_cntrl = 0x2, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_OPEN_CIRCUIT, .sup_txlvl = 0xd, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0x8, .ck_symon = 0x8, },
- }, {
- .pixelclock = 185625,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x0, .vco_cntrl = 0x3, .mpll_multiplier = 0x5, },
- .charge_pump = { .gmp_cntrl = 0x3, .prop_cntrl = 0x1, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_100_OHM, .sup_txlvl = 0x9, .tx_traon = 0x1,
- .tx_trbon = 0x1, .tx_symon = 0xc, .ck_symon = 0x8, },
- }, {
- .pixelclock = 198000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x0, .vco_cntrl = 0x3, .mpll_multiplier = 0x5, },
- .charge_pump = { .gmp_cntrl = 0x3, .prop_cntrl = 0x1, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_100_OHM, .sup_txlvl = 0x9, .tx_traon = 0x1,
- .tx_trbon = 0x1, .tx_symon = 0xc, .ck_symon = 0x8, },
- }, {
- .pixelclock = 297000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_14,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x0, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x0, .vco_cntrl = 0x1, .mpll_multiplier = 0x5, },
- .charge_pump = { .gmp_cntrl = 0x3, .prop_cntrl = 0x1, .int_cntrl = 0x1, },
- .voltage = { .txterm = TXTERM_133_33_OHM, .sup_txlvl = 0x10, .tx_traon = 0x0,
- .tx_trbon = 0x1, .tx_symon = 0xd, .ck_symon = 0xc, },
- }, {
- .pixelclock = 371250,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_20,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x3, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x0, .vco_cntrl = 0x1, .mpll_multiplier = 0x5, },
- .charge_pump = { .gmp_cntrl = 0x3, .prop_cntrl = 0x1, .int_cntrl = 0x1, },
- .voltage = { .txterm = TXTERM_50_OHM, .sup_txlvl = 0xa, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0xf, .ck_symon = 0x6, },
- }, {
- .pixelclock = 495000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_20,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x3, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x0, .vco_cntrl = 0x0, .mpll_multiplier = 0x5, },
- .charge_pump = { .gmp_cntrl = 0x3, .prop_cntrl = 0x2, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_50_OHM, .sup_txlvl = 0xa, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0xf, .ck_symon = 0x6, },
- }, {
- .pixelclock = 594000,
- .colordepth = 8,
- .opmode = OPMODE_HDMI_20,
- .divider = { .prep_div = 0x0, .mpll_cko_div = 0x3, .ref_cntrl = 0x0,
- .mpll_n_cntrl = 0x0, .vco_cntrl = 0x0, .mpll_multiplier = 0x5, },
- .charge_pump = { .gmp_cntrl = 0x3, .prop_cntrl = 0x2, .int_cntrl = 0x0, },
- .voltage = { .txterm = TXTERM_100_OHM, .sup_txlvl = 0xf, .tx_traon = 0x0,
- .tx_trbon = 0x0, .tx_symon = 0xf, .ck_symon = 0xa, },
- },
- };
- static enum drm_mode_status
- dw_hdmi_tx_phy_gen2_mode_valid(struct dw_hdmi *dw_hdmi, void *data,
- const struct drm_display_info *info,
- const struct drm_display_mode *mode)
- {
- int i;
- if (mode->clock < 13500)
- return MODE_CLOCK_LOW;
- else if (mode->clock > 594000)
- return MODE_CLOCK_HIGH;
- for (i = 0; i < ARRAY_SIZE(mpll_configs); i++) {
- if (abs(mode->clock - mpll_configs[i].pixelclock) <= 100)
- return MODE_OK;
- else if (mode->clock < mpll_configs[i].pixelclock)
- break;
- }
- return MODE_NOMODE;
- }
- static int dw_hdmi_tx_phy_gen2_configure(struct dw_hdmi *hdmi, void *data,
- unsigned long mpixelclock)
- {
- int i;
- u16 opmode_pllcfg, pllcurrgmpctrl, plldivctrl;
- u16 txterm, vlevctrl_pllmeasctrl, cksymtxctrl;
- u64 pixclk = mpixelclock / 1000;
- const struct dw_hdmi_mpll_gen_config *config;
- for (i = 0; i < ARRAY_SIZE(mpll_configs); i++) {
- config = &mpll_configs[i];
- /* TODO: add colordepth check later */
- if (abs(config->pixelclock - pixclk) <= 100)
- break;
- }
- if (i == ARRAY_SIZE(mpll_configs))
- return -1;
- opmode_pllcfg = FIELD_PREP(OPMODE_PLLCFG_PREP_DIV, config->divider.prep_div) |
- FIELD_PREP(OPMODE_PLLCFG_MPLL_CKO_DIV, config->divider.mpll_cko_div) |
- FIELD_PREP(OPMODE_PLLCFG_OPMODE, config->opmode) |
- FIELD_PREP(OPMODE_PLLCFG_REF_CNTRL, config->divider.ref_cntrl) |
- FIELD_PREP(OPMODE_PLLCFG_MPLL_N_CNTRL, config->divider.mpll_n_cntrl);
- dw_hdmi_phy_i2c_write(
- hdmi,
- opmode_pllcfg,
- DW_HDMI_TX_PHY_GEN2_OPMODE_PLLCFG
- );
- pllcurrgmpctrl = FIELD_PREP(PLLCURRGMPCTRL_MPLL_GMP_CNTRL, config->charge_pump.gmp_cntrl) |
- FIELD_PREP(PLLCURRGMPCTRL_MPLL_PROP_CNTRL, config->charge_pump.prop_cntrl) |
- FIELD_PREP(PLLCURRGMPCTRL_MPLL_INT_CNTRL, config->charge_pump.int_cntrl);
- dw_hdmi_phy_i2c_write(
- hdmi,
- pllcurrgmpctrl,
- DW_HDMI_TX_PHY_GEN2_PLLCURRGMPCTRL
- );
- plldivctrl = FIELD_PREP(PLLDIVCTRL_VCO_CNTRL, config->divider.vco_cntrl) |
- FIELD_PREP(PLLDIVCTRL_MPLL_MULTIPLIER, config->divider.mpll_multiplier);
- dw_hdmi_phy_i2c_write(
- hdmi,
- plldivctrl,
- DW_HDMI_TX_PHY_GEN2_PLLDIVCTRL
- );
- txterm = FIELD_PREP(TXTERM_D_TX_TERM, config->voltage.txterm);
- dw_hdmi_phy_i2c_write(
- hdmi,
- txterm,
- DW_HDMI_TX_PHY_GEN2_TXTERM
- );
- vlevctrl_pllmeasctrl = FIELD_PREP(VLEVCTRL_PLLMEASCTRL_SUP_TX_LVL, config->voltage.sup_txlvl);
- dw_hdmi_phy_i2c_write(
- hdmi,
- vlevctrl_pllmeasctrl,
- DW_HDMI_TX_PHY_GEN2_VLEVCTRL_PLLMEASCTRL
- );
- cksymtxctrl = FIELD_PREP(CKSYMTXCTRL_OVERRIDE_5, 0x1) |
- FIELD_PREP(CKSYMTXCTRL_TX_TRAON, config->voltage.tx_traon) |
- FIELD_PREP(CKSYMTXCTRL_TX_TRBON, config->voltage.tx_trbon) |
- FIELD_PREP(CKSYMTXCTRL_TX_SYMON, config->voltage.tx_symon) |
- FIELD_PREP(CKSYMTXCTRL_CK_SYMON, config->voltage.ck_symon);
- dw_hdmi_phy_i2c_write(
- hdmi,
- cksymtxctrl,
- DW_HDMI_TX_PHY_GEN2_CKSYMTXCTRL
- );
- return 0;
- }
- #endif
|