]> git.sur5r.net Git - u-boot/commitdiff
Merge git://git.denx.de/u-boot-socfpga
authorTom Rini <trini@konsulko.com>
Thu, 24 Dec 2015 14:31:35 +0000 (09:31 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 24 Dec 2015 14:31:35 +0000 (09:31 -0500)
Conflicts:
include/configs/axs101.h

Signed-off-by: Tom Rini <trini@konsulko.com>
68 files changed:
MAINTAINERS
Makefile
arch/arc/dts/axs10x.dts
arch/arm/Kconfig
arch/arm/dts/Makefile
arch/arm/dts/sun5i-a13-empire-electronix-d709.dts [new file with mode: 0644]
arch/arm/dts/uniphier-common32.dtsi [new file with mode: 0644]
arch/arm/dts/uniphier-ph1-ld4-ref.dts
arch/arm/dts/uniphier-ph1-ld4.dtsi
arch/arm/dts/uniphier-ph1-ld6b-ref.dts
arch/arm/dts/uniphier-ph1-pro4-ref.dts
arch/arm/dts/uniphier-ph1-pro4.dtsi
arch/arm/dts/uniphier-ph1-pro5-4kbox.dts
arch/arm/dts/uniphier-ph1-pro5.dtsi
arch/arm/dts/uniphier-ph1-sld3-ref.dts
arch/arm/dts/uniphier-ph1-sld8-ref.dts
arch/arm/dts/uniphier-ph1-sld8.dtsi
arch/arm/dts/uniphier-pinctrl.dtsi
arch/arm/dts/uniphier-proxstream2-gentil.dts
arch/arm/dts/uniphier-proxstream2-vodka.dts
arch/arm/dts/uniphier-proxstream2.dtsi
arch/arm/mach-uniphier/Makefile
arch/arm/mach-uniphier/board_late_init.c
arch/arm/mach-uniphier/boards.c
arch/arm/mach-uniphier/cmd_ddrphy.c
arch/arm/mach-uniphier/cpu_info.c
arch/arm/mach-uniphier/ddrphy/Makefile [deleted file]
arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-ld4.c [deleted file]
arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-pro4.c [deleted file]
arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-sld8.c [deleted file]
arch/arm/mach-uniphier/ddrphy/ddrphy-training.c [deleted file]
arch/arm/mach-uniphier/dram/Makefile [new file with mode: 0644]
arch/arm/mach-uniphier/dram/ddrphy-ph1-ld4.c [new file with mode: 0644]
arch/arm/mach-uniphier/dram/ddrphy-ph1-pro4.c [new file with mode: 0644]
arch/arm/mach-uniphier/dram/ddrphy-ph1-sld8.c [new file with mode: 0644]
arch/arm/mach-uniphier/dram/ddrphy-training.c [new file with mode: 0644]
arch/arm/mach-uniphier/dram/umc-ph1-ld4.c [new file with mode: 0644]
arch/arm/mach-uniphier/dram/umc-ph1-pro4.c [new file with mode: 0644]
arch/arm/mach-uniphier/dram/umc-ph1-sld8.c [new file with mode: 0644]
arch/arm/mach-uniphier/include/mach/ddrphy-regs.h
arch/arm/mach-uniphier/include/mach/init.h
arch/arm/mach-uniphier/include/mach/soc_info.h
arch/arm/mach-uniphier/init/init.c
arch/arm/mach-uniphier/soc_info.c
arch/arm/mach-uniphier/umc/Makefile [deleted file]
arch/arm/mach-uniphier/umc/umc-ph1-ld4.c [deleted file]
arch/arm/mach-uniphier/umc/umc-ph1-pro4.c [deleted file]
arch/arm/mach-uniphier/umc/umc-ph1-sld8.c [deleted file]
board/sunxi/MAINTAINERS
configs/A20-Olimex-SOM-EVB_defconfig
configs/Empire_electronix_d709_defconfig [new file with mode: 0644]
configs/Marsboard_A10_defconfig
configs/axs103_defconfig
configs/ph1_ld4_defconfig [deleted file]
configs/ph1_ld6b_defconfig [deleted file]
configs/ph1_pro4_defconfig [deleted file]
configs/ph1_pro5_defconfig [deleted file]
configs/ph1_sld3_defconfig [deleted file]
configs/ph1_sld8_defconfig [deleted file]
configs/uniphier_ld4_sld8_defconfig [new file with mode: 0644]
configs/uniphier_pro4_defconfig [new file with mode: 0644]
configs/uniphier_pro5_defconfig [new file with mode: 0644]
configs/uniphier_pxs2_ld6b_defconfig [new file with mode: 0644]
configs/uniphier_sld3_defconfig [new file with mode: 0644]
doc/README.uniphier
include/configs/axs101.h
include/configs/sunxi-common.h
include/configs/uniphier.h

index 394be1ec323c448a182c23555c0c3c38be85a376..5b3c93a680a4871767230cd38797c3be2f490366 100644 (file)
@@ -161,7 +161,7 @@ M:  Masahiro Yamada <yamada.masahiro@socionext.com>
 S:     Maintained
 T:     git git://git.denx.de/u-boot-uniphier.git
 F:     arch/arm/mach-uniphier/
-F:     configs/ph1_*_defconfig
+F:     configs/uniphier_*_defconfig
 N:     uniphier
 
 ARM ZYNQ
index 028f0be9caf75cd8746ff576b060b1852e98d888..b58f2838456432f172b7534385565bfbd258e71f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
 VERSION = 2016
 PATCHLEVEL = 01
 SUBLEVEL =
-EXTRAVERSION = -rc2
+EXTRAVERSION = -rc3
 NAME =
 
 # *DOCUMENTATION*
index 80e6d6b15d49463147d85fae30f867cc451ec882..391d0671584c0f24fa7c3e160e77c33aa63b0d1e 100644 (file)
                reg = < 0xe0040000 0x100 >;
                interrupts = < 8 >;
        };
+
+       ohci@0xe0060000 {
+               compatible = "generic-ohci";
+               reg = < 0xe0060000 0x100 >;
+               interrupts = < 8 >;
+       };
 };
index 75d6bbcba3d8a80acffc5c097e7e5fcd0afbc008..9bd6cf1d807d1e793b885bacc3a05a10483b9d93 100644 (file)
@@ -516,8 +516,9 @@ config ARCH_SUNXI
        bool "Support sunxi (Allwinner) SoCs"
        select CMD_USB
        select DM
-       select DM_GPIO
        select DM_ETH
+       select DM_GPIO
+       select DM_KEYBOARD
        select DM_SERIAL
        select DM_USB
        select OF_CONTROL
index 03f984a3ccf256ad5635c99e10c501421c816906..0bcd31637560a25ef341f6069b5c018e2682fcaf 100644 (file)
@@ -125,6 +125,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
        sun5i-a10s-r7-tv-dongle.dtb \
        sun5i-a10s-wobo-i5.dtb \
        sun5i-a13-ampe-a76.dtb \
+       sun5i-a13-empire-electronix-d709.dtb \
        sun5i-a13-hsg-h702.dtb \
        sun5i-a13-inet-86vs.dtb \
        sun5i-a13-inet-98v-rev2.dtb \
diff --git a/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts b/arch/arm/dts/sun5i-a13-empire-electronix-d709.dts
new file mode 100644 (file)
index 0000000..7fbb0b0
--- /dev/null
@@ -0,0 +1,241 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "sun5i-a13.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       model = "Empire Electronix D709 tablet";
+       compatible = "empire-electronix,d709", "allwinner,sun5i-a13";
+
+       aliases {
+               serial0 = &uart1;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               /* TODO: backlight uses axp gpio1 as enable pin */
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupts = <0>;
+       };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+
+       pcf8563: rtc@51 {
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_ldo2>;
+       status = "okay";
+
+       button@200 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <200000>;
+       };
+
+       button@400 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <400000>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
+       cd-inverted;
+       status = "okay";
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins_a>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+
+       mmccard: mmccard@0 {
+               reg = <0>;
+               compatible = "mmc-card";
+               broken-hpi;
+       };
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
+               allwinner,pins = "PG0";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PG1";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PG2";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-pll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_usb0_vbus {
+       gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins_b>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb0_vbus_pin_a {
+       allwinner,pins = "PG12";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+       usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       usb1_vbus-supply = <&reg_ldo3>;
+       status = "okay";
+};
diff --git a/arch/arm/dts/uniphier-common32.dtsi b/arch/arm/dts/uniphier-common32.dtsi
new file mode 100644 (file)
index 0000000..5d4b2cf
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Device Tree Source commonly used by UniPhier ARM SoCs
+ *
+ * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+        X11
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+       soc: soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               interrupt-parent = <&intc>;
+
+               extbus: extbus {
+                       compatible = "simple-bus";
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+               };
+
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 177 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&uart_clk>;
+               };
+
+               system-bus-controller@58c00000 {
+                       compatible = "socionext,uniphier-system-bus-controller";
+                       reg = <0x58c00000 0x400>, <0x59800000 0x2000>;
+               };
+
+               timer@60000200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x60000200 0x20>;
+                       interrupts = <1 11 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               timer@60000600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x60000600 0x20>;
+                       interrupts = <1 13 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               intc: interrupt-controller@60001000 {
+                       compatible = "arm,cortex-a9-gic";
+                       reg = <0x60001000 0x1000>,
+                             <0x60000100 0x100>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+               };
+
+               pinctrl: pinctrl@5f801000 {
+                       /* specify compatible in each SoC DTSI */
+                       reg = <0x5f801000 0xe00>;
+               };
+
+               nand: nand@68000000 {
+                       compatible = "denali,denali-nand-dt";
+                       reg = <0x68000000 0x20>, <0x68100000 0x1000>;
+                       reg-names = "nand_data", "denali_reg";
+               };
+       };
+};
+
+/include/ "uniphier-pinctrl.dtsi"
index 9d697c1c88b4192a82ade2a7607d86eac40a105d..469bd05e16758bdf549f9044f739d99212f091e0 100644 (file)
@@ -20,8 +20,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS0,115200";
-               stdout-path = &serial0;
+               stdout-path = "serial0:115200n8";
        };
 
        aliases {
index 5f12e10ab2752c312c9ab83d4e3f6355774464fa..856c207b13645cac700ae8abff54bf0821d42736 100644 (file)
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier:    GPL-2.0+        X11
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-ld4";
@@ -19,6 +19,7 @@
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
+                       next-level-cache = <&l2>;
                };
        };
 
                        clock-frequency = <100000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <36864000>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <36864000>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <36864000>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 29 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <36864000>;
-               };
-
-               i2c0: i2c@58400000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58400000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58480000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58480000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(512 * 1024)>;
+               cache-sets = <256>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               /* chip-internal connection for DMD */
-               i2c2: i2c@58500000 {
-                       compatible = "socionext,uniphier-i2c";
-                       reg = <0x58500000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c0: i2c@58400000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58400000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c3: i2c@58580000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58580000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c1: i2c@58480000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58480000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               system-bus-controller-misc@59800000 {
-                       compatible = "socionext,uniphier-system-bus-controller-misc",
-                                    "syscon";
-                       reg = <0x59800000 0x2000>;
-               };
+       /* chip-internal connection for DMD */
+       i2c2: i2c@58500000 {
+               compatible = "socionext,uniphier-i2c";
+               reg = <0x58500000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <400000>;
+       };
 
-               usb0: usb@5a800100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a800100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>;
-                       interrupts = <0 80 4>;
-               };
+       i2c3: i2c@58580000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58580000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb1: usb@5a810100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a810100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>;
-                       interrupts = <0 81 4>;
-               };
+       usb0: usb@5a800100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a800100 0x100>;
+               interrupts = <0 80 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0>;
+       };
 
-               usb2: usb@5a820100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a820100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb2>;
-                       interrupts = <0 82 4>;
-               };
+       usb1: usb@5a810100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a810100 0x100>;
+               interrupts = <0 81 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-ld4-pinctrl",
-                                    "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       usb2: usb@5a820100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a820100 0x100>;
+               interrupts = <0 82 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb2>;
+       };
+};
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial0 {
+       clock-frequency = <36864000>;
+};
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial1 {
+       clock-frequency = <36864000>;
+};
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+&serial2 {
+       clock-frequency = <36864000>;
+};
 
-               nand: nand@68000000 {
-                       compatible = "denali,denali-nand-dt";
-                       reg = <0x68000000 0x20>, <0x68100000 0x1000>;
-                       reg-names = "nand_data", "denali_reg";
-               };
-       };
+&serial3 {
+       interrupts = <0 29 4>;
+       clock-frequency = <36864000>;
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,ph1-ld4-pinctrl", "syscon";
+};
index ccadd817c064f498bd04c64c71c9dd4c452b8eca..e0a972f4d223be72960fde22c49fb83f6b52d9ec 100644 (file)
@@ -20,8 +20,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS0,115200";
-               stdout-path = &serial0;
+               stdout-path = "serial0:115200n8";
        };
 
        aliases {
index a8250696384b0a71e81bb22594ba41189f54799e..02e74a7c3b0ddb264be16c05c78fe8521a861e0c 100644 (file)
@@ -20,8 +20,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS0,115200";
-               stdout-path = &serial0;
+               stdout-path = "serial0:115200n8";
        };
 
        aliases {
index a11b628f193409b84b0a9b3885d607f3588977d1..244ccf67e6637712787f673229e5c5bfabed8f0b 100644 (file)
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier:    GPL-2.0+        X11
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-pro4";
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
+                       next-level-cache = <&l2>;
                };
 
                cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <1>;
+                       next-level-cache = <&l2>;
                };
        };
 
                        clock-frequency = <50000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <73728000>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <73728000>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <73728000>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 29 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <73728000>;
-               };
-
-               i2c0: i2c@58780000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58780000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58781000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58781000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(768 * 1024)>;
+               cache-sets = <256>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               i2c2: i2c@58782000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58782000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c0: i2c@58780000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58780000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c3: i2c@58783000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58783000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c1: i2c@58781000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58781000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* i2c4 does not exist */
+       i2c2: i2c@58782000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58782000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* chip-internal connection for DMD */
-               i2c5: i2c@58785000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58785000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 25 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c3: i2c@58783000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58783000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* chip-internal connection for HDMI */
-               i2c6: i2c@58786000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58786000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 26 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       /* i2c4 does not exist */
 
-               system-bus-controller-misc@59800000 {
-                       compatible = "socionext,uniphier-system-bus-controller-misc",
-                                    "syscon";
-                       reg = <0x59800000 0x2000>;
-               };
+       /* chip-internal connection for DMD */
+       i2c5: i2c@58785000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58785000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 25 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               usb2: usb@5a800100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a800100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb2>;
-                       interrupts = <0 80 4>;
-               };
+       /* chip-internal connection for HDMI */
+       i2c6: i2c@58786000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58786000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 26 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               usb3: usb@5a810100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a810100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb3>;
-                       interrupts = <0 81 4>;
-               };
+       usb2: usb@5a800100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a800100 0x100>;
+               interrupts = <0 80 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb2>;
+       };
 
-               usb0: usb@65a00000 {
-                       compatible = "socionext,uniphier-xhci", "generic-xhci";
-                       status = "disabled";
-                       reg = <0x65a00000 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>;
-                       interrupts = <0 134 4>;
-               };
+       usb3: usb@5a810100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a810100 0x100>;
+               interrupts = <0 81 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb3>;
+       };
 
-               usb1: usb@65c00000 {
-                       compatible = "socionext,uniphier-xhci", "generic-xhci";
-                       status = "disabled";
-                       reg = <0x65c00000 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>;
-                       interrupts = <0 137 4>;
-               };
+       usb0: usb@65a00000 {
+               compatible = "socionext,uniphier-xhci", "generic-xhci";
+               status = "disabled";
+               reg = <0x65a00000 0x100>;
+               interrupts = <0 134 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-pro4-pinctrl",
-                                    "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       usb1: usb@65c00000 {
+               compatible = "socionext,uniphier-xhci", "generic-xhci";
+               status = "disabled";
+               reg = <0x65c00000 0x100>;
+               interrupts = <0 137 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1>;
+       };
+};
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial0 {
+       clock-frequency = <73728000>;
+};
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial1 {
+       clock-frequency = <73728000>;
+};
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+&serial2 {
+       clock-frequency = <73728000>;
+};
 
-               nand: nand@68000000 {
-                       compatible = "denali,denali-nand-dt";
-                       reg = <0x68000000 0x20>, <0x68100000 0x1000>;
-                       reg-names = "nand_data", "denali_reg";
-               };
-       };
+&serial3 {
+       clock-frequency = <73728000>;
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,ph1-pro4-pinctrl", "syscon";
+};
index 52dd1f96b0ca54d9a626e61ac6be71e9cfe31512..d46e827280992aa01dee616a611cf16b8546e16e 100644 (file)
@@ -19,8 +19,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS1,115200";
-               stdout-path = &serial1;
+               stdout-path = "serial1:115200n8";
        };
 
        aliases {
index 6f19bf81dcef3314f377a5ba745af2eb21335d18..00491062fe74ea99b34530b4e791871128050bbe 100644 (file)
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier:    GPL-2.0+        X11
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-pro5";
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
+                       next-level-cache = <&l2>;
                };
 
                cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <1>;
+                       next-level-cache = <&l2>;
                };
        };
 
                        clock-frequency = <50000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x8>, <0x506c0000 0x400>;
+               interrupts = <0 190 4>, <0 191 4>;
+               cache-unified;
+               cache-size = <(2 * 1024 * 1024)>;
+               cache-sets = <512>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+               next-level-cache = <&l3>;
+       };
 
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 177 4>;
-                       clocks = <&uart_clk>;
-               };
+       l3: l3-cache@500c8000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c8000 0x2000>, <0x503c8100 0x8>, <0x506c8000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(2 * 1024 * 1024)>;
+               cache-sets = <512>;
+               cache-line-size = <256>;
+               cache-level = <3>;
+       };
 
-               i2c0: i2c@58780000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58780000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c0: i2c@58780000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58780000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c1: i2c@58781000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58781000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c1: i2c@58781000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58781000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c2: i2c@58782000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58782000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c2: i2c@58782000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58782000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c3: i2c@58783000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58783000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c3: i2c@58783000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58783000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* i2c4 does not exist */
-
-               /* chip-internal connection for DMD */
-               i2c5: i2c@58785000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58785000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 25 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       /* i2c4 does not exist */
 
-               /* chip-internal connection for HDMI */
-               i2c6: i2c@58786000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58786000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 26 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       /* chip-internal connection for DMD */
+       i2c5: i2c@58785000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58785000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 25 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               system-bus-controller-misc@59800000 {
-                       compatible = "socionext,uniphier-system-bus-controller-misc",
-                                    "syscon";
-                       reg = <0x59800000 0x2000>;
-               };
+       /* chip-internal connection for HDMI */
+       i2c6: i2c@58786000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58786000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 26 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-pro5-pinctrl", "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       usb0: usb@65a00000 {
+               compatible = "socionext,uniphier-xhci", "generic-xhci";
+               status = "disabled";
+               reg = <0x65a00000 0x100>;
+               interrupts = <0 134 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0>;
+       };
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+       usb1: usb@65c00000 {
+               compatible = "socionext,uniphier-xhci", "generic-xhci";
+               status = "disabled";
+               reg = <0x65c00000 0x100>;
+               interrupts = <0 137 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb2>;
+       };
+};
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial0 {
+       clock-frequency = <73728000>;
+};
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+&serial1 {
+       clock-frequency = <73728000>;
+};
 
-               usb0: usb@65a00000 {
-                       compatible = "socionext,uniphier-xhci", "generic-xhci";
-                       status = "disabled";
-                       reg = <0x65a00000 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>;
-                       interrupts = <0 134 4>;
-               };
+&serial2 {
+       clock-frequency = <73728000>;
+};
 
-               usb1: usb@65c00000 {
-                       compatible = "socionext,uniphier-xhci", "generic-xhci";
-                       status = "disabled";
-                       reg = <0x65c00000 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb2>;
-                       interrupts = <0 137 4>;
-               };
-       };
+&serial3 {
+       clock-frequency = <73728000>;
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,ph1-pro5-pinctrl", "syscon";
+};
index c760b6de09ef767782bf7be8c175b655e8ce3182..1f3aee928ab967c386b7d7d061a3c31b51eedb70 100644 (file)
@@ -21,8 +21,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS0,115200";
-               stdout-path = &serial0;
+               stdout-path = "serial0:115200n8";
        };
 
        aliases {
index 2cfcaff54af950ff6f7f911b6e4507dc0c676495..b58bf075ac881a9efeedc3267e94bb489ddd72d8 100644 (file)
@@ -20,8 +20,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS0,115200";
-               stdout-path = &serial0;
+               stdout-path = "serial0:115200n8";
        };
 
        aliases {
index 7d06f7efab44b7eda9d2f926af7ddd25840da6a4..cb28bc4508252ebb5517c9d5416c37ff15467131 100644 (file)
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier:    GPL-2.0+        X11
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-sld8";
@@ -19,6 +19,7 @@
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
+                       next-level-cache = <&l2>;
                };
        };
 
                        clock-frequency = <100000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <80000000>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <80000000>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <80000000>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 29 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <80000000>;
-               };
-
-               i2c0: i2c@58400000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58400000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58480000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58480000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(256 * 1024)>;
+               cache-sets = <256>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               /* chip-internal connection for DMD */
-               i2c2: i2c@58500000 {
-                       compatible = "socionext,uniphier-i2c";
-                       reg = <0x58500000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c0: i2c@58400000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58400000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c3: i2c@58580000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58580000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c1: i2c@58480000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58480000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               system-bus-controller-misc@59800000 {
-                       compatible = "socionext,uniphier-system-bus-controller-misc",
-                                    "syscon";
-                       reg = <0x59800000 0x2000>;
-               };
+       /* chip-internal connection for DMD */
+       i2c2: i2c@58500000 {
+               compatible = "socionext,uniphier-i2c";
+               reg = <0x58500000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <400000>;
+       };
 
-               usb0: usb@5a800100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a800100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>;
-                       interrupts = <0 80 4>;
-               };
+       i2c3: i2c@58580000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58580000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb1: usb@5a810100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a810100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>;
-                       interrupts = <0 81 4>;
-               };
+       usb0: usb@5a800100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a800100 0x100>;
+               interrupts = <0 80 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0>;
+       };
 
-               usb2: usb@5a820100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a820100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb2>;
-                       interrupts = <0 82 4>;
-               };
+       usb1: usb@5a810100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a810100 0x100>;
+               interrupts = <0 81 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-sld8-pinctrl",
-                                    "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       usb2: usb@5a820100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a820100 0x100>;
+               interrupts = <0 82 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb2>;
+       };
+};
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial0 {
+       clock-frequency = <80000000>;
+};
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial1 {
+       clock-frequency = <80000000>;
+};
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+&serial2 {
+       clock-frequency = <80000000>;
+};
 
-               nand: nand@68000000 {
-                       compatible = "denali,denali-nand-dt";
-                       reg = <0x68000000 0x20>, <0x68100000 0x1000>;
-                       reg-names = "nand_data", "denali_reg";
-               };
-       };
+&serial3 {
+       interrupts = <0 29 4>;
+       clock-frequency = <80000000>;
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,ph1-sld8-pinctrl", "syscon";
+};
index b58421396d6b88a57ba56e840a85d85d1d726a7a..b1691d0679e7dd259b56853509e4c1ad2c44fedd 100644 (file)
@@ -7,6 +7,11 @@
  */
 
 &pinctrl {
+       pinctrl_emmc: emmc_grp {
+               groups = "emmc", "emmc_dat8";
+               function = "emmc";
+       };
+
        pinctrl_i2c0: i2c0_grp {
                groups = "i2c0";
                function = "i2c0";
                function = "i2c3";
        };
 
+       pinctrl_sd: sd_grp {
+               groups = "sd";
+               function = "sd";
+       };
+
+       pinctrl_sd1: sd1_grp {
+               groups = "sd1";
+               function = "sd1";
+       };
+
        pinctrl_uart0: uart0_grp {
                groups = "uart0";
                function = "uart0";
index d0af8acd3706afb7ba41670c2ad57141bd3c5f92..a49215edae7c71ddf7cc807d2adffdaeed9c4daf 100644 (file)
@@ -19,8 +19,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS2,115200";
-               stdout-path = &serial2;
+               stdout-path = "serial2:115200n8";
        };
 
        aliases {
index 92d74044c19e740b57871348d81a75add76d8d95..63bd3633bd7b3b13cc1115c5ae2e6985d8d827b7 100644 (file)
@@ -19,8 +19,7 @@
        };
 
        chosen {
-               bootargs = "console=ttyS2,115200";
-               stdout-path = &serial2;
+               stdout-path = "serial2:115200n8";
        };
 
        aliases {
index cd0cf4e74bc69f767c7760005eabf40e8aeaa917..3ba6a4ae51d57b8f0867b3cc2484306d552cf391 100644 (file)
@@ -6,7 +6,7 @@
  * SPDX-License-Identifier:    GPL-2.0+        X11
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,proxstream2";
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <0>;
+                       next-level-cache = <&l2>;
                };
 
                cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <1>;
+                       next-level-cache = <&l2>;
                };
 
                cpu@2 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <2>;
+                       next-level-cache = <&l2>;
                };
 
                cpu@3 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a9";
                        reg = <3>;
+                       next-level-cache = <&l2>;
                };
        };
 
                        clock-frequency = <50000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <88900000>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <88900000>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <88900000>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 177 4>;
-                       clocks = <&uart_clk>;
-                       clock-frequency = <88900000>;
-               };
-
-               i2c0: i2c@58780000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58780000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>, <0 190 4>, <0 191 4>;
+               cache-unified;
+               cache-size = <(1280 * 1024)>;
+               cache-sets = <512>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               i2c1: i2c@58781000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58781000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c0: i2c@58780000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58780000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c2: i2c@58782000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58782000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c1: i2c@58781000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58781000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               i2c3: i2c@58783000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58783000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c2: i2c@58782000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58782000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               interrupts = <0 43 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* chip-internal connection for DMD */
-               i2c4: i2c@58784000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58784000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 45 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c3: i2c@58783000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58783000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* chip-internal connection for STM */
-               i2c5: i2c@58785000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58785000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 25 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       /* chip-internal connection for DMD */
+       i2c4: i2c@58784000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58784000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 45 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               /* chip-internal connection for HDMI */
-               i2c6: i2c@58786000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58786000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 26 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       /* chip-internal connection for STM */
+       i2c5: i2c@58785000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58785000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 25 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               system-bus-controller-misc@59800000 {
-                       compatible = "socionext,uniphier-system-bus-controller-misc",
-                                    "syscon";
-                       reg = <0x59800000 0x2000>;
-               };
+       /* chip-internal connection for HDMI */
+       i2c6: i2c@58786000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58786000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 26 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,proxstream2-pinctrl", "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       usb0: usb@65a00000 {
+               compatible = "socionext,uniphier-xhci", "generic-xhci";
+               status = "disabled";
+               reg = <0x65a00000 0x100>;
+               interrupts = <0 134 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0>, <&pinctrl_usb2>;
+       };
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0xf04>;
-                       clocks = <&arm_timer_clk>;
-               };
+       usb1: usb@65c00000 {
+               compatible = "socionext,uniphier-xhci", "generic-xhci";
+               status = "disabled";
+               reg = <0x65c00000 0x100>;
+               interrupts = <0 137 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb3>;
+       };
+};
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0xf04>;
-                       clocks = <&arm_timer_clk>;
-               };
+&serial0 {
+       clock-frequency = <88900000>;
+};
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+&serial1 {
+       clock-frequency = <88900000>;
+};
 
-               usb0: usb@65a00000 {
-                       compatible = "socionext,uniphier-xhci", "generic-xhci";
-                       status = "disabled";
-                       reg = <0x65a00000 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>, <&pinctrl_usb2>;
-                       interrupts = <0 134 4>;
-               };
+&serial2 {
+       clock-frequency = <88900000>;
+};
 
-               usb1: usb@65c00000 {
-                       compatible = "socionext,uniphier-xhci", "generic-xhci";
-                       status = "disabled";
-                       reg = <0x65c00000 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb3>;
-                       interrupts = <0 137 4>;
-               };
-       };
+&serial3 {
+       clock-frequency = <88900000>;
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,proxstream2-pinctrl", "syscon";
+};
index b597a1352c2b40b73f5812853c99e5d5088f2f76..5b19f93ea99c648780d700fb29892e38fa96c3e1 100644 (file)
@@ -6,9 +6,8 @@ ifdef CONFIG_SPL_BUILD
 
 obj-y += lowlevel_init.o
 obj-y += init_page_table.o
-obj-y += boards.o
 
-obj-y += init/ bcu/ memconf/ pll/ early-clk/ early-pinctrl/ umc/ ddrphy/
+obj-y += init/ bcu/ memconf/ pll/ early-clk/ early-pinctrl/ dram/
 obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc/
 
 obj-$(CONFIG_DEBUG_LL) += debug_ll.o
@@ -33,6 +32,7 @@ obj-y += pinctrl/ clk/
 endif
 
 obj-y += timer.o
+obj-y += boards.o
 obj-y += soc_info.o
 obj-y += boot-mode/
 
index a7530eb23b5292fe8a59abc1b2b6d67ffb415e31..c2a32618acc7c607fa8ef60e4ff35a0987f4f8bf 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <spl.h>
+#include <libfdt.h>
 #include <nand.h>
 #include <linux/io.h>
 #include <../drivers/mtd/nand/denali.h>
@@ -25,6 +26,38 @@ static void nand_denali_wp_disable(void)
 #endif
 }
 
+struct uniphier_fdt_file {
+       const char *compatible;
+       const char *file_name;
+};
+
+static const struct uniphier_fdt_file uniphier_fdt_files[] = {
+       { "socionext,ph1-ld4-ref", "uniphier-ph1-ld4-ref.dtb", },
+       { "socionext,ph1-ld6b-ref", "uniphier-ph1-ld6b-ref.dtb", },
+       { "socionext,ph1-ld10-ref", "uniphier-ph1-ld10-ref.dtb", },
+       { "socionext,ph1-pro4-ref", "uniphier-ph1-pro4-ref.dtb", },
+       { "socionext,ph1-pro5-4kbox", "uniphier-ph1-pro5-4kbox.dtb", },
+       { "socionext,ph1-sld3-ref", "uniphier-ph1-sld3-ref.dtb", },
+       { "socionext,ph1-sld8-ref", "uniphier-ph1-sld8-ref.dtb", },
+       { "socionext,proxstream2-gentil", "uniphier-proxstream2-gentil.dtb", },
+       { "socionext,proxstream2-vodka", "uniphier-proxstream2-vodka.dtb", },
+};
+
+static void uniphier_set_fdt_file(void)
+{
+       DECLARE_GLOBAL_DATA_PTR;
+       int i;
+
+       /* lookup DTB file name based on the compatible string */
+       for (i = 0; i < ARRAY_SIZE(uniphier_fdt_files); i++) {
+               if (!fdt_node_check_compatible(gd->fdt_blob, 0,
+                                       uniphier_fdt_files[i].compatible)) {
+                       setenv("fdt_file", uniphier_fdt_files[i].file_name);
+                       return;
+               }
+       }
+}
+
 int board_late_init(void)
 {
        puts("MODE:  ");
@@ -48,5 +81,7 @@ int board_late_init(void)
                return -1;
        }
 
+       uniphier_set_fdt_file();
+
        return 0;
 }
index 812c58ff965ac6fe4f50ce6af464ad0160f98ae9..d075a11ca2092fb06d31a2cc0723f63bdef72e82 100644 (file)
@@ -4,10 +4,13 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#include <common.h>
 #include <libfdt.h>
 #include <linux/kernel.h>
 #include <mach/init.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD3)
 static const struct uniphier_board_data ph1_sld3_data = {
        .dram_ch0_base  = 0x80000000,
@@ -71,9 +74,23 @@ static const struct uniphier_board_data ph1_pro5_data = {
 };
 #endif
 
-#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) || \
-       defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
+#if defined(CONFIG_ARCH_UNIPHIER_PROXSTREAM2)
 static const struct uniphier_board_data proxstream2_data = {
+       .dram_ch0_base  = 0x80000000,
+       .dram_ch0_size  = 0x40000000,
+       .dram_ch0_width = 32,
+       .dram_ch1_base  = 0xc0000000,
+       .dram_ch1_size  = 0x20000000,
+       .dram_ch1_width = 32,
+       .dram_ch2_base  = 0xe0000000,
+       .dram_ch2_size  = 0x20000000,
+       .dram_ch2_width = 16,
+       .dram_freq      = 2133,
+};
+#endif
+
+#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
+static const struct uniphier_board_data ph1_ld6b_data = {
        .dram_ch0_base  = 0x80000000,
        .dram_ch0_size  = 0x40000000,
        .dram_ch0_width = 32,
@@ -112,16 +129,16 @@ static const struct uniphier_board_id uniphier_boards[] = {
        { "socionext,proxstream2", &proxstream2_data, },
 #endif
 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
-       { "socionext,ph1-ld6b", &proxstream2_data, },
+       { "socionext,ph1-ld6b", &ph1_ld6b_data, },
 #endif
 };
 
-const struct uniphier_board_data *uniphier_get_board_param(const void *fdt)
+const struct uniphier_board_data *uniphier_get_board_param(void)
 {
        int i;
 
        for (i = 0; i < ARRAY_SIZE(uniphier_boards); i++) {
-               if (!fdt_node_check_compatible(fdt, 0,
+               if (!fdt_node_check_compatible(gd->fdt_blob, 0,
                                               uniphier_boards[i].compatible))
                        return uniphier_boards[i].param;
        }
index dbbefd424b9abec52d5eb8b012b7d66affbfc5ae..f9b79ab3d907e4eadca5a8cbcbb2eed0d368792f 100644 (file)
@@ -50,7 +50,7 @@ static void __wbdl_dump(struct ddrphy_datx8 __iomem *dx)
        printf(FS "(+" PRINTF_FORMAT ")", readl(&dx->lcdlr[1]) & 0xff);
 }
 
-void wbdl_dump(void)
+static void wbdl_dump(void)
 {
        printf("\n--- Write Bit Delay Line ---\n");
        printf("           DQ0  DQ1  DQ2  DQ3  DQ4  DQ5  DQ6  DQ7   DM  DQS  (WDQD)\n");
@@ -68,7 +68,7 @@ static void __rbdl_dump(struct ddrphy_datx8 __iomem *dx)
        printf(FS "(+" PRINTF_FORMAT ")", (readl(&dx->lcdlr[1]) >> 8) & 0xff);
 }
 
-void rbdl_dump(void)
+static void rbdl_dump(void)
 {
        printf("\n--- Read Bit Delay Line ---\n");
        printf("           DQ0  DQ1  DQ2  DQ3  DQ4  DQ5  DQ6  DQ7   DM  (RDQSD)\n");
@@ -91,7 +91,7 @@ static void __wld_dump(struct ddrphy_datx8 __iomem *dx)
        }
 }
 
-void wld_dump(void)
+static void wld_dump(void)
 {
        printf("\n--- Write Leveling Delay ---\n");
        printf("            Rank0   Rank1   Rank2   Rank3\n");
@@ -113,7 +113,7 @@ static void __dqsgd_dump(struct ddrphy_datx8 __iomem *dx)
        }
 }
 
-void dqsgd_dump(void)
+static void dqsgd_dump(void)
 {
        printf("\n--- DQS Gating Delay ---\n");
        printf("            Rank0   Rank1   Rank2   Rank3\n");
@@ -129,7 +129,7 @@ static void __mdl_dump(struct ddrphy_datx8 __iomem *dx)
                printf(FS PRINTF_FORMAT, (mdl >> (8 * i)) & 0xff);
 }
 
-void mdl_dump(void)
+static void mdl_dump(void)
 {
        printf("\n--- Master Delay Line ---\n");
        printf("          IPRD TPRD MDLD\n");
@@ -141,7 +141,7 @@ void mdl_dump(void)
        { u32 __iomem *p = &phy->x; printf("%3d: %-10s: %p : %08x\n", \
                                        p - (u32 *)phy, #x, p, readl(p)); }
 
-void reg_dump(void)
+static void reg_dump(void)
 {
        int ch, p;
        struct ddrphy __iomem *phy;
index 5d9ed84be4ece3e24c7601467f7485eb2f4dc43a..935b209fa1fe4cd7d751b32fcac992b6cded730a 100644 (file)
@@ -43,13 +43,18 @@ int print_cpuinfo(void)
        case 0x2F:
                puts("PH1-LD6b (MN2WS0320)");
                break;
+       case 0x31:
+               puts("PH1-sLD11 ()");
+               break;
+       case 0x32:
+               puts("PH1-LD10 ()");
+               break;
        default:
                printf("Unknown Processor ID (0x%x)\n", revision);
                return -1;
        }
 
-       if (model > 1)
-               printf(" model %d", model);
+       printf(" model %d", model);
 
        printf(" (rev. %d)\n", rev);
 
diff --git a/arch/arm/mach-uniphier/ddrphy/Makefile b/arch/arm/mach-uniphier/ddrphy/Makefile
deleted file mode 100644 (file)
index d0f4bd3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += ddrphy-training.o ddrphy-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += ddrphy-training.o ddrphy-ph1-pro4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += ddrphy-training.o ddrphy-ph1-sld8.o
diff --git a/arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-ld4.c b/arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-ld4.c
deleted file mode 100644 (file)
index 991d929..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <linux/types.h>
-#include <linux/io.h>
-#include <mach/ddrphy-regs.h>
-
-int ph1_ld4_ddrphy_init(struct ddrphy __iomem *phy, int freq, int size)
-{
-       u32 tmp;
-
-       writel(0x0300c473, &phy->pgcr[1]);
-       if (freq == 1333) {
-               writel(0x0a806844, &phy->ptr[0]);
-               writel(0x208e0124, &phy->ptr[1]);
-       } else {
-               writel(0x0c807d04, &phy->ptr[0]);
-               writel(0x2710015E, &phy->ptr[1]);
-       }
-       writel(0x00083DEF, &phy->ptr[2]);
-       if (freq == 1333) {
-               writel(0x0f051616, &phy->ptr[3]);
-               writel(0x06ae08d6, &phy->ptr[4]);
-       } else {
-               writel(0x12061A80, &phy->ptr[3]);
-               writel(0x08027100, &phy->ptr[4]);
-       }
-       writel(0xF004001A, &phy->dsgcr);
-
-       /* change the value of the on-die pull-up/pull-down registors */
-       tmp = readl(&phy->dxccr);
-       tmp &= ~0x0ee0;
-       tmp |= DXCCR_DQSNRES_688_OHM | DXCCR_DQSRES_688_OHM;
-       writel(tmp, &phy->dxccr);
-
-       writel(0x0000040B, &phy->dcr);
-       if (freq == 1333) {
-               writel(0x85589955, &phy->dtpr[0]);
-               if (size == 1)
-                       writel(0x1a8253c0, &phy->dtpr[1]);
-               else
-                       writel(0x1a8363c0, &phy->dtpr[1]);
-               writel(0x5002c200, &phy->dtpr[2]);
-               writel(0x00000b51, &phy->mr0);
-       } else {
-               writel(0x999cbb66, &phy->dtpr[0]);
-               if (size == 1)
-                       writel(0x1a82dbc0, &phy->dtpr[1]);
-               else
-                       writel(0x1a878400, &phy->dtpr[1]);
-               writel(0xa00214f8, &phy->dtpr[2]);
-               writel(0x00000d71, &phy->mr0);
-       }
-       writel(0x00000006, &phy->mr1);
-       if (freq == 1333)
-               writel(0x00000290, &phy->mr2);
-       else
-               writel(0x00000298, &phy->mr2);
-
-       writel(0x00000800, &phy->mr3);
-
-       while (!(readl(&phy->pgsr[0]) & PGSR0_IDONE))
-               ;
-
-       writel(0x0300C473, &phy->pgcr[1]);
-       writel(0x0000005D, &phy->zq[0].cr[1]);
-
-       return 0;
-}
diff --git a/arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-pro4.c b/arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-pro4.c
deleted file mode 100644 (file)
index bc47ba3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <linux/types.h>
-#include <linux/io.h>
-#include <mach/ddrphy-regs.h>
-
-int ph1_pro4_ddrphy_init(struct ddrphy __iomem *phy, int freq, int size)
-{
-       u32 tmp;
-
-       writel(0x0300c473, &phy->pgcr[1]);
-       if (freq == 1333) {
-               writel(0x0a806844, &phy->ptr[0]);
-               writel(0x208e0124, &phy->ptr[1]);
-       } else {
-               writel(0x0c807d04, &phy->ptr[0]);
-               writel(0x2710015E, &phy->ptr[1]);
-       }
-       writel(0x00083DEF, &phy->ptr[2]);
-       if (freq == 1333) {
-               writel(0x0f051616, &phy->ptr[3]);
-               writel(0x06ae08d6, &phy->ptr[4]);
-       } else {
-               writel(0x12061A80, &phy->ptr[3]);
-               writel(0x08027100, &phy->ptr[4]);
-       }
-       writel(0xF004001A, &phy->dsgcr);
-
-       /* change the value of the on-die pull-up/pull-down registors */
-       tmp = readl(&phy->dxccr);
-       tmp &= ~0x0ee0;
-       tmp |= DXCCR_DQSNRES_688_OHM | DXCCR_DQSRES_688_OHM;
-       writel(tmp, &phy->dxccr);
-
-       writel(0x0000040B, &phy->dcr);
-       if (freq == 1333) {
-               writel(0x85589955, &phy->dtpr[0]);
-               if (size == 1)
-                       writel(0x1a8363c0, &phy->dtpr[1]);
-               else
-                       writel(0x1a8363c0, &phy->dtpr[1]);
-               writel(0x5002c200, &phy->dtpr[2]);
-               writel(0x00000b51, &phy->mr0);
-       } else {
-               writel(0x999cbb66, &phy->dtpr[0]);
-               if (size == 1)
-                       writel(0x1a878400, &phy->dtpr[1]);
-               else
-                       writel(0x1a878400, &phy->dtpr[1]);
-               writel(0xa00214f8, &phy->dtpr[2]);
-               writel(0x00000d71, &phy->mr0);
-       }
-       writel(0x00000006, &phy->mr1);
-       if (freq == 1333)
-               writel(0x00000290, &phy->mr2);
-       else
-               writel(0x00000298, &phy->mr2);
-
-       writel(0x00000000, &phy->mr3);
-
-       while (!(readl(&phy->pgsr[0]) & PGSR0_IDONE))
-               ;
-
-       writel(0x0300C473, &phy->pgcr[1]);
-       writel(0x0000005D, &phy->zq[0].cr[1]);
-
-       return 0;
-}
diff --git a/arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-sld8.c b/arch/arm/mach-uniphier/ddrphy/ddrphy-ph1-sld8.c
deleted file mode 100644 (file)
index 39024a0..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <config.h>
-#include <linux/types.h>
-#include <linux/io.h>
-#include <mach/ddrphy-regs.h>
-
-int ph1_sld8_ddrphy_init(struct ddrphy __iomem *phy, int freq, int size)
-{
-       u32 tmp;
-
-       writel(0x0300c473, &phy->pgcr[1]);
-       if (freq == 1333) {
-               writel(0x0a806844, &phy->ptr[0]);
-               writel(0x208e0124, &phy->ptr[1]);
-       } else {
-               writel(0x0c807d04, &phy->ptr[0]);
-               writel(0x2710015E, &phy->ptr[1]);
-       }
-       writel(0x00083DEF, &phy->ptr[2]);
-       if (freq == 1333) {
-               writel(0x0f051616, &phy->ptr[3]);
-               writel(0x06ae08d6, &phy->ptr[4]);
-       } else {
-               writel(0x12061A80, &phy->ptr[3]);
-               writel(0x08027100, &phy->ptr[4]);
-       }
-       writel(0xF004001A, &phy->dsgcr);
-
-       /* change the value of the on-die pull-up/pull-down registors */
-       tmp = readl(&phy->dxccr);
-       tmp &= ~0x0ee0;
-       tmp |= DXCCR_DQSNRES_688_OHM | DXCCR_DQSRES_688_OHM;
-       writel(tmp, &phy->dxccr);
-
-       writel(0x0000040B, &phy->dcr);
-       if (freq == 1333) {
-               writel(0x85589955, &phy->dtpr[0]);
-               if (size == 1)
-                       writel(0x1a8363c0, &phy->dtpr[1]);
-               else
-                       writel(0x1a8363c0, &phy->dtpr[1]);
-               writel(0x5002c200, &phy->dtpr[2]);
-               writel(0x00000b51, &phy->mr0);
-       } else {
-               writel(0x999cbb66, &phy->dtpr[0]);
-               if (size == 1)
-                       writel(0x1a878400, &phy->dtpr[1]);
-               else
-                       writel(0x1a878400, &phy->dtpr[1]);
-               writel(0xa00214f8, &phy->dtpr[2]);
-               writel(0x00000d71, &phy->mr0);
-       }
-       writel(0x00000006, &phy->mr1);
-       if (freq == 1333)
-               writel(0x00000290, &phy->mr2);
-       else
-               writel(0x00000298, &phy->mr2);
-
-#ifdef CONFIG_DDR_STANDARD
-       writel(0x00000000, &phy->mr3);
-#else
-       writel(0x00000800, &phy->mr3);
-#endif
-
-       while (!(readl(&phy->pgsr[0]) & PGSR0_IDONE))
-               ;
-
-       writel(0x0300C473, &phy->pgcr[1]);
-       writel(0x0000005D, &phy->zq[0].cr[1]);
-
-       return 0;
-}
diff --git a/arch/arm/mach-uniphier/ddrphy/ddrphy-training.c b/arch/arm/mach-uniphier/ddrphy/ddrphy-training.c
deleted file mode 100644 (file)
index a98b814..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <linux/io.h>
-#include <mach/ddrphy-regs.h>
-
-void ddrphy_prepare_training(struct ddrphy __iomem *phy, int rank)
-{
-       int dx;
-       u32 __iomem tmp, *p;
-
-       for (dx = 0; dx < NR_DATX8_PER_DDRPHY; dx++) {
-               p = &phy->dx[dx].gcr;
-
-               tmp = readl(p);
-               /* Specify the rank that should be write leveled */
-               tmp &= ~DXGCR_WLRKEN_MASK;
-               tmp |= (1 << (DXGCR_WLRKEN_SHIFT + rank)) & DXGCR_WLRKEN_MASK;
-               writel(tmp, p);
-       }
-
-       p = &phy->dtcr;
-
-       tmp = readl(p);
-       /* Specify the rank used during data bit deskew and eye centering */
-       tmp &= ~DTCR_DTRANK_MASK;
-       tmp |= (rank << DTCR_DTRANK_SHIFT) & DTCR_DTRANK_MASK;
-       /* Use Multi-Purpose Register for DQS gate training */
-       tmp |= DTCR_DTMPR;
-       /* Specify the rank enabled for data-training */
-       tmp &= ~DTCR_RNKEN_MASK;
-       tmp |= (1 << (DTCR_RNKEN_SHIFT + rank)) & DTCR_RNKEN_MASK;
-       writel(tmp, p);
-}
-
-struct ddrphy_init_sequence {
-       char *description;
-       u32 init_flag;
-       u32 done_flag;
-       u32 err_flag;
-};
-
-static struct ddrphy_init_sequence init_sequence[] = {
-       {
-               "DRAM Initialization",
-               PIR_DRAMRST | PIR_DRAMINIT,
-               PGSR0_DIDONE,
-               PGSR0_DIERR
-       },
-       {
-               "Write Leveling",
-               PIR_WL,
-               PGSR0_WLDONE,
-               PGSR0_WLERR
-       },
-       {
-               "Read DQS Gate Training",
-               PIR_QSGATE,
-               PGSR0_QSGDONE,
-               PGSR0_QSGERR
-       },
-       {
-               "Write Leveling Adjustment",
-               PIR_WLADJ,
-               PGSR0_WLADONE,
-               PGSR0_WLAERR
-       },
-       {
-               "Read Bit Deskew",
-               PIR_RDDSKW,
-               PGSR0_RDDONE,
-               PGSR0_RDERR
-       },
-       {
-               "Write Bit Deskew",
-               PIR_WRDSKW,
-               PGSR0_WDDONE,
-               PGSR0_WDERR
-       },
-       {
-               "Read Eye Training",
-               PIR_RDEYE,
-               PGSR0_REDONE,
-               PGSR0_REERR
-       },
-       {
-               "Write Eye Training",
-               PIR_WREYE,
-               PGSR0_WEDONE,
-               PGSR0_WEERR
-       }
-};
-
-int ddrphy_training(struct ddrphy __iomem *phy)
-{
-       int i;
-       u32 pgsr0;
-       u32 init_flag = PIR_INIT;
-       u32 done_flag = PGSR0_IDONE;
-       int timeout = 50000; /* 50 msec is long enough */
-#ifdef DISPLAY_ELAPSED_TIME
-       ulong start = get_timer(0);
-#endif
-
-       for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
-               init_flag |= init_sequence[i].init_flag;
-               done_flag |= init_sequence[i].done_flag;
-       }
-
-       writel(init_flag, &phy->pir);
-
-       do {
-               if (--timeout < 0) {
-                       printf("%s: error: timeout during DDR training\n",
-                                                               __func__);
-                       return -1;
-               }
-               udelay(1);
-               pgsr0 = readl(&phy->pgsr[0]);
-       } while ((pgsr0 & done_flag) != done_flag);
-
-       for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
-               if (pgsr0 & init_sequence[i].err_flag) {
-                       printf("%s: error: %s failed\n", __func__,
-                                               init_sequence[i].description);
-                       return -1;
-               }
-       }
-
-#ifdef DISPLAY_ELAPSED_TIME
-       printf("%s: info: elapsed time %ld msec\n", get_timer(start));
-#endif
-
-       return 0;
-}
diff --git a/arch/arm/mach-uniphier/dram/Makefile b/arch/arm/mach-uniphier/dram/Makefile
new file mode 100644 (file)
index 0000000..d3a767b
--- /dev/null
@@ -0,0 +1,10 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += umc-ph1-ld4.o \
+                                          ddrphy-training.o ddrphy-ph1-ld4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += umc-ph1-pro4.o \
+                                          ddrphy-training.o ddrphy-ph1-pro4.o
+obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += umc-ph1-sld8.o \
+                                          ddrphy-training.o ddrphy-ph1-sld8.o
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-ph1-ld4.c b/arch/arm/mach-uniphier/dram/ddrphy-ph1-ld4.c
new file mode 100644 (file)
index 0000000..991d929
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/types.h>
+#include <linux/io.h>
+#include <mach/ddrphy-regs.h>
+
+int ph1_ld4_ddrphy_init(struct ddrphy __iomem *phy, int freq, int size)
+{
+       u32 tmp;
+
+       writel(0x0300c473, &phy->pgcr[1]);
+       if (freq == 1333) {
+               writel(0x0a806844, &phy->ptr[0]);
+               writel(0x208e0124, &phy->ptr[1]);
+       } else {
+               writel(0x0c807d04, &phy->ptr[0]);
+               writel(0x2710015E, &phy->ptr[1]);
+       }
+       writel(0x00083DEF, &phy->ptr[2]);
+       if (freq == 1333) {
+               writel(0x0f051616, &phy->ptr[3]);
+               writel(0x06ae08d6, &phy->ptr[4]);
+       } else {
+               writel(0x12061A80, &phy->ptr[3]);
+               writel(0x08027100, &phy->ptr[4]);
+       }
+       writel(0xF004001A, &phy->dsgcr);
+
+       /* change the value of the on-die pull-up/pull-down registors */
+       tmp = readl(&phy->dxccr);
+       tmp &= ~0x0ee0;
+       tmp |= DXCCR_DQSNRES_688_OHM | DXCCR_DQSRES_688_OHM;
+       writel(tmp, &phy->dxccr);
+
+       writel(0x0000040B, &phy->dcr);
+       if (freq == 1333) {
+               writel(0x85589955, &phy->dtpr[0]);
+               if (size == 1)
+                       writel(0x1a8253c0, &phy->dtpr[1]);
+               else
+                       writel(0x1a8363c0, &phy->dtpr[1]);
+               writel(0x5002c200, &phy->dtpr[2]);
+               writel(0x00000b51, &phy->mr0);
+       } else {
+               writel(0x999cbb66, &phy->dtpr[0]);
+               if (size == 1)
+                       writel(0x1a82dbc0, &phy->dtpr[1]);
+               else
+                       writel(0x1a878400, &phy->dtpr[1]);
+               writel(0xa00214f8, &phy->dtpr[2]);
+               writel(0x00000d71, &phy->mr0);
+       }
+       writel(0x00000006, &phy->mr1);
+       if (freq == 1333)
+               writel(0x00000290, &phy->mr2);
+       else
+               writel(0x00000298, &phy->mr2);
+
+       writel(0x00000800, &phy->mr3);
+
+       while (!(readl(&phy->pgsr[0]) & PGSR0_IDONE))
+               ;
+
+       writel(0x0300C473, &phy->pgcr[1]);
+       writel(0x0000005D, &phy->zq[0].cr[1]);
+
+       return 0;
+}
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-ph1-pro4.c b/arch/arm/mach-uniphier/dram/ddrphy-ph1-pro4.c
new file mode 100644 (file)
index 0000000..bc47ba3
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/types.h>
+#include <linux/io.h>
+#include <mach/ddrphy-regs.h>
+
+int ph1_pro4_ddrphy_init(struct ddrphy __iomem *phy, int freq, int size)
+{
+       u32 tmp;
+
+       writel(0x0300c473, &phy->pgcr[1]);
+       if (freq == 1333) {
+               writel(0x0a806844, &phy->ptr[0]);
+               writel(0x208e0124, &phy->ptr[1]);
+       } else {
+               writel(0x0c807d04, &phy->ptr[0]);
+               writel(0x2710015E, &phy->ptr[1]);
+       }
+       writel(0x00083DEF, &phy->ptr[2]);
+       if (freq == 1333) {
+               writel(0x0f051616, &phy->ptr[3]);
+               writel(0x06ae08d6, &phy->ptr[4]);
+       } else {
+               writel(0x12061A80, &phy->ptr[3]);
+               writel(0x08027100, &phy->ptr[4]);
+       }
+       writel(0xF004001A, &phy->dsgcr);
+
+       /* change the value of the on-die pull-up/pull-down registors */
+       tmp = readl(&phy->dxccr);
+       tmp &= ~0x0ee0;
+       tmp |= DXCCR_DQSNRES_688_OHM | DXCCR_DQSRES_688_OHM;
+       writel(tmp, &phy->dxccr);
+
+       writel(0x0000040B, &phy->dcr);
+       if (freq == 1333) {
+               writel(0x85589955, &phy->dtpr[0]);
+               if (size == 1)
+                       writel(0x1a8363c0, &phy->dtpr[1]);
+               else
+                       writel(0x1a8363c0, &phy->dtpr[1]);
+               writel(0x5002c200, &phy->dtpr[2]);
+               writel(0x00000b51, &phy->mr0);
+       } else {
+               writel(0x999cbb66, &phy->dtpr[0]);
+               if (size == 1)
+                       writel(0x1a878400, &phy->dtpr[1]);
+               else
+                       writel(0x1a878400, &phy->dtpr[1]);
+               writel(0xa00214f8, &phy->dtpr[2]);
+               writel(0x00000d71, &phy->mr0);
+       }
+       writel(0x00000006, &phy->mr1);
+       if (freq == 1333)
+               writel(0x00000290, &phy->mr2);
+       else
+               writel(0x00000298, &phy->mr2);
+
+       writel(0x00000000, &phy->mr3);
+
+       while (!(readl(&phy->pgsr[0]) & PGSR0_IDONE))
+               ;
+
+       writel(0x0300C473, &phy->pgcr[1]);
+       writel(0x0000005D, &phy->zq[0].cr[1]);
+
+       return 0;
+}
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-ph1-sld8.c b/arch/arm/mach-uniphier/dram/ddrphy-ph1-sld8.c
new file mode 100644 (file)
index 0000000..39024a0
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <config.h>
+#include <linux/types.h>
+#include <linux/io.h>
+#include <mach/ddrphy-regs.h>
+
+int ph1_sld8_ddrphy_init(struct ddrphy __iomem *phy, int freq, int size)
+{
+       u32 tmp;
+
+       writel(0x0300c473, &phy->pgcr[1]);
+       if (freq == 1333) {
+               writel(0x0a806844, &phy->ptr[0]);
+               writel(0x208e0124, &phy->ptr[1]);
+       } else {
+               writel(0x0c807d04, &phy->ptr[0]);
+               writel(0x2710015E, &phy->ptr[1]);
+       }
+       writel(0x00083DEF, &phy->ptr[2]);
+       if (freq == 1333) {
+               writel(0x0f051616, &phy->ptr[3]);
+               writel(0x06ae08d6, &phy->ptr[4]);
+       } else {
+               writel(0x12061A80, &phy->ptr[3]);
+               writel(0x08027100, &phy->ptr[4]);
+       }
+       writel(0xF004001A, &phy->dsgcr);
+
+       /* change the value of the on-die pull-up/pull-down registors */
+       tmp = readl(&phy->dxccr);
+       tmp &= ~0x0ee0;
+       tmp |= DXCCR_DQSNRES_688_OHM | DXCCR_DQSRES_688_OHM;
+       writel(tmp, &phy->dxccr);
+
+       writel(0x0000040B, &phy->dcr);
+       if (freq == 1333) {
+               writel(0x85589955, &phy->dtpr[0]);
+               if (size == 1)
+                       writel(0x1a8363c0, &phy->dtpr[1]);
+               else
+                       writel(0x1a8363c0, &phy->dtpr[1]);
+               writel(0x5002c200, &phy->dtpr[2]);
+               writel(0x00000b51, &phy->mr0);
+       } else {
+               writel(0x999cbb66, &phy->dtpr[0]);
+               if (size == 1)
+                       writel(0x1a878400, &phy->dtpr[1]);
+               else
+                       writel(0x1a878400, &phy->dtpr[1]);
+               writel(0xa00214f8, &phy->dtpr[2]);
+               writel(0x00000d71, &phy->mr0);
+       }
+       writel(0x00000006, &phy->mr1);
+       if (freq == 1333)
+               writel(0x00000290, &phy->mr2);
+       else
+               writel(0x00000298, &phy->mr2);
+
+#ifdef CONFIG_DDR_STANDARD
+       writel(0x00000000, &phy->mr3);
+#else
+       writel(0x00000800, &phy->mr3);
+#endif
+
+       while (!(readl(&phy->pgsr[0]) & PGSR0_IDONE))
+               ;
+
+       writel(0x0300C473, &phy->pgcr[1]);
+       writel(0x0000005D, &phy->zq[0].cr[1]);
+
+       return 0;
+}
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-training.c b/arch/arm/mach-uniphier/dram/ddrphy-training.c
new file mode 100644 (file)
index 0000000..4852f2d
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <mach/ddrphy-regs.h>
+
+void ddrphy_prepare_training(struct ddrphy __iomem *phy, int rank)
+{
+       int dx;
+       u32 __iomem tmp, *p;
+
+       for (dx = 0; dx < NR_DATX8_PER_DDRPHY; dx++) {
+               p = &phy->dx[dx].gcr;
+
+               tmp = readl(p);
+               /* Specify the rank that should be write leveled */
+               tmp &= ~DXGCR_WLRKEN_MASK;
+               tmp |= (1 << (DXGCR_WLRKEN_SHIFT + rank)) & DXGCR_WLRKEN_MASK;
+               writel(tmp, p);
+       }
+
+       p = &phy->dtcr;
+
+       tmp = readl(p);
+       /* Specify the rank used during data bit deskew and eye centering */
+       tmp &= ~DTCR_DTRANK_MASK;
+       tmp |= (rank << DTCR_DTRANK_SHIFT) & DTCR_DTRANK_MASK;
+       /* Use Multi-Purpose Register for DQS gate training */
+       tmp |= DTCR_DTMPR;
+       /* Specify the rank enabled for data-training */
+       tmp &= ~DTCR_RANKEN_MASK;
+       tmp |= (1 << (DTCR_RANKEN_SHIFT + rank)) & DTCR_RANKEN_MASK;
+       writel(tmp, p);
+}
+
+struct ddrphy_init_sequence {
+       char *description;
+       u32 init_flag;
+       u32 done_flag;
+       u32 err_flag;
+};
+
+static const struct ddrphy_init_sequence init_sequence[] = {
+       {
+               "DRAM Initialization",
+               PIR_DRAMRST | PIR_DRAMINIT,
+               PGSR0_DIDONE,
+               PGSR0_DIERR
+       },
+       {
+               "Write Leveling",
+               PIR_WL,
+               PGSR0_WLDONE,
+               PGSR0_WLERR
+       },
+       {
+               "Read DQS Gate Training",
+               PIR_QSGATE,
+               PGSR0_QSGDONE,
+               PGSR0_QSGERR
+       },
+       {
+               "Write Leveling Adjustment",
+               PIR_WLADJ,
+               PGSR0_WLADONE,
+               PGSR0_WLAERR
+       },
+       {
+               "Read Bit Deskew",
+               PIR_RDDSKW,
+               PGSR0_RDDONE,
+               PGSR0_RDERR
+       },
+       {
+               "Write Bit Deskew",
+               PIR_WRDSKW,
+               PGSR0_WDDONE,
+               PGSR0_WDERR
+       },
+       {
+               "Read Eye Training",
+               PIR_RDEYE,
+               PGSR0_REDONE,
+               PGSR0_REERR
+       },
+       {
+               "Write Eye Training",
+               PIR_WREYE,
+               PGSR0_WEDONE,
+               PGSR0_WEERR
+       }
+};
+
+int ddrphy_training(struct ddrphy __iomem *phy)
+{
+       int i;
+       u32 pgsr0;
+       u32 init_flag = PIR_INIT;
+       u32 done_flag = PGSR0_IDONE;
+       int timeout = 50000; /* 50 msec is long enough */
+#ifdef DISPLAY_ELAPSED_TIME
+       ulong start = get_timer(0);
+#endif
+
+       for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
+               init_flag |= init_sequence[i].init_flag;
+               done_flag |= init_sequence[i].done_flag;
+       }
+
+       writel(init_flag, &phy->pir);
+
+       do {
+               if (--timeout < 0) {
+                       printf("%s: error: timeout during DDR training\n",
+                                                               __func__);
+                       return -ETIMEDOUT;
+               }
+               udelay(1);
+               pgsr0 = readl(&phy->pgsr[0]);
+       } while ((pgsr0 & done_flag) != done_flag);
+
+       for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
+               if (pgsr0 & init_sequence[i].err_flag) {
+                       printf("%s: error: %s failed\n", __func__,
+                                               init_sequence[i].description);
+                       return -EIO;
+               }
+       }
+
+#ifdef DISPLAY_ELAPSED_TIME
+       printf("%s: info: elapsed time %ld msec\n", get_timer(start));
+#endif
+
+       return 0;
+}
diff --git a/arch/arm/mach-uniphier/dram/umc-ph1-ld4.c b/arch/arm/mach-uniphier/dram/umc-ph1-ld4.c
new file mode 100644 (file)
index 0000000..8124685
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/sizes.h>
+#include <mach/init.h>
+#include <mach/umc-regs.h>
+#include <mach/ddrphy-regs.h>
+
+static void umc_start_ssif(void __iomem *ssif_base)
+{
+       writel(0x00000000, ssif_base + 0x0000b004);
+       writel(0xffffffff, ssif_base + 0x0000c004);
+       writel(0x000fffcf, ssif_base + 0x0000c008);
+       writel(0x00000001, ssif_base + 0x0000b000);
+       writel(0x00000001, ssif_base + 0x0000c000);
+       writel(0x03010101, ssif_base + UMC_MDMCHSEL);
+       writel(0x03010100, ssif_base + UMC_DMDCHSEL);
+
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_FETCH);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_WC);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_RC);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_DST);
+
+       writel(0x00000001, ssif_base + UMC_CPURST);
+       writel(0x00000001, ssif_base + UMC_IDSRST);
+       writel(0x00000001, ssif_base + UMC_IXMRST);
+       writel(0x00000001, ssif_base + UMC_MDMRST);
+       writel(0x00000001, ssif_base + UMC_MDDRST);
+       writel(0x00000001, ssif_base + UMC_SIORST);
+       writel(0x00000001, ssif_base + UMC_VIORST);
+       writel(0x00000001, ssif_base + UMC_FRCRST);
+       writel(0x00000001, ssif_base + UMC_RGLRST);
+       writel(0x00000001, ssif_base + UMC_AIORST);
+       writel(0x00000001, ssif_base + UMC_DMDRST);
+}
+
+static void umc_dramcont_init(void __iomem *dramcont, void __iomem *ca_base,
+                             int size, int freq)
+{
+       if (freq == 1333) {
+               writel(0x45990b11, dramcont + UMC_CMDCTLA);
+               writel(0x16958924, dramcont + UMC_CMDCTLB);
+               writel(0x5101046A, dramcont + UMC_INITCTLA);
+
+               if (size == 1)
+                       writel(0x27028B0A, dramcont + UMC_INITCTLB);
+               else if (size == 2)
+                       writel(0x38028B0A, dramcont + UMC_INITCTLB);
+
+               writel(0x000FF0FF, dramcont + UMC_INITCTLC);
+               writel(0x00000b51, dramcont + UMC_DRMMR0);
+       } else if (freq == 1600) {
+               writel(0x36BB0F17, dramcont + UMC_CMDCTLA);
+               writel(0x18C6AA24, dramcont + UMC_CMDCTLB);
+               writel(0x5101387F, dramcont + UMC_INITCTLA);
+
+               if (size == 1)
+                       writel(0x2F030D3F, dramcont + UMC_INITCTLB);
+               else if (size == 2)
+                       writel(0x43030D3F, dramcont + UMC_INITCTLB);
+
+               writel(0x00FF00FF, dramcont + UMC_INITCTLC);
+               writel(0x00000d71, dramcont + UMC_DRMMR0);
+       }
+
+       writel(0x00000006, dramcont + UMC_DRMMR1);
+
+       if (freq == 1333)
+               writel(0x00000290, dramcont + UMC_DRMMR2);
+       else if (freq == 1600)
+               writel(0x00000298, dramcont + UMC_DRMMR2);
+
+       writel(0x00000800, dramcont + UMC_DRMMR3);
+
+       if (freq == 1333) {
+               if (size == 1)
+                       writel(0x00240512, dramcont + UMC_SPCCTLA);
+               else if (size == 2)
+                       writel(0x00350512, dramcont + UMC_SPCCTLA);
+
+               writel(0x00ff0006, dramcont + UMC_SPCCTLB);
+               writel(0x000a00ac, dramcont + UMC_RDATACTL_D0);
+       } else if (freq == 1600) {
+               if (size == 1)
+                       writel(0x002B0617, dramcont + UMC_SPCCTLA);
+               else if (size == 2)
+                       writel(0x003F0617, dramcont + UMC_SPCCTLA);
+
+               writel(0x00ff0008, dramcont + UMC_SPCCTLB);
+               writel(0x000c00ae, dramcont + UMC_RDATACTL_D0);
+       }
+
+       writel(0x04060806, dramcont + UMC_WDATACTL_D0);
+       writel(0x04a02000, dramcont + UMC_DATASET);
+       writel(0x00000000, ca_base + 0x2300);
+       writel(0x00400020, dramcont + UMC_DCCGCTL);
+       writel(0x00000003, dramcont + 0x7000);
+       writel(0x0000000f, dramcont + 0x8000);
+       writel(0x000000c3, dramcont + 0x8004);
+       writel(0x00000071, dramcont + 0x8008);
+       writel(0x0000003b, dramcont + UMC_DICGCTLA);
+       writel(0x020a0808, dramcont + UMC_DICGCTLB);
+       writel(0x00000004, dramcont + UMC_FLOWCTLG);
+       writel(0x80000201, ca_base + 0xc20);
+       writel(0x0801e01e, dramcont + UMC_FLOWCTLA);
+       writel(0x00200000, dramcont + UMC_FLOWCTLB);
+       writel(0x00004444, dramcont + UMC_FLOWCTLC);
+       writel(0x200a0a00, dramcont + UMC_SPCSETB);
+       writel(0x00000000, dramcont + UMC_SPCSETD);
+       writel(0x00000520, dramcont + UMC_DFICUPDCTLA);
+}
+
+static int umc_init_sub(int freq, int size_ch0, int size_ch1)
+{
+       void __iomem *ssif_base = (void __iomem *)UMC_SSIF_BASE;
+       void __iomem *ca_base0 = (void __iomem *)UMC_CA_BASE(0);
+       void __iomem *ca_base1 = (void __iomem *)UMC_CA_BASE(1);
+       void __iomem *dramcont0 = (void __iomem *)UMC_DRAMCONT_BASE(0);
+       void __iomem *dramcont1 = (void __iomem *)UMC_DRAMCONT_BASE(1);
+       void __iomem *phy0_0 = (void __iomem *)DDRPHY_BASE(0, 0);
+       void __iomem *phy1_0 = (void __iomem *)DDRPHY_BASE(1, 0);
+
+       umc_dram_init_start(dramcont0);
+       umc_dram_init_start(dramcont1);
+       umc_dram_init_poll(dramcont0);
+       umc_dram_init_poll(dramcont1);
+
+       writel(0x00000101, dramcont0 + UMC_DIOCTLA);
+
+       ph1_ld4_ddrphy_init(phy0_0, freq, size_ch0);
+
+       ddrphy_prepare_training(phy0_0, 0);
+       ddrphy_training(phy0_0);
+
+       writel(0x00000101, dramcont1 + UMC_DIOCTLA);
+
+       ph1_ld4_ddrphy_init(phy1_0, freq, size_ch1);
+
+       ddrphy_prepare_training(phy1_0, 1);
+       ddrphy_training(phy1_0);
+
+       umc_dramcont_init(dramcont0, ca_base0, size_ch0, freq);
+       umc_dramcont_init(dramcont1, ca_base1, size_ch1, freq);
+
+       umc_start_ssif(ssif_base);
+
+       return 0;
+}
+
+int ph1_ld4_umc_init(const struct uniphier_board_data *bd)
+{
+       if ((bd->dram_ch0_size == SZ_128M || bd->dram_ch0_size == SZ_256M) &&
+           (bd->dram_ch1_size == SZ_128M || bd->dram_ch1_size == SZ_256M) &&
+           (bd->dram_freq == 1333 || bd->dram_freq == 1600) &&
+           bd->dram_ch0_width == 16 && bd->dram_ch1_width == 16) {
+               return umc_init_sub(bd->dram_freq,
+                                   bd->dram_ch0_size / SZ_128M,
+                                   bd->dram_ch1_size / SZ_128M);
+       } else {
+               pr_err("Unsupported DDR configuration\n");
+               return -EINVAL;
+       }
+}
diff --git a/arch/arm/mach-uniphier/dram/umc-ph1-pro4.c b/arch/arm/mach-uniphier/dram/umc-ph1-pro4.c
new file mode 100644 (file)
index 0000000..8c9f057
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/sizes.h>
+#include <mach/init.h>
+#include <mach/umc-regs.h>
+#include <mach/ddrphy-regs.h>
+
+static void umc_start_ssif(void __iomem *ssif_base)
+{
+       writel(0x00000001, ssif_base + 0x0000b004);
+       writel(0xffffffff, ssif_base + 0x0000c004);
+       writel(0x07ffffff, ssif_base + 0x0000c008);
+       writel(0x00000001, ssif_base + 0x0000b000);
+       writel(0x00000001, ssif_base + 0x0000c000);
+
+       writel(0x03010100, ssif_base + UMC_HDMCHSEL);
+       writel(0x03010101, ssif_base + UMC_MDMCHSEL);
+       writel(0x03010100, ssif_base + UMC_DVCCHSEL);
+       writel(0x03010100, ssif_base + UMC_DMDCHSEL);
+
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_FETCH);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_WC);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_RC);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_DST);
+       writel(0x00000000, ssif_base + 0x0000c044);             /* DCGIV_SSIF_REG */
+
+       writel(0x00000001, ssif_base + UMC_CPURST);
+       writel(0x00000001, ssif_base + UMC_IDSRST);
+       writel(0x00000001, ssif_base + UMC_IXMRST);
+       writel(0x00000001, ssif_base + UMC_HDMRST);
+       writel(0x00000001, ssif_base + UMC_MDMRST);
+       writel(0x00000001, ssif_base + UMC_HDDRST);
+       writel(0x00000001, ssif_base + UMC_MDDRST);
+       writel(0x00000001, ssif_base + UMC_SIORST);
+       writel(0x00000001, ssif_base + UMC_GIORST);
+       writel(0x00000001, ssif_base + UMC_HD2RST);
+       writel(0x00000001, ssif_base + UMC_VIORST);
+       writel(0x00000001, ssif_base + UMC_DVCRST);
+       writel(0x00000001, ssif_base + UMC_RGLRST);
+       writel(0x00000001, ssif_base + UMC_VPERST);
+       writel(0x00000001, ssif_base + UMC_AIORST);
+       writel(0x00000001, ssif_base + UMC_DMDRST);
+}
+
+static void umc_dramcont_init(void __iomem *dramcont, void __iomem *ca_base,
+                             int size, int freq)
+{
+       writel(0x66bb0f17, dramcont + UMC_CMDCTLA);
+       writel(0x18c6aa44, dramcont + UMC_CMDCTLB);
+       writel(0x5101387f, dramcont + UMC_INITCTLA);
+       writel(0x43030d3f, dramcont + UMC_INITCTLB);
+       writel(0x00ff00ff, dramcont + UMC_INITCTLC);
+       writel(0x00000d71, dramcont + UMC_DRMMR0);
+       writel(0x00000006, dramcont + UMC_DRMMR1);
+       writel(0x00000298, dramcont + UMC_DRMMR2);
+       writel(0x00000000, dramcont + UMC_DRMMR3);
+       writel(0x003f0617, dramcont + UMC_SPCCTLA);
+       writel(0x00ff0008, dramcont + UMC_SPCCTLB);
+       writel(0x000c00ae, dramcont + UMC_RDATACTL_D0);
+       writel(0x000c00ae, dramcont + UMC_RDATACTL_D1);
+       writel(0x04060802, dramcont + UMC_WDATACTL_D0);
+       writel(0x04060802, dramcont + UMC_WDATACTL_D1);
+       writel(0x04a02000, dramcont + UMC_DATASET);
+       writel(0x00000000, ca_base + 0x2300);
+       writel(0x00400020, dramcont + UMC_DCCGCTL);
+       writel(0x0000000f, dramcont + 0x7000);
+       writel(0x0000000f, dramcont + 0x8000);
+       writel(0x000000c3, dramcont + 0x8004);
+       writel(0x00000071, dramcont + 0x8008);
+       writel(0x00000004, dramcont + UMC_FLOWCTLG);
+       writel(0x00000000, dramcont + 0x0060);
+       writel(0x80000201, ca_base + 0xc20);
+       writel(0x0801e01e, dramcont + UMC_FLOWCTLA);
+       writel(0x00200000, dramcont + UMC_FLOWCTLB);
+       writel(0x00004444, dramcont + UMC_FLOWCTLC);
+       writel(0x200a0a00, dramcont + UMC_SPCSETB);
+       writel(0x00010000, dramcont + UMC_SPCSETD);
+       writel(0x80000020, dramcont + UMC_DFICUPDCTLA);
+}
+
+static int umc_init_sub(int freq, int size_ch0, int size_ch1)
+{
+       void __iomem *ssif_base = (void __iomem *)UMC_SSIF_BASE;
+       void __iomem *ca_base0 = (void __iomem *)UMC_CA_BASE(0);
+       void __iomem *ca_base1 = (void __iomem *)UMC_CA_BASE(1);
+       void __iomem *dramcont0 = (void __iomem *)UMC_DRAMCONT_BASE(0);
+       void __iomem *dramcont1 = (void __iomem *)UMC_DRAMCONT_BASE(1);
+       void __iomem *phy0_0 = (void __iomem *)DDRPHY_BASE(0, 0);
+       void __iomem *phy0_1 = (void __iomem *)DDRPHY_BASE(0, 1);
+       void __iomem *phy1_0 = (void __iomem *)DDRPHY_BASE(1, 0);
+       void __iomem *phy1_1 = (void __iomem *)DDRPHY_BASE(1, 1);
+
+       umc_dram_init_start(dramcont0);
+       umc_dram_init_start(dramcont1);
+       umc_dram_init_poll(dramcont0);
+       umc_dram_init_poll(dramcont1);
+
+       writel(0x00000101, dramcont0 + UMC_DIOCTLA);
+
+       ph1_pro4_ddrphy_init(phy0_0, freq, size_ch0);
+
+       ddrphy_prepare_training(phy0_0, 0);
+       ddrphy_training(phy0_0);
+
+       writel(0x00000103, dramcont0 + UMC_DIOCTLA);
+
+       ph1_pro4_ddrphy_init(phy0_1, freq, size_ch0);
+
+       ddrphy_prepare_training(phy0_1, 1);
+       ddrphy_training(phy0_1);
+
+       writel(0x00000101, dramcont1 + UMC_DIOCTLA);
+
+       ph1_pro4_ddrphy_init(phy1_0, freq, size_ch1);
+
+       ddrphy_prepare_training(phy1_0, 0);
+       ddrphy_training(phy1_0);
+
+       writel(0x00000103, dramcont1 + UMC_DIOCTLA);
+
+       ph1_pro4_ddrphy_init(phy1_1, freq, size_ch1);
+
+       ddrphy_prepare_training(phy1_1, 1);
+       ddrphy_training(phy1_1);
+
+       umc_dramcont_init(dramcont0, ca_base0, size_ch0, freq);
+       umc_dramcont_init(dramcont1, ca_base1, size_ch1, freq);
+
+       umc_start_ssif(ssif_base);
+
+       return 0;
+}
+
+int ph1_pro4_umc_init(const struct uniphier_board_data *bd)
+{
+       if (((bd->dram_ch0_size == SZ_512M && bd->dram_ch0_width == 32) ||
+            (bd->dram_ch0_size == SZ_256M && bd->dram_ch0_width == 16)) &&
+           ((bd->dram_ch1_size == SZ_512M && bd->dram_ch1_width == 32) ||
+            (bd->dram_ch1_size == SZ_256M && bd->dram_ch1_width == 16)) &&
+           bd->dram_freq == 1600) {
+               return umc_init_sub(bd->dram_freq,
+                                   bd->dram_ch0_size / SZ_128M,
+                                   bd->dram_ch1_size / SZ_128M);
+       } else {
+               pr_err("Unsupported DDR configuration\n");
+               return -EINVAL;
+       }
+}
diff --git a/arch/arm/mach-uniphier/dram/umc-ph1-sld8.c b/arch/arm/mach-uniphier/dram/umc-ph1-sld8.c
new file mode 100644 (file)
index 0000000..bc60a34
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/sizes.h>
+#include <mach/init.h>
+#include <mach/umc-regs.h>
+#include <mach/ddrphy-regs.h>
+
+static void umc_start_ssif(void __iomem *ssif_base)
+{
+       writel(0x00000000, ssif_base + 0x0000b004);
+       writel(0xffffffff, ssif_base + 0x0000c004);
+       writel(0x000fffcf, ssif_base + 0x0000c008);
+       writel(0x00000001, ssif_base + 0x0000b000);
+       writel(0x00000001, ssif_base + 0x0000c000);
+       writel(0x03010101, ssif_base + UMC_MDMCHSEL);
+       writel(0x03010100, ssif_base + UMC_DMDCHSEL);
+
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_FETCH);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC0);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC1);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_WC);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_RC);
+       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_DST);
+
+       writel(0x00000001, ssif_base + UMC_CPURST);
+       writel(0x00000001, ssif_base + UMC_IDSRST);
+       writel(0x00000001, ssif_base + UMC_IXMRST);
+       writel(0x00000001, ssif_base + UMC_MDMRST);
+       writel(0x00000001, ssif_base + UMC_MDDRST);
+       writel(0x00000001, ssif_base + UMC_SIORST);
+       writel(0x00000001, ssif_base + UMC_VIORST);
+       writel(0x00000001, ssif_base + UMC_FRCRST);
+       writel(0x00000001, ssif_base + UMC_RGLRST);
+       writel(0x00000001, ssif_base + UMC_AIORST);
+       writel(0x00000001, ssif_base + UMC_DMDRST);
+}
+
+static void umc_dramcont_init(void __iomem *dramcont, void __iomem *ca_base,
+                             int size, int freq)
+{
+#ifdef CONFIG_DDR_STANDARD
+       writel(0x55990b11, dramcont + UMC_CMDCTLA);
+       writel(0x16958944, dramcont + UMC_CMDCTLB);
+#else
+       writel(0x45990b11, dramcont + UMC_CMDCTLA);
+       writel(0x16958924, dramcont + UMC_CMDCTLB);
+#endif
+
+       writel(0x5101046A, dramcont + UMC_INITCTLA);
+
+       if (size == 1)
+               writel(0x27028B0A, dramcont + UMC_INITCTLB);
+       else if (size == 2)
+               writel(0x38028B0A, dramcont + UMC_INITCTLB);
+
+       writel(0x00FF00FF, dramcont + UMC_INITCTLC);
+       writel(0x00000b51, dramcont + UMC_DRMMR0);
+       writel(0x00000006, dramcont + UMC_DRMMR1);
+       writel(0x00000290, dramcont + UMC_DRMMR2);
+
+#ifdef CONFIG_DDR_STANDARD
+       writel(0x00000000, dramcont + UMC_DRMMR3);
+#else
+       writel(0x00000800, dramcont + UMC_DRMMR3);
+#endif
+
+       if (size == 1)
+               writel(0x00240512, dramcont + UMC_SPCCTLA);
+       else if (size == 2)
+               writel(0x00350512, dramcont + UMC_SPCCTLA);
+
+       writel(0x00ff0006, dramcont + UMC_SPCCTLB);
+       writel(0x000a00ac, dramcont + UMC_RDATACTL_D0);
+       writel(0x04060806, dramcont + UMC_WDATACTL_D0);
+       writel(0x04a02000, dramcont + UMC_DATASET);
+       writel(0x00000000, ca_base + 0x2300);
+       writel(0x00400020, dramcont + UMC_DCCGCTL);
+       writel(0x00000003, dramcont + 0x7000);
+       writel(0x0000004f, dramcont + 0x8000);
+       writel(0x000000c3, dramcont + 0x8004);
+       writel(0x00000077, dramcont + 0x8008);
+       writel(0x0000003b, dramcont + UMC_DICGCTLA);
+       writel(0x020a0808, dramcont + UMC_DICGCTLB);
+       writel(0x00000004, dramcont + UMC_FLOWCTLG);
+       writel(0x80000201, ca_base + 0xc20);
+       writel(0x0801e01e, dramcont + UMC_FLOWCTLA);
+       writel(0x00200000, dramcont + UMC_FLOWCTLB);
+       writel(0x00004444, dramcont + UMC_FLOWCTLC);
+       writel(0x200a0a00, dramcont + UMC_SPCSETB);
+       writel(0x00000000, dramcont + UMC_SPCSETD);
+       writel(0x00000520, dramcont + UMC_DFICUPDCTLA);
+}
+
+static int umc_init_sub(int freq, int size_ch0, int size_ch1)
+{
+       void __iomem *ssif_base = (void __iomem *)UMC_SSIF_BASE;
+       void __iomem *ca_base0 = (void __iomem *)UMC_CA_BASE(0);
+       void __iomem *ca_base1 = (void __iomem *)UMC_CA_BASE(1);
+       void __iomem *dramcont0 = (void __iomem *)UMC_DRAMCONT_BASE(0);
+       void __iomem *dramcont1 = (void __iomem *)UMC_DRAMCONT_BASE(1);
+       void __iomem *phy0_0 = (void __iomem *)DDRPHY_BASE(0, 0);
+       void __iomem *phy1_0 = (void __iomem *)DDRPHY_BASE(1, 0);
+
+       umc_dram_init_start(dramcont0);
+       umc_dram_init_start(dramcont1);
+       umc_dram_init_poll(dramcont0);
+       umc_dram_init_poll(dramcont1);
+
+       writel(0x00000101, dramcont0 + UMC_DIOCTLA);
+
+       ph1_sld8_ddrphy_init(phy0_0, freq, size_ch0);
+
+       ddrphy_prepare_training(phy0_0, 0);
+       ddrphy_training(phy0_0);
+
+       writel(0x00000101, dramcont1 + UMC_DIOCTLA);
+
+       ph1_sld8_ddrphy_init(phy1_0, freq, size_ch1);
+
+       ddrphy_prepare_training(phy1_0, 1);
+       ddrphy_training(phy1_0);
+
+       umc_dramcont_init(dramcont0, ca_base0, size_ch0, freq);
+       umc_dramcont_init(dramcont1, ca_base1, size_ch1, freq);
+
+       umc_start_ssif(ssif_base);
+
+       return 0;
+}
+
+int ph1_sld8_umc_init(const struct uniphier_board_data *bd)
+{
+       if ((bd->dram_ch0_size == SZ_128M || bd->dram_ch0_size == SZ_256M) &&
+           (bd->dram_ch1_size == SZ_128M || bd->dram_ch1_size == SZ_256M) &&
+           bd->dram_freq == 1333 &&
+           bd->dram_ch0_width == 16 && bd->dram_ch1_width == 16) {
+               return umc_init_sub(bd->dram_freq,
+                                   bd->dram_ch0_size / SZ_128M,
+                                   bd->dram_ch1_size / SZ_128M);
+       } else {
+               pr_err("Unsupported DDR configuration\n");
+               return -EINVAL;
+       }
+}
index adcc972877e71969d7e021563c7598cb2123a02b..03aedc2e63d56a5ad9c857ec8a550baaca9c6788 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef ARCH_DDRPHY_REGS_H
 #define ARCH_DDRPHY_REGS_H
 
+#include <linux/bitops.h>
 #include <linux/compiler.h>
 
 #ifndef __ASSEMBLY__
@@ -79,52 +80,52 @@ struct ddrphy {
 
 #endif /* __ASSEMBLY__ */
 
-#define PIR_INIT               (1 <<  0)       /* Initialization Trigger */
-#define PIR_ZCAL               (1 <<  1)       /* Impedance Calibration */
-#define PIR_PLLINIT            (1 <<  4)       /* PLL Initialization */
-#define PIR_DCAL               (1 <<  5)       /* DDL Calibration */
-#define PIR_PHYRST             (1 <<  6)       /* PHY Reset */
-#define PIR_DRAMRST            (1 <<  7)       /* DRAM Reset */
-#define PIR_DRAMINIT           (1 <<  8)       /* DRAM Initialization */
-#define PIR_WL                 (1 <<  9)       /* Write Leveling */
-#define PIR_QSGATE             (1 << 10)       /* Read DQS Gate Training */
-#define PIR_WLADJ              (1 << 11)       /* Write Leveling Adjust */
-#define PIR_RDDSKW             (1 << 12)       /* Read Data Bit Deskew */
-#define PIR_WRDSKW             (1 << 13)       /* Write Data Bit Deskew */
-#define PIR_RDEYE              (1 << 14)       /* Read Data Eye Training */
-#define PIR_WREYE              (1 << 15)       /* Write Data Eye Training */
-#define PIR_LOCKBYP            (1 << 28)       /* PLL Lock Bypass */
-#define PIR_DCALBYP            (1 << 29)       /* DDL Calibration Bypass */
-#define PIR_ZCALBYP            (1 << 30)       /* Impedance Calib Bypass */
-#define PIR_INITBYP            (1 << 31)       /* Initialization Bypass */
-
-#define PGSR0_IDONE            (1 <<  0)       /* Initialization Done */
-#define PGSR0_PLDONE           (1 <<  1)       /* PLL Lock Done */
-#define PGSR0_DCDONE           (1 <<  2)       /* DDL Calibration Done */
-#define PGSR0_ZCDONE           (1 <<  3)       /* Impedance Calibration Done */
-#define PGSR0_DIDONE           (1 <<  4)       /* DRAM Initialization Done */
-#define PGSR0_WLDONE           (1 <<  5)       /* Write Leveling Done */
-#define PGSR0_QSGDONE          (1 <<  6)       /* DQS Gate Training Done */
-#define PGSR0_WLADONE          (1 <<  7)       /* Write Leveling Adjust Done */
-#define PGSR0_RDDONE           (1 <<  8)       /* Read Bit Deskew Done */
-#define PGSR0_WDDONE           (1 <<  9)       /* Write Bit Deskew Done */
-#define PGSR0_REDONE           (1 << 10)       /* Read Eye Training Done */
-#define PGSR0_WEDONE           (1 << 11)       /* Write Eye Training Done */
-#define PGSR0_IERR             (1 << 16)       /* Initialization Error */
-#define PGSR0_PLERR            (1 << 17)       /* PLL Lock Error */
-#define PGSR0_DCERR            (1 << 18)       /* DDL Calibration Error */
-#define PGSR0_ZCERR            (1 << 19)       /* Impedance Calib Error */
-#define PGSR0_DIERR            (1 << 20)       /* DRAM Initialization Error */
-#define PGSR0_WLERR            (1 << 21)       /* Write Leveling Error */
-#define PGSR0_QSGERR           (1 << 22)       /* DQS Gate Training Error */
-#define PGSR0_WLAERR           (1 << 23)       /* Write Leveling Adj Error */
-#define PGSR0_RDERR            (1 << 24)       /* Read Bit Deskew Error */
-#define PGSR0_WDERR            (1 << 25)       /* Write Bit Deskew Error */
-#define PGSR0_REERR            (1 << 26)       /* Read Eye Training Error */
-#define PGSR0_WEERR            (1 << 27)       /* Write Eye Training Error */
+#define PIR_INIT               BIT(0)          /* Initialization Trigger */
+#define PIR_ZCAL               BIT(1)          /* Impedance Calibration */
+#define PIR_PLLINIT            BIT(4)          /* PLL Initialization */
+#define PIR_DCAL               BIT(5)          /* DDL Calibration */
+#define PIR_PHYRST             BIT(6)          /* PHY Reset */
+#define PIR_DRAMRST            BIT(7)          /* DRAM Reset */
+#define PIR_DRAMINIT           BIT(8)          /* DRAM Initialization */
+#define PIR_WL                 BIT(9)          /* Write Leveling */
+#define PIR_QSGATE             BIT(10)         /* Read DQS Gate Training */
+#define PIR_WLADJ              BIT(11)         /* Write Leveling Adjust */
+#define PIR_RDDSKW             BIT(12)         /* Read Data Bit Deskew */
+#define PIR_WRDSKW             BIT(13)         /* Write Data Bit Deskew */
+#define PIR_RDEYE              BIT(14)         /* Read Data Eye Training */
+#define PIR_WREYE              BIT(15)         /* Write Data Eye Training */
+#define PIR_LOCKBYP            BIT(28)         /* PLL Lock Bypass */
+#define PIR_DCALBYP            BIT(29)         /* DDL Calibration Bypass */
+#define PIR_ZCALBYP            BIT(30)         /* Impedance Calib Bypass */
+#define PIR_INITBYP            BIT(31)         /* Initialization Bypass */
+
+#define PGSR0_IDONE            BIT(0)          /* Initialization Done */
+#define PGSR0_PLDONE           BIT(1)          /* PLL Lock Done */
+#define PGSR0_DCDONE           BIT(2)          /* DDL Calibration Done */
+#define PGSR0_ZCDONE           BIT(3)          /* Impedance Calibration Done */
+#define PGSR0_DIDONE           BIT(4)          /* DRAM Initialization Done */
+#define PGSR0_WLDONE           BIT(5)          /* Write Leveling Done */
+#define PGSR0_QSGDONE          BIT(6)          /* DQS Gate Training Done */
+#define PGSR0_WLADONE          BIT(7)          /* Write Leveling Adjust Done */
+#define PGSR0_RDDONE           BIT(8)          /* Read Bit Deskew Done */
+#define PGSR0_WDDONE           BIT(9)          /* Write Bit Deskew Done */
+#define PGSR0_REDONE           BIT(10)         /* Read Eye Training Done */
+#define PGSR0_WEDONE           BIT(11)         /* Write Eye Training Done */
+#define PGSR0_IERR             BIT(16)         /* Initialization Error */
+#define PGSR0_PLERR            BIT(17)         /* PLL Lock Error */
+#define PGSR0_DCERR            BIT(18)         /* DDL Calibration Error */
+#define PGSR0_ZCERR            BIT(19)         /* Impedance Calib Error */
+#define PGSR0_DIERR            BIT(20)         /* DRAM Initialization Error */
+#define PGSR0_WLERR            BIT(21)         /* Write Leveling Error */
+#define PGSR0_QSGERR           BIT(22)         /* DQS Gate Training Error */
+#define PGSR0_WLAERR           BIT(23)         /* Write Leveling Adj Error */
+#define PGSR0_RDERR            BIT(24)         /* Read Bit Deskew Error */
+#define PGSR0_WDERR            BIT(25)         /* Write Bit Deskew Error */
+#define PGSR0_REERR            BIT(26)         /* Read Eye Training Error */
+#define PGSR0_WEERR            BIT(27)         /* Write Eye Training Error */
 #define PGSR0_DTERR_SHIFT      28              /* Data Training Error Status*/
 #define PGSR0_DTERR            (7 << (PGSR0_DTERR_SHIFT))
-#define PGSR0_APLOCK           (1 << 31)       /* AC PLL Lock */
+#define PGSR0_APLOCK           BIT(31)         /* AC PLL Lock */
 
 #define DXCCR_DQSRES_OPEN      (0 << 5)
 #define DXCCR_DQSRES_688_OHM   (1 << 5)
@@ -146,9 +147,9 @@ struct ddrphy {
 
 #define DTCR_DTRANK_SHIFT      4               /* Data Training Rank */
 #define DTCR_DTRANK_MASK       (0x3 << (DTCR_DTRANK_SHIFT))
-#define DTCR_DTMPR             (1 << 6)        /* Data Training using MPR */
-#define DTCR_RNKEN_SHIFT       24              /* Rank Enable */
-#define DTCR_RNKEN_MASK                (0xf << (DTCR_RNKEN_SHIFT))
+#define DTCR_DTMPR             BIT(6)          /* Data Training using MPR */
+#define DTCR_RANKEN_SHIFT      24              /* Rank Enable */
+#define DTCR_RANKEN_MASK       (0xf << (DTCR_RANKEN_SHIFT))
 
 #define DXGCR_WLRKEN_SHIFT     26              /* Write Level Rank Enable */
 #define DXGCR_WLRKEN_MASK      (0xf << (DXGCR_WLRKEN_SHIFT))
index 5108eddfc48f9bf754cb4c54878ae35718c3e5e4..27ae27dc9f4f957c442fe6b661b3eaaf47b26224 100644 (file)
@@ -20,7 +20,7 @@ struct uniphier_board_data {
        unsigned int  dram_freq;
 };
 
-const struct uniphier_board_data *uniphier_get_board_param(const void *fdt);
+const struct uniphier_board_data *uniphier_get_board_param(void);
 
 int ph1_sld3_init(const struct uniphier_board_data *bd);
 int ph1_ld4_init(const struct uniphier_board_data *bd);
index 623e7ef20eec36daea4de6d8a9fad533d50becaa..3cfd1e9d6e0a5330c415cdd30078f1e831f86aa9 100644 (file)
@@ -15,6 +15,8 @@ enum uniphier_soc_id {
        SOC_UNIPHIER_PH1_PRO5,
        SOC_UNIPHIER_PROXSTREAM2,
        SOC_UNIPHIER_PH1_LD6B,
+       SOC_UNIPHIER_PH1_SLD11,
+       SOC_UNIPHIER_PH1_LD10,
        SOC_UNIPHIER_UNKNOWN,
 };
 
@@ -25,7 +27,9 @@ enum uniphier_soc_id {
        IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_SLD8) +     \
        IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_PRO5) +     \
        IS_ENABLED(CONFIG_ARCH_UNIPHIER_PROXSTREAM2) +  \
-       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_LD6B) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_SLD11) + \
+       IS_ENABLED(CONFIG_ARCH_UNIPHIER_PH1_LD10)
 
 #define UNIPHIER_MULTI_SOC     ((UNIPHIER_NR_ENABLED_SOCS) > 1)
 
@@ -55,9 +59,18 @@ static inline enum uniphier_soc_id uniphier_get_soc_type(void)
 #if defined(CONFIG_ARCH_UNIPHIER_PH1_LD6B)
        return SOC_UNIPHIER_PH1_LD6B;
 #endif
+#if defined(CONFIG_ARCH_UNIPHIER_PH1_SLD11)
+       return SOC_UNIPHIER_PH1_SLD11;
+#endif
+#if defined(CONFIG_ARCH_UNIPHIER_PH1_LD10)
+       return SOC_UNIPHIER_PH1_LD10;
+#endif
 
        return SOC_UNIPHIER_UNKNOWN;
 }
 #endif
 
+int uniphier_get_soc_model(void);
+int uniphier_get_soc_revision(void);
+
 #endif /* __MACH_SOC_INFO_H__ */
index bbfc8e5e085994cccddd064910268c4527202563..eda169e3740c4f1fb97ff8fecb8ca5242c6052eb 100644 (file)
@@ -9,13 +9,11 @@
 #include <mach/init.h>
 #include <mach/soc_info.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 void spl_board_init(void)
 {
        const struct uniphier_board_data *param;
 
-       param = uniphier_get_board_param(gd->fdt_blob);
+       param = uniphier_get_board_param();
        if (!param)
                hang();
 
index 3e8e7f4ef33bdf838cb0dd6d45fdf14e40341efc..6cdeae65784754f60a2e693624820096e3a3b8d4 100644 (file)
@@ -50,6 +50,16 @@ enum uniphier_soc_id uniphier_get_soc_type(void)
        case 0x2F:
                ret = SOC_UNIPHIER_PH1_LD6B;
                break;
+#endif
+#ifdef CONFIG_ARCH_UNIPHIER_PH1_SLD11
+       case 0x31:
+               ret = SOC_UNIPHIER_PH1_SLD11;
+               break;
+#endif
+#ifdef CONFIG_ARCH_UNIPHIER_PH1_LD10
+       case 0x32:
+               ret = SOC_UNIPHIER_PH1_LD10;
+               break;
 #endif
        default:
                ret = SOC_UNIPHIER_UNKNOWN;
@@ -59,3 +69,15 @@ enum uniphier_soc_id uniphier_get_soc_type(void)
        return ret;
 }
 #endif
+
+int uniphier_get_soc_model(void)
+{
+       return (readl(SG_REVISION) & SG_REVISION_MODEL_MASK) >>
+                                               SG_REVISION_MODEL_SHIFT;
+}
+
+int uniphier_get_soc_revision(void)
+{
+       return (readl(SG_REVISION) & SG_REVISION_REV_MASK) >>
+                                               SG_REVISION_REV_SHIFT;
+}
diff --git a/arch/arm/mach-uniphier/umc/Makefile b/arch/arm/mach-uniphier/umc/Makefile
deleted file mode 100644 (file)
index 89b2dec..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_LD4)    += umc-ph1-ld4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_PRO4)   += umc-ph1-pro4.o
-obj-$(CONFIG_ARCH_UNIPHIER_PH1_SLD8)   += umc-ph1-sld8.o
diff --git a/arch/arm/mach-uniphier/umc/umc-ph1-ld4.c b/arch/arm/mach-uniphier/umc/umc-ph1-ld4.c
deleted file mode 100644 (file)
index 8124685..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <linux/err.h>
-#include <linux/io.h>
-#include <linux/sizes.h>
-#include <mach/init.h>
-#include <mach/umc-regs.h>
-#include <mach/ddrphy-regs.h>
-
-static void umc_start_ssif(void __iomem *ssif_base)
-{
-       writel(0x00000000, ssif_base + 0x0000b004);
-       writel(0xffffffff, ssif_base + 0x0000c004);
-       writel(0x000fffcf, ssif_base + 0x0000c008);
-       writel(0x00000001, ssif_base + 0x0000b000);
-       writel(0x00000001, ssif_base + 0x0000c000);
-       writel(0x03010101, ssif_base + UMC_MDMCHSEL);
-       writel(0x03010100, ssif_base + UMC_DMDCHSEL);
-
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_FETCH);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_WC);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_RC);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_DST);
-
-       writel(0x00000001, ssif_base + UMC_CPURST);
-       writel(0x00000001, ssif_base + UMC_IDSRST);
-       writel(0x00000001, ssif_base + UMC_IXMRST);
-       writel(0x00000001, ssif_base + UMC_MDMRST);
-       writel(0x00000001, ssif_base + UMC_MDDRST);
-       writel(0x00000001, ssif_base + UMC_SIORST);
-       writel(0x00000001, ssif_base + UMC_VIORST);
-       writel(0x00000001, ssif_base + UMC_FRCRST);
-       writel(0x00000001, ssif_base + UMC_RGLRST);
-       writel(0x00000001, ssif_base + UMC_AIORST);
-       writel(0x00000001, ssif_base + UMC_DMDRST);
-}
-
-static void umc_dramcont_init(void __iomem *dramcont, void __iomem *ca_base,
-                             int size, int freq)
-{
-       if (freq == 1333) {
-               writel(0x45990b11, dramcont + UMC_CMDCTLA);
-               writel(0x16958924, dramcont + UMC_CMDCTLB);
-               writel(0x5101046A, dramcont + UMC_INITCTLA);
-
-               if (size == 1)
-                       writel(0x27028B0A, dramcont + UMC_INITCTLB);
-               else if (size == 2)
-                       writel(0x38028B0A, dramcont + UMC_INITCTLB);
-
-               writel(0x000FF0FF, dramcont + UMC_INITCTLC);
-               writel(0x00000b51, dramcont + UMC_DRMMR0);
-       } else if (freq == 1600) {
-               writel(0x36BB0F17, dramcont + UMC_CMDCTLA);
-               writel(0x18C6AA24, dramcont + UMC_CMDCTLB);
-               writel(0x5101387F, dramcont + UMC_INITCTLA);
-
-               if (size == 1)
-                       writel(0x2F030D3F, dramcont + UMC_INITCTLB);
-               else if (size == 2)
-                       writel(0x43030D3F, dramcont + UMC_INITCTLB);
-
-               writel(0x00FF00FF, dramcont + UMC_INITCTLC);
-               writel(0x00000d71, dramcont + UMC_DRMMR0);
-       }
-
-       writel(0x00000006, dramcont + UMC_DRMMR1);
-
-       if (freq == 1333)
-               writel(0x00000290, dramcont + UMC_DRMMR2);
-       else if (freq == 1600)
-               writel(0x00000298, dramcont + UMC_DRMMR2);
-
-       writel(0x00000800, dramcont + UMC_DRMMR3);
-
-       if (freq == 1333) {
-               if (size == 1)
-                       writel(0x00240512, dramcont + UMC_SPCCTLA);
-               else if (size == 2)
-                       writel(0x00350512, dramcont + UMC_SPCCTLA);
-
-               writel(0x00ff0006, dramcont + UMC_SPCCTLB);
-               writel(0x000a00ac, dramcont + UMC_RDATACTL_D0);
-       } else if (freq == 1600) {
-               if (size == 1)
-                       writel(0x002B0617, dramcont + UMC_SPCCTLA);
-               else if (size == 2)
-                       writel(0x003F0617, dramcont + UMC_SPCCTLA);
-
-               writel(0x00ff0008, dramcont + UMC_SPCCTLB);
-               writel(0x000c00ae, dramcont + UMC_RDATACTL_D0);
-       }
-
-       writel(0x04060806, dramcont + UMC_WDATACTL_D0);
-       writel(0x04a02000, dramcont + UMC_DATASET);
-       writel(0x00000000, ca_base + 0x2300);
-       writel(0x00400020, dramcont + UMC_DCCGCTL);
-       writel(0x00000003, dramcont + 0x7000);
-       writel(0x0000000f, dramcont + 0x8000);
-       writel(0x000000c3, dramcont + 0x8004);
-       writel(0x00000071, dramcont + 0x8008);
-       writel(0x0000003b, dramcont + UMC_DICGCTLA);
-       writel(0x020a0808, dramcont + UMC_DICGCTLB);
-       writel(0x00000004, dramcont + UMC_FLOWCTLG);
-       writel(0x80000201, ca_base + 0xc20);
-       writel(0x0801e01e, dramcont + UMC_FLOWCTLA);
-       writel(0x00200000, dramcont + UMC_FLOWCTLB);
-       writel(0x00004444, dramcont + UMC_FLOWCTLC);
-       writel(0x200a0a00, dramcont + UMC_SPCSETB);
-       writel(0x00000000, dramcont + UMC_SPCSETD);
-       writel(0x00000520, dramcont + UMC_DFICUPDCTLA);
-}
-
-static int umc_init_sub(int freq, int size_ch0, int size_ch1)
-{
-       void __iomem *ssif_base = (void __iomem *)UMC_SSIF_BASE;
-       void __iomem *ca_base0 = (void __iomem *)UMC_CA_BASE(0);
-       void __iomem *ca_base1 = (void __iomem *)UMC_CA_BASE(1);
-       void __iomem *dramcont0 = (void __iomem *)UMC_DRAMCONT_BASE(0);
-       void __iomem *dramcont1 = (void __iomem *)UMC_DRAMCONT_BASE(1);
-       void __iomem *phy0_0 = (void __iomem *)DDRPHY_BASE(0, 0);
-       void __iomem *phy1_0 = (void __iomem *)DDRPHY_BASE(1, 0);
-
-       umc_dram_init_start(dramcont0);
-       umc_dram_init_start(dramcont1);
-       umc_dram_init_poll(dramcont0);
-       umc_dram_init_poll(dramcont1);
-
-       writel(0x00000101, dramcont0 + UMC_DIOCTLA);
-
-       ph1_ld4_ddrphy_init(phy0_0, freq, size_ch0);
-
-       ddrphy_prepare_training(phy0_0, 0);
-       ddrphy_training(phy0_0);
-
-       writel(0x00000101, dramcont1 + UMC_DIOCTLA);
-
-       ph1_ld4_ddrphy_init(phy1_0, freq, size_ch1);
-
-       ddrphy_prepare_training(phy1_0, 1);
-       ddrphy_training(phy1_0);
-
-       umc_dramcont_init(dramcont0, ca_base0, size_ch0, freq);
-       umc_dramcont_init(dramcont1, ca_base1, size_ch1, freq);
-
-       umc_start_ssif(ssif_base);
-
-       return 0;
-}
-
-int ph1_ld4_umc_init(const struct uniphier_board_data *bd)
-{
-       if ((bd->dram_ch0_size == SZ_128M || bd->dram_ch0_size == SZ_256M) &&
-           (bd->dram_ch1_size == SZ_128M || bd->dram_ch1_size == SZ_256M) &&
-           (bd->dram_freq == 1333 || bd->dram_freq == 1600) &&
-           bd->dram_ch0_width == 16 && bd->dram_ch1_width == 16) {
-               return umc_init_sub(bd->dram_freq,
-                                   bd->dram_ch0_size / SZ_128M,
-                                   bd->dram_ch1_size / SZ_128M);
-       } else {
-               pr_err("Unsupported DDR configuration\n");
-               return -EINVAL;
-       }
-}
diff --git a/arch/arm/mach-uniphier/umc/umc-ph1-pro4.c b/arch/arm/mach-uniphier/umc/umc-ph1-pro4.c
deleted file mode 100644 (file)
index 8c9f057..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <linux/err.h>
-#include <linux/io.h>
-#include <linux/sizes.h>
-#include <mach/init.h>
-#include <mach/umc-regs.h>
-#include <mach/ddrphy-regs.h>
-
-static void umc_start_ssif(void __iomem *ssif_base)
-{
-       writel(0x00000001, ssif_base + 0x0000b004);
-       writel(0xffffffff, ssif_base + 0x0000c004);
-       writel(0x07ffffff, ssif_base + 0x0000c008);
-       writel(0x00000001, ssif_base + 0x0000b000);
-       writel(0x00000001, ssif_base + 0x0000c000);
-
-       writel(0x03010100, ssif_base + UMC_HDMCHSEL);
-       writel(0x03010101, ssif_base + UMC_MDMCHSEL);
-       writel(0x03010100, ssif_base + UMC_DVCCHSEL);
-       writel(0x03010100, ssif_base + UMC_DMDCHSEL);
-
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_FETCH);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_WC);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_RC);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_DST);
-       writel(0x00000000, ssif_base + 0x0000c044);             /* DCGIV_SSIF_REG */
-
-       writel(0x00000001, ssif_base + UMC_CPURST);
-       writel(0x00000001, ssif_base + UMC_IDSRST);
-       writel(0x00000001, ssif_base + UMC_IXMRST);
-       writel(0x00000001, ssif_base + UMC_HDMRST);
-       writel(0x00000001, ssif_base + UMC_MDMRST);
-       writel(0x00000001, ssif_base + UMC_HDDRST);
-       writel(0x00000001, ssif_base + UMC_MDDRST);
-       writel(0x00000001, ssif_base + UMC_SIORST);
-       writel(0x00000001, ssif_base + UMC_GIORST);
-       writel(0x00000001, ssif_base + UMC_HD2RST);
-       writel(0x00000001, ssif_base + UMC_VIORST);
-       writel(0x00000001, ssif_base + UMC_DVCRST);
-       writel(0x00000001, ssif_base + UMC_RGLRST);
-       writel(0x00000001, ssif_base + UMC_VPERST);
-       writel(0x00000001, ssif_base + UMC_AIORST);
-       writel(0x00000001, ssif_base + UMC_DMDRST);
-}
-
-static void umc_dramcont_init(void __iomem *dramcont, void __iomem *ca_base,
-                             int size, int freq)
-{
-       writel(0x66bb0f17, dramcont + UMC_CMDCTLA);
-       writel(0x18c6aa44, dramcont + UMC_CMDCTLB);
-       writel(0x5101387f, dramcont + UMC_INITCTLA);
-       writel(0x43030d3f, dramcont + UMC_INITCTLB);
-       writel(0x00ff00ff, dramcont + UMC_INITCTLC);
-       writel(0x00000d71, dramcont + UMC_DRMMR0);
-       writel(0x00000006, dramcont + UMC_DRMMR1);
-       writel(0x00000298, dramcont + UMC_DRMMR2);
-       writel(0x00000000, dramcont + UMC_DRMMR3);
-       writel(0x003f0617, dramcont + UMC_SPCCTLA);
-       writel(0x00ff0008, dramcont + UMC_SPCCTLB);
-       writel(0x000c00ae, dramcont + UMC_RDATACTL_D0);
-       writel(0x000c00ae, dramcont + UMC_RDATACTL_D1);
-       writel(0x04060802, dramcont + UMC_WDATACTL_D0);
-       writel(0x04060802, dramcont + UMC_WDATACTL_D1);
-       writel(0x04a02000, dramcont + UMC_DATASET);
-       writel(0x00000000, ca_base + 0x2300);
-       writel(0x00400020, dramcont + UMC_DCCGCTL);
-       writel(0x0000000f, dramcont + 0x7000);
-       writel(0x0000000f, dramcont + 0x8000);
-       writel(0x000000c3, dramcont + 0x8004);
-       writel(0x00000071, dramcont + 0x8008);
-       writel(0x00000004, dramcont + UMC_FLOWCTLG);
-       writel(0x00000000, dramcont + 0x0060);
-       writel(0x80000201, ca_base + 0xc20);
-       writel(0x0801e01e, dramcont + UMC_FLOWCTLA);
-       writel(0x00200000, dramcont + UMC_FLOWCTLB);
-       writel(0x00004444, dramcont + UMC_FLOWCTLC);
-       writel(0x200a0a00, dramcont + UMC_SPCSETB);
-       writel(0x00010000, dramcont + UMC_SPCSETD);
-       writel(0x80000020, dramcont + UMC_DFICUPDCTLA);
-}
-
-static int umc_init_sub(int freq, int size_ch0, int size_ch1)
-{
-       void __iomem *ssif_base = (void __iomem *)UMC_SSIF_BASE;
-       void __iomem *ca_base0 = (void __iomem *)UMC_CA_BASE(0);
-       void __iomem *ca_base1 = (void __iomem *)UMC_CA_BASE(1);
-       void __iomem *dramcont0 = (void __iomem *)UMC_DRAMCONT_BASE(0);
-       void __iomem *dramcont1 = (void __iomem *)UMC_DRAMCONT_BASE(1);
-       void __iomem *phy0_0 = (void __iomem *)DDRPHY_BASE(0, 0);
-       void __iomem *phy0_1 = (void __iomem *)DDRPHY_BASE(0, 1);
-       void __iomem *phy1_0 = (void __iomem *)DDRPHY_BASE(1, 0);
-       void __iomem *phy1_1 = (void __iomem *)DDRPHY_BASE(1, 1);
-
-       umc_dram_init_start(dramcont0);
-       umc_dram_init_start(dramcont1);
-       umc_dram_init_poll(dramcont0);
-       umc_dram_init_poll(dramcont1);
-
-       writel(0x00000101, dramcont0 + UMC_DIOCTLA);
-
-       ph1_pro4_ddrphy_init(phy0_0, freq, size_ch0);
-
-       ddrphy_prepare_training(phy0_0, 0);
-       ddrphy_training(phy0_0);
-
-       writel(0x00000103, dramcont0 + UMC_DIOCTLA);
-
-       ph1_pro4_ddrphy_init(phy0_1, freq, size_ch0);
-
-       ddrphy_prepare_training(phy0_1, 1);
-       ddrphy_training(phy0_1);
-
-       writel(0x00000101, dramcont1 + UMC_DIOCTLA);
-
-       ph1_pro4_ddrphy_init(phy1_0, freq, size_ch1);
-
-       ddrphy_prepare_training(phy1_0, 0);
-       ddrphy_training(phy1_0);
-
-       writel(0x00000103, dramcont1 + UMC_DIOCTLA);
-
-       ph1_pro4_ddrphy_init(phy1_1, freq, size_ch1);
-
-       ddrphy_prepare_training(phy1_1, 1);
-       ddrphy_training(phy1_1);
-
-       umc_dramcont_init(dramcont0, ca_base0, size_ch0, freq);
-       umc_dramcont_init(dramcont1, ca_base1, size_ch1, freq);
-
-       umc_start_ssif(ssif_base);
-
-       return 0;
-}
-
-int ph1_pro4_umc_init(const struct uniphier_board_data *bd)
-{
-       if (((bd->dram_ch0_size == SZ_512M && bd->dram_ch0_width == 32) ||
-            (bd->dram_ch0_size == SZ_256M && bd->dram_ch0_width == 16)) &&
-           ((bd->dram_ch1_size == SZ_512M && bd->dram_ch1_width == 32) ||
-            (bd->dram_ch1_size == SZ_256M && bd->dram_ch1_width == 16)) &&
-           bd->dram_freq == 1600) {
-               return umc_init_sub(bd->dram_freq,
-                                   bd->dram_ch0_size / SZ_128M,
-                                   bd->dram_ch1_size / SZ_128M);
-       } else {
-               pr_err("Unsupported DDR configuration\n");
-               return -EINVAL;
-       }
-}
diff --git a/arch/arm/mach-uniphier/umc/umc-ph1-sld8.c b/arch/arm/mach-uniphier/umc/umc-ph1-sld8.c
deleted file mode 100644 (file)
index bc60a34..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2011-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <linux/err.h>
-#include <linux/io.h>
-#include <linux/sizes.h>
-#include <mach/init.h>
-#include <mach/umc-regs.h>
-#include <mach/ddrphy-regs.h>
-
-static void umc_start_ssif(void __iomem *ssif_base)
-{
-       writel(0x00000000, ssif_base + 0x0000b004);
-       writel(0xffffffff, ssif_base + 0x0000c004);
-       writel(0x000fffcf, ssif_base + 0x0000c008);
-       writel(0x00000001, ssif_base + 0x0000b000);
-       writel(0x00000001, ssif_base + 0x0000c000);
-       writel(0x03010101, ssif_base + UMC_MDMCHSEL);
-       writel(0x03010100, ssif_base + UMC_DMDCHSEL);
-
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_FETCH);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC0);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMQUE1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMWC1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_COMRC1);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_WC);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_RC);
-       writel(0x00000000, ssif_base + UMC_CLKEN_SSIF_DST);
-
-       writel(0x00000001, ssif_base + UMC_CPURST);
-       writel(0x00000001, ssif_base + UMC_IDSRST);
-       writel(0x00000001, ssif_base + UMC_IXMRST);
-       writel(0x00000001, ssif_base + UMC_MDMRST);
-       writel(0x00000001, ssif_base + UMC_MDDRST);
-       writel(0x00000001, ssif_base + UMC_SIORST);
-       writel(0x00000001, ssif_base + UMC_VIORST);
-       writel(0x00000001, ssif_base + UMC_FRCRST);
-       writel(0x00000001, ssif_base + UMC_RGLRST);
-       writel(0x00000001, ssif_base + UMC_AIORST);
-       writel(0x00000001, ssif_base + UMC_DMDRST);
-}
-
-static void umc_dramcont_init(void __iomem *dramcont, void __iomem *ca_base,
-                             int size, int freq)
-{
-#ifdef CONFIG_DDR_STANDARD
-       writel(0x55990b11, dramcont + UMC_CMDCTLA);
-       writel(0x16958944, dramcont + UMC_CMDCTLB);
-#else
-       writel(0x45990b11, dramcont + UMC_CMDCTLA);
-       writel(0x16958924, dramcont + UMC_CMDCTLB);
-#endif
-
-       writel(0x5101046A, dramcont + UMC_INITCTLA);
-
-       if (size == 1)
-               writel(0x27028B0A, dramcont + UMC_INITCTLB);
-       else if (size == 2)
-               writel(0x38028B0A, dramcont + UMC_INITCTLB);
-
-       writel(0x00FF00FF, dramcont + UMC_INITCTLC);
-       writel(0x00000b51, dramcont + UMC_DRMMR0);
-       writel(0x00000006, dramcont + UMC_DRMMR1);
-       writel(0x00000290, dramcont + UMC_DRMMR2);
-
-#ifdef CONFIG_DDR_STANDARD
-       writel(0x00000000, dramcont + UMC_DRMMR3);
-#else
-       writel(0x00000800, dramcont + UMC_DRMMR3);
-#endif
-
-       if (size == 1)
-               writel(0x00240512, dramcont + UMC_SPCCTLA);
-       else if (size == 2)
-               writel(0x00350512, dramcont + UMC_SPCCTLA);
-
-       writel(0x00ff0006, dramcont + UMC_SPCCTLB);
-       writel(0x000a00ac, dramcont + UMC_RDATACTL_D0);
-       writel(0x04060806, dramcont + UMC_WDATACTL_D0);
-       writel(0x04a02000, dramcont + UMC_DATASET);
-       writel(0x00000000, ca_base + 0x2300);
-       writel(0x00400020, dramcont + UMC_DCCGCTL);
-       writel(0x00000003, dramcont + 0x7000);
-       writel(0x0000004f, dramcont + 0x8000);
-       writel(0x000000c3, dramcont + 0x8004);
-       writel(0x00000077, dramcont + 0x8008);
-       writel(0x0000003b, dramcont + UMC_DICGCTLA);
-       writel(0x020a0808, dramcont + UMC_DICGCTLB);
-       writel(0x00000004, dramcont + UMC_FLOWCTLG);
-       writel(0x80000201, ca_base + 0xc20);
-       writel(0x0801e01e, dramcont + UMC_FLOWCTLA);
-       writel(0x00200000, dramcont + UMC_FLOWCTLB);
-       writel(0x00004444, dramcont + UMC_FLOWCTLC);
-       writel(0x200a0a00, dramcont + UMC_SPCSETB);
-       writel(0x00000000, dramcont + UMC_SPCSETD);
-       writel(0x00000520, dramcont + UMC_DFICUPDCTLA);
-}
-
-static int umc_init_sub(int freq, int size_ch0, int size_ch1)
-{
-       void __iomem *ssif_base = (void __iomem *)UMC_SSIF_BASE;
-       void __iomem *ca_base0 = (void __iomem *)UMC_CA_BASE(0);
-       void __iomem *ca_base1 = (void __iomem *)UMC_CA_BASE(1);
-       void __iomem *dramcont0 = (void __iomem *)UMC_DRAMCONT_BASE(0);
-       void __iomem *dramcont1 = (void __iomem *)UMC_DRAMCONT_BASE(1);
-       void __iomem *phy0_0 = (void __iomem *)DDRPHY_BASE(0, 0);
-       void __iomem *phy1_0 = (void __iomem *)DDRPHY_BASE(1, 0);
-
-       umc_dram_init_start(dramcont0);
-       umc_dram_init_start(dramcont1);
-       umc_dram_init_poll(dramcont0);
-       umc_dram_init_poll(dramcont1);
-
-       writel(0x00000101, dramcont0 + UMC_DIOCTLA);
-
-       ph1_sld8_ddrphy_init(phy0_0, freq, size_ch0);
-
-       ddrphy_prepare_training(phy0_0, 0);
-       ddrphy_training(phy0_0);
-
-       writel(0x00000101, dramcont1 + UMC_DIOCTLA);
-
-       ph1_sld8_ddrphy_init(phy1_0, freq, size_ch1);
-
-       ddrphy_prepare_training(phy1_0, 1);
-       ddrphy_training(phy1_0);
-
-       umc_dramcont_init(dramcont0, ca_base0, size_ch0, freq);
-       umc_dramcont_init(dramcont1, ca_base1, size_ch1, freq);
-
-       umc_start_ssif(ssif_base);
-
-       return 0;
-}
-
-int ph1_sld8_umc_init(const struct uniphier_board_data *bd)
-{
-       if ((bd->dram_ch0_size == SZ_128M || bd->dram_ch0_size == SZ_256M) &&
-           (bd->dram_ch1_size == SZ_128M || bd->dram_ch1_size == SZ_256M) &&
-           bd->dram_freq == 1333 &&
-           bd->dram_ch0_width == 16 && bd->dram_ch1_width == 16) {
-               return umc_init_sub(bd->dram_freq,
-                                   bd->dram_ch0_size / SZ_128M,
-                                   bd->dram_ch1_size / SZ_128M);
-       } else {
-               pr_err("Unsupported DDR configuration\n");
-               return -EINVAL;
-       }
-}
index 57acc20d03efe6038fa4933f85d2c9454c0cf98a..131c3415aa3287611532428b862dd900f72b5cef 100644 (file)
@@ -25,6 +25,7 @@ F:    configs/A13-OLinuXinoM_defconfig
 F:     configs/Auxtek-T003_defconfig
 F:     configs/Auxtek-T004_defconfig
 F:     configs/CHIP_defconfig
+F:     configs/Empire_electronix_d709_defconfig
 F:     configs/inet98v_rev2_defconfig
 F:     configs/mk802_a10s_defconfig
 F:     configs/q8_a13_tablet_defconfig
index f616388c8e7eda8dd0ad24390e61a5d74da10410..001d31bad56df5de9b4573bcba19e9be69b06df4 100644 (file)
@@ -3,6 +3,9 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN7I=y
 CONFIG_DRAM_CLK=480
 CONFIG_MMC0_CD_PIN="PH1"
+CONFIG_MMC3_CD_PIN="PH0"
+CONFIG_MMC3_PINS="PH"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=3
 CONFIG_USB0_VBUS_PIN="PB9"
 CONFIG_USB0_VBUS_DET="PH5"
 CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"
diff --git a/configs/Empire_electronix_d709_defconfig b/configs/Empire_electronix_d709_defconfig
new file mode 100644 (file)
index 0000000..5973fbf
--- /dev/null
@@ -0,0 +1,24 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN5I=y
+CONFIG_DRAM_CLK=432
+CONFIG_DRAM_EMR1=0
+CONFIG_MMC0_CD_PIN="PG0"
+CONFIG_USB0_VBUS_PIN="PG12"
+CONFIG_USB0_VBUS_DET="PG1"
+CONFIG_USB0_ID_DET="PG2"
+CONFIG_AXP_GPIO=y
+# CONFIG_VIDEO_HDMI is not set
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:45,ri:210,up:22,lo:22,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_POWER="AXP0-0"
+CONFIG_VIDEO_LCD_BL_EN="AXP0-1"
+CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-empire-electronix-d709"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=2"
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+CONFIG_USB_MUSB_HOST=y
index 5689cff7a94a8f7ef4476cb239390e1bd9f66832..806fb6476b79c63306c5c2ff678e8323f8801b6a 100644 (file)
@@ -9,4 +9,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
+CONFIG_SUNXI_NO_PMIC=y
 CONFIG_USB_EHCI_HCD=y
index 3c65c834f14102bbfb89134214b2f30562265cc6..a208a27c214c0f47d0bb9b7ec5557618d64466a0 100644 (file)
@@ -21,7 +21,6 @@ CONFIG_ETH_DESIGNWARE=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_OHCI_GENERIC=y
 CONFIG_USB_STORAGE=y
 CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/ph1_ld4_defconfig b/configs/ph1_ld4_defconfig
deleted file mode 100644 (file)
index 2ddd1eb..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_UNIPHIER=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_ARCH_UNIPHIER_PH1_LD4=y
-CONFIG_MICRO_SUPPORT_CARD=y
-CONFIG_SYS_TEXT_BASE=0x84000000
-CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-ld4-ref"
-CONFIG_HUSH_PARSER=y
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-CONFIG_CMD_NAND=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-# CONFIG_CMD_FPGA is not set
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-# CONFIG_CMD_MISC is not set
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_SIMPLE_BUS=y
-CONFIG_NAND_DENALI=y
-CONFIG_SYS_NAND_DENALI_64BIT=y
-CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
-CONFIG_SPL_NAND_DENALI=y
-CONFIG_PINCTRL=y
-CONFIG_SPL_PINCTRL=y
-CONFIG_UNIPHIER_SERIAL=y
-CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_STORAGE=y
diff --git a/configs/ph1_ld6b_defconfig b/configs/ph1_ld6b_defconfig
deleted file mode 100644 (file)
index bbcb344..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_UNIPHIER=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_ARCH_UNIPHIER_PH1_LD6B=y
-CONFIG_MICRO_SUPPORT_CARD=y
-CONFIG_SYS_TEXT_BASE=0x84000000
-CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-ld6b-ref"
-CONFIG_HUSH_PARSER=y
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-CONFIG_CMD_NAND=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-# CONFIG_CMD_FPGA is not set
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-# CONFIG_CMD_MISC is not set
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_SIMPLE_BUS=y
-CONFIG_NAND_DENALI=y
-CONFIG_SYS_NAND_DENALI_64BIT=y
-CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
-CONFIG_SPL_NAND_DENALI=y
-CONFIG_PINCTRL=y
-CONFIG_SPL_PINCTRL=y
-CONFIG_UNIPHIER_SERIAL=y
-CONFIG_USB=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_STORAGE=y
diff --git a/configs/ph1_pro4_defconfig b/configs/ph1_pro4_defconfig
deleted file mode 100644 (file)
index 2361db6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_UNIPHIER=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_ARCH_UNIPHIER_PH1_PRO4=y
-CONFIG_MICRO_SUPPORT_CARD=y
-CONFIG_SYS_TEXT_BASE=0x84000000
-CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-pro4-ref"
-CONFIG_HUSH_PARSER=y
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-CONFIG_CMD_NAND=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-# CONFIG_CMD_FPGA is not set
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-# CONFIG_CMD_MISC is not set
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_SIMPLE_BUS=y
-CONFIG_NAND_DENALI=y
-CONFIG_SYS_NAND_DENALI_64BIT=y
-CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
-CONFIG_SPL_NAND_DENALI=y
-CONFIG_PINCTRL=y
-CONFIG_SPL_PINCTRL=y
-CONFIG_UNIPHIER_SERIAL=y
-CONFIG_USB=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_STORAGE=y
diff --git a/configs/ph1_pro5_defconfig b/configs/ph1_pro5_defconfig
deleted file mode 100644 (file)
index be0d7b5..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_UNIPHIER=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_ARCH_UNIPHIER_PH1_PRO5=y
-CONFIG_MICRO_SUPPORT_CARD=y
-CONFIG_SYS_TEXT_BASE=0x84000000
-CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-pro5-4kbox"
-CONFIG_HUSH_PARSER=y
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-CONFIG_CMD_NAND=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-# CONFIG_CMD_FPGA is not set
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-# CONFIG_CMD_MISC is not set
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_SIMPLE_BUS=y
-CONFIG_NAND_DENALI=y
-CONFIG_SYS_NAND_DENALI_64BIT=y
-CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
-CONFIG_SPL_NAND_DENALI=y
-CONFIG_PINCTRL=y
-CONFIG_SPL_PINCTRL=y
-CONFIG_UNIPHIER_SERIAL=y
-CONFIG_USB=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_STORAGE=y
diff --git a/configs/ph1_sld3_defconfig b/configs/ph1_sld3_defconfig
deleted file mode 100644 (file)
index 4b871d0..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_UNIPHIER=y
-CONFIG_ARCH_UNIPHIER_PH1_SLD3=y
-CONFIG_MICRO_SUPPORT_CARD=y
-CONFIG_SYS_TEXT_BASE=0x84000000
-CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-sld3-ref"
-CONFIG_HUSH_PARSER=y
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-CONFIG_CMD_NAND=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-# CONFIG_CMD_FPGA is not set
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-# CONFIG_CMD_MISC is not set
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_NAND_DENALI=y
-CONFIG_SYS_NAND_DENALI_64BIT=y
-CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
-CONFIG_SPL_NAND_DENALI=y
-CONFIG_UNIPHIER_SERIAL=y
-CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_STORAGE=y
diff --git a/configs/ph1_sld8_defconfig b/configs/ph1_sld8_defconfig
deleted file mode 100644 (file)
index 4474ec3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_UNIPHIER=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_ARCH_UNIPHIER_PH1_SLD8=y
-CONFIG_MICRO_SUPPORT_CARD=y
-CONFIG_SYS_TEXT_BASE=0x84000000
-CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-sld8-ref"
-CONFIG_HUSH_PARSER=y
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-CONFIG_CMD_NAND=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-# CONFIG_CMD_FPGA is not set
-CONFIG_CMD_TFTPPUT=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-# CONFIG_CMD_MISC is not set
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_SIMPLE_BUS=y
-CONFIG_NAND_DENALI=y
-CONFIG_SYS_NAND_DENALI_64BIT=y
-CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
-CONFIG_SPL_NAND_DENALI=y
-CONFIG_PINCTRL=y
-CONFIG_SPL_PINCTRL=y
-CONFIG_UNIPHIER_SERIAL=y
-CONFIG_USB=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_STORAGE=y
diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig
new file mode 100644 (file)
index 0000000..ee3cbad
--- /dev/null
@@ -0,0 +1,31 @@
+CONFIG_ARM=y
+CONFIG_ARCH_UNIPHIER=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_ARCH_UNIPHIER_PH1_LD4=y
+CONFIG_ARCH_UNIPHIER_PH1_SLD8=y
+CONFIG_MICRO_SUPPORT_CARD=y
+CONFIG_SYS_TEXT_BASE=0x84000000
+CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-ld4-ref"
+CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+CONFIG_CMD_NAND=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TIME=y
+# CONFIG_CMD_MISC is not set
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_NAND_DENALI=y
+CONFIG_SYS_NAND_DENALI_64BIT=y
+CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_SPL_NAND_DENALI=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_UNIPHIER_SERIAL=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
diff --git a/configs/uniphier_pro4_defconfig b/configs/uniphier_pro4_defconfig
new file mode 100644 (file)
index 0000000..2361db6
--- /dev/null
@@ -0,0 +1,30 @@
+CONFIG_ARM=y
+CONFIG_ARCH_UNIPHIER=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_ARCH_UNIPHIER_PH1_PRO4=y
+CONFIG_MICRO_SUPPORT_CARD=y
+CONFIG_SYS_TEXT_BASE=0x84000000
+CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-pro4-ref"
+CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+CONFIG_CMD_NAND=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TIME=y
+# CONFIG_CMD_MISC is not set
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_NAND_DENALI=y
+CONFIG_SYS_NAND_DENALI_64BIT=y
+CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_SPL_NAND_DENALI=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_UNIPHIER_SERIAL=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_STORAGE=y
diff --git a/configs/uniphier_pro5_defconfig b/configs/uniphier_pro5_defconfig
new file mode 100644 (file)
index 0000000..be0d7b5
--- /dev/null
@@ -0,0 +1,30 @@
+CONFIG_ARM=y
+CONFIG_ARCH_UNIPHIER=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_ARCH_UNIPHIER_PH1_PRO5=y
+CONFIG_MICRO_SUPPORT_CARD=y
+CONFIG_SYS_TEXT_BASE=0x84000000
+CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-pro5-4kbox"
+CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+CONFIG_CMD_NAND=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TIME=y
+# CONFIG_CMD_MISC is not set
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_NAND_DENALI=y
+CONFIG_SYS_NAND_DENALI_64BIT=y
+CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_SPL_NAND_DENALI=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_UNIPHIER_SERIAL=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_STORAGE=y
diff --git a/configs/uniphier_pxs2_ld6b_defconfig b/configs/uniphier_pxs2_ld6b_defconfig
new file mode 100644 (file)
index 0000000..f8cb794
--- /dev/null
@@ -0,0 +1,31 @@
+CONFIG_ARM=y
+CONFIG_ARCH_UNIPHIER=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_ARCH_UNIPHIER_PROXSTREAM2=y
+CONFIG_ARCH_UNIPHIER_PH1_LD6B=y
+CONFIG_MICRO_SUPPORT_CARD=y
+CONFIG_SYS_TEXT_BASE=0x84000000
+CONFIG_DEFAULT_DEVICE_TREE="uniphier-proxstream2-vodka"
+CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+CONFIG_CMD_NAND=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TIME=y
+# CONFIG_CMD_MISC is not set
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_SIMPLE_BUS=y
+CONFIG_NAND_DENALI=y
+CONFIG_SYS_NAND_DENALI_64BIT=y
+CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_SPL_NAND_DENALI=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_UNIPHIER_SERIAL=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_STORAGE=y
diff --git a/configs/uniphier_sld3_defconfig b/configs/uniphier_sld3_defconfig
new file mode 100644 (file)
index 0000000..4b871d0
--- /dev/null
@@ -0,0 +1,26 @@
+CONFIG_ARM=y
+CONFIG_ARCH_UNIPHIER=y
+CONFIG_ARCH_UNIPHIER_PH1_SLD3=y
+CONFIG_MICRO_SUPPORT_CARD=y
+CONFIG_SYS_TEXT_BASE=0x84000000
+CONFIG_DEFAULT_DEVICE_TREE="uniphier-ph1-sld3-ref"
+CONFIG_HUSH_PARSER=y
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+CONFIG_CMD_NAND=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TIME=y
+# CONFIG_CMD_MISC is not set
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NAND_DENALI=y
+CONFIG_SYS_NAND_DENALI_64BIT=y
+CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
+CONFIG_SPL_NAND_DENALI=y
+CONFIG_UNIPHIER_SERIAL=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
index 57b947b57076e69eaf8b4a455d3e6ed1fc87023f..f0f5346f53feebffe2e3811261aa98df2afc5aea 100644 (file)
@@ -28,34 +28,38 @@ Tested toolchains
 Compile the source
 ------------------
 
-PH1-sLD3:
-    $ make ph1_sld3_defconfig
+PH1-sLD3 reference board:
+    $ make uniphier_sld3_defconfig
     $ make CROSS_COMPILE=arm-linux-gnueabi-
 
-PH1-LD4:
-    $ make ph1_ld4_defconfig
+PH1-LD4 reference board:
+    $ make uniphier_ld4_sld8_defconfig
     $ make CROSS_COMPILE=arm-linux-gnueabi-
 
-PH1-Pro4:
-    $ make ph1_pro4_defconfig
-    $ make CROSS_COMPILE=arm-linux-gnueabi-
+PH1-sLD8 reference board:
+    $ make uniphier_ld4_sld8_defconfig
+    $ make CROSS_COMPILE=arm-linux-gnueabi- DEVICE_TREE=uniphier-ph1-sld8-ref
 
-PH1-sLD8:
-    $ make ph1_sld8_defconfig
+PH1-Pro4 reference board:
+    $ make uniphier_pro4_defconfig
     $ make CROSS_COMPILE=arm-linux-gnueabi-
 
-PH1-Pro5:
-    $ make ph1_pro5_defconfig
+PH1-Pro5 4KBOX Board:
+    $ make uniphier_pro5_defconfig
     $ make CROSS_COMPILE=arm-linux-gnueabi-
 
-ProXstream2:
-    $ make pxs2_defconfig
-    $ make CROSS_COMPILE=arm-linux-gnueabi-
+ProXstream2 Gentil board:
+    $ make uniphier_pxs2_ld6b_defconfig
+    $ make CROSS_COMPILE=arm-linux-gnueabi- DEVICE_TREE=uniphier-proxstream2-gentil
 
-PH1-LD6b:
-    $ make ph1_ld6b_defconfig
+ProXstream2 Vodka board:
+    $ make uniphier_pxs2_ld6b_defconfig
     $ make CROSS_COMPILE=arm-linux-gnueabi-
 
+PH1-LD6b reference board:
+    $ make uniphier_pxs2_ld6b_defconfig
+    $ make CROSS_COMPILE=arm-linux-gnueabi- DEVICE_TREE=uniphier-ph1-ld6b-ref
+
 You may wish to change the "CROSS_COMPILE=arm-linux-gnueabi-"
 to use your favorite compiler.
 
index ee2a9c04336490b9a3664842a9146d1fd5bfa2b4..98fff63cc12acab597c31d0d611d83a8f2fc03fd 100644 (file)
 #define CONFIG_MII
 #define CONFIG_PHY_GIGE
 
+/*
+ * USB 1.1 configuration
+ */
+#define CONFIG_USB_OHCI_NEW
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
+
 /*
  * Commands still not supported in Kconfig
  */
index 921d912d96f2d661508381aa1f256ae2365479fe..790e7047d1524742c61fc3714ee3f8891225c66d 100644 (file)
@@ -417,8 +417,14 @@ extern int soft_i2c_gpio_scl;
 
 #ifdef CONFIG_MMC
 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func) func(MMC, mmc, 1)
+#else
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
+#endif
 #else
 #define BOOT_TARGET_DEVICES_MMC(func)
+#define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
 #endif
 
 #ifdef CONFIG_AHCI
@@ -446,6 +452,7 @@ extern int soft_i2c_gpio_scl;
 #define BOOT_TARGET_DEVICES(func) \
        func(FEL, fel, na) \
        BOOT_TARGET_DEVICES_MMC(func) \
+       BOOT_TARGET_DEVICES_MMC_EXTRA(func) \
        BOOT_TARGET_DEVICES_SCSI(func) \
        BOOT_TARGET_DEVICES_USB(func) \
        func(PXE, pxe, na) \
index 056259849976188fa041b68dce90b67097decca9..463c6871c09fbf7b201a3507cb6882dd920431ca 100644 (file)
        "tftpboot=tftpboot $fit_addr_r $bootfile &&" \
                "bootm $fit_addr_r\0"
 #else
-#define CONFIG_BOOTFILE                        "uImage"
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_BOOTFILE                        "zImage"
 #define LINUXBOOT_ENV_SETTINGS \
        "fdt_addr=0x00100000\0" \
        "fdt_addr_r=0x84100000\0" \
        "fdt_size=0x00008000\0" \
-       "fdt_file=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
        "kernel_addr=0x00200000\0" \
-       "kernel_addr_r=0x84200000\0" \
+       "kernel_addr_r=0x80208000\0" \
        "kernel_size=0x00800000\0" \
        "ramdisk_addr=0x00a00000\0" \
        "ramdisk_addr_r=0x84a00000\0" \
        "norboot=setexpr kernel_addr $nor_base + $kernel_addr &&" \
                "setexpr ramdisk_addr $nor_base + $ramdisk_addr &&" \
                "setexpr fdt_addr $nor_base + $fdt_addr &&" \
-               "bootm $kernel_addr $ramdisk_addr $fdt_addr\0" \
+               "bootz $kernel_addr $ramdisk_addr $fdt_addr\0" \
        "nandboot=nand read $kernel_addr_r $kernel_addr $kernel_size &&" \
                "nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \
                "nand read $fdt_addr_r $fdt_addr $fdt_size &&" \
-               "bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \
+               "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \
        "tftpboot=tftpboot $kernel_addr_r $bootfile &&" \
                "tftpboot $ramdisk_addr_r $ramdisk_file &&" \
                "tftpboot $fdt_addr_r $fdt_file &&" \
-               "bootm $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0"
+               "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0"
 #endif
 
 #define        CONFIG_EXTRA_ENV_SETTINGS                               \