lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat,  7 Jan 2017 10:52:01 +0200
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Kukjin Kim <kgene@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Javier Martinez Canillas <javier@....samsung.com>,
        Anand Moon <linux.amoon@...il.com>, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Marek Szyprowski <m.szyprowski@...sung.com>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Peter Chen <peter.chen@....com>, gregkh@...uxfoundation.org,
        stern@...land.harvard.edu, ulf.hansson@...aro.org,
        broonie@...nel.org, sre@...nel.org, robh+dt@...nel.org,
        linux-usb@...r.kernel.org, linux-pm@...r.kernel.org,
        hverkuil@...all.nl, Markus Reichl <m.reichl@...etechno.de>
Subject: [PATCH 2/4] ARM: dts: exynos: Fix LAN9730 on Odroid U3 after tftpboot

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@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ