Skip to contentSkip to conversation

ARM: shmobile: lager: Add DT reference

PATCH New Simon Horman 4 participants 6 messages Jul 3, 2013 – Jul 5, 2013

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

PATCH v3 1/1 ARM: shmobile: lager: Add DT reference

This is sufficient to allow boot of the Lager board with a console without boards-lager.c compiled into the kernel. This is an example of a minimal but still useful initialisation of the board using DT as much as possible.

As such it is the same as the boot of Lager that can be achieved without a board file. The intention of adding this file is to facilitate further work to allow board specific devices to be initialised via DT.

---

v3
* Supply temporary machine_init call-back in lager-reference.c to initialise clocks and bring up SCIF and CMT in C. Magnus advised me that this is not desired in the SoC code.
* Add lager-reference to Makefile.boot

v2
* Use recently added r8a7790_init_delay()

---
 arch/arm/boot/dts/Makefile                     |  1 +
 arch/arm/boot/dts/r8a7790-lager-reference.dts  | 31 +++++++++++++++++
 arch/arm/mach-shmobile/Kconfig                 | 11 ++++++
 arch/arm/mach-shmobile/Makefile                |  1 +
 arch/arm/mach-shmobile/Makefile.boot           |  1 +
 arch/arm/mach-shmobile/board-lager-reference.c | 46 ++++++++++++++++++++++++++
 arch/arm/mach-shmobile/include/mach/r8a7790.h  |  1 +
 arch/arm/mach-shmobile/setup-r8a7790.c         |  9 +++--
 8 files changed, 99 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/r8a7790-lager-reference.dts
 create mode 100644 arch/arm/mach-shmobile/board-lager-reference.c
arch/arm/boot/dts/Makefile +1 -0
index cb31259..f2dc697 100644
@@ -165,6 +165,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
 	r8a7740-armadillo800eva-reference.dtb \
 	r8a7779-marzen-reference.dtb \
 	r8a7790-lager.dtb \
+	r8a7790-lager-reference.dtb \
 	sh73a0-kzm9g.dtb \
 	sh73a0-kzm9g-reference.dtb \
 	r8a73a4-ape6evm.dtb \
arch/arm/boot/dts/r8a7790-lager-reference.dts new file +31 -0
new file mode 100644
index 0000000..fa5b81b
@@ -0,0 +1,31 @@
+/*
+ * 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"
+
+/ {
+	model = "Lager";
+	compatible = "renesas,lager-reference", "renesas,r8a7790";
+
+	chosen {
+		bootargs = "console=ttySC6,115200 ignore_loglevel";
+	};
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0 0x40000000 0 0x80000000>;
+	};
+
+	lbsc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+	};
+};
arch/arm/mach-shmobile/Kconfig +11 -0
index 64dc24d..30c571b 100644
@@ -150,6 +150,17 @@ config MACH_LAGER
 	depends on ARCH_R8A7790
 	select USE_OF
 
+config MACH_LAGER_REFERENCE
+	bool "Lager board - Reference Device Tree Implementation"
+	depends on ARCH_R8A7790
+	select USE_OF
+	---help---
+	   Use reference implementation of Lager board support
+	   which makes use of device tree at the expense
+	   of not supporting a number of devices.
+
+	   This is intended to aid developers
+
 config MACH_KZM9D
 	bool "KZM9D board"
 	depends on ARCH_EMEV2
arch/arm/mach-shmobile/Makefile +1 -0
index 6165a51..d813133 100644
@@ -43,6 +43,7 @@ obj-$(CONFIG_MACH_BOCKW)	+= board-bockw.o
 obj-$(CONFIG_MACH_MARZEN)	+= board-marzen.o
 obj-$(CONFIG_MACH_MARZEN_REFERENCE)	+= board-marzen-reference.o
 obj-$(CONFIG_MACH_LAGER)	+= board-lager.o
+obj-$(CONFIG_MACH_LAGER_REFERENCE)	+= board-lager-reference.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA)	+= board-armadillo800eva.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE)	+= board-armadillo800eva-reference.o
 obj-$(CONFIG_MACH_KZM9D)	+= board-kzm9d.o
arch/arm/mach-shmobile/Makefile.boot +1 -0
index 84c6868..16834d8 100644
@@ -10,6 +10,7 @@ loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
 loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
 loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000
+loadaddr-$(CONFIG_MACH_LAGER_REFERENCE) += 0x40008000
 loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000
 loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000
 loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000
arch/arm/mach-shmobile/board-lager-reference.c new file +46 -0

46 lines not on this page · raw message

arch/arm/mach-shmobile/include/mach/r8a7790.h +1 -0
index 7851cc1..421d842 100644
@@ -2,6 +2,7 @@
 #define __ASM_R8A7790_H__
 
 void r8a7790_add_standard_devices(void);
+void r8a7790_add_dt_devices(void);
 void r8a7790_clock_init(void);
 void r8a7790_pinmux_init(void);
 void r8a7790_init_delay(void);
arch/arm/mach-shmobile/setup-r8a7790.c +7 -2
index f01542e..7f01178 100644
@@ -179,7 +179,7 @@ static struct resource cmt00_resources[] = {
 					  &cmt##idx##_platform_data,	\
 					  sizeof(struct sh_timer_config))
 
-void __init r8a7790_add_standard_devices(void)
+void __init r8a7790_add_dt_devices(void)
 {
 	r8a7790_register_scif(SCIFA0);
 	r8a7790_register_scif(SCIFA1);
@@ -191,9 +191,14 @@ void __init r8a7790_add_standard_devices(void)
 	r8a7790_register_scif(SCIF1);
 	r8a7790_register_scif(HSCIF0);
 	r8a7790_register_scif(HSCIF1);
+	r8a7790_register_cmt(00);
+}
+
+void __init r8a7790_add_standard_devices(void)
+{
+	r8a7790_add_dt_devices();
 	r8a7790_register_irqc(0);
 	r8a7790_register_thermal();
-	r8a7790_register_cmt(00);
 }
 
 void __init r8a7790_timer_init(void)
Signature · 1 line
1.8.2.1
maintainer
#1 lore raw

PATCH v3 1/1 ARM: shmobile: lager: Add DT reference

Hi Simon,

Quoted 14 lines · Simon Horman

This is sufficient to allow boot of the Lager board with a console without boards-lager.c compiled into the kernel. This is an example of a minimal but still useful initialisation of the board using DT as much as possible.

As such it is the same as the boot of Lager that can be achieved without a board file. The intention of adding this file is to facilitate further work to allow board specific devices to be initialised via DT.

---

Quoted 8 lines

v3
* Supply temporary machine_init call-back in lager-reference.c to initialise clocks and bring up SCIF and CMT in C. Magnus advised me that this is not desired in the SoC code.
* Add lager-reference to Makefile.boot

v2
* Use recently added r8a7790_init_delay()

This looks good to me, thanks!

#2 lore raw

PATCH v3 1/1 ARM: shmobile: lager: Add DT reference

Quoted 23 lines · Magnus Damm

Hi Simon,

Quoted 20 lines · Simon Horman

This is sufficient to allow boot of the Lager board with a console without boards-lager.c compiled into the kernel. This is an example of a minimal but still useful initialisation of the board using DT as much as possible.

As such it is the same as the boot of Lager that can be achieved without a board file. The intention of adding this file is to facilitate further work to allow board specific devices to be initialised via DT.

---

v3
* Supply temporary machine_init call-back in lager-reference.c to initialise clocks and bring up SCIF and CMT in C. Magnus advised me that this is not desired in the SoC code.
* Add lager-reference to Makefile.boot

Quoted 6 lines
Quoted 2 lines

v2
* Use recently added r8a7790_init_delay()

This looks good to me, thanks!

Thanks, I have queued this up for v3.12.

#3 lore raw

PATCH v3 1/1 ARM: shmobile: lager: Add DT reference

In reply to Simon Horman

Hi Simon,

Quoted 7 lines · On Wednesday 03 July 2013 16:57:31 Simon Horman wrote:

This is sufficient to allow boot of the Lager board with a console without boards-lager.c compiled into the kernel. This is an example of a minimal but still useful initialisation of the board using DT as much as possible.

As such it is the same as the boot of Lager that can be achieved without a board file. The intention of adding this file is to facilitate further work to allow board specific devices to be initialised via DT.

At some (hopefully not too distant) point we should stop adding both traditional and DT board files. DT is supposed to lower the number of board files, not multiply it by two.

Work is still needed in order to achieve this, as we lack DT bindings for core (and non core) devices. That's something we need to work on. As a first step, do we have a roadmap with a list of devices that lack DT support ? At the very least I see more work needed on

- Common clock framework
- SCI
- Timers

We shouldn't delay CCF much longer, v3.12 seems an achievable target to me. Who will work on that ?

Quoted 107 lines

---

v3
* Supply temporary machine_init call-back in lager-reference.c to initialise clocks and bring up SCIF and CMT in C. Magnus advised me that this is not desired in the SoC code.
* Add lager-reference to Makefile.boot

v2
* Use recently added r8a7790_init_delay()

---
 arch/arm/boot/dts/Makefile                     |  1 +
 arch/arm/boot/dts/r8a7790-lager-reference.dts  | 31 +++++++++++++++++
 arch/arm/mach-shmobile/Kconfig                 | 11 ++++++
 arch/arm/mach-shmobile/Makefile                |  1 +
 arch/arm/mach-shmobile/Makefile.boot           |  1 +
 arch/arm/mach-shmobile/board-lager-reference.c | 46 +++++++++++++++++++++++
 arch/arm/mach-shmobile/include/mach/r8a7790.h  |  1 +
 arch/arm/mach-shmobile/setup-r8a7790.c         |  9 +++--
 8 files changed, 99 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/boot/dts/r8a7790-lager-reference.dts
 create mode 100644 arch/arm/mach-shmobile/board-lager-reference.c
arch/arm/boot/dts/Makefile +1 -0
index cb31259..f2dc697 100644
@@ -165,6 +165,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
 	r8a7740-armadillo800eva-reference.dtb \
 	r8a7779-marzen-reference.dtb \
 	r8a7790-lager.dtb \
+	r8a7790-lager-reference.dtb \
 	sh73a0-kzm9g.dtb \
 	sh73a0-kzm9g-reference.dtb \
 	r8a73a4-ape6evm.dtb \
(quoted diff) +0 -0

b/arch/arm/boot/dts/r8a7790-lager-reference.dts new file mode 100644 index 0000000..fa5b81b

arch/arm/boot/dts/r8a7790-lager-reference.dts new file +31 -0
@@ -0,0 +1,31 @@
+/*
+ * 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"
+
+/ {
+	model = "Lager";
+	compatible = "renesas,lager-reference", "renesas,r8a7790";
+
+	chosen {
+		bootargs = "console=ttySC6,115200 ignore_loglevel";
+	};
+
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0 0x40000000 0 0x80000000>;
+	};
+
+	lbsc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+	};
+};
arch/arm/mach-shmobile/Kconfig +11 -0
index 64dc24d..30c571b 100644
@@ -150,6 +150,17 @@ config MACH_LAGER
 	depends on ARCH_R8A7790
 	select USE_OF
 
+config MACH_LAGER_REFERENCE
+	bool "Lager board - Reference Device Tree Implementation"
+	depends on ARCH_R8A7790
+	select USE_OF
+	---help---
+	   Use reference implementation of Lager board support
+	   which makes use of device tree at the expense
+	   of not supporting a number of devices.
+
+	   This is intended to aid developers
+
 config MACH_KZM9D
 	bool "KZM9D board"
 	depends on ARCH_EMEV2
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/Makefile index 6165a51..d813133 100644

arch/arm/mach-shmobile/Makefile +1 -0
@@ -43,6 +43,7 @@ obj-$(CONFIG_MACH_BOCKW)	+= board-bockw.o
 obj-$(CONFIG_MACH_MARZEN)	+= board-marzen.o
 obj-$(CONFIG_MACH_MARZEN_REFERENCE)	+= board-marzen-reference.o
 obj-$(CONFIG_MACH_LAGER)	+= board-lager.o
+obj-$(CONFIG_MACH_LAGER_REFERENCE)	+= board-lager-reference.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA)	+= board-armadillo800eva.o
 obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE)	+=
Quoted 1 line

board-armadillo800eva-reference.o obj-$(CONFIG_MACH_KZM9D) += board-

kzm9d.o

Quoted 106 lines
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/Makefile.boot index 84c6868..16834d8 100644

arch/arm/mach-shmobile/Makefile.boot +1 -0
@@ -10,6 +10,7 @@ loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000
 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
 loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
 loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000
+loadaddr-$(CONFIG_MACH_LAGER_REFERENCE) += 0x40008000
 loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000
 loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000
 loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/board-lager-reference.c new file mode 100644 index 0000000..eb6c55e

arch/arm/mach-shmobile/board-lager-reference.c new file +18 -0
@@ -0,0 +1,46 @@
+/*
+ * Lager board support - Reference DT implementation
+ *
+ * Copyright (C) 2013  Renesas Solutions Corp.
+ * Copyright (C) 2013  Simon Horman
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 

USA + */

arch/arm/mach-shmobile/board-lager-reference.c new file +27 -0
+
+#include <linux/init.h>
+#include <linux/irqchip.h>
+#include <linux/of_platform.h>
+#include <mach/r8a7790.h>
+#include <asm/mach/arch.h>
+
+void __init lager_add_standard_devices(void)
+{
+	/* clocks are setup late during boot in the case of DT */
+	r8a7790_clock_init();
+
+	r8a7790_add_dt_devices();
+        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static const char *lager_boards_compat_dt[] __initdata = {
+	"renesas,lager-reference",
+	NULL,
+};
+
+DT_MACHINE_START(LAGER_DT, "lager")
+	.init_early	= r8a7790_init_delay,
+	.init_machine	= lager_add_standard_devices,
+	.init_time	= r8a7790_timer_init,
+	.dt_compat	= lager_boards_compat_dt,
+MACHINE_END
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/include/mach/r8a7790.h index 7851cc1..421d842 100644

arch/arm/mach-shmobile/include/mach/r8a7790.h +1 -0
@@ -2,6 +2,7 @@
 #define __ASM_R8A7790_H__
 
 void r8a7790_add_standard_devices(void);
+void r8a7790_add_dt_devices(void);
 void r8a7790_clock_init(void);
 void r8a7790_pinmux_init(void);
 void r8a7790_init_delay(void);
(quoted diff) +0 -0

b/arch/arm/mach-shmobile/setup-r8a7790.c index f01542e..7f01178 100644

arch/arm/mach-shmobile/setup-r8a7790.c +7 -2
@@ -179,7 +179,7 @@ static struct resource cmt00_resources[] = {
 					  &cmt##idx##_platform_data,	\
 					  sizeof(struct sh_timer_config))
 
-void __init r8a7790_add_standard_devices(void)
+void __init r8a7790_add_dt_devices(void)
 {
 	r8a7790_register_scif(SCIFA0);
 	r8a7790_register_scif(SCIFA1);
@@ -191,9 +191,14 @@ void __init r8a7790_add_standard_devices(void)
 	r8a7790_register_scif(SCIF1);
 	r8a7790_register_scif(HSCIF0);
 	r8a7790_register_scif(HSCIF1);
+	r8a7790_register_cmt(00);
+}
+
+void __init r8a7790_add_standard_devices(void)
+{
+	r8a7790_add_dt_devices();
 	r8a7790_register_irqc(0);
 	r8a7790_register_thermal();
-	r8a7790_register_cmt(00);
 }
 
 void __init r8a7790_timer_init(void)
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer
#4 lore raw

PATCH v3 1/1 ARM: shmobile: lager: Add DT reference

Hi Laurent,

[CC Kuribayashi-san]

Quoted 7 lines · Laurent Pinchart

Hi Simon,

Quoted 4 lines · On Wednesday 03 July 2013 16:57:31 Simon Horman wrote:

This is sufficient to allow boot of the Lager board with a console without boards-lager.c compiled into the kernel. This is an example of a minimal but still useful initialisation of the board using DT as much as possible.

Quoted 7 lines
Quoted 3 lines

As such it is the same as the boot of Lager that can be achieved without a board file. The intention of adding this file is to facilitate further work to allow board specific devices to be initialised via DT.

At some (hopefully not too distant) point we should stop adding both traditional and DT board files. DT is supposed to lower the number of board files, not multiply it by two.

Well, mr-multiply-by-two: While I dislike code duplication I can't recall when the number of files actually decreased with DT.

I realize that when we can use DT fully to describe a board then a single DTS file is enough to describe board specific hardware together with per-SoC C code. I can't however see how that would reduce the number of files, but whatever. I always thought the goal was to reduce the memory footprint of the kernel and that the source would not come with that many limitations, but it seems that I got that all wrong...

Anyway, the current split on mach-shmobile is intentional:

1) The C version of board support (board-xxx.c)

This is where platform devices are used (with power domains in some cases) and where out-of-tree people can experiment with things. This code is using legacy SH clock code and is not targeted for multiplatform. These should go away, the sooner the better.

2) The DT reference support (board-xxx-reference.c)

This file contains whatever bits of C code needed to get the DT support going. All the board specific devices should be described via DT. The DT reference board support is where we build incremental support to catch up with 1) board-xxx.c. Ideally we wouldn't need the board-xxx-reference.c file and instead only go with .dts, but in some cases we need some extra glue and until pinctrl DT is done we also need those written in C. The DT reference support will use common clocks as soon as they are available.

3) SoC DT support (setup-xxx.c)

This is what will be used when 2) is caught up with 1). Common clocks and multiplatform, one SoC at a time.

Quoted 6 lines

Work is still needed in order to achieve this, as we lack DT bindings for core (and non core) devices. That's something we need to work on. As a first step, do we have a roadmap with a list of devices that lack DT support ? At the very least I see more work needed on

- Common clock framework

Yes, I agree. Please see below for more about that.

Quoted 1 line

- SCI

Indeed, someone needs to continue earlier efforts for the SCIF driver. Fortunately, with EMEV2 our UART driver already supports DT, so we can implement DT-only multiplatform support on EMEV2 regardless of the state of SCIF.

Quoted 1 line

- Timers

We can use DT-only with Arch timer, but unfortunately another clock evenit is needed unconditionally for high resolution timer support, search for clock event and the C3STOP flag if you want to see me moan about that.

Regardless I believe someone took a couple of first steps towards DT support for our timers some time ago. But as we discussed face to face about a month ago, it makes sense to describe the hardware via DT but in case of timers and clock event / clock sources it does not make sense to associate 87 timer channels for operating system time keeping. So we need some user space configuration interface to associate different kind of timer applications (operating system timer, PWM, clock generation, etc) to different channels.

Since you mention it: =)
- PINCTRL DT and GPIO DT

I'd like to start picking up the remaining PINCTRL and GPIO bits for v3.12 merge. Can you please rebase and resend on top of the latest renesas-next tag?

Quoted 2 lines

We shouldn't delay CCF much longer, v3.12 seems an achievable target to me. Who will work on that ?

So I am currently preparing EMEV2 for multiplatform, will most likely have patches posted for that next week. And yes, I intend to send a new DT reference board support file.

In parallel Kuribayashi-san is taking a stab at moving to common clocks for EMEV2 as a first step.

I expect the above to be in order for v3.12, but not much more that that.

Cheers,

/ magnus

#5 lore raw

PATCH v3 1/1 ARM: shmobile: lager: Add DT reference

Hi Magnus,

Quoted 18 lines · On Friday 05 July 2013 01:25:18 Magnus Damm wrote:
Quoted 6 lines · Laurent Pinchart
Quoted 5 lines · On Wednesday 03 July 2013 16:57:31 Simon Horman wrote:

This is sufficient to allow boot of the Lager board with a console without boards-lager.c compiled into the kernel. This is an example of a minimal but still useful initialisation of the board using DT as much as possible.

Quoted 7 lines
Quoted 3 lines

As such it is the same as the boot of Lager that can be achieved without a board file. The intention of adding this file is to facilitate further work to allow board specific devices to be initialised via DT.

At some (hopefully not too distant) point we should stop adding both traditional and DT board files. DT is supposed to lower the number of board files, not multiply it by two.

Well, mr-multiply-by-two: While I dislike code duplication I can't recall when the number of files actually decreased with DT.

Quoted 6 lines

I realize that when we can use DT fully to describe a board then a single DTS file is enough to describe board specific hardware together with per-SoC C code. I can't however see how that would reduce the number of files, but whatever. I always thought the goal was to reduce the memory footprint of the kernel and that the source would not come with that many limitations, but it seems that I got that all wrong...

I meant board files, sorry. The total number of files hasn't decreased much, if at all.

Quoted 19 lines

Anyway, the current split on mach-shmobile is intentional:

1) The C version of board support (board-xxx.c)

This is where platform devices are used (with power domains in some cases) and where out-of-tree people can experiment with things. This code is using legacy SH clock code and is not targeted for multiplatform. These should go away, the sooner the better.

2) The DT reference support (board-xxx-reference.c)

This file contains whatever bits of C code needed to get the DT support going. All the board specific devices should be described via DT. The DT reference board support is where we build incremental support to catch up with 1) board-xxx.c. Ideally we wouldn't need the board-xxx-reference.c file and instead only go with .dts, but in some cases we need some extra glue and until pinctrl DT is done we also need those written in C. The DT reference support will use common clocks as soon as they are available.

Quoted 4 lines

3) SoC DT support (setup-xxx.c)

This is what will be used when 2) is caught up with 1). Common clocks and multiplatform, one SoC at a time.

Thanks for the clarification.

Quoted 5 lines
Quoted 5 lines

Work is still needed in order to achieve this, as we lack DT bindings for core (and non core) devices. That's something we need to work on. As a first step, do we have a roadmap with a list of devices that lack DT support ? At the very least I see more work needed on

Quoted 7 lines
Quoted 1 line

- Common clock framework

Yes, I agree. Please see below for more about that.

Quoted 1 line

- SCI

Indeed, someone needs to continue earlier efforts for the SCIF driver.

It shouldn't be too difficult, Bastian has already layed out a plan, but the dependency on DT clock bindings has prevented the patches from going upstream.

Quoted 10 lines

Fortunately, with EMEV2 our UART driver already supports DT, so we can implement DT-only multiplatform support on EMEV2 regardless of the state of SCIF.

Quoted 1 line

- Timers

We can use DT-only with Arch timer, but unfortunately another clock evenit is needed unconditionally for high resolution timer support, search for clock event and the C3STOP flag if you want to see me moan about that.

Quoted 7 lines

Regardless I believe someone took a couple of first steps towards DT support for our timers some time ago. But as we discussed face to face about a month ago, it makes sense to describe the hardware via DT but in case of timers and clock event / clock sources it does not make sense to associate 87 timer channels for operating system time keeping. So we need some user space configuration interface to associate different kind of timer applications (operating system timer, PWM, clock generation, etc) to different channels.

I agree that we need an API for this. It might make sense to restrict the API to in-kernel usage to start with, but we need an API nonetheless. Has this topic been discussed with clocks/timers people ? It might be worth bringing it up for LPC or KS.

Quoted 6 lines

Since you mention it: =)
- PINCTRL DT and GPIO DT

I'd like to start picking up the remaining PINCTRL and GPIO bits for v3.12 merge. Can you please rebase and resend on top of the latest renesas-next tag?

Patches for v3.12 have been sent yesterday :-)

Quoted 9 lines
Quoted 2 lines

We shouldn't delay CCF much longer, v3.12 seems an achievable target to me. Who will work on that ?

So I am currently preparing EMEV2 for multiplatform, will most likely have patches posted for that next week. And yes, I intend to send a new DT reference board support file.

In parallel Kuribayashi-san is taking a stab at moving to common clocks for EMEV2 as a first step.

That's great news. I'm looking forward to reviewing the patches :-)

Quoted 1 line

I expect the above to be in order for v3.12, but not much more that that.

That sounds like a reasonable time frame to me.

Signature · 3 lines
Cheers,

Laurent Pinchart