All of lore.kernel.org
 help / color / mirror / Atom feed
* How to enable usb in exynos4412
@ 2013-11-28 14:00 randy
  2013-11-28 14:37 ` Tomasz Figa
  0 siblings, 1 reply; 7+ messages in thread
From: randy @ 2013-11-28 14:00 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, stern, devicetree, balbi

I have development board whose SoC is exynos4412, I try to enable the
usb in it but I failed. I saw the document
Documentation/devicetree/bindings/usb/samsung-usbphy.txt, does it mean
that the usb driver is not done?
And about that document, in samsung datasheet(32.8.2), the address reg
0x125B_0000 + 32bits contains hsic1, hsic0, phy1 and phy0's power
control. And in 0x1002_0704 + 3 * 32 bits, it contains usb_phy,
hsic1_phy and hsic2_phy control(8.8.1.27). So I doubt the documents.

Here is the log and dts
===========================log================================
[    1.000000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.010000] ehci-exynos: EHCI EXYNOS driver
[    1.015000] unable to find transceiver of type USB2 PHY
[    1.020000] exynos-ehci 12580000.ehci: no platform data or
transceiver defined
[    1.025000] platform 12580000.ehci: Driver exynos-ehci requests probe
deferral

================================dts==================================
diff --git a/arch/arm/boot/dts/exynos4412-tiny4412.dts
b/arch/arm/boot/dts/exynos4412-tiny4412.dts
new file mode 100644
index 0000000..c8d4cfa
--- /dev/null
+++ b/arch/arm/boot/dts/exynos4412-tiny4412.dts
@@ -0,0 +1,176 @@
+/*
+ * Hardkernel's Exynos4412 based tiny4412 1306 board device tree source
+ *
+ * Copyright (c) 2013 Tomoya Gitsufuki <ayaka@mail.soulik.info>
+ *
+ * Device tree source file for Friendyarm tiny4412 1306 board which is
based on
+ * Samsung's Exynos4412 SoC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+#include "exynos4412.dtsi"
+
+/ {
+	model = "Friendly Arm Tiny4412 1306 board based on Exynos4412";
+	compatible = "friendlyarm,tiny4412-1306", "samsung,exynos4412";
+
+	memory {
+		reg = <0x40000000 0x40000000>;
+	};
+
+	chosen {
+		bootargs ="root=/dev/mmcblk0p1 rootfstype=ext4 rw
console=ttySAC0,115200 init=/sbin/init";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led1 {
+			label = "led1:heart";
+			gpios = <&gpm4 0 1>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+		led2 {
+			label = "led2:mmc0";
+			gpios = <&gpm4 1 1>;
+			default-state = "on";
+			linux,default-trigger = "mmc0";
+		};
+
+	};
+
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+
+		vemmc_reg: regulator-0 {
+			compatible = "regulator-fixed";
+			regulator-name = "VMEM_VDD_2.8V";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpk0 2 0>;
+			enable-active-high;
+		};
+
+	};
+
+	/*
+	mshc@12550000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
+		pinctrl-names = "default";
+		status = "okay";
+
+		vmmc-supply = <&vemmc_reg>;
+		clocks = <&clock 301>, <&clock 149>;
+		clocks-name = "dwmci", "sclk_dwmci";
+		clock-frequency = <400000000>;
+
+		num-slots = <1>;
+		supports-highspeed;
+		broken-cd;
+		fifo-depth = <0x80>;
+		card-detect-delay = <200>;
+		samsung,dw-mshc-sdr-timing = <2 3>;
+		samsung,dw-mshc-ddr-timing = <1 2>;
+
+		slot@0 {
+			reg = <0>;
+			bus-width = <8>;
+				
+		};
+	};
+	*/
+
+	rtc@10070000 {
+		status = "okay";
+	};
+
+	sdhci@12530000 {
+		bus-width = <4>;
+		pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>;
+		pinctrl-names = "default";
+		status = "okay";
+	};
+	sdhci@1254000 {
+		bus-width = <4>;
+		pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &sd3_cd>;
+		pinctrl-names = "default";
+		status = "okay";
+	};
+
+	usb_phy: usbphy@125B0000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "samsung,exynos4210-usbphy";
+		reg = <0x12B0000 0x100>;
+		ranges;
+
+		clocks = <&clock 2>, <&clock 305>;
+		clock-names = "xusbxti", "otg";
+		usbphy-sys {
+			/* USB device and host PHY_CONTROL registers */
+			reg = <0x10020704 0x8>;
+		};
+	};
+
+	ehci@12580000 {
+		usb-phy = <&usb_phy>;
+		status = "okay";
+	};
+	
+	ohci@12590000 {
+		status = "okay";
+	};
+
+
+	codec@13400000 {
+		samsung,mfc-r = <0x43000000 0x800000>;
+		samsung,mfc-l = <0x51000000 0x800000>;
+		status = "okay";
+	};
+
+	serial@13800000 {
+		status = "okay";
+	};
+
+	serial@13810000 {
+		status = "okay";
+	};
+
+	serial@13820000 {
+		status = "okay";
+	};
+
+	serial@13830000 {
+		status = "okay";
+	};
+
+	fixed-rate-clocks {
+		xxti {
+			compatible = "samsung,clock-xxti";
+			clock-frequency = <0>;
+		};
+
+		xusbxti {
+			compatible = "samsung,clock-xusbxti";
+			clock-frequency = <24000000>;
+		};
+	};
+
+	i2c@13860000 {
+		status = "okay";
+		samsung,i2c-sda-delay = <100>;
+		samsung,i2c-max-bus-freq = <200000>;
+
+		wm8960@10 {
+			compatible = "wlf,wm8960";
+			reg = <0x10>;
+		};
+	};
+};
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index f156010..f640ddf 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -1084,6 +1084,12 @@ static const struct i2c_device_id wm8960_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, wm8960_i2c_id);

+static const struct of_device_id wm8960_of_match[] = {
+	{ .compatible = "wlf,wm8960", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, wm8960_of_match);
+
 static struct i2c_driver wm8960_i2c_driver = {
 	.driver = {
 		.name = "wm8960",

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

* Re: How to enable usb in exynos4412
  2013-11-28 14:00 How to enable usb in exynos4412 randy
@ 2013-11-28 14:37 ` Tomasz Figa
  2013-11-28 15:29   ` randy
  0 siblings, 1 reply; 7+ messages in thread
From: Tomasz Figa @ 2013-11-28 14:37 UTC (permalink / raw)
  To: randy; +Cc: linux-samsung-soc, kgene.kim, stern, devicetree, balbi

Hi Randy,

On Thursday 28 of November 2013 22:00:41 randy wrote:
> I have development board whose SoC is exynos4412, I try to enable the
> usb in it but I failed. I saw the document
> Documentation/devicetree/bindings/usb/samsung-usbphy.txt, does it mean
> that the usb driver is not done?
> And about that document, in samsung datasheet(32.8.2), the address reg
> 0x125B_0000 + 32bits contains hsic1, hsic0, phy1 and phy0's power
> control. And in 0x1002_0704 + 3 * 32 bits, it contains usb_phy,
> hsic1_phy and hsic2_phy control(8.8.1.27). So I doubt the documents.
> 
> Here is the log and dts
> ===========================log================================
> [    1.000000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    1.010000] ehci-exynos: EHCI EXYNOS driver
> [    1.015000] unable to find transceiver of type USB2 PHY
> [    1.020000] exynos-ehci 12580000.ehci: no platform data or
> transceiver defined
> [    1.025000] platform 12580000.ehci: Driver exynos-ehci requests probe
> deferral

First of all, do you have CONFIG_SAMSUNG_USB2PHY enabled in your kernel
config? Also, see below.

> 
> ================================dts==================================
> diff --git a/arch/arm/boot/dts/exynos4412-tiny4412.dts
> b/arch/arm/boot/dts/exynos4412-tiny4412.dts
> new file mode 100644
> index 0000000..c8d4cfa
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos4412-tiny4412.dts
> @@ -0,0 +1,176 @@
> +/*
> + * Hardkernel's Exynos4412 based tiny4412 1306 board device tree source
> + *
> + * Copyright (c) 2013 Tomoya Gitsufuki <ayaka@mail.soulik.info>
> + *
> + * Device tree source file for Friendyarm tiny4412 1306 board which is
> based on
> + * Samsung's Exynos4412 SoC.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +/dts-v1/;
> +#include "exynos4412.dtsi"
> +
> +/ {
> +	model = "Friendly Arm Tiny4412 1306 board based on Exynos4412";
> +	compatible = "friendlyarm,tiny4412-1306", "samsung,exynos4412";
> +
> +	memory {
> +		reg = <0x40000000 0x40000000>;
> +	};
> +
> +	chosen {
> +		bootargs ="root=/dev/mmcblk0p1 rootfstype=ext4 rw
> console=ttySAC0,115200 init=/sbin/init";
> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		led1 {
> +			label = "led1:heart";
> +			gpios = <&gpm4 0 1>;
> +			default-state = "on";
> +			linux,default-trigger = "heartbeat";
> +		};
> +		led2 {
> +			label = "led2:mmc0";
> +			gpios = <&gpm4 1 1>;
> +			default-state = "on";
> +			linux,default-trigger = "mmc0";
> +		};
> +
> +	};
> +
> +	regulators {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +
> +		vemmc_reg: regulator-0 {
> +			compatible = "regulator-fixed";
> +			regulator-name = "VMEM_VDD_2.8V";
> +			regulator-min-microvolt = <2800000>;
> +			regulator-max-microvolt = <2800000>;
> +			gpio = <&gpk0 2 0>;
> +			enable-active-high;
> +		};
> +
> +	};
> +
> +	/*
> +	mshc@12550000 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
> +		pinctrl-names = "default";
> +		status = "okay";
> +
> +		vmmc-supply = <&vemmc_reg>;
> +		clocks = <&clock 301>, <&clock 149>;
> +		clocks-name = "dwmci", "sclk_dwmci";
> +		clock-frequency = <400000000>;
> +
> +		num-slots = <1>;
> +		supports-highspeed;
> +		broken-cd;
> +		fifo-depth = <0x80>;
> +		card-detect-delay = <200>;
> +		samsung,dw-mshc-sdr-timing = <2 3>;
> +		samsung,dw-mshc-ddr-timing = <1 2>;
> +
> +		slot@0 {
> +			reg = <0>;
> +			bus-width = <8>;
> +				
> +		};
> +	};
> +	*/
> +
> +	rtc@10070000 {
> +		status = "okay";
> +	};
> +
> +	sdhci@12530000 {
> +		bus-width = <4>;
> +		pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sd2_cd>;
> +		pinctrl-names = "default";
> +		status = "okay";
> +	};
> +	sdhci@1254000 {
> +		bus-width = <4>;
> +		pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &sd3_cd>;
> +		pinctrl-names = "default";
> +		status = "okay";
> +	};
> +
> +	usb_phy: usbphy@125B0000 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		compatible = "samsung,exynos4210-usbphy";

This is not the compatible listed in [1]. Moreover, it looks like the
compatible string for Exynos4x12 is not documented. According to driver
code, it should be "samsung,exynos4x12-usb2phy".

[1] Documentation/devicetree/bindings/usb/samsung-usbphy.txt

> +		reg = <0x12B0000 0x100>;

The address should be 0x125B0000.

> +		ranges;
> +
> +		clocks = <&clock 2>, <&clock 305>;
> +		clock-names = "xusbxti", "otg";
> +		usbphy-sys {
> +			/* USB device and host PHY_CONTROL registers */
> +			reg = <0x10020704 0x8>;

reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.

In general, this PHY driver is only preliminary and there is already
work going on a completely new PHY driver that will cover full USB
functionality present on Exynos 4 and should be much more reliable.

The currently available one might or might not work for you, even after
correcting the things I pointed above.

Best regards,
Tomasz

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

* Re: How to enable usb in exynos4412
  2013-11-28 14:37 ` Tomasz Figa
@ 2013-11-28 15:29   ` randy
       [not found]     ` <CAHaF_kiiRNeEiLmo+m9Lqv0+8csBJy_ub7hiRHf_aip5LEc_=Q@mail.gmail.com>
  2013-12-02  2:58     ` kasim ling
  0 siblings, 2 replies; 7+ messages in thread
From: randy @ 2013-11-28 15:29 UTC (permalink / raw)
  To: Tomasz Figa; +Cc: linux-samsung-soc, kgene.kim, stern, devicetree, balbi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Tomasz Figa
于 2013年11月28日 22:37, Tomasz Figa 写道:
> Hi Randy,
> 
> On Thursday 28 of November 2013 22:00:41 randy wrote:
>> I have development board whose SoC is exynos4412, I try to enable
>> the usb in it but I failed. I saw the document 
>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt, does it
>> mean that the usb driver is not done? And about that document, in
>> samsung datasheet(32.8.2), the address reg 0x125B_0000 + 32bits
>> contains hsic1, hsic0, phy1 and phy0's power control. And in
>> 0x1002_0704 + 3 * 32 bits, it contains usb_phy, hsic1_phy and
>> hsic2_phy control(8.8.1.27). So I doubt the documents.
>> 
>> Here is the log and dts 
>> ===========================log================================ [
>> 1.000000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI)
>> Driver [    1.010000] ehci-exynos: EHCI EXYNOS driver [
>> 1.015000] unable to find transceiver of type USB2 PHY [
>> 1.020000] exynos-ehci 12580000.ehci: no platform data or 
>> transceiver defined [    1.025000] platform 12580000.ehci: Driver
>> exynos-ehci requests probe deferral
> 
> First of all, do you have CONFIG_SAMSUNG_USB2PHY enabled in your
> kernel config? Also, see below.
> 
>> 
Yes, I have

ayaka@kotomi:~/workplace/exynos4412/kernel/linux-mainline$ cat
../build-linux-mainline/.config|grep CONFIG_SAMSUNG_USB2PHY
CONFIG_SAMSUNG_USB2PHY=y
>> ================================dts==================================
>>
>> 
diff --git a/arch/arm/boot/dts/exynos4412-tiny4412.dts
>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts new file mode 100644 
>> index 0000000..c8d4cfa --- /dev/null +++
>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts @@ -0,0 +1,176 @@ 
>> +/* + * Hardkernel's Exynos4412 based tiny4412 1306 board device
>> tree source + * + * Copyright (c) 2013 Tomoya Gitsufuki
>> <ayaka@mail.soulik.info> + * + * Device tree source file for
>> Friendyarm tiny4412 1306 board which is based on + * Samsung's
>> Exynos4412 SoC. + * + * This program is free software; you can
>> redistribute it and/or modify + * it under the terms of the GNU
>> General Public License version 2 as + * published by the Free
>> Software Foundation. +*/ + +/dts-v1/; +#include
>> "exynos4412.dtsi" + +/ { +	model = "Friendly Arm Tiny4412 1306
>> board based on Exynos4412"; +	compatible =
>> "friendlyarm,tiny4412-1306", "samsung,exynos4412"; + +	memory { +
>> reg = <0x40000000 0x40000000>; +	}; + +	chosen { +		bootargs
>> ="root=/dev/mmcblk0p1 rootfstype=ext4 rw console=ttySAC0,115200
>> init=/sbin/init"; +	}; + +	leds { +		compatible = "gpio-leds"; +
>> led1 { +			label = "led1:heart"; +			gpios = <&gpm4 0 1>; +
>> default-state = "on"; +			linux,default-trigger = "heartbeat"; +
>> }; +		led2 { +			label = "led2:mmc0"; +			gpios = <&gpm4 1 1>; +
>> default-state = "on"; +			linux,default-trigger = "mmc0"; +		}; 
>> + +	}; + +	regulators { +		compatible = "simple-bus"; +
>> #address-cells = <1>; + +		vemmc_reg: regulator-0 { +
>> compatible = "regulator-fixed"; +			regulator-name =
>> "VMEM_VDD_2.8V"; +			regulator-min-microvolt = <2800000>; +
>> regulator-max-microvolt = <2800000>; +			gpio = <&gpk0 2 0>; +
>> enable-active-high; +		}; + +	}; + +	/* +	mshc@12550000 { +
>> #address-cells = <1>; +		#size-cells = <0>; +		pinctrl-0 =
>> <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; +		pinctrl-names =
>> "default"; +		status = "okay"; + +		vmmc-supply = <&vemmc_reg>; +
>> clocks = <&clock 301>, <&clock 149>; +		clocks-name = "dwmci",
>> "sclk_dwmci"; +		clock-frequency = <400000000>; + +		num-slots =
>> <1>; +		supports-highspeed; +		broken-cd; +		fifo-depth =
>> <0x80>; +		card-detect-delay = <200>; +
>> samsung,dw-mshc-sdr-timing = <2 3>; +		samsung,dw-mshc-ddr-timing
>> = <1 2>; + +		slot@0 { +			reg = <0>; +			bus-width = <8>; + +
>> }; +	}; +	*/ + +	rtc@10070000 { +		status = "okay"; +	}; + +
>> sdhci@12530000 { +		bus-width = <4>; +		pinctrl-0 = <&sd2_clk
>> &sd2_cmd &sd2_bus4 &sd2_cd>; +		pinctrl-names = "default"; +
>> status = "okay"; +	}; +	sdhci@1254000 { +		bus-width = <4>; +
>> pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &sd3_cd>; +
>> pinctrl-names = "default"; +		status = "okay"; +	}; + +	usb_phy:
>> usbphy@125B0000 { +		#address-cells = <1>; +		#size-cells = <1>; 
>> +		compatible = "samsung,exynos4210-usbphy";
> 
> This is not the compatible listed in [1]. Moreover, it looks like
> the compatible string for Exynos4x12 is not documented. According
> to driver code, it should be "samsung,exynos4x12-usb2phy".
> 
> [1] Documentation/devicetree/bindings/usb/samsung-usbphy.txt
> 
>> +		reg = <0x12B0000 0x100>;
> 
> The address should be 0x125B0000.
> 
>> +		ranges; + +		clocks = <&clock 2>, <&clock 305>; +		clock-names
>> = "xusbxti", "otg"; +		usbphy-sys { +			/* USB device and host
>> PHY_CONTROL registers */ +			reg = <0x10020704 0x8>;
> 
> reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.
> 
> In general, this PHY driver is only preliminary and there is
> already work going on a completely new PHY driver that will cover
> full USB functionality present on Exynos 4 and should be much more
> reliable.
> 
> The currently available one might or might not work for you, even
> after correcting the things I pointed above.
> 
> Best regards, Tomasz
> 
> 
> 
I have follow you, yes it doesn't work. I have tested it many times
before, the first address problem may is modified in one test.
So I shall wait the driver to be ready?
Thank you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJSl2FPAAoJEPb4VsMIzTzi4fEH/1oSAOP3Ei3lNC8aIQM5Kzl0
TY19PlixKp33sJiSY9ojRxObilMX3MI2elNxNpKl8X+HbqJhlWlrifa+u202A4UW
Cen0RJcFfYBKSQvY2rf/aeJxTbcBFrrHc5p6P/fQh3hJn4SgfS4qYeQKyYUv494p
yhqJvHOGNDP3h2SR6DTwb/2sTiLFCvuM5Ea8IkjfLv+dsYOlaXl1/b6az0g0IHXc
wiGChsm9lQlHc5RCYpoJYFnUueRWjBoJcBPNJH54gJ3HQx48D7g5TGOAwubTPYQt
7BGuFYPqPwbEMon81bv72k/XJ6BoTH1NfWP8scMxNHrSJNLc9QUL3qlIMmA2b7c=
=LK75
-----END PGP SIGNATURE-----

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

* Re: How to enable usb in exynos4412
       [not found]     ` <CAHaF_kiiRNeEiLmo+m9Lqv0+8csBJy_ub7hiRHf_aip5LEc_=Q@mail.gmail.com>
@ 2013-12-01 13:42       ` randy
  2013-12-01 15:29         ` randy
  0 siblings, 1 reply; 7+ messages in thread
From: randy @ 2013-12-01 13:42 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kasim ling, Tomasz Figa, kgene.kim

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

But do you notice the mail Tomasz sent to me before?
I don't know whether the power control reg address of
your code is correct.
As the status is disable in your code, so shall I change it to okay
When I test it?
I will do a test later.
					Thank you
==========================================================
> +		ranges; + +		clocks = <&clock 2>, <&clock 305>; +		clock-names =
> "xusbxti", "otg"; +		usbphy-sys { +			/* USB device and host
> PHY_CONTROL registers */ +			reg = <0x10020704 0x8>;
reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.

于 2013年12月01日 20:49, kasim ling 写道:
> Hi, Randy, I'm also working with FriendlyARM Tiny4412 board and
> I've had a working 3.13-rc2-based kernel tree with USB host
> function working. You can refer to my commit at 
> https://github.com/kasimling/linux/commit/a452fb006c657de5c038f04d8f610567580ea99c.
>
> 
You can also check out branch "tiny4412_3.13-dev" of repository
> "https://github.com/kasimling/linux.git".
> 
> 
> BR, Alex
> 
> 
> On Thu, Nov 28, 2013 at 11:29 PM, randy <lxr1234@hotmail.com 
> <mailto:lxr1234@hotmail.com>> wrote:
> 
> Hello Tomasz Figa 于 2013年11月28日 22:37, Tomasz Figa 写道:
>> Hi Randy,
> 
>> On Thursday 28 of November 2013 22:00:41 randy wrote:
>>> I have development board whose SoC is exynos4412, I try to
>>> enable the usb in it but I failed. I saw the document 
>>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt, does
>>> it mean that the usb driver is not done? And about that
>>> document, in samsung datasheet(32.8.2), the address reg
>>> 0x125B_0000 + 32bits contains hsic1, hsic0, phy1 and phy0's
>>> power control. And in 0x1002_0704 + 3 * 32 bits, it contains
>>> usb_phy, hsic1_phy and hsic2_phy control(8.8.1.27). So I doubt
>>> the documents.
>>> 
>>> Here is the log and dts 
>>> ===========================log================================
>>> [ 1.000000] ehci_hcd: USB 2.0 'Enhanced' Host Controller
>>> (EHCI) Driver [    1.010000] ehci-exynos: EHCI EXYNOS driver [ 
>>> 1.015000] unable to find transceiver of type USB2 PHY [ 
>>> 1.020000] exynos-ehci 12580000.ehci: no platform data or 
>>> transceiver defined [    1.025000] platform 12580000.ehci:
>>> Driver exynos-ehci requests probe deferral
> 
>> First of all, do you have CONFIG_SAMSUNG_USB2PHY enabled in your 
>> kernel config? Also, see below.
> 
>>> 
> Yes, I have
> 
> ayaka@kotomi:~/workplace/exynos4412/kernel/linux-mainline$ cat 
> ../build-linux-mainline/.config|grep CONFIG_SAMSUNG_USB2PHY 
> CONFIG_SAMSUNG_USB2PHY=y
>>> ================================dts==================================
>>>
>>>
>
>>> 
diff --git a/arch/arm/boot/dts/exynos4412-tiny4412.dts
>>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts new file mode
>>> 100644 index 0000000..c8d4cfa --- /dev/null +++ 
>>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts @@ -0,0 +1,176 @@ 
>>> +/* + * Hardkernel's Exynos4412 based tiny4412 1306 board
>>> device tree source + * + * Copyright (c) 2013 Tomoya Gitsufuki 
>>> <ayaka@mail.soulik.info <mailto:ayaka@mail.soulik.info>> + * +
>>> *
> Device tree source file for
>>> Friendyarm tiny4412 1306 board which is based on + * Samsung's 
>>> Exynos4412 SoC. + * + * This program is free software; you can 
>>> redistribute it and/or modify + * it under the terms of the
>>> GNU General Public License version 2 as + * published by the
>>> Free Software Foundation. +*/ + +/dts-v1/; +#include 
>>> "exynos4412.dtsi" + +/ { +   model = "Friendly Arm Tiny4412
>>> 1306 board based on Exynos4412"; +        compatible = 
>>> "friendlyarm,tiny4412-1306", "samsung,exynos4412"; + +
> memory { +
>>> reg = <0x40000000 0x40000000>; +     }; + +  chosen { +
>>> 
> bootargs
>>> ="root=/dev/mmcblk0p1 rootfstype=ext4 rw
>>> console=ttySAC0,115200 init=/sbin/init"; +  }; + +  leds { +
>>> compatible =
> "gpio-leds"; +
>>> led1 { +                     label = "led1:heart"; +
>>> 
> gpios = <&gpm4 0 1>; +
>>> default-state = "on"; +
> linux,default-trigger = "heartbeat"; +
>>> }; +         led2 { +                        label =
>>> "led2:mmc0";
> +                  gpios = <&gpm4 1 1>; +
>>> default-state = "on"; +
> linux,default-trigger = "mmc0"; +               };
>>> + +  }; + +  regulators { +          compatible = "simple-bus";
>>> + #address-cells = <1>; + +            vemmc_reg: regulator-0 {
>>> + compatible = "regulator-fixed"; +
>>> regulator-name = "VMEM_VDD_2.8V"; +
>>> regulator-min-microvolt =
> <2800000>; +
>>> regulator-max-microvolt = <2800000>; +
>>> gpio
> = <&gpk0 2 0>; +
>>> enable-active-high; +                }; + +  }; + +  /* +
> mshc@12550000 { +
>>> #address-cells = <1>; +              #size-cells = <0>; +
>>> 
> pinctrl-0 =
>>> <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; +
>>> pinctrl-names = "default"; +         status = "okay"; + +
>>> vmmc-supply
> = <&vemmc_reg>; +
>>> clocks = <&clock 301>, <&clock 149>; +
>>> clocks-name
> = "dwmci",
>>> "sclk_dwmci"; +              clock-frequency = <400000000>; + +
>>> 
> num-slots =
>>> <1>; +               supports-highspeed; +           broken-cd;
>>> +
> fifo-depth =
>>> <0x80>; +            card-detect-delay = <200>; + 
>>> samsung,dw-mshc-sdr-timing = <2 3>; +
> samsung,dw-mshc-ddr-timing
>>> = <1 2>; + +         slot@0 { +                      reg = <0>;
>>> +
> bus-width = <8>; + +
>>> }; + }; +    */ + +  rtc@10070000 { +                status =
> "okay"; +      }; + +
>>> sdhci@12530000 { +           bus-width = <4>; +
> pinctrl-0 = <&sd2_clk
>>> &sd2_cmd &sd2_bus4 &sd2_cd>; +               pinctrl-names =
> "default"; +
>>> status = "okay"; +   }; +    sdhci@1254000 { +
> bus-width = <4>; +
>>> pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &sd3_cd>; + 
>>> pinctrl-names = "default"; +         status = "okay"; +      };
>>> +
> +  usb_phy:
>>> usbphy@125B0000 { +          #address-cells = <1>; +
> #size-cells = <1>;
>>> +            compatible = "samsung,exynos4210-usbphy";
> 
>> This is not the compatible listed in [1]. Moreover, it looks
>> like the compatible string for Exynos4x12 is not documented.
>> According to driver code, it should be
>> "samsung,exynos4x12-usb2phy".
> 
>> [1] Documentation/devicetree/bindings/usb/samsung-usbphy.txt
> 
>>> +            reg = <0x12B0000 0x100>;
> 
>> The address should be 0x125B0000.
> 
>>> +            ranges; + +             clocks = <&clock 2>,
>>> <&clock
> 305>; +            clock-names
>>> = "xusbxti", "otg"; +                usbphy-sys { +
>>> 
> /* USB device and host
>>> PHY_CONTROL registers */ +                   reg = <0x10020704
>>> 0x8>;
> 
>> reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.
> 
>> In general, this PHY driver is only preliminary and there is 
>> already work going on a completely new PHY driver that will
>> cover full USB functionality present on Exynos 4 and should be
>> much more reliable.
> 
>> The currently available one might or might not work for you,
>> even after correcting the things I pointed above.
> 
>> Best regards, Tomasz
> 
> 
> 
> I have follow you, yes it doesn't work. I have tested it many
> times before, the first address problem may is modified in one
> test. So I shall wait the driver to be ready? Thank you. -- To
> unsubscribe from this list: send the line "unsubscribe 
> linux-samsung-soc" in the body of a message to
> majordomo@vger.kernel.org <mailto:majordomo@vger.kernel.org> More
> majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJSmzzgAAoJEPb4VsMIzTziC3IIAIXeqKjuZdH5PUuDhaZOFoxv
+il5iz/5tHyOliCrrM/6KwI+x8ni+FybJ4/1IJiUkrUjkRWbIb9TBvBgVAvEUPw6
pjnMLJuiEZRCcVTa26rrtcDgMqvgDj3yTl3DLnYv9QqPgvsqtmLrpH9pUoIsOiBL
YrbGMVkESuIal6RKpyvEcirHB0syonRFuATtEDAgcqWXEev/yPwPlEocAXEKUo9e
YW59p55MuhOd3689Vgb40gIEWm4ml0kZQWE5K40U1iE1Bkgfjr+XJwRPb8EkDXh1
0RWlBePSvoSPG6vuUtNcNyh5JzXxma24eCg5+tKZuiQ6sobp46zrkSMODj5AAZA=
=zq1V
-----END PGP SIGNATURE-----

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

* Re: How to enable usb in exynos4412
  2013-12-01 13:42       ` randy
@ 2013-12-01 15:29         ` randy
  2013-12-01 15:48           ` Tomasz Figa
  0 siblings, 1 reply; 7+ messages in thread
From: randy @ 2013-12-01 15:29 UTC (permalink / raw)
  To: linux-samsung-soc, kasim ling, Tomasz Figa, kgene.kim

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, the usb is workable.
The 0x1001021c is the USB control register from samsung datasheet(12.2)
Thank you. I will check my code to know why it doesn't work.
I didn't notice your work in mail list before.
But I think we shall separate hw:1306 and hw:1308 of tiny4412.
As those external devices have some different.
Thank you again
于 2013年12月01日 21:42, randy 写道:
> But do you notice the mail Tomasz sent to me before? I don't know
> whether the power control reg address of your code is correct. As
> the status is disable in your code, so shall I change it to okay 
> When I test it? I will do a test later. Thank you 
> ==========================================================
>> +		ranges; + +		clocks = <&clock 2>, <&clock 305>; +		clock-names
>> = "xusbxti", "otg"; +		usbphy-sys { +			/* USB device and host 
>> PHY_CONTROL registers */ +			reg = <0x10020704 0x8>;
> reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.
> 
> 于 2013年12月01日 20:49, kasim ling 写道:
>> Hi, Randy, I'm also working with FriendlyARM Tiny4412 board and 
>> I've had a working 3.13-rc2-based kernel tree with USB host 
>> function working. You can refer to my commit at 
>> https://github.com/kasimling/linux/commit/a452fb006c657de5c038f04d8f610567580ea99c.
>
>> 
> 
> You can also check out branch "tiny4412_3.13-dev" of repository
>> "https://github.com/kasimling/linux.git".
> 
> 
>> BR, Alex
> 
> 
>> On Thu, Nov 28, 2013 at 11:29 PM, randy <lxr1234@hotmail.com 
>> <mailto:lxr1234@hotmail.com>> wrote:
> 
>> Hello Tomasz Figa 于 2013年11月28日 22:37, Tomasz Figa 写道:
>>> Hi Randy,
> 
>>> On Thursday 28 of November 2013 22:00:41 randy wrote:
>>>> I have development board whose SoC is exynos4412, I try to 
>>>> enable the usb in it but I failed. I saw the document 
>>>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt,
>>>> does it mean that the usb driver is not done? And about that 
>>>> document, in samsung datasheet(32.8.2), the address reg 
>>>> 0x125B_0000 + 32bits contains hsic1, hsic0, phy1 and phy0's 
>>>> power control. And in 0x1002_0704 + 3 * 32 bits, it contains 
>>>> usb_phy, hsic1_phy and hsic2_phy control(8.8.1.27). So I
>>>> doubt the documents.
>>>> 
>>>> Here is the log and dts 
>>>> ===========================log================================
>>>>
>>>> 
[ 1.000000] ehci_hcd: USB 2.0 'Enhanced' Host Controller
>>>> (EHCI) Driver [    1.010000] ehci-exynos: EHCI EXYNOS driver
>>>> [ 1.015000] unable to find transceiver of type USB2 PHY [ 
>>>> 1.020000] exynos-ehci 12580000.ehci: no platform data or 
>>>> transceiver defined [    1.025000] platform 12580000.ehci: 
>>>> Driver exynos-ehci requests probe deferral
> 
>>> First of all, do you have CONFIG_SAMSUNG_USB2PHY enabled in
>>> your kernel config? Also, see below.
> 
>>>> 
>> Yes, I have
> 
>> ayaka@kotomi:~/workplace/exynos4412/kernel/linux-mainline$ cat 
>> ../build-linux-mainline/.config|grep CONFIG_SAMSUNG_USB2PHY 
>> CONFIG_SAMSUNG_USB2PHY=y
>>>> ================================dts==================================
>>>>
>>>>
>
>>>> 
>>>> 
> diff --git a/arch/arm/boot/dts/exynos4412-tiny4412.dts
>>>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts new file mode 
>>>> 100644 index 0000000..c8d4cfa --- /dev/null +++ 
>>>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts @@ -0,0 +1,176 @@
>>>>  +/* + * Hardkernel's Exynos4412 based tiny4412 1306 board 
>>>> device tree source + * + * Copyright (c) 2013 Tomoya
>>>> Gitsufuki <ayaka@mail.soulik.info
>>>> <mailto:ayaka@mail.soulik.info>> + * + *
>> Device tree source file for
>>>> Friendyarm tiny4412 1306 board which is based on + *
>>>> Samsung's Exynos4412 SoC. + * + * This program is free
>>>> software; you can redistribute it and/or modify + * it under
>>>> the terms of the GNU General Public License version 2 as + *
>>>> published by the Free Software Foundation. +*/ + +/dts-v1/;
>>>> +#include "exynos4412.dtsi" + +/ { +   model = "Friendly Arm
>>>> Tiny4412 1306 board based on Exynos4412"; +        compatible
>>>> = "friendlyarm,tiny4412-1306", "samsung,exynos4412"; + +
>> memory { +
>>>> reg = <0x40000000 0x40000000>; +     }; + +  chosen { +
>>>> 
>> bootargs
>>>> ="root=/dev/mmcblk0p1 rootfstype=ext4 rw 
>>>> console=ttySAC0,115200 init=/sbin/init"; +  }; + +  leds { + 
>>>> compatible =
>> "gpio-leds"; +
>>>> led1 { +                     label = "led1:heart"; +
>>>> 
>> gpios = <&gpm4 0 1>; +
>>>> default-state = "on"; +
>> linux,default-trigger = "heartbeat"; +
>>>> }; +         led2 { +                        label = 
>>>> "led2:mmc0";
>> +                  gpios = <&gpm4 1 1>; +
>>>> default-state = "on"; +
>> linux,default-trigger = "mmc0"; +               };
>>>> + +  }; + +  regulators { +          compatible =
>>>> "simple-bus"; + #address-cells = <1>; + +
>>>> vemmc_reg: regulator-0 { + compatible = "regulator-fixed"; + 
>>>> regulator-name = "VMEM_VDD_2.8V"; + regulator-min-microvolt
>>>> =
>> <2800000>; +
>>>> regulator-max-microvolt = <2800000>; + gpio
>> = <&gpk0 2 0>; +
>>>> enable-active-high; +                }; + +  }; + +  /* +
>> mshc@12550000 { +
>>>> #address-cells = <1>; +              #size-cells = <0>; +
>>>> 
>> pinctrl-0 =
>>>> <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; + pinctrl-names =
>>>> "default"; +         status = "okay"; + + vmmc-supply
>> = <&vemmc_reg>; +
>>>> clocks = <&clock 301>, <&clock 149>; + clocks-name
>> = "dwmci",
>>>> "sclk_dwmci"; +              clock-frequency = <400000000>; +
>>>> +
>>>> 
>> num-slots =
>>>> <1>; +               supports-highspeed; +
>>>> broken-cd; +
>> fifo-depth =
>>>> <0x80>; +            card-detect-delay = <200>; + 
>>>> samsung,dw-mshc-sdr-timing = <2 3>; +
>> samsung,dw-mshc-ddr-timing
>>>> = <1 2>; + +         slot@0 { +                      reg =
>>>> <0>; +
>> bus-width = <8>; + +
>>>> }; + }; +    */ + +  rtc@10070000 { +                status
>>>> =
>> "okay"; +      }; + +
>>>> sdhci@12530000 { +           bus-width = <4>; +
>> pinctrl-0 = <&sd2_clk
>>>> &sd2_cmd &sd2_bus4 &sd2_cd>; +               pinctrl-names =
>> "default"; +
>>>> status = "okay"; +   }; +    sdhci@1254000 { +
>> bus-width = <4>; +
>>>> pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &sd3_cd>; + 
>>>> pinctrl-names = "default"; +         status = "okay"; +
>>>> }; +
>> +  usb_phy:
>>>> usbphy@125B0000 { +          #address-cells = <1>; +
>> #size-cells = <1>;
>>>> +            compatible = "samsung,exynos4210-usbphy";
> 
>>> This is not the compatible listed in [1]. Moreover, it looks 
>>> like the compatible string for Exynos4x12 is not documented. 
>>> According to driver code, it should be 
>>> "samsung,exynos4x12-usb2phy".
> 
>>> [1] Documentation/devicetree/bindings/usb/samsung-usbphy.txt
> 
>>>> +            reg = <0x12B0000 0x100>;
> 
>>> The address should be 0x125B0000.
> 
>>>> +            ranges; + +             clocks = <&clock 2>, 
>>>> <&clock
>> 305>; +            clock-names
>>>> = "xusbxti", "otg"; +                usbphy-sys { +
>>>> 
>> /* USB device and host
>>>> PHY_CONTROL registers */ +                   reg =
>>>> <0x10020704 0x8>;
> 
>>> reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.
> 
>>> In general, this PHY driver is only preliminary and there is 
>>> already work going on a completely new PHY driver that will 
>>> cover full USB functionality present on Exynos 4 and should be 
>>> much more reliable.
> 
>>> The currently available one might or might not work for you, 
>>> even after correcting the things I pointed above.
> 
>>> Best regards, Tomasz
> 
> 
> 
>> I have follow you, yes it doesn't work. I have tested it many 
>> times before, the first address problem may is modified in one 
>> test. So I shall wait the driver to be ready? Thank you. -- To 
>> unsubscribe from this list: send the line "unsubscribe 
>> linux-samsung-soc" in the body of a message to 
>> majordomo@vger.kernel.org <mailto:majordomo@vger.kernel.org>
>> More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
> 
> 
> 
> -- To unsubscribe from this list: send the line "unsubscribe
> linux-samsung-soc" in the body of a message to
> majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJSm1XdAAoJEPb4VsMIzTzi48wH/ieQyX44A9ScQXdC4jaSYyxm
XdnaoY35PA5Sl0sTi5WnoHm4+Harcr5yPebOVAVZAua49f9xIodH/LBYLVZV5KJW
22Zy0Lk2+I2DrCKV09SVHRF91Nw5PCZJYcPs9AlQpTBDr+QB3c3L47i8ek/cZw5B
dVWLRurM5u6DADysUqyudmk1hbHbFVun/3pUeQw1lwFmHdYepp+5RYnoDzECbmYS
rkVIX8rnxbg/d3Ow2XO2gdKXHFiY5ST7QAACIzIriq9ZSfsqrYWdiEG1k5CrzK8o
Z/nKEfBuQw5JidyQDwCbOFrhRpeW9KLJ5UQfW619sNwPy9M6a+HDqYaevdWSodA=
=JSWH
-----END PGP SIGNATURE-----

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

* Re: How to enable usb in exynos4412
  2013-12-01 15:29         ` randy
@ 2013-12-01 15:48           ` Tomasz Figa
  0 siblings, 0 replies; 7+ messages in thread
From: Tomasz Figa @ 2013-12-01 15:48 UTC (permalink / raw)
  To: randy, kasim ling; +Cc: linux-samsung-soc, Tomasz Figa, kgene.kim

Hi,

Since it seems like you are not quite accustomed to posting on mailing
lists yet, I'd like to recommend you to read following great article:

http://linux.sgms-centre.com/misc/netiquette.php

Applying the simple rules pointed there will save you from potential
unpleasant reception of your messages by other list subscribers and
probably also greatly increase chances of your questions getting answered.

I'd like especially point that HTML messages are not allowed on many
mailing lists and they are simply dropped, without any chance of being
read by other people.

Best regards,
Tomasz

On Sunday 01 of December 2013 23:29:33 randy wrote:
> Yes, the usb is workable.
> The 0x1001021c is the USB control register from samsung datasheet(12.2)
> Thank you. I will check my code to know why it doesn't work.
> I didn't notice your work in mail list before.
> But I think we shall separate hw:1306 and hw:1308 of tiny4412.
> As those external devices have some different.
> Thank you again
> 于 2013年12月01日 21:42, randy 写道:
> > But do you notice the mail Tomasz sent to me before? I don't know
> > whether the power control reg address of your code is correct. As
> > the status is disable in your code, so shall I change it to okay
> > When I test it? I will do a test later. Thank you
> > ==========================================================
> >> +		ranges; + +		clocks = <&clock 2>, <&clock 305>; +		clock-names
> >> = "xusbxti", "otg"; +		usbphy-sys { +			/* USB device and host
> >> PHY_CONTROL registers */ +			reg = <0x10020704 0x8>;
> > reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.
> >
> > 于 2013年12月01日 20:49, kasim ling 写道:
> >> Hi, Randy, I'm also working with FriendlyARM Tiny4412 board and
> >> I've had a working 3.13-rc2-based kernel tree with USB host
> >> function working. You can refer to my commit at
> >> https://github.com/kasimling/linux/commit/a452fb006c657de5c038f04d8f610567580ea99c.
> >
> >>
> >
> > You can also check out branch "tiny4412_3.13-dev" of repository
> >> "https://github.com/kasimling/linux.git".
> >
> >
> >> BR, Alex
> >
> >
> >> On Thu, Nov 28, 2013 at 11:29 PM, randy <lxr1234@hotmail.com
> >> <mailto:lxr1234@hotmail.com>> wrote:
> >
> >> Hello Tomasz Figa 于 2013年11月28日 22:37, Tomasz Figa 写道:
> >>> Hi Randy,
> >
> >>> On Thursday 28 of November 2013 22:00:41 randy wrote:
> >>>> I have development board whose SoC is exynos4412, I try to
> >>>> enable the usb in it but I failed. I saw the document
> >>>> Documentation/devicetree/bindings/usb/samsung-usbphy.txt,
> >>>> does it mean that the usb driver is not done? And about that
> >>>> document, in samsung datasheet(32.8.2), the address reg
> >>>> 0x125B_0000 + 32bits contains hsic1, hsic0, phy1 and phy0's
> >>>> power control. And in 0x1002_0704 + 3 * 32 bits, it contains
> >>>> usb_phy, hsic1_phy and hsic2_phy control(8.8.1.27). So I
> >>>> doubt the documents.
> >>>>
> >>>> Here is the log and dts
> >>>> ===========================log================================
> >>>>
> >>>>
> [ 1.000000] ehci_hcd: USB 2.0 'Enhanced' Host Controller
> >>>> (EHCI) Driver [    1.010000] ehci-exynos: EHCI EXYNOS driver
> >>>> [ 1.015000] unable to find transceiver of type USB2 PHY [
> >>>> 1.020000] exynos-ehci 12580000.ehci: no platform data or
> >>>> transceiver defined [    1.025000] platform 12580000.ehci:
> >>>> Driver exynos-ehci requests probe deferral
> >
> >>> First of all, do you have CONFIG_SAMSUNG_USB2PHY enabled in
> >>> your kernel config? Also, see below.
> >
> >>>>
> >> Yes, I have
> >
> >> ayaka@kotomi:~/workplace/exynos4412/kernel/linux-mainline$ cat
> >> ../build-linux-mainline/.config|grep CONFIG_SAMSUNG_USB2PHY
> >> CONFIG_SAMSUNG_USB2PHY=y
> >>>> ================================dts==================================
> >>>>
> >>>>
> >
> >>>>
> >>>>
> > diff --git a/arch/arm/boot/dts/exynos4412-tiny4412.dts
> >>>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts new file mode
> >>>> 100644 index 0000000..c8d4cfa --- /dev/null +++
> >>>> b/arch/arm/boot/dts/exynos4412-tiny4412.dts @@ -0,0 +1,176 @@
> >>>>  +/* + * Hardkernel's Exynos4412 based tiny4412 1306 board
> >>>> device tree source + * + * Copyright (c) 2013 Tomoya
> >>>> Gitsufuki <ayaka@mail.soulik.info
> >>>> <mailto:ayaka@mail.soulik.info>> + * + *
> >> Device tree source file for
> >>>> Friendyarm tiny4412 1306 board which is based on + *
> >>>> Samsung's Exynos4412 SoC. + * + * This program is free
> >>>> software; you can redistribute it and/or modify + * it under
> >>>> the terms of the GNU General Public License version 2 as + *
> >>>> published by the Free Software Foundation. +*/ + +/dts-v1/;
> >>>> +#include "exynos4412.dtsi" + +/ { +   model = "Friendly Arm
> >>>> Tiny4412 1306 board based on Exynos4412"; +        compatible
> >>>> = "friendlyarm,tiny4412-1306", "samsung,exynos4412"; + +
> >> memory { +
> >>>> reg = <0x40000000 0x40000000>; +     }; + +  chosen { +
> >>>>
> >> bootargs
> >>>> ="root=/dev/mmcblk0p1 rootfstype=ext4 rw
> >>>> console=ttySAC0,115200 init=/sbin/init"; +  }; + +  leds { +
> >>>> compatible =
> >> "gpio-leds"; +
> >>>> led1 { +                     label = "led1:heart"; +
> >>>>
> >> gpios = <&gpm4 0 1>; +
> >>>> default-state = "on"; +
> >> linux,default-trigger = "heartbeat"; +
> >>>> }; +         led2 { +                        label =
> >>>> "led2:mmc0";
> >> +                  gpios = <&gpm4 1 1>; +
> >>>> default-state = "on"; +
> >> linux,default-trigger = "mmc0"; +               };
> >>>> + +  }; + +  regulators { +          compatible =
> >>>> "simple-bus"; + #address-cells = <1>; + +
> >>>> vemmc_reg: regulator-0 { + compatible = "regulator-fixed"; +
> >>>> regulator-name = "VMEM_VDD_2.8V"; + regulator-min-microvolt
> >>>> =
> >> <2800000>; +
> >>>> regulator-max-microvolt = <2800000>; + gpio
> >> = <&gpk0 2 0>; +
> >>>> enable-active-high; +                }; + +  }; + +  /* +
> >> mshc@12550000 { +
> >>>> #address-cells = <1>; +              #size-cells = <0>; +
> >>>>
> >> pinctrl-0 =
> >>>> <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; + pinctrl-names =
> >>>> "default"; +         status = "okay"; + + vmmc-supply
> >> = <&vemmc_reg>; +
> >>>> clocks = <&clock 301>, <&clock 149>; + clocks-name
> >> = "dwmci",
> >>>> "sclk_dwmci"; +              clock-frequency = <400000000>; +
> >>>> +
> >>>>
> >> num-slots =
> >>>> <1>; +               supports-highspeed; +
> >>>> broken-cd; +
> >> fifo-depth =
> >>>> <0x80>; +            card-detect-delay = <200>; +
> >>>> samsung,dw-mshc-sdr-timing = <2 3>; +
> >> samsung,dw-mshc-ddr-timing
> >>>> = <1 2>; + +         slot@0 { +                      reg =
> >>>> <0>; +
> >> bus-width = <8>; + +
> >>>> }; + }; +    */ + +  rtc@10070000 { +                status
> >>>> =
> >> "okay"; +      }; + +
> >>>> sdhci@12530000 { +           bus-width = <4>; +
> >> pinctrl-0 = <&sd2_clk
> >>>> &sd2_cmd &sd2_bus4 &sd2_cd>; +               pinctrl-names =
> >> "default"; +
> >>>> status = "okay"; +   }; +    sdhci@1254000 { +
> >> bus-width = <4>; +
> >>>> pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &sd3_cd>; +
> >>>> pinctrl-names = "default"; +         status = "okay"; +
> >>>> }; +
> >> +  usb_phy:
> >>>> usbphy@125B0000 { +          #address-cells = <1>; +
> >> #size-cells = <1>;
> >>>> +            compatible = "samsung,exynos4210-usbphy";
> >
> >>> This is not the compatible listed in [1]. Moreover, it looks
> >>> like the compatible string for Exynos4x12 is not documented.
> >>> According to driver code, it should be
> >>> "samsung,exynos4x12-usb2phy".
> >
> >>> [1] Documentation/devicetree/bindings/usb/samsung-usbphy.txt
> >
> >>>> +            reg = <0x12B0000 0x100>;
> >
> >>> The address should be 0x125B0000.
> >
> >>>> +            ranges; + +             clocks = <&clock 2>,
> >>>> <&clock
> >> 305>; +            clock-names
> >>>> = "xusbxti", "otg"; +                usbphy-sys { +
> >>>>
> >> /* USB device and host
> >>>> PHY_CONTROL registers */ +                   reg =
> >>>> <0x10020704 0x8>;
> >
> >>> reg should be <0x10020704 0xc 0x1001021c 0x4> on Exynos4x12.
> >
> >>> In general, this PHY driver is only preliminary and there is
> >>> already work going on a completely new PHY driver that will
> >>> cover full USB functionality present on Exynos 4 and should be
> >>> much more reliable.
> >
> >>> The currently available one might or might not work for you,
> >>> even after correcting the things I pointed above.
> >
> >>> Best regards, Tomasz
> >
> >
> >
> >> I have follow you, yes it doesn't work. I have tested it many
> >> times before, the first address problem may is modified in one
> >> test. So I shall wait the driver to be ready? Thank you. -- To
> >> unsubscribe from this list: send the line "unsubscribe
> >> linux-samsung-soc" in the body of a message to
> >> majordomo@vger.kernel.org <mailto:majordomo@vger.kernel.org>
> >> More majordomo info at
> >> http://vger.kernel.org/majordomo-info.html
> >
> >
> >
> > -- To unsubscribe from this list: send the line "unsubscribe
> > linux-samsung-soc" in the body of a message to
> > majordomo@vger.kernel.org More majordomo info at
> > http://vger.kernel.org/majordomo-info.html
> >
> >
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: How to enable usb in exynos4412
  2013-11-28 15:29   ` randy
       [not found]     ` <CAHaF_kiiRNeEiLmo+m9Lqv0+8csBJy_ub7hiRHf_aip5LEc_=Q@mail.gmail.com>
@ 2013-12-02  2:58     ` kasim ling
  1 sibling, 0 replies; 7+ messages in thread
From: kasim ling @ 2013-12-02  2:58 UTC (permalink / raw)
  To: randy; +Cc: Tomasz Figa, linux-samsung-soc, kgene.kim, stern, devicetree,
	balbi

(Resend in plain text mode)
Hi, Randy,
I'm also working with FriendlyARM Tiny4412 board and I've had a
working 3.13-rc2-based kernel tree with USB host function working. You
can refer to my commit at
https://github.com/kasimling/linux/commit/a452fb006c657de5c038f04d8f610567580ea99c.
You can also check out branch "tiny4412_3.13-dev" of repository
"https://github.com/kasimling/linux.git".


BR,
Alex

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

end of thread, other threads:[~2013-12-02  2:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28 14:00 How to enable usb in exynos4412 randy
2013-11-28 14:37 ` Tomasz Figa
2013-11-28 15:29   ` randy
     [not found]     ` <CAHaF_kiiRNeEiLmo+m9Lqv0+8csBJy_ub7hiRHf_aip5LEc_=Q@mail.gmail.com>
2013-12-01 13:42       ` randy
2013-12-01 15:29         ` randy
2013-12-01 15:48           ` Tomasz Figa
2013-12-02  2:58     ` kasim ling

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.