Re: [PATCH v3 6/7] ARM: dts: at91: at91sam9x5: switch to new clock bindings

2019-08-20 Thread Alexandre Belloni
Hi,

On 28/07/2019 22:56:15+0200, Uwe Kleine-König wrote:
> Hello,
> 
> [added tglx to Cc because Alexandre said in irc: 4 or 5 years ago, there
> was some discussion (with tglx) to make the driver not sleep when early
> in the boot process I'll try to dig that up]
> 

This is the discussion I was referring to:
https://lore.kernel.org/lkml/6120818.MyeJZ74hYa@wuerfel/

Incidentally, I think this is the patch you need to fix your issue but I
doesn't apply because the code moved to sckc.c

Afzal then points to tglx's mail:
https://lore.kernel.org/linux-arm-kernel/alpine.DEB.2.11.1606061448010.28031@nanos/

The whole series took 3 years to get in and this patch slipped through
the cracks. I'll resend it to restart the discussion.

However, could you dump the clock tree before and after the switch to
the new clock binding because it should actually change the behaviour
(it should have crashed before the change)  and I fear something else
is selected the wrong slow clock parent.

> On Sat, Jul 27, 2019 at 05:39:43PM +0200, Uwe Kleine-König wrote:
> > Hello Alexandre,
> > 
> > On Mon, Nov 12, 2018 at 02:31:07PM +0100, Alexandre Belloni wrote:
> > > Switch at91sam9x5 boards to the new PMC clock bindings.
> > 
> > This patch results in a broken dtb for my AriettaG25[1]. It compiles
> > fine, but booting results in:
> > 
> > SD/MMC: dt blob: Read file acme-arietta.dtb to 0x2100
> > SD: Card Capacity: Standard
> > SD: Specification Version 3.0X
> > 
> > Booting zImage ..
> > zImage magic: 0x16f2818 is found
> > 
> > Using device tree in place at 0x2100
> > 
> > Starting linux kernel ..., machid: 0x
> > 
> > Uncompressing Linux... done, booting the kernel.
> > Booting Linux on physical CPU 0x0
> > Linux version 5.3.0-rc1+ (uwe@taurus) (gcc version 7.3.1 20180201 
> > (OSELAS.Toolchain-2018.02.0 7-20180201)) #4 Sat Jul 27 15:47:15 CEST 2019
> > CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
> > CPU: VIVT data cache, VIVT instruction cache
> > OF: fdt: Machine model: Acme Systems Arietta G25
> > printk: bootconsole [earlycon0] enabled
> > printk: debug: ignoring loglevel setting.
> > Memory policy: Data cache writeback
> > On node 0 totalpages: 32768
> >   Normal zone: 256 pages used for memmap
> >   Normal zone: 0 pages reserved
> >   Normal zone: 32768 pages, LIFO batch:7
> > pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
> > pcpu-alloc: [0] 0 
> > Built 1 zonelists, mobility grouping on.  Total pages: 32512
> > Kernel command line: earlyprintk ignore_loglevel  mem=128M 
> > console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait
> > Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
> > Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
> > mem auto-init: stack:off, heap alloc:off, heap free:off
> > Memory: 121352K/131072K available (5826K kernel code, 199K rwdata, 
> > 1892K rodata, 232K init, 125K bss, 9720K reserved, 0K cma-reserved)
> > NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
> > random: get_random_bytes called from start_kernel+0x294/0x474 with 
> > crng_init=0
> > bad: scheduling from the idle thread!
> > CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc1+ #4
> > Hardware name: Atmel AT91SAM9
> > [] (unwind_backtrace) from [] (show_stack+0x10/0x18)
> > [] (show_stack) from [] (dump_stack+0x18/0x24)
> > [] (dump_stack) from [] 
> > (dequeue_task_idle+0x1c/0x34)
> > [] (dequeue_task_idle) from [] 
> > (__schedule+0x250/0x38c)
> > [] (__schedule) from [] (schedule+0x94/0xc8)
> > [] (schedule) from [] 
> > (schedule_hrtimeout_range_clock+0xf4/0x13c)
> > [] (schedule_hrtimeout_range_clock) from [] 
> > (schedule_hrtimeout_range+0x18/0x24)
> > [] (schedule_hrtimeout_range) from [] 
> > (usleep_range+0x70/0x98)
> > [] (usleep_range) from [] 
> > (clk_slow_rc_osc_prepare+0x28/0x34)
> > [] (clk_slow_rc_osc_prepare) from [] 
> > (clk_core_prepare+0x84/0xa0)
> > [] (clk_core_prepare) from [] 
> > (clk_core_prepare+0x60/0xa0)
> > [] (clk_core_prepare) from [] 
> > (clk_prepare+0x1c/0x30)
> > [] (clk_prepare) from [] 
> > (regmap_mmio_attach_clk+0x1c/0x24)
> > [] (regmap_mmio_attach_clk) from [] 
> > (of_syscon_register+0x218/0x268)
> > [] (of_syscon_register) from [] 
> > (syscon_node_to_regmap+0x30/0x58)
> > [] (syscon_node_to_regmap) from [] 
> > (at91sam9x5_pmc_setup+0x78/0x430)
> > [] (at91sam9x5_pmc_setup) from [] 
> > (of_clk_init+0x188/0x21c)
> > [] (of_clk_init) from [] (time_init+0x1c/0x2c)
> > [] (time_init) from [] (start_kernel+0x2c4/0x474)
> > [] (start_kernel) from [<>] (0x0)
> > bad: scheduling from the idle thread!
> > CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc1+ #4
> > Hardware name: Atmel AT91SAM9
> > [] (unwind_backtrace) from [] (show_stack+0x10/0x18)
> > [] (show_stack) 

Re: [PATCH v3 6/7] ARM: dts: at91: at91sam9x5: switch to new clock bindings

2019-07-28 Thread Uwe Kleine-König
Hello,

[added tglx to Cc because Alexandre said in irc: 4 or 5 years ago, there
was some discussion (with tglx) to make the driver not sleep when early
in the boot process I'll try to dig that up]

On Sat, Jul 27, 2019 at 05:39:43PM +0200, Uwe Kleine-König wrote:
> Hello Alexandre,
> 
> On Mon, Nov 12, 2018 at 02:31:07PM +0100, Alexandre Belloni wrote:
> > Switch at91sam9x5 boards to the new PMC clock bindings.
> 
> This patch results in a broken dtb for my AriettaG25[1]. It compiles
> fine, but booting results in:
> 
>   SD/MMC: dt blob: Read file acme-arietta.dtb to 0x2100
>   SD: Card Capacity: Standard
>   SD: Specification Version 3.0X
> 
>   Booting zImage ..
>   zImage magic: 0x16f2818 is found
> 
>   Using device tree in place at 0x2100
> 
>   Starting linux kernel ..., machid: 0x
> 
>   Uncompressing Linux... done, booting the kernel.
>   Booting Linux on physical CPU 0x0
>   Linux version 5.3.0-rc1+ (uwe@taurus) (gcc version 7.3.1 20180201 
> (OSELAS.Toolchain-2018.02.0 7-20180201)) #4 Sat Jul 27 15:47:15 CEST 2019
>   CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
>   CPU: VIVT data cache, VIVT instruction cache
>   OF: fdt: Machine model: Acme Systems Arietta G25
>   printk: bootconsole [earlycon0] enabled
>   printk: debug: ignoring loglevel setting.
>   Memory policy: Data cache writeback
>   On node 0 totalpages: 32768
> Normal zone: 256 pages used for memmap
> Normal zone: 0 pages reserved
> Normal zone: 32768 pages, LIFO batch:7
>   pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
>   pcpu-alloc: [0] 0 
>   Built 1 zonelists, mobility grouping on.  Total pages: 32512
>   Kernel command line: earlyprintk ignore_loglevel  mem=128M 
> console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait
>   Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
>   Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
>   mem auto-init: stack:off, heap alloc:off, heap free:off
>   Memory: 121352K/131072K available (5826K kernel code, 199K rwdata, 
> 1892K rodata, 232K init, 125K bss, 9720K reserved, 0K cma-reserved)
>   NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
>   random: get_random_bytes called from start_kernel+0x294/0x474 with 
> crng_init=0
>   bad: scheduling from the idle thread!
>   CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc1+ #4
>   Hardware name: Atmel AT91SAM9
>   [] (unwind_backtrace) from [] (show_stack+0x10/0x18)
>   [] (show_stack) from [] (dump_stack+0x18/0x24)
>   [] (dump_stack) from [] 
> (dequeue_task_idle+0x1c/0x34)
>   [] (dequeue_task_idle) from [] 
> (__schedule+0x250/0x38c)
>   [] (__schedule) from [] (schedule+0x94/0xc8)
>   [] (schedule) from [] 
> (schedule_hrtimeout_range_clock+0xf4/0x13c)
>   [] (schedule_hrtimeout_range_clock) from [] 
> (schedule_hrtimeout_range+0x18/0x24)
>   [] (schedule_hrtimeout_range) from [] 
> (usleep_range+0x70/0x98)
>   [] (usleep_range) from [] 
> (clk_slow_rc_osc_prepare+0x28/0x34)
>   [] (clk_slow_rc_osc_prepare) from [] 
> (clk_core_prepare+0x84/0xa0)
>   [] (clk_core_prepare) from [] 
> (clk_core_prepare+0x60/0xa0)
>   [] (clk_core_prepare) from [] 
> (clk_prepare+0x1c/0x30)
>   [] (clk_prepare) from [] 
> (regmap_mmio_attach_clk+0x1c/0x24)
>   [] (regmap_mmio_attach_clk) from [] 
> (of_syscon_register+0x218/0x268)
>   [] (of_syscon_register) from [] 
> (syscon_node_to_regmap+0x30/0x58)
>   [] (syscon_node_to_regmap) from [] 
> (at91sam9x5_pmc_setup+0x78/0x430)
>   [] (at91sam9x5_pmc_setup) from [] 
> (of_clk_init+0x188/0x21c)
>   [] (of_clk_init) from [] (time_init+0x1c/0x2c)
>   [] (time_init) from [] (start_kernel+0x2c4/0x474)
>   [] (start_kernel) from [<>] (0x0)
>   bad: scheduling from the idle thread!
>   CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc1+ #4
>   Hardware name: Atmel AT91SAM9
>   [] (unwind_backtrace) from [] (show_stack+0x10/0x18)
>   [] (show_stack) from [] (dump_stack+0x18/0x24)
>   [] (dump_stack) from [] 
> (dequeue_task_idle+0x1c/0x34)
>   [] (dequeue_task_idle) from [] 
> (__schedule+0x250/0x38c)
>   [] (__schedule) from [] (schedule+0x94/0xc8)
>   [] (schedule) from [] 
> (schedule_hrtimeout_range_clock+0xf4/0x13c)
>   [] (schedule_hrtimeout_range_clock) from [] 
> (schedule_hrtimeout_range+0x18/0x24)
>   [] (schedule_hrtimeout_range) from [] 
> (usleep_range+0x70/0x98)
>   [] (usleep_range) from [] 
> (clk_slow_rc_osc_prepare+0x28/0x34)
>   [] (clk_slow_rc_osc_prepare) from [] 
> (clk_core_prepare+0x84/0xa0)
>   [] (clk_core_prepare) from [] 
> (clk_core_prepare+0x60/0xa0)
>   [] (clk_core_prepare) from [] 
> (clk_prepare+0x1c/0x30)
>   [] (clk_prepare) from [] 
> (regmap_mmio_attach_clk+0x1c/0x24)
>   [] (regmap_mmio_attach_clk) 

Re: [PATCH v3 6/7] ARM: dts: at91: at91sam9x5: switch to new clock bindings

2019-07-27 Thread Uwe Kleine-König
Hello Alexandre,

On Mon, Nov 12, 2018 at 02:31:07PM +0100, Alexandre Belloni wrote:
> Switch at91sam9x5 boards to the new PMC clock bindings.

This patch results in a broken dtb for my AriettaG25[1]. It compiles
fine, but booting results in:

SD/MMC: dt blob: Read file acme-arietta.dtb to 0x2100
SD: Card Capacity: Standard
SD: Specification Version 3.0X

Booting zImage ..
zImage magic: 0x16f2818 is found

Using device tree in place at 0x2100

Starting linux kernel ..., machid: 0x

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 5.3.0-rc1+ (uwe@taurus) (gcc version 7.3.1 20180201 
(OSELAS.Toolchain-2018.02.0 7-20180201)) #4 Sat Jul 27 15:47:15 CEST 2019
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: Acme Systems Arietta G25
printk: bootconsole [earlycon0] enabled
printk: debug: ignoring loglevel setting.
Memory policy: Data cache writeback
On node 0 totalpages: 32768
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32768 pages, LIFO batch:7
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists, mobility grouping on.  Total pages: 32512
Kernel command line: earlyprintk ignore_loglevel  mem=128M 
console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 121352K/131072K available (5826K kernel code, 199K rwdata, 
1892K rodata, 232K init, 125K bss, 9720K reserved, 0K cma-reserved)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
random: get_random_bytes called from start_kernel+0x294/0x474 with 
crng_init=0
bad: scheduling from the idle thread!
CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc1+ #4
Hardware name: Atmel AT91SAM9
[] (unwind_backtrace) from [] (show_stack+0x10/0x18)
[] (show_stack) from [] (dump_stack+0x18/0x24)
[] (dump_stack) from [] 
(dequeue_task_idle+0x1c/0x34)
[] (dequeue_task_idle) from [] 
(__schedule+0x250/0x38c)
[] (__schedule) from [] (schedule+0x94/0xc8)
[] (schedule) from [] 
(schedule_hrtimeout_range_clock+0xf4/0x13c)
[] (schedule_hrtimeout_range_clock) from [] 
(schedule_hrtimeout_range+0x18/0x24)
[] (schedule_hrtimeout_range) from [] 
(usleep_range+0x70/0x98)
[] (usleep_range) from [] 
(clk_slow_rc_osc_prepare+0x28/0x34)
[] (clk_slow_rc_osc_prepare) from [] 
(clk_core_prepare+0x84/0xa0)
[] (clk_core_prepare) from [] 
(clk_core_prepare+0x60/0xa0)
[] (clk_core_prepare) from [] 
(clk_prepare+0x1c/0x30)
[] (clk_prepare) from [] 
(regmap_mmio_attach_clk+0x1c/0x24)
[] (regmap_mmio_attach_clk) from [] 
(of_syscon_register+0x218/0x268)
[] (of_syscon_register) from [] 
(syscon_node_to_regmap+0x30/0x58)
[] (syscon_node_to_regmap) from [] 
(at91sam9x5_pmc_setup+0x78/0x430)
[] (at91sam9x5_pmc_setup) from [] 
(of_clk_init+0x188/0x21c)
[] (of_clk_init) from [] (time_init+0x1c/0x2c)
[] (time_init) from [] (start_kernel+0x2c4/0x474)
[] (start_kernel) from [<>] (0x0)
bad: scheduling from the idle thread!
CPU: 0 PID: 0 Comm: swapper Not tainted 5.3.0-rc1+ #4
Hardware name: Atmel AT91SAM9
[] (unwind_backtrace) from [] (show_stack+0x10/0x18)
[] (show_stack) from [] (dump_stack+0x18/0x24)
[] (dump_stack) from [] 
(dequeue_task_idle+0x1c/0x34)
[] (dequeue_task_idle) from [] 
(__schedule+0x250/0x38c)
[] (__schedule) from [] (schedule+0x94/0xc8)
[] (schedule) from [] 
(schedule_hrtimeout_range_clock+0xf4/0x13c)
[] (schedule_hrtimeout_range_clock) from [] 
(schedule_hrtimeout_range+0x18/0x24)
[] (schedule_hrtimeout_range) from [] 
(usleep_range+0x70/0x98)
[] (usleep_range) from [] 
(clk_slow_rc_osc_prepare+0x28/0x34)
[] (clk_slow_rc_osc_prepare) from [] 
(clk_core_prepare+0x84/0xa0)
[] (clk_core_prepare) from [] 
(clk_core_prepare+0x60/0xa0)
[] (clk_core_prepare) from [] 
(clk_prepare+0x1c/0x30)
[] (clk_prepare) from [] 
(regmap_mmio_attach_clk+0x1c/0x24)
[] (regmap_mmio_attach_clk) from [] 
(of_syscon_register+0x218/0x268)
[] (of_syscon_register) from [] 
(syscon_node_to_regmap+0x30/0x58)
[] (syscon_node_to_regmap) from [] 
(at91sam9x5_pmc_setup+0x78/0x430)
[] (at91sam9x5_pmc_setup) from [] 
(of_clk_init+0x188/0x21c)
[] (of_clk_init) from [] (time_init+0x1c/0x2c)
[] (time_init) 

[PATCH v3 6/7] ARM: dts: at91: at91sam9x5: switch to new clock bindings

2018-11-12 Thread Alexandre Belloni
Switch at91sam9x5 boards to the new PMC clock bindings.

Signed-off-by: Alexandre Belloni 
---
 arch/arm/boot/dts/at91sam9g15.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9g25.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9g25ek.dts  |   4 +-
 arch/arm/boot/dts/at91sam9g35.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9x25.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9x35.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9x5.dtsi| 326 +++
 arch/arm/boot/dts/at91sam9x5_can.dtsi|  18 +-
 arch/arm/boot/dts/at91sam9x5_isi.dtsi|  11 +-
 arch/arm/boot/dts/at91sam9x5_lcd.dtsi|  19 +-
 arch/arm/boot/dts/at91sam9x5_macb0.dtsi  |  11 +-
 arch/arm/boot/dts/at91sam9x5_macb1.dtsi  |  11 +-
 arch/arm/boot/dts/at91sam9x5_usart3.dtsi |  11 +-
 13 files changed, 62 insertions(+), 369 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g15.dtsi 
b/arch/arm/boot/dts/at91sam9g15.dtsi
index 27de7dc0f0e0..b34a6c65bd44 100644
--- a/arch/arm/boot/dts/at91sam9g15.dtsi
+++ b/arch/arm/boot/dts/at91sam9g15.dtsi
@@ -24,6 +24,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9g15-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9g25.dtsi 
b/arch/arm/boot/dts/at91sam9g25.dtsi
index 0898213f3bb2..d8bb56253e64 100644
--- a/arch/arm/boot/dts/at91sam9g25.dtsi
+++ b/arch/arm/boot/dts/at91sam9g25.dtsi
@@ -26,6 +26,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9g25-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts 
b/arch/arm/boot/dts/at91sam9g25ek.dts
index 31fecc2cdaf9..ac730812a81d 100644
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -32,9 +32,9 @@
pinctrl-0 = <_pck0_as_isi_mck 
_sensor_power _sensor_reset>;
resetb-gpios = < 7 
GPIO_ACTIVE_LOW>;
pwdn-gpios = < 13 
GPIO_ACTIVE_HIGH>;
-   clocks = <>;
+   clocks = < PMC_TYPE_SYSTEM 8>;
clock-names = "xvclk";
-   assigned-clocks = <>;
+   assigned-clocks = < PMC_TYPE_SYSTEM 
8>;
assigned-clock-rates = <2500>;
status = "okay";
 
diff --git a/arch/arm/boot/dts/at91sam9g35.dtsi 
b/arch/arm/boot/dts/at91sam9g35.dtsi
index ff4115886f97..333e158feb61 100644
--- a/arch/arm/boot/dts/at91sam9g35.dtsi
+++ b/arch/arm/boot/dts/at91sam9g35.dtsi
@@ -25,6 +25,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9g35-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9x25.dtsi 
b/arch/arm/boot/dts/at91sam9x25.dtsi
index 3c5fa3388997..a99703a262c9 100644
--- a/arch/arm/boot/dts/at91sam9x25.dtsi
+++ b/arch/arm/boot/dts/at91sam9x25.dtsi
@@ -27,6 +27,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9x25-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9x35.dtsi 
b/arch/arm/boot/dts/at91sam9x35.dtsi
index d9054e8167b7..bca274d33f68 100644
--- a/arch/arm/boot/dts/at91sam9x35.dtsi
+++ b/arch/arm/boot/dts/at91sam9x35.dtsi
@@ -26,6 +26,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9x35-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi 
b/arch/arm/boot/dts/at91sam9x5.dtsi
index 11c0ef102ab1..07443a387a8f 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -111,7 +111,7 @@
ramc0: 

[PATCH v3 6/7] ARM: dts: at91: at91sam9x5: switch to new clock bindings

2018-11-12 Thread Alexandre Belloni
Switch at91sam9x5 boards to the new PMC clock bindings.

Signed-off-by: Alexandre Belloni 
---
 arch/arm/boot/dts/at91sam9g15.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9g25.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9g25ek.dts  |   4 +-
 arch/arm/boot/dts/at91sam9g35.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9x25.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9x35.dtsi   |   4 +
 arch/arm/boot/dts/at91sam9x5.dtsi| 326 +++
 arch/arm/boot/dts/at91sam9x5_can.dtsi|  18 +-
 arch/arm/boot/dts/at91sam9x5_isi.dtsi|  11 +-
 arch/arm/boot/dts/at91sam9x5_lcd.dtsi|  19 +-
 arch/arm/boot/dts/at91sam9x5_macb0.dtsi  |  11 +-
 arch/arm/boot/dts/at91sam9x5_macb1.dtsi  |  11 +-
 arch/arm/boot/dts/at91sam9x5_usart3.dtsi |  11 +-
 13 files changed, 62 insertions(+), 369 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g15.dtsi 
b/arch/arm/boot/dts/at91sam9g15.dtsi
index 27de7dc0f0e0..b34a6c65bd44 100644
--- a/arch/arm/boot/dts/at91sam9g15.dtsi
+++ b/arch/arm/boot/dts/at91sam9g15.dtsi
@@ -24,6 +24,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9g15-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9g25.dtsi 
b/arch/arm/boot/dts/at91sam9g25.dtsi
index 0898213f3bb2..d8bb56253e64 100644
--- a/arch/arm/boot/dts/at91sam9g25.dtsi
+++ b/arch/arm/boot/dts/at91sam9g25.dtsi
@@ -26,6 +26,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9g25-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts 
b/arch/arm/boot/dts/at91sam9g25ek.dts
index 31fecc2cdaf9..ac730812a81d 100644
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -32,9 +32,9 @@
pinctrl-0 = <_pck0_as_isi_mck 
_sensor_power _sensor_reset>;
resetb-gpios = < 7 
GPIO_ACTIVE_LOW>;
pwdn-gpios = < 13 
GPIO_ACTIVE_HIGH>;
-   clocks = <>;
+   clocks = < PMC_TYPE_SYSTEM 8>;
clock-names = "xvclk";
-   assigned-clocks = <>;
+   assigned-clocks = < PMC_TYPE_SYSTEM 
8>;
assigned-clock-rates = <2500>;
status = "okay";
 
diff --git a/arch/arm/boot/dts/at91sam9g35.dtsi 
b/arch/arm/boot/dts/at91sam9g35.dtsi
index ff4115886f97..333e158feb61 100644
--- a/arch/arm/boot/dts/at91sam9g35.dtsi
+++ b/arch/arm/boot/dts/at91sam9g35.dtsi
@@ -25,6 +25,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9g35-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9x25.dtsi 
b/arch/arm/boot/dts/at91sam9x25.dtsi
index 3c5fa3388997..a99703a262c9 100644
--- a/arch/arm/boot/dts/at91sam9x25.dtsi
+++ b/arch/arm/boot/dts/at91sam9x25.dtsi
@@ -27,6 +27,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9x25-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9x35.dtsi 
b/arch/arm/boot/dts/at91sam9x35.dtsi
index d9054e8167b7..bca274d33f68 100644
--- a/arch/arm/boot/dts/at91sam9x35.dtsi
+++ b/arch/arm/boot/dts/at91sam9x35.dtsi
@@ -26,6 +26,10 @@
   0x003f 0x003f8000 0x  /* 
pioD */
  >;
};
+
+   pmc: pmc@fc00 {
+   compatible = "atmel,at91sam9x35-pmc", 
"atmel,at91sam9x5-pmc", "syscon";
+   };
};
};
 };
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi 
b/arch/arm/boot/dts/at91sam9x5.dtsi
index 11c0ef102ab1..07443a387a8f 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -111,7 +111,7 @@
ramc0: