phy: sun4i-usb: Rework HCI PHY (aka "pmu_unk1") handling
authorAndre Przywara <andre.przywara@arm.com>
Fri, 15 Jul 2022 04:09:21 +0000 (23:09 -0500)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 18 Jul 2022 22:48:30 +0000 (23:48 +0100)
commitb33ee49ac10ce2e400d171c1018db2359b25fb96
tree3c822bae4f11a542b90df58574f85edc48ff60d8
parent64331352cb75b722df848ff11449737fa78204b3
phy: sun4i-usb: Rework HCI PHY (aka "pmu_unk1") handling

As Icenowy pointed out, newer manuals (starting with H6) actually
document the register block at offset 0x800 as "HCI controller and PHY
interface", also describe the bits in our "PMU_UNK1" register.
Let's put proper names to those "unknown" variables and symbols.

While we are at it, generalise the existing code by allowing a bitmap
of bits to clear and set, to cover newer SoCs: The A100 and H616 use a
different bit for the SIDDQ control.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
drivers/phy/allwinner/phy-sun4i-usb.c