Lines Matching refs:ctrl_base
440 static u32 brcmusb_usb_mdio_read(void __iomem *ctrl_base, u32 reg, int mode) in brcmusb_usb_mdio_read() argument
445 brcm_usb_writel(data, USB_CTRL_REG(ctrl_base, MDIO)); in brcmusb_usb_mdio_read()
447 brcm_usb_writel(data, USB_CTRL_REG(ctrl_base, MDIO)); in brcmusb_usb_mdio_read()
451 brcm_usb_writel(data, USB_CTRL_REG(ctrl_base, MDIO)); in brcmusb_usb_mdio_read()
455 return brcm_usb_readl(USB_CTRL_REG(ctrl_base, MDIO2)) & 0xffff; in brcmusb_usb_mdio_read()
458 static void brcmusb_usb_mdio_write(void __iomem *ctrl_base, u32 reg, in brcmusb_usb_mdio_write() argument
464 brcm_usb_writel(data, USB_CTRL_REG(ctrl_base, MDIO)); in brcmusb_usb_mdio_write()
466 brcm_usb_writel(data, USB_CTRL_REG(ctrl_base, MDIO)); in brcmusb_usb_mdio_write()
471 brcm_usb_writel(data, USB_CTRL_REG(ctrl_base, MDIO)); in brcmusb_usb_mdio_write()
476 static void brcmusb_usb_phy_ldo_fix(void __iomem *ctrl_base) in brcmusb_usb_phy_ldo_fix() argument
480 USB_CTRL_UNSET(ctrl_base, UTMI_CTL_1, POWER_UP_FSM_EN); in brcmusb_usb_phy_ldo_fix()
481 USB_CTRL_UNSET(ctrl_base, UTMI_CTL_1, POWER_UP_FSM_EN_P1); in brcmusb_usb_phy_ldo_fix()
484 USB_CTRL_UNSET(ctrl_base, PLL_CTL, PLL_RESETB); in brcmusb_usb_phy_ldo_fix()
487 USB_CTRL_SET(ctrl_base, PLL_CTL, PLL_RESETB); in brcmusb_usb_phy_ldo_fix()
492 static void brcmusb_usb2_eye_fix(void __iomem *ctrl_base) in brcmusb_usb2_eye_fix() argument
495 brcmusb_usb_mdio_write(ctrl_base, 0x1f, 0x80a0, MDIO_USB2); in brcmusb_usb2_eye_fix()
496 brcmusb_usb_mdio_write(ctrl_base, 0x0a, 0xc6a0, MDIO_USB2); in brcmusb_usb2_eye_fix()
499 static void brcmusb_usb3_pll_fix(void __iomem *ctrl_base) in brcmusb_usb3_pll_fix() argument
502 brcmusb_usb_mdio_write(ctrl_base, 0x1f, 0x8000, MDIO_USB3); in brcmusb_usb3_pll_fix()
503 brcmusb_usb_mdio_write(ctrl_base, 0x07, 0x1503, MDIO_USB3); in brcmusb_usb3_pll_fix()
506 static void brcmusb_usb3_enable_pipe_reset(void __iomem *ctrl_base) in brcmusb_usb3_enable_pipe_reset() argument
511 brcmusb_usb_mdio_write(ctrl_base, 0x1f, 0x8000, MDIO_USB3); in brcmusb_usb3_enable_pipe_reset()
512 val = brcmusb_usb_mdio_read(ctrl_base, 0x0f, MDIO_USB3) | 0x200; in brcmusb_usb3_enable_pipe_reset()
513 brcmusb_usb_mdio_write(ctrl_base, 0x0f, val, MDIO_USB3); in brcmusb_usb3_enable_pipe_reset()
516 static void brcmusb_usb3_enable_sigdet(void __iomem *ctrl_base) in brcmusb_usb3_enable_sigdet() argument
524 brcmusb_usb_mdio_write(ctrl_base, 0x1f, (0x8080 + ofs), in brcmusb_usb3_enable_sigdet()
526 val = brcmusb_usb_mdio_read(ctrl_base, 0x05, MDIO_USB3); in brcmusb_usb3_enable_sigdet()
528 brcmusb_usb_mdio_write(ctrl_base, 0x05, val, MDIO_USB3); in brcmusb_usb3_enable_sigdet()
533 static void brcmusb_usb3_enable_skip_align(void __iomem *ctrl_base) in brcmusb_usb3_enable_skip_align() argument
541 brcmusb_usb_mdio_write(ctrl_base, 0x1f, (0x8060 + ofs), in brcmusb_usb3_enable_skip_align()
543 val = brcmusb_usb_mdio_read(ctrl_base, 0x01, MDIO_USB3) | 0x200; in brcmusb_usb3_enable_skip_align()
544 brcmusb_usb_mdio_write(ctrl_base, 0x01, val, MDIO_USB3); in brcmusb_usb3_enable_skip_align()
549 static void brcmusb_usb3_unfreeze_aeq(void __iomem *ctrl_base) in brcmusb_usb3_unfreeze_aeq() argument
557 brcmusb_usb_mdio_write(ctrl_base, 0x1f, (0x80e0 + ofs), in brcmusb_usb3_unfreeze_aeq()
559 val = brcmusb_usb_mdio_read(ctrl_base, 0x01, MDIO_USB3); in brcmusb_usb3_unfreeze_aeq()
561 brcmusb_usb_mdio_write(ctrl_base, 0x01, val, MDIO_USB3); in brcmusb_usb3_unfreeze_aeq()
570 void __iomem *ctrl_base = params->regs[BRCM_REGS_CTRL]; in brcmusb_usb3_pll_54mhz() local
600 USB_CTRL_UNSET(ctrl_base, USB30_CTL1, PHY3_PLL_SEQ_START); in brcmusb_usb3_pll_54mhz()
602 brcmusb_usb_mdio_write(ctrl_base, 0x1f, 0x8000, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
603 brcmusb_usb_mdio_write(ctrl_base, 0x10, 0x5784, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
604 brcmusb_usb_mdio_write(ctrl_base, 0x11, 0x01d0, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
605 brcmusb_usb_mdio_write(ctrl_base, 0x12, 0x1DE8, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
606 brcmusb_usb_mdio_write(ctrl_base, 0x13, 0xAA80, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
607 brcmusb_usb_mdio_write(ctrl_base, 0x14, 0x8826, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
608 brcmusb_usb_mdio_write(ctrl_base, 0x15, 0x0044, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
609 brcmusb_usb_mdio_write(ctrl_base, 0x16, 0x8000, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
610 brcmusb_usb_mdio_write(ctrl_base, 0x17, 0x0851, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
611 brcmusb_usb_mdio_write(ctrl_base, 0x18, 0x0000, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
616 brcmusb_usb_mdio_write(ctrl_base, 0x1f, (0x8040 + ofs), in brcmusb_usb3_pll_54mhz()
618 brcmusb_usb_mdio_write(ctrl_base, 0x03, 0x0090, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
619 brcmusb_usb_mdio_write(ctrl_base, 0x04, 0x0134, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
620 brcmusb_usb_mdio_write(ctrl_base, 0x1f, (0x8020 + ofs), in brcmusb_usb3_pll_54mhz()
622 brcmusb_usb_mdio_write(ctrl_base, 0x01, 0x00e2, MDIO_USB3); in brcmusb_usb3_pll_54mhz()
627 USB_CTRL_SET(ctrl_base, USB30_CTL1, PHY3_PLL_SEQ_START); in brcmusb_usb3_pll_54mhz()
632 static void brcmusb_usb3_ssc_enable(void __iomem *ctrl_base) in brcmusb_usb3_ssc_enable() argument
637 brcmusb_usb_mdio_write(ctrl_base, 0x1f, 0x8040, MDIO_USB3); in brcmusb_usb3_ssc_enable()
638 val = brcmusb_usb_mdio_read(ctrl_base, 0x01, MDIO_USB3) | 0xf; in brcmusb_usb3_ssc_enable()
639 brcmusb_usb_mdio_write(ctrl_base, 0x01, val, MDIO_USB3); in brcmusb_usb3_ssc_enable()
645 brcmusb_usb_mdio_write(ctrl_base, 0x1f, 0x9040, MDIO_USB3); in brcmusb_usb3_ssc_enable()
646 val = brcmusb_usb_mdio_read(ctrl_base, 0x01, MDIO_USB3) | 0xf; in brcmusb_usb3_ssc_enable()
647 brcmusb_usb_mdio_write(ctrl_base, 0x01, val, MDIO_USB3); in brcmusb_usb3_ssc_enable()
652 void __iomem *ctrl_base = params->regs[BRCM_REGS_CTRL]; in brcmusb_usb3_phy_workarounds() local
654 brcmusb_usb3_pll_fix(ctrl_base); in brcmusb_usb3_phy_workarounds()
656 brcmusb_usb3_ssc_enable(ctrl_base); in brcmusb_usb3_phy_workarounds()
657 brcmusb_usb3_enable_pipe_reset(ctrl_base); in brcmusb_usb3_phy_workarounds()
658 brcmusb_usb3_enable_sigdet(ctrl_base); in brcmusb_usb3_phy_workarounds()
659 brcmusb_usb3_enable_skip_align(ctrl_base); in brcmusb_usb3_phy_workarounds()
660 brcmusb_usb3_unfreeze_aeq(ctrl_base); in brcmusb_usb3_phy_workarounds()