phy: sun4i-usb: Rework HCI PHY (aka "pmu_unk1") handling
authorAndre Przywara <andre.przywara@arm.com>
Thu, 3 Feb 2022 01:35:56 +0000 (19:35 -0600)
committerVinod Koul <vkoul@kernel.org>
Fri, 25 Feb 2022 08:23:21 +0000 (13:53 +0530)
commit1743dea7f06b939f67ba258bab993fa5ff6e43fb
tree1850c239b8fae97fe20f9b3ab975aef59e4b5dde
parent5df4afa1e4388744f20177bdfbaf4fcafc31017b
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>
Link: https://lore.kernel.org/r/20220203013558.11490-3-samuel@sholland.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/allwinner/phy-sun4i-usb.c