* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
@ 2015-10-07 0:30 Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 1/3] dt-bindings: usb: usb5303: Document new 'phys' property Krzysztof Kozlowski
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-07 0:30 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Introduction
============
This patchset tries to fix probing of usb3503 on Arndale board
if the Samsung PHY driver is probed later (or built as a module).
*The patchset was not tested on Arndale board.*
I don't have that board. Please test it and say if the usb3503 deferred probe
works fine and the issue is solved.
The patchset was tested on Odroid U3 board (which is different!)
in a simulated environment. It is not sufficient testing.
Difference
==========
The usb3503 device driver can be used as a I2C device (on Odroid U3)
or as a platform device connected through phy (on Arndale). In the second
case the necessary phy reference has to be obtained and enabled.
For some details please look also at thread [0][1].
[0] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348524.html
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348875.html
Best regards,
Krzysztof
Krzysztof Kozlowski (3):
dt-bindings: usb: usb5303: Document new 'phys' property
usb: misc: usb3503: Allow usage of device through phy interface
ARM: dts: Fix usb3503 probe by enabling phy on exynos5250-arndale
Documentation/devicetree/bindings/usb/usb3503.txt | 4 ++
arch/arm/boot/dts/exynos5250-arndale.dts | 2 +
drivers/usb/misc/usb3503.c | 65 +++++++++++++++++++++++
3 files changed, 71 insertions(+)
--
1.9.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFT 1/3] dt-bindings: usb: usb5303: Document new 'phys' property
2015-10-07 0:30 [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Krzysztof Kozlowski
@ 2015-10-07 0:30 ` Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 2/3] usb: misc: usb3503: Allow usage of device through phy interface Krzysztof Kozlowski
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-07 0:30 UTC (permalink / raw)
To: linux-arm-kernel
Document new 'phys' and 'phys-names' properties.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: riku.voipio at linaro.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
---
Documentation/devicetree/bindings/usb/usb3503.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt
index 52493b1480e2..773c8d722c13 100644
--- a/Documentation/devicetree/bindings/usb/usb3503.txt
+++ b/Documentation/devicetree/bindings/usb/usb3503.txt
@@ -15,6 +15,8 @@ Optional properties:
- reset-gpios: Should specify GPIO for reset.
- initial-mode: Should specify initial mode.
(1 for HUB mode, 2 for STANDBY mode)
+- phys: One PHY specifier (refer to generic PHY bindings).
+- phy-names: If 'phys' is present, then it must be 'usb2-phy'.
- refclk: Clock used for driving REFCLK signal (optional, if not provided
the driver assumes that clock signal is always available, its
rate is specified by REF_SEL pins and a value from the primary
@@ -33,4 +35,6 @@ Examples:
intn-gpios = <&gpx3 4 1>;
reset-gpios = <&gpx3 5 1>;
initial-mode = <1>;
+ phys = <&usb2_phy_gen 3>;
+ phy-names = "usb2-phy";
};
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFT 2/3] usb: misc: usb3503: Allow usage of device through phy interface
2015-10-07 0:30 [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 1/3] dt-bindings: usb: usb5303: Document new 'phys' property Krzysztof Kozlowski
@ 2015-10-07 0:30 ` Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 3/3] ARM: dts: Fix usb3503 probe by enabling phy on exynos5250-arndale Krzysztof Kozlowski
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-07 0:30 UTC (permalink / raw)
To: linux-arm-kernel
The USB3503 hub controller can be connected through I2C interface (e.g.
on Odroid-U3 board) or directly by phy (e.g. on Arndale board). Thus the
usb3503 driver can act as a i2c or platform device.
In the second configuration (phy) the driver did not get a reference to
necessary phy to use it. This lead to probe failure if PHY driver was
probed after usb3503 probe.
The patch adds support for generic phy framework so the driver will the
phy reference (if provided) and use it.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: Kevin Hilman <khilman@kernel.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: riku.voipio at linaro.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/usb/misc/usb3503.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index 64ff5b91752d..e9423fc28105 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -27,6 +27,7 @@
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
#include <linux/platform_data/usb3503.h>
+#include <linux/phy/phy.h>
#include <linux/regmap.h>
#define USB3503_VIDL 0x00
@@ -59,6 +60,7 @@ struct usb3503 {
struct regmap *regmap;
struct device *dev;
struct clk *clk;
+ struct phy *phy;
u8 port_off_mask;
int gpio_intn;
int gpio_reset;
@@ -66,6 +68,29 @@ struct usb3503 {
bool secondary_ref_clk;
};
+static int usb3503_phy_on(struct usb3503 *hub)
+{
+ int err;
+
+ err = phy_power_on(hub->phy);
+ if (err)
+ return err;
+
+ err = phy_init(hub->phy);
+ if (err) {
+ phy_power_off(hub->phy);
+ return err;
+ }
+
+ return 0;
+}
+
+static void usb3503_phy_off(struct usb3503 *hub)
+{
+ phy_exit(hub->phy);
+ phy_power_off(hub->phy);
+}
+
static int usb3503_reset(struct usb3503 *hub, int state)
{
if (!state && gpio_is_valid(hub->gpio_connect))
@@ -189,6 +214,13 @@ static int usb3503_probe(struct usb3503 *hub)
u32 rate = 0;
hub->port_off_mask = 0;
+ hub->phy = devm_phy_optional_get(dev, "usb2-phy");
+ if (IS_ERR(hub->phy)) {
+ err = PTR_ERR(hub->phy);
+ if (err != -EPROBE_DEFER)
+ dev_err(dev, "unable to get phy: %d\n", err);
+ return err;
+ }
if (!of_property_read_u32(np, "refclk-frequency", &rate)) {
switch (rate) {
case 38400000:
@@ -300,6 +332,10 @@ static int usb3503_probe(struct usb3503 *hub)
}
}
+ err = usb3503_phy_on(hub);
+ if (err)
+ return err;
+
usb3503_switch_mode(hub, hub->mode);
dev_info(dev, "%s: probed in %s mode\n", __func__,
@@ -339,9 +375,29 @@ static int usb3503_platform_probe(struct platform_device *pdev)
return -ENOMEM;
hub->dev = &pdev->dev;
+ platform_set_drvdata(pdev, hub);
+
return usb3503_probe(hub);
}
+static int usb3503_i2c_remove(struct i2c_client *i2c)
+{
+ struct usb3503 *hub = i2c_get_clientdata(i2c);
+
+ usb3503_phy_off(hub);
+
+ return 0;
+}
+
+static int usb3503_platform_remove(struct platform_device *pdev)
+{
+ struct usb3503 *hub = platform_get_drvdata(pdev);
+
+ usb3503_phy_off(hub);
+
+ return 0;
+}
+
#ifdef CONFIG_PM_SLEEP
static int usb3503_i2c_suspend(struct device *dev)
{
@@ -350,6 +406,8 @@ static int usb3503_i2c_suspend(struct device *dev)
usb3503_switch_mode(hub, USB3503_MODE_STANDBY);
+ usb3503_phy_off(hub);
+
if (hub->clk)
clk_disable_unprepare(hub->clk);
@@ -360,10 +418,15 @@ static int usb3503_i2c_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct usb3503 *hub = i2c_get_clientdata(client);
+ int err;
if (hub->clk)
clk_prepare_enable(hub->clk);
+ err = usb3503_phy_on(hub);
+ if (err)
+ return err;
+
usb3503_switch_mode(hub, hub->mode);
return 0;
@@ -395,6 +458,7 @@ static struct i2c_driver usb3503_i2c_driver = {
.of_match_table = of_match_ptr(usb3503_of_match),
},
.probe = usb3503_i2c_probe,
+ .remove = usb3503_i2c_remove,
.id_table = usb3503_id,
};
@@ -404,6 +468,7 @@ static struct platform_driver usb3503_platform_driver = {
.of_match_table = of_match_ptr(usb3503_of_match),
},
.probe = usb3503_platform_probe,
+ .remove = usb3503_platform_remove,
};
static int __init usb3503_init(void)
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFT 3/3] ARM: dts: Fix usb3503 probe by enabling phy on exynos5250-arndale
2015-10-07 0:30 [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 1/3] dt-bindings: usb: usb5303: Document new 'phys' property Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 2/3] usb: misc: usb3503: Allow usage of device through phy interface Krzysztof Kozlowski
@ 2015-10-07 0:30 ` Krzysztof Kozlowski
2015-10-07 14:26 ` [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Marek Szyprowski
2015-10-09 19:18 ` Kevin Hilman
4 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-07 0:30 UTC (permalink / raw)
To: linux-arm-kernel
On Arndale board (unlike Odroid U3) the USB3503 hub controller is
connected in phy mode (not through I2C). For successful probe it needs
to get reference to proper phy and enable it.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: Kevin Hilman <khilman@kernel.org>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: riku.voipio at linaro.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
---
arch/arm/boot/dts/exynos5250-arndale.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
index c000532c1444..e213f31acbf3 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -114,6 +114,8 @@
reset-gpios = <&gpx3 5 GPIO_ACTIVE_LOW>;
connect-gpios = <&gpd1 7 GPIO_ACTIVE_LOW>;
+ phys = <&usb2_phy_gen 3>;
+ phy-names = "usb2-phy";
};
};
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
2015-10-07 0:30 [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Krzysztof Kozlowski
` (2 preceding siblings ...)
2015-10-07 0:30 ` [RFT 3/3] ARM: dts: Fix usb3503 probe by enabling phy on exynos5250-arndale Krzysztof Kozlowski
@ 2015-10-07 14:26 ` Marek Szyprowski
2015-10-08 6:02 ` Krzysztof Kozlowski
2015-10-09 19:18 ` Kevin Hilman
4 siblings, 1 reply; 11+ messages in thread
From: Marek Szyprowski @ 2015-10-07 14:26 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On 2015-10-07 02:30, Krzysztof Kozlowski wrote:
> Introduction
> ============
> This patchset tries to fix probing of usb3503 on Arndale board
> if the Samsung PHY driver is probed later (or built as a module).
>
> *The patchset was not tested on Arndale board.*
> I don't have that board. Please test it and say if the usb3503 deferred probe
> works fine and the issue is solved.
>
> The patchset was tested on Odroid U3 board (which is different!)
> in a simulated environment. It is not sufficient testing.
>
>
> Difference
> ==========
> The usb3503 device driver can be used as a I2C device (on Odroid U3)
> or as a platform device connected through phy (on Arndale). In the second
> case the necessary phy reference has to be obtained and enabled.
>
> For some details please look also at thread [0][1].
>
> [0] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348524.html
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348875.html
>
I'm not sure that this is the correct approach. usb3503 chip is simply
connected
to Exynos USB2 phy, so it visible on the USB bus. The real driver that
controls USB2
PHY is Exynos EHCI driver and USB3503 should not mess around it.
In my opinion all that is needed in case of Arndale board is forcing
reset of
usb3503 chip after successful EHCI and USB2 PHY initialization (for some
reason
initialization of usb3503 chip must be done after usb host initialization).
However I have no idea which driver should trigger this reset. Right now
I didn't
find any good solution for additional control for devices which are on
autoprobed
bus like usb.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
2015-10-07 14:26 ` [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Marek Szyprowski
@ 2015-10-08 6:02 ` Krzysztof Kozlowski
2015-10-08 6:23 ` Marek Szyprowski
0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-08 6:02 UTC (permalink / raw)
To: linux-arm-kernel
On 07.10.2015 23:26, Marek Szyprowski wrote:
> Hello,
>
> On 2015-10-07 02:30, Krzysztof Kozlowski wrote:
>> Introduction
>> ============
>> This patchset tries to fix probing of usb3503 on Arndale board
>> if the Samsung PHY driver is probed later (or built as a module).
>>
>> *The patchset was not tested on Arndale board.*
>> I don't have that board. Please test it and say if the usb3503
>> deferred probe
>> works fine and the issue is solved.
>>
>> The patchset was tested on Odroid U3 board (which is different!)
>> in a simulated environment. It is not sufficient testing.
>>
>>
>> Difference
>> ==========
>> The usb3503 device driver can be used as a I2C device (on Odroid U3)
>> or as a platform device connected through phy (on Arndale). In the second
>> case the necessary phy reference has to be obtained and enabled.
>>
>> For some details please look also at thread [0][1].
>>
>> [0]
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348524.html
>>
>> [1]
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348875.html
>>
>>
>
> I'm not sure that this is the correct approach. usb3503 chip is simply
> connected
> to Exynos USB2 phy, so it visible on the USB bus. The real driver that
> controls USB2
> PHY is Exynos EHCI driver and USB3503 should not mess around it.
The ehci node (usb at 12110000) has one port configured and it takes one
PHY reference (phy of id 1 - USB host). I can't see driver taking
reference to HSIC0 or HSIC1 phys... Since I cannot diagnose the error I
don't know what is really expected here.
>
> In my opinion all that is needed in case of Arndale board is forcing
> reset of
> usb3503 chip after successful EHCI and USB2 PHY initialization (for some
> reason
> initialization of usb3503 chip must be done after usb host initialization).
> However I have no idea which driver should trigger this reset. Right now
> I didn't
> find any good solution for additional control for devices which are on
> autoprobed
> bus like usb.
The reset is done at the end of usb3503's probe. The question "why
usb3503 has to be initialized after EHCI and USB PHY" is still valid...
Anyway thanks for feedback! I really appreciate it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
2015-10-08 6:02 ` Krzysztof Kozlowski
@ 2015-10-08 6:23 ` Marek Szyprowski
2015-10-08 9:35 ` Javier Martinez Canillas
0 siblings, 1 reply; 11+ messages in thread
From: Marek Szyprowski @ 2015-10-08 6:23 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On 2015-10-08 08:02, Krzysztof Kozlowski wrote:
> On 07.10.2015 23:26, Marek Szyprowski wrote:
>> Hello,
>>
>> On 2015-10-07 02:30, Krzysztof Kozlowski wrote:
>>> Introduction
>>> ============
>>> This patchset tries to fix probing of usb3503 on Arndale board
>>> if the Samsung PHY driver is probed later (or built as a module).
>>>
>>> *The patchset was not tested on Arndale board.*
>>> I don't have that board. Please test it and say if the usb3503
>>> deferred probe
>>> works fine and the issue is solved.
>>>
>>> The patchset was tested on Odroid U3 board (which is different!)
>>> in a simulated environment. It is not sufficient testing.
>>>
>>>
>>> Difference
>>> ==========
>>> The usb3503 device driver can be used as a I2C device (on Odroid U3)
>>> or as a platform device connected through phy (on Arndale). In the second
>>> case the necessary phy reference has to be obtained and enabled.
>>>
>>> For some details please look also at thread [0][1].
>>>
>>> [0]
>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348524.html
>>>
>>> [1]
>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348875.html
>>>
>>>
>> I'm not sure that this is the correct approach. usb3503 chip is simply
>> connected
>> to Exynos USB2 phy, so it visible on the USB bus. The real driver that
>> controls USB2
>> PHY is Exynos EHCI driver and USB3503 should not mess around it.
> The ehci node (usb at 12110000) has one port configured and it takes one
> PHY reference (phy of id 1 - USB host). I can't see driver taking
> reference to HSIC0 or HSIC1 phys... Since I cannot diagnose the error I
> don't know what is really expected here.
It looks that EHCI in Exynos 5250 and 5420 still use old phy bindings. For
the reference, see Exynos4 dts and exynos4412-odroidu3.dts to check how
to enable
more than one USB port (Odroid U3 has both HSIC ports enabled).
>
>> In my opinion all that is needed in case of Arndale board is forcing
>> reset of
>> usb3503 chip after successful EHCI and USB2 PHY initialization (for some
>> reason
>> initialization of usb3503 chip must be done after usb host initialization).
>> However I have no idea which driver should trigger this reset. Right now
>> I didn't
>> find any good solution for additional control for devices which are on
>> autoprobed
>> bus like usb.
> The reset is done at the end of usb3503's probe. The question "why
> usb3503 has to be initialized after EHCI and USB PHY" is still valid...
I remember that I saw some code to reset HSIC device after phy power on
in case
of HSIC-connected modem chip, so maybe this is somehow common for HSIC chips
(which are some special case of 'embedded usb').
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
2015-10-08 6:23 ` Marek Szyprowski
@ 2015-10-08 9:35 ` Javier Martinez Canillas
2015-10-08 9:58 ` Marek Szyprowski
0 siblings, 1 reply; 11+ messages in thread
From: Javier Martinez Canillas @ 2015-10-08 9:35 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On 10/08/2015 08:23 AM, Marek Szyprowski wrote:
> Hello,
>
> On 2015-10-08 08:02, Krzysztof Kozlowski wrote:
>> On 07.10.2015 23:26, Marek Szyprowski wrote:
>>> Hello,
>>>
>>> On 2015-10-07 02:30, Krzysztof Kozlowski wrote:
>>>> Introduction
>>>> ============
>>>> This patchset tries to fix probing of usb3503 on Arndale board
>>>> if the Samsung PHY driver is probed later (or built as a module).
>>>>
>>>> *The patchset was not tested on Arndale board.*
>>>> I don't have that board. Please test it and say if the usb3503
>>>> deferred probe
>>>> works fine and the issue is solved.
>>>>
>>>> The patchset was tested on Odroid U3 board (which is different!)
>>>> in a simulated environment. It is not sufficient testing.
>>>>
>>>>
>>>> Difference
>>>> ==========
>>>> The usb3503 device driver can be used as a I2C device (on Odroid U3)
>>>> or as a platform device connected through phy (on Arndale). In the second
>>>> case the necessary phy reference has to be obtained and enabled.
>>>>
>>>> For some details please look also at thread [0][1].
>>>>
>>>> [0]
>>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348524.html
>>>>
>>>> [1]
>>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348875.html
>>>>
>>>>
>>> I'm not sure that this is the correct approach. usb3503 chip is simply
>>> connected
>>> to Exynos USB2 phy, so it visible on the USB bus. The real driver that
>>> controls USB2
>>> PHY is Exynos EHCI driver and USB3503 should not mess around it.
>> The ehci node (usb at 12110000) has one port configured and it takes one
>> PHY reference (phy of id 1 - USB host). I can't see driver taking
>> reference to HSIC0 or HSIC1 phys... Since I cannot diagnose the error I
>> don't know what is really expected here.
>
> It looks that EHCI in Exynos 5250 and 5420 still use old phy bindings. For
> the reference, see Exynos4 dts and exynos4412-odroidu3.dts to check how to enable
> more than one USB port (Odroid U3 has both HSIC ports enabled).
>
>>
>>> In my opinion all that is needed in case of Arndale board is forcing
>>> reset of
>>> usb3503 chip after successful EHCI and USB2 PHY initialization (for some
>>> reason
>>> initialization of usb3503 chip must be done after usb host initialization).
>>> However I have no idea which driver should trigger this reset. Right now
>>> I didn't
>>> find any good solution for additional control for devices which are on
>>> autoprobed
>>> bus like usb.
>> The reset is done at the end of usb3503's probe. The question "why
>> usb3503 has to be initialized after EHCI and USB PHY" is still valid...
>
> I remember that I saw some code to reset HSIC device after phy power on in case
> of HSIC-connected modem chip, so maybe this is somehow common for HSIC chips
> (which are some special case of 'embedded usb').
>
I also don't have an Arndale board and haven't followed the thread to closely
but I just wanted to mention that the ChromiumOS 3.8 tree has a workaround to
reset the HSIC phys:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/81685c447954a29d1098268776582457258dd98f%5E%21/
and later a "supports-hsicphy-reset" DT property was added to force the reset
per board instead of unconditionally:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a4d1c1a223ffa1ed38a4257d0378ca70c6667be0%5E%21/
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
2015-10-08 9:35 ` Javier Martinez Canillas
@ 2015-10-08 9:58 ` Marek Szyprowski
0 siblings, 0 replies; 11+ messages in thread
From: Marek Szyprowski @ 2015-10-08 9:58 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On 2015-10-08 11:35, Javier Martinez Canillas wrote:
> Hello,
>
> On 10/08/2015 08:23 AM, Marek Szyprowski wrote:
>> Hello,
>>
>> On 2015-10-08 08:02, Krzysztof Kozlowski wrote:
>>> On 07.10.2015 23:26, Marek Szyprowski wrote:
>>>> Hello,
>>>>
>>>> On 2015-10-07 02:30, Krzysztof Kozlowski wrote:
>>>>> Introduction
>>>>> ============
>>>>> This patchset tries to fix probing of usb3503 on Arndale board
>>>>> if the Samsung PHY driver is probed later (or built as a module).
>>>>>
>>>>> *The patchset was not tested on Arndale board.*
>>>>> I don't have that board. Please test it and say if the usb3503
>>>>> deferred probe
>>>>> works fine and the issue is solved.
>>>>>
>>>>> The patchset was tested on Odroid U3 board (which is different!)
>>>>> in a simulated environment. It is not sufficient testing.
>>>>>
>>>>>
>>>>> Difference
>>>>> ==========
>>>>> The usb3503 device driver can be used as a I2C device (on Odroid U3)
>>>>> or as a platform device connected through phy (on Arndale). In the second
>>>>> case the necessary phy reference has to be obtained and enabled.
>>>>>
>>>>> For some details please look also at thread [0][1].
>>>>>
>>>>> [0]
>>>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348524.html
>>>>>
>>>>> [1]
>>>>> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348875.html
>>>>>
>>>>>
>>>> I'm not sure that this is the correct approach. usb3503 chip is simply
>>>> connected
>>>> to Exynos USB2 phy, so it visible on the USB bus. The real driver that
>>>> controls USB2
>>>> PHY is Exynos EHCI driver and USB3503 should not mess around it.
>>> The ehci node (usb at 12110000) has one port configured and it takes one
>>> PHY reference (phy of id 1 - USB host). I can't see driver taking
>>> reference to HSIC0 or HSIC1 phys... Since I cannot diagnose the error I
>>> don't know what is really expected here.
>> It looks that EHCI in Exynos 5250 and 5420 still use old phy bindings. For
>> the reference, see Exynos4 dts and exynos4412-odroidu3.dts to check how to enable
>> more than one USB port (Odroid U3 has both HSIC ports enabled).
>>
>>>> In my opinion all that is needed in case of Arndale board is forcing
>>>> reset of
>>>> usb3503 chip after successful EHCI and USB2 PHY initialization (for some
>>>> reason
>>>> initialization of usb3503 chip must be done after usb host initialization).
>>>> However I have no idea which driver should trigger this reset. Right now
>>>> I didn't
>>>> find any good solution for additional control for devices which are on
>>>> autoprobed
>>>> bus like usb.
>>> The reset is done at the end of usb3503's probe. The question "why
>>> usb3503 has to be initialized after EHCI and USB PHY" is still valid...
>> I remember that I saw some code to reset HSIC device after phy power on in case
>> of HSIC-connected modem chip, so maybe this is somehow common for HSIC chips
>> (which are some special case of 'embedded usb').
>>
> I also don't have an Arndale board and haven't followed the thread to closely
> but I just wanted to mention that the ChromiumOS 3.8 tree has a workaround to
> reset the HSIC phys:
>
> https://chromium.googlesource.com/chromiumos/third_party/kernel/+/81685c447954a29d1098268776582457258dd98f%5E%21/
>
> and later a "supports-hsicphy-reset" DT property was added to force the reset
> per board instead of unconditionally:
>
> https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a4d1c1a223ffa1ed38a4257d0378ca70c6667be0%5E%21/
I didn't check this approach, but for me it looks that the problem is caused
by the lack of resetting the chip connected to hsic phy not the lack of
resetting the phy itself. However this is pure speculation and one should
check it with the real hardware.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
2015-10-07 0:30 [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Krzysztof Kozlowski
` (3 preceding siblings ...)
2015-10-07 14:26 ` [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Marek Szyprowski
@ 2015-10-09 19:18 ` Kevin Hilman
2015-10-10 3:08 ` Krzysztof Kozlowski
4 siblings, 1 reply; 11+ messages in thread
From: Kevin Hilman @ 2015-10-09 19:18 UTC (permalink / raw)
To: linux-arm-kernel
Hi Krzystof,
Krzysztof Kozlowski <k.kozlowski@samsung.com> writes:
> Introduction
> ============
> This patchset tries to fix probing of usb3503 on Arndale board
> if the Samsung PHY driver is probed later (or built as a module).
>
> *The patchset was not tested on Arndale board.*
> I don't have that board. Please test it and say if the usb3503 deferred probe
> works fine and the issue is solved.
FYI... I built this series on top of next-20151009 and using
exynos_defconfig. I booted it on my arndale, and I still don't see the
networking come up. Full boot log attached.
Kevin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: boot-arndale.txt
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151009/2c313ab4/attachment-0001.txt>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy)
2015-10-09 19:18 ` Kevin Hilman
@ 2015-10-10 3:08 ` Krzysztof Kozlowski
0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2015-10-10 3:08 UTC (permalink / raw)
To: linux-arm-kernel
W dniu 10.10.2015 o 04:18, Kevin Hilman pisze:
> Hi Krzystof,
>
> Krzysztof Kozlowski <k.kozlowski@samsung.com> writes:
>
>> Introduction
>> ============
>> This patchset tries to fix probing of usb3503 on Arndale board
>> if the Samsung PHY driver is probed later (or built as a module).
>>
>> *The patchset was not tested on Arndale board.*
>> I don't have that board. Please test it and say if the usb3503 deferred probe
>> works fine and the issue is solved.
>
> FYI... I built this series on top of next-20151009 and using
> exynos_defconfig. I booted it on my arndale, and I still don't see the
> networking come up. Full boot log attached.
+cc Tyler
Kevin,
Thanks for testing but I am not sure if this boot failure is related to
the patch. I mean if the patch should fix this particular boot failure.
The board stopped to boot after enabling DWC2 and network USB gadget:
http://www.spinics.net/lists/linux-samsung-soc/msg47009.html
The boot log shows that usb3503 was probed but asix network adapter was
not. I wonder how these things are related to each other...
Nevertheless it would be difficult to debug the issue without the
Arndale board. :)
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-10-10 3:08 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 0:30 [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 1/3] dt-bindings: usb: usb5303: Document new 'phys' property Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 2/3] usb: misc: usb3503: Allow usage of device through phy interface Krzysztof Kozlowski
2015-10-07 0:30 ` [RFT 3/3] ARM: dts: Fix usb3503 probe by enabling phy on exynos5250-arndale Krzysztof Kozlowski
2015-10-07 14:26 ` [RFT 0/3] usb: usb3503: Fix probing on Arndale board (missing phy) Marek Szyprowski
2015-10-08 6:02 ` Krzysztof Kozlowski
2015-10-08 6:23 ` Marek Szyprowski
2015-10-08 9:35 ` Javier Martinez Canillas
2015-10-08 9:58 ` Marek Szyprowski
2015-10-09 19:18 ` Kevin Hilman
2015-10-10 3:08 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).