Lines Matching +full:0 +full:x2e00

3  *  phy-rtk-usb3.c RTK usb3.0 phy driver
23 #define USB_MDIO_CTRL_PHY_WRITE BIT(0)
27 #define MAX_USB_PHY_DATA_SIZE 0x30
28 #define PHY_ADDR_0X09 0x09
29 #define PHY_ADDR_0X0B 0x0b
30 #define PHY_ADDR_0X0D 0x0d
31 #define PHY_ADDR_0X10 0x10
32 #define PHY_ADDR_0X1F 0x1f
33 #define PHY_ADDR_0X20 0x20
34 #define PHY_ADDR_0X21 0x21
35 #define PHY_ADDR_0X30 0x30
38 #define REG_0X0B_RX_OFFSET_RANGE_MASK 0xc
40 #define REG_0X10_DEBUG_MODE_SETTING 0x3c0
41 #define REG_0X10_DEBUG_MODE_SETTING_MASK 0x3f8
42 #define REG_0X1F_RX_OFFSET_CODE_MASK 0x1e
45 #define USB_U3_TX_LFPS_SWING_TRIM_MASK 0xf
46 #define AMPLITUDE_CONTROL_COARSE_MASK 0xff
47 #define AMPLITUDE_CONTROL_FINE_MASK 0xffff
48 #define AMPLITUDE_CONTROL_COARSE_DEFAULT 0xff
49 #define AMPLITUDE_CONTROL_FINE_DEFAULT 0xffff
110 return 0; in utmi_wait_register()
115 return utmi_wait_register(phy_reg->reg_mdio_ctl, USB_MDIO_CTRL_PHY_BUSY, 0); in rtk_phy3_wait_vbusy()
147 return 0; in rtk_phy_write()
188 int i = 0; in do_rtk_phy_init()
197 for (i = 0; i < phy_cfg->param_size; i++) { in do_rtk_phy_init()
215 u16 check_value = 0; in do_rtk_phy_init()
219 /* Enable Debug mode by set 0x0D and 0x10 */ in do_rtk_phy_init()
234 if (count-- < 0) in do_rtk_phy_init()
239 dev_info(rtk_phy->dev, "toggle fail addr=0x%02x, data=0x%04x\n", in do_rtk_phy_init()
242 /* Disable Debug mode by set 0x0D and 0x10 to default*/ in do_rtk_phy_init()
256 if (((rx_offset_code & code_mask) == 0x0) || in do_rtk_phy_init()
262 …dev_warn(rtk_phy->dev, "Don't update rx_offset_range (rx_offset_code=0x%x, rx_offset_range=0x%x)\n… in do_rtk_phy_init()
279 return 0; in do_rtk_phy_init()
285 int ret = 0; in rtk_phy_init()
289 for (i = 0; i < rtk_phy->num_phy; i++) in rtk_phy_init()
300 return 0; in rtk_phy_exit()
323 return 0; in rtk_phy_connect()
333 return 0; in rtk_phy_disconnect()
374 for (index = 0; index < rtk_phy->num_phy; index++) { in rtk_usb3_parameter_show()
383 for (i = 0; i < phy_cfg->param_size; i++) { in rtk_usb3_parameter_show()
389 seq_printf(s, " addr = 0x%02x, data = none ==> read value = 0x%04x\n", in rtk_usb3_parameter_show()
392 seq_printf(s, " addr = 0x%02x, data = 0x%04x ==> read value = 0x%04x\n", in rtk_usb3_parameter_show()
397 seq_printf(s, " efuse_usb_u3_tx_lfps_swing_trim: 0x%x\n", in rtk_usb3_parameter_show()
399 seq_printf(s, " amplitude_control_coarse: 0x%x\n", in rtk_usb3_parameter_show()
401 seq_printf(s, " amplitude_control_fine: 0x%x\n", in rtk_usb3_parameter_show()
405 return 0; in rtk_usb3_parameter_show()
437 u8 value = 0; in get_phy_data_by_efuse()
453 value = buf[0] & USB_U3_TX_LFPS_SWING_TRIM_MASK; in get_phy_data_by_efuse()
459 if (value > 0 && value < 0x8) in get_phy_data_by_efuse()
460 phy_parameter->efuse_usb_u3_tx_lfps_swing_trim = 0x8; in get_phy_data_by_efuse()
465 return 0; in get_phy_data_by_efuse()
528 int ret = 0; in parse_phy_data()
536 for (index = 0; index < rtk_phy->num_phy; index++) { in parse_phy_data()
539 phy_parameter->phy_reg.reg_mdio_ctl = of_iomap(dev->of_node, 0) + index; in parse_phy_data()
541 /* Amplitude control address 0x20 bit 0 to bit 7 */ in parse_phy_data()
546 /* Amplitude control address 0x21 bit 0 to bit 16 */ in parse_phy_data()
616 .param = { [0] = {0x01, 0x4008}, [1] = {0x01, 0xe046},
617 [2] = {0x02, 0x6046}, [3] = {0x03, 0x2779},
618 [4] = {0x04, 0x72f5}, [5] = {0x05, 0x2ad3},
619 [6] = {0x06, 0x000e}, [7] = {0x07, 0x2e00},
620 [8] = {0x08, 0x3591}, [9] = {0x09, 0x525c},
621 [10] = {0x0a, 0xa600}, [11] = {0x0b, 0xa904},
622 [12] = {0x0c, 0xc000}, [13] = {0x0d, 0xef1c},
623 [14] = {0x0e, 0x2000}, [15] = {0x0f, 0x0000},
624 [16] = {0x10, 0x000c}, [17] = {0x11, 0x4c00},
625 [18] = {0x12, 0xfc00}, [19] = {0x13, 0x0c81},
626 [20] = {0x14, 0xde01}, [21] = {0x15, 0x0000},
627 [22] = {0x16, 0x0000}, [23] = {0x17, 0x0000},
628 [24] = {0x18, 0x0000}, [25] = {0x19, 0x4004},
629 [26] = {0x1a, 0x1260}, [27] = {0x1b, 0xff00},
630 [28] = {0x1c, 0xcb00}, [29] = {0x1d, 0xa03f},
631 [30] = {0x1e, 0xc2e0}, [31] = {0x1f, 0x2807},
632 [32] = {0x20, 0x947a}, [33] = {0x21, 0x88aa},
633 [34] = {0x22, 0x0057}, [35] = {0x23, 0xab66},
634 [36] = {0x24, 0x0800}, [37] = {0x25, 0x0000},
635 [38] = {0x26, 0x040a}, [39] = {0x27, 0x01d6},
636 [40] = {0x28, 0xf8c2}, [41] = {0x29, 0x3080},
637 [42] = {0x2a, 0x3082}, [43] = {0x2b, 0x2078},
638 [44] = {0x2c, 0xffff}, [45] = {0x2d, 0xffff},
639 [46] = {0x2e, 0x0000}, [47] = {0x2f, 0x0040}, },
649 .param = { [8] = {0x08, 0x3591},
650 [38] = {0x26, 0x840b},
651 [40] = {0x28, 0xf842}, },
661 .param = { [1] = {0x01, 0xac86},
662 [6] = {0x06, 0x0003},
663 [9] = {0x09, 0x924c},
664 [10] = {0x0a, 0xa608},
665 [11] = {0x0b, 0xb905},
666 [14] = {0x0e, 0x2010},
667 [32] = {0x20, 0x705a},
668 [33] = {0x21, 0xf645},
669 [34] = {0x22, 0x0013},
670 [35] = {0x23, 0xcb66},
671 [41] = {0x29, 0xff00}, },
681 .param = { [1] = {0x01, 0xac8c},
682 [6] = {0x06, 0x0017},
683 [9] = {0x09, 0x724c},
684 [10] = {0x0a, 0xb610},
685 [11] = {0x0b, 0xb90d},
686 [13] = {0x0d, 0xef2a},
687 [15] = {0x0f, 0x9050},
688 [16] = {0x10, 0x000c},
689 [32] = {0x20, 0x70ff},
690 [34] = {0x22, 0x0013},
691 [35] = {0x23, 0xdb66},
692 [38] = {0x26, 0x8609},
693 [41] = {0x29, 0xff13},
694 [42] = {0x2a, 0x3070}, },
704 .param = { [1] = {0x01, 0xac89},
705 [4] = {0x04, 0xf2f5},
706 [6] = {0x06, 0x0017},
707 [9] = {0x09, 0x424c},
708 [10] = {0x0a, 0x9610},
709 [11] = {0x0b, 0x9901},
710 [12] = {0x0c, 0xf000},
711 [13] = {0x0d, 0xef2a},
712 [14] = {0x0e, 0x1000},
713 [15] = {0x0f, 0x9050},
714 [32] = {0x20, 0x7077},
715 [35] = {0x23, 0x0b62},
716 [37] = {0x25, 0x10ec},
717 [42] = {0x2a, 0x3070}, },