Skip to content

Commit

Permalink
ARM: dts: uniphier: use clock/reset controllers
Browse files Browse the repository at this point in the history
The UniPhier reset controller driver has been merged.  Enable it.
Also, replace the fixed-rate clocks with the dedicated clock
drivers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
Masahiro Yamada committed Aug 30, 2016
1 parent 3bdba5a commit ad0561d
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 112 deletions.
53 changes: 48 additions & 5 deletions arch/arm/boot/dts/uniphier-common32.dtsi
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* Device Tree Source commonly used by UniPhier ARM SoCs
*
* Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
* Copyright (C) 2015-2016 Socionext Inc.
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
Expand Down Expand Up @@ -71,7 +72,7 @@
interrupts = <0 33 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart0>;
clocks = <&uart_clk>;
clocks = <&peri_clk 0>;
};

serial1: serial@54006900 {
Expand All @@ -81,7 +82,7 @@
interrupts = <0 35 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
clocks = <&uart_clk>;
clocks = <&peri_clk 1>;
};

serial2: serial@54006a00 {
Expand All @@ -91,7 +92,7 @@
interrupts = <0 37 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
clocks = <&uart_clk>;
clocks = <&peri_clk 2>;
};

serial3: serial@54006b00 {
Expand All @@ -101,7 +102,7 @@
interrupts = <0 177 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
clocks = <&uart_clk>;
clocks = <&peri_clk 3>;
};

system_bus: system-bus@58c00000 {
Expand All @@ -119,6 +120,34 @@
reg = <0x59801000 0x400>;
};

mioctrl@59810000 {
compatible = "socionext,uniphier-mioctrl",
"simple-mfd", "syscon";
reg = <0x59810000 0x800>;

mio_clk: clock {
#clock-cells = <1>;
};

mio_rst: reset {
#reset-cells = <1>;
};
};

perictrl@59820000 {
compatible = "socionext,uniphier-perictrl",
"simple-mfd", "syscon";
reg = <0x59820000 0x200>;

peri_clk: clock {
#clock-cells = <1>;
};

peri_rst: reset {
#reset-cells = <1>;
};
};

timer@60000200 {
compatible = "arm,cortex-a9-global-timer";
reg = <0x60000200 0x20>;
Expand Down Expand Up @@ -149,6 +178,20 @@
/* specify compatible in each SoC DTSI */
};
};

sysctrl@61840000 {
compatible = "socionext,uniphier-sysctrl",
"simple-mfd", "syscon";
reg = <0x61840000 0x4000>;

sys_clk: clock {
#clock-cells = <1>;
};

sys_rst: reset {
#reset-cells = <1>;
};
};
};
};

Expand Down
51 changes: 35 additions & 16 deletions arch/arm/boot/dts/uniphier-ld4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@
compatible = "fixed-clock";
clock-frequency = <50000000>;
};

uart_clk: uart_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <36864000>;
};

iobus_clk: iobus_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <100000000>;
};
};
};

Expand All @@ -103,7 +91,7 @@
interrupts = <0 41 1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0>;
clocks = <&iobus_clk>;
clocks = <&peri_clk 4>;
clock-frequency = <100000>;
};

Expand All @@ -116,7 +104,7 @@
interrupts = <0 42 1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
clocks = <&iobus_clk>;
clocks = <&peri_clk 5>;
clock-frequency = <100000>;
};

Expand All @@ -129,7 +117,7 @@
interrupts = <0 43 1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
clocks = <&iobus_clk>;
clocks = <&peri_clk 6>;
clock-frequency = <400000>;
};

Expand All @@ -142,7 +130,7 @@
interrupts = <0 44 1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
clocks = <&iobus_clk>;
clocks = <&peri_clk 7>;
clock-frequency = <100000>;
};

Expand All @@ -153,6 +141,8 @@
interrupts = <0 80 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb0>;
clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
resets = <&mio_rst 7>, <&mio_rst 8>, <&mio_rst 12>, <&sys_rst 8>;
};

usb1: usb@5a810100 {
Expand All @@ -162,6 +152,8 @@
interrupts = <0 81 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb1>;
clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
resets = <&mio_rst 7>, <&mio_rst 9>, <&mio_rst 13>, <&sys_rst 8>;
};

usb2: usb@5a820100 {
Expand All @@ -171,6 +163,8 @@
interrupts = <0 82 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb2>;
clocks = <&mio_clk 7>, <&mio_clk 10>, <&mio_clk 14>;
resets = <&mio_rst 7>, <&mio_rst 10>, <&mio_rst 14>, <&sys_rst 8>;
};

};
Expand All @@ -183,6 +177,31 @@
interrupts = <0 29 4>;
};

&mio_clk {
compatible = "socionext,uniphier-ld4-mio-clock";
};

&mio_rst {
compatible = "socionext,uniphier-ld4-mio-reset";
resets = <&sys_rst 7>;
};

&peri_clk {
compatible = "socionext,uniphier-ld4-peri-clock";
};

&peri_rst {
compatible = "socionext,uniphier-ld4-peri-reset";
};

&pinctrl {
compatible = "socionext,uniphier-ld4-pinctrl";
};

&sys_clk {
compatible = "socionext,uniphier-ld4-clock";
};

&sys_rst {
compatible = "socionext,uniphier-ld4-reset";
};
53 changes: 35 additions & 18 deletions arch/arm/boot/dts/uniphier-pro4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@
compatible = "fixed-clock";
clock-frequency = <50000000>;
};

uart_clk: uart_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <73728000>;
};

i2c_clk: i2c_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <50000000>;
};
};
};

Expand All @@ -111,7 +99,7 @@
interrupts = <0 41 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0>;
clocks = <&i2c_clk>;
clocks = <&peri_clk 4>;
clock-frequency = <100000>;
};

Expand All @@ -124,7 +112,7 @@
interrupts = <0 42 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
clocks = <&i2c_clk>;
clocks = <&peri_clk 5>;
clock-frequency = <100000>;
};

Expand All @@ -137,7 +125,7 @@
interrupts = <0 43 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
clocks = <&i2c_clk>;
clocks = <&peri_clk 6>;
clock-frequency = <100000>;
};

Expand All @@ -150,7 +138,7 @@
interrupts = <0 44 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
clocks = <&i2c_clk>;
clocks = <&peri_clk 7>;
clock-frequency = <100000>;
};

Expand All @@ -163,7 +151,7 @@
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0 25 4>;
clocks = <&i2c_clk>;
clocks = <&peri_clk 9>;
clock-frequency = <400000>;
};

Expand All @@ -174,7 +162,7 @@
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0 26 4>;
clocks = <&i2c_clk>;
clocks = <&peri_clk 10>;
clock-frequency = <400000>;
};

Expand All @@ -185,6 +173,8 @@
interrupts = <0 80 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb2>;
clocks = <&mio_clk 7>, <&mio_clk 8>, <&mio_clk 12>;
resets = <&mio_rst 7>, <&mio_rst 8>, <&mio_rst 12>, <&sys_rst 8>;
};

usb3: usb@5a810100 {
Expand All @@ -194,13 +184,40 @@
interrupts = <0 81 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usb3>;
clocks = <&mio_clk 7>, <&mio_clk 9>, <&mio_clk 13>;
resets = <&mio_rst 7>, <&mio_rst 9>, <&mio_rst 13>, <&sys_rst 8>;
};
};

&refclk {
clock-frequency = <25000000>;
};

&mio_clk {
compatible = "socionext,uniphier-pro4-mio-clock";
};

&mio_rst {
compatible = "socionext,uniphier-pro4-mio-reset";
resets = <&sys_rst 7>;
};

&peri_clk {
compatible = "socionext,uniphier-pro4-peri-clock";
};

&peri_rst {
compatible = "socionext,uniphier-pro4-peri-reset";
};

&pinctrl {
compatible = "socionext,uniphier-pro4-pinctrl";
};

&sys_clk {
compatible = "socionext,uniphier-pro4-clock";
};

&sys_rst {
compatible = "socionext,uniphier-pro4-reset";
};
Loading

0 comments on commit ad0561d

Please sign in to comment.