diff options
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0017-board-renesas-Add-V3MSK-board.patch')
-rw-r--r-- | meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0017-board-renesas-Add-V3MSK-board.patch | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0017-board-renesas-Add-V3MSK-board.patch b/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0017-board-renesas-Add-V3MSK-board.patch index 773ca26..34b7129 100644 --- a/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0017-board-renesas-Add-V3MSK-board.patch +++ b/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0017-board-renesas-Add-V3MSK-board.patch @@ -11,12 +11,12 @@ Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> board/renesas/v3msk/Kconfig | 15 +++ board/renesas/v3msk/MAINTAINERS | 6 ++ board/renesas/v3msk/Makefile | 9 ++ - board/renesas/v3msk/cpld.c | 164 +++++++++++++++++++++++++++++++ + board/renesas/v3msk/cpld.c | 164 ++++++++++++++++++++++++++++++++ board/renesas/v3msk/mdio_bb.h | 156 ++++++++++++++++++++++++++++++ - board/renesas/v3msk/v3msk.c | 209 ++++++++++++++++++++++++++++++++++++++++ + board/renesas/v3msk/v3msk.c | 204 ++++++++++++++++++++++++++++++++++++++++ configs/v3msk_defconfig | 9 ++ - include/configs/v3msk.h | 145 ++++++++++++++++++++++++++++ - 9 files changed, 717 insertions(+) + include/configs/v3msk.h | 133 ++++++++++++++++++++++++++ + 9 files changed, 700 insertions(+) create mode 100644 board/renesas/v3msk/Kconfig create mode 100644 board/renesas/v3msk/MAINTAINERS create mode 100644 board/renesas/v3msk/Makefile @@ -78,8 +78,8 @@ index 0000000..c39eb76 +M: Cogent Embedded, Inc. <source@cogentembedded.com> +S: Maintained +F: board/renesas/v3msk/ -+F: include/configs/r8a7797_v3msk.h -+F: configs/r8a7797_v3msk_defconfig ++F: include/configs/v3msk.h ++F: configs/v3msk_defconfig diff --git a/board/renesas/v3msk/Makefile b/board/renesas/v3msk/Makefile new file mode 100644 index 0000000..1f2ea42 @@ -100,7 +100,7 @@ new file mode 100644 index 0000000..ffb0637 --- /dev/null +++ b/board/renesas/v3msk/cpld.c -@@ -0,0 +1,164 @@ +@@ -0,0 +1,172 @@ +/* + * V3MSK board CPLD access support + * @@ -144,6 +144,9 @@ index 0000000..ffb0637 +#define PFC_PUEN2 0xe6060408 +#define PUEN_CANFD1_TX (1 << 29) + ++#define GP0_MSTP912 (1 << 12) ++#define GP1_MSTP911 (1 << 11) ++ +#define MDIO_DELAY 10 /* microseconds */ + +#define mdio_bb_active_mdio() gpio_direction_output(MOSI, 0) @@ -180,6 +183,9 @@ index 0000000..ffb0637 + /* PULL-UP on MISO line (should be pulled up after POR on V3M) */ + writel(readl(PFC_PUEN2) | PUEN_CANFD1_TX, PFC_PUEN2); +#endif ++ /* GPIO0 and GPIO1 */ ++ mstp_clrbits_le32(SMSTPCR9, SMSTPCR9, GP0_MSTP912 | GP1_MSTP911); ++ + gpio_request(MDC, NULL); + gpio_request(ENABLEZ, NULL); + gpio_request(MOSI, NULL); @@ -194,7 +200,9 @@ index 0000000..ffb0637 + * we must shutdown this chip to use bb pins + */ + gpio_request(GPIO_GP_0_12, NULL); ++ gpio_request(GPIO_GP_0_14, NULL); + gpio_direction_output(GPIO_GP_0_12, 1); ++ gpio_direction_output(GPIO_GP_0_14, 1); +} + +static int do_cpld(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) @@ -429,10 +437,10 @@ index 0000000..0311006 +} diff --git a/board/renesas/v3msk/v3msk.c b/board/renesas/v3msk/v3msk.c new file mode 100644 -index 0000000..b0de041 +index 0000000..4e4ee1f --- /dev/null +++ b/board/renesas/v3msk/v3msk.c -@@ -0,0 +1,209 @@ +@@ -0,0 +1,203 @@ +/* + * board/renesas/v3msk/v3msk.c + * This is V3MSK board support. @@ -470,20 +478,14 @@ index 0000000..b0de041 + +#define SD0CKCR 0xE6150074 + -+#define CLK2MHZ(clk) (clk / 1000 / 1000) +void s_init(void) +{ + struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; + struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE; -+ u32 stc; + + /* Watchdog init */ + writel(0xA5A5A500, &rwdt->rwtcsra); + writel(0xA5A5A500, &swdt->swtcsra); -+ -+ /* CPU frequency setting. Set to 0.8GHz */ -+ stc = ((800 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT; -+ clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); +} + +int board_early_init_f(void) @@ -497,7 +499,7 @@ index 0000000..b0de041 + mstp_clrbits_le32(MSTPSR1, SMSTPCR1, 0x02000000); + /* SCIF0 */ + mstp_clrbits_le32(MSTPSR2, SMSTPCR2, SCIF0_MSTP207); -+ /* SDHI0/MMC */ ++ /* SDHI2/MMC */ + mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SD0_MSTP314); + /* EHTERAVB */ + mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHERAVB_MSTP812); @@ -659,10 +661,10 @@ index 0000000..d32840c +CONFIG_SPI_FLASH_SPANSION=y diff --git a/include/configs/v3msk.h b/include/configs/v3msk.h new file mode 100644 -index 0000000..8998da4 +index 0000000..225d462 --- /dev/null +++ b/include/configs/v3msk.h -@@ -0,0 +1,145 @@ +@@ -0,0 +1,133 @@ +/* + * include/configs/v3msk.h + * This file is V3MSK board configuration. @@ -742,18 +744,6 @@ index 0000000..8998da4 +#define GICC_BASE (0xF1020000) +#define CONFIG_GICV2 + -+/* i2c */ -+#define CONFIG_SYS_I2C -+#define CONFIG_SYS_I2C_SH -+#define CONFIG_SYS_I2C_SLAVE 0x60 -+#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 1 -+#define CONFIG_SYS_I2C_SH_SPEED0 400000 -+#define CONFIG_SH_I2C_DATA_HIGH 4 -+#define CONFIG_SH_I2C_DATA_LOW 5 -+#define CONFIG_SH_I2C_CLOCK 10000000 -+ -+#define CONFIG_SYS_I2C_POWERIC_ADDR 0x30 -+ +/* USB */ +#undef CONFIG_CMD_USB + @@ -770,8 +760,8 @@ index 0000000..8998da4 +#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) + -+#define CONFIG_ENV_IS_IN_MMC -+//#define CONFIG_ENV_IS_IN_SPI_FLASH ++//#define CONFIG_ENV_IS_IN_MMC ++#define CONFIG_ENV_IS_IN_SPI_FLASH + +#if defined(CONFIG_ENV_IS_IN_MMC) +/* Environment in eMMC, at the end of 2nd "boot sector" */ @@ -804,7 +794,7 @@ index 0000000..8998da4 + "root=/dev/nfs rw ip=dhcp" + +#define CONFIG_BOOTCOMMAND \ -+ "bootp 0x48080000 Image; tftp 0x48000000 Image-r8a7797-v3msk.dtb; " \ ++ "bootp 0x48080000 Image; tftp 0x48000000 r8a7797-v3msk.dtb; " \ + "booti 0x48080000 - 0x48000000" + +#endif /* __V3MSK_H */ |