Skip to contentSkip to conversation

Third Round of Renesas ARM Based SoC DT Updates for v3.14

GIT PULL New Simon Horman 5 participants 30 messages Dec 24, 2013 – Jan 6, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi Kevin, Hi Olof, Hi Arnd,

please consider this third round of Renesas ARM based SoC DT updates for v3.14.

This is based on a merge of:

* The second round of Renesas ARM based SoC DT updates for v3.14, tagged as renesas-dt2-for-v3.14, which I have previously sent a pull-request for.

* The second round of Renesas ARM based SoC updates for v3.14, tagged as renesas-soc2-for-v3.14, which I have previously sent a pull-request for.

* The clk-next-shmobile branch of Mike Turquette's tree

* The clockevents/for-Simon-3.13-rc2 branch of Daniel Lezcano's tree

* The pinctl/for-next branch of Linus Walleij's tree

* v3.13-rc3

The reason for these merges is to provide dependencies for the clock updates for the r8a7791 (R-Car M2) based Koelsch and r8a7790 (R-Car H2) based Lager boards.

The following changes since commit b652896b02df3dfde3a68957cce01f2aa4585842:

ARM: shmobile: r8a7791: Add SSI clocks in device tree (2013-12-24 23:01:13 +0900)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt3-for-v3.14

for you to fetch changes up to b652896b02df3dfde3a68957cce01f2aa4585842:

ARM: shmobile: r8a7791: Add SSI clocks in device tree (2013-12-24 23:01:13 +0900)

----------------------------------------------------------------
Third Round of Renesas ARM Based SoC DT Updates for v3.14

* r8a7791 (R-Car M2) and r8a7790 (R-Car H2) SoCSs
- Add SSI, QSPI and MSIOF clocks in device tree

r8a7791 (R-Car M2) based Koelsch and r8a7790 (R-Car H2) based Lager boards
- Remove reference DTS
- Specify external clock frequency in DT
- Sync non-reference DTS with referene DTS
- Add clocks to DTS

* r8a7740 (R-Mobile A1) based Armadillo board
- Add gpio-keys device
- Add PWM backlight enable GPIO
- Add PWM backlight power supply

* r8a73a0 (SH-Mobile AG5), r8a7740 (R-Mobile A1) and r8a73a4 (SH-Mobile APE6) SoCs
- Specify PFC interrupts in DT

----------------------------------------------------------------

#1 lore raw

PATCH 1/21 ARM: shmobile: armadillo: dts: Add PWM backlight power supply

From: Laurent Pinchart <[email protected]>

Commit 22ceeee16eb8f0d04de3ef43a5174fb30ec18af9 ("pwm-backlight: Add power supply support") added a mandatory power supply for the PWM backlight. Add a fixed 5V regulator and reference it for the backlight power supply.

---
 arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +10 -0
index 6d6fd3d..4705759 100644
@@ -63,6 +63,15 @@
 		enable-active-high;
 	};
 
+	reg_5p0v: regulator at 3 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5.0V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		led1 {
@@ -86,6 +95,7 @@
 		default-brightness-level = <9>;
 		pinctrl-0 = <&backlight_pins>;
 		pinctrl-names = "default";
+		power-supply = <&reg_5p0v>;
 	};
 
 	sound {
Signature · 1 line
1.8.4
#2 lore raw

PATCH 2/21 ARM: shmobile: armadillo: dts: Add PWM backlight enable GPIO

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

The Armadillo 800 EVA panel module has a backlight enable signal connected to GPIO 61. Report this in the backlight DT node.

---
 arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +1 -0
index 4705759..e916aae 100644
@@ -96,6 +96,7 @@
 		pinctrl-0 = <&backlight_pins>;
 		pinctrl-names = "default";
 		power-supply = <&reg_5p0v>;
+		enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>;
 	};
 
 	sound {
Signature · 1 line
1.8.4
#3 lore raw

PATCH 3/21 ARM: shmobile: r8a73a4: Specify PFC interrupts in DT

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a73a4.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/r8a73a4.dtsi +16 -0
index 6b7ce89..62d0211 100644
@@ -288,6 +288,22 @@
 		reg = <0 0xe6050000 0 0x9000>;
 		gpio-controller;
 		#gpio-cells = <2>;
+		interrupts-extended =
+			<&irqc0  0 0>, <&irqc0  1 0>, <&irqc0  2 0>, <&irqc0  3 0>,
+			<&irqc0  4 0>, <&irqc0  5 0>, <&irqc0  6 0>, <&irqc0  7 0>,
+			<&irqc0  8 0>, <&irqc0  9 0>, <&irqc0 10 0>, <&irqc0 11 0>,
+			<&irqc0 12 0>, <&irqc0 13 0>, <&irqc0 14 0>, <&irqc0 15 0>,
+			<&irqc0 16 0>, <&irqc0 17 0>, <&irqc0 18 0>, <&irqc0 19 0>,
+			<&irqc0 20 0>, <&irqc0 21 0>, <&irqc0 22 0>, <&irqc0 23 0>,
+			<&irqc0 24 0>, <&irqc0 25 0>, <&irqc0 26 0>, <&irqc0 27 0>,
+			<&irqc0 28 0>, <&irqc0 29 0>, <&irqc0 30 0>, <&irqc0 31 0>,
+			<&irqc1  0 0>, <&irqc1  1 0>, <&irqc1  2 0>, <&irqc1  3 0>,
+			<&irqc1  4 0>, <&irqc1  5 0>, <&irqc1  6 0>, <&irqc1  7 0>,
+			<&irqc1  8 0>, <&irqc1  9 0>, <&irqc1 10 0>, <&irqc1 11 0>,
+			<&irqc1 12 0>, <&irqc1 13 0>, <&irqc1 14 0>, <&irqc1 15 0>,
+			<&irqc1 16 0>, <&irqc1 17 0>, <&irqc1 18 0>, <&irqc1 19 0>,
+			<&irqc1 20 0>, <&irqc1 21 0>, <&irqc1 22 0>, <&irqc1 23 0>,
+			<&irqc1 24 0>, <&irqc1 25 0>;
 	};
 
 	sdhi0: sd at ee100000 {
Signature · 1 line
1.8.4
#4 lore raw

PATCH 4/21 ARM: shmobile: r8a7740: Specify PFC interrupts in DT

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a7740.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/r8a7740.dtsi +9 -0
index 2782f64..8280884 100644
@@ -155,6 +155,15 @@
 		      <0xe605800c 0x20>;
 		gpio-controller;
 		#gpio-cells = <2>;
+		interrupts-extended =
+			<&irqpin0 0 0>, <&irqpin0 1 0>, <&irqpin0 2 0>, <&irqpin0 3 0>,
+			<&irqpin0 4 0>, <&irqpin0 5 0>, <&irqpin0 6 0>, <&irqpin0 7 0>,
+			<&irqpin1 0 0>, <&irqpin1 1 0>, <&irqpin1 2 0>, <&irqpin1 3 0>,
+			<&irqpin1 4 0>, <&irqpin1 5 0>, <&irqpin1 6 0>, <&irqpin1 7 0>,
+			<&irqpin2 0 0>, <&irqpin2 1 0>, <&irqpin2 2 0>, <&irqpin2 3 0>,
+			<&irqpin2 4 0>, <&irqpin2 5 0>, <&irqpin2 6 0>, <&irqpin2 7 0>,
+			<&irqpin3 0 0>, <&irqpin3 1 0>, <&irqpin3 2 0>, <&irqpin3 3 0>,
+			<&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
 	};
 
 	tpu: pwm at e6600000 {
Signature · 1 line
1.8.4
#5 lore raw

PATCH 5/21 ARM: shmobile: sh73a0: Specify PFC interrupts in DT

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/sh73a0.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/sh73a0.dtsi +9 -0
index c460dd2..b7bd3b9 100644
@@ -242,6 +242,15 @@
 		      <0xe605801c 0x1c>;
 		gpio-controller;
 		#gpio-cells = <2>;
+		interrupts-extended =
+			<&irqpin0 0 0>, <&irqpin0 1 0>, <&irqpin0 2 0>, <&irqpin0 3 0>,
+			<&irqpin0 4 0>, <&irqpin0 5 0>, <&irqpin0 6 0>, <&irqpin0 7 0>,
+			<&irqpin1 0 0>, <&irqpin1 1 0>, <&irqpin1 2 0>, <&irqpin1 3 0>,
+			<&irqpin1 4 0>, <&irqpin1 5 0>, <&irqpin1 6 0>, <&irqpin1 7 0>,
+			<&irqpin2 0 0>, <&irqpin2 1 0>, <&irqpin2 2 0>, <&irqpin2 3 0>,
+			<&irqpin2 4 0>, <&irqpin2 5 0>, <&irqpin2 6 0>, <&irqpin2 7 0>,
+			<&irqpin3 0 0>, <&irqpin3 1 0>, <&irqpin3 2 0>, <&irqpin3 3 0>,
+			<&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
 	};
 
 	sh_fsi2: sound at ec230000 {
Signature · 1 line
1.8.4
#6 lore raw

PATCH 6/21 ARM: shmobile: armadillo: dts: Add gpio-keys device

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

The board had 4 buttons connected to GPIOs, add a corresponding gpio-keys device.

---
 .../boot/dts/r8a7740-armadillo800eva-reference.dts | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +29 -0
index e916aae..95a849b 100644
@@ -72,6 +72,35 @@
 		regulator-boot-on;
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		power-key {
+			gpios = <&pfc 99 GPIO_ACTIVE_LOW>;
+			linux,code = <116>;
+			label = "SW3";
+			gpio-key,wakeup;
+		};
+
+		back-key {
+			gpios = <&pfc 100 GPIO_ACTIVE_LOW>;
+			linux,code = <158>;
+			label = "SW4";
+		};
+
+		menu-key {
+			gpios = <&pfc 97 GPIO_ACTIVE_LOW>;
+			linux,code = <139>;
+			label = "SW5";
+		};
+
+		home-key {
+			gpios = <&pfc 98 GPIO_ACTIVE_LOW>;
+			linux,code = <102>;
+			label = "SW6";
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		led1 {
Signature · 1 line
1.8.4
#7 lore raw

PATCH 7/21 ARM: shmobile: r8a7790: Add clocks

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

Declare all core clocks and DIV6 clocks, as well as all MSTP clocks currently used by r8a7790 boards.

---
 arch/arm/boot/dts/r8a7790.dtsi | 318 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 318 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +318 -0
index 0e4d5b5..8dccbe7 100644
@@ -8,6 +8,7 @@
  * kind, whether express or implied.
  */
 
+#include <dt-bindings/clock/r8a7790-clock.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
@@ -287,4 +288,321 @@
 		cap-sd-highspeed;
 		status = "disabled";
 	};
+
+	clocks {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		/* External root clock */
+		extal_clk: extal_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			/* This value must be overriden by the board. */
+			clock-frequency = <0>;
+			clock-output-names = "extal";
+		};
+
+		/* Special CPG clocks */
+		cpg_clocks: cpg_clocks at e6150000 {
+			compatible = "renesas,r8a7790-cpg-clocks",
+				     "renesas,rcar-gen2-cpg-clocks";
+			reg = <0 0xe6150000 0 0x1000>;
+			clocks = <&extal_clk>;
+			#clock-cells = <1>;
+			clock-output-names = "main", "pll0", "pll1", "pll3",
+					     "lb", "qspi", "sdh", "sd0", "sd1",
+					     "z";
+		};
+
+		/* Variable factor clocks */
+		sd2_clk: sd2_clk at e6150078 {
+			compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe6150078 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "sd2";
+		};
+		sd3_clk: sd3_clk at e615007c {
+			compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe615007c 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "sd3";
+		};
+		mmc0_clk: mmc0_clk at e6150240 {
+			compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe6150240 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "mmc0";
+		};
+		mmc1_clk: mmc1_clk at e6150244 {
+			compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe6150244 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "mmc1";
+		};
+		ssp_clk: ssp_clk at e6150248 {
+			compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe6150248 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "ssp";
+		};
+		ssprs_clk: ssprs_clk at e615024c {
+			compatible = "renesas,r8a7790-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe615024c 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "ssprs";
+		};
+
+		/* Fixed factor clocks */
+		pll1_div2_clk: pll1_div2_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+			clock-output-names = "pll1_div2";
+		};
+		z2_clk: z2_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+			clock-output-names = "z2";
+		};
+		zg_clk: zg_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <3>;
+			clock-mult = <1>;
+			clock-output-names = "zg";
+		};
+		zx_clk: zx_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <3>;
+			clock-mult = <1>;
+			clock-output-names = "zx";
+		};
+		zs_clk: zs_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <6>;
+			clock-mult = <1>;
+			clock-output-names = "zs";
+		};
+		hp_clk: hp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <12>;
+			clock-mult = <1>;
+			clock-output-names = "hp";
+		};
+		i_clk: i_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+			clock-output-names = "i";
+		};
+		b_clk: b_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <12>;
+			clock-mult = <1>;
+			clock-output-names = "b";
+		};
+		p_clk: p_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <24>;
+			clock-mult = <1>;
+			clock-output-names = "p";
+		};
+		cl_clk: cl_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <48>;
+			clock-mult = <1>;
+			clock-output-names = "cl";
+		};
+		m2_clk: m2_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+			clock-output-names = "m2";
+		};
+		imp_clk: imp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <4>;
+			clock-mult = <1>;
+			clock-output-names = "imp";
+		};
+		rclk_clk: rclk_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <(48 * 1024)>;
+			clock-mult = <1>;
+			clock-output-names = "rclk";
+		};
+		oscclk_clk: oscclk_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <(12 * 1024)>;
+			clock-mult = <1>;
+			clock-output-names = "oscclk";
+		};
+		zb3_clk: zb3_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <4>;
+			clock-mult = <1>;
+			clock-output-names = "zb3";
+		};
+		zb3d2_clk: zb3d2_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+			clock-output-names = "zb3d2";
+		};
+		ddr_clk: ddr_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7790_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+			clock-output-names = "ddr";
+		};
+		mp_clk: mp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-div = <15>;
+			clock-mult = <1>;
+			clock-output-names = "mp";
+		};
+		cp_clk: cp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&extal_clk>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+			clock-output-names = "cp";
+		};
+
+		/* Gate clocks */
+		mstp1_clks: mstp1_clks at e6150134 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>,
+				 <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>,
+				 <&zs_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7790_CLK_TMU1 R8A7790_CLK_TMU3 R8A7790_CLK_TMU2
+				R8A7790_CLK_CMT0 R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1
+				R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_RT R8A7790_CLK_VSP1_SY
+			>;
+			clock-output-names =
+				"tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
+				"vsp1-du0", "vsp1-rt", "vsp1-sy";
+		};
+		mstp2_clks: mstp2_clks at e6150138 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
+			clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
+				 <&mp_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7790_CLK_SCIFA2 R8A7790_CLK_SCIFA1 R8A7790_CLK_SCIFA0
+				R8A7790_CLK_SCIFB0 R8A7790_CLK_SCIFB1 R8A7790_CLK_SCIFB2
+			>;
+			clock-output-names =
+				"scifa2", "scifa1", "scifa0", "scifb0", "scifb1",
+				"scifb2";
+		};
+		mstp3_clks: mstp3_clks at e615013c {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
+			clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
+				 <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>,
+				 <&mmc0_clk>, <&rclk_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
+				R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
+				R8A7790_CLK_MMCIF0 R8A7790_CLK_CMT1
+			>;
+			clock-output-names =
+				"tpu0", "mmcif1", "sdhi3", "sdhi2",
+				"sdhi1", "sdhi0", "mmcif0", "cmt1";
+		};
+		mstp5_clks: mstp5_clks at e6150144 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
+			clocks = <&extal_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <R8A7790_CLK_THERMAL R8A7790_CLK_PWM>;
+			clock-output-names = "thermal", "pwm";
+		};
+		mstp7_clks: mstp7_clks at e615014c {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
+			clocks = <&mp_clk>, <&mp_clk>, <&zs_clk>, <&zs_clk>, <&p_clk>,
+				 <&p_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>,
+				 <&zx_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7790_CLK_EHCI R8A7790_CLK_HSUSB R8A7790_CLK_HSCIF1
+				R8A7790_CLK_HSCIF0 R8A7790_CLK_SCIF1 R8A7790_CLK_SCIF0
+				R8A7790_CLK_DU2 R8A7790_CLK_DU1 R8A7790_CLK_DU0
+				R8A7790_CLK_LVDS1 R8A7790_CLK_LVDS0
+			>;
+			clock-output-names =
+				"ehci", "hsusb", "hscif1", "hscif0", "scif1",
+				"scif0", "du2", "du1", "du0", "lvds1", "lvds0";
+		};
+		mstp8_clks: mstp8_clks at e6150990 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
+			clocks = <&p_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <R8A7790_CLK_ETHER>;
+			clock-output-names = "ether";
+		};
+		mstp9_clks: mstp9_clks at e6150994 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_I2C3
+				R8A7790_CLK_I2C2 R8A7790_CLK_I2C1 R8A7790_CLK_I2C0
+			>;
+			clock-output-names = "rcan1", "rcan0", "i2c3", "i2c2", "i2c1", "i2c0";
+		};
+	};
 };
Signature · 1 line
1.8.4
#8 lore raw

PATCH 8/21 ARM: shmobile: r8a7790: Reference clocks

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

Reference clocks using a "clocks" property in all nodes corresponding to devices that require a clock.

---
 arch/arm/boot/dts/r8a7790.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +10 -0
index 8dccbe7..71ec31c 100644
@@ -197,6 +197,7 @@
 		reg = <0 0xe6508000 0 0x40>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_I2C0>;
 		status = "disabled";
 	};
 
@@ -207,6 +208,7 @@
 		reg = <0 0xe6518000 0 0x40>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_I2C1>;
 		status = "disabled";
 	};
 
@@ -217,6 +219,7 @@
 		reg = <0 0xe6530000 0 0x40>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_I2C2>;
 		status = "disabled";
 	};
 
@@ -227,6 +230,7 @@
 		reg = <0 0xe6540000 0 0x40>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_I2C3>;
 		status = "disabled";
 	};
 
@@ -235,6 +239,7 @@
 		reg = <0 0xee200000 0 0x80>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
 		reg-io-width = <4>;
 		status = "disabled";
 	};
@@ -244,6 +249,7 @@
 		reg = <0 0xee220000 0 0x80>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_MMCIF1>;
 		reg-io-width = <4>;
 		status = "disabled";
 	};
@@ -258,6 +264,7 @@
 		reg = <0 0xee100000 0 0x100>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_SDHI0>;
 		cap-sd-highspeed;
 		status = "disabled";
 	};
@@ -267,6 +274,7 @@
 		reg = <0 0xee120000 0 0x100>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_SDHI1>;
 		cap-sd-highspeed;
 		status = "disabled";
 	};
@@ -276,6 +284,7 @@
 		reg = <0 0xee140000 0 0x100>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
 		cap-sd-highspeed;
 		status = "disabled";
 	};
@@ -285,6 +294,7 @@
 		reg = <0 0xee160000 0 0x100>;
 		interrupt-parent = <&gic>;
 		interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
 		cap-sd-highspeed;
 		status = "disabled";
 	};
Signature · 1 line
1.8.4
#9 lore raw

PATCH 9/21 ARM: shmobile: r8a7791: Add clocks

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

Declare all core clocks and DIV6 clocks, as well as all MSTP clocks currently used by r8a7791 boards.

---
 arch/arm/boot/dts/r8a7791.dtsi | 313 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 313 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +313 -0
index a349aff..0a82192 100644
@@ -9,6 +9,7 @@
  * kind, whether express or implied.
  */
 
+#include <dt-bindings/clock/r8a7791-clock.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 
@@ -183,4 +184,316 @@
 		reg = <0 0xe6060000 0 0x250>;
 		#gpio-range-cells = <3>;
 	};
+
+	clocks {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		/* External root clock */
+		extal_clk: extal_clk {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			/* This value must be overriden by the board. */
+			clock-frequency = <0>;
+			clock-output-names = "extal";
+		};
+
+		/* Special CPG clocks */
+		cpg_clocks: cpg_clocks at e6150000 {
+			compatible = "renesas,r8a7791-cpg-clocks",
+				     "renesas,rcar-gen2-cpg-clocks";
+			reg = <0 0xe6150000 0 0x1000>;
+			clocks = <&extal_clk>;
+			#clock-cells = <1>;
+			clock-output-names = "main", "pll0", "pll1", "pll3",
+					     "lb", "qspi", "sdh", "sd0", "z";
+		};
+
+		/* Variable factor clocks */
+		sd1_clk: sd2_clk at e6150078 {
+			compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe6150078 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "sd1";
+		};
+		sd2_clk: sd3_clk at e615007c {
+			compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe615007c 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "sd2";
+		};
+		mmc0_clk: mmc0_clk at e6150240 {
+			compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe6150240 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "mmc0";
+		};
+		ssp_clk: ssp_clk at e6150248 {
+			compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe6150248 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "ssp";
+		};
+		ssprs_clk: ssprs_clk at e615024c {
+			compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
+			reg = <0 0xe615024c 0 4>;
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-output-names = "ssprs";
+		};
+
+		/* Fixed factor clocks */
+		pll1_div2_clk: pll1_div2_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+			clock-output-names = "pll1_div2";
+		};
+		zg_clk: zg_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <3>;
+			clock-mult = <1>;
+			clock-output-names = "zg";
+		};
+		zx_clk: zx_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <3>;
+			clock-mult = <1>;
+			clock-output-names = "zx";
+		};
+		zs_clk: zs_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <6>;
+			clock-mult = <1>;
+			clock-output-names = "zs";
+		};
+		hp_clk: hp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <12>;
+			clock-mult = <1>;
+			clock-output-names = "hp";
+		};
+		i_clk: i_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+			clock-output-names = "i";
+		};
+		b_clk: b_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <12>;
+			clock-mult = <1>;
+			clock-output-names = "b";
+		};
+		p_clk: p_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <24>;
+			clock-mult = <1>;
+			clock-output-names = "p";
+		};
+		cl_clk: cl_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <48>;
+			clock-mult = <1>;
+			clock-output-names = "cl";
+		};
+		m2_clk: m2_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+			clock-output-names = "m2";
+		};
+		imp_clk: imp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <4>;
+			clock-mult = <1>;
+			clock-output-names = "imp";
+		};
+		rclk_clk: rclk_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <(48 * 1024)>;
+			clock-mult = <1>;
+			clock-output-names = "rclk";
+		};
+		oscclk_clk: oscclk_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
+			#clock-cells = <0>;
+			clock-div = <(12 * 1024)>;
+			clock-mult = <1>;
+			clock-output-names = "oscclk";
+		};
+		zb3_clk: zb3_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <4>;
+			clock-mult = <1>;
+			clock-output-names = "zb3";
+		};
+		zb3d2_clk: zb3d2_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+			clock-output-names = "zb3d2";
+		};
+		ddr_clk: ddr_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&cpg_clocks R8A7791_CLK_PLL3>;
+			#clock-cells = <0>;
+			clock-div = <8>;
+			clock-mult = <1>;
+			clock-output-names = "ddr";
+		};
+		mp_clk: mp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&pll1_div2_clk>;
+			#clock-cells = <0>;
+			clock-div = <15>;
+			clock-mult = <1>;
+			clock-output-names = "mp";
+		};
+		cp_clk: cp_clk {
+			compatible = "fixed-factor-clock";
+			clocks = <&extal_clk>;
+			#clock-cells = <0>;
+			clock-div = <2>;
+			clock-mult = <1>;
+			clock-output-names = "cp";
+		};
+
+		/* Gate clocks */
+		mstp1_clks: mstp1_clks at e6150134 {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&rclk_clk>,
+				 <&cp_clk>, <&zs_clk>, <&zs_clk>, <&zs_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7791_CLK_TMU1 R8A7791_CLK_TMU3 R8A7791_CLK_TMU2
+				R8A7791_CLK_CMT0 R8A7791_CLK_TMU0 R8A7791_CLK_VSP1_DU1
+				R8A7791_CLK_VSP1_DU0 R8A7791_CLK_VSP1_SY
+			>;
+			clock-output-names =
+				"tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
+				"vsp1-du0", "vsp1-sy";
+		};
+		mstp2_clks: mstp2_clks at e6150138 {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
+			clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
+				 <&mp_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7791_CLK_SCIFA2 R8A7791_CLK_SCIFA1 R8A7791_CLK_SCIFA0
+				R8A7791_CLK_SCIFB0 R8A7791_CLK_SCIFB1 R8A7791_CLK_SCIFB2
+			>;
+			clock-output-names =
+				"scifa2", "scifa1", "scifa0", "scifb0", "scifb1",
+				"scifb2";
+		};
+		mstp3_clks: mstp3_clks at e615013c {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
+			clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>,
+				<&cpg_clocks R8A7791_CLK_SD0>, <&mmc0_clk>, <&rclk_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1
+				R8A7791_CLK_SDHI0 R8A7791_CLK_MMCIF0 R8A7791_CLK_CMT1
+			>;
+			clock-output-names =
+				"tpu0", "sdhi2", "sdhi1", "sdhi0", "mmcif0", "cmt1";
+		};
+		mstp5_clks: mstp5_clks at e6150144 {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
+			clocks = <&extal_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <R8A7791_CLK_THERMAL R8A7791_CLK_PWM>;
+			clock-output-names = "thermal", "pwm";
+		};
+		mstp7_clks: mstp7_clks at e615014c {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
+			clocks = <&mp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
+				 <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&zx_clk>, <&zx_clk>, <&zx_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7791_CLK_HSUSB R8A7791_CLK_HSCIF2 R8A7791_CLK_SCIF5
+				R8A7791_CLK_SCIF4 R8A7791_CLK_HSCIF1 R8A7791_CLK_HSCIF0
+				R8A7791_CLK_SCIF3 R8A7791_CLK_SCIF2 R8A7791_CLK_SCIF1
+				R8A7791_CLK_SCIF0 R8A7791_CLK_DU1 R8A7791_CLK_DU0
+				R8A7791_CLK_LVDS0
+			>;
+			clock-output-names =
+				"hsusb", "hscif2", "scif5", "scif4", "hscif1", "hscif0",
+				"scif3", "scif2", "scif1", "scif0", "du1", "du0", "lvds0";
+		};
+		mstp8_clks: mstp8_clks at e6150990 {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
+			clocks = <&p_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <R8A7791_CLK_ETHER>;
+			clock-output-names = "ether";
+		};
+		mstp9_clks: mstp9_clks at e6150994 {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
+			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>, <&p_clk>, <&p_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_I2C4
+				R8A7791_CLK_I2C4 R8A7791_CLK_I2C3 R8A7791_CLK_I2C2
+				R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
+			>;
+			clock-output-names =
+				"rcan1", "rcan0", "i2c5", "i2c4", "i2c3", "i2c2", "i2c1",
+				"i2c0";
+		};
+		mstp11_clks: mstp11_clks at e615099c {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
+			clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7791_CLK_SCIFA3 R8A7791_CLK_SCIFA4 R8A7791_CLK_SCIFA5
+			>;
+			clock-output-names = "scifa3", "scifa4", "scifa5";
+		};
+	};
 };
Signature · 1 line
1.8.4
#10 lore raw

PATCH 10/21 ARM: shmobile: Sync Lager DTS with Lager reference DTS

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

Copy the device nodes from Lager reference into the Lager device tree file. This will allow us to use a single DTS file regarless of kernel configuration. In case of legacy C board code the device nodes may or may not be used, but in the multiplatform case all the DT device nodes are used.

---
 arch/arm/boot/dts/r8a7790-lager.dts | 53 +++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
arch/arm/boot/dts/r8a7790-lager.dts +53 -0
index 10e6a08..67a6939 100644
@@ -10,6 +10,7 @@
 
 /dts-v1/;
 #include "r8a7790.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Lager";
@@ -33,4 +34,56 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		led6 {
+			gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>;
+		};
+		led7 {
+			gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
+		};
+		led8 {
+			gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	fixedregulator3v3: fixedregulator at 0 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
+&pfc {
+	pinctrl-0 = <&scif0_pins &scif1_pins>;
+	pinctrl-names = "default";
+
+	scif0_pins: serial0 {
+		renesas,groups = "scif0_data";
+		renesas,function = "scif0";
+	};
+
+	scif1_pins: serial1 {
+		renesas,groups = "scif1_data";
+		renesas,function = "scif1";
+	};
+
+	mmc1_pins: mmc1 {
+		renesas,groups = "mmc1_data8", "mmc1_ctrl";
+		renesas,function = "mmc1";
+	};
+};
+
+&mmcif1 {
+	pinctrl-0 = <&mmc1_pins>;
+	pinctrl-names = "default";
+
+	vmmc-supply = <&fixedregulator3v3>;
+	bus-width = <8>;
+	non-removable;
+	status = "okay";
 };
Signature · 1 line
1.8.4
#11 lore raw

PATCH 11/21 ARM: shmobile: Sync Koelsch DTS with Koelsch reference DTS

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

Copy the device nodes from Koelsch reference into the Koeslch device tree file. This will allow us to use a single DTS file regarless of kernel configuration. In case of legacy C board code the device nodes may or may not be used, but in the multiplatform case all the DT device nodes are used.

---
 arch/arm/boot/dts/r8a7791-koelsch.dts | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm/boot/dts/r8a7791-koelsch.dts +29 -0
index c4e8b3a..d431f31 100644
@@ -11,6 +11,7 @@
 
 /dts-v1/;
 #include "r8a7791.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
 	model = "Koelsch";
@@ -29,4 +30,32 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		led6 {
+			gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+		};
+		led7 {
+			gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
+		};
+		led8 {
+			gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&pfc {
+	pinctrl-0 = <&scif0_pins &scif1_pins>;
+	pinctrl-names = "default";
+
+	scif0_pins: serial0 {
+		renesas,groups = "scif0_data_d";
+		renesas,function = "scif0";
+	};
+
+	scif1_pins: serial1 {
+		renesas,groups = "scif1_data_d";
+		renesas,function = "scif1";
+	};
 };
Signature · 1 line
1.8.4
#12 lore raw

PATCH 12/21 ARM: shmobile: lager: Specify external clock frequency in DT

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

The external crystal frequency is 20MHz on the Lager board. Specify it in the device tree.

---
 arch/arm/boot/dts/r8a7790-lager.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/r8a7790-lager.dts +4 -0
index 67a6939..57569cb 100644
@@ -58,6 +58,10 @@
 	};
 };
 
+&extal_clk {
+	clock-frequency = <20000000>;
+};
+
 &pfc {
 	pinctrl-0 = <&scif0_pins &scif1_pins>;
 	pinctrl-names = "default";
Signature · 1 line
1.8.4
#13 lore raw

PATCH 13/21 ARM: shmobile: koelsch: Specify external clock frequency in DT

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

The external crystal frequency is 20MHz on the Koelsch board. Specify it in the device tree.

---
 arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/r8a7791-koelsch.dts +4 -0
index d431f31..fd556c3 100644
@@ -45,6 +45,10 @@
 	};
 };
 
+&extal_clk {
+	clock-frequency = <20000000>;
+};
+
 &pfc {
 	pinctrl-0 = <&scif0_pins &scif1_pins>;
 	pinctrl-names = "default";
Signature · 1 line
1.8.4
#14 lore raw

PATCH 14/21 ARM: shmobile: Remove Lager reference DTS

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

Now that the DTS file r8a7790-lager.dts can be used with board-lager.c and board-lager-reference.c, proceed with removing r8a7790-lager-reference.dts.

---
 arch/arm/boot/dts/r8a7790-lager-reference.dts | 89 ---------------------------
 1 file changed, 89 deletions(-)
 delete mode 100644 arch/arm/boot/dts/r8a7790-lager-reference.dts
arch/arm/boot/dts/r8a7790-lager-reference.dts deleted +0 -89
deleted file mode 100644
index dfedc0e..0000000
@@ -1,89 +0,0 @@
-/*
- * Device Tree Source for the Lager board
- *
- * Copyright (C) 2013 Renesas Solutions Corp.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2.  This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-
-/dts-v1/;
-#include "r8a7790.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-
-/ {
-	model = "Lager";
-	compatible = "renesas,lager-reference", "renesas,r8a7790";
-
-	chosen {
-		bootargs = "console=ttySC6,115200 ignore_loglevel rw";
-	};
-
-	memory at 40000000 {
-		device_type = "memory";
-		reg = <0 0x40000000 0 0x80000000>;
-	};
-
-	memory at 180000000 {
-		device_type = "memory";
-		reg = <1 0x80000000 0 0x80000000>;
-	};
-
-	lbsc {
-		#address-cells = <1>;
-		#size-cells = <1>;
-	};
-
-	leds {
-		compatible = "gpio-leds";
-		led6 {
-			gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>;
-		};
-		led7 {
-			gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
-		};
-		led8 {
-			gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
-		};
-	};
-
-	fixedregulator3v3: fixedregulator at 0 {
-		compatible = "regulator-fixed";
-		regulator-name = "fixed-3.3V";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		regulator-boot-on;
-		regulator-always-on;
-	};
-};
-
-&pfc {
-	pinctrl-0 = <&scif0_pins &scif1_pins>;
-	pinctrl-names = "default";
-
-	scif0_pins: serial0 {
-		renesas,groups = "scif0_data";
-		renesas,function = "scif0";
-	};
-
-	scif1_pins: serial1 {
-		renesas,groups = "scif1_data";
-		renesas,function = "scif1";
-	};
-
-	mmc1_pins: mmc1 {
-		renesas,groups = "mmc1_data8", "mmc1_ctrl";
-		renesas,function = "mmc1";
-	};
-};
-
-&mmcif1 {
-	pinctrl-0 = <&mmc1_pins>;
-	pinctrl-names = "default";
-
-	vmmc-supply = <&fixedregulator3v3>;
-	bus-width = <8>;
-	non-removable;
-	status = "okay";
-};
Signature · 1 line
1.8.4
#15 lore raw

PATCH 15/21 ARM: shmobile: Remove Koelsch reference DTS

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

Now that the DTS file r8a7790-koelsch.dts can be used with board-koelsch.c and board-koelsch-reference.c, proceed with removing r8a7790-koelsch-reference.dts.

---
 arch/arm/boot/dts/Makefile | 1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/Makefile +0 -1
index 909d910..5839077 100644
@@ -225,7 +225,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \
 	r8a7779-marzen.dtb \
 	r8a7779-marzen-reference.dtb \
 	r8a7791-koelsch.dtb \
-	r8a7791-koelsch-reference.dtb \
 	r8a7790-lager.dtb \
 	r8a7790-lager-reference.dtb \
 	sh73a0-kzm9g.dtb \
Signature · 1 line
1.8.4
#16 lore raw

PATCH 15/21 ARM: shmobile: Remove Koelsch reference DTS

Hello.

Quoted 17 lines · Simon Horman

From: Laurent Pinchart <[email protected]>

Now that the DTS file r8a7790-koelsch.dts can be used with board-koelsch.c and board-koelsch-reference.c, proceed with removing r8a7790-koelsch-reference.dts.

---
  arch/arm/boot/dts/Makefile | 1 -
  1 file changed, 1 deletion(-)
arch/arm/boot/dts/Makefile +0 -0
index 909d910..5839077 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ · line 229

Quoted 6 lines
arch/arm/boot/dts/Makefile +0 -1
@@ -225,7 +225,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \
  	r8a7779-marzen.dtb \
  	r8a7779-marzen-reference.dtb \
  	r8a7791-koelsch.dtb \
-	r8a7791-koelsch-reference.dtb \
  	r8a7790-lager.dtb \
  	r8a7790-lager-reference.dtb \

Hm, the previous commit removed that file itself but forgot to remove it
from the Makefile.

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ · line 230

Quoted 1 line
arch/arm/boot/dts/Makefile +0 -0
  	sh73a0-kzm9g.dtb \

I suspect this patch should have removed the *.dts fiel itself but failed
to do so...

WBR, Sergei

#17 lore raw

PATCH 15/21 ARM: shmobile: Remove Koelsch reference DTS

Hi Sergei and Simon,

Quoted 15 lines · On Tuesday 24 December 2013 20:00:43 Sergei Shtylyov wrote:
Quoted 14 lines · Simon Horman

From: Laurent Pinchart <[email protected]>

Now that the DTS file r8a7790-koelsch.dts can be used with board-koelsch.c and board-koelsch-reference.c, proceed with removing r8a7790-koelsch-reference.dts.

Signed-off-by: Laurent Pinchart
<[email protected]>

---

  arch/arm/boot/dts/Makefile | 1 -
  1 file changed, 1 deletion(-)
Quoted 15 lines

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb · line 230

Quoted 12 lines
arch/arm/boot/dts/Makefile +0 -1
index 909d910..5839077 100644
@@ -225,7 +225,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb
 \
  	r8a7779-marzen.dtb \
  	r8a7779-marzen-reference.dtb \
  	r8a7791-koelsch.dtb \
-	r8a7791-koelsch-reference.dtb \
  	r8a7790-lager.dtb \
  	r8a7790-lager-reference.dtb \

Hm, the previous commit removed that file itself but forgot to remove it from the Makefile.

Indeed, this problem doesn't seem to be present in the patches I've sent. Simon, has something gone wrong during a rebase ?

Quoted 4 lines
Quoted 1 line
  	sh73a0-kzm9g.dtb \

I suspect this patch should have removed the *.dts fiel itself but failed to do so...

Signature · 3 lines
Regards,

Laurent Pinchart
#18 lore raw

PATCH 15/21 ARM: shmobile: Remove Koelsch reference DTS

Quoted 34 lines · Laurent Pinchart

Hi Sergei and Simon,

Quoted 15 lines · On Tuesday 24 December 2013 20:00:43 Sergei Shtylyov wrote:
Quoted 14 lines · Simon Horman

From: Laurent Pinchart <[email protected]>

Now that the DTS file r8a7790-koelsch.dts can be used with board-koelsch.c and board-koelsch-reference.c, proceed with removing r8a7790-koelsch-reference.dts.

Signed-off-by: Laurent Pinchart
<[email protected]>

---

  arch/arm/boot/dts/Makefile | 1 -
  1 file changed, 1 deletion(-)
Quoted 15 lines

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb · line 230

Quoted 12 lines
arch/arm/boot/dts/Makefile +0 -1
index 909d910..5839077 100644
@@ -225,7 +225,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb
 \
  	r8a7779-marzen.dtb \
  	r8a7779-marzen-reference.dtb \
  	r8a7791-koelsch.dtb \
-	r8a7791-koelsch-reference.dtb \
  	r8a7790-lager.dtb \
  	r8a7790-lager-reference.dtb \

Hm, the previous commit removed that file itself but forgot to remove it from the Makefile.

Quoted 2 lines

Indeed, this problem doesn't seem to be present in the patches I've sent. Simon, has something gone wrong during a rebase ?

Sorry about that.

Could you supply an incremental patch to remove the file itself?

#19 lore raw

PATCH 15/21 ARM: shmobile: Remove Koelsch reference DTS

Hi Simon,

Quoted 37 lines · On Friday 27 December 2013 11:23:57 Simon Horman wrote:
Quoted 36 lines · Laurent Pinchart
Quoted 34 lines · On Tuesday 24 December 2013 20:00:43 Sergei Shtylyov wrote:
Quoted 26 lines · Simon Horman

From: Laurent Pinchart <[email protected]>

Now that the DTS file r8a7790-koelsch.dts can be used with board-koelsch.c and board-koelsch-reference.c, proceed with removing r8a7790-koelsch-reference.dts.

Signed-off-by: Laurent Pinchart
<[email protected]>

---

  arch/arm/boot/dts/Makefile | 1 -
  1 file changed, 1 deletion(-)
arch/arm/boot/dts/Makefile +0 -0
index 909d910..5839077 100644
@@ -225,7 +225,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) +=

emev2-kzm9d.dtb
\

  	r8a7779-marzen.dtb \
  	r8a7779-marzen-reference.dtb \
  	r8a7791-koelsch.dtb \

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ · line 229

Quoted 4 lines
arch/arm/boot/dts/Makefile +0 -1
-	r8a7791-koelsch-reference.dtb \
 
  	r8a7790-lager.dtb \
  	r8a7790-lager-reference.dtb \

Hm, the previous commit removed that file itself but forgot to remove it from the Makefile.

Quoted 6 lines
Quoted 2 lines

Indeed, this problem doesn't seem to be present in the patches I've sent. Simon, has something gone wrong during a rebase ?

Sorry about that.

Could you supply an incremental patch to remove the file itself?

Sure. I've sent the patch. Could you please also pick "[PATCH v6 15.1/17] ARM:
shmobile: Add GPIO keys to Koelsch DTS" from the list ?

Signature · 3 lines
Regards,

Laurent Pinchart
#20 lore raw

PATCH 15/21 ARM: shmobile: Remove Koelsch reference DTS

Quoted 40 lines · Laurent Pinchart

Hi Simon,

Quoted 37 lines · On Friday 27 December 2013 11:23:57 Simon Horman wrote:
Quoted 36 lines · Laurent Pinchart
Quoted 34 lines · On Tuesday 24 December 2013 20:00:43 Sergei Shtylyov wrote:
Quoted 26 lines · Simon Horman

From: Laurent Pinchart <[email protected]>

Now that the DTS file r8a7790-koelsch.dts can be used with board-koelsch.c and board-koelsch-reference.c, proceed with removing r8a7790-koelsch-reference.dts.

Signed-off-by: Laurent Pinchart
<[email protected]>

---

  arch/arm/boot/dts/Makefile | 1 -
  1 file changed, 1 deletion(-)
arch/arm/boot/dts/Makefile +0 -0
index 909d910..5839077 100644
@@ -225,7 +225,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) +=

emev2-kzm9d.dtb
\

  	r8a7779-marzen.dtb \
  	r8a7779-marzen-reference.dtb \
  	r8a7791-koelsch.dtb \

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ · line 229

Quoted 4 lines
arch/arm/boot/dts/Makefile +0 -1
-	r8a7791-koelsch-reference.dtb \
 
  	r8a7790-lager.dtb \
  	r8a7790-lager-reference.dtb \

Hm, the previous commit removed that file itself but forgot to remove it from the Makefile.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Indeed, this problem doesn't seem to be present in the patches I've sent. Simon, has something gone wrong during a rebase ?

Sorry about that.

Could you supply an incremental patch to remove the file itself?

Sure. I've sent the patch.

Thanks, got it.

Quoted 2 lines

Could you please also pick "[PATCH v6 15.1/17] ARM:
shmobile: Add GPIO keys to Koelsch DTS" from the list ?

Done.

#21 lore raw

PATCH 16/21 ARM: shmobile: r8a7790: Add MSIOF clocks in device tree

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a7790.dtsi            | 17 +++++++++++++----
 include/dt-bindings/clock/r8a7790-clock.h |  6 ++++++
 2 files changed, 19 insertions(+), 4 deletions(-)
arch/arm/boot/dts/r8a7790.dtsi +13 -4
index 71ec31c..9c9a992 100644
@@ -524,6 +524,14 @@
 		};
 
 		/* Gate clocks */
+		mstp0_clks: mstp0_clks at e6150130 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150130 0 4>, <0 0xe6150030 0 4>;
+			clocks = <&mp_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <R8A7790_CLK_MSIOF0>;
+			clock-output-names = "msiof0";
+		};
 		mstp1_clks: mstp1_clks at e6150134 {
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>;
@@ -544,15 +552,16 @@
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
 			clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
-				 <&mp_clk>;
+				 <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>;
 			#clock-cells = <1>;
 			renesas,clock-indices = <
 				R8A7790_CLK_SCIFA2 R8A7790_CLK_SCIFA1 R8A7790_CLK_SCIFA0
-				R8A7790_CLK_SCIFB0 R8A7790_CLK_SCIFB1 R8A7790_CLK_SCIFB2
+				R8A7790_CLK_MSIOF2 R8A7790_CLK_SCIFB0 R8A7790_CLK_SCIFB1
+				R8A7790_CLK_MSIOF1 R8A7790_CLK_MSIOF3 R8A7790_CLK_SCIFB2
 			>;
 			clock-output-names =
-				"scifa2", "scifa1", "scifa0", "scifb0", "scifb1",
-				"scifb2";
+				"scifa2", "scifa1", "scifa0", "msiof2", "scifb0",
+				"scifb1", "msiof1", "msiof3", "scifb2";
 		};
 		mstp3_clks: mstp3_clks at e615013c {
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
include/dt-bindings/clock/r8a7790-clock.h +6 -0
index 420f0b0..bbabb8e 100644
@@ -22,6 +22,9 @@
 #define R8A7790_CLK_SD1			8
 #define R8A7790_CLK_Z			9
 
+/* MSTP0 */
+#define R8A7790_CLK_MSIOF0		0
+
 /* MSTP1 */
 #define R8A7790_CLK_TMU1		11
 #define R8A7790_CLK_TMU3		21
@@ -37,8 +40,11 @@
 #define R8A7790_CLK_SCIFA2		2
 #define R8A7790_CLK_SCIFA1		3
 #define R8A7790_CLK_SCIFA0		4
+#define R8A7790_CLK_MSIOF2		5
 #define R8A7790_CLK_SCIFB0		6
 #define R8A7790_CLK_SCIFB1		7
+#define R8A7790_CLK_MSIOF1		8
+#define R8A7790_CLK_MSIOF3		15
 #define R8A7790_CLK_SCIFB2		16
 #define R8A7790_CLK_SYS_DMAC0		18
 #define R8A7790_CLK_SYS_DMAC1		19
Signature · 1 line
1.8.4
#22 lore raw

PATCH 17/21 ARM: shmobile: r8a7791: Add MSIOF clocks in device tree

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a7791.dtsi            | 17 +++++++++++++----
 include/dt-bindings/clock/r8a7791-clock.h |  5 +++++
 2 files changed, 18 insertions(+), 4 deletions(-)
arch/arm/boot/dts/r8a7791.dtsi +13 -4
index 0a82192..6a29341 100644
@@ -394,6 +394,14 @@
 		};
 
 		/* Gate clocks */
+		mstp0_clks: mstp0_clks at e6150130 {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150130 0 4>, <0 0xe6150030 0 4>;
+			clocks = <&mp_clk>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <R8A7791_CLK_MSIOF0>;
+			clock-output-names = "msiof0";
+		};
 		mstp1_clks: mstp1_clks at e6150134 {
 			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150134 0 4>, <0 0xe6150038 0 4>;
@@ -413,15 +421,16 @@
 			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
 			clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
-				 <&mp_clk>;
+				 <&mp_clk>, <&mp_clk>, <&mp_clk>;
 			#clock-cells = <1>;
 			renesas,clock-indices = <
 				R8A7791_CLK_SCIFA2 R8A7791_CLK_SCIFA1 R8A7791_CLK_SCIFA0
-				R8A7791_CLK_SCIFB0 R8A7791_CLK_SCIFB1 R8A7791_CLK_SCIFB2
+				R8A7791_CLK_MSIOF2 R8A7791_CLK_SCIFB0 R8A7791_CLK_SCIFB1
+				R8A7791_CLK_MSIOF1 R8A7791_CLK_SCIFB2
 			>;
 			clock-output-names =
-				"scifa2", "scifa1", "scifa0", "scifb0", "scifb1",
-				"scifb2";
+				"scifa2", "scifa1", "scifa0", "misof2", "scifb0",
+				"scifb1", "msiof1", "scifb2";
 		};
 		mstp3_clks: mstp3_clks at e615013c {
 			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
include/dt-bindings/clock/r8a7791-clock.h +5 -0
index df1715b..a69e090 100644
@@ -21,6 +21,9 @@
 #define R8A7791_CLK_SD0			7
 #define R8A7791_CLK_Z			8
 
+/* MSTP0 */
+#define R8A7791_CLK_MSIOF0		0
+
 /* MSTP1 */
 #define R8A7791_CLK_TMU1		11
 #define R8A7791_CLK_TMU3		21
@@ -35,8 +38,10 @@
 #define R8A7791_CLK_SCIFA2		2
 #define R8A7791_CLK_SCIFA1		3
 #define R8A7791_CLK_SCIFA0		4
+#define R8A7791_CLK_MSIOF2		5
 #define R8A7791_CLK_SCIFB0		6
 #define R8A7791_CLK_SCIFB1		7
+#define R8A7791_CLK_MSIOF1		8
 #define R8A7791_CLK_SCIFB2		16
 #define R8A7791_CLK_DMAC		18
 
Signature · 1 line
1.8.4
#23 lore raw

PATCH 18/21 ARM: shmobile: r8a7790: Add QSPI module clock in device tree

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a7790.dtsi            | 11 +++++++----
 include/dt-bindings/clock/r8a7790-clock.h |  1 +
 2 files changed, 8 insertions(+), 4 deletions(-)
arch/arm/boot/dts/r8a7790.dtsi +7 -4
index 9c9a992..a179125 100644
@@ -615,13 +615,16 @@
 		mstp9_clks: mstp9_clks at e6150994 {
 			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>;
+			clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>,
+				 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>;
 			#clock-cells = <1>;
 			renesas,clock-indices = <
-				R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_I2C3
-				R8A7790_CLK_I2C2 R8A7790_CLK_I2C1 R8A7790_CLK_I2C0
+				R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD
+				R8A7790_CLK_I2C3 R8A7790_CLK_I2C2 R8A7790_CLK_I2C1
+				R8A7790_CLK_I2C0
 			>;
-			clock-output-names = "rcan1", "rcan0", "i2c3", "i2c2", "i2c1", "i2c0";
+			clock-output-names =
+				"rcan1", "rcan0", "qspi_mod", "i2c3", "i2c2", "i2c1", "i2c0";
 		};
 	};
 };
include/dt-bindings/clock/r8a7790-clock.h +1 -0
index bbabb8e..859e9be 100644
@@ -97,6 +97,7 @@
 #define R8A7790_CLK_GPIO0		12
 #define R8A7790_CLK_RCAN1		15
 #define R8A7790_CLK_RCAN0		16
+#define R8A7790_CLK_QSPI_MOD		17
 #define R8A7790_CLK_IICDVFS		26
 #define R8A7790_CLK_I2C3		28
 #define R8A7790_CLK_I2C2		29
Signature · 1 line
1.8.4
#24 lore raw

PATCH 19/21 ARM: shmobile: r8a7791: Add QSPI module clock in device tree

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a7791.dtsi            | 15 ++++++++-------
 include/dt-bindings/clock/r8a7791-clock.h |  1 +
 2 files changed, 9 insertions(+), 7 deletions(-)
arch/arm/boot/dts/r8a7791.dtsi +8 -7
index 6a29341..19c6550 100644
@@ -482,17 +482,18 @@
 		mstp9_clks: mstp9_clks at e6150994 {
 			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-			clocks = <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-				 <&p_clk>, <&p_clk>, <&p_clk>;
+			clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>,
+				 <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+				 <&p_clk>;
 			#clock-cells = <1>;
 			renesas,clock-indices = <
-				R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_I2C4
-				R8A7791_CLK_I2C4 R8A7791_CLK_I2C3 R8A7791_CLK_I2C2
-				R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
+				R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD
+				R8A7791_CLK_I2C4 R8A7791_CLK_I2C4 R8A7791_CLK_I2C3
+				R8A7791_CLK_I2C2 R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
 			>;
 			clock-output-names =
-				"rcan1", "rcan0", "i2c5", "i2c4", "i2c3", "i2c2", "i2c1",
-				"i2c0";
+				"rcan1", "rcan0", "qspi_mod", "i2c5", "i2c4", "i2c3",
+				"i2c2", "i2c1", "i2c0";
 		};
 		mstp11_clks: mstp11_clks at e615099c {
 			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
include/dt-bindings/clock/r8a7791-clock.h +1 -0
index a69e090..30f82f2 100644
@@ -94,6 +94,7 @@
 #define R8A7791_CLK_GPIO0		12
 #define R8A7791_CLK_RCAN1		15
 #define R8A7791_CLK_RCAN0		16
+#define R8A7791_CLK_QSPI_MOD		17
 #define R8A7791_CLK_I2C5		25
 #define R8A7791_CLK_IICDVFS		26
 #define R8A7791_CLK_I2C4		27
Signature · 1 line
1.8.4
#25 lore raw

PATCH 20/21 ARM: shmobile: r8a7790: Add SSI clocks in device tree

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a7790.dtsi            | 20 ++++++++++++++++++++
 include/dt-bindings/clock/r8a7790-clock.h | 13 +++++++++++++
 2 files changed, 33 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +20 -0
index a179125..c5417da 100644
@@ -626,5 +626,25 @@
 			clock-output-names =
 				"rcan1", "rcan0", "qspi_mod", "i2c3", "i2c2", "i2c1", "i2c0";
 		};
+		mstp10_clks: mstp10_clks at e6150998 {
+			compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+			clocks = <&p_clk>, <&mstp10_clks R8A7790_CLK_SSI>,
+				 <&mstp10_clks R8A7790_CLK_SSI>, <&mstp10_clks R8A7790_CLK_SSI>,
+				 <&mstp10_clks R8A7790_CLK_SSI>, <&mstp10_clks R8A7790_CLK_SSI>,
+				 <&mstp10_clks R8A7790_CLK_SSI>, <&mstp10_clks R8A7790_CLK_SSI>,
+				 <&mstp10_clks R8A7790_CLK_SSI>, <&mstp10_clks R8A7790_CLK_SSI>,
+				 <&mstp10_clks R8A7790_CLK_SSI>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7790_CLK_SSI R8A7790_CLK_SSI9 R8A7790_CLK_SSI8
+				R8A7790_CLK_SSI7 R8A7790_CLK_SSI6 R8A7790_CLK_SSI5
+				R8A7790_CLK_SSI4 R8A7790_CLK_SSI3 R8A7790_CLK_SSI2
+				R8A7790_CLK_SSI1 R8A7790_CLK_SSI0
+			>;
+			clock-output-names =
+				"ssi", "ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
+				"ssi4", "ssi3", "ssi2", "ssi1", "ssi0";
+		};
 	};
 };
include/dt-bindings/clock/r8a7790-clock.h +13 -0
index 859e9be..dbb262a 100644
@@ -104,4 +104,17 @@
 #define R8A7790_CLK_I2C1		30
 #define R8A7790_CLK_I2C0		31
 
+/* MSTP10 */
+#define R8A7790_CLK_SSI			5
+#define R8A7790_CLK_SSI9		6
+#define R8A7790_CLK_SSI8		7
+#define R8A7790_CLK_SSI7		8
+#define R8A7790_CLK_SSI6		9
+#define R8A7790_CLK_SSI5		10
+#define R8A7790_CLK_SSI4		11
+#define R8A7790_CLK_SSI3		12
+#define R8A7790_CLK_SSI2		13
+#define R8A7790_CLK_SSI1		14
+#define R8A7790_CLK_SSI0		15
+
 #endif /* __DT_BINDINGS_CLOCK_R8A7790_H__ */
Signature · 1 line
1.8.4
#26 lore raw

PATCH 21/21 ARM: shmobile: r8a7791: Add SSI clocks in device tree

In reply to Simon Horman

From: Laurent Pinchart <[email protected]>

---
 arch/arm/boot/dts/r8a7791.dtsi            | 20 ++++++++++++++++++++
 include/dt-bindings/clock/r8a7791-clock.h | 13 +++++++++++++
 2 files changed, 33 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +20 -0
index 19c6550..e92c1f7 100644
@@ -495,6 +495,26 @@
 				"rcan1", "rcan0", "qspi_mod", "i2c5", "i2c4", "i2c3",
 				"i2c2", "i2c1", "i2c0";
 		};
+		mstp10_clks: mstp10_clks at e6150998 {
+			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+			reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+			clocks = <&p_clk>, <&mstp10_clks R8A7791_CLK_SSI>,
+				 <&mstp10_clks R8A7791_CLK_SSI>, <&mstp10_clks R8A7791_CLK_SSI>,
+				 <&mstp10_clks R8A7791_CLK_SSI>, <&mstp10_clks R8A7791_CLK_SSI>,
+				 <&mstp10_clks R8A7791_CLK_SSI>, <&mstp10_clks R8A7791_CLK_SSI>,
+				 <&mstp10_clks R8A7791_CLK_SSI>, <&mstp10_clks R8A7791_CLK_SSI>,
+				 <&mstp10_clks R8A7791_CLK_SSI>;
+			#clock-cells = <1>;
+			renesas,clock-indices = <
+				R8A7791_CLK_SSI R8A7791_CLK_SSI9 R8A7791_CLK_SSI8
+				R8A7791_CLK_SSI7 R8A7791_CLK_SSI6 R8A7791_CLK_SSI5
+				R8A7791_CLK_SSI4 R8A7791_CLK_SSI3 R8A7791_CLK_SSI2
+				R8A7791_CLK_SSI1 R8A7791_CLK_SSI0
+			>;
+			clock-output-names =
+				"ssi", "ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
+				"ssi4", "ssi3", "ssi2", "ssi1", "ssi0";
+		};
 		mstp11_clks: mstp11_clks at e615099c {
 			compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
 			reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
include/dt-bindings/clock/r8a7791-clock.h +13 -0
index 30f82f2..1c8f00d 100644
@@ -103,6 +103,19 @@
 #define R8A7791_CLK_I2C1		30
 #define R8A7791_CLK_I2C0		31
 
+/* MSTP10 */
+#define R8A7791_CLK_SSI			5
+#define R8A7791_CLK_SSI9		6
+#define R8A7791_CLK_SSI8		7
+#define R8A7791_CLK_SSI7		8
+#define R8A7791_CLK_SSI6		9
+#define R8A7791_CLK_SSI5		10
+#define R8A7791_CLK_SSI4		11
+#define R8A7791_CLK_SSI3		12
+#define R8A7791_CLK_SSI2		13
+#define R8A7791_CLK_SSI1		14
+#define R8A7791_CLK_SSI0		15
+
 /* MSTP11 */
 #define R8A7791_CLK_SCIFA3		6
 #define R8A7791_CLK_SCIFA4		7
Signature · 1 line
1.8.4
#27 lore raw
In reply to Simon Horman
Quoted 14 lines · Simon Horman

Hi Kevin, Hi Olof, Hi Arnd,

please consider this third round of Renesas ARM based SoC DT updates for v3.14.

This is based on a merge of:

* The second round of Renesas ARM based SoC DT updates for v3.14, tagged as renesas-dt2-for-v3.14, which I have previously sent a pull-request for.

* The second round of Renesas ARM based SoC updates for v3.14, tagged as renesas-soc2-for-v3.14, which I have previously sent a pull-request for.

Quoted 7 lines

* The clk-next-shmobile branch of Mike Turquette's tree

* The clockevents/for-Simon-3.13-rc2 branch of Daniel Lezcano's tree

* The pinctl/for-next branch of Linus Walleij's tree

* v3.13-rc3

Ah, here's the missing clk branch that caused earlier merges not to build.

Please provide actual URLs for the external branches since we want to track them. I can't reverse-engineer them since you use remotes instead of the URL when you merged in, unfortunately.

(No need to redo the pull request, just give me the URLs, please.

Quoted 5 lines

The reason for these merges is to provide dependencies for the clock updates for the r8a7791 (R-Car M2) based Koelsch and r8a7790 (R-Car H2) based Lager boards.

Quoted 7 lines

The following changes since commit b652896b02df3dfde3a68957cce01f2aa4585842:

ARM: shmobile: r8a7791: Add SSI clocks in device tree (2013-12-24 23:01:13 +0900)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt3-for-v3.14

Pulled, thanks.

-Olof

#28 lore raw
Quoted 11 lines · Olof Johansson
Quoted 10 lines · Simon Horman

Hi Kevin, Hi Olof, Hi Arnd,

please consider this third round of Renesas ARM based SoC DT updates for v3.14.

This is based on a merge of:

* The second round of Renesas ARM based SoC DT updates for v3.14, tagged as renesas-dt2-for-v3.14, which I have previously sent a pull-request for.

Quoted 5 lines
Quoted 5 lines

* The second round of Renesas ARM based SoC updates for v3.14, tagged as renesas-soc2-for-v3.14, which I have previously sent a pull-request for.

* The clk-next-shmobile branch of Mike Turquette's tree

git://git.linaro.org/people/mike.turquette/linux.git clk-next-shmobile

Quoted 2 lines
Quoted 2 lines

* The clockevents/for-Simon-3.13-rc2 branch of Daniel Lezcano's tree

git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/for-Simon-3.13-rc2

Quoted 1 line
Quoted 1 line

* The pinctl/for-next branch of Linus Walleij's tree

git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git pinctl/for-next

Quoted 4 lines
Quoted 2 lines

* v3.13-rc3

Ah, here's the missing clk branch that caused earlier merges not to build.

Yes, sorry about that.

Quoted 5 lines

Please provide actual URLs for the external branches since we want to track them. I can't reverse-engineer them since you use remotes instead of the URL when you merged in, unfortunately.

(No need to redo the pull request, just give me the URLs, please.

Sorry about that. Is the information I have added above sufficient?

Quoted 18 lines
Quoted 5 lines

The reason for these merges is to provide dependencies for the clock updates for the r8a7791 (R-Car M2) based Koelsch and r8a7790 (R-Car H2) based Lager boards.

Quoted 7 lines

The following changes since commit b652896b02df3dfde3a68957cce01f2aa4585842:

ARM: shmobile: r8a7791: Add SSI clocks in device tree (2013-12-24 23:01:13 +0900)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt3-for-v3.14

Pulled, thanks.

-Olof

#29 lore raw
Quoted 36 lines · Simon Horman
Quoted 11 lines · Olof Johansson
Quoted 10 lines · Simon Horman

Hi Kevin, Hi Olof, Hi Arnd,

please consider this third round of Renesas ARM based SoC DT updates for v3.14.

This is based on a merge of:

* The second round of Renesas ARM based SoC DT updates for v3.14, tagged as renesas-dt2-for-v3.14, which I have previously sent a pull-request for.

Quoted 5 lines
Quoted 5 lines

* The second round of Renesas ARM based SoC updates for v3.14, tagged as renesas-soc2-for-v3.14, which I have previously sent a pull-request for.

* The clk-next-shmobile branch of Mike Turquette's tree

git://git.linaro.org/people/mike.turquette/linux.git clk-next-shmobile

Quoted 2 lines
Quoted 2 lines

* The clockevents/for-Simon-3.13-rc2 branch of Daniel Lezcano's tree

git://git.linaro.org/people/daniel.lezcano/linux.git clockevents/for-Simon-3.13-rc2

Quoted 1 line
Quoted 1 line

* The pinctl/for-next branch of Linus Walleij's tree

git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git pinctl/for-next

Quoted 4 lines
Quoted 2 lines

* v3.13-rc3

Ah, here's the missing clk branch that caused earlier merges not to build.

Yes, sorry about that.

Quoted 7 lines
Quoted 5 lines

Please provide actual URLs for the external branches since we want to track them. I can't reverse-engineer them since you use remotes instead of the URL when you merged in, unfortunately.

(No need to redo the pull request, just give me the URLs, please.

Sorry about that. Is the information I have added above sufficient?

Yep, thanks! Since the branches both come from parties that we normally share branches with. I've cc:d them on this reply as well.

The only branch that isn't optimal is that it pulls in all of for-next from the pinctrl tree, but it's OK for that tree in general. Having a dedicated topic branch makes it a little harder to forget and accidentally rebase.

Note that it's pretty much ideal for us to be cc:d into the three-way handshake that the remote branch will be guaranteed to be stable. The last thing we want is that some of these people didn't quite understand what we need w.r.t. stability (that has happened in the past). Especially if they feed their branches up to another maintainer above them.

I'll merge in the dt3 branch with the above three as external dependency branches.

-Olof