2014-04-30 08:55:29

by Vivek Gautam

[permalink] [raw]
Subject: [PATCH 0/4] dts: Add usb2phy to Exynos 5250/5420

Next version for earlier patch-series:
[PATCH v7 0/2] dts: Add usb2phy to Exynos 5250

Based on 'for-next' branch of Kgene's linux-samsung tree.

Tested with driver side patches:
[PATCH v2 1/4] usb: ohci-exynos: Use struct device instead of platform_device
[PATCH v2 2/4] usb: ehci-exynos: Use struct device instead of platform_device
[PATCH v4 1/2] usb: ohci-exynos: Add facility to use phy provided by the generic phy framework
[PATCH v10 4/4] usb: ehci-exynos: Change to use phy provided by the generic phy framework


Changes from v7 series:
- Added patches to enable usb 2.0 support on exynos5420;
which include dt nodes for usb2phy as well as ehci and ohci
controllers.

Changes from v6:
- Splitted the patch into two:
adding syscon nodes to Exynos5250 and Exynos5420 in first;
and phy entry change in the second.
- Changed the name of phandle for usb2phy from 'usb2_phy_new'
to 'usb2_phy_gen' indicating generic phy.
- Using clock macros in dt entries.

Kamil Debski (1):
ARM: dts: Add usb2phy to Exynos 5250

Vivek Gautam (3):
ARM: dts: Add sysreg sytem controller node to exynos5250 and
exynos5420
ARM: dts: Add usb2phy support on exynos5420
ARM: dts: Add usb 2.0 support on exynos5420

arch/arm/boot/dts/exynos5250.dtsi | 31 +++++++++++++++++++++++
arch/arm/boot/dts/exynos5420.dtsi | 49 +++++++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+)

--
1.7.10.4


2014-04-30 08:55:39

by Vivek Gautam

[permalink] [raw]
Subject: [PATCH v8 1/4] ARM: dts: Add sysreg sytem controller node to exynos5250 and exynos5420

This patch adds sysreg-syscon node to exynos5250 and exynos5420 device
tree, to access System Register's registers using syscon driver.

Signed-off-by: Kamil Debski <[email protected]>
[[email protected]: Split this syreg-syscon dts entry from
dts: Add usb2phy to Exynos 5250 patch]
[[email protected]: added similar syscon entry for exynos5420]
Signed-off-by: Vivek Gautam <[email protected]>
---

Changes from v7:
None

arch/arm/boot/dts/exynos5250.dtsi | 5 +++++
arch/arm/boot/dts/exynos5420.dtsi | 5 +++++
2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 3742331..70f0cd5 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -175,6 +175,11 @@
reg = <0x10040000 0x5000>;
};

+ sysreg_system_controller: syscon@10050000 {
+ compatible = "samsung,exynos5250-sys", "syscon";
+ reg = <0x10050000 0x5000>;
+ };
+
watchdog@101D0000 {
compatible = "samsung,exynos5250-wdt";
reg = <0x101D0000 0x100>;
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index c3a9a66..cfa3755 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -675,6 +675,11 @@
reg = <0x10040000 0x5000>;
};

+ sysreg_system_controller: syscon@10050000 {
+ compatible = "samsung,exynos5420-sys", "syscon";
+ reg = <0x10050000 0x5000>;
+ };
+
tmu_cpu0: tmu@10060000 {
compatible = "samsung,exynos5420-tmu";
reg = <0x10060000 0x100>;
--
1.7.10.4

2014-04-30 08:56:13

by Vivek Gautam

[permalink] [raw]
Subject: [PATCH 4/4] ARM: dts: Add usb 2.0 support on exynos5420

Add required device node for ehci and ohci controllers to
enable USB 2.0 support.

Signed-off-by: Vivek Gautam <[email protected]>
---
arch/arm/boot/dts/exynos5420.dtsi | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 16b860a..392d340 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -738,7 +738,41 @@
samsung,power-domain = <&g2d_pd>;
};

- phy@12130000 {
+ usb@12110000 {
+ compatible = "samsung,exynos4210-ehci";
+ reg = <0x12110000 0x100>;
+ interrupts = <0 71 0>;
+
+ clocks = <&clock CLK_USBH20>;
+ clock-names = "usbhost";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ phys = <&usb2_phy_gen 1>;
+ phy-names = "host";
+ status = "ok";
+ };
+ };
+
+ usb@12120000 {
+ compatible = "samsung,exynos4210-ohci";
+ reg = <0x12120000 0x100>;
+ interrupts = <0 71 0>;
+
+ clocks = <&clock CLK_USBH20>;
+ clock-names = "usbhost";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ phys = <&usb2_phy_gen 1>;
+ phy-names = "host";
+ status = "ok";
+ };
+ };
+
+ usb2_phy_gen: phy@12130000 {
compatible = "samsung,exynos5250-usb2-phy";
reg = <0x12130000 0x100>;
clocks = <&clock CLK_USBH20>, <&clock CLK_SCLK_USBPHY300>;
--
1.7.10.4

2014-04-30 08:55:46

by Vivek Gautam

[permalink] [raw]
Subject: [PATCH 3/4] ARM: dts: Add usb2phy support on exynos5420

Add required device node for usb2phy to let enable USB 2.0
support.

Signed-off-by: Vivek Gautam <[email protected]>
---
arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index cfa3755..16b860a 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -737,4 +737,14 @@
clock-names = "secss";
samsung,power-domain = <&g2d_pd>;
};
+
+ phy@12130000 {
+ compatible = "samsung,exynos5250-usb2-phy";
+ reg = <0x12130000 0x100>;
+ clocks = <&clock CLK_USBH20>, <&clock CLK_SCLK_USBPHY300>;
+ clock-names = "phy", "ref";
+ #phy-cells = <1>;
+ samsung,sysreg-phandle = <&sysreg_system_controller>;
+ samsung,pmureg-phandle = <&pmu_system_controller>;
+ };
};
--
1.7.10.4

2014-04-30 08:57:38

by Vivek Gautam

[permalink] [raw]
Subject: [PATCH 2/4] ARM: dts: Add usb2phy to Exynos 5250

From: Kamil Debski <[email protected]>

Add support to PHY of USB2 of the Exynos 5250 SoC.

Signed-off-by: Kamil Debski <[email protected]>
[[email protected]: Split the usb phy entries from
syscon entries from earlier patch: dts: Add usb2phy to Exynos 5250]
[[email protected]: Added phy entry for OHCI also along with EHCI]
Signed-off-by: Vivek Gautam <[email protected]>
---

Changes from v7:
None

arch/arm/boot/dts/exynos5250.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 70f0cd5..51e554c 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -563,6 +563,14 @@

clocks = <&clock CLK_USB2>;
clock-names = "usbhost";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ phys = <&usb2_phy_gen 1>;
+ phy-names = "host";
+ status = "ok";
+ };
};

usb@12120000 {
@@ -572,6 +580,14 @@

clocks = <&clock CLK_USB2>;
clock-names = "usbhost";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0>;
+ phys = <&usb2_phy_gen 1>;
+ phy-names = "host";
+ status = "ok";
+ };
};

usb2_phy: usbphy@12130000 {
@@ -589,6 +605,16 @@
};
};

+ usb2_phy_gen: phy@12130000 {
+ compatible = "samsung,exynos5250-usb2-phy";
+ reg = <0x12130000 0x100>;
+ clocks = <&clock CLK_USB2>, <&clock CLK_FIN_PLL>;
+ clock-names = "phy", "ref";
+ #phy-cells = <1>;
+ samsung,sysreg-phandle = <&sysreg_system_controller>;
+ samsung,pmureg-phandle = <&pmu_system_controller>;
+ };
+
pwm: pwm@12dd0000 {
compatible = "samsung,exynos4210-pwm";
reg = <0x12dd0000 0x100>;
--
1.7.10.4

2014-04-30 10:25:24

by Arun Kumar K

[permalink] [raw]
Subject: Re: [PATCH 3/4] ARM: dts: Add usb2phy support on exynos5420

Hi Vivek,

On 04/30/14 14:25, Vivek Gautam wrote:
> Add required device node for usb2phy to let enable USB 2.0
> support.
>
> Signed-off-by: Vivek Gautam <[email protected]>
> ---
> arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index cfa3755..16b860a 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -737,4 +737,14 @@
> clock-names = "secss";
> samsung,power-domain = <&g2d_pd>;
> };
> +
> + phy@12130000 {

As we will be changing over to reference-based updation of nodes in the
board dts files, it would be good to add node reference also while
adding new nodes. Like : usb_phy: phy@12130000 {

Regards
Arun

> + compatible = "samsung,exynos5250-usb2-phy";
> + reg = <0x12130000 0x100>;
> + clocks = <&clock CLK_USBH20>, <&clock CLK_SCLK_USBPHY300>;
> + clock-names = "phy", "ref";
> + #phy-cells = <1>;
> + samsung,sysreg-phandle = <&sysreg_system_controller>;
> + samsung,pmureg-phandle = <&pmu_system_controller>;
> + };
> };
>

2014-04-30 10:37:55

by Vivek Gautam

[permalink] [raw]
Subject: Re: [PATCH 3/4] ARM: dts: Add usb2phy support on exynos5420

Hi Arun,


On Wed, Apr 30, 2014 at 3:55 PM, Arun Kumar K <[email protected]> wrote:
> Hi Vivek,
>
> On 04/30/14 14:25, Vivek Gautam wrote:
>> Add required device node for usb2phy to let enable USB 2.0
>> support.
>>
>> Signed-off-by: Vivek Gautam <[email protected]>
>> ---
>> arch/arm/boot/dts/exynos5420.dtsi | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
>> index cfa3755..16b860a 100644
>> --- a/arch/arm/boot/dts/exynos5420.dtsi
>> +++ b/arch/arm/boot/dts/exynos5420.dtsi
>> @@ -737,4 +737,14 @@
>> clock-names = "secss";
>> samsung,power-domain = <&g2d_pd>;
>> };
>> +
>> + phy@12130000 {
>
> As we will be changing over to reference-based updation of nodes in the
> board dts files, it would be good to add node reference also while
> adding new nodes. Like : usb_phy: phy@12130000 {

Sure, i will add node-references to phy as well as the usb nodes in
the subsequent patch.

[snip]


--
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India

2014-04-30 16:44:11

by Sachin Kamat

[permalink] [raw]
Subject: Re: [PATCH 2/4] ARM: dts: Add usb2phy to Exynos 5250

Hi Vivek,

On 30 April 2014 14:25, Vivek Gautam <[email protected]> wrote:
> From: Kamil Debski <[email protected]>
>
> Add support to PHY of USB2 of the Exynos 5250 SoC.
>
> Signed-off-by: Kamil Debski <[email protected]>
> [[email protected]: Split the usb phy entries from
> syscon entries from earlier patch: dts: Add usb2phy to Exynos 5250]
> [[email protected]: Added phy entry for OHCI also along with EHCI]
> Signed-off-by: Vivek Gautam <[email protected]>
> ---
>
> Changes from v7:
> None
>
> arch/arm/boot/dts/exynos5250.dtsi | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index 70f0cd5..51e554c 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -563,6 +563,14 @@
>
> clocks = <&clock CLK_USB2>;
> clock-names = "usbhost";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + reg = <0>;
> + phys = <&usb2_phy_gen 1>;
> + phy-names = "host";
> + status = "ok";

This should be "okay".

> + };
> };
>
> usb@12120000 {
> @@ -572,6 +580,14 @@
>
> clocks = <&clock CLK_USB2>;
> clock-names = "usbhost";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + reg = <0>;
> + phys = <&usb2_phy_gen 1>;
> + phy-names = "host";
> + status = "ok";

ditto.


--
With warm regards,
Sachin

2014-04-30 16:45:33

by Sachin Kamat

[permalink] [raw]
Subject: Re: [PATCH 4/4] ARM: dts: Add usb 2.0 support on exynos5420

On 30 April 2014 14:25, Vivek Gautam <[email protected]> wrote:
> Add required device node for ehci and ohci controllers to
> enable USB 2.0 support.
>
> Signed-off-by: Vivek Gautam <[email protected]>
> ---
> arch/arm/boot/dts/exynos5420.dtsi | 36 +++++++++++++++++++++++++++++++++++-
> 1 file changed, 35 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index 16b860a..392d340 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -738,7 +738,41 @@
> samsung,power-domain = <&g2d_pd>;
> };
>
> - phy@12130000 {
> + usb@12110000 {
> + compatible = "samsung,exynos4210-ehci";
> + reg = <0x12110000 0x100>;
> + interrupts = <0 71 0>;
> +
> + clocks = <&clock CLK_USBH20>;
> + clock-names = "usbhost";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + reg = <0>;
> + phys = <&usb2_phy_gen 1>;
> + phy-names = "host";
> + status = "ok";
s/ok/okay

> + };
> + };
> +
> + usb@12120000 {
> + compatible = "samsung,exynos4210-ohci";
> + reg = <0x12120000 0x100>;
> + interrupts = <0 71 0>;
> +
> + clocks = <&clock CLK_USBH20>;
> + clock-names = "usbhost";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + port@0 {
> + reg = <0>;
> + phys = <&usb2_phy_gen 1>;
> + phy-names = "host";
> + status = "ok";

ditto

--
With warm regards,
Sachin