Lines Matching +full:0 +full:x7
79 #define CONNECT_NO_CHANGE 0
81 #define IN_HOST_MODE 0x10
82 #define IN_DEVICE_MODE 0x20
86 #define IN_DETACH 0
87 #define TO_DETACH 0
90 #define AT_CC2 0
106 #define USB_TYPEC_CTRL_CC1_0 0x0
107 #define USB_TYPEC_CTRL_CC1_1 0x4
108 #define USB_TYPEC_CTRL_CC2_0 0x8
109 #define USB_TYPEC_CTRL_CC2_1 0xC
110 #define USB_TYPEC_STS 0x10
111 #define USB_TYPEC_CTRL 0x14
112 #define USB_DBUS_PWR_CTRL 0x18
114 #define ENABLE_CC1 0x1
115 #define ENABLE_CC2 0x2
116 #define DISABLE_CC 0x0
121 #define CC_CODE_MASK (0xfffff << 7)
122 #define rp4pk_code(val) ((0x1f & (val)) << 22)
123 #define code_rp4pk(val) (((val) >> 22) & 0x1f)
124 #define rp36k_code(val) ((0x1f & (val)) << 17)
125 #define code_rp36k(val) (((val) >> 17) & 0x1f)
126 #define rp12k_code(val) ((0x1f & (val)) << 12)
127 #define code_rp12k(val) (((val) >> 12) & 0x1f)
128 #define rd_code(val) ((0x1f & (val)) << 7)
129 #define code_rd(val) (((val) >> 7) & 0x1f)
130 #define dfp_mode(val) ((0x3 & (val)) << 5)
135 #define EN_CC_DET BIT(0)
137 #define CC_MODE_UFP 0x0
138 #define CC_MODE_DFP_USB 0x1
139 #define CC_MODE_DFP_1_5 0x2
140 #define CC_MODE_DFP_3_0 0x3
155 PARAMETER_V0 = 0,
160 #define V0_vref_2p6v(val) ((0xf & (val)) << 26) /* Bit 29 for groot */
161 #define V0_vref_1p23v(val) ((0xf & (val)) << 22)
162 #define V0_vref_0p8v(val) ((0xf & (val)) << 18)
163 #define V0_vref_0p66v(val) ((0xf & (val)) << 14)
164 #define V0_vref_0p4v(val) ((0x7 & (val)) << 11)
165 #define V0_vref_0p2v(val) ((0x7 & (val)) << 8)
166 #define V0_vref_1_1p6v(val) ((0xf & (val)) << 4)
167 #define V0_vref_0_1p6v(val) ((0xf & (val)) << 0)
169 #define V0_decode_2p6v(val) (((val) >> 26) & 0xf) /* Bit 29 for groot */
170 #define V0_decode_1p23v(val) (((val) >> 22) & 0xf)
171 #define V0_decode_0p8v(val) (((val) >> 18) & 0xf)
172 #define V0_decode_0p66v(val) (((val) >> 14) & 0xf)
173 #define V0_decode_0p4v(val) (((val) >> 11) & 0x7)
174 #define V0_decode_0p2v(val) (((val) >> 8) & 0x7)
175 #define V0_decode_1_1p6v(val) (((val) >> 4) & 0xf)
176 #define V0_decode_0_1p6v(val) (((val) >> 0) & 0xf)
179 #define V1_vref_2p6v(val) ((0xf & (val)) << 28)
180 #define V1_vref_1p23v(val) ((0xf & (val)) << 24)
181 #define V1_vref_0p8v(val) ((0xf & (val)) << 20)
182 #define V1_vref_0p66v(val) ((0xf & (val)) << 16)
183 #define V1_vref_0p4v(val) ((0xf & (val)) << 12)
184 #define V1_vref_0p2v(val) ((0xf & (val)) << 8)
185 #define V1_vref_1_1p6v(val) ((0xf & (val)) << 4)
186 #define V1_vref_0_1p6v(val) ((0xf & (val)) << 0)
188 #define V1_decode_2p6v(val) (((val) >> 28) & 0xf)
189 #define V1_decode_1p23v(val) (((val) >> 24) & 0xf)
190 #define V1_decode_0p8v(val) (((val) >> 20) & 0xf)
191 #define V1_decode_0p66v(val) (((val) >> 16) & 0xf)
192 #define V1_decode_0p4v(val) (((val) >> 12) & 0xf)
193 #define V1_decode_0p2v(val) (((val) >> 8) & 0xf)
194 #define V1_decode_1_1p6v(val) (((val) >> 4) & 0xf)
195 #define V1_decode_0_1p6v(val) (((val) >> 0) & 0xf)
198 #define DET_STS 0x7
201 #define DET_STS_RA 0x1
202 #define DET_STS_RD 0x3
203 #define DET_STS_RP 0x1
216 #define DEBOUNCE_TIME_MASK 0xff
217 #define DEBOUNCE_EN BIT(0)
264 dev_err(type_c->dev, "%s: Error cc setting cc=0x%x\n", __func__, cc); in rtd129x_switch_type_c_plug_config()
272 dev_dbg(type_c->dev, "%s: cc=0x%x val_cc=0x%x usb_typec_ctrl_cc1_0=0x%x\n", in rtd129x_switch_type_c_plug_config()
275 return 0; in rtd129x_switch_type_c_plug_config()
281 int ret = 0; in switch_type_c_plug_config()
286 if (ret < 0) in switch_type_c_plug_config()
377 return 0; in connector_attached()
386 switch_type_c_dr_mode(type_c, 0, cc); in connector_detached()
390 return 0; in connector_detached()
399 u32 cc1_switch = 0; in __detect_host_device()
435 return 0; in __detect_host_device()
458 return 0; in host_device_switch_detection()
478 dev_dbg(dev, "IN host mode and cc1 device detach (cc_status=0x%x)", in detect_type_c_state()
484 dev_dbg(dev, "IN host mode and cc2 device detach (cc_status=0x%x)", in detect_type_c_state()
505 dev_warn(dev, "IN_HOST_MODE: cc_status (0x%x) != cc_status_check (0x%x)\n", in detect_type_c_state()
511 dev_dbg(dev, "IN host mode and cc1 device attach (cc_status=0x%x)", in detect_type_c_state()
517 dev_dbg(dev, "In host mode and cc2 device attach (cc_status=0x%x)", in detect_type_c_state()
532 …dev_dbg(dev, "IN_DEVICE_MODE: cc_status (0x%x) != cc_status_check (0x%x) maybe use a pd adapter\n", in detect_type_c_state()
539 dev_dbg(dev, "IN device mode and cc1 host disconnect (cc_status=0x%x)", in detect_type_c_state()
545 dev_dbg(dev, "IN device mode and cc2 host disconnect (cc_status=0x%x)", in detect_type_c_state()
553 if (cc_status_check != 0x0) { in detect_type_c_state()
567 dev_warn(dev, "IN_DEVICE_MODE: cc_status (0x%x) != cc_status_check (0x%x)\n", in detect_type_c_state()
573 dev_dbg(dev, "IN device mode and cc1 host connect (cc_status=0x%x)", in detect_type_c_state()
579 dev_dbg(dev, "IN device mode and cc2 host connect (cc_status=0x%x)", in detect_type_c_state()
595 return 0; in detect_type_c_state()
604 int connect_change = 0; in host_device_switch()
605 int cc_mode = 0; in host_device_switch()
606 int is_attach = 0; in host_device_switch()
607 int at_cc1 = 0; in host_device_switch()
650 dev_err(dev, "Error: IN unknown mode %d to %s at %s (cc_status=0x%x)\n", in host_device_switch()
654 dev_info(dev, "Connection change OK: IN %s mode to %s at %s (cc_status=0x%x)\n", in host_device_switch()
672 dev_dbg(dev, "%s: IN %s mode to %s (at %s interrupt) int_status=0x%x, cc_status=0x%x", in type_c_detect_irq()
683 schedule_delayed_work(&type_c->delayed_work, msecs_to_jiffies(0)); in type_c_detect_irq()
691 local_count = 0; in type_c_detect_irq()
716 switch_type_c_dr_mode(type_c, 0, DISABLE_CC); in type_c_port_dr_set()
718 return 0; in type_c_port_dr_set()
748 seq_printf(s, "dfp_mode_rp_en 0x%x\n", type_c->dfp_mode_rp_en); in type_c_parameter_show()
749 seq_printf(s, "ufp_mode_rd_en 0x%x\n", type_c->ufp_mode_rd_en); in type_c_parameter_show()
750 seq_printf(s, "cc1_code 0x%x\n", type_c->cc1_code); in type_c_parameter_show()
751 seq_printf(s, "cc2_code 0x%x\n", type_c->cc2_code); in type_c_parameter_show()
752 seq_printf(s, "cc1_vref 0x%x\n", type_c->cc1_vref); in type_c_parameter_show()
753 seq_printf(s, "cc2_vref 0x%x\n", type_c->cc2_vref); in type_c_parameter_show()
754 seq_printf(s, "debounce 0x%x\n", type_c->debounce); in type_c_parameter_show()
759 seq_printf(s, " rp_4p7k_code 0x%x\n", cc_param->rp_4p7k_code); in type_c_parameter_show()
760 seq_printf(s, " rp_36k_code 0x%x\n", cc_param->rp_36k_code); in type_c_parameter_show()
761 seq_printf(s, " rp_12k_code 0x%x\n", cc_param->rp_12k_code); in type_c_parameter_show()
762 seq_printf(s, " rd_code 0x%x\n", cc_param->rd_code); in type_c_parameter_show()
763 seq_printf(s, " vref_2p6v 0x%x\n", cc_param->vref_2p6v); in type_c_parameter_show()
764 seq_printf(s, " vref_1p23v 0x%x\n", cc_param->vref_1p23v); in type_c_parameter_show()
765 seq_printf(s, " vref_0p8v 0x%x\n", cc_param->vref_0p8v); in type_c_parameter_show()
766 seq_printf(s, " vref_0p66v 0x%x\n", cc_param->vref_0p66v); in type_c_parameter_show()
767 seq_printf(s, " vref_0p4v 0x%x\n", cc_param->vref_0p4v); in type_c_parameter_show()
768 seq_printf(s, " vref_0p2v 0x%x\n", cc_param->vref_0p2v); in type_c_parameter_show()
769 seq_printf(s, " vref_1_1p6v 0x%x\n", cc_param->vref_1_1p6v); in type_c_parameter_show()
770 seq_printf(s, " vref_0_1p6v 0x%x\n", cc_param->vref_0_1p6v); in type_c_parameter_show()
774 seq_printf(s, " rp_4p7k_code 0x%x\n", cc_param->rp_4p7k_code); in type_c_parameter_show()
775 seq_printf(s, " rp_36k_code 0x%x\n", cc_param->rp_36k_code); in type_c_parameter_show()
776 seq_printf(s, " rp_12k_code 0x%x\n", cc_param->rp_12k_code); in type_c_parameter_show()
777 seq_printf(s, " rd_code 0x%x\n", cc_param->rd_code); in type_c_parameter_show()
778 seq_printf(s, " vref_2p6v 0x%x\n", cc_param->vref_2p6v); in type_c_parameter_show()
779 seq_printf(s, " vref_1p23v 0x%x\n", cc_param->vref_1p23v); in type_c_parameter_show()
780 seq_printf(s, " vref_0p8v 0x%x\n", cc_param->vref_0p8v); in type_c_parameter_show()
781 seq_printf(s, " vref_0p66v 0x%x\n", cc_param->vref_0p66v); in type_c_parameter_show()
782 seq_printf(s, " vref_0p4v 0x%x\n", cc_param->vref_0p4v); in type_c_parameter_show()
783 seq_printf(s, " vref_0p2v 0x%x\n", cc_param->vref_0p2v); in type_c_parameter_show()
784 seq_printf(s, " vref_1_1p6v 0x%x\n", cc_param->vref_1_1p6v); in type_c_parameter_show()
785 seq_printf(s, " vref_0_1p6v 0x%x\n", cc_param->vref_0_1p6v); in type_c_parameter_show()
789 return 0; in type_c_parameter_show()
811 seq_printf(s, "In %s mode %s at %s (cc_status=0x%x)\n", in type_c_status_show()
816 seq_printf(s, "Read Register (type_c_ctrl_cc1_0=0x%x)\n", in type_c_status_show()
817 readl(type_c->reg_base + 0x0)); in type_c_status_show()
818 seq_printf(s, "Read Register (type_c_ctrl_cc1_1=0x%x)\n", in type_c_status_show()
819 readl(type_c->reg_base + 0x4)); in type_c_status_show()
820 seq_printf(s, "Read Register (type_c_ctrl_cc2_0=0x%x)\n", in type_c_status_show()
821 readl(type_c->reg_base + 0x8)); in type_c_status_show()
822 seq_printf(s, "Read Register (type_c_ctrl_cc2_1=0x%x)\n", in type_c_status_show()
823 readl(type_c->reg_base + 0xc)); in type_c_status_show()
824 seq_printf(s, "Read Register (type_c_status=0x%x)\n", in type_c_status_show()
825 readl(type_c->reg_base + 0x10)); in type_c_status_show()
826 seq_printf(s, "Read Register (type_c_ctrl=0x%x)\n", in type_c_status_show()
827 readl(type_c->reg_base + 0x14)); in type_c_status_show()
831 return 0; in type_c_status_show()
870 return (((s8)value & 0x8) ? (-(s8)(0x7 & value)) : ((s8)(value))); in get_value()
878 s8 cc1_4p7k = 0; in __updated_type_c_parameter_by_efuse()
879 s8 cc1_12k = 0; in __updated_type_c_parameter_by_efuse()
880 s8 cc1_0p2v = 0; in __updated_type_c_parameter_by_efuse()
881 s8 cc1_0p8v = 0; in __updated_type_c_parameter_by_efuse()
882 s8 cc1_2p6v = 0; in __updated_type_c_parameter_by_efuse()
883 s8 cc1_0p66v = 0; in __updated_type_c_parameter_by_efuse()
884 s8 cc1_1p23v = 0; in __updated_type_c_parameter_by_efuse()
885 s8 cc2_4p7k = 0; in __updated_type_c_parameter_by_efuse()
886 s8 cc2_12k = 0; in __updated_type_c_parameter_by_efuse()
887 s8 cc2_0p2v = 0; in __updated_type_c_parameter_by_efuse()
888 s8 cc2_0p8v = 0; in __updated_type_c_parameter_by_efuse()
889 s8 cc2_2p6v = 0; in __updated_type_c_parameter_by_efuse()
890 s8 cc2_0p66v = 0; in __updated_type_c_parameter_by_efuse()
891 s8 cc2_1p23v = 0; in __updated_type_c_parameter_by_efuse()
905 cc1_0p2v = get_value((buf[0] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
906 cc1_0p8v = get_value((buf[0] >> value_size * 1) & value_mask); in __updated_type_c_parameter_by_efuse()
907 cc1_2p6v = get_value((buf[1] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
909 cc1_1p23v = get_value((buf[2] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
911 cc2_0p2v = get_value((buf[3] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
913 cc2_2p6v = get_value((buf[4] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
915 cc2_1p23v = get_value((buf[5] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
917 cc1_4p7k = get_value((buf[6] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
919 cc2_4p7k = get_value((buf[7] >> value_size * 0) & value_mask); in __updated_type_c_parameter_by_efuse()
954 return 0; in __updated_type_c_parameter_by_efuse()
962 s8 cc1_4p7k = 0; in __updated_type_c_parameter_by_efuse_v2()
963 s8 cc1_12k = 0; in __updated_type_c_parameter_by_efuse_v2()
964 s8 cc1_0p2v = 0; in __updated_type_c_parameter_by_efuse_v2()
965 s8 cc1_0p8v = 0; in __updated_type_c_parameter_by_efuse_v2()
966 s8 cc1_2p6v = 0; in __updated_type_c_parameter_by_efuse_v2()
967 s8 cc1_0p66v = 0; in __updated_type_c_parameter_by_efuse_v2()
968 s8 cc1_1p23v = 0; in __updated_type_c_parameter_by_efuse_v2()
969 s8 cc2_4p7k = 0; in __updated_type_c_parameter_by_efuse_v2()
970 s8 cc2_12k = 0; in __updated_type_c_parameter_by_efuse_v2()
971 s8 cc2_0p2v = 0; in __updated_type_c_parameter_by_efuse_v2()
972 s8 cc2_0p8v = 0; in __updated_type_c_parameter_by_efuse_v2()
973 s8 cc2_2p6v = 0; in __updated_type_c_parameter_by_efuse_v2()
974 s8 cc2_0p66v = 0; in __updated_type_c_parameter_by_efuse_v2()
975 s8 cc2_1p23v = 0; in __updated_type_c_parameter_by_efuse_v2()
984 int value_size = 0; in __updated_type_c_parameter_by_efuse_v2()
991 cc1_4p7k = buf[0] & value_mask; in __updated_type_c_parameter_by_efuse_v2()
998 cc1_0p2v = (buf[4] >> value_size * 0) & value_mask; in __updated_type_c_parameter_by_efuse_v2()
1000 cc1_0p8v = (buf[5] >> value_size * 0) & value_mask; in __updated_type_c_parameter_by_efuse_v2()
1002 cc1_2p6v = (buf[6] >> value_size * 0) & value_mask; in __updated_type_c_parameter_by_efuse_v2()
1005 cc2_0p66v = (buf[7] >> value_size * 0) & value_mask; in __updated_type_c_parameter_by_efuse_v2()
1007 cc2_1p23v = (buf[8] >> value_size * 0) & value_mask; in __updated_type_c_parameter_by_efuse_v2()
1056 return 0; in __updated_type_c_parameter_by_efuse_v2()
1106 return 0; in setup_type_c_parameter()
1115 * UFP rd vref_ufp : 1p23v, 0p66v, 0p2v in setup_type_c_parameter()
1116 * DFP_USB rp36k vref_dfp_usb: 0_1p6v, 0p2v, unused in setup_type_c_parameter()
1117 * DFP_1.5 rp12k vref_dfp_1_5: 1_1p6v, 0p4v, 0p2v in setup_type_c_parameter()
1118 * DFP_3.0 rp4p7k vref_dfp_3_0: 2p6v, 0p8v, 0p2v in setup_type_c_parameter()
1196 return 0; in setup_type_c_parameter()
1237 schedule_delayed_work(&type_c->delayed_work, msecs_to_jiffies(0)); in extcon_rtk_type_c_init()
1261 if (ret < 0) in extcon_rtk_type_c_init()
1272 if (ret < 0) in extcon_rtk_type_c_init()
1281 return 0; in extcon_rtk_type_c_init()
1287 int ret = 0; in extcon_rtk_type_c_edev_register()
1296 if (ret < 0) { in extcon_rtk_type_c_edev_register()
1323 int ret = 0; in extcon_rtk_type_c_probe()
1329 type_c->reg_base = devm_platform_ioremap_resource(pdev, 0); in extcon_rtk_type_c_probe()
1335 type_c->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); in extcon_rtk_type_c_probe()
1336 if (type_c->irq <= 0) { in extcon_rtk_type_c_probe()
1354 0, GPIOD_OUT_HIGH, "rd-ctrl-gpio"); in extcon_rtk_type_c_probe()
1396 return 0; in extcon_rtk_type_c_probe()
1430 writel(0, type_c->reg_base + USB_TYPEC_CTRL_CC2_0); in extcon_rtk_type_c_remove()
1444 .cc1_param = { .rp_4p7k_code = 0xb,
1445 .rp_36k_code = 0x17,
1446 .rp_12k_code = 0x10,
1447 .rd_code = 0,
1448 .ra_code = 0,
1449 .vref_2p6v = 0x0,
1450 .vref_1p23v = 0x0,
1451 .vref_0p8v = 0x3,
1452 .vref_0p66v = 0x0,
1453 .vref_0p4v = 0x0,
1454 .vref_0p2v = 0x4,
1455 .vref_1_1p6v = 0,
1456 .vref_0_1p6v = 0 },
1457 .cc2_param = { .rp_4p7k_code = 0xc,
1458 .rp_36k_code = 0x17,
1459 .rp_12k_code = 0x12,
1460 .rd_code = 0,
1461 .ra_code = 0,
1462 .vref_2p6v = 0x2,
1463 .vref_1p23v = 0x0,
1464 .vref_0p8v = 0x3,
1465 .vref_0p66v = 0x0,
1466 .vref_0p4v = 0x0,
1467 .vref_0p2v = 0x5,
1468 .vref_1_1p6v = 0,
1469 .vref_0_1p6v = 0 },
1470 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1477 .cc1_param = { .rp_4p7k_code = 0xc,
1478 .rp_36k_code = 0xb,
1479 .rp_12k_code = 0xe,
1480 .rd_code = 0x10,
1481 .ra_code = 0x0,
1482 .vref_2p6v = 0x0,
1483 .vref_1p23v = 0x1,
1484 .vref_0p8v = 0x0,
1485 .vref_0p66v = 0x0,
1486 .vref_0p4v = 0x3,
1487 .vref_0p2v = 0x0,
1488 .vref_1_1p6v = 0x7,
1489 .vref_0_1p6v = 0x7 },
1490 .cc2_param = { .rp_4p7k_code = 0xb,
1491 .rp_36k_code = 0x9,
1492 .rp_12k_code = 0xe,
1493 .rd_code = 0xf,
1494 .ra_code = 0x0,
1495 .vref_2p6v = 0x1,
1496 .vref_1p23v = 0x3,
1497 .vref_0p8v = 0x3,
1498 .vref_0p66v = 0x2,
1499 .vref_0p4v = 0x3,
1500 .vref_0p2v = 0x2,
1501 .vref_1_1p6v = 0x7,
1502 .vref_0_1p6v = 0x7 },
1503 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1510 .cc1_param = { .rp_4p7k_code = 0xc,
1511 .rp_36k_code = 0xf,
1512 .rp_12k_code = 0xe,
1513 .rd_code = 0x11,
1514 .ra_code = 0x0,
1515 .vref_2p6v = 0x5,
1516 .vref_1p23v = 0x7,
1517 .vref_0p8v = 0xa,
1518 .vref_0p66v = 0xa,
1519 .vref_0p4v = 0x3,
1520 .vref_0p2v = 0x2,
1521 .vref_1_1p6v = 0x7,
1522 .vref_0_1p6v = 0x7 },
1523 .cc2_param = { .rp_4p7k_code = 0xc,
1524 .rp_36k_code = 0xf,
1525 .rp_12k_code = 0xe,
1526 .rd_code = 0xf,
1527 .ra_code = 0x0,
1528 .vref_2p6v = 0x5,
1529 .vref_1p23v = 0x8,
1530 .vref_0p8v = 0xa,
1531 .vref_0p66v = 0xa,
1532 .vref_0p4v = 0x3,
1533 .vref_0p2v = 0x2,
1534 .vref_1_1p6v = 0x7,
1535 .vref_0_1p6v = 0x7 },
1536 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1543 .cc1_param = { .rp_4p7k_code = 0x9,
1544 .rp_36k_code = 0xe,
1545 .rp_12k_code = 0x9,
1546 .rd_code = 0x9,
1547 .ra_code = 0x7,
1548 .vref_2p6v = 0x3,
1549 .vref_1p23v = 0x7,
1550 .vref_0p8v = 0x7,
1551 .vref_0p66v = 0x6,
1552 .vref_0p4v = 0x2,
1553 .vref_0p2v = 0x3,
1554 .vref_1_1p6v = 0x4,
1555 .vref_0_1p6v = 0x7 },
1556 .cc2_param = { .rp_4p7k_code = 0x8,
1557 .rp_36k_code = 0xe,
1558 .rp_12k_code = 0x9,
1559 .rd_code = 0x9,
1560 .ra_code = 0x7,
1561 .vref_2p6v = 0x3,
1562 .vref_1p23v = 0x7,
1563 .vref_0p8v = 0x7,
1564 .vref_0p66v = 0x6,
1565 .vref_0p4v = 0x3,
1566 .vref_0p2v = 0x3,
1567 .vref_1_1p6v = 0x6,
1568 .vref_0_1p6v = 0x7 },
1569 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1576 .cc1_param = { .rp_4p7k_code = 0xe,
1577 .rp_36k_code = 0xc,
1578 .rp_12k_code = 0xc,
1579 .rd_code = 0xa,
1580 .ra_code = 0x3,
1581 .vref_2p6v = 0xa,
1582 .vref_1p23v = 0x7,
1583 .vref_0p8v = 0x7,
1584 .vref_0p66v = 0x7,
1585 .vref_0p4v = 0x4,
1586 .vref_0p2v = 0x4,
1587 .vref_1_1p6v = 0x7,
1588 .vref_0_1p6v = 0x7 },
1589 .cc2_param = { .rp_4p7k_code = 0xe,
1590 .rp_36k_code = 0xc,
1591 .rp_12k_code = 0xc,
1592 .rd_code = 0xa,
1593 .ra_code = 0x3,
1594 .vref_2p6v = 0xa,
1595 .vref_1p23v = 0x7,
1596 .vref_0p8v = 0x7,
1597 .vref_0p66v = 0x7,
1598 .vref_0p4v = 0x4,
1599 .vref_0p2v = 0x4,
1600 .vref_1_1p6v = 0x7,
1601 .vref_0_1p6v = 0x7 },
1602 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1609 .cc1_param = { .rp_4p7k_code = 0xf,
1610 .rp_36k_code = 0xf,
1611 .rp_12k_code = 0xf,
1612 .rd_code = 0xf,
1613 .ra_code = 0x7,
1614 .vref_2p6v = 0x9,
1615 .vref_1p23v = 0x7,
1616 .vref_0p8v = 0x9,
1617 .vref_0p66v = 0x8,
1618 .vref_0p4v = 0x7,
1619 .vref_0p2v = 0x9,
1620 .vref_1_1p6v = 0x7,
1621 .vref_0_1p6v = 0x7 },
1622 .cc2_param = { .rp_4p7k_code = 0xf,
1623 .rp_36k_code = 0xf,
1624 .rp_12k_code = 0xf,
1625 .rd_code = 0xf,
1626 .ra_code = 0x7,
1627 .vref_1p23v = 0x7,
1628 .vref_0p8v = 0x9,
1629 .vref_0p66v = 0x8,
1630 .vref_0p4v = 0x7,
1631 .vref_0p2v = 0x8,
1632 .vref_1_1p6v = 0x7,
1633 .vref_0_1p6v = 0x7 },
1634 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1641 .cc1_param = { .rp_4p7k_code = 0xe,
1642 .rp_36k_code = 0x3,
1643 .rp_12k_code = 0xe,
1644 .rd_code = 0xf,
1645 .ra_code = 0x6,
1646 .vref_2p6v = 0x7,
1647 .vref_1p23v = 0x7,
1648 .vref_0p8v = 0x8,
1649 .vref_0p66v = 0x7,
1650 .vref_0p4v = 0x7,
1651 .vref_0p2v = 0x7,
1652 .vref_1_1p6v = 0x7,
1653 .vref_0_1p6v = 0x7 },
1654 .cc2_param = { .rp_4p7k_code = 0xe,
1655 .rp_36k_code = 0x3,
1656 .rp_12k_code = 0xe,
1657 .rd_code = 0xf,
1658 .ra_code = 0x6,
1659 .vref_2p6v = 0x7,
1660 .vref_1p23v = 0x7,
1661 .vref_0p8v = 0x8,
1662 .vref_0p66v = 0x7,
1663 .vref_0p4v = 0x7,
1664 .vref_0p2v = 0x8,
1665 .vref_1_1p6v = 0x7,
1666 .vref_0_1p6v = 0x7 },
1667 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1674 .cc1_param = { .rp_4p7k_code = 0xe,
1675 .rp_36k_code = 0x3,
1676 .rp_12k_code = 0xe,
1677 .rd_code = 0xf,
1678 .ra_code = 0x6,
1679 .vref_2p6v = 0x7,
1680 .vref_1p23v = 0x7,
1681 .vref_0p8v = 0x8,
1682 .vref_0p66v = 0x7,
1683 .vref_0p4v = 0x7,
1684 .vref_0p2v = 0x7,
1685 .vref_1_1p6v = 0x7,
1686 .vref_0_1p6v = 0x7 },
1687 .cc2_param = { .rp_4p7k_code = 0xe,
1688 .rp_36k_code = 0x3,
1689 .rp_12k_code = 0xe,
1690 .rd_code = 0xf,
1691 .ra_code = 0x6,
1692 .vref_2p6v = 0x7,
1693 .vref_1p23v = 0x7,
1694 .vref_0p8v = 0x8,
1695 .vref_0p66v = 0x7,
1696 .vref_0p4v = 0x7,
1697 .vref_0p2v = 0x8,
1698 .vref_1_1p6v = 0x7,
1699 .vref_0_1p6v = 0x7 },
1700 .debounce_val = 0x7f, /* 1b,1us 7f,4.7us */
1736 writel(0, type_c->reg_base + USB_TYPEC_CTRL_CC2_0); in extcon_rtk_type_c_prepare()
1740 return 0; in extcon_rtk_type_c_prepare()
1752 return 0; in extcon_rtk_type_c_suspend()
1766 return 0; in extcon_rtk_type_c_resume()