Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: rockchip: inno-usb2: add phy definition for rk3036

The usb2phy on rk3036 is very similar to rk3128 but not 100% identical.
While most registers and bits are the same, a small fraction did get moved
around.

So we can re-use the phy-tuning function, but need a new set a bits.
The biggest change might be that the phy on rk3036 does not support the
charger detection, that rk3128 (and newer phys) have.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250503201512.991277-3-heiko@sntech.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Heiko Stuebner and committed by
Vinod Koul
3ca48b95 d78b5653

+32
+32
drivers/phy/rockchip/phy-rockchip-inno-usb2.c
··· 1583 1583 return ret; 1584 1584 } 1585 1585 1586 + static const struct rockchip_usb2phy_cfg rk3036_phy_cfgs[] = { 1587 + { 1588 + .reg = 0x17c, 1589 + .num_ports = 2, 1590 + .phy_tuning = rk3128_usb2phy_tuning, 1591 + .clkout_ctl = { 0x017c, 11, 11, 1, 0 }, 1592 + .port_cfgs = { 1593 + [USB2PHY_PORT_OTG] = { 1594 + .phy_sus = { 0x017c, 8, 0, 0, 0x1d1 }, 1595 + .bvalid_det_en = { 0x017c, 14, 14, 0, 1 }, 1596 + .bvalid_det_st = { 0x017c, 15, 15, 0, 1 }, 1597 + .bvalid_det_clr = { 0x017c, 15, 15, 0, 1 }, 1598 + .ls_det_en = { 0x017c, 12, 12, 0, 1 }, 1599 + .ls_det_st = { 0x017c, 13, 13, 0, 1 }, 1600 + .ls_det_clr = { 0x017c, 13, 13, 0, 1 }, 1601 + .utmi_bvalid = { 0x014c, 8, 8, 0, 1 }, 1602 + .utmi_id = { 0x014c, 11, 11, 0, 1 }, 1603 + .utmi_ls = { 0x014c, 10, 9, 0, 1 }, 1604 + 1605 + }, 1606 + [USB2PHY_PORT_HOST] = { 1607 + .phy_sus = { 0x0194, 8, 0, 0, 0x1d1 }, 1608 + .ls_det_en = { 0x0194, 14, 14, 0, 1 }, 1609 + .ls_det_st = { 0x0194, 15, 15, 0, 1 }, 1610 + .ls_det_clr = { 0x0194, 15, 15, 0, 1 } 1611 + } 1612 + }, 1613 + }, 1614 + { /* sentinel */ } 1615 + }; 1616 + 1586 1617 static const struct rockchip_usb2phy_cfg rk3128_phy_cfgs[] = { 1587 1618 { 1588 1619 .reg = 0x17c, ··· 2235 2204 2236 2205 static const struct of_device_id rockchip_usb2phy_dt_match[] = { 2237 2206 { .compatible = "rockchip,px30-usb2phy", .data = &rk3328_phy_cfgs }, 2207 + { .compatible = "rockchip,rk3036-usb2phy", .data = &rk3036_phy_cfgs }, 2238 2208 { .compatible = "rockchip,rk3128-usb2phy", .data = &rk3128_phy_cfgs }, 2239 2209 { .compatible = "rockchip,rk3228-usb2phy", .data = &rk3228_phy_cfgs }, 2240 2210 { .compatible = "rockchip,rk3308-usb2phy", .data = &rk3308_phy_cfgs },