devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins
@ 2015-12-14 18:58 Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 1/9] ARM: shmobile: alt " Geert Uytterhoeven
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

	Hi Simon, Magnus,

This patch series adds support for the external crystal feeding SCIF_CLK
to (H)SCIF on the various R-Car Gen1, Gen2, and Gen3 development boards.
This increases the range and accuracy of supported baud rates.

This series is an updated version of a part of a series I sent before as
"[PATCH v2 00/16] serial: sh-sci: Clock Cleanups"
(http://www.spinics.net/lists/linux-serial/msg19762.html). To reduce
(cross) dependencies, I split off the core patches and some DT parts
into separate series.

Changes compared to previous submission:
  - Add support for r8a7778/bockw, r8a7779/marzen, r8a7790/lager,
    r8a7791/porter, r8a7793/gose, r8a7794/alt, and r8a7794/silk,
  - Add Reviewed-by.

Dependencies:
  - This series is against renesas-devel-20151214-v4.4-rc5, with the
    following applied on top:
      - "[PATCH 0/7] ARM: shmobile: dtsi: Add SCIF fallback
	 compatibility strings",
      - "[PATCH v3 00/12] ARM: shmobile: dtsi: Rename the serial port
	 clock to fck",
      - "[PATCH v2 0/7] ARM: shmobile: dtsi: Add BRG support for
	 (H)SCIF",
  - This has runtime dependencies on:
      - "[PATCH 0/2] pinctrl: sh-pfc: r8a7791/r8a7795: Add SCIF_CLK
	 support",
      - "[PATCH 0/3] pinctrl: sh-pfc: r8a7779/r8a7790/r8a7794: Add
	 SCIF_CLK support",
    unless you want to depend on pinctrl as configured by U-Boot (on
    most, but not all R-Car Gen2 boards).
    Note that I plan to get the pinctrl dependencies in v4.5, so this
    series should be OK to queue for v4.6.
    Note that the bockw pinctrl support is already upstream.

Testing:
  - This was tested locally on r8a7791/koelsch and r8a7795/salvator-x,
  - This was tested remotely on r8a7778/bockw and r8a7779/marzen,
  - Testing on other boards would be highly appreciated!
  - Hints for various levels of testing:
      - Change the "dev_dbg" after "done:" in
	drivers/tty/serial/sh-sci.c to "dev_info" to print clock and bit
	rate,
      - "yes U | tr -d '\n' > /dev/ttySCx" outputs a square wave with a
	frequency of half the bit rate on TXD,
      - Modifying the frequency of SCIF_CLK causes garbage on the serial
	console, unless you compensate by changing the bit rate in
	/chosen/stdout-path,
      - If you disable the SCIF_CLK, the brg_int clock will be used. If
	you change that clock, you'll get garbage again,
  - renesas-drivers-2015-12-14-v4.4-rc5 has all dependencies
    https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git

Thanks!

Geert Uytterhoeven (9):
  ARM: shmobile: alt dts: Enable SCIF_CLK frequency and pins
  ARM: shmobile: bockw dts: Enable SCIF_CLK frequency and pins
  ARM: shmobile: gose dts: Enable SCIF_CLK frequency and pins
  ARM: shmobile: koelsch dts: Enable SCIF_CLK frequency and pins
  ARM: shmobile: lager dts: Enable SCIF_CLK frequency and pins
  ARM: shmobile: marzen dts: Enable SCIF_CLK frequency and pins
  ARM: shmobile: porter dts: Enable SCIF_CLK frequency and pins
  ARM: shmobile: silk dts: Enable SCIF_CLK frequency and pins
  arm64: renesas: salvator-x dts: Enable SCIF_CLK frequency and pins

 arch/arm/boot/dts/r8a7778-bockw.dts                | 13 +++++++++++++
 arch/arm/boot/dts/r8a7779-marzen.dts               | 13 +++++++++++++
 arch/arm/boot/dts/r8a7790-lager.dts                | 13 +++++++++++++
 arch/arm/boot/dts/r8a7791-koelsch.dts              | 13 +++++++++++++
 arch/arm/boot/dts/r8a7791-porter.dts               | 13 +++++++++++++
 arch/arm/boot/dts/r8a7793-gose.dts                 | 13 +++++++++++++
 arch/arm/boot/dts/r8a7794-alt.dts                  | 13 +++++++++++++
 arch/arm/boot/dts/r8a7794-silk.dts                 | 13 +++++++++++++
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 ++++++++++++
 9 files changed, 116 insertions(+)

-- 
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH v2 1/9] ARM: shmobile: alt dts: Enable SCIF_CLK frequency and pins
  2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
@ 2015-12-14 18:58 ` Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 2/9] ARM: shmobile: bockw " Geert Uytterhoeven
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested, based on schematics.

v2:
  - New.
---
 arch/arm/boot/dts/r8a7794-alt.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index 2394e4883786f13e..f376b9df1f107a47 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -103,6 +103,9 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	du_pins: du {
 		renesas,groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_dotclkout0";
 		renesas,function = "du";
@@ -113,6 +116,11 @@
 		renesas,function = "scif2";
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk";
+		renesas,function = "scif_clk";
+	};
+
 	ether_pins: ether {
 		renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
 		renesas,function = "eth";
@@ -197,3 +205,8 @@
 
 	status = "okay";
 };
+
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
-- 
1.9.1


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

* [PATCH v2 2/9] ARM: shmobile: bockw dts: Enable SCIF_CLK frequency and pins
  2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 1/9] ARM: shmobile: alt " Geert Uytterhoeven
@ 2015-12-14 18:58 ` Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 3/9] ARM: shmobile: gose " Geert Uytterhoeven
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Based on schematics, tested with remote access.

v2:
  - New.
---
 arch/arm/boot/dts/r8a7778-bockw.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts b/arch/arm/boot/dts/r8a7778-bockw.dts
index b1aa025992293a58..482228b8a984656e 100644
--- a/arch/arm/boot/dts/r8a7778-bockw.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw.dts
@@ -126,11 +126,19 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_a", "scif0_ctrl";
 		renesas,function = "scif0";
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk";
+		renesas,function = "scif_clk";
+	};
+
 	mmc_pins: mmc {
 		renesas,groups = "mmc_data8", "mmc_ctrl";
 		renesas,function = "mmc";
@@ -177,6 +185,11 @@
 	#sound-dai-cells = <0>;
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>, <&sdhi0_pup_pins>;
 	pinctrl-names = "default";
-- 
1.9.1


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

* [PATCH v2 3/9] ARM: shmobile: gose dts: Enable SCIF_CLK frequency and pins
  2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 1/9] ARM: shmobile: alt " Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 2/9] ARM: shmobile: bockw " Geert Uytterhoeven
@ 2015-12-14 18:58 ` Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 5/9] ARM: shmobile: lager " Geert Uytterhoeven
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested, based on (non)differences in U-Boot sources between koelsch
and gose.

v2:
  - New.
---
 arch/arm/boot/dts/r8a7793-gose.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index 3e3122490650d140..077ab9423f5e17d6 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -38,6 +38,9 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_d";
 		renesas,function = "scif0";
@@ -48,6 +51,11 @@
 		renesas,function = "scif1";
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk";
+		renesas,function = "scif_clk";
+	};
+
 	ether_pins: ether {
 		renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
 		renesas,function = "eth";
@@ -98,6 +106,11 @@
 	status = "okay";
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &qspi {
 	pinctrl-0 = <&qspi_pins>;
 	pinctrl-names = "default";
-- 
1.9.1


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

* [PATCH v2 4/9] ARM: shmobile: koelsch dts: Enable SCIF_CLK frequency and pins
       [not found] ` <1450119504-1517-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2015-12-14 18:58   ` Geert Uytterhoeven
  2015-12-14 18:58   ` [PATCH v2 7/9] ARM: shmobile: porter " Geert Uytterhoeven
  1 sibling, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates:
  - SCIF:
      - Supports now 50, 75, 110, 1152000, 1500000, 2000000, and
        4000000 bps,
      - Perfect match for standard 50-460800, and 9216000 bps.
      - More accurate 576000 bps.
  - HSCIF:
      - Supports now 50, 75, 110, 134, 150, and 200 bps,
      - Perfect match for standard 50-460800, and 9216000 bps.
      - More accurate 576000, 1152000, 3000000, 3500000, and 4000000
	bps.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
---
v2:
  - Add Reviewed-by.
---
 arch/arm/boot/dts/r8a7791-koelsch.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index c94a0fb807a2ff29..f8024c0d1114c607 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -320,6 +320,9 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	i2c2_pins: i2c2 {
 		renesas,groups = "i2c2";
 		renesas,function = "i2c2";
@@ -340,6 +343,11 @@
 		renesas,function = "scif1";
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk";
+		renesas,function = "scif_clk";
+	};
+
 	ether_pins: ether {
 		renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
 		renesas,function = "eth";
@@ -440,6 +448,11 @@
 	status = "okay";
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 5/9] ARM: shmobile: lager dts: Enable SCIF_CLK frequency and pins
  2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2015-12-14 18:58 ` [PATCH v2 3/9] ARM: shmobile: gose " Geert Uytterhoeven
@ 2015-12-14 18:58 ` Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 6/9] ARM: shmobile: marzen " Geert Uytterhoeven
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested, based on schematics.

v2:
  - New.
---
 arch/arm/boot/dts/r8a7790-lager.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 44ba69b974a21de2..7773cb1f10317d85 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -291,6 +291,9 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	du_pins: du {
 		renesas,groups = "du_rgb666", "du_sync_1", "du_clk_out_0";
 		renesas,function = "du";
@@ -301,6 +304,11 @@
 		renesas,function = "scif0";
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk";
+		renesas,function = "scif_clk";
+	};
+
 	ether_pins: ether {
 		renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
 		renesas,function = "eth";
@@ -484,6 +492,11 @@
 	status = "okay";
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &msiof1 {
 	pinctrl-0 = <&msiof1_pins>;
 	pinctrl-names = "default";
-- 
1.9.1


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

* [PATCH v2 6/9] ARM: shmobile: marzen dts: Enable SCIF_CLK frequency and pins
  2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2015-12-14 18:58 ` [PATCH v2 5/9] ARM: shmobile: lager " Geert Uytterhoeven
@ 2015-12-14 18:58 ` Geert Uytterhoeven
       [not found] ` <1450119504-1517-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Based on schematics, tested with remote access.

v2:
  - New.
---
 arch/arm/boot/dts/r8a7779-marzen.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
index fe396c8d58db7986..e111d35d02aebe19 100644
--- a/arch/arm/boot/dts/r8a7779-marzen.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
@@ -165,6 +165,9 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	du_pins: du {
 		du0 {
 			renesas,groups = "du0_rgb888", "du0_sync_1", "du0_clk_out_0";
@@ -176,6 +179,11 @@
 		};
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk_b";
+		renesas,function = "scif_clk";
+	};
+
 	ethernet_pins: ethernet {
 		intc {
 			renesas,groups = "intc_irq1_b";
@@ -222,6 +230,11 @@
 	status = "okay";
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
-- 
1.9.1


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

* [PATCH v2 7/9] ARM: shmobile: porter dts: Enable SCIF_CLK frequency and pins
       [not found] ` <1450119504-1517-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
  2015-12-14 18:58   ` [PATCH v2 4/9] ARM: shmobile: koelsch " Geert Uytterhoeven
@ 2015-12-14 18:58   ` Geert Uytterhoeven
  1 sibling, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
Untested, based on hardware manual.

Note that U-Boot doesn't use SCIF_CLK on porter, like salvator-x, but
unlike all other supported R-Car Gen2 boards.

v2:
  - New.
---
 arch/arm/boot/dts/r8a7791-porter.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791-porter.dts b/arch/arm/boot/dts/r8a7791-porter.dts
index 71ba7b6b3a337cd9..b93016896378c350 100644
--- a/arch/arm/boot/dts/r8a7791-porter.dts
+++ b/arch/arm/boot/dts/r8a7791-porter.dts
@@ -85,11 +85,19 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	scif0_pins: serial0 {
 		renesas,groups = "scif0_data_d";
 		renesas,function = "scif0";
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk";
+		renesas,function = "scif_clk";
+	};
+
 	ether_pins: ether {
 		renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
 		renesas,function = "eth";
@@ -148,6 +156,11 @@
 	status = "okay";
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &ether {
 	pinctrl-0 = <&ether_pins &phy1_pins>;
 	pinctrl-names = "default";
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 8/9] ARM: shmobile: silk dts: Enable SCIF_CLK frequency and pins
  2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
                   ` (5 preceding siblings ...)
       [not found] ` <1450119504-1517-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2015-12-14 18:58 ` Geert Uytterhoeven
  2015-12-14 18:58 ` [PATCH v2 9/9] arm64: renesas: salvator-x " Geert Uytterhoeven
  7 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested, based on hardware manual.

v2:
  - New.
---
 arch/arm/boot/dts/r8a7794-silk.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
index 5a8dcac37c8e70c2..eb608283a24c070c 100644
--- a/arch/arm/boot/dts/r8a7794-silk.dts
+++ b/arch/arm/boot/dts/r8a7794-silk.dts
@@ -71,11 +71,19 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	scif2_pins: serial2 {
 		renesas,groups = "scif2_data";
 		renesas,function = "scif2";
 	};
 
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk";
+		renesas,function = "scif_clk";
+	};
+
 	ether_pins: ether {
 		renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
 		renesas,function = "eth";
@@ -129,6 +137,11 @@
 	status = "okay";
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &ether {
 	pinctrl-0 = <&ether_pins &phy1_pins>;
 	pinctrl-names = "default";
-- 
1.9.1


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

* [PATCH v2 9/9] arm64: renesas: salvator-x dts: Enable SCIF_CLK frequency and pins
  2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
                   ` (6 preceding siblings ...)
  2015-12-14 18:58 ` [PATCH v2 8/9] ARM: shmobile: silk " Geert Uytterhoeven
@ 2015-12-14 18:58 ` Geert Uytterhoeven
  7 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2015-12-14 18:58 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm
  Cc: linux-sh, linux-serial, devicetree, Geert Uytterhoeven

Add and enable the external crystal for the SCIF_CLK and its pinctrl, to
be used by the Baud Rate Generator for External Clock (BRG) on (H)SCIF.

This increases the range and accuracy of supported baud rates:
  - SCIF:
      - Supports now 50, 230400, 460800, 500000, and 921600 bps,
      - Perfect match for standard 50-460800, and 9216000 bps.
  - HSCIF:
      - Supports now 50, 75, and 110 bps,
      - Perfect match for standard 50-460800, and 9216000 bps.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
v2:
  - Add Reviewed-by.
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 75af5ec5a4d4133d..56bb64838ba3cecf 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -93,6 +93,9 @@
 };
 
 &pfc {
+	pinctrl-0 = <&scif_clk_pins>;
+	pinctrl-names = "default";
+
 	scif1_pins: scif1 {
 		renesas,groups = "scif1_data_a", "scif1_ctrl";
 		renesas,function = "scif1";
@@ -101,6 +104,10 @@
 		renesas,groups = "scif2_data_a";
 		renesas,function = "scif2";
 	};
+	scif_clk_pins: scif_clk {
+		renesas,groups = "scif_clk_a";
+		renesas,function = "scif_clk";
+	};
 
 	i2c2_pins: i2c2 {
 		renesas,groups = "i2c2_a";
@@ -138,6 +145,11 @@
 	status = "okay";
 };
 
+&scif_clk {
+	clock-frequency = <14745600>;
+	status = "okay";
+};
+
 &i2c2 {
 	pinctrl-0 = <&i2c2_pins>;
 	pinctrl-names = "default";
-- 
1.9.1


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

end of thread, other threads:[~2015-12-14 18:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 18:58 [PATCH v2 0/9] ARM: shmobile: dts: Enable SCIF_CLK frequency and pins Geert Uytterhoeven
2015-12-14 18:58 ` [PATCH v2 1/9] ARM: shmobile: alt " Geert Uytterhoeven
2015-12-14 18:58 ` [PATCH v2 2/9] ARM: shmobile: bockw " Geert Uytterhoeven
2015-12-14 18:58 ` [PATCH v2 3/9] ARM: shmobile: gose " Geert Uytterhoeven
2015-12-14 18:58 ` [PATCH v2 5/9] ARM: shmobile: lager " Geert Uytterhoeven
2015-12-14 18:58 ` [PATCH v2 6/9] ARM: shmobile: marzen " Geert Uytterhoeven
     [not found] ` <1450119504-1517-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2015-12-14 18:58   ` [PATCH v2 4/9] ARM: shmobile: koelsch " Geert Uytterhoeven
2015-12-14 18:58   ` [PATCH v2 7/9] ARM: shmobile: porter " Geert Uytterhoeven
2015-12-14 18:58 ` [PATCH v2 8/9] ARM: shmobile: silk " Geert Uytterhoeven
2015-12-14 18:58 ` [PATCH v2 9/9] arm64: renesas: salvator-x " Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).