linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence)
@ 2017-01-07  8:51 Krzysztof Kozlowski
  2017-01-07  8:52 ` [PATCH 1/4] ARM: dts: exynos: Fix indentation of EHCI and OHCI ports Krzysztof Kozlowski
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-07  8:51 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Anand Moon, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Hi,

Thanks to Markus Reichl, I got an Odroid U3 to work with. Thanks to Peter
Chen, we got a power sequence generic library which solves my long
standing Odroid U3 problem - no LAN9730 if it was enabled by bootloader.

My previous attempts for this can be found here [0].

This patchset is based on Peter's v11 of power sequence [1].
Patchset is available also on my Github [2].

More detailed analysis is described in patch 2/4 ("ARM: dts: exynos: Fix
LAN9730 on Odroid U3 after tftpboot").


Best regards,
Krzysztof


[0] http://www.spinics.net/lists/linux-mmc/msg37386.html
[1] https://lwn.net/Articles/710736/
[2] https://github.com/krzk/linux/commits/for-next/odroid-u3-usb3503-pwrseq

Krzysztof Kozlowski (4):
  ARM: dts: exynos: Fix indentation of EHCI and OHCI ports
  ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot
  ARM: exynos_defconfig: Enable power sequence for Odroid U3
  ARM: multi_v7_defconfig: Enable power sequence for Odroid U3

 arch/arm/boot/dts/exynos4.dtsi            | 24 ++++++++++++------------
 arch/arm/boot/dts/exynos4412-odroidu3.dts | 21 +++++++++++++++++++++
 arch/arm/configs/exynos_defconfig         |  2 ++
 arch/arm/configs/multi_v7_defconfig       |  1 +
 4 files changed, 36 insertions(+), 12 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/4] ARM: dts: exynos: Fix indentation of EHCI and OHCI ports
  2017-01-07  8:51 [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Krzysztof Kozlowski
@ 2017-01-07  8:52 ` Krzysztof Kozlowski
  2017-01-09 16:01   ` Javier Martinez Canillas
  2017-01-07  8:52 ` [PATCH 2/4] ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-07  8:52 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Anand Moon, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Replace spaces with tabs in EHCI and OHCI ports indentation.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/exynos4.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index c64737baa45e..3209c60389e2 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -370,19 +370,19 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 		port@0 {
-		    reg = <0>;
-		    phys = <&exynos_usbphy 1>;
-		    status = "disabled";
+			reg = <0>;
+			phys = <&exynos_usbphy 1>;
+			status = "disabled";
 		};
 		port@1 {
-		    reg = <1>;
-		    phys = <&exynos_usbphy 2>;
-		    status = "disabled";
+			reg = <1>;
+			phys = <&exynos_usbphy 2>;
+			status = "disabled";
 		};
 		port@2 {
-		    reg = <2>;
-		    phys = <&exynos_usbphy 3>;
-		    status = "disabled";
+			reg = <2>;
+			phys = <&exynos_usbphy 3>;
+			status = "disabled";
 		};
 	};
 
@@ -396,9 +396,9 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 		port@0 {
-		    reg = <0>;
-		    phys = <&exynos_usbphy 1>;
-		    status = "disabled";
+			reg = <0>;
+			phys = <&exynos_usbphy 1>;
+			status = "disabled";
 		};
 	};
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/4] ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot
  2017-01-07  8:51 [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Krzysztof Kozlowski
  2017-01-07  8:52 ` [PATCH 1/4] ARM: dts: exynos: Fix indentation of EHCI and OHCI ports Krzysztof Kozlowski
@ 2017-01-07  8:52 ` Krzysztof Kozlowski
  2017-01-09 16:17   ` Javier Martinez Canillas
  2017-01-07  8:52 ` [PATCH 3/4] ARM: exynos_defconfig: Enable power sequence for Odroid U3 Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-07  8:52 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Anand Moon, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

The ethernet adapter LAN9730, after enabling in bootloader (e.g. for
tftpboot) requires reset during boot.  Otherwise it won't come up.

The schematics of Odroid U3 are detailed enough but after grabbing
knowledge also from other sources (like U-Boot) the overall design looks
like:
1. LAN9730 is connected to HSIC0 and USB3503 to HSIC1 of EHCI controller.
2. USB3503 comes with its own reset pin: gpx3-5.
3. Reset pin of LAN9730 is pulled up to 3.3 V so it cannot be used.
4. The supply of 3.3 V for LAN9730 is delivered from buck8.
5. Buck8 state is a logical OR of registry value (through I2C command)
   and ENB8 pin.  The ENB8, not described in schematics, is in fact
   gpa1-1.
6. Missing or wrongly timed reset of LAN9730 might result in missing of
   two devices: LAN9730 and USB3503. Without reset, LAN9730 will not
   come up, if it was enabled by bootloader.

To fix the issue use the generic power sequence driver and toggle the
ENB8 (buck8) pin.  Reset duration of 500 us was chosen by experiments
(shortest working time was 400 us).  This is an easiest way to fix the
long standing LAN9730 reset issue.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/boot/dts/exynos4412-odroidu3.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts
index 99634c54dca9..aef49007cba0 100644
--- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
@@ -84,10 +84,23 @@
 	regulator-max-microvolt = <2800000>;
 };
 
+&max77686 {
+	pinctrl-0 = <&max77686_irq &max77686_enb8>;
+};
+
 &mshc_0 {
 	vqmmc-supply = <&ldo22_reg>;
 };
 
+&pinctrl_0 {
+	max77686_enb8: max77686-enb8 {
+		samsung,pins = "gpa1-1";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+		samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+};
+
 &pwm {
 	pinctrl-0 = <&pwm0_out>;
 	pinctrl-names = "default";
@@ -103,7 +116,15 @@
 
 &ehci {
 	port@1 {
+		/* HSIC for LAN9730 */
 		status = "okay";
+		/* buck8 enable pin, use it for power sequence */
+		reset-gpios = <&gpa1 1 GPIO_ACTIVE_LOW>;
+		/*
+		 * Reset duration of 500 us was chosen experimentally.
+		 * Minimal working value was 400 us. Add some safe margin.
+		 */
+		reset-duration-us = <500>;
 	};
 	port@2 {
 		status = "okay";
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/4] ARM: exynos_defconfig: Enable power sequence for Odroid U3
  2017-01-07  8:51 [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Krzysztof Kozlowski
  2017-01-07  8:52 ` [PATCH 1/4] ARM: dts: exynos: Fix indentation of EHCI and OHCI ports Krzysztof Kozlowski
  2017-01-07  8:52 ` [PATCH 2/4] ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot Krzysztof Kozlowski
@ 2017-01-07  8:52 ` Krzysztof Kozlowski
  2017-01-09 16:19   ` Javier Martinez Canillas
  2017-01-07  8:52 ` [PATCH 4/4] ARM: multi_v7_defconfig: " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-07  8:52 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Anand Moon, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Odroid U3 needs a power sequence for lan9730, if it was enabled by
bootloader.  Enable also GPIO_SYSFS which is useful for playing with
GPIO during debug process.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/configs/exynos_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 79c415c33f69..ad1a509c296a 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -99,6 +99,7 @@ CONFIG_SPI=y
 CONFIG_SPI_GPIO=y
 CONFIG_SPI_S3C64XX=y
 CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_WM8994=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_BATTERY_SBS=y
@@ -108,6 +109,7 @@ CONFIG_CHARGER_MAX14577=y
 CONFIG_CHARGER_MAX77693=y
 CONFIG_CHARGER_MAX8997=y
 CONFIG_CHARGER_TPS65090=y
+CONFIG_PWRSEQ_GENERIC=y
 CONFIG_SENSORS_LM90=y
 CONFIG_SENSORS_NTC_THERMISTOR=y
 CONFIG_SENSORS_PWM_FAN=y
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/4] ARM: multi_v7_defconfig: Enable power sequence for Odroid U3
  2017-01-07  8:51 [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2017-01-07  8:52 ` [PATCH 3/4] ARM: exynos_defconfig: Enable power sequence for Odroid U3 Krzysztof Kozlowski
@ 2017-01-07  8:52 ` Krzysztof Kozlowski
  2017-01-07  9:16   ` [PATCH v1.1] " Krzysztof Kozlowski
  2017-01-09 18:04 ` [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Anand Moon
  2017-03-29 11:12 ` Hans Verkuil
  5 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-07  8:52 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Anand Moon, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Odroid U3 needs a power sequence for lan9730, if it was enabled by
bootloader.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/configs/multi_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index b01a43851294..1750d99862b9 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -443,6 +443,7 @@ CONFIG_POWER_RESET_RMOBILE=y
 CONFIG_POWER_RESET_ST=y
 CONFIG_POWER_AVS=y
 CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_PWRSEQ_GENERIC=y
 CONFIG_SENSORS_IIO_HWMON=y
 CONFIG_SENSORS_LM90=y
 CONFIG_SENSORS_LM95245=y
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v1.1] ARM: multi_v7_defconfig: Enable power sequence for Odroid U3
  2017-01-07  8:52 ` [PATCH 4/4] ARM: multi_v7_defconfig: " Krzysztof Kozlowski
@ 2017-01-07  9:16   ` Krzysztof Kozlowski
  2017-01-09 16:24     ` Javier Martinez Canillas
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-07  9:16 UTC (permalink / raw)
  To: Kukjin Kim, Krzysztof Kozlowski, Javier Martinez Canillas,
	Anand Moon, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Odroid U3 needs a power sequence for lan9730, if it was enabled by
bootloader.  Also enable the USB3503 HSCI to USB2.0 driver (device
is present on Odroid U3).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1 (v1 -> v1.1):
1. Enable also usb3503 driver.
---
 arch/arm/configs/multi_v7_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index b01a43851294..8cc73e084b25 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -443,6 +443,7 @@ CONFIG_POWER_RESET_RMOBILE=y
 CONFIG_POWER_RESET_ST=y
 CONFIG_POWER_AVS=y
 CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_PWRSEQ_GENERIC=y
 CONFIG_SENSORS_IIO_HWMON=y
 CONFIG_SENSORS_LM90=y
 CONFIG_SENSORS_LM95245=y
@@ -686,6 +687,7 @@ CONFIG_USB_DWC2=y
 CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_UDC=y
 CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_HSIC_USB3503=m
 CONFIG_AB8500_USB=y
 CONFIG_KEYSTONE_USB_PHY=y
 CONFIG_OMAP_USB3=y
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/4] ARM: dts: exynos: Fix indentation of EHCI and OHCI ports
  2017-01-07  8:52 ` [PATCH 1/4] ARM: dts: exynos: Fix indentation of EHCI and OHCI ports Krzysztof Kozlowski
@ 2017-01-09 16:01   ` Javier Martinez Canillas
  0 siblings, 0 replies; 17+ messages in thread
From: Javier Martinez Canillas @ 2017-01-09 16:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kukjin Kim, Anand Moon, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Hello Krzysztof,

On 01/07/2017 05:52 AM, Krzysztof Kozlowski wrote:
> Replace spaces with tabs in EHCI and OHCI ports indentation.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/4] ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot
  2017-01-07  8:52 ` [PATCH 2/4] ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot Krzysztof Kozlowski
@ 2017-01-09 16:17   ` Javier Martinez Canillas
  0 siblings, 0 replies; 17+ messages in thread
From: Javier Martinez Canillas @ 2017-01-09 16:17 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kukjin Kim, Anand Moon, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Hello Krzysztof,

On 01/07/2017 05:52 AM, Krzysztof Kozlowski wrote:
> The ethernet adapter LAN9730, after enabling in bootloader (e.g. for
> tftpboot) requires reset during boot.  Otherwise it won't come up.
> 
> The schematics of Odroid U3 are detailed enough but after grabbing
> knowledge also from other sources (like U-Boot) the overall design looks
> like:
> 1. LAN9730 is connected to HSIC0 and USB3503 to HSIC1 of EHCI controller.
> 2. USB3503 comes with its own reset pin: gpx3-5.
> 3. Reset pin of LAN9730 is pulled up to 3.3 V so it cannot be used.
> 4. The supply of 3.3 V for LAN9730 is delivered from buck8.
> 5. Buck8 state is a logical OR of registry value (through I2C command)
>    and ENB8 pin.  The ENB8, not described in schematics, is in fact
>    gpa1-1.
> 6. Missing or wrongly timed reset of LAN9730 might result in missing of
>    two devices: LAN9730 and USB3503. Without reset, LAN9730 will not
>    come up, if it was enabled by bootloader.
> 
> To fix the issue use the generic power sequence driver and toggle the
> ENB8 (buck8) pin.  Reset duration of 500 us was chosen by experiments
> (shortest working time was 400 us).  This is an easiest way to fix the
> long standing LAN9730 reset issue.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---

Thanks for keep pushing a fix for this long standing issue.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/4] ARM: exynos_defconfig: Enable power sequence for Odroid U3
  2017-01-07  8:52 ` [PATCH 3/4] ARM: exynos_defconfig: Enable power sequence for Odroid U3 Krzysztof Kozlowski
@ 2017-01-09 16:19   ` Javier Martinez Canillas
  0 siblings, 0 replies; 17+ messages in thread
From: Javier Martinez Canillas @ 2017-01-09 16:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kukjin Kim, Anand Moon, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Hello Krzysztof,

On 01/07/2017 05:52 AM, Krzysztof Kozlowski wrote:
> Odroid U3 needs a power sequence for lan9730, if it was enabled by
> bootloader.  Enable also GPIO_SYSFS which is useful for playing with
> GPIO during debug process.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v1.1] ARM: multi_v7_defconfig: Enable power sequence for Odroid U3
  2017-01-07  9:16   ` [PATCH v1.1] " Krzysztof Kozlowski
@ 2017-01-09 16:24     ` Javier Martinez Canillas
  2017-01-09 17:38       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 17+ messages in thread
From: Javier Martinez Canillas @ 2017-01-09 16:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kukjin Kim, Anand Moon, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	hverkuil, Markus Reichl

Hello Krzysztof,

I think it would had been clearer if the subject prefix was "[PATCH v1.1 4/4]" :)

On 01/07/2017 06:16 AM, Krzysztof Kozlowski wrote:
> Odroid U3 needs a power sequence for lan9730, if it was enabled by
> bootloader.  Also enable the USB3503 HSCI to USB2.0 driver (device
> is present on Odroid U3).
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 

Do you think that makes sense to also enable GPIO_SYS for debugging
purposes as you do in patch 3/4?

In any case the patch looks good to me:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v1.1] ARM: multi_v7_defconfig: Enable power sequence for Odroid U3
  2017-01-09 16:24     ` Javier Martinez Canillas
@ 2017-01-09 17:38       ` Krzysztof Kozlowski
  2017-01-09 17:44         ` Javier Martinez Canillas
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-09 17:38 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Kukjin Kim, Anand Moon, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, Marek Szyprowski,
	Sylwester Nawrocki, Peter Chen, gregkh, stern, ulf.hansson,
	broonie, sre, robh+dt, linux-usb, linux-pm, hverkuil,
	Markus Reichl

On Mon, Jan 9, 2017 at 6:24 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Krzysztof,
>
> I think it would had been clearer if the subject prefix was "[PATCH v1.1 4/4]" :)

Ah, yes.

>
> On 01/07/2017 06:16 AM, Krzysztof Kozlowski wrote:
>> Odroid U3 needs a power sequence for lan9730, if it was enabled by
>> bootloader.  Also enable the USB3503 HSCI to USB2.0 driver (device
>> is present on Odroid U3).
>>
>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>>
>> ---
>>
>
> Do you think that makes sense to also enable GPIO_SYS for debugging
> purposes as you do in patch 3/4?

I like the GPIO_SYSFS interface because it is easy to use. However
now, after your question, I found this:
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-November/470154.html
ARM/ARM64: defconfig: drop GPIO_SYSFS on multiplatforms

... so instead I will drop it from exynos_defconfig.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v1.1] ARM: multi_v7_defconfig: Enable power sequence for Odroid U3
  2017-01-09 17:38       ` Krzysztof Kozlowski
@ 2017-01-09 17:44         ` Javier Martinez Canillas
  0 siblings, 0 replies; 17+ messages in thread
From: Javier Martinez Canillas @ 2017-01-09 17:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, Anand Moon, devicetree, linux-arm-kernel,
	linux-samsung-soc, linux-kernel, Marek Szyprowski,
	Sylwester Nawrocki, Peter Chen, gregkh, stern, ulf.hansson,
	broonie, sre, robh+dt, linux-usb, linux-pm, hverkuil,
	Markus Reichl

Hello Krzysztof,

On 01/09/2017 02:38 PM, Krzysztof Kozlowski wrote:
> On Mon, Jan 9, 2017 at 6:24 PM, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
>> Hello Krzysztof,
>>
>> I think it would had been clearer if the subject prefix was "[PATCH v1.1 4/4]" :)
> 
> Ah, yes.
> 
>>
>> On 01/07/2017 06:16 AM, Krzysztof Kozlowski wrote:
>>> Odroid U3 needs a power sequence for lan9730, if it was enabled by
>>> bootloader.  Also enable the USB3503 HSCI to USB2.0 driver (device
>>> is present on Odroid U3).
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>>>
>>> ---
>>>
>>
>> Do you think that makes sense to also enable GPIO_SYS for debugging
>> purposes as you do in patch 3/4?
> 
> I like the GPIO_SYSFS interface because it is easy to use. However
> now, after your question, I found this:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2016-November/470154.html
> ARM/ARM64: defconfig: drop GPIO_SYSFS on multiplatforms
> 
> ... so instead I will drop it from exynos_defconfig.
> 

Right, I forgot that using the GPIO sysfs interface is discouraged now and the
new chardev/ioctl based should be used instead. So it makes sense to drop it.

> Best regards,
> Krzysztof

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence)
  2017-01-07  8:51 [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2017-01-07  8:52 ` [PATCH 4/4] ARM: multi_v7_defconfig: " Krzysztof Kozlowski
@ 2017-01-09 18:04 ` Anand Moon
  2017-01-09 18:17   ` Krzysztof Kozlowski
  2017-03-29 11:12 ` Hans Verkuil
  5 siblings, 1 reply; 17+ messages in thread
From: Anand Moon @ 2017-01-09 18:04 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, Javier Martinez Canillas, devicetree,
	linux-arm-kernel, linux-samsung-soc, Linux Kernel,
	Marek Szyprowski, Sylwester Nawrocki, Peter Chen,
	Greg Kroah-Hartman, Alan Stern, Ulf Hansson, Mark Brown, sre,
	Rob Herring, Linux USB Mailing List, Linux PM list, hverkuil,
	Markus Reichl

Hi Krzysztof,

On 7 January 2017 at 14:21, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> Hi,
>
> Thanks to Markus Reichl, I got an Odroid U3 to work with. Thanks to Peter
> Chen, we got a power sequence generic library which solves my long
> standing Odroid U3 problem - no LAN9730 if it was enabled by bootloader.
>
> My previous attempts for this can be found here [0].
>
> This patchset is based on Peter's v11 of power sequence [1].
> Patchset is available also on my Github [2].
>
> More detailed analysis is described in patch 2/4 ("ARM: dts: exynos: Fix
> LAN9730 on Odroid U3 after tftpboot").
>
>

[snip]

On which u-boot should this be tested.

On HK u-boot tftp boot is not supported.
----------------------------------------------------------
U-Boot 2010.12-00000-g9777ca6-dirty (Nov 26 2015 - 10:10:11) for Exynox4412


CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]
APLL = 1000MHz, MPLL = 800MHz
DRAM:  2 GiB

PMIC VERSION : 0x00, CHIP REV : 2
TrustZone Enabled BSP
BL1 version: 20121128


Checking Boot Mode ... SDMMC
MMC Device 0: 14804 MB
MMC Device 1 not found
*** Warning - using default environment

USB3503 NINT = OUTPUT LOW!
ModeKey Check... run normal_boot
No ethernet found.
Hit any key to stop autoboot:  0
Exynos4412 #
Exynos4412 #
Exynos4412 #
Exynos4412 # usb start
(Re)start USB...
USB0:   Exynos4412-ehci: init hccr 12580000 and hcor 12580010 hc_length 16
usb: usb_refclk_enable is active low: NO
ProTIP: If usb doesn't work - try playing with 'usb_invert_clken' environment
USB EHCI 1.00
scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80
EHCI fail timeout STS_ASS set

      USB device not accepting new address (error=80000000)
EHCI fail timeout STS_ASS set
1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
Exynos4412 #

Best Regards
-Anand

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence)
  2017-01-09 18:04 ` [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Anand Moon
@ 2017-01-09 18:17   ` Krzysztof Kozlowski
  2017-01-09 18:26     ` Anand Moon
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-09 18:17 UTC (permalink / raw)
  To: Anand Moon
  Cc: Krzysztof Kozlowski, Kukjin Kim, Javier Martinez Canillas,
	devicetree, linux-arm-kernel, linux-samsung-soc, Linux Kernel,
	Marek Szyprowski, Sylwester Nawrocki, Peter Chen,
	Greg Kroah-Hartman, Alan Stern, Ulf Hansson, Mark Brown, sre,
	Rob Herring, Linux USB Mailing List, Linux PM list, hverkuil,
	Markus Reichl

On Mon, Jan 09, 2017 at 11:34:48PM +0530, Anand Moon wrote:
> Hi Krzysztof,
> 
> On 7 January 2017 at 14:21, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > Hi,
> >
> > Thanks to Markus Reichl, I got an Odroid U3 to work with. Thanks to Peter
> > Chen, we got a power sequence generic library which solves my long
> > standing Odroid U3 problem - no LAN9730 if it was enabled by bootloader.
> >
> > My previous attempts for this can be found here [0].
> >
> > This patchset is based on Peter's v11 of power sequence [1].
> > Patchset is available also on my Github [2].
> >
> > More detailed analysis is described in patch 2/4 ("ARM: dts: exynos: Fix
> > LAN9730 on Odroid U3 after tftpboot").
> >
> >
> 
> [snip]
> 
> On which u-boot should this be tested.
> 
> On HK u-boot tftp boot is not supported.

... so you gave an answer: you cannot test it on HK. How many other
U-Boot flavors you know? :)

Best regards,
Krzysztof


> ----------------------------------------------------------
> U-Boot 2010.12-00000-g9777ca6-dirty (Nov 26 2015 - 10:10:11) for Exynox4412
> 
> 
> CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]
> APLL = 1000MHz, MPLL = 800MHz
> DRAM:  2 GiB
> 
> PMIC VERSION : 0x00, CHIP REV : 2
> TrustZone Enabled BSP
> BL1 version: 20121128
> 
> 
> Checking Boot Mode ... SDMMC
> MMC Device 0: 14804 MB
> MMC Device 1 not found
> *** Warning - using default environment
> 
> USB3503 NINT = OUTPUT LOW!
> ModeKey Check... run normal_boot
> No ethernet found.
> Hit any key to stop autoboot:  0
> Exynos4412 #
> Exynos4412 #
> Exynos4412 #
> Exynos4412 # usb start
> (Re)start USB...
> USB0:   Exynos4412-ehci: init hccr 12580000 and hcor 12580010 hc_length 16
> usb: usb_refclk_enable is active low: NO
> ProTIP: If usb doesn't work - try playing with 'usb_invert_clken' environment
> USB EHCI 1.00
> scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80
> EHCI fail timeout STS_ASS set
> 
>       USB device not accepting new address (error=80000000)
> EHCI fail timeout STS_ASS set
> 1 USB Device(s) found
>        scanning usb for storage devices... 0 Storage Device(s) found
>        scanning usb for ethernet devices... 0 Ethernet Device(s) found
> Exynos4412 #
> 
> Best Regards
> -Anand

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence)
  2017-01-09 18:17   ` Krzysztof Kozlowski
@ 2017-01-09 18:26     ` Anand Moon
  2017-01-09 18:35       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 17+ messages in thread
From: Anand Moon @ 2017-01-09 18:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Kukjin Kim, Javier Martinez Canillas, devicetree,
	linux-arm-kernel, linux-samsung-soc, Linux Kernel,
	Marek Szyprowski, Sylwester Nawrocki, Peter Chen,
	Greg Kroah-Hartman, Alan Stern, Ulf Hansson, Mark Brown, sre,
	Rob Herring, Linux USB Mailing List, Linux PM list, hverkuil,
	Markus Reichl

Hi Krzysztof,

On 9 January 2017 at 23:47, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> On Mon, Jan 09, 2017 at 11:34:48PM +0530, Anand Moon wrote:
>> Hi Krzysztof,
>>
>> On 7 January 2017 at 14:21, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>> > Hi,
>> >
>> > Thanks to Markus Reichl, I got an Odroid U3 to work with. Thanks to Peter
>> > Chen, we got a power sequence generic library which solves my long
>> > standing Odroid U3 problem - no LAN9730 if it was enabled by bootloader.
>> >
>> > My previous attempts for this can be found here [0].
>> >
>> > This patchset is based on Peter's v11 of power sequence [1].
>> > Patchset is available also on my Github [2].
>> >
>> > More detailed analysis is described in patch 2/4 ("ARM: dts: exynos: Fix
>> > LAN9730 on Odroid U3 after tftpboot").
>> >
>> >
>>
>> [snip]
>>
>> On which u-boot should this be tested.
>>
>> On HK u-boot tftp boot is not supported.
>
> ... so you gave an answer: you cannot test it on HK. How many other
> U-Boot flavors you know? :)
>

u-boot mainline have tftp support enable, so I will try to test on this u-boot.

Best Regards
-Anand

> Best regards,
> Krzysztof
>
>
>> ----------------------------------------------------------
>> U-Boot 2010.12-00000-g9777ca6-dirty (Nov 26 2015 - 10:10:11) for Exynox4412
>>
>>
>> CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]
>> APLL = 1000MHz, MPLL = 800MHz
>> DRAM:  2 GiB
>>
>> PMIC VERSION : 0x00, CHIP REV : 2
>> TrustZone Enabled BSP
>> BL1 version: 20121128
>>
>>
>> Checking Boot Mode ... SDMMC
>> MMC Device 0: 14804 MB
>> MMC Device 1 not found
>> *** Warning - using default environment
>>
>> USB3503 NINT = OUTPUT LOW!
>> ModeKey Check... run normal_boot
>> No ethernet found.
>> Hit any key to stop autoboot:  0
>> Exynos4412 #
>> Exynos4412 #
>> Exynos4412 #
>> Exynos4412 # usb start
>> (Re)start USB...
>> USB0:   Exynos4412-ehci: init hccr 12580000 and hcor 12580010 hc_length 16
>> usb: usb_refclk_enable is active low: NO
>> ProTIP: If usb doesn't work - try playing with 'usb_invert_clken' environment
>> USB EHCI 1.00
>> scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80
>> EHCI fail timeout STS_ASS set
>>
>>       USB device not accepting new address (error=80000000)
>> EHCI fail timeout STS_ASS set
>> 1 USB Device(s) found
>>        scanning usb for storage devices... 0 Storage Device(s) found
>>        scanning usb for ethernet devices... 0 Ethernet Device(s) found
>> Exynos4412 #
>>
>> Best Regards
>> -Anand

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence)
  2017-01-09 18:26     ` Anand Moon
@ 2017-01-09 18:35       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 17+ messages in thread
From: Krzysztof Kozlowski @ 2017-01-09 18:35 UTC (permalink / raw)
  To: Anand Moon
  Cc: Krzysztof Kozlowski, Kukjin Kim, Javier Martinez Canillas,
	devicetree, linux-arm-kernel, linux-samsung-soc, Linux Kernel,
	Marek Szyprowski, Sylwester Nawrocki, Peter Chen,
	Greg Kroah-Hartman, Alan Stern, Ulf Hansson, Mark Brown, sre,
	Rob Herring, Linux USB Mailing List, Linux PM list, hverkuil,
	Markus Reichl

On Mon, Jan 09, 2017 at 11:56:41PM +0530, Anand Moon wrote:
> Hi Krzysztof,
> 
> On 9 January 2017 at 23:47, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> > On Mon, Jan 09, 2017 at 11:34:48PM +0530, Anand Moon wrote:
> >> Hi Krzysztof,
> >>
> >> On 7 January 2017 at 14:21, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >> > Hi,
> >> >
> >> > Thanks to Markus Reichl, I got an Odroid U3 to work with. Thanks to Peter
> >> > Chen, we got a power sequence generic library which solves my long
> >> > standing Odroid U3 problem - no LAN9730 if it was enabled by bootloader.
> >> >
> >> > My previous attempts for this can be found here [0].
> >> >
> >> > This patchset is based on Peter's v11 of power sequence [1].
> >> > Patchset is available also on my Github [2].
> >> >
> >> > More detailed analysis is described in patch 2/4 ("ARM: dts: exynos: Fix
> >> > LAN9730 on Odroid U3 after tftpboot").
> >> >
> >> >
> >>
> >> [snip]
> >>
> >> On which u-boot should this be tested.
> >>
> >> On HK u-boot tftp boot is not supported.
> >
> > ... so you gave an answer: you cannot test it on HK. How many other
> > U-Boot flavors you know? :)
> >
> 
> u-boot mainline have tftp support enable, so I will try to test on this u-boot.

Yes, please try it. Some time ago I was using v2016.03-rc3 and now
recent (~40 commits after v2017.01-rc2). Both are working fine however
the configuration (partitions, default env settings etc) differs from HK
so migration was not straightforward.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence)
  2017-01-07  8:51 [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2017-01-09 18:04 ` [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Anand Moon
@ 2017-03-29 11:12 ` Hans Verkuil
  5 siblings, 0 replies; 17+ messages in thread
From: Hans Verkuil @ 2017-03-29 11:12 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Kukjin Kim, Javier Martinez Canillas,
	Anand Moon, devicetree, linux-arm-kernel, linux-samsung-soc,
	linux-kernel
  Cc: Marek Szyprowski, Sylwester Nawrocki, Peter Chen, gregkh, stern,
	ulf.hansson, broonie, sre, robh+dt, linux-usb, linux-pm,
	Markus Reichl

Hi Krzysztof,

On 07/01/17 09:51, Krzysztof Kozlowski wrote:
> Hi,
> 
> Thanks to Markus Reichl, I got an Odroid U3 to work with. Thanks to Peter
> Chen, we got a power sequence generic library which solves my long
> standing Odroid U3 problem - no LAN9730 if it was enabled by bootloader.
> 
> My previous attempts for this can be found here [0].
> 
> This patchset is based on Peter's v11 of power sequence [1].
> Patchset is available also on my Github [2].
> 
> More detailed analysis is described in patch 2/4 ("ARM: dts: exynos: Fix
> LAN9730 on Odroid U3 after tftpboot").

It's rather late, but I finally had a chance to test this and it works.

So:

Tested-by: Hans Verkuil <hans.verkuil@cisco.com>

This was with u-boot version v2016.09.01 and kernel 4.11.0-rc1.

Regards,

	Hans

> 
> 
> Best regards,
> Krzysztof
> 
> 
> [0] http://www.spinics.net/lists/linux-mmc/msg37386.html
> [1] https://lwn.net/Articles/710736/
> [2] https://github.com/krzk/linux/commits/for-next/odroid-u3-usb3503-pwrseq
> 
> Krzysztof Kozlowski (4):
>   ARM: dts: exynos: Fix indentation of EHCI and OHCI ports
>   ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot
>   ARM: exynos_defconfig: Enable power sequence for Odroid U3
>   ARM: multi_v7_defconfig: Enable power sequence for Odroid U3
> 
>  arch/arm/boot/dts/exynos4.dtsi            | 24 ++++++++++++------------
>  arch/arm/boot/dts/exynos4412-odroidu3.dts | 21 +++++++++++++++++++++
>  arch/arm/configs/exynos_defconfig         |  2 ++
>  arch/arm/configs/multi_v7_defconfig       |  1 +
>  4 files changed, 36 insertions(+), 12 deletions(-)
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-03-29 11:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07  8:51 [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Krzysztof Kozlowski
2017-01-07  8:52 ` [PATCH 1/4] ARM: dts: exynos: Fix indentation of EHCI and OHCI ports Krzysztof Kozlowski
2017-01-09 16:01   ` Javier Martinez Canillas
2017-01-07  8:52 ` [PATCH 2/4] ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot Krzysztof Kozlowski
2017-01-09 16:17   ` Javier Martinez Canillas
2017-01-07  8:52 ` [PATCH 3/4] ARM: exynos_defconfig: Enable power sequence for Odroid U3 Krzysztof Kozlowski
2017-01-09 16:19   ` Javier Martinez Canillas
2017-01-07  8:52 ` [PATCH 4/4] ARM: multi_v7_defconfig: " Krzysztof Kozlowski
2017-01-07  9:16   ` [PATCH v1.1] " Krzysztof Kozlowski
2017-01-09 16:24     ` Javier Martinez Canillas
2017-01-09 17:38       ` Krzysztof Kozlowski
2017-01-09 17:44         ` Javier Martinez Canillas
2017-01-09 18:04 ` [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence) Anand Moon
2017-01-09 18:17   ` Krzysztof Kozlowski
2017-01-09 18:26     ` Anand Moon
2017-01-09 18:35       ` Krzysztof Kozlowski
2017-03-29 11:12 ` Hans Verkuil

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).