rockchip: usb: gadget: add rk3066 product id
Subsystems (4)
PATCH 1/4 rockchip: usb: gadget: add rk3066 product id
From: Paweł Jarosz <[email protected]>
Product id of rk3066 usb otg is 0x300a.
--- drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/usb/gadget/Kconfig +1 -0
@@ -61,6 +61,7 @@ config USB_GADGET_PRODUCT_NUM hex "Product ID of the USB device" default 0x1010 if ARCH_SUNXI default 0x310a if ROCKCHIP_RK3036 + default 0x300a if ROCKCHIP_RK3066 default 0x310c if ROCKCHIP_RK3128 default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288 default 0x330a if ROCKCHIP_RK3328
Signature · 1 line
2.20.1
PATCH 2/4 rockchip: usb: phy: add rk3066/rk3188 support
Add rk3066a/rk3188 support to rockchip_usb2_phy.c They don't have completely identical usb phy registers, so separate comapatible strings and data.
--- drivers/usb/phy/rockchip_usb2_phy.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/usb/phy/rockchip_usb2_phy.c +8 -0
@@ -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 }, {} };
Signature · 1 line
2.20.1
Re: [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support
Quoted 5 lines · Johan Jonker
Add rk3066a/rk3188 support to
rockchip_usb2_phy.cThey don't have completely identical usb phy registers, so separate comapatible strings and data.Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 30 lines
--- drivers/usb/phy/rockchip_usb2_phy.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/usb/phy/rockchip_usb2_phy.c +8
-0@@ -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 }, {} };
PATCH 3/4 rockchip: board: change condition board_usb_init() in function
In reply to Johan JonkerChange define condition in board_usb_init() function to allow rk3066/rk3188 to use the USB PHY driver.
--- arch/arm/mach-rockchip/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-rockchip/board.c +1 -1
@@ -90,7 +90,7 @@ int board_usb_init(int index, enum usb_init_type init) } otg_data.regs_otg =ofnode_get_addr (node); -#ifdef CONFIG_ROCKCHIP_RK3288 +#ifdef CONFIG_ROCKCHIP_USB2_PHY int ret;u32 phandle, offset;ofnode phy_node;
Signature · 1 line
2.20.1
Re: [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function
Quoted 4 lines · Johan Jonker
Change define condition in
board_usb_init()function to allow rk3066/rk3188 to use the USB PHY driver.Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 17 lines
--- arch/arm/mach-rockchip/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-rockchip/board.c +1
-1@@ -90,7 +90,7 @@ int board_usb_init(int index, enum usb_init_type init) } otg_data.regs_otg =ofnode_get_addr (node); -#ifdef CONFIG_ROCKCHIP_RK3288 +#ifdef CONFIG_ROCKCHIP_USB2_PHY int ret;u32 phandle, offset;ofnode phy_node;
PATCH 4/4 arm: dts: rockchip: remove usb-phy fallback string for rk3188
In reply to Johan JonkerWith the conversion of rockchip-usb-phy.yaml a long time used fallback string for rk3066a/rk3188 was added. The linux driver doesn't do much with the GRF phy address range, however the u-boot driver rockchip_usb2_phy.c does. The bits in GRF_UOC0_CON2 for rk3066a/rk3188 and rk3288 for example don't match. Remove the usb-phy fallback string for rk3188
to prevent possible strange side effects.
--- arch/arm/dts/rk3188.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/dts/rk3188.dtsi +1 -2
@@ -642,8 +642,7 @@ compatible = "rockchip,rk3188-grf", "syscon", "simple-mfd"; usbphy: usbphy { - compatible = "rockchip,rk3188-usb-phy", - "rockchip,rk3288-usb-phy"; + compatible = "rockchip,rk3188-usb-phy"; #address-cells = <1>; #size-cells = <0>; status = "disabled";
Signature · 1 line
2.20.1
Re: [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188
Quoted 8 lines · Johan Jonker
With the conversion of
rockchip-usb-phy.yamla long time used fallback string for rk3066a/rk3188 was added. The linux driver doesn't do much with the GRF phy address range, however the u-boot driverrockchip_usb2_phy.cdoes. The bits inGRF_UOC0_CON2for rk3066a/rk3188 and rk3288 for example don't match. Remove the usb-phy fallback string for rk3188
to prevent possible strange side effects.Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 18 lines
--- arch/arm/dts/rk3188.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arm/dts/rk3188.dtsi +1
-2@@ -642,8 +642,7 @@ compatible = "rockchip,rk3188-grf", "syscon", "simple-mfd"; usbphy: usbphy { - compatible = "rockchip,rk3188-usb-phy", - "rockchip,rk3288-usb-phy"; + compatible = "rockchip,rk3188-usb-phy"; #address-cells = <1>; #size-cells = <0>; status = "disabled";
Quoted 6 lines · Johan Jonker
From: Paweł Jarosz <[email protected]>
Product id of rk3066 usb otg is
0x300a.Signed-off-by Paweł Jarosz <[email protected]>Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 16 lines
--- drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/usb/gadget/Kconfig +1
-0@@ -61,6 +61,7 @@ config USB_GADGET_PRODUCT_NUM hex "Product ID of the USB device" default 0x1010 if ARCH_SUNXI default 0x310a if ROCKCHIP_RK3036 + default 0x300a if ROCKCHIP_RK3066 default 0x310c if ROCKCHIP_RK3128 default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288 default 0x330a if ROCKCHIP_RK3328