Renesas ARM Based SoC Boards Updates for v3.16

r8a7791 (R-Car M2) based Koelsch board
 * Enable Quad SPI transfers for the SPI FLASH
 * Clock workarounds for Ether, I2C, MSIOF, Quad SPI and SDHI
 * Use shmobile_clk_workaround()
 
 r8a7790 (R-Car H2) based Lager board
 * Enable Quad SPI transfers for the SPI FLASH
 * Switch to use dai info for R-Car sound
 * Clock workarounds for Ether, MSIOF, MMCIF, Quad SPI and SDHI
 * Use shmobile_clk_workaround()
 
 r8a7778 (R-Car M1) based Bock-W board
 * Switch to use dai info for R-Car sound
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJTUFdsAAoJENfPZGlqN0++5uwP/3rxeWGp+SsD/RMiXC1Iydtt
 5H+EBUz5AEGKdWs/3ce6QsbvztO/9/uDNU4oqG35bwpRDfy3wiKph2I7Ulh17WVC
 2LyAqGOtNWOm4MWQ0DZfuPpSOjAhXnzsX+nVD6S2zk4hVvQxyxzvRKW0ANm2GunX
 yBFWk1pR6UArJinEAr2lWTso0mvSct0RYY8SjbtWhV3QJHbV0L4jLCVZGjvwNT1l
 omkvsE1xMbTBqdsxxlh+IR+yJLQIh/dd88ULY563Ljr5DSe0LVgTVZBN78hKaXWO
 68O4wnqV6jHEIRmnF4AqbYTiE79H6PN2SgwwPuugb8V2NKhD629xnC9O/FNJg/zC
 Mp0hyjQxd6sqaXwOk2316iCmrW4WhfqMCc+4TvHKe4m2yiE53iBXApLC7ulV6GpB
 Vm+4ZXQiuGXfs13UiQ2a/KLa4zOSuRIsy2kk4YyTKIAm6t4xatMTbcPigG4BYeNT
 QbdiugcdQAS02jbGx5AUhKeVjpHvCdW+bB0m8XbEgOYlMl7THQD5gQzIGfDpihFa
 0pinm6TJkeYAciTO5ggqx01v4BkZw9HrcCd3FY1VLkMdgnGbwPCrdSOuQBKDlFWp
 cjpCH317b1y8gvDD7e7MD/8PmyqzeiK0e5AHyFcAS6mPLrA1uGnji+6UzYmfIc63
 i5/GSuIeZKD78/roM5Zu
 =GATq
 -----END PGP SIGNATURE-----

Merge tag 'renesas-boards-for-v3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards

Merge "Renesas ARM Based SoC Boards Updates for v3.16" from Simon Horman:

r8a7791 (R-Car M2) based Koelsch board
* Enable Quad SPI transfers for the SPI FLASH
* Clock workarounds for Ether, I2C, MSIOF, Quad SPI and SDHI
* Use shmobile_clk_workaround()

r8a7790 (R-Car H2) based Lager board
* Enable Quad SPI transfers for the SPI FLASH
* Switch to use dai info for R-Car sound
* Clock workarounds for Ether, MSIOF, MMCIF, Quad SPI and SDHI
* Use shmobile_clk_workaround()

r8a7778 (R-Car M1) based Bock-W board
* Switch to use dai info for R-Car sound

* tag 'renesas-boards-for-v3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: lager legacy: Enable Quad SPI transfers for the SPI FLASH
  ARM: shmobile: koelsch legacy: Enable Quad SPI transfers for the SPI FLASH
  ARM: shmobile: lager: switch to use dai info for R-Car sound
  ARM: shmobile: bockw: switch to use dai info for R-Car sound
  ARM: shmobile: bockw: remove old style audio clock
  ARM: shmobile: Add Koelsch clock workarounds for SDHI
  ARM: shmobile: Add Lager clock workarounds for SDHI and MMCIF
  ARM: shmobile: lager-reference: Work around core clock issues
  ARM: shmobile: koelsch-reference: Annotate clk_enables as __initconst
  ARM: shmobile: koelsch-reference: Work around core clock issues
  ARM: shmobile: lager: Annotate clk_names with __initconst
  ARM: shmobile: koelsch: Annotate clk_names with __initconst
  ARM: shmobile: Use shmobile_clk_workaround() on Koelsch
  ARM: shmobile: Use shmobile_clk_workaround() on Lager

Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
Olof Johansson 2014-05-05 14:14:29 -07:00
commit 71e878fed8
5 changed files with 142 additions and 117 deletions

View File

@ -345,24 +345,39 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = {
RSND_SSI_UNUSED, /* SSI 0 */
RSND_SSI_UNUSED, /* SSI 1 */
RSND_SSI_UNUSED, /* SSI 2 */
RSND_SSI_SET(1, HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), RSND_SSI_PLAY),
RSND_SSI_SET(2, HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), RSND_SSI_PLAY),
RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0),
RSND_SSI_SET(3, HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), RSND_SSI_PLAY),
RSND_SSI_SET(4, HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
RSND_SSI(HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), 0),
RSND_SSI(HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
RSND_SSI(HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), 0),
RSND_SSI(HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0),
RSND_SSI(HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), 0),
RSND_SSI(HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
};
static struct rsnd_scu_platform_info rsnd_scu[9] = {
{ .flags = 0, }, /* SRU 0 */
{ .flags = 0, }, /* SRU 1 */
{ .flags = 0, }, /* SRU 2 */
{ .flags = RSND_SCU_USE_HPBIF, },
{ .flags = RSND_SCU_USE_HPBIF, },
{ .flags = RSND_SCU_USE_HPBIF, },
{ .flags = RSND_SCU_USE_HPBIF, },
{ .flags = RSND_SCU_USE_HPBIF, },
{ .flags = RSND_SCU_USE_HPBIF, },
static struct rsnd_src_platform_info rsnd_src[9] = {
RSND_SRC_UNUSED, /* SRU 0 */
RSND_SRC_UNUSED, /* SRU 1 */
RSND_SRC_UNUSED, /* SRU 2 */
RSND_SRC(0, 0),
RSND_SRC(0, 0),
RSND_SRC(0, 0),
RSND_SRC(0, 0),
RSND_SRC(0, 0),
RSND_SRC(0, 0),
};
static struct rsnd_dai_platform_info rsnd_dai[] = {
{
.playback = { .ssi = &rsnd_ssi[5], .src = &rsnd_src[5] },
.capture = { .ssi = &rsnd_ssi[6], .src = &rsnd_src[6] },
}, {
.playback = { .ssi = &rsnd_ssi[3], .src = &rsnd_src[3] },
}, {
.capture = { .ssi = &rsnd_ssi[4], .src = &rsnd_src[4] },
}, {
.playback = { .ssi = &rsnd_ssi[7], .src = &rsnd_src[7] },
}, {
.capture = { .ssi = &rsnd_ssi[8], .src = &rsnd_src[8] },
},
};
enum {
@ -437,8 +452,10 @@ static struct rcar_snd_info rsnd_info = {
.flags = RSND_GEN1,
.ssi_info = rsnd_ssi,
.ssi_info_nr = ARRAY_SIZE(rsnd_ssi),
.scu_info = rsnd_scu,
.scu_info_nr = ARRAY_SIZE(rsnd_scu),
.src_info = rsnd_src,
.src_info_nr = ARRAY_SIZE(rsnd_src),
.dai_info = rsnd_dai,
.dai_info_nr = ARRAY_SIZE(rsnd_dai),
.start = rsnd_start,
.stop = rsnd_stop,
};
@ -591,6 +608,7 @@ static void __init bockw_init(void)
{
void __iomem *base;
struct clk *clk;
struct platform_device *pdev;
int i;
r8a7778_clock_init();
@ -673,9 +691,6 @@ static void __init bockw_init(void)
}
/* for Audio */
clk = clk_get(NULL, "audio_clk_b");
clk_set_rate(clk, 24576000);
clk_put(clk);
rsnd_codec_power(5, 1); /* enable ak4642 */
platform_device_register_simple(
@ -684,11 +699,15 @@ static void __init bockw_init(void)
platform_device_register_simple(
"ak4554-adc-dac", 1, NULL, 0);
platform_device_register_resndata(
pdev = platform_device_register_resndata(
&platform_bus, "rcar_sound", -1,
rsnd_resources, ARRAY_SIZE(rsnd_resources),
&rsnd_info, sizeof(rsnd_info));
clk = clk_get(&pdev->dev, "clk_b");
clk_set_rate(clk, 24576000);
clk_put(clk);
for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) {
struct platform_device_info cardinfo = {
.parent = &platform_bus,

View File

@ -19,12 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/of_platform.h>
#include <linux/platform_data/rcar-du.h>
#include <mach/clock.h>
#include <mach/common.h>
#include <mach/irqs.h>
#include <mach/rcar-gen2.h>
@ -82,49 +81,50 @@ static void __init koelsch_add_du_device(void)
platform_device_register_full(&info);
}
/*
* This is a really crude hack to provide clkdev support to platform
* devices until they get moved to DT.
*/
static const struct clk_name clk_names[] __initconst = {
{ "cmt0", NULL, "sh_cmt.0" },
{ "scifa0", NULL, "sh-sci.0" },
{ "scifa1", NULL, "sh-sci.1" },
{ "scifb0", NULL, "sh-sci.2" },
{ "scifb1", NULL, "sh-sci.3" },
{ "scifb2", NULL, "sh-sci.4" },
{ "scifa2", NULL, "sh-sci.5" },
{ "scif0", NULL, "sh-sci.6" },
{ "scif1", NULL, "sh-sci.7" },
{ "scif2", NULL, "sh-sci.8" },
{ "scif3", NULL, "sh-sci.9" },
{ "scif4", NULL, "sh-sci.10" },
{ "scif5", NULL, "sh-sci.11" },
{ "scifa3", NULL, "sh-sci.12" },
{ "scifa4", NULL, "sh-sci.13" },
{ "scifa5", NULL, "sh-sci.14" },
{ "du0", "du.0", "rcar-du-r8a7791" },
{ "du1", "du.1", "rcar-du-r8a7791" },
{ "lvds0", "lvds.0", "rcar-du-r8a7791" },
};
/*
* This is a really crude hack to work around core platform clock issues
*/
static const struct clk_name clk_enables[] __initconst = {
{ "ether", NULL, "ee700000.ethernet" },
{ "i2c2", NULL, "e6530000.i2c" },
{ "msiof0", NULL, "e6e20000.spi" },
{ "qspi_mod", NULL, "e6b10000.spi" },
{ "sdhi0", NULL, "ee100000.sd" },
{ "sdhi1", NULL, "ee140000.sd" },
{ "sdhi2", NULL, "ee160000.sd" },
{ "thermal", NULL, "e61f0000.thermal" },
};
static void __init koelsch_add_standard_devices(void)
{
/*
* This is a really crude hack to provide clkdev support to the CMT and
* DU devices until they get moved to DT.
*/
static const struct clk_name {
const char *clk;
const char *con_id;
const char *dev_id;
} clk_names[] = {
{ "cmt0", NULL, "sh_cmt.0" },
{ "scifa0", NULL, "sh-sci.0" },
{ "scifa1", NULL, "sh-sci.1" },
{ "scifb0", NULL, "sh-sci.2" },
{ "scifb1", NULL, "sh-sci.3" },
{ "scifb2", NULL, "sh-sci.4" },
{ "scifa2", NULL, "sh-sci.5" },
{ "scif0", NULL, "sh-sci.6" },
{ "scif1", NULL, "sh-sci.7" },
{ "scif2", NULL, "sh-sci.8" },
{ "scif3", NULL, "sh-sci.9" },
{ "scif4", NULL, "sh-sci.10" },
{ "scif5", NULL, "sh-sci.11" },
{ "scifa3", NULL, "sh-sci.12" },
{ "scifa4", NULL, "sh-sci.13" },
{ "scifa5", NULL, "sh-sci.14" },
{ "du0", "du.0", "rcar-du-r8a7791" },
{ "du1", "du.1", "rcar-du-r8a7791" },
{ "lvds0", "lvds.0", "rcar-du-r8a7791" },
};
struct clk *clk;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
clk = clk_get(NULL, clk_names[i].clk);
if (!IS_ERR(clk)) {
clk_register_clkdev(clk, clk_names[i].con_id,
clk_names[i].dev_id);
clk_put(clk);
}
}
shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
r8a7791_add_dt_devices();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

View File

@ -216,7 +216,7 @@ static const struct spi_board_info spi_info[] __initconst = {
{
.modalias = "m25p80",
.platform_data = &spi_flash_data,
.mode = SPI_MODE_0,
.mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
.max_speed_hz = 30000000,
.bus_num = 0,
.chip_select = 0,

View File

@ -18,12 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/dma-mapping.h>
#include <linux/init.h>
#include <linux/of_platform.h>
#include <linux/platform_data/rcar-du.h>
#include <mach/clock.h>
#include <mach/common.h>
#include <mach/irqs.h>
#include <mach/rcar-gen2.h>
@ -86,46 +85,46 @@ static void __init lager_add_du_device(void)
platform_device_register_full(&info);
}
/*
* This is a really crude hack to provide clkdev support to platform
* devices until they get moved to DT.
*/
static const struct clk_name clk_names[] __initconst = {
{ "cmt0", NULL, "sh_cmt.0" },
{ "scifa0", NULL, "sh-sci.0" },
{ "scifa1", NULL, "sh-sci.1" },
{ "scifb0", NULL, "sh-sci.2" },
{ "scifb1", NULL, "sh-sci.3" },
{ "scifb2", NULL, "sh-sci.4" },
{ "scifa2", NULL, "sh-sci.5" },
{ "scif0", NULL, "sh-sci.6" },
{ "scif1", NULL, "sh-sci.7" },
{ "hscif0", NULL, "sh-sci.8" },
{ "hscif1", NULL, "sh-sci.9" },
{ "du0", "du.0", "rcar-du-r8a7790" },
{ "du1", "du.1", "rcar-du-r8a7790" },
{ "du2", "du.2", "rcar-du-r8a7790" },
{ "lvds0", "lvds.0", "rcar-du-r8a7790" },
{ "lvds1", "lvds.1", "rcar-du-r8a7790" },
};
/*
* This is a really crude hack to work around core platform clock issues
*/
static const struct clk_name clk_enables[] __initconst = {
{ "ether", NULL, "ee700000.ethernet" },
{ "msiof1", NULL, "e6e10000.spi" },
{ "mmcif1", NULL, "ee220000.mmc" },
{ "qspi_mod", NULL, "e6b10000.spi" },
{ "sdhi0", NULL, "ee100000.sd" },
{ "sdhi2", NULL, "ee140000.sd" },
{ "thermal", NULL, "e61f0000.thermal" },
};
static void __init lager_add_standard_devices(void)
{
/*
* This is a really crude hack to provide clkdev support to platform
* devices until they get moved to DT.
*/
static const struct clk_name {
const char *clk;
const char *con_id;
const char *dev_id;
} clk_names[] = {
{ "cmt0", NULL, "sh_cmt.0" },
{ "scifa0", NULL, "sh-sci.0" },
{ "scifa1", NULL, "sh-sci.1" },
{ "scifb0", NULL, "sh-sci.2" },
{ "scifb1", NULL, "sh-sci.3" },
{ "scifb2", NULL, "sh-sci.4" },
{ "scifa2", NULL, "sh-sci.5" },
{ "scif0", NULL, "sh-sci.6" },
{ "scif1", NULL, "sh-sci.7" },
{ "hscif0", NULL, "sh-sci.8" },
{ "hscif1", NULL, "sh-sci.9" },
{ "du0", "du.0", "rcar-du-r8a7790" },
{ "du1", "du.1", "rcar-du-r8a7790" },
{ "du2", "du.2", "rcar-du-r8a7790" },
{ "lvds0", "lvds.0", "rcar-du-r8a7790" },
{ "lvds1", "lvds.1", "rcar-du-r8a7790" },
};
struct clk *clk;
unsigned int i;
for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
clk = clk_get(NULL, clk_names[i].clk);
if (!IS_ERR(clk)) {
clk_register_clkdev(clk, clk_names[i].con_id,
clk_names[i].dev_id);
clk_put(clk);
}
}
shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
r8a7790_add_dt_devices();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

View File

@ -325,12 +325,12 @@ static const struct rspi_plat_data qspi_pdata __initconst = {
static const struct spi_board_info spi_info[] __initconst = {
{
.modalias = "m25p80",
.platform_data = &spi_flash_data,
.mode = SPI_MODE_0,
.max_speed_hz = 30000000,
.bus_num = 0,
.chip_select = 0,
.modalias = "m25p80",
.platform_data = &spi_flash_data,
.mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
.max_speed_hz = 30000000,
.bus_num = 0,
.chip_select = 0,
},
};
@ -567,20 +567,27 @@ static struct resource rsnd_resources[] __initdata = {
};
static struct rsnd_ssi_platform_info rsnd_ssi[] = {
RSND_SSI_SET(0, 0, gic_spi(370), RSND_SSI_PLAY),
RSND_SSI_SET(0, 0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE),
RSND_SSI(0, gic_spi(370), 0),
RSND_SSI(0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE),
};
static struct rsnd_scu_platform_info rsnd_scu[2] = {
static struct rsnd_src_platform_info rsnd_src[2] = {
/* no member at this point */
};
static struct rsnd_dai_platform_info rsnd_dai = {
.playback = { .ssi = &rsnd_ssi[0], },
.capture = { .ssi = &rsnd_ssi[1], },
};
static struct rcar_snd_info rsnd_info = {
.flags = RSND_GEN2,
.ssi_info = rsnd_ssi,
.ssi_info_nr = ARRAY_SIZE(rsnd_ssi),
.scu_info = rsnd_scu,
.scu_info_nr = ARRAY_SIZE(rsnd_scu),
.src_info = rsnd_src,
.src_info_nr = ARRAY_SIZE(rsnd_src),
.dai_info = &rsnd_dai,
.dai_info_nr = 1,
};
static struct asoc_simple_card_info rsnd_card_info = {