Compare commits
172
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b73d114213 | ||
|
|
c0b354ed02 | ||
|
|
01585fbf6b | ||
|
|
4e238b7c1a | ||
|
|
c28d5d704d | ||
|
|
2cc6071ed4 | ||
|
|
24b0212dd8 | ||
|
|
93ef93b60b | ||
|
|
53ad2db946 | ||
|
|
1c4bd238b5 | ||
|
|
2610bf14b5 | ||
|
|
53e0fef5a7 | ||
|
|
2f7aa89703 | ||
|
|
df88a0e5cd | ||
|
|
6b0431dc21 | ||
|
|
f0bbcdef1b | ||
|
|
277b879906 | ||
|
|
391a16b710 | ||
|
|
d5f85303bc | ||
|
|
bc18f31e4a | ||
|
|
872b1921d3 | ||
|
|
8f684bc120 | ||
|
|
9abe5e6803 | ||
|
|
25d34b936c | ||
|
|
e420a38fa6 | ||
|
|
9907847245 | ||
|
|
c6bf4f3898 | ||
|
|
db5f1a50ef | ||
|
|
a70abcff5e | ||
|
|
4e040b4d24 | ||
|
|
bdb7f2632b | ||
|
|
6ce28132b8 | ||
|
|
c65365d7ad | ||
|
|
e4cecb5667 | ||
|
|
402558b1fe | ||
|
|
220fa478fb | ||
|
|
da7991b38e | ||
|
|
cbe607b920 | ||
|
|
d9aa19efa8 | ||
|
|
3600d47b73 | ||
|
|
a13a82186e | ||
|
|
ea4d4cb39a | ||
|
|
8faa7913a4 | ||
|
|
60b03f1cc4 | ||
|
|
a72a6ae362 | ||
|
|
9b7aac7536 | ||
|
|
3aba25bc38 | ||
|
|
8c02d842b6 | ||
|
|
8f7a16aac3 | ||
|
|
bced796e2d | ||
|
|
a3ddc776fa | ||
|
|
3c2ec6cb31 | ||
|
|
2d339efb1f | ||
|
|
d67da448ff | ||
|
|
ecec33faa1 | ||
|
|
252ee3c5b9 | ||
|
|
d242a14533 | ||
|
|
44a7cc82b3 | ||
|
|
69bd7dfc3a | ||
|
|
bdf319273b | ||
|
|
397ecc30b8 | ||
|
|
71523efc61 | ||
|
|
a2c48cb757 | ||
|
|
cbc3cd02a1 | ||
|
|
bbc0fcc302 | ||
|
|
b732c8780c | ||
|
|
72993e8e03 | ||
|
|
d46bee8c2d | ||
|
|
bd3d75bb0c | ||
|
|
1edfc3fa9b | ||
|
|
512f092da2 | ||
|
|
f228049297 | ||
|
|
3af8d1c44c | ||
|
|
611e7f860a | ||
|
|
e67beffee0 | ||
|
|
2147a16983 | ||
|
|
a907dce88e | ||
|
|
d1f3abe1e7 | ||
|
|
73c16692bc | ||
|
|
6befb51f34 | ||
|
|
c98cc9b2e8 | ||
|
|
06183ac5f5 | ||
|
|
b169ef1798 | ||
|
|
b9616d8f90 | ||
|
|
ea966d24ef | ||
|
|
e036a1d227 | ||
|
|
7f4e294b57 | ||
|
|
c12c76d352 | ||
|
|
bc24884c4c | ||
|
|
0f425612c8 | ||
|
|
196947b103 | ||
|
|
3e831bfed4 | ||
|
|
9c1e098fb9 | ||
|
|
f457680ffb | ||
|
|
92a8143c17 | ||
|
|
a0b74acb9b | ||
|
|
a1a652e801 | ||
|
|
144d0574d5 | ||
|
|
ba74bc1a0e | ||
|
|
9d7e6611a0 | ||
|
|
a96ea4d8d5 | ||
|
|
caee38aef7 | ||
|
|
46938abd2c | ||
|
|
2f22cb40e5 | ||
|
|
781aad0de9 | ||
|
|
01962f8d7c | ||
|
|
8e2b0af721 | ||
|
|
37e1362efc | ||
|
|
1019b19665 | ||
|
|
52ff04a216 | ||
|
|
766927a759 | ||
|
|
2dddc1bb29 | ||
|
|
56f1bcc4b7 | ||
|
|
0059ef0be9 | ||
|
|
74a9f68f7f | ||
|
|
c89c96d322 | ||
|
|
1a474559d9 | ||
|
|
30b20e6b3f | ||
|
|
2a15a25c36 | ||
|
|
e88018769c | ||
|
|
4abf68d57d | ||
|
|
283628c412 | ||
|
|
51bdb50904 | ||
|
|
c709243ee0 | ||
|
|
561bce3522 | ||
|
|
f10f536281 | ||
|
|
6b3d18c2cb | ||
|
|
85f3fddbcc | ||
|
|
e3bbc1f74e | ||
|
|
1613cf506c | ||
|
|
289d0ead28 | ||
|
|
a638fba9fc | ||
|
|
97ab802aa3 | ||
|
|
c0165c85c3 | ||
|
|
e1b03d6b0b | ||
|
|
71551055cb | ||
|
|
aeedeae407 | ||
|
|
9e30423978 | ||
|
|
9e9aa0b473 | ||
|
|
e4928270a4 | ||
|
|
3dc2079733 | ||
|
|
917fa369f6 | ||
|
|
efc4ad0bc7 | ||
|
|
537f00182f | ||
|
|
496f49464d | ||
|
|
d003434525 | ||
|
|
cc32fd911a | ||
|
|
71a2d1e7b8 | ||
|
|
fc054d563b | ||
|
|
d0781c95bc | ||
|
|
56a5588340 | ||
|
|
9d1215be92 | ||
|
|
592b98bb9a | ||
|
|
f4a60b0363 | ||
|
|
4e96356185 | ||
|
|
eb5fd9e46c | ||
|
|
694cd5618c | ||
|
|
400797cad3 | ||
|
|
b672c1619b | ||
|
|
658d6c5836 | ||
|
|
09d8f07762 | ||
|
|
20a7d35148 | ||
|
|
7b9ca3f89c | ||
|
|
d9b0ac90ba | ||
|
|
99cb2b996b | ||
|
|
c090e8f236 | ||
|
|
f43d9e904d | ||
|
|
1e8f246563 | ||
|
|
038e02455b | ||
|
|
98757d87ee | ||
|
|
fc3c6fd752 | ||
|
|
f1fd79afad |
No files matched your search
@@ -144,7 +144,7 @@ jobs:
|
||||
export USER=azure
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install pyelftools pytest pygit2
|
||||
pip install -r test/py/requirements.txt
|
||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
||||
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
|
||||
|
||||
+1
-47
@@ -11,7 +11,6 @@ stages:
|
||||
- world build
|
||||
|
||||
.buildman_and_testpy_template: &buildman_and_testpy_dfn
|
||||
tags: [ 'all' ]
|
||||
stage: test.py
|
||||
before_script:
|
||||
# Clone uboot-test-hooks
|
||||
@@ -53,7 +52,6 @@ stages:
|
||||
--build-dir "$UBOOT_TRAVIS_BUILD_DIR"
|
||||
|
||||
build all 32bit ARM platforms:
|
||||
tags: [ 'all' ]
|
||||
stage: world build
|
||||
script:
|
||||
- ret=0;
|
||||
@@ -64,7 +62,6 @@ build all 32bit ARM platforms:
|
||||
fi;
|
||||
|
||||
build all 64bit ARM platforms:
|
||||
tags: [ 'all' ]
|
||||
stage: world build
|
||||
script:
|
||||
- virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
@@ -78,7 +75,6 @@ build all 64bit ARM platforms:
|
||||
fi;
|
||||
|
||||
build all PowerPC platforms:
|
||||
tags: [ 'all' ]
|
||||
stage: world build
|
||||
script:
|
||||
- ret=0;
|
||||
@@ -89,7 +85,6 @@ build all PowerPC platforms:
|
||||
fi;
|
||||
|
||||
build all other platforms:
|
||||
tags: [ 'all' ]
|
||||
stage: world build
|
||||
script:
|
||||
- ret=0;
|
||||
@@ -102,14 +97,12 @@ build all other platforms:
|
||||
# QA jobs for code analytics
|
||||
# static code analysis with cppcheck (we can add --enable=all later)
|
||||
cppcheck:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- cppcheck -j$(nproc) --force --quiet --inline-suppr .
|
||||
|
||||
# search for TODO within source tree
|
||||
grep TODO/FIXME/HACK:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- grep -r TODO .
|
||||
@@ -119,7 +112,6 @@ grep TODO/FIXME/HACK:
|
||||
|
||||
# build HTML documentation
|
||||
htmldocs:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- virtualenv -p /usr/bin/python3 /tmp/venvhtml
|
||||
@@ -129,34 +121,29 @@ htmldocs:
|
||||
|
||||
# some statistics about the code base
|
||||
sloccount:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- sloccount .
|
||||
|
||||
# ensure all configs have MAINTAINERS entries
|
||||
Check for configs without MAINTAINERS entry:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
|
||||
|
||||
# Ensure host tools build
|
||||
Build tools-only:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- make tools-only_config tools-only -j$(nproc)
|
||||
|
||||
# Ensure env tools build
|
||||
Build envtools:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- make tools-only_config envtools -j$(nproc)
|
||||
|
||||
Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- git config --global user.name "GitLab CI Runner";
|
||||
@@ -164,7 +151,7 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
export USER=gitlab;
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv;
|
||||
. /tmp/venv/bin/activate;
|
||||
pip install pyelftools pytest pygit2;
|
||||
pip install -r test/py/requirements.txt;
|
||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl;
|
||||
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
|
||||
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
|
||||
@@ -176,7 +163,6 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
make testconfig
|
||||
|
||||
Run tests for Nokia RX-51 (aka N900):
|
||||
tags: [ 'all' ]
|
||||
stage: testsuites
|
||||
script:
|
||||
- ./tools/buildman/buildman --fetch-arch arm;
|
||||
@@ -185,54 +171,46 @@ Run tests for Nokia RX-51 (aka N900):
|
||||
|
||||
# Test sandbox with test.py
|
||||
sandbox test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox with clang test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox"
|
||||
OVERRIDE: "-O clang-10"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox_spl test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox_spl"
|
||||
TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
evb-ast2500 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "evb-ast2500"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
sandbox_flattree test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "sandbox_flattree"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
vexpress_ca15_tc2 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "vexpress_ca15_tc2"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
vexpress_ca9x4 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "vexpress_ca9x4"
|
||||
TEST_PY_ID: "--id qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
integratorcp_cm926ejs test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "integratorcp_cm926ejs"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
@@ -240,49 +218,42 @@ integratorcp_cm926ejs test.py:
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_arm test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_arm"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_arm64 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_arm64"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mips test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mips"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mipsel test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mipsel"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mips64 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mips64"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_mips64el test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu_mips64el"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_malta test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "malta"
|
||||
TEST_PY_TEST_SPEC: "not sleep and not efi"
|
||||
@@ -290,7 +261,6 @@ qemu_malta test.py:
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_maltael test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "maltael"
|
||||
TEST_PY_TEST_SPEC: "not sleep and not efi"
|
||||
@@ -298,7 +268,6 @@ qemu_maltael test.py:
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_malta64 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "malta64"
|
||||
TEST_PY_TEST_SPEC: "not sleep and not efi"
|
||||
@@ -306,7 +275,6 @@ qemu_malta64 test.py:
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu_malta64el test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "malta64el"
|
||||
TEST_PY_TEST_SPEC: "not sleep and not efi"
|
||||
@@ -314,84 +282,72 @@ qemu_malta64el test.py:
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu-ppce500 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu-ppce500"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu-riscv32 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu-riscv32"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu-riscv64 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu-riscv64"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu-riscv32_spl test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu-riscv32_spl"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu-riscv64_spl test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu-riscv64_spl"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu-x86 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu-x86"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
qemu-x86_64 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "qemu-x86_64"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
r2dplus_i82557c test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "r2dplus"
|
||||
TEST_PY_ID: "--id i82557c_qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
r2dplus_pcnet test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "r2dplus"
|
||||
TEST_PY_ID: "--id pcnet_qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
r2dplus_rtl8139 test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "r2dplus"
|
||||
TEST_PY_ID: "--id rtl8139_qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
r2dplus_tulip test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "r2dplus"
|
||||
TEST_PY_ID: "--id tulip_qemu"
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
xilinx_zynq_virt test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "xilinx_zynq_virt"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
@@ -399,7 +355,6 @@ xilinx_zynq_virt test.py:
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
xilinx_versal_virt test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "xilinx_versal_virt"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
@@ -407,7 +362,6 @@ xilinx_versal_virt test.py:
|
||||
<<: *buildman_and_testpy_dfn
|
||||
|
||||
xtfpga test.py:
|
||||
tags: [ 'all' ]
|
||||
variables:
|
||||
TEST_PY_BD: "xtfpga"
|
||||
TEST_PY_TEST_SPEC: "not sleep"
|
||||
|
||||
@@ -1386,6 +1386,7 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
|
||||
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
|
||||
-p $(CONFIG_FIT_EXTERNAL_OFFSET) \
|
||||
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
|
||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
|
||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \
|
||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
|
||||
else
|
||||
|
||||
@@ -575,7 +575,6 @@ The following options need to be configured:
|
||||
* The bootm command automatically updates the fdt
|
||||
|
||||
OF_TBCLK - The timebase frequency.
|
||||
OF_STDOUT_PATH - The path to the console device
|
||||
|
||||
boards with QUICC Engines require OF_QE to set UCC MAC
|
||||
addresses
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
};
|
||||
|
||||
&prcm {
|
||||
l4_per_cm: l4_per-cm@0 {
|
||||
per_cm: per-cm@0 {
|
||||
compatible = "ti,omap4-cm";
|
||||
reg = <0x0 0x400>;
|
||||
#address-cells = <1>;
|
||||
@@ -604,7 +604,7 @@
|
||||
|
||||
l4_wkup_clkctrl: l4-wkup-clkctrl@0 {
|
||||
compatible = "ti,clkctrl";
|
||||
reg = <0x4 0x10>, <0xb4 0x24>;
|
||||
reg = <0x0 0x10>, <0xb4 0x24>;
|
||||
#clock-cells = <2>;
|
||||
};
|
||||
|
||||
@@ -670,9 +670,9 @@
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0xa00 0x100>;
|
||||
|
||||
l4_cefuse_clkctrl: clk@20 {
|
||||
l4_cefuse_clkctrl: l4-cefuse-clkctrl@0 {
|
||||
compatible = "ti,clkctrl";
|
||||
reg = <0x20 0x4>;
|
||||
reg = <0x0 0x24>;
|
||||
#clock-cells = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -148,6 +148,28 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x7000 0x1000>;
|
||||
|
||||
gpio0: gpio@0 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
gpio-ranges = <&am33xx_pinmux 0 82 8>,
|
||||
<&am33xx_pinmux 8 52 4>,
|
||||
<&am33xx_pinmux 12 94 4>,
|
||||
<&am33xx_pinmux 16 71 2>,
|
||||
<&am33xx_pinmux 18 135 1>,
|
||||
<&am33xx_pinmux 19 108 2>,
|
||||
<&am33xx_pinmux 21 73 1>,
|
||||
<&am33xx_pinmux 22 8 2>,
|
||||
<&am33xx_pinmux 26 10 2>,
|
||||
<&am33xx_pinmux 28 74 1>,
|
||||
<&am33xx_pinmux 29 81 1>,
|
||||
<&am33xx_pinmux 30 28 2>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x0 0x1000>;
|
||||
interrupts = <96>;
|
||||
};
|
||||
};
|
||||
|
||||
target-module@9000 { /* 0x44e09000, ap 16 04.0 */
|
||||
@@ -1200,6 +1222,20 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0x4c000 0x1000>;
|
||||
|
||||
gpio1: gpio@0 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
gpio-ranges = <&am33xx_pinmux 0 0 8>,
|
||||
<&am33xx_pinmux 8 90 4>,
|
||||
<&am33xx_pinmux 12 12 16>,
|
||||
<&am33xx_pinmux 28 30 4>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x0 0x1000>;
|
||||
interrupts = <98>;
|
||||
};
|
||||
};
|
||||
|
||||
target-module@50000 { /* 0x48050000, ap 34 2c.0 */
|
||||
@@ -1570,6 +1606,19 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0xac000 0x1000>;
|
||||
|
||||
gpio2: gpio@0 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
gpio-ranges = <&am33xx_pinmux 0 34 18>,
|
||||
<&am33xx_pinmux 18 77 4>,
|
||||
<&am33xx_pinmux 22 56 10>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x0 0x1000>;
|
||||
interrupts = <32>;
|
||||
};
|
||||
};
|
||||
|
||||
target-module@ae000 { /* 0x481ae000, ap 56 3a.0 */
|
||||
@@ -1593,6 +1642,21 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0x0 0xae000 0x1000>;
|
||||
|
||||
gpio3: gpio@0 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
gpio-ranges = <&am33xx_pinmux 0 66 5>,
|
||||
<&am33xx_pinmux 5 98 2>,
|
||||
<&am33xx_pinmux 7 75 2>,
|
||||
<&am33xx_pinmux 13 141 1>,
|
||||
<&am33xx_pinmux 14 100 8>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x0 0x1000>;
|
||||
interrupts = <62>;
|
||||
};
|
||||
};
|
||||
|
||||
target-module@b0000 { /* 0x481b0000, ap 58 50.0 */
|
||||
|
||||
@@ -301,50 +301,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
gpio0: gpio@44e07000 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
ti,hwmods = "gpio1";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x44e07000 0x1000>;
|
||||
interrupts = <96>;
|
||||
};
|
||||
|
||||
gpio1: gpio@4804c000 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
ti,hwmods = "gpio2";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x4804c000 0x1000>;
|
||||
interrupts = <98>;
|
||||
};
|
||||
|
||||
gpio2: gpio@481ac000 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
ti,hwmods = "gpio3";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x481ac000 0x1000>;
|
||||
interrupts = <32>;
|
||||
};
|
||||
|
||||
gpio3: gpio@481ae000 {
|
||||
compatible = "ti,omap4-gpio";
|
||||
ti,hwmods = "gpio4";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x481ae000 0x1000>;
|
||||
interrupts = <62>;
|
||||
};
|
||||
|
||||
i2c0: i2c@44e0b000 {
|
||||
compatible = "ti,omap4-i2c";
|
||||
#address-cells = <1>;
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
compatible = "fsl,ls1028a-rdb", "fsl,ls1028a";
|
||||
aliases {
|
||||
spi0 = &fspi;
|
||||
eth0 = &enetc0;
|
||||
eth1 = &enetc2;
|
||||
eth2 = &mscc_felix_port0;
|
||||
eth3 = &mscc_felix_port1;
|
||||
eth4 = &mscc_felix_port2;
|
||||
eth5 = &mscc_felix_port3;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -131,9 +137,67 @@
|
||||
phy-handle = <&rdb_phy0>;
|
||||
};
|
||||
|
||||
&enetc2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mscc_felix {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mscc_felix_port0 {
|
||||
label = "swp0";
|
||||
phy-handle = <&sw_phy0>;
|
||||
phy-mode = "qsgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mscc_felix_port1 {
|
||||
label = "swp1";
|
||||
phy-handle = <&sw_phy1>;
|
||||
phy-mode = "qsgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mscc_felix_port2 {
|
||||
label = "swp2";
|
||||
phy-handle = <&sw_phy2>;
|
||||
phy-mode = "qsgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mscc_felix_port3 {
|
||||
label = "swp3";
|
||||
phy-handle = <&sw_phy3>;
|
||||
phy-mode = "qsgmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mscc_felix_port4 {
|
||||
ethernet = <&enetc2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
rdb_phy0: phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
/* VSC8514 QSGMII PHY */
|
||||
sw_phy0: phy@10 {
|
||||
reg = <0x10>;
|
||||
};
|
||||
|
||||
sw_phy1: phy@11 {
|
||||
reg = <0x11>;
|
||||
};
|
||||
|
||||
sw_phy2: phy@12 {
|
||||
reg = <0x12>;
|
||||
};
|
||||
|
||||
sw_phy3: phy@13 {
|
||||
reg = <0x13>;
|
||||
};
|
||||
};
|
||||
@@ -151,9 +151,63 @@
|
||||
reg = <0x000300 0 0 0 0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mscc_felix: pci@0,5 {
|
||||
reg = <0x000500 0 0 0 0>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
mscc_felix_port0: port@0 {
|
||||
reg = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mscc_felix_port1: port@1 {
|
||||
reg = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mscc_felix_port2: port@2 {
|
||||
reg = <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mscc_felix_port3: port@3 {
|
||||
reg = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mscc_felix_port4: port@4 {
|
||||
reg = <4>;
|
||||
phy-mode = "internal";
|
||||
status = "disabled";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
mscc_felix_port5: port@5 {
|
||||
reg = <5>;
|
||||
phy-mode = "internal";
|
||||
status = "disabled";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
enetc6: pci@0,6 {
|
||||
reg = <0x000600 0 0 0 0>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
phy-mode = "internal";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
reg = <0x0 0x46000000 0x0 0x200000>,
|
||||
<0x0 0x40f00200 0x0 0x8>;
|
||||
reg-names = "cpsw_nuss", "mac_efuse";
|
||||
/delete-property/ ranges;
|
||||
|
||||
cpsw-phy-sel@40f04040 {
|
||||
compatible = "ti,am654-cpsw-phy-sel";
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
#elif defined(CONFIG_ARCH_LX2160A) || defined(CONFIG_ARCH_LX2162A)
|
||||
#define TZPC_BASE 0x02200000
|
||||
#define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
|
||||
#if !defined(CONFIG_DM_I2C)
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
#define CONFIG_SYS_I2C
|
||||
#define CONFIG_SYS_I2C_EARLY_INIT
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@ struct lpc32xx_i2c_base {
|
||||
u32 stxfl;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
enum {
|
||||
I2C_0, I2C_1, I2C_2,
|
||||
};
|
||||
|
||||
@@ -190,6 +190,7 @@ enum sunxi_gpio_number {
|
||||
#define SUN5I_GPG_SDC1 2
|
||||
#define SUN6I_GPG_SDC1 2
|
||||
#define SUN8I_GPG_SDC1 2
|
||||
#define SUN8I_GPG_UART1 2
|
||||
#define SUN6I_GPG_TWI3 2
|
||||
#define SUN5I_GPG_UART1 4
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef __ASM_GBL_DATA_H
|
||||
#define __ASM_GBL_DATA_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@@ -125,4 +127,6 @@ static inline void set_gd(volatile gd_t *gd_ptr)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_GBL_DATA_H */
|
||||
@@ -53,7 +53,7 @@ struct mxc_i2c_bus {
|
||||
#if CONFIG_IS_ENABLED(CLK)
|
||||
struct clk per_clk;
|
||||
#endif
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
int (*idle_bus_fn)(void *p);
|
||||
void *idle_bus_data;
|
||||
#else
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef _OMAP_I2C_H
|
||||
#define _OMAP_I2C_H
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
|
||||
/* Information about a GPIO bank */
|
||||
struct omap_i2c_plat {
|
||||
|
||||
@@ -102,7 +102,7 @@ int setup_i2c(unsigned i2c_index, int speed, int slave_addr,
|
||||
if (ret)
|
||||
goto err_idle;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
bus_i2c_init(i2c_index, speed, slave_addr, force_idle_bus, p);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -8,12 +8,6 @@ choice
|
||||
prompt "MX25 board select"
|
||||
optional
|
||||
|
||||
config TARGET_MX25PDK
|
||||
bool "Support mx25pdk"
|
||||
select BOARD_LATE_INIT
|
||||
select CPU_ARM926EJS
|
||||
select BOARD_EARLY_INIT_F
|
||||
|
||||
config TARGET_ZMX25
|
||||
bool "Support zmx25"
|
||||
select BOARD_LATE_INIT
|
||||
@@ -24,7 +18,6 @@ endchoice
|
||||
config SYS_SOC
|
||||
default "mx25"
|
||||
|
||||
source "board/freescale/mx25pdk/Kconfig"
|
||||
source "board/syteco/zmx25/Kconfig"
|
||||
|
||||
endif
|
||||
@@ -44,10 +44,6 @@ config TARGET_MX51EVK
|
||||
select BOARD_LATE_INIT
|
||||
select MX51
|
||||
|
||||
config TARGET_MX53ARD
|
||||
bool "Support mx53ard"
|
||||
select MX53
|
||||
|
||||
config TARGET_MX53CX9020
|
||||
bool "Support CX9020"
|
||||
select BOARD_LATE_INIT
|
||||
@@ -72,10 +68,6 @@ config TARGET_MX53PPD
|
||||
help
|
||||
Enable support for the GE Healthcare PPD.
|
||||
|
||||
config TARGET_MX53SMD
|
||||
bool "Support mx53smd"
|
||||
select MX53
|
||||
|
||||
config TARGET_TS4800
|
||||
bool "Support TS4800"
|
||||
select MX51
|
||||
@@ -91,10 +83,8 @@ config SYS_SOC
|
||||
|
||||
source "board/beckhoff/mx53cx9020/Kconfig"
|
||||
source "board/freescale/mx51evk/Kconfig"
|
||||
source "board/freescale/mx53ard/Kconfig"
|
||||
source "board/freescale/mx53evk/Kconfig"
|
||||
source "board/freescale/mx53loco/Kconfig"
|
||||
source "board/freescale/mx53smd/Kconfig"
|
||||
source "board/ge/mx53ppd/Kconfig"
|
||||
source "board/inversepath/usbarmory/Kconfig"
|
||||
source "board/k+p/kp_imx53/Kconfig"
|
||||
|
||||
@@ -554,11 +554,6 @@ config TARGET_PCL063_ULL
|
||||
config TARGET_SECOMX6
|
||||
bool "secomx6 boards"
|
||||
|
||||
config TARGET_SKSIMX6
|
||||
bool "sks-imx6"
|
||||
depends on MX6QDL
|
||||
select SUPPORT_SPL
|
||||
|
||||
config TARGET_SOMLABS_VISIONSOM_6ULL
|
||||
bool "visionsom-6ull"
|
||||
depends on MX6ULL
|
||||
@@ -737,7 +732,6 @@ source "board/liebherr/display5/Kconfig"
|
||||
source "board/liebherr/mccmon6/Kconfig"
|
||||
source "board/logicpd/imx6/Kconfig"
|
||||
source "board/seco/Kconfig"
|
||||
source "board/sks-kinkel/sksimx6/Kconfig"
|
||||
source "board/solidrun/mx6cuboxi/Kconfig"
|
||||
source "board/somlabs/visionsom-6ull/Kconfig"
|
||||
source "board/technexion/pico-imx6/Kconfig"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <asm/mach-imx/hab.h>
|
||||
#include <asm/mach-imx/boot_mode.h>
|
||||
#include <g_dnl.h>
|
||||
#include <linux/libfdt.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -321,11 +322,11 @@ ulong board_spl_fit_size_align(ulong size)
|
||||
return size;
|
||||
}
|
||||
|
||||
void board_spl_fit_post_load(ulong load_addr, size_t length)
|
||||
void board_spl_fit_post_load(const void *fit)
|
||||
{
|
||||
u32 offset = length - CONFIG_CSF_SIZE;
|
||||
u32 offset = ALIGN(fdt_totalsize(fit), 0x1000);
|
||||
|
||||
if (imx_hab_authenticate_image(load_addr,
|
||||
if (imx_hab_authenticate_image((uintptr_t)fit,
|
||||
offset + IVT_SIZE + CSF_PAD_SIZE,
|
||||
offset)) {
|
||||
panic("spl: ERROR: image authentication unsuccessful\n");
|
||||
|
||||
@@ -404,7 +404,7 @@ static void init_ddr3param(struct ddr3_spd_cb *spd_cb,
|
||||
static int ddr3_read_spd(ddr3_spd_eeprom_t *spd_params)
|
||||
{
|
||||
int ret;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
int old_bus;
|
||||
|
||||
i2c_init(CONFIG_SYS_DAVINCI_I2C_SPEED, CONFIG_SYS_DAVINCI_I2C_SLAVE);
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
/*
|
||||
* I2C related stuff
|
||||
*/
|
||||
#if defined(CONFIG_CMD_I2C) && !defined(CONFIG_DM_I2C)
|
||||
#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
|
||||
#ifndef CONFIG_SYS_I2C_SOFT
|
||||
#define CONFIG_SYS_I2C
|
||||
#define CONFIG_SYS_I2C_MVTWSI
|
||||
|
||||
@@ -9,6 +9,7 @@ config MESON64_COMMON
|
||||
select SYSCON
|
||||
select REGMAP
|
||||
select PWRSEQ
|
||||
select MMC_PWRSEQ
|
||||
select BOARD_LATE_INIT
|
||||
imply CMD_DM
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ U_BOOT_DRVINFOS(am33xx_uarts) = {
|
||||
# endif
|
||||
};
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
static const struct omap_i2c_plat am33xx_i2c[] = {
|
||||
{ I2C_BASE1, 100000, OMAP_I2C_REV_V2},
|
||||
{ I2C_BASE2, 100000, OMAP_I2C_REV_V2},
|
||||
|
||||
@@ -29,7 +29,7 @@ static int clk_synthesizer_reg_read(struct udevice *dev, int addr, u8 *buf)
|
||||
/* Enable Bye read */
|
||||
addr = addr | CLK_SYNTHESIZER_BYTE_MODE;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
/* Send the command byte */
|
||||
rc = i2c_write(CLK_SYNTHESIZER_I2C_ADDR, addr, 1, buf, 1);
|
||||
if (rc)
|
||||
@@ -72,7 +72,7 @@ static int clk_synthesizer_reg_write(struct udevice *dev, int addr, u8 val)
|
||||
cmd[0] = addr | CLK_SYNTHESIZER_BYTE_MODE;
|
||||
cmd[1] = val;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
rc = i2c_write(CLK_SYNTHESIZER_I2C_ADDR, addr, 1, cmd, 2);
|
||||
#else
|
||||
rc = dm_i2c_write(dev, addr, cmd, 2);
|
||||
@@ -96,7 +96,7 @@ int setup_clock_synthesizer(struct clk_synth *data)
|
||||
int rc;
|
||||
u8 val = 0;
|
||||
struct udevice *dev = NULL;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
rc = i2c_probe(CLK_SYNTHESIZER_I2C_ADDR);
|
||||
if (rc) {
|
||||
printf("i2c probe failed at address 0x%x\n",
|
||||
|
||||
@@ -202,7 +202,7 @@ void spl_board_init(void)
|
||||
#if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT)
|
||||
gpmc_init();
|
||||
#endif
|
||||
#if defined(CONFIG_SPL_I2C_SUPPORT) && !defined(CONFIG_DM_I2C)
|
||||
#if defined(CONFIG_SPL_I2C_SUPPORT) && !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
|
||||
#endif
|
||||
#if defined(CONFIG_AM33XX) && defined(CONFIG_SPL_MUSB_NEW_SUPPORT)
|
||||
|
||||
@@ -912,7 +912,7 @@ void prcm_init(void)
|
||||
enable_basic_uboot_clocks();
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_DM_I2C)
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
void gpi2c_init(void)
|
||||
{
|
||||
static int gpi2c = 1;
|
||||
|
||||
@@ -144,6 +144,11 @@ static int gpio_init(void)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPL(2), SUN8I_GPL_R_UART);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPL(3), SUN8I_GPL_R_UART);
|
||||
sunxi_gpio_set_pull(SUNXI_GPL(3), SUNXI_GPIO_PULL_UP);
|
||||
#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN8I) && \
|
||||
!defined(CONFIG_MACH_SUN8I_R40)
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN8I_GPG_UART1);
|
||||
sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN8I_GPG_UART1);
|
||||
sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP);
|
||||
#else
|
||||
#error Unsupported console port number. Please fix pin mux settings in board.c
|
||||
#endif
|
||||
@@ -222,7 +227,7 @@ void s_init(void)
|
||||
clock_init();
|
||||
timer_init();
|
||||
gpio_init();
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_init_board();
|
||||
#endif
|
||||
eth_init_board();
|
||||
|
||||
@@ -9,6 +9,11 @@ void clock_init_safe(void)
|
||||
{
|
||||
struct sunxi_ccm_reg *const ccm =
|
||||
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
||||
|
||||
/* this seems to enable PLLs on H616 */
|
||||
if (IS_ENABLED(CONFIG_MACH_SUN50I_H616))
|
||||
setbits_le32(SUNXI_PRCM_BASE + 0x250, 0x10);
|
||||
|
||||
clock_set_pll1(408000000);
|
||||
|
||||
writel(CCM_PLL6_DEFAULT, &ccm->pll6_cfg);
|
||||
|
||||
@@ -128,8 +128,8 @@ struct apu_regs {
|
||||
|
||||
#define ZYNQMP_CSU_VERSION_EMPTY_SHIFT 20
|
||||
|
||||
#define ZYNQMP_SILICON_VER_MASK 0xF000
|
||||
#define ZYNQMP_SILICON_VER_SHIFT 12
|
||||
#define ZYNQMP_SILICON_VER_MASK 0xF
|
||||
#define ZYNQMP_SILICON_VER_SHIFT 0
|
||||
|
||||
struct csu_regs {
|
||||
u32 reserved0[4];
|
||||
|
||||
@@ -64,10 +64,6 @@ config TARGET_MPC8568MDS
|
||||
bool "Support MPC8568MDS"
|
||||
select ARCH_MPC8568
|
||||
|
||||
config TARGET_MPC8569MDS
|
||||
bool "Support MPC8569MDS"
|
||||
select ARCH_MPC8569
|
||||
|
||||
config TARGET_P1010RDB_PA
|
||||
bool "Support P1010RDB_PA"
|
||||
select ARCH_P1010
|
||||
@@ -473,19 +469,6 @@ config ARCH_MPC8568
|
||||
select SYS_FSL_SEC_BE
|
||||
select SYS_FSL_SEC_COMPAT_2
|
||||
|
||||
config ARCH_MPC8569
|
||||
bool
|
||||
select FSL_LAW
|
||||
select SYS_FSL_ERRATUM_A004508
|
||||
select SYS_FSL_ERRATUM_A005125
|
||||
select FSL_PCIE_RESET
|
||||
select SYS_FSL_HAS_DDR3
|
||||
select SYS_FSL_HAS_SEC
|
||||
select SYS_FSL_SEC_BE
|
||||
select SYS_FSL_SEC_COMPAT_2
|
||||
select FSL_ELBC
|
||||
imply CMD_NAND
|
||||
|
||||
config ARCH_MPC8572
|
||||
bool
|
||||
select FSL_LAW
|
||||
@@ -1102,7 +1085,6 @@ config SYS_CCSRBAR_DEFAULT
|
||||
ARCH_MPC8555 || \
|
||||
ARCH_MPC8560 || \
|
||||
ARCH_MPC8568 || \
|
||||
ARCH_MPC8569 || \
|
||||
ARCH_MPC8572 || \
|
||||
ARCH_P1010 || \
|
||||
ARCH_P1011 || \
|
||||
@@ -1335,8 +1317,7 @@ config SYS_FSL_NUM_LAWS
|
||||
ARCH_P2020
|
||||
default 10 if ARCH_MPC8544 || \
|
||||
ARCH_MPC8548 || \
|
||||
ARCH_MPC8568 || \
|
||||
ARCH_MPC8569
|
||||
ARCH_MPC8568
|
||||
default 8 if ARCH_MPC8540 || \
|
||||
ARCH_MPC8541 || \
|
||||
ARCH_MPC8555 || \
|
||||
@@ -1433,7 +1414,6 @@ source "board/freescale/mpc8541cds/Kconfig"
|
||||
source "board/freescale/mpc8548cds/Kconfig"
|
||||
source "board/freescale/mpc8555cds/Kconfig"
|
||||
source "board/freescale/mpc8568mds/Kconfig"
|
||||
source "board/freescale/mpc8569mds/Kconfig"
|
||||
source "board/freescale/p1010rdb/Kconfig"
|
||||
source "board/freescale/p1_p2_rdb_pc/Kconfig"
|
||||
source "board/freescale/p2041rdb/Kconfig"
|
||||
|
||||
@@ -65,7 +65,6 @@ obj-$(CONFIG_ARCH_MPC8536) += mpc8536_serdes.o
|
||||
obj-$(CONFIG_ARCH_MPC8544) += mpc8544_serdes.o
|
||||
obj-$(CONFIG_ARCH_MPC8548) += mpc8548_serdes.o
|
||||
obj-$(CONFIG_ARCH_MPC8568) += mpc8568_serdes.o
|
||||
obj-$(CONFIG_ARCH_MPC8569) += mpc8569_serdes.o
|
||||
obj-$(CONFIG_ARCH_MPC8572) += mpc8572_serdes.o
|
||||
obj-$(CONFIG_ARCH_P1010) += p1010_serdes.o
|
||||
obj-$(CONFIG_ARCH_P1011) += p1021_serdes.o
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2010 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <common.h>
|
||||
#include <log.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/immap_85xx.h>
|
||||
#include <asm/fsl_serdes.h>
|
||||
|
||||
#define SRDS1_MAX_LANES 4
|
||||
|
||||
static u32 serdes1_prtcl_map;
|
||||
|
||||
static u8 serdes1_cfg_tbl[][SRDS1_MAX_LANES] = {
|
||||
[0x0] = {PCIE1, NONE, NONE, NONE},
|
||||
[0x1] = {SRIO1, SRIO2, SGMII_TSEC1, SGMII_TSEC2},
|
||||
[0x2] = {SRIO1, SRIO2, SGMII_TSEC1, SGMII_TSEC2},
|
||||
[0x3] = {SRIO1, SRIO2, NONE, NONE},
|
||||
[0x4] = {PCIE1, NONE, SGMII_TSEC1, SGMII_TSEC2},
|
||||
[0x5] = {PCIE1, PCIE1, SGMII_TSEC1, SGMII_TSEC2},
|
||||
[0x6] = {PCIE1, NONE, SRIO1, SRIO2},
|
||||
[0x7] = {PCIE1, PCIE1, SRIO1, SRIO2},
|
||||
[0x8] = {PCIE1, PCIE1, SRIO1, SRIO2},
|
||||
[0x9] = {SRIO1, SRIO1, SRIO1, SRIO1},
|
||||
[0xa] = {SRIO1, SRIO1, SRIO1, SRIO1},
|
||||
[0xb] = {SRIO1, SRIO1, SRIO1, SRIO1},
|
||||
[0xc] = {PCIE1, SRIO1, SGMII_TSEC1, SGMII_TSEC2},
|
||||
[0xf] = {PCIE1, PCIE1, PCIE1, PCIE1},
|
||||
};
|
||||
|
||||
int is_serdes_configured(enum srds_prtcl prtcl)
|
||||
{
|
||||
if (!(serdes1_prtcl_map & (1 << NONE)))
|
||||
fsl_serdes_init();
|
||||
|
||||
return (1 << prtcl) & serdes1_prtcl_map;
|
||||
}
|
||||
|
||||
void fsl_serdes_init(void)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
u32 pordevsr = in_be32(&gur->pordevsr);
|
||||
u32 srds_cfg = (pordevsr & MPC85xx_PORDEVSR_IO_SEL) >>
|
||||
MPC85xx_PORDEVSR_IO_SEL_SHIFT;
|
||||
int lane;
|
||||
|
||||
if (serdes1_prtcl_map & (1 << NONE))
|
||||
return;
|
||||
|
||||
debug("PORDEVSR[IO_SEL_SRDS] = %x\n", srds_cfg);
|
||||
|
||||
if (srds_cfg >= ARRAY_SIZE(serdes1_cfg_tbl)) {
|
||||
printf("Invalid PORDEVSR[IO_SEL_SRDS] = %d\n", srds_cfg);
|
||||
return;
|
||||
}
|
||||
|
||||
for (lane = 0; lane < SRDS1_MAX_LANES; lane++) {
|
||||
enum srds_prtcl lane_prtcl = serdes1_cfg_tbl[srds_cfg][lane];
|
||||
serdes1_prtcl_map |= (1 << lane_prtcl);
|
||||
}
|
||||
|
||||
/* Set the first bit to indicate serdes has been initialized */
|
||||
serdes1_prtcl_map |= (1 << NONE);
|
||||
}
|
||||
@@ -630,7 +630,7 @@ int get_clocks(void)
|
||||
gd->arch.i2c2_clk = gd->arch.i2c1_clk;
|
||||
|
||||
#if defined(CONFIG_FSL_ESDHC)
|
||||
#if defined(CONFIG_ARCH_MPC8569) || defined(CONFIG_ARCH_P1010)
|
||||
#if defined(CONFIG_ARCH_P1010)
|
||||
gd->arch.sdhc_clk = gd->bus_clk;
|
||||
#else
|
||||
gd->arch.sdhc_clk = gd->bus_clk / 2;
|
||||
|
||||
@@ -344,39 +344,6 @@ l2_disabled:
|
||||
mtspr DBCR0,r0
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_MPC8569
|
||||
#define CONFIG_SYS_LBC_ADDR (CONFIG_SYS_CCSRBAR_DEFAULT + 0x5000)
|
||||
#define CONFIG_SYS_LBCR_ADDR (CONFIG_SYS_LBC_ADDR + 0xd0)
|
||||
|
||||
/* MPC8569 Rev.0 silcon needs to set bit 13 of LBCR to allow elBC to
|
||||
* use address space which is more than 12bits, and it must be done in
|
||||
* the 4K boot page. So we set this bit here.
|
||||
*/
|
||||
|
||||
/* create a temp mapping TLB0[0] for LBCR */
|
||||
create_tlb0_entry 0, \
|
||||
0, BOOKE_PAGESZ_4K, \
|
||||
CONFIG_SYS_LBC_ADDR, MAS2_I|MAS2_G, \
|
||||
CONFIG_SYS_LBC_ADDR, MAS3_SW|MAS3_SR, \
|
||||
0, r6
|
||||
|
||||
/* Set LBCR register */
|
||||
lis r4,CONFIG_SYS_LBCR_ADDR@h
|
||||
ori r4,r4,CONFIG_SYS_LBCR_ADDR@l
|
||||
|
||||
lis r5,CONFIG_SYS_LBC_LBCR@h
|
||||
ori r5,r5,CONFIG_SYS_LBC_LBCR@l
|
||||
stw r5,0(r4)
|
||||
isync
|
||||
|
||||
/* invalidate this temp TLB */
|
||||
lis r4,CONFIG_SYS_LBC_ADDR@h
|
||||
ori r4,r4,CONFIG_SYS_LBC_ADDR@l
|
||||
tlbivax 0,r4
|
||||
isync
|
||||
|
||||
#endif /* CONFIG_ARCH_MPC8569 */
|
||||
|
||||
/*
|
||||
* Search for the TLB that covers the code we're executing, and shrink it
|
||||
* so that it covers only this 4K page. That will ensure that any other
|
||||
|
||||
@@ -7,6 +7,7 @@ dtb-$(CONFIG_TARGET_KMOPTI2) += kmopti2.dtb
|
||||
dtb-$(CONFIG_TARGET_KMSUPX5) += kmsupc5.dtb kmsupm5.dtb
|
||||
dtb-$(CONFIG_TARGET_KMTEGR1) += kmtegr1.dtb
|
||||
dtb-$(CONFIG_TARGET_KMTEPR2) += kmtepr2.dtb
|
||||
dtb-$(CONFIG_TARGET_MPC837XERDB) += mpc8379erdb.dtb
|
||||
dtb-$(CONFIG_TARGET_MPC8548CDS) += mpc8548cds.dtb mpc8548cds_36b.dtb
|
||||
dtb-$(CONFIG_TARGET_P1010RDB_PA) += p1010rdb-pa.dtb p1010rdb-pa_36b.dtb
|
||||
dtb-$(CONFIG_TARGET_P1010RDB_PB) += p1010rdb-pb.dtb p1010rdb-pb_36b.dtb
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+ OR X11
|
||||
/*
|
||||
* MPC8379E RDB Device Tree Source
|
||||
*
|
||||
* Copyright 2020 NXP
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
compatible = "fsl,mpc8379erdb";
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
PowerPC,8379@0 {
|
||||
device_type = "cpu";
|
||||
reg = <0x0>;
|
||||
d-cache-line-size = <32>;
|
||||
i-cache-line-size = <32>;
|
||||
d-cache-size = <32768>;
|
||||
i-cache-size = <32768>;
|
||||
timebase-frequency = <0>;
|
||||
bus-frequency = <0>;
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x10000000>; // 256MB at 0
|
||||
};
|
||||
|
||||
localbus@e0005000 {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
compatible = "fsl,elbc", "simple-bus";
|
||||
reg = <0xe0005000 0x1000>;
|
||||
interrupts = <77 0x8>;
|
||||
interrupt-parent = <&ipic>;
|
||||
};
|
||||
|
||||
immr@e0000000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
device_type = "soc";
|
||||
compatible = "simple-bus";
|
||||
ranges = <0 0xe0000000 0x00100000>;
|
||||
reg = <0xe0000000 0x00000200>;
|
||||
bus-frequency = <0>;
|
||||
|
||||
sdhc@2e000 {
|
||||
compatible = "fsl,esdhc";
|
||||
reg = <0x2e000 0x1000>;
|
||||
bus-width = <0x4>;
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
|
||||
ipic: interrupt-controller@700 {
|
||||
compatible = "fsl,ipic";
|
||||
interrupt-controller;
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <0x700 0x100>;
|
||||
device_type = "ipic";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
@@ -38,16 +38,6 @@
|
||||
#define CONFIG_SYS_FSL_RMU
|
||||
#define CONFIG_SYS_FSL_SRIO_MSG_UNIT_NUM 2
|
||||
|
||||
#elif defined(CONFIG_ARCH_MPC8569)
|
||||
#define QE_MURAM_SIZE 0x20000UL
|
||||
#define MAX_QE_RISC 4
|
||||
#define QE_NUM_OF_SNUM 46
|
||||
#define CONFIG_SYS_FSL_SRIO_MAX_PORTS 1
|
||||
#define CONFIG_SYS_FSL_SRIO_OB_WIN_NUM 9
|
||||
#define CONFIG_SYS_FSL_SRIO_IB_WIN_NUM 5
|
||||
#define CONFIG_SYS_FSL_RMU
|
||||
#define CONFIG_SYS_FSL_SRIO_MSG_UNIT_NUM 2
|
||||
|
||||
#elif defined(CONFIG_ARCH_P1010)
|
||||
#define CONFIG_FSL_SDHC_V2_3
|
||||
#define CONFIG_TSECV2
|
||||
|
||||
@@ -68,7 +68,7 @@ typedef struct fsl_i2c_base {
|
||||
u8 res6[0xE8];
|
||||
} fsl_i2c_t;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct fsl_i2c_dev {
|
||||
struct fsl_i2c_base __iomem *base; /* register base */
|
||||
u32 i2c_clk;
|
||||
|
||||
@@ -2204,15 +2204,8 @@ typedef struct ccsr_gur {
|
||||
u32 gpiocr; /* GPIO control */
|
||||
#endif
|
||||
u8 res3[12];
|
||||
#if defined(CONFIG_ARCH_MPC8569)
|
||||
u32 plppar1; /* Platform port pin assignment 1 */
|
||||
u32 plppar2; /* Platform port pin assignment 2 */
|
||||
u32 plpdir1; /* Platform port pin direction 1 */
|
||||
u32 plpdir2; /* Platform port pin direction 2 */
|
||||
#else
|
||||
u32 gpoutdr; /* General-purpose output data */
|
||||
u8 res4[12];
|
||||
#endif
|
||||
u32 gpindr; /* General-purpose input data */
|
||||
u8 res5[12];
|
||||
u32 pmuxcr; /* Alt. function signal multiplex control */
|
||||
@@ -2478,7 +2471,7 @@ typedef struct ccsr_gur {
|
||||
u32 svr; /* System version */
|
||||
u8 res10[8];
|
||||
u32 rstcr; /* Reset control */
|
||||
#if defined(CONFIG_ARCH_MPC8568) || defined(CONFIG_ARCH_MPC8569)
|
||||
#if defined(CONFIG_ARCH_MPC8568)
|
||||
u8 res11a[76];
|
||||
par_io_t qe_par_io[7];
|
||||
u8 res11b[1600];
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/gpio/sandbox-gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/sandbox-pinmux.h>
|
||||
#include <dt-bindings/mux/mux.h>
|
||||
|
||||
@@ -69,6 +70,30 @@
|
||||
};
|
||||
};
|
||||
|
||||
buttons2 {
|
||||
compatible = "adc-keys";
|
||||
io-channels = <&adc 3>;
|
||||
keyup-threshold-microvolt = <3000000>;
|
||||
|
||||
button-up {
|
||||
label = "button3";
|
||||
linux,code = <KEY_F3>;
|
||||
press-threshold-microvolt = <1500000>;
|
||||
};
|
||||
|
||||
button-down {
|
||||
label = "button4";
|
||||
linux,code = <KEY_F4>;
|
||||
press-threshold-microvolt = <1000000>;
|
||||
};
|
||||
|
||||
button-enter {
|
||||
label = "button5";
|
||||
linux,code = <KEY_F5>;
|
||||
press-threshold-microvolt = <500000>;
|
||||
};
|
||||
};
|
||||
|
||||
cros_ec: cros-ec {
|
||||
reg = <0 0>;
|
||||
compatible = "google,cros-ec-sandbox";
|
||||
@@ -350,6 +375,27 @@
|
||||
test5-gpios = <&gpio_a 19>;
|
||||
};
|
||||
|
||||
mmio-bus@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "denx,u-boot-test-bus";
|
||||
dma-ranges = <0x10000000 0x00000000 0x00040000>;
|
||||
|
||||
subnode@0 {
|
||||
compatible = "denx,u-boot-fdt-test";
|
||||
};
|
||||
};
|
||||
|
||||
mmio-bus@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "denx,u-boot-test-bus";
|
||||
|
||||
subnode@0 {
|
||||
compatible = "denx,u-boot-fdt-test";
|
||||
};
|
||||
};
|
||||
|
||||
acpi_test1: acpi-test {
|
||||
compatible = "denx,u-boot-acpi-test";
|
||||
acpi-ssdt-test-data = "ab";
|
||||
@@ -587,8 +633,9 @@
|
||||
i2c-eeprom = <&bootcount_i2c>;
|
||||
};
|
||||
|
||||
adc@0 {
|
||||
adc: adc@0 {
|
||||
compatible = "sandbox,adc";
|
||||
#io-channel-cells = <1>;
|
||||
vdd-supply = <&buck2>;
|
||||
vss-microvolts = <0>;
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ int sandbox_clk_query_requested(struct udevice *dev, int id);
|
||||
* sandbox_clk_test_get - Ask the sandbox clock test device to request its
|
||||
* clocks.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_get(struct udevice *dev);
|
||||
@@ -83,7 +83,7 @@ int sandbox_clk_test_get(struct udevice *dev);
|
||||
* sandbox_clk_test_devm_get - Ask the sandbox clock test device to request its
|
||||
* clocks using the managed API.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_devm_get(struct udevice *dev);
|
||||
@@ -92,7 +92,7 @@ int sandbox_clk_test_devm_get(struct udevice *dev);
|
||||
* sandbox_clk_test_get_bulk - Ask the sandbox clock test device to request its
|
||||
* clocks with the bulk clk API.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_get_bulk(struct udevice *dev);
|
||||
@@ -100,7 +100,7 @@ int sandbox_clk_test_get_bulk(struct udevice *dev);
|
||||
* sandbox_clk_test_get_rate - Ask the sandbox clock test device to query a
|
||||
* clock's rate.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @id: The test device's clock ID to query.
|
||||
* @return: The rate of the clock.
|
||||
*/
|
||||
@@ -118,7 +118,7 @@ ulong sandbox_clk_test_round_rate(struct udevice *dev, int id, ulong rate);
|
||||
* sandbox_clk_test_set_rate - Ask the sandbox clock test device to set a
|
||||
* clock's rate.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @id: The test device's clock ID to configure.
|
||||
* @return: The new rate of the clock.
|
||||
*/
|
||||
@@ -127,7 +127,7 @@ ulong sandbox_clk_test_set_rate(struct udevice *dev, int id, ulong rate);
|
||||
* sandbox_clk_test_enable - Ask the sandbox clock test device to enable a
|
||||
* clock.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @id: The test device's clock ID to configure.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
@@ -136,7 +136,7 @@ int sandbox_clk_test_enable(struct udevice *dev, int id);
|
||||
* sandbox_clk_test_enable_bulk - Ask the sandbox clock test device to enable
|
||||
* all clocks in it's clock bulk struct.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_enable_bulk(struct udevice *dev);
|
||||
@@ -144,7 +144,7 @@ int sandbox_clk_test_enable_bulk(struct udevice *dev);
|
||||
* sandbox_clk_test_disable - Ask the sandbox clock test device to disable a
|
||||
* clock.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @id: The test device's clock ID to configure.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
@@ -153,7 +153,7 @@ int sandbox_clk_test_disable(struct udevice *dev, int id);
|
||||
* sandbox_clk_test_disable_bulk - Ask the sandbox clock test device to disable
|
||||
* all clocks in it's clock bulk struct.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_disable_bulk(struct udevice *dev);
|
||||
@@ -161,7 +161,7 @@ int sandbox_clk_test_disable_bulk(struct udevice *dev);
|
||||
* sandbox_clk_test_free - Ask the sandbox clock test device to free its
|
||||
* clocks.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_free(struct udevice *dev);
|
||||
@@ -169,7 +169,7 @@ int sandbox_clk_test_free(struct udevice *dev);
|
||||
* sandbox_clk_test_release_bulk - Ask the sandbox clock test device to release
|
||||
* all clocks in it's clock bulk struct.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_release_bulk(struct udevice *dev);
|
||||
@@ -177,7 +177,7 @@ int sandbox_clk_test_release_bulk(struct udevice *dev);
|
||||
* sandbox_clk_test_valid - Ask the sandbox clock test device to check its
|
||||
* clocks are valid.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
int sandbox_clk_test_valid(struct udevice *dev);
|
||||
@@ -185,7 +185,7 @@ int sandbox_clk_test_valid(struct udevice *dev);
|
||||
* sandbox_clk_test_valid - Ask the sandbox clock test device to check its
|
||||
* clocks are valid.
|
||||
*
|
||||
* @dev: The sandbox clock test (client) devivce.
|
||||
* @dev: The sandbox clock test (client) device.
|
||||
* @return: 0 if OK, or a negative error code.
|
||||
*/
|
||||
struct clk *sandbox_clk_test_get_devm_clk(struct udevice *dev, int id);
|
||||
|
||||
@@ -64,7 +64,7 @@ int dcu_set_dvi_encoder(struct fb_videomode *videomode)
|
||||
u8 temp;
|
||||
u16 temp1, temp2;
|
||||
u32 temp3;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ int diu_set_dvi_encoder(unsigned int pixclock)
|
||||
u8 temp;
|
||||
|
||||
temp = I2C_DVI_TEST_PATTERN_VAL;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(CONFIG_SYS_I2C_DVI_BUS_NUM,
|
||||
|
||||
@@ -24,7 +24,7 @@ void set_fan_speed(u8 data, int chip_addr)
|
||||
I2C_EMC2305_FAN5};
|
||||
|
||||
for (index = 0; index < NUM_OF_FANS; index++) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
if (i2c_write(chip_addr, Fan[index], 1, &data, 1) != 0) {
|
||||
printf("Error: failed to change fan speed @%x\n",
|
||||
Fan[index]);
|
||||
@@ -48,7 +48,7 @@ void emc2305_init(int chip_addr)
|
||||
u8 data;
|
||||
|
||||
data = I2C_EMC2305_CMD;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
if (i2c_write(chip_addr, I2C_EMC2305_CONF, 1, &data, 1) != 0)
|
||||
printf("Error: failed to configure EMC2305\n");
|
||||
#else
|
||||
|
||||
@@ -63,20 +63,7 @@ int pib_init(void)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PQ_MDS_PIB_ATM)
|
||||
#if defined(CONFIG_TARGET_MPC8569MDS)
|
||||
val8 = 0;
|
||||
i2c_write(0x20, 0x6, 1, &val8, 1);
|
||||
i2c_write(0x20, 0x7, 1, &val8, 1);
|
||||
|
||||
val8 = 0xdf;
|
||||
i2c_write(0x20, 0x2, 1, &val8, 1);
|
||||
val8 = 0xf7;
|
||||
i2c_write(0x20, 0x3, 1, &val8, 1);
|
||||
|
||||
eieio();
|
||||
|
||||
printf("QOC3 ATM card on PMC0\n");
|
||||
#elif defined(CONFIG_TARGET_MPC832XEMDS)
|
||||
#if defined(CONFIG_TARGET_MPC832XEMDS)
|
||||
val8 = 0;
|
||||
i2c_write(0x26, 0x7, 1, &val8, 1);
|
||||
val8 = 0xf7;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifdef CONFIG_SYS_I2C_FPGA_ADDR
|
||||
u8 qixis_read_i2c(unsigned int reg)
|
||||
{
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
return i2c_reg_read(CONFIG_SYS_I2C_FPGA_ADDR, reg);
|
||||
#else
|
||||
struct udevice *dev;
|
||||
@@ -47,7 +47,7 @@ u8 qixis_read_i2c(unsigned int reg)
|
||||
void qixis_write_i2c(unsigned int reg, u8 value)
|
||||
{
|
||||
u8 val = value;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_reg_write(CONFIG_SYS_I2C_FPGA_ADDR, reg, val);
|
||||
#else
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -152,7 +152,7 @@ static int read_eeprom(void)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
unsigned int bus;
|
||||
#endif
|
||||
#endif
|
||||
@@ -161,13 +161,13 @@ static int read_eeprom(void)
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
bus = i2c_get_bus_num();
|
||||
i2c_set_bus_num(CONFIG_SYS_EEPROM_BUS_NUM);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,
|
||||
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
|
||||
(void *)&e, sizeof(e));
|
||||
@@ -186,7 +186,7 @@ static int read_eeprom(void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_set_bus_num(bus);
|
||||
#endif
|
||||
#endif
|
||||
@@ -223,7 +223,7 @@ static int prog_eeprom(void)
|
||||
int i;
|
||||
void *p;
|
||||
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
unsigned int bus;
|
||||
#endif
|
||||
#endif
|
||||
@@ -237,7 +237,7 @@ static int prog_eeprom(void)
|
||||
#endif
|
||||
update_crc();
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
|
||||
bus = i2c_get_bus_num();
|
||||
i2c_set_bus_num(CONFIG_SYS_EEPROM_BUS_NUM);
|
||||
@@ -250,7 +250,7 @@ static int prog_eeprom(void)
|
||||
* complete a given write.
|
||||
*/
|
||||
for (i = 0, p = &e; i < sizeof(e); i += 8, p += 8) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(CONFIG_SYS_I2C_EEPROM_ADDR, i,
|
||||
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
|
||||
p, min((int)(sizeof(e) - i), 8));
|
||||
@@ -279,7 +279,7 @@ static int prog_eeprom(void)
|
||||
/* Verify the write by reading back the EEPROM and comparing */
|
||||
struct eeprom e2;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,
|
||||
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
|
||||
(void *)&e2, sizeof(e2));
|
||||
@@ -302,7 +302,7 @@ static int prog_eeprom(void)
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
#ifdef CONFIG_SYS_EEPROM_BUS_NUM
|
||||
i2c_set_bus_num(bus);
|
||||
#endif
|
||||
@@ -594,7 +594,7 @@ unsigned int get_cpu_board_revision(void)
|
||||
u8 minor; /* 0x05 Board revision, minor */
|
||||
} be;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
|
||||
(void *)&be, sizeof(be));
|
||||
#else
|
||||
|
||||
@@ -65,14 +65,14 @@ static int find_ir_chip_on_i2c(void)
|
||||
u8 byte;
|
||||
int i;
|
||||
const int ir_i2c_addr[] = {0x38, 0x08, 0x09};
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
#endif
|
||||
|
||||
/* Check all the address */
|
||||
for (i = 0; i < (sizeof(ir_i2c_addr)/sizeof(ir_i2c_addr[0])); i++) {
|
||||
i2caddress = ir_i2c_addr[i];
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(i2caddress,
|
||||
IR36021_MFR_ID_OFFSET, 1, (void *)&byte,
|
||||
sizeof(byte));
|
||||
@@ -117,12 +117,12 @@ static int read_voltage_from_INA220(int i2caddress)
|
||||
int i, ret, voltage_read = 0;
|
||||
u16 vol_mon;
|
||||
u8 buf[2];
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NUM_READINGS; i++) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(I2C_VOL_MONITOR_ADDR,
|
||||
I2C_VOL_MONITOR_BUS_V_OFFSET, 1,
|
||||
(void *)&buf, 2);
|
||||
@@ -160,12 +160,12 @@ static int read_voltage_from_IR(int i2caddress)
|
||||
int i, ret, voltage_read = 0;
|
||||
u16 vol_mon;
|
||||
u8 buf;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NUM_READINGS; i++) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(i2caddress,
|
||||
IR36021_LOOP1_VOUT_OFFSET,
|
||||
1, (void *)&buf, 1);
|
||||
@@ -213,7 +213,7 @@ static int read_voltage_from_LTC(int i2caddress)
|
||||
int ret, vcode = 0;
|
||||
u8 chan = PWM_CHANNEL0;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
/* select the PAGE 0 using PMBus commands PAGE for VDD*/
|
||||
ret = i2c_write(I2C_VOL_MONITOR_ADDR,
|
||||
PMBUS_CMD_PAGE, 1, &chan, 1);
|
||||
@@ -229,7 +229,7 @@ static int read_voltage_from_LTC(int i2caddress)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
/*read the output voltage using PMBus command READ_VOUT*/
|
||||
ret = i2c_read(I2C_VOL_MONITOR_ADDR,
|
||||
PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2);
|
||||
@@ -344,7 +344,7 @@ static int set_voltage_to_IR(int i2caddress, int vdd)
|
||||
vid = DIV_ROUND_UP(vdd - 245, 5);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(i2caddress, IR36021_LOOP1_MANUAL_ID_OFFSET,
|
||||
1, (void *)&vid, sizeof(vid));
|
||||
#else
|
||||
@@ -392,7 +392,7 @@ static int set_voltage_to_LTC(int i2caddress, int vdd)
|
||||
vdd & 0xFF, (vdd & 0xFF00) >> 8};
|
||||
|
||||
/* Write the desired voltage code to the regulator */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
/* Check write protect state */
|
||||
ret = i2c_read(I2C_VOL_MONITOR_ADDR,
|
||||
PMBUS_CMD_WRITE_PROTECT, 1,
|
||||
@@ -621,7 +621,7 @@ int adjust_vdd(ulong vdd_override)
|
||||
}
|
||||
|
||||
/* check IR chip work on Intel mode*/
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(i2caddress,
|
||||
IR36021_INTEL_MODE_OOFSET,
|
||||
1, (void *)&buf, 1);
|
||||
@@ -803,7 +803,7 @@ int adjust_vdd(ulong vdd_override)
|
||||
}
|
||||
|
||||
/* check IR chip work on Intel mode*/
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(i2caddress,
|
||||
IR36021_INTEL_MODE_OOFSET,
|
||||
1, (void *)&buf, 1);
|
||||
|
||||
@@ -34,7 +34,7 @@ int vsc_if_enable(unsigned int vsc_addr)
|
||||
|
||||
/* enable 2-wire Serial InterFace (I2C) */
|
||||
data = 0x02;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
int ret, bus_num = 0;
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -62,7 +62,7 @@ int vsc3316_config(unsigned int vsc_addr, int8_t con_arr[][2],
|
||||
debug("VSC:Initializing VSC3316 at I2C address 0x%2x"
|
||||
" for Tx\n", vsc_addr);
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
int bus_num = 0;
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -185,7 +185,7 @@ int vsc3308_config_adjust(unsigned int vsc_addr, const int8_t con_arr[][2],
|
||||
debug("VSC:Initializing VSC3308 at I2C address 0x%x for Tx\n",
|
||||
vsc_addr);
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
int bus_num = 0;
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -385,7 +385,7 @@ int vsc3308_config(unsigned int vsc_addr, const int8_t con_arr[][2],
|
||||
|
||||
debug("VSC:Initializing VSC3308 at I2C address 0x%x"
|
||||
" for Tx\n", vsc_addr);
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
int bus_num = 0;
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -509,7 +509,7 @@ void vsc_wp_config(unsigned int vsc_addr)
|
||||
|
||||
/* For new crosspoint configuration to occur, WP bit of
|
||||
* CORE_CONFIG_REG should be set 1 and then reset to 0 */
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
int ret, bus_num = 0;
|
||||
struct udevice *dev;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ int misc_init_r(void)
|
||||
u8 mux_sdhc_cd = 0x80;
|
||||
int bus_num = 0;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static inline void ls1012ardb_reset_phy(void)
|
||||
{
|
||||
#ifdef CONFIG_TARGET_LS1012ARDB
|
||||
/* Through reset IO expander reset both RGMII and SGMII PHYs */
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ int checkboard(void)
|
||||
puts("Board: LS1012ARDB ");
|
||||
|
||||
/* Initialize i2c early for Serial flash bank information */
|
||||
#if defined(CONFIG_DM_I2C)
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_IO_ADDR,
|
||||
@@ -195,7 +195,7 @@ int esdhc_status_fixup(void *blob, const char *compat)
|
||||
u8 io = 0;
|
||||
int ret, bus_num = 0;
|
||||
|
||||
#if defined(CONFIG_DM_I2C)
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_IO_ADDR,
|
||||
@@ -234,7 +234,7 @@ int esdhc_status_fixup(void *blob, const char *compat)
|
||||
* 10 - eMMC Memory
|
||||
* 11 - SPI
|
||||
*/
|
||||
#if defined(CONFIG_DM_I2C)
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = dm_i2c_read(dev, I2C_MUX_IO_0, &io, 1);
|
||||
#else
|
||||
ret = i2c_read(I2C_MUX_IO_ADDR, I2C_MUX_IO_0, 1, &io, 1);
|
||||
@@ -273,7 +273,7 @@ static int switch_to_bank1(void)
|
||||
u8 data = 0xf4, chip_addr = 0x24, offset_addr = 0x03;
|
||||
int ret, bus_num = 0;
|
||||
|
||||
#if defined(CONFIG_DM_I2C)
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, chip_addr,
|
||||
@@ -338,7 +338,7 @@ static int switch_to_bank2(void)
|
||||
u8 chip_addr = 0x24;
|
||||
int ret, i, bus_num = 0;
|
||||
|
||||
#if defined(CONFIG_DM_I2C)
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, chip_addr,
|
||||
@@ -361,7 +361,7 @@ static int switch_to_bank2(void)
|
||||
* CS routed to SPI memory bank2
|
||||
*/
|
||||
for (i = 0; i < sizeof(data); i++) {
|
||||
#if defined(CONFIG_DM_I2C)
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = dm_i2c_write(dev, offset_addr[i], &data[i], 1);
|
||||
#else /* Non DM I2C support - will be removed */
|
||||
ret = i2c_write(chip_addr, offset_addr[i], 1, &data[i], 1);
|
||||
|
||||
@@ -20,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
static int select_i2c_ch_pca9547(u8 ch, int bus_num)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI,
|
||||
@@ -65,7 +65,7 @@ int platform_dcu_init(struct fb_info *fbinfo,
|
||||
u8 ch;
|
||||
|
||||
/* Mux I2C3+I2C4 as HSYNC+VSYNC */
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
/* QIXIS device mount on I2C1 bus*/
|
||||
@@ -113,7 +113,7 @@ int platform_dcu_init(struct fb_info *fbinfo,
|
||||
pixval = 1000000000 / dcu_fb_videomode->pixclock;
|
||||
pixval *= 1000;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_set_bus_num(CONFIG_SYS_I2C_DVI_BUS_NUM);
|
||||
#endif
|
||||
select_i2c_ch_pca9547(I2C_MUX_CH_CH7301,
|
||||
|
||||
@@ -144,7 +144,7 @@ unsigned long get_board_ddr_clk(void)
|
||||
int select_i2c_ch_pca9547(u8 ch, int bus_num)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI,
|
||||
|
||||
@@ -458,7 +458,7 @@ void ls1twr_program_regulator(void)
|
||||
#define MC34VR500_ADDR 0x8
|
||||
#define MC34VR500_DEVICEID 0x4
|
||||
#define MC34VR500_DEVICEID_MASK 0x0f
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ int board_init(void)
|
||||
#if defined(CONFIG_TARGET_LS1028ARDB)
|
||||
u8 val = I2C_MUX_CH_DEFAULT;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_MUX_PCA_ADDR_PRI, 0x0b, 1, &val, 1);
|
||||
#else
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -283,7 +283,7 @@ int select_i2c_ch_pca9547(u8 ch, int bus_num)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI,
|
||||
@@ -338,7 +338,7 @@ void board_retimer_init(void)
|
||||
/* Retimer is connected to I2C1_CH7_CH5 */
|
||||
select_i2c_ch_pca9547(I2C_MUX_CH7, bus_num);
|
||||
reg = I2C_MUX_CH5;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ int select_i2c_ch_pca9547(u8 ch, int bus_num)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI,
|
||||
|
||||
@@ -279,7 +279,7 @@ u32 get_lpuart_clk(void)
|
||||
int select_i2c_ch_pca9547(u8 ch, int bus_num)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI,
|
||||
|
||||
@@ -114,12 +114,12 @@ static void sgmii_configure_repeater(int dpmac)
|
||||
{0x18, NULL}, {0x23, ®_val[3]},
|
||||
{0x2d, ®_val[4]}, {4, ®_val[5]},
|
||||
};
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *udev;
|
||||
#endif
|
||||
|
||||
/* Set I2c to Slot 1 */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(0x77, 0, 0, &a, 1);
|
||||
#else
|
||||
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
|
||||
@@ -173,7 +173,7 @@ static void sgmii_configure_repeater(int dpmac)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_get_chip_for_busnum(0, i2c_phy_addr, 1, &udev);
|
||||
#endif
|
||||
|
||||
@@ -184,7 +184,7 @@ static void sgmii_configure_repeater(int dpmac)
|
||||
reg_pair[5].val = &ch_b_eq[i];
|
||||
reg_pair[6].val = &ch_b_ctl2[j];
|
||||
for (k = 0; k < 10; k++) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(i2c_phy_addr,
|
||||
reg_pair[k].addr,
|
||||
1, reg_pair[k].val, 1);
|
||||
@@ -257,12 +257,12 @@ static void qsgmii_configure_repeater(int dpmac)
|
||||
const char *dev = mdio_names[EMI1_SLOT1];
|
||||
int ret = 0;
|
||||
unsigned short value;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *udev;
|
||||
#endif
|
||||
|
||||
/* Set I2c to Slot 1 */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(0x77, 0, 0, &a, 1);
|
||||
#else
|
||||
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
|
||||
@@ -304,7 +304,7 @@ static void qsgmii_configure_repeater(int dpmac)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_get_chip_for_busnum(0, i2c_phy_addr, 1, &udev);
|
||||
#endif
|
||||
|
||||
@@ -316,7 +316,7 @@ static void qsgmii_configure_repeater(int dpmac)
|
||||
reg_pair[6].val = &ch_b_ctl2[j];
|
||||
|
||||
for (k = 0; k < 10; k++) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(i2c_phy_addr,
|
||||
reg_pair[k].addr,
|
||||
1, reg_pair[k].val, 1);
|
||||
|
||||
@@ -379,7 +379,7 @@ int select_i2c_ch_pca9547(u8 ch)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
|
||||
#else
|
||||
struct udevice *dev;
|
||||
@@ -406,7 +406,7 @@ void board_retimer_init(void)
|
||||
|
||||
/* Access to Control/Shared register */
|
||||
reg = 0x0;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1);
|
||||
#else
|
||||
struct udevice *dev;
|
||||
@@ -416,7 +416,7 @@ void board_retimer_init(void)
|
||||
#endif
|
||||
|
||||
/* Read device revision and ID */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_read(I2C_RETIMER_ADDR, 1, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_read(dev, 1, ®, 1);
|
||||
@@ -425,20 +425,20 @@ void board_retimer_init(void)
|
||||
|
||||
/* Enable Broadcast. All writes target all channel register sets */
|
||||
reg = 0x0c;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0xff, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0xff, ®, 1);
|
||||
#endif
|
||||
|
||||
/* Reset Channel Registers */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_read(I2C_RETIMER_ADDR, 0, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_read(dev, 0, ®, 1);
|
||||
#endif
|
||||
reg |= 0x4;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0, ®, 1);
|
||||
@@ -446,45 +446,45 @@ void board_retimer_init(void)
|
||||
|
||||
/* Set data rate as 10.3125 Gbps */
|
||||
reg = 0x90;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0x60, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x60, ®, 1);
|
||||
#endif
|
||||
reg = 0xb3;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0x61, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x61, ®, 1);
|
||||
#endif
|
||||
reg = 0x90;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0x62, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x62, ®, 1);
|
||||
#endif
|
||||
reg = 0xb3;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0x63, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x63, ®, 1);
|
||||
#endif
|
||||
reg = 0xcd;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0x64, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x64, ®, 1);
|
||||
#endif
|
||||
|
||||
/* Select VCO Divider to full rate (000) */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_read(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_read(dev, 0x2F, ®, 1);
|
||||
#endif
|
||||
reg &= 0x0f;
|
||||
reg |= 0x70;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR, 0x2F, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x2F, ®, 1);
|
||||
@@ -496,7 +496,7 @@ void board_retimer_init(void)
|
||||
|
||||
/* Access to Control/Shared register */
|
||||
reg = 0x0;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1);
|
||||
#else
|
||||
i2c_get_chip_for_busnum(0, I2C_RETIMER_ADDR2, 1, &dev);
|
||||
@@ -504,7 +504,7 @@ void board_retimer_init(void)
|
||||
#endif
|
||||
|
||||
/* Read device revision and ID */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_read(I2C_RETIMER_ADDR2, 1, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_read(dev, 1, ®, 1);
|
||||
@@ -513,20 +513,20 @@ void board_retimer_init(void)
|
||||
|
||||
/* Enable Broadcast. All writes target all channel register sets */
|
||||
reg = 0x0c;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0xff, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0xff, ®, 1);
|
||||
#endif
|
||||
|
||||
/* Reset Channel Registers */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_read(I2C_RETIMER_ADDR2, 0, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_read(dev, 0, ®, 1);
|
||||
#endif
|
||||
reg |= 0x4;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0, ®, 1);
|
||||
@@ -534,45 +534,45 @@ void board_retimer_init(void)
|
||||
|
||||
/* Set data rate as 10.3125 Gbps */
|
||||
reg = 0x90;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0x60, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x60, ®, 1);
|
||||
#endif
|
||||
reg = 0xb3;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0x61, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x61, ®, 1);
|
||||
#endif
|
||||
reg = 0x90;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0x62, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x62, ®, 1);
|
||||
#endif
|
||||
reg = 0xb3;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0x63, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x63, ®, 1);
|
||||
#endif
|
||||
reg = 0xcd;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0x64, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x64, ®, 1);
|
||||
#endif
|
||||
|
||||
/* Select VCO Divider to full rate (000) */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_read(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_read(dev, 0x2F, ®, 1);
|
||||
#endif
|
||||
reg &= 0x0f;
|
||||
reg |= 0x70;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
i2c_write(I2C_RETIMER_ADDR2, 0x2F, 1, ®, 1);
|
||||
#else
|
||||
dm_i2c_write(dev, 0x2F, ®, 1);
|
||||
@@ -640,7 +640,7 @@ int get_serdes_volt(void)
|
||||
u8 chan = PWM_CHANNEL0;
|
||||
|
||||
/* Select the PAGE 0 using PMBus commands PAGE for VDD */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(I2C_SVDD_MONITOR_ADDR,
|
||||
PMBUS_CMD_PAGE, 1, &chan, 1);
|
||||
#else
|
||||
@@ -658,7 +658,7 @@ int get_serdes_volt(void)
|
||||
}
|
||||
|
||||
/* Read the output voltage using PMBus command READ_VOUT */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(I2C_SVDD_MONITOR_ADDR,
|
||||
PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2);
|
||||
#else
|
||||
@@ -679,7 +679,7 @@ int set_serdes_volt(int svdd)
|
||||
svdd & 0xFF, (svdd & 0xFF00) >> 8};
|
||||
|
||||
/* Write the desired voltage code to the SVDD regulator */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(I2C_SVDD_MONITOR_ADDR,
|
||||
PMBUS_CMD_PAGE_PLUS_WRITE, 1, (void *)&buff, 5);
|
||||
#else
|
||||
@@ -720,7 +720,7 @@ int set_serdes_volt(int svdd)
|
||||
printf("SVDD changing of RDB\n");
|
||||
|
||||
/* Read the BRDCFG54 via CLPD */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_read(CONFIG_SYS_I2C_FPGA_ADDR,
|
||||
QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1);
|
||||
#else
|
||||
@@ -740,7 +740,7 @@ int set_serdes_volt(int svdd)
|
||||
brdcfg4 = brdcfg4 | 0x08;
|
||||
|
||||
/* Write to the BRDCFG4 */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(CONFIG_SYS_I2C_FPGA_ADDR,
|
||||
QIXIS_BRDCFG4_OFFSET, 1, (void *)&brdcfg4, 1);
|
||||
#else
|
||||
|
||||
@@ -125,12 +125,12 @@ static void sgmii_configure_repeater(int serdes_port)
|
||||
};
|
||||
|
||||
int *riser_phy_addr = &xqsgii_riser_phy_addr[0];
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *udev;
|
||||
#endif
|
||||
|
||||
/* Set I2c to Slot 1 */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(0x77, 0, 0, &a, 1);
|
||||
#else
|
||||
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
|
||||
@@ -151,7 +151,7 @@ static void sgmii_configure_repeater(int serdes_port)
|
||||
mii_bus = 1;
|
||||
dpmac_id = dpmac + 9;
|
||||
a = 0xb;
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(0x76, 0, 0, &a, 1);
|
||||
#else
|
||||
ret = i2c_get_chip_for_busnum(0, 0x76, 1, &udev);
|
||||
@@ -198,7 +198,7 @@ static void sgmii_configure_repeater(int serdes_port)
|
||||
reg_pair[6].val = &ch_b_ctl2[j];
|
||||
|
||||
for (k = 0; k < 10; k++) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(i2c_addr[dpmac],
|
||||
reg_pair[k].addr,
|
||||
1, reg_pair[k].val, 1);
|
||||
@@ -277,12 +277,12 @@ static void qsgmii_configure_repeater(int dpmac)
|
||||
const char *dev = "LS2080A_QDS_MDIO0";
|
||||
int ret = 0;
|
||||
unsigned short value;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *udev;
|
||||
#endif
|
||||
|
||||
/* Set I2c to Slot 1 */
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(0x77, 0, 0, &a, 1);
|
||||
#else
|
||||
ret = i2c_get_chip_for_busnum(0, 0x77, 1, &udev);
|
||||
@@ -347,7 +347,7 @@ static void qsgmii_configure_repeater(int dpmac)
|
||||
reg_pair[6].val = &ch_b_ctl2[j];
|
||||
|
||||
for (k = 0; k < 10; k++) {
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(i2c_phy_addr,
|
||||
reg_pair[k].addr,
|
||||
1, reg_pair[k].val, 1);
|
||||
|
||||
@@ -164,7 +164,7 @@ unsigned long get_board_ddr_clk(void)
|
||||
int select_i2c_ch_pca9547(u8 ch)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(0, I2C_MUX_PCA_ADDR_PRI, 1, &dev);
|
||||
@@ -238,7 +238,7 @@ int board_init(void)
|
||||
select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
|
||||
|
||||
#ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
rtc_enable_32khz_output(0, CONFIG_SYS_I2C_RTC_ADDR);
|
||||
#else
|
||||
rtc_enable_32khz_output();
|
||||
|
||||
@@ -167,7 +167,7 @@ int select_i2c_ch_pca9547(u8 ch)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
|
||||
#else
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -83,7 +83,7 @@ int select_i2c_ch_pca9547(u8 ch)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifndef CONFIG_DM_I2C
|
||||
#if !CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
|
||||
#else
|
||||
struct udevice *dev;
|
||||
|
||||
@@ -139,8 +139,8 @@ int checkboard(void)
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
#ifdef CONFIG_FSL_SERDES
|
||||
immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
|
||||
#ifdef CONFIG_FSL_SERDES
|
||||
u32 spridr = in_be32(&immr->sysconf.spridr);
|
||||
|
||||
/* we check only part num, and don't look for CPU revisions */
|
||||
@@ -167,10 +167,16 @@ int board_early_init_f(void)
|
||||
break;
|
||||
}
|
||||
#endif /* CONFIG_FSL_SERDES */
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
clrsetbits_be32(&immr->sysconf.sicrl, SICRL_USB_B, SICRL_USB_B_SD);
|
||||
clrsetbits_be32(&immr->sysconf.sicrh, SICRH_SPI, SICRH_SPI_SD);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
#if !(CONFIG_IS_ENABLED(DM_MMC))
|
||||
int board_mmc_init(struct bd_info *bd)
|
||||
{
|
||||
struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
|
||||
@@ -189,6 +195,7 @@ int board_mmc_init(struct bd_info *bd)
|
||||
return fsl_esdhc_mmc_init(bd);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Miscellaneous late-boot configurations
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
if TARGET_MPC8569MDS
|
||||
|
||||
config SYS_BOARD
|
||||
default "mpc8569mds"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "freescale"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "MPC8569MDS"
|
||||
|
||||
endif
|
||||
@@ -1,7 +0,0 @@
|
||||
MPC8569MDS BOARD
|
||||
M: Priyanka Jain <priyanka.jain@nxp.com>
|
||||
S: Maintained
|
||||
F: board/freescale/mpc8569mds/
|
||||
F: include/configs/MPC8569MDS.h
|
||||
F: configs/MPC8569MDS_defconfig
|
||||
F: configs/MPC8569MDS_ATM_defconfig
|
||||
@@ -1,11 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright 2004-2009 Freescale Semiconductor.
|
||||
# (C) Copyright 2001-2006
|
||||
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
|
||||
obj-y += mpc8569mds.o
|
||||
obj-y += bcsr.o
|
||||
obj-y += ddr.o
|
||||
obj-y += law.o
|
||||
obj-y += tlb.o
|
||||
@@ -1,77 +0,0 @@
|
||||
Overview
|
||||
--------
|
||||
MPC8569MDS is composed of two boards - PB (Processor Board) and PIB (Platform
|
||||
I/O Board). The mpc8569 PowerTM processor is mounted on PB board.
|
||||
|
||||
Building U-Boot
|
||||
-----------
|
||||
make MPC8569MDS_config
|
||||
make
|
||||
|
||||
Memory Map
|
||||
----------
|
||||
0x0000_0000 0x7fff_ffff DDR 2G
|
||||
0xa000_0000 0xbfff_ffff PCIe MEM 512MB
|
||||
0xe000_0000 0xe00f_ffff CCSRBAR 1M
|
||||
0xe280_0000 0xe2ff_ffff PCIe I/O 8M
|
||||
0xc000_0000 0xdfff_ffff SRIO 512MB
|
||||
0xf000_0000 0xf3ff_ffff SDRAM 64MB
|
||||
0xf800_0000 0xf800_7fff BCSR 32KB
|
||||
0xf800_8000 0xf800_ffff PIB (CS4) 32KB
|
||||
0xf801_0000 0xf801_7fff PIB (CS5) 32KB
|
||||
0xfe00_0000 0xffff_ffff Flash 32MB
|
||||
|
||||
|
||||
Flashing U-Boot Images
|
||||
---------------
|
||||
|
||||
Use the following commands to program U-Boot image into flash:
|
||||
|
||||
=> tftp 1000000 u-boot.bin
|
||||
=> protect off all
|
||||
=> erase fff80000 ffffffff
|
||||
=> cp.b 1000000 fff80000 80000
|
||||
|
||||
|
||||
Setting the correct MAC addresses
|
||||
-----------------------
|
||||
The command - "mac", is introduced to set on-board system EEPROM in the format
|
||||
defined in board/freescale/common/sys_eeprom.c. we must set all 8 MAC
|
||||
addresses for the MPC8569MDS's 8 Ethernet ports and save it by "mac save" when
|
||||
we first get the board. The commands are as follows:
|
||||
=> mac i NXID /* Set NXID to this EEPROM */
|
||||
=> mac e 01 /* Set Errata, this value is not defined by hardware
|
||||
designer, we can set whatever we want */
|
||||
=> mac n a0 /* Set Serial Number. This is not defined by hardware
|
||||
designer, we can set whatever we want */
|
||||
=> mac date 090512080000 /* Set the date in YYMMDDhhmmss format */
|
||||
|
||||
=> mac p 8 /* Set the number of mac ports, it should be 8 */
|
||||
=> mac 0 xx:xx:xx:xx:xx:xx /* xx:xx:xx:xx:xx:xx should be the real mac
|
||||
address, you can refer to the value on
|
||||
the sticker of the rear side of the board
|
||||
*/
|
||||
.....
|
||||
=> mac 7 xx:xx:xx:xx:xx:xx
|
||||
=> mac read
|
||||
=> mac save
|
||||
|
||||
After resetting the board, the ethxaddrs will be filled with the mac addresses
|
||||
if such environment variables are blank(never been set before). If the ethxaddr
|
||||
has been set but we want to update it, we can use the following commands:
|
||||
=> setenv ethxaddr /* x = "none",1,2,3,4,5,6,7 */
|
||||
=> save
|
||||
=> reset
|
||||
|
||||
|
||||
Programming the ucode to flash
|
||||
---------------------------------
|
||||
MPC8569 doesn't have ROM in QE, so we must upload the microcode(ucode) to QE's
|
||||
IRAM so that the QE can work. The ucode binary can be downloaded from
|
||||
http://opensource.freescale.com/firmware/, and it must be programmed to
|
||||
the address 0xfff0000 in the flash. Otherwise, the QE can't work and uboot
|
||||
hangs at "Net:"
|
||||
|
||||
|
||||
Please note the above two steps(setting mac addresses and programming ucode) are
|
||||
very important to get the board booting up and working properly.
|
||||
@@ -1,50 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2009 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <flash.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
#include "bcsr.h"
|
||||
|
||||
void enable_8569mds_flash_write(void)
|
||||
{
|
||||
setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 17), BCSR17_FLASH_nWP);
|
||||
}
|
||||
|
||||
void disable_8569mds_flash_write(void)
|
||||
{
|
||||
clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 17), BCSR17_FLASH_nWP);
|
||||
}
|
||||
|
||||
void enable_8569mds_qe_uec(void)
|
||||
{
|
||||
#if defined(CONFIG_SYS_UCC_RGMII_MODE)
|
||||
setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 7),
|
||||
BCSR7_UCC1_GETH_EN | BCSR7_UCC1_RGMII_EN);
|
||||
setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 8),
|
||||
BCSR8_UCC2_GETH_EN | BCSR8_UCC2_RGMII_EN);
|
||||
setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 9),
|
||||
BCSR9_UCC3_GETH_EN | BCSR9_UCC3_RGMII_EN);
|
||||
setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 10),
|
||||
BCSR10_UCC4_GETH_EN | BCSR10_UCC4_RGMII_EN);
|
||||
#elif defined(CONFIG_SYS_UCC_RMII_MODE)
|
||||
/* Set UCC1-4 working at RMII mode */
|
||||
clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 7),
|
||||
BCSR7_UCC1_GETH_EN | BCSR7_UCC1_RGMII_EN);
|
||||
clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 8),
|
||||
BCSR8_UCC2_GETH_EN | BCSR8_UCC2_RGMII_EN);
|
||||
clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 9),
|
||||
BCSR9_UCC3_GETH_EN | BCSR9_UCC3_RGMII_EN);
|
||||
clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 10),
|
||||
BCSR10_UCC4_GETH_EN | BCSR10_UCC4_RGMII_EN);
|
||||
setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 9), BCSR9_UCC3_RMII_EN);
|
||||
#endif
|
||||
}
|
||||
|
||||
void disable_8569mds_brd_eeprom_write_protect(void)
|
||||
{
|
||||
clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 7), BCSR7_BRD_WRT_PROTECT);
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Copyright (C) 2009 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __BCSR_H_
|
||||
#define __BCSR_H_
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/* BCSR Bit definitions*/
|
||||
/****************************************/
|
||||
/* BCSR defines */
|
||||
/****************************************/
|
||||
#define BCSR6_UPC1_EN 0x80
|
||||
#define BCSR6_UPC1_POS_EN 0x40
|
||||
#define BCSR6_UPC1_ADDR_EN 0x20
|
||||
#define BCSR6_UPC1_DEV2 0x10
|
||||
#define BCSR6_SD_CARD_1BIT 0x08
|
||||
#define BCSR6_SD_CARD_4BITS 0x04
|
||||
#define BCSR6_TDM2G_EN 0x02
|
||||
#define BCSR6_UCC7_RMII_EN 0x01
|
||||
|
||||
#define BCSR7_UCC1_GETH_EN 0x80
|
||||
#define BCSR7_UCC1_RGMII_EN 0x40
|
||||
#define BCSR7_UCC1_RTBI_EN 0x20
|
||||
#define BCSR7_GETHRST_MRVL 0x04
|
||||
#define BCSR7_BRD_WRT_PROTECT 0x02
|
||||
|
||||
#define BCSR8_UCC2_GETH_EN 0x80
|
||||
#define BCSR8_UCC2_RGMII_EN 0x40
|
||||
#define BCSR8_UCC2_RTBI_EN 0x20
|
||||
#define BCSR8_UEM_MARVEL_RESET 0x02
|
||||
|
||||
#define BCSR9_UCC3_GETH_EN 0x80
|
||||
#define BCSR9_UCC3_RGMII_EN 0x40
|
||||
#define BCSR9_UCC3_RTBI_EN 0x20
|
||||
#define BCSR9_UCC3_RMII_EN 0x10
|
||||
#define BCSR9_UCC3_UEM_MICREL 0x01
|
||||
|
||||
#define BCSR10_UCC4_GETH_EN 0x80
|
||||
#define BCSR10_UCC4_RGMII_EN 0x40
|
||||
#define BCSR10_UCC4_RTBI_EN 0x20
|
||||
|
||||
#define BCSR11_LED0 0x40
|
||||
#define BCSR11_LED1 0x20
|
||||
#define BCSR11_LED2 0x10
|
||||
|
||||
#define BCSR12_UCC6_RMII_EN 0x20
|
||||
#define BCSR12_UCC8_RMII_EN 0x20
|
||||
|
||||
#define BCSR15_SMII6_DIS 0x08
|
||||
#define BCSR15_SMII8_DIS 0x04
|
||||
#define BCSR15_QEUART_EN 0x01
|
||||
|
||||
#define BCSR16_UPC1_DEV2 0x02
|
||||
|
||||
#define BCSR17_nUSBEN 0x80
|
||||
#define BCSR17_nUSBLOWSPD 0x40
|
||||
#define BCSR17_USBVCC 0x20
|
||||
#define BCSR17_USBMODE 0x10
|
||||
#define BCSR17_FLASH_nWP 0x01
|
||||
|
||||
/*BCSR Utils functions*/
|
||||
|
||||
void enable_8569mds_flash_write(void);
|
||||
void disable_8569mds_flash_write(void);
|
||||
void enable_8569mds_qe_uec(void);
|
||||
void disable_8569mds_brd_eeprom_write_protect(void);
|
||||
|
||||
#endif /* __BCSR_H_ */
|
||||
@@ -1,63 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Copyright 2009 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#include <fsl_ddr_sdram.h>
|
||||
#include <fsl_ddr_dimm_params.h>
|
||||
|
||||
void fsl_ddr_board_options(memctl_options_t *popts,
|
||||
dimm_params_t *pdimm,
|
||||
unsigned int ctrl_num)
|
||||
{
|
||||
/*
|
||||
* Factors to consider for clock adjust:
|
||||
* - number of chips on bus
|
||||
* - position of slot
|
||||
* - DDR1 vs. DDR2?
|
||||
* - ???
|
||||
*
|
||||
* This needs to be determined on a board-by-board basis.
|
||||
* 0110 3/4 cycle late
|
||||
* 0111 7/8 cycle late
|
||||
*/
|
||||
popts->clk_adjust = 4;
|
||||
|
||||
/*
|
||||
* Factors to consider for CPO:
|
||||
* - frequency
|
||||
* - ddr1 vs. ddr2
|
||||
*/
|
||||
popts->cpo_override = 0xff;
|
||||
|
||||
/*
|
||||
* Factors to consider for write data delay:
|
||||
* - number of DIMMs
|
||||
*
|
||||
* 1 = 1/4 clock delay
|
||||
* 2 = 1/2 clock delay
|
||||
* 3 = 3/4 clock delay
|
||||
* 4 = 1 clock delay
|
||||
* 5 = 5/4 clock delay
|
||||
* 6 = 3/2 clock delay
|
||||
*/
|
||||
popts->write_data_delay = 2;
|
||||
|
||||
/*
|
||||
* Enable half drive strength
|
||||
*/
|
||||
popts->half_strength_driver_enable = 1;
|
||||
|
||||
/* Write leveling override */
|
||||
popts->wrlvl_en = 1;
|
||||
popts->wrlvl_override = 1;
|
||||
popts->wrlvl_sample = 0xa;
|
||||
popts->wrlvl_start = 0x4;
|
||||
|
||||
/* Rtt and Rtt_W override */
|
||||
popts->rtt_override = 1;
|
||||
popts->rtt_override_value = DDR3_RTT_60_OHM;
|
||||
popts->rtt_wr_override_value = 0; /* Rtt_WR= dynamic ODT off */
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2009-2011 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/fsl_law.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
/*
|
||||
* LAW(Local Access Window) configuration:
|
||||
*
|
||||
*0) 0x0000_0000 0x7fff_ffff DDR 2G
|
||||
*1) 0xa000_0000 0xbfff_ffff PCIe MEM 512MB
|
||||
*-) 0xe000_0000 0xe00f_ffff CCSR 1M
|
||||
*2) 0xe280_0000 0xe2ff_ffff PCIe I/O 8M
|
||||
*3) 0xc000_0000 0xdfff_ffff SRIO 512MB
|
||||
*4.a) 0xf000_0000 0xf3ff_ffff SDRAM 64MB
|
||||
*4.b) 0xf800_0000 0xf800_7fff BCSR 32KB
|
||||
*4.c) 0xf800_8000 0xf800_ffff PIB (CS4) 32KB
|
||||
*4.d) 0xf801_0000 0xf801_7fff PIB (CS5) 32KB
|
||||
*4.e) 0xfe00_0000 0xffff_ffff Flash 32MB
|
||||
*
|
||||
*Notes:
|
||||
* CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
|
||||
* If flash is 8M at default position (last 8M), no LAW needed.
|
||||
*
|
||||
*/
|
||||
|
||||
struct law_entry law_table[] = {
|
||||
#ifndef CONFIG_SPD_EEPROM
|
||||
SET_LAW(CONFIG_SYS_DDR_SDRAM_BASE, LAW_SIZE_1G, LAW_TRGT_IF_DDR),
|
||||
#endif
|
||||
SET_LAW(CONFIG_SYS_BCSR_BASE_PHYS, LAW_SIZE_128M, LAW_TRGT_IF_LBC),
|
||||
};
|
||||
|
||||
int num_law_entries = ARRAY_SIZE(law_table);
|
||||
@@ -1,590 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2009-2010 Freescale Semiconductor.
|
||||
*
|
||||
* (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <console.h>
|
||||
#include <flash.h>
|
||||
#include <hwconfig.h>
|
||||
#include <init.h>
|
||||
#include <log.h>
|
||||
#include <pci.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/immap_85xx.h>
|
||||
#include <asm/fsl_pci.h>
|
||||
#include <fsl_ddr_sdram.h>
|
||||
#include <asm/fsl_serdes.h>
|
||||
#include <asm/io.h>
|
||||
#include <spd_sdram.h>
|
||||
#include <i2c.h>
|
||||
#include <ioports.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/libfdt.h>
|
||||
#include <fdt_support.h>
|
||||
#include <fsl_esdhc.h>
|
||||
#include <phy.h>
|
||||
|
||||
#include "bcsr.h"
|
||||
#if defined(CONFIG_PQ_MDS_PIB)
|
||||
#include "../common/pq-mds-pib.h"
|
||||
#endif
|
||||
|
||||
const qe_iop_conf_t qe_iop_conf_tab[] = {
|
||||
/* QE_MUX_MDC */
|
||||
{2, 31, 1, 0, 1}, /* QE_MUX_MDC */
|
||||
|
||||
/* QE_MUX_MDIO */
|
||||
{2, 30, 3, 0, 2}, /* QE_MUX_MDIO */
|
||||
|
||||
#if defined(CONFIG_SYS_UCC_RGMII_MODE)
|
||||
/* UCC_1_RGMII */
|
||||
{2, 11, 2, 0, 1}, /* CLK12 */
|
||||
{0, 0, 1, 0, 3}, /* ENET1_TXD0_SER1_TXD0 */
|
||||
{0, 1, 1, 0, 3}, /* ENET1_TXD1_SER1_TXD1 */
|
||||
{0, 2, 1, 0, 1}, /* ENET1_TXD2_SER1_TXD2 */
|
||||
{0, 3, 1, 0, 2}, /* ENET1_TXD3_SER1_TXD3 */
|
||||
{0, 6, 2, 0, 3}, /* ENET1_RXD0_SER1_RXD0 */
|
||||
{0, 7, 2, 0, 1}, /* ENET1_RXD1_SER1_RXD1 */
|
||||
{0, 8, 2, 0, 2}, /* ENET1_RXD2_SER1_RXD2 */
|
||||
{0, 9, 2, 0, 2}, /* ENET1_RXD3_SER1_RXD3 */
|
||||
{0, 4, 1, 0, 2}, /* ENET1_TX_EN_SER1_RTS_B */
|
||||
{0, 12, 2, 0, 3}, /* ENET1_RX_DV_SER1_CTS_B */
|
||||
{2, 8, 2, 0, 1}, /* ENET1_GRXCLK */
|
||||
{2, 20, 1, 0, 2}, /* ENET1_GTXCLK */
|
||||
|
||||
/* UCC_2_RGMII */
|
||||
{2, 16, 2, 0, 3}, /* CLK17 */
|
||||
{0, 14, 1, 0, 2}, /* ENET2_TXD0_SER2_TXD0 */
|
||||
{0, 15, 1, 0, 2}, /* ENET2_TXD1_SER2_TXD1 */
|
||||
{0, 16, 1, 0, 1}, /* ENET2_TXD2_SER2_TXD2 */
|
||||
{0, 17, 1, 0, 1}, /* ENET2_TXD3_SER2_TXD3 */
|
||||
{0, 20, 2, 0, 2}, /* ENET2_RXD0_SER2_RXD0 */
|
||||
{0, 21, 2, 0, 1}, /* ENET2_RXD1_SER2_RXD1 */
|
||||
{0, 22, 2, 0, 1}, /* ENET2_RXD2_SER2_RXD2 */
|
||||
{0, 23, 2, 0, 1}, /* ENET2_RXD3_SER2_RXD3 */
|
||||
{0, 18, 1, 0, 2}, /* ENET2_TX_EN_SER2_RTS_B */
|
||||
{0, 26, 2, 0, 3}, /* ENET2_RX_DV_SER2_CTS_B */
|
||||
{2, 3, 2, 0, 1}, /* ENET2_GRXCLK */
|
||||
{2, 2, 1, 0, 2}, /* ENET2_GTXCLK */
|
||||
|
||||
/* UCC_3_RGMII */
|
||||
{2, 11, 2, 0, 1}, /* CLK12 */
|
||||
{0, 29, 1, 0, 2}, /* ENET3_TXD0_SER3_TXD0 */
|
||||
{0, 30, 1, 0, 3}, /* ENET3_TXD1_SER3_TXD1 */
|
||||
{0, 31, 1, 0, 2}, /* ENET3_TXD2_SER3_TXD2 */
|
||||
{1, 0, 1, 0, 3}, /* ENET3_TXD3_SER3_TXD3 */
|
||||
{1, 3, 2, 0, 3}, /* ENET3_RXD0_SER3_RXD0 */
|
||||
{1, 4, 2, 0, 1}, /* ENET3_RXD1_SER3_RXD1 */
|
||||
{1, 5, 2, 0, 2}, /* ENET3_RXD2_SER3_RXD2 */
|
||||
{1, 6, 2, 0, 3}, /* ENET3_RXD3_SER3_RXD3 */
|
||||
{1, 1, 1, 0, 1}, /* ENET3_TX_EN_SER3_RTS_B */
|
||||
{1, 9, 2, 0, 3}, /* ENET3_RX_DV_SER3_CTS_B */
|
||||
{2, 9, 2, 0, 2}, /* ENET3_GRXCLK */
|
||||
{2, 25, 1, 0, 2}, /* ENET3_GTXCLK */
|
||||
|
||||
/* UCC_4_RGMII */
|
||||
{2, 16, 2, 0, 3}, /* CLK17 */
|
||||
{1, 12, 1, 0, 2}, /* ENET4_TXD0_SER4_TXD0 */
|
||||
{1, 13, 1, 0, 2}, /* ENET4_TXD1_SER4_TXD1 */
|
||||
{1, 14, 1, 0, 1}, /* ENET4_TXD2_SER4_TXD2 */
|
||||
{1, 15, 1, 0, 2}, /* ENET4_TXD3_SER4_TXD3 */
|
||||
{1, 18, 2, 0, 2}, /* ENET4_RXD0_SER4_RXD0 */
|
||||
{1, 19, 2, 0, 1}, /* ENET4_RXD1_SER4_RXD1 */
|
||||
{1, 20, 2, 0, 1}, /* ENET4_RXD2_SER4_RXD2 */
|
||||
{1, 21, 2, 0, 2}, /* ENET4_RXD3_SER4_RXD3 */
|
||||
{1, 16, 1, 0, 2}, /* ENET4_TX_EN_SER4_RTS_B */
|
||||
{1, 24, 2, 0, 3}, /* ENET4_RX_DV_SER4_CTS_B */
|
||||
{2, 17, 2, 0, 2}, /* ENET4_GRXCLK */
|
||||
{2, 24, 1, 0, 2}, /* ENET4_GTXCLK */
|
||||
|
||||
#elif defined(CONFIG_SYS_UCC_RMII_MODE)
|
||||
/* UCC_1_RMII */
|
||||
{2, 15, 2, 0, 1}, /* CLK16 */
|
||||
{0, 0, 1, 0, 3}, /* ENET1_TXD0_SER1_TXD0 */
|
||||
{0, 1, 1, 0, 3}, /* ENET1_TXD1_SER1_TXD1 */
|
||||
{0, 6, 2, 0, 3}, /* ENET1_RXD0_SER1_RXD0 */
|
||||
{0, 7, 2, 0, 1}, /* ENET1_RXD1_SER1_RXD1 */
|
||||
{0, 4, 1, 0, 2}, /* ENET1_TX_EN_SER1_RTS_B */
|
||||
{0, 12, 2, 0, 3}, /* ENET1_RX_DV_SER1_CTS_B */
|
||||
|
||||
/* UCC_2_RMII */
|
||||
{2, 15, 2, 0, 1}, /* CLK16 */
|
||||
{0, 14, 1, 0, 2}, /* ENET2_TXD0_SER2_TXD0 */
|
||||
{0, 15, 1, 0, 2}, /* ENET2_TXD1_SER2_TXD1 */
|
||||
{0, 20, 2, 0, 2}, /* ENET2_RXD0_SER2_RXD0 */
|
||||
{0, 21, 2, 0, 1}, /* ENET2_RXD1_SER2_RXD1 */
|
||||
{0, 18, 1, 0, 2}, /* ENET2_TX_EN_SER2_RTS_B */
|
||||
{0, 26, 2, 0, 3}, /* ENET2_RX_DV_SER2_CTS_B */
|
||||
|
||||
/* UCC_3_RMII */
|
||||
{2, 15, 2, 0, 1}, /* CLK16 */
|
||||
{0, 29, 1, 0, 2}, /* ENET3_TXD0_SER3_TXD0 */
|
||||
{0, 30, 1, 0, 3}, /* ENET3_TXD1_SER3_TXD1 */
|
||||
{1, 3, 2, 0, 3}, /* ENET3_RXD0_SER3_RXD0 */
|
||||
{1, 4, 2, 0, 1}, /* ENET3_RXD1_SER3_RXD1 */
|
||||
{1, 1, 1, 0, 1}, /* ENET3_TX_EN_SER3_RTS_B */
|
||||
{1, 9, 2, 0, 3}, /* ENET3_RX_DV_SER3_CTS_B */
|
||||
|
||||
/* UCC_4_RMII */
|
||||
{2, 15, 2, 0, 1}, /* CLK16 */
|
||||
{1, 12, 1, 0, 2}, /* ENET4_TXD0_SER4_TXD0 */
|
||||
{1, 13, 1, 0, 2}, /* ENET4_TXD1_SER4_TXD1 */
|
||||
{1, 18, 2, 0, 2}, /* ENET4_RXD0_SER4_RXD0 */
|
||||
{1, 19, 2, 0, 1}, /* ENET4_RXD1_SER4_RXD1 */
|
||||
{1, 16, 1, 0, 2}, /* ENET4_TX_EN_SER4_RTS_B */
|
||||
{1, 24, 2, 0, 3}, /* ENET4_RX_DV_SER4_CTS_B */
|
||||
#endif
|
||||
|
||||
/* UART1 is muxed with QE PortF bit [9-12].*/
|
||||
{5, 12, 2, 0, 3}, /* UART1_SIN */
|
||||
{5, 9, 1, 0, 3}, /* UART1_SOUT */
|
||||
{5, 10, 2, 0, 3}, /* UART1_CTS_B */
|
||||
{5, 11, 1, 0, 2}, /* UART1_RTS_B */
|
||||
|
||||
/* QE UART */
|
||||
{0, 19, 1, 0, 2}, /* QEUART_TX */
|
||||
{1, 17, 2, 0, 3}, /* QEUART_RX */
|
||||
{0, 25, 1, 0, 1}, /* QEUART_RTS */
|
||||
{1, 23, 2, 0, 1}, /* QEUART_CTS */
|
||||
|
||||
/* QE USB */
|
||||
{5, 3, 1, 0, 1}, /* USB_OE */
|
||||
{5, 4, 1, 0, 2}, /* USB_TP */
|
||||
{5, 5, 1, 0, 2}, /* USB_TN */
|
||||
{5, 6, 2, 0, 2}, /* USB_RP */
|
||||
{5, 7, 2, 0, 1}, /* USB_RX */
|
||||
{5, 8, 2, 0, 1}, /* USB_RN */
|
||||
{2, 4, 2, 0, 2}, /* CLK5 */
|
||||
|
||||
/* SPI Flash, M25P40 */
|
||||
{4, 27, 3, 0, 1}, /* SPI_MOSI */
|
||||
{4, 28, 3, 0, 1}, /* SPI_MISO */
|
||||
{4, 29, 3, 0, 1}, /* SPI_CLK */
|
||||
{4, 30, 1, 0, 0}, /* SPI_SEL, GPIO */
|
||||
|
||||
{0, 0, 0, 0, QE_IOP_TAB_END} /* END of table */
|
||||
};
|
||||
|
||||
void local_bus_init(void);
|
||||
|
||||
int board_early_init_f (void)
|
||||
{
|
||||
/*
|
||||
* Initialize local bus.
|
||||
*/
|
||||
local_bus_init ();
|
||||
|
||||
enable_8569mds_flash_write();
|
||||
|
||||
#ifdef CONFIG_QE
|
||||
enable_8569mds_qe_uec();
|
||||
#endif
|
||||
|
||||
#if CONFIG_SYS_I2C2_OFFSET
|
||||
/* Enable I2C2 signals instead of SD signals */
|
||||
volatile struct ccsr_gur *gur;
|
||||
gur = (struct ccsr_gur *)(CONFIG_SYS_IMMR + 0xe0000);
|
||||
gur->plppar1 &= ~PLPPAR1_I2C_BIT_MASK;
|
||||
gur->plppar1 |= PLPPAR1_I2C2_VAL;
|
||||
gur->plpdir1 &= ~PLPDIR1_I2C_BIT_MASK;
|
||||
gur->plpdir1 |= PLPDIR1_I2C2_VAL;
|
||||
|
||||
disable_8569mds_brd_eeprom_write_protect();
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_early_init_r(void)
|
||||
{
|
||||
const unsigned int flashbase = CONFIG_SYS_NAND_BASE;
|
||||
const u8 flash_esel = 0;
|
||||
|
||||
/*
|
||||
* Remap Boot flash to caching-inhibited
|
||||
* so that flash can be erased properly.
|
||||
*/
|
||||
|
||||
/* Flush d-cache and invalidate i-cache of any FLASH data */
|
||||
flush_dcache();
|
||||
invalidate_icache();
|
||||
|
||||
/* invalidate existing TLB entry for flash */
|
||||
disable_tlb(flash_esel);
|
||||
|
||||
set_tlb(1, flashbase, CONFIG_SYS_NAND_BASE, /* tlb, epn, rpn */
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, /* perms, wimge */
|
||||
0, flash_esel, /* ts, esel */
|
||||
BOOKE_PAGESZ_64M, 1); /* tsize, iprot */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int checkboard (void)
|
||||
{
|
||||
printf ("Board: 8569 MDS\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_SPD_EEPROM)
|
||||
phys_size_t fixed_sdram(void)
|
||||
{
|
||||
struct ccsr_ddr __iomem *ddr =
|
||||
(struct ccsr_ddr __iomem *)CONFIG_SYS_FSL_DDR_ADDR;
|
||||
uint d_init;
|
||||
|
||||
out_be32(&ddr->cs0_bnds, CONFIG_SYS_DDR_CS0_BNDS);
|
||||
out_be32(&ddr->cs0_config, CONFIG_SYS_DDR_CS0_CONFIG);
|
||||
out_be32(&ddr->timing_cfg_3, CONFIG_SYS_DDR_TIMING_3);
|
||||
out_be32(&ddr->timing_cfg_0, CONFIG_SYS_DDR_TIMING_0);
|
||||
out_be32(&ddr->timing_cfg_1, CONFIG_SYS_DDR_TIMING_1);
|
||||
out_be32(&ddr->timing_cfg_2, CONFIG_SYS_DDR_TIMING_2);
|
||||
out_be32(&ddr->sdram_cfg, CONFIG_SYS_DDR_SDRAM_CFG);
|
||||
out_be32(&ddr->sdram_cfg_2, CONFIG_SYS_DDR_SDRAM_CFG_2);
|
||||
out_be32(&ddr->sdram_mode, CONFIG_SYS_DDR_SDRAM_MODE);
|
||||
out_be32(&ddr->sdram_mode_2, CONFIG_SYS_DDR_SDRAM_MODE_2);
|
||||
out_be32(&ddr->sdram_interval, CONFIG_SYS_DDR_SDRAM_INTERVAL);
|
||||
out_be32(&ddr->sdram_data_init, CONFIG_SYS_DDR_DATA_INIT);
|
||||
out_be32(&ddr->sdram_clk_cntl, CONFIG_SYS_DDR_SDRAM_CLK_CNTL);
|
||||
out_be32(&ddr->timing_cfg_4, CONFIG_SYS_DDR_TIMING_4);
|
||||
out_be32(&ddr->timing_cfg_5, CONFIG_SYS_DDR_TIMING_5);
|
||||
out_be32(&ddr->ddr_zq_cntl, CONFIG_SYS_DDR_ZQ_CNTL);
|
||||
out_be32(&ddr->ddr_wrlvl_cntl, CONFIG_SYS_DDR_WRLVL_CNTL);
|
||||
out_be32(&ddr->sdram_cfg_2, CONFIG_SYS_DDR_SDRAM_CFG_2);
|
||||
#if defined (CONFIG_DDR_ECC)
|
||||
out_be32(&ddr->err_int_en, CONFIG_SYS_DDR_ERR_INT_EN);
|
||||
out_be32(&ddr->err_disable, CONFIG_SYS_DDR_ERR_DIS);
|
||||
out_be32(&ddr->err_sbe, CONFIG_SYS_DDR_SBE);
|
||||
#endif
|
||||
udelay(500);
|
||||
|
||||
out_be32(&ddr->sdram_cfg, CONFIG_SYS_DDR_CONTROL);
|
||||
#if defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
|
||||
d_init = 1;
|
||||
debug("DDR - 1st controller: memory initializing\n");
|
||||
/*
|
||||
* Poll until memory is initialized.
|
||||
* 512 Meg at 400 might hit this 200 times or so.
|
||||
*/
|
||||
while ((ddr->sdram_cfg_2 & (d_init << 4)) != 0) {
|
||||
udelay(1000);
|
||||
}
|
||||
debug("DDR: memory initialized\n\n");
|
||||
udelay(500);
|
||||
#endif
|
||||
return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialize Local Bus
|
||||
*/
|
||||
void
|
||||
local_bus_init(void)
|
||||
{
|
||||
volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
volatile fsl_lbc_t *lbc = LBC_BASE_ADDR;
|
||||
|
||||
uint clkdiv;
|
||||
sys_info_t sysinfo;
|
||||
|
||||
get_sys_info(&sysinfo);
|
||||
clkdiv = (lbc->lcrr & LCRR_CLKDIV) * 2;
|
||||
|
||||
out_be32(&gur->lbiuiplldcr1, 0x00078080);
|
||||
if (clkdiv == 16)
|
||||
out_be32(&gur->lbiuiplldcr0, 0x7c0f1bf0);
|
||||
else if (clkdiv == 8)
|
||||
out_be32(&gur->lbiuiplldcr0, 0x6c0f1bf0);
|
||||
else if (clkdiv == 4)
|
||||
out_be32(&gur->lbiuiplldcr0, 0x5c0f1bf0);
|
||||
|
||||
out_be32(&lbc->lcrr, (u32)in_be32(&lbc->lcrr)| 0x00030000);
|
||||
}
|
||||
|
||||
static void fdt_board_disable_serial(void *blob, struct bd_info *bd,
|
||||
const char *alias)
|
||||
{
|
||||
const char *status = "disabled";
|
||||
int off;
|
||||
int err;
|
||||
|
||||
off = fdt_path_offset(blob, alias);
|
||||
if (off < 0) {
|
||||
printf("WARNING: could not find %s alias: %s.\n", alias,
|
||||
fdt_strerror(off));
|
||||
return;
|
||||
}
|
||||
|
||||
err = fdt_setprop(blob, off, "status", status, strlen(status) + 1);
|
||||
if (err) {
|
||||
printf("WARNING: could not set status for serial0: %s.\n",
|
||||
fdt_strerror(err));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Because of an erratum in prototype boards it is impossible to use eSDHC
|
||||
* without disabling UART0 (which makes it quite easy to 'brick' the board
|
||||
* by simply issung 'setenv hwconfig esdhc', and not able to interact with
|
||||
* U-Boot anylonger).
|
||||
*
|
||||
* So, but default we assume that the board is a prototype, which is a most
|
||||
* safe assumption. There is no way to determine board revision from a
|
||||
* register, so we use hwconfig.
|
||||
*/
|
||||
|
||||
static int prototype_board(void)
|
||||
{
|
||||
if (hwconfig_subarg("board", "rev", NULL))
|
||||
return hwconfig_subarg_cmp("board", "rev", "prototype");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int esdhc_disables_uart0(void)
|
||||
{
|
||||
return prototype_board() ||
|
||||
hwconfig_subarg_cmp("esdhc", "mode", "4-bits");
|
||||
}
|
||||
|
||||
static void fdt_board_fixup_qe_uart(void *blob, struct bd_info *bd)
|
||||
{
|
||||
u8 *bcsr = (u8 *)CONFIG_SYS_BCSR_BASE;
|
||||
const char *devtype = "serial";
|
||||
const char *compat = "ucc_uart";
|
||||
const char *clk = "brg9";
|
||||
u32 portnum = 0;
|
||||
int off = -1;
|
||||
|
||||
if (!hwconfig("qe_uart"))
|
||||
return;
|
||||
|
||||
if (hwconfig("esdhc") && esdhc_disables_uart0()) {
|
||||
printf("QE UART: won't enable with esdhc.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
fdt_board_disable_serial(blob, bd, "serial1");
|
||||
|
||||
while (1) {
|
||||
const u32 *idx;
|
||||
int len;
|
||||
|
||||
off = fdt_node_offset_by_compatible(blob, off, "ucc_geth");
|
||||
if (off < 0) {
|
||||
printf("WARNING: unable to fixup device tree for "
|
||||
"QE UART\n");
|
||||
return;
|
||||
}
|
||||
|
||||
idx = fdt_getprop(blob, off, "cell-index", &len);
|
||||
if (!idx || len != sizeof(*idx) || *idx != fdt32_to_cpu(2))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
fdt_setprop(blob, off, "device_type", devtype, strlen(devtype) + 1);
|
||||
fdt_setprop(blob, off, "compatible", compat, strlen(compat) + 1);
|
||||
fdt_setprop(blob, off, "tx-clock-name", clk, strlen(clk) + 1);
|
||||
fdt_setprop(blob, off, "rx-clock-name", clk, strlen(clk) + 1);
|
||||
fdt_setprop(blob, off, "port-number", &portnum, sizeof(portnum));
|
||||
|
||||
setbits_8(&bcsr[15], BCSR15_QEUART_EN);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
|
||||
int board_mmc_init(struct bd_info *bd)
|
||||
{
|
||||
struct ccsr_gur *gur = (struct ccsr_gur *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
|
||||
u8 *bcsr = (u8 *)CONFIG_SYS_BCSR_BASE;
|
||||
u8 bcsr6 = BCSR6_SD_CARD_1BIT;
|
||||
|
||||
if (!hwconfig("esdhc"))
|
||||
return 0;
|
||||
|
||||
printf("Enabling eSDHC...\n"
|
||||
" For eSDHC to function, I2C2 ");
|
||||
if (esdhc_disables_uart0()) {
|
||||
printf("and UART0 should be disabled.\n");
|
||||
printf(" Redirecting stderr, stdout and stdin to UART1...\n");
|
||||
console_assign(stderr, "eserial1");
|
||||
console_assign(stdout, "eserial1");
|
||||
console_assign(stdin, "eserial1");
|
||||
printf("Switched to UART1 (initial log has been printed to "
|
||||
"UART0).\n");
|
||||
|
||||
clrsetbits_be32(&gur->plppar1, PLPPAR1_UART0_BIT_MASK,
|
||||
PLPPAR1_ESDHC_4BITS_VAL);
|
||||
clrsetbits_be32(&gur->plpdir1, PLPDIR1_UART0_BIT_MASK,
|
||||
PLPDIR1_ESDHC_4BITS_VAL);
|
||||
bcsr6 |= BCSR6_SD_CARD_4BITS;
|
||||
} else {
|
||||
printf("should be disabled.\n");
|
||||
}
|
||||
|
||||
/* Assign I2C2 signals to eSDHC. */
|
||||
clrsetbits_be32(&gur->plppar1, PLPPAR1_I2C_BIT_MASK,
|
||||
PLPPAR1_ESDHC_VAL);
|
||||
clrsetbits_be32(&gur->plpdir1, PLPDIR1_I2C_BIT_MASK,
|
||||
PLPDIR1_ESDHC_VAL);
|
||||
|
||||
/* Mux I2C2 (and optionally UART0) signals to eSDHC. */
|
||||
setbits_8(&bcsr[6], bcsr6);
|
||||
|
||||
return fsl_esdhc_mmc_init(bd);
|
||||
}
|
||||
|
||||
static void fdt_board_fixup_esdhc(void *blob, struct bd_info *bd)
|
||||
{
|
||||
const char *status = "disabled";
|
||||
int off = -1;
|
||||
|
||||
if (!hwconfig("esdhc"))
|
||||
return;
|
||||
|
||||
if (esdhc_disables_uart0())
|
||||
fdt_board_disable_serial(blob, bd, "serial0");
|
||||
|
||||
while (1) {
|
||||
const u32 *idx;
|
||||
int len;
|
||||
|
||||
off = fdt_node_offset_by_compatible(blob, off, "fsl-i2c");
|
||||
if (off < 0)
|
||||
break;
|
||||
|
||||
idx = fdt_getprop(blob, off, "cell-index", &len);
|
||||
if (!idx || len != sizeof(*idx))
|
||||
continue;
|
||||
|
||||
if (*idx == 1) {
|
||||
fdt_setprop(blob, off, "status", status,
|
||||
strlen(status) + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwconfig_subarg_cmp("esdhc", "mode", "4-bits")) {
|
||||
off = fdt_node_offset_by_compatible(blob, -1, "fsl,esdhc");
|
||||
if (off < 0) {
|
||||
printf("WARNING: could not find esdhc node\n");
|
||||
return;
|
||||
}
|
||||
fdt_delprop(blob, off, "sdhci,1-bit-only");
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void fdt_board_fixup_esdhc(void *blob, struct bd_info *bd) {}
|
||||
#endif
|
||||
|
||||
static void fdt_board_fixup_qe_usb(void *blob, struct bd_info *bd)
|
||||
{
|
||||
u8 *bcsr = (u8 *)CONFIG_SYS_BCSR_BASE;
|
||||
|
||||
if (hwconfig_subarg_cmp("qe_usb", "speed", "low"))
|
||||
clrbits_8(&bcsr[17], BCSR17_nUSBLOWSPD);
|
||||
else
|
||||
setbits_8(&bcsr[17], BCSR17_nUSBLOWSPD);
|
||||
|
||||
if (hwconfig_subarg_cmp("qe_usb", "mode", "peripheral")) {
|
||||
clrbits_8(&bcsr[17], BCSR17_USBVCC);
|
||||
clrbits_8(&bcsr[17], BCSR17_USBMODE);
|
||||
do_fixup_by_compat(blob, "fsl,mpc8569-qe-usb", "mode",
|
||||
"peripheral", sizeof("peripheral"), 1);
|
||||
} else {
|
||||
setbits_8(&bcsr[17], BCSR17_USBVCC);
|
||||
setbits_8(&bcsr[17], BCSR17_USBMODE);
|
||||
}
|
||||
|
||||
clrbits_8(&bcsr[17], BCSR17_nUSBEN);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
void pci_init_board(void)
|
||||
{
|
||||
#if defined(CONFIG_PQ_MDS_PIB)
|
||||
pib_init();
|
||||
#endif
|
||||
|
||||
fsl_pcie_init_board(0);
|
||||
}
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
#if defined(CONFIG_OF_BOARD_SETUP)
|
||||
int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
{
|
||||
#if defined(CONFIG_SYS_UCC_RMII_MODE)
|
||||
int nodeoff, off, err;
|
||||
unsigned int val;
|
||||
const u32 *ph;
|
||||
const u32 *index;
|
||||
|
||||
/* fixup device tree for supporting rmii mode */
|
||||
nodeoff = -1;
|
||||
while ((nodeoff = fdt_node_offset_by_compatible(blob, nodeoff,
|
||||
"ucc_geth")) >= 0) {
|
||||
err = fdt_setprop_string(blob, nodeoff, "tx-clock-name",
|
||||
"clk16");
|
||||
if (err < 0) {
|
||||
printf("WARNING: could not set tx-clock-name %s.\n",
|
||||
fdt_strerror(err));
|
||||
break;
|
||||
}
|
||||
|
||||
err = fdt_fixup_phy_connection(blob, nodeoff,
|
||||
PHY_INTERFACE_MODE_RMII);
|
||||
|
||||
if (err < 0) {
|
||||
printf("WARNING: could not set phy-connection-type "
|
||||
"%s.\n", fdt_strerror(err));
|
||||
break;
|
||||
}
|
||||
|
||||
index = fdt_getprop(blob, nodeoff, "cell-index", 0);
|
||||
if (index == NULL) {
|
||||
printf("WARNING: could not get cell-index of ucc\n");
|
||||
break;
|
||||
}
|
||||
|
||||
ph = fdt_getprop(blob, nodeoff, "phy-handle", 0);
|
||||
if (ph == NULL) {
|
||||
printf("WARNING: could not get phy-handle of ucc\n");
|
||||
break;
|
||||
}
|
||||
|
||||
off = fdt_node_offset_by_phandle(blob, *ph);
|
||||
if (off < 0) {
|
||||
printf("WARNING: could not get phy node %s.\n",
|
||||
fdt_strerror(err));
|
||||
break;
|
||||
}
|
||||
|
||||
val = 0x7 + *index; /* RMII phy address starts from 0x8 */
|
||||
|
||||
err = fdt_setprop(blob, off, "reg", &val, sizeof(u32));
|
||||
if (err < 0) {
|
||||
printf("WARNING: could not set reg for phy-handle "
|
||||
"%s.\n", fdt_strerror(err));
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ft_cpu_setup(blob, bd);
|
||||
|
||||
FT_FSL_PCI_SETUP;
|
||||
|
||||
fdt_board_fixup_esdhc(blob, bd);
|
||||
fdt_board_fixup_qe_uart(blob, bd);
|
||||
fdt_board_fixup_qe_usb(blob, bd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -1,94 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright 2009-2010 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* (C) Copyright 2000
|
||||
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
struct fsl_e_tlb_entry tlb_table[] = {
|
||||
/* TLB 0 - for temp stack in cache */
|
||||
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, 0,
|
||||
0, 0, BOOKE_PAGESZ_4K, 0),
|
||||
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
|
||||
CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, 0,
|
||||
0, 0, BOOKE_PAGESZ_4K, 0),
|
||||
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
|
||||
CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, 0,
|
||||
0, 0, BOOKE_PAGESZ_4K, 0),
|
||||
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
|
||||
CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, 0,
|
||||
0, 0, BOOKE_PAGESZ_4K, 0),
|
||||
|
||||
/* TLB 1 Initializations */
|
||||
/*
|
||||
* TLBe 0: 64M write-through, guarded
|
||||
* Out of reset this entry is only 4K.
|
||||
* 0xfc000000 32MB NAND FLASH (CS3)
|
||||
* 0xfe000000 32MB NOR FLASH (CS0)
|
||||
*/
|
||||
#ifdef CONFIG_NAND_SPL
|
||||
SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
|
||||
0, 0, BOOKE_PAGESZ_1M, 1),
|
||||
#else
|
||||
SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G,
|
||||
0, 0, BOOKE_PAGESZ_64M, 1),
|
||||
#endif
|
||||
/*
|
||||
* TLBe 1: 256KB Non-cacheable, guarded
|
||||
* 0xf8000000 32K BCSR
|
||||
* 0xf8008000 32K PIB (CS4)
|
||||
* 0xf8010000 32K PIB (CS5)
|
||||
*/
|
||||
SET_TLB_ENTRY(1, CONFIG_SYS_BCSR_BASE, CONFIG_SYS_BCSR_BASE_PHYS,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
|
||||
0, 1, BOOKE_PAGESZ_256K, 1),
|
||||
|
||||
/*
|
||||
* TLBe 2: 256M Non-cacheable, guarded
|
||||
* 0xa00000000 256M PCIe MEM (lower half)
|
||||
*/
|
||||
SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
|
||||
0, 2, BOOKE_PAGESZ_256M, 1),
|
||||
|
||||
/*
|
||||
* TLBe 3: 256M Non-cacheable, guarded
|
||||
* 0xb00000000 256M PCIe MEM (higher half)
|
||||
*/
|
||||
SET_TLB_ENTRY(1, (CONFIG_SYS_PCIE1_MEM_VIRT + 0x10000000),
|
||||
(CONFIG_SYS_PCIE1_MEM_PHYS + 0x10000000),
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
|
||||
0, 3, BOOKE_PAGESZ_256M, 1),
|
||||
|
||||
/*
|
||||
* TLBe 4: 64M Non-cacheable, guarded
|
||||
* 0xe000_0000 1M CCSRBAR
|
||||
* 0xe280_0000 8M PCIe IO
|
||||
*/
|
||||
SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
|
||||
0, 4, BOOKE_PAGESZ_64M, 1),
|
||||
|
||||
#if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L2_ADDR)
|
||||
/* *I*G - L2SRAM */
|
||||
SET_TLB_ENTRY(1, CONFIG_SYS_INIT_L2_ADDR, CONFIG_SYS_INIT_L2_ADDR_PHYS,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
|
||||
0, 5, BOOKE_PAGESZ_256K, 1),
|
||||
SET_TLB_ENTRY(1, CONFIG_SYS_INIT_L2_ADDR + 0x40000,
|
||||
CONFIG_SYS_INIT_L2_ADDR_PHYS + 0x40000,
|
||||
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
|
||||
0, 6, BOOKE_PAGESZ_256K, 1),
|
||||
#endif
|
||||
};
|
||||
|
||||
int num_tlb_entries = ARRAY_SIZE(tlb_table);
|
||||
@@ -1,15 +0,0 @@
|
||||
if TARGET_MX25PDK
|
||||
|
||||
config SYS_BOARD
|
||||
default "mx25pdk"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "freescale"
|
||||
|
||||
config SYS_SOC
|
||||
default "mx25"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "mx25pdk"
|
||||
|
||||
endif
|
||||
@@ -1,6 +0,0 @@
|
||||
MX25PDK BOARD
|
||||
M: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
S: Maintained
|
||||
F: board/freescale/mx25pdk/
|
||||
F: include/configs/mx25pdk.h
|
||||
F: configs/mx25pdk_defconfig
|
||||
@@ -1,7 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
|
||||
#
|
||||
# (C) Copyright 2011 Freescale Semiconductor, Inc.
|
||||
|
||||
obj-y := mx25pdk.o
|
||||
@@ -1,64 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Stefano Babic DENX Software Engineering sbabic@denx.de.
|
||||
*
|
||||
* Refer doc/imx/mkimage/imximage.txt for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
*/
|
||||
|
||||
/*
|
||||
* Boot Device : one of
|
||||
* spi, sd (the board has no nand neither onenand)
|
||||
*/
|
||||
BOOT_FROM sd
|
||||
|
||||
/*
|
||||
* Device Configuration Data (DCD)
|
||||
*
|
||||
* Each entry must have the format:
|
||||
* Addr-type Address Value
|
||||
*
|
||||
* where:
|
||||
* Addr-type register length (1,2 or 4 bytes)
|
||||
* Address absolute address of the register
|
||||
* value value to be stored in the register
|
||||
*/
|
||||
/* EIM config-CS5 init -- CPLD */
|
||||
DATA 4 0xB8002050 0x0000D843
|
||||
DATA 4 0xB8002054 0x22252521
|
||||
DATA 4 0xB8002058 0x22220A00
|
||||
|
||||
/* DDR2 init */
|
||||
DATA 4 0xB8001004 0x0076E83A
|
||||
DATA 4 0xB8001010 0x00000204
|
||||
DATA 4 0xB8001000 0x92210000
|
||||
DATA 4 0x80000f00 0x12344321
|
||||
DATA 4 0xB8001000 0xB2210000
|
||||
DATA 1 0x82000000 0xda
|
||||
DATA 1 0x83000000 0xda
|
||||
DATA 1 0x81000400 0xda
|
||||
DATA 1 0x80000333 0xda
|
||||
|
||||
DATA 4 0xB8001000 0x92210000
|
||||
DATA 1 0x80000400 0x12345678
|
||||
|
||||
DATA 4 0xB8001000 0xA2210000
|
||||
DATA 4 0x80000000 0x87654321
|
||||
DATA 4 0x80000000 0x87654321
|
||||
|
||||
DATA 4 0xB8001000 0xB2210000
|
||||
DATA 1 0x80000233 0xda
|
||||
DATA 1 0x81000780 0xda
|
||||
DATA 1 0x81000400 0xda
|
||||
DATA 4 0xB8001000 0x82216080
|
||||
DATA 4 0x43FAC454 0x00001000
|
||||
|
||||
DATA 4 0x53F80008 0x20034000
|
||||
|
||||
/* Enable the clocks */
|
||||
DATA 4 0x53f8000c 0x1fffffff
|
||||
DATA 4 0x53f80010 0xffffffff
|
||||
DATA 4 0x53f80014 0xfdfff
|
||||
@@ -1,199 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2011 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Author: Fabio Estevam <fabio.estevam@freescale.com>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/gpio.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/iomux-mx25.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <mmc.h>
|
||||
#include <fsl_esdhc_imx.h>
|
||||
#include <i2c.h>
|
||||
#include <linux/delay.h>
|
||||
#include <power/pmic.h>
|
||||
#include <fsl_pmic.h>
|
||||
#include <mc34704.h>
|
||||
|
||||
#define FEC_RESET_B IMX_GPIO_NR(4, 8)
|
||||
#define FEC_ENABLE_B IMX_GPIO_NR(2, 3)
|
||||
#define CARD_DETECT IMX_GPIO_NR(2, 1)
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
struct fsl_esdhc_cfg esdhc_cfg[1] = {
|
||||
{IMX_MMC_SDHC1_BASE},
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FIXME: need to revisit this
|
||||
* The original code enabled PUE and 100-k pull-down without PKE, so the right
|
||||
* value here is likely:
|
||||
* 0 for no pull
|
||||
* or:
|
||||
* PAD_CTL_PUS_100K_DOWN for 100-k pull-down
|
||||
*/
|
||||
#define FEC_OUT_PAD_CTRL 0
|
||||
|
||||
#define I2C_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | \
|
||||
PAD_CTL_ODE)
|
||||
|
||||
static void mx25pdk_fec_init(void)
|
||||
{
|
||||
static const iomux_v3_cfg_t fec_pads[] = {
|
||||
MX25_PAD_FEC_TX_CLK__FEC_TX_CLK,
|
||||
MX25_PAD_FEC_RX_DV__FEC_RX_DV,
|
||||
MX25_PAD_FEC_RDATA0__FEC_RDATA0,
|
||||
NEW_PAD_CTRL(MX25_PAD_FEC_TDATA0__FEC_TDATA0, FEC_OUT_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_FEC_TX_EN__FEC_TX_EN, FEC_OUT_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_FEC_MDC__FEC_MDC, FEC_OUT_PAD_CTRL),
|
||||
MX25_PAD_FEC_MDIO__FEC_MDIO,
|
||||
MX25_PAD_FEC_RDATA1__FEC_RDATA1,
|
||||
NEW_PAD_CTRL(MX25_PAD_FEC_TDATA1__FEC_TDATA1, FEC_OUT_PAD_CTRL),
|
||||
|
||||
NEW_PAD_CTRL(MX25_PAD_D12__GPIO_4_8, 0), /* FEC_RESET_B */
|
||||
NEW_PAD_CTRL(MX25_PAD_A17__GPIO_2_3, 0), /* FEC_ENABLE_B */
|
||||
};
|
||||
|
||||
static const iomux_v3_cfg_t i2c_pads[] = {
|
||||
NEW_PAD_CTRL(MX25_PAD_I2C1_CLK__I2C1_CLK, I2C_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_I2C1_DAT__I2C1_DAT, I2C_PAD_CTRL),
|
||||
};
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
|
||||
|
||||
/* Assert RESET and ENABLE low */
|
||||
gpio_direction_output(FEC_RESET_B, 0);
|
||||
gpio_direction_output(FEC_ENABLE_B, 0);
|
||||
|
||||
udelay(10);
|
||||
|
||||
/* Deassert RESET and ENABLE */
|
||||
gpio_set_value(FEC_RESET_B, 1);
|
||||
gpio_set_value(FEC_ENABLE_B, 1);
|
||||
|
||||
/* Setup I2C pins so that PMIC can turn on PHY supply */
|
||||
imx_iomux_v3_setup_multiple_pads(i2c_pads, ARRAY_SIZE(i2c_pads));
|
||||
}
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
/* dram_init must store complete ramsize in gd->ram_size */
|
||||
gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
|
||||
PHYS_SDRAM_1_SIZE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up input pins with hysteresis and 100-k pull-ups
|
||||
*/
|
||||
#define UART1_IN_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_100K_UP)
|
||||
/*
|
||||
* FIXME: need to revisit this
|
||||
* The original code enabled PUE and 100-k pull-down without PKE, so the right
|
||||
* value here is likely:
|
||||
* 0 for no pull
|
||||
* or:
|
||||
* PAD_CTL_PUS_100K_DOWN for 100-k pull-down
|
||||
*/
|
||||
#define UART1_OUT_PAD_CTRL 0
|
||||
|
||||
static void mx25pdk_uart1_init(void)
|
||||
{
|
||||
static const iomux_v3_cfg_t uart1_pads[] = {
|
||||
NEW_PAD_CTRL(MX25_PAD_UART1_RXD__UART1_RXD, UART1_IN_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_UART1_TXD__UART1_TXD, UART1_OUT_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_UART1_RTS__UART1_RTS, UART1_OUT_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_UART1_CTS__UART1_CTS, UART1_IN_PAD_CTRL),
|
||||
};
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
|
||||
}
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
mx25pdk_uart1_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_late_init(void)
|
||||
{
|
||||
struct pmic *p;
|
||||
int ret;
|
||||
|
||||
mx25pdk_fec_init();
|
||||
|
||||
ret = pmic_init(I2C_0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
p = pmic_get("FSL_PMIC");
|
||||
if (!p)
|
||||
return -ENODEV;
|
||||
|
||||
/* Turn on Ethernet PHY and LCD supplies */
|
||||
pmic_reg_write(p, MC34704_GENERAL2_REG, ONOFFE | ONOFFA);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
int board_mmc_getcd(struct mmc *mmc)
|
||||
{
|
||||
/* Set up the Card Detect pin. */
|
||||
imx_iomux_v3_setup_pad(NEW_PAD_CTRL(MX25_PAD_A15__GPIO_2_1, 0));
|
||||
|
||||
gpio_direction_input(CARD_DETECT);
|
||||
return !gpio_get_value(CARD_DETECT);
|
||||
}
|
||||
|
||||
int board_mmc_init(struct bd_info *bis)
|
||||
{
|
||||
static const iomux_v3_cfg_t sdhc1_pads[] = {
|
||||
NEW_PAD_CTRL(MX25_PAD_SD1_CMD__SD1_CMD, NO_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_SD1_CLK__SD1_CLK, NO_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_SD1_DATA0__SD1_DATA0, NO_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_SD1_DATA1__SD1_DATA1, NO_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_SD1_DATA2__SD1_DATA2, NO_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX25_PAD_SD1_DATA3__SD1_DATA3, NO_PAD_CTRL),
|
||||
};
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(sdhc1_pads, ARRAY_SIZE(sdhc1_pads));
|
||||
|
||||
/*
|
||||
* Set the eSDHC1 PER clock to the maximum frequency lower than or equal
|
||||
* to 50 MHz that can be obtained, which requires to use UPLL as the
|
||||
* clock source. This actually gives 48 MHz.
|
||||
*/
|
||||
imx_set_perclk(MXC_ESDHC1_CLK, true, 50000000);
|
||||
esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC1_CLK);
|
||||
return fsl_esdhc_initialize(bis, &esdhc_cfg[0]);
|
||||
}
|
||||
#endif
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("Board: MX25PDK\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Lowlevel init isn't used on mx25pdk, so just provide a dummy one here */
|
||||
void lowlevel_init(void) {}
|
||||
@@ -1,15 +0,0 @@
|
||||
if TARGET_MX53ARD
|
||||
|
||||
config SYS_BOARD
|
||||
default "mx53ard"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "freescale"
|
||||
|
||||
config SYS_SOC
|
||||
default "mx5"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "mx53ard"
|
||||
|
||||
endif
|
||||
@@ -1,6 +0,0 @@
|
||||
MX53ARD BOARD
|
||||
M: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
S: Maintained
|
||||
F: board/freescale/mx53ard/
|
||||
F: include/configs/mx53ard.h
|
||||
F: configs/mx53ard_defconfig
|
||||
@@ -1,7 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
|
||||
#
|
||||
# (C) Copyright 2011 Freescale Semiconductor, Inc.
|
||||
|
||||
obj-y := mx53ard.o
|
||||
@@ -1,82 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Stefano Babic DENX Software Engineering sbabic@denx.de.
|
||||
*
|
||||
* Refer doc/imx/mkimage/imximage.txt for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
*/
|
||||
|
||||
/* image version */
|
||||
IMAGE_VERSION 2
|
||||
|
||||
/*
|
||||
* Boot Device : one of
|
||||
* spi, sd (the board has no nand neither onenand)
|
||||
*/
|
||||
BOOT_FROM sd
|
||||
|
||||
/*
|
||||
* Device Configuration Data (DCD)
|
||||
*
|
||||
* Each entry must have the format:
|
||||
* Addr-type Address Value
|
||||
*
|
||||
* where:
|
||||
* Addr-type register length (1,2 or 4 bytes)
|
||||
* Address absolute address of the register
|
||||
* value value to be stored in the register
|
||||
*/
|
||||
DATA 4 0x53fa8554 0x00300000
|
||||
DATA 4 0x53fa8558 0x00300040
|
||||
DATA 4 0x53fa8560 0x00300000
|
||||
DATA 4 0x53fa8564 0x00300040
|
||||
DATA 4 0x53fa8568 0x00300040
|
||||
DATA 4 0x53fa8570 0x00300000
|
||||
DATA 4 0x53fa8574 0x00300000
|
||||
DATA 4 0x53fa8578 0x00300000
|
||||
DATA 4 0x53fa857c 0x00300040
|
||||
DATA 4 0x53fa8580 0x00300040
|
||||
DATA 4 0x53fa8584 0x00300000
|
||||
DATA 4 0x53fa8588 0x00300000
|
||||
DATA 4 0x53fa8590 0x00300040
|
||||
DATA 4 0x53fa8594 0x00300000
|
||||
DATA 4 0x53fa86f0 0x00300000
|
||||
DATA 4 0x53fa86f4 0x00000000
|
||||
DATA 4 0x53fa86fc 0x00000000
|
||||
DATA 4 0x53fa8714 0x00000000
|
||||
DATA 4 0x53fa8718 0x00300000
|
||||
DATA 4 0x53fa871c 0x00300000
|
||||
DATA 4 0x53fa8720 0x00300000
|
||||
DATA 4 0x53fa8724 0x04000000
|
||||
DATA 4 0x53fa8728 0x00300000
|
||||
DATA 4 0x53fa872c 0x00300000
|
||||
DATA 4 0x63fd9088 0x35343535
|
||||
DATA 4 0x63fd9090 0x4d444c44
|
||||
DATA 4 0x63fd907c 0x01370138
|
||||
DATA 4 0x63fd9080 0x013b013c
|
||||
DATA 4 0x63fd9018 0x00011740
|
||||
DATA 4 0x63fd9000 0xc3190000
|
||||
DATA 4 0x63fd900c 0x9f5152e3
|
||||
DATA 4 0x63fd9010 0xb68e8a63
|
||||
DATA 4 0x63fd9014 0x01ff00db
|
||||
DATA 4 0x63fd902c 0x000026d2
|
||||
DATA 4 0x63fd9030 0x009f0e21
|
||||
DATA 4 0x63fd9008 0x12273030
|
||||
DATA 4 0x63fd9004 0x0002002d
|
||||
DATA 4 0x63fd901c 0x00008032
|
||||
DATA 4 0x63fd901c 0x00008033
|
||||
DATA 4 0x63fd901c 0x00028031
|
||||
DATA 4 0x63fd901c 0x052080b0
|
||||
DATA 4 0x63fd901c 0x04008040
|
||||
DATA 4 0x63fd901c 0x0000803a
|
||||
DATA 4 0x63fd901c 0x0000803b
|
||||
DATA 4 0x63fd901c 0x00028039
|
||||
DATA 4 0x63fd901c 0x05208138
|
||||
DATA 4 0x63fd901c 0x04008048
|
||||
DATA 4 0x63fd9020 0x00005800
|
||||
DATA 4 0x63fd9040 0x05380003
|
||||
DATA 4 0x63fd9058 0x00022227
|
||||
DATA 4 0x63fd901C 0x00000000
|
||||
@@ -1,319 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2011 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <net.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <asm/arch/crm_regs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/iomux-mx53.h>
|
||||
#include <linux/errno.h>
|
||||
#include <netdev.h>
|
||||
#include <mmc.h>
|
||||
#include <fsl_esdhc_imx.h>
|
||||
#include <asm/gpio.h>
|
||||
|
||||
#define ETHERNET_INT IMX_GPIO_NR(2, 31)
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
u32 size1, size2;
|
||||
|
||||
size1 = get_ram_size((void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
|
||||
size2 = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
|
||||
|
||||
gd->ram_size = size1 + size2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
int dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
|
||||
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NAND_MXC
|
||||
static void setup_iomux_nand(void)
|
||||
{
|
||||
static const iomux_v3_cfg_t nand_pads[] = {
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0,
|
||||
PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_CS1__EMI_NANDF_CS_1,
|
||||
PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0,
|
||||
PAD_CTL_PUS_100K_UP),
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_CLE__EMI_NANDF_CLE,
|
||||
PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_ALE__EMI_NANDF_ALE,
|
||||
PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B,
|
||||
PAD_CTL_PUS_100K_UP),
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B,
|
||||
PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B,
|
||||
PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA7__EMI_NAND_WEIM_DA_7,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
};
|
||||
|
||||
u32 i, reg;
|
||||
|
||||
reg = __raw_readl(M4IF_BASE_ADDR + 0xc);
|
||||
reg &= ~M4IF_GENP_WEIM_MM_MASK;
|
||||
__raw_writel(reg, M4IF_BASE_ADDR + 0xc);
|
||||
for (i = 0x4; i < 0x94; i += 0x18) {
|
||||
reg = __raw_readl(WEIM_BASE_ADDR + i);
|
||||
reg &= ~WEIM_GCR2_MUX16_BYP_GRANT_MASK;
|
||||
__raw_writel(reg, WEIM_BASE_ADDR + i);
|
||||
}
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(nand_pads, ARRAY_SIZE(nand_pads));
|
||||
}
|
||||
#else
|
||||
static void setup_iomux_nand(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#define UART_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
|
||||
PAD_CTL_PUS_100K_UP | PAD_CTL_ODE)
|
||||
|
||||
static void setup_iomux_uart(void)
|
||||
{
|
||||
static const iomux_v3_cfg_t uart_pads[] = {
|
||||
NEW_PAD_CTRL(MX53_PAD_PATA_DMACK__UART1_RXD_MUX, UART_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_PATA_DIOW__UART1_TXD_MUX, UART_PAD_CTRL),
|
||||
};
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
struct fsl_esdhc_cfg esdhc_cfg[2] = {
|
||||
{MMC_SDHC1_BASE_ADDR},
|
||||
{MMC_SDHC2_BASE_ADDR},
|
||||
};
|
||||
|
||||
int board_mmc_getcd(struct mmc *mmc)
|
||||
{
|
||||
struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
|
||||
int ret;
|
||||
|
||||
imx_iomux_v3_setup_pad(MX53_PAD_GPIO_1__GPIO1_1);
|
||||
gpio_direction_input(IMX_GPIO_NR(1, 1));
|
||||
imx_iomux_v3_setup_pad(MX53_PAD_GPIO_4__GPIO1_4);
|
||||
gpio_direction_input(IMX_GPIO_NR(1, 4));
|
||||
|
||||
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
|
||||
ret = !gpio_get_value(IMX_GPIO_NR(1, 1));
|
||||
else
|
||||
ret = !gpio_get_value(IMX_GPIO_NR(1, 4));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define SD_CMD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
|
||||
PAD_CTL_PUS_100K_UP)
|
||||
#define SD_CLK_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_DSE_HIGH)
|
||||
#define SD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_47K_UP | \
|
||||
PAD_CTL_DSE_HIGH)
|
||||
|
||||
int board_mmc_init(struct bd_info *bis)
|
||||
{
|
||||
static const iomux_v3_cfg_t sd1_pads[] = {
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_CMD__ESDHC1_CMD, SD_CMD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_CLK__ESDHC1_CLK, SD_CLK_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA0__ESDHC1_DAT0, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA1__ESDHC1_DAT1, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA2__ESDHC1_DAT2, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA3__ESDHC1_DAT3, SD_PAD_CTRL),
|
||||
};
|
||||
|
||||
static const iomux_v3_cfg_t sd2_pads[] = {
|
||||
NEW_PAD_CTRL(MX53_PAD_SD2_CMD__ESDHC2_CMD, SD_CMD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD2_CLK__ESDHC2_CLK, SD_CLK_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD2_DATA0__ESDHC2_DAT0, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD2_DATA1__ESDHC2_DAT1, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD2_DATA2__ESDHC2_DAT2, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD2_DATA3__ESDHC2_DAT3, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_PATA_DATA12__ESDHC2_DAT4, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_PATA_DATA13__ESDHC2_DAT5, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_PATA_DATA14__ESDHC2_DAT6, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_PATA_DATA15__ESDHC2_DAT7, SD_PAD_CTRL),
|
||||
};
|
||||
|
||||
u32 index;
|
||||
int ret;
|
||||
|
||||
esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
|
||||
esdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
|
||||
|
||||
for (index = 0; index < CONFIG_SYS_FSL_ESDHC_NUM; index++) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
imx_iomux_v3_setup_multiple_pads(sd1_pads,
|
||||
ARRAY_SIZE(sd1_pads));
|
||||
break;
|
||||
case 1:
|
||||
imx_iomux_v3_setup_multiple_pads(sd2_pads,
|
||||
ARRAY_SIZE(sd2_pads));
|
||||
break;
|
||||
default:
|
||||
printf("Warning: you configured more ESDHC controller"
|
||||
"(%d) as supported by the board(2)\n",
|
||||
CONFIG_SYS_FSL_ESDHC_NUM);
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = fsl_esdhc_initialize(bis, &esdhc_cfg[index]);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void weim_smc911x_iomux(void)
|
||||
{
|
||||
static const iomux_v3_cfg_t weim_smc911x_pads[] = {
|
||||
/* Data bus */
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D16__EMI_WEIM_D_16,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D17__EMI_WEIM_D_17,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D18__EMI_WEIM_D_18,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D19__EMI_WEIM_D_19,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D20__EMI_WEIM_D_20,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D21__EMI_WEIM_D_21,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D22__EMI_WEIM_D_22,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D23__EMI_WEIM_D_23,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D24__EMI_WEIM_D_24,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D25__EMI_WEIM_D_25,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D26__EMI_WEIM_D_26,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D27__EMI_WEIM_D_27,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D28__EMI_WEIM_D_28,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D29__EMI_WEIM_D_29,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D30__EMI_WEIM_D_30,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_D31__EMI_WEIM_D_31,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
|
||||
/* Address lines */
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA0__EMI_NAND_WEIM_DA_0,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA1__EMI_NAND_WEIM_DA_1,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA2__EMI_NAND_WEIM_DA_2,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA3__EMI_NAND_WEIM_DA_3,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA4__EMI_NAND_WEIM_DA_4,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA5__EMI_NAND_WEIM_DA_5,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_EIM_DA6__EMI_NAND_WEIM_DA_6,
|
||||
PAD_CTL_PKE | PAD_CTL_DSE_HIGH),
|
||||
|
||||
/* other EIM signals for ethernet */
|
||||
MX53_PAD_EIM_OE__EMI_WEIM_OE,
|
||||
MX53_PAD_EIM_RW__EMI_WEIM_RW,
|
||||
MX53_PAD_EIM_CS1__EMI_WEIM_CS_1,
|
||||
};
|
||||
|
||||
/* ETHERNET_INT as GPIO2_31 */
|
||||
imx_iomux_v3_setup_pad(MX53_PAD_EIM_EB3__GPIO2_31);
|
||||
gpio_direction_input(ETHERNET_INT);
|
||||
|
||||
/* WEIM bus */
|
||||
imx_iomux_v3_setup_multiple_pads(weim_smc911x_pads,
|
||||
ARRAY_SIZE(weim_smc911x_pads));
|
||||
}
|
||||
|
||||
static void weim_cs1_settings(void)
|
||||
{
|
||||
struct weim *weim_regs = (struct weim *)WEIM_BASE_ADDR;
|
||||
|
||||
writel(MX53ARD_CS1GCR1, &weim_regs->cs1gcr1);
|
||||
writel(0x0, &weim_regs->cs1gcr2);
|
||||
writel(MX53ARD_CS1RCR1, &weim_regs->cs1rcr1);
|
||||
writel(MX53ARD_CS1RCR2, &weim_regs->cs1rcr2);
|
||||
writel(MX53ARD_CS1WCR1, &weim_regs->cs1wcr1);
|
||||
writel(0x0, &weim_regs->cs1wcr2);
|
||||
writel(0x0, &weim_regs->wcr);
|
||||
|
||||
set_chipselect_size(CS0_64M_CS1_64M);
|
||||
}
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
setup_iomux_nand();
|
||||
setup_iomux_uart();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_eth_init(struct bd_info *bis)
|
||||
{
|
||||
int rc = -ENODEV;
|
||||
|
||||
weim_smc911x_iomux();
|
||||
weim_cs1_settings();
|
||||
|
||||
#ifdef CONFIG_SMC911X
|
||||
rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("Board: MX53ARD\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
if TARGET_MX53SMD
|
||||
|
||||
config SYS_BOARD
|
||||
default "mx53smd"
|
||||
|
||||
config SYS_VENDOR
|
||||
default "freescale"
|
||||
|
||||
config SYS_SOC
|
||||
default "mx5"
|
||||
|
||||
config SYS_CONFIG_NAME
|
||||
default "mx53smd"
|
||||
|
||||
endif
|
||||
@@ -1,6 +0,0 @@
|
||||
MX53SMD BOARD
|
||||
M: Fabio Estevam <fabio.estevam@nxp.com>
|
||||
S: Maintained
|
||||
F: board/freescale/mx53smd/
|
||||
F: include/configs/mx53smd.h
|
||||
F: configs/mx53smd_defconfig
|
||||
@@ -1,7 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
# Copyright (C) 2007, Guennadi Liakhovetski <lg@denx.de>
|
||||
#
|
||||
# (C) Copyright 2011 Freescale Semiconductor, Inc.
|
||||
|
||||
obj-y := mx53smd.o
|
||||
@@ -1,82 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* (C) Copyright 2009
|
||||
* Stefano Babic DENX Software Engineering sbabic@denx.de.
|
||||
*
|
||||
* Refer doc/imx/mkimage/imximage.txt for more details about how-to configure
|
||||
* and create imximage boot image
|
||||
*
|
||||
* The syntax is taken as close as possible with the kwbimage
|
||||
*/
|
||||
|
||||
/* image version */
|
||||
IMAGE_VERSION 2
|
||||
|
||||
/*
|
||||
* Boot Device : one of
|
||||
* spi, sd (the board has no nand neither onenand)
|
||||
*/
|
||||
BOOT_FROM sd
|
||||
|
||||
/*
|
||||
* Device Configuration Data (DCD)
|
||||
*
|
||||
* Each entry must have the format:
|
||||
* Addr-type Address Value
|
||||
*
|
||||
* where:
|
||||
* Addr-type register length (1,2 or 4 bytes)
|
||||
* Address absolute address of the register
|
||||
* value value to be stored in the register
|
||||
*/
|
||||
DATA 4 0x53fa8554 0x00300000
|
||||
DATA 4 0x53fa8558 0x00300040
|
||||
DATA 4 0x53fa8560 0x00300000
|
||||
DATA 4 0x53fa8564 0x00300040
|
||||
DATA 4 0x53fa8568 0x00300040
|
||||
DATA 4 0x53fa8570 0x00300000
|
||||
DATA 4 0x53fa8574 0x00300000
|
||||
DATA 4 0x53fa8578 0x00300000
|
||||
DATA 4 0x53fa857c 0x00300040
|
||||
DATA 4 0x53fa8580 0x00300040
|
||||
DATA 4 0x53fa8584 0x00300000
|
||||
DATA 4 0x53fa8588 0x00300000
|
||||
DATA 4 0x53fa8590 0x00300040
|
||||
DATA 4 0x53fa8594 0x00300000
|
||||
DATA 4 0x53fa86f0 0x00300000
|
||||
DATA 4 0x53fa86f4 0x00000000
|
||||
DATA 4 0x53fa86fc 0x00000000
|
||||
DATA 4 0x53fa8714 0x00000000
|
||||
DATA 4 0x53fa8718 0x00300000
|
||||
DATA 4 0x53fa871c 0x00300000
|
||||
DATA 4 0x53fa8720 0x00300000
|
||||
DATA 4 0x53fa8724 0x04000000
|
||||
DATA 4 0x53fa8728 0x00300000
|
||||
DATA 4 0x53fa872c 0x00300000
|
||||
DATA 4 0x63fd9088 0x35343535
|
||||
DATA 4 0x63fd9090 0x4d444c44
|
||||
DATA 4 0x63fd907c 0x01370138
|
||||
DATA 4 0x63fd9080 0x013b013c
|
||||
DATA 4 0x63fd9018 0x00011740
|
||||
DATA 4 0x63fd9000 0xc3190000
|
||||
DATA 4 0x63fd900c 0x9f5152e3
|
||||
DATA 4 0x63fd9010 0xb68e8a63
|
||||
DATA 4 0x63fd9014 0x01ff00db
|
||||
DATA 4 0x63fd902c 0x000026d2
|
||||
DATA 4 0x63fd9030 0x009f0e21
|
||||
DATA 4 0x63fd9008 0x12273030
|
||||
DATA 4 0x63fd9004 0x0002002d
|
||||
DATA 4 0x63fd901c 0x00008032
|
||||
DATA 4 0x63fd901c 0x00008033
|
||||
DATA 4 0x63fd901c 0x00028031
|
||||
DATA 4 0x63fd901c 0x052080b0
|
||||
DATA 4 0x63fd901c 0x04008040
|
||||
DATA 4 0x63fd901c 0x0000803a
|
||||
DATA 4 0x63fd901c 0x0000803b
|
||||
DATA 4 0x63fd901c 0x00028039
|
||||
DATA 4 0x63fd901c 0x05208138
|
||||
DATA 4 0x63fd901c 0x04008048
|
||||
DATA 4 0x63fd9020 0x00005800
|
||||
DATA 4 0x63fd9040 0x05380003
|
||||
DATA 4 0x63fd9058 0x00022227
|
||||
DATA 4 0x63fd901C 0x00000000
|
||||
@@ -1,159 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2011 Freescale Semiconductor, Inc.
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <init.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <asm/arch/crm_regs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/iomux-mx53.h>
|
||||
#include <linux/errno.h>
|
||||
#include <netdev.h>
|
||||
#include <mmc.h>
|
||||
#include <fsl_esdhc_imx.h>
|
||||
#include <asm/gpio.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
u32 size1, size2;
|
||||
|
||||
size1 = get_ram_size((void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
|
||||
size2 = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
|
||||
|
||||
gd->ram_size = size1 + size2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
int dram_init_banksize(void)
|
||||
{
|
||||
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
||||
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
||||
|
||||
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
|
||||
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define UART_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
|
||||
PAD_CTL_PUS_100K_UP | PAD_CTL_ODE)
|
||||
|
||||
static void setup_iomux_uart(void)
|
||||
{
|
||||
static const iomux_v3_cfg_t uart_pads[] = {
|
||||
NEW_PAD_CTRL(MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, UART_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, UART_PAD_CTRL),
|
||||
};
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
|
||||
}
|
||||
|
||||
static void setup_iomux_fec(void)
|
||||
{
|
||||
static const iomux_v3_cfg_t fec_pads[] = {
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_MDIO__FEC_MDIO, PAD_CTL_HYS |
|
||||
PAD_CTL_DSE_HIGH | PAD_CTL_PUS_22K_UP | PAD_CTL_ODE),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_MDC__FEC_MDC, PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_RXD1__FEC_RDATA_1,
|
||||
PAD_CTL_HYS | PAD_CTL_PKE),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_RXD0__FEC_RDATA_0,
|
||||
PAD_CTL_HYS | PAD_CTL_PKE),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_TXD1__FEC_TDATA_1, PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_TXD0__FEC_TDATA_0, PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_TX_EN__FEC_TX_EN, PAD_CTL_DSE_HIGH),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_REF_CLK__FEC_TX_CLK,
|
||||
PAD_CTL_HYS | PAD_CTL_PKE),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_RX_ER__FEC_RX_ER,
|
||||
PAD_CTL_HYS | PAD_CTL_PKE),
|
||||
NEW_PAD_CTRL(MX53_PAD_FEC_CRS_DV__FEC_RX_DV,
|
||||
PAD_CTL_HYS | PAD_CTL_PKE),
|
||||
};
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(fec_pads, ARRAY_SIZE(fec_pads));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_ESDHC_IMX
|
||||
struct fsl_esdhc_cfg esdhc_cfg[1] = {
|
||||
{MMC_SDHC1_BASE_ADDR},
|
||||
};
|
||||
|
||||
int board_mmc_getcd(struct mmc *mmc)
|
||||
{
|
||||
imx_iomux_v3_setup_pad(MX53_PAD_EIM_DA13__GPIO3_13);
|
||||
gpio_direction_input(IMX_GPIO_NR(3, 13));
|
||||
return !gpio_get_value(IMX_GPIO_NR(3, 13));
|
||||
}
|
||||
|
||||
#define SD_CMD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
|
||||
PAD_CTL_PUS_100K_UP)
|
||||
#define SD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_47K_UP | \
|
||||
PAD_CTL_DSE_HIGH)
|
||||
|
||||
int board_mmc_init(struct bd_info *bis)
|
||||
{
|
||||
static const iomux_v3_cfg_t sd1_pads[] = {
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_CMD__ESDHC1_CMD, SD_CMD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_CLK__ESDHC1_CLK, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA0__ESDHC1_DAT0, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA1__ESDHC1_DAT1, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA2__ESDHC1_DAT2, SD_PAD_CTRL),
|
||||
NEW_PAD_CTRL(MX53_PAD_SD1_DATA3__ESDHC1_DAT3, SD_PAD_CTRL),
|
||||
MX53_PAD_EIM_DA13__GPIO3_13,
|
||||
};
|
||||
|
||||
u32 index;
|
||||
int ret;
|
||||
|
||||
esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
|
||||
|
||||
for (index = 0; index < CONFIG_SYS_FSL_ESDHC_NUM; index++) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
imx_iomux_v3_setup_multiple_pads(sd1_pads,
|
||||
ARRAY_SIZE(sd1_pads));
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Warning: you configured more ESDHC controller"
|
||||
"(%d) as supported by the board(1)\n",
|
||||
CONFIG_SYS_FSL_ESDHC_NUM);
|
||||
return -EINVAL;
|
||||
}
|
||||
ret = fsl_esdhc_initialize(bis, &esdhc_cfg[index]);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_early_init_f(void)
|
||||
{
|
||||
setup_iomux_uart();
|
||||
setup_iomux_fec();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_init(void)
|
||||
{
|
||||
/* address of boot parameters */
|
||||
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int checkboard(void)
|
||||
{
|
||||
puts("Board: MX53SMD\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ int config_board_mux(int ctrl_type)
|
||||
ccsr_gur_t __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
u8 tmp;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
#if defined(CONFIG_TARGET_P1010RDB_PA)
|
||||
@@ -377,7 +377,7 @@ int i2c_pca9557_read(int type)
|
||||
u8 val;
|
||||
int bus_num = I2C_PCA9557_BUS_NUM;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
@@ -419,7 +419,7 @@ int checkboard(void)
|
||||
printf("Board: %sRDB-PA, ", cpu->name);
|
||||
#elif defined(CONFIG_TARGET_P1010RDB_PB)
|
||||
printf("Board: %sRDB-PB, ", cpu->name);
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
@@ -462,7 +462,7 @@ int checkboard(void)
|
||||
case 0xe:
|
||||
puts("SDHC\n");
|
||||
val = 0x60; /* set pca9557 pin input/output */
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
dm_i2c_write(dev, 3, &val, 1);
|
||||
#else
|
||||
i2c_write(I2C_PCA9557_ADDR2, 3, 1, &val, 1);
|
||||
|
||||
@@ -173,7 +173,7 @@ int checkboard(void)
|
||||
in_8(&cpld_data->pcba_rev) & 0x0F);
|
||||
|
||||
/* Initialize i2c early for rom_loc and flash bank information */
|
||||
#if defined(CONFIG_DM_I2C)
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ static u32 t1023rdb_ctrl(u32 ctrl_type)
|
||||
u8 tmp;
|
||||
int bus_num = I2C_PCA6408_BUS_NUM;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ int select_i2c_ch_pca9547(u8 ch, int bus_num)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *dev;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI, 1, &dev);
|
||||
|
||||
@@ -35,7 +35,7 @@ static int bus_type = -1;
|
||||
static int lcd_id = -1;
|
||||
static unsigned short lcd_fwrev;
|
||||
static int current_brightness = -1;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
static struct udevice *i2c_dev;
|
||||
#endif
|
||||
|
||||
@@ -182,7 +182,7 @@ static int onewire_i2c_do_request(unsigned char req, unsigned char *buf)
|
||||
tx[0] = req;
|
||||
tx[1] = crc8_ow(req << 24, 8);
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
if (dm_i2c_write(i2c_dev, 0, tx, 2))
|
||||
return -EIO;
|
||||
|
||||
@@ -214,7 +214,7 @@ static void onewire_i2c_init(void)
|
||||
unsigned char buf[4];
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
ret = i2c_get_chip_for_busnum(ONEWIRE_I2C_BUS,
|
||||
ONEWIRE_I2C_ADDR, 0, &i2c_dev);
|
||||
#else
|
||||
|
||||
@@ -333,7 +333,7 @@ static int ivm_populate_env(unsigned char *buf, int len, int mac_address_offset)
|
||||
int ivm_read_eeprom(unsigned char *buf, int len, int mac_address_offset)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_DM_I2C
|
||||
#if CONFIG_IS_ENABLED(DM_I2C)
|
||||
struct udevice *eedev = NULL;
|
||||
|
||||
ret = i2c_get_chip_for_busnum(CONFIG_KM_IVM_BUS,
|
||||
|
||||
@@ -157,6 +157,16 @@ static const struct rpi_model rpi_models_new_scheme[] = {
|
||||
DTB_DIR "bcm2711-rpi-4-b.dtb",
|
||||
true,
|
||||
},
|
||||
[0x13] = {
|
||||
"400",
|
||||
DTB_DIR "bcm2711-rpi-400.dtb",
|
||||
true,
|
||||
},
|
||||
[0x14] = {
|
||||
"Compute Module 4",
|
||||
DTB_DIR "bcm2711-rpi-cm4.dtb",
|
||||
true,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct rpi_model rpi_models_old_scheme[] = {
|
||||
@@ -268,6 +278,13 @@ int dram_init(void)
|
||||
|
||||
gd->ram_size = msg->get_arm_mem.body.resp.mem_size;
|
||||
|
||||
/*
|
||||
* In some configurations the memory size returned by VideoCore
|
||||
* is not aligned to the section size, what is mandatory for
|
||||
* the u-boot's memory setup.
|
||||
*/
|
||||
gd->ram_size &= ~MMU_SECTION_SIZE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loaded 100 of 364 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user