ARM: uniphier: a collection of clean-ups and new clock driver
Subsystems (7)
cover ARM: uniphier: a collection of clean-ups and new clock driver
Masahiro Yamada (13):
ARM: uniphier: change stack pointer address for SPL
ARM: uniphier: create early page table at run-time
ARM: uniphier: add missing static qualifier
ARM: uniphier: support USB boot mode for ProXstream2 / PH1-LD6b SoC
clk: uniphier: add Media I/O clock driver for UniPhier SoCs
ARM: dts: uniphier: add reference clock nodes
ARM: dts: uniphier: add device nodes for system control blocks
ARM: dts: uniphier: add device nodes for Peripheral control block
ARM: dts: uniphier: add device nodes for MIO control block
ARM: dts: uniphier: switch to use clock drivers
usb: remove UniPhier EHCI driver
ARM: uniphier: enable generic EHCI driver
ARM: uniphier: drop unneeded EHCI pin mux settings
arch/arm/Kconfig | 1 + arch/arm/dts/uniphier-common32.dtsi | 27 ++++ arch/arm/dts/uniphier-ph1-ld4.dtsi | 23 +++ arch/arm/dts/uniphier-ph1-pro4.dtsi | 22 +++ arch/arm/dts/uniphier-ph1-pro5.dtsi | 20 +++ arch/arm/dts/uniphier-ph1-sld3.dtsi | 26 +++ arch/arm/dts/uniphier-ph1-sld8.dtsi | 23 +++ arch/arm/dts/uniphier-proxstream2.dtsi | 20 +++ arch/arm/mach-uniphier/Makefile | 1 - arch/arm/mach-uniphier/board_late_init.c | 8 +- arch/arm/mach-uniphier/boot-mode/boot-device.h | 2 + .../boot-mode/boot-mode-proxstream2.c | 5 +- arch/arm/mach-uniphier/boot-mode/boot-mode.c | 11 +- arch/arm/mach-uniphier/clk/clk-ph1-ld4.c | 4 +- arch/arm/mach-uniphier/clk/clk-ph1-pro4.c | 4 +- arch/arm/mach-uniphier/init_page_table.S | 32 ---- arch/arm/mach-uniphier/lowlevel_init.S | 103 +++++++++++- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld4.c | 9 -- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-pro4.c | 7 - arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld3.c | 2 +- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld8.c | 9 -- configs/uniphier_ld4_sld8_defconfig | 2 + configs/uniphier_sld3_defconfig | 2 + drivers/clk/Kconfig | 2 + drivers/clk/Makefile | 1 + drivers/clk/uniphier/Kconfig | 13 ++ drivers/clk/uniphier/Makefile | 3 + drivers/clk/uniphier/clk-uniphier-core.c | 159 ++++++++++++++++++ drivers/clk/uniphier/clk-uniphier-mio.c | 178 +++++++++++++++++++++ drivers/clk/uniphier/clk-uniphier.h | 57 +++++++ drivers/usb/host/Kconfig | 7 - drivers/usb/host/Makefile | 1 - drivers/usb/host/ehci-uniphier.c | 75 --------- include/configs/uniphier.h | 2 +- 34 files changed, 703 insertions(+), 158 deletions(-) delete mode 100644 arch/arm/mach-uniphier/init_page_table.S create mode 100644 drivers/clk/uniphier/Kconfig create mode 100644 drivers/clk/uniphier/Makefile create mode 100644 drivers/clk/uniphier/clk-uniphier-core.c create mode 100644 drivers/clk/uniphier/clk-uniphier-mio.c create mode 100644 drivers/clk/uniphier/clk-uniphier.h delete mode 100644 drivers/usb/host/ehci-uniphier.c
Signature · 1 line
1.9.1
PATCH 1/13 ARM: uniphier: change stack pointer address for SPL
No special reason for the current stack address 0x0ff08000. Change it to 0x00100000 to simplify the init_page_table.
There are two types of SoCs in terms of the load address of SPL.
[1] PH1-sLD3, PH1-LD4, PH1-sLD8
SPL is loaded at 0x00040000-0x0004ffff
[2] PH1-Pro4, PH1-Pro5, ProXstream2, PH1-LD6b
SPL is loaded at 0x00100000-0x0010ffff
The new stack area (0x000f8000-0x00100000) should be safe for all the cases.
---
arch/arm/mach-uniphier/init_page_table.S | 5 +---- include/configs/uniphier.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-)
arch/arm/mach-uniphier/init_page_table.S +1 -4
@@ -13,15 +13,12 @@ #define DEVICE 0x00002002 /* Non-shareable Device */ #define NORMAL 0x0000000e /* Normal Memory Write-Back, No Write-Allocate */ -#define TEXT_SECTION ((CONFIG_SPL_TEXT_BASE) >> (SECTION_SHIFT)) -#define STACK_SECTION ((CONFIG_SPL_STACK) >> (SECTION_SHIFT)) - .section ".rodata" .align 14 ENTRY(init_page_table) section = 0 .rept NR_SECTIONS - .if section == 0 || section == 1 || section == STACK_SECTION + .if section == 0 || section == 1 attr = NORMAL .else attr = DEVICE
include/configs/uniphier.h +1 -1
@@ -252,7 +252,7 @@#define CONFIG_SPL_TEXT_BASE 0x00100000#endif -#define CONFIG_SPL_STACK (0x0ff08000) +#define CONFIG_SPL_STACK (0x00100000)#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE)#define CONFIG_PANIC_HANG
Signature · 1 line
1.9.1
PATCH 2/13 ARM: uniphier: create early page table at run-time
In reply to Masahiro YamadaUniPhier SoCs are not equipped with dedicated on-chip SRAM. Instead, locked outer cache is used as RAM area during the early boot stage where DRAM is not ready yet. This effectively means MMU must be always enabled while we are in SPL.
Currently, the SPL image for UniPhier SoCs contains the page table statically defined at compile time. It has been a burden because the 16KB page table occupies a quarter memory footprint of the 64KB SPL image.
Finally, there is no more room to implement new features in SPL. Setting aside the NOR boot mode, this issue can be solved by creating the page table onto RAM at run time.
---
arch/arm/mach-uniphier/Makefile | 1 - arch/arm/mach-uniphier/init_page_table.S | 29 --------- arch/arm/mach-uniphier/lowlevel_init.S | 103 ++++++++++++++++++++++++++++--- 3 files changed, 95 insertions(+), 38 deletions(-) delete mode 100644 arch/arm/mach-uniphier/init_page_table.S
arch/arm/mach-uniphier/Makefile +0 -1
@@ -5,7 +5,6 @@ ifdef CONFIG_SPL_BUILD obj-y += lowlevel_init.o -obj-y += init_page_table.o obj-y += init/ bcu/ memconf/ pll/ early-clk/ early-pinctrl/ dram/ obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc/
arch/arm/mach-uniphier/init_page_table.S deleted +0 -29
@@ -1,29 +0,0 @@ -/* - * Copyright (C) 2015 Masahiro Yamada <[email protected]> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <config.h> -#include <linux/linkage.h> - -/* page table */ -#define NR_SECTIONS 4096 -#define SECTION_SHIFT 20 -#define DEVICE 0x00002002 /* Non-shareable Device */ -#define NORMAL 0x0000000e /* Normal Memory Write-Back, No Write-Allocate */ - - .section ".rodata" - .align 14 -ENTRY(init_page_table) - section = 0 - .rept NR_SECTIONS - .if section == 0 || section == 1 - attr = NORMAL - .else - attr = DEVICE - .endif - .word (section << SECTION_SHIFT) | attr - section = section + 1 - .endr -END(init_page_table)
arch/arm/mach-uniphier/lowlevel_init.S +95 -8
140 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 3/13 ARM: uniphier: add missing static qualifier
In reply to Masahiro YamadaThis function is for local use in the file.
---
arch/arm/mach-uniphier/boot-mode/boot-mode-proxstream2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-uniphier/boot-mode/boot-mode-proxstream2.c +1 -1
@@ -46,7 +46,7 @@ static struct boot_device_info boot_device_table[] = { {BOOT_DEVICE_NONE, "Reserved"}, }; -int get_boot_mode_sel (void ) +static int get_boot_mode_sel (void ) {return (readl (SG_PINMON0 ) >>1 ) &0x1f ; }
Signature · 1 line
1.9.1
PATCH 4/13 ARM: uniphier: support USB boot mode for ProXstream2 / PH1-LD6b SoC
In reply to Masahiro YamadaThe USB boot code is too fat and complicated to be included in SPL (at least for now). So, it was implemented as a separate project (USB-loader).
The expected boot sequence is as follows:
Boot ROM -> USB-loader -> SPL -> U-Boot proper
The USB-loader loads the SPL and U-Boot proper from a USB memory onto the locked L2 cache. Then, SPL needs to copy the U-Boot proper to DRAM, so this mode looks like a NOR boot from the view of SPL. However, we want to distinguish between (genuine) NOR boot and USB boot in some places.
---
arch/arm/mach-uniphier/board_late_init.c | 8 +++++++- arch/arm/mach-uniphier/boot-mode/boot-device.h | 2 ++ arch/arm/mach-uniphier/boot-mode/boot-mode-proxstream2.c | 3 +++ arch/arm/mach-uniphier/boot-mode/boot-mode.c | 11 ++++++++++- 4 files changed, 22 insertions(+), 2 deletions(-)
arch/arm/mach-uniphier/board_late_init.c +7 -1
@@ -11,6 +11,8 @@#include <linux/io.h> #include <../drivers/mtd/nand/denali.h> +#include "boot-mode/boot-device.h" +static void nand_denali_wp_disable (void ) {#ifdef CONFIG_NAND_DENALI
@@ -62,7 +64,7 @@ int board_late_init(void) {puts ("MODE: " ); -switch (spl_boot_device ()) { +switch (spl_boot_device_raw ()) {case BOOT_DEVICE_MMC1 :printf ("eMMC Boot\n" );setenv ("bootmode" ,"emmcboot" );
@@ -76,6 +78,10 @@ int board_late_init(void)printf ("NOR Boot\n" );setenv ("bootmode" ,"norboot" );break ; +case BOOT_DEVICE_USB : +printf ("USB Boot\n" ); +setenv ("bootmode" ,"usbboot" ); +break ;default :printf ("Unsupported Boot Mode\n" );return -1 ;
arch/arm/mach-uniphier/boot-mode/boot-device.h +2 -0
@@ -22,4 +22,6 @@ void ph1_ld4_boot_mode_show(void);void ph1_pro5_boot_mode_show (void );void proxstream2_boot_mode_show (void ); +u32 spl_boot_device_raw (void ); +#endif /* _ASM_BOOT_DEVICE_H_ */
arch/arm/mach-uniphier/boot-mode/boot-mode-proxstream2.c +3 -0
@@ -55,6 +55,9 @@ u32 proxstream2_boot_device(void) {int boot_mode; +if (readl (SG_PINMON0 ) &BIT (6 )) +return BOOT_DEVICE_USB ; + boot_mode =get_boot_mode_sel ();return boot_device_table[boot_mode].type;
arch/arm/mach-uniphier/boot-mode/boot-mode.c +10 -1
@@ -11,7 +11,7 @@#include "../soc-info.h" #include "boot-device.h" -u32 spl_boot_device (void ) +u32 spl_boot_device_raw (void ) {if (boot_is_swapped ())return BOOT_DEVICE_NOR ;
@@ -43,3 +43,12 @@ u32 spl_boot_device(void)return BOOT_DEVICE_NONE ; } } + +u32 spl_boot_device (void ) +{ +u32 ret; + + ret =spl_boot_device_raw (); + +return ret ==BOOT_DEVICE_USB ?BOOT_DEVICE_NOR : ret; +}
Signature · 1 line
1.9.1
PATCH 5/13 clk: uniphier: add Media I/O clock driver for UniPhier SoCs
In reply to Masahiro YamadaThis is the initial commit for the UniPhier clock drivers. Currently, only the Media I/O clock is supported.
---
arch/arm/Kconfig | 1 + drivers/clk/Kconfig | 2 + drivers/clk/Makefile | 1 + drivers/clk/uniphier/Kconfig | 13 +++ drivers/clk/uniphier/Makefile | 3 + drivers/clk/uniphier/clk-uniphier-core.c | 159 +++++++++++++++++++++++++++ drivers/clk/uniphier/clk-uniphier-mio.c | 178 +++++++++++++++++++++++++++++++ drivers/clk/uniphier/clk-uniphier.h | 57 ++++++++++ 8 files changed, 414 insertions(+) create mode 100644 drivers/clk/uniphier/Kconfig create mode 100644 drivers/clk/uniphier/Makefile create mode 100644 drivers/clk/uniphier/clk-uniphier-core.c create mode 100644 drivers/clk/uniphier/clk-uniphier-mio.c create mode 100644 drivers/clk/uniphier/clk-uniphier.h
arch/arm/Kconfig +1 -0
@@ -689,6 +689,7 @@ config TARGET_COLIBRI_PXA270 config ARCH_UNIPHIER bool "Socionext UniPhier SoCs" + select CLK_UNIPHIER select CPU_V7 select SUPPORT_SPL select SPL
drivers/clk/Kconfig +2 -0
@@ -20,4 +20,6 @@ config SPL_CLK setting up clocks within SPL, and allows the same drivers to be used as U-Boot proper. +source "drivers/clk/uniphier/Kconfig" + endmenu
drivers/clk/Makefile +1 -0
@@ -10,3 +10,4 @@ obj-$(CONFIG_ROCKCHIP_RK3036) += clk_rk3036.o obj-$(CONFIG_ROCKCHIP_RK3288) += clk_rk3288.o obj-$(CONFIG_SANDBOX) += clk_sandbox.o obj-$(CONFIG_MACH_PIC32) += clk_pic32.o +obj-$(CONFIG_CLK_UNIPHIER) += uniphier/
drivers/clk/uniphier/Kconfig new file +13 -0
@@ -0,0 +1,13 @@ +config CLK_UNIPHIER + bool + select CLK + select SPL_CLK + +menu "Clock drivers for UniPhier SoCs" + depends on CLK_UNIPHIER + +config CLK_UNIPHIER_MIO + bool "Clock driver for UniPhier Media I/O block" + default y + +endmenu
drivers/clk/uniphier/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-y += clk-uniphier-core.o + +obj-$(CONFIG_CLK_UNIPHIER_MIO) += clk-uniphier-mio.o
drivers/clk/uniphier/clk-uniphier-core.c new file +159 -0
159 lines not on this page · raw message
drivers/clk/uniphier/clk-uniphier-mio.c new file +178 -0
178 lines not on this page · raw message
drivers/clk/uniphier/clk-uniphier.h new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 6/13 ARM: dts: uniphier: add reference clock nodes
In reply to Masahiro YamadaAdd master clock nodes generated by crystal oscillators.
PH1-sLD3, PH1-LD4: 24.576 MHz
PH1-Pro4, ProXstream2: 25.000 MHz
PH1-Pro5: 20.000 MHz
---
arch/arm/dts/uniphier-common32.dtsi | 7 +++++++ arch/arm/dts/uniphier-ph1-ld4.dtsi | 4 ++++ arch/arm/dts/uniphier-ph1-pro4.dtsi | 4 ++++ arch/arm/dts/uniphier-ph1-pro5.dtsi | 4 ++++ arch/arm/dts/uniphier-ph1-sld3.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-sld8.dtsi | 4 ++++ arch/arm/dts/uniphier-proxstream2.dtsi | 4 ++++ 7 files changed, 33 insertions(+)
arch/arm/dts/uniphier-common32.dtsi +7 -0
@@ -9,6 +9,13 @@ /include/ "skeleton.dtsi" / { + clocks { + refclk: ref { + #clock-cells = <0>; + compatible = "fixed-clock"; + }; + }; + soc: soc { compatible = "simple-bus"; #address-cells = <1>;
arch/arm/dts/uniphier-ph1-ld4.dtsi +4 -0
@@ -136,6 +136,10 @@ }; }; +&refclk { + clock-frequency = <24576000>; +}; + &serial0 { clock-frequency = <36864000>; };
arch/arm/dts/uniphier-ph1-pro4.dtsi +4 -0
@@ -177,6 +177,10 @@ }; }; +&refclk { + clock-frequency = <25000000>; +}; + &serial0 { clock-frequency = <73728000>; };
arch/arm/dts/uniphier-ph1-pro5.dtsi +4 -0
@@ -171,6 +171,10 @@ }; }; +&refclk { + clock-frequency = <20000000>; +}; + &serial0 { clock-frequency = <73728000>; };
arch/arm/dts/uniphier-ph1-sld3.dtsi +6 -0
@@ -30,6 +30,12 @@ }; clocks { + refclk: ref { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24576000>; + }; + arm_timer_clk: arm_timer_clk { #clock-cells = <0>; compatible = "fixed-clock";
arch/arm/dts/uniphier-ph1-sld8.dtsi +4 -0
@@ -136,6 +136,10 @@ }; }; +&refclk { + clock-frequency = <25000000>; +}; + &serial0 { clock-frequency = <80000000>; };
arch/arm/dts/uniphier-proxstream2.dtsi +4 -0
@@ -182,6 +182,10 @@ }; }; +&refclk { + clock-frequency = <25000000>; +}; + &serial0 { clock-frequency = <88900000>; };
Signature · 1 line
1.9.1
PATCH 7/13 ARM: dts: uniphier: add device nodes for system control blocks
In reply to Masahiro YamadaThis is a system control block mainly used for clock and reset control.
---
arch/arm/dts/uniphier-common32.dtsi | 8 ++++++++ arch/arm/dts/uniphier-ph1-ld4.dtsi | 4 ++++ arch/arm/dts/uniphier-ph1-pro4.dtsi | 4 ++++ arch/arm/dts/uniphier-ph1-pro5.dtsi | 4 ++++ arch/arm/dts/uniphier-ph1-sld3.dtsi | 8 ++++++++ arch/arm/dts/uniphier-ph1-sld8.dtsi | 4 ++++ arch/arm/dts/uniphier-proxstream2.dtsi | 4 ++++ 7 files changed, 36 insertions(+)
arch/arm/dts/uniphier-common32.dtsi +8 -0
@@ -101,6 +101,14 @@ reg = <0x5f801000 0xe00>; }; + sysctrl: sysctrl at 61840000 { + /* specify compatible in each SoC DTSI */ + reg = <0x61840000 0x4000>; + #clock-cells = <1>; + clock-names = "ref"; + clocks = <&refclk>; + }; + nand: nand at 68000000 { compatible = "denali,denali-nand-dt"; reg = <0x68000000 0x20>, <0x68100000 0x1000>;
arch/arm/dts/uniphier-ph1-ld4.dtsi +4 -0
@@ -160,3 +160,7 @@ &pinctrl { compatible = "socionext,ph1-ld4-pinctrl", "syscon"; }; + +&sysctrl { + compatible = "socionext,ph1-ld4-sysctrl"; +};
arch/arm/dts/uniphier-ph1-pro4.dtsi +4 -0
@@ -200,3 +200,7 @@ &pinctrl { compatible = "socionext,ph1-pro4-pinctrl", "syscon"; }; + +&sysctrl { + compatible = "socionext,ph1-pro4-sysctrl"; +};
arch/arm/dts/uniphier-ph1-pro5.dtsi +4 -0
@@ -194,3 +194,7 @@ &pinctrl { compatible = "socionext,ph1-pro5-pinctrl", "syscon"; }; + +&sysctrl { + compatible = "socionext,ph1-pro5-sysctrl"; +};
arch/arm/dts/uniphier-ph1-sld3.dtsi +8 -0
@@ -206,6 +206,14 @@ interrupts = <0 83 4>; }; + sysctrl: sysctrl at f1840000 { + compatible = "socionext,ph1-sld3-sysctrl"; + reg = <0xf1840000 0x4000>; + #clock-cells = <1>; + clock-names = "ref"; + clocks = <&refclk>; + }; + nand: nand at f8000000 { compatible = "denali,denali-nand-dt"; reg = <0xf8000000 0x20>, <0xf8100000 0x1000>;
arch/arm/dts/uniphier-ph1-sld8.dtsi +4 -0
@@ -160,3 +160,7 @@ &pinctrl { compatible = "socionext,ph1-sld8-pinctrl", "syscon"; }; + +&sysctrl { + compatible = "socionext,ph1-sld8-sysctrl"; +};
arch/arm/dts/uniphier-proxstream2.dtsi +4 -0
@@ -205,3 +205,7 @@ &pinctrl { compatible = "socionext,proxstream2-pinctrl", "syscon"; }; + +&sysctrl { + compatible = "socionext,proxstream2-sysctrl"; +};
Signature · 1 line
1.9.1
PATCH 8/13 ARM: dts: uniphier: add device nodes for Peripheral control block
In reply to Masahiro YamadaThis block provides clock and reset control for peripherals such as UART, I2C, IC card, etc.
---
arch/arm/dts/uniphier-common32.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-ld4.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-pro4.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-pro5.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-sld8.dtsi | 6 ++++++ arch/arm/dts/uniphier-proxstream2.dtsi | 6 ++++++ 6 files changed, 36 insertions(+)
arch/arm/dts/uniphier-common32.dtsi +6 -0
@@ -74,6 +74,12 @@ reg = <0x58c00000 0x400>, <0x59800000 0x2000>; }; + peri: perictrl at 59820000 { + /* specify compatible in each SoC DTSI */ + reg = <0x59820000 0x200>; + #clock-cells = <1>; + }; + timer at 60000200 { compatible = "arm,cortex-a9-global-timer"; reg = <0x60000200 0x20>;
arch/arm/dts/uniphier-ph1-ld4.dtsi +6 -0
@@ -157,6 +157,12 @@ clock-frequency = <36864000>; }; +&peri { + compatible = "socionext,ph1-ld4-perictrl"; + clock-names = "uart", "i2c"; + clocks = <&sysctrl 3>, <&sysctrl 4>; +}; + &pinctrl { compatible = "socionext,ph1-ld4-pinctrl", "syscon"; };
arch/arm/dts/uniphier-ph1-pro4.dtsi +6 -0
@@ -197,6 +197,12 @@ clock-frequency = <73728000>; }; +&peri { + compatible = "socionext,ph1-pro4-perictrl"; + clock-names = "uart", "fi2c"; + clocks = <&sysctrl 3>, <&sysctrl 4>; +}; + &pinctrl { compatible = "socionext,ph1-pro4-pinctrl", "syscon"; };
arch/arm/dts/uniphier-ph1-pro5.dtsi +6 -0
@@ -191,6 +191,12 @@ clock-frequency = <73728000>; }; +&peri { + compatible = "socionext,ph1-pro5-perictrl"; + clock-names = "uart", "fi2c"; + clocks = <&sysctrl 3>, <&sysctrl 4>; +}; + &pinctrl { compatible = "socionext,ph1-pro5-pinctrl", "syscon"; };
arch/arm/dts/uniphier-ph1-sld8.dtsi +6 -0
@@ -157,6 +157,12 @@ clock-frequency = <80000000>; }; +&peri { + compatible = "socionext,ph1-sld8-perictrl"; + clock-names = "uart", "i2c"; + clocks = <&sysctrl 3>, <&sysctrl 4>; +}; + &pinctrl { compatible = "socionext,ph1-sld8-pinctrl", "syscon"; };
arch/arm/dts/uniphier-proxstream2.dtsi +6 -0
@@ -202,6 +202,12 @@ clock-frequency = <88900000>; }; +&peri { + compatible = "socionext,proxstream2-perictrl"; + clock-names = "uart", "fi2c"; + clocks = <&sysctrl 3>, <&sysctrl 4>; +}; + &pinctrl { compatible = "socionext,proxstream2-pinctrl", "syscon"; };
Signature · 1 line
1.9.1
PATCH 9/13 ARM: dts: uniphier: add device nodes for MIO control block
In reply to Masahiro YamadaThis block provides clock and reset control for MIO (Media I/O) hardware blocks such as USB2.0, SD card, eMMC, etc.
---
arch/arm/dts/uniphier-common32.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-ld4.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-pro4.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-pro5.dtsi | 6 ++++++ arch/arm/dts/uniphier-ph1-sld3.dtsi | 8 ++++++++ arch/arm/dts/uniphier-ph1-sld8.dtsi | 6 ++++++ arch/arm/dts/uniphier-proxstream2.dtsi | 6 ++++++ 7 files changed, 44 insertions(+)
arch/arm/dts/uniphier-common32.dtsi +6 -0
@@ -74,6 +74,12 @@ reg = <0x58c00000 0x400>, <0x59800000 0x2000>; }; + mio: mioctrl at 59810000 { + /* specify compatible in each SoC DTSI */ + reg = <0x59810000 0x800>; + #clock-cells = <1>; + }; + peri: perictrl at 59820000 { /* specify compatible in each SoC DTSI */ reg = <0x59820000 0x200>;
arch/arm/dts/uniphier-ph1-ld4.dtsi +6 -0
@@ -157,6 +157,12 @@ clock-frequency = <36864000>; }; +&mio { + compatible = "socionext,ph1-ld4-mioctrl"; + clock-names = "stdmac", "ehci"; + clocks = <&sysctrl 10>, <&sysctrl 18>; +}; + &peri { compatible = "socionext,ph1-ld4-perictrl"; clock-names = "uart", "i2c";
arch/arm/dts/uniphier-ph1-pro4.dtsi +6 -0
@@ -197,6 +197,12 @@ clock-frequency = <73728000>; }; +&mio { + compatible = "socionext,ph1-pro4-mioctrl"; + clock-names = "stdmac", "ehci"; + clocks = <&sysctrl 10>, <&sysctrl 18>; +}; + &peri { compatible = "socionext,ph1-pro4-perictrl"; clock-names = "uart", "fi2c";
arch/arm/dts/uniphier-ph1-pro5.dtsi +6 -0
@@ -191,6 +191,12 @@ clock-frequency = <73728000>; }; +&mio { + compatible = "socionext,ph1-pro5-mioctrl"; + clock-names = "stdmac"; + clocks = <&sysctrl 10>; +}; + &peri { compatible = "socionext,ph1-pro5-perictrl"; clock-names = "uart", "fi2c";
arch/arm/dts/uniphier-ph1-sld3.dtsi +8 -0
@@ -178,6 +178,14 @@ reg = <0x59800000 0x2000>; }; + mio: mioctrl at 59810000 { + compatible = "socionext,ph1-sld3-mioctrl"; + reg = <0x59810000 0x800>; + #clock-cells = <1>; + clock-names = "stdmac", "ehci"; + clocks = <&sysctrl 10>, <&sysctrl 18>; + }; + usb0: usb at 5a800100 { compatible = "socionext,uniphier-ehci", "generic-ehci"; status = "disabled";
arch/arm/dts/uniphier-ph1-sld8.dtsi +6 -0
@@ -157,6 +157,12 @@ clock-frequency = <80000000>; }; +&mio { + compatible = "socionext,ph1-sld8-mioctrl"; + clock-names = "stdmac", "ehci"; + clocks = <&sysctrl 10>, <&sysctrl 18>; +}; + &peri { compatible = "socionext,ph1-sld8-perictrl"; clock-names = "uart", "i2c";
arch/arm/dts/uniphier-proxstream2.dtsi +6 -0
@@ -202,6 +202,12 @@ clock-frequency = <88900000>; }; +&mio { + compatible = "socionext,ph1-pro5-mioctrl"; + clock-names = "stdmac"; + clocks = <&sysctrl 10>; +}; + &peri { compatible = "socionext,proxstream2-perictrl"; clock-names = "uart", "fi2c";
Signature · 1 line
1.9.1
PATCH 10/13 ARM: dts: uniphier: switch to use clock drivers
In reply to Masahiro YamadaSpecify clocks properties to the EHCI nodes.
---
arch/arm/dts/uniphier-ph1-ld4.dtsi | 3 +++ arch/arm/dts/uniphier-ph1-pro4.dtsi | 2 ++ arch/arm/dts/uniphier-ph1-sld3.dtsi | 4 ++++ arch/arm/dts/uniphier-ph1-sld8.dtsi | 3 +++ 4 files changed, 12 insertions(+)
arch/arm/dts/uniphier-ph1-ld4.dtsi +3 -0
@@ -115,6 +115,7 @@ interrupts = <0 80 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb0>; + clocks = <&mio 3>, <&mio 6>; }; usb1: usb at 5a810100 {
@@ -124,6 +125,7 @@ interrupts = <0 81 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1>; + clocks = <&mio 4>, <&mio 6>; }; usb2: usb at 5a820100 {
@@ -133,6 +135,7 @@ interrupts = <0 82 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb2>; + clocks = <&mio 5>, <&mio 6>; }; };
arch/arm/dts/uniphier-ph1-pro4.dtsi +2 -0
@@ -147,6 +147,7 @@ interrupts = <0 80 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb2>; + clocks = <&mio 3>, <&mio 6>; }; usb3: usb at 5a810100 {
@@ -156,6 +157,7 @@ interrupts = <0 81 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb3>; + clocks = <&mio 4>, <&mio 6>; }; usb0: usb at 65a00000 {
arch/arm/dts/uniphier-ph1-sld3.dtsi +4 -0
@@ -191,6 +191,7 @@ status = "disabled"; reg = <0x5a800100 0x100>; interrupts = <0 80 4>; + clocks = <&mio 3>, <&mio 6>; }; usb1: usb at 5a810100 {
@@ -198,6 +199,7 @@ status = "disabled"; reg = <0x5a810100 0x100>; interrupts = <0 81 4>; + clocks = <&mio 4>, <&mio 6>; }; usb2: usb at 5a820100 {
@@ -205,6 +207,7 @@ status = "disabled"; reg = <0x5a820100 0x100>; interrupts = <0 82 4>; + clocks = <&mio 5>, <&mio 6>; }; usb3: usb at 5a830100 {
@@ -212,6 +215,7 @@ status = "disabled"; reg = <0x5a830100 0x100>; interrupts = <0 83 4>; + clocks = <&mio 7>, <&mio 6>; }; sysctrl: sysctrl at f1840000 {
arch/arm/dts/uniphier-ph1-sld8.dtsi +3 -0
@@ -115,6 +115,7 @@ interrupts = <0 80 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb0>; + clocks = <&mio 3>, <&mio 6>; }; usb1: usb at 5a810100 {
@@ -124,6 +125,7 @@ interrupts = <0 81 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1>; + clocks = <&mio 4>, <&mio 6>; }; usb2: usb at 5a820100 {
@@ -133,6 +135,7 @@ interrupts = <0 82 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb2>; + clocks = <&mio 5>, <&mio 6>; }; };
Signature · 1 line
1.9.1
PATCH 11/13 usb: remove UniPhier EHCI driver
In reply to Masahiro YamadaCurrently, what this driver does is just to set the base address and reset/clock handling. The latter is cared by the clock driver now. There is nothing special for this EHCI controller.
I want to use the generic-ehci driver rather than bothering to convert this driver to Driver Model.
---
drivers/usb/host/Kconfig | 7 ---- drivers/usb/host/Makefile | 1 - drivers/usb/host/ehci-uniphier.c | 75 ---------------------------------------- 3 files changed, 83 deletions(-) delete mode 100644 drivers/usb/host/ehci-uniphier.c
drivers/usb/host/Kconfig +0 -7
@@ -74,13 +74,6 @@ config USB_EHCI_MX6 ---help--- Enables support for the on-chip EHCI controller on i.MX6 SoCs. -config USB_EHCI_UNIPHIER - bool "Support for UniPhier on-chip EHCI USB controller" - depends on ARCH_UNIPHIER && OF_CONTROL - default y - ---help--- - Enables support for the on-chip EHCI controller on UniPhier SoCs. - config USB_EHCI_GENERIC bool "Support for generic EHCI USB controller" depends on OF_CONTROL
drivers/usb/host/Makefile +0 -1
@@ -47,7 +47,6 @@ obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o obj-$(CONFIG_USB_EHCI_SUNXI) += ehci-sunxi.o obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o -obj-$(CONFIG_USB_EHCI_UNIPHIER) += ehci-uniphier.o obj-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o obj-$(CONFIG_USB_EHCI_VF) += ehci-vf.o obj-$(CONFIG_USB_EHCI_RMOBILE) += ehci-rmobile.o
drivers/usb/host/ehci-uniphier.c deleted +0 -75
75 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 11/13 usb: remove UniPhier EHCI driver
Quoted 8 lines · Masahiro Yamada
Currently, what this driver does is just to set the base address and reset/clock handling. The latter is cared by the clock driver now. There is nothing special for this EHCI controller.
I want to use the generic-ehci driver rather than bothering to convert this driver to Driver Model.
Signed-off-by Masahiro Yamada <[email protected]>
Excellent, thanks!
Best regards,
Marek Vasut
PATCH 12/13 ARM: uniphier: enable generic EHCI driver
In reply to Masahiro YamadaThis generic driver will do for the time being.
---
arch/arm/mach-uniphier/clk/clk-ph1-ld4.c | 4 ++-- arch/arm/mach-uniphier/clk/clk-ph1-pro4.c | 4 ++-- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld4.c | 2 +- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-pro4.c | 2 +- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld3.c | 2 +- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld8.c | 2 +- configs/uniphier_ld4_sld8_defconfig | 2 ++ configs/uniphier_sld3_defconfig | 2 ++ 8 files changed, 12 insertions(+), 8 deletions(-)
arch/arm/mach-uniphier/clk/clk-ph1-ld4.c +2 -2
@@ -18,7 +18,7 @@ void ph1_ld4_clk_init(void)#ifdef CONFIG_UNIPHIER_ETH tmp |=SC_RSTCTRL_NRST_ETHER ;#endif -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI tmp |=SC_RSTCTRL_NRST_STDMAC ;#endif #ifdef CONFIG_NAND_DENALI
@@ -32,7 +32,7 @@ void ph1_ld4_clk_init(void)#ifdef CONFIG_UNIPHIER_ETH tmp |=SC_CLKCTRL_CEN_ETHER ;#endif -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI tmp |=SC_CLKCTRL_CEN_MIO |SC_CLKCTRL_CEN_STDMAC ;#endif #ifdef CONFIG_NAND_DENALI
arch/arm/mach-uniphier/clk/clk-ph1-pro4.c +2 -2
@@ -22,7 +22,7 @@ void ph1_pro4_clk_init(void)#ifdef CONFIG_UNIPHIER_ETH tmp |=SC_RSTCTRL_NRST_ETHER ;#endif -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI tmp |=SC_RSTCTRL_NRST_STDMAC ;#endif #ifdef CONFIG_NAND_DENALI
@@ -47,7 +47,7 @@ void ph1_pro4_clk_init(void)#ifdef CONFIG_UNIPHIER_ETH tmp |=SC_CLKCTRL_CEN_ETHER ;#endif -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI tmp |=SC_CLKCTRL_CEN_MIO |SC_CLKCTRL_CEN_STDMAC ;#endif #ifdef CONFIG_NAND_DENALI
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld4.c +1 -1
@@ -35,7 +35,7 @@ void ph1_ld4_pin_init(void)sg_set_pinsel (31 ,0 ,8 ,4 );/* MMCDAT7 -> NFD7_GB */ #endif -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI sg_set_pinsel (53 ,0 ,8 ,4 );/* USB0VBUS -> USB0VBUS */ sg_set_pinsel (54 ,0 ,8 ,4 );/* USB0OD -> USB0OD */ sg_set_pinsel (55 ,0 ,8 ,4 );/* USB1VBUS -> USB1VBUS */
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-pro4.c +1 -1
@@ -40,7 +40,7 @@ void ph1_pro4_pin_init(void)sg_set_pinsel (183 ,0 ,4 ,8 );/* USB1OD -> USB1OD */ #endif -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI sg_set_pinsel (184 ,0 ,4 ,8 );/* USB2VBUS -> USB2VBUS */ sg_set_pinsel (185 ,0 ,4 ,8 );/* USB2OD -> USB2OD */ sg_set_pinsel (187 ,0 ,4 ,8 );/* USB3VBUS -> USB3VBUS */
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld3.c +1 -1
@@ -9,7 +9,7 @@void ph1_sld3_pin_init (void ) { -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI sg_set_pinsel (13 ,0 ,4 ,4 );/* USB0OC */ sg_set_pinsel (14 ,1 ,4 ,4 );/* USB0VBUS */
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld8.c +1 -1
@@ -33,7 +33,7 @@ void ph1_sld8_pin_init(void)sg_set_pinsel (31 ,0 ,8 ,4 );/* NFD7_GB -> NFD7_GB */ #endif -#ifdef CONFIG_USB_EHCI_UNIPHIER +#ifdef CONFIG_USB_EHCI sg_set_pinsel (41 ,0 ,8 ,4 );/* USB0VBUS -> USB0VBUS */ sg_set_pinsel (42 ,0 ,8 ,4 );/* USB0OD -> USB0OD */ sg_set_pinsel (43 ,0 ,8 ,4 );/* USB1VBUS -> USB1VBUS */
configs/uniphier_ld4_sld8_defconfig +2 -0
@@ -27,5 +27,7 @@ CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_UNIPHIER_SERIAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y
configs/uniphier_sld3_defconfig +2 -0
@@ -22,5 +22,7 @@ CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8 CONFIG_SPL_NAND_DENALI=y CONFIG_UNIPHIER_SERIAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y
Signature · 1 line
1.9.1
PATCH 13/13 ARM: uniphier: drop unneeded EHCI pin mux settings
In reply to Masahiro YamadaThese pin mux settings are cared by the pinctrl driver. Remove the ad-hoc code.
---
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld4.c | 9 --------- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-pro4.c | 7 ------- arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld8.c | 9 --------- 3 files changed, 25 deletions(-)
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-ld4.c +0 -9
@@ -35,15 +35,6 @@ void ph1_ld4_pin_init(void)sg_set_pinsel (31 ,0 ,8 ,4 );/* MMCDAT7 -> NFD7_GB */ #endif -#ifdef CONFIG_USB_EHCI -sg_set_pinsel (53 ,0 ,8 ,4 );/* USB0VBUS -> USB0VBUS */ -sg_set_pinsel (54 ,0 ,8 ,4 );/* USB0OD -> USB0OD */ -sg_set_pinsel (55 ,0 ,8 ,4 );/* USB1VBUS -> USB1VBUS */ -sg_set_pinsel (56 ,0 ,8 ,4 );/* USB1OD -> USB1OD */ -/* sg_set_pinsel(67, 23, 8, 4); */ /* PCOE -> USB2VBUS */ -/* sg_set_pinsel(68, 23, 8, 4); */ /* PCWAIT -> USB2OD */ -#endif - tmp =readl (SG_IECTRL ); tmp |=0x41 ;writel (tmp,SG_IECTRL );
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-pro4.c +0 -7
@@ -40,12 +40,5 @@ void ph1_pro4_pin_init(void)sg_set_pinsel (183 ,0 ,4 ,8 );/* USB1OD -> USB1OD */ #endif -#ifdef CONFIG_USB_EHCI -sg_set_pinsel (184 ,0 ,4 ,8 );/* USB2VBUS -> USB2VBUS */ -sg_set_pinsel (185 ,0 ,4 ,8 );/* USB2OD -> USB2OD */ -sg_set_pinsel (187 ,0 ,4 ,8 );/* USB3VBUS -> USB3VBUS */ -sg_set_pinsel (188 ,0 ,4 ,8 );/* USB3OD -> USB3OD */ -#endif -writel (1 ,SG_LOADPINCTRL ); }
arch/arm/mach-uniphier/pinctrl/pinctrl-ph1-sld8.c +0 -9
@@ -32,13 +32,4 @@ void ph1_sld8_pin_init(void)sg_set_pinsel (30 ,0 ,8 ,4 );/* NFD6_GB -> NFD6_GB */ sg_set_pinsel (31 ,0 ,8 ,4 );/* NFD7_GB -> NFD7_GB */ #endif - -#ifdef CONFIG_USB_EHCI -sg_set_pinsel (41 ,0 ,8 ,4 );/* USB0VBUS -> USB0VBUS */ -sg_set_pinsel (42 ,0 ,8 ,4 );/* USB0OD -> USB0OD */ -sg_set_pinsel (43 ,0 ,8 ,4 );/* USB1VBUS -> USB1VBUS */ -sg_set_pinsel (44 ,0 ,8 ,4 );/* USB1OD -> USB1OD */ -/* sg_set_pinsel(114, 1, 8, 4); */ /* TXD1 -> USB2VBUS (shared with UART) */ -/* sg_set_pinsel(115, 1, 8, 4); */ /* RXD1 -> USB2OD */ -#endif }
Signature · 1 line
1.9.1
cover ARM: uniphier: a collection of clean-ups and new clock driver
In reply to Masahiro Yamada2016-02-02 21:11 GMT+09:00 Masahiro Yamada <[email protected]>:
Quoted 17 lines
Masahiro Yamada (13):
ARM: uniphier: change stack pointer address for SPL
ARM: uniphier: create early page table at run-time
ARM: uniphier: add missing static qualifier
ARM: uniphier: support USB boot mode for ProXstream2 / PH1-LD6b SoC
clk: uniphier: add Media I/O clock driver for UniPhier SoCs
ARM: dts: uniphier: add reference clock nodes
ARM: dts: uniphier: add device nodes for system control blocks
ARM: dts: uniphier: add device nodes for Peripheral control block
ARM: dts: uniphier: add device nodes for MIO control block
ARM: dts: uniphier: switch to use clock drivers
usb: remove UniPhier EHCI driver
ARM: uniphier: enable generic EHCI driver
ARM: uniphier: drop unneeded EHCI pin mux settings
Series, applied to u-boot-uniphier/master.
Signature · 2 lines
Best Regards Masahiro Yamada