]> asedeno.scripts.mit.edu Git - linux.git/commit
phy: rockchip-typec: deprecate some DT properties for various register fields.
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Fri, 16 Feb 2018 12:09:51 +0000 (13:09 +0100)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 16 Mar 2018 11:25:31 +0000 (16:55 +0530)
commit0fbc47d9e426a934668dbfeb0db26da6f0b7f35c
tree36fc53d0f4d0e91fc73f5cf035b479d2af1a1b64
parent5d1ebbda0318b1ba55eaa1fae3fd867af17b0774
phy: rockchip-typec: deprecate some DT properties for various register fields.

Adding properties for various register fields in the DT doesn't scale and
this information should be in the driver instead.

Before this patch these registers (description below) were specified in
the DT, every register node contained 3 sections: offset, enable bit,
write mask bit.

 - rockchip,typec-conn-dir : the register of type-c connector direction,
   for type-c phy0, it must be <0xe580 0 16>;
   for type-c phy1, it must be <0xe58c 0 16>;
 - rockchip,usb3tousb2-en : the register of type-c force usb3 to usb2
   enable control.
   for type-c phy0, it must be <0xe580 3 19>;
   for type-c phy1, it must be <0xe58c 3 19>;
 - rockchip,external-psm : the register of type-c phy external psm clock
   selection.
   for type-c phy0, it must be <0xe588 14 30>;
   for type-c phy1, it must be <0xe594 14 30>;
 - rockchip,pipe-status : the register of type-c phy pipe status.
   for type-c phy0, it must be <0xe5c0 0 0>;
   for type-c phy1, it must be <0xe5c0 16 16>;

After this patch these register definitions are in the driver. So can be
removed from the DT. Note that there are 2 type-c phys for RK3399 with
different offsets, the driver checks the phy base address of the running
instance and applies the right offsets.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/rockchip/phy-rockchip-typec.c