From: Tomasz Figa <t.figa@samsung.com>
To: randy <lxr1234@hotmail.com>
Cc: linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
stern@rowland.harvard.edu, devicetree@vger.kernel.org,
balbi@ti.com
Subject: Re: How to enable usb in exynos4412
Date: Thu, 28 Nov 2013 15:37:07 +0100 [thread overview]
Message-ID: <2200229.bjG2XWDipV@amdc1227> (raw)
In-Reply-To: <BLU0-SMTP72A83BF7783889A9C59A03ADEE0@phx.gbl>
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
next prev parent reply other threads:[~2013-11-28 14:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 14:00 How to enable usb in exynos4412 randy
2013-11-28 14:37 ` Tomasz Figa [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2200229.bjG2XWDipV@amdc1227 \
--to=t.figa@samsung.com \
--cc=balbi@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=kgene.kim@samsung.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lxr1234@hotmail.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.