ARM: shmobile: MSIOF integration on r8a7790/lager and r8a7791/koelsch
Subsystems (5)
v2 cover ARM: shmobile: MSIOF integration on r8a7790/lager and r8a7791/koelsch
Hi Simon, Magnus,
This patch series integrates support for the MSIOF module in the Renesas R-Car H2 (r8a7790) and M2 (r8a7791) SoCs on the Lager and Koelsch development boards.
It was tested on Lager and Koelsch, both legacy and DT, using a dummy driver for the Renesas r2a11302ft PMIC that reads out the PMIC's version ID.
[01/11] ARM: shmobile: r8a7790: Add MSIOF clocks
[02/11] ARM: shmobile: r8a7791: Add MSIOF clocks
[03/11] ARM: shmobile: lager legacy: Add MSIOF support [04/11] ARM: shmobile: koelsch legacy: Add MSIOF support [05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
These are (reworked versions of) the remaining patches not taken from v1. Changelogs are available in the individual patches.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
PATCH v2 1/11 ARM: shmobile: r8a7790: Add MSIOF clocks
From: Geert Uytterhoeven <[email protected]>
Add clocks for MSIOF0, 1, 2, and 3.DEV_ID is 1-based for compatibility with the BSP, as QSPI uses zero.
---
v2:
- No changes
arch/arm/mach-shmobile/clock-r8a7790.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/clock-r8a7790.c +13 -1
@@ -46,6 +46,7 @@#define CPG_BASE 0xe6150000#define CPG_LEN 0x1000 +#define SMSTPCR0 0xe6150130#define SMSTPCR1 0xe6150134#define SMSTPCR2 0xe6150138#define SMSTPCR3 0xe615013c
@@ -55,6 +56,7 @@#define SMSTPCR9 0xe6150994#define SMSTPCR10 0xe6150998 +#define MSTPSR0 IOMEM(0xe6150030)#define MSTPSR1 IOMEM(0xe6150038)#define MSTPSR2 IOMEM(0xe6150040)#define MSTPSR3 IOMEM(0xe6150048)
@@ -221,8 +223,10 @@ enum {MSTP522 ,MSTP502 ,MSTP501 ,MSTP315 ,MSTP314 ,MSTP313 ,MSTP312 ,MSTP311 ,MSTP305 ,MSTP304 , -MSTP216 ,MSTP207 ,MSTP206 ,MSTP204 ,MSTP203 ,MSTP202 , +MSTP216 ,MSTP215 ,MSTP208 ,MSTP207 ,MSTP206 ,MSTP205 ,MSTP204 ,MSTP203 , +MSTP202 ,MSTP124 , +MSTP000 ,MSTP_NR };
@@ -283,12 +287,16 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP305] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_MMC1], SMSTPCR3, 5, MSTPSR3, 0), /* MMC1 */ [MSTP304] = SH_CLK_MSTP32_STS(&cp_clk, SMSTPCR3, 4, MSTPSR3, 0), /* TPU0 */ [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */ + [MSTP215] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 15, MSTPSR2, 0), /* MSIOF3 */ + [MSTP208] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 8, MSTPSR2, 0), /* MSIOF1 */ [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */ [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */ + [MSTP205] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 5, MSTPSR2, 0), /* MSIOF2 */ [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */ [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */ [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */ [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */ + [MSTP000] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR0, 0, MSTPSR0, 0), /* MSIOF0 */ };static struct clk_lookup lookups[] = {
@@ -363,6 +371,10 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh_mmcif.1" , &mstp_clks[MSTP305 ]),CLKDEV_DEV_ID ("sh_cmt.0" , &mstp_clks[MSTP124 ]),CLKDEV_DEV_ID ("qspi.0" , &mstp_clks[MSTP917 ]), +CLKDEV_DEV_ID ("spi_r8a7790_msiof.1" , &mstp_clks[MSTP000 ]), +CLKDEV_DEV_ID ("spi_r8a7790_msiof.2" , &mstp_clks[MSTP208 ]), +CLKDEV_DEV_ID ("spi_r8a7790_msiof.3" , &mstp_clks[MSTP205 ]), +CLKDEV_DEV_ID ("spi_r8a7790_msiof.4" , &mstp_clks[MSTP215 ]),CLKDEV_DEV_ID ("renesas_usbhs" , &mstp_clks[MSTP704 ]),CLKDEV_DEV_ID ("pci-rcar-gen2.0" , &mstp_clks[MSTP703 ]), CLKDEV_DEV_ID("pci-rcar-gen2.1", &mstp_clks[MSTP703]),
Signature · 1 line
1.7.9.5
PATCH v2 2/11 ARM: shmobile: r8a7791: Add MSIOF clocks
In reply to Geert UytterhoevenFrom: Takashi Yoshii <[email protected]>
Add clocks for MSIOF0, 1, and 2.DEV_ID is 1-based for compatibility with the BSP, as QSPI uses zero.
[geert] Updated for change from SH_CLK_MSTP32() to SH_CLK_MSTP32_STS() [geert] Updated for new platform device name
---
v2:
- No changes
arch/arm/mach-shmobile/clock-r8a7791.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/clock-r8a7791.c +9 -1
@@ -59,6 +59,7 @@#define SMSTPCR10 0xE6150998#define SMSTPCR11 0xE615099C +#define MSTPSR0 IOMEM(0xe6150030)#define MSTPSR1 IOMEM(0xe6150038)#define MSTPSR2 IOMEM(0xe6150040)#define MSTPSR3 IOMEM(0xe6150048)
@@ -179,9 +180,10 @@ enum {MSTP719 ,MSTP718 ,MSTP715 ,MSTP714 ,MSTP522 ,MSTP314 ,MSTP312 ,MSTP311 , -MSTP216 ,MSTP207 ,MSTP206 , +MSTP216 ,MSTP208 ,MSTP207 ,MSTP206 ,MSTP205 ,MSTP204 ,MSTP203 ,MSTP202 ,MSTP1105 ,MSTP1106 ,MSTP1107 ,MSTP124 , +MSTP000 ,MSTP_NR };
@@ -213,8 +215,10 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP312] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD1], SMSTPCR3, 12, MSTPSR3, 0), /* SDHI1 */ [MSTP311] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD2], SMSTPCR3, 11, MSTPSR3, 0), /* SDHI2 */ [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */ + [MSTP208] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 8, MSTPSR2, 0), /* MSIOF1 */ [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */ [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */ + [MSTP205] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 5, MSTPSR2, 0), /* MSIOF2 */ [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */ [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */ [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */
@@ -222,6 +226,7 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA4 */ [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA5 */ [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */ + [MSTP000] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR0, 0, MSTPSR0, 0), /* MSIOF0 */ };static struct clk_lookup lookups[] = {
@@ -267,6 +272,9 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh_mobile_sdhi.2" , &mstp_clks[MSTP311 ]),CLKDEV_DEV_ID ("sh_cmt.0" , &mstp_clks[MSTP124 ]),CLKDEV_DEV_ID ("qspi.0" , &mstp_clks[MSTP917 ]), +CLKDEV_DEV_ID ("spi_r8a7791_msiof.1" , &mstp_clks[MSTP000 ]), +CLKDEV_DEV_ID ("spi_r8a7791_msiof.2" , &mstp_clks[MSTP208 ]), +CLKDEV_DEV_ID ("spi_r8a7791_msiof.3" , &mstp_clks[MSTP205 ]),CLKDEV_DEV_ID ("rcar_thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("i2c-rcar_gen2.0" , &mstp_clks[MSTP931 ]), CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]),
Signature · 1 line
1.7.9.5
PATCH v2 3/11 ARM: shmobile: lager legacy: Add MSIOF support
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
Add MSIOF resources, platform data, platform device, pinctrl, and SPI child device.
- Only MSIOF1 is in use, and thus registered. Its bus contains a single
device (a Renesas R2A11302FT PMIC).
- Platform device numbering is 1-based for compatibility with the BSP, as QSPI uses zero, so MSIOF1's device name is "spi_r8a7790_msiof.2".
---
v2:
- Removed resources for unused MSIOF channels.
arch/arm/mach-shmobile/board-lager.c | 46 +++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-)
arch/arm/mach-shmobile/board-lager.c +40 -6
@@ -55,6 +55,7 @@#include <linux/mtd/mtd.h> #include <linux/spi/flash.h> #include <linux/spi/rspi.h> +#include <linux/spi/sh_msiof.h> #include <linux/spi/spi.h> #include <sound/rcar_snd.h> #include <sound/simple_card.h>
@@ -287,6 +288,17 @@ static const struct platform_device_info ether_info __initconst = { .dma_mask = DMA_BIT_MASK(32), }; +/* MSIOF1 */ +static const struct resource sh_msiof1_resources[]__initconst = { +DEFINE_RES_MEM (0xe6e10000 ,0x0064 ), +DEFINE_RES_IRQ (gic_spi (157 )), +}; + +static const struct sh_msiof_spi_info sh_msiof_info__initconst = { + .rx_fifo_override =256 , + .num_chipselect =1 , +}; +/* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */ static struct mtd_partition spi_flash_part[] = {/* Reserved for user loader program, read-only */
@@ -325,12 +337,19 @@ 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 , + .max_speed_hz =30000000 , + .bus_num =0 , + .chip_select =0 , + }, { + .modalias ="r2a1130x" , + .max_speed_hz =6000000 , + .chip_select =0 , + .bus_num =2 , + .mode =SPI_MODE_3 , + .controller_data = (void *)-ENOENT ,/* HW controlled CS */ }, };
@@ -703,6 +722,15 @@ static const struct pinctrl_map lager_pinctrl_map[] = {/* I2C2 */ PIN_MAP_MUX_GROUP_DEFAULT ("i2c-rcar.2" ,"pfc-r8a7790" ,"i2c2" ,"i2c2" ), +/* MSIOF1 */ +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7790_msiof.2" ,"pfc-r8a7790" , +"msiof1_clk" ,"msiof1" ), +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7790_msiof.2" ,"pfc-r8a7790" , +"msiof1_sync" ,"msiof1" ), +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7790_msiof.2" ,"pfc-r8a7790" , +"msiof1_rx" ,"msiof1" ), +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7790_msiof.2" ,"pfc-r8a7790" , +"msiof1_tx" ,"msiof1" ),/* QSPI */ PIN_MAP_MUX_GROUP_DEFAULT ("qspi.0" ,"pfc-r8a7790" , "qspi_ctrl", "qspi"),
@@ -811,6 +839,12 @@ static void __init lager_add_standard_devices(void) qspi_resources,ARRAY_SIZE (qspi_resources), &qspi_pdata, sizeof(qspi_pdata)); +platform_device_register_resndata (&platform_bus,"spi_r8a7790_msiof" , +1 +1 , sh_msiof1_resources, +ARRAY_SIZE (sh_msiof1_resources), + &sh_msiof_info, +sizeof (struct sh_msiof_spi_info )); +spi_register_board_info (spi_info,ARRAY_SIZE (spi_info)); platform_device_register_data(&platform_bus, "reg-fixed-voltage", fixed_regulator_idx++,
Signature · 1 line
1.7.9.5
PATCH v2 4/11 ARM: shmobile: koelsch legacy: Add MSIOF support
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
Add MSIOF resources, platform data, platform device, pinctrl, and SPI child device.
- Only MSIOF0 is in use, and thus registered. Its bus contains a single
device (a Renesas R2A11302FT PMIC).
- Platform device numbering is 1-based for compatibility with the BSP, as QSPI uses zero, so MSIOF0's device name is "spi_r8a7791_msiof.1".
Based on patches from Takashi Yoshii <[email protected]>
---
v2:
- Removed resources for unused MSIOF channels.
arch/arm/mach-shmobile/board-koelsch.c | 46 +++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-)
arch/arm/mach-shmobile/board-koelsch.c +40 -6
@@ -44,6 +44,7 @@#include <linux/sh_eth.h> #include <linux/spi/flash.h> #include <linux/spi/rspi.h> +#include <linux/spi/sh_msiof.h> #include <linux/spi/spi.h> #include <mach/common.h> #include <mach/irqs.h>
@@ -184,6 +185,17 @@ static const struct rspi_plat_data qspi_pdata __initconst = { .num_chipselect = 1, }; +/* MSIOF0 */ +static const struct resource sh_msiof0_resources[]__initconst = { +DEFINE_RES_MEM (0xe6e20000 ,0x0064 ), +DEFINE_RES_IRQ (gic_spi (156 )), +}; + +static const struct sh_msiof_spi_info sh_msiof_info__initconst = { + .rx_fifo_override =256 , + .num_chipselect =1 , +}; +/* SPI Flash memory (Spansion S25FL512SAGMFIG11 64 MiB) */ static struct mtd_partition spi_flash_part[] = { {
@@ -214,12 +226,19 @@ static const struct flash_platform_data spi_flash_data = {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 , + .max_speed_hz =30000000 , + .bus_num =0 , + .chip_select =0 , + }, { + .modalias ="r2a1130x" , + .max_speed_hz =6000000 , + .chip_select =0 , + .bus_num =1 , + .mode =SPI_MODE_3 , + .controller_data = (void *)-ENOENT ,/* HW controlled CS */ }, };
@@ -384,6 +403,15 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = { "eth_rmii", "eth"),PIN_MAP_MUX_GROUP_DEFAULT ("r8a7791-ether" ,"pfc-r8a7791" ,"intc_irq0" ,"intc" ), +/* MSIOF0 */ +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7791_msiof.1" ,"pfc-r8a7791" , +"msiof0_clk" ,"msiof0" ), +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7791_msiof.1" ,"pfc-r8a7791" , +"msiof0_sync" ,"msiof0" ), +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7791_msiof.1" ,"pfc-r8a7791" , +"msiof0_rx" ,"msiof0" ), +PIN_MAP_MUX_GROUP_DEFAULT ("spi_r8a7791_msiof.1" ,"pfc-r8a7791" , +"msiof0_tx" ,"msiof0" ),/* QSPI */ PIN_MAP_MUX_GROUP_DEFAULT ("qspi.0" ,"pfc-r8a7791" , "qspi_ctrl", "qspi"),
@@ -449,6 +477,12 @@ static void __init koelsch_add_standard_devices(void) qspi_resources,ARRAY_SIZE (qspi_resources), &qspi_pdata, sizeof(qspi_pdata)); +platform_device_register_resndata (&platform_bus,"spi_r8a7791_msiof" , +1 +0 , sh_msiof0_resources, +ARRAY_SIZE (sh_msiof0_resources), + &sh_msiof_info, +sizeof (struct sh_msiof_spi_info )); +spi_register_board_info (spi_info,ARRAY_SIZE (spi_info));koelsch_add_du_device ();
Signature · 1 line
1.7.9.5
PATCH v2 5/11 ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add spi0 alias
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
Prepare for the advent of MSIOF SPI, which will be spi1 to spi4.
---
v2:
- No changes
arch/arm/boot/dts/r8a7790-lager.dts | 4 ++-- arch/arm/boot/dts/r8a7790.dtsi | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/boot/dts/r8a7790-lager.dts +2 -2
@@ -155,7 +155,7 @@ renesas,function = "mmc1"; }; - qspi_pins: spi { + qspi_pins: spi0 { renesas,groups = "qspi_ctrl", "qspi_data4"; renesas,function = "qspi"; };
@@ -190,7 +190,7 @@ status = "okay"; }; -&spi { +&qspi { pinctrl-0 = <&qspi_pins>; pinctrl-names = "default";
arch/arm/boot/dts/r8a7790.dtsi +2 -1
@@ -24,6 +24,7 @@ i2c1 = &i2c1; i2c2 = &i2c2; i2c3 = &i2c3; + spi0 = &qspi; }; cpus {
@@ -765,7 +766,7 @@ }; }; - spi: spi at e6b10000 { + qspi: spi at e6b10000 { compatible = "renesas,qspi-r8a7790", "renesas,qspi"; reg = <0 0xe6b10000 0 0x2c>; interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
1.7.9.5
PATCH v2 6/11 ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi, add spi0 alias
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
Prepare for the advent of MSIOF SPI, which will be spi1 to spi3.
---
v2:
- No changes
arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++-- arch/arm/boot/dts/r8a7791.dtsi | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/boot/dts/r8a7791-koelsch.dts +2 -2
@@ -157,7 +157,7 @@ renesas,function = "intc"; }; - qspi_pins: spi { + qspi_pins: spi0 { renesas,groups = "qspi_ctrl", "qspi_data4"; renesas,function = "qspi"; };
@@ -182,7 +182,7 @@ status = "okay"; }; -&spi { +&qspi { pinctrl-0 = <&qspi_pins>; pinctrl-names = "default";
arch/arm/boot/dts/r8a7791.dtsi +2 -1
@@ -27,6 +27,7 @@ i2c3 = &i2c3; i2c4 = &i2c4; i2c5 = &i2c5; + spi0 = &qspi; }; cpus {
@@ -762,7 +763,7 @@ }; }; - spi: spi at e6b10000 { + qspi: spi at e6b10000 { compatible = "renesas,qspi-r8a7791", "renesas,qspi"; reg = <0 0xe6b10000 0 0x2c>; interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
1.7.9.5
PATCH v2 7/11 ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
---
v2:
- Drop "num-cs" and "renesas,rx-fifo-size", as they match the defaults.
arch/arm/boot/dts/r8a7790.dtsi | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+)
arch/arm/boot/dts/r8a7790.dtsi +44 -0
@@ -25,6 +25,10 @@ i2c2 = &i2c2; i2c3 = &i2c3; spi0 = &qspi; + spi1 = &msiof0; + spi2 = &msiof1; + spi3 = &msiof2; + spi4 = &msiof3; }; cpus {
@@ -776,4 +780,44 @@ #size-cells = <0>; status = "disabled"; }; + + msiof0: spi at e6e20000 { + compatible = "renesas,msiof-r8a7790"; + reg = <0 0xe6e20000 0 0x0064>; + interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7790_CLK_MSIOF0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof1: spi at e6e10000 { + compatible = "renesas,msiof-r8a7790"; + reg = <0 0xe6e10000 0 0x0064>; + interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7790_CLK_MSIOF1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof2: spi at e6e00000 { + compatible = "renesas,msiof-r8a7790"; + reg = <0 0xe6e00000 0 0x0064>; + interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7790_CLK_MSIOF2>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof3: spi at e6c90000 { + compatible = "renesas,msiof-r8a7790"; + reg = <0 0xe6c90000 0 0x0064>; + interrupts = <0 159 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7790_CLK_MSIOF3>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; };
Signature · 1 line
1.7.9.5
PATCH v2 8/11 ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
---
v2:
- Drop "num-cs" and "renesas,rx-fifo-size", as they match the defaults.
arch/arm/boot/dts/r8a7791.dtsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +33 -0
@@ -28,6 +28,9 @@ i2c4 = &i2c4; i2c5 = &i2c5; spi0 = &qspi; + spi1 = &msiof0; + spi2 = &msiof1; + spi3 = &msiof2; }; cpus {
@@ -773,4 +776,34 @@ #size-cells = <0>; status = "disabled"; }; + + msiof0: spi at e6e20000 { + compatible = "renesas,msiof-r8a7791"; + reg = <0 0xe6e20000 0 0x0064>; + interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof1: spi at e6e10000 { + compatible = "renesas,msiof-r8a7791"; + reg = <0 0xe6e10000 0 0x0064>; + interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7791_CLK_MSIOF1>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + msiof2: spi at e6e00000 { + compatible = "renesas,msiof-r8a7791"; + reg = <0 0xe6e00000 0 0x0064>; + interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mstp2_clks R8A7791_CLK_MSIOF2>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; };
Signature · 1 line
1.7.9.5
PATCH v2 9/11 ARM: shmobile: lager dts: Add MSIOF nodes
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
Add pinctrl and SPI device for MSIOF on Lager.
On this board, only MSIOF1 is in use. Its bus contains a single device (a Renesas R2A11302FT PMIC), for which no bindings are defined yet.
---
v2:
- No changes
arch/arm/boot/dts/r8a7790-lager.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm/boot/dts/r8a7790-lager.dts +22 -0
@@ -159,6 +159,12 @@ renesas,groups = "qspi_ctrl", "qspi_data4"; renesas,function = "qspi"; }; + + msiof1_pins: spi2 { + renesas,groups = "msiof1_clk", "msiof1_sync", "msiof1_rx", + "msiof1_tx"; + renesas,function = "msiof1"; + }; }; ðer {
@@ -221,6 +227,22 @@ }; }; +&msiof1 { + pinctrl-0 = <&msiof1_pins>; + pinctrl-names = "default"; + + status = "okay"; + + pmic: pmic at 0 { + compatible = "renesas,r2a11302ft"; + reg = <0>; + spi-max-frequency = <6000000>; + spi-cpol; + spi-cpha; + }; + +}; + &sdhi0 { pinctrl-0 = <&sdhi0_pins>; pinctrl-names = "default";
Signature · 1 line
1.7.9.5
PATCH v2 10/11 ARM: shmobile: koelsch dts: Add MSIOF nodes
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
Add pinctrl and SPI device for MSIOF on Koelsch.
On this board, only MSIOF0 is in use. Its bus contains a single device (a Renesas R2A11302FT PMIC), for which no bindings are defined yet.
---
v2:
- No changes
arch/arm/boot/dts/r8a7791-koelsch.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/r8a7791-koelsch.dts +21 -0
@@ -161,6 +161,12 @@ renesas,groups = "qspi_ctrl", "qspi_data4"; renesas,function = "qspi"; }; + + msiof0_pins: spi1 { + renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx", + "msiof0_tx"; + renesas,function = "msiof0"; + }; }; ðer {
@@ -212,3 +218,18 @@ }; }; }; + +&msiof0 { + pinctrl-0 = <&msiof0_pins>; + pinctrl-names = "default"; + + status = "okay"; + + pmic: pmic at 0 { + compatible = "renesas,r2a11302ft"; + reg = <0>; + spi-max-frequency = <6000000>; + spi-cpol; + spi-cpha; + }; +};
Signature · 1 line
1.7.9.5
PATCH v2 11/11 ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
In reply to Geert UytterhoevenFrom: Geert Uytterhoeven <[email protected]>
---
v2:
- No changes
arch/arm/configs/koelsch_defconfig | 1 + arch/arm/configs/lager_defconfig | 1 + arch/arm/configs/shmobile_defconfig | 1 + 3 files changed, 3 insertions(+)
arch/arm/configs/koelsch_defconfig +1 -0
@@ -69,6 +69,7 @@ CONFIG_I2C=y CONFIG_I2C_RCAR=y CONFIG_SPI=y CONFIG_SPI_RSPI=y +CONFIG_SPI_SH_MSIOF=y CONFIG_GPIOLIB=y CONFIG_GPIO_RCAR=y # CONFIG_HWMON is not set
arch/arm/configs/lager_defconfig +1 -0
@@ -90,6 +90,7 @@ CONFIG_I2C_GPIO=y CONFIG_I2C_RCAR=y CONFIG_SPI=y CONFIG_SPI_RSPI=y +CONFIG_SPI_SH_MSIOF=y CONFIG_GPIO_SH_PFC=y CONFIG_GPIOLIB=y CONFIG_GPIO_RCAR=y
arch/arm/configs/shmobile_defconfig +1 -0
@@ -78,6 +78,7 @@ CONFIG_I2C_GPIO=y CONFIG_I2C_RCAR=y CONFIG_SPI=y CONFIG_SPI_RSPI=y +CONFIG_SPI_SH_MSIOF=y CONFIG_GPIO_EM=y CONFIG_GPIO_RCAR=y # CONFIG_HWMON is not set
Signature · 1 line
1.7.9.5
Re: [PATCH v2 11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
Quoted 3 lines · Geert Uytterhoeven
From: Geert Uytterhoeven <[email protected]>
Signed-off-by Geert Uytterhoeven <[email protected]>
Hi Geert,
as discussed elsewhere I have queued up the multiplatform portion of this patch. For reference the patch that I have queued up is as follows.
From: Geert Uytterhoeven <[email protected]>
ARM: shmobile: multiplatform: Enable MSIOF in defconfig
--- arch/arm/configs/shmobile_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/shmobile_defconfig +1 -0
@@ -78,6 +78,7 @@ CONFIG_I2C_GPIO=y CONFIG_I2C_RCAR=y CONFIG_SPI=y CONFIG_SPI_RSPI=y +CONFIG_SPI_SH_MSIOF=y CONFIG_GPIO_EM=y CONFIG_GPIO_RCAR=y # CONFIG_HWMON is not set
Signature · 1 line
1.8.5.2
Quoted 24 lines · Geert Uytterhoeven
Hi Simon, Magnus,
This patch series integrates support for the MSIOF module in the Renesas R-Car H2 (r8a7790) and M2 (r8a7791) SoCs on the Lager and Koelsch development boards.
It was tested on Lager and Koelsch, both legacy and DT, using a dummy driver for the Renesas r2a11302ft PMIC that reads out the PMIC's version ID.
[01/11] ARM: shmobile: r8a7790: Add MSIOF clocks
[02/11] ARM: shmobile: r8a7791: Add MSIOF clocks
[03/11] ARM: shmobile: lager legacy: Add MSIOF support [04/11] ARM: shmobile: koelsch legacy: Add MSIOF support [05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
Quoted 2 lines
These are (reworked versions of) the remaining patches not taken from v1. Changelogs are available in the individual patches.
Hi Geert,
Thanks for your efforts. All these look fine to me.
Exactly what to merge upstream depends on what the ARM SoC maintainers prefer.
Cheers,
/ magnus
Quoted 29 lines · Magnus Damm
Quoted 24 lines · Geert Uytterhoeven
Hi Simon, Magnus,
This patch series integrates support for the MSIOF module in the Renesas R-Car H2 (r8a7790) and M2 (r8a7791) SoCs on the Lager and Koelsch development boards.
It was tested on Lager and Koelsch, both legacy and DT, using a dummy driver for the Renesas r2a11302ft PMIC that reads out the PMIC's version ID.
[01/11] ARM: shmobile: r8a7790: Add MSIOF clocks
[02/11] ARM: shmobile: r8a7791: Add MSIOF clocks
[03/11] ARM: shmobile: lager legacy: Add MSIOF support [04/11] ARM: shmobile: koelsch legacy: Add MSIOF support [05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOFQuoted 2 lines
These are (reworked versions of) the remaining patches not taken from v1. Changelogs are available in the individual patches.
Quoted 7 lines
Hi Geert,
Thanks for your efforts. All these look fine to me.
Acked-by Magnus Damm <[email protected]>Exactly what to merge upstream depends on what the ARM SoC maintainers prefer.
I wonder if for now we could move things forwards by merging the non-legacy code. I think that would mean the following:
[05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
And just the 'multi' portion of:
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
Would that result in working MSIOF support for koelsch and lager when using multiplatform?
Then later, if appropriate, in accordance with discussions with the ARM SoC maintainers, we could merge the remaining changes in this series: the legacy code.
Magnus Damm
maintainerQuoted 50 lines · Simon Horman
Quoted 29 lines · Magnus Damm
Quoted 24 lines · Geert Uytterhoeven
Hi Simon, Magnus,
This patch series integrates support for the MSIOF module in the Renesas R-Car H2 (r8a7790) and M2 (r8a7791) SoCs on the Lager and Koelsch development boards.
It was tested on Lager and Koelsch, both legacy and DT, using a dummy driver for the Renesas r2a11302ft PMIC that reads out the PMIC's version ID.
[01/11] ARM: shmobile: r8a7790: Add MSIOF clocks
[02/11] ARM: shmobile: r8a7791: Add MSIOF clocks
[03/11] ARM: shmobile: lager legacy: Add MSIOF support [04/11] ARM: shmobile: koelsch legacy: Add MSIOF support [05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOFQuoted 2 lines
These are (reworked versions of) the remaining patches not taken from v1. Changelogs are available in the individual patches.
Quoted 7 lines
Hi Geert,
Thanks for your efforts. All these look fine to me.
Acked-by Magnus Damm <[email protected]>Exactly what to merge upstream depends on what the ARM SoC maintainers prefer.
I wonder if for now we could move things forwards by merging the non-legacy code. I think that would mean the following:
[05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
Quoted 7 lines
And just the 'multi' portion of:
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
Would that result in working MSIOF support for koelsch and lager when using multiplatform?
I believe so, but I rely on Geert to point out if this assumption is wrong.
Quoted 3 lines
Then later, if appropriate, in accordance with discussions with the ARM SoC maintainers, we could merge the remaining changes in this series: the legacy code.
Sure, sounds good.
Thanks,
/ magnus
Hi Magnus, Simon,
Quoted 53 lines · Magnus Damm
Quoted 52 lines · Simon Horman
Quoted 29 lines · Magnus Damm
Quoted 24 lines · Geert Uytterhoeven
Hi Simon, Magnus,
This patch series integrates support for the MSIOF module in the Renesas R-Car H2 (r8a7790) and M2 (r8a7791) SoCs on the Lager and Koelsch development boards.
It was tested on Lager and Koelsch, both legacy and DT, using a dummy driver for the Renesas r2a11302ft PMIC that reads out the PMIC's version ID.
[01/11] ARM: shmobile: r8a7790: Add MSIOF clocks
[02/11] ARM: shmobile: r8a7791: Add MSIOF clocks
[03/11] ARM: shmobile: lager legacy: Add MSIOF support [04/11] ARM: shmobile: koelsch legacy: Add MSIOF support [05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOFQuoted 2 lines
These are (reworked versions of) the remaining patches not taken from v1. Changelogs are available in the individual patches.
Quoted 7 lines
Hi Geert,
Thanks for your efforts. All these look fine to me.
Acked-by Magnus Damm <[email protected]>Exactly what to merge upstream depends on what the ARM SoC maintainers prefer.
I wonder if for now we could move things forwards by merging the non-legacy code. I think that would mean the following:
[05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodesAnd just the 'multi' portion of:
Quoted 7 lines
Quoted 5 lines
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
Would that result in working MSIOF support for koelsch and lager when using multiplatform?
I believe so, but I rely on Geert to point out if this assumption is wrong.
Yes, that should work.
Quoted 5 lines
Quoted 3 lines
Then later, if appropriate, in accordance with discussions with the ARM SoC maintainers, we could merge the remaining changes in this series: the legacy code.
Sure, sounds good.
Indeed.
Thanks a lot!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 59 lines · Geert Uytterhoeven
Hi Magnus, Simon,
Quoted 56 lines · Magnus Damm
Quoted 55 lines · Simon Horman
Quoted 29 lines · Magnus Damm
Quoted 24 lines · Geert Uytterhoeven
Hi Simon, Magnus,
This patch series integrates support for the MSIOF module in the Renesas R-Car H2 (r8a7790) and M2 (r8a7791) SoCs on the Lager and Koelsch development boards.
It was tested on Lager and Koelsch, both legacy and DT, using a dummy driver for the Renesas r2a11302ft PMIC that reads out the PMIC's version ID.
[01/11] ARM: shmobile: r8a7790: Add MSIOF clocks
[02/11] ARM: shmobile: r8a7791: Add MSIOF clocks
[03/11] ARM: shmobile: lager legacy: Add MSIOF support [04/11] ARM: shmobile: koelsch legacy: Add MSIOF support [05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodes
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOFQuoted 2 lines
These are (reworked versions of) the remaining patches not taken from v1. Changelogs are available in the individual patches.
Quoted 7 lines
Hi Geert,
Thanks for your efforts. All these look fine to me.
Acked-by Magnus Damm <[email protected]>Exactly what to merge upstream depends on what the ARM SoC maintainers prefer.
I wonder if for now we could move things forwards by merging the non-legacy code. I think that would mean the following:
[05/11] ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add
spi0 alias
[06/11] ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi,
add spi0 alias
[07/11] ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases [08/11] ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases [09/11] ARM: shmobile: lager dts: Add MSIOF nodes
[10/11] ARM: shmobile: koelsch dts: Add MSIOF nodesAnd just the 'multi' portion of:
[11/11] ARM: shmobile: koelsch/lager/multi defconfig: Enable MSIOF
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Would that result in working MSIOF support for koelsch and lager when using multiplatform?
I believe so, but I rely on Geert to point out if this assumption is wrong.
Yes, that should work.
Thanks. I have queued things up as described above.
Quoted 25 lines
Quoted 5 lines
Quoted 3 lines
Then later, if appropriate, in accordance with discussions with the ARM SoC maintainers, we could merge the remaining changes in this series: the legacy code.
Sure, sounds good.
Indeed.
Thanks a lot!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.orgIn personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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