From b603c6812919ccb51680735faf1f8c589e82575c Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 5 Nov 2014 14:25:15 +0900 Subject: ARM: UniPhier: reset on-board devices on start-up If a support card is attached to the main board, the on-board SMSC9118 LAN controller is available. It must be kept in reset state for a while on start-up. When the board is kicked via a debbuger rather than pushing the hardware reset button, on-board chips are not reset; in this case the reset signals should be asserted by software. Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/cpu/armv7/uniphier/ph1-ld4') diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c b/arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c index 4302277dfc..5bb8179eb4 100644 --- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c +++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c @@ -24,6 +24,8 @@ int board_postclk_init(void) sg_init(); + uniphier_board_reset(); + pll_init(); uniphier_board_init(); -- cgit v1.2.1 From a69e037e46f028f5baafc4b3740e21bcadd5a33d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 6 Nov 2014 20:16:42 +0900 Subject: ARM: UniPhier: move DDR related configuration to Kconfig Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile | 3 +-- arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'arch/arm/cpu/armv7/uniphier/ph1-ld4') diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile index 781b511a97..5722ee2928 100644 --- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile +++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile @@ -7,5 +7,4 @@ obj-y += platdevice.o obj-y += boot-mode.o obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o bcu_init.o \ sbc_init.o sg_init.o pll_init.o clkrst_init.o pinctrl.o -obj-$(CONFIG_SPL_BUILD) += pll_spectrum.o \ - umc_init.o +obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c b/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c index 1344ac1caa..ebcbaabf65 100644 --- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c +++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/umc_init.c @@ -149,10 +149,6 @@ int umc_init(void) CONFIG_SDRAM1_SIZE / 0x08000000); } -#if CONFIG_DDR_FREQ != 1333 && CONFIG_DDR_FREQ != 1600 -#error Unsupported DDR Frequency. -#endif - #if (CONFIG_SDRAM0_SIZE == 0x08000000 || CONFIG_SDRAM0_SIZE == 0x10000000) && \ (CONFIG_SDRAM1_SIZE == 0x08000000 || CONFIG_SDRAM1_SIZE == 0x10000000) && \ CONFIG_DDR_NUM_CH0 == 1 && CONFIG_DDR_NUM_CH1 == 1 -- cgit v1.2.1 From 048899ba8c54bc3e094185d69d6a62d7e7f9cf30 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 7 Nov 2014 18:48:33 +0900 Subject: usb: UniPhier: add UniPhier on-chip EHCI host driver support Support EHCI host driver used on Panasonic UniPhier platform. Since Device Tree is not supported on UniPhier yet, the base address of USB cores are passed from board files (platdevice.c). TODO for me: Move the base address to device trees. Signed-off-by: Masahiro Yamada Acked-by: Marek Vasut --- arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/arm/cpu/armv7/uniphier/ph1-ld4') diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c b/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c index 0047223181..62f5b0148d 100644 --- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c +++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/platdevice.c @@ -13,3 +13,16 @@ SERIAL_DEVICE(0, 0x54006800, UART_MASTER_CLK) SERIAL_DEVICE(1, 0x54006900, UART_MASTER_CLK) SERIAL_DEVICE(2, 0x54006a00, UART_MASTER_CLK) SERIAL_DEVICE(3, 0x54006b00, UART_MASTER_CLK) + +/* USB : TODO for Masahiro Yamada: move base address to Device Tree */ +struct uniphier_ehci_platform_data uniphier_ehci_platdata[] = { + { + .base = 0x5a800100, + }, + { + .base = 0x5a810100, + }, + { + .base = 0x5a820100, + }, +}; -- cgit v1.2.1 From 4f25481b839454f0f7b1818fdba07ded4a6b1fe1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 11 Nov 2014 22:18:21 +0900 Subject: ARM: UniPhier: consolidate board_postclk_init() function This commit merges arch/arm/cpu/armv7/uniphier/ph1-*/board_postclk_init.c to arch/arm/cpu/armv7/uniphier/board_postclk_init.c Because PH1-Pro4 does not have the BCU block, add __weak to bcu_init(). Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile | 4 +- .../armv7/uniphier/ph1-ld4/board_postclk_init.c | 44 ---------------------- 2 files changed, 2 insertions(+), 46 deletions(-) delete mode 100644 arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c (limited to 'arch/arm/cpu/armv7/uniphier/ph1-ld4') diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile index 5722ee2928..4f42aec49a 100644 --- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile +++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile @@ -5,6 +5,6 @@ obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o obj-y += platdevice.o obj-y += boot-mode.o -obj-$(CONFIG_BOARD_POSTCLK_INIT) += board_postclk_init.o bcu_init.o \ - sbc_init.o sg_init.o pll_init.o clkrst_init.o pinctrl.o +obj-$(CONFIG_BOARD_POSTCLK_INIT) += bcu_init.o sbc_init.o sg_init.o \ + pll_init.o clkrst_init.o pinctrl.o obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c b/arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c deleted file mode 100644 index 5bb8179eb4..0000000000 --- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/board_postclk_init.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2012-2014 Panasonic Corporation - * Author: Masahiro Yamada - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include - -void bcu_init(void); -void sbc_init(void); -void sg_init(void); -void pll_init(void); -void pin_init(void); -void clkrst_init(void); - -int board_postclk_init(void) -{ - bcu_init(); - - sbc_init(); - - sg_init(); - - uniphier_board_reset(); - - pll_init(); - - uniphier_board_init(); - - led_write(B, 1, , ); - - clkrst_init(); - - led_write(B, 2, , ); - - pin_init(); - - led_write(B, 3, , ); - - return 0; -} -- cgit v1.2.1 From b67932e3e72b6214cde75c7e2f796d0c70ff3ffb Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 11 Nov 2014 22:18:22 +0900 Subject: ARM: UniPhier: call pin_init() also in the normal boot CONFIG_UNIPHIER_SERIAL has been moved to Kconfig and it is defined in ./.config but not in spl/.config, so pin_init() should be called from the normal image so that UART works correctly. Signed-off-by: Masahiro Yamada --- arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm/cpu/armv7/uniphier/ph1-ld4') diff --git a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile index 4f42aec49a..fba1cc7498 100644 --- a/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile +++ b/arch/arm/cpu/armv7/uniphier/ph1-ld4/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_DISPLAY_BOARDINFO) += board_info.o obj-y += platdevice.o obj-y += boot-mode.o -obj-$(CONFIG_BOARD_POSTCLK_INIT) += bcu_init.o sbc_init.o sg_init.o \ - pll_init.o clkrst_init.o pinctrl.o +obj-$(CONFIG_SOC_INIT) += bcu_init.o sbc_init.o sg_init.o pll_init.o \ + clkrst_init.o +obj-$(CONFIG_BOARD_POSTCLK_INIT) += pinctrl.o obj-$(CONFIG_DRAM_INIT) += pll_spectrum.o umc_init.o -- cgit v1.2.1