* [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id @ 2022-04-29 21:40 Johan Jonker 2022-04-29 21:40 ` [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support Johan Jonker ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: Johan Jonker @ 2022-04-29 21:40 UTC (permalink / raw) To: kever.yang; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot From: Paweł Jarosz <paweljarosz3691@gmail.com> Product id of rk3066 usb otg is 0x300a. Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> Signed-off-by: Johan Jonker <jbx6244@gmail.com> --- drivers/usb/gadget/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index d81a9c5a..8c6cf474 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -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 -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support 2022-04-29 21:40 [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Johan Jonker @ 2022-04-29 21:40 ` Johan Jonker 2022-05-26 7:01 ` Kever Yang 2022-04-29 21:40 ` [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function Johan Jonker ` (2 subsequent siblings) 3 siblings, 1 reply; 8+ messages in thread From: Johan Jonker @ 2022-04-29 21:40 UTC (permalink / raw) To: kever.yang; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot 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(+) 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 }, {} }; -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support 2022-04-29 21:40 ` [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support Johan Jonker @ 2022-05-26 7:01 ` Kever Yang 0 siblings, 0 replies; 8+ messages in thread From: Kever Yang @ 2022-05-26 7:01 UTC (permalink / raw) To: Johan Jonker; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot 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 }, > {} > }; ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function 2022-04-29 21:40 [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Johan Jonker 2022-04-29 21:40 ` [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support Johan Jonker @ 2022-04-29 21:40 ` Johan Jonker 2022-05-26 7:01 ` Kever Yang 2022-04-29 21:40 ` [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188 Johan Jonker 2022-05-26 7:01 ` [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Kever Yang 3 siblings, 1 reply; 8+ messages in thread From: Johan Jonker @ 2022-04-29 21:40 UTC (permalink / raw) To: kever.yang; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot Change define condition in board_usb_init() function to allow rk3066/rk3188 to use the USB PHY driver. Signed-off-by: Johan Jonker <jbx6244@gmail.com> --- arch/arm/mach-rockchip/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 5304eb05..cbe00d64 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -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; -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function 2022-04-29 21:40 ` [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function Johan Jonker @ 2022-05-26 7:01 ` Kever Yang 0 siblings, 0 replies; 8+ messages in thread From: Kever Yang @ 2022-05-26 7:01 UTC (permalink / raw) To: Johan Jonker; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot On 2022/4/30 05:40, Johan Jonker wrote: > Change define condition in board_usb_init() function > to allow rk3066/rk3188 to use the USB PHY driver. > > Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > arch/arm/mach-rockchip/board.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c > index 5304eb05..cbe00d64 100644 > --- a/arch/arm/mach-rockchip/board.c > +++ b/arch/arm/mach-rockchip/board.c > @@ -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; ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188 2022-04-29 21:40 [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Johan Jonker 2022-04-29 21:40 ` [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support Johan Jonker 2022-04-29 21:40 ` [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function Johan Jonker @ 2022-04-29 21:40 ` Johan Jonker 2022-05-26 7:02 ` Kever Yang 2022-05-26 7:01 ` [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Kever Yang 3 siblings, 1 reply; 8+ messages in thread From: Johan Jonker @ 2022-04-29 21:40 UTC (permalink / raw) To: kever.yang; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot With 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. Signed-off-by: Johan Jonker <jbx6244@gmail.com> --- arch/arm/dts/rk3188.dtsi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/dts/rk3188.dtsi b/arch/arm/dts/rk3188.dtsi index 6764776c..9a80f83a 100644 --- a/arch/arm/dts/rk3188.dtsi +++ b/arch/arm/dts/rk3188.dtsi @@ -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"; -- 2.20.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188 2022-04-29 21:40 ` [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188 Johan Jonker @ 2022-05-26 7:02 ` Kever Yang 0 siblings, 0 replies; 8+ messages in thread From: Kever Yang @ 2022-05-26 7:02 UTC (permalink / raw) To: Johan Jonker; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot On 2022/4/30 05:40, Johan Jonker wrote: > With 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. > > Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > arch/arm/dts/rk3188.dtsi | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/arm/dts/rk3188.dtsi b/arch/arm/dts/rk3188.dtsi > index 6764776c..9a80f83a 100644 > --- a/arch/arm/dts/rk3188.dtsi > +++ b/arch/arm/dts/rk3188.dtsi > @@ -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"; ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id 2022-04-29 21:40 [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Johan Jonker ` (2 preceding siblings ...) 2022-04-29 21:40 ` [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188 Johan Jonker @ 2022-05-26 7:01 ` Kever Yang 3 siblings, 0 replies; 8+ messages in thread From: Kever Yang @ 2022-05-26 7:01 UTC (permalink / raw) To: Johan Jonker; +Cc: sjg, philipp.tomsich, lukma, marex, u-boot On 2022/4/30 05:40, Johan Jonker wrote: > From: Paweł Jarosz <paweljarosz3691@gmail.com> > > Product id of rk3066 usb otg is 0x300a. > > Signed-off-by: Paweł Jarosz <paweljarosz3691@gmail.com> > Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > drivers/usb/gadget/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig > index d81a9c5a..8c6cf474 100644 > --- a/drivers/usb/gadget/Kconfig > +++ b/drivers/usb/gadget/Kconfig > @@ -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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-05-26 7:02 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-04-29 21:40 [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Johan Jonker 2022-04-29 21:40 ` [PATCH v1 2/4] rockchip: usb: phy: add rk3066/rk3188 support Johan Jonker 2022-05-26 7:01 ` Kever Yang 2022-04-29 21:40 ` [PATCH v1 3/4] rockchip: board: change condition board_usb_init() in function Johan Jonker 2022-05-26 7:01 ` Kever Yang 2022-04-29 21:40 ` [PATCH v1 4/4] arm: dts: rockchip: remove usb-phy fallback string for rk3188 Johan Jonker 2022-05-26 7:02 ` Kever Yang 2022-05-26 7:01 ` [PATCH v1 1/4] rockchip: usb: gadget: add rk3066 product id Kever Yang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.