mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Compare commits
162 Commits
v2018.09-r
...
v2018.09-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3005162a43 | ||
|
|
8c5cad05c9 | ||
|
|
c3c19c2743 | ||
|
|
e3332e1a1a | ||
|
|
4b0a2d3aab | ||
|
|
a81f663ff7 | ||
|
|
26b068280f | ||
|
|
1b74e9ce50 | ||
|
|
4b69e870e9 | ||
|
|
284d201b4d | ||
|
|
65186977ee | ||
|
|
e69cc6bc42 | ||
|
|
a0913cdf7b | ||
|
|
1fdeacd32c | ||
|
|
cbe503fbc1 | ||
|
|
aac79251c7 | ||
|
|
feb64f9d51 | ||
|
|
88c34b8da6 | ||
|
|
313360b13f | ||
|
|
1335e7745f | ||
|
|
b43cdf9b3f | ||
|
|
a265e5ef42 | ||
|
|
11ed312896 | ||
|
|
c6cca10b9c | ||
|
|
a376702f76 | ||
|
|
15fd1b7903 | ||
|
|
8b7f04f14a | ||
|
|
73e4ba9868 | ||
|
|
344ca79509 | ||
|
|
8744d6c504 | ||
|
|
144c4e37db | ||
|
|
96ffe87011 | ||
|
|
f3da76ea8b | ||
|
|
a5e34fc0b6 | ||
|
|
0b600918d5 | ||
|
|
e1904f4530 | ||
|
|
47e41631bb | ||
|
|
047bc5c755 | ||
|
|
55d56d2347 | ||
|
|
87c814d4c7 | ||
|
|
2e2067b815 | ||
|
|
ecc6f6bea6 | ||
|
|
a029f540c5 | ||
|
|
b67f80148e | ||
|
|
331c372210 | ||
|
|
cca9af63a3 | ||
|
|
66011a0883 | ||
|
|
0b8f6378cb | ||
|
|
8497cb9b25 | ||
|
|
db3b5e9898 | ||
|
|
3b1c0d89b9 | ||
|
|
7bf07cf872 | ||
|
|
4b5892c480 | ||
|
|
50f566d6ee | ||
|
|
12069bd046 | ||
|
|
14b6a07cf7 | ||
|
|
1034bcc26d | ||
|
|
622fd2b98c | ||
|
|
8b8d59f323 | ||
|
|
2418734ed4 | ||
|
|
26699998e9 | ||
|
|
3d186cf3f3 | ||
|
|
0de68cf3f8 | ||
|
|
49c752c93a | ||
|
|
3be9bcb048 | ||
|
|
7ec9181d6a | ||
|
|
999b204383 | ||
|
|
e7c865620e | ||
|
|
c3211708cf | ||
|
|
c73251eac1 | ||
|
|
1a35526e1d | ||
|
|
10d5ed9a54 | ||
|
|
aa51579f9a | ||
|
|
dbb148b22c | ||
|
|
c3a40cce2a | ||
|
|
9b89183b97 | ||
|
|
9d12daff6c | ||
|
|
b71d9e8b38 | ||
|
|
3313e90844 | ||
|
|
f008e26008 | ||
|
|
54bfba2704 | ||
|
|
bcfb0e22a8 | ||
|
|
a39f39cdd8 | ||
|
|
483dbab9f9 | ||
|
|
fa995d0d94 | ||
|
|
d8024074e4 | ||
|
|
3748ed908f | ||
|
|
122347f366 | ||
|
|
1acbd0ea99 | ||
|
|
6331cb2165 | ||
|
|
7ac5f33483 | ||
|
|
044fa00387 | ||
|
|
612e99123b | ||
|
|
d03e76af5c | ||
|
|
c044733457 | ||
|
|
287c04e11a | ||
|
|
94cb986e5e | ||
|
|
09d841176d | ||
|
|
c4fa049a12 | ||
|
|
f09d831557 | ||
|
|
391328dc30 | ||
|
|
07240da293 | ||
|
|
ccfc78b820 | ||
|
|
18e684dd4c | ||
|
|
7bdf39cfaf | ||
|
|
864915561b | ||
|
|
165db7c426 | ||
|
|
1cf6825a68 | ||
|
|
6e71a6ab2d | ||
|
|
ceeee8f7b5 | ||
|
|
6ace36e19a | ||
|
|
39dd00fc5d | ||
|
|
4aee624c92 | ||
|
|
9f8cf76be2 | ||
|
|
9baa2bce28 | ||
|
|
cc3fedb204 | ||
|
|
244eaea60b | ||
|
|
8ccf98b1cf | ||
|
|
ca0d535edc | ||
|
|
c9ad6bc235 | ||
|
|
d7869b2183 | ||
|
|
4adc6605a9 | ||
|
|
004167048d | ||
|
|
8297e648b8 | ||
|
|
719afeb0b3 | ||
|
|
86cf1c8285 | ||
|
|
999a772d9f | ||
|
|
6b6f216f92 | ||
|
|
0bdea7c430 | ||
|
|
b0c0a715f9 | ||
|
|
4f10989280 | ||
|
|
664258887d | ||
|
|
5e50adf667 | ||
|
|
d81b5da3fe | ||
|
|
12ea13ad43 | ||
|
|
f9f016adcd | ||
|
|
ccc97432ad | ||
|
|
f4c3e0dcf5 | ||
|
|
49e508e962 | ||
|
|
934aec71d6 | ||
|
|
2af5d51cc2 | ||
|
|
d6a61da462 | ||
|
|
6385a8a964 | ||
|
|
215a06565a | ||
|
|
f9edeb32a9 | ||
|
|
fe88c2fea7 | ||
|
|
8145c1c299 | ||
|
|
c29508045f | ||
|
|
3d8685f155 | ||
|
|
da61e50fc4 | ||
|
|
f5775e69cc | ||
|
|
6f96ed7e20 | ||
|
|
af74658e04 | ||
|
|
e4ff8420c5 | ||
|
|
79a436d568 | ||
|
|
c0b4fc1a1b | ||
|
|
20905f5fa6 | ||
|
|
40c36f8d49 | ||
|
|
8094f0cb0c | ||
|
|
25b3d90b2c | ||
|
|
0ca4d40cfe | ||
|
|
cf68225742 |
6
Kconfig
6
Kconfig
@@ -104,6 +104,12 @@ config ENV_VARS_UBOOT_CONFIG
|
||||
- CONFIG_SYS_VENDOR
|
||||
- CONFIG_SYS_SOC
|
||||
|
||||
config NR_DRAM_BANKS
|
||||
int "Number of DRAM banks"
|
||||
default 4
|
||||
help
|
||||
This defines the number of DRAM banks.
|
||||
|
||||
config SYS_BOOT_GET_CMDLINE
|
||||
bool "Enable kernel command line setup"
|
||||
help
|
||||
|
||||
6
Makefile
6
Makefile
@@ -3,7 +3,7 @@
|
||||
VERSION = 2018
|
||||
PATCHLEVEL = 09
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION = -rc3
|
||||
NAME =
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@@ -375,6 +375,10 @@ KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
|
||||
KBUILD_CFLAGS += -fshort-wchar
|
||||
KBUILD_AFLAGS := -D__ASSEMBLY__
|
||||
|
||||
# Don't generate position independent code
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
|
||||
KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
|
||||
|
||||
# Read UBOOTRELEASE from include/config/uboot.release (if it exists)
|
||||
UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
|
||||
UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
|
||||
|
||||
3
README
3
README
@@ -977,9 +977,6 @@ The following options need to be configured:
|
||||
Define this to use i/o functions instead of macros
|
||||
(some hardware wont work with macros)
|
||||
|
||||
CONFIG_DRIVER_TI_EMAC
|
||||
Support for davinci emac
|
||||
|
||||
CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT
|
||||
Define this if you have more then 3 PHYs.
|
||||
|
||||
|
||||
@@ -772,7 +772,7 @@ config ARCH_SNAPDRAGON
|
||||
config ARCH_SOCFPGA
|
||||
bool "Altera SOCFPGA family"
|
||||
select ARCH_EARLY_INIT_R
|
||||
select ARCH_MISC_INIT
|
||||
select ARCH_MISC_INIT if !TARGET_SOCFPGA_ARRIA10
|
||||
select ARM64 if TARGET_SOCFPGA_STRATIX10
|
||||
select CPU_V7A if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
|
||||
select DM
|
||||
@@ -831,6 +831,7 @@ config ARCH_SUNXI
|
||||
select USE_TINY_PRINTF
|
||||
imply CMD_DM
|
||||
imply CMD_GPT
|
||||
imply CMD_UBI if NAND
|
||||
imply DISTRO_DEFAULTS
|
||||
imply FAT_WRITE
|
||||
imply OF_LIBFDT_OVERLAY
|
||||
|
||||
@@ -110,7 +110,7 @@ Example:
|
||||
type = "ramdisk";
|
||||
arch = "arm64";
|
||||
os = "linux";
|
||||
compression = "gzip";
|
||||
compression = "none";
|
||||
load = <0xa0000000>;
|
||||
};
|
||||
};
|
||||
|
||||
169
arch/arm/dts/axp81x.dtsi
Normal file
169
arch/arm/dts/axp81x.dtsi
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Copyright 2017 Chen-Yu Tsai
|
||||
*
|
||||
* Chen-Yu Tsai <wens@csie.org>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* AXP813/818 Integrated Power Management Chip */
|
||||
|
||||
&axp81x {
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
axp_adc: adc {
|
||||
compatible = "x-powers,axp813-adc";
|
||||
#io-channel-cells = <1>;
|
||||
};
|
||||
|
||||
axp_gpio: gpio {
|
||||
compatible = "x-powers,axp813-gpio";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
gpio0_ldo: gpio0-ldo {
|
||||
pins = "GPIO0";
|
||||
function = "ldo";
|
||||
};
|
||||
|
||||
gpio1_ldo: gpio1-ldo {
|
||||
pins = "GPIO1";
|
||||
function = "ldo";
|
||||
};
|
||||
};
|
||||
|
||||
battery_power_supply: battery-power-supply {
|
||||
compatible = "x-powers,axp813-battery-power-supply";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
regulators {
|
||||
/* Default work frequency for buck regulators */
|
||||
x-powers,dcdc-freq = <3000>;
|
||||
|
||||
reg_dcdc1: dcdc1 {
|
||||
};
|
||||
|
||||
reg_dcdc2: dcdc2 {
|
||||
};
|
||||
|
||||
reg_dcdc3: dcdc3 {
|
||||
};
|
||||
|
||||
reg_dcdc4: dcdc4 {
|
||||
};
|
||||
|
||||
reg_dcdc5: dcdc5 {
|
||||
};
|
||||
|
||||
reg_dcdc6: dcdc6 {
|
||||
};
|
||||
|
||||
reg_dcdc7: dcdc7 {
|
||||
};
|
||||
|
||||
reg_aldo1: aldo1 {
|
||||
};
|
||||
|
||||
reg_aldo2: aldo2 {
|
||||
};
|
||||
|
||||
reg_aldo3: aldo3 {
|
||||
};
|
||||
|
||||
reg_dldo1: dldo1 {
|
||||
};
|
||||
|
||||
reg_dldo2: dldo2 {
|
||||
};
|
||||
|
||||
reg_dldo3: dldo3 {
|
||||
};
|
||||
|
||||
reg_dldo4: dldo4 {
|
||||
};
|
||||
|
||||
reg_eldo1: eldo1 {
|
||||
};
|
||||
|
||||
reg_eldo2: eldo2 {
|
||||
};
|
||||
|
||||
reg_eldo3: eldo3 {
|
||||
};
|
||||
|
||||
reg_fldo1: fldo1 {
|
||||
};
|
||||
|
||||
reg_fldo2: fldo2 {
|
||||
};
|
||||
|
||||
reg_fldo3: fldo3 {
|
||||
};
|
||||
|
||||
reg_ldo_io0: ldo-io0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gpio0_ldo>;
|
||||
/* Disable by default to avoid conflicts with GPIO */
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
reg_ldo_io1: ldo-io1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gpio1_ldo>;
|
||||
/* Disable by default to avoid conflicts with GPIO */
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
reg_rtc_ldo: rtc-ldo {
|
||||
/* RTC_LDO is a fixed, always-on regulator */
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
reg_sw: sw {
|
||||
};
|
||||
|
||||
reg_drivevbus: drivevbus {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -19,8 +19,6 @@
|
||||
|
||||
keys: gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
button@0 {
|
||||
gpio-key,wakeup = <1>;
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
|
||||
keys: gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
button@0 {
|
||||
gpio-key,wakeup = <1>;
|
||||
|
||||
@@ -55,8 +55,6 @@
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -83,8 +83,6 @@
|
||||
|
||||
gpio_keys: gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwr_key_h>;
|
||||
|
||||
@@ -841,8 +841,6 @@
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mipi_in: port {
|
||||
#address-cells = <1>;
|
||||
|
||||
@@ -189,8 +189,6 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
compatible = "rockchip,rk3328-grf", "syscon", "simple-mfd";
|
||||
reg = <0x0 0xff100000 0x0 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
io_domains: io-domains {
|
||||
compatible = "rockchip,rk3328-io-voltage-domain";
|
||||
|
||||
@@ -208,8 +208,6 @@
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#sound-dai-cells = <0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1015,8 +1015,6 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
compatible = "rockchip,rk3399-pmugrf", "syscon", "simple-mfd";
|
||||
reg = <0x0 0xff320000 0x0 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
pmu_io_domains: io-domains {
|
||||
compatible = "rockchip,rk3399-pmu-io-voltage-domain";
|
||||
@@ -1493,8 +1491,6 @@
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mipi_in: port {
|
||||
#address-cells = <1>;
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
chosen {
|
||||
tick-timer = &timer2;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -55,6 +60,7 @@
|
||||
device_type = "soc";
|
||||
interrupt-parent = <&intc>;
|
||||
ranges;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
amba {
|
||||
compatible = "simple-bus";
|
||||
@@ -93,29 +99,35 @@
|
||||
clkmgr@ffd04000 {
|
||||
compatible = "altr,clk-mgr";
|
||||
reg = <0xffd04000 0x1000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
clocks {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
cb_intosc_hs_div2_clk: cb_intosc_hs_div2_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
cb_intosc_ls_clk: cb_intosc_ls_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
f2s_free_clk: f2s_free_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
osc1: osc1 {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
main_pll: main_pll@40 {
|
||||
@@ -126,6 +138,7 @@
|
||||
clocks = <&osc1>, <&cb_intosc_ls_clk>,
|
||||
<&f2s_free_clk>;
|
||||
reg = <0x40>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
main_mpu_base_clk: main_mpu_base_clk {
|
||||
#clock-cells = <0>;
|
||||
@@ -139,6 +152,7 @@
|
||||
compatible = "altr,socfpga-a10-perip-clk";
|
||||
clocks = <&main_pll>;
|
||||
div-reg = <0x144 0 11>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
main_emaca_clk: main_emaca_clk@68 {
|
||||
@@ -214,6 +228,7 @@
|
||||
clocks = <&osc1>, <&cb_intosc_ls_clk>,
|
||||
<&f2s_free_clk>, <&main_periph_ref_clk>;
|
||||
reg = <0xC0>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
peri_mpu_base_clk: peri_mpu_base_clk {
|
||||
#clock-cells = <0>;
|
||||
@@ -227,6 +242,7 @@
|
||||
compatible = "altr,socfpga-a10-perip-clk";
|
||||
clocks = <&periph_pll>;
|
||||
div-reg = <0x144 16 11>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
peri_emaca_clk: peri_emaca_clk@e8 {
|
||||
@@ -302,6 +318,7 @@
|
||||
<&osc1>, <&cb_intosc_hs_div2_clk>,
|
||||
<&f2s_free_clk>;
|
||||
reg = <0x64>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
s2f_user1_free_clk: s2f_user1_free_clk@104 {
|
||||
@@ -328,6 +345,7 @@
|
||||
compatible = "altr,socfpga-a10-perip-clk";
|
||||
clocks = <&noc_free_clk>;
|
||||
fixed-divider = <4>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
l4_main_clk: l4_main_clk {
|
||||
@@ -427,8 +445,8 @@
|
||||
rx-fifo-depth = <16384>;
|
||||
clocks = <&l4_mp_clk>;
|
||||
clock-names = "stmmaceth";
|
||||
resets = <&rst EMAC0_RESET>;
|
||||
reset-names = "stmmaceth";
|
||||
resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>;
|
||||
reset-names = "stmmaceth", "stmmaceth-ocp";
|
||||
snps,axi-config = <&socfpga_axi_setup>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -447,8 +465,8 @@
|
||||
rx-fifo-depth = <16384>;
|
||||
clocks = <&l4_mp_clk>;
|
||||
clock-names = "stmmaceth";
|
||||
resets = <&rst EMAC1_RESET>;
|
||||
reset-names = "stmmaceth";
|
||||
resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>;
|
||||
reset-names = "stmmaceth", "stmmaceth-ocp";
|
||||
snps,axi-config = <&socfpga_axi_setup>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -467,6 +485,8 @@
|
||||
rx-fifo-depth = <16384>;
|
||||
clocks = <&l4_mp_clk>;
|
||||
clock-names = "stmmaceth";
|
||||
resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>;
|
||||
reset-names = "stmmaceth", "stmmaceth-ocp";
|
||||
snps,axi-config = <&socfpga_axi_setup>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -547,6 +567,8 @@
|
||||
reg = <0xffc02200 0x100>;
|
||||
interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&l4_sp_clk>;
|
||||
resets = <&rst I2C0_RESET>;
|
||||
reset-names = "i2c";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -557,6 +579,8 @@
|
||||
reg = <0xffc02300 0x100>;
|
||||
interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&l4_sp_clk>;
|
||||
resets = <&rst I2C1_RESET>;
|
||||
reset-names = "i2c";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -567,6 +591,8 @@
|
||||
reg = <0xffc02400 0x100>;
|
||||
interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&l4_sp_clk>;
|
||||
resets = <&rst I2C2_RESET>;
|
||||
reset-names = "i2c";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -577,6 +603,8 @@
|
||||
reg = <0xffc02500 0x100>;
|
||||
interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&l4_sp_clk>;
|
||||
resets = <&rst I2C3_RESET>;
|
||||
reset-names = "i2c";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -587,6 +615,8 @@
|
||||
reg = <0xffc02600 0x100>;
|
||||
interrupts = <0 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&l4_sp_clk>;
|
||||
resets = <&rst I2C4_RESET>;
|
||||
reset-names = "i2c";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -643,6 +673,7 @@
|
||||
interrupts = <0 99 4>;
|
||||
dma-mask = <0xffffffff>;
|
||||
clocks = <&nand_clk>;
|
||||
resets = <&rst NAND_RESET>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -735,6 +766,7 @@
|
||||
compatible = "altr,rst-mgr";
|
||||
reg = <0xffd05000 0x100>;
|
||||
altr,modrst-offset = <0x20>;
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
scu: snoop-control-unit@ffffc000 {
|
||||
@@ -778,6 +810,7 @@
|
||||
reg = <0xffd00000 0x100>;
|
||||
clocks = <&l4_sys_free_clk>;
|
||||
clock-names = "timer";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
timer3: timer3@ffd00100 {
|
||||
@@ -795,6 +828,7 @@
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&l4_sp_clk>;
|
||||
resets = <&rst UART0_RESET>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -805,6 +839,7 @@
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&l4_sp_clk>;
|
||||
resets = <&rst UART1_RESET>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
aliases {
|
||||
ethernet0 = &gmac0;
|
||||
serial0 = &uart1;
|
||||
i2c0 = &i2c1;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -153,7 +154,6 @@
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
clock-frequency = <50000000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -166,3 +166,16 @@
|
||||
&watchdog1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* Clock available early */
|
||||
&main_periph_ref_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&l4_mp_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&l4_sp_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -38,3 +38,20 @@
|
||||
<48 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
/* Clock available early */
|
||||
&main_sdmmc_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&peri_sdmmc_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&sdmmc_free_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&sdmmc_clk {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory {
|
||||
@@ -99,3 +100,7 @@
|
||||
cdns,tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -56,3 +57,7 @@
|
||||
disable-over-current;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -75,3 +76,7 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -65,3 +66,7 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -63,3 +64,7 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory {
|
||||
@@ -102,3 +103,7 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory {
|
||||
@@ -113,3 +114,7 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -93,3 +94,7 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -84,3 +85,7 @@
|
||||
disable-over-current;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -67,6 +68,7 @@
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
aliases {
|
||||
@@ -108,3 +109,7 @@
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
/dts-v1/;
|
||||
#include "sun8i-a83t.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
model = "Allwinner A83T H8Homlet Proto Dev Board v2.0";
|
||||
compatible = "allwinner,h8homlet-v2", "allwinner,sun8i-a83t";
|
||||
@@ -55,22 +57,213 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
reg_usb0_vbus: reg-usb0-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb0-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
|
||||
};
|
||||
|
||||
reg_usb1_vbus: reg-usb1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb1-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
|
||||
};
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
bus-width = <4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_8bit_emmc_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_dcdc1>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp81x: pmic@3a3 {
|
||||
compatible = "x-powers,axp818", "x-powers,axp813";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
eldoin-supply = <®_dcdc1>;
|
||||
swin-supply = <®_dcdc1>;
|
||||
};
|
||||
|
||||
ac100: codec@e89 {
|
||||
compatible = "x-powers,ac100";
|
||||
reg = <0xe89>;
|
||||
|
||||
ac100_codec: codec {
|
||||
compatible = "x-powers,ac100-codec";
|
||||
interrupt-parent = <&r_pio>;
|
||||
interrupts = <0 11 IRQ_TYPE_LEVEL_LOW>; /* PL11 */
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "4M_adda";
|
||||
};
|
||||
|
||||
ac100_rtc: rtc {
|
||||
compatible = "x-powers,ac100-rtc";
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&ac100_codec>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names = "cko1_rtc",
|
||||
"cko2_rtc",
|
||||
"cko3_rtc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp81x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc-1v8";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "dram-pll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-3v3";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpua";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpub";
|
||||
};
|
||||
|
||||
®_dcdc4 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-gpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dcdc6 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dldo2 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-mipi";
|
||||
};
|
||||
|
||||
®_dldo4 {
|
||||
/*
|
||||
* The PHY requires 20ms after all voltages are applied until core
|
||||
* logic is ready and 30ms after the reset pin is de-asserted.
|
||||
* Set a 100ms delay to account for PMIC ramp time and board traces.
|
||||
*/
|
||||
regulator-enable-ramp-delay = <100000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-ephy";
|
||||
};
|
||||
|
||||
®_fldo1 {
|
||||
regulator-min-microvolt = <1080000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
regulator-name = "vdd12-hsic";
|
||||
};
|
||||
|
||||
®_fldo2 {
|
||||
/*
|
||||
* Despite the embedded CPUs core not being used in any way,
|
||||
* this must remain on or the system will hang.
|
||||
*/
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
®_sw {
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_b>;
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb0_vbus-supply = <®_usb0_vbus>;
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright 2015 Vishnu Patekar
|
||||
* Vishnu Patekar <vishnupatekar0510@gmail.com>
|
||||
* Copyright 2017 Chen-Yu Tsai
|
||||
*
|
||||
* Chen-Yu Tsai <wens@csie.org>
|
||||
*
|
||||
* 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
|
||||
@@ -44,29 +45,316 @@
|
||||
/dts-v1/;
|
||||
#include "sun8i-a83t.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
model = "Allwinner A83T BananaPi M3 Board v1.2";
|
||||
compatible = "bananapi,m3v1.2", "allwinner,sun8i-a83t";
|
||||
model = "Banana Pi BPI-M3";
|
||||
compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &emac;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
connector {
|
||||
compatible = "hdmi-connector";
|
||||
type = "a";
|
||||
|
||||
port {
|
||||
hdmi_con_in: endpoint {
|
||||
remote-endpoint = <&hdmi_out_con>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
blue {
|
||||
label = "bananapi-m3:blue:usr";
|
||||
gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
green {
|
||||
label = "bananapi-m3:green:usr";
|
||||
gpios = <&axp_gpio 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
reg_usb1_vbus: reg-usb1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb1-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
clocks = <&ac100_rtc 1>;
|
||||
clock-names = "ext_clock";
|
||||
/* The WiFi low power clock must be 32768 Hz */
|
||||
assigned-clocks = <&ac100_rtc 1>;
|
||||
assigned-clock-rates = <32768>;
|
||||
/* enables internal regulator and de-asserts reset */
|
||||
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
|
||||
};
|
||||
};
|
||||
|
||||
&de {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
/* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */
|
||||
status = "okay";
|
||||
|
||||
/* TODO GL830 USB-to-SATA bridge downstream w/ GPIO power controls */
|
||||
};
|
||||
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_sw>;
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
allwinner,rx-delay-ps = <700>;
|
||||
allwinner,tx-delay-ps = <700>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&hdmi_out {
|
||||
hdmi_out_con: endpoint {
|
||||
remote-endpoint = <&hdmi_con_in>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
vmmc-supply = <®_dldo1>;
|
||||
vqmmc-supply = <®_dldo1>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
brcmf: wifi@1 {
|
||||
reg = <1>;
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
interrupt-parent = <&r_pio>;
|
||||
interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-names = "host-wake";
|
||||
};
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_8bit_emmc_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_dcdc1>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp81x: pmic@3a3 {
|
||||
compatible = "x-powers,axp813";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
eldoin-supply = <®_dcdc1>;
|
||||
fldoin-supply = <®_dcdc5>;
|
||||
swin-supply = <®_dcdc1>;
|
||||
x-powers,drive-vbus-en;
|
||||
};
|
||||
|
||||
ac100: codec@e89 {
|
||||
compatible = "x-powers,ac100";
|
||||
reg = <0xe89>;
|
||||
|
||||
ac100_codec: codec {
|
||||
compatible = "x-powers,ac100-codec";
|
||||
interrupt-parent = <&r_pio>;
|
||||
interrupts = <0 11 IRQ_TYPE_LEVEL_LOW>; /* PL11 */
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "4M_adda";
|
||||
};
|
||||
|
||||
ac100_rtc: rtc {
|
||||
compatible = "x-powers,ac100-rtc";
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&ac100_codec>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names = "cko1_rtc",
|
||||
"cko2_rtc",
|
||||
"cko3_rtc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp81x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc-1v8";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "dram-pll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
/* schematics says 3.1V but FEX file says 3.3V */
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-3v3";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpua";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpub";
|
||||
};
|
||||
|
||||
®_dcdc4 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-gpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dcdc6 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dldo1 {
|
||||
/*
|
||||
* This powers both the WiFi/BT module's main power, I/O supply,
|
||||
* and external pull-ups on all the data lines. It should be set
|
||||
* to the same voltage as the I/O supply (DCDC1 in this case) to
|
||||
* avoid any leakage or mismatch.
|
||||
*/
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
®_dldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2500000>;
|
||||
regulator-max-microvolt = <2500000>;
|
||||
regulator-name = "vcc-pd";
|
||||
};
|
||||
|
||||
®_drivevbus {
|
||||
regulator-name = "usb0-vbus";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_fldo1 {
|
||||
regulator-min-microvolt = <1080000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
regulator-name = "vdd12-hsic";
|
||||
};
|
||||
|
||||
®_fldo2 {
|
||||
/*
|
||||
* Despite the embedded CPUs core not being used in any way,
|
||||
* this must remain on or the system will hang.
|
||||
*/
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
®_sw {
|
||||
/*
|
||||
* The PHY requires 20ms after all voltages
|
||||
* are applied until core logic is ready and
|
||||
* 30ms after the reset pin is de-asserted.
|
||||
* Set a 100ms delay to account for PMIC
|
||||
* ramp time and board traces.
|
||||
*/
|
||||
regulator-enable-ramp-delay = <100000>;
|
||||
regulator-name = "vcc-ephy";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_b>;
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -45,33 +45,353 @@
|
||||
/dts-v1/;
|
||||
#include "sun8i-a83t.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
model = "Cubietech Cubietruck Plus";
|
||||
compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &emac;
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
blue {
|
||||
label = "cubietruck-plus:blue:usr";
|
||||
gpios = <&pio 3 25 GPIO_ACTIVE_HIGH>; /* PD25 */
|
||||
};
|
||||
|
||||
orange {
|
||||
label = "cubietruck-plus:orange:usr";
|
||||
gpios = <&pio 3 26 GPIO_ACTIVE_HIGH>; /* PD26 */
|
||||
};
|
||||
|
||||
white {
|
||||
label = "cubietruck-plus:white:usr";
|
||||
gpios = <&pio 3 27 GPIO_ACTIVE_HIGH>; /* PD27 */
|
||||
};
|
||||
|
||||
green {
|
||||
label = "cubietruck-plus:green:usr";
|
||||
gpios = <&pio 4 4 GPIO_ACTIVE_HIGH>; /* PE4 */
|
||||
};
|
||||
};
|
||||
|
||||
usb-hub {
|
||||
/* I2C is not connected */
|
||||
compatible = "smsc,usb3503";
|
||||
initial-mode = <1>; /* initialize in HUB mode */
|
||||
disabled-ports = <1>;
|
||||
intn-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
|
||||
reset-gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */
|
||||
connect-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
|
||||
refclk-frequency = <19200000>;
|
||||
};
|
||||
|
||||
reg_usb1_vbus: reg-usb1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb1-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&pio 3 29 GPIO_ACTIVE_HIGH>; /* PD29 */
|
||||
};
|
||||
|
||||
reg_usb2_vbus: reg-usb2-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "usb2-vbus";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
enable-active-high;
|
||||
gpio = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
|
||||
};
|
||||
|
||||
sound {
|
||||
compatible = "simple-audio-card";
|
||||
simple-audio-card,name = "On-board SPDIF";
|
||||
|
||||
simple-audio-card,cpu {
|
||||
sound-dai = <&spdif>;
|
||||
};
|
||||
|
||||
simple-audio-card,codec {
|
||||
sound-dai = <&spdif_out>;
|
||||
};
|
||||
};
|
||||
|
||||
spdif_out: spdif-out {
|
||||
#sound-dai-cells = <0>;
|
||||
compatible = "linux,spdif-dit";
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
clocks = <&ac100_rtc 1>;
|
||||
clock-names = "ext_clock";
|
||||
/* The WiFi low power clock must be 32768 Hz */
|
||||
assigned-clocks = <&ac100_rtc 1>;
|
||||
assigned-clock-rates = <32768>;
|
||||
/* enables internal regulator and de-asserts reset */
|
||||
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
|
||||
};
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
/* GL830 USB-to-SATA bridge here */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
/* USB3503 HSIC USB 2.0 hub here */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_dldo4>;
|
||||
phy-handle = <&rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_sw>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_8bit_emmc_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp81x: pmic@3a3 {
|
||||
compatible = "x-powers,axp818", "x-powers,axp813";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
eldoin-supply = <®_dcdc1>;
|
||||
swin-supply = <®_dcdc1>;
|
||||
x-powers,drive-vbus-en;
|
||||
};
|
||||
|
||||
ac100: codec@e89 {
|
||||
compatible = "x-powers,ac100";
|
||||
reg = <0xe89>;
|
||||
|
||||
ac100_codec: codec {
|
||||
compatible = "x-powers,ac100-codec";
|
||||
interrupt-parent = <&r_pio>;
|
||||
interrupts = <0 11 IRQ_TYPE_LEVEL_LOW>; /* PL11 */
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "4M_adda";
|
||||
};
|
||||
|
||||
ac100_rtc: rtc {
|
||||
compatible = "x-powers,ac100-rtc";
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&ac100_codec>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names = "cko1_rtc",
|
||||
"cko2_rtc",
|
||||
"cko3_rtc";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp81x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc-1v8";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "dram-pll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
/*
|
||||
* The schematics say this should be 3.3V, but the FEX file says
|
||||
* it should be 3V. The latter makes sense, as the WiFi module's
|
||||
* I/O is indirectly powered from DCDC1, through SW. It is rated
|
||||
* at 2.98V maximum.
|
||||
*/
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpua";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpub";
|
||||
};
|
||||
|
||||
®_dcdc4 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-gpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dcdc6 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dldo2 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "dp-pwr";
|
||||
};
|
||||
|
||||
®_dldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2500000>;
|
||||
regulator-max-microvolt = <2500000>;
|
||||
regulator-name = "ephy-io";
|
||||
};
|
||||
|
||||
®_dldo4 {
|
||||
/*
|
||||
* The PHY requires 20ms after all voltages are applied until core
|
||||
* logic is ready and 30ms after the reset pin is de-asserted.
|
||||
* Set a 100ms delay to account for PMIC ramp time and board traces.
|
||||
*/
|
||||
regulator-enable-ramp-delay = <100000>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "ephy";
|
||||
};
|
||||
|
||||
®_drivevbus {
|
||||
regulator-name = "usb0-vbus";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_eldo1 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "dp-bridge-1";
|
||||
};
|
||||
|
||||
®_eldo2 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "dp-bridge-2";
|
||||
};
|
||||
|
||||
®_fldo1 {
|
||||
/* TODO should be handled by USB PHY */
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1080000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
regulator-name = "vdd12-hsic";
|
||||
};
|
||||
|
||||
®_fldo2 {
|
||||
/*
|
||||
* Despite the embedded CPUs core not being used in any way,
|
||||
* this must remain on or the system will hang.
|
||||
*/
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
®_sw {
|
||||
regulator-name = "vcc-wifi-io";
|
||||
};
|
||||
|
||||
&spdif {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_b>;
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
usb2_vbus-supply = <®_usb2_vbus>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2017 Ondřej Jirman
|
||||
* Ondřej Jirman <megous@megous.com>
|
||||
* Copyright (C) 2017 Touchless Biometric Systems AG
|
||||
* Tomas Novotny <tomas@novotny.cz>
|
||||
*
|
||||
* 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
|
||||
@@ -44,33 +44,380 @@
|
||||
/dts-v1/;
|
||||
#include "sun8i-a83t.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
model = "TBS A711 Tablet";
|
||||
compatible = "tbs-biometrics,a711", "allwinner,sun8i-a83t";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
enable-gpios = <&pio 3 29 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <9>;
|
||||
};
|
||||
|
||||
panel {
|
||||
compatible = "tbs,a711-panel", "panel-lvds";
|
||||
backlight = <&backlight>;
|
||||
power-supply = <®_sw>;
|
||||
|
||||
width-mm = <153>;
|
||||
height-mm = <90>;
|
||||
data-mapping = "vesa-24";
|
||||
|
||||
panel-timing {
|
||||
/* 1024x600 @60Hz */
|
||||
clock-frequency = <52000000>;
|
||||
hactive = <1024>;
|
||||
vactive = <600>;
|
||||
hsync-len = <20>;
|
||||
hfront-porch = <180>;
|
||||
hback-porch = <160>;
|
||||
vfront-porch = <12>;
|
||||
vback-porch = <23>;
|
||||
vsync-len = <5>;
|
||||
};
|
||||
|
||||
port {
|
||||
panel_input: endpoint {
|
||||
remote-endpoint = <&tcon0_out_lcd>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
reg_vbat: reg-vbat {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vbat";
|
||||
regulator-min-microvolt = <3700000>;
|
||||
regulator-max-microvolt = <3700000>;
|
||||
};
|
||||
|
||||
reg_vmain: reg-vmain {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmain";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
vin-supply = <®_vbat>;
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
|
||||
|
||||
/*
|
||||
* This is actually Bluetooth's clock, but we have to
|
||||
* hook it up somewheere
|
||||
*/
|
||||
clocks = <&ac100_rtc 1>;
|
||||
clock-names = "ext_clock";
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <®_dcdc2>;
|
||||
};
|
||||
|
||||
&cpu100 {
|
||||
cpu-supply = <®_dcdc3>;
|
||||
};
|
||||
|
||||
&de {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/*
|
||||
* An USB-2 hub is connected here, which also means we don't need to
|
||||
* enable the OHCI controller.
|
||||
*/
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
/*
|
||||
* There's a modem connected here that needs to be initialised before
|
||||
* being able to be enumerated.
|
||||
*/
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <®_dldo1>;
|
||||
vqmmc-supply = <®_dldo1>;
|
||||
non-removable;
|
||||
wakeup-source;
|
||||
status = "okay";
|
||||
|
||||
brcmf: wifi@1 {
|
||||
reg = <1>;
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
interrupt-parent = <&r_pio>;
|
||||
interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 WL_WAKE_UP */
|
||||
interrupt-names = "host-wake";
|
||||
};
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-0 = <&mmc2_8bit_emmc_pins>;
|
||||
pinctrl-names = "default";
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_dcdc1>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm_pin>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp81x: pmic@3a3 {
|
||||
compatible = "x-powers,axp813";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
swin-supply = <®_dcdc1>;
|
||||
x-powers,drive-vbus-en;
|
||||
};
|
||||
|
||||
ac100: codec@e89 {
|
||||
compatible = "x-powers,ac100";
|
||||
reg = <0xe89>;
|
||||
|
||||
ac100_codec: codec {
|
||||
compatible = "x-powers,ac100-codec";
|
||||
interrupt-parent = <&r_pio>;
|
||||
interrupts = <0 12 IRQ_TYPE_LEVEL_LOW>; /* PL12 */
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "4M_adda";
|
||||
};
|
||||
|
||||
ac100_rtc: rtc {
|
||||
compatible = "x-powers,ac100-rtc";
|
||||
interrupt-parent = <&r_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
clocks = <&ac100_codec>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names = "cko1_rtc",
|
||||
"cko2_rtc",
|
||||
"cko3_rtc";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#include "axp81x.dtsi"
|
||||
|
||||
&battery_power_supply {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_aldo1 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc-1.8";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "vdd-drampll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-min-microvolt = <3100000>;
|
||||
regulator-max-microvolt = <3100000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "vcc-io";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "vdd-cpu-A";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "vdd-cpu-B";
|
||||
};
|
||||
|
||||
®_dcdc4 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-name = "vdd-gpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dcdc6 {
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dldo1 {
|
||||
regulator-min-microvolt = <3100000>;
|
||||
regulator-max-microvolt = <3100000>;
|
||||
regulator-name = "vcc-wifi-io";
|
||||
};
|
||||
|
||||
®_dldo2 {
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <4200000>;
|
||||
regulator-name = "vcc-mipi";
|
||||
};
|
||||
|
||||
®_dldo3 {
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
regulator-name = "vdd-csi";
|
||||
};
|
||||
|
||||
®_dldo4 {
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
regulator-name = "avdd-csi";
|
||||
};
|
||||
|
||||
®_drivevbus {
|
||||
regulator-name = "usb0-vbus";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_eldo1 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "dvdd-csi-r";
|
||||
};
|
||||
|
||||
®_eldo2 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "vcc-dsi";
|
||||
};
|
||||
|
||||
®_eldo3 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-name = "dvdd-csi-f";
|
||||
};
|
||||
|
||||
®_fldo1 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "vcc-hsic";
|
||||
};
|
||||
|
||||
®_fldo2 {
|
||||
regulator-min-microvolt = <700000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-always-on;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_ldo_io0 {
|
||||
regulator-min-microvolt = <3100000>;
|
||||
regulator-max-microvolt = <3100000>;
|
||||
regulator-name = "vcc-ctp";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_ldo_io1 {
|
||||
regulator-min-microvolt = <3100000>;
|
||||
regulator-max-microvolt = <3100000>;
|
||||
regulator-name = "vcc-vb";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_sw {
|
||||
regulator-min-microvolt = <3100000>;
|
||||
regulator-max-microvolt = <3100000>;
|
||||
regulator-name = "vcc-lcd";
|
||||
};
|
||||
|
||||
&tcon0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lcd_lvds_pins>;
|
||||
};
|
||||
|
||||
&tcon0_out {
|
||||
tcon0_out_lcd: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&panel_input>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_b>;
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* There's the BT part of the AP6210 connected to that UART */
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb0_id_det-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
|
||||
usb0_vbus-supply = <®_drivevbus>;
|
||||
usb1_vbus_supply = <®_vmain>;
|
||||
usb2_vbus_supply = <®_vmain>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>
|
||||
* Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
|
||||
* Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
|
||||
*
|
||||
* 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
|
||||
@@ -43,6 +44,8 @@
|
||||
/dts-v1/;
|
||||
#include "sun8i-r40.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
model = "Banana Pi BPI-M2-Ultra";
|
||||
compatible = "sinovoip,bpi-m2-ultra", "allwinner,sun8i-r40";
|
||||
@@ -55,17 +58,47 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
pwr-led {
|
||||
label = "bananapi:red:pwr";
|
||||
gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
user-led-green {
|
||||
label = "bananapi:green:user";
|
||||
gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
user-led-blue {
|
||||
label = "bananapi:blue:user";
|
||||
gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
reg_vcc5v0: vcc5v0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
&ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
&ehci2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -74,6 +107,7 @@
|
||||
pinctrl-0 = <&gmac_rgmii_pins>;
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "rgmii";
|
||||
phy-supply = <®_dc1sw>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -83,3 +117,123 @@
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@34 {
|
||||
compatible = "x-powers,axp221";
|
||||
reg = <0x34>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp22x.dtsi"
|
||||
|
||||
&mmc0 {
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pg_pins>;
|
||||
vmmc-supply = <®_dldo2>;
|
||||
vqmmc-supply = <®_dldo1>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
vqmmc-supply = <®_dcdc1>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2500000>;
|
||||
regulator-max-microvolt = <2500000>;
|
||||
regulator-name = "vcc-pa";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "avcc";
|
||||
};
|
||||
|
||||
®_dc1sw {
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-gmac-phy";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dldo1 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi-io";
|
||||
};
|
||||
|
||||
®_dldo2 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_vcc5v0>;
|
||||
usb2_vbus-supply = <®_vcc5v0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/*
|
||||
* Copyright 2016 Chen-Yu Tsai
|
||||
*
|
||||
* Chen-Yu Tsai <wens@csie.org>
|
||||
* Copyright 2017 Chen-Yu Tsai <wens@csie.org>
|
||||
* Copyright 2017 Icenowy Zheng <icenowy@aosc.io>
|
||||
*
|
||||
* 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
|
||||
@@ -51,24 +50,19 @@
|
||||
#size-cells = <1>;
|
||||
interrupt-parent = <&gic>;
|
||||
|
||||
aliases {
|
||||
};
|
||||
|
||||
chosen {
|
||||
};
|
||||
|
||||
clocks {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
osc24M: osc24M_clk {
|
||||
osc24M: osc24M {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
clock-output-names = "osc24M";
|
||||
};
|
||||
|
||||
osc32k: osc32k_clk {
|
||||
osc32k: osc32k {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <32768>;
|
||||
@@ -80,7 +74,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-a7";
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
@@ -105,11 +99,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
memory@40000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x40000000 0x80000000>;
|
||||
};
|
||||
|
||||
soc {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
@@ -140,6 +129,122 @@
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
mmc1: mmc@1c10000 {
|
||||
compatible = "allwinner,sun8i-r40-mmc",
|
||||
"allwinner,sun50i-a64-mmc";
|
||||
reg = <0x01c10000 0x1000>;
|
||||
clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
|
||||
clock-names = "ahb", "mmc";
|
||||
resets = <&ccu RST_BUS_MMC1>;
|
||||
reset-names = "ahb";
|
||||
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
mmc2: mmc@1c11000 {
|
||||
compatible = "allwinner,sun8i-r40-emmc",
|
||||
"allwinner,sun50i-a64-emmc";
|
||||
reg = <0x01c11000 0x1000>;
|
||||
clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
|
||||
clock-names = "ahb", "mmc";
|
||||
resets = <&ccu RST_BUS_MMC2>;
|
||||
reset-names = "ahb";
|
||||
pinctrl-0 = <&mmc2_pins>;
|
||||
pinctrl-names = "default";
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
mmc3: mmc@1c12000 {
|
||||
compatible = "allwinner,sun8i-r40-mmc",
|
||||
"allwinner,sun50i-a64-mmc";
|
||||
reg = <0x01c12000 0x1000>;
|
||||
clocks = <&ccu CLK_BUS_MMC3>, <&ccu CLK_MMC3>;
|
||||
clock-names = "ahb", "mmc";
|
||||
resets = <&ccu RST_BUS_MMC3>;
|
||||
reset-names = "ahb";
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
usbphy: phy@1c13400 {
|
||||
compatible = "allwinner,sun8i-r40-usb-phy";
|
||||
reg = <0x01c13400 0x14>,
|
||||
<0x01c14800 0x4>,
|
||||
<0x01c19800 0x4>,
|
||||
<0x01c1c800 0x4>;
|
||||
reg-names = "phy_ctrl",
|
||||
"pmu0",
|
||||
"pmu1",
|
||||
"pmu2";
|
||||
clocks = <&ccu CLK_USB_PHY0>,
|
||||
<&ccu CLK_USB_PHY1>,
|
||||
<&ccu CLK_USB_PHY2>;
|
||||
clock-names = "usb0_phy",
|
||||
"usb1_phy",
|
||||
"usb2_phy";
|
||||
resets = <&ccu RST_USB_PHY0>,
|
||||
<&ccu RST_USB_PHY1>,
|
||||
<&ccu RST_USB_PHY2>;
|
||||
reset-names = "usb0_reset",
|
||||
"usb1_reset",
|
||||
"usb2_reset";
|
||||
status = "disabled";
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
|
||||
ehci1: usb@1c19000 {
|
||||
compatible = "allwinner,sun8i-r40-ehci", "generic-ehci";
|
||||
reg = <0x01c19000 0x100>;
|
||||
interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_EHCI1>;
|
||||
resets = <&ccu RST_BUS_EHCI1>;
|
||||
phys = <&usbphy 1>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ohci1: usb@1c19400 {
|
||||
compatible = "allwinner,sun8i-r40-ohci", "generic-ohci";
|
||||
reg = <0x01c19400 0x100>;
|
||||
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_OHCI1>,
|
||||
<&ccu CLK_USB_OHCI1>;
|
||||
resets = <&ccu RST_BUS_OHCI1>;
|
||||
phys = <&usbphy 1>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ehci2: usb@1c1c000 {
|
||||
compatible = "allwinner,sun8i-r40-ehci", "generic-ehci";
|
||||
reg = <0x01c1c000 0x100>;
|
||||
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_EHCI2>;
|
||||
resets = <&ccu RST_BUS_EHCI2>;
|
||||
phys = <&usbphy 2>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ohci2: usb@1c1c400 {
|
||||
compatible = "allwinner,sun8i-r40-ohci", "generic-ohci";
|
||||
reg = <0x01c1c400 0x100>;
|
||||
interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_OHCI2>,
|
||||
<&ccu CLK_USB_OHCI2>;
|
||||
resets = <&ccu RST_BUS_OHCI2>;
|
||||
phys = <&usbphy 2>;
|
||||
phy-names = "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ccu: clock@1c20000 {
|
||||
compatible = "allwinner,sun8i-r40-ccu";
|
||||
reg = <0x01c20000 0x400>;
|
||||
@@ -153,8 +258,7 @@
|
||||
compatible = "allwinner,sun8i-r40-pinctrl";
|
||||
reg = <0x01c20800 0x400>;
|
||||
interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
|
||||
/* apb should be replaced once CCU is implemented */
|
||||
clocks = <&osc24M>, <&osc24M>, <&osc32k>;
|
||||
clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
|
||||
clock-names = "apb", "hosc", "losc";
|
||||
gpio-controller;
|
||||
interrupt-controller;
|
||||
@@ -174,10 +278,9 @@
|
||||
drive-strength = <40>;
|
||||
};
|
||||
|
||||
i2c0_pins: i2c0_pins {
|
||||
i2c0_pins: i2c0-pins {
|
||||
pins = "PB0", "PB1";
|
||||
function = "i2c0";
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mmc0_pins: mmc0-pins {
|
||||
@@ -188,11 +291,32 @@
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
uart0_pb_pins: uart0_pb_pins {
|
||||
pins = "PB22", "PB23";
|
||||
function = "uart0";
|
||||
mmc1_pg_pins: mmc1-pg-pins {
|
||||
pins = "PG0", "PG1", "PG2",
|
||||
"PG3", "PG4", "PG5";
|
||||
function = "mmc1";
|
||||
drive-strength = <30>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mmc2_pins: mmc2-pins {
|
||||
pins = "PC5", "PC6", "PC7", "PC8", "PC9",
|
||||
"PC10", "PC11", "PC12", "PC13", "PC14",
|
||||
"PC15", "PC24";
|
||||
function = "mmc2";
|
||||
drive-strength = <30>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
uart0_pb_pins: uart0-pb-pins {
|
||||
pins = "PB22", "PB23";
|
||||
function = "uart0";
|
||||
};
|
||||
};
|
||||
|
||||
wdt: watchdog@1c20c90 {
|
||||
compatible = "allwinner,sun4i-a10-wdt";
|
||||
reg = <0x01c20c90 0x10>;
|
||||
};
|
||||
|
||||
uart0: serial@1c28000 {
|
||||
@@ -201,7 +325,85 @@
|
||||
interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&osc24M>;
|
||||
clocks = <&ccu CLK_BUS_UART0>;
|
||||
resets = <&ccu RST_BUS_UART0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart1: serial@1c28400 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c28400 0x400>;
|
||||
interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&ccu CLK_BUS_UART1>;
|
||||
resets = <&ccu RST_BUS_UART1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart2: serial@1c28800 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c28800 0x400>;
|
||||
interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&ccu CLK_BUS_UART2>;
|
||||
resets = <&ccu RST_BUS_UART2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart3: serial@1c28c00 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c28c00 0x400>;
|
||||
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&ccu CLK_BUS_UART3>;
|
||||
resets = <&ccu RST_BUS_UART3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart4: serial@1c29000 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c29000 0x400>;
|
||||
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&ccu CLK_BUS_UART4>;
|
||||
resets = <&ccu RST_BUS_UART4>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart5: serial@1c29400 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c29400 0x400>;
|
||||
interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&ccu CLK_BUS_UART5>;
|
||||
resets = <&ccu RST_BUS_UART5>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart6: serial@1c29800 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c29800 0x400>;
|
||||
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&ccu CLK_BUS_UART6>;
|
||||
resets = <&ccu RST_BUS_UART6>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart7: serial@1c29c00 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x01c29c00 0x400>;
|
||||
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clocks = <&ccu CLK_BUS_UART7>;
|
||||
resets = <&ccu RST_BUS_UART7>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -209,7 +411,54 @@
|
||||
compatible = "allwinner,sun6i-a31-i2c";
|
||||
reg = <0x01c2ac00 0x400>;
|
||||
interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&osc24M>;
|
||||
clocks = <&ccu CLK_BUS_I2C0>;
|
||||
resets = <&ccu RST_BUS_I2C0>;
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
i2c1: i2c@1c2b000 {
|
||||
compatible = "allwinner,sun6i-a31-i2c";
|
||||
reg = <0x01c2b000 0x400>;
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_I2C1>;
|
||||
resets = <&ccu RST_BUS_I2C1>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
i2c2: i2c@1c2b400 {
|
||||
compatible = "allwinner,sun6i-a31-i2c";
|
||||
reg = <0x01c2b400 0x400>;
|
||||
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_I2C2>;
|
||||
resets = <&ccu RST_BUS_I2C2>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
i2c3: i2c@1c2b800 {
|
||||
compatible = "allwinner,sun6i-a31-i2c";
|
||||
reg = <0x01c2b800 0x400>;
|
||||
interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_I2C3>;
|
||||
resets = <&ccu RST_BUS_I2C3>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
i2c4: i2c@1c2c000 {
|
||||
compatible = "allwinner,sun6i-a31-i2c";
|
||||
reg = <0x01c2c000 0x400>;
|
||||
interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_I2C4>;
|
||||
resets = <&ccu RST_BUS_I2C4>;
|
||||
status = "disabled";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -237,7 +486,7 @@
|
||||
};
|
||||
|
||||
gic: interrupt-controller@1c81000 {
|
||||
compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x01c81000 0x1000>,
|
||||
<0x01c82000 0x1000>,
|
||||
<0x01c84000 0x2000>,
|
||||
@@ -254,7 +503,5 @@
|
||||
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
clock-frequency = <24000000>;
|
||||
arm,cpu-registers-not-fw-configured;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -56,6 +56,40 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
pwr-led {
|
||||
label = "bananapi:red:pwr";
|
||||
gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
user-led {
|
||||
label = "bananapi:green:user";
|
||||
gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
reg_vcc5v0: vcc5v0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>; /* PH23 */
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&pio 6 10 GPIO_ACTIVE_LOW>; /* PG10 WIFI_EN */
|
||||
};
|
||||
};
|
||||
|
||||
&ehci1 {
|
||||
/* Terminus Tech FE 1.1s 4-port USB 2.0 hub here */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
@@ -125,8 +159,24 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pg_pins>;
|
||||
vmmc-supply = <®_dldo2>;
|
||||
vqmmc-supply = <®_dldo1>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pb_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb1_vbus-supply = <®_vcc5v0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "tegra-u-boot.dtsi"
|
||||
|
||||
|
||||
/ {
|
||||
host1x@50000000 {
|
||||
u-boot,dm-pre-reloc;
|
||||
dc@54200000 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
/* Basic CPU architecture */
|
||||
#define CONFIG_ARCH_CPU_INIT
|
||||
|
||||
#define CONFIG_NR_DRAM_BANKS_MAX 2
|
||||
|
||||
/* UART configuration */
|
||||
#if (CONFIG_SYS_LPC32XX_UART == 1) || (CONFIG_SYS_LPC32XX_UART == 2) || \
|
||||
(CONFIG_SYS_LPC32XX_UART == 7)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define SUNXI_DMA_BASE 0x03002000
|
||||
/* SID address space starts at 0x03006000, but e-fuse is at offset 0x200 */
|
||||
#define SUNXI_SIDC_BASE 0x03006000
|
||||
#define SNUXI_SID_BASE 0x03006200
|
||||
#define SUNXI_SID_BASE 0x03006200
|
||||
#define SUNXI_TIMER_BASE 0x03009000
|
||||
#define SUNXI_PIO_BASE 0x0300B000
|
||||
#define SUNXI_PSI_BASE 0x0300C000
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
#ifndef _BCMSTB_TIMER_H
|
||||
#define _BCMSTB_TIMER_H
|
||||
|
||||
unsigned long timer_read_counter(void);
|
||||
uint64_t get_ticks(void);
|
||||
|
||||
#endif /* _BCMSTB_TIMER_H */
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
|
||||
/* Kirkwood has 2k of Security SRAM, use it for SP */
|
||||
#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000
|
||||
#define CONFIG_NR_DRAM_BANKS_MAX 2
|
||||
|
||||
#define CONFIG_I2C_MVTWSI_BASE0 KW_TWSI_BASE
|
||||
#define MV_UART_CONSOLE_BASE KW_UART0_BASE
|
||||
@@ -75,7 +74,6 @@
|
||||
*/
|
||||
#ifdef CONFIG_CMD_NET
|
||||
#define CONFIG_NETCONSOLE /* include NetConsole support */
|
||||
#define CONFIG_MII /* expose smi ove miiphy interface */
|
||||
#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN /* detect link using phy */
|
||||
#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
|
||||
#define CONFIG_RESET_PHY_R /* use reset_phy() to init mv8831116 PHY */
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
/* end of 16M scrubbed by training in bootrom */
|
||||
#define CONFIG_SYS_INIT_SP_ADDR 0x00FF0000
|
||||
#define CONFIG_NR_DRAM_BANKS_MAX 2
|
||||
|
||||
#define MV_UART_CONSOLE_BASE MVEBU_UART0_BASE
|
||||
|
||||
@@ -73,7 +72,6 @@
|
||||
* Ethernet Driver configuration
|
||||
*/
|
||||
#ifdef CONFIG_CMD_NET
|
||||
#define CONFIG_MII /* expose smi ove miiphy interface */
|
||||
#define CONFIG_ENV_OVERWRITE /* ethaddr can be reprogrammed */
|
||||
#define CONFIG_ARP_TIMEOUT 200
|
||||
#define CONFIG_NET_RETRY_COUNT 50
|
||||
|
||||
@@ -6,6 +6,8 @@ config ARCH_RMOBILE_BOARD_STRING
|
||||
|
||||
config RCAR_GEN2
|
||||
bool "Renesas RCar Gen2"
|
||||
select PHY
|
||||
select PHY_RCAR_GEN2
|
||||
|
||||
config R8A7740
|
||||
bool "Renesas SoC R8A7740"
|
||||
|
||||
@@ -49,7 +49,7 @@ u32 spl_boot_device(void)
|
||||
debug("node=%d\n", node);
|
||||
goto fallback;
|
||||
}
|
||||
ret = device_get_global_by_of_offset(node, &dev);
|
||||
ret = device_get_global_by_ofnode(offset_to_ofnode(node), &dev);
|
||||
if (ret) {
|
||||
debug("device at node %s/%d not found: %d\n", bootdev, node,
|
||||
ret);
|
||||
|
||||
@@ -51,7 +51,7 @@ u32 spl_boot_device(void)
|
||||
debug("node=%d\n", node);
|
||||
goto fallback;
|
||||
}
|
||||
ret = device_get_global_by_of_offset(node, &dev);
|
||||
ret = device_get_global_by_ofnode(offset_to_ofnode(node), &dev);
|
||||
if (ret) {
|
||||
debug("device at node %s/%d not found: %d\n", bootdev, node,
|
||||
ret);
|
||||
|
||||
@@ -11,6 +11,16 @@ config TARGET_SOCFPGA_ARRIA10
|
||||
bool
|
||||
select ALTERA_SDRAM
|
||||
select SPL_BOARD_INIT if SPL
|
||||
select CLK
|
||||
select SPL_CLK if SPL
|
||||
select DM_I2C
|
||||
select DM_RESET
|
||||
select SPL_DM_RESET if SPL
|
||||
select REGMAP
|
||||
select SPL_REGMAP if SPL
|
||||
select SYSCON
|
||||
select SPL_SYSCON if SPL
|
||||
select ETH_DESIGNWARE_SOCFPGA
|
||||
|
||||
config TARGET_SOCFPGA_CYCLONE5
|
||||
bool
|
||||
|
||||
@@ -26,7 +26,6 @@ obj-y += clock_manager_arria10.o
|
||||
obj-y += misc_arria10.o
|
||||
obj-y += pinmux_arria10.o
|
||||
obj-y += reset_manager_arria10.o
|
||||
obj-y += timer.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_TARGET_SOCFPGA_STRATIX10
|
||||
|
||||
@@ -43,14 +43,6 @@ int board_init(void)
|
||||
/* Address of boot parameters for ATAG (if ATAG is used) */
|
||||
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
|
||||
|
||||
#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
|
||||
/* configuring the clock based on handoff */
|
||||
cm_basic_init(gd->fdt_blob);
|
||||
|
||||
/* Add device descriptor to FPGA device table */
|
||||
socfpga_fpga_add();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,11 @@ int cm_wait_for_fsm(void)
|
||||
|
||||
int set_cpu_clk_info(void)
|
||||
{
|
||||
#if defined(CONFIG_TARGET_SOCFPGA_GEN5)
|
||||
/* Calculate the clock frequencies required for drivers */
|
||||
cm_get_l4_sp_clk_hz();
|
||||
cm_get_mmc_controller_clk_hz();
|
||||
#endif
|
||||
|
||||
gd->bd->bi_arm_freq = cm_get_mpu_clk_hz() / 1000000;
|
||||
gd->bd->bi_dsp_freq = 0;
|
||||
|
||||
@@ -7,18 +7,15 @@
|
||||
#include <fdtdec.h>
|
||||
#include <asm/io.h>
|
||||
#include <dm.h>
|
||||
#include <clk.h>
|
||||
#include <dm/device-internal.h>
|
||||
#include <asm/arch/clock_manager.h>
|
||||
|
||||
static const struct socfpga_clock_manager *clock_manager_base =
|
||||
(struct socfpga_clock_manager *)SOCFPGA_CLKMGR_ADDRESS;
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
|
||||
static u32 eosc1_hz;
|
||||
static u32 cb_intosc_hz;
|
||||
static u32 f2s_free_hz;
|
||||
static u32 cm_l4_main_clk_hz;
|
||||
static u32 cm_l4_sp_clk_hz;
|
||||
static u32 cm_l4_mp_clk_hz;
|
||||
static u32 cm_l4_sys_free_clk_hz;
|
||||
|
||||
struct mainpll_cfg {
|
||||
u32 vco0_psrc;
|
||||
@@ -141,9 +138,9 @@ struct strtopu32 {
|
||||
};
|
||||
|
||||
const struct strtopu32 dt_to_val[] = {
|
||||
{ "/clocks/altera_arria10_hps_eosc1", &eosc1_hz},
|
||||
{ "/clocks/altera_arria10_hps_cb_intosc_ls", &cb_intosc_hz},
|
||||
{ "/clocks/altera_arria10_hps_f2h_free", &f2s_free_hz},
|
||||
{ "altera_arria10_hps_eosc1", &eosc1_hz },
|
||||
{ "altera_arria10_hps_cb_intosc_ls", &cb_intosc_hz },
|
||||
{ "altera_arria10_hps_f2h_free", &f2s_free_hz },
|
||||
};
|
||||
|
||||
static int of_to_struct(const void *blob, int node, const struct strtou32 *cfg_tab,
|
||||
@@ -163,28 +160,39 @@ static int of_to_struct(const void *blob, int node, const struct strtou32 *cfg_t
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void of_get_input_clks(const void *blob)
|
||||
static int of_get_input_clks(const void *blob)
|
||||
{
|
||||
int node, i;
|
||||
struct udevice *dev;
|
||||
struct clk clk;
|
||||
int i, ret;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(dt_to_val); i++) {
|
||||
node = fdt_path_offset(blob, dt_to_val[i].str);
|
||||
memset(&clk, 0, sizeof(clk));
|
||||
|
||||
if (node < 0)
|
||||
continue;
|
||||
ret = uclass_get_device_by_name(UCLASS_CLK, dt_to_val[i].str,
|
||||
&dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
fdtdec_get_int_array(blob, node, "clock-frequency",
|
||||
dt_to_val[i].p, 1);
|
||||
ret = clk_request(dev, &clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
*dt_to_val[i].p = clk_get_rate(&clk);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int of_get_clk_cfg(const void *blob, struct mainpll_cfg *main_cfg,
|
||||
struct perpll_cfg *per_cfg)
|
||||
{
|
||||
int node, child, len;
|
||||
int ret, node, child, len;
|
||||
const char *node_name;
|
||||
|
||||
of_get_input_clks(blob);
|
||||
ret = of_get_input_clks(blob);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
node = fdtdec_next_compatible(blob, 0, COMPAT_ALTERA_SOCFPGA_CLK_INIT);
|
||||
|
||||
@@ -223,6 +231,9 @@ static int of_get_clk_cfg(const void *blob, struct mainpll_cfg *main_cfg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct socfpga_clock_manager *clock_manager_base =
|
||||
(struct socfpga_clock_manager *)SOCFPGA_CLKMGR_ADDRESS;
|
||||
|
||||
/* calculate the intended main VCO frequency based on handoff */
|
||||
static unsigned int cm_calc_handoff_main_vco_clk_hz
|
||||
(struct mainpll_cfg *main_cfg)
|
||||
@@ -888,56 +899,12 @@ static int cm_full_cfg(struct mainpll_cfg *main_cfg, struct perpll_cfg *per_cfg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cm_use_intosc(void)
|
||||
static void cm_use_intosc(void)
|
||||
{
|
||||
setbits_le32(&clock_manager_base->ctrl,
|
||||
CLKMGR_CLKMGR_CTL_BOOTCLK_INTOSC_SET_MSK);
|
||||
}
|
||||
|
||||
unsigned int cm_get_noc_clk_hz(void)
|
||||
{
|
||||
unsigned int clk_src, divisor, nocclk, src_hz;
|
||||
|
||||
nocclk = readl(&clock_manager_base->main_pll.nocclk);
|
||||
clk_src = (nocclk >> CLKMGR_MAINPLL_NOCCLK_SRC_LSB) &
|
||||
CLKMGR_MAINPLL_NOCCLK_SRC_MSK;
|
||||
|
||||
divisor = 1 + (nocclk & CLKMGR_MAINPLL_NOCDIV_MSK);
|
||||
|
||||
if (clk_src == CLKMGR_PERPLLGRP_SRC_MAIN) {
|
||||
src_hz = cm_get_main_vco_clk_hz();
|
||||
src_hz /= 1 +
|
||||
(readl(SOCFPGA_CLKMGR_ADDRESS + CLKMGR_MAINPLL_NOC_CLK_OFFSET) &
|
||||
CLKMGR_MAINPLL_NOCCLK_CNT_MSK);
|
||||
} else if (clk_src == CLKMGR_PERPLLGRP_SRC_PERI) {
|
||||
src_hz = cm_get_per_vco_clk_hz();
|
||||
src_hz /= 1 +
|
||||
((readl(SOCFPGA_CLKMGR_ADDRESS +
|
||||
CLKMGR_MAINPLL_NOC_CLK_OFFSET) >>
|
||||
CLKMGR_MAINPLL_NOCCLK_PERICNT_LSB) &
|
||||
CLKMGR_MAINPLL_NOCCLK_CNT_MSK);
|
||||
} else if (clk_src == CLKMGR_PERPLLGRP_SRC_OSC1) {
|
||||
src_hz = eosc1_hz;
|
||||
} else if (clk_src == CLKMGR_PERPLLGRP_SRC_INTOSC) {
|
||||
src_hz = cb_intosc_hz;
|
||||
} else if (clk_src == CLKMGR_PERPLLGRP_SRC_FPGA) {
|
||||
src_hz = f2s_free_hz;
|
||||
} else {
|
||||
src_hz = 0;
|
||||
}
|
||||
|
||||
return src_hz / divisor;
|
||||
}
|
||||
|
||||
unsigned int cm_get_l4_noc_hz(unsigned int nocdivshift)
|
||||
{
|
||||
unsigned int divisor2 = 1 <<
|
||||
((readl(&clock_manager_base->main_pll.nocdiv) >>
|
||||
nocdivshift) & CLKMGR_MAINPLL_NOCDIV_MSK);
|
||||
|
||||
return cm_get_noc_clk_hz() / divisor2;
|
||||
}
|
||||
|
||||
int cm_basic_init(const void *blob)
|
||||
{
|
||||
struct mainpll_cfg main_cfg;
|
||||
@@ -952,213 +919,77 @@ int cm_basic_init(const void *blob)
|
||||
if (rval)
|
||||
return rval;
|
||||
|
||||
rval = cm_full_cfg(&main_cfg, &per_cfg);
|
||||
cm_use_intosc();
|
||||
|
||||
cm_l4_main_clk_hz =
|
||||
cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4MAINCLK_LSB);
|
||||
return cm_full_cfg(&main_cfg, &per_cfg);
|
||||
}
|
||||
#endif
|
||||
|
||||
cm_l4_mp_clk_hz = cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4MPCLK_LSB);
|
||||
static u32 cm_get_rate_dm(char *name)
|
||||
{
|
||||
struct uclass *uc;
|
||||
struct udevice *dev = NULL;
|
||||
struct clk clk = { 0 };
|
||||
ulong rate;
|
||||
int ret;
|
||||
|
||||
cm_l4_sp_clk_hz = cm_get_l4_sp_clk_hz();
|
||||
/* Device addresses start at 1 */
|
||||
ret = uclass_get(UCLASS_CLK, &uc);
|
||||
if (ret)
|
||||
return 0;
|
||||
|
||||
cm_l4_sys_free_clk_hz = cm_get_noc_clk_hz() / 4;
|
||||
ret = uclass_get_device_by_name(UCLASS_CLK, name, &dev);
|
||||
if (ret)
|
||||
return 0;
|
||||
|
||||
return rval;
|
||||
ret = device_probe(dev);
|
||||
if (ret)
|
||||
return 0;
|
||||
|
||||
ret = clk_request(dev, &clk);
|
||||
if (ret)
|
||||
return 0;
|
||||
|
||||
rate = clk_get_rate(&clk);
|
||||
|
||||
clk_free(&clk);
|
||||
|
||||
return rate;
|
||||
}
|
||||
|
||||
static u32 cm_get_rate_dm_khz(char *name)
|
||||
{
|
||||
return cm_get_rate_dm(name) / 1000;
|
||||
}
|
||||
|
||||
unsigned long cm_get_mpu_clk_hz(void)
|
||||
{
|
||||
u32 reg, clk_hz;
|
||||
u32 clk_src, mainmpuclk_reg;
|
||||
|
||||
mainmpuclk_reg = readl(&clock_manager_base->main_pll.mpuclk);
|
||||
|
||||
clk_src = (mainmpuclk_reg >> CLKMGR_MAINPLL_MPUCLK_SRC_LSB) &
|
||||
CLKMGR_MAINPLL_MPUCLK_SRC_MSK;
|
||||
|
||||
reg = readl(&clock_manager_base->altera.mpuclk);
|
||||
/* Check MPU clock source: main, periph, osc1, intosc or f2s? */
|
||||
switch (clk_src) {
|
||||
case CLKMGR_MAINPLL_MPUCLK_SRC_MAIN:
|
||||
clk_hz = cm_get_main_vco_clk_hz();
|
||||
clk_hz /= (reg & CLKMGR_MAINPLL_MPUCLK_CNT_MSK) + 1;
|
||||
break;
|
||||
case CLKMGR_MAINPLL_MPUCLK_SRC_PERI:
|
||||
clk_hz = cm_get_per_vco_clk_hz();
|
||||
clk_hz /= (((reg >> CLKMGR_MAINPLL_MPUCLK_PERICNT_LSB) &
|
||||
CLKMGR_MAINPLL_MPUCLK_CNT_MSK) + 1);
|
||||
break;
|
||||
case CLKMGR_MAINPLL_MPUCLK_SRC_OSC1:
|
||||
clk_hz = eosc1_hz;
|
||||
break;
|
||||
case CLKMGR_MAINPLL_MPUCLK_SRC_INTOSC:
|
||||
clk_hz = cb_intosc_hz;
|
||||
break;
|
||||
case CLKMGR_MAINPLL_MPUCLK_SRC_FPGA:
|
||||
clk_hz = f2s_free_hz;
|
||||
break;
|
||||
default:
|
||||
printf("cm_get_mpu_clk_hz invalid clk_src %d\n", clk_src);
|
||||
return 0;
|
||||
}
|
||||
|
||||
clk_hz /= (mainmpuclk_reg & CLKMGR_MAINPLL_MPUCLK_CNT_MSK) + 1;
|
||||
|
||||
return clk_hz;
|
||||
}
|
||||
|
||||
unsigned int cm_get_per_vco_clk_hz(void)
|
||||
{
|
||||
u32 src_hz = 0;
|
||||
u32 clk_src = 0;
|
||||
u32 numer = 0;
|
||||
u32 denom = 0;
|
||||
u32 vco = 0;
|
||||
|
||||
clk_src = readl(&clock_manager_base->per_pll.vco0);
|
||||
|
||||
clk_src = (clk_src >> CLKMGR_PERPLL_VCO0_PSRC_LSB) &
|
||||
CLKMGR_PERPLL_VCO0_PSRC_MSK;
|
||||
|
||||
if (clk_src == CLKMGR_PERPLL_VCO0_PSRC_EOSC) {
|
||||
src_hz = eosc1_hz;
|
||||
} else if (clk_src == CLKMGR_PERPLL_VCO0_PSRC_E_INTOSC) {
|
||||
src_hz = cb_intosc_hz;
|
||||
} else if (clk_src == CLKMGR_PERPLL_VCO0_PSRC_F2S) {
|
||||
src_hz = f2s_free_hz;
|
||||
} else if (clk_src == CLKMGR_PERPLL_VCO0_PSRC_MAIN) {
|
||||
src_hz = cm_get_main_vco_clk_hz();
|
||||
src_hz /= (readl(&clock_manager_base->main_pll.cntr15clk) &
|
||||
CLKMGR_MAINPLL_CNTRCLK_MSK) + 1;
|
||||
} else {
|
||||
printf("cm_get_per_vco_clk_hz invalid clk_src %d\n", clk_src);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vco = readl(&clock_manager_base->per_pll.vco1);
|
||||
|
||||
numer = vco & CLKMGR_PERPLL_VCO1_NUMER_MSK;
|
||||
|
||||
denom = (vco >> CLKMGR_PERPLL_VCO1_DENOM_LSB) &
|
||||
CLKMGR_PERPLL_VCO1_DENOM_MSK;
|
||||
|
||||
vco = src_hz;
|
||||
vco /= 1 + denom;
|
||||
vco *= 1 + numer;
|
||||
|
||||
return vco;
|
||||
}
|
||||
|
||||
unsigned int cm_get_main_vco_clk_hz(void)
|
||||
{
|
||||
u32 src_hz, numer, denom, vco;
|
||||
|
||||
u32 clk_src = readl(&clock_manager_base->main_pll.vco0);
|
||||
|
||||
clk_src = (clk_src >> CLKMGR_MAINPLL_VCO0_PSRC_LSB) &
|
||||
CLKMGR_MAINPLL_VCO0_PSRC_MSK;
|
||||
|
||||
if (clk_src == CLKMGR_MAINPLL_VCO0_PSRC_EOSC) {
|
||||
src_hz = eosc1_hz;
|
||||
} else if (clk_src == CLKMGR_MAINPLL_VCO0_PSRC_E_INTOSC) {
|
||||
src_hz = cb_intosc_hz;
|
||||
} else if (clk_src == CLKMGR_MAINPLL_VCO0_PSRC_F2S) {
|
||||
src_hz = f2s_free_hz;
|
||||
} else {
|
||||
printf("cm_get_main_vco_clk_hz invalid clk_src %d\n", clk_src);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vco = readl(&clock_manager_base->main_pll.vco1);
|
||||
|
||||
numer = vco & CLKMGR_MAINPLL_VCO1_NUMER_MSK;
|
||||
|
||||
denom = (vco >> CLKMGR_MAINPLL_VCO1_DENOM_LSB) &
|
||||
CLKMGR_MAINPLL_VCO1_DENOM_MSK;
|
||||
|
||||
vco = src_hz;
|
||||
vco /= 1 + denom;
|
||||
vco *= 1 + numer;
|
||||
|
||||
return vco;
|
||||
}
|
||||
|
||||
unsigned int cm_get_l4_sp_clk_hz(void)
|
||||
{
|
||||
return cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4SPCLK_LSB);
|
||||
}
|
||||
|
||||
unsigned int cm_get_mmc_controller_clk_hz(void)
|
||||
{
|
||||
u32 clk_hz = 0;
|
||||
u32 clk_input = 0;
|
||||
|
||||
clk_input = readl(&clock_manager_base->per_pll.cntr6clk);
|
||||
clk_input = (clk_input >> CLKMGR_PERPLL_CNTR6CLK_SRC_LSB) &
|
||||
CLKMGR_PERPLLGRP_SRC_MSK;
|
||||
|
||||
switch (clk_input) {
|
||||
case CLKMGR_PERPLLGRP_SRC_MAIN:
|
||||
clk_hz = cm_get_main_vco_clk_hz();
|
||||
clk_hz /= 1 + (readl(&clock_manager_base->main_pll.cntr6clk) &
|
||||
CLKMGR_MAINPLL_CNTRCLK_MSK);
|
||||
break;
|
||||
|
||||
case CLKMGR_PERPLLGRP_SRC_PERI:
|
||||
clk_hz = cm_get_per_vco_clk_hz();
|
||||
clk_hz /= 1 + (readl(&clock_manager_base->per_pll.cntr6clk) &
|
||||
CLKMGR_PERPLL_CNTRCLK_MSK);
|
||||
break;
|
||||
|
||||
case CLKMGR_PERPLLGRP_SRC_OSC1:
|
||||
clk_hz = eosc1_hz;
|
||||
break;
|
||||
|
||||
case CLKMGR_PERPLLGRP_SRC_INTOSC:
|
||||
clk_hz = cb_intosc_hz;
|
||||
break;
|
||||
|
||||
case CLKMGR_PERPLLGRP_SRC_FPGA:
|
||||
clk_hz = f2s_free_hz;
|
||||
break;
|
||||
}
|
||||
|
||||
return clk_hz / 4;
|
||||
}
|
||||
|
||||
unsigned int cm_get_spi_controller_clk_hz(void)
|
||||
{
|
||||
return cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4MPCLK_LSB);
|
||||
return cm_get_rate_dm("main_mpu_base_clk");
|
||||
}
|
||||
|
||||
unsigned int cm_get_qspi_controller_clk_hz(void)
|
||||
{
|
||||
return cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4MAINCLK_LSB);
|
||||
return cm_get_rate_dm("qspi_clk");
|
||||
}
|
||||
|
||||
/* Override weak dw_spi_get_clk implementation in designware_spi.c driver */
|
||||
int dw_spi_get_clk(struct udevice *bus, ulong *rate)
|
||||
unsigned int cm_get_l4_sp_clk_hz(void)
|
||||
{
|
||||
*rate = cm_get_spi_controller_clk_hz();
|
||||
|
||||
return 0;
|
||||
return cm_get_rate_dm("l4_sp_clk");
|
||||
}
|
||||
|
||||
void cm_print_clock_quick_summary(void)
|
||||
{
|
||||
printf("MPU %10ld kHz\n", cm_get_mpu_clk_hz() / 1000);
|
||||
printf("MMC %8d kHz\n", cm_get_mmc_controller_clk_hz() / 1000);
|
||||
printf("QSPI %8d kHz\n", cm_get_qspi_controller_clk_hz() / 1000);
|
||||
printf("SPI %8d kHz\n", cm_get_spi_controller_clk_hz() / 1000);
|
||||
printf("EOSC1 %8d kHz\n", eosc1_hz / 1000);
|
||||
printf("cb_intosc %8d kHz\n", cb_intosc_hz / 1000);
|
||||
printf("f2s_free %8d kHz\n", f2s_free_hz / 1000);
|
||||
printf("Main VCO %8d kHz\n", cm_get_main_vco_clk_hz() / 1000);
|
||||
printf("NOC %8d kHz\n", cm_get_noc_clk_hz() / 1000);
|
||||
printf("L4 Main %8d kHz\n",
|
||||
cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4MAINCLK_LSB) / 1000);
|
||||
printf("L4 MP %8d kHz\n",
|
||||
cm_get_l4_noc_hz(CLKMGR_MAINPLL_NOCDIV_L4MPCLK_LSB) / 1000);
|
||||
printf("L4 SP %8d kHz\n", cm_get_l4_sp_clk_hz() / 1000);
|
||||
printf("L4 sys free %8d kHz\n", cm_l4_sys_free_clk_hz / 1000);
|
||||
printf("MPU %10d kHz\n", cm_get_rate_dm_khz("main_mpu_base_clk"));
|
||||
printf("MMC %8d kHz\n", cm_get_rate_dm_khz("sdmmc_clk"));
|
||||
printf("QSPI %8d kHz\n", cm_get_rate_dm_khz("qspi_clk"));
|
||||
printf("SPI %8d kHz\n", cm_get_rate_dm_khz("spi_m_clk"));
|
||||
printf("EOSC1 %8d kHz\n", cm_get_rate_dm_khz("osc1"));
|
||||
printf("cb_intosc %8d kHz\n", cm_get_rate_dm_khz("cb_intosc_ls_clk"));
|
||||
printf("f2s_free %8d kHz\n", cm_get_rate_dm_khz("f2s_free_clk"));
|
||||
printf("Main VCO %8d kHz\n", cm_get_rate_dm_khz("main_pll@40"));
|
||||
printf("NOC %8d kHz\n", cm_get_rate_dm_khz("main_noc_base_clk"));
|
||||
printf("L4 Main %8d kHz\n", cm_get_rate_dm_khz("l4_main_clk"));
|
||||
printf("L4 MP %8d kHz\n", cm_get_rate_dm_khz("l4_mp_clk"));
|
||||
printf("L4 SP %8d kHz\n", cm_get_rate_dm_khz("l4_sp_clk"));
|
||||
printf("L4 sys free %8d kHz\n", cm_get_rate_dm_khz("l4_sys_free_clk"));
|
||||
}
|
||||
|
||||
@@ -89,19 +89,14 @@ struct socfpga_clock_manager {
|
||||
struct socfpga_clock_manager_altera altera;
|
||||
};
|
||||
|
||||
void cm_use_intosc(void);
|
||||
unsigned int cm_get_noc_clk_hz(void);
|
||||
unsigned int cm_get_l4_noc_hz(unsigned int nocdivshift);
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
int cm_basic_init(const void *blob);
|
||||
#endif
|
||||
|
||||
unsigned int cm_get_l4_sp_clk_hz(void);
|
||||
unsigned int cm_get_main_vco_clk_hz(void);
|
||||
unsigned int cm_get_per_vco_clk_hz(void);
|
||||
unsigned long cm_get_mpu_clk_hz(void);
|
||||
|
||||
unsigned int cm_get_qspi_controller_clk_hz(void);
|
||||
unsigned int cm_get_mmc_controller_clk_hz(void);
|
||||
unsigned int cm_get_spi_controller_clk_hz(void);
|
||||
|
||||
#endif /* __ASSEMBLER__ */
|
||||
|
||||
|
||||
@@ -21,10 +21,13 @@ void socfpga_fpga_add(void);
|
||||
static inline void socfpga_fpga_add(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
|
||||
unsigned int dedicated_uart_com_port(const void *blob);
|
||||
unsigned int shared_uart_com_port(const void *blob);
|
||||
unsigned int uart_com_port(const void *blob);
|
||||
#ifdef CONFIG_TARGET_SOCFPGA_GEN5
|
||||
void socfpga_sdram_remap_zero(void);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
|
||||
void socfpga_init_security_policies(void);
|
||||
void socfpga_sdram_remap_zero(void);
|
||||
#endif
|
||||
|
||||
void do_bridge_reset(int enable);
|
||||
|
||||
@@ -10,12 +10,8 @@
|
||||
|
||||
void socfpga_watchdog_disable(void);
|
||||
void socfpga_reset_deassert_noc_ddr_scheduler(void);
|
||||
int socfpga_is_wdt_in_reset(void);
|
||||
void socfpga_emac_manage_reset(ulong emacbase, u32 state);
|
||||
int socfpga_reset_deassert_bridges_handoff(void);
|
||||
void socfpga_reset_assert_fpga_connected_peripherals(void);
|
||||
void socfpga_reset_deassert_osc1wd0(void);
|
||||
void socfpga_reset_uart(int assert);
|
||||
int socfpga_bridges_reset(void);
|
||||
|
||||
struct socfpga_reset_manager {
|
||||
|
||||
@@ -146,9 +146,9 @@ struct socfpga_system_manager {
|
||||
#define SYSMGR_FPGAINTF_SDMMC BIT(8)
|
||||
#define SYSMGR_FPGAINTF_SPIM0 BIT(16)
|
||||
#define SYSMGR_FPGAINTF_SPIM1 BIT(24)
|
||||
#define SYSMGR_FPGAINTF_EMAC0 (0x11 << 0)
|
||||
#define SYSMGR_FPGAINTF_EMAC1 (0x11 << 8)
|
||||
#define SYSMGR_FPGAINTF_EMAC2 (0x11 << 16)
|
||||
#define SYSMGR_FPGAINTF_EMAC0 BIT(0)
|
||||
#define SYSMGR_FPGAINTF_EMAC1 BIT(8)
|
||||
#define SYSMGR_FPGAINTF_EMAC2 BIT(16)
|
||||
|
||||
#define SYSMGR_SDMMC_SMPLSEL_SHIFT 4
|
||||
#define SYSMGR_SDMMC_DRVSEL_SHIFT 0
|
||||
|
||||
@@ -160,15 +160,15 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,
|
||||
u32 buf_len;
|
||||
int ret;
|
||||
|
||||
ret = mbox_prepare_cmd_only(id, cmd, is_indirect, len, arg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (urgent) {
|
||||
/* Read status because it is toggled */
|
||||
status = MBOX_READL(MBOX_STATUS) & MBOX_STATUS_UA_MSK;
|
||||
/* Send command as urgent command */
|
||||
MBOX_WRITEL(1, MBOX_URG);
|
||||
/* Write urgent command to urgent register */
|
||||
MBOX_WRITEL(cmd, MBOX_URG);
|
||||
} else {
|
||||
ret = mbox_prepare_cmd_only(id, cmd, is_indirect, len, arg);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* write doorbell */
|
||||
@@ -188,8 +188,7 @@ static __always_inline int mbox_send_cmd_common(u8 id, u32 cmd, u8 is_indirect,
|
||||
|
||||
if (urgent) {
|
||||
u32 new_status = MBOX_READL(MBOX_STATUS);
|
||||
/* urgent command doesn't have response */
|
||||
MBOX_WRITEL(0, MBOX_URG);
|
||||
|
||||
/* Urgent ACK is toggled */
|
||||
if ((new_status & MBOX_STATUS_UA_MSK) ^ status)
|
||||
return 0;
|
||||
|
||||
@@ -28,59 +28,14 @@
|
||||
#define PINMUX_UART1_TX_SHARED_IO_OFFSET_Q3_7 0x78
|
||||
#define PINMUX_UART1_TX_SHARED_IO_OFFSET_Q4_3 0x98
|
||||
|
||||
static struct socfpga_system_manager *sysmgr_regs =
|
||||
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
|
||||
#if defined(CONFIG_SPL_BUILD)
|
||||
static struct pl310_regs *const pl310 =
|
||||
(struct pl310_regs *)CONFIG_SYS_PL310_BASE;
|
||||
static const struct socfpga_noc_fw_ocram *noc_fw_ocram_base =
|
||||
(void *)SOCFPGA_SDR_FIREWALL_OCRAM_ADDRESS;
|
||||
#endif
|
||||
|
||||
static struct socfpga_system_manager *sysmgr_regs =
|
||||
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
|
||||
|
||||
/*
|
||||
* DesignWare Ethernet initialization
|
||||
*/
|
||||
#ifdef CONFIG_ETH_DESIGNWARE
|
||||
static void arria10_dwmac_reset(const u8 of_reset_id, const u8 phymode)
|
||||
{
|
||||
u32 reset;
|
||||
|
||||
if (of_reset_id == EMAC0_RESET) {
|
||||
reset = SOCFPGA_RESET(EMAC0);
|
||||
} else if (of_reset_id == EMAC1_RESET) {
|
||||
reset = SOCFPGA_RESET(EMAC1);
|
||||
} else if (of_reset_id == EMAC2_RESET) {
|
||||
reset = SOCFPGA_RESET(EMAC2);
|
||||
} else {
|
||||
printf("GMAC: Invalid reset ID (%i)!\n", of_reset_id);
|
||||
return;
|
||||
}
|
||||
|
||||
clrsetbits_le32(&sysmgr_regs->emac[of_reset_id - EMAC0_RESET],
|
||||
SYSMGR_EMACGRP_CTRL_PHYSEL_MASK,
|
||||
phymode);
|
||||
|
||||
/* Release the EMAC controller from reset */
|
||||
socfpga_per_reset(reset, 0);
|
||||
}
|
||||
|
||||
static int socfpga_eth_reset(void)
|
||||
{
|
||||
/* Put all GMACs into RESET state. */
|
||||
socfpga_per_reset(SOCFPGA_RESET(EMAC0), 1);
|
||||
socfpga_per_reset(SOCFPGA_RESET(EMAC1), 1);
|
||||
socfpga_per_reset(SOCFPGA_RESET(EMAC2), 1);
|
||||
return socfpga_eth_reset_common(arria10_dwmac_reset);
|
||||
};
|
||||
#else
|
||||
static int socfpga_eth_reset(void)
|
||||
{
|
||||
return 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SPL_BUILD)
|
||||
/*
|
||||
+ * This function initializes security policies to be consistent across
|
||||
+ * all logic units in the Arria 10.
|
||||
@@ -88,7 +43,7 @@ static int socfpga_eth_reset(void)
|
||||
+ * The idea is to set all security policies to be normal, nonsecure
|
||||
+ * for all units.
|
||||
+ */
|
||||
static void initialize_security_policies(void)
|
||||
void socfpga_init_security_policies(void)
|
||||
{
|
||||
/* Put OCRAM in non-secure */
|
||||
writel(0x003f0000, &noc_fw_ocram_base->region0);
|
||||
@@ -108,152 +63,21 @@ static void initialize_security_policies(void)
|
||||
writel(0x0007FFFF, &sysmgr_regs->ecc_intmask_set);
|
||||
}
|
||||
|
||||
int arch_early_init_r(void)
|
||||
void socfpga_sdram_remap_zero(void)
|
||||
{
|
||||
initialize_security_policies();
|
||||
|
||||
/* Configure the L2 controller to make SDRAM start at 0 */
|
||||
writel(0x1, &pl310->pl310_addr_filter_start);
|
||||
|
||||
/* assert reset to all except L4WD0 and L4TIMER0 */
|
||||
socfpga_per_reset_all();
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int arch_early_init_r(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This function looking the 1st encounter UART peripheral,
|
||||
* and then return its offset of the dedicated/shared IO pin
|
||||
* mux. offset value (zero and above).
|
||||
*/
|
||||
static int find_peripheral_uart(const void *blob,
|
||||
int child, const char *node_name)
|
||||
int arch_early_init_r(void)
|
||||
{
|
||||
int len;
|
||||
fdt_addr_t base_addr = 0;
|
||||
fdt_size_t size;
|
||||
const u32 *cell;
|
||||
u32 value, offset = 0;
|
||||
|
||||
base_addr = fdtdec_get_addr_size(blob, child, "reg", &size);
|
||||
if (base_addr != FDT_ADDR_T_NONE) {
|
||||
cell = fdt_getprop(blob, child, "pinctrl-single,pins",
|
||||
&len);
|
||||
if (cell != NULL) {
|
||||
for (; len > 0; len -= (2 * sizeof(u32))) {
|
||||
offset = fdt32_to_cpu(*cell++);
|
||||
value = fdt32_to_cpu(*cell++);
|
||||
/* Found UART peripheral. */
|
||||
if (value == PINMUX_UART)
|
||||
return offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function looks up the 1st encounter UART peripheral,
|
||||
* and then return its offset of the dedicated/shared IO pin
|
||||
* mux. UART peripheral is found if the offset is not in negative
|
||||
* value.
|
||||
*/
|
||||
static int is_peripheral_uart_true(const void *blob,
|
||||
int node, const char *child_name)
|
||||
{
|
||||
int child, len;
|
||||
const char *node_name;
|
||||
|
||||
child = fdt_first_subnode(blob, node);
|
||||
|
||||
if (child < 0)
|
||||
return -EINVAL;
|
||||
|
||||
node_name = fdt_get_name(blob, child, &len);
|
||||
|
||||
while (node_name) {
|
||||
if (!strcmp(child_name, node_name))
|
||||
return find_peripheral_uart(blob, child, node_name);
|
||||
|
||||
child = fdt_next_subnode(blob, child);
|
||||
if (child < 0)
|
||||
break;
|
||||
|
||||
node_name = fdt_get_name(blob, child, &len);
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function looking the 1st encounter UART dedicated IO peripheral,
|
||||
* and then return based address of the 1st encounter UART dedicated
|
||||
* IO peripheral.
|
||||
*/
|
||||
unsigned int dedicated_uart_com_port(const void *blob)
|
||||
{
|
||||
int node;
|
||||
|
||||
node = fdtdec_next_compatible(blob, 0,
|
||||
COMPAT_ALTERA_SOCFPGA_PINCTRL_SINGLE);
|
||||
if (node < 0)
|
||||
return 0;
|
||||
|
||||
if (is_peripheral_uart_true(blob, node, "dedicated") >= 0)
|
||||
return SOCFPGA_UART1_ADDRESS;
|
||||
/* Add device descriptor to FPGA device table */
|
||||
socfpga_fpga_add();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function looking the 1st encounter UART shared IO peripheral, and then
|
||||
* return based address of the 1st encounter UART shared IO peripheral.
|
||||
*/
|
||||
unsigned int shared_uart_com_port(const void *blob)
|
||||
{
|
||||
int node, ret;
|
||||
|
||||
node = fdtdec_next_compatible(blob, 0,
|
||||
COMPAT_ALTERA_SOCFPGA_PINCTRL_SINGLE);
|
||||
if (node < 0)
|
||||
return 0;
|
||||
|
||||
ret = is_peripheral_uart_true(blob, node, "shared");
|
||||
|
||||
if (ret == PINMUX_UART0_TX_SHARED_IO_OFFSET_Q1_3 ||
|
||||
ret == PINMUX_UART0_TX_SHARED_IO_OFFSET_Q2_11 ||
|
||||
ret == PINMUX_UART0_TX_SHARED_IO_OFFSET_Q3_3)
|
||||
return SOCFPGA_UART0_ADDRESS;
|
||||
else if (ret == PINMUX_UART1_TX_SHARED_IO_OFFSET_Q1_7 ||
|
||||
ret == PINMUX_UART1_TX_SHARED_IO_OFFSET_Q3_7 ||
|
||||
ret == PINMUX_UART1_TX_SHARED_IO_OFFSET_Q4_3)
|
||||
return SOCFPGA_UART1_ADDRESS;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function looking the 1st encounter UART peripheral, and then return
|
||||
* base address of the 1st encounter UART peripheral.
|
||||
*/
|
||||
unsigned int uart_com_port(const void *blob)
|
||||
{
|
||||
unsigned int ret;
|
||||
|
||||
ret = dedicated_uart_com_port(blob);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return shared_uart_com_port(blob);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print CPU information
|
||||
*/
|
||||
@@ -270,13 +94,6 @@ int print_cpuinfo(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_MISC_INIT
|
||||
int arch_misc_init(void)
|
||||
{
|
||||
return socfpga_eth_reset();
|
||||
}
|
||||
#endif
|
||||
|
||||
void do_bridge_reset(int enable)
|
||||
{
|
||||
if (enable)
|
||||
|
||||
@@ -175,6 +175,22 @@ static void socfpga_nic301_slave_ns(void)
|
||||
writel(0x1, &nic301_regs->sdrdata);
|
||||
}
|
||||
|
||||
void socfpga_sdram_remap_zero(void)
|
||||
{
|
||||
socfpga_nic301_slave_ns();
|
||||
|
||||
/*
|
||||
* Private components security:
|
||||
* U-Boot : configure private timer, global timer and cpu component
|
||||
* access as non secure for kernel stage (as required by Linux)
|
||||
*/
|
||||
setbits_le32(&scu_regs->sacr, 0xfff);
|
||||
|
||||
/* Configure the L2 controller to make SDRAM start at 0 */
|
||||
writel(0x1, &nic301_regs->remap); /* remap.mpuzero */
|
||||
writel(0x1, &pl310->pl310_addr_filter_start);
|
||||
}
|
||||
|
||||
static u32 iswgrp_handoff[8];
|
||||
|
||||
int arch_early_init_r(void)
|
||||
@@ -195,18 +211,7 @@ int arch_early_init_r(void)
|
||||
|
||||
socfpga_bridges_reset(1);
|
||||
|
||||
socfpga_nic301_slave_ns();
|
||||
|
||||
/*
|
||||
* Private components security:
|
||||
* U-Boot : configure private timer, global timer and cpu component
|
||||
* access as non secure for kernel stage (as required by Linux)
|
||||
*/
|
||||
setbits_le32(&scu_regs->sacr, 0xfff);
|
||||
|
||||
/* Configure the L2 controller to make SDRAM start at 0 */
|
||||
writel(0x1, &nic301_regs->remap); /* remap.mpuzero */
|
||||
writel(0x1, &pl310->pl310_addr_filter_start);
|
||||
socfpga_sdram_remap_zero();
|
||||
|
||||
/* Add device descriptor to FPGA device table */
|
||||
socfpga_fpga_add();
|
||||
|
||||
@@ -20,71 +20,6 @@ static const struct socfpga_reset_manager *reset_manager_base =
|
||||
static const struct socfpga_system_manager *sysmgr_regs =
|
||||
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
|
||||
|
||||
#define ECC_MASK (ALT_RSTMGR_PER0MODRST_EMACECC0_SET_MSK | \
|
||||
ALT_RSTMGR_PER0MODRST_EMACECC1_SET_MSK | \
|
||||
ALT_RSTMGR_PER0MODRST_EMACECC2_SET_MSK | \
|
||||
ALT_RSTMGR_PER0MODRST_NANDECC_SET_MSK | \
|
||||
ALT_RSTMGR_PER0MODRST_QSPIECC_SET_MSK | \
|
||||
ALT_RSTMGR_PER0MODRST_SDMMCECC_SET_MSK)
|
||||
|
||||
void socfpga_reset_uart(int assert)
|
||||
{
|
||||
unsigned int com_port;
|
||||
|
||||
com_port = uart_com_port(gd->fdt_blob);
|
||||
|
||||
if (com_port == SOCFPGA_UART1_ADDRESS)
|
||||
socfpga_per_reset(SOCFPGA_RESET(UART1), assert);
|
||||
else if (com_port == SOCFPGA_UART0_ADDRESS)
|
||||
socfpga_per_reset(SOCFPGA_RESET(UART0), assert);
|
||||
}
|
||||
|
||||
static const u32 per0fpgamasks[] = {
|
||||
ALT_RSTMGR_PER0MODRST_EMACECC0_SET_MSK |
|
||||
ALT_RSTMGR_PER0MODRST_EMAC0_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_EMACECC1_SET_MSK |
|
||||
ALT_RSTMGR_PER0MODRST_EMAC1_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_EMACECC2_SET_MSK |
|
||||
ALT_RSTMGR_PER0MODRST_EMAC2_SET_MSK,
|
||||
0, /* i2c0 per1mod */
|
||||
0, /* i2c1 per1mod */
|
||||
0, /* i2c0_emac */
|
||||
0, /* i2c1_emac */
|
||||
0, /* i2c2_emac */
|
||||
ALT_RSTMGR_PER0MODRST_NANDECC_SET_MSK |
|
||||
ALT_RSTMGR_PER0MODRST_NAND_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_QSPIECC_SET_MSK |
|
||||
ALT_RSTMGR_PER0MODRST_QSPI_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_SDMMCECC_SET_MSK |
|
||||
ALT_RSTMGR_PER0MODRST_SDMMC_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_SPIM0_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_SPIM1_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_SPIS0_SET_MSK,
|
||||
ALT_RSTMGR_PER0MODRST_SPIS1_SET_MSK,
|
||||
0, /* uart0 per1mod */
|
||||
0, /* uart1 per1mod */
|
||||
};
|
||||
|
||||
static const u32 per1fpgamasks[] = {
|
||||
0, /* emac0 per0mod */
|
||||
0, /* emac1 per0mod */
|
||||
0, /* emac2 per0mod */
|
||||
ALT_RSTMGR_PER1MODRST_I2C0_SET_MSK,
|
||||
ALT_RSTMGR_PER1MODRST_I2C1_SET_MSK,
|
||||
ALT_RSTMGR_PER1MODRST_I2C2_SET_MSK, /* i2c0_emac */
|
||||
ALT_RSTMGR_PER1MODRST_I2C3_SET_MSK, /* i2c1_emac */
|
||||
ALT_RSTMGR_PER1MODRST_I2C4_SET_MSK, /* i2c2_emac */
|
||||
0, /* nand per0mod */
|
||||
0, /* qspi per0mod */
|
||||
0, /* sdmmc per0mod */
|
||||
0, /* spim0 per0mod */
|
||||
0, /* spim1 per0mod */
|
||||
0, /* spis0 per0mod */
|
||||
0, /* spis1 per0mod */
|
||||
ALT_RSTMGR_PER1MODRST_UART0_SET_MSK,
|
||||
ALT_RSTMGR_PER1MODRST_UART1_SET_MSK,
|
||||
};
|
||||
|
||||
struct bridge_cfg {
|
||||
int compat_id;
|
||||
u32 mask_noc;
|
||||
@@ -139,56 +74,6 @@ void socfpga_reset_deassert_noc_ddr_scheduler(void)
|
||||
ALT_RSTMGR_BRGMODRST_DDRSCH_SET_MSK);
|
||||
}
|
||||
|
||||
/* Check whether Watchdog in reset state? */
|
||||
int socfpga_is_wdt_in_reset(void)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = readl(&reset_manager_base->per1modrst);
|
||||
val &= ALT_RSTMGR_PER1MODRST_WD0_SET_MSK;
|
||||
|
||||
/* return 0x1 if watchdog in reset */
|
||||
return val;
|
||||
}
|
||||
|
||||
/* emacbase: base address of emac to enable/disable reset
|
||||
* state: 0 - disable reset, !0 - enable reset
|
||||
*/
|
||||
void socfpga_emac_manage_reset(ulong emacbase, u32 state)
|
||||
{
|
||||
ulong eccmask;
|
||||
ulong emacmask;
|
||||
|
||||
switch (emacbase) {
|
||||
case SOCFPGA_EMAC0_ADDRESS:
|
||||
eccmask = ALT_RSTMGR_PER0MODRST_EMACECC0_SET_MSK;
|
||||
emacmask = ALT_RSTMGR_PER0MODRST_EMAC0_SET_MSK;
|
||||
break;
|
||||
case SOCFPGA_EMAC1_ADDRESS:
|
||||
eccmask = ALT_RSTMGR_PER0MODRST_EMACECC1_SET_MSK;
|
||||
emacmask = ALT_RSTMGR_PER0MODRST_EMAC1_SET_MSK;
|
||||
break;
|
||||
case SOCFPGA_EMAC2_ADDRESS:
|
||||
eccmask = ALT_RSTMGR_PER0MODRST_EMACECC2_SET_MSK;
|
||||
emacmask = ALT_RSTMGR_PER0MODRST_EMAC2_SET_MSK;
|
||||
break;
|
||||
default:
|
||||
pr_err("emac base address unexpected! %lx", emacbase);
|
||||
hang();
|
||||
break;
|
||||
}
|
||||
|
||||
if (state) {
|
||||
/* Enable ECC OCP first */
|
||||
setbits_le32(&reset_manager_base->per0modrst, eccmask);
|
||||
setbits_le32(&reset_manager_base->per0modrst, emacmask);
|
||||
} else {
|
||||
/* Disable ECC OCP first */
|
||||
clrbits_le32(&reset_manager_base->per0modrst, emacmask);
|
||||
clrbits_le32(&reset_manager_base->per0modrst, eccmask);
|
||||
}
|
||||
}
|
||||
|
||||
static int get_bridge_init_val(const void *blob, int compat_id)
|
||||
{
|
||||
int node;
|
||||
@@ -225,26 +110,6 @@ int socfpga_reset_deassert_bridges_handoff(void)
|
||||
false, 1000, false);
|
||||
}
|
||||
|
||||
void socfpga_reset_assert_fpga_connected_peripherals(void)
|
||||
{
|
||||
u32 mask0 = 0;
|
||||
u32 mask1 = 0;
|
||||
u32 fpga_pinux_addr = SOCFPGA_PINMUX_FPGA_INTERFACE_ADDRESS;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(per1fpgamasks); i++) {
|
||||
if (readl(fpga_pinux_addr)) {
|
||||
mask0 |= per0fpgamasks[i];
|
||||
mask1 |= per1fpgamasks[i];
|
||||
}
|
||||
fpga_pinux_addr += sizeof(u32);
|
||||
}
|
||||
|
||||
setbits_le32(&reset_manager_base->per0modrst, mask0 & ECC_MASK);
|
||||
setbits_le32(&reset_manager_base->per1modrst, mask1);
|
||||
setbits_le32(&reset_manager_base->per0modrst, mask0);
|
||||
}
|
||||
|
||||
/* Release L4 OSC1 Watchdog Timer 0 from reset through reset manager */
|
||||
void socfpga_reset_deassert_osc1wd0(void)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <asm/arch/scan_manager.h>
|
||||
#include <asm/arch/sdram.h>
|
||||
#include <asm/arch/scu.h>
|
||||
#include <asm/arch/misc.h>
|
||||
#include <asm/arch/nic301.h>
|
||||
#include <asm/sections.h>
|
||||
#include <fdtdec.h>
|
||||
@@ -67,31 +68,26 @@ u32 spl_boot_mode(const u32 boot_device)
|
||||
|
||||
void spl_board_init(void)
|
||||
{
|
||||
/* configuring the clock based on handoff */
|
||||
cm_basic_init(gd->fdt_blob);
|
||||
WATCHDOG_RESET();
|
||||
|
||||
config_dedicated_pins(gd->fdt_blob);
|
||||
WATCHDOG_RESET();
|
||||
|
||||
/* Release UART from reset */
|
||||
socfpga_reset_uart(0);
|
||||
|
||||
/* enable console uart printing */
|
||||
preloader_console_init();
|
||||
WATCHDOG_RESET();
|
||||
|
||||
arch_early_init_r();
|
||||
}
|
||||
|
||||
void board_init_f(ulong dummy)
|
||||
{
|
||||
/*
|
||||
* Configure Clock Manager to use intosc clock instead external osc to
|
||||
* ensure success watchdog operation. We do it as early as possible.
|
||||
*/
|
||||
cm_use_intosc();
|
||||
socfpga_init_security_policies();
|
||||
socfpga_sdram_remap_zero();
|
||||
|
||||
/* Assert reset to all except L4WD0 and L4TIMER0 */
|
||||
socfpga_per_reset_all();
|
||||
socfpga_watchdog_disable();
|
||||
|
||||
arch_early_init_r();
|
||||
spl_early_init();
|
||||
|
||||
/* Configure the clock based on handoff */
|
||||
cm_basic_init(gd->fdt_blob);
|
||||
|
||||
#ifdef CONFIG_HW_WATCHDOG
|
||||
/* release osc1 watchdog timer 0 from reset */
|
||||
@@ -101,4 +97,7 @@ void board_init_f(ulong dummy)
|
||||
hw_watchdog_init();
|
||||
WATCHDOG_RESET();
|
||||
#endif /* CONFIG_HW_WATCHDOG */
|
||||
|
||||
config_dedicated_pins(gd->fdt_blob);
|
||||
WATCHDOG_RESET();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/pl310.h>
|
||||
#include <asm/u-boot.h>
|
||||
#include <asm/utils.h>
|
||||
#include <image.h>
|
||||
@@ -17,20 +16,13 @@
|
||||
#include <asm/arch/misc.h>
|
||||
#include <asm/arch/scan_manager.h>
|
||||
#include <asm/arch/sdram.h>
|
||||
#include <asm/arch/scu.h>
|
||||
#include <asm/arch/nic301.h>
|
||||
#include <asm/sections.h>
|
||||
#include <debug_uart.h>
|
||||
#include <fdtdec.h>
|
||||
#include <watchdog.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static struct pl310_regs *const pl310 =
|
||||
(struct pl310_regs *)CONFIG_SYS_PL310_BASE;
|
||||
static struct scu_registers *scu_regs =
|
||||
(struct scu_registers *)SOCFPGA_MPUSCU_ADDRESS;
|
||||
static struct nic301_registers *nic301_regs =
|
||||
(struct nic301_registers *)SOCFPGA_L3REGS_ADDRESS;
|
||||
static const struct socfpga_system_manager *sysmgr_regs =
|
||||
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
|
||||
|
||||
@@ -71,21 +63,12 @@ u32 spl_boot_mode(const u32 boot_device)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void socfpga_nic301_slave_ns(void)
|
||||
{
|
||||
writel(0x1, &nic301_regs->lwhps2fpgaregs);
|
||||
writel(0x1, &nic301_regs->hps2fpgaregs);
|
||||
writel(0x1, &nic301_regs->acp);
|
||||
writel(0x1, &nic301_regs->rom);
|
||||
writel(0x1, &nic301_regs->ocram);
|
||||
writel(0x1, &nic301_regs->sdrdata);
|
||||
}
|
||||
|
||||
void board_init_f(ulong dummy)
|
||||
{
|
||||
const struct cm_config *cm_default_cfg = cm_get_default_config();
|
||||
unsigned long sdram_size;
|
||||
unsigned long reg;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* First C code to run. Clear fake OCRAM ECC first as SBE
|
||||
@@ -101,14 +84,7 @@ void board_init_f(ulong dummy)
|
||||
|
||||
memset(__bss_start, 0, __bss_end - __bss_start);
|
||||
|
||||
socfpga_nic301_slave_ns();
|
||||
|
||||
/* Configure ARM MPU SNSAC register. */
|
||||
setbits_le32(&scu_regs->sacr, 0xfff);
|
||||
|
||||
/* Remap SDRAM to 0x0 */
|
||||
writel(0x1, &nic301_regs->remap); /* remap.mpuzero */
|
||||
writel(0x1, &pl310->pl310_addr_filter_start);
|
||||
socfpga_sdram_remap_zero();
|
||||
|
||||
debug("Freezing all I/O banks\n");
|
||||
/* freeze all IO banks */
|
||||
@@ -152,6 +128,17 @@ void board_init_f(ulong dummy)
|
||||
/* unfreeze / thaw all IO banks */
|
||||
sys_mgr_frzctrl_thaw_req();
|
||||
|
||||
#ifdef CONFIG_DEBUG_UART
|
||||
socfpga_per_reset(SOCFPGA_RESET(UART0), 0);
|
||||
debug_uart_init();
|
||||
#endif
|
||||
|
||||
ret = spl_early_init();
|
||||
if (ret) {
|
||||
debug("spl_early_init() failed: %d\n", ret);
|
||||
hang();
|
||||
}
|
||||
|
||||
/* enable console uart printing */
|
||||
preloader_console_init();
|
||||
|
||||
@@ -177,7 +164,4 @@ void board_init_f(ulong dummy)
|
||||
}
|
||||
|
||||
socfpga_bridges_reset(1);
|
||||
|
||||
/* Configure simple malloc base pointer into RAM. */
|
||||
gd->malloc_base = CONFIG_SYS_TEXT_BASE + (1024 * 1024);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void board_init_f(ulong dummy)
|
||||
socfpga_per_reset(SOCFPGA_RESET(OSC1TIMER0), 0);
|
||||
timer_init();
|
||||
|
||||
populate_sysmgr_pinmux();
|
||||
sysmgr_pinmux_init();
|
||||
|
||||
/* configuring the HPS clocks */
|
||||
cm_basic_init(cm_default_cfg);
|
||||
|
||||
@@ -417,7 +417,6 @@ config DRAM_ZQ
|
||||
|
||||
config DRAM_ODT_EN
|
||||
bool "sunxi dram odt enable"
|
||||
default n if !MACH_SUN8I_A23
|
||||
default y if MACH_SUN8I_A23
|
||||
default y if MACH_SUN8I_R40
|
||||
default y if MACH_SUN50I
|
||||
|
||||
@@ -155,8 +155,13 @@ static void init_pmc_scratch(void)
|
||||
int i;
|
||||
|
||||
/* SCRATCH0 is initialized by the boot ROM and shouldn't be cleared */
|
||||
for (i = 0; i < 23; i++)
|
||||
writel(0, &pmc->pmc_scratch1+i);
|
||||
#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
|
||||
if (!tegra_cpu_is_non_secure())
|
||||
#endif
|
||||
{
|
||||
for (i = 0; i < 23; i++)
|
||||
writel(0, &pmc->pmc_scratch1 + i);
|
||||
}
|
||||
|
||||
/* ODMDATA is for kernel use to determine RAM size, LP config, etc. */
|
||||
odmdata = get_odmdata();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/tegra.h>
|
||||
#include <asm/arch/mc.h>
|
||||
#include <asm/arch-tegra/ap.h>
|
||||
|
||||
#include <fdt_support.h>
|
||||
|
||||
@@ -18,12 +19,17 @@ void tegra_gpu_config(void)
|
||||
{
|
||||
struct mc_ctlr *mc = (struct mc_ctlr *)NV_PA_MC_BASE;
|
||||
|
||||
/* Turn VPR off */
|
||||
writel(0, &mc->mc_video_protect_size_mb);
|
||||
writel(TEGRA_MC_VIDEO_PROTECT_REG_WRITE_ACCESS_DISABLED,
|
||||
&mc->mc_video_protect_reg_ctrl);
|
||||
/* read back to ensure the write went through */
|
||||
readl(&mc->mc_video_protect_reg_ctrl);
|
||||
#if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE)
|
||||
if (!tegra_cpu_is_non_secure())
|
||||
#endif
|
||||
{
|
||||
/* Turn VPR off */
|
||||
writel(0, &mc->mc_video_protect_size_mb);
|
||||
writel(TEGRA_MC_VIDEO_PROTECT_REG_WRITE_ACCESS_DISABLED,
|
||||
&mc->mc_video_protect_reg_ctrl);
|
||||
/* read back to ensure the write went through */
|
||||
readl(&mc->mc_video_protect_reg_ctrl);
|
||||
}
|
||||
|
||||
debug("configured VPR\n");
|
||||
|
||||
|
||||
@@ -10,6 +10,4 @@
|
||||
#define CONFIG_NEEDS_MANUAL_RELOC
|
||||
#endif
|
||||
|
||||
#define CONFIG_NR_DRAM_BANKS 1
|
||||
|
||||
#endif
|
||||
|
||||
@@ -82,7 +82,7 @@ SECTIONS
|
||||
|
||||
.bss : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
. = ALIGN(4);
|
||||
__bss_end = .;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,6 @@ PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM
|
||||
PLATFORM_LIBS += -lrt
|
||||
|
||||
LDFLAGS_FINAL += --gc-sections
|
||||
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
|
||||
|
||||
# Define this to avoid linking with SDL, which requires SDL libraries
|
||||
# This can solve 'sdl-config: Command not found' errors
|
||||
ifneq ($(NO_SDL),)
|
||||
|
||||
@@ -17,16 +17,13 @@ SECTIONS
|
||||
_u_boot_sandbox_getopt : { *(.u_boot_sandbox_getopt) }
|
||||
__u_boot_sandbox_option_end = .;
|
||||
|
||||
__bss_start = .;
|
||||
|
||||
.__efi_runtime_start : {
|
||||
.__efi_runtime_start : {
|
||||
*(.__efi_runtime_start)
|
||||
}
|
||||
|
||||
.efi_runtime : {
|
||||
*(.text.efi_runtime*)
|
||||
*(.rodata.efi_runtime*)
|
||||
*(.data.efi_runtime*)
|
||||
*(efi_runtime_text)
|
||||
*(efi_runtime_data)
|
||||
}
|
||||
|
||||
.__efi_runtime_stop : {
|
||||
@@ -39,8 +36,8 @@ SECTIONS
|
||||
}
|
||||
|
||||
.efi_runtime_rel : {
|
||||
*(.rel*.efi_runtime)
|
||||
*(.rel*.efi_runtime.*)
|
||||
*(.relefi_runtime_text)
|
||||
*(.relefi_runtime_data)
|
||||
}
|
||||
|
||||
.efi_runtime_rel_stop :
|
||||
@@ -48,6 +45,7 @@ SECTIONS
|
||||
*(.__efi_runtime_rel_stop)
|
||||
}
|
||||
|
||||
__bss_start = .;
|
||||
}
|
||||
|
||||
INSERT BEFORE .data;
|
||||
|
||||
@@ -61,6 +61,17 @@
|
||||
reg = <2 1>;
|
||||
};
|
||||
|
||||
bind-test {
|
||||
bind-test-child1 {
|
||||
compatible = "sandbox,phy";
|
||||
#phy-cells = <1>;
|
||||
};
|
||||
|
||||
bind-test-child2 {
|
||||
compatible = "simple-bus";
|
||||
};
|
||||
};
|
||||
|
||||
b-test {
|
||||
reg = <3 1>;
|
||||
compatible = "denx,u-boot-fdt-test";
|
||||
|
||||
@@ -23,13 +23,11 @@ endif
|
||||
|
||||
ifeq ($(IS_32BIT),y)
|
||||
PLATFORM_CPPFLAGS += -march=i386 -m32
|
||||
# TODO: These break on x86_64; need to debug further
|
||||
PLATFORM_RELFLAGS += -fdata-sections
|
||||
else
|
||||
PLATFORM_CPPFLAGS += $(if $(CONFIG_SPL_BUILD),,-fpic) -fno-common -m64
|
||||
endif
|
||||
|
||||
PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
|
||||
PLATFORM_RELFLAGS += -fdata-sections -ffunction-sections -fvisibility=hidden
|
||||
|
||||
PLATFORM_LDFLAGS += -Bsymbolic -Bsymbolic-functions
|
||||
PLATFORM_LDFLAGS += -m $(if $(IS_32BIT),elf_i386,elf_x86_64)
|
||||
|
||||
@@ -3,26 +3,26 @@ if TARGET_COREBOOT
|
||||
config SYS_COREBOOT
|
||||
bool
|
||||
default y
|
||||
imply SYS_NS16550
|
||||
imply SCSI
|
||||
imply SCSI_AHCI
|
||||
imply AHCI_PCI
|
||||
imply E1000
|
||||
imply ICH_SPI
|
||||
imply MMC
|
||||
imply MMC_PCI
|
||||
imply MMC_SDHCI
|
||||
imply MMC_SDHCI_SDMA
|
||||
imply SCSI
|
||||
imply SCSI_AHCI
|
||||
imply SPI_FLASH
|
||||
imply SYS_NS16550
|
||||
imply USB
|
||||
imply USB_EHCI_HCD
|
||||
imply USB_XHCI_HCD
|
||||
imply USB_STORAGE
|
||||
imply USB_KEYBOARD
|
||||
imply VIDEO_COREBOOT
|
||||
imply E1000
|
||||
imply ETH_DESIGNWARE
|
||||
imply PCH_GBE
|
||||
imply RTL8169
|
||||
imply CMD_CBFS
|
||||
imply FS_CBFS
|
||||
|
||||
config CBMEM_CONSOLE
|
||||
bool
|
||||
default y
|
||||
imply CBMEM_CONSOLE
|
||||
|
||||
endif
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <fdtdec.h>
|
||||
#include <usb.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/msr.h>
|
||||
#include <asm/mtrr.h>
|
||||
@@ -75,12 +76,10 @@ int last_stage_init(void)
|
||||
if (gd->flags & GD_FLG_COLD_BOOT)
|
||||
timestamp_add_to_bootstage();
|
||||
|
||||
/* start usb so that usb keyboard can be used as input device */
|
||||
usb_init();
|
||||
|
||||
board_final_cleanup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int misc_init_r(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include <efi.h>
|
||||
#include <errno.h>
|
||||
#include <usb.h>
|
||||
#include <asm/bootparam.h>
|
||||
#include <asm/e820.h>
|
||||
#include <asm/post.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
@@ -168,3 +170,120 @@ int last_stage_init(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int install_e820_map(unsigned int max_entries,
|
||||
struct e820_entry *entries)
|
||||
{
|
||||
struct efi_mem_desc *desc, *end;
|
||||
struct efi_entry_memmap *map;
|
||||
int size, ret;
|
||||
efi_physical_addr_t last_end_addr = 0;
|
||||
struct e820_entry *last_entry = NULL;
|
||||
__u32 e820_type;
|
||||
unsigned int num_entries = 0;
|
||||
|
||||
ret = efi_info_get(EFIET_MEMORY_MAP, (void **)&map, &size);
|
||||
if (ret) {
|
||||
printf("Cannot find EFI memory map tables, ret=%d\n", ret);
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
end = (struct efi_mem_desc *)((ulong)map + size);
|
||||
for (desc = map->desc; desc < end;
|
||||
desc = efi_get_next_mem_desc(map, desc)) {
|
||||
if (desc->num_pages == 0)
|
||||
continue;
|
||||
|
||||
switch (desc->type) {
|
||||
case EFI_LOADER_CODE:
|
||||
case EFI_LOADER_DATA:
|
||||
case EFI_BOOT_SERVICES_CODE:
|
||||
case EFI_BOOT_SERVICES_DATA:
|
||||
case EFI_CONVENTIONAL_MEMORY:
|
||||
e820_type = E820_RAM;
|
||||
break;
|
||||
|
||||
case EFI_RESERVED_MEMORY_TYPE:
|
||||
case EFI_RUNTIME_SERVICES_CODE:
|
||||
case EFI_RUNTIME_SERVICES_DATA:
|
||||
case EFI_MMAP_IO:
|
||||
case EFI_MMAP_IO_PORT:
|
||||
case EFI_PAL_CODE:
|
||||
e820_type = E820_RESERVED;
|
||||
break;
|
||||
|
||||
case EFI_ACPI_RECLAIM_MEMORY:
|
||||
e820_type = E820_ACPI;
|
||||
break;
|
||||
|
||||
case EFI_ACPI_MEMORY_NVS:
|
||||
e820_type = E820_NVS;
|
||||
break;
|
||||
|
||||
case EFI_UNUSABLE_MEMORY:
|
||||
e820_type = E820_UNUSABLE;
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Invalid EFI memory descriptor type (0x%x)!\n",
|
||||
desc->type);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (last_entry != NULL && last_entry->type == e820_type &&
|
||||
desc->physical_start == last_end_addr) {
|
||||
last_entry->size += (desc->num_pages << EFI_PAGE_SHIFT);
|
||||
last_end_addr += (desc->num_pages << EFI_PAGE_SHIFT);
|
||||
} else {
|
||||
if (num_entries >= E820MAX)
|
||||
break;
|
||||
|
||||
entries[num_entries].addr = desc->physical_start;
|
||||
entries[num_entries].size = desc->num_pages;
|
||||
entries[num_entries].size <<= EFI_PAGE_SHIFT;
|
||||
entries[num_entries].type = e820_type;
|
||||
last_entry = &entries[num_entries];
|
||||
last_end_addr = last_entry->addr + last_entry->size;
|
||||
num_entries++;
|
||||
}
|
||||
}
|
||||
|
||||
return num_entries;
|
||||
}
|
||||
|
||||
void setup_efi_info(struct efi_info *efi_info)
|
||||
{
|
||||
struct efi_entry_systable *table;
|
||||
struct efi_entry_memmap *map;
|
||||
char *signature;
|
||||
int size, ret;
|
||||
|
||||
memset(efi_info, 0, sizeof(struct efi_info));
|
||||
|
||||
ret = efi_info_get(EFIET_SYS_TABLE, (void **)&table, &size);
|
||||
if (ret) {
|
||||
printf("Cannot find EFI system table, ret=%d\n", ret);
|
||||
return;
|
||||
}
|
||||
efi_info->efi_systab = (u32)(table->sys_table);
|
||||
|
||||
ret = efi_info_get(EFIET_MEMORY_MAP, (void **)&map, &size);
|
||||
if (ret) {
|
||||
printf("Cannot find EFI memory map tables, ret=%d\n", ret);
|
||||
return;
|
||||
}
|
||||
efi_info->efi_memdesc_size = map->desc_size;
|
||||
efi_info->efi_memdesc_version = map->version;
|
||||
efi_info->efi_memmap = (u32)(map->desc);
|
||||
efi_info->efi_memmap_size = size - sizeof(struct efi_entry_memmap);
|
||||
|
||||
#ifdef CONFIG_EFI_STUB_64BIT
|
||||
efi_info->efi_systab_hi = table->sys_table >> 32;
|
||||
efi_info->efi_memmap_hi = (u64)(u32)(map->desc) >> 32;
|
||||
signature = EFI64_LOADER_SIGNATURE;
|
||||
#else
|
||||
signature = EFI32_LOADER_SIGNATURE;
|
||||
#endif
|
||||
memcpy(&efi_info->efi_loader_signature, signature, 4);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ SECTIONS
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COM*)
|
||||
. = ALIGN(4);
|
||||
__bss_end = .;
|
||||
|
||||
@@ -94,7 +94,7 @@ SECTIONS
|
||||
|
||||
.bss __rel_dyn_start (OVERLAY) : {
|
||||
__bss_start = .;
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COM*)
|
||||
. = ALIGN(4);
|
||||
__bss_end = .;
|
||||
|
||||
@@ -6,6 +6,7 @@ dtb-y += bayleybay.dtb \
|
||||
chromebox_panther.dtb \
|
||||
chromebook_samus.dtb \
|
||||
conga-qeval20-qa3-e3845.dtb \
|
||||
coreboot.dtb \
|
||||
cougarcanyon2.dtb \
|
||||
crownbay.dtb \
|
||||
dfi-bt700-q7x-151.dtb \
|
||||
@@ -17,7 +18,6 @@ dtb-y += bayleybay.dtb \
|
||||
qemu-x86_i440fx.dtb \
|
||||
qemu-x86_q35.dtb \
|
||||
theadorable-x86-dfi-bt700.dtb \
|
||||
broadwell_som-6896.dtb \
|
||||
baytrail_som-db5800-som-6867.dtb
|
||||
|
||||
targets += $(dtb-y)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
/include/ "reset.dtsi"
|
||||
/include/ "rtc.dtsi"
|
||||
/include/ "tsc_timer.dtsi"
|
||||
/include/ "coreboot_fb.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Intel Bayley Bay";
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "skeleton.dtsi"
|
||||
/include/ "serial.dtsi"
|
||||
/include/ "reset.dtsi"
|
||||
/include/ "rtc.dtsi"
|
||||
/include/ "tsc_timer.dtsi"
|
||||
/include/ "coreboot_fb.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Advantech SOM-6896";
|
||||
compatible = "advantech,som-6896", "intel,broadwell";
|
||||
|
||||
aliases {
|
||||
spi0 = &spi;
|
||||
};
|
||||
|
||||
config {
|
||||
silent_console = <0>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "/serial";
|
||||
};
|
||||
|
||||
pci {
|
||||
compatible = "pci-x86";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
u-boot,dm-pre-reloc;
|
||||
ranges = <0x02000000 0x0 0xe0000000 0xe0000000 0 0x10000000
|
||||
0x42000000 0x0 0xd0000000 0xd0000000 0 0x10000000
|
||||
0x01000000 0x0 0x2000 0x2000 0 0xe000>;
|
||||
|
||||
pch@1f,0 {
|
||||
reg = <0x0000f800 0 0 0 0>;
|
||||
compatible = "intel,pch9";
|
||||
|
||||
spi: spi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "intel,ich9-spi";
|
||||
spi-flash@0 {
|
||||
reg = <0>;
|
||||
compatible = "winbond,w25q128", "spi-flash";
|
||||
memory-map = <0xff000000 0x01000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
@@ -8,7 +8,6 @@
|
||||
/include/ "reset.dtsi"
|
||||
/include/ "rtc.dtsi"
|
||||
/include/ "tsc_timer.dtsi"
|
||||
/include/ "coreboot_fb.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Google Link";
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
/include/ "reset.dtsi"
|
||||
/include/ "rtc.dtsi"
|
||||
/include/ "tsc_timer.dtsi"
|
||||
/include/ "coreboot_fb.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Google Samus";
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
/include/ "reset.dtsi"
|
||||
/include/ "rtc.dtsi"
|
||||
/include/ "tsc_timer.dtsi"
|
||||
/include/ "coreboot_fb.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Google Panther";
|
||||
|
||||
45
arch/x86/dts/coreboot.dts
Normal file
45
arch/x86/dts/coreboot.dts
Normal file
@@ -0,0 +1,45 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
|
||||
*
|
||||
* Generic coreboot payload device tree for x86 targets
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/include/ "skeleton.dtsi"
|
||||
/include/ "serial.dtsi"
|
||||
/include/ "keyboard.dtsi"
|
||||
/include/ "reset.dtsi"
|
||||
/include/ "rtc.dtsi"
|
||||
/include/ "tsc_timer.dtsi"
|
||||
|
||||
/ {
|
||||
model = "coreboot x86 payload";
|
||||
compatible = "coreboot,x86-payload";
|
||||
|
||||
aliases {
|
||||
serial0 = &serial;
|
||||
};
|
||||
|
||||
config {
|
||||
silent_console = <0>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "/serial";
|
||||
};
|
||||
|
||||
tsc-timer {
|
||||
clock-frequency = <1000000000>;
|
||||
};
|
||||
|
||||
pci {
|
||||
compatible = "pci-x86";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
coreboot-fb {
|
||||
compatible = "coreboot-fb";
|
||||
};
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
/ {
|
||||
coreboot-fb {
|
||||
compatible = "coreboot-fb";
|
||||
};
|
||||
};
|
||||
@@ -30,6 +30,10 @@
|
||||
stdout-path = "/serial";
|
||||
};
|
||||
|
||||
tsc-timer {
|
||||
clock-frequency = <1000000000>;
|
||||
};
|
||||
|
||||
pci {
|
||||
compatible = "pci-x86";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
/include/ "reset.dtsi"
|
||||
/include/ "rtc.dtsi"
|
||||
/include/ "tsc_timer.dtsi"
|
||||
/include/ "coreboot_fb.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Intel Minnowboard Max";
|
||||
|
||||
@@ -69,7 +69,6 @@ struct setup_header {
|
||||
__u64 pref_address;
|
||||
__u32 init_size;
|
||||
__u32 handover_offset;
|
||||
__u64 acpi_rsdp_addr;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct sys_desc_table {
|
||||
|
||||
@@ -35,5 +35,6 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size,
|
||||
int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
|
||||
unsigned long initrd_addr, unsigned long initrd_size);
|
||||
void setup_video(struct screen_info *screen_info);
|
||||
void setup_efi_info(struct efi_info *efi_info);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,7 @@ SECTIONS
|
||||
*(.sbss)
|
||||
*(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
|
||||
/* U-Boot lists and device tree */
|
||||
|
||||
@@ -44,7 +44,7 @@ SECTIONS
|
||||
*(.sbss)
|
||||
*(.scommon)
|
||||
*(.dynbss)
|
||||
*(.bss)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
*(.rel.local)
|
||||
|
||||
|
||||
@@ -287,14 +287,13 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
|
||||
hdr->hardware_subarch = X86_SUBARCH_INTEL_MID;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GENERATE_ACPI_TABLE
|
||||
if (bootproto >= 0x020e)
|
||||
hdr->acpi_rsdp_addr = acpi_get_rsdp_addr();
|
||||
#endif
|
||||
|
||||
setup_device_tree(hdr, (const void *)env_get_hex("fdtaddr", 0));
|
||||
setup_video(&setup_base->screen_info);
|
||||
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
setup_efi_info(&setup_base->efi_info);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,26 +13,8 @@
|
||||
#ifndef _XTENSA_U_BOOT_H
|
||||
#define _XTENSA_U_BOOT_H
|
||||
|
||||
#ifdef CONFIG_SYS_GENERIC_BOARD
|
||||
/* Use the generic board which requires a unified bd_info */
|
||||
#include <asm-generic/u-boot.h>
|
||||
#else
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
typedef struct bd_info {
|
||||
int bi_baudrate; /* serial console baudrate */
|
||||
unsigned long bi_ip_addr; /* IP Address */
|
||||
unsigned char bi_enetaddr[6]; /* Ethernet adress */
|
||||
unsigned long bi_boot_params; /* where this board expects params */
|
||||
unsigned long bi_memstart; /* start of DRAM memory VA */
|
||||
unsigned long bi_memsize; /* size of DRAM memory in bytes */
|
||||
unsigned long bi_flashstart; /* start of FLASH memory */
|
||||
unsigned long bi_flashsize; /* size of FLASH memory */
|
||||
unsigned long bi_flashoffset; /* offset to skip UBoot image */
|
||||
} bd_t;
|
||||
#endif /* __ ASSEMBLY__ */
|
||||
|
||||
#endif /* CONFIG_SYS_GENERIC_BOARD */
|
||||
|
||||
/* For image.h:image_check_target_arch() */
|
||||
#define IH_ARCH_DEFAULT IH_ARCH_XTENSA
|
||||
|
||||
@@ -30,12 +30,6 @@ int misc_init_r(void)
|
||||
|
||||
meson_gx_eth_init(PHY_INTERFACE_MODE_RGMII, 0);
|
||||
|
||||
/* Reset PHY on GPIOZ_14 */
|
||||
clrbits_le32(GX_GPIO_EN(3), BIT(14));
|
||||
clrbits_le32(GX_GPIO_OUT(3), BIT(14));
|
||||
mdelay(10);
|
||||
setbits_le32(GX_GPIO_OUT(3), BIT(14));
|
||||
|
||||
if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
|
||||
len = meson_sm_read_efuse(EFUSE_MAC_OFFSET,
|
||||
mac_addr, EFUSE_MAC_SIZE);
|
||||
|
||||
@@ -30,12 +30,6 @@ int misc_init_r(void)
|
||||
|
||||
meson_gx_eth_init(PHY_INTERFACE_MODE_RGMII, 0);
|
||||
|
||||
/* Reset PHY on GPIOZ_14 */
|
||||
clrbits_le32(GX_GPIO_EN(3), BIT(14));
|
||||
clrbits_le32(GX_GPIO_OUT(3), BIT(14));
|
||||
mdelay(10);
|
||||
setbits_le32(GX_GPIO_OUT(3), BIT(14));
|
||||
|
||||
if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
|
||||
len = meson_sm_read_efuse(EFUSE_MAC_OFFSET,
|
||||
mac_addr, EFUSE_MAC_SIZE);
|
||||
|
||||
@@ -74,8 +74,8 @@ static void cm_t3517_musb_init(void)
|
||||
CONF2_REFFREQ_13MHZ | CONF2_SESENDEN |
|
||||
CONF2_VBDTCTEN | CONF2_DATPOL);
|
||||
|
||||
if (musb_register(&cm_t3517_musb_pdata, &cm_t3517_musb_board_data,
|
||||
(void *)AM35XX_IPSS_USBOTGSS_BASE))
|
||||
if (!musb_register(&cm_t3517_musb_pdata, &cm_t3517_musb_board_data,
|
||||
(void *)AM35XX_IPSS_USBOTGSS_BASE))
|
||||
printf("Failed initializing AM35x MUSB!\n");
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -9,35 +9,15 @@ config SYS_VENDOR
|
||||
config SYS_SOC
|
||||
default "coreboot"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "coreboot"
|
||||
|
||||
config SYS_TEXT_BASE
|
||||
default 0x01110000
|
||||
|
||||
config BOARD_SPECIFIC_OPTIONS # dummy
|
||||
def_bool y
|
||||
imply SPI_FLASH_ATMEL
|
||||
imply SPI_FLASH_EON
|
||||
imply SPI_FLASH_GIGADEVICE
|
||||
imply SPI_FLASH_MACRONIX
|
||||
imply SPI_FLASH_SPANSION
|
||||
imply SPI_FLASH_STMICRO
|
||||
imply SPI_FLASH_SST
|
||||
imply SPI_FLASH_WINBOND
|
||||
|
||||
comment "coreboot-specific options"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
string "Board configuration file"
|
||||
default "qemu-x86"
|
||||
help
|
||||
This option selects the board configuration file in include/configs/
|
||||
directory to be used to build U-Boot for coreboot.
|
||||
|
||||
config DEFAULT_DEVICE_TREE
|
||||
string "Board Device Tree Source (dts) file"
|
||||
default "qemu-x86_i440fx"
|
||||
help
|
||||
This option selects the board Device Tree Source (dts) file in
|
||||
arch/x86/dts/ directory to be used to build U-Boot for coreboot.
|
||||
select BOARD_EARLY_INIT_R
|
||||
|
||||
config SYS_CAR_ADDR
|
||||
hex "Board specific Cache-As-RAM (CAR) address"
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
# (C) Copyright 2002
|
||||
# Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
|
||||
|
||||
obj-y += coreboot_start.o
|
||||
obj-y += start.o coreboot.o
|
||||
|
||||
17
board/coreboot/coreboot/coreboot.c
Normal file
17
board/coreboot/coreboot/coreboot.c
Normal file
@@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
int board_early_init_r(void)
|
||||
{
|
||||
/*
|
||||
* Make sure PCI bus is enumerated so that peripherals on the PCI bus
|
||||
* can be discovered by their drivers
|
||||
*/
|
||||
pci_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -112,6 +112,25 @@ uflash writes the AIS image at offset 117. For compatibility with uflash,
|
||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR is set to take into account this
|
||||
offset, and the dd command is adjusted accordingly.
|
||||
|
||||
Flashing the images to NOR
|
||||
==========================
|
||||
NOR Flash is XIP (execute-in-place), so no AIS (or SPL) is needed. The
|
||||
u-boot.bin is directy flashed, but CONFIT_DA850_LOWLEVEL must be set
|
||||
to initialize hardware that's normally done by SPL.
|
||||
|
||||
For this case, CONFIG_SYS_TEXT_BASE=0x60000000 which is the address to
|
||||
which the bootloader jumps when powered on.
|
||||
|
||||
Example:
|
||||
For the da850evm, there is a defconfig setup to use the NOR flash on
|
||||
the UI expander board called da850evm_direct_nor_defconfig.
|
||||
|
||||
Flash to NOR directly using
|
||||
sudo mono ./sfh_OMAP-L138.exe -p /dev/ttyUSB0 -flash_noubl
|
||||
-flashType NOR u-boot.bin
|
||||
|
||||
SW7:5 through SW7:7 should be switched on and all others off.
|
||||
|
||||
Recovery
|
||||
========
|
||||
|
||||
|
||||
@@ -10,11 +10,10 @@ HiKey is the first certified 96Boards Consumer Edition board. The board/SoC has:
|
||||
* 802.11a/b/g/n WiFi, Bluetooth
|
||||
|
||||
The HiKey schematic can be found here: -
|
||||
https://github.com/96boards/documentation/blob/master/hikey/96Boards-Hikey-Rev-A1.pdf
|
||||
https://github.com/96boards/documentation/blob/master/consumer/hikey/hikey620/hardware-docs/HiKey_schematics_LeMaker_version_Rev_A1.pdf
|
||||
|
||||
A SoC datasheet can be found here: -
|
||||
https://github.com/96boards/documentation/blob/master/hikey/
|
||||
Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf
|
||||
The SoC datasheet can be found here: -
|
||||
https://github.com/96boards/documentation/blob/master/consumer/hikey/hikey620/hardware-docs/Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf
|
||||
|
||||
Currently the u-boot port supports: -
|
||||
* USB
|
||||
@@ -32,18 +31,20 @@ First get all the sources
|
||||
|
||||
> mkdir -p ~/hikey/src ~/hikey/bin
|
||||
> cd ~/hikey/src
|
||||
> git clone https://github.com/96boards/edk2.git
|
||||
> git clone https://github.com/96boards/arm-trusted-firmware.git
|
||||
> git clone https://github.com/96boards/l-loader.git
|
||||
> git clone https://github.com/96boards/burn-boot.git
|
||||
> git clone https://github.com/96boards-hikey/edk2 -b testing/hikey960_v2.5
|
||||
> git clone https://github.com/ARM-software/arm-trusted-firmware
|
||||
> git clone https://github.com/96boards-hikey/l-loader -b testing/hikey960_v1.2
|
||||
> git clone https://github.com/96boards-hikey/OpenPlatformPkg -b testing/hikey960_v1.3.4
|
||||
> git clone https://github.com/96boards-hikey/atf-fastboot
|
||||
> wget https://snapshots.linaro.org/96boards/reference-platform/components/uefi-staging/latest/hikey/release/hisi-idt.py
|
||||
|
||||
Get the BL30 mcuimage.bin binary. It is shipped as part of the UEFI source.
|
||||
The latest version can be obtained from the edk2 repo.
|
||||
The latest version can be obtained from the OpenPlatformPkg repo.
|
||||
|
||||
> cp edk2/HisiPkg/HiKeyPkg/NonFree/mcuimage.bin ~/hikey/bin/
|
||||
> cp OpenPlatformPkg/Platforms/Hisilicon/HiKey/Binary/mcuimage.bin ~/hikey/bin/
|
||||
|
||||
Get nvme.img binary (check this link is still the latest)
|
||||
> wget -P ~/hikey/bin https://builds.96boards.org/releases/reference-platform/debian/hikey/16.03/bootloader/nvme.img
|
||||
Get nvme.img binary
|
||||
> wget -P ~/hikey/bin https://snapshots.linaro.org/96boards/reference-platform/components/uefi-staging/latest/hikey/release/nvme.img
|
||||
|
||||
Compile U-Boot
|
||||
==============
|
||||
@@ -58,34 +59,45 @@ Compile ARM Trusted Firmware (ATF)
|
||||
|
||||
> cd ~/hikey/src/arm-trusted-firmware
|
||||
> make CROSS_COMPILE=aarch64-linux-gnu- all fip \
|
||||
BL30=~/hikey/bin/mcuimage.bin \
|
||||
SCP_BL2=~/hikey/bin/mcuimage.bin \
|
||||
BL33=~/hikey/bin/u-boot.bin DEBUG=1 PLAT=hikey
|
||||
|
||||
Copy resulting binaries
|
||||
> cp build/hikey/debug/bl1.bin ~/hikey/bin
|
||||
Copy the resulting FIP binary
|
||||
> cp build/hikey/debug/fip.bin ~/hikey/bin
|
||||
|
||||
Compile ATF Fastboot
|
||||
====================
|
||||
|
||||
> cd ~/hikey/src/atf-fastboot
|
||||
> make CROSS_COMPILE=aarch64-linux-gnu- PLAT=hikey DEBUG=1
|
||||
|
||||
Compile l-loader
|
||||
===============
|
||||
================
|
||||
> cd ~/hikey/src/l-loader
|
||||
> make BL1=~/hikey/bin/bl1.bin all
|
||||
> ln -sf ~/hikey/src/arm-trusted-firmware/build/hikey/debug/bl1.bin
|
||||
> ln -sf ~/hikey/src/arm-trusted-firmware/build/hikey/debug/bl2.bin
|
||||
> ln -sf ~/hikey/src/atf-fastboot/build/hikey/debug/bl1.bin fastboot.bin
|
||||
> make hikey PTABLE_LST=aosp-8g
|
||||
|
||||
Copy the resulting binaries
|
||||
> cp *.img ~/hikey/bin
|
||||
> cp l-loader.bin ~/hikey/bin
|
||||
> cp recovery.bin ~/hikey/bin
|
||||
|
||||
These instructions are adapted from
|
||||
https://github.com/96boards/documentation/wiki/HiKeyUEFI
|
||||
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/plat/hikey.rst
|
||||
|
||||
FLASHING
|
||||
========
|
||||
|
||||
1. Connect the second jumper on J15 BOOT SEL, to go into recovery mode and flash l-loader.bin with
|
||||
the hisi-idt.py utility.
|
||||
the hisi-idt.py utility. Then connect a USB A to B mini cable from your PC to the USB OTG port of HiKey and execute the below command.
|
||||
|
||||
The command below assumes HiKey enumerated as the first USB serial port
|
||||
> sudo ~/hikey/src/burn-boot/hisi-idt.py -d /dev/ttyUSB0 --img1=~/hikey/bin/l-loader.bin
|
||||
|
||||
2. Once LED 0 comes on solid, HiKey board should be detected as a fastboot device by plugging a USB A to mini B
|
||||
cable from your PC to the USB OTG port of HiKey (on some boards I've found this to be unreliable).
|
||||
> sudo python ~/hikey/src/hisi-idt.py -d /dev/ttyUSB0 --img1 ~/hikey/bin/recovery.bin
|
||||
|
||||
2. Once LED 0 comes on solid, HiKey board should be detected as a fastboot device.
|
||||
|
||||
> sudo fastboot devices
|
||||
|
||||
@@ -93,51 +105,37 @@ The command below assumes HiKey enumerated as the first USB serial port
|
||||
|
||||
3. Flash the images
|
||||
|
||||
> sudo fastboot flash ptable ~/hikey/bin/ptable.img
|
||||
> sudo fastboot flash ptable ~/hikey/bin/prm_ptable.img
|
||||
> sudo fastboot flash loader ~/hikey/bin/l-loader.bin
|
||||
> sudo fastboot flash fastboot ~/hikey/bin/fip.bin
|
||||
> sudo fastboot flash nvme ~/hikey/bin/nvme.img
|
||||
|
||||
4. Disconnect second jumper on J15 BOOT SEL, and reset the board and you will now (hopefully)
|
||||
have ATF, booting u-boot from eMMC. On 'new' boards I've had to do the
|
||||
flashing twice in the past to avoid an ATF error.
|
||||
have ATF, booting u-boot from eMMC.
|
||||
|
||||
Note: To get USB host working, also disconnect the USB OTG cable used for flashing. Otherwise you
|
||||
will get 'dwc_otg_core_host_init: Timeout!' errors.
|
||||
|
||||
See working boot trace below (by default trace is now output to UART3 not UART0 on latest
|
||||
ATF, U-Boot and Kernel sources): -
|
||||
See working boot trace below on UART3 available at Low Speed Expansion header: -
|
||||
|
||||
debug EMMC boot: send RST_N .
|
||||
debug EMMC boot: start eMMC boot......
|
||||
load fastboot1!
|
||||
|
||||
Switch to aarch64 mode. CPU0 executes at 0xf9801000!
|
||||
|
||||
INFO: BL1: 0xf9810000 - 0xf9817000 [size = 28672]
|
||||
NOTICE: Booting Trusted Firmware
|
||||
NOTICE: BL1: v1.1(debug):e8b7174
|
||||
NOTICE: BL1: Built : 19:16:44, Sep 8 2015
|
||||
INFO: BL1: RAM 0xf9810000 - 0xf9817000
|
||||
NOTICE: syspll frequency:1190494208Hz
|
||||
NOTICE: succeed to init lpddr3 rank0 dram phy
|
||||
INFO: lpddr3_freq_init, set ddrc 533mhz
|
||||
INFO: init ddr3 rank0
|
||||
NOTICE: BL2: v1.5(debug):v1.5-694-g6d4f6aea
|
||||
NOTICE: BL2: Built : 09:21:42, Aug 29 2018
|
||||
INFO: BL2: Doing platform setup
|
||||
INFO: ddr3 rank1 init pass
|
||||
INFO: lpddr3_freq_init, set ddrc 800mhz
|
||||
INFO: init ddr3 rank0
|
||||
INFO: succeed to set ddrc 150mhz
|
||||
INFO: ddr3 rank1 init pass
|
||||
INFO: Elpida DDR
|
||||
INFO: succeed to set ddrc 266mhz
|
||||
INFO: ddr3 rank1 init pass
|
||||
INFO: succeed to set ddrc 400mhz
|
||||
INFO: ddr3 rank1 init pass
|
||||
INFO: succeed to set ddrc 533mhz
|
||||
INFO: ddr3 rank1 init pass
|
||||
INFO: succeed to set ddrc 800mhz
|
||||
INFO: Samsung DDR
|
||||
INFO: ddr test value:0xa5a55a5a
|
||||
INFO: Hisilicon HiKey platform is initialized
|
||||
INFO: Using FIP
|
||||
INFO: Loading file 'bl2.bin' at address 0xf9818000
|
||||
INFO: File 'bl2.bin' loaded: 0xf9818000 - 0xf9821100
|
||||
NOTICE: BL1: Booting BL2
|
||||
INFO: BL1: BL2 address = 0xf9818000
|
||||
INFO: BL1: BL2 spsr = 0x3c5
|
||||
INFO: BL2: TrustZone: protecting 16777216 bytes of memory at 0x3f000000
|
||||
INFO: BL2: TrustZone: protecting 4194304 bytes of memory at 0x3e800000
|
||||
INFO: [BDID] [fff91c18] midr: 0x410fd033
|
||||
INFO: [BDID] [fff91c1c] board type: 0
|
||||
INFO: [BDID] [fff91c20] board id: 0x2b
|
||||
INFO: init_acpu_dvfs: pmic version 17
|
||||
INFO: init_acpu_dvfs: ACPU_CHIP_MAX_FREQ=0x186a00.
|
||||
INFO: acpu_dvfs_volt_init: success!
|
||||
@@ -150,111 +148,80 @@ INFO: - 1: 0x49
|
||||
INFO: - 2: 0x50
|
||||
INFO: - 3: 0x60
|
||||
INFO: - 4: 0x78
|
||||
NOTICE: acpu_dvfs_set_freq: set acpu freq success!NOTICE: BL2: v1.1(debug):e8b7174
|
||||
NOTICE: BL2: Built : 19:16:46, Sep 8 2015
|
||||
INFO: BL2: Loading BL3-0
|
||||
INFO: Using FIP
|
||||
INFO: Loading file 'bl30.bin' at address 0x1000000
|
||||
INFO: Skip reserving memory: 0x1000000 - 0x1023270
|
||||
INFO: File 'bl30.bin' loaded: 0x1000000 - 0x1023270
|
||||
INFO: bl2_plat_handle_bl30: [1000000] 3a334d43 34313032 2f38302f 30203133
|
||||
INFO: bl2_plat_handle_bl30: [10000c8] 0 0 b 0
|
||||
INFO: bl2_plat_handle_bl30: [1000190] 17 0 0 0
|
||||
INFO: bl2_plat_handle_bl30: [1023260] 0 0 0 0
|
||||
NOTICE: acpu_dvfs_set_freq: set acpu freq success!INFO: BL2: Loading image id 2
|
||||
INFO: Loading image id=2 at address 0x1000000
|
||||
INFO: Image id=2 loaded: 0x1000000 - 0x1023d00
|
||||
INFO: hisi_mcu_load_image: mcu sections 0:
|
||||
INFO: hisi_mcu_load_image: src = 0x1000200
|
||||
INFO: hisi_mcu_load_image: dst = 0xf6000000
|
||||
INFO: hisi_mcu_load_image: size = 512
|
||||
INFO: hisi_mcu_load_image: [SRC 0x1000200] 0x7600 0x201 0x1eae1 0x1ea71
|
||||
INFO: hisi_mcu_load_image: [DST 0xf6000000] 0x7600 0x201 0x1eae1 0x1ea71
|
||||
INFO: hisi_mcu_load_image: size = 31184
|
||||
INFO: hisi_mcu_load_image: [SRC 0x1000200] 0x8000 0x3701 0x7695 0x7689
|
||||
INFO: hisi_mcu_load_image: [DST 0xf6000000] 0x8000 0x3701 0x7695 0x7689
|
||||
INFO: hisi_mcu_load_image: mcu sections 1:
|
||||
INFO: hisi_mcu_load_image: src = 0x1000400
|
||||
INFO: hisi_mcu_load_image: dst = 0xf6000200
|
||||
INFO: hisi_mcu_load_image: size = 27828
|
||||
INFO: hisi_mcu_load_image: [SRC 0x1000400] 0xbf00bf00 0x4815b672 0x48154780 0x60014915
|
||||
INFO: hisi_mcu_load_image: [DST 0xf6000200] 0xbf00bf00 0x4815b672 0x48154780 0x60014915
|
||||
INFO: hisi_mcu_load_image: mcu sections 2:
|
||||
INFO: hisi_mcu_load_image: src = 0x10070b4
|
||||
INFO: hisi_mcu_load_image: dst = 0xf6007200
|
||||
INFO: hisi_mcu_load_image: size = 1024
|
||||
INFO: hisi_mcu_load_image: [SRC 0x10070b4] 0x55 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: [DST 0xf6007200] 0x55 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: mcu sections 3:
|
||||
INFO: hisi_mcu_load_image: src = 0x10074b4
|
||||
INFO: hisi_mcu_load_image: dst = 0xfff8e000
|
||||
INFO: hisi_mcu_load_image: size = 12704
|
||||
INFO: hisi_mcu_load_image: [SRC 0x10074b4] 0x55 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: [DST 0xfff8e000] 0x55 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: mcu sections 4:
|
||||
INFO: hisi_mcu_load_image: src = 0x100a654
|
||||
INFO: hisi_mcu_load_image: src = 0x1007bd0
|
||||
INFO: hisi_mcu_load_image: dst = 0x5e00000
|
||||
INFO: hisi_mcu_load_image: size = 82912
|
||||
INFO: hisi_mcu_load_image: [SRC 0x100a654] 0x4ff0e92d 0x2cc5f645 0x2600b0ab 0x2c7cf6c0
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e00000] 0x4ff0e92d 0x2cc5f645 0x2600b0ab 0x2c7cf6c0
|
||||
INFO: hisi_mcu_load_image: mcu sections 5:
|
||||
INFO: hisi_mcu_load_image: src = 0x101ea34
|
||||
INFO: hisi_mcu_load_image: dst = 0x5e143e0
|
||||
INFO: hisi_mcu_load_image: size = 12816
|
||||
INFO: hisi_mcu_load_image: [SRC 0x101ea34] 0x33323130 0x37363534 0x42413938 0x46454443
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e143e0] 0x33323130 0x37363534 0x42413938 0x46454443
|
||||
INFO: hisi_mcu_load_image: mcu sections 6:
|
||||
INFO: hisi_mcu_load_image: src = 0x1021c44
|
||||
INFO: hisi_mcu_load_image: dst = 0x5e1c1d0
|
||||
INFO: hisi_mcu_load_image: size = 93828
|
||||
INFO: hisi_mcu_load_image: [SRC 0x1007bd0] 0xf000b510 0x2103fb3d 0xf0004604 0xf003fb57
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e00000] 0xf000b510 0x2103fb3d 0xf0004604 0xf003fb57
|
||||
INFO: hisi_mcu_load_image: mcu sections 2:
|
||||
INFO: hisi_mcu_load_image: src = 0x101ea54
|
||||
INFO: hisi_mcu_load_image: dst = 0x5e16e84
|
||||
INFO: hisi_mcu_load_image: size = 15428
|
||||
INFO: hisi_mcu_load_image: [SRC 0x101ea54] 0x9 0x1020640 0x10001 0x8f0d180
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e16e84] 0x9 0x1020640 0x10001 0x8f0d180
|
||||
INFO: hisi_mcu_load_image: mcu sections 3:
|
||||
INFO: hisi_mcu_load_image: src = 0x1022698
|
||||
INFO: hisi_mcu_load_image: dst = 0x5e22a10
|
||||
INFO: hisi_mcu_load_image: size = 3060
|
||||
INFO: hisi_mcu_load_image: [SRC 0x1021c44] 0x0 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e1c1d0] 0x0 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: mcu sections 7:
|
||||
INFO: hisi_mcu_load_image: src = 0x1022838
|
||||
INFO: hisi_mcu_load_image: dst = 0x5e1cdc4
|
||||
INFO: hisi_mcu_load_image: [SRC 0x1022698] 0x0 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e22a10] 0x0 0x0 0x0 0x0
|
||||
INFO: hisi_mcu_load_image: mcu sections 4:
|
||||
INFO: hisi_mcu_load_image: src = 0x102328c
|
||||
INFO: hisi_mcu_load_image: dst = 0x5e23604
|
||||
INFO: hisi_mcu_load_image: size = 2616
|
||||
INFO: hisi_mcu_load_image: [SRC 0x1022838] 0xf80000a0 0x0 0xf80000ac 0x0
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e1cdc4] 0xf80000a0 0x0 0xf80000ac 0x0
|
||||
INFO: hisi_mcu_load_image: [SRC 0x102328c] 0xf80000a0 0x0 0xf80000ac 0x0
|
||||
INFO: hisi_mcu_load_image: [DST 0x5e23604] 0xf80000a0 0x0 0xf80000ac 0x0
|
||||
INFO: hisi_mcu_start_run: AO_SC_SYS_CTRL2=0
|
||||
INFO: bl2_plat_handle_bl30: mcu pc is 42933301
|
||||
INFO: bl2_plat_handle_bl30: AO_SC_PERIPH_CLKSTAT4 is 39018f09
|
||||
INFO: BL2: TrustZone: protecting 16777216 bytes of memory at 0x3f000000
|
||||
INFO: BL2: Loading BL3-1
|
||||
INFO: Using FIP
|
||||
INFO: Loading file 'bl31.bin' at address 0xf9858000
|
||||
INFO: File 'bl31.bin' loaded: 0xf9858000 - 0xf9861010
|
||||
INFO: BL2: Loading BL3-2
|
||||
INFO: Using FIP
|
||||
WARNING: Failed to access image 'bl32.bin' (-1)
|
||||
WARNING: Failed to load BL3-2 (-1)
|
||||
INFO: BL2: Loading BL3-3
|
||||
INFO: Using FIP
|
||||
INFO: Loading file 'bl33.bin' at address 0x35000000
|
||||
INFO: File 'bl33.bin' loaded: 0x35000000 - 0x3504c468
|
||||
NOTICE: BL1: Booting BL3-1
|
||||
INFO: BL1: BL3-1 address = 0xf9858000
|
||||
INFO: BL1: BL3-1 spsr = 0x3cd
|
||||
INFO: BL1: BL3-1 params address = 0xf9821920
|
||||
INFO: BL1: BL3-1 plat params address = 0x0
|
||||
NOTICE: BL3-1: v1.1(debug):e8b7174
|
||||
NOTICE: BL3-1: Built : 19:16:49, Sep 8 2015
|
||||
INFO: BL3-1: Initializing runtime services
|
||||
INFO: BL3-1: Preparing for EL3 exit to normal world
|
||||
INFO: BL3-1: Next image address = 0x35000000
|
||||
INFO: BL3-1: Next image spsr = 0x3c9
|
||||
INFO: plat_hikey_bl2_handle_scp_bl2: MCU PC is at 0x42933301
|
||||
INFO: plat_hikey_bl2_handle_scp_bl2: AO_SC_PERIPH_CLKSTAT4 is 0x3b018f09
|
||||
WARNING: BL2: Platform setup already done!!
|
||||
INFO: BL2: Loading image id 3
|
||||
INFO: Loading image id=3 at address 0xf9858000
|
||||
INFO: Image id=3 loaded: 0xf9858000 - 0xf9860058
|
||||
INFO: BL2: Loading image id 5
|
||||
INFO: Loading image id=5 at address 0x35000000
|
||||
INFO: Image id=5 loaded: 0x35000000 - 0x35061cd2
|
||||
NOTICE: BL2: Booting BL31
|
||||
INFO: Entry point address = 0xf9858000
|
||||
INFO: SPSR = 0x3cd
|
||||
NOTICE: BL31: v1.5(debug):v1.5-694-g6d4f6aea
|
||||
NOTICE: BL31: Built : 09:21:44, Aug 29 2018
|
||||
WARNING: Using deprecated integer interrupt array in gicv2_driver_data_t
|
||||
WARNING: Please migrate to using an interrupt_prop_t array
|
||||
INFO: ARM GICv2 driver initialized
|
||||
INFO: BL31: Initializing runtime services
|
||||
INFO: BL31: cortex_a53: CPU workaround for disable_non_temporal_hint was applied
|
||||
INFO: BL31: cortex_a53: CPU workaround for 843419 was applied
|
||||
INFO: BL31: cortex_a53: CPU workaround for 855873 was applied
|
||||
INFO: BL31: Preparing for EL3 exit to normal world
|
||||
INFO: Entry point address = 0x35000000
|
||||
INFO: SPSR = 0x3c9
|
||||
|
||||
U-Boot 2015.10-rc2 (Sep 08 2015 - 20:29:33 +0100)hikey
|
||||
|
||||
DRAM: 1008 MiB
|
||||
U-Boot 2018.09-rc1 (Aug 22 2018 - 14:55:49 +0530)hikey
|
||||
|
||||
DRAM: 990 MiB
|
||||
HI6553 PMIC init
|
||||
MMC: config_sd_carddetect: SD card not present
|
||||
HiKey DWMMC: 0, HiKey DWMMC: 1
|
||||
Card did not respond to voltage select!
|
||||
** Bad device mmc 1 **
|
||||
Using default environment
|
||||
|
||||
In: serial
|
||||
Out: serial
|
||||
Err: serial
|
||||
MMC: config_sd_carddetect: SD card present
|
||||
Hisilicon DWMMC: 0, Hisilicon DWMMC: 1
|
||||
Loading Environment from FAT... Unable to use mmc 1:1... Failed (-5)
|
||||
In: uart@f7113000
|
||||
Out: uart@f7113000
|
||||
Err: uart@f7113000
|
||||
Net: Net Initialization Skipped
|
||||
No ethernet found.
|
||||
Hit any key to stop autoboot: 0
|
||||
starting USB...
|
||||
USB0: Core Release: 3.00a
|
||||
scanning bus 0 for devices... 2 USB Device(s) found
|
||||
USB0: scanning bus 0 for devices... 2 USB Device(s) found
|
||||
scanning usb for storage devices... 0 Storage Device(s) found
|
||||
scanning usb for ethernet devices... 0 Ethernet Device(s) found
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user