ARM: shmobile: r8a7779, marzen: multiplatform
Subsystems (8)
v2 cover ARM: shmobile: r8a7779, marzen: multiplatform
The aim of this series is to adding common clock framework and in turn multiplatform support to the r8a7779 SoC and marzen-reference. It subsequently removes non-multiplatform support from marzen-reference. This last step is provided to illustrate that it can be done, it may not be desirable to do so for some time.
This is based on work for R-Car Gen2 by Laurent Pinchart and Magnus Damm.
I expect the R-Car Gen2 work in this area to change and I intend to update this series as necessary.
This series is based on the clocks/ccf/rcar-gen2 branch of Laurent's fbdev tree. I expect that branch to be rebased/changed, but it seems to be an adequate base for an RFC.
I have made this series, including its base, available in the topic/clocks/ccf/r8a7779-marzen branch of my renesas tree. That branch is likely to be rebased/changed in the future.
v2
* Fix various trivial problems that slipped into v1
Simon Horman (17):
clk: shmobile: r8a7779: Add clocks support
clk: shmobile: r8a7779: Add MSTP clock support
ARM: shmobile: r8a7779: Add clock index macros for DT sources
ARM: shmobile: r8a7779: Add clocks
ARM: shmobile: r8a7779: Reference clocks
ARM: shmobile: Sync Marzen DTS with Marzen reference DTS
ARM: shmobile: r8a7779: Sort headers alphabetically
ARM: shmobile: r8a7779: Add helper to read mode pins
ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to
clock-r8a7779.c
ARM: shmobile: marzen-reference: Move clock and OF device
initialisation into board code
ARM: shmobile: r8a7779: Do not include sh_clk.h in r8a7779.h
ARM: shmobile: r8a7779: Initial multiplatform support
ARM: shmobile: marzen-reference: Initialize CPG device
ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and CMT
ARM: shmobile: Remove non-multiplatform Marzen reference support
ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB
ARM: shmobile: Remove Marzen reference DTS
.../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 22 +++ arch/arm/boot/dts/Makefile | 2 +- arch/arm/boot/dts/r8a7779-marzen-reference.dts | 110 -------------- arch/arm/boot/dts/r8a7779-marzen.dts | 82 ++++++++++ arch/arm/boot/dts/r8a7779.dtsi | 132 ++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 21 +-- arch/arm/mach-shmobile/Makefile | 2 +- arch/arm/mach-shmobile/Makefile.boot | 1 - arch/arm/mach-shmobile/board-marzen-reference.c | 43 ++++++ arch/arm/mach-shmobile/board-marzen.c | 28 ++-- arch/arm/mach-shmobile/clock-r8a7779.c | 22 +-- arch/arm/mach-shmobile/include/mach/r8a7779.h | 2 +- arch/arm/mach-shmobile/setup-r8a7779.c | 28 ++-- drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 166 +++++++++++++++++++++ include/dt-bindings/clock/r8a7779-clock.h | 61 ++++++++ include/linux/clk/shmobile.h | 1 + 18 files changed, 561 insertions(+), 164 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt delete mode 100644 arch/arm/boot/dts/r8a7779-marzen-reference.dts create mode 100644 drivers/clk/shmobile/clk-r8a7779.c create mode 100644 include/dt-bindings/clock/r8a7779-clock.h
Signature · 1 line
1.8.4
RFC PATCH v2 1/17 clk: shmobile: r8a7779: Add clocks support
Add clocks support for the r8a7779 SoC
Based on work for the r8a7790 and r8a7791 SoCs by Laurent Pinchart.
--- .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 22 +++ drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 166 +++++++++++++++++++++ include/linux/clk/shmobile.h | 1 + 4 files changed, 190 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt create mode 100644 drivers/clk/shmobile/clk-r8a7779.c
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt new file +22 -0
@@ -0,0 +1,22 @@ +* Renesas R8A7779 Clock Pulse Generator (CPG) + +The CPG generates core clocks for the R8A7779. It includes one PLL and +several fixed ratio dividers. + +Required Properties: + + - compatible: Must be "renesas,r8a7779-cpg-clocks" + - reg: Base address and length of the memory resource used by the CPG + - clock-output-names: Supported clocks are "plla", "z", "zs", "s", "s1", + "p", "out". + + +Example +------- + + cpg_clocks: cpg_clocks at ffc80000 { + compatible = "renesas,r8a7779-cpg-clocks"; + reg = <0 0xffc80000 0 0x80>; + #clock-cells = <1>; + clock-output-names = "plla", "z", "zs", "s", "s1", "p", "out"; + };
drivers/clk/shmobile/Makefile +1 -0
@@ -1,6 +1,7 @@ obj-$(CONFIG_ARCH_EMEV2) += clk-emev2.o obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o +obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-div6.o obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-mstp.o
drivers/clk/shmobile/clk-r8a7779.c new file +166 -0
166 lines not on this page · raw message
include/linux/clk/shmobile.h +1 -0
@@ -15,5 +15,6 @@#include <linux/types.h> void rcar_gen2_clocks_init (u32 mode); +void r8a7779_clocks_init (u32 mode);#endif
Signature · 1 line
1.8.4
RFC PATCH v2 1/17 clk: shmobile: r8a7779: Add clocks support
Hi Simon,
Thank you for the patch.
Quoted 24 lines · On Tuesday 26 November 2013 16:32:03 Simon Horman wrote:
Add clocks support for the r8a7779 SoC
Based on work for the r8a7790 and r8a7791 SoCs by Laurent Pinchart.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 22 +++ drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 166 ++++++++++++++++++ include/linux/clk/shmobile.h | 1 + 4 files changed, 190 insertions(+) create mode 100644
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txtcreate mode 100644drivers/clk/shmobile/clk-r8a7779.cdiff --git
a/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txtb/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txtnew file mode 100644
index 0000000..5636685
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt line 4
Quoted 4 lines
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt new file +4
-0@@ -0,0 +1,22 @@ +* Renesas R8A7779 Clock Pulse Generator (CPG) + +The CPG generates core clocks for the R8A7779. It includes one PLL and +several fixed ratio dividers.
The H1 CPG looks pretty similar to the M1 CPG. What about rcar-gen1 CPG bindings ?
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt line 11
Quoted 6 lines
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt new file +6
-0+Required Properties: + + - compatible: Must be "renesas,r8a7779-cpg-clocks" + - reg: Base address and length of the memory resource used by the CPG + - clock-output-names: Supported clocks are "plla", "z", "zs", "s", "s1", + "p", "out".
Doesn't the CPG have an external clock input that needs to be specified, and thus need a clocks property ?
Quoted 69 lines
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt new file +9
-0+Example +------- + + cpg_clocks: cpg_clocks at ffc80000 { + compatible = "renesas,r8a7779-cpg-clocks"; + reg = <0 0xffc80000 0 0x80>; + #clock-cells = <1>; + clock-output-names = "plla", "z", "zs", "s", "s1", "p", "out"; + };drivers/clk/shmobile/Makefile +1
-0@@ -1,6 +1,7 @@ obj-$(CONFIG_ARCH_EMEV2) += clk-emev2.o obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o +obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-div6.o obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-mstp.o(quoted diff) +0
-0
b/drivers/clk/shmobile/clk-r8a7779.cnew file mode 100644 index 0000000..dee898edrivers/clk/shmobile/clk-r8a7779.c new file +42
-0@@ -0,0 +1,166 @@ +/* +* r8a7779 Core CPG Clocks +* +* Copyright (C) 2013 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* 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. +*/ + +#include <linux/clk-provider.h> +#include <linux/clkdev.h> +#include <linux/clk/shmobile.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/spinlock.h> + +#include <dt-bindings/clock/r8a7779-clock.h> + +#define CPG_NUM_CLOCKS (R8A7779_CLK_OUT + 1) + +struct r8a7779_cpg { +struct clk_onecell_data data; +spinlock_t lock; +void __iomem *reg; +}; + +/* +* MD1 = 1 MD1 = 0 +* (PLLA = 1500) (PLLA = 1600) +* (MHz) (MHz) +*------------------------------------------------+-------------------- +* clkz 1000 (2/3) 800 (1/2) +* clkzs 250 (1/6) 200 (1/8) +* clki 750 (1/2) 800 (1/2) +* clks 250 (1/6) 200 (1/8) +* clks1 125 (1/12) 100 (1/16) +* clks3 187.5 (1/8) 200 (1/8)
drivers/clk/shmobile/clk-r8a7779.c line 52
Quoted 10 lines
drivers/clk/shmobile/clk-r8a7779.c new file +10
-0+* clks4 93.7 (1/16) 100 (1/16) +* clkp 62.5 (1/24) 50 (1/32) +* clkg 62.5 (1/24) 66.6 (1/24) +* clkb, CLKOUT +* (MD2 = 0) 62.5 (1/24) 66.6 (1/24) +* (MD2 = 1) 41.6 (1/36) 50 (1/32) +*/ + +#define CPG_CLK_CONFIG_INDEX (md) (((md) & (BIT(1)|BIT(2))) >> 1) +
The PLLA ratio is also configurable, by bits MD11 and MD12.
drivers/clk/shmobile/clk-r8a7779.c line 60
Quoted 8 lines
drivers/clk/shmobile/clk-r8a7779.c new file +8
-0+struct cpg_clk_config { +unsigned int plla; +unsigned int z_mult; +unsigned int z; +unsigned int zs_and_s; +unsigned int s1; +unsigned int p; +unsigned int out;
Could you rename the last five fields with a _div suffix to express more clearly what that mean ?
Quoted 30 lines
drivers/clk/shmobile/clk-r8a7779.c new file +30
-0+}; + +static const struct cpg_clk_config cpg_clk_configs[4 ]__initconst = { + {1500000000 ,1 ,2 ,8 ,16 ,32 ,24 }, + {1500000000 ,1 ,2 ,8 ,16 ,32 ,24 }, + {1600000000 ,2 ,3 ,6 ,12 ,24 ,36 }, + {1600000000 ,2 ,3 ,6 ,12 ,24 ,32 }, +}; + +static u32 cpg_mode__initdata ; + +static struct clk *__init +r8a7779_cpg_register_clock (struct device_node *np,struct r8a7779_cpg *cpg, +const struct cpg_clk_config *config, +const char *name) +{ +const char *parent_name ="plla" ; +unsigned int mult =1 ; +unsigned int div =1 ; +unsigned int rate =0 ; + +if (!strcmp (name,"plla" )) { + parent_name =of_clk_get_parent_name (np,0 ); + rate = config->plla; + }else if (!strcmp (name,"z" )) { + div = config->z; + mult = config->z_mult; + }else if (!strcmp (name,"zs" ) || !strcmp (name,"s" )) { + div = config->zs_and_s; + }else if (!strcmp (name,"s1" )) {
drivers/clk/shmobile/clk-r8a7779.c line 100
Quoted 10 lines
drivers/clk/shmobile/clk-r8a7779.c new file +10
-0+ div = config->s1; + }else if (!strcmp (name,"p" )) { + div = config->p; + }else if (!strcmp (name,"out" )) { + div = config->out; + } + +if (rate) +return clk_register_fixed_rate (NULL , name, parent_name, +0 , rate);
As far as I can tell the only fixed rate clock is the external crystal, from which all clocks derive. All the other clocks are fixed-factor clocks. You should thus register the PLLA clock as a fixed factor clock.
Quoted 11 lines
drivers/clk/shmobile/clk-r8a7779.c new file +11
-0+else +return clk_register_fixed_factor (NULL , name, parent_name, +0 , mult, div); +} + +static void __init r8a7779_cpg_clocks_init (struct device_node *np) +{ +const struct cpg_clk_config *config; +struct r8a7779_cpg *cpg; +struct clk **clks; +unsigned int i;
drivers/clk/shmobile/clk-r8a7779.c line 121
Quoted 10 lines
drivers/clk/shmobile/clk-r8a7779.c new file +10
-0+int num_clks; + + num_clks =of_property_count_strings (np,"clock-output-names" ); +if (num_clks <0 ) { +pr_err ("%s: failed to count clocks\n" , __func__); +return ; + } + + cpg =kzalloc (sizeof *cpg,GFP_KERNEL ); + clks =kzalloc (CPG_NUM_CLOCKS *sizeof *clks,GFP_KERNEL );
Not my preferred style either, but the kernel coding style uses sizeof().
drivers/clk/shmobile/clk-r8a7779.c line 133
Quoted 12 lines
drivers/clk/shmobile/clk-r8a7779.c new file +12
-0+if (cpg ==NULL || clks ==NULL ) { +/* We're leaking memory on purpose, there's no point in cleaning +* up as the system won't boot anyway. +*/ +pr_err ("%s: failed to allocate cpg\n" , __func__); +return ; + } + +spin_lock_init (&cpg->lock); + + cpg->data.clks = clks; + cpg->data.clk_num =CPG_NUM_CLOCKS ;
s/CPG_NUM_CLOCKS/num_clks/
You can then remove the CPG_NUM_CLOCKS definition above, as well as the dt- bindings/clock/r8a7779-clock.h include.
Quoted 44 lines
drivers/clk/shmobile/clk-r8a7779.c new file +33
-0+ + cpg->reg =of_iomap (np,0 ); +if (WARN_ON (cpg->reg ==NULL )) +return ; + + config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX (cpg_mode)]; + +for (i =0 ; i < num_clks; ++i) { +const char *name; +struct clk *clk; + +of_property_read_string_index (np,"clock-output-names" , i, + &name); + + clk =r8a7779_cpg_register_clock (np, cpg, config, name); +if (IS_ERR (clk)) +pr_err ("%s: failed to register %s %s clock (%ld)\n" , + __func__, np->name, name,PTR_ERR (clk)); +else + cpg->data.clks[i] = clk; + } + +of_clk_add_provider (np, of_clk_src_onecell_get, &cpg->data); +} +CLK_OF_DECLARE (r8a7779_cpg_clks,"renesas,r8a7779-cpg-clocks" , + r8a7779_cpg_clocks_init); + +void __init r8a7779_clocks_init (u32 mode) +{ + cpg_mode = mode; + +of_clk_init (NULL ); +}include/linux/clk/shmobile.h +1
-0@@ -15,5 +15,6 @@#include <linux/types.h> void rcar_gen2_clocks_init (u32 mode); +void r8a7779_clocks_init (u32 mode);#endif
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 2/17 clk: shmobile: r8a7779: Add MSTP clock support
In reply to Simon HormanAdd MSTP clock support for the r8a7779 SoC
The only change required appears to be to note a new compatibility string in the bindings.
--- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +1 -0
@@ -12,6 +12,7 @@ Required Properties: - compatible: Must be one of the following - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks + - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks - "renesas,cpg-mstp-clock" for generic MSTP gate clocks - reg: Base address and length of the memory resource used by the MSTP clocks
Signature · 1 line
1.8.4
RFC PATCH v2 2/17 clk: shmobile: r8a7779: Add MSTP clock support
Hi Simon,
Thank you for the patch.
Quoted 18 lines · On Tuesday 26 November 2013 16:32:04 Simon Horman wrote:
Add MSTP clock support for the r8a7779 SoC
The only change required appears to be to note a new compatibility string in the bindings.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + 1 file changed, 1 insertion(+)diff --git
a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txtb/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txtindex 126b17e..f0a4b83 100644
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt Required Properties: · line 15
Quoted 4 lines
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +1
-0@@ -12,6 +12,7 @@ Required Properties: - compatible: Must be one of the following - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks + - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks
Alphabetical order ? :-)
Quoted 3 lines
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +0
-0- "renesas,cpg-mstp-clock" for generic MSTP gate clocks - reg: Base address and length of the memory resource used by the MSTP clocks
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 2/17 clk: shmobile: r8a7779: Add MSTP clock support
Quoted 16 lines · Laurent Pinchart
Hi Simon,
Thank you for the patch.
Quoted 11 lines · On Tuesday 26 November 2013 16:32:04 Simon Horman wrote:
Add MSTP clock support for the r8a7779 SoC
The only change required appears to be to note a new compatibility string in the bindings.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + 1 file changed, 1 insertion(+)
Quoted 13 lines
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt Required Properties: · line 15
Quoted 11 lines
diff --git
a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txtb/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txtindex 126b17e..f0a4b83 100644Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +1
-0@@ -12,6 +12,7 @@ Required Properties: - compatible: Must be one of the following - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks + - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocksAlphabetical order ? :-)
Sure, I'll fix that up.
Quoted 14 lines
Quoted 4 lines
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +0
-0- "renesas,cpg-mstp-clock" for generic MSTP gate clocks - reg: Base address and length of the memory resource used by the MSTP clocksSignature · 8 lines
Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC PATCH v2 3/17 ARM: shmobile: r8a7779: Add clock index macros for DT sources
In reply to Simon HormanAdd macros usable by device tree sources to reference r8a7779 clocks by index.
Based on work for the r8a7790 and r8a7791 SoCs by Laurent Pinchart.
--- include/dt-bindings/clock/r8a7779-clock.h | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 include/dt-bindings/clock/r8a7779-clock.h
include/dt-bindings/clock/r8a7779-clock.h new file +61 -0
@@ -0,0 +1,61 @@ +/* +* Copyright (C) 2013 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* 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; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef __DT_BINDINGS_CLOCK_R8A7779_H__ +#define __DT_BINDINGS_CLOCK_R8A7779_H__ + +/* CPG */ +#define R8A7779_CLK_PLLA 0 +#define R8A7779_CLK_Z 1 +#define R8A7779_CLK_ZS 2 +#define R8A7779_CLK_S 3 +#define R8A7779_CLK_S1 4 +#define R8A7779_CLK_P 5 +#define R8A7779_CLK_OUT 6 + +/* MSTP 0 */ +#define R8A7779_CLK_HSPI0 7 +#define R8A7779_CLK_HSPI1 7 +#define R8A7779_CLK_HSPI2 7 +#define R8A7779_CLK_TMU0 16 +#define R8A7779_CLK_TMU1 16 +#define R8A7779_CLK_TMU2 16 +#define R8A7779_CLK_SCIF6 21 +#define R8A7779_CLK_SCIF4 22 +#define R8A7779_CLK_SCIF3 23 +#define R8A7779_CLK_SCIF2 24 +#define R8A7779_CLK_SCIF1 25 +#define R8A7779_CLK_SCIF0 26 +#define R8A7779_CLK_I2C3 27 +#define R8A7779_CLK_I2C2 28 +#define R8A7779_CLK_I2C1 29 +#define R8A7779_CLK_I2C0 30 + +/* MSTP 1 */ +#define R8A7779_CLK_EHCI0 0 +#define R8A7779_CLK_OHCI0 0 +#define R8A7779_CLK_EHCI1 1 +#define R8A7779_CLK_OHCI1 1 +#define R8A7779_CLK_DU 3 +#define R8A7779_CLK_VIN2 8 +#define R8A7779_CLK_VIN1 9 +#define R8A7779_CLK_VIN0 10 +#define R8A7779_CLK_SATA 15 +#define R8A7779_CLK_VIN3 20 + +/* MSTP 3 */ +#define R8A7779_CLK_SDHI3 20 +#define R8A7779_CLK_SDHI2 21 +#define R8A7779_CLK_SDHI1 22 +#define R8A7779_CLK_SDHI0 23 + + +#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */
Signature · 1 line
1.8.4
RFC PATCH v2 3/17 ARM: shmobile: r8a7779: Add clock index macros for DT sources
Hi Simon,
Thank you for the patch.
Quoted 35 lines · On Tuesday 26 November 2013 16:32:05 Simon Horman wrote:
Add macros usable by device tree sources to reference r8a7779 clocks by index.
Based on work for the r8a7790 and r8a7791 SoCs by Laurent Pinchart.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- include/dt-bindings/clock/r8a7779-clock.h | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 include/dt-bindings/clock/r8a7779-clock.h(quoted diff) +0
-0
b/include/dt-bindings/clock/r8a7779-clock.hnew file mode 100644 index 0000000..b05fa8binclude/dt-bindings/clock/r8a7779-clock.h new file +17
-0@@ -0,0 +1,61 @@ +/* +* Copyright (C) 2013 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* 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; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef __DT_BINDINGS_CLOCK_R8A7779_H__ +#define __DT_BINDINGS_CLOCK_R8A7779_H__ + +/* CPG */ +#define R8A7779_CLK_PLLA 0 +#define R8A7779_CLK_Z 1
include/dt-bindings/clock/r8a7779-clock.h line 27
Quoted 10 lines
include/dt-bindings/clock/r8a7779-clock.h new file +10
-0+#define R8A7779_CLK_ZS 2 +#define R8A7779_CLK_S 3 +#define R8A7779_CLK_S1 4 +#define R8A7779_CLK_P 5 +#define R8A7779_CLK_OUT 6 + +/* MSTP 0 */ +#define R8A7779_CLK_HSPI0 7 +#define R8A7779_CLK_HSPI1 7 +#define R8A7779_CLK_HSPI2 7
I would create a single clock named R8A7779_CLK_HSPI and reference it from the 3 HSPI instances.
include/dt-bindings/clock/r8a7779-clock.h line 30
Quoted 3 lines
include/dt-bindings/clock/r8a7779-clock.h new file +3
-0+#define R8A7779_CLK_TMU0 16 +#define R8A7779_CLK_TMU1 16 +#define R8A7779_CLK_TMU2 16
Indices for TMU1 and TMU2 should be 15 and 14.
Shouldn't you add the HSCIF clocks ?
Quoted 6 lines
include/dt-bindings/clock/r8a7779-clock.h new file +6
-0+#define R8A7779_CLK_SCIF6 21 +#define R8A7779_CLK_SCIF4 22 +#define R8A7779_CLK_SCIF3 23 +#define R8A7779_CLK_SCIF2 24 +#define R8A7779_CLK_SCIF1 25 +#define R8A7779_CLK_SCIF0 26
include/dt-bindings/clock/r8a7779-clock.h line 46
Quoted 10 lines
include/dt-bindings/clock/r8a7779-clock.h new file +10
-0+#define R8A7779_CLK_I2C3 27 +#define R8A7779_CLK_I2C2 28 +#define R8A7779_CLK_I2C1 29 +#define R8A7779_CLK_I2C0 30 + +/* MSTP 1 */ +#define R8A7779_CLK_EHCI0 0 +#define R8A7779_CLK_OHCI0 0 +#define R8A7779_CLK_EHCI1 1 +#define R8A7779_CLK_OHCI1 1
What about naming those USB01 and USB2 instead ?
include/dt-bindings/clock/r8a7779-clock.h line 50
Quoted 4 lines
include/dt-bindings/clock/r8a7779-clock.h new file +4
-0+#define R8A7779_CLK_DU 3 +#define R8A7779_CLK_VIN2 8 +#define R8A7779_CLK_VIN1 9 +#define R8A7779_CLK_VIN0 10
Could you add the ethernet clock as well ? We'll need it soon.
include/dt-bindings/clock/r8a7779-clock.h line 54
Quoted 4 lines
include/dt-bindings/clock/r8a7779-clock.h new file +4
-0+#define R8A7779_CLK_SATA 15 +#define R8A7779_CLK_VIN3 20 + +/* MSTP 3 */
Could you please add the MMC0 and MMC1 clocks as well ?
Quoted 7 lines
include/dt-bindings/clock/r8a7779-clock.h new file +7
-0+#define R8A7779_CLK_SDHI3 20 +#define R8A7779_CLK_SDHI2 21 +#define R8A7779_CLK_SDHI1 22 +#define R8A7779_CLK_SDHI0 23 + + +#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 3/17 ARM: shmobile: r8a7779: Add clock index macros for DT sources
Quoted 45 lines · Laurent Pinchart
Hi Simon,
Thank you for the patch.
Quoted 40 lines · On Tuesday 26 November 2013 16:32:05 Simon Horman wrote:
Add macros usable by device tree sources to reference r8a7779 clocks by index.
Based on work for the r8a7790 and r8a7791 SoCs by Laurent Pinchart.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- include/dt-bindings/clock/r8a7779-clock.h | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 include/dt-bindings/clock/r8a7779-clock.h(quoted diff) +0
-0
b/include/dt-bindings/clock/r8a7779-clock.hnew file mode 100644 index 0000000..b05fa8binclude/dt-bindings/clock/r8a7779-clock.h new file +22
-0@@ -0,0 +1,61 @@ +/* +* Copyright (C) 2013 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* 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; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef __DT_BINDINGS_CLOCK_R8A7779_H__ +#define __DT_BINDINGS_CLOCK_R8A7779_H__ + +/* CPG */ +#define R8A7779_CLK_PLLA 0 +#define R8A7779_CLK_Z 1 +#define R8A7779_CLK_ZS 2 +#define R8A7779_CLK_S 3 +#define R8A7779_CLK_S1 4 +#define R8A7779_CLK_P 5 +#define R8A7779_CLK_OUT 6
Quoted 8 lines
include/dt-bindings/clock/r8a7779-clock.h line 27
Quoted 5 lines
include/dt-bindings/clock/r8a7779-clock.h new file +5
-0+ +/* MSTP 0 */ +#define R8A7779_CLK_HSPI0 7 +#define R8A7779_CLK_HSPI1 7 +#define R8A7779_CLK_HSPI2 7I would create a single clock named
R8A7779_CLK_HSPIand reference it from the 3 HSPI instances.
Sure, will do.
Quoted 6 lines
include/dt-bindings/clock/r8a7779-clock.h line 30
Quoted 4 lines
include/dt-bindings/clock/r8a7779-clock.h new file +3
-0+#define R8A7779_CLK_TMU0 16 +#define R8A7779_CLK_TMU1 16 +#define R8A7779_CLK_TMU2 16Indices for TMU1 and TMU2 should be 15 and 14.
Thanks, I will fix that.
Quoted 13 lines
Shouldn't you add the HSCIF clocks ?
Quoted 10 lines
include/dt-bindings/clock/r8a7779-clock.h new file +10
-0+#define R8A7779_CLK_SCIF6 21 +#define R8A7779_CLK_SCIF4 22 +#define R8A7779_CLK_SCIF3 23 +#define R8A7779_CLK_SCIF2 24 +#define R8A7779_CLK_SCIF1 25 +#define R8A7779_CLK_SCIF0 26 +#define R8A7779_CLK_I2C3 27 +#define R8A7779_CLK_I2C2 28 +#define R8A7779_CLK_I2C1 29 +#define R8A7779_CLK_I2C0 30
Quoted 8 lines
include/dt-bindings/clock/r8a7779-clock.h line 46
Quoted 6 lines
include/dt-bindings/clock/r8a7779-clock.h new file +6
-0+ +/* MSTP 1 */ +#define R8A7779_CLK_EHCI0 0 +#define R8A7779_CLK_OHCI0 0 +#define R8A7779_CLK_EHCI1 1 +#define R8A7779_CLK_OHCI1 1What about naming those USB01 and USB2 instead ?
Sure, sounds good.
Quoted 7 lines
include/dt-bindings/clock/r8a7779-clock.h line 50
Quoted 5 lines
include/dt-bindings/clock/r8a7779-clock.h new file +4
-0+#define R8A7779_CLK_DU 3 +#define R8A7779_CLK_VIN2 8 +#define R8A7779_CLK_VIN1 9 +#define R8A7779_CLK_VIN0 10Could you add the ethernet clock as well ? We'll need it soon.
Will do.
Quoted 6 lines
include/dt-bindings/clock/r8a7779-clock.h line 54
Quoted 4 lines
include/dt-bindings/clock/r8a7779-clock.h new file +4
-0+#define R8A7779_CLK_SATA 15 +#define R8A7779_CLK_VIN3 20 + +/* MSTP 3 */ Could you please add the MMC0 and MMC1 clocks as well ?
Will do.
Quoted 12 lines
Quoted 7 lines
include/dt-bindings/clock/r8a7779-clock.h new file +7
-0+#define R8A7779_CLK_SDHI3 20 +#define R8A7779_CLK_SDHI2 21 +#define R8A7779_CLK_SDHI1 22 +#define R8A7779_CLK_SDHI0 23 + + +#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */ Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 4/17 ARM: shmobile: r8a7779: Add clocks
In reply to Simon HormanDeclare all core and MSTP clocks currently used by r8a7779-based boards.
Based on work by Laurent Pinchart for the r8a7790 and r8a7791 SoCs.
--- arch/arm/boot/dts/r8a7779-marzen.dts | 1 + arch/arm/boot/dts/r8a7779.dtsi | 124 +++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+)
arch/arm/boot/dts/r8a7779-marzen.dts +1 -0
@@ -11,6 +11,7 @@ /dts-v1/; #include "r8a7779.dtsi" +#include <dt-bindings/gpio/gpio.h> / { model = "marzen";
arch/arm/boot/dts/r8a7779.dtsi +124 -0
134 lines not on this page · raw message
Signature · 1 line
1.8.4
RFC PATCH v2 4/17 ARM: shmobile: r8a7779: Add clocks
Hi Simon,
Thanks for the patch.
Quoted 77 lines · On Tuesday 26 November 2013 16:32:06 Simon Horman wrote:
Declare all core and MSTP clocks currently used by r8a7779-based boards.
Based on work by Laurent Pinchart for the r8a7790 and r8a7791 SoCs.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/boot/dts/r8a7779-marzen.dts | 1 + arch/arm/boot/dts/r8a7779.dtsi | 124 ++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/r8a7779-marzen.dtsindex a7af2c2..ee3fb60 100644arch/arm/boot/dts/r8a7779-marzen.dts +1
-0@@ -11,6 +11,7 @@ /dts-v1/; #include "r8a7779.dtsi" +#include <dt-bindings/gpio/gpio.h> / { model = "marzen";arch/arm/boot/dts/r8a7779.dtsi +39
-0@@ -10,6 +10,7 @@ */ /include/ "skeleton.dtsi" +#include <dt-bindings/clock/r8a7779-clock.h> #include <dt-bindings/interrupt-controller/irq.h>@@ -248,4 +249,127 @@ cap-sdio-irq; status = "disabled"; }; + + clocks { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* Special CPG clocks */ + cpg_clocks: cpg_clocks at 0xe6150000 { + compatible = "renesas,r8a7779-cpg-clocks"; + reg = <0 0xe6150000 0 0x1000>; + #clock-cells = <1>; + clock-output-names = "plla", "z", "zs", "s", "s1", + "p", "out"; + }; + + /* Fixed factor clocks */ + i_clk: i_clk { + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R8A7779_CLK_PLLA>; + #clock-cells = <0>; + clock-div = <2>; + clock-mult = <1>; + clock-output-names = "i"; + }; + s3_clk: s3_clk { + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R8A7779_CLK_PLLA>; + #clock-cells = <0>; + clock-div = <8>; + clock-mult = <1>; + clock-output-names = "s3"; + }; + s4_clk: s4_clk { + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R8A7779_CLK_PLLA>; + #clock-cells = <0>; + clock-div = <16>; + clock-mult = <1>;
arch/arm/boot/dts/r8a7779.dtsi line 299
Quoted 10 lines
arch/arm/boot/dts/r8a7779.dtsi +10
-0+ clock-output-names = "s4"; + }; + g_clk: g_clk { + compatible = "fixed-factor-clock"; + clocks = <&cpg_clocks R8A7779_CLK_PLLA>; + #clock-cells = <0>; + clock-div = <24>; + clock-mult = <1>; + clock-output-names = "g"; + };
clks2 is missing, either as a fixed-factor-clock in DT, or as a CPG special clock.
arch/arm/boot/dts/r8a7779.dtsi
Quoted 3 lines
arch/arm/boot/dts/r8a7779.dtsi +3
-0+ /* Gate clocks */ + mstp0_clks: mstp0_clks { + compatible = "renesas,r8a7779-mstp-clocks", "renesas,cpg-mstp-
clocks";
arch/arm/boot/dts/r8a7779.dtsi line 304
Quoted 1 line
arch/arm/boot/dts/r8a7779.dtsi +1
-0+ reg = <0 0xffc80030 0 4>, <0 0xffc80034 0 4>;
There's no status register for MSTP0.
Quoted 10 lines
arch/arm/boot/dts/r8a7779.dtsi +2
-0+ clocks = <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, + <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>,<
&cpg_clocksR8A7779_CLK_P>,arch/arm/boot/dts/r8a7779.dtsi +1
-0+ <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>,<
&cpg_clocksR8A7779_CLK_P>,arch/arm/boot/dts/r8a7779.dtsi +1
-0+ <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>,<
&cpg_clocksR8A7779_CLK_P>,arch/arm/boot/dts/r8a7779.dtsi +1
-0+ <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>,<
&cpg_clocksR8A7779_CLK_P>,
arch/arm/boot/dts/r8a7779.dtsi line 315
Quoted 6 lines
arch/arm/boot/dts/r8a7779.dtsi +6
-0+ <&cpg_clocks R8A7779_CLK_P>; + #clock-cells = <1>; + renesas,clock-indices = < + R8A7779_CLK_HSPI0 R8A7779_CLK_HSPI1 R8A7779_CLK_HSPI2 + R8A7779_CLK_TMU0 R8A7779_CLK_TMU1 R8A7779_CLK_TMU2 + R8A7779_CLK_SCIF6 R8A7779_CLK_SCIF4 R8A7779_CLK_SCIF3
s/SCIF6/SCIF5/ (and in 04/17 as well) ?
arch/arm/boot/dts/r8a7779.dtsi line 323
Quoted 8 lines
arch/arm/boot/dts/r8a7779.dtsi +8
-0+ R8A7779_CLK_SCIF2 R8A7779_CLK_SCIF1 R8A7779_CLK_SCIF0 + R8A7779_CLK_I2C3 R8A7779_CLK_I2C2 R8A7779_CLK_I2C1 + R8A7779_CLK_I2C0 + >; + clock-output-names = + "hspi0", "hspi1", "hspi2", + "tmu0", "tmu1", "tmu2", + "scif6", "scif4", "scif3",
Here too.
arch/arm/boot/dts/r8a7779.dtsi
Quoted 6 lines
arch/arm/boot/dts/r8a7779.dtsi +6
-0+ "scif2", "scif1", "scif0", + "i2c3", "i2c2", "i2c1", + "i2c0"; + }; + mstp1_clks: mstp1_clks { + compatible = "renesas,r8a7779-mstp-clocks", "renesas,cpg-mstp-
clocks";
arch/arm/boot/dts/r8a7779.dtsi line 330
Quoted 1 line
arch/arm/boot/dts/r8a7779.dtsi +1
-0+ reg = <0 0xffc80034 0 4>, <0 0xffc80038 0 4>;
The status register is at 0xffc80044.
arch/arm/boot/dts/r8a7779.dtsi
Quoted 1 line
arch/arm/boot/dts/r8a7779.dtsi +1
-0+ clocks = <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks
R8A7779_CLK_P>,
Quoted 11 lines
arch/arm/boot/dts/r8a7779.dtsi +11
-0+ <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, + <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, + <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, + <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>; + #clock-cells = <1>; + renesas,clock-indices = < + R8A7779_CLK_EHCI0 R8A7779_CLK_OHCI0 + R8A7779_CLK_EHCI1 R8A7779_CLK_OHCI1 + R8A7779_CLK_DU R8A7779_CLK_VIN2 + R8A7779_CLK_VIN1 R8A7779_CLK_VIN0 + R8A7779_CLK_SATA R8A7779_CLK_VIN3
arch/arm/boot/dts/r8a7779.dtsi
Quoted 10 lines
arch/arm/boot/dts/r8a7779.dtsi +10
-0+ >; + clock-output-names = + "ehci0", "ohci0", + "ehci1", "ohci1", + "du", "vin2", + "vin1", "vin0", + "sata", "vin3"; + }; + mstp3_clks: mstp3_clks { + compatible = "renesas,r8a7779-mstp-clocks", "renesas,cpg-mstp-
clocks";
arch/arm/boot/dts/r8a7779.dtsi line 353
Quoted 1 line
arch/arm/boot/dts/r8a7779.dtsi +1
-0+ reg = <0 0xffc8003c 0 4>, <0 0xffc80040 0 4>;
There's no status register for MSTP3.
arch/arm/boot/dts/r8a7779.dtsi
Quoted 1 line
arch/arm/boot/dts/r8a7779.dtsi +1
-0+ clocks = <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks
R8A7779_CLK_P>,
arch/arm/boot/dts/r8a7779.dtsi line 342
Quoted 11 lines
arch/arm/boot/dts/r8a7779.dtsi +11
-0+ <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, + <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, + <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>, + <&cpg_clocks R8A7779_CLK_P>, <&cpg_clocks R8A7779_CLK_P>; + #clock-cells = <1>; + renesas,clock-indices = < + R8A7779_CLK_EHCI0 R8A7779_CLK_OHCI0 + R8A7779_CLK_EHCI1 R8A7779_CLK_OHCI1 + R8A7779_CLK_DU R8A7779_CLK_VIN2 + R8A7779_CLK_VIN1 R8A7779_CLK_VIN0 + R8A7779_CLK_SATA R8A7779_CLK_VIN3
That's for MSTP1, not MSTP3.
Quoted 10 lines
arch/arm/boot/dts/r8a7779.dtsi +9
-0+ >; + clock-output-names = + "ehci0", "ohci0", + "ehci1", "ohci1", + "du", "vin2", + "vin1", "vin0", + "sata", "vin3"; + }; + }; };
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 5/17 ARM: shmobile: r8a7779: Reference clocks
In reply to Simon HormanReference clocks using a "clocks" property in all nodes corresponding to devices that require a clock.
Based on work by Laurent Pinchart for the r8a7790 and r8a7791 SoCs.
--- arch/arm/boot/dts/r8a7779.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/boot/dts/r8a7779.dtsi +8 -0
@@ -160,6 +160,7 @@ reg = <0xffc70000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C0>; status = "disabled"; };
@@ -170,6 +171,7 @@ reg = <0xffc71000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C1>; status = "disabled"; };
@@ -180,6 +182,7 @@ reg = <0xffc72000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C2>; status = "disabled"; };
@@ -190,6 +193,7 @@ reg = <0xffc73000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C3>; status = "disabled"; };
@@ -215,6 +219,7 @@ reg = <0xffe4c000 0x100>; interrupt-parent = <&gic>; interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI0>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";
@@ -225,6 +230,7 @@ reg = <0xffe4d000 0x100>; interrupt-parent = <&gic>; interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI1>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";
@@ -235,6 +241,7 @@ reg = <0xffe4e000 0x100>; interrupt-parent = <&gic>; interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI2>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";
@@ -245,6 +252,7 @@ reg = <0xffe4f000 0x100>; interrupt-parent = <&gic>; interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI3>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";
Signature · 1 line
1.8.4
RFC PATCH v2 5/17 ARM: shmobile: r8a7779: Reference clocks
Hi Simon,
Thank you for the patch.
Quoted 2 lines · On Tuesday 26 November 2013 16:32:07 Simon Horman wrote:
Reference clocks using a "clocks" property in all nodes corresponding to devices that require a clock.
There's a sata node in your latest devel branch that you're missing.
Quoted 76 lines
Based on work by Laurent Pinchart for the r8a7790 and r8a7791 SoCs.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/boot/dts/r8a7779.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/r8a7779.dtsi +8
-0@@ -160,6 +160,7 @@ reg = <0xffc70000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C0>; status = "disabled"; };@@ -170,6 +171,7 @@ reg = <0xffc71000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C1>; status = "disabled"; };@@ -180,6 +182,7 @@ reg = <0xffc72000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C2>; status = "disabled"; };@@ -190,6 +193,7 @@ reg = <0xffc73000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C3>; status = "disabled"; };@@ -215,6 +219,7 @@ reg = <0xffe4c000 0x100>; interrupt-parent = <&gic>; interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI0>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";@@ -225,6 +230,7 @@ reg = <0xffe4d000 0x100>; interrupt-parent = <&gic>; interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI1>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";@@ -235,6 +241,7 @@ reg = <0xffe4e000 0x100>; interrupt-parent = <&gic>; interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI2>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";@@ -245,6 +252,7 @@ reg = <0xffe4f000 0x100>; interrupt-parent = <&gic>; interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI3>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 5/17 ARM: shmobile: r8a7779: Reference clocks
Quoted 9 lines · Laurent Pinchart
Hi Simon,
Thank you for the patch.
Quoted 2 lines · On Tuesday 26 November 2013 16:32:07 Simon Horman wrote:
Reference clocks using a "clocks" property in all nodes corresponding to devices that require a clock.
There's a sata node in your latest devel branch that you're missing.
Thanks, I must have made this patch using an older version of the devel branch. I'll fix this up.
Quoted 81 lines
Quoted 76 lines
Based on work by Laurent Pinchart for the r8a7790 and r8a7791 SoCs.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/boot/dts/r8a7779.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/boot/dts/r8a7779.dtsi +8
-0@@ -160,6 +160,7 @@ reg = <0xffc70000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C0>; status = "disabled"; };@@ -170,6 +171,7 @@ reg = <0xffc71000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C1>; status = "disabled"; };@@ -180,6 +182,7 @@ reg = <0xffc72000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C2>; status = "disabled"; };@@ -190,6 +193,7 @@ reg = <0xffc73000 0x1000>; interrupt-parent = <&gic>; interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7779_CLK_I2C3>; status = "disabled"; };@@ -215,6 +219,7 @@ reg = <0xffe4c000 0x100>; interrupt-parent = <&gic>; interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI0>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";@@ -225,6 +230,7 @@ reg = <0xffe4d000 0x100>; interrupt-parent = <&gic>; interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI1>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";@@ -235,6 +241,7 @@ reg = <0xffe4e000 0x100>; interrupt-parent = <&gic>; interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI2>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";@@ -245,6 +252,7 @@ reg = <0xffe4f000 0x100>; interrupt-parent = <&gic>; interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp3_clks R8A7779_CLK_SDHI3>; cap-sd-highspeed; cap-sdio-irq; status = "disabled";Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 6/17 ARM: shmobile: Sync Marzen DTS with Marzen reference DTS
In reply to Simon HormanCopy the device nodes from Marzen reference into the Marzen 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.
Based on a similar change for the Lager board by Laurent Pinchart.
--- arch/arm/boot/dts/r8a7779-marzen.dts | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
arch/arm/boot/dts/r8a7779-marzen.dts +81 -0
@@ -25,4 +25,85 @@ device_type = "memory"; reg = <0x60000000 0x40000000>; }; + + 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; + }; + + lan0 at 18000000 { + compatible = "smsc,lan9220", "smsc,lan9115"; + reg = <0x18000000 0x100>; + pinctrl-0 = <&lan0_pins>; + pinctrl-names = "default"; + + phy-mode = "mii"; + interrupt-parent = <&irqpin0>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + reg-io-width = <4>; + vddvario-supply = <&fixedregulator3v3>; + vdd33a-supply = <&fixedregulator3v3>; + }; + + leds { + compatible = "gpio-leds"; + led2 { + gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; + }; + led3 { + gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; + }; + led4 { + gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&irqpin0 { + status = "okay"; +}; + +&pfc { + pinctrl-0 = <&scif2_pins &scif4_pins>; + pinctrl-names = "default"; + + lan0_pins: lan0 { + intc { + renesas,groups = "intc_irq1_b"; + renesas,function = "intc"; + }; + lbsc { + renesas,groups = "lbsc_ex_cs0"; + renesas,function = "lbsc"; + }; + }; + + scif2_pins: serial2 { + renesas,groups = "scif2_data_c"; + renesas,function = "scif2"; + }; + + scif4_pins: serial4 { + renesas,groups = "scif4_data"; + renesas,function = "scif4"; + }; + + sdhi0_pins: sd0 { + renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", + "sdhi0_wp"; + renesas,function = "sdhi0"; + }; +}; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&fixedregulator3v3>; + bus-width = <4>; + status = "okay"; };
Signature · 1 line
1.8.4
RFC PATCH v2 7/17 ARM: shmobile: r8a7779: Sort headers alphabetically
In reply to Simon Horman--- arch/arm/mach-shmobile/board-marzen.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
arch/arm/mach-shmobile/board-marzen.c +14 -14
@@ -19,35 +19,35 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/kernel.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/traps.h> +#include <linux/delay.h> +#include <linux/dma-mapping.h> #include <linux/init.h> #include <linux/interrupt.h> -#include <linux/irq.h> -#include <linux/platform_device.h> -#include <linux/delay.h> #include <linux/io.h> +#include <linux/irq.h> +#include <linux/kernel.h> #include <linux/leds.h> -#include <linux/dma-mapping.h> +#include <linux/mfd/tmio.h> +#include <linux/mmc/host.h> +#include <linux/mmc/sh_mobile_sdhi.h> #include <linux/pinctrl/machine.h> #include <linux/platform_data/camera-rcar.h> #include <linux/platform_data/gpio-rcar.h> #include <linux/platform_data/rcar-du.h> #include <linux/platform_data/usb-rcar-phy.h> +#include <linux/platform_device.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h> #include <linux/smsc911x.h> -#include <linux/spi/spi.h> #include <linux/spi/sh_hspi.h> -#include <linux/mmc/host.h> -#include <linux/mmc/sh_mobile_sdhi.h> -#include <linux/mfd/tmio.h> -#include <media/soc_camera.h> -#include <mach/r8a7779.h> +#include <linux/spi/spi.h> #include <mach/common.h> #include <mach/irqs.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/traps.h> +#include <mach/r8a7779.h> +#include <media/soc_camera.h> /* Fixed 3.3V regulator to be used by SDHI0 */ static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
Signature · 1 line
1.8.4
RFC PATCH v2 7/17 ARM: shmobile: r8a7779: Sort headers alphabetically
Hello.
Quoted 46 lines · Simon Horman
Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/board-marzen.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)arch/arm/mach-shmobile/board-marzen.c +11
-9@@ -19,35 +19,35 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/kernel.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/traps.h> +#include <linux/delay.h> +#include <linux/dma-mapping.h> #include <linux/init.h> #include <linux/interrupt.h> -#include <linux/irq.h> -#include <linux/platform_device.h> -#include <linux/delay.h> #include <linux/io.h> +#include <linux/irq.h> +#include <linux/kernel.h> #include <linux/leds.h> -#include <linux/dma-mapping.h> +#include <linux/mfd/tmio.h> +#include <linux/mmc/host.h> +#include <linux/mmc/sh_mobile_sdhi.h> #include <linux/pinctrl/machine.h> #include <linux/platform_data/camera-rcar.h> #include <linux/platform_data/gpio-rcar.h> #include <linux/platform_data/rcar-du.h> #include <linux/platform_data/usb-rcar-phy.h> +#include <linux/platform_device.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h> #include <linux/smsc911x.h> -#include <linux/spi/spi.h> #include <linux/spi/sh_hspi.h> -#include <linux/mmc/host.h> -#include <linux/mmc/sh_mobile_sdhi.h> -#include <linux/mfd/tmio.h>
arch/arm/mach-shmobile/board-marzen.c line 50
Quoted 10 lines
arch/arm/mach-shmobile/board-marzen.c +3
-5-#include <media/soc_camera.h> -#include <mach/r8a7779.h> +#include <linux/spi/spi.h> #include <mach/common.h> #include <mach/irqs.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/traps.h> +#include <mach/r8a7779.h> +#include <media/soc_camera.h>
I thought it was a good idea to keep the #include's in the order of the
most generic to most machine specific ones: <linux/*.h> first, then <asm/*.h>, then <mach/*.h>, only with empty lines between groups (which weren't used here) with each group kept sorted...
WBR, Sergei
RFC PATCH v2 7/17 ARM: shmobile: r8a7779: Sort headers alphabetically
Quoted 58 lines · Sergei Shtylyov
Hello.
Quoted 54 lines · Simon Horman
Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/board-marzen.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)arch/arm/mach-shmobile/board-marzen.c +12
-14@@ -19,35 +19,35 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/kernel.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/traps.h> +#include <linux/delay.h> +#include <linux/dma-mapping.h> #include <linux/init.h> #include <linux/interrupt.h> -#include <linux/irq.h> -#include <linux/platform_device.h> -#include <linux/delay.h> #include <linux/io.h> +#include <linux/irq.h> +#include <linux/kernel.h> #include <linux/leds.h> -#include <linux/dma-mapping.h> +#include <linux/mfd/tmio.h> +#include <linux/mmc/host.h> +#include <linux/mmc/sh_mobile_sdhi.h> #include <linux/pinctrl/machine.h> #include <linux/platform_data/camera-rcar.h> #include <linux/platform_data/gpio-rcar.h> #include <linux/platform_data/rcar-du.h> #include <linux/platform_data/usb-rcar-phy.h> +#include <linux/platform_device.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h> #include <linux/smsc911x.h> -#include <linux/spi/spi.h> #include <linux/spi/sh_hspi.h> -#include <linux/mmc/host.h> -#include <linux/mmc/sh_mobile_sdhi.h> -#include <linux/mfd/tmio.h> -#include <media/soc_camera.h> -#include <mach/r8a7779.h> +#include <linux/spi/spi.h> #include <mach/common.h> #include <mach/irqs.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/traps.h>
Quoted 8 lines
arch/arm/mach-shmobile/board-marzen.c line 50
Quoted 2 lines
arch/arm/mach-shmobile/board-marzen.c +2
-0+#include <mach/r8a7779.h> +#include <media/soc_camera.h> I thought it was a good idea to keep the #include's in the order
of the most generic to most machine specific ones: <linux/*.h> first, then <asm/*.h>, then <mach/*.h>, only with empty lines between groups (which weren't used here) with each group kept sorted...
That sounds reasonable to me.
Laurent, do you have an opinion on this?
RFC PATCH v2 7/17 ARM: shmobile: r8a7779: Sort headers alphabetically
Hi Simon,
Quoted 62 lines · On Wednesday 27 November 2013 14:09:58 Simon Horman wrote:
Quoted 61 lines · Sergei Shtylyov
Quoted 48 lines · Simon Horman
Signed-off-by Simon Horman <[email protected]>---
arch/arm/mach-shmobile/board-marzen.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-shmobile/board-marzen.cindex 4f9e3ec..e202c64 100644arch/arm/mach-shmobile/board-marzen.c +11
-10@@ -19,35 +19,35 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/kernel.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/traps.h> +#include <linux/delay.h> +#include <linux/dma-mapping.h> #include <linux/init.h> #include <linux/interrupt.h> -#include <linux/irq.h> -#include <linux/platform_device.h> -#include <linux/delay.h> #include <linux/io.h> +#include <linux/irq.h> +#include <linux/kernel.h> #include <linux/leds.h> -#include <linux/dma-mapping.h> +#include <linux/mfd/tmio.h> +#include <linux/mmc/host.h> +#include <linux/mmc/sh_mobile_sdhi.h> #include <linux/pinctrl/machine.h> #include <linux/platform_data/camera-rcar.h> #include <linux/platform_data/gpio-rcar.h> #include <linux/platform_data/rcar-du.h> #include <linux/platform_data/usb-rcar-phy.h> +#include <linux/platform_device.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h> #include <linux/smsc911x.h> -#include <linux/spi/spi.h> #include <linux/spi/sh_hspi.h> -#include <linux/mmc/host.h> -#include <linux/mmc/sh_mobile_sdhi.h> -#include <linux/mfd/tmio.h> -#include <media/soc_camera.h> arch/arm/mach-shmobile/board-marzen.c line 51
Quoted 10 lines
arch/arm/mach-shmobile/board-marzen.c +3
-4-#include <mach/r8a7779.h> +#include <linux/spi/spi.h> #include <mach/common.h> #include <mach/irqs.h> -#include <asm/mach-types.h> -#include <asm/mach/arch.h> -#include <asm/traps.h> +#include <mach/r8a7779.h> +#include <media/soc_camera.h> I thought it was a good idea to keep the #include's in the order
Quoted 7 lines
Quoted 4 lines
of the most generic to most machine specific ones: <linux/*.h> first, then <asm/*.h>, then <mach/*.h>, only with empty lines between groups (which weren't used here) with each group kept sorted...
That sounds reasonable to me.
Laurent, do you have an opinion on this?
That's fine with me.
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 8/17 ARM: shmobile: r8a7779: Add helper to read mode pins
In reply to Simon HormanAdd and use helper to read mode pins.
This will be re-used when moving marzen-reference to the common clock framework.
--- arch/arm/mach-shmobile/clock-r8a7779.c | 11 ++--------- arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 + arch/arm/mach-shmobile/setup-r8a7779.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 9 deletions(-)
arch/arm/mach-shmobile/clock-r8a7779.c +2 -9
@@ -25,6 +25,7 @@#include <linux/clkdev.h> #include <mach/clock.h> #include <mach/common.h> +#include <mach/r8a7779.h> /* * MD1 = 1 MD1 = 0
@@ -59,9 +60,6 @@#define MSTPCR6 IOMEM(0xffc80058)#define MSTPCR7 IOMEM(0xffc80040) -#define MODEMR 0xffcc0020 - -/* ioremap() through clock mapping mandatory to avoid * collision with ARM coherent DMA virtual memory range. */
@@ -213,14 +211,9 @@ static struct clk_lookup lookups[] = {void __init r8a7779_clock_init (void ) { -void __iomem *modemr =ioremap_nocache (MODEMR ,PAGE_SIZE ); -u32 mode; +u32 mode =r8a7779_read_mode_pins ();int k, ret =0 ; -BUG_ON (!modemr); - mode =ioread32 (modemr); -iounmap (modemr); -if (mode &MD (1 )) { plla_clk.rate =1500000000 ;
arch/arm/mach-shmobile/include/mach/r8a7779.h +1 -0
@@ -39,6 +39,7 @@ extern void r8a7779_add_early_devices(void);extern void r8a7779_add_standard_devices (void );extern void r8a7779_add_standard_devices_dt (void );extern void r8a7779_init_late (void ); +extern u32 r8a7779_read_mode_pins (void );extern void r8a7779_clock_init (void );extern void r8a7779_pinmux_init (void );extern void r8a7779_pm_init (void );
arch/arm/mach-shmobile/setup-r8a7779.c +14 -0
@@ -874,6 +874,20 @@ void __init r8a7779_add_standard_devices_dt(void)of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); } +#define MODEMR 0xffcc0020 + +u32 __init r8a7779_read_mode_pins (void ) +{ +void __iomem *modemr =ioremap_nocache (MODEMR ,PAGE_SIZE ); +u32 mode; + +BUG_ON (!modemr); + mode =ioread32 (modemr); +iounmap (modemr); + +return mode; +} +static const char *r8a7779_compat_dt[]__initdata = {"renesas,r8a7779" ,NULL ,
Signature · 1 line
1.8.4
RFC PATCH v2 9/17 ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to clock-r8a7779.c
In reply to Simon Hormanr8a7779_earlytimer_init() calls r8a7779_clock_init() and r8a7779_clock_init() is defined in clock-r8a7779.c.
If both CONFIG_COMMON_CLK and CONFIG_ARCH_R8A7779 are enabled, as will be the case when marzen-reference moves to use the common clock framework, then setup-r8a7779.c is compiled but clock-r8a7779.c is not.
As r8a7779_earlytimer_init() is not used by marzen-reference simply move it to clock-r8a7779.c.
--- arch/arm/mach-shmobile/clock-r8a7779.c | 11 +++++++++++ arch/arm/mach-shmobile/setup-r8a7779.c | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-)
arch/arm/mach-shmobile/clock-r8a7779.c +11 -0
@@ -23,6 +23,7 @@#include <linux/io.h> #include <linux/sh_clk.h> #include <linux/clkdev.h> +#include <linux/sh_timer.h> #include <mach/clock.h> #include <mach/common.h> #include <mach/r8a7779.h>
@@ -267,3 +268,13 @@ void __init r8a7779_clock_init(void)else panic ("failed to setup r8a7779 clocks\n" ); } + +/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ +void __init __weak r8a7779_register_twd (void ) { } + +void __init r8a7779_earlytimer_init (void ) +{ +r8a7779_clock_init (); +r8a7779_register_twd (); +shmobile_earlytimer_init (); +}
arch/arm/mach-shmobile/setup-r8a7779.c +0 -10
@@ -786,16 +786,6 @@ void __init r8a7779_add_standard_devices(void)r8a7779_register_hpb_dmae (); } -/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ -void __init __weak r8a7779_register_twd (void ) { } - -void __init r8a7779_earlytimer_init (void ) -{ -r8a7779_clock_init (); -r8a7779_register_twd (); -shmobile_earlytimer_init (); -} -void __init r8a7779_add_early_devices (void ) { early_platform_add_devices(r8a7779_devices_dt,
Signature · 1 line
1.8.4
RFC PATCH v2 10/17 ARM: shmobile: marzen-reference: Move clock and OF device initialisation into board code
In reply to Simon HormanMove the clock initialisation and OF device population from SoC to board code. This is in keeping with the pattern used by Lager. And the clock portion is part of decoupling clock initialisation from SoC code in preparation for moving to the common clock framework.
--- arch/arm/mach-shmobile/board-marzen-reference.c | 3 +++ arch/arm/mach-shmobile/setup-r8a7779.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-)
arch/arm/mach-shmobile/board-marzen-reference.c +3 -0
@@ -19,6 +19,7 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/of_platform.h> #include <mach/r8a7779.h> #include <mach/common.h> #include <mach/irqs.h>
@@ -27,7 +28,9 @@static void __init marzen_init (void ) { +r8a7779_clock_init ();r8a7779_add_standard_devices_dt (); +of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );r8a7779_init_irq_extpin_dt (1 );/* IRQ1 as individual interrupt */ }
arch/arm/mach-shmobile/setup-r8a7779.c +0 -4
@@ -856,12 +856,8 @@ void __init r8a7779_init_delay(void)void __init r8a7779_add_standard_devices_dt (void ) { -/* clocks are setup late during boot in the case of DT */ -r8a7779_clock_init (); -platform_add_devices (r8a7779_devices_dt,ARRAY_SIZE (r8a7779_devices_dt)); -of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL ); }#define MODEMR 0xffcc0020
Signature · 1 line
1.8.4
RFC PATCH v2 11/17 ARM: shmobile: r8a7779: Do not include sh_clk.h in r8a7779.h
In reply to Simon HormanDo not include sh_clk.h in r8a7779.h as it is not necessary.
--- arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-shmobile/include/mach/r8a7779.h +0 -1
@@ -1,7 +1,6 @@#ifndef __ASM_R8A7779_H__#define __ASM_R8A7779_H__ -#include <linux/sh_clk.h> #include <linux/pm_domain.h> /* HPB-DMA slave IDs */
Signature · 1 line
1.8.4
RFC PATCH v2 12/17 ARM: shmobile: r8a7779: Initial multiplatform support
In reply to Simon HormanAdd Marzen and r8a7779 to CONFIG_SHMOBILE_MULTI. At this point CCF is not yet supported so you cannot run this code yet. For CCF support to happen several different components are needed, and this is one simple portion that moves us forward. Other patches need to build on top of this one.
Marzen board support exists in 3 flavours:
1) SHMOBILE_MULTI, MACH_MARZEN - board-marzen-reference.c (CCF + DT)
2) SHMOBILE, MACH_MARZEN_REFERENCE - board-marzen-reference.c (DT)
3) SHMOBILE, MACH_MARZEN - board-marzen.c (legacy C code)
When CCF is done then 2) will be removed. When 1) includes same features as 3) then 3) will be removed.
Based on work for the Koelsch and r8a7791 by Magnus Damm.
---
v2
* Do not add spurious blank line
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/mach-shmobile/Kconfig | 8 ++++++++ arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/board-marzen-reference.c | 5 +++++ 4 files changed, 15 insertions(+)
arch/arm/boot/dts/Makefile +1 -0
@@ -217,6 +217,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ sh7372-mackerel.dtb dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ r7s72100-genmai-reference.dtb \ + r8a7779-marzen-reference.dtb \ r8a7791-koelsch-reference.dtb dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \ socfpga_vt.dtb
arch/arm/mach-shmobile/Kconfig +8 -0
@@ -21,6 +21,9 @@ if ARCH_SHMOBILE_MULTI comment "SH-Mobile System Type" +config ARCH_R8A7779 + bool "R-Car H1 (R8A77790)" + config ARCH_EMEV2 bool "Emma Mobile EV2"
@@ -46,6 +49,11 @@ config MACH_KZM9D depends on ARCH_EMEV2 select REGULATOR_FIXED_VOLTAGE if REGULATOR +config MACH_MARZEN + bool "MARZEN board" + depends on ARCH_R8A7779 + select REGULATOR_FIXED_VOLTAGE if REGULATOR + comment "SH-Mobile System Configuration" endif
arch/arm/mach-shmobile/Makefile +1 -0
@@ -59,6 +59,7 @@ ifdef CONFIG_ARCH_SHMOBILE_MULTI obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o obj-$(CONFIG_MACH_KZM9D) += board-kzm9d-reference.o +obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o else obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o
arch/arm/mach-shmobile/board-marzen-reference.c +5 -0
@@ -19,6 +19,7 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/clk-provider.h> #include <linux/of_platform.h> #include <mach/r8a7779.h> #include <mach/common.h>
@@ -28,7 +29,11 @@static void __init marzen_init (void ) { +#ifdef CONFIG_COMMON_CLK +of_clk_init (NULL ); +#else r8a7779_clock_init (); +#endif r8a7779_add_standard_devices_dt ();of_platform_populate (NULL , of_default_bus_match_table,NULL ,NULL );r8a7779_init_irq_extpin_dt (1 );/* IRQ1 as individual interrupt */
Signature · 1 line
1.8.4
RFC PATCH v2 13/17 ARM: shmobile: marzen-reference: Initialize CPG device
In reply to Simon HormanOn multiplatform kernels clocks are handled by the CCF CPG driver. It must be explicitly initialized by a call to r8a7779_clocks_init() with the value of the boot mode pins.
Based on similar work for the Koelsch board by Laurent Pinchart.
---
v2
* Correct changelog to refer to r8a7779_clocks_init()
--- arch/arm/mach-shmobile/board-marzen-reference.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
arch/arm/mach-shmobile/board-marzen-reference.c +12 -4
@@ -19,7 +19,8 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <linux/clk-provider.h> +#include <linux/clk/shmobile.h> +#include <linux/clocksource.h> #include <linux/of_platform.h> #include <mach/r8a7779.h> #include <mach/common.h>
@@ -27,11 +28,17 @@#include <asm/irq.h> #include <asm/mach/arch.h> -static void __init marzen_init (void ) +static void __init marzen_init_timer (void ) {#ifdef CONFIG_COMMON_CLK -of_clk_init (NULL ); -#else +r8a7779_clocks_init (r8a7779_read_mode_pins ()); +#endif +clocksource_of_init (); +} + +static void __init marzen_init (void ) +{ +#ifndef CONFIG_COMMON_CLK r8a7779_clock_init ();#endif r8a7779_add_standard_devices_dt ();
@@ -48,6 +55,7 @@ DT_MACHINE_START(MARZEN, "marzen") .smp = smp_ops(r8a7779_smp_ops), .map_io = r8a7779_map_io, .init_early = r8a7779_init_delay, + .init_time = marzen_init_timer, .nr_irqs = NR_IRQS_LEGACY, .init_irq = r8a7779_init_irq_dt, .init_machine = marzen_init,
Signature · 1 line
1.8.4
RFC PATCH v2 14/17 ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and CMT
In reply to Simon HormanNow that the common clock framework is supported, the clock lookup entries in clock-r8a7779.c are not registered anymore. Devices must instead reference their clocks in the device tree. However, SCIF and CMT devices are still instantiated through platform code, and thus need a clock lookup entry.
Retrieve the SCIF and CMT clock entries by name and register clkdevs for the corresponding devices. This will be removed when the SCIF and CMT devices will be instantiated from the device tree.
Based on work for the Koelsch board by Laurent Pinchart.
--- arch/arm/mach-shmobile/board-marzen-reference.c | 28 ++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/board-marzen-reference.c +27 -1
@@ -19,7 +19,9 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/clk.h> #include <linux/clk/shmobile.h> +#include <linux/clkdev.h> #include <linux/clocksource.h> #include <linux/of_platform.h> #include <mach/r8a7779.h>
@@ -38,7 +40,31 @@ static void __init marzen_init_timer(void)static void __init marzen_init (void ) { -#ifndef CONFIG_COMMON_CLK +#ifdef CONFIG_COMMON_CLK +/* +* This is a really crude hack to provide clkdev support to the SCIF +* and CMT devices until they get moved to DT. +*/ +static const char *const scif_names[] = { +"scif0" ,"scif1" ,"scif2" ,"scif3" ,"scif4" ,"scif5" , + }; +struct clk *clk; +unsigned int i; + +for (i =0 ; i <ARRAY_SIZE (scif_names); i++) { + clk =clk_get (NULL , scif_names[i]); +if (clk) { +clk_register_clkdev (clk,NULL ,"sh-sci.%u" , i); +clk_put (clk); + } + } + + clk =clk_get (NULL ,"cmt0" ); +if (clk) { +clk_register_clkdev (clk,NULL ,"sh_cmt.0" ); +clk_put (clk); + } +#else r8a7779_clock_init ();#endif r8a7779_add_standard_devices_dt ();
Signature · 1 line
1.8.4
RFC PATCH v2 15/17 ARM: shmobile: Remove non-multiplatform Marzen reference support
In reply to Simon HormanNow that r8a7779 has CCF support remove the legacy Marzen reference Kconfig bits CONFIG_MACH_MARZEN_REFERENCE for the non-multiplatform case.
Starting from this commit Marzen board support is always enabled via CONFIG_MACH_MARZEN, and CONFIG_ARCH_MULTIPLATFORM is used to select between board-marzen.c and board-marzen-reference.c
The file board-marzen-reference.c can no longer be used together with the legacy sh-clk clock framework, instead CCF is used.
Based on work for the Koelsch board by Laurent Pinchart.
---
v2
* Correct changelog to refer to marzen instead of koelsch
* Do not add typo to Makefile
--- arch/arm/boot/dts/Makefile | 1 - arch/arm/mach-shmobile/Kconfig | 13 ------------- arch/arm/mach-shmobile/Makefile | 1 - arch/arm/mach-shmobile/Makefile.boot | 1 - 4 files changed, 16 deletions(-)
arch/arm/boot/dts/Makefile +0 -1
@@ -205,7 +205,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ r8a7778-bockw-reference.dtb \ r8a7740-armadillo800eva-reference.dtb \ r8a7779-marzen.dtb \ - r8a7779-marzen-reference.dtb \ r8a7791-koelsch.dtb \ r8a7791-koelsch-reference.dtb \ r8a7790-lager.dtb \
arch/arm/mach-shmobile/Kconfig +0 -13
@@ -239,19 +239,6 @@ config MACH_MARZEN select REGULATOR_FIXED_VOLTAGE if REGULATOR select USE_OF -config MACH_MARZEN_REFERENCE - bool "MARZEN board - Reference Device Tree Implementation" - depends on ARCH_R8A7779 - select ARCH_REQUIRE_GPIOLIB - select REGULATOR_FIXED_VOLTAGE if REGULATOR - select USE_OF - ---help--- - Use reference implementation of Marzen 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_LAGER bool "Lager board" depends on ARCH_R8A7790
arch/arm/mach-shmobile/Makefile +0 -1
@@ -69,7 +69,6 @@ obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o obj-$(CONFIG_MACH_GENMAI) += board-genmai.o obj-$(CONFIG_MACH_GENMAI_REFERENCE) += board-genmai-reference.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
arch/arm/mach-shmobile/Makefile.boot +0 -1
@@ -16,7 +16,6 @@ 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 __ZRELADDR := $(sort $(loadaddr-y)) zreladdr-y += $(__ZRELADDR)
Signature · 1 line
1.8.4
RFC PATCH v2 15/17 ARM: shmobile: Remove non-multiplatform Marzen reference support
Hi Simon,
Thank you for the patch.
Quoted 10 lines · On Tuesday 26 November 2013 16:32:17 Simon Horman wrote:
Now that r8a7779 has CCF support remove the legacy Marzen reference
KconfigbitsCONFIG_MACH_MARZEN_REFERENCEfor the non-multiplatform case.Starting from this commit Marzen board support is always enabled via
CONFIG_MACH_MARZEN, andCONFIG_ARCH_MULTIPLATFORMis used to select betweenboard-marzen.candboard-marzen-reference.cThe file
board-marzen-reference.ccan no longer be used together with the legacy sh-clk clock framework, instead CCF is used.
You should then modify it to remove the #ifdef CONFIG_COMMON_CLK conditional compilation.
Quoted 76 lines
Based on work for the Koelsch board by Laurent Pinchart.
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>---
v2
* Correct changelog to refer to marzen instead of koelsch
* Do not add typo toMakefile--- arch/arm/boot/dts/Makefile | 1 - arch/arm/mach-shmobile/Kconfig | 13 ------------- arch/arm/mach-shmobile/Makefile | 1 - arch/arm/mach-shmobile/Makefile.boot | 1 - 4 files changed, 16 deletions(-)arch/arm/boot/dts/Makefile +0
-1@@ -205,7 +205,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ r8a7778-bockw-reference.dtb \ r8a7740-armadillo800eva-reference.dtb \ r8a7779-marzen.dtb \ - r8a7779-marzen-reference.dtb \ r8a7791-koelsch.dtb \ r8a7791-koelsch-reference.dtb \ r8a7790-lager.dtb \arch/arm/mach-shmobile/Kconfig +0
-13@@ -239,19 +239,6 @@ config MACH_MARZEN select REGULATOR_FIXED_VOLTAGE if REGULATOR select USE_OF -config MACH_MARZEN_REFERENCE - bool "MARZEN board - Reference Device Tree Implementation" - depends on ARCH_R8A7779 - select ARCH_REQUIRE_GPIOLIB - select REGULATOR_FIXED_VOLTAGE if REGULATOR - select USE_OF - ---help--- - Use reference implementation of Marzen 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_LAGER bool "Lager board" depends on ARCH_R8A7790(quoted diff) +0
-0b/arch/arm/mach-shmobile/Makefile index 6d75ae8..e7f586c 100644
arch/arm/mach-shmobile/Makefile +0
-0@@ -69,7 +69,6 @@ obj-$(CONFIG_MACH_BOCKW_REFERENCE) +=board-bockw-reference.o obj-$(CONFIG_MACH_GENMAI) += board-genmai.o
obj-$(CONFIG_MACH_GENMAI_REFERENCE) += board-genmai-reference.o
obj-$(CONFIG_MACH_MARZEN) += board-marzen.oarch/arm/mach-shmobile/Makefile +0
-1-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(quoted diff) +0
-0b/arch/arm/mach-shmobile/Makefile.boot index 759e4f8f..6f761b4 100644
arch/arm/mach-shmobile/Makefile.boot +0
-1@@ -16,7 +16,6 @@ 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 __ZRELADDR := $(sort $(loadaddr-y)) zreladdr-y += $(__ZRELADDR)
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 15/17 ARM: shmobile: Remove non-multiplatform Marzen reference support
Quoted 13 lines · Laurent Pinchart
Hi Simon,
Thank you for the patch.
Quoted 8 lines · On Tuesday 26 November 2013 16:32:17 Simon Horman wrote:
Now that r8a7779 has CCF support remove the legacy Marzen reference
KconfigbitsCONFIG_MACH_MARZEN_REFERENCEfor the non-multiplatform case.Starting from this commit Marzen board support is always enabled via
CONFIG_MACH_MARZEN, andCONFIG_ARCH_MULTIPLATFORMis used to select betweenboard-marzen.candboard-marzen-reference.c
Quoted 5 lines
Quoted 2 lines
The file
board-marzen-reference.ccan no longer be used together with the legacy sh-clk clock framework, instead CCF is used.You should then modify it to remove the #ifdef
CONFIG_COMMON_CLKconditional compilation.
Thanks, will do.
Magnus Damm
maintainerRFC PATCH v2 15/17 ARM: shmobile: Remove non-multiplatform Marzen reference support
In reply to Simon HormanQuoted 13 lines · Simon Horman
Now that r8a7779 has CCF support remove the legacy Marzen reference
KconfigbitsCONFIG_MACH_MARZEN_REFERENCEfor the non-multiplatform case.Starting from this commit Marzen board support is always enabled via
CONFIG_MACH_MARZEN, andCONFIG_ARCH_MULTIPLATFORMis used to select betweenboard-marzen.candboard-marzen-reference.cThe file
board-marzen-reference.ccan no longer be used together with the legacy sh-clk clock framework, instead CCF is used.Based on work for the Koelsch board by Laurent Pinchart.
Quoted 7 lines
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>---
v2
* Correct changelog to refer to marzen instead of koelsch
* Do not add typo toMakefile
I think we need to discuss _when_ to do this in more detail. I know this follows the same style as Laurent's patches, but I don't think we're ready to flip the switch yet. I propose that we let DT reference coexist with multiplatform and non-multiplatform cases for a while to make testing easier and give time to migrate.
Cheers,
/ magnus
RFC PATCH v2 15/17 ARM: shmobile: Remove non-multiplatform Marzen reference support
Hi Magnus,
Quoted 22 lines · On Wednesday 27 November 2013 17:51:16 Magnus Damm wrote:
Quoted 13 lines · Simon Horman
Now that r8a7779 has CCF support remove the legacy Marzen reference
KconfigbitsCONFIG_MACH_MARZEN_REFERENCEfor the non-multiplatform case.Starting from this commit Marzen board support is always enabled via
CONFIG_MACH_MARZEN, andCONFIG_ARCH_MULTIPLATFORMis used to select betweenboard-marzen.candboard-marzen-reference.cThe file
board-marzen-reference.ccan no longer be used together with the legacy sh-clk clock framework, instead CCF is used.Based on work for the Koelsch board by Laurent Pinchart.
Quoted 7 lines
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>---
v2
* Correct changelog to refer to marzen instead of koelsch
* Do not add typo toMakefile
Quoted 5 lines
I think we need to discuss _when_ to do this in more detail. I know this follows the same style as Laurent's patches, but I don't think we're ready to flip the switch yet. I propose that we let DT reference coexist with multiplatform and non-multiplatform cases for a while to make testing easier and give time to migrate.
I understand your point, but as I've stated in a private e-mail, I believe that having three platforms (DT reference with and without multiplatform, and legacy) for each board is a step backward. It will be error-prone and time consuming.
Signature · 3 lines
Regards, Laurent Pinchart
RFC PATCH v2 15/17 ARM: shmobile: Remove non-multiplatform Marzen reference support
In reply to Magnus DammQuoted 23 lines · Magnus Damm
Quoted 13 lines · Simon Horman
Now that r8a7779 has CCF support remove the legacy Marzen reference
KconfigbitsCONFIG_MACH_MARZEN_REFERENCEfor the non-multiplatform case.Starting from this commit Marzen board support is always enabled via
CONFIG_MACH_MARZEN, andCONFIG_ARCH_MULTIPLATFORMis used to select betweenboard-marzen.candboard-marzen-reference.cThe file
board-marzen-reference.ccan no longer be used together with the legacy sh-clk clock framework, instead CCF is used.Based on work for the Koelsch board by Laurent Pinchart.
Quoted 7 lines
Cc Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>---
v2
* Correct changelog to refer to marzen instead of koelsch
* Do not add typo toMakefile
Quoted 5 lines
I think we need to discuss _when_ to do this in more detail. I know this follows the same style as Laurent's patches, but I don't think we're ready to flip the switch yet. I propose that we let DT reference coexist with multiplatform and non-multiplatform cases for a while to make testing easier and give time to migrate.
Yes, I agree this needs to be discussed.
RFC PATCH v2 16/17 ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB
In reply to Simon HormanLet the multiplatform Marzen support boot with the legacy DTS for Marzen as well as the Marzen reference DTS.
Based on work for the Koelsch board by Laurent Pinchart.
---
v2
* Remove spurious change to board-koelsch-reference.c
--- arch/arm/boot/dts/Makefile | 2 +- arch/arm/mach-shmobile/board-marzen-reference.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/Makefile +1 -1
@@ -216,7 +216,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \ sh7372-mackerel.dtb dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ r7s72100-genmai-reference.dtb \ - r8a7779-marzen-reference.dtb \ + r8a7779-marzen.dtb \ r8a7791-koelsch-reference.dtb dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \ socfpga_vt.dtb
arch/arm/mach-shmobile/board-marzen-reference.c +1 -0
@@ -73,6 +73,7 @@ static void __init marzen_init(void) }static const char *marzen_boards_compat_dt[]__initdata = { +"renesas,marzen" ,"renesas,marzen-reference" ,NULL , };
Signature · 1 line
1.8.4
RFC PATCH v2 17/17 ARM: shmobile: Remove Marzen reference DTS
In reply to Simon HormanNow that the DTS file r8a7790-marzen.dts can be used with board-marzen.c and board-marzen-reference.c, proceed with removing r8a7790-marzen-reference.dts.
Based on work for the Koelsch board by Laurent Pinchart.
--- arch/arm/boot/dts/r8a7779-marzen-reference.dts | 110 ------------------------- 1 file changed, 110 deletions(-) delete mode 100644 arch/arm/boot/dts/r8a7779-marzen-reference.dts
arch/arm/boot/dts/r8a7779-marzen-reference.dts deleted +0 -110
@@ -1,110 +0,0 @@ -/* - * Reference Device Tree Source for the Marzen board - * - * Copyright (C) 2013 Renesas Solutions Corp. - * Copyright (C) 2013 Simon Horman - * - * 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 "r8a7779.dtsi" -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/interrupt-controller/irq.h> - -/ { - model = "marzen"; - compatible = "renesas,marzen-reference", "renesas,r8a7779"; - - chosen { - bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on rw"; - }; - - memory { - device_type = "memory"; - reg = <0x60000000 0x40000000>; - }; - - 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; - }; - - lan0 at 18000000 { - compatible = "smsc,lan9220", "smsc,lan9115"; - reg = <0x18000000 0x100>; - pinctrl-0 = <&lan0_pins>; - pinctrl-names = "default"; - - phy-mode = "mii"; - interrupt-parent = <&irqpin0>; - interrupts = <1 IRQ_TYPE_EDGE_FALLING>; - reg-io-width = <4>; - vddvario-supply = <&fixedregulator3v3>; - vdd33a-supply = <&fixedregulator3v3>; - }; - - leds { - compatible = "gpio-leds"; - led2 { - gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; - }; - led3 { - gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; - }; - led4 { - gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; - }; - }; -}; - -&irqpin0 { - status = "okay"; -}; - -&pfc { - pinctrl-0 = <&scif2_pins &scif4_pins>; - pinctrl-names = "default"; - - lan0_pins: lan0 { - intc { - renesas,groups = "intc_irq1_b"; - renesas,function = "intc"; - }; - lbsc { - renesas,groups = "lbsc_ex_cs0"; - renesas,function = "lbsc"; - }; - }; - - scif2_pins: serial2 { - renesas,groups = "scif2_data_c"; - renesas,function = "scif2"; - }; - - scif4_pins: serial4 { - renesas,groups = "scif4_data"; - renesas,function = "scif4"; - }; - - sdhi0_pins: sd0 { - renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", - "sdhi0_wp"; - renesas,function = "sdhi0"; - }; -}; - -&sdhi0 { - pinctrl-0 = <&sdhi0_pins>; - pinctrl-names = "default"; - - vmmc-supply = <&fixedregulator3v3>; - bus-width = <4>; - status = "okay"; -};
Signature · 1 line
1.8.4