diff mbox series

[v1,2/4] rockchip: usb: phy: add rk3066/rk3188 support

Message ID 20220429214008.26977-2-jbx6244@gmail.com
State Accepted
Commit 42a2f7a46d8e4aff7415a6fbfe7507d5f08c4715
Delegated to: Kever Yang
Headers show
Series [v1,1/4] rockchip: usb: gadget: add rk3066 product id | expand

Commit Message

Johan Jonker April 29, 2022, 9:40 p.m. UTC
Add rk3066a/rk3188 support to rockchip_usb2_phy.c
They don't have completely identical usb phy registers,
so separate comapatible strings and data.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 drivers/usb/phy/rockchip_usb2_phy.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Kever Yang May 26, 2022, 7:01 a.m. UTC | #1
On 2022/4/30 05:40, Johan Jonker wrote:
> Add rk3066a/rk3188 support to rockchip_usb2_phy.c
> They don't have completely identical usb phy registers,
> so separate comapatible strings and data.
>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/usb/phy/rockchip_usb2_phy.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
> index 93caa821..c46ad86d 100644
> --- a/drivers/usb/phy/rockchip_usb2_phy.c
> +++ b/drivers/usb/phy/rockchip_usb2_phy.c
> @@ -42,6 +42,12 @@ struct rockchip_usb2_phy_dt_id {
>   	const void	*data;
>   };
>   
> +static const struct rockchip_usb2_phy_cfg rk3066a_pdata = {
> +	.port_reset	= {0x00, 12, 12, 0, 1},
> +	.soft_con	= {0x08, 2, 2, 0, 1},
> +	.suspend	= {0x08, 8, 3, (0x01 << 3), (0x2A << 3)},
> +};
> +
>   static const struct rockchip_usb2_phy_cfg rk3288_pdata = {
>   	.port_reset     = {0x00, 12, 12, 0, 1},
>   	.soft_con       = {0x08, 2, 2, 0, 1},
> @@ -49,6 +55,8 @@ static const struct rockchip_usb2_phy_cfg rk3288_pdata = {
>   };
>   
>   static struct rockchip_usb2_phy_dt_id rockchip_usb2_phy_dt_ids[] = {
> +	{ .compatible = "rockchip,rk3066a-usb-phy", .data = &rk3066a_pdata },
> +	{ .compatible = "rockchip,rk3188-usb-phy", .data = &rk3288_pdata },
>   	{ .compatible = "rockchip,rk3288-usb-phy", .data = &rk3288_pdata },
>   	{}
>   };
diff mbox series

Patch

diff --git a/drivers/usb/phy/rockchip_usb2_phy.c b/drivers/usb/phy/rockchip_usb2_phy.c
index 93caa821..c46ad86d 100644
--- a/drivers/usb/phy/rockchip_usb2_phy.c
+++ b/drivers/usb/phy/rockchip_usb2_phy.c
@@ -42,6 +42,12 @@  struct rockchip_usb2_phy_dt_id {
 	const void	*data;
 };
 
+static const struct rockchip_usb2_phy_cfg rk3066a_pdata = {
+	.port_reset	= {0x00, 12, 12, 0, 1},
+	.soft_con	= {0x08, 2, 2, 0, 1},
+	.suspend	= {0x08, 8, 3, (0x01 << 3), (0x2A << 3)},
+};
+
 static const struct rockchip_usb2_phy_cfg rk3288_pdata = {
 	.port_reset     = {0x00, 12, 12, 0, 1},
 	.soft_con       = {0x08, 2, 2, 0, 1},
@@ -49,6 +55,8 @@  static const struct rockchip_usb2_phy_cfg rk3288_pdata = {
 };
 
 static struct rockchip_usb2_phy_dt_id rockchip_usb2_phy_dt_ids[] = {
+	{ .compatible = "rockchip,rk3066a-usb-phy", .data = &rk3066a_pdata },
+	{ .compatible = "rockchip,rk3188-usb-phy", .data = &rk3288_pdata },
 	{ .compatible = "rockchip,rk3288-usb-phy", .data = &rk3288_pdata },
 	{}
 };