Lines Matching full:grf
128 * @pipe_phystatus: select pipe phystatus from grf or phy.
137 * @bypass_iomux: usb bypass uart GRF iomux register.
150 * @iddig_output: iddig output from grf.
151 * @iddig_en: utmi iddig select between grf and phy,
152 * 0: from phy; 1: from grf
210 * @reg: the address offset of grf for usb-phy config.
243 * @sel_pipe_phystatus: select pipe phystatus from grf.
309 * @grf: General Register Files regmap.
334 struct regmap *grf; member
357 return rphy->usbgrf == NULL ? rphy->grf : rphy->usbgrf; in get_reg_base()
626 ret = property_enable(rphy->grf, &rport->port_cfg->idfall_det_clr, true); in rockchip_usb2phy_enable_id_irq()
630 ret = property_enable(rphy->grf, &rport->port_cfg->idfall_det_en, en); in rockchip_usb2phy_enable_id_irq()
634 ret = property_enable(rphy->grf, &rport->port_cfg->idrise_det_clr, true); in rockchip_usb2phy_enable_id_irq()
638 ret = property_enable(rphy->grf, &rport->port_cfg->idrise_det_en, en); in rockchip_usb2phy_enable_id_irq()
650 ret = property_enable(rphy->grf, &rport->port_cfg->bvalid_det_clr, true); in rockchip_usb2phy_enable_vbus_irq()
654 ret = property_enable(rphy->grf, &rport->port_cfg->bvalid_det_en, en); in rockchip_usb2phy_enable_vbus_irq()
665 ret = property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true); in rockchip_usb2phy_enable_line_irq()
669 ret = property_enable(rphy->grf, &rport->port_cfg->ls_det_en, en); in rockchip_usb2phy_enable_line_irq()
680 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
684 ret = property_enable(rphy->grf, &rport->port_cfg->disfall_en, en); in rockchip_usb2phy_enable_host_disc_irq()
688 ret = property_enable(rphy->grf, &rport->port_cfg->disrise_clr, true); in rockchip_usb2phy_enable_host_disc_irq()
692 ret = property_enable(rphy->grf, &rport->port_cfg->disrise_en, en); in rockchip_usb2phy_enable_host_disc_irq()
734 ret |= property_enable(rphy->grf, iomux, true); in rockchip_usb_bypass_uart()
744 ret |= property_enable(rphy->grf, iomux, false); in rockchip_usb_bypass_uart()
764 iddig = property_enabled(rphy->grf, &rport->port_cfg->utmi_iddig); in rockchip_usb_bypass_uart_work()
767 vbus = property_enabled(rphy->grf, &rport->port_cfg->utmi_avalid); in rockchip_usb_bypass_uart_work()
769 vbus = property_enabled(rphy->grf, &rport->port_cfg->utmi_bvalid); in rockchip_usb_bypass_uart_work()
833 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul); in rockchip_usb2phy_init()
1061 ret = property_enable(rphy->grf, &rport->port_cfg->vbus_det_en, in rockchip_usb2phy_set_mode()
1215 property_enabled(rphy->grf, &rport->port_cfg->bvalid_grf_con); in rockchip_usb2phy_otg_sm_work()
1218 property_enabled(rphy->grf, &rport->port_cfg->utmi_avalid); in rockchip_usb2phy_otg_sm_work()
1221 property_enabled(rphy->grf, &rport->port_cfg->utmi_bvalid); in rockchip_usb2phy_otg_sm_work()
1466 is_dcd = property_enabled(rphy->grf, in rockchip_chg_detect_work()
1484 vout = property_enabled(rphy->grf, in rockchip_chg_detect_work()
1519 vout = property_enabled(rphy->grf, in rockchip_chg_detect_work()
1594 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul); in rockchip_usb2phy_sm_work()
1602 ret = regmap_read(rphy->grf, rport->port_cfg->utmi_hstdet.offset, &uhd); in rockchip_usb2phy_sm_work()
1696 if (!property_enabled(rphy->grf, &rport->port_cfg->ls_det_st) || in rockchip_usb2phy_linestate_irq()
1697 !property_enabled(rphy->grf, &rport->port_cfg->ls_det_en)) in rockchip_usb2phy_linestate_irq()
1733 if (!property_enabled(rphy->grf, &rport->port_cfg->bvalid_det_st)) in rockchip_usb2phy_bvalid_irq()
1739 property_enable(rphy->grf, &rport->port_cfg->bvalid_det_clr, true); in rockchip_usb2phy_bvalid_irq()
1760 if (!property_enabled(rphy->grf, &rport->port_cfg->idfall_det_st) && in rockchip_usb2phy_id_irq()
1761 !property_enabled(rphy->grf, &rport->port_cfg->idrise_det_st)) in rockchip_usb2phy_id_irq()
1767 if (property_enabled(rphy->grf, &rport->port_cfg->idfall_det_st)) { in rockchip_usb2phy_id_irq()
1768 property_enable(rphy->grf, &rport->port_cfg->idfall_det_clr, in rockchip_usb2phy_id_irq()
1771 if (!property_enabled(rphy->grf, &rport->port_cfg->utmi_iddig)) in rockchip_usb2phy_id_irq()
1773 } else if (property_enabled(rphy->grf, &rport->port_cfg->idrise_det_st)) { in rockchip_usb2phy_id_irq()
1774 property_enable(rphy->grf, &rport->port_cfg->idrise_det_clr, in rockchip_usb2phy_id_irq()
1797 if (!property_enabled(rphy->grf, &rport->port_cfg->disfall_st) && in rockchip_usb2phy_host_disc_irq()
1798 !property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) in rockchip_usb2phy_host_disc_irq()
1804 if (property_enabled(rphy->grf, &rport->port_cfg->disfall_st)) { in rockchip_usb2phy_host_disc_irq()
1805 property_enable(rphy->grf, &rport->port_cfg->disfall_clr, in rockchip_usb2phy_host_disc_irq()
1808 } else if (property_enabled(rphy->grf, &rport->port_cfg->disrise_st)) { in rockchip_usb2phy_host_disc_irq()
1809 property_enable(rphy->grf, &rport->port_cfg->disrise_clr, in rockchip_usb2phy_host_disc_irq()
1865 * grf plug iddig indicator via the sys in rockchip_usb2phy_irq()
1869 force_mode = property_enabled(rphy->grf, in rockchip_usb2phy_irq()
1998 property_enable(rphy->grf, &cfg->bvalid_phy_con, enable); in rockchip_usb2phy_usb_bvalid_enable()
2001 property_enable(rphy->grf, &cfg->bvalid_grf_con, enable); in rockchip_usb2phy_usb_bvalid_enable()
2140 "rockchip,usbctrl-grf"); in rockchip_usb2phy_otg_port_init()
2142 dev_err(rphy->dev, "Failed to map usbctrl-grf\n"); in rockchip_usb2phy_otg_port_init()
2160 iddig = property_enabled(rphy->grf, &rport->port_cfg->utmi_iddig); in rockchip_usb2phy_otg_port_init()
2192 * Set the utmi bvalid come from the usb phy or grf. in rockchip_usb2phy_otg_port_init()
2198 * the bvaid from the grf and set bvalid to be valid in rockchip_usb2phy_otg_port_init()
2286 rphy->grf = syscon_regmap_lookup_by_phandle(np, in rockchip_usb2phy_probe()
2288 if (IS_ERR(rphy->grf)) in rockchip_usb2phy_probe()
2289 return PTR_ERR(rphy->grf); in rockchip_usb2phy_probe()
2293 rphy->grf = syscon_node_to_regmap(dev->parent->of_node); in rockchip_usb2phy_probe()
2294 if (IS_ERR(rphy->grf)) in rockchip_usb2phy_probe()
2295 return PTR_ERR(rphy->grf); in rockchip_usb2phy_probe()
2473 ret = property_enable(rphy->grf, &rport->port_cfg->bypass_bc, in rockchip_usb2phy_low_power_enable()
2478 ret = property_enable(rphy->grf, &rport->port_cfg->bypass_otg, in rockchip_usb2phy_low_power_enable()
2483 ret = property_enable(rphy->grf, &rport->port_cfg->vbus_det_en, in rockchip_usb2phy_low_power_enable()
2489 ret = property_enable(rphy->grf, &rport->port_cfg->bypass_host, in rockchip_usb2phy_low_power_enable()
2501 ret = regmap_write(rphy->grf, 0x298, 0x00040000); in rk312x_usb2phy_tuning()
2514 ret = regmap_write(rphy->grf, 0x76c, 0x00070004); in rk3228_usb2phy_tuning()
2525 ret = regmap_update_bits(rphy->grf, 0x30, BIT(2), 0); in rk3308_usb2phy_tuning()
2530 ret = regmap_update_bits(rphy->grf, 0, GENMASK(2, 0), BIT(2)); in rk3308_usb2phy_tuning()
2535 ret = regmap_update_bits(rphy->grf, 0x004, GENMASK(7, 5), 0x40); in rk3308_usb2phy_tuning()
2539 ret = regmap_update_bits(rphy->grf, 0x008, BIT(0), 0x1); in rk3308_usb2phy_tuning()
2544 ret = regmap_update_bits(rphy->grf, 0x400, GENMASK(2, 0), BIT(2)); in rk3308_usb2phy_tuning()
2549 ret = regmap_update_bits(rphy->grf, 0x404, GENMASK(7, 5), 0x40); in rk3308_usb2phy_tuning()
2553 ret = regmap_update_bits(rphy->grf, 0x408, BIT(0), 0x1); in rk3308_usb2phy_tuning()
2558 ret = regmap_write(rphy->grf, 0x0, 0x00070004); in rk3308_usb2phy_tuning()
2563 ret = regmap_write(rphy->grf, 0x30, 0x00070004); in rk3308_usb2phy_tuning()
2568 ret = regmap_write(rphy->grf, 0x18, 0x00040000); in rk3308_usb2phy_tuning()
2582 ret = regmap_update_bits(rphy->grf, 0x8000, GENMASK(2, 0), BIT(2)); in rk3328_usb2phy_tuning()
2587 ret = regmap_update_bits(rphy->grf, 0x8004, GENMASK(7, 5), 0x40); in rk3328_usb2phy_tuning()
2591 ret = regmap_update_bits(rphy->grf, 0x8008, BIT(0), 0x1); in rk3328_usb2phy_tuning()
2596 ret = regmap_update_bits(rphy->grf, 0x8030, BIT(2), 0); in rk3328_usb2phy_tuning()
2601 ret = regmap_update_bits(rphy->grf, 0x8400, GENMASK(2, 0), BIT(2)); in rk3328_usb2phy_tuning()
2606 ret = regmap_update_bits(rphy->grf, 0x8404, GENMASK(7, 5), 0x40); in rk3328_usb2phy_tuning()
2610 ret = regmap_update_bits(rphy->grf, 0x8408, BIT(0), 0x1); in rk3328_usb2phy_tuning()
2615 ret = regmap_update_bits(rphy->grf, 0x8430, BIT(2), 0); in rk3328_usb2phy_tuning()
2620 ret = regmap_write(rphy->grf, 0x2c, 0xffff0400); in rk3328_usb2phy_tuning()
2625 ret = regmap_write(rphy->grf, 0x0, 0x00070004); in rk3328_usb2phy_tuning()
2630 ret = regmap_write(rphy->grf, 0x30, 0x00070004); in rk3328_usb2phy_tuning()
2635 ret = regmap_write(rphy->grf, 0x18, 0x00040000); in rk3328_usb2phy_tuning()
2650 ret |= regmap_write(rphy->grf, 0x0780, open_pre_emphasize); in rk3366_usb2phy_tuning()
2651 ret |= regmap_write(rphy->grf, 0x079c, eye_height_tuning); in rk3366_usb2phy_tuning()
2652 ret |= regmap_write(rphy->grf, 0x07b0, open_pre_emphasize); in rk3366_usb2phy_tuning()
2653 ret |= regmap_write(rphy->grf, 0x07cc, eye_height_tuning); in rk3366_usb2phy_tuning()
2656 ret |= regmap_write(rphy->grf, 0x078c, compensation_tuning); in rk3366_usb2phy_tuning()
2673 ret |= regmap_write(rphy->grf, 0x4480, in rk3399_usb2phy_tuning()
2675 ret |= regmap_write(rphy->grf, 0x44b4, in rk3399_usb2phy_tuning()
2684 ret |= regmap_write(rphy->grf, 0x4500, in rk3399_usb2phy_tuning()
2686 ret |= regmap_write(rphy->grf, 0x4534, in rk3399_usb2phy_tuning()
2698 ret |= regmap_write(rphy->grf, 0x448c, in rk3399_usb2phy_tuning()
2702 ret |= regmap_write(rphy->grf, 0x44b0, in rk3399_usb2phy_tuning()
2708 ret |= regmap_write(rphy->grf, 0x4480, in rk3399_usb2phy_tuning()
2715 ret |= regmap_write(rphy->grf, 0x450c, in rk3399_usb2phy_tuning()
2719 ret |= regmap_write(rphy->grf, 0x4530, in rk3399_usb2phy_tuning()
2725 ret |= regmap_write(rphy->grf, 0x4500, in rk3399_usb2phy_tuning()
2752 ret |= regmap_write(rphy->grf, 0x80004, 0x00030003); in rk3528_usb2phy_tuning()
2773 /* Set the bvalid filter time to 10ms based on the u2phy grf pclk 100MHz */ in rk3562_usb2phy_tuning()
2774 ret |= regmap_write(rphy->grf, 0x0138, FILTER_COUNTER); in rk3562_usb2phy_tuning()
2776 /* Set the id filter time to 10ms based on the u2phy grf pclk 100MHz */ in rk3562_usb2phy_tuning()
2777 ret |= regmap_write(rphy->grf, 0x013c, FILTER_COUNTER); in rk3562_usb2phy_tuning()
2780 ret |= regmap_write(rphy->grf, 0x010c, 0x80008000); in rk3562_usb2phy_tuning()
2804 * based on the usb2 phy grf pclk 100MHz. in rk3568_usb2phy_tuning()
2806 ret |= regmap_write(rphy->grf, 0x0048, FILTER_COUNTER); in rk3568_usb2phy_tuning()
2810 * on the usb2 phy grf pclk 100MHz. in rk3568_usb2phy_tuning()
2812 ret |= regmap_write(rphy->grf, 0x004c, FILTER_COUNTER); in rk3568_usb2phy_tuning()
2816 ret |= regmap_write(rphy->grf, 0x000c, 0x80008000); in rk3568_usb2phy_tuning()
2877 ret = regmap_read(rphy->grf, 0x0008, ®); in rk3588_usb2phy_tuning()
2883 ret = regmap_write(rphy->grf, 0x0008, in rk3588_usb2phy_tuning()
2901 ret |= regmap_write(rphy->grf, 0x000c, in rk3588_usb2phy_tuning()
2905 ret |= regmap_write(rphy->grf, 0x0004, in rk3588_usb2phy_tuning()
2909 ret |= regmap_write(rphy->grf, 0x0008, in rk3588_usb2phy_tuning()
2913 ret |= regmap_write(rphy->grf, 0x0010, in rk3588_usb2phy_tuning()
2922 ret |= regmap_write(rphy->grf, 0x000c, in rk3588_usb2phy_tuning()
2926 ret |= regmap_write(rphy->grf, 0x0004, in rk3588_usb2phy_tuning()
2930 ret |= regmap_write(rphy->grf, 0x0008, in rk3588_usb2phy_tuning()
2934 ret |= regmap_write(rphy->grf, 0x0010, in rk3588_usb2phy_tuning()
2943 ret |= regmap_write(rphy->grf, 0x000c, in rk3588_usb2phy_tuning()
2947 ret |= regmap_write(rphy->grf, 0x0004, in rk3588_usb2phy_tuning()
2951 ret |= regmap_write(rphy->grf, 0x0008, in rk3588_usb2phy_tuning()
2960 ret |= regmap_write(rphy->grf, 0x000c, in rk3588_usb2phy_tuning()
2964 ret |= regmap_write(rphy->grf, 0x0004, in rk3588_usb2phy_tuning()
2968 ret |= regmap_write(rphy->grf, 0x0008, in rk3588_usb2phy_tuning()
2990 * on the usb2 phy grf pclk 32KHz on suspend. in rockchip_usb2phy_pm_suspend()
2993 ret = regmap_write(rphy->grf, phy_cfg->ls_filter_con.offset, in rockchip_usb2phy_pm_suspend()
3005 ret = regmap_write(rphy->grf, in rockchip_usb2phy_pm_suspend()
3015 rport->prev_iddig = property_enabled(rphy->grf, in rockchip_usb2phy_pm_suspend()
3077 ret = regmap_write(rphy->grf, phy_cfg->ls_filter_con.offset, in rockchip_usb2phy_pm_resume()
3089 ret = regmap_write(rphy->grf, in rockchip_usb2phy_pm_resume()
3099 iddig = property_enabled(rphy->grf, in rockchip_usb2phy_pm_resume()
3140 if (property_enabled(rphy->grf, &rport->port_cfg->utmi_bvalid)) in rockchip_usb2phy_pm_resume()