mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-05 03:06:41 +03:00
Compare commits
405 Commits
v2016.07-r
...
v2016.07
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19ce924ff9 | ||
|
|
a868598a48 | ||
|
|
969cd1fa6d | ||
|
|
5fb0001a67 | ||
|
|
d73718f323 | ||
|
|
d56dd0b1f8 | ||
|
|
085e64dd42 | ||
|
|
0de02de768 | ||
|
|
59d07ee08e | ||
|
|
a82642f398 | ||
|
|
eb9d3ca356 | ||
|
|
abbaa23f65 | ||
|
|
eb364c3dc2 | ||
|
|
99b8275797 | ||
|
|
246fa47840 | ||
|
|
4c64c4db3b | ||
|
|
e4ead4a21d | ||
|
|
19c9ddaa4f | ||
|
|
66d027e22c | ||
|
|
2307ea4053 | ||
|
|
703aaf76c2 | ||
|
|
8d37483e7c | ||
|
|
ec5507707a | ||
|
|
ce02a71c23 | ||
|
|
862887d883 | ||
|
|
00e9e6d1ff | ||
|
|
f39a6a3277 | ||
|
|
3cfc6be4a8 | ||
|
|
70c440e5bd | ||
|
|
12c67d7522 | ||
|
|
e6e188f562 | ||
|
|
2138fd6d5d | ||
|
|
e8009beff6 | ||
|
|
c7dea6e259 | ||
|
|
7a54f5177a | ||
|
|
8d24176a67 | ||
|
|
d2a6af0528 | ||
|
|
9acebe8a18 | ||
|
|
cd8b35d2e1 | ||
|
|
68f7289b4f | ||
|
|
2f6b47061d | ||
|
|
0e1e587ff4 | ||
|
|
20a41043fb | ||
|
|
d90bb43933 | ||
|
|
df6b506f16 | ||
|
|
4632739202 | ||
|
|
09b9d9e55f | ||
|
|
d8da8298ad | ||
|
|
2fbb8462b0 | ||
|
|
9060970f4d | ||
|
|
ea72ee72f2 | ||
|
|
4aae64c22a | ||
|
|
8dfd6e2129 | ||
|
|
e64a6b1141 | ||
|
|
1013aef330 | ||
|
|
fc9da85c60 | ||
|
|
64c1cc4cc5 | ||
|
|
5e25b9d5d9 | ||
|
|
3379987e26 | ||
|
|
186c133444 | ||
|
|
c4adc50ea6 | ||
|
|
aac641bcf4 | ||
|
|
69da34c073 | ||
|
|
4d1065c8d8 | ||
|
|
4cb9399e9b | ||
|
|
ff6e156966 | ||
|
|
44faff24f5 | ||
|
|
6f0aea39ae | ||
|
|
dee01e426b | ||
|
|
49cdce1635 | ||
|
|
1483151e84 | ||
|
|
84ecdf6da9 | ||
|
|
f53225cce4 | ||
|
|
68aaa980c4 | ||
|
|
581ff00bf7 | ||
|
|
faaef73f7e | ||
|
|
d14739ffe1 | ||
|
|
4a9a329277 | ||
|
|
0abd63b26d | ||
|
|
2c72404687 | ||
|
|
9bc34799c8 | ||
|
|
cc0f08cd34 | ||
|
|
64ece84854 | ||
|
|
ac6e5fed31 | ||
|
|
ca2ec9adc9 | ||
|
|
8e6e8221c7 | ||
|
|
13ee789074 | ||
|
|
ae21e964d8 | ||
|
|
289f979cc9 | ||
|
|
ce9844ce17 | ||
|
|
968ebdf1ef | ||
|
|
2b1cdafa9f | ||
|
|
57de41e9c9 | ||
|
|
429ff4473b | ||
|
|
217d16973d | ||
|
|
4141e85bcd | ||
|
|
fba5f93c71 | ||
|
|
a4d799939f | ||
|
|
2290fe0642 | ||
|
|
8ada4e0ee6 | ||
|
|
77a1a677a6 | ||
|
|
9d7f416ced | ||
|
|
202b84ae59 | ||
|
|
df8b0a0373 | ||
|
|
bd62e2419b | ||
|
|
ec048369e2 | ||
|
|
f1f9d4fac5 | ||
|
|
b88d6f7614 | ||
|
|
62f8183f6a | ||
|
|
6441e3deb4 | ||
|
|
afedf5488d | ||
|
|
a2cfc8d593 | ||
|
|
96044745cb | ||
|
|
5847084f6b | ||
|
|
42ffa51fd4 | ||
|
|
1e23737df8 | ||
|
|
4b3ab59d21 | ||
|
|
4f1318b29c | ||
|
|
f8f9107d97 | ||
|
|
92dfd9221c | ||
|
|
85a2f772c2 | ||
|
|
a2fd238e49 | ||
|
|
f3acaf438d | ||
|
|
61520ac4d5 | ||
|
|
b66a5c03a0 | ||
|
|
fc2661eebe | ||
|
|
96dccd9767 | ||
|
|
f432c33f27 | ||
|
|
5cc42a5184 | ||
|
|
5030159e27 | ||
|
|
69fd0d4131 | ||
|
|
08e64cece2 | ||
|
|
79887749f8 | ||
|
|
dad7b74045 | ||
|
|
9f823615af | ||
|
|
4257f5f8f6 | ||
|
|
3424c3f299 | ||
|
|
7579a3ec8c | ||
|
|
20e3d05370 | ||
|
|
57c2a25572 | ||
|
|
d7d4e5ccd6 | ||
|
|
0f3b894426 | ||
|
|
b56e06d343 | ||
|
|
cbeeb2aebf | ||
|
|
778dc5f43e | ||
|
|
dae08d2281 | ||
|
|
3da9536e8f | ||
|
|
3551b24f53 | ||
|
|
cd38e3d1b4 | ||
|
|
8c7d22965d | ||
|
|
da70b4d141 | ||
|
|
46fd625dfe | ||
|
|
41598c8251 | ||
|
|
2313d48445 | ||
|
|
1a3619cf82 | ||
|
|
333463d669 | ||
|
|
09849f4a77 | ||
|
|
30780f9483 | ||
|
|
caad0d00a8 | ||
|
|
1866be7d28 | ||
|
|
e1c29086d5 | ||
|
|
61717571f2 | ||
|
|
7748b41482 | ||
|
|
4e7d1b3beb | ||
|
|
bb9783b66b | ||
|
|
fa30115878 | ||
|
|
80ef700f8d | ||
|
|
494e108651 | ||
|
|
c4adf9db5d | ||
|
|
135aa95002 | ||
|
|
4581b717b1 | ||
|
|
89c1e2da78 | ||
|
|
0f67e2395b | ||
|
|
769d52ef0f | ||
|
|
21047b31f1 | ||
|
|
6feed2a5ae | ||
|
|
fc76b69873 | ||
|
|
5aeedebc33 | ||
|
|
7c8ef0feb9 | ||
|
|
51ea5a060d | ||
|
|
18c1198667 | ||
|
|
48efc8a25b | ||
|
|
50862a5196 | ||
|
|
9ab165d8b0 | ||
|
|
7a77e909a2 | ||
|
|
7a8f886558 | ||
|
|
6beacfcff8 | ||
|
|
a10a31ec91 | ||
|
|
2372b00129 | ||
|
|
67ef2c133f | ||
|
|
72a868f16e | ||
|
|
0a35cc9395 | ||
|
|
0d7cdc2abf | ||
|
|
288683280f | ||
|
|
85801579e1 | ||
|
|
0fcb85cc0c | ||
|
|
6c51a3644e | ||
|
|
dc557e9a1f | ||
|
|
1e6fb0e367 | ||
|
|
7839f5f809 | ||
|
|
e677724884 | ||
|
|
71423435fb | ||
|
|
e7b35eb2e0 | ||
|
|
ae094f8d55 | ||
|
|
f51c8a99e3 | ||
|
|
1e2a1fb702 | ||
|
|
58c95d5356 | ||
|
|
e17adbb350 | ||
|
|
030cada824 | ||
|
|
8311b3b440 | ||
|
|
7802ce910b | ||
|
|
5e4e87418e | ||
|
|
232d77e723 | ||
|
|
1cb075c6c6 | ||
|
|
ef53b8c4ce | ||
|
|
32fbd46f38 | ||
|
|
92623672f9 | ||
|
|
bf655775f5 | ||
|
|
6fb522dc77 | ||
|
|
1653cd18ee | ||
|
|
f221db0ed5 | ||
|
|
1736121b24 | ||
|
|
cc5cdaad42 | ||
|
|
332dddc6a1 | ||
|
|
5e8f29a082 | ||
|
|
7a0ea589ba | ||
|
|
165bd7a1cc | ||
|
|
9702ec00e9 | ||
|
|
1f68dbc881 | ||
|
|
43486e4cd0 | ||
|
|
1e031249a5 | ||
|
|
f4abfed1de | ||
|
|
fd9102dafe | ||
|
|
fc1e8fbbb2 | ||
|
|
5bea2becf3 | ||
|
|
c7d8db66ff | ||
|
|
a4a43fcf9c | ||
|
|
bd91508b50 | ||
|
|
c1f51e0f3e | ||
|
|
a52142855a | ||
|
|
3865b9ebe7 | ||
|
|
2c15534f6b | ||
|
|
cd51878e34 | ||
|
|
6b96c1a1ca | ||
|
|
06cc1d36d0 | ||
|
|
f2dae751fb | ||
|
|
e307fa9d89 | ||
|
|
6a9f79f712 | ||
|
|
8513dc0485 | ||
|
|
c8e1b10d07 | ||
|
|
5da4f857be | ||
|
|
c1c4d0f056 | ||
|
|
7fb0bacd38 | ||
|
|
4efef998cd | ||
|
|
1d085568b3 | ||
|
|
522e8dcb4c | ||
|
|
1f16992ee9 | ||
|
|
b6ef393ad7 | ||
|
|
b134bc1354 | ||
|
|
cc008299f8 | ||
|
|
c5e60fd495 | ||
|
|
bd63e5baf9 | ||
|
|
90ed6cba51 | ||
|
|
4b430c983a | ||
|
|
ff8725bbe0 | ||
|
|
6ff36d2174 | ||
|
|
e423d17fcc | ||
|
|
c1631c8a04 | ||
|
|
d3b6662086 | ||
|
|
1c24f13f69 | ||
|
|
885fc03aab | ||
|
|
04b9dd10cc | ||
|
|
9dc89a053d | ||
|
|
d63ec26a49 | ||
|
|
88a7fffe38 | ||
|
|
b3ab0fc7dd | ||
|
|
65319f15ca | ||
|
|
5a9ae33316 | ||
|
|
01648f324d | ||
|
|
6f9678567a | ||
|
|
f1dcc19b21 | ||
|
|
f589f8cca6 | ||
|
|
d5555b70e6 | ||
|
|
166c409bc4 | ||
|
|
b4d956f6bc | ||
|
|
b5bd09820c | ||
|
|
9095846655 | ||
|
|
152ac5fabf | ||
|
|
51c14cd128 | ||
|
|
7147a7ebd2 | ||
|
|
666362356e | ||
|
|
1428d83270 | ||
|
|
672a45e828 | ||
|
|
b103350096 | ||
|
|
3fc304b8d7 | ||
|
|
b57129dbda | ||
|
|
9769e05bcf | ||
|
|
d8906c1f3f | ||
|
|
2f29c83eec | ||
|
|
2600ba6de0 | ||
|
|
f7a01e4848 | ||
|
|
58d1fedb1f | ||
|
|
e264e3cc5b | ||
|
|
8142340ee3 | ||
|
|
8a1a7595cf | ||
|
|
a646f66981 | ||
|
|
01de830402 | ||
|
|
74cac00c95 | ||
|
|
453418f2d2 | ||
|
|
95ab851de0 | ||
|
|
b718d37157 | ||
|
|
8c77ef8540 | ||
|
|
82d13340e9 | ||
|
|
916d9f099e | ||
|
|
9d10c2d3fe | ||
|
|
30677deefd | ||
|
|
a758177f9b | ||
|
|
1a83fb4a17 | ||
|
|
5bc88cc2be | ||
|
|
e19b900457 | ||
|
|
4b7b0a0f06 | ||
|
|
a95800e881 | ||
|
|
bca4c3c5fc | ||
|
|
fd2aa39a61 | ||
|
|
1903bb91c4 | ||
|
|
6b3943f1b0 | ||
|
|
9ae63f46a3 | ||
|
|
02b11f1199 | ||
|
|
3a504d9639 | ||
|
|
5d29e27eb9 | ||
|
|
cddfc97d1f | ||
|
|
3c5d51fffc | ||
|
|
d8ccbe93b5 | ||
|
|
3e584b94d2 | ||
|
|
a4475af5b4 | ||
|
|
3d4f628d2f | ||
|
|
a5e27b416f | ||
|
|
496c5483e9 | ||
|
|
694607b563 | ||
|
|
c01bc75e7d | ||
|
|
9c410f7cb7 | ||
|
|
640ff60af7 | ||
|
|
da37f006e7 | ||
|
|
bb597c0eeb | ||
|
|
3191d84080 | ||
|
|
9c2f9b2da6 | ||
|
|
f7e9402b54 | ||
|
|
4565a74d56 | ||
|
|
80630dad9d | ||
|
|
7760b49fa7 | ||
|
|
adb3928f15 | ||
|
|
cf0a8dab8e | ||
|
|
35546f6f20 | ||
|
|
d2ba7a6adc | ||
|
|
f6825e4a44 | ||
|
|
f1249119bf | ||
|
|
aacc10c5be | ||
|
|
c26ffd9b3c | ||
|
|
fc44902a0d | ||
|
|
07aa030a18 | ||
|
|
0c344e6e7a | ||
|
|
9f8fa184fc | ||
|
|
cb82c38eff | ||
|
|
73f366bb5b | ||
|
|
34b080b79c | ||
|
|
385575bcb6 | ||
|
|
fe63fcb6ca | ||
|
|
5c55572ff7 | ||
|
|
f17a9af846 | ||
|
|
83e00f193e | ||
|
|
7853262330 | ||
|
|
ca628b74c9 | ||
|
|
82a17e75da | ||
|
|
efa7ed7236 | ||
|
|
6052b1c6f4 | ||
|
|
1b99103fba | ||
|
|
899f589bcd | ||
|
|
509870958d | ||
|
|
543a4aba7f | ||
|
|
1b7400011e | ||
|
|
4df0bff3ce | ||
|
|
7698cdfddd | ||
|
|
e96b6ee7bd | ||
|
|
e453794f87 | ||
|
|
a0eb8c9b91 | ||
|
|
3c0fd17f61 | ||
|
|
a419352daf | ||
|
|
3061a5766a | ||
|
|
83e1394242 | ||
|
|
3fd9eb6689 | ||
|
|
87f9989502 | ||
|
|
bff7550331 | ||
|
|
9aa550d2e8 | ||
|
|
492d60ac79 | ||
|
|
aff3756104 | ||
|
|
b5437a8082 | ||
|
|
04cb3c0b0e | ||
|
|
e4d79dcaa4 | ||
|
|
27cd0da41e | ||
|
|
003f0c7eb2 | ||
|
|
b949fd2ccb | ||
|
|
dea572379e | ||
|
|
32ff58bb2e | ||
|
|
08ca213aca | ||
|
|
d15a244b05 |
28
Kconfig
28
Kconfig
@@ -53,6 +53,23 @@ config CC_OPTIMIZE_FOR_SIZE
|
||||
|
||||
This option is enabled by default for U-Boot.
|
||||
|
||||
config DISTRO_DEFAULTS
|
||||
bool "Select defaults suitable for booting general purpose Linux distributions"
|
||||
default y if ARCH_SUNXI
|
||||
default n
|
||||
select CMD_BOOTZ
|
||||
select CMD_DHCP
|
||||
select CMD_EXT2
|
||||
select CMD_EXT4
|
||||
select CMD_FAT
|
||||
select CMD_FS_GENERIC
|
||||
select CMD_MII
|
||||
select CMD_PING
|
||||
select HUSH_PARSER
|
||||
help
|
||||
Select this to enable various options and commands which are suitable
|
||||
for building u-boot for booting general purpose Linux distributions.
|
||||
|
||||
config SYS_MALLOC_F
|
||||
bool "Enable malloc() pool before relocation"
|
||||
default y if DM
|
||||
@@ -183,6 +200,11 @@ config FIT
|
||||
verified boot (secure boot using RSA). This option enables that
|
||||
feature.
|
||||
|
||||
config SPL_FIT
|
||||
bool "Support Flattened Image Tree within SPL"
|
||||
depends on FIT
|
||||
depends on SPL
|
||||
|
||||
config FIT_VERBOSE
|
||||
bool "Display verbose messages on FIT boot"
|
||||
depends on FIT
|
||||
@@ -205,6 +227,12 @@ config FIT_SIGNATURE
|
||||
format support in this case, enable it using
|
||||
CONFIG_IMAGE_FORMAT_LEGACY.
|
||||
|
||||
config SPL_FIT_SIGNATURE
|
||||
bool "Enable signature verification of FIT firmware within SPL"
|
||||
depends on SPL_FIT
|
||||
depends on SPL_DM
|
||||
select SPL_RSA
|
||||
|
||||
config FIT_BEST_MATCH
|
||||
bool "Select the best match for the kernel device tree"
|
||||
depends on FIT
|
||||
|
||||
10
Makefile
10
Makefile
@@ -5,7 +5,7 @@
|
||||
VERSION = 2016
|
||||
PATCHLEVEL = 07
|
||||
SUBLEVEL =
|
||||
EXTRAVERSION = -rc1
|
||||
EXTRAVERSION =
|
||||
NAME =
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@@ -810,7 +810,9 @@ ifeq ($(CONFIG_DM_I2C_COMPAT),y)
|
||||
endif
|
||||
|
||||
PHONY += dtbs
|
||||
dtbs dts/dt.dtb: checkdtc u-boot
|
||||
dtbs: dts/dt.dtb
|
||||
@:
|
||||
dts/dt.dtb: checkdtc u-boot
|
||||
$(Q)$(MAKE) $(build)=dts dtbs
|
||||
|
||||
quiet_cmd_copy = COPY $@
|
||||
@@ -1269,8 +1271,8 @@ prepare: prepare0
|
||||
define filechk_version.h
|
||||
(echo \#define PLAIN_VERSION \"$(UBOOTRELEASE)\"; \
|
||||
echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; \
|
||||
echo \#define CC_VERSION_STRING \"$$($(CC) --version | head -n 1)\"; \
|
||||
echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; )
|
||||
echo \#define CC_VERSION_STRING \"$$(LC_ALL=C $(CC) --version | head -n 1)\"; \
|
||||
echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; )
|
||||
endef
|
||||
|
||||
# The SOURCE_DATE_EPOCH mechanism requires a date that behaves like GNU date.
|
||||
|
||||
22
README
22
README
@@ -890,23 +890,6 @@ The following options need to be configured:
|
||||
'Sane' compilers will generate smaller code if
|
||||
CONFIG_PRE_CON_BUF_SZ is a power of 2
|
||||
|
||||
- Boot Delay: CONFIG_BOOTDELAY - in seconds
|
||||
Delay before automatically booting the default image;
|
||||
set to -1 to disable autoboot.
|
||||
set to -2 to autoboot with no delay and not check for abort
|
||||
(even when CONFIG_ZERO_BOOTDELAY_CHECK is defined).
|
||||
|
||||
See doc/README.autoboot for these options that
|
||||
work with CONFIG_BOOTDELAY. None are required.
|
||||
CONFIG_BOOT_RETRY_TIME
|
||||
CONFIG_BOOT_RETRY_MIN
|
||||
CONFIG_AUTOBOOT_KEYED
|
||||
CONFIG_AUTOBOOT_PROMPT
|
||||
CONFIG_AUTOBOOT_DELAY_STR
|
||||
CONFIG_AUTOBOOT_STOP_STR
|
||||
CONFIG_ZERO_BOOTDELAY_CHECK
|
||||
CONFIG_RESET_TO_RETRY
|
||||
|
||||
- Autoboot Command:
|
||||
CONFIG_BOOTCOMMAND
|
||||
Only needed when CONFIG_BOOTDELAY is enabled;
|
||||
@@ -4824,6 +4807,11 @@ Low Level (hardware related) configuration options:
|
||||
other boot loader or by a debugger which performs
|
||||
these initializations itself.
|
||||
|
||||
- CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
[ARM926EJ-S only] This allows just the call to lowlevel_init()
|
||||
to be skipped. The normal CPU15 init (such as enabling the
|
||||
instruction cache) is still performed.
|
||||
|
||||
- CONFIG_SPL_BUILD
|
||||
Modifies the behaviour of start.S when compiling a loader
|
||||
that is executed before the actual U-Boot. E.g. when
|
||||
|
||||
@@ -43,11 +43,11 @@ PLATFORM_CPPFLAGS += -marcem
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CPU_ARCHS34
|
||||
PLATFORM_CPPFLAGS += -marchs
|
||||
PLATFORM_CPPFLAGS += -mcpu=archs
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CPU_ARCHS38
|
||||
PLATFORM_CPPFLAGS += -marchs
|
||||
PLATFORM_CPPFLAGS += -mcpu=archs
|
||||
endif
|
||||
|
||||
PLATFORM_CPPFLAGS += -ffixed-r25 -D__ARC__ -gdwarf-2
|
||||
|
||||
@@ -7,9 +7,11 @@
|
||||
#ifndef __ASM_ARC_GLOBAL_DATA_H
|
||||
#define __ASM_ARC_GLOBAL_DATA_H
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* Architecture-specific global data */
|
||||
struct arch_global_data {
|
||||
};
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#include <asm-generic/global_data.h>
|
||||
|
||||
|
||||
@@ -10,6 +10,46 @@
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
|
||||
/*
|
||||
* ARCv2 based HS38 cores are in-order issue, but still weakly ordered
|
||||
* due to micro-arch buffering/queuing of load/store, cache hit vs. miss ...
|
||||
*
|
||||
* Explicit barrier provided by DMB instruction
|
||||
* - Operand supports fine grained load/store/load+store semantics
|
||||
* - Ensures that selected memory operation issued before it will complete
|
||||
* before any subsequent memory operation of same type
|
||||
* - DMB guarantees SMP as well as local barrier semantics
|
||||
* (asm-generic/barrier.h ensures sane smp_*mb if not defined here, i.e.
|
||||
* UP: barrier(), SMP: smp_*mb == *mb)
|
||||
* - DSYNC provides DMB+completion_of_cache_bpu_maintenance_ops hence not needed
|
||||
* in the general case. Plus it only provides full barrier.
|
||||
*/
|
||||
|
||||
#define mb() asm volatile("dmb 3\n" : : : "memory")
|
||||
#define rmb() asm volatile("dmb 1\n" : : : "memory")
|
||||
#define wmb() asm volatile("dmb 2\n" : : : "memory")
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* ARCompact based cores (ARC700) only have SYNC instruction which is super
|
||||
* heavy weight as it flushes the pipeline as well.
|
||||
* There are no real SMP implementations of such cores.
|
||||
*/
|
||||
|
||||
#define mb() asm volatile("sync\n" : : : "memory")
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
#define __iormb() rmb()
|
||||
#define __iowmb() wmb()
|
||||
#else
|
||||
#define __iormb() do { } while (0)
|
||||
#define __iowmb() do { } while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Given a physical address and a length, return a virtual address
|
||||
* that can be used to access the memory range with the caching
|
||||
@@ -72,18 +112,6 @@ static inline u32 __raw_readl(const volatile void __iomem *addr)
|
||||
return w;
|
||||
}
|
||||
|
||||
#define readb __raw_readb
|
||||
|
||||
static inline u16 readw(const volatile void __iomem *addr)
|
||||
{
|
||||
return __le16_to_cpu(__raw_readw(addr));
|
||||
}
|
||||
|
||||
static inline u32 readl(const volatile void __iomem *addr)
|
||||
{
|
||||
return __le32_to_cpu(__raw_readl(addr));
|
||||
}
|
||||
|
||||
static inline void __raw_writeb(u8 b, volatile void __iomem *addr)
|
||||
{
|
||||
__asm__ __volatile__("stb%U1 %0, %1\n"
|
||||
@@ -108,10 +136,6 @@ static inline void __raw_writel(u32 w, volatile void __iomem *addr)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#define writeb __raw_writeb
|
||||
#define writew(b, addr) __raw_writew(__cpu_to_le16(b), addr)
|
||||
#define writel(b, addr) __raw_writel(__cpu_to_le32(b), addr)
|
||||
|
||||
static inline int __raw_readsb(unsigned int addr, void *data, int bytelen)
|
||||
{
|
||||
__asm__ __volatile__ ("1:ld.di r8, [r0]\n"
|
||||
@@ -184,6 +208,45 @@ static inline int __raw_writesl(unsigned int addr, void *data, int longlen)
|
||||
return longlen;
|
||||
}
|
||||
|
||||
/*
|
||||
* MMIO can also get buffered/optimized in micro-arch, so barriers needed
|
||||
* Based on ARM model for the typical use case
|
||||
*
|
||||
* <ST [DMA buffer]>
|
||||
* <writel MMIO "go" reg>
|
||||
* or:
|
||||
* <readl MMIO "status" reg>
|
||||
* <LD [DMA buffer]>
|
||||
*
|
||||
* http://lkml.kernel.org/r/20150622133656.GG1583@arm.com
|
||||
*/
|
||||
#define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; })
|
||||
#define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
|
||||
#define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; })
|
||||
|
||||
#define writeb(v,c) ({ __iowmb(); writeb_relaxed(v,c); })
|
||||
#define writew(v,c) ({ __iowmb(); writew_relaxed(v,c); })
|
||||
#define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
|
||||
|
||||
/*
|
||||
* Relaxed API for drivers which can handle barrier ordering themselves
|
||||
*
|
||||
* Also these are defined to perform little endian accesses.
|
||||
* To provide the typical device register semantics of fixed endian,
|
||||
* swap the byte order for Big Endian
|
||||
*
|
||||
* http://lkml.kernel.org/r/201603100845.30602.arnd@arndb.de
|
||||
*/
|
||||
#define readb_relaxed(c) __raw_readb(c)
|
||||
#define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \
|
||||
__raw_readw(c)); __r; })
|
||||
#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
|
||||
__raw_readl(c)); __r; })
|
||||
|
||||
#define writeb_relaxed(v,c) __raw_writeb(v,c)
|
||||
#define writew_relaxed(v,c) __raw_writew((__force u16) cpu_to_le16(v),c)
|
||||
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
|
||||
|
||||
#define out_arch(type, endian, a, v) __raw_write##type(cpu_to_##endian(v), a)
|
||||
#define in_arch(type, endian, a) endian##_to_cpu(__raw_read##type(a))
|
||||
|
||||
|
||||
@@ -209,6 +209,9 @@ void cache_init(void)
|
||||
read_decode_cache_bcr_arcv2();
|
||||
|
||||
if (ioc_exists) {
|
||||
flush_dcache_all();
|
||||
invalidate_dcache_all();
|
||||
|
||||
/* IO coherency base - 0x8z */
|
||||
write_aux_reg(ARC_AUX_IO_COH_AP0_BASE, 0x80000);
|
||||
/* IO coherency aperture size - 512Mb: 0x8z-0xAz */
|
||||
@@ -417,13 +420,10 @@ void flush_cache(unsigned long start, unsigned long size)
|
||||
|
||||
void invalidate_dcache_all(void)
|
||||
{
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (!ioc_exists)
|
||||
#endif
|
||||
__dc_entire_op(OP_INV);
|
||||
__dc_entire_op(OP_INV);
|
||||
|
||||
#ifdef CONFIG_ISA_ARCV2
|
||||
if (slc_exists && !ioc_exists)
|
||||
if (slc_exists)
|
||||
__slc_entire_op(OP_INV);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -304,13 +304,13 @@ config TARGET_VEXPRESS_CA9X4
|
||||
bool "Support vexpress_ca9x4"
|
||||
select CPU_V7
|
||||
|
||||
config TARGET_KWB
|
||||
bool "Support kwb"
|
||||
config TARGET_BRXRE1
|
||||
bool "Support BRXRE1"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
|
||||
config TARGET_TSERIES
|
||||
bool "Support tseries"
|
||||
config TARGET_BRPPT1
|
||||
bool "Support BRPPT1"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
|
||||
@@ -350,26 +350,49 @@ config TARGET_DRACO
|
||||
bool "Support draco"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
|
||||
config TARGET_THUBAN
|
||||
bool "Support thuban"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
|
||||
config TARGET_RASTABAN
|
||||
bool "Support rastaban"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
|
||||
config TARGET_ETAMIN
|
||||
bool "Support etamin"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
|
||||
config TARGET_PXM2
|
||||
bool "Support pxm2"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
|
||||
config TARGET_RUT
|
||||
bool "Support rut"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
|
||||
config TARGET_PENGWYN
|
||||
bool "Support pengwyn"
|
||||
@@ -396,6 +419,14 @@ config TARGET_AM335X_EVM
|
||||
select DM_GPIO
|
||||
select TI_I2C_BOARD_DETECT
|
||||
|
||||
config TARGET_AM335X_SHC
|
||||
bool "Support am335x based shc board from bosch"
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select DM_GPIO
|
||||
|
||||
config TARGET_AM335X_SL50
|
||||
bool "Support am335x_sl50"
|
||||
select CPU_V7
|
||||
@@ -428,6 +459,10 @@ config TARGET_TI816X_EVM
|
||||
select CPU_V7
|
||||
select SUPPORT_SPL
|
||||
|
||||
config TARGET_BCM23550_W1D
|
||||
bool "Support bcm23550_w1d"
|
||||
select CPU_V7
|
||||
|
||||
config TARGET_BCM28155_AP
|
||||
bool "Support bcm28155_ap"
|
||||
select CPU_V7
|
||||
@@ -544,6 +579,10 @@ config RMOBILE
|
||||
bool "Renesas ARM SoCs"
|
||||
select CPU_V7
|
||||
|
||||
config TARGET_S32V234EVB
|
||||
bool "Support s32v234evb"
|
||||
select ARM64
|
||||
|
||||
config ARCH_SNAPDRAGON
|
||||
bool "Qualcomm Snapdragon SoCs"
|
||||
select ARM64
|
||||
@@ -571,16 +610,8 @@ config TARGET_CM_T43
|
||||
|
||||
config ARCH_SUNXI
|
||||
bool "Support sunxi (Allwinner) SoCs"
|
||||
select CMD_BOOTZ
|
||||
select CMD_DHCP
|
||||
select CMD_EXT2
|
||||
select CMD_EXT4
|
||||
select CMD_FAT
|
||||
select CMD_FS_GENERIC
|
||||
select CMD_GPIO
|
||||
select CMD_MII
|
||||
select CMD_MMC if MMC
|
||||
select CMD_PING
|
||||
select CMD_USB
|
||||
select DM
|
||||
select DM_ETH
|
||||
@@ -588,7 +619,6 @@ config ARCH_SUNXI
|
||||
select DM_KEYBOARD
|
||||
select DM_SERIAL
|
||||
select DM_USB
|
||||
select HUSH_PARSER
|
||||
select OF_BOARD_SETUP
|
||||
select OF_CONTROL
|
||||
select OF_SEPARATE
|
||||
@@ -598,6 +628,7 @@ config ARCH_SUNXI
|
||||
select USB
|
||||
select USB_STORAGE
|
||||
select USB_KEYBOARD
|
||||
select USE_TINY_PRINTF
|
||||
|
||||
config TARGET_TS4800
|
||||
bool "Support TS4800"
|
||||
@@ -788,6 +819,7 @@ config ARCH_UNIPHIER
|
||||
select SPL
|
||||
select OF_CONTROL
|
||||
select SPL_OF_CONTROL
|
||||
select OF_LIBFDT
|
||||
select DM
|
||||
select SPL_DM
|
||||
select DM_GPIO
|
||||
@@ -875,8 +907,9 @@ source "arch/arm/cpu/armv8/Kconfig"
|
||||
|
||||
source "arch/arm/imx-common/Kconfig"
|
||||
|
||||
source "board/BuR/kwb/Kconfig"
|
||||
source "board/BuR/tseries/Kconfig"
|
||||
source "board/bosch/shc/Kconfig"
|
||||
source "board/BuR/brxre1/Kconfig"
|
||||
source "board/BuR/brppt1/Kconfig"
|
||||
source "board/CarMediaLab/flea3/Kconfig"
|
||||
source "board/Marvell/aspenite/Kconfig"
|
||||
source "board/Marvell/gplugd/Kconfig"
|
||||
@@ -884,6 +917,7 @@ source "board/armadeus/apf27/Kconfig"
|
||||
source "board/armltd/vexpress/Kconfig"
|
||||
source "board/armltd/vexpress64/Kconfig"
|
||||
source "board/bluegiga/apx4devkit/Kconfig"
|
||||
source "board/broadcom/bcm23550_w1d/Kconfig"
|
||||
source "board/broadcom/bcm28155_ap/Kconfig"
|
||||
source "board/broadcom/bcmcygnus/Kconfig"
|
||||
source "board/broadcom/bcmnsp/Kconfig"
|
||||
@@ -915,6 +949,7 @@ source "board/freescale/mx53ard/Kconfig"
|
||||
source "board/freescale/mx53evk/Kconfig"
|
||||
source "board/freescale/mx53loco/Kconfig"
|
||||
source "board/freescale/mx53smd/Kconfig"
|
||||
source "board/freescale/s32v234evb/Kconfig"
|
||||
source "board/freescale/vf610twr/Kconfig"
|
||||
source "board/gumstix/pepper/Kconfig"
|
||||
source "board/h2200/Kconfig"
|
||||
|
||||
@@ -526,7 +526,7 @@ u32 spl_boot_device(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_BUILD
|
||||
u32 spl_boot_mode(void)
|
||||
u32 spl_boot_mode(const u32 boot_device)
|
||||
{
|
||||
switch (spl_boot_device()) {
|
||||
case BOOT_DEVICE_MMC1:
|
||||
|
||||
@@ -82,6 +82,7 @@ cpu_init_crit:
|
||||
orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* Jump to board specific initialization... The Mask ROM will have already initialized
|
||||
* basic memory. Go here to bump up clock rate and handle wake up conditions.
|
||||
@@ -89,5 +90,6 @@ cpu_init_crit:
|
||||
mov ip, lr /* persevere link reg across call */
|
||||
bl lowlevel_init /* go setup pll,mux,memory */
|
||||
mov lr, ip /* restore link */
|
||||
#endif
|
||||
mov pc, lr /* back to my caller */
|
||||
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
|
||||
|
||||
@@ -135,6 +135,7 @@ cpu_init_crit:
|
||||
orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* before relocating, we have to setup RAM timing
|
||||
* because memory timing is board-dependend, you will
|
||||
@@ -143,7 +144,7 @@ cpu_init_crit:
|
||||
mov ip, lr
|
||||
|
||||
bl lowlevel_init
|
||||
|
||||
mov lr, ip
|
||||
#endif
|
||||
mov pc, lr
|
||||
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
|
||||
|
||||
@@ -167,9 +167,9 @@ const char *get_imx_type(u32 imxtype)
|
||||
{
|
||||
switch (imxtype) {
|
||||
case MXC_CPU_MX23:
|
||||
return "23"; /* Quad-Plus version of the mx6 */
|
||||
return "23";
|
||||
case MXC_CPU_MX28:
|
||||
return "28"; /* Dual-Plus version of the mx6 */
|
||||
return "28";
|
||||
default:
|
||||
return "??";
|
||||
}
|
||||
|
||||
@@ -101,11 +101,13 @@ flush_dcache:
|
||||
#endif
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* Go setup Memory and board specific bits prior to relocation.
|
||||
*/
|
||||
mov ip, lr /* perserve link reg across call */
|
||||
bl lowlevel_init /* go setup pll,mux,memory */
|
||||
mov lr, ip /* restore link */
|
||||
#endif
|
||||
mov pc, lr /* back to my caller */
|
||||
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
|
||||
|
||||
@@ -90,11 +90,13 @@ cpu_init_crit:
|
||||
orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */
|
||||
mcr p15, 0, r0, c1, c0, 0
|
||||
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* Go setup Memory and board specific bits prior to relocation.
|
||||
*/
|
||||
mov ip, lr /* perserve link reg across call */
|
||||
bl lowlevel_init /* go setup memory */
|
||||
mov lr, ip /* restore link */
|
||||
#endif
|
||||
mov pc, lr /* back to my caller */
|
||||
#endif
|
||||
|
||||
@@ -18,15 +18,8 @@ obj-y += lowlevel_init.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ARMV7_NONSEC),)
|
||||
obj-y += nonsec_virt.o
|
||||
obj-y += virt-v7.o
|
||||
obj-y += virt-dt.o
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_ARMV7_PSCI),)
|
||||
obj-y += psci.o
|
||||
endif
|
||||
obj-$(CONFIG_ARMV7_NONSEC) += nonsec_virt.o virt-v7.o virt-dt.o
|
||||
obj-$(CONFIG_ARMV7_PSCI) += psci.o
|
||||
|
||||
obj-$(CONFIG_IPROC) += iproc-common/
|
||||
obj-$(CONFIG_KONA) += kona-common/
|
||||
@@ -38,6 +31,7 @@ obj-y += s5p-common/
|
||||
endif
|
||||
|
||||
obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
|
||||
obj-$(if $(filter bcm235xx,$(SOC)),y) += bcm235xx/
|
||||
obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/
|
||||
obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/
|
||||
obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/
|
||||
|
||||
@@ -159,3 +159,76 @@ void enable_basic_clocks(void)
|
||||
/* Select the Master osc 24 MHZ as Timer2 clock source */
|
||||
writel(0x1, &cmdpll->clktimer2clk);
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable Spread Spectrum for the MPU by calculating the required
|
||||
* values and setting the registers accordingly.
|
||||
* @param permille The spreading in permille (10th of a percent)
|
||||
*/
|
||||
void set_mpu_spreadspectrum(int permille)
|
||||
{
|
||||
u32 multiplier_m;
|
||||
u32 predivider_n;
|
||||
u32 cm_clksel_dpll_mpu;
|
||||
u32 cm_clkmode_dpll_mpu;
|
||||
u32 ref_clock;
|
||||
u32 pll_bandwidth;
|
||||
u32 mod_freq_divider;
|
||||
u32 exponent;
|
||||
u32 mantissa;
|
||||
u32 delta_m_step;
|
||||
|
||||
printf("Enabling Spread Spectrum of %d permille for MPU\n",
|
||||
permille);
|
||||
|
||||
/* Read PLL parameter m and n */
|
||||
cm_clksel_dpll_mpu = readl(&cmwkup->clkseldpllmpu);
|
||||
multiplier_m = (cm_clksel_dpll_mpu >> 8) & 0x3FF;
|
||||
predivider_n = cm_clksel_dpll_mpu & 0x7F;
|
||||
|
||||
/*
|
||||
* Calculate reference clock (clock after pre-divider),
|
||||
* its max. PLL bandwidth,
|
||||
* and resulting mod_freq_divider
|
||||
*/
|
||||
ref_clock = V_OSCK / (predivider_n + 1);
|
||||
pll_bandwidth = ref_clock / 70;
|
||||
mod_freq_divider = ref_clock / (4 * pll_bandwidth);
|
||||
|
||||
/* Calculate Mantissa/Exponent */
|
||||
exponent = 0;
|
||||
mantissa = mod_freq_divider;
|
||||
while ((mantissa > 127) && (exponent < 7)) {
|
||||
exponent++;
|
||||
mantissa /= 2;
|
||||
}
|
||||
if (mantissa > 127)
|
||||
mantissa = 127;
|
||||
|
||||
mod_freq_divider = mantissa << exponent;
|
||||
|
||||
/*
|
||||
* Calculate Modulation steps
|
||||
* As we use Downspread only, the spread is twice the value of
|
||||
* permille, so Div2!
|
||||
* As it takes the value in percent, divide by ten!
|
||||
*/
|
||||
delta_m_step = ((u32)((multiplier_m * permille) / 10 / 2)) << 18;
|
||||
delta_m_step /= 100;
|
||||
delta_m_step /= mod_freq_divider;
|
||||
if (delta_m_step > 0xFFFFF)
|
||||
delta_m_step = 0xFFFFF;
|
||||
|
||||
/* Setup Spread Spectrum */
|
||||
writel(delta_m_step, &cmwkup->sscdeltamstepdllmpu);
|
||||
writel((exponent << 8) | mantissa, &cmwkup->sscmodfreqdivdpllmpu);
|
||||
cm_clkmode_dpll_mpu = readl(&cmwkup->clkmoddpllmpu);
|
||||
/* clear all SSC flags */
|
||||
cm_clkmode_dpll_mpu &= ~(0xF << CM_CLKMODE_DPLL_SSC_EN_SHIFT);
|
||||
/* enable SSC with Downspread only */
|
||||
cm_clkmode_dpll_mpu |= CM_CLKMODE_DPLL_SSC_EN_MASK |
|
||||
CM_CLKMODE_DPLL_SSC_DOWNSPREAD_MASK;
|
||||
writel(cm_clkmode_dpll_mpu, &cmwkup->clkmoddpllmpu);
|
||||
while (!(readl(&cmwkup->clkmoddpllmpu) & 0x2000))
|
||||
;
|
||||
}
|
||||
|
||||
12
arch/arm/cpu/armv7/bcm235xx/Makefile
Normal file
12
arch/arm/cpu/armv7/bcm235xx/Makefile
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# Copyright 2013 Broadcom Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y += clk-core.o
|
||||
obj-y += clk-bcm235xx.o
|
||||
obj-y += clk-sdio.o
|
||||
obj-y += clk-bsc.o
|
||||
obj-$(CONFIG_BCM_SF2_ETH) += clk-eth.o
|
||||
obj-y += clk-usb-otg.o
|
||||
569
arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c
Normal file
569
arch/arm/cpu/armv7/bcm235xx/clk-bcm235xx.c
Normal file
@@ -0,0 +1,569 @@
|
||||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* bcm235xx-specific clock tables
|
||||
*
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/arch/sysmap.h>
|
||||
#include <asm/kona-common/clk.h>
|
||||
#include "clk-core.h"
|
||||
|
||||
#define CLOCK_1K 1000
|
||||
#define CLOCK_1M (CLOCK_1K * 1000)
|
||||
|
||||
/* declare a reference clock */
|
||||
#define DECLARE_REF_CLK(clk_name, clk_parent, clk_rate, clk_div) \
|
||||
static struct refclk clk_name = { \
|
||||
.clk = { \
|
||||
.name = #clk_name, \
|
||||
.parent = clk_parent, \
|
||||
.rate = clk_rate, \
|
||||
.div = clk_div, \
|
||||
.ops = &ref_clk_ops, \
|
||||
}, \
|
||||
}
|
||||
|
||||
/*
|
||||
* Reference clocks
|
||||
*/
|
||||
|
||||
/* Declare a list of reference clocks */
|
||||
DECLARE_REF_CLK(ref_crystal, 0, 26 * CLOCK_1M, 1);
|
||||
DECLARE_REF_CLK(var_96m, 0, 96 * CLOCK_1M, 1);
|
||||
DECLARE_REF_CLK(ref_96m, 0, 96 * CLOCK_1M, 1);
|
||||
DECLARE_REF_CLK(ref_312m, 0, 312 * CLOCK_1M, 0);
|
||||
DECLARE_REF_CLK(ref_104m, &ref_312m.clk, 104 * CLOCK_1M, 3);
|
||||
DECLARE_REF_CLK(ref_52m, &ref_104m.clk, 52 * CLOCK_1M, 2);
|
||||
DECLARE_REF_CLK(ref_13m, &ref_52m.clk, 13 * CLOCK_1M, 4);
|
||||
DECLARE_REF_CLK(var_312m, 0, 312 * CLOCK_1M, 0);
|
||||
DECLARE_REF_CLK(var_104m, &var_312m.clk, 104 * CLOCK_1M, 3);
|
||||
DECLARE_REF_CLK(var_52m, &var_104m.clk, 52 * CLOCK_1M, 2);
|
||||
DECLARE_REF_CLK(var_13m, &var_52m.clk, 13 * CLOCK_1M, 4);
|
||||
|
||||
struct refclk_lkup {
|
||||
struct refclk *procclk;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
/* Lookup table for string to clk tranlation */
|
||||
#define MKSTR(x) {&x, #x}
|
||||
static struct refclk_lkup refclk_str_tbl[] = {
|
||||
MKSTR(ref_crystal), MKSTR(var_96m), MKSTR(ref_96m),
|
||||
MKSTR(ref_312m), MKSTR(ref_104m), MKSTR(ref_52m),
|
||||
MKSTR(ref_13m), MKSTR(var_312m), MKSTR(var_104m),
|
||||
MKSTR(var_52m), MKSTR(var_13m),
|
||||
};
|
||||
|
||||
int refclk_entries = sizeof(refclk_str_tbl)/sizeof(refclk_str_tbl[0]);
|
||||
|
||||
/* convert ref clock string to clock structure pointer */
|
||||
struct refclk *refclk_str_to_clk(const char *name)
|
||||
{
|
||||
int i;
|
||||
struct refclk_lkup *tblp = refclk_str_tbl;
|
||||
for (i = 0; i < refclk_entries; i++, tblp++) {
|
||||
if (!(strcmp(name, tblp->name)))
|
||||
return tblp->procclk;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* frequency tables indexed by freq_id */
|
||||
unsigned long master_axi_freq_tbl[8] = {
|
||||
26 * CLOCK_1M,
|
||||
52 * CLOCK_1M,
|
||||
104 * CLOCK_1M,
|
||||
156 * CLOCK_1M,
|
||||
156 * CLOCK_1M,
|
||||
208 * CLOCK_1M,
|
||||
312 * CLOCK_1M,
|
||||
312 * CLOCK_1M
|
||||
};
|
||||
|
||||
unsigned long master_ahb_freq_tbl[8] = {
|
||||
26 * CLOCK_1M,
|
||||
52 * CLOCK_1M,
|
||||
52 * CLOCK_1M,
|
||||
52 * CLOCK_1M,
|
||||
78 * CLOCK_1M,
|
||||
104 * CLOCK_1M,
|
||||
104 * CLOCK_1M,
|
||||
156 * CLOCK_1M
|
||||
};
|
||||
|
||||
unsigned long slave_axi_freq_tbl[8] = {
|
||||
26 * CLOCK_1M,
|
||||
52 * CLOCK_1M,
|
||||
78 * CLOCK_1M,
|
||||
104 * CLOCK_1M,
|
||||
156 * CLOCK_1M,
|
||||
156 * CLOCK_1M
|
||||
};
|
||||
|
||||
unsigned long slave_apb_freq_tbl[8] = {
|
||||
26 * CLOCK_1M,
|
||||
26 * CLOCK_1M,
|
||||
39 * CLOCK_1M,
|
||||
52 * CLOCK_1M,
|
||||
52 * CLOCK_1M,
|
||||
78 * CLOCK_1M
|
||||
};
|
||||
|
||||
unsigned long esub_freq_tbl[8] = {
|
||||
78 * CLOCK_1M,
|
||||
156 * CLOCK_1M,
|
||||
156 * CLOCK_1M,
|
||||
156 * CLOCK_1M,
|
||||
208 * CLOCK_1M,
|
||||
208 * CLOCK_1M,
|
||||
208 * CLOCK_1M
|
||||
};
|
||||
|
||||
static struct bus_clk_data bsc1_apb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x0458, 16, 0, 1),
|
||||
};
|
||||
|
||||
static struct bus_clk_data bsc2_apb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x045c, 16, 0, 1),
|
||||
};
|
||||
|
||||
static struct bus_clk_data bsc3_apb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x0484, 16, 0, 1),
|
||||
};
|
||||
|
||||
/* * Master CCU clocks */
|
||||
static struct peri_clk_data sdio1_data = {
|
||||
.gate = HW_SW_GATE(0x0358, 18, 2, 3),
|
||||
.clocks = CLOCKS("ref_crystal",
|
||||
"var_52m",
|
||||
"ref_52m",
|
||||
"var_96m",
|
||||
"ref_96m"),
|
||||
.sel = SELECTOR(0x0a28, 0, 3),
|
||||
.div = DIVIDER(0x0a28, 4, 14),
|
||||
.trig = TRIGGER(0x0afc, 9),
|
||||
};
|
||||
|
||||
static struct peri_clk_data sdio2_data = {
|
||||
.gate = HW_SW_GATE(0x035c, 18, 2, 3),
|
||||
.clocks = CLOCKS("ref_crystal",
|
||||
"var_52m",
|
||||
"ref_52m",
|
||||
"var_96m",
|
||||
"ref_96m"),
|
||||
.sel = SELECTOR(0x0a2c, 0, 3),
|
||||
.div = DIVIDER(0x0a2c, 4, 14),
|
||||
.trig = TRIGGER(0x0afc, 10),
|
||||
};
|
||||
|
||||
static struct peri_clk_data sdio3_data = {
|
||||
.gate = HW_SW_GATE(0x0364, 18, 2, 3),
|
||||
.clocks = CLOCKS("ref_crystal",
|
||||
"var_52m",
|
||||
"ref_52m",
|
||||
"var_96m",
|
||||
"ref_96m"),
|
||||
.sel = SELECTOR(0x0a34, 0, 3),
|
||||
.div = DIVIDER(0x0a34, 4, 14),
|
||||
.trig = TRIGGER(0x0afc, 12),
|
||||
};
|
||||
|
||||
static struct peri_clk_data sdio4_data = {
|
||||
.gate = HW_SW_GATE(0x0360, 18, 2, 3),
|
||||
.clocks = CLOCKS("ref_crystal",
|
||||
"var_52m",
|
||||
"ref_52m",
|
||||
"var_96m",
|
||||
"ref_96m"),
|
||||
.sel = SELECTOR(0x0a30, 0, 3),
|
||||
.div = DIVIDER(0x0a30, 4, 14),
|
||||
.trig = TRIGGER(0x0afc, 11),
|
||||
};
|
||||
|
||||
static struct peri_clk_data sdio1_sleep_data = {
|
||||
.clocks = CLOCKS("ref_32k"),
|
||||
.gate = SW_ONLY_GATE(0x0358, 20, 4),
|
||||
};
|
||||
|
||||
static struct peri_clk_data sdio2_sleep_data = {
|
||||
.clocks = CLOCKS("ref_32k"),
|
||||
.gate = SW_ONLY_GATE(0x035c, 20, 4),
|
||||
};
|
||||
|
||||
static struct peri_clk_data sdio3_sleep_data = {
|
||||
.clocks = CLOCKS("ref_32k"),
|
||||
.gate = SW_ONLY_GATE(0x0364, 20, 4),
|
||||
};
|
||||
|
||||
static struct peri_clk_data sdio4_sleep_data = {
|
||||
.clocks = CLOCKS("ref_32k"),
|
||||
.gate = SW_ONLY_GATE(0x0360, 20, 4),
|
||||
};
|
||||
|
||||
static struct bus_clk_data usb_otg_ahb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x0348, 16, 0, 1),
|
||||
};
|
||||
|
||||
static struct bus_clk_data sdio1_ahb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x0358, 16, 0, 1),
|
||||
};
|
||||
|
||||
static struct bus_clk_data sdio2_ahb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x035c, 16, 0, 1),
|
||||
};
|
||||
|
||||
static struct bus_clk_data sdio3_ahb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x0364, 16, 0, 1),
|
||||
};
|
||||
|
||||
static struct bus_clk_data sdio4_ahb_data = {
|
||||
.gate = HW_SW_GATE_AUTO(0x0360, 16, 0, 1),
|
||||
};
|
||||
|
||||
/* * Slave CCU clocks */
|
||||
static struct peri_clk_data bsc1_data = {
|
||||
.gate = HW_SW_GATE(0x0458, 18, 2, 3),
|
||||
.clocks = CLOCKS("ref_crystal",
|
||||
"var_104m",
|
||||
"ref_104m",
|
||||
"var_13m",
|
||||
"ref_13m"),
|
||||
.sel = SELECTOR(0x0a64, 0, 3),
|
||||
.trig = TRIGGER(0x0afc, 23),
|
||||
};
|
||||
|
||||
static struct peri_clk_data bsc2_data = {
|
||||
.gate = HW_SW_GATE(0x045c, 18, 2, 3),
|
||||
.clocks = CLOCKS("ref_crystal",
|
||||
"var_104m",
|
||||
"ref_104m",
|
||||
"var_13m",
|
||||
"ref_13m"),
|
||||
.sel = SELECTOR(0x0a68, 0, 3),
|
||||
.trig = TRIGGER(0x0afc, 24),
|
||||
};
|
||||
|
||||
static struct peri_clk_data bsc3_data = {
|
||||
.gate = HW_SW_GATE(0x0484, 18, 2, 3),
|
||||
.clocks = CLOCKS("ref_crystal",
|
||||
"var_104m",
|
||||
"ref_104m",
|
||||
"var_13m",
|
||||
"ref_13m"),
|
||||
.sel = SELECTOR(0x0a84, 0, 3),
|
||||
.trig = TRIGGER(0x0b00, 2),
|
||||
};
|
||||
|
||||
/*
|
||||
* CCU clocks
|
||||
*/
|
||||
|
||||
static struct ccu_clock kpm_ccu_clk = {
|
||||
.clk = {
|
||||
.name = "kpm_ccu_clk",
|
||||
.ops = &ccu_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.num_policy_masks = 1,
|
||||
.policy_freq_offset = 0x00000008,
|
||||
.freq_bit_shift = 8,
|
||||
.policy_ctl_offset = 0x0000000c,
|
||||
.policy0_mask_offset = 0x00000010,
|
||||
.policy1_mask_offset = 0x00000014,
|
||||
.policy2_mask_offset = 0x00000018,
|
||||
.policy3_mask_offset = 0x0000001c,
|
||||
.lvm_en_offset = 0x00000034,
|
||||
.freq_id = 2,
|
||||
.freq_tbl = master_axi_freq_tbl,
|
||||
};
|
||||
|
||||
static struct ccu_clock kps_ccu_clk = {
|
||||
.clk = {
|
||||
.name = "kps_ccu_clk",
|
||||
.ops = &ccu_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
|
||||
},
|
||||
.num_policy_masks = 1,
|
||||
.policy_freq_offset = 0x00000008,
|
||||
.freq_bit_shift = 8,
|
||||
.policy_ctl_offset = 0x0000000c,
|
||||
.policy0_mask_offset = 0x00000010,
|
||||
.policy1_mask_offset = 0x00000014,
|
||||
.policy2_mask_offset = 0x00000018,
|
||||
.policy3_mask_offset = 0x0000001c,
|
||||
.lvm_en_offset = 0x00000034,
|
||||
.freq_id = 2,
|
||||
.freq_tbl = slave_axi_freq_tbl,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BCM_SF2_ETH
|
||||
static struct ccu_clock esub_ccu_clk = {
|
||||
.clk = {
|
||||
.name = "esub_ccu_clk",
|
||||
.ops = &ccu_clk_ops,
|
||||
.ccu_clk_mgr_base = ESUB_CLK_BASE_ADDR,
|
||||
},
|
||||
.num_policy_masks = 1,
|
||||
.policy_freq_offset = 0x00000008,
|
||||
.freq_bit_shift = 8,
|
||||
.policy_ctl_offset = 0x0000000c,
|
||||
.policy0_mask_offset = 0x00000010,
|
||||
.policy1_mask_offset = 0x00000014,
|
||||
.policy2_mask_offset = 0x00000018,
|
||||
.policy3_mask_offset = 0x0000001c,
|
||||
.lvm_en_offset = 0x00000034,
|
||||
.freq_id = 2,
|
||||
.freq_tbl = esub_freq_tbl,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Bus clocks
|
||||
*/
|
||||
|
||||
/* KPM bus clocks */
|
||||
static struct bus_clock usb_otg_ahb_clk = {
|
||||
.clk = {
|
||||
.name = "usb_otg_ahb_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = master_ahb_freq_tbl,
|
||||
.data = &usb_otg_ahb_data,
|
||||
};
|
||||
|
||||
static struct bus_clock sdio1_ahb_clk = {
|
||||
.clk = {
|
||||
.name = "sdio1_ahb_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = master_ahb_freq_tbl,
|
||||
.data = &sdio1_ahb_data,
|
||||
};
|
||||
|
||||
static struct bus_clock sdio2_ahb_clk = {
|
||||
.clk = {
|
||||
.name = "sdio2_ahb_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = master_ahb_freq_tbl,
|
||||
.data = &sdio2_ahb_data,
|
||||
};
|
||||
|
||||
static struct bus_clock sdio3_ahb_clk = {
|
||||
.clk = {
|
||||
.name = "sdio3_ahb_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = master_ahb_freq_tbl,
|
||||
.data = &sdio3_ahb_data,
|
||||
};
|
||||
|
||||
static struct bus_clock sdio4_ahb_clk = {
|
||||
.clk = {
|
||||
.name = "sdio4_ahb_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = master_ahb_freq_tbl,
|
||||
.data = &sdio4_ahb_data,
|
||||
};
|
||||
|
||||
static struct bus_clock bsc1_apb_clk = {
|
||||
.clk = {
|
||||
.name = "bsc1_apb_clk",
|
||||
.parent = &kps_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = slave_apb_freq_tbl,
|
||||
.data = &bsc1_apb_data,
|
||||
};
|
||||
|
||||
static struct bus_clock bsc2_apb_clk = {
|
||||
.clk = {
|
||||
.name = "bsc2_apb_clk",
|
||||
.parent = &kps_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = slave_apb_freq_tbl,
|
||||
.data = &bsc2_apb_data,
|
||||
};
|
||||
|
||||
static struct bus_clock bsc3_apb_clk = {
|
||||
.clk = {
|
||||
.name = "bsc3_apb_clk",
|
||||
.parent = &kps_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
|
||||
},
|
||||
.freq_tbl = slave_apb_freq_tbl,
|
||||
.data = &bsc3_apb_data,
|
||||
};
|
||||
|
||||
/* KPM peripheral */
|
||||
static struct peri_clock sdio1_clk = {
|
||||
.clk = {
|
||||
.name = "sdio1_clk",
|
||||
.parent = &ref_52m.clk,
|
||||
.ops = &peri_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio1_data,
|
||||
};
|
||||
|
||||
static struct peri_clock sdio2_clk = {
|
||||
.clk = {
|
||||
.name = "sdio2_clk",
|
||||
.parent = &ref_52m.clk,
|
||||
.ops = &peri_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio2_data,
|
||||
};
|
||||
|
||||
static struct peri_clock sdio3_clk = {
|
||||
.clk = {
|
||||
.name = "sdio3_clk",
|
||||
.parent = &ref_52m.clk,
|
||||
.ops = &peri_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio3_data,
|
||||
};
|
||||
|
||||
static struct peri_clock sdio4_clk = {
|
||||
.clk = {
|
||||
.name = "sdio4_clk",
|
||||
.parent = &ref_52m.clk,
|
||||
.ops = &peri_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio4_data,
|
||||
};
|
||||
|
||||
static struct peri_clock sdio1_sleep_clk = {
|
||||
.clk = {
|
||||
.name = "sdio1_sleep_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio1_sleep_data,
|
||||
};
|
||||
|
||||
static struct peri_clock sdio2_sleep_clk = {
|
||||
.clk = {
|
||||
.name = "sdio2_sleep_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio2_sleep_data,
|
||||
};
|
||||
|
||||
static struct peri_clock sdio3_sleep_clk = {
|
||||
.clk = {
|
||||
.name = "sdio3_sleep_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio3_sleep_data,
|
||||
};
|
||||
|
||||
static struct peri_clock sdio4_sleep_clk = {
|
||||
.clk = {
|
||||
.name = "sdio4_sleep_clk",
|
||||
.parent = &kpm_ccu_clk.clk,
|
||||
.ops = &bus_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &sdio4_sleep_data,
|
||||
};
|
||||
|
||||
/* KPS peripheral clock */
|
||||
static struct peri_clock bsc1_clk = {
|
||||
.clk = {
|
||||
.name = "bsc1_clk",
|
||||
.parent = &ref_13m.clk,
|
||||
.rate = 13 * CLOCK_1M,
|
||||
.div = 1,
|
||||
.ops = &peri_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &bsc1_data,
|
||||
};
|
||||
|
||||
static struct peri_clock bsc2_clk = {
|
||||
.clk = {
|
||||
.name = "bsc2_clk",
|
||||
.parent = &ref_13m.clk,
|
||||
.rate = 13 * CLOCK_1M,
|
||||
.div = 1,
|
||||
.ops = &peri_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &bsc2_data,
|
||||
};
|
||||
|
||||
static struct peri_clock bsc3_clk = {
|
||||
.clk = {
|
||||
.name = "bsc3_clk",
|
||||
.parent = &ref_13m.clk,
|
||||
.rate = 13 * CLOCK_1M,
|
||||
.div = 1,
|
||||
.ops = &peri_clk_ops,
|
||||
.ccu_clk_mgr_base = KONA_SLV_CLK_BASE_ADDR,
|
||||
},
|
||||
.data = &bsc3_data,
|
||||
};
|
||||
|
||||
/* public table for registering clocks */
|
||||
struct clk_lookup arch_clk_tbl[] = {
|
||||
/* Peripheral clocks */
|
||||
CLK_LK(sdio1),
|
||||
CLK_LK(sdio2),
|
||||
CLK_LK(sdio3),
|
||||
CLK_LK(sdio4),
|
||||
CLK_LK(sdio1_sleep),
|
||||
CLK_LK(sdio2_sleep),
|
||||
CLK_LK(sdio3_sleep),
|
||||
CLK_LK(sdio4_sleep),
|
||||
CLK_LK(bsc1),
|
||||
CLK_LK(bsc2),
|
||||
CLK_LK(bsc3),
|
||||
/* Bus clocks */
|
||||
CLK_LK(usb_otg_ahb),
|
||||
CLK_LK(sdio1_ahb),
|
||||
CLK_LK(sdio2_ahb),
|
||||
CLK_LK(sdio3_ahb),
|
||||
CLK_LK(sdio4_ahb),
|
||||
CLK_LK(bsc1_apb),
|
||||
CLK_LK(bsc2_apb),
|
||||
CLK_LK(bsc3_apb),
|
||||
#ifdef CONFIG_BCM_SF2_ETH
|
||||
CLK_LK(esub_ccu),
|
||||
#endif
|
||||
};
|
||||
|
||||
/* public array size */
|
||||
unsigned int arch_clk_tbl_array_size = ARRAY_SIZE(arch_clk_tbl);
|
||||
52
arch/arm/cpu/armv7/bcm235xx/clk-bsc.c
Normal file
52
arch/arm/cpu/armv7/bcm235xx/clk-bsc.c
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/arch/sysmap.h>
|
||||
#include <asm/kona-common/clk.h>
|
||||
#include "clk-core.h"
|
||||
|
||||
/* Enable appropriate clocks for a BSC/I2C port */
|
||||
int clk_bsc_enable(void *base)
|
||||
{
|
||||
int ret;
|
||||
char *bscstr, *apbstr;
|
||||
|
||||
switch ((u32) base) {
|
||||
case PMU_BSC_BASE_ADDR:
|
||||
/* PMU clock is always enabled */
|
||||
return 0;
|
||||
case BSC1_BASE_ADDR:
|
||||
bscstr = "bsc1_clk";
|
||||
apbstr = "bsc1_apb_clk";
|
||||
break;
|
||||
case BSC2_BASE_ADDR:
|
||||
bscstr = "bsc2_clk";
|
||||
apbstr = "bsc2_apb_clk";
|
||||
break;
|
||||
case BSC3_BASE_ADDR:
|
||||
bscstr = "bsc3_clk";
|
||||
apbstr = "bsc3_apb_clk";
|
||||
break;
|
||||
default:
|
||||
printf("%s: base 0x%p not found\n", __func__, base);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Note that the bus clock must be enabled first */
|
||||
|
||||
ret = clk_get_and_enable(apbstr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = clk_get_and_enable(bscstr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
513
arch/arm/cpu/armv7/bcm235xx/clk-core.c
Normal file
513
arch/arm/cpu/armv7/bcm235xx/clk-core.c
Normal file
@@ -0,0 +1,513 @@
|
||||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
/*
|
||||
*
|
||||
* bcm235xx architecture clock framework
|
||||
*
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/errno.h>
|
||||
#include <bitfield.h>
|
||||
#include <asm/arch/sysmap.h>
|
||||
#include <asm/kona-common/clk.h>
|
||||
#include "clk-core.h"
|
||||
|
||||
#define CLK_WR_ACCESS_PASSWORD 0x00a5a501
|
||||
#define WR_ACCESS_OFFSET 0 /* common to all clock blocks */
|
||||
#define POLICY_CTL_GO 1 /* Load and refresh policy masks */
|
||||
#define POLICY_CTL_GO_ATL 4 /* Active Load */
|
||||
|
||||
/* Helper function */
|
||||
int clk_get_and_enable(char *clkstr)
|
||||
{
|
||||
int ret = 0;
|
||||
struct clk *c;
|
||||
|
||||
debug("%s: %s\n", __func__, clkstr);
|
||||
|
||||
c = clk_get(clkstr);
|
||||
if (c) {
|
||||
ret = clk_enable(c);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
printf("%s: Couldn't find %s\n", __func__, clkstr);
|
||||
return -EINVAL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Poll a register in a CCU's address space, returning when the
|
||||
* specified bit in that register's value is set (or clear). Delay
|
||||
* a microsecond after each read of the register. Returns true if
|
||||
* successful, or false if we gave up trying.
|
||||
*
|
||||
* Caller must ensure the CCU lock is held.
|
||||
*/
|
||||
#define CLK_GATE_DELAY_USEC 2000
|
||||
static inline int wait_bit(void *base, u32 offset, u32 bit, bool want)
|
||||
{
|
||||
unsigned int tries;
|
||||
u32 bit_mask = 1 << bit;
|
||||
|
||||
for (tries = 0; tries < CLK_GATE_DELAY_USEC; tries++) {
|
||||
u32 val;
|
||||
bool bit_val;
|
||||
|
||||
val = readl(base + offset);
|
||||
bit_val = (val & bit_mask) ? 1 : 0;
|
||||
if (bit_val == want)
|
||||
return 0; /* success */
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
debug("%s: timeout on addr 0x%p, waiting for bit %d to go to %d\n",
|
||||
__func__, base + offset, bit, want);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
/* Enable a peripheral clock */
|
||||
static int peri_clk_enable(struct clk *c, int enable)
|
||||
{
|
||||
int ret = 0;
|
||||
u32 reg;
|
||||
struct peri_clock *peri_clk = to_peri_clk(c);
|
||||
struct peri_clk_data *cd = peri_clk->data;
|
||||
struct bcm_clk_gate *gate = &cd->gate;
|
||||
void *base = (void *)c->ccu_clk_mgr_base;
|
||||
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
|
||||
clk_get_rate(c); /* Make sure rate and sel are filled in */
|
||||
|
||||
/* enable access */
|
||||
writel(CLK_WR_ACCESS_PASSWORD, base + WR_ACCESS_OFFSET);
|
||||
|
||||
if (enable) {
|
||||
debug("%s %s set rate %lu div %lu sel %d parent %lu\n",
|
||||
__func__, c->name, c->rate, c->div, c->sel,
|
||||
c->parent->rate);
|
||||
|
||||
/*
|
||||
* clkgate - only software controllable gates are
|
||||
* supported by u-boot which includes all clocks
|
||||
* that matter. This avoids bringing in a lot of extra
|
||||
* complexity as done in the kernel framework.
|
||||
*/
|
||||
if (gate_exists(gate)) {
|
||||
reg = readl(base + cd->gate.offset);
|
||||
reg |= (1 << cd->gate.en_bit);
|
||||
writel(reg, base + cd->gate.offset);
|
||||
}
|
||||
|
||||
/* div and pll select */
|
||||
if (divider_exists(&cd->div)) {
|
||||
reg = readl(base + cd->div.offset);
|
||||
bitfield_replace(reg, cd->div.shift, cd->div.width,
|
||||
c->div - 1);
|
||||
writel(reg, base + cd->div.offset);
|
||||
}
|
||||
|
||||
/* frequency selector */
|
||||
if (selector_exists(&cd->sel)) {
|
||||
reg = readl(base + cd->sel.offset);
|
||||
bitfield_replace(reg, cd->sel.shift, cd->sel.width,
|
||||
c->sel);
|
||||
writel(reg, base + cd->sel.offset);
|
||||
}
|
||||
|
||||
/* trigger */
|
||||
if (trigger_exists(&cd->trig)) {
|
||||
writel((1 << cd->trig.bit), base + cd->trig.offset);
|
||||
|
||||
/* wait for trigger status bit to go to 0 */
|
||||
ret = wait_bit(base, cd->trig.offset, cd->trig.bit, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* wait for running (status_bit = 1) */
|
||||
ret = wait_bit(base, cd->gate.offset, cd->gate.status_bit, 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
debug("%s disable clock %s\n", __func__, c->name);
|
||||
|
||||
/* clkgate */
|
||||
reg = readl(base + cd->gate.offset);
|
||||
reg &= ~(1 << cd->gate.en_bit);
|
||||
writel(reg, base + cd->gate.offset);
|
||||
|
||||
/* wait for stop (status_bit = 0) */
|
||||
ret = wait_bit(base, cd->gate.offset, cd->gate.status_bit, 0);
|
||||
}
|
||||
|
||||
/* disable access */
|
||||
writel(0, base + WR_ACCESS_OFFSET);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Set the rate of a peripheral clock */
|
||||
static int peri_clk_set_rate(struct clk *c, unsigned long rate)
|
||||
{
|
||||
int ret = 0;
|
||||
int i;
|
||||
unsigned long diff;
|
||||
unsigned long new_rate = 0, div = 1;
|
||||
struct peri_clock *peri_clk = to_peri_clk(c);
|
||||
struct peri_clk_data *cd = peri_clk->data;
|
||||
const char **clock;
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
diff = rate;
|
||||
|
||||
i = 0;
|
||||
for (clock = cd->clocks; *clock; clock++, i++) {
|
||||
struct refclk *ref = refclk_str_to_clk(*clock);
|
||||
if (!ref) {
|
||||
printf("%s: Lookup of %s failed\n", __func__, *clock);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* round to the new rate */
|
||||
div = ref->clk.rate / rate;
|
||||
if (div == 0)
|
||||
div = 1;
|
||||
|
||||
new_rate = ref->clk.rate / div;
|
||||
|
||||
/* get the min diff */
|
||||
if (abs(new_rate - rate) < diff) {
|
||||
diff = abs(new_rate - rate);
|
||||
c->sel = i;
|
||||
c->parent = &ref->clk;
|
||||
c->rate = new_rate;
|
||||
c->div = div;
|
||||
}
|
||||
}
|
||||
|
||||
debug("%s %s set rate %lu div %lu sel %d parent %lu\n", __func__,
|
||||
c->name, c->rate, c->div, c->sel, c->parent->rate);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get the rate of a peripheral clock */
|
||||
static unsigned long peri_clk_get_rate(struct clk *c)
|
||||
{
|
||||
struct peri_clock *peri_clk = to_peri_clk(c);
|
||||
struct peri_clk_data *cd = peri_clk->data;
|
||||
void *base = (void *)c->ccu_clk_mgr_base;
|
||||
int div = 1;
|
||||
const char **clock;
|
||||
struct refclk *ref;
|
||||
u32 reg;
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
if (selector_exists(&cd->sel)) {
|
||||
reg = readl(base + cd->sel.offset);
|
||||
c->sel = bitfield_extract(reg, cd->sel.shift, cd->sel.width);
|
||||
} else {
|
||||
/*
|
||||
* For peri clocks that don't have a selector, the single
|
||||
* reference clock will always exist at index 0.
|
||||
*/
|
||||
c->sel = 0;
|
||||
}
|
||||
|
||||
if (divider_exists(&cd->div)) {
|
||||
reg = readl(base + cd->div.offset);
|
||||
div = bitfield_extract(reg, cd->div.shift, cd->div.width);
|
||||
div += 1;
|
||||
}
|
||||
|
||||
clock = cd->clocks;
|
||||
ref = refclk_str_to_clk(clock[c->sel]);
|
||||
if (!ref) {
|
||||
printf("%s: Can't lookup %s\n", __func__, clock[c->sel]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
c->parent = &ref->clk;
|
||||
c->div = div;
|
||||
c->rate = c->parent->rate / c->div;
|
||||
debug("%s parent rate %lu div %d sel %d rate %lu\n", __func__,
|
||||
c->parent->rate, div, c->sel, c->rate);
|
||||
|
||||
return c->rate;
|
||||
}
|
||||
|
||||
/* Peripheral clock operations */
|
||||
struct clk_ops peri_clk_ops = {
|
||||
.enable = peri_clk_enable,
|
||||
.set_rate = peri_clk_set_rate,
|
||||
.get_rate = peri_clk_get_rate,
|
||||
};
|
||||
|
||||
/* Enable a CCU clock */
|
||||
static int ccu_clk_enable(struct clk *c, int enable)
|
||||
{
|
||||
struct ccu_clock *ccu_clk = to_ccu_clk(c);
|
||||
void *base = (void *)c->ccu_clk_mgr_base;
|
||||
int ret = 0;
|
||||
u32 reg;
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
if (!enable)
|
||||
return -EINVAL; /* CCU clock cannot shutdown */
|
||||
|
||||
/* enable access */
|
||||
writel(CLK_WR_ACCESS_PASSWORD, base + WR_ACCESS_OFFSET);
|
||||
|
||||
/* config enable for policy engine */
|
||||
writel(1, base + ccu_clk->lvm_en_offset);
|
||||
|
||||
/* wait for bit to go to 0 */
|
||||
ret = wait_bit(base, ccu_clk->lvm_en_offset, 0, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* freq ID */
|
||||
if (!ccu_clk->freq_bit_shift)
|
||||
ccu_clk->freq_bit_shift = 8;
|
||||
|
||||
/* Set frequency id for each of the 4 policies */
|
||||
reg = ccu_clk->freq_id |
|
||||
(ccu_clk->freq_id << (ccu_clk->freq_bit_shift)) |
|
||||
(ccu_clk->freq_id << (ccu_clk->freq_bit_shift * 2)) |
|
||||
(ccu_clk->freq_id << (ccu_clk->freq_bit_shift * 3));
|
||||
writel(reg, base + ccu_clk->policy_freq_offset);
|
||||
|
||||
/* enable all clock mask */
|
||||
writel(0x7fffffff, base + ccu_clk->policy0_mask_offset);
|
||||
writel(0x7fffffff, base + ccu_clk->policy1_mask_offset);
|
||||
writel(0x7fffffff, base + ccu_clk->policy2_mask_offset);
|
||||
writel(0x7fffffff, base + ccu_clk->policy3_mask_offset);
|
||||
|
||||
if (ccu_clk->num_policy_masks == 2) {
|
||||
writel(0x7fffffff, base + ccu_clk->policy0_mask2_offset);
|
||||
writel(0x7fffffff, base + ccu_clk->policy1_mask2_offset);
|
||||
writel(0x7fffffff, base + ccu_clk->policy2_mask2_offset);
|
||||
writel(0x7fffffff, base + ccu_clk->policy3_mask2_offset);
|
||||
}
|
||||
|
||||
/* start policy engine */
|
||||
reg = readl(base + ccu_clk->policy_ctl_offset);
|
||||
reg |= (POLICY_CTL_GO + POLICY_CTL_GO_ATL);
|
||||
writel(reg, base + ccu_clk->policy_ctl_offset);
|
||||
|
||||
/* wait till started */
|
||||
ret = wait_bit(base, ccu_clk->policy_ctl_offset, 0, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* disable access */
|
||||
writel(0, base + WR_ACCESS_OFFSET);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get the CCU clock rate */
|
||||
static unsigned long ccu_clk_get_rate(struct clk *c)
|
||||
{
|
||||
struct ccu_clock *ccu_clk = to_ccu_clk(c);
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
c->rate = ccu_clk->freq_tbl[ccu_clk->freq_id];
|
||||
return c->rate;
|
||||
}
|
||||
|
||||
/* CCU clock operations */
|
||||
struct clk_ops ccu_clk_ops = {
|
||||
.enable = ccu_clk_enable,
|
||||
.get_rate = ccu_clk_get_rate,
|
||||
};
|
||||
|
||||
/* Enable a bus clock */
|
||||
static int bus_clk_enable(struct clk *c, int enable)
|
||||
{
|
||||
struct bus_clock *bus_clk = to_bus_clk(c);
|
||||
struct bus_clk_data *cd = bus_clk->data;
|
||||
void *base = (void *)c->ccu_clk_mgr_base;
|
||||
int ret = 0;
|
||||
u32 reg;
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
/* enable access */
|
||||
writel(CLK_WR_ACCESS_PASSWORD, base + WR_ACCESS_OFFSET);
|
||||
|
||||
/* enable gating */
|
||||
reg = readl(base + cd->gate.offset);
|
||||
if (!!(reg & (1 << cd->gate.status_bit)) == !!enable)
|
||||
debug("%s already %s\n", c->name,
|
||||
enable ? "enabled" : "disabled");
|
||||
else {
|
||||
int want = (enable) ? 1 : 0;
|
||||
reg |= (1 << cd->gate.hw_sw_sel_bit);
|
||||
|
||||
if (enable)
|
||||
reg |= (1 << cd->gate.en_bit);
|
||||
else
|
||||
reg &= ~(1 << cd->gate.en_bit);
|
||||
|
||||
writel(reg, base + cd->gate.offset);
|
||||
ret = wait_bit(base, cd->gate.offset, cd->gate.status_bit,
|
||||
want);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* disable access */
|
||||
writel(0, base + WR_ACCESS_OFFSET);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get the rate of a bus clock */
|
||||
static unsigned long bus_clk_get_rate(struct clk *c)
|
||||
{
|
||||
struct bus_clock *bus_clk = to_bus_clk(c);
|
||||
struct ccu_clock *ccu_clk;
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
ccu_clk = to_ccu_clk(c->parent);
|
||||
|
||||
c->rate = bus_clk->freq_tbl[ccu_clk->freq_id];
|
||||
c->div = ccu_clk->freq_tbl[ccu_clk->freq_id] / c->rate;
|
||||
return c->rate;
|
||||
}
|
||||
|
||||
/* Bus clock operations */
|
||||
struct clk_ops bus_clk_ops = {
|
||||
.enable = bus_clk_enable,
|
||||
.get_rate = bus_clk_get_rate,
|
||||
};
|
||||
|
||||
/* Enable a reference clock */
|
||||
static int ref_clk_enable(struct clk *c, int enable)
|
||||
{
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Reference clock operations */
|
||||
struct clk_ops ref_clk_ops = {
|
||||
.enable = ref_clk_enable,
|
||||
};
|
||||
|
||||
/*
|
||||
* clk.h implementation follows
|
||||
*/
|
||||
|
||||
/* Initialize the clock framework */
|
||||
int clk_init(void)
|
||||
{
|
||||
debug("%s:\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get a clock handle, give a name string */
|
||||
struct clk *clk_get(const char *con_id)
|
||||
{
|
||||
int i;
|
||||
struct clk_lookup *clk_tblp;
|
||||
|
||||
debug("%s: %s\n", __func__, con_id);
|
||||
|
||||
clk_tblp = arch_clk_tbl;
|
||||
for (i = 0; i < arch_clk_tbl_array_size; i++, clk_tblp++) {
|
||||
if (clk_tblp->con_id) {
|
||||
if (!con_id || strcmp(clk_tblp->con_id, con_id))
|
||||
continue;
|
||||
return clk_tblp->clk;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Enable a clock */
|
||||
int clk_enable(struct clk *c)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
if (!c->ops || !c->ops->enable)
|
||||
return -1;
|
||||
|
||||
/* enable parent clock first */
|
||||
if (c->parent)
|
||||
ret = clk_enable(c->parent);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!c->use_cnt)
|
||||
ret = c->ops->enable(c, 1);
|
||||
c->use_cnt++;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Disable a clock */
|
||||
void clk_disable(struct clk *c)
|
||||
{
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
if (!c->ops || !c->ops->enable)
|
||||
return;
|
||||
|
||||
if (c->use_cnt > 0) {
|
||||
c->use_cnt--;
|
||||
if (c->use_cnt == 0)
|
||||
c->ops->enable(c, 0);
|
||||
}
|
||||
|
||||
/* disable parent */
|
||||
if (c->parent)
|
||||
clk_disable(c->parent);
|
||||
}
|
||||
|
||||
/* Get the clock rate */
|
||||
unsigned long clk_get_rate(struct clk *c)
|
||||
{
|
||||
unsigned long rate;
|
||||
|
||||
debug("%s: %s\n", __func__, c->name);
|
||||
if (!c || !c->ops || !c->ops->get_rate)
|
||||
return 0;
|
||||
|
||||
rate = c->ops->get_rate(c);
|
||||
debug("%s: rate = %ld\n", __func__, rate);
|
||||
return rate;
|
||||
}
|
||||
|
||||
/* Set the clock rate */
|
||||
int clk_set_rate(struct clk *c, unsigned long rate)
|
||||
{
|
||||
int ret;
|
||||
|
||||
debug("%s: %s rate=%ld\n", __func__, c->name, rate);
|
||||
if (!c || !c->ops || !c->ops->set_rate)
|
||||
return -EINVAL;
|
||||
|
||||
if (c->use_cnt)
|
||||
return -EINVAL;
|
||||
|
||||
ret = c->ops->set_rate(c, rate);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Not required for this arch */
|
||||
/*
|
||||
long clk_round_rate(struct clk *clk, unsigned long rate);
|
||||
int clk_set_parent(struct clk *clk, struct clk *parent);
|
||||
struct clk *clk_get_parent(struct clk *clk);
|
||||
*/
|
||||
491
arch/arm/cpu/armv7/bcm235xx/clk-core.h
Normal file
491
arch/arm/cpu/armv7/bcm235xx/clk-core.h
Normal file
@@ -0,0 +1,491 @@
|
||||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <linux/stddef.h>
|
||||
|
||||
#ifdef CONFIG_CLK_DEBUG
|
||||
#undef writel
|
||||
#undef readl
|
||||
static inline void writel(u32 val, void *addr)
|
||||
{
|
||||
printf("Write [0x%p] = 0x%08x\n", addr, val);
|
||||
*(u32 *)addr = val;
|
||||
}
|
||||
|
||||
static inline u32 readl(void *addr)
|
||||
{
|
||||
u32 val = *(u32 *)addr;
|
||||
printf("Read [0x%p] = 0x%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct clk;
|
||||
|
||||
struct clk_lookup {
|
||||
const char *dev_id;
|
||||
const char *con_id;
|
||||
struct clk *clk;
|
||||
};
|
||||
|
||||
extern struct clk_lookup arch_clk_tbl[];
|
||||
extern unsigned int arch_clk_tbl_array_size;
|
||||
|
||||
/**
|
||||
* struct clk_ops - standard clock operations
|
||||
* @enable: enable/disable clock, see clk_enable() and clk_disable()
|
||||
* @set_rate: set the clock rate, see clk_set_rate().
|
||||
* @get_rate: get the clock rate, see clk_get_rate().
|
||||
* @round_rate: round a given clock rate, see clk_round_rate().
|
||||
* @set_parent: set the clock's parent, see clk_set_parent().
|
||||
*
|
||||
* Group the common clock implementations together so that we
|
||||
* don't have to keep setting the same fiels again. We leave
|
||||
* enable in struct clk.
|
||||
*
|
||||
*/
|
||||
struct clk_ops {
|
||||
int (*enable)(struct clk *c, int enable);
|
||||
int (*set_rate)(struct clk *c, unsigned long rate);
|
||||
unsigned long (*get_rate)(struct clk *c);
|
||||
unsigned long (*round_rate)(struct clk *c, unsigned long rate);
|
||||
int (*set_parent)(struct clk *c, struct clk *parent);
|
||||
};
|
||||
|
||||
struct clk {
|
||||
struct clk *parent;
|
||||
const char *name;
|
||||
int use_cnt;
|
||||
unsigned long rate; /* in HZ */
|
||||
|
||||
/* programmable divider. 0 means fixed ratio to parent clock */
|
||||
unsigned long div;
|
||||
|
||||
struct clk_src *src;
|
||||
struct clk_ops *ops;
|
||||
|
||||
unsigned long ccu_clk_mgr_base;
|
||||
int sel;
|
||||
};
|
||||
|
||||
struct refclk *refclk_str_to_clk(const char *name);
|
||||
|
||||
/* The common clock framework uses u8 to represent a parent index */
|
||||
#define PARENT_COUNT_MAX ((u32)U8_MAX)
|
||||
|
||||
#define BAD_CLK_INDEX U8_MAX /* Can't ever be valid */
|
||||
#define BAD_CLK_NAME ((const char *)-1)
|
||||
|
||||
#define BAD_SCALED_DIV_VALUE U64_MAX
|
||||
|
||||
/*
|
||||
* Utility macros for object flag management. If possible, flags
|
||||
* should be defined such that 0 is the desired default value.
|
||||
*/
|
||||
#define FLAG(type, flag) BCM_CLK_ ## type ## _FLAGS_ ## flag
|
||||
#define FLAG_SET(obj, type, flag) ((obj)->flags |= FLAG(type, flag))
|
||||
#define FLAG_CLEAR(obj, type, flag) ((obj)->flags &= ~(FLAG(type, flag)))
|
||||
#define FLAG_FLIP(obj, type, flag) ((obj)->flags ^= FLAG(type, flag))
|
||||
#define FLAG_TEST(obj, type, flag) (!!((obj)->flags & FLAG(type, flag)))
|
||||
|
||||
/* Clock field state tests */
|
||||
|
||||
#define gate_exists(gate) FLAG_TEST(gate, GATE, EXISTS)
|
||||
#define gate_is_enabled(gate) FLAG_TEST(gate, GATE, ENABLED)
|
||||
#define gate_is_hw_controllable(gate) FLAG_TEST(gate, GATE, HW)
|
||||
#define gate_is_sw_controllable(gate) FLAG_TEST(gate, GATE, SW)
|
||||
#define gate_is_sw_managed(gate) FLAG_TEST(gate, GATE, SW_MANAGED)
|
||||
#define gate_is_no_disable(gate) FLAG_TEST(gate, GATE, NO_DISABLE)
|
||||
|
||||
#define gate_flip_enabled(gate) FLAG_FLIP(gate, GATE, ENABLED)
|
||||
|
||||
#define divider_exists(div) FLAG_TEST(div, DIV, EXISTS)
|
||||
#define divider_is_fixed(div) FLAG_TEST(div, DIV, FIXED)
|
||||
#define divider_has_fraction(div) (!divider_is_fixed(div) && \
|
||||
(div)->frac_width > 0)
|
||||
|
||||
#define selector_exists(sel) ((sel)->width != 0)
|
||||
#define trigger_exists(trig) FLAG_TEST(trig, TRIG, EXISTS)
|
||||
|
||||
/* Clock type, used to tell common block what it's part of */
|
||||
enum bcm_clk_type {
|
||||
bcm_clk_none, /* undefined clock type */
|
||||
bcm_clk_bus,
|
||||
bcm_clk_core,
|
||||
bcm_clk_peri
|
||||
};
|
||||
|
||||
/*
|
||||
* Gating control and status is managed by a 32-bit gate register.
|
||||
*
|
||||
* There are several types of gating available:
|
||||
* - (no gate)
|
||||
* A clock with no gate is assumed to be always enabled.
|
||||
* - hardware-only gating (auto-gating)
|
||||
* Enabling or disabling clocks with this type of gate is
|
||||
* managed automatically by the hardware. Such clocks can be
|
||||
* considered by the software to be enabled. The current status
|
||||
* of auto-gated clocks can be read from the gate status bit.
|
||||
* - software-only gating
|
||||
* Auto-gating is not available for this type of clock.
|
||||
* Instead, software manages whether it's enabled by setting or
|
||||
* clearing the enable bit. The current gate status of a gate
|
||||
* under software control can be read from the gate status bit.
|
||||
* To ensure a change to the gating status is complete, the
|
||||
* status bit can be polled to verify that the gate has entered
|
||||
* the desired state.
|
||||
* - selectable hardware or software gating
|
||||
* Gating for this type of clock can be configured to be either
|
||||
* under software or hardware control. Which type is in use is
|
||||
* determined by the hw_sw_sel bit of the gate register.
|
||||
*/
|
||||
struct bcm_clk_gate {
|
||||
u32 offset; /* gate register offset */
|
||||
u32 status_bit; /* 0: gate is disabled; 0: gatge is enabled */
|
||||
u32 en_bit; /* 0: disable; 1: enable */
|
||||
u32 hw_sw_sel_bit; /* 0: hardware gating; 1: software gating */
|
||||
u32 flags; /* BCM_CLK_GATE_FLAGS_* below */
|
||||
};
|
||||
|
||||
/*
|
||||
* Gate flags:
|
||||
* HW means this gate can be auto-gated
|
||||
* SW means the state of this gate can be software controlled
|
||||
* NO_DISABLE means this gate is (only) enabled if under software control
|
||||
* SW_MANAGED means the status of this gate is under software control
|
||||
* ENABLED means this software-managed gate is *supposed* to be enabled
|
||||
*/
|
||||
#define BCM_CLK_GATE_FLAGS_EXISTS ((u32)1 << 0) /* Gate is valid */
|
||||
#define BCM_CLK_GATE_FLAGS_HW ((u32)1 << 1) /* Can auto-gate */
|
||||
#define BCM_CLK_GATE_FLAGS_SW ((u32)1 << 2) /* Software control */
|
||||
#define BCM_CLK_GATE_FLAGS_NO_DISABLE ((u32)1 << 3) /* HW or enabled */
|
||||
#define BCM_CLK_GATE_FLAGS_SW_MANAGED ((u32)1 << 4) /* SW now in control */
|
||||
#define BCM_CLK_GATE_FLAGS_ENABLED ((u32)1 << 5) /* If SW_MANAGED */
|
||||
|
||||
/*
|
||||
* Gate initialization macros.
|
||||
*
|
||||
* Any gate initially under software control will be enabled.
|
||||
*/
|
||||
|
||||
/* A hardware/software gate initially under software control */
|
||||
#define HW_SW_GATE(_offset, _status_bit, _en_bit, _hw_sw_sel_bit) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.status_bit = (_status_bit), \
|
||||
.en_bit = (_en_bit), \
|
||||
.hw_sw_sel_bit = (_hw_sw_sel_bit), \
|
||||
.flags = FLAG(GATE, HW)|FLAG(GATE, SW)| \
|
||||
FLAG(GATE, SW_MANAGED)|FLAG(GATE, ENABLED)| \
|
||||
FLAG(GATE, EXISTS), \
|
||||
}
|
||||
|
||||
/* A hardware/software gate initially under hardware control */
|
||||
#define HW_SW_GATE_AUTO(_offset, _status_bit, _en_bit, _hw_sw_sel_bit) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.status_bit = (_status_bit), \
|
||||
.en_bit = (_en_bit), \
|
||||
.hw_sw_sel_bit = (_hw_sw_sel_bit), \
|
||||
.flags = FLAG(GATE, HW)|FLAG(GATE, SW)| \
|
||||
FLAG(GATE, EXISTS), \
|
||||
}
|
||||
|
||||
/* A hardware-or-enabled gate (enabled if not under hardware control) */
|
||||
#define HW_ENABLE_GATE(_offset, _status_bit, _en_bit, _hw_sw_sel_bit) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.status_bit = (_status_bit), \
|
||||
.en_bit = (_en_bit), \
|
||||
.hw_sw_sel_bit = (_hw_sw_sel_bit), \
|
||||
.flags = FLAG(GATE, HW)|FLAG(GATE, SW)| \
|
||||
FLAG(GATE, NO_DISABLE)|FLAG(GATE, EXISTS), \
|
||||
}
|
||||
|
||||
/* A software-only gate */
|
||||
#define SW_ONLY_GATE(_offset, _status_bit, _en_bit) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.status_bit = (_status_bit), \
|
||||
.en_bit = (_en_bit), \
|
||||
.flags = FLAG(GATE, SW)|FLAG(GATE, SW_MANAGED)| \
|
||||
FLAG(GATE, ENABLED)|FLAG(GATE, EXISTS), \
|
||||
}
|
||||
|
||||
/* A hardware-only gate */
|
||||
#define HW_ONLY_GATE(_offset, _status_bit) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.status_bit = (_status_bit), \
|
||||
.flags = FLAG(GATE, HW)|FLAG(GATE, EXISTS), \
|
||||
}
|
||||
|
||||
/*
|
||||
* Each clock can have zero, one, or two dividers which change the
|
||||
* output rate of the clock. Each divider can be either fixed or
|
||||
* variable. If there are two dividers, they are the "pre-divider"
|
||||
* and the "regular" or "downstream" divider. If there is only one,
|
||||
* there is no pre-divider.
|
||||
*
|
||||
* A fixed divider is any non-zero (positive) value, and it
|
||||
* indicates how the input rate is affected by the divider.
|
||||
*
|
||||
* The value of a variable divider is maintained in a sub-field of a
|
||||
* 32-bit divider register. The position of the field in the
|
||||
* register is defined by its offset and width. The value recorded
|
||||
* in this field is always 1 less than the value it represents.
|
||||
*
|
||||
* In addition, a variable divider can indicate that some subset
|
||||
* of its bits represent a "fractional" part of the divider. Such
|
||||
* bits comprise the low-order portion of the divider field, and can
|
||||
* be viewed as representing the portion of the divider that lies to
|
||||
* the right of the decimal point. Most variable dividers have zero
|
||||
* fractional bits. Variable dividers with non-zero fraction width
|
||||
* still record a value 1 less than the value they represent; the
|
||||
* added 1 does *not* affect the low-order bit in this case, it
|
||||
* affects the bits above the fractional part only. (Often in this
|
||||
* code a divider field value is distinguished from the value it
|
||||
* represents by referring to the latter as a "divisor".)
|
||||
*
|
||||
* In order to avoid dealing with fractions, divider arithmetic is
|
||||
* performed using "scaled" values. A scaled value is one that's
|
||||
* been left-shifted by the fractional width of a divider. Dividing
|
||||
* a scaled value by a scaled divisor produces the desired quotient
|
||||
* without loss of precision and without any other special handling
|
||||
* for fractions.
|
||||
*
|
||||
* The recorded value of a variable divider can be modified. To
|
||||
* modify either divider (or both), a clock must be enabled (i.e.,
|
||||
* using its gate). In addition, a trigger register (described
|
||||
* below) must be used to commit the change, and polled to verify
|
||||
* the change is complete.
|
||||
*/
|
||||
struct bcm_clk_div {
|
||||
union {
|
||||
struct { /* variable divider */
|
||||
u32 offset; /* divider register offset */
|
||||
u32 shift; /* field shift */
|
||||
u32 width; /* field width */
|
||||
u32 frac_width; /* field fraction width */
|
||||
|
||||
u64 scaled_div; /* scaled divider value */
|
||||
};
|
||||
u32 fixed; /* non-zero fixed divider value */
|
||||
};
|
||||
u32 flags; /* BCM_CLK_DIV_FLAGS_* below */
|
||||
};
|
||||
|
||||
/*
|
||||
* Divider flags:
|
||||
* EXISTS means this divider exists
|
||||
* FIXED means it is a fixed-rate divider
|
||||
*/
|
||||
#define BCM_CLK_DIV_FLAGS_EXISTS ((u32)1 << 0) /* Divider is valid */
|
||||
#define BCM_CLK_DIV_FLAGS_FIXED ((u32)1 << 1) /* Fixed-value */
|
||||
|
||||
/* Divider initialization macros */
|
||||
|
||||
/* A fixed (non-zero) divider */
|
||||
#define FIXED_DIVIDER(_value) \
|
||||
{ \
|
||||
.fixed = (_value), \
|
||||
.flags = FLAG(DIV, EXISTS)|FLAG(DIV, FIXED), \
|
||||
}
|
||||
|
||||
/* A divider with an integral divisor */
|
||||
#define DIVIDER(_offset, _shift, _width) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.shift = (_shift), \
|
||||
.width = (_width), \
|
||||
.scaled_div = BAD_SCALED_DIV_VALUE, \
|
||||
.flags = FLAG(DIV, EXISTS), \
|
||||
}
|
||||
|
||||
/* A divider whose divisor has an integer and fractional part */
|
||||
#define FRAC_DIVIDER(_offset, _shift, _width, _frac_width) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.shift = (_shift), \
|
||||
.width = (_width), \
|
||||
.frac_width = (_frac_width), \
|
||||
.scaled_div = BAD_SCALED_DIV_VALUE, \
|
||||
.flags = FLAG(DIV, EXISTS), \
|
||||
}
|
||||
|
||||
/*
|
||||
* Clocks may have multiple "parent" clocks. If there is more than
|
||||
* one, a selector must be specified to define which of the parent
|
||||
* clocks is currently in use. The selected clock is indicated in a
|
||||
* sub-field of a 32-bit selector register. The range of
|
||||
* representable selector values typically exceeds the number of
|
||||
* available parent clocks. Occasionally the reset value of a
|
||||
* selector field is explicitly set to a (specific) value that does
|
||||
* not correspond to a defined input clock.
|
||||
*
|
||||
* We register all known parent clocks with the common clock code
|
||||
* using a packed array (i.e., no empty slots) of (parent) clock
|
||||
* names, and refer to them later using indexes into that array.
|
||||
* We maintain an array of selector values indexed by common clock
|
||||
* index values in order to map between these common clock indexes
|
||||
* and the selector values used by the hardware.
|
||||
*
|
||||
* Like dividers, a selector can be modified, but to do so a clock
|
||||
* must be enabled, and a trigger must be used to commit the change.
|
||||
*/
|
||||
struct bcm_clk_sel {
|
||||
u32 offset; /* selector register offset */
|
||||
u32 shift; /* field shift */
|
||||
u32 width; /* field width */
|
||||
|
||||
u32 parent_count; /* number of entries in parent_sel[] */
|
||||
u32 *parent_sel; /* array of parent selector values */
|
||||
u8 clk_index; /* current selected index in parent_sel[] */
|
||||
};
|
||||
|
||||
/* Selector initialization macro */
|
||||
#define SELECTOR(_offset, _shift, _width) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.shift = (_shift), \
|
||||
.width = (_width), \
|
||||
.clk_index = BAD_CLK_INDEX, \
|
||||
}
|
||||
|
||||
/*
|
||||
* Making changes to a variable divider or a selector for a clock
|
||||
* requires the use of a trigger. A trigger is defined by a single
|
||||
* bit within a register. To signal a change, a 1 is written into
|
||||
* that bit. To determine when the change has been completed, that
|
||||
* trigger bit is polled; the read value will be 1 while the change
|
||||
* is in progress, and 0 when it is complete.
|
||||
*
|
||||
* Occasionally a clock will have more than one trigger. In this
|
||||
* case, the "pre-trigger" will be used when changing a clock's
|
||||
* selector and/or its pre-divider.
|
||||
*/
|
||||
struct bcm_clk_trig {
|
||||
u32 offset; /* trigger register offset */
|
||||
u32 bit; /* trigger bit */
|
||||
u32 flags; /* BCM_CLK_TRIG_FLAGS_* below */
|
||||
};
|
||||
|
||||
/*
|
||||
* Trigger flags:
|
||||
* EXISTS means this trigger exists
|
||||
*/
|
||||
#define BCM_CLK_TRIG_FLAGS_EXISTS ((u32)1 << 0) /* Trigger is valid */
|
||||
|
||||
/* Trigger initialization macro */
|
||||
#define TRIGGER(_offset, _bit) \
|
||||
{ \
|
||||
.offset = (_offset), \
|
||||
.bit = (_bit), \
|
||||
.flags = FLAG(TRIG, EXISTS), \
|
||||
}
|
||||
|
||||
struct bus_clk_data {
|
||||
struct bcm_clk_gate gate;
|
||||
};
|
||||
|
||||
struct core_clk_data {
|
||||
struct bcm_clk_gate gate;
|
||||
};
|
||||
|
||||
struct peri_clk_data {
|
||||
struct bcm_clk_gate gate;
|
||||
struct bcm_clk_trig pre_trig;
|
||||
struct bcm_clk_div pre_div;
|
||||
struct bcm_clk_trig trig;
|
||||
struct bcm_clk_div div;
|
||||
struct bcm_clk_sel sel;
|
||||
const char *clocks[]; /* must be last; use CLOCKS() to declare */
|
||||
};
|
||||
#define CLOCKS(...) { __VA_ARGS__, NULL, }
|
||||
#define NO_CLOCKS { NULL, } /* Must use of no parent clocks */
|
||||
|
||||
struct refclk {
|
||||
struct clk clk;
|
||||
};
|
||||
|
||||
struct peri_clock {
|
||||
struct clk clk;
|
||||
struct peri_clk_data *data;
|
||||
};
|
||||
|
||||
struct ccu_clock {
|
||||
struct clk clk;
|
||||
|
||||
int num_policy_masks;
|
||||
unsigned long policy_freq_offset;
|
||||
int freq_bit_shift; /* 8 for most CCUs */
|
||||
unsigned long policy_ctl_offset;
|
||||
unsigned long policy0_mask_offset;
|
||||
unsigned long policy1_mask_offset;
|
||||
unsigned long policy2_mask_offset;
|
||||
unsigned long policy3_mask_offset;
|
||||
unsigned long policy0_mask2_offset;
|
||||
unsigned long policy1_mask2_offset;
|
||||
unsigned long policy2_mask2_offset;
|
||||
unsigned long policy3_mask2_offset;
|
||||
unsigned long lvm_en_offset;
|
||||
|
||||
int freq_id;
|
||||
unsigned long *freq_tbl;
|
||||
};
|
||||
|
||||
struct bus_clock {
|
||||
struct clk clk;
|
||||
struct bus_clk_data *data;
|
||||
unsigned long *freq_tbl;
|
||||
};
|
||||
|
||||
struct ref_clock {
|
||||
struct clk clk;
|
||||
};
|
||||
|
||||
static inline int is_same_clock(struct clk *a, struct clk *b)
|
||||
{
|
||||
return a == b;
|
||||
}
|
||||
|
||||
#define to_clk(p) (&((p)->clk))
|
||||
#define name_to_clk(name) (&((name##_clk).clk))
|
||||
/* declare a struct clk_lookup */
|
||||
#define CLK_LK(name) \
|
||||
{.con_id = __stringify(name##_clk), .clk = name_to_clk(name),}
|
||||
|
||||
static inline struct refclk *to_refclk(struct clk *clock)
|
||||
{
|
||||
return container_of(clock, struct refclk, clk);
|
||||
}
|
||||
|
||||
static inline struct peri_clock *to_peri_clk(struct clk *clock)
|
||||
{
|
||||
return container_of(clock, struct peri_clock, clk);
|
||||
}
|
||||
|
||||
static inline struct ccu_clock *to_ccu_clk(struct clk *clock)
|
||||
{
|
||||
return container_of(clock, struct ccu_clock, clk);
|
||||
}
|
||||
|
||||
static inline struct bus_clock *to_bus_clk(struct clk *clock)
|
||||
{
|
||||
return container_of(clock, struct bus_clock, clk);
|
||||
}
|
||||
|
||||
static inline struct ref_clock *to_ref_clk(struct clk *clock)
|
||||
{
|
||||
return container_of(clock, struct ref_clock, clk);
|
||||
}
|
||||
|
||||
extern struct clk_ops peri_clk_ops;
|
||||
extern struct clk_ops ccu_clk_ops;
|
||||
extern struct clk_ops bus_clk_ops;
|
||||
extern struct clk_ops ref_clk_ops;
|
||||
|
||||
int clk_get_and_enable(char *clkstr);
|
||||
143
arch/arm/cpu/armv7/bcm235xx/clk-eth.c
Normal file
143
arch/arm/cpu/armv7/bcm235xx/clk-eth.c
Normal file
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright 2014 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/arch/sysmap.h>
|
||||
#include <asm/kona-common/clk.h>
|
||||
#include "clk-core.h"
|
||||
|
||||
#define WR_ACCESS_ADDR ESUB_CLK_BASE_ADDR
|
||||
#define WR_ACCESS_PASSWORD 0xA5A500
|
||||
|
||||
#define PLLE_POST_RESETB_ADDR (ESUB_CLK_BASE_ADDR + 0x00000C00)
|
||||
|
||||
#define PLLE_RESETB_ADDR (ESUB_CLK_BASE_ADDR + 0x00000C58)
|
||||
#define PLLE_RESETB_I_PLL_RESETB_PLLE_MASK 0x00010000
|
||||
#define PLLE_POST_RESETB_I_POST_RESETB_PLLE_MASK 0x00000001
|
||||
|
||||
#define PLL_LOCK_ADDR (ESUB_CLK_BASE_ADDR + 0x00000C38)
|
||||
#define PLL_LOCK_PLL_LOCK_PLLE_MASK 0x00000001
|
||||
|
||||
#define ESW_SYS_DIV_ADDR (ESUB_CLK_BASE_ADDR + 0x00000A04)
|
||||
#define ESW_SYS_DIV_PLL_SELECT_MASK 0x00000300
|
||||
#define ESW_SYS_DIV_DIV_MASK 0x0000001C
|
||||
#define ESW_SYS_DIV_PLL_VAR_208M_CLK_SELECT 0x00000100
|
||||
#define ESW_SYS_DIV_DIV_SELECT 0x4
|
||||
#define ESW_SYS_DIV_TRIGGER_MASK 0x00000001
|
||||
|
||||
#define ESUB_AXI_DIV_DEBUG_ADDR (ESUB_CLK_BASE_ADDR + 0x00000E04)
|
||||
#define ESUB_AXI_DIV_DEBUG_PLL_SELECT_MASK 0x0000001C
|
||||
#define ESUB_AXI_DIV_DEBUG_PLL_SELECT_OVERRIDE_MASK 0x00000040
|
||||
#define ESUB_AXI_DIV_DEBUG_PLL_VAR_208M_CLK_SELECT 0x0
|
||||
#define ESUB_AXI_DIV_DEBUG_TRIGGER_MASK 0x00000001
|
||||
|
||||
#define PLL_MAX_RETRY 100
|
||||
|
||||
/* Enable appropriate clocks for Ethernet */
|
||||
int clk_eth_enable(void)
|
||||
{
|
||||
int rc = -1;
|
||||
int retry_count = 0;
|
||||
rc = clk_get_and_enable("esub_ccu_clk");
|
||||
|
||||
/* Enable Access to CCU registers */
|
||||
writel((1 | WR_ACCESS_PASSWORD), WR_ACCESS_ADDR);
|
||||
|
||||
writel(readl(PLLE_POST_RESETB_ADDR) &
|
||||
~PLLE_POST_RESETB_I_POST_RESETB_PLLE_MASK,
|
||||
PLLE_POST_RESETB_ADDR);
|
||||
|
||||
/* Take PLL out of reset and put into normal mode */
|
||||
writel(readl(PLLE_RESETB_ADDR) | PLLE_RESETB_I_PLL_RESETB_PLLE_MASK,
|
||||
PLLE_RESETB_ADDR);
|
||||
|
||||
/* Wait for PLL lock */
|
||||
rc = -1;
|
||||
while (retry_count < PLL_MAX_RETRY) {
|
||||
udelay(100);
|
||||
if (readl(PLL_LOCK_ADDR) & PLL_LOCK_PLL_LOCK_PLLE_MASK) {
|
||||
rc = 0;
|
||||
break;
|
||||
}
|
||||
retry_count++;
|
||||
}
|
||||
|
||||
if (rc == -1) {
|
||||
printf("%s: ETH-PLL lock timeout, Ethernet is not enabled!\n",
|
||||
__func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
writel(readl(PLLE_POST_RESETB_ADDR) |
|
||||
PLLE_POST_RESETB_I_POST_RESETB_PLLE_MASK,
|
||||
PLLE_POST_RESETB_ADDR);
|
||||
|
||||
/* Switch esw_sys_clk to use 104MHz(208MHz/2) clock */
|
||||
writel((readl(ESW_SYS_DIV_ADDR) &
|
||||
~(ESW_SYS_DIV_PLL_SELECT_MASK | ESW_SYS_DIV_DIV_MASK)) |
|
||||
ESW_SYS_DIV_PLL_VAR_208M_CLK_SELECT | ESW_SYS_DIV_DIV_SELECT,
|
||||
ESW_SYS_DIV_ADDR);
|
||||
|
||||
writel(readl(ESW_SYS_DIV_ADDR) | ESW_SYS_DIV_TRIGGER_MASK,
|
||||
ESW_SYS_DIV_ADDR);
|
||||
|
||||
/* Wait for trigger complete */
|
||||
rc = -1;
|
||||
retry_count = 0;
|
||||
while (retry_count < PLL_MAX_RETRY) {
|
||||
udelay(100);
|
||||
if (!(readl(ESW_SYS_DIV_ADDR) & ESW_SYS_DIV_TRIGGER_MASK)) {
|
||||
rc = 0;
|
||||
break;
|
||||
}
|
||||
retry_count++;
|
||||
}
|
||||
|
||||
if (rc == -1) {
|
||||
printf("%s: SYS CLK Trigger timeout, Ethernet is not enabled!\n",
|
||||
__func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* switch Esub AXI clock to 208MHz */
|
||||
writel((readl(ESUB_AXI_DIV_DEBUG_ADDR) &
|
||||
~(ESUB_AXI_DIV_DEBUG_PLL_SELECT_MASK |
|
||||
ESUB_AXI_DIV_DEBUG_PLL_SELECT_OVERRIDE_MASK |
|
||||
ESUB_AXI_DIV_DEBUG_TRIGGER_MASK)) |
|
||||
ESUB_AXI_DIV_DEBUG_PLL_VAR_208M_CLK_SELECT |
|
||||
ESUB_AXI_DIV_DEBUG_PLL_SELECT_OVERRIDE_MASK,
|
||||
ESUB_AXI_DIV_DEBUG_ADDR);
|
||||
|
||||
writel(readl(ESUB_AXI_DIV_DEBUG_ADDR) |
|
||||
ESUB_AXI_DIV_DEBUG_TRIGGER_MASK,
|
||||
ESUB_AXI_DIV_DEBUG_ADDR);
|
||||
|
||||
/* Wait for trigger complete */
|
||||
rc = -1;
|
||||
retry_count = 0;
|
||||
while (retry_count < PLL_MAX_RETRY) {
|
||||
udelay(100);
|
||||
if (!(readl(ESUB_AXI_DIV_DEBUG_ADDR) &
|
||||
ESUB_AXI_DIV_DEBUG_TRIGGER_MASK)) {
|
||||
rc = 0;
|
||||
break;
|
||||
}
|
||||
retry_count++;
|
||||
}
|
||||
|
||||
if (rc == -1) {
|
||||
printf("%s: AXI CLK Trigger timeout, Ethernet is not enabled!\n",
|
||||
__func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Disable Access to CCU registers */
|
||||
writel(WR_ACCESS_PASSWORD, WR_ACCESS_ADDR);
|
||||
|
||||
return rc;
|
||||
}
|
||||
73
arch/arm/cpu/armv7/bcm235xx/clk-sdio.c
Normal file
73
arch/arm/cpu/armv7/bcm235xx/clk-sdio.c
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/arch/sysmap.h>
|
||||
#include <asm/kona-common/clk.h>
|
||||
#include "clk-core.h"
|
||||
|
||||
/* Enable appropriate clocks for an SDIO port */
|
||||
int clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep)
|
||||
{
|
||||
int ret;
|
||||
struct clk *c;
|
||||
|
||||
char *clkstr;
|
||||
char *slpstr;
|
||||
char *ahbstr;
|
||||
|
||||
switch ((u32) base) {
|
||||
case CONFIG_SYS_SDIO_BASE0:
|
||||
clkstr = CONFIG_SYS_SDIO0 "_clk";
|
||||
ahbstr = CONFIG_SYS_SDIO0 "_ahb_clk";
|
||||
slpstr = CONFIG_SYS_SDIO0 "_sleep_clk";
|
||||
break;
|
||||
case CONFIG_SYS_SDIO_BASE1:
|
||||
clkstr = CONFIG_SYS_SDIO1 "_clk";
|
||||
ahbstr = CONFIG_SYS_SDIO1 "_ahb_clk";
|
||||
slpstr = CONFIG_SYS_SDIO1 "_sleep_clk";
|
||||
break;
|
||||
case CONFIG_SYS_SDIO_BASE2:
|
||||
clkstr = CONFIG_SYS_SDIO2 "_clk";
|
||||
ahbstr = CONFIG_SYS_SDIO2 "_ahb_clk";
|
||||
slpstr = CONFIG_SYS_SDIO2 "_sleep_clk";
|
||||
break;
|
||||
case CONFIG_SYS_SDIO_BASE3:
|
||||
clkstr = CONFIG_SYS_SDIO3 "_clk";
|
||||
ahbstr = CONFIG_SYS_SDIO3 "_ahb_clk";
|
||||
slpstr = CONFIG_SYS_SDIO3 "_sleep_clk";
|
||||
break;
|
||||
default:
|
||||
printf("%s: base 0x%p not found\n", __func__, base);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = clk_get_and_enable(ahbstr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = clk_get_and_enable(slpstr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
c = clk_get(clkstr);
|
||||
if (c) {
|
||||
ret = clk_set_rate(c, rate);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = clk_enable(c);
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
printf("%s: Couldn't find %s\n", __func__, clkstr);
|
||||
return -EINVAL;
|
||||
}
|
||||
*actual_ratep = rate;
|
||||
return 0;
|
||||
}
|
||||
27
arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c
Normal file
27
arch/arm/cpu/armv7/bcm235xx/clk-usb-otg.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2014 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/arch/sysmap.h>
|
||||
#include "clk-core.h"
|
||||
|
||||
/* Enable appropriate clocks for the USB OTG port */
|
||||
int clk_usb_otg_enable(void *base)
|
||||
{
|
||||
char *ahbstr;
|
||||
|
||||
switch ((u32) base) {
|
||||
case HSOTG_BASE_ADDR:
|
||||
ahbstr = "usb_otg_ahb_clk";
|
||||
break;
|
||||
default:
|
||||
printf("%s: base 0x%p not found\n", __func__, base);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return clk_get_and_enable(ahbstr);
|
||||
}
|
||||
@@ -7,3 +7,4 @@
|
||||
obj-y += s_init.o
|
||||
obj-y += hwinit-common.o
|
||||
obj-y += clk-stubs.o
|
||||
obj-${CONFIG_KONA_RESET_S} += reset.o
|
||||
|
||||
26
arch/arm/cpu/armv7/kona-common/reset.S
Normal file
26
arch/arm/cpu/armv7/kona-common/reset.S
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2013 Broadcom Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
.globl reset_cpu
|
||||
reset_cpu:
|
||||
ldr r1, =0x35001f00
|
||||
ldr r2, [r1]
|
||||
ldr r4, =0x80000000
|
||||
and r4, r2, r4
|
||||
ldr r3, =0xA5A500
|
||||
orr r4, r4, r3
|
||||
orr r4, r4, #0x1
|
||||
|
||||
str r4, [r1]
|
||||
|
||||
ldr r1, =0x35001f04
|
||||
ldr r2, [r1]
|
||||
ldr r4, =0x80000000
|
||||
and r4, r2, r4
|
||||
str r4, [r1]
|
||||
|
||||
_loop_forever:
|
||||
b _loop_forever
|
||||
@@ -15,7 +15,7 @@ u32 spl_boot_device(void)
|
||||
return BOOT_DEVICE_NAND;
|
||||
}
|
||||
|
||||
u32 spl_boot_mode(void)
|
||||
u32 spl_boot_mode(const u32 boot_device)
|
||||
{
|
||||
switch (spl_boot_device()) {
|
||||
case BOOT_DEVICE_MMC1:
|
||||
|
||||
@@ -97,7 +97,7 @@ void enable_enet_clk(unsigned char enable)
|
||||
{
|
||||
u32 mask, *addr;
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
if (is_mx6ul()) {
|
||||
mask = MXC_CCM_CCGR3_ENET_MASK;
|
||||
addr = &imx_ccm->CCGR3;
|
||||
} else {
|
||||
@@ -117,7 +117,7 @@ void enable_uart_clk(unsigned char enable)
|
||||
{
|
||||
u32 mask;
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6UL))
|
||||
if (is_mx6ul())
|
||||
mask = MXC_CCM_CCGR5_UART_MASK;
|
||||
else
|
||||
mask = MXC_CCM_CCGR5_UART_MASK | MXC_CCM_CCGR5_UART_SERIAL_MASK;
|
||||
@@ -168,7 +168,7 @@ int enable_i2c_clk(unsigned char enable, unsigned i2c_num)
|
||||
reg &= ~mask;
|
||||
__raw_writel(reg, &imx_ccm->CCGR2);
|
||||
} else {
|
||||
if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
if (is_mx6sx() || is_mx6ul()) {
|
||||
mask = MXC_CCM_CCGR6_I2C4_MASK;
|
||||
addr = &imx_ccm->CCGR6;
|
||||
} else {
|
||||
@@ -279,7 +279,7 @@ static u32 mxc_get_pll_pfd(enum pll_clocks pll, int pfd_num)
|
||||
|
||||
switch (pll) {
|
||||
case PLL_BUS:
|
||||
if (!is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
if (!is_mx6ul()) {
|
||||
if (pfd_num == 3) {
|
||||
/* No PFD3 on PPL2 */
|
||||
return 0;
|
||||
@@ -379,8 +379,8 @@ static u32 get_ipg_per_clk(void)
|
||||
u32 reg, perclk_podf;
|
||||
|
||||
reg = __raw_readl(&imx_ccm->cscmr1);
|
||||
if (is_cpu_type(MXC_CPU_MX6SL) || is_cpu_type(MXC_CPU_MX6SX) ||
|
||||
is_mx6dqp() || is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
if (is_mx6sl() || is_mx6sx() ||
|
||||
is_mx6dqp() || is_mx6ul()) {
|
||||
if (reg & MXC_CCM_CSCMR1_PER_CLK_SEL_MASK)
|
||||
return MXC_HCLK; /* OSC 24Mhz */
|
||||
}
|
||||
@@ -396,8 +396,7 @@ static u32 get_uart_clk(void)
|
||||
u32 freq = decode_pll(PLL_USBOTG, MXC_HCLK) / 6; /* static divider */
|
||||
reg = __raw_readl(&imx_ccm->cscdr1);
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6SL) || is_cpu_type(MXC_CPU_MX6SX) ||
|
||||
is_mx6dqp() || is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
if (is_mx6sl() || is_mx6sx() || is_mx6dqp() || is_mx6ul()) {
|
||||
if (reg & MXC_CCM_CSCDR1_UART_CLK_SEL)
|
||||
freq = MXC_HCLK;
|
||||
}
|
||||
@@ -416,8 +415,7 @@ static u32 get_cspi_clk(void)
|
||||
cspi_podf = (reg & MXC_CCM_CSCDR2_ECSPI_CLK_PODF_MASK) >>
|
||||
MXC_CCM_CSCDR2_ECSPI_CLK_PODF_OFFSET;
|
||||
|
||||
if (is_mx6dqp() || is_cpu_type(MXC_CPU_MX6SL) ||
|
||||
is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
if (is_mx6dqp() || is_mx6sl() || is_mx6sx() || is_mx6ul()) {
|
||||
if (reg & MXC_CCM_CSCDR2_ECSPI_CLK_SEL_MASK)
|
||||
return MXC_HCLK / (cspi_podf + 1);
|
||||
}
|
||||
@@ -479,14 +477,13 @@ static u32 get_mmdc_ch0_clk(void)
|
||||
|
||||
u32 freq, podf, per2_clk2_podf, pmu_misc2_audio_div;
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL) ||
|
||||
is_cpu_type(MXC_CPU_MX6SL)) {
|
||||
if (is_mx6sx() || is_mx6ul() || is_mx6sl()) {
|
||||
podf = (cbcdr & MXC_CCM_CBCDR_MMDC_CH1_PODF_MASK) >>
|
||||
MXC_CCM_CBCDR_MMDC_CH1_PODF_OFFSET;
|
||||
if (cbcdr & MXC_CCM_CBCDR_PERIPH2_CLK_SEL) {
|
||||
per2_clk2_podf = (cbcdr & MXC_CCM_CBCDR_PERIPH2_CLK2_PODF_MASK) >>
|
||||
MXC_CCM_CBCDR_PERIPH2_CLK2_PODF_OFFSET;
|
||||
if (is_cpu_type(MXC_CPU_MX6SL)) {
|
||||
if (is_mx6sl()) {
|
||||
if (cbcmr & MXC_CCM_CBCMR_PERIPH2_CLK2_SEL)
|
||||
freq = MXC_HCLK;
|
||||
else
|
||||
@@ -618,7 +615,7 @@ void mxs_set_lcdclk(u32 base_addr, u32 freq)
|
||||
|
||||
debug("mxs_set_lcdclk, freq = %dKHz\n", freq);
|
||||
|
||||
if ((!is_cpu_type(MXC_CPU_MX6SX)) && !is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
if (!is_mx6sx() && !is_mx6ul()) {
|
||||
debug("This chip not support lcd!\n");
|
||||
return;
|
||||
}
|
||||
@@ -630,7 +627,7 @@ void mxs_set_lcdclk(u32 base_addr, u32 freq)
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6SX)) {
|
||||
if (is_mx6sx()) {
|
||||
reg = readl(&imx_ccm->cscdr2);
|
||||
/* Can't change clocks when clock not from pre-mux */
|
||||
if ((reg & MXC_CCM_CSCDR2_LCDIF2_CLK_SEL_MASK) != 0)
|
||||
@@ -711,7 +708,7 @@ void mxs_set_lcdclk(u32 base_addr, u32 freq)
|
||||
MXC_CCM_CBCMR_LCDIF1_PODF_MASK,
|
||||
((postd - 1) <<
|
||||
MXC_CCM_CBCMR_LCDIF1_PODF_OFFSET));
|
||||
} else if (is_cpu_type(MXC_CPU_MX6SX)) {
|
||||
} else if (is_mx6sx()) {
|
||||
/* Setting LCDIF2 for i.MX6SX */
|
||||
if (enable_pll_video(pll_div, pll_num, pll_denom, post_div))
|
||||
return;
|
||||
@@ -737,7 +734,7 @@ int enable_lcdif_clock(u32 base_addr)
|
||||
u32 reg = 0;
|
||||
u32 lcdif_clk_sel_mask, lcdif_ccgr3_mask;
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6SX)) {
|
||||
if (is_mx6sx()) {
|
||||
if ((base_addr != LCDIF1_BASE_ADDR) &&
|
||||
(base_addr != LCDIF2_BASE_ADDR)) {
|
||||
puts("Wrong LCD interface!\n");
|
||||
@@ -752,7 +749,7 @@ int enable_lcdif_clock(u32 base_addr)
|
||||
MXC_CCM_CCGR3_DISP_AXI_MASK) :
|
||||
(MXC_CCM_CCGR3_LCDIF1_PIX_MASK |
|
||||
MXC_CCM_CCGR3_DISP_AXI_MASK);
|
||||
} else if (is_cpu_type(MXC_CPU_MX6UL)) {
|
||||
} else if (is_mx6ul()) {
|
||||
if (base_addr != LCDIF1_BASE_ADDR) {
|
||||
puts("Wrong LCD interface!\n");
|
||||
return -EINVAL;
|
||||
@@ -850,8 +847,7 @@ int enable_fec_anatop_clock(int fec_id, enum enet_freq freq)
|
||||
reg |= BF_ANADIG_PLL_ENET_DIV_SELECT(freq);
|
||||
} else if (fec_id == 1) {
|
||||
/* Only i.MX6SX/UL support ENET2 */
|
||||
if (!(is_cpu_type(MXC_CPU_MX6SX) ||
|
||||
is_cpu_type(MXC_CPU_MX6UL)))
|
||||
if (!(is_mx6sx() || is_mx6ul()))
|
||||
return -EINVAL;
|
||||
reg &= ~BM_ANADIG_PLL_ENET2_DIV_SELECT;
|
||||
reg |= BF_ANADIG_PLL_ENET2_DIV_SELECT(freq);
|
||||
@@ -1044,7 +1040,7 @@ int enable_pcie_clock(void)
|
||||
#define ANADIG_ANA_MISC1_LVDS1_CLK_SEL_PCIE_REF 0xa
|
||||
#define ANADIG_ANA_MISC1_LVDS1_CLK_SEL_SATA_REF 0xb
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6SX))
|
||||
if (is_mx6sx())
|
||||
lvds1_clk_sel = ANADIG_ANA_MISC1_LVDS1_CLK_SEL_PCIE_REF;
|
||||
else
|
||||
lvds1_clk_sel = ANADIG_ANA_MISC1_LVDS1_CLK_SEL_SATA_REF;
|
||||
@@ -1228,7 +1224,7 @@ static void disable_ldb_di_clock_sources(void)
|
||||
/* Make sure PFDs are disabled at boot. */
|
||||
reg = readl(&mxc_ccm->analog_pfd_528);
|
||||
/* Cannot disable pll2_pfd2_396M, as it is the MMDC clock in iMX6DL */
|
||||
if (is_cpu_type(MXC_CPU_MX6DL))
|
||||
if (is_mx6sdl())
|
||||
reg |= 0x80008080;
|
||||
else
|
||||
reg |= 0x80808080;
|
||||
@@ -1251,7 +1247,7 @@ static void enable_ldb_di_clock_sources(void)
|
||||
int reg;
|
||||
|
||||
reg = readl(&mxc_ccm->analog_pfd_528);
|
||||
if (is_cpu_type(MXC_CPU_MX6DL))
|
||||
if (is_mx6sdl())
|
||||
reg &= ~(0x80008080);
|
||||
else
|
||||
reg &= ~(0x80808080);
|
||||
|
||||
@@ -888,8 +888,7 @@ void mx6sdl_dram_iocfg(unsigned width,
|
||||
#define MR(val, ba, cmd, cs1) \
|
||||
((val << 16) | (1 << 15) | (cmd << 4) | (cs1 << 3) | ba)
|
||||
#define MMDC1(entry, value) do { \
|
||||
if (!is_cpu_type(MXC_CPU_MX6SX) && !is_cpu_type(MXC_CPU_MX6UL) && \
|
||||
!is_cpu_type(MXC_CPU_MX6SL)) \
|
||||
if (!is_mx6sx() && !is_mx6ul() && !is_mx6sl()) \
|
||||
mmdc1->entry = value; \
|
||||
} while (0)
|
||||
|
||||
@@ -1197,12 +1196,11 @@ void mx6_ddr3_cfg(const struct mx6_ddr_sysinfo *sysinfo,
|
||||
u16 mem_speed = ddr3_cfg->mem_speed;
|
||||
|
||||
mmdc0 = (struct mmdc_p_regs *)MMDC_P0_BASE_ADDR;
|
||||
if (!is_cpu_type(MXC_CPU_MX6SX) && !is_cpu_type(MXC_CPU_MX6UL) &&
|
||||
!is_cpu_type(MXC_CPU_MX6SL))
|
||||
if (!is_mx6sx() && !is_mx6ul() && !is_mx6sl())
|
||||
mmdc1 = (struct mmdc_p_regs *)MMDC_P1_BASE_ADDR;
|
||||
|
||||
/* Limit mem_speed for MX6D/MX6Q */
|
||||
if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) {
|
||||
if (is_mx6dq() || is_mx6dqp()) {
|
||||
if (mem_speed > 1066)
|
||||
mem_speed = 1066; /* 1066 MT/s */
|
||||
|
||||
@@ -1221,7 +1219,7 @@ void mx6_ddr3_cfg(const struct mx6_ddr_sysinfo *sysinfo,
|
||||
* Data rate of 1066 MT/s requires 533 MHz DDR3 clock, but MX6D/Q supports
|
||||
* up to 528 MHz, so reduce the clock to fit chip specs
|
||||
*/
|
||||
if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) {
|
||||
if (is_mx6dq() || is_mx6dqp()) {
|
||||
if (clock > 528)
|
||||
clock = 528; /* 528 MHz */
|
||||
}
|
||||
|
||||
@@ -108,6 +108,12 @@ u32 get_cpu_rev(void)
|
||||
#define OCOTP_CFG3_SPEED_1GHZ 2
|
||||
#define OCOTP_CFG3_SPEED_1P2GHZ 3
|
||||
|
||||
/*
|
||||
* For i.MX6UL
|
||||
*/
|
||||
#define OCOTP_CFG3_SPEED_528MHZ 1
|
||||
#define OCOTP_CFG3_SPEED_696MHZ 2
|
||||
|
||||
u32 get_cpu_speed_grade_hz(void)
|
||||
{
|
||||
struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
|
||||
@@ -120,17 +126,26 @@ u32 get_cpu_speed_grade_hz(void)
|
||||
val >>= OCOTP_CFG3_SPEED_SHIFT;
|
||||
val &= 0x3;
|
||||
|
||||
if (is_mx6ul()) {
|
||||
if (val == OCOTP_CFG3_SPEED_528MHZ)
|
||||
return 528000000;
|
||||
else if (val == OCOTP_CFG3_SPEED_696MHZ)
|
||||
return 69600000;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (val) {
|
||||
/* Valid for IMX6DQ */
|
||||
case OCOTP_CFG3_SPEED_1P2GHZ:
|
||||
if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D))
|
||||
if (is_mx6dq() || is_mx6dqp())
|
||||
return 1200000000;
|
||||
/* Valid for IMX6SX/IMX6SDL/IMX6DQ */
|
||||
case OCOTP_CFG3_SPEED_1GHZ:
|
||||
return 996000000;
|
||||
/* Valid for IMX6DQ */
|
||||
case OCOTP_CFG3_SPEED_850MHZ:
|
||||
if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D))
|
||||
if (is_mx6dq() || is_mx6dqp())
|
||||
return 852000000;
|
||||
/* Valid for IMX6SX/IMX6SDL/IMX6DQ */
|
||||
case OCOTP_CFG3_SPEED_800MHZ:
|
||||
@@ -278,7 +293,7 @@ static void clear_mmdc_ch_mask(void)
|
||||
reg = readl(&mxc_ccm->ccdr);
|
||||
|
||||
/* Clear MMDC channel mask */
|
||||
if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL) || is_cpu_type(MXC_CPU_MX6SL))
|
||||
if (is_mx6sx() || is_mx6ul() || is_mx6sl())
|
||||
reg &= ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK);
|
||||
else
|
||||
reg &= ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK | MXC_CCM_CCDR_MMDC_CH0_HS_MASK);
|
||||
@@ -444,8 +459,7 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
|
||||
struct fuse_bank4_regs *fuse =
|
||||
(struct fuse_bank4_regs *)bank->fuse_regs;
|
||||
|
||||
if ((is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL)) &&
|
||||
dev_id == 1) {
|
||||
if ((is_mx6sx() || is_mx6ul()) && dev_id == 1) {
|
||||
u32 value = readl(&fuse->mac_addr2);
|
||||
mac[0] = value >> 24 ;
|
||||
mac[1] = value >> 16 ;
|
||||
@@ -509,7 +523,7 @@ void s_init(void)
|
||||
u32 mask528;
|
||||
u32 reg, periph1, periph2;
|
||||
|
||||
if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL))
|
||||
if (is_mx6sx() || is_mx6ul())
|
||||
return;
|
||||
|
||||
/* Due to hardware limitation, on MX6Q we need to gate/ungate all PFDs
|
||||
|
||||
@@ -441,3 +441,11 @@ void s_init(void)
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void reset_misc(void)
|
||||
{
|
||||
#ifdef CONFIG_VIDEO_MXS
|
||||
lcdif_power_down();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ u32 spl_boot_device(void)
|
||||
return gd->arch.omap_boot_device;
|
||||
}
|
||||
|
||||
u32 spl_boot_mode(void)
|
||||
u32 spl_boot_mode(const u32 boot_device)
|
||||
{
|
||||
return gd->arch.omap_boot_mode;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ void spl_board_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
int board_mmc_init(bd_t *bis)
|
||||
__weak int board_mmc_init(bd_t *bis)
|
||||
{
|
||||
switch (spl_boot_device()) {
|
||||
case BOOT_DEVICE_MMC1:
|
||||
|
||||
@@ -77,7 +77,7 @@ ulong get_timer_masked(void)
|
||||
/* move stamp fordward with absoulte diff ticks */
|
||||
gd->arch.tbl += (now - gd->arch.lastinc);
|
||||
} else { /* we have rollover of incrementer */
|
||||
gd->arch.tbl += ((TIMER_LOAD_VAL / (TIMER_CLOCK /
|
||||
gd->arch.tbl += ((TIMER_OVERFLOW_VAL / (TIMER_CLOCK /
|
||||
CONFIG_SYS_HZ)) - gd->arch.lastinc) + now;
|
||||
}
|
||||
gd->arch.lastinc = now;
|
||||
|
||||
@@ -280,6 +280,8 @@ static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const arg
|
||||
omap_nand_switch_ecc(1, 1);
|
||||
else if (strncmp(argv[2], "bch8", 4) == 0)
|
||||
omap_nand_switch_ecc(1, 8);
|
||||
else if (strncmp(argv[2], "bch16", 5) == 0)
|
||||
omap_nand_switch_ecc(1, 16);
|
||||
else
|
||||
goto usage;
|
||||
}
|
||||
@@ -308,8 +310,8 @@ usage:
|
||||
U_BOOT_CMD(
|
||||
nandecc, 3, 1, do_switch_ecc,
|
||||
"switch OMAP3 NAND ECC calculation algorithm",
|
||||
"hw [hamming|bch8] - Switch between NAND hardware 1-bit hamming and"
|
||||
" 8-bit BCH\n"
|
||||
"hw [hamming|bch8|bch16] - Switch between NAND hardware 1-bit hamming"
|
||||
" and 8-bit/16-bit BCH\n"
|
||||
" ecc calculation (second parameter may"
|
||||
" be omitted).\n"
|
||||
"nandecc sw - Switch to NAND software ecc algorithm."
|
||||
|
||||
@@ -14,8 +14,8 @@ config TARGET_DRA7XX_EVM
|
||||
bool "TI DRA7XX"
|
||||
select TI_I2C_BOARD_DETECT
|
||||
|
||||
config TARGET_BEAGLE_X15
|
||||
bool "BeagleBoard X15"
|
||||
config TARGET_AM57XX_EVM
|
||||
bool "AM57XX"
|
||||
select TI_I2C_BOARD_DETECT
|
||||
|
||||
endchoice
|
||||
|
||||
@@ -364,82 +364,6 @@ struct vcores_data omap5430_volts_es2 = {
|
||||
.mm.abb_tx_done_mask = OMAP_ABB_MM_TXDONE_MASK,
|
||||
};
|
||||
|
||||
struct vcores_data dra752_volts = {
|
||||
.mpu.value = VDD_MPU_DRA7,
|
||||
.mpu.efuse.reg = STD_FUSE_OPP_VMIN_MPU,
|
||||
.mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.mpu.addr = TPS659038_REG_ADDR_SMPS12,
|
||||
.mpu.pmic = &tps659038,
|
||||
.mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
|
||||
|
||||
.eve.value = VDD_EVE_DRA7,
|
||||
.eve.efuse.reg = STD_FUSE_OPP_VMIN_DSPEVE,
|
||||
.eve.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.eve.addr = TPS659038_REG_ADDR_SMPS45,
|
||||
.eve.pmic = &tps659038,
|
||||
.eve.abb_tx_done_mask = OMAP_ABB_EVE_TXDONE_MASK,
|
||||
|
||||
.gpu.value = VDD_GPU_DRA7,
|
||||
.gpu.efuse.reg = STD_FUSE_OPP_VMIN_GPU,
|
||||
.gpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.gpu.addr = TPS659038_REG_ADDR_SMPS6,
|
||||
.gpu.pmic = &tps659038,
|
||||
.gpu.abb_tx_done_mask = OMAP_ABB_GPU_TXDONE_MASK,
|
||||
|
||||
.core.value = VDD_CORE_DRA7,
|
||||
.core.efuse.reg = STD_FUSE_OPP_VMIN_CORE,
|
||||
.core.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.core.addr = TPS659038_REG_ADDR_SMPS7,
|
||||
.core.pmic = &tps659038,
|
||||
|
||||
.iva.value = VDD_IVA_DRA7,
|
||||
.iva.efuse.reg = STD_FUSE_OPP_VMIN_IVA,
|
||||
.iva.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.iva.addr = TPS659038_REG_ADDR_SMPS8,
|
||||
.iva.pmic = &tps659038,
|
||||
.iva.abb_tx_done_mask = OMAP_ABB_IVA_TXDONE_MASK,
|
||||
};
|
||||
|
||||
struct vcores_data dra722_volts = {
|
||||
.mpu.value = VDD_MPU_DRA7,
|
||||
.mpu.efuse.reg = STD_FUSE_OPP_VMIN_MPU,
|
||||
.mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.mpu.addr = TPS65917_REG_ADDR_SMPS1,
|
||||
.mpu.pmic = &tps659038,
|
||||
.mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,
|
||||
|
||||
.core.value = VDD_CORE_DRA7,
|
||||
.core.efuse.reg = STD_FUSE_OPP_VMIN_CORE,
|
||||
.core.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.core.addr = TPS65917_REG_ADDR_SMPS2,
|
||||
.core.pmic = &tps659038,
|
||||
|
||||
/*
|
||||
* The DSPEVE, GPU and IVA rails are usually grouped on DRA72x
|
||||
* designs and powered by TPS65917 SMPS3, as on the J6Eco EVM.
|
||||
*/
|
||||
.gpu.value = VDD_GPU_DRA7,
|
||||
.gpu.efuse.reg = STD_FUSE_OPP_VMIN_GPU,
|
||||
.gpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.gpu.addr = TPS65917_REG_ADDR_SMPS3,
|
||||
.gpu.pmic = &tps659038,
|
||||
.gpu.abb_tx_done_mask = OMAP_ABB_GPU_TXDONE_MASK,
|
||||
|
||||
.eve.value = VDD_EVE_DRA7,
|
||||
.eve.efuse.reg = STD_FUSE_OPP_VMIN_DSPEVE,
|
||||
.eve.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.eve.addr = TPS65917_REG_ADDR_SMPS3,
|
||||
.eve.pmic = &tps659038,
|
||||
.eve.abb_tx_done_mask = OMAP_ABB_EVE_TXDONE_MASK,
|
||||
|
||||
.iva.value = VDD_IVA_DRA7,
|
||||
.iva.efuse.reg = STD_FUSE_OPP_VMIN_IVA,
|
||||
.iva.efuse.reg_bits = DRA752_EFUSE_REGBITS,
|
||||
.iva.addr = TPS65917_REG_ADDR_SMPS3,
|
||||
.iva.pmic = &tps659038,
|
||||
.iva.abb_tx_done_mask = OMAP_ABB_IVA_TXDONE_MASK,
|
||||
};
|
||||
|
||||
/*
|
||||
* Enable essential clock domains, modules and
|
||||
* do some additional special settings needed
|
||||
@@ -802,7 +726,6 @@ void __weak hw_data_init(void)
|
||||
case DRA752_ES2_0:
|
||||
*prcm = &dra7xx_prcm;
|
||||
*dplls_data = &dra7xx_dplls;
|
||||
*omap_vcores = &dra752_volts;
|
||||
*ctrl = &dra7xx_ctrl;
|
||||
break;
|
||||
|
||||
@@ -810,7 +733,6 @@ void __weak hw_data_init(void)
|
||||
case DRA722_ES2_0:
|
||||
*prcm = &dra7xx_prcm;
|
||||
*dplls_data = &dra72x_dplls;
|
||||
*omap_vcores = &dra722_volts;
|
||||
*ctrl = &dra7xx_ctrl;
|
||||
break;
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ ENDPROC(psci_get_cpu_id)
|
||||
|
||||
/* Imported from Linux kernel */
|
||||
LENTRY(v7_flush_dcache_all)
|
||||
stmfd sp!, {r4-r5, r7, r9-r11, lr}
|
||||
dmb @ ensure ordering with previous memory accesses
|
||||
mrc p15, 1, r0, c0, c0, 1 @ read clidr
|
||||
ands r3, r0, #0x7000000 @ extract loc from clidr
|
||||
@@ -153,6 +154,7 @@ finished:
|
||||
mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
|
||||
dsb st
|
||||
isb
|
||||
ldmfd sp!, {r4-r5, r7, r9-r11, lr}
|
||||
bx lr
|
||||
ENDPROC(v7_flush_dcache_all)
|
||||
|
||||
@@ -196,15 +198,15 @@ ENDPROC(psci_cpu_off_common)
|
||||
|
||||
@ expects CPU ID in r0 and returns stack top in r0
|
||||
ENTRY(psci_get_cpu_stack_top)
|
||||
mov r5, #0x400 @ 1kB of stack per CPU
|
||||
mul r0, r0, r5
|
||||
mov r3, #0x400 @ 1kB of stack per CPU
|
||||
mul r0, r0, r3
|
||||
|
||||
ldr r5, =psci_text_end @ end of monitor text
|
||||
add r5, r5, #0x2000 @ Skip two pages
|
||||
lsr r5, r5, #12 @ Align to start of page
|
||||
lsl r5, r5, #12
|
||||
sub r5, r5, #4 @ reserve 1 word for target PC
|
||||
sub r0, r5, r0 @ here's our stack!
|
||||
ldr r3, =psci_text_end @ end of monitor text
|
||||
add r3, r3, #0x2000 @ Skip two pages
|
||||
lsr r3, r3, #12 @ Align to start of page
|
||||
lsl r3, r3, #12
|
||||
sub r3, r3, #4 @ reserve 1 word for target PC
|
||||
sub r0, r3, r0 @ here's our stack!
|
||||
|
||||
bx lr
|
||||
ENDPROC(psci_get_cpu_stack_top)
|
||||
|
||||
@@ -66,7 +66,9 @@ save_boot_params_ret:
|
||||
/* the mask ROM code should have PLL and others stable */
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
bl cpu_init_cp15
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
bl cpu_init_crit
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bl _main
|
||||
@@ -250,7 +252,8 @@ skip_errata_621766:
|
||||
mov pc, r5 @ back to my caller
|
||||
ENDPROC(cpu_init_cp15)
|
||||
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT
|
||||
#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \
|
||||
!defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY)
|
||||
/*************************************************************************
|
||||
*
|
||||
* CPU_init_critical registers
|
||||
|
||||
@@ -13,11 +13,8 @@ obj-$(CONFIG_MACH_SUN6I) += tzpc.o
|
||||
obj-$(CONFIG_MACH_SUN8I_H3) += tzpc.o
|
||||
|
||||
ifndef CONFIG_SPL_BUILD
|
||||
ifdef CONFIG_ARMV7_PSCI
|
||||
obj-$(CONFIG_MACH_SUN6I) += psci_sun6i.o
|
||||
obj-$(CONFIG_MACH_SUN7I) += psci_sun7i.o
|
||||
obj-$(CONFIG_MACH_SUN8I) += psci_sun6i.o
|
||||
endif
|
||||
obj-$(CONFIG_ARMV7_PSCI) += psci.o
|
||||
obj-$(CONFIG_ARMV7_PSCI) += psci_head.o
|
||||
endif
|
||||
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
|
||||
273
arch/arm/cpu/armv7/sunxi/psci.c
Normal file
273
arch/arm/cpu/armv7/sunxi/psci.c
Normal file
@@ -0,0 +1,273 @@
|
||||
/*
|
||||
* Copyright (C) 2016
|
||||
* Author: Chen-Yu Tsai <wens@csie.org>
|
||||
*
|
||||
* Based on assembly code by Marc Zyngier <marc.zyngier@arm.com>,
|
||||
* which was based on code by Carl van Schaik <carl@ok-labs.com>.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <common.h>
|
||||
|
||||
#include <asm/arch/cpu.h>
|
||||
#include <asm/arch/cpucfg.h>
|
||||
#include <asm/arch/prcm.h>
|
||||
#include <asm/armv7.h>
|
||||
#include <asm/gic.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/psci.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#define __secure __attribute__ ((section ("._secure.text")))
|
||||
#define __irq __attribute__ ((interrupt ("IRQ")))
|
||||
|
||||
#define GICD_BASE (SUNXI_GIC400_BASE + GIC_DIST_OFFSET)
|
||||
#define GICC_BASE (SUNXI_GIC400_BASE + GIC_CPU_OFFSET_A15)
|
||||
|
||||
static void __secure cp15_write_cntp_tval(u32 tval)
|
||||
{
|
||||
asm volatile ("mcr p15, 0, %0, c14, c2, 0" : : "r" (tval));
|
||||
}
|
||||
|
||||
static void __secure cp15_write_cntp_ctl(u32 val)
|
||||
{
|
||||
asm volatile ("mcr p15, 0, %0, c14, c2, 1" : : "r" (val));
|
||||
}
|
||||
|
||||
static u32 __secure cp15_read_cntp_ctl(void)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
asm volatile ("mrc p15, 0, %0, c14, c2, 1" : "=r" (val));
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
#define ONE_MS (CONFIG_TIMER_CLK_FREQ / 1000)
|
||||
|
||||
static void __secure __mdelay(u32 ms)
|
||||
{
|
||||
u32 reg = ONE_MS * ms;
|
||||
|
||||
cp15_write_cntp_tval(reg);
|
||||
ISB;
|
||||
cp15_write_cntp_ctl(3);
|
||||
|
||||
do {
|
||||
ISB;
|
||||
reg = cp15_read_cntp_ctl();
|
||||
} while (!(reg & BIT(2)));
|
||||
|
||||
cp15_write_cntp_ctl(0);
|
||||
ISB;
|
||||
}
|
||||
|
||||
static void __secure clamp_release(u32 __maybe_unused *clamp)
|
||||
{
|
||||
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \
|
||||
defined(CONFIG_MACH_SUN8I_H3)
|
||||
u32 tmp = 0x1ff;
|
||||
do {
|
||||
tmp >>= 1;
|
||||
writel(tmp, clamp);
|
||||
} while (tmp);
|
||||
|
||||
__mdelay(10);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void __secure clamp_set(u32 __maybe_unused *clamp)
|
||||
{
|
||||
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \
|
||||
defined(CONFIG_MACH_SUN8I_H3)
|
||||
writel(0xff, clamp);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void __secure sunxi_power_switch(u32 *clamp, u32 *pwroff, bool on,
|
||||
int cpu)
|
||||
{
|
||||
if (on) {
|
||||
/* Release power clamp */
|
||||
clamp_release(clamp);
|
||||
|
||||
/* Clear power gating */
|
||||
clrbits_le32(pwroff, BIT(cpu));
|
||||
} else {
|
||||
/* Set power gating */
|
||||
setbits_le32(pwroff, BIT(cpu));
|
||||
|
||||
/* Activate power clamp */
|
||||
clamp_set(clamp);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MACH_SUN7I
|
||||
/* sun7i (A20) is different from other single cluster SoCs */
|
||||
static void __secure sunxi_cpu_set_power(int __always_unused cpu, bool on)
|
||||
{
|
||||
struct sunxi_cpucfg_reg *cpucfg =
|
||||
(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;
|
||||
|
||||
sunxi_power_switch(&cpucfg->cpu1_pwr_clamp, &cpucfg->cpu1_pwroff,
|
||||
on, 0);
|
||||
}
|
||||
#else /* ! CONFIG_MACH_SUN7I */
|
||||
static void __secure sunxi_cpu_set_power(int cpu, bool on)
|
||||
{
|
||||
struct sunxi_prcm_reg *prcm =
|
||||
(struct sunxi_prcm_reg *)SUNXI_PRCM_BASE;
|
||||
|
||||
sunxi_power_switch(&prcm->cpu_pwr_clamp[cpu], &prcm->cpu_pwroff,
|
||||
on, cpu);
|
||||
}
|
||||
#endif /* CONFIG_MACH_SUN7I */
|
||||
|
||||
void __secure sunxi_cpu_power_off(u32 cpuid)
|
||||
{
|
||||
struct sunxi_cpucfg_reg *cpucfg =
|
||||
(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;
|
||||
u32 cpu = cpuid & 0x3;
|
||||
|
||||
/* Wait for the core to enter WFI */
|
||||
while (1) {
|
||||
if (readl(&cpucfg->cpu[cpu].status) & BIT(2))
|
||||
break;
|
||||
__mdelay(1);
|
||||
}
|
||||
|
||||
/* Assert reset on target CPU */
|
||||
writel(0, &cpucfg->cpu[cpu].rst);
|
||||
|
||||
/* Lock CPU (Disable external debug access) */
|
||||
clrbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));
|
||||
|
||||
/* Power down CPU */
|
||||
sunxi_cpu_set_power(cpuid, false);
|
||||
|
||||
/* Unlock CPU (Disable external debug access) */
|
||||
setbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));
|
||||
}
|
||||
|
||||
static u32 __secure cp15_read_scr(void)
|
||||
{
|
||||
u32 scr;
|
||||
|
||||
asm volatile ("mrc p15, 0, %0, c1, c1, 0" : "=r" (scr));
|
||||
|
||||
return scr;
|
||||
}
|
||||
|
||||
static void __secure cp15_write_scr(u32 scr)
|
||||
{
|
||||
asm volatile ("mcr p15, 0, %0, c1, c1, 0" : : "r" (scr));
|
||||
ISB;
|
||||
}
|
||||
|
||||
/*
|
||||
* Although this is an FIQ handler, the FIQ is processed in monitor mode,
|
||||
* which means there's no FIQ banked registers. This is the same as IRQ
|
||||
* mode, so use the IRQ attribute to ask the compiler to handler entry
|
||||
* and return.
|
||||
*/
|
||||
void __secure __irq psci_fiq_enter(void)
|
||||
{
|
||||
u32 scr, reg, cpu;
|
||||
|
||||
/* Switch to secure mode */
|
||||
scr = cp15_read_scr();
|
||||
cp15_write_scr(scr & ~BIT(0));
|
||||
|
||||
/* Validate reason based on IAR and acknowledge */
|
||||
reg = readl(GICC_BASE + GICC_IAR);
|
||||
|
||||
/* Skip spurious interrupts 1022 and 1023 */
|
||||
if (reg == 1023 || reg == 1022)
|
||||
goto out;
|
||||
|
||||
/* End of interrupt */
|
||||
writel(reg, GICC_BASE + GICC_EOIR);
|
||||
DSB;
|
||||
|
||||
/* Get CPU number */
|
||||
cpu = (reg >> 10) & 0x7;
|
||||
|
||||
/* Power off the CPU */
|
||||
sunxi_cpu_power_off(cpu);
|
||||
|
||||
out:
|
||||
/* Restore security level */
|
||||
cp15_write_scr(scr);
|
||||
}
|
||||
|
||||
int __secure psci_cpu_on(u32 __always_unused unused, u32 mpidr, u32 pc)
|
||||
{
|
||||
struct sunxi_cpucfg_reg *cpucfg =
|
||||
(struct sunxi_cpucfg_reg *)SUNXI_CPUCFG_BASE;
|
||||
u32 cpu = (mpidr & 0x3);
|
||||
|
||||
/* store target PC at target CPU stack top */
|
||||
writel(pc, psci_get_cpu_stack_top(cpu));
|
||||
DSB;
|
||||
|
||||
/* Set secondary core power on PC */
|
||||
writel((u32)&psci_cpu_entry, &cpucfg->priv0);
|
||||
|
||||
/* Assert reset on target CPU */
|
||||
writel(0, &cpucfg->cpu[cpu].rst);
|
||||
|
||||
/* Invalidate L1 cache */
|
||||
clrbits_le32(&cpucfg->gen_ctrl, BIT(cpu));
|
||||
|
||||
/* Lock CPU (Disable external debug access) */
|
||||
clrbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));
|
||||
|
||||
/* Power up target CPU */
|
||||
sunxi_cpu_set_power(cpu, true);
|
||||
|
||||
/* De-assert reset on target CPU */
|
||||
writel(BIT(1) | BIT(0), &cpucfg->cpu[cpu].rst);
|
||||
|
||||
/* Unlock CPU (Disable external debug access) */
|
||||
setbits_le32(&cpucfg->dbg_ctrl1, BIT(cpu));
|
||||
|
||||
return ARM_PSCI_RET_SUCCESS;
|
||||
}
|
||||
|
||||
void __secure psci_cpu_off(void)
|
||||
{
|
||||
psci_cpu_off_common();
|
||||
|
||||
/* Ask CPU0 via SGI15 to pull the rug... */
|
||||
writel(BIT(16) | 15, GICD_BASE + GICD_SGIR);
|
||||
DSB;
|
||||
|
||||
/* Wait to be turned off */
|
||||
while (1)
|
||||
wfi();
|
||||
}
|
||||
|
||||
void __secure sunxi_gic_init(void)
|
||||
{
|
||||
u32 reg;
|
||||
|
||||
/* SGI15 as Group-0 */
|
||||
clrbits_le32(GICD_BASE + GICD_IGROUPRn, BIT(15));
|
||||
|
||||
/* Set SGI15 priority to 0 */
|
||||
writeb(0, GICD_BASE + GICD_IPRIORITYRn + 15);
|
||||
|
||||
/* Be cool with non-secure */
|
||||
writel(0xff, GICC_BASE + GICC_PMR);
|
||||
|
||||
/* Switch FIQEn on */
|
||||
setbits_le32(GICC_BASE + GICC_CTLR, BIT(3));
|
||||
|
||||
reg = cp15_read_scr();
|
||||
reg |= BIT(2); /* Enable FIQ in monitor mode */
|
||||
reg &= ~BIT(0); /* Secure mode */
|
||||
cp15_write_scr(reg);
|
||||
}
|
||||
66
arch/arm/cpu/armv7/sunxi/psci_head.S
Normal file
66
arch/arm/cpu/armv7/sunxi/psci_head.S
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (C) 2013 - ARM Ltd
|
||||
* Author: Marc Zyngier <marc.zyngier@arm.com>
|
||||
*
|
||||
* Based on code by Carl van Schaik <carl@ok-labs.com>.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <linux/linkage.h>
|
||||
|
||||
#include <asm/arch-armv7/generictimer.h>
|
||||
#include <asm/gic.h>
|
||||
#include <asm/macro.h>
|
||||
#include <asm/psci.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
|
||||
/*
|
||||
* Memory layout:
|
||||
*
|
||||
* SECURE_RAM to text_end :
|
||||
* ._secure_text section
|
||||
* text_end to ALIGN_PAGE(text_end):
|
||||
* nothing
|
||||
* ALIGN_PAGE(text_end) to ALIGN_PAGE(text_end) + 0x1000)
|
||||
* 1kB of stack per CPU (4 CPUs max).
|
||||
*/
|
||||
|
||||
.pushsection ._secure.text, "ax"
|
||||
|
||||
.arch_extension sec
|
||||
|
||||
#define GICD_BASE (SUNXI_GIC400_BASE + 0x1000)
|
||||
#define GICC_BASE (SUNXI_GIC400_BASE + 0x2000)
|
||||
|
||||
@ {r0, r1, r2, ip} from _do_nonsec_entry(kernel_entry, 0, machid, r2) in
|
||||
@ arch/arm/lib/bootm.c:boot_jump_linux() must remain unchanged across
|
||||
@ this function.
|
||||
ENTRY(psci_arch_init)
|
||||
mov r6, lr
|
||||
mov r7, r0
|
||||
bl psci_get_cpu_id @ CPU ID => r0
|
||||
bl psci_get_cpu_stack_top @ stack top => r0
|
||||
sub r0, r0, #4 @ Save space for target PC
|
||||
mov sp, r0
|
||||
mov r0, r7
|
||||
mov lr, r6
|
||||
|
||||
push {r0, r1, r2, ip, lr}
|
||||
bl sunxi_gic_init
|
||||
pop {r0, r1, r2, ip, pc}
|
||||
ENDPROC(psci_arch_init)
|
||||
|
||||
ENTRY(psci_text_end)
|
||||
.popsection
|
||||
@@ -1,262 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 - Chen-Yu Tsai
|
||||
* Author: Chen-Yu Tsai <wens@csie.org>
|
||||
*
|
||||
* Based on psci_sun7i.S by Marc Zyngier <marc.zyngier@arm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <asm/arch-armv7/generictimer.h>
|
||||
#include <asm/gic.h>
|
||||
#include <asm/macro.h>
|
||||
#include <asm/psci.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
|
||||
/*
|
||||
* Memory layout:
|
||||
*
|
||||
* SECURE_RAM to text_end :
|
||||
* ._secure_text section
|
||||
* text_end to ALIGN_PAGE(text_end):
|
||||
* nothing
|
||||
* ALIGN_PAGE(text_end) to ALIGN_PAGE(text_end) + 0x1000)
|
||||
* 1kB of stack per CPU (4 CPUs max).
|
||||
*/
|
||||
|
||||
.pushsection ._secure.text, "ax"
|
||||
|
||||
.arch_extension sec
|
||||
|
||||
#define ONE_MS (CONFIG_TIMER_CLK_FREQ / 1000)
|
||||
#define TEN_MS (10 * ONE_MS)
|
||||
#define GICD_BASE 0x1c81000
|
||||
#define GICC_BASE 0x1c82000
|
||||
|
||||
.globl psci_fiq_enter
|
||||
psci_fiq_enter:
|
||||
push {r0-r12}
|
||||
|
||||
@ Switch to secure
|
||||
mrc p15, 0, r7, c1, c1, 0
|
||||
bic r8, r7, #1
|
||||
mcr p15, 0, r8, c1, c1, 0
|
||||
isb
|
||||
|
||||
@ Validate reason based on IAR and acknowledge
|
||||
movw r8, #(GICC_BASE & 0xffff)
|
||||
movt r8, #(GICC_BASE >> 16)
|
||||
ldr r9, [r8, #GICC_IAR]
|
||||
movw r10, #0x3ff
|
||||
movt r10, #0
|
||||
cmp r9, r10 @ skip spurious interrupt 1023
|
||||
beq out
|
||||
movw r10, #0x3fe @ ...and 1022
|
||||
cmp r9, r10
|
||||
beq out
|
||||
str r9, [r8, #GICC_EOIR] @ acknowledge the interrupt
|
||||
dsb
|
||||
|
||||
@ Compute CPU number
|
||||
lsr r9, r9, #10
|
||||
and r9, r9, #0xf
|
||||
|
||||
movw r8, #(SUN6I_CPUCFG_BASE & 0xffff)
|
||||
movt r8, #(SUN6I_CPUCFG_BASE >> 16)
|
||||
|
||||
@ Wait for the core to enter WFI
|
||||
lsl r11, r9, #6 @ x64
|
||||
add r11, r11, r8
|
||||
|
||||
1: ldr r10, [r11, #0x48]
|
||||
tst r10, #(1 << 2)
|
||||
bne 2f
|
||||
timer_wait r10, ONE_MS
|
||||
b 1b
|
||||
|
||||
@ Reset CPU
|
||||
2: mov r10, #0
|
||||
str r10, [r11, #0x40]
|
||||
|
||||
@ Lock CPU
|
||||
mov r10, #1
|
||||
lsl r11, r10, r9 @ r11 is now CPU mask
|
||||
ldr r10, [r8, #0x1e4]
|
||||
bic r10, r10, r11
|
||||
str r10, [r8, #0x1e4]
|
||||
|
||||
movw r8, #(SUNXI_PRCM_BASE & 0xffff)
|
||||
movt r8, #(SUNXI_PRCM_BASE >> 16)
|
||||
|
||||
@ Set power gating
|
||||
ldr r10, [r8, #0x100]
|
||||
orr r10, r10, r11
|
||||
str r10, [r8, #0x100]
|
||||
timer_wait r10, ONE_MS
|
||||
|
||||
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I_H3)
|
||||
@ Activate power clamp
|
||||
lsl r12, r9, #2 @ x4
|
||||
add r12, r12, r8
|
||||
mov r10, #0xff
|
||||
str r10, [r12, #0x140]
|
||||
#endif
|
||||
|
||||
movw r8, #(SUN6I_CPUCFG_BASE & 0xffff)
|
||||
movt r8, #(SUN6I_CPUCFG_BASE >> 16)
|
||||
|
||||
@ Unlock CPU
|
||||
ldr r10, [r8, #0x1e4]
|
||||
orr r10, r10, r11
|
||||
str r10, [r8, #0x1e4]
|
||||
|
||||
@ Restore security level
|
||||
out: mcr p15, 0, r7, c1, c1, 0
|
||||
|
||||
pop {r0-r12}
|
||||
subs pc, lr, #4
|
||||
|
||||
@ r1 = target CPU
|
||||
@ r2 = target PC
|
||||
.globl psci_cpu_on
|
||||
psci_cpu_on:
|
||||
push {lr}
|
||||
|
||||
mov r0, r1
|
||||
bl psci_get_cpu_stack_top @ get stack top of target CPU
|
||||
str r2, [r0] @ store target PC at stack top
|
||||
dsb
|
||||
|
||||
movw r0, #(SUN6I_CPUCFG_BASE & 0xffff)
|
||||
movt r0, #(SUN6I_CPUCFG_BASE >> 16)
|
||||
|
||||
@ CPU mask
|
||||
and r1, r1, #3 @ only care about first cluster
|
||||
mov r4, #1
|
||||
lsl r4, r4, r1
|
||||
|
||||
ldr r6, =psci_cpu_entry
|
||||
str r6, [r0, #0x1a4] @ PRIVATE_REG (boot vector)
|
||||
|
||||
@ Assert reset on target CPU
|
||||
mov r6, #0
|
||||
lsl r5, r1, #6 @ 64 bytes per CPU
|
||||
add r5, r5, #0x40 @ Offset from base
|
||||
add r5, r5, r0 @ CPU control block
|
||||
str r6, [r5] @ Reset CPU
|
||||
|
||||
@ l1 invalidate
|
||||
ldr r6, [r0, #0x184] @ CPUCFG_GEN_CTRL_REG
|
||||
bic r6, r6, r4
|
||||
str r6, [r0, #0x184]
|
||||
|
||||
@ Lock CPU (Disable external debug access)
|
||||
ldr r6, [r0, #0x1e4] @ CPUCFG_DBG_CTL1_REG
|
||||
bic r6, r6, r4
|
||||
str r6, [r0, #0x1e4]
|
||||
|
||||
movw r0, #(SUNXI_PRCM_BASE & 0xffff)
|
||||
movt r0, #(SUNXI_PRCM_BASE >> 16)
|
||||
|
||||
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I_H3)
|
||||
@ Release power clamp
|
||||
lsl r5, r1, #2 @ 1 register per CPU
|
||||
add r5, r5, r0 @ PRCM
|
||||
movw r6, #0x1ff
|
||||
movt r6, #0
|
||||
1: lsrs r6, r6, #1
|
||||
str r6, [r5, #0x140] @ CPUx_PWR_CLAMP
|
||||
bne 1b
|
||||
#endif
|
||||
|
||||
timer_wait r6, TEN_MS
|
||||
|
||||
@ Clear power gating
|
||||
ldr r6, [r0, #0x100] @ CPU_PWROFF_GATING
|
||||
bic r6, r6, r4
|
||||
str r6, [r0, #0x100]
|
||||
|
||||
@ re-calculate CPU control register address
|
||||
movw r0, #(SUN6I_CPUCFG_BASE & 0xffff)
|
||||
movt r0, #(SUN6I_CPUCFG_BASE >> 16)
|
||||
|
||||
@ Deassert reset on target CPU
|
||||
mov r6, #3
|
||||
lsl r5, r1, #6 @ 64 bytes per CPU
|
||||
add r5, r5, #0x40 @ Offset from base
|
||||
add r5, r5, r0 @ CPU control block
|
||||
str r6, [r5]
|
||||
|
||||
@ Unlock CPU (Enable external debug access)
|
||||
ldr r6, [r0, #0x1e4] @ CPUCFG_DBG_CTL1_REG
|
||||
orr r6, r6, r4
|
||||
str r6, [r0, #0x1e4]
|
||||
|
||||
mov r0, #ARM_PSCI_RET_SUCCESS @ Return PSCI_RET_SUCCESS
|
||||
pop {pc}
|
||||
|
||||
.globl psci_cpu_off
|
||||
psci_cpu_off:
|
||||
bl psci_cpu_off_common
|
||||
|
||||
@ Ask CPU0 to pull the rug...
|
||||
movw r0, #(GICD_BASE & 0xffff)
|
||||
movt r0, #(GICD_BASE >> 16)
|
||||
movw r1, #15 @ SGI15
|
||||
movt r1, #1 @ Target is CPU0
|
||||
str r1, [r0, #GICD_SGIR]
|
||||
dsb
|
||||
|
||||
1: wfi
|
||||
b 1b
|
||||
|
||||
.globl psci_arch_init
|
||||
psci_arch_init:
|
||||
mov r6, lr
|
||||
|
||||
movw r4, #(GICD_BASE & 0xffff)
|
||||
movt r4, #(GICD_BASE >> 16)
|
||||
|
||||
ldr r5, [r4, #GICD_IGROUPRn]
|
||||
bic r5, r5, #(1 << 15) @ SGI15 as Group-0
|
||||
str r5, [r4, #GICD_IGROUPRn]
|
||||
|
||||
mov r5, #0 @ Set SGI15 priority to 0
|
||||
strb r5, [r4, #(GICD_IPRIORITYRn + 15)]
|
||||
|
||||
add r4, r4, #0x1000 @ GICC address
|
||||
|
||||
mov r5, #0xff
|
||||
str r5, [r4, #GICC_PMR] @ Be cool with non-secure
|
||||
|
||||
ldr r5, [r4, #GICC_CTLR]
|
||||
orr r5, r5, #(1 << 3) @ Switch FIQEn on
|
||||
str r5, [r4, #GICC_CTLR]
|
||||
|
||||
mrc p15, 0, r5, c1, c1, 0 @ Read SCR
|
||||
orr r5, r5, #4 @ Enable FIQ in monitor mode
|
||||
bic r5, r5, #1 @ Secure mode
|
||||
mcr p15, 0, r5, c1, c1, 0 @ Write SCR
|
||||
isb
|
||||
|
||||
bl psci_get_cpu_id @ CPU ID => r0
|
||||
bl psci_get_cpu_stack_top @ stack top => r0
|
||||
mov sp, r0
|
||||
|
||||
bx r6
|
||||
|
||||
.globl psci_text_end
|
||||
psci_text_end:
|
||||
.popsection
|
||||
@@ -1,237 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013 - ARM Ltd
|
||||
* Author: Marc Zyngier <marc.zyngier@arm.com>
|
||||
*
|
||||
* Based on code by Carl van Schaik <carl@ok-labs.com>.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <asm/arch-armv7/generictimer.h>
|
||||
#include <asm/gic.h>
|
||||
#include <asm/macro.h>
|
||||
#include <asm/psci.h>
|
||||
#include <asm/arch/cpu.h>
|
||||
|
||||
/*
|
||||
* Memory layout:
|
||||
*
|
||||
* SECURE_RAM to text_end :
|
||||
* ._secure_text section
|
||||
* text_end to ALIGN_PAGE(text_end):
|
||||
* nothing
|
||||
* ALIGN_PAGE(text_end) to ALIGN_PAGE(text_end) + 0x1000)
|
||||
* 1kB of stack per CPU (4 CPUs max).
|
||||
*/
|
||||
|
||||
.pushsection ._secure.text, "ax"
|
||||
|
||||
.arch_extension sec
|
||||
|
||||
#define ONE_MS (CONFIG_TIMER_CLK_FREQ / 1000)
|
||||
#define TEN_MS (10 * ONE_MS)
|
||||
#define GICD_BASE 0x1c81000
|
||||
#define GICC_BASE 0x1c82000
|
||||
|
||||
.globl psci_fiq_enter
|
||||
psci_fiq_enter:
|
||||
push {r0-r12}
|
||||
|
||||
@ Switch to secure
|
||||
mrc p15, 0, r7, c1, c1, 0
|
||||
bic r8, r7, #1
|
||||
mcr p15, 0, r8, c1, c1, 0
|
||||
isb
|
||||
|
||||
@ Validate reason based on IAR and acknowledge
|
||||
movw r8, #(GICC_BASE & 0xffff)
|
||||
movt r8, #(GICC_BASE >> 16)
|
||||
ldr r9, [r8, #GICC_IAR]
|
||||
movw r10, #0x3ff
|
||||
movt r10, #0
|
||||
cmp r9, r10 @ skip spurious interrupt 1023
|
||||
beq out
|
||||
movw r10, #0x3fe @ ...and 1022
|
||||
cmp r9, r10
|
||||
beq out
|
||||
str r9, [r8, #GICC_EOIR] @ acknowledge the interrupt
|
||||
dsb
|
||||
|
||||
@ Compute CPU number
|
||||
lsr r9, r9, #10
|
||||
and r9, r9, #0xf
|
||||
|
||||
movw r8, #(SUN7I_CPUCFG_BASE & 0xffff)
|
||||
movt r8, #(SUN7I_CPUCFG_BASE >> 16)
|
||||
|
||||
@ Wait for the core to enter WFI
|
||||
lsl r11, r9, #6 @ x64
|
||||
add r11, r11, r8
|
||||
|
||||
1: ldr r10, [r11, #0x48]
|
||||
tst r10, #(1 << 2)
|
||||
bne 2f
|
||||
timer_wait r10, ONE_MS
|
||||
b 1b
|
||||
|
||||
@ Reset CPU
|
||||
2: mov r10, #0
|
||||
str r10, [r11, #0x40]
|
||||
|
||||
@ Lock CPU
|
||||
mov r10, #1
|
||||
lsl r9, r10, r9 @ r9 is now CPU mask
|
||||
ldr r10, [r8, #0x1e4]
|
||||
bic r10, r10, r9
|
||||
str r10, [r8, #0x1e4]
|
||||
|
||||
@ Set power gating
|
||||
ldr r10, [r8, #0x1b4]
|
||||
orr r10, r10, #1
|
||||
str r10, [r8, #0x1b4]
|
||||
timer_wait r10, ONE_MS
|
||||
|
||||
@ Activate power clamp
|
||||
mov r10, #1
|
||||
1: str r10, [r8, #0x1b0]
|
||||
lsl r10, r10, #1
|
||||
orr r10, r10, #1
|
||||
tst r10, #0x100
|
||||
beq 1b
|
||||
|
||||
@ Restore security level
|
||||
out: mcr p15, 0, r7, c1, c1, 0
|
||||
|
||||
pop {r0-r12}
|
||||
subs pc, lr, #4
|
||||
|
||||
@ r1 = target CPU
|
||||
@ r2 = target PC
|
||||
.globl psci_cpu_on
|
||||
psci_cpu_on:
|
||||
push {lr}
|
||||
|
||||
mov r0, r1
|
||||
bl psci_get_cpu_stack_top @ get stack top of target CPU
|
||||
str r2, [r0] @ store target PC at stack top
|
||||
dsb
|
||||
|
||||
movw r0, #(SUN7I_CPUCFG_BASE & 0xffff)
|
||||
movt r0, #(SUN7I_CPUCFG_BASE >> 16)
|
||||
|
||||
@ CPU mask
|
||||
and r1, r1, #3 @ only care about first cluster
|
||||
mov r4, #1
|
||||
lsl r4, r4, r1
|
||||
|
||||
ldr r6, =psci_cpu_entry
|
||||
str r6, [r0, #0x1a4] @ PRIVATE_REG (boot vector)
|
||||
|
||||
@ Assert reset on target CPU
|
||||
mov r6, #0
|
||||
lsl r5, r1, #6 @ 64 bytes per CPU
|
||||
add r5, r5, #0x40 @ Offset from base
|
||||
add r5, r5, r0 @ CPU control block
|
||||
str r6, [r5] @ Reset CPU
|
||||
|
||||
@ l1 invalidate
|
||||
ldr r6, [r0, #0x184] @ CPUCFG_GEN_CTRL_REG
|
||||
bic r6, r6, r4
|
||||
str r6, [r0, #0x184]
|
||||
|
||||
@ Lock CPU (Disable external debug access)
|
||||
ldr r6, [r0, #0x1e4] @ CPUCFG_DBG_CTL1_REG
|
||||
bic r6, r6, r4
|
||||
str r6, [r0, #0x1e4]
|
||||
|
||||
@ Release power clamp
|
||||
movw r6, #0x1ff
|
||||
movt r6, #0
|
||||
1: lsrs r6, r6, #1
|
||||
str r6, [r0, #0x1b0] @ CPU1_PWR_CLAMP
|
||||
bne 1b
|
||||
|
||||
timer_wait r1, TEN_MS
|
||||
|
||||
@ Clear power gating
|
||||
ldr r6, [r0, #0x1b4] @ CPU1_PWROFF_REG
|
||||
bic r6, r6, #1
|
||||
str r6, [r0, #0x1b4]
|
||||
|
||||
@ Deassert reset on target CPU
|
||||
mov r6, #3
|
||||
str r6, [r5]
|
||||
|
||||
@ Unlock CPU (Enable external debug access)
|
||||
ldr r6, [r0, #0x1e4] @ CPUCFG_DBG_CTL1_REG
|
||||
orr r6, r6, r4
|
||||
str r6, [r0, #0x1e4]
|
||||
|
||||
mov r0, #ARM_PSCI_RET_SUCCESS @ Return PSCI_RET_SUCCESS
|
||||
pop {pc}
|
||||
|
||||
.globl psci_cpu_off
|
||||
psci_cpu_off:
|
||||
bl psci_cpu_off_common
|
||||
|
||||
@ Ask CPU0 to pull the rug...
|
||||
movw r0, #(GICD_BASE & 0xffff)
|
||||
movt r0, #(GICD_BASE >> 16)
|
||||
movw r1, #15 @ SGI15
|
||||
movt r1, #1 @ Target is CPU0
|
||||
str r1, [r0, #GICD_SGIR]
|
||||
dsb
|
||||
|
||||
1: wfi
|
||||
b 1b
|
||||
|
||||
.globl psci_arch_init
|
||||
psci_arch_init:
|
||||
mov r6, lr
|
||||
|
||||
movw r4, #(GICD_BASE & 0xffff)
|
||||
movt r4, #(GICD_BASE >> 16)
|
||||
|
||||
ldr r5, [r4, #GICD_IGROUPRn]
|
||||
bic r5, r5, #(1 << 15) @ SGI15 as Group-0
|
||||
str r5, [r4, #GICD_IGROUPRn]
|
||||
|
||||
mov r5, #0 @ Set SGI15 priority to 0
|
||||
strb r5, [r4, #(GICD_IPRIORITYRn + 15)]
|
||||
|
||||
add r4, r4, #0x1000 @ GICC address
|
||||
|
||||
mov r5, #0xff
|
||||
str r5, [r4, #GICC_PMR] @ Be cool with non-secure
|
||||
|
||||
ldr r5, [r4, #GICC_CTLR]
|
||||
orr r5, r5, #(1 << 3) @ Switch FIQEn on
|
||||
str r5, [r4, #GICC_CTLR]
|
||||
|
||||
mrc p15, 0, r5, c1, c1, 0 @ Read SCR
|
||||
orr r5, r5, #4 @ Enable FIQ in monitor mode
|
||||
bic r5, r5, #1 @ Secure mode
|
||||
mcr p15, 0, r5, c1, c1, 0 @ Write SCR
|
||||
isb
|
||||
|
||||
bl psci_get_cpu_id @ CPU ID => r0
|
||||
bl psci_get_cpu_stack_top @ stack top => r0
|
||||
mov sp, r0
|
||||
|
||||
bx r6
|
||||
|
||||
.globl psci_text_end
|
||||
psci_text_end:
|
||||
.popsection
|
||||
@@ -17,5 +17,6 @@ obj-y += transition.o
|
||||
obj-y += fwcall.o
|
||||
|
||||
obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/
|
||||
obj-$(CONFIG_S32V234) += s32v234/
|
||||
obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/
|
||||
obj-$(CONFIG_TARGET_HIKEY) += hisilicon/
|
||||
|
||||
@@ -528,6 +528,13 @@ u32 fsl_qoriq_core_to_type(unsigned int core)
|
||||
return -1; /* cannot identify the cluster */
|
||||
}
|
||||
|
||||
uint get_svr(void)
|
||||
{
|
||||
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
|
||||
|
||||
return gur_in32(&gur->svr);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DISPLAY_CPUINFO
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
@@ -636,6 +643,9 @@ int timer_init(void)
|
||||
#ifdef CONFIG_FSL_LSCH3
|
||||
u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
|
||||
#endif
|
||||
#ifdef CONFIG_LS2080A
|
||||
u32 __iomem *pctbenr = (u32 *)FSL_PMU_PCTBENR_OFFSET;
|
||||
#endif
|
||||
#ifdef COUNTER_FREQUENCY_REAL
|
||||
unsigned long cntfrq = COUNTER_FREQUENCY_REAL;
|
||||
|
||||
@@ -650,6 +660,15 @@ int timer_init(void)
|
||||
out_le32(cltbenr, 0xf);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LS2080A
|
||||
/*
|
||||
* In certain Layerscape SoCs, the clock for each core's
|
||||
* has an enable bit in the PMU Physical Core Time Base Enable
|
||||
* Register (PCTBENR), which allows the watchdog to operate.
|
||||
*/
|
||||
setbits_le32(pctbenr, 0xff);
|
||||
#endif
|
||||
|
||||
/* Enable clock for timer
|
||||
* This is a global setting.
|
||||
*/
|
||||
|
||||
@@ -121,6 +121,35 @@ mcboottimeout: MC boot timeout in milliseconds. If this variable is not defined
|
||||
mcmemsize: MC DRAM block size. If this variable is not defined, the value
|
||||
CONFIG_SYS_LS_MC_DRAM_BLOCK_MIN_SIZE will be assumed.
|
||||
|
||||
mcinitcmd: This environment variable is defined to initiate MC and DPL deployment
|
||||
from the location where it is stored(NOR, NAND, SD, SATA, USB)during
|
||||
u-boot booting.If this variable is not defined then MC_BOOT_ENV_VAR
|
||||
will be null and MC will not be booted and DPL will not be applied
|
||||
during U-boot booting.However the MC, DPC and DPL can be applied from
|
||||
console independently.
|
||||
The variable needs to be set from the console once and then on
|
||||
rebooting the parameters set in the varible will automatically be
|
||||
executed. The commmand is demostrated taking an example of mc boot
|
||||
using NOR Flash i.e. MC, DPL, and DPC is stored in the NOR flash:
|
||||
|
||||
cp.b 0xa0000000 0x580300000 $filesize
|
||||
cp.b 0x80000000 0x580800000 $filesize
|
||||
cp.b 0x90000000 0x580700000 $filesize
|
||||
|
||||
setenv mcinitcmd 'fsl_mc start mc 0x580300000 0x580800000'
|
||||
|
||||
If only linux is to be booted then the mcinitcmd environment should be set as
|
||||
|
||||
setenv mcinitcmd 'fsl_mc start mc 0x580300000 0x580800000;fsl_mc apply DPL 0x580700000'
|
||||
|
||||
Here the addresses 0xa0000000, 0x80000000, 0x80000000 are of DDR to where
|
||||
MC binary, DPC binary and DPL binary are stored and 0x580300000, 0x580800000
|
||||
and 0x580700000 are addresses in NOR where these are copied. It is to be
|
||||
noted that these addresses in 'fsl_mc start mc 0x580300000 0x580800000;fsl_mc apply DPL 0x580700000'
|
||||
can be replaced with the addresses of DDR to
|
||||
which these will be copied in case of these binaries being stored in other
|
||||
devices like SATA, USB, NAND, SD etc.
|
||||
|
||||
Booting from NAND
|
||||
-------------------
|
||||
Booting from NAND requires two images, RCW and u-boot-with-spl.bin.
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/soc.h>
|
||||
#include <fsl_ifc.h>
|
||||
#include "cpu.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -47,7 +48,7 @@ void get_sys_info(struct sys_info *sys_info)
|
||||
[5] = 2, /* CC2 PPL / 2 */
|
||||
};
|
||||
|
||||
uint i;
|
||||
uint i, cluster;
|
||||
uint freq_c_pll[CONFIG_SYS_FSL_NUM_CC_PLLS];
|
||||
uint ratio[CONFIG_SYS_FSL_NUM_CC_PLLS];
|
||||
unsigned long sysclk = CONFIG_SYS_CLK_FREQ;
|
||||
@@ -80,8 +81,9 @@ void get_sys_info(struct sys_info *sys_info)
|
||||
freq_c_pll[i] = sys_info->freq_systembus * ratio[i];
|
||||
}
|
||||
|
||||
for (cpu = 0; cpu < CONFIG_MAX_CPUS; cpu++) {
|
||||
u32 c_pll_sel = (in_be32(&clk->clkcsr[cpu].clkcncsr) >> 27)
|
||||
for_each_cpu(i, cpu, cpu_numcores(), cpu_mask()) {
|
||||
cluster = fsl_qoriq_core_to_cluster(cpu);
|
||||
u32 c_pll_sel = (in_be32(&clk->clkcsr[cluster].clkcncsr) >> 27)
|
||||
& 0xf;
|
||||
u32 cplx_pll = core_cplx_pll[c_pll_sel];
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ bool soc_has_dp_ddr(void)
|
||||
u32 svr = gur_in32(&gur->svr);
|
||||
|
||||
/* LS2085A has DP_DDR */
|
||||
if (SVR_SOC_VER(svr) == SVR_LS2085)
|
||||
if (SVR_SOC_VER(svr) == SVR_LS2085A)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -40,7 +40,7 @@ bool soc_has_aiop(void)
|
||||
u32 svr = gur_in32(&gur->svr);
|
||||
|
||||
/* LS2085A has AIOP */
|
||||
if (SVR_SOC_VER(svr) == SVR_LS2085)
|
||||
if (SVR_SOC_VER(svr) == SVR_LS2085A)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -124,15 +124,6 @@ void erratum_a009635(void)
|
||||
}
|
||||
#endif /* CONFIG_SYS_FSL_ERRATUM_A009635 */
|
||||
|
||||
static void erratum_a008751(void)
|
||||
{
|
||||
#ifdef CONFIG_SYS_FSL_ERRATUM_A008751
|
||||
u32 __iomem *scfg = (u32 __iomem *)SCFG_BASE;
|
||||
|
||||
writel(0x27672b2a, scfg + SCFG_USB3PRM1CR / 4);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void erratum_rcw_src(void)
|
||||
{
|
||||
#if defined(CONFIG_SPL)
|
||||
@@ -189,7 +180,6 @@ void bypass_smmu(void)
|
||||
}
|
||||
void fsl_lsch3_early_init_f(void)
|
||||
{
|
||||
erratum_a008751();
|
||||
erratum_rcw_src();
|
||||
init_early_memctl_regs(); /* tighten IFC timing */
|
||||
erratum_a009203();
|
||||
|
||||
@@ -24,7 +24,7 @@ u32 spl_boot_device(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 spl_boot_mode(void)
|
||||
u32 spl_boot_mode(const u32 boot_device)
|
||||
{
|
||||
switch (spl_boot_device()) {
|
||||
case BOOT_DEVICE_MMC1:
|
||||
|
||||
8
arch/arm/cpu/armv8/s32v234/Makefile
Normal file
8
arch/arm/cpu/armv8/s32v234/Makefile
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# (C) Copyright 2013-2016, Freescale Semiconductor, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y += generic.o
|
||||
obj-y += cpu.o
|
||||
97
arch/arm/cpu/armv8/s32v234/cpu.c
Normal file
97
arch/arm/cpu/armv8/s32v234/cpu.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* (C) Copyright 2014-2016, Freescale Semiconductor, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/armv8/mmu.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/mc_me_regs.h>
|
||||
#include "cpu.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
u32 cpu_mask(void)
|
||||
{
|
||||
return readl(MC_ME_CS);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_SYS_DCACHE_OFF
|
||||
|
||||
#define S32V234_IRAM_BASE 0x3e800000UL
|
||||
#define S32V234_IRAM_SIZE 0x800000UL
|
||||
#define S32V234_DRAM_BASE1 0x80000000UL
|
||||
#define S32V234_DRAM_SIZE1 0x40000000UL
|
||||
#define S32V234_DRAM_BASE2 0xC0000000UL
|
||||
#define S32V234_DRAM_SIZE2 0x20000000UL
|
||||
#define S32V234_PERIPH_BASE 0x40000000UL
|
||||
#define S32V234_PERIPH_SIZE 0x40000000UL
|
||||
|
||||
static struct mm_region s32v234_mem_map[] = {
|
||||
{
|
||||
.base = S32V234_IRAM_BASE,
|
||||
.size = S32V234_IRAM_SIZE,
|
||||
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE
|
||||
}, {
|
||||
.base = S32V234_DRAM_BASE1,
|
||||
.size = S32V234_DRAM_SIZE1,
|
||||
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
PTE_BLOCK_OUTER_SHARE
|
||||
}, {
|
||||
.base = S32V234_PERIPH_BASE,
|
||||
.size = S32V234_PERIPH_SIZE,
|
||||
.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
PTE_BLOCK_NON_SHARE
|
||||
/* TODO: Do we need these? */
|
||||
/* | PTE_BLOCK_PXN | PTE_BLOCK_UXN */
|
||||
}, {
|
||||
.base = S32V234_DRAM_BASE2,
|
||||
.size = S32V234_DRAM_SIZE2,
|
||||
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
|
||||
PTE_BLOCK_OUTER_SHARE
|
||||
}, {
|
||||
/* List terminator */
|
||||
0,
|
||||
}
|
||||
};
|
||||
|
||||
struct mm_region *mem_map = s32v234_mem_map;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return the number of cores on this SOC.
|
||||
*/
|
||||
int cpu_numcores(void)
|
||||
{
|
||||
int numcores;
|
||||
u32 mask;
|
||||
|
||||
mask = cpu_mask();
|
||||
numcores = hweight32(cpu_mask());
|
||||
|
||||
/* Verify if M4 is deactivated */
|
||||
if (mask & 0x1)
|
||||
numcores--;
|
||||
|
||||
return numcores;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARCH_EARLY_INIT_R)
|
||||
int arch_early_init_r(void)
|
||||
{
|
||||
int rv;
|
||||
asm volatile ("dsb sy");
|
||||
rv = fsl_s32v234_wake_seconday_cores();
|
||||
|
||||
if (rv)
|
||||
printf("Did not wake secondary cores\n");
|
||||
|
||||
asm volatile ("sev");
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_ARCH_EARLY_INIT_R */
|
||||
8
arch/arm/cpu/armv8/s32v234/cpu.h
Normal file
8
arch/arm/cpu/armv8/s32v234/cpu.h
Normal file
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* (C) Copyright 2014-2016, Freescale Semiconductor, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
u32 cpu_mask(void);
|
||||
int cpu_numcores(void);
|
||||
350
arch/arm/cpu/armv8/s32v234/generic.c
Normal file
350
arch/arm/cpu/armv8/s32v234/generic.c
Normal file
@@ -0,0 +1,350 @@
|
||||
/*
|
||||
* (C) Copyright 2013-2016, Freescale Semiconductor, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/imx-regs.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/arch/mc_cgm_regs.h>
|
||||
#include <asm/arch/mc_me_regs.h>
|
||||
#include <asm/arch/mc_rgm_regs.h>
|
||||
#include <netdev.h>
|
||||
#include <div64.h>
|
||||
#include <errno.h>
|
||||
|
||||
u32 get_cpu_rev(void)
|
||||
{
|
||||
struct mscm_ir *mscmir = (struct mscm_ir *)MSCM_BASE_ADDR;
|
||||
u32 cpu = readl(&mscmir->cpxtype);
|
||||
|
||||
return cpu;
|
||||
}
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
static uintptr_t get_pllfreq(u32 pll, u32 refclk_freq, u32 plldv,
|
||||
u32 pllfd, u32 selected_output)
|
||||
{
|
||||
u32 vco = 0, plldv_prediv = 0, plldv_mfd = 0, pllfd_mfn = 0;
|
||||
u32 plldv_rfdphi_div = 0, fout = 0;
|
||||
u32 dfs_portn = 0, dfs_mfn = 0, dfs_mfi = 0;
|
||||
|
||||
if (selected_output > DFS_MAXNUMBER) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
plldv_prediv =
|
||||
(plldv & PLLDIG_PLLDV_PREDIV_MASK) >> PLLDIG_PLLDV_PREDIV_OFFSET;
|
||||
plldv_mfd = (plldv & PLLDIG_PLLDV_MFD_MASK);
|
||||
|
||||
pllfd_mfn = (pllfd & PLLDIG_PLLFD_MFN_MASK);
|
||||
|
||||
plldv_prediv = plldv_prediv == 0 ? 1 : plldv_prediv;
|
||||
|
||||
/* The formula for VCO is from TR manual, rev. D */
|
||||
vco = refclk_freq / plldv_prediv * (plldv_mfd + pllfd_mfn / 20481);
|
||||
|
||||
if (selected_output != 0) {
|
||||
/* Determine the RFDPHI for PHI1 */
|
||||
plldv_rfdphi_div =
|
||||
(plldv & PLLDIG_PLLDV_RFDPHI1_MASK) >>
|
||||
PLLDIG_PLLDV_RFDPHI1_OFFSET;
|
||||
plldv_rfdphi_div = plldv_rfdphi_div == 0 ? 1 : plldv_rfdphi_div;
|
||||
if (pll == ARM_PLL || pll == ENET_PLL || pll == DDR_PLL) {
|
||||
dfs_portn =
|
||||
readl(DFS_DVPORTn(pll, selected_output - 1));
|
||||
dfs_mfi =
|
||||
(dfs_portn & DFS_DVPORTn_MFI_MASK) >>
|
||||
DFS_DVPORTn_MFI_OFFSET;
|
||||
dfs_mfn =
|
||||
(dfs_portn & DFS_DVPORTn_MFI_MASK) >>
|
||||
DFS_DVPORTn_MFI_OFFSET;
|
||||
fout = vco / (dfs_mfi + (dfs_mfn / 256));
|
||||
} else {
|
||||
fout = vco / plldv_rfdphi_div;
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Determine the RFDPHI for PHI0 */
|
||||
plldv_rfdphi_div =
|
||||
(plldv & PLLDIG_PLLDV_RFDPHI_MASK) >>
|
||||
PLLDIG_PLLDV_RFDPHI_OFFSET;
|
||||
fout = vco / plldv_rfdphi_div;
|
||||
}
|
||||
|
||||
return fout;
|
||||
|
||||
}
|
||||
|
||||
/* Implemented for ARMPLL, PERIPH_PLL, ENET_PLL, DDR_PLL, VIDEO_LL */
|
||||
static uintptr_t decode_pll(enum pll_type pll, u32 refclk_freq,
|
||||
u32 selected_output)
|
||||
{
|
||||
u32 plldv, pllfd;
|
||||
|
||||
plldv = readl(PLLDIG_PLLDV(pll));
|
||||
pllfd = readl(PLLDIG_PLLFD(pll));
|
||||
|
||||
return get_pllfreq(pll, refclk_freq, plldv, pllfd, selected_output);
|
||||
}
|
||||
|
||||
static u32 get_mcu_main_clk(void)
|
||||
{
|
||||
u32 coreclk_div;
|
||||
u32 sysclk_sel;
|
||||
u32 freq = 0;
|
||||
|
||||
sysclk_sel = readl(CGM_SC_SS(MC_CGM1_BASE_ADDR)) & MC_CGM_SC_SEL_MASK;
|
||||
sysclk_sel >>= MC_CGM_SC_SEL_OFFSET;
|
||||
|
||||
coreclk_div =
|
||||
readl(CGM_SC_DCn(MC_CGM1_BASE_ADDR, 0)) & MC_CGM_SC_DCn_PREDIV_MASK;
|
||||
coreclk_div >>= MC_CGM_SC_DCn_PREDIV_OFFSET;
|
||||
coreclk_div += 1;
|
||||
|
||||
switch (sysclk_sel) {
|
||||
case MC_CGM_SC_SEL_FIRC:
|
||||
freq = FIRC_CLK_FREQ;
|
||||
break;
|
||||
case MC_CGM_SC_SEL_XOSC:
|
||||
freq = XOSC_CLK_FREQ;
|
||||
break;
|
||||
case MC_CGM_SC_SEL_ARMPLL:
|
||||
/* ARMPLL has as source XOSC and CORE_CLK has as input PHI0 */
|
||||
freq = decode_pll(ARM_PLL, XOSC_CLK_FREQ, 0);
|
||||
break;
|
||||
case MC_CGM_SC_SEL_CLKDISABLE:
|
||||
printf("Sysclk is disabled\n");
|
||||
break;
|
||||
default:
|
||||
printf("unsupported system clock select\n");
|
||||
}
|
||||
|
||||
return freq / coreclk_div;
|
||||
}
|
||||
|
||||
static u32 get_sys_clk(u32 number)
|
||||
{
|
||||
u32 sysclk_div, sysclk_div_number;
|
||||
u32 sysclk_sel;
|
||||
u32 freq = 0;
|
||||
|
||||
switch (number) {
|
||||
case 3:
|
||||
sysclk_div_number = 0;
|
||||
break;
|
||||
case 6:
|
||||
sysclk_div_number = 1;
|
||||
break;
|
||||
default:
|
||||
printf("unsupported system clock \n");
|
||||
return -1;
|
||||
}
|
||||
sysclk_sel = readl(CGM_SC_SS(MC_CGM0_BASE_ADDR)) & MC_CGM_SC_SEL_MASK;
|
||||
sysclk_sel >>= MC_CGM_SC_SEL_OFFSET;
|
||||
|
||||
sysclk_div =
|
||||
readl(CGM_SC_DCn(MC_CGM1_BASE_ADDR, sysclk_div_number)) &
|
||||
MC_CGM_SC_DCn_PREDIV_MASK;
|
||||
sysclk_div >>= MC_CGM_SC_DCn_PREDIV_OFFSET;
|
||||
sysclk_div += 1;
|
||||
|
||||
switch (sysclk_sel) {
|
||||
case MC_CGM_SC_SEL_FIRC:
|
||||
freq = FIRC_CLK_FREQ;
|
||||
break;
|
||||
case MC_CGM_SC_SEL_XOSC:
|
||||
freq = XOSC_CLK_FREQ;
|
||||
break;
|
||||
case MC_CGM_SC_SEL_ARMPLL:
|
||||
/* ARMPLL has as source XOSC and SYSn_CLK has as input DFS1 */
|
||||
freq = decode_pll(ARM_PLL, XOSC_CLK_FREQ, 1);
|
||||
break;
|
||||
case MC_CGM_SC_SEL_CLKDISABLE:
|
||||
printf("Sysclk is disabled\n");
|
||||
break;
|
||||
default:
|
||||
printf("unsupported system clock select\n");
|
||||
}
|
||||
|
||||
return freq / sysclk_div;
|
||||
}
|
||||
|
||||
static u32 get_peripherals_clk(void)
|
||||
{
|
||||
u32 aux5clk_div;
|
||||
u32 freq = 0;
|
||||
|
||||
aux5clk_div =
|
||||
readl(CGM_ACn_DCm(MC_CGM0_BASE_ADDR, 5, 0)) &
|
||||
MC_CGM_ACn_DCm_PREDIV_MASK;
|
||||
aux5clk_div >>= MC_CGM_ACn_DCm_PREDIV_OFFSET;
|
||||
aux5clk_div += 1;
|
||||
|
||||
freq = decode_pll(PERIPH_PLL, XOSC_CLK_FREQ, 0);
|
||||
|
||||
return freq / aux5clk_div;
|
||||
|
||||
}
|
||||
|
||||
static u32 get_uart_clk(void)
|
||||
{
|
||||
u32 auxclk3_div, auxclk3_sel, freq = 0;
|
||||
|
||||
auxclk3_sel =
|
||||
readl(CGM_ACn_SS(MC_CGM0_BASE_ADDR, 3)) & MC_CGM_ACn_SEL_MASK;
|
||||
auxclk3_sel >>= MC_CGM_ACn_SEL_OFFSET;
|
||||
|
||||
auxclk3_div =
|
||||
readl(CGM_ACn_DCm(MC_CGM0_BASE_ADDR, 3, 0)) &
|
||||
MC_CGM_ACn_DCm_PREDIV_MASK;
|
||||
auxclk3_div >>= MC_CGM_ACn_DCm_PREDIV_OFFSET;
|
||||
auxclk3_div += 1;
|
||||
|
||||
switch (auxclk3_sel) {
|
||||
case MC_CGM_ACn_SEL_FIRC:
|
||||
freq = FIRC_CLK_FREQ;
|
||||
break;
|
||||
case MC_CGM_ACn_SEL_XOSC:
|
||||
freq = XOSC_CLK_FREQ;
|
||||
break;
|
||||
case MC_CGM_ACn_SEL_PERPLLDIVX:
|
||||
freq = get_peripherals_clk() / 3;
|
||||
break;
|
||||
case MC_CGM_ACn_SEL_SYSCLK:
|
||||
freq = get_sys_clk(6);
|
||||
break;
|
||||
default:
|
||||
printf("unsupported system clock select\n");
|
||||
}
|
||||
|
||||
return freq / auxclk3_div;
|
||||
}
|
||||
|
||||
static u32 get_fec_clk(void)
|
||||
{
|
||||
u32 aux2clk_div;
|
||||
u32 freq = 0;
|
||||
|
||||
aux2clk_div =
|
||||
readl(CGM_ACn_DCm(MC_CGM0_BASE_ADDR, 2, 0)) &
|
||||
MC_CGM_ACn_DCm_PREDIV_MASK;
|
||||
aux2clk_div >>= MC_CGM_ACn_DCm_PREDIV_OFFSET;
|
||||
aux2clk_div += 1;
|
||||
|
||||
freq = decode_pll(ENET_PLL, XOSC_CLK_FREQ, 0);
|
||||
|
||||
return freq / aux2clk_div;
|
||||
}
|
||||
|
||||
static u32 get_usdhc_clk(void)
|
||||
{
|
||||
u32 aux15clk_div;
|
||||
u32 freq = 0;
|
||||
|
||||
aux15clk_div =
|
||||
readl(CGM_ACn_DCm(MC_CGM0_BASE_ADDR, 15, 0)) &
|
||||
MC_CGM_ACn_DCm_PREDIV_MASK;
|
||||
aux15clk_div >>= MC_CGM_ACn_DCm_PREDIV_OFFSET;
|
||||
aux15clk_div += 1;
|
||||
|
||||
freq = decode_pll(ENET_PLL, XOSC_CLK_FREQ, 4);
|
||||
|
||||
return freq / aux15clk_div;
|
||||
}
|
||||
|
||||
static u32 get_i2c_clk(void)
|
||||
{
|
||||
return get_peripherals_clk();
|
||||
}
|
||||
|
||||
/* return clocks in Hz */
|
||||
unsigned int mxc_get_clock(enum mxc_clock clk)
|
||||
{
|
||||
switch (clk) {
|
||||
case MXC_ARM_CLK:
|
||||
return get_mcu_main_clk();
|
||||
case MXC_PERIPHERALS_CLK:
|
||||
return get_peripherals_clk();
|
||||
case MXC_UART_CLK:
|
||||
return get_uart_clk();
|
||||
case MXC_FEC_CLK:
|
||||
return get_fec_clk();
|
||||
case MXC_I2C_CLK:
|
||||
return get_i2c_clk();
|
||||
case MXC_USDHC_CLK:
|
||||
return get_usdhc_clk();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
printf("Error: Unsupported function to read the frequency! \
|
||||
Please define it correctly!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Not yet implemented - int soc_clk_dump(); */
|
||||
|
||||
#if defined(CONFIG_DISPLAY_CPUINFO)
|
||||
static char *get_reset_cause(void)
|
||||
{
|
||||
u32 cause = readl(MC_RGM_BASE_ADDR + 0x300);
|
||||
|
||||
switch (cause) {
|
||||
case F_SWT4:
|
||||
return "WDOG";
|
||||
case F_JTAG:
|
||||
return "JTAG";
|
||||
case F_FCCU_SOFT:
|
||||
return "FCCU soft reaction";
|
||||
case F_FCCU_HARD:
|
||||
return "FCCU hard reaction";
|
||||
case F_SOFT_FUNC:
|
||||
return "Software Functional reset";
|
||||
case F_ST_DONE:
|
||||
return "Self Test done reset";
|
||||
case F_EXT_RST:
|
||||
return "External reset";
|
||||
default:
|
||||
return "unknown reset";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define SRC_SCR_SW_RST (1<<12)
|
||||
|
||||
void reset_cpu(ulong addr)
|
||||
{
|
||||
printf("Feature not supported.\n");
|
||||
};
|
||||
|
||||
int print_cpuinfo(void)
|
||||
{
|
||||
printf("CPU: Freescale Treerunner S32V234 at %d MHz\n",
|
||||
mxc_get_clock(MXC_ARM_CLK) / 1000000);
|
||||
printf("Reset cause: %s\n", get_reset_cause());
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int cpu_eth_init(bd_t * bis)
|
||||
{
|
||||
int rc = -ENODEV;
|
||||
|
||||
#if defined(CONFIG_FEC_MXC)
|
||||
rc = fecmxc_initialize(bis);
|
||||
#endif
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int get_clocks(void)
|
||||
{
|
||||
#ifdef CONFIG_FSL_ESDHC
|
||||
gd->arch.sdhc_clk = mxc_get_clock(MXC_USDHC_CLK);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -81,6 +81,14 @@ reset:
|
||||
msr cpacr_el1, x0 /* Enable FP/SIMD */
|
||||
0:
|
||||
|
||||
/* Enalbe SMPEN bit for coherency.
|
||||
* This register is not architectural but at the moment
|
||||
* this bit should be set for A53/A57/A72.
|
||||
*/
|
||||
mrs x0, S3_1_c15_c2_1 /* cpuactlr_el1 */
|
||||
orr x0, x0, #0x40
|
||||
msr S3_1_c15_c2_1, x0
|
||||
|
||||
/* Apply ARM core specific erratas */
|
||||
bl apply_core_errata
|
||||
|
||||
@@ -258,12 +266,10 @@ ENDPROC(lowlevel_init)
|
||||
|
||||
WEAK(smp_kick_all_cpus)
|
||||
/* Kick secondary cpus up by SGI 0 interrupt */
|
||||
mov x29, lr /* Save LR */
|
||||
#if defined(CONFIG_GICV2) || defined(CONFIG_GICV3)
|
||||
ldr x0, =GICD_BASE
|
||||
bl gic_kick_secondary_cpus
|
||||
b gic_kick_secondary_cpus
|
||||
#endif
|
||||
mov lr, x29 /* Restore LR */
|
||||
ret
|
||||
ENDPROC(smp_kick_all_cpus)
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ u32 spl_boot_device(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 spl_boot_mode(void)
|
||||
u32 spl_boot_mode(const u32 boot_device)
|
||||
{
|
||||
switch (spl_boot_device()) {
|
||||
case BOOT_DEVICE_RAM:
|
||||
|
||||
@@ -96,6 +96,7 @@ cpu_init_crit:
|
||||
ldr r1, cpuspeed
|
||||
str r1, [r0, #PPCR]
|
||||
|
||||
#ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY
|
||||
/*
|
||||
* before relocating, we have to setup RAM timing
|
||||
* because memory timing is board-dependend, you will
|
||||
@@ -104,6 +105,7 @@ cpu_init_crit:
|
||||
mov ip, lr
|
||||
bl lowlevel_init
|
||||
mov lr, ip
|
||||
#endif
|
||||
|
||||
/*
|
||||
* disable MMU stuff and enable I-cache
|
||||
|
||||
@@ -50,6 +50,7 @@ SECTIONS
|
||||
|
||||
#ifndef CONFIG_ARMV7_SECURE_BASE
|
||||
#define CONFIG_ARMV7_SECURE_BASE
|
||||
#define __ARMV7_PSCI_STACK_IN_RAM
|
||||
#endif
|
||||
|
||||
.__secure_start : {
|
||||
@@ -67,6 +68,12 @@ SECTIONS
|
||||
SIZEOF(.__secure_start) +
|
||||
SIZEOF(.secure_text);
|
||||
|
||||
#ifdef __ARMV7_PSCI_STACK_IN_RAM
|
||||
/* Align to page boundary and skip 2 pages */
|
||||
. = (. & ~ 0xfff) + 0x2000;
|
||||
#undef __ARMV7_PSCI_STACK_IN_RAM
|
||||
#endif
|
||||
|
||||
__secure_end_lma = .;
|
||||
.__secure_end : AT(__secure_end_lma) {
|
||||
*(.__secure_end)
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
dtb-$(CONFIG_AT91FAMILY) += at91sam9260-smartweb.dtb \
|
||||
at91sam9g20-taurus.dtb \
|
||||
at91sam9g45-corvus.dtb \
|
||||
at91sam9g45-gurnard.dtb
|
||||
|
||||
dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
|
||||
dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
|
||||
dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
|
||||
@@ -94,10 +99,14 @@ dtb-$(CONFIG_ARCH_ZYNQMP) += \
|
||||
zynqmp-zc1751-xm016-dc2.dtb \
|
||||
zynqmp-zc1751-xm018-dc4.dtb \
|
||||
zynqmp-zc1751-xm019-dc5.dtb
|
||||
dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb am335x-bone.dtb am335x-evm.dtb \
|
||||
dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb am335x-bone.dtb \
|
||||
am335x-draco.dtb \
|
||||
am335x-evm.dtb \
|
||||
am335x-evmsk.dtb \
|
||||
am335x-bonegreen.dtb \
|
||||
am335x-icev2.dtb
|
||||
am335x-icev2.dtb \
|
||||
am335x-pxm50.dtb \
|
||||
am335x-rut.dtb
|
||||
dtb-$(CONFIG_AM43XX) += am437x-gp-evm.dtb am437x-sk-evm.dtb \
|
||||
am43x-epos-evm.dtb \
|
||||
am437x-idk-evm.dtb
|
||||
@@ -105,6 +114,7 @@ dtb-$(CONFIG_THUNDERX) += thunderx-88xx.dtb
|
||||
|
||||
dtb-$(CONFIG_ARCH_SOCFPGA) += \
|
||||
socfpga_arria5_socdk.dtb \
|
||||
socfpga_cyclone5_is1.dtb \
|
||||
socfpga_cyclone5_mcvevk.dtb \
|
||||
socfpga_cyclone5_socdk.dtb \
|
||||
socfpga_cyclone5_de0_nano_soc.dtb \
|
||||
@@ -114,7 +124,8 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \
|
||||
socfpga_cyclone5_vining_fpga.dtb
|
||||
|
||||
dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb
|
||||
dtb-$(CONFIG_TARGET_BEAGLE_X15) += am57xx-beagle-x15.dtb
|
||||
dtb-$(CONFIG_TARGET_AM57XX_EVM) += am57xx-beagle-x15.dtb \
|
||||
am572x-idk.dtb
|
||||
dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
|
||||
|
||||
dtb-$(CONFIG_LS102XA) += ls1021a-qds-duart.dtb \
|
||||
@@ -216,12 +227,15 @@ dtb-$(CONFIG_MACH_SUN7I) += \
|
||||
dtb-$(CONFIG_MACH_SUN8I_A23) += \
|
||||
sun8i-a23-evb.dtb \
|
||||
sun8i-a23-gt90h-v4.dtb \
|
||||
sun8i-a23-inet86dz.dtb \
|
||||
sun8i-a23-polaroid-mid2407pxe03.dtb \
|
||||
sun8i-a23-polaroid-mid2809pxe04.dtb \
|
||||
sun8i-a23-q8-tablet.dtb
|
||||
dtb-$(CONFIG_MACH_SUN8I_A33) += \
|
||||
sun8i-a33-ga10h-v1.1.dtb \
|
||||
sun8i-a33-q8-tablet.dtb \
|
||||
sun8i-a33-sinlinx-sina33.dtb
|
||||
sun8i-a33-sinlinx-sina33.dtb \
|
||||
sun8i-r16-parrot.dtb
|
||||
dtb-$(CONFIG_MACH_SUN8I_A83T) += \
|
||||
sun8i-a83t-allwinner-h8homlet-v2.dtb \
|
||||
sun8i-a83t-cubietruck-plus.dtb \
|
||||
|
||||
152
arch/arm/dts/am335x-draco.dts
Normal file
152
arch/arm/dts/am335x-draco.dts
Normal file
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Support for Siemens DRACO board
|
||||
*
|
||||
* Copyright (C) 2014 - Lukas Stockmann <lukas.stockmann@siemens.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "am33xx.dtsi"
|
||||
#include "am335x-draco.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Siemens DRACO";
|
||||
compatible = "siemens,draco", "ti,am33xx";
|
||||
|
||||
/* ethernet alias is needed for the MAC address passing from U-Boot */
|
||||
aliases {
|
||||
ethernet0 = &cpsw_emac0;
|
||||
mdio-gpio0 = &mdio0;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
button0 {
|
||||
label = "button0";
|
||||
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_F1>; /* button0 */
|
||||
};
|
||||
button1 {
|
||||
label = "button1";
|
||||
gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_F2>; /* button1 */
|
||||
};
|
||||
};
|
||||
|
||||
ocp {
|
||||
debugss: debugss@4b000000 {
|
||||
compatible = "ti,debugss";
|
||||
ti,hwmods = "debugss";
|
||||
reg = <0x4b000000 1000000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gpio_mux_pins>;
|
||||
|
||||
gpio_mux_pins: gpio_mux_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x1d0 (PIN_INPUT | MUX_MODE0) /* tms jtag */
|
||||
0x1d4 (PIN_INPUT | MUX_MODE0) /* tdi jtag */
|
||||
0x1d8 (PIN_OUTPUT | MUX_MODE0) /* tdo jtag */
|
||||
0x1dc (PIN_INPUT | MUX_MODE0) /* tck jtag */
|
||||
0x1e0 (PIN_INPUT | MUX_MODE0) /* trstn jtag */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_default: cpsw_default {
|
||||
pinctrl-single,pins = <
|
||||
0x0E8 (PIN_INPUT_PULLUP | MUX_MODE7) /* lcd_plck FIX STO should be a OUTPUT driven high*/
|
||||
0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */
|
||||
0x114 (PIN_OUTPUT | MUX_MODE1) /* mii1_txen.mii1_txen */
|
||||
0x124 (PIN_OUTPUT | MUX_MODE1) /* mii1_txd1.mii1_txd1 */
|
||||
0x128 (PIN_OUTPUT | MUX_MODE1) /* mii1_txd0.mii1_txd0 */
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.mii1_rxd1 */
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.mii1_rxd0 */
|
||||
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_refclk.rmii1_refclk */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_sleep: cpsw_sleep {
|
||||
pinctrl-single,pins = <
|
||||
0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_default: davinci_mdio_default {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO */
|
||||
0x148 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
|
||||
0x14c (PIN_OUTPUT | MUX_MODE0) /* mdio_clk.mdio_clk */
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_sleep: davinci_mdio_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO reset value */
|
||||
0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
gpio_mdio_default: gpio_mdio_default {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO via GPIO */
|
||||
0x148 (PIN_INPUT | MUX_MODE7) /* mdio_data.mdio_data GPIO0_0 */
|
||||
0x14c (PIN_OUTPUT | MUX_MODE7) /* mdio_clk.mdio_clk GPIO0_1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&mac {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
slaves = <1>; /* use only one emac if */
|
||||
|
||||
mdio0: gpio {
|
||||
compatible = "virtual,mdio-gpio";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gpio_mdio_default>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH /* MDIO-CLK */
|
||||
&gpio0 0 GPIO_ACTIVE_HIGH>; /* MDIO-DATA */
|
||||
|
||||
phy0: ethernet-phy@1 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* Disable davinci/am335x mdio interface on this platform */
|
||||
&davinci_mdio {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&mdio0>, <0>;
|
||||
phy-mode = "rmii";
|
||||
};
|
||||
|
||||
&phy_sel {
|
||||
rmii-clock-ext;
|
||||
};
|
||||
169
arch/arm/dts/am335x-draco.dtsi
Normal file
169
arch/arm/dts/am335x-draco.dtsi
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* Common support for Siemens Draco SOM (AM335x based)
|
||||
*
|
||||
* Copyright (C) 2013,2014 - Stefan Roese <sr@denx.de>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public License
|
||||
* version 2. This program is licensed "as is" without any warranty of any
|
||||
* kind, whether express or implied.
|
||||
*/
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
stdout-path = &uart0;
|
||||
tick-timer = &timer2;
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x08000000>; /* 128 MB */
|
||||
};
|
||||
|
||||
ocp {
|
||||
uart0: serial@44e09000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
i2c0: i2c@44e0b000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
eeprom: eeprom@50 {
|
||||
compatible = "atmel,24c128";
|
||||
reg = <0x50>;
|
||||
pagesize = <64>;
|
||||
};
|
||||
};
|
||||
|
||||
musb: usb@47400000 {
|
||||
status = "okay";
|
||||
|
||||
control@44e10620 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@47401300 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@47401b00 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@47401000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@47401800 {
|
||||
status = "okay";
|
||||
dr_mode = "host";
|
||||
};
|
||||
|
||||
dma-controller@47402000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
i2c0_pins: pinmux_i2c0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
|
||||
0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
uart0_pins: pinmux_uart0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
|
||||
0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
|
||||
>;
|
||||
};
|
||||
|
||||
nandflash_pins: nandflash_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
|
||||
0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
|
||||
0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
|
||||
0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
|
||||
0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
|
||||
0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
|
||||
0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
|
||||
0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
|
||||
0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
|
||||
0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
|
||||
0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
|
||||
0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
|
||||
0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
|
||||
0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */
|
||||
0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&timer3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&elm {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpmc {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&nandflash_pins>;
|
||||
|
||||
ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */
|
||||
|
||||
nand@0,0 {
|
||||
reg = <0 0 0>; /* CS0, offset 0 */
|
||||
nand-bus-width = <8>;
|
||||
ti,nand-ecc-opt = "bch8";
|
||||
gpmc,device-nand = "true";
|
||||
gpmc,device-width = <1>;
|
||||
gpmc,sync-clk-ps = <0>;
|
||||
gpmc,cs-on-ns = <0>;
|
||||
gpmc,cs-rd-off-ns = <44>;
|
||||
gpmc,cs-wr-off-ns = <44>;
|
||||
gpmc,adv-on-ns = <6>;
|
||||
gpmc,adv-rd-off-ns = <34>;
|
||||
gpmc,adv-wr-off-ns = <44>;
|
||||
gpmc,we-on-ns = <0>;
|
||||
gpmc,we-off-ns = <40>;
|
||||
gpmc,oe-on-ns = <0>;
|
||||
gpmc,oe-off-ns = <54>;
|
||||
gpmc,access-ns = <64>;
|
||||
gpmc,rd-cycle-ns = <82>;
|
||||
gpmc,wr-cycle-ns = <82>;
|
||||
gpmc,wait-on-read = "true";
|
||||
gpmc,wait-on-write = "true";
|
||||
gpmc,bus-turnaround-ns = <0>;
|
||||
gpmc,cycle2cycle-delay-ns = <0>;
|
||||
gpmc,clk-activation-ns = <0>;
|
||||
gpmc,wait-monitoring-ns = <0>;
|
||||
gpmc,wr-access-ns = <40>;
|
||||
gpmc,wr-data-mux-bus-ns = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
elm_id = <&elm>;
|
||||
};
|
||||
};
|
||||
|
||||
/* disable the RTC node as its not accessible on the draco/dxr2 board */
|
||||
&rtc {
|
||||
status = "disabled";
|
||||
ti,hwmods = "disabled";
|
||||
};
|
||||
539
arch/arm/dts/am335x-pxm2.dtsi
Normal file
539
arch/arm/dts/am335x-pxm2.dtsi
Normal file
@@ -0,0 +1,539 @@
|
||||
/*
|
||||
* Copyright (C) 2014 DENX Software Engineering GmbH
|
||||
* Heiko Schocher <hs@denx.de>
|
||||
*
|
||||
* Based on:
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "am33xx.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
stdout-path = &uart0;
|
||||
tick-timer = &timer2;
|
||||
};
|
||||
|
||||
cpus {
|
||||
cpu@0 {
|
||||
cpu0-supply = <&vdd1_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
backlight0: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&ecap0 0 50000 0>;
|
||||
brightness-levels = <0 2 5 7 10 12 15 17 20 22 25 28 30 33 35
|
||||
38 40 43 45 48 51 53 56 58 61 63 66 68 71
|
||||
73 76 79 81 84 86 89 91 94 96 99 102 104
|
||||
107 109 112 114 117 119 122 124 127 130
|
||||
132 135 137 140 142 145 147 150 153 155
|
||||
158 160 163 165 168 170 173 175 178 181
|
||||
183 186 188 191 193 196 198 201 204 206
|
||||
209 211 214 216 219 221 224 226 229 232
|
||||
234 237 239 242 244 247 249 252 255>;
|
||||
default-brightness-level = <80>;
|
||||
power-supply = <&backlight_reg>;
|
||||
enable-gpios = <&gpio3 16 0>;
|
||||
};
|
||||
|
||||
backlight_reg: fixedregulator0 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "backlight_reg";
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
gpio_keys: restart-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
|
||||
restart0 {
|
||||
label = "restart";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
|
||||
gpio-key,wakeup;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_blue {
|
||||
label = "blue";
|
||||
gpios = <&gpio3 20 0>;
|
||||
};
|
||||
led_green {
|
||||
label = "green";
|
||||
gpios = <&gpio1 31 0>;
|
||||
};
|
||||
led_red {
|
||||
label = "red";
|
||||
gpios = <&gpio3 21 0>;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x10000000>; /* 256 MB */
|
||||
};
|
||||
|
||||
reg_lcd_3v3: fixedregulator1 {
|
||||
compatible = "regulator-gpio";
|
||||
regulator-name = "lcd-3v3";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-type = "voltage";
|
||||
startup-delay-us = <100>;
|
||||
states = <1800000 0x1
|
||||
2900000 0x0>;
|
||||
enable-at-boot;
|
||||
gpios = <&gpio3 19 0>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vbat: fixedregulator2 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vbat";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
vmmc: fixedregulator3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmc";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
&cppi41dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&davinci_mdio>, <0>;
|
||||
phy-mode = "rgmii-txid";
|
||||
};
|
||||
|
||||
&cpsw_emac1 {
|
||||
phy_id = <&davinci_mdio>, <1>;
|
||||
phy-mode = "rgmii-txid";
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&elm {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&epwmss0 {
|
||||
status = "okay";
|
||||
|
||||
ecap0: ecap@48300100 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ecap0_pins>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpmc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&nandflash_pins>;
|
||||
status = "okay";
|
||||
|
||||
ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */
|
||||
|
||||
nand@0,0 {
|
||||
reg = <0 0 0>; /* CS0, offset 0 */
|
||||
nand-bus-width = <8>;
|
||||
ti,nand-ecc-opt = "bch8";
|
||||
gpmc,device-nand = "true";
|
||||
gpmc,device-width = <1>;
|
||||
gpmc,sync-clk-ps = <0>;
|
||||
gpmc,cs-on-ns = <0>;
|
||||
gpmc,cs-rd-off-ns = <44>;
|
||||
gpmc,cs-wr-off-ns = <44>;
|
||||
gpmc,adv-on-ns = <6>;
|
||||
gpmc,adv-rd-off-ns = <34>;
|
||||
gpmc,adv-wr-off-ns = <44>;
|
||||
gpmc,we-on-ns = <0>;
|
||||
gpmc,we-off-ns = <40>;
|
||||
gpmc,oe-on-ns = <0>;
|
||||
gpmc,oe-off-ns = <54>;
|
||||
gpmc,access-ns = <64>;
|
||||
gpmc,rd-cycle-ns = <82>;
|
||||
gpmc,wr-cycle-ns = <82>;
|
||||
gpmc,wait-on-read = "true";
|
||||
gpmc,wait-on-write = "true";
|
||||
gpmc,bus-turnaround-ns = <0>;
|
||||
gpmc,cycle2cycle-delay-ns = <0>;
|
||||
gpmc,clk-activation-ns = <0>;
|
||||
gpmc,wait-monitoring-ns = <0>;
|
||||
gpmc,wr-access-ns = <40>;
|
||||
gpmc,wr-data-mux-bus-ns = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
elm_id = <&elm>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
clock-frequency = <400000>;
|
||||
status = "okay";
|
||||
|
||||
tps: tps@2d {
|
||||
reg = <0x2d>;
|
||||
};
|
||||
eeprom: eeprom@50 {
|
||||
compatible = "atmel,24c128";
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
clock-frequency = <100000>;
|
||||
status = "okay";
|
||||
|
||||
tsl2563: tsl2563@49 {
|
||||
compatible = "amstaos,tsl2563";
|
||||
reg = <0x49>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_pins>;
|
||||
clock-frequency = <100000>;
|
||||
status = "okay";
|
||||
|
||||
egalax_ts@04 {
|
||||
compatible = "eeti,egalax_ts";
|
||||
reg = <0x04>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <24 2>;
|
||||
wakeup-gpios = <&gpio1 25 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&lcdc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mac {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
vmmc-supply = <&vmmc>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&gpio0 6 0>;
|
||||
wp-gpios = <&gpio3 18 0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&phy_sel {
|
||||
rgmii-no-delay;
|
||||
};
|
||||
|
||||
#include "tps65910.dtsi"
|
||||
|
||||
&tps {
|
||||
vcc1-supply = <&vbat>;
|
||||
vcc2-supply = <&vbat>;
|
||||
vcc3-supply = <&vbat>;
|
||||
vcc4-supply = <&vbat>;
|
||||
vcc5-supply = <&vbat>;
|
||||
vcc6-supply = <&vbat>;
|
||||
vcc7-supply = <&vbat>;
|
||||
vccio-supply = <&vbat>;
|
||||
|
||||
regulators {
|
||||
vrtc_reg: regulator@0 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vio_reg: regulator@1 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd1_reg: regulator@2 {
|
||||
/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
|
||||
regulator-name = "vdd_mpu";
|
||||
regulator-min-microvolt = <912500>;
|
||||
regulator-max-microvolt = <1312500>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd2_reg: regulator@3 {
|
||||
/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
|
||||
regulator-name = "vdd_core";
|
||||
regulator-min-microvolt = <912500>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdd3_reg: regulator@4 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdig1_reg: regulator@5 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdig2_reg: regulator@6 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vpll_reg: regulator@7 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vdac_reg: regulator@8 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vaux1_reg: regulator@9 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vaux2_reg: regulator@10 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vaux33_reg: regulator@11 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
vmmc_reg: regulator@12 {
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_ctrl_mod {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&clkout2_pin &gpio_pin>;
|
||||
|
||||
clkout2_pin: pinmux_clkout2_pin {
|
||||
pinctrl-single,pins = <
|
||||
0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_default: cpsw_default {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 */
|
||||
0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
|
||||
0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */
|
||||
0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
|
||||
0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
|
||||
0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
|
||||
0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
|
||||
0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
|
||||
0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rgmii1_rclk */
|
||||
0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd3.rgmii1_rd3 */
|
||||
0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd2.rgmii1_rd2 */
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_sleep: cpsw_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 reset value */
|
||||
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_default: davinci_mdio_default {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO */
|
||||
0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
|
||||
0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_sleep: davinci_mdio_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO reset value */
|
||||
0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
ecap0_pins: ecap_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x198 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* mcasp0_axr0.gpio3_16 Backlight enable */
|
||||
0x164 (MUX_MODE0) /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
|
||||
>;
|
||||
};
|
||||
|
||||
|
||||
gpio_pin: gpio_pin {
|
||||
pinctrl-single,pins = <
|
||||
0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 touch reset */
|
||||
0x60 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_a8.gpio1_24 touch irq */
|
||||
0x64 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_a9.gpio1_25 touch power */
|
||||
0x6c (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_a11.gpio1_27 pad14 to DFU */
|
||||
0x21c (MUX_MODE0) /* usb0_drvvbus */
|
||||
0x234 (MUX_MODE0) /* usb1_drvvbus */
|
||||
0x1a0 (PIN_INPUT_PULLUP | MUX_MODE4) /* mcasp0_aclkr.mmc0_sdwp */
|
||||
0x160 (PIN_INPUT_PULLUP | MUX_MODE5) /* spi0_cs1.mmc0_sdcd */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c0_pins: pinmux_i2c0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
|
||||
0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c1_pins: pinmux_i2c1_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */
|
||||
0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c2_pins: pinmux_i2c2_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x150 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2) /* spi0_sclk.i2c2_sda */
|
||||
0x154 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2) /* spi0_cs0.i2c2_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
lcd_pins_s0: lcd_pins_s0 {
|
||||
pinctrl-single,pins = <
|
||||
0x20 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad8.lcd_data23 */
|
||||
0x24 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad9.lcd_data22 */
|
||||
0x28 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad10.lcd_data21 */
|
||||
0x2c (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad11.lcd_data20 */
|
||||
0x30 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad12.lcd_data19 */
|
||||
0x34 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad13.lcd_data18 */
|
||||
0x38 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad14.lcd_data17 */
|
||||
0x3c (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad15.lcd_data16 */
|
||||
0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */
|
||||
0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */
|
||||
0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */
|
||||
0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */
|
||||
0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */
|
||||
0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */
|
||||
0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */
|
||||
0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */
|
||||
0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */
|
||||
0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */
|
||||
0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */
|
||||
0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */
|
||||
0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */
|
||||
0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */
|
||||
0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */
|
||||
0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */
|
||||
0xe0 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_vsync.lcd_vsync */
|
||||
0xe4 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_hsync.lcd_hsync */
|
||||
0xe8 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_pclk.lcd_pclk */
|
||||
0xec (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */
|
||||
0x194 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* mcasp0_fsx.gpio3_15 LCD enable */
|
||||
>;
|
||||
};
|
||||
|
||||
nandflash_pins: pinmux_nandflash_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
|
||||
0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
|
||||
0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
|
||||
0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
|
||||
0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
|
||||
0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
|
||||
0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
|
||||
0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
|
||||
0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
|
||||
0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
|
||||
0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
|
||||
0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
|
||||
0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
|
||||
0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */
|
||||
0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
|
||||
>;
|
||||
};
|
||||
|
||||
uart0_pins: pinmux_uart0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
|
||||
0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&wdt2 {
|
||||
wdt-keep-enabled;
|
||||
};
|
||||
59
arch/arm/dts/am335x-pxm50.dts
Normal file
59
arch/arm/dts/am335x-pxm50.dts
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2014 DENX Software Engineering GmbH
|
||||
* Heiko Schocher <hs@denx.de>
|
||||
*
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "am335x-pxm2.dtsi"
|
||||
|
||||
/ {
|
||||
model = "PXM2/PXM50";
|
||||
compatible = "ti,am335x-evm", "ti,am33xx";
|
||||
|
||||
panel {
|
||||
compatible = "ti,tilcdc,panel";
|
||||
backlight = <&backlight0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lcd_pins_s0>;
|
||||
enable-gpios = <&gpio3 15 0>;
|
||||
status = "okay";
|
||||
|
||||
panel-info {
|
||||
ac-bias = <255>;
|
||||
ac-bias-intrpt = <0>;
|
||||
dma-burst-sz = <16>;
|
||||
bpp = <32>;
|
||||
fdd = <0x80>;
|
||||
sync-edge = <0>;
|
||||
sync-ctrl = <1>;
|
||||
raster-order = <0>;
|
||||
fifo-th = <0>;
|
||||
tft-alt-mode = <0>;
|
||||
invert-pxl-clk = <0>;
|
||||
};
|
||||
|
||||
display-timings {
|
||||
native-mode = <&timing1>;
|
||||
|
||||
timing1: 1376x768p50 {
|
||||
clock-frequency = <60000000>;
|
||||
hactive = <1376>;
|
||||
vactive = <768>;
|
||||
hfront-porch = <14>;
|
||||
hback-porch = <64>;
|
||||
hsync-len = <56>;
|
||||
vback-porch = <28>;
|
||||
vfront-porch = <1>;
|
||||
vsync-len = <6>;
|
||||
hsync-active = <1>;
|
||||
vsync-active = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
611
arch/arm/dts/am335x-rut.dts
Normal file
611
arch/arm/dts/am335x-rut.dts
Normal file
@@ -0,0 +1,611 @@
|
||||
/*
|
||||
* Copyright (C) 2014 DENX Software Engineering GmbH
|
||||
* Heiko Schocher <hs@denx.de>
|
||||
*
|
||||
* Based on:
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include "am33xx.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "RUT";
|
||||
compatible = "ti,am335x-evm", "ti,am33xx";
|
||||
|
||||
buzzer {
|
||||
compatible = "pwm-beeper";
|
||||
pwms = <&ecap0 0 16000 0>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = &uart0;
|
||||
tick-timer = &timer2;
|
||||
};
|
||||
|
||||
cpus {
|
||||
cpu@0 {
|
||||
cpu0-supply = <&dcdc2_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys: powerfail-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
autorepeat;
|
||||
|
||||
pwr-fail0 {
|
||||
label = "power-fail";
|
||||
linux,code = <KEY_POWER>;
|
||||
gpios = <&gpio3 4 GPIO_ACTIVE_HIGH>;
|
||||
gpio-key,wakeup;
|
||||
};
|
||||
|
||||
pwr-fail1 {
|
||||
label = "power-fail-redundant";
|
||||
linux,code = <KEY_POWER>;
|
||||
gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
|
||||
gpio-key,wakeup;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_green {
|
||||
label = "rut:green:debug:run_mode";
|
||||
gpios = <&gpio3 20 1>;
|
||||
/* activelow = 1, default trigger heartbeat */
|
||||
};
|
||||
led_yellow {
|
||||
label = "rut:debug:yellow:osc_ch1";
|
||||
gpios = <&gpio0 17 1>;
|
||||
/* activelow = 1, default trigger mmc0 */
|
||||
};
|
||||
led_red {
|
||||
label = "rut:debug:red:osc_ch2";
|
||||
gpios = <&gpio0 16 1>;
|
||||
/* activelow = 1, default trigger debug_osc_ch2 */
|
||||
};
|
||||
/* optional */
|
||||
led_alive {
|
||||
label = "rut:alive";
|
||||
gpios = <&gpio0 15 1>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
/* activelow = 1, default trigger heartbeat */
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x10000000>; /* 256 MB */
|
||||
};
|
||||
|
||||
panel {
|
||||
compatible = "ti,tilcdc,panel";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lcd_pins_s0>;
|
||||
status = "okay";
|
||||
|
||||
/* FORMIKE_KWH043ST20_F01 */
|
||||
panel-info {
|
||||
ac-bias = <255>;
|
||||
ac-bias-intrpt = <0>;
|
||||
dma-burst-sz = <16>;
|
||||
bpp = <16>;
|
||||
fdd = <0x80>;
|
||||
sync-edge = <0>;
|
||||
sync-ctrl = <1>;
|
||||
raster-order = <0>;
|
||||
fifo-th = <0>;
|
||||
tft-alt-mode = <0>;
|
||||
invert-pxl-clk = <1>;
|
||||
};
|
||||
|
||||
display-timings {
|
||||
native-mode = <&timing1>;
|
||||
timing1: 480x800p60 {
|
||||
clock-frequency = <29925000>;
|
||||
hactive = <480>;
|
||||
vactive = <800>;
|
||||
hfront-porch = <50>;
|
||||
hback-porch = <50>;
|
||||
hsync-len = <50>;
|
||||
vback-porch = <50>;
|
||||
vfront-porch = <50>;
|
||||
vsync-len = <50>;
|
||||
hsync-active = <1>;
|
||||
vsync-active = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
vmmc: fixedregulator3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vmmc";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
watchdog {
|
||||
compatible = "linux,wdt-gpio";
|
||||
gpios = <&gpio0 14 0>;
|
||||
hw_algo = "level";
|
||||
hw_margin_ms = <30000>;
|
||||
};
|
||||
};
|
||||
|
||||
&aes {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cppi41dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&davinci_mdio>, <1>;
|
||||
phy-mode = "rmii";
|
||||
};
|
||||
|
||||
&cpsw_emac1 {
|
||||
phy_id = <&davinci_mdio>, <0>;
|
||||
phy-mode = "rmii";
|
||||
};
|
||||
|
||||
&davinci_mdio {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
status = "okay";
|
||||
gpios = <&gpio2 18 0>;
|
||||
|
||||
ethernet_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-id2000.5ce1";
|
||||
reg = <1>;
|
||||
natsemi,master_mode_fixup;
|
||||
};
|
||||
};
|
||||
|
||||
&elm {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&epwmss0 {
|
||||
status = "okay";
|
||||
|
||||
ecap0: ecap@48300100 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ecap0_pins>;
|
||||
};
|
||||
};
|
||||
|
||||
&epwmss1 {
|
||||
status = "okay";
|
||||
|
||||
ehrpwm1: ehrpwm@48302200 {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&epwmss1_pins>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpmc {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&nandflash_pins>;
|
||||
status = "okay";
|
||||
|
||||
ranges = <0 0 0x08000000 0x10000000>; /* CS0: NAND */
|
||||
|
||||
nand@0,0 {
|
||||
reg = <0 0 0>; /* CS0, offset 0 */
|
||||
nand-bus-width = <8>;
|
||||
ti,nand-ecc-opt = "bch8";
|
||||
gpmc,device-nand = "true";
|
||||
gpmc,device-width = <1>;
|
||||
gpmc,sync-clk-ps = <0>;
|
||||
gpmc,cs-on-ns = <0>;
|
||||
gpmc,cs-rd-off-ns = <57>;
|
||||
gpmc,cs-wr-off-ns = <57>;
|
||||
gpmc,adv-on-ns = <0>;
|
||||
gpmc,adv-rd-off-ns = <57>;
|
||||
gpmc,adv-wr-off-ns = <57>;
|
||||
gpmc,we-on-ns = <0>;
|
||||
gpmc,we-off-ns = <48>;
|
||||
gpmc,oe-on-ns = <0>;
|
||||
gpmc,oe-off-ns = <57>;
|
||||
gpmc,access-ns = <38>;
|
||||
gpmc,rd-cycle-ns = <67>;
|
||||
gpmc,wr-cycle-ns = <67>;
|
||||
gpmc,wait-on-read = "true";
|
||||
gpmc,wait-on-write = "true";
|
||||
gpmc,bus-turnaround-ns = <0>;
|
||||
gpmc,cycle2cycle-delay-ns = <0>;
|
||||
gpmc,clk-activation-ns = <0>;
|
||||
gpmc,wait-monitoring-ns = <0>;
|
||||
gpmc,wr-access-ns = <96>;
|
||||
gpmc,wr-data-mux-bus-ns = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
elm_id = <&elm>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins>;
|
||||
clock-frequency = <400000>;
|
||||
status = "okay";
|
||||
|
||||
eeprom: eeprom@50 {
|
||||
compatible = "atmel,24c128";
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
};
|
||||
|
||||
tps: tps@24 {
|
||||
reg = <0x24>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins>;
|
||||
clock-frequency = <100000>;
|
||||
status = "okay";
|
||||
|
||||
atmel: atmel_mxt_ts@4a {
|
||||
compatible = "atmel,maxtouch";
|
||||
reg = <0x4a>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <28 8>;
|
||||
gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
temp@48 {
|
||||
compatible = "st,ds75";
|
||||
reg = <0x4c>;
|
||||
};
|
||||
};
|
||||
|
||||
&lcdc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mac {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&cpsw_default>;
|
||||
pinctrl-1 = <&cpsw_sleep>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
vmmc-supply = <&vmmc>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&phy_sel {
|
||||
rmii-clock-ext;
|
||||
};
|
||||
|
||||
&sham {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_pins>;
|
||||
status = "okay";
|
||||
spi-flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "mx25l25635e";
|
||||
reg = <0>; /* Chip select 0 */
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partition@0 {
|
||||
label = "dummy";
|
||||
reg = <0x0000000 0x8000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi1_pins>;
|
||||
status = "okay";
|
||||
|
||||
lcd_init: lcd@0 {
|
||||
compatible = "formike,kwh043st20";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpio3 19 0>;
|
||||
spi-max-frequency = <1200000>;
|
||||
spi-cpol;
|
||||
spi-cpha;
|
||||
power-on-delay = <10>;
|
||||
reset-delay = <10>;
|
||||
};
|
||||
};
|
||||
|
||||
/include/ "tps65217.dtsi"
|
||||
|
||||
&tps {
|
||||
backlight0: backlight {
|
||||
isel = <1>; /* 1 - ISET1, 2 ISET2 */
|
||||
fdim = <1000>; /* TPS65217_BL_FDIM_100HZ */
|
||||
default-brightness = <80>;
|
||||
};
|
||||
|
||||
regulators {
|
||||
dcdc1_reg: regulator@0 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
dcdc2_reg: regulator@1 {
|
||||
/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
|
||||
regulator-name = "vdd_mpu";
|
||||
regulator-min-microvolt = <925000>;
|
||||
regulator-max-microvolt = <1325000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
dcdc3_reg: regulator@2 {
|
||||
/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
|
||||
regulator-name = "vdd_core";
|
||||
regulator-min-microvolt = <925000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo1_reg: regulator@3 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo2_reg: regulator@4 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo3_reg: regulator@5 {
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo4_reg: regulator@6 {
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tscadc {
|
||||
status = "okay";
|
||||
adc {
|
||||
ti,adc-channels = <4 5 6 7>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_ctrl_mod {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
dr_mode = "device";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&clkout2_pin &gpio_pin>;
|
||||
|
||||
clkout2_pin: pinmux_clkout2_pin {
|
||||
pinctrl-single,pins = <
|
||||
0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_default: cpsw_default {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 */
|
||||
0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */
|
||||
0x110 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxerr.mii1_rxerr */
|
||||
0x114 (MUX_MODE1) /* mii1_txen.mii1_txen */
|
||||
0x124 (MUX_MODE1) /* mii1_txd1.mii1_txd1 */
|
||||
0x128 (MUX_MODE1) /* mii1_txd0.mii1_txd0 */
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.mii1_rxd1 */
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.mii1_rxd0 */
|
||||
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii1_refclk */
|
||||
>;
|
||||
};
|
||||
|
||||
cpsw_sleep: cpsw_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* Slave 1 reset value */
|
||||
0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_default: davinci_mdio_default {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO */
|
||||
0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
|
||||
0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
|
||||
>;
|
||||
};
|
||||
|
||||
davinci_mdio_sleep: davinci_mdio_sleep {
|
||||
pinctrl-single,pins = <
|
||||
/* MDIO reset value */
|
||||
0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
ecap0_pins: ecap_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x164 (MUX_MODE0) /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 buzzer frequency: ecap.0 */
|
||||
>;
|
||||
};
|
||||
|
||||
epwmss1_pins: epwmss_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x48 (PIN_INPUT | MUX_MODE7) /* gpmc_a2.gpio1_18 buzzer frequency: ehrpwm1A high-Z due to connected to ecap0 by R0469 */
|
||||
0x4c (MUX_MODE6) /* gpmc_a3.ehrpwm1B buzzer volume pwm */
|
||||
>;
|
||||
};
|
||||
|
||||
gpio_pin: gpio_pin {
|
||||
pinctrl-single,pins = <
|
||||
0x6c (PIN_INPUT | MUX_MODE7) /* gpmc_a11.gpio1_27 PWR_FAIL_GPIO_SPARE */
|
||||
0x78 (PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) /* gpmc_be1n.gpio1_28 TOUCH_CHANGE_N */
|
||||
0x88 (PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) /* gpmc_csn3.gpio2_0 RUT_GPIO0_GPIO */
|
||||
0x118 (PIN_INPUT | MUX_MODE7) /* gmii1_rxdv.gpio3_4 PWR_FAIL_GPIO */
|
||||
0x11c (MUX_MODE7) /* mii1_txd3.gpio0_16 DEBUG_OSC_CH2_GPIO */
|
||||
0x120 (MUX_MODE7) /* mii1_txd2.gpio0_17 DEBUG_OSC_CH1_GPIO */
|
||||
0x134 (MUX_MODE7) /* gmii1_rxd3.gpio2_18 PHY_RSTn_GPIO */
|
||||
0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gmii1_rxd2.gpio2_19 PHY_INT_GPIO */
|
||||
0x180 (MUX_MODE7) /* uart1_rxd.gpio0_14 WATCHDOG_TRIGGER_GPIO */
|
||||
0x184 (MUX_MODE7) /* uart1_txd.gpio0_15 ALIVE_LED_N_GPIO */
|
||||
0x1a0 (MUX_MODE7) /* mcasp0_aclkr.gpio3_18 MAXTOUCH_RESET_GPIO */
|
||||
0x1a4 (MUX_MODE7) /* mcasp0_fsr.gpio3_19 DISPLAY_RESET_GPIO */
|
||||
0x1a8 (MUX_MODE7) /* mcasp0_axr1.gpio3_20 DEBUG_RUN_MODE_GPIO */
|
||||
0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE7) /* mcasp0_ahclkx.gpio3_21 NORFLASH_WP_GPIO */
|
||||
0x1b0 (PIN_OUTPUT | MUX_MODE3) /* xdma_event_intr0.clkout1 */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c0_pins: pinmux_i2c0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
|
||||
0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
i2c1_pins: pinmux_i2c1_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x168 (PIN_INPUT | MUX_MODE3) /* uart0_ctsn.i2c1_sda */
|
||||
0x16c (PIN_INPUT | MUX_MODE3) /* uart0.rtsn.i2c1_scl */
|
||||
>;
|
||||
};
|
||||
|
||||
lcd_pins_s0: lcd_pins_s0 {
|
||||
pinctrl-single,pins = <
|
||||
0x20 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad8.lcd_data23 */
|
||||
0x24 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad9.lcd_data22 */
|
||||
0x28 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad10.lcd_data21 */
|
||||
0x2c (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad11.lcd_data20 */
|
||||
0x30 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad12.lcd_data19 */
|
||||
0x34 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad13.lcd_data18 */
|
||||
0x38 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad14.lcd_data17 */
|
||||
0x3c (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_ad15.lcd_data16 */
|
||||
0xa0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data0.lcd_data0 */
|
||||
0xa4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data1.lcd_data1 */
|
||||
0xa8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data2.lcd_data2 */
|
||||
0xac (PIN_OUTPUT | MUX_MODE0) /* lcd_data3.lcd_data3 */
|
||||
0xb0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data4.lcd_data4 */
|
||||
0xb4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data5.lcd_data5 */
|
||||
0xb8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data6.lcd_data6 */
|
||||
0xbc (PIN_OUTPUT | MUX_MODE0) /* lcd_data7.lcd_data7 */
|
||||
0xc0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data8.lcd_data8 */
|
||||
0xc4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data9.lcd_data9 */
|
||||
0xc8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data10.lcd_data10 */
|
||||
0xcc (PIN_OUTPUT | MUX_MODE0) /* lcd_data11.lcd_data11 */
|
||||
0xd0 (PIN_OUTPUT | MUX_MODE0) /* lcd_data12.lcd_data12 */
|
||||
0xd4 (PIN_OUTPUT | MUX_MODE0) /* lcd_data13.lcd_data13 */
|
||||
0xd8 (PIN_OUTPUT | MUX_MODE0) /* lcd_data14.lcd_data14 */
|
||||
0xdc (PIN_OUTPUT | MUX_MODE0) /* lcd_data15.lcd_data15 */
|
||||
0xe0 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_vsync.lcd_vsync */
|
||||
0xe4 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_hsync.lcd_hsync */
|
||||
0xe8 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_pclk.lcd_pclk */
|
||||
0xec (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* lcd_ac_bias_en.lcd_ac_bias_en */
|
||||
>;
|
||||
};
|
||||
|
||||
mmc1_pins: mmc1_pins {
|
||||
pinctrl-single,pins = <
|
||||
0xf0 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
|
||||
0xf4 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
|
||||
0xf8 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
|
||||
0xfc (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
|
||||
0x100 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */
|
||||
0x104 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
|
||||
>;
|
||||
};
|
||||
|
||||
nandflash_pins: pinmux_nandflash_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
|
||||
0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
|
||||
0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
|
||||
0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
|
||||
0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
|
||||
0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
|
||||
0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
|
||||
0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
|
||||
0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
|
||||
0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
|
||||
0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
|
||||
0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
|
||||
0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
|
||||
0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */
|
||||
0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
|
||||
>;
|
||||
};
|
||||
|
||||
spi0_pins: pinmux_spi0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x150 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* spi0_sclk.spi0_sclk */
|
||||
0x154 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */
|
||||
0x158 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* spi0_d1.spi0_d1 */
|
||||
0x15c (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_CS0.spi0_CS0 */
|
||||
>;
|
||||
};
|
||||
|
||||
spi1_pins: pinmux_spi1_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x190 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcasp0_aclkx.spi1_sclk */
|
||||
0x194 (PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_fsx.spi1_d0 */
|
||||
0x198 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* mcasp0_axr0.spi1_d1 */
|
||||
0x19c (PIN_INPUT_PULLUP | MUX_MODE3) /* mcasp0_ahclkr.spi1_cs0 */
|
||||
>;
|
||||
};
|
||||
|
||||
uart0_pins: pinmux_uart0_pins {
|
||||
pinctrl-single,pins = <
|
||||
0x170 (PIN_INPUT | MUX_MODE0) /* uart0_rxd.uart0_rxd */
|
||||
0x174 (PIN_OUTPUT | MUX_MODE0) /* uart0_txd.uart0_txd */
|
||||
>;
|
||||
};
|
||||
};
|
||||
89
arch/arm/dts/am572x-idk.dts
Normal file
89
arch/arm/dts/am572x-idk.dts
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "dra74x.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include "am57xx-idk-common.dtsi"
|
||||
|
||||
/ {
|
||||
model = "TI AM5728 IDK";
|
||||
compatible = "ti,am5728-idk", "ti,am5728", "ti,dra742", "ti,dra74",
|
||||
"ti,dra7";
|
||||
|
||||
chosen {
|
||||
stdout-path = &uart3;
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x80000000 0x0 0x80000000>;
|
||||
};
|
||||
|
||||
extcon_usb2: extcon_usb2 {
|
||||
compatible = "linux,extcon-usb-gpio";
|
||||
id-gpio = <&gpio3 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
status-leds {
|
||||
compatible = "gpio-leds";
|
||||
cpu0-led {
|
||||
label = "status0:red:cpu0";
|
||||
gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "cpu0";
|
||||
};
|
||||
|
||||
usr0-led {
|
||||
label = "status0:green:usr";
|
||||
gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
heartbeat-led {
|
||||
label = "status0:blue:heartbeat";
|
||||
gpios = <&gpio3 12 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
|
||||
cpu1-led {
|
||||
label = "status1:red:cpu1";
|
||||
gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "cpu1";
|
||||
};
|
||||
|
||||
usr1-led {
|
||||
label = "status1:green:usr";
|
||||
gpios = <&gpio7 23 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
mmc0-led {
|
||||
label = "status1:blue:mmc0";
|
||||
gpios = <&gpio7 22 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "mmc0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&omap_dwc3_2 {
|
||||
extcon = <&extcon_usb2>;
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&v3_3d>;
|
||||
vmmc_aux-supply = <&ldo1_reg>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */
|
||||
};
|
||||
302
arch/arm/dts/am57xx-idk-common.dtsi
Normal file
302
arch/arm/dts/am57xx-idk-common.dtsi
Normal file
@@ -0,0 +1,302 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
rtc0 = &tps659038_rtc;
|
||||
rtc1 = &rtc;
|
||||
};
|
||||
|
||||
vmain: fixedregulator-vmain {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "VMAIN";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
v3_3d: fixedregulator-v3_3d {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "V3_3D";
|
||||
vin-supply = <&smps9_reg>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
vtt_fixed: fixedregulator-vtt {
|
||||
/* TPS51200 */
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vtt_fixed";
|
||||
vin-supply = <&v3_3d>;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
tps659038: tps659038@58 {
|
||||
compatible = "ti,tps659038";
|
||||
reg = <0x58>;
|
||||
interrupts-extended = <&gpio6 16 IRQ_TYPE_LEVEL_HIGH
|
||||
&dra7_pmx_core 0x418>;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-controller;
|
||||
ti,system-power-controller;
|
||||
|
||||
tps659038_pmic {
|
||||
compatible = "ti,tps659038-pmic";
|
||||
regulators {
|
||||
smps12_reg: smps12 {
|
||||
/* VDD_MPU */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "smps12";
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <1250000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
smps3_reg: smps3 {
|
||||
/* VDD_DDR EMIF1 EMIF2 */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "smps3";
|
||||
regulator-min-microvolt = <1350000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
smps45_reg: smps45 {
|
||||
/* VDD_DSPEVE on AM572 */
|
||||
/* VDD_IVA + VDD_DSP on AM571 */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "smps45";
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <1250000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
smps6_reg: smps6 {
|
||||
/* VDD_GPU */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "smps6";
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <1250000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
smps7_reg: smps7 {
|
||||
/* VDD_CORE */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "smps7";
|
||||
regulator-min-microvolt = <850000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
smps8_reg: smps8 {
|
||||
/* 5728 - VDD_IVAHD */
|
||||
/* 5718 - N.C. test point */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "smps8";
|
||||
};
|
||||
|
||||
smps9_reg: smps9 {
|
||||
/* VDD_3_3D */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "smps9";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldo1_reg: ldo1 {
|
||||
/* VDDSHV8 - VSDMMC */
|
||||
/* NOTE: on rev 1.3a, data supply */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldo1";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo2_reg: ldo2 {
|
||||
/* VDDSH18V */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldo2";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldo3_reg: ldo3 {
|
||||
/* R1.3a 572x V1_8PHY_LDO3: USB, SATA */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldo3";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldo4_reg: ldo4 {
|
||||
/* R1.3a 572x V1_8PHY_LDO4: PCIE, HDMI*/
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldo4";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
/* LDO5-8 unused */
|
||||
|
||||
ldo9_reg: ldo9 {
|
||||
/* VDD_RTC */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldo9";
|
||||
regulator-min-microvolt = <840000>;
|
||||
regulator-max-microvolt = <1160000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldoln_reg: ldoln {
|
||||
/* VDDA_1V8_PLL */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldoln";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldousb_reg: ldousb {
|
||||
/* VDDA_3V_USB: VDDA_USBHS33 */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldousb";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
ldortc_reg: ldortc {
|
||||
/* VDDA_RTC */
|
||||
vin-supply = <&vmain>;
|
||||
regulator-name = "ldortc";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
regen1: regen1 {
|
||||
/* VDD_3V3_ON */
|
||||
regulator-name = "regen1";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
regen2: regen2 {
|
||||
/* Needed for PMIC internal resource */
|
||||
regulator-name = "regen2";
|
||||
regulator-boot-on;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
tps659038_rtc: tps659038_rtc {
|
||||
compatible = "ti,palmas-rtc";
|
||||
interrupt-parent = <&tps659038>;
|
||||
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
tps659038_pwr_button: tps659038_pwr_button {
|
||||
compatible = "ti,palmas-pwrbutton";
|
||||
interrupt-parent = <&tps659038>;
|
||||
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
|
||||
wakeup-source;
|
||||
ti,palmas-long-press-seconds = <12>;
|
||||
};
|
||||
|
||||
tps659038_gpio: tps659038_gpio {
|
||||
compatible = "ti,palmas-gpio";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart3 {
|
||||
status = "okay";
|
||||
interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH
|
||||
&dra7_pmx_core 0x248>;
|
||||
};
|
||||
|
||||
&rtc {
|
||||
status = "okay";
|
||||
ext-clk-src;
|
||||
};
|
||||
|
||||
&mac {
|
||||
status = "okay";
|
||||
dual_emac;
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&davinci_mdio>, <0>;
|
||||
phy-mode = "rgmii";
|
||||
dual_emac_res_vlan = <1>;
|
||||
};
|
||||
|
||||
&cpsw_emac1 {
|
||||
phy_id = <&davinci_mdio>, <1>;
|
||||
phy-mode = "rgmii";
|
||||
dual_emac_res_vlan = <2>;
|
||||
};
|
||||
|
||||
&usb2_phy1 {
|
||||
phy-supply = <&ldousb_reg>;
|
||||
};
|
||||
|
||||
&usb2_phy2 {
|
||||
phy-supply = <&ldousb_reg>;
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
dr_mode = "host";
|
||||
};
|
||||
|
||||
&usb2 {
|
||||
dr_mode = "otg";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&v3_3d>;
|
||||
bus-width = <8>;
|
||||
ti,non-removable;
|
||||
max-frequency = <96000000>;
|
||||
};
|
||||
110
arch/arm/dts/at91sam9260-smartweb.dts
Normal file
110
arch/arm/dts/at91sam9260-smartweb.dts
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* at91sam9260-smartweb.dts
|
||||
* (C) Copyright 2016
|
||||
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
|
||||
*
|
||||
* Based on:
|
||||
* at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board
|
||||
*
|
||||
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
||||
*
|
||||
* Licensed under GPLv2.
|
||||
*/
|
||||
/dts-v1/;
|
||||
#include "at91sam9260.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Siemens smartweb";
|
||||
compatible = "atmel,at91sam9260", "atmel,at91sam9";
|
||||
|
||||
chosen {
|
||||
stdout-path = &dbgu;
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x20000000 0x4000000>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
slow_xtal {
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
|
||||
main_xtal {
|
||||
clock-frequency = <18432000>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb {
|
||||
apb {
|
||||
pinctrl@fffff400 {
|
||||
board {
|
||||
pinctrl_pck0_as_mck: pck0_as_mck {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC1 periph B */
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
dbgu: serial@fffff200 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usart0: serial@fffb0000 {
|
||||
pinctrl-0 =
|
||||
<&pinctrl_usart0
|
||||
&pinctrl_usart0_rts
|
||||
&pinctrl_usart0_cts
|
||||
&pinctrl_usart0_dtr_dsr
|
||||
&pinctrl_usart0_dcd
|
||||
&pinctrl_usart0_ri>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usart1: serial@fffb4000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
macb0: ethernet@fffc4000 {
|
||||
phy-mode = "rmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb1: gadget@fffa4000 {
|
||||
atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ssc0: ssc@fffbc000 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pinctrl_ssc0_tx>;
|
||||
};
|
||||
|
||||
rtc@fffffd20 {
|
||||
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@fffffd40 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpbr: syscon@fffffd50 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
nand0: nand@40000000 {
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-on-flash-bbt;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb0: ohci@00500000 {
|
||||
num-ports = <2>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
1034
arch/arm/dts/at91sam9260.dtsi
Normal file
1034
arch/arm/dts/at91sam9260.dtsi
Normal file
File diff suppressed because it is too large
Load Diff
876
arch/arm/dts/at91sam9261.dtsi
Normal file
876
arch/arm/dts/at91sam9261.dtsi
Normal file
@@ -0,0 +1,876 @@
|
||||
/*
|
||||
* at91sam9261.dtsi - Device Tree Include file for AT91SAM9261 SoC
|
||||
*
|
||||
* Copyright (C) 2013 Jean-Jacques Hiblot <jjhiblot@traphandler.com>
|
||||
*
|
||||
* Licensed under GPLv2 only.
|
||||
*/
|
||||
|
||||
#include "skeleton.dtsi"
|
||||
#include <dt-bindings/pinctrl/at91.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/clock/at91.h>
|
||||
|
||||
/ {
|
||||
model = "Atmel AT91SAM9261 family SoC";
|
||||
compatible = "atmel,at91sam9261";
|
||||
interrupt-parent = <&aic>;
|
||||
|
||||
aliases {
|
||||
serial0 = &dbgu;
|
||||
serial1 = &usart0;
|
||||
serial2 = &usart1;
|
||||
serial3 = &usart2;
|
||||
gpio0 = &pioA;
|
||||
gpio1 = &pioB;
|
||||
gpio2 = &pioC;
|
||||
tcb0 = &tcb0;
|
||||
i2c0 = &i2c0;
|
||||
ssc0 = &ssc0;
|
||||
ssc1 = &ssc1;
|
||||
ssc2 = &ssc2;
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <0>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu {
|
||||
compatible = "arm,arm926ej-s";
|
||||
device_type = "cpu";
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x20000000 0x08000000>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
main_xtal: main_xtal {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
|
||||
slow_xtal: slow_xtal {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
sram: sram@00300000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x00300000 0x28000>;
|
||||
};
|
||||
|
||||
ahb {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
usb0: ohci@00500000 {
|
||||
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
|
||||
reg = <0x00500000 0x100000>;
|
||||
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
|
||||
clocks = <&ohci_clk>, <&hclk0>, <&uhpck>;
|
||||
clock-names = "ohci_clk", "hclk", "uhpck";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
fb0: fb@0x00600000 {
|
||||
compatible = "atmel,at91sam9261-lcdc";
|
||||
reg = <0x00600000 0x1000>;
|
||||
interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_fb>;
|
||||
clocks = <&lcd_clk>, <&hclk1>;
|
||||
clock-names = "lcdc_clk", "hclk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
nand0: nand@40000000 {
|
||||
compatible = "atmel,at91rm9200-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x40000000 0x10000000>;
|
||||
atmel,nand-addr-offset = <22>;
|
||||
atmel,nand-cmd-offset = <21>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_nand>;
|
||||
|
||||
gpios = <&pioC 15 GPIO_ACTIVE_HIGH>,
|
||||
<&pioC 14 GPIO_ACTIVE_HIGH>,
|
||||
<0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
apb {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
tcb0: timer@fffa0000 {
|
||||
compatible = "atmel,at91rm9200-tcb";
|
||||
reg = <0xfffa0000 0x100>;
|
||||
interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
<18 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
<19 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>, <&slow_xtal>;
|
||||
clock-names = "t0_clk", "t1_clk", "t2_clk", "slow_clk";
|
||||
};
|
||||
|
||||
usb1: gadget@fffa4000 {
|
||||
compatible = "atmel,at91sam9261-udc";
|
||||
reg = <0xfffa4000 0x4000>;
|
||||
interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>;
|
||||
clocks = <&udc_clk>, <&udpck>;
|
||||
clock-names = "pclk", "hclk";
|
||||
atmel,matrix = <&matrix>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mmc0: mmc@fffa8000 {
|
||||
compatible = "atmel,hsmci";
|
||||
reg = <0xfffa8000 0x600>;
|
||||
interrupts = <9 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_mmc0_clk>, <&pinctrl_mmc0_slot0_cmd_dat0>, <&pinctrl_mmc0_slot0_dat1_3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&mci0_clk>;
|
||||
clock-names = "mci_clk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c0: i2c@fffac000 {
|
||||
compatible = "atmel,at91sam9261-i2c";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c_twi>;
|
||||
reg = <0xfffac000 0x100>;
|
||||
interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&twi0_clk>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usart0: serial@fffb0000 {
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xfffb0000 0x200>;
|
||||
interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usart0>;
|
||||
clocks = <&usart0_clk>;
|
||||
clock-names = "usart";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usart1: serial@fffb4000 {
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xfffb4000 0x200>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usart1>;
|
||||
clocks = <&usart1_clk>;
|
||||
clock-names = "usart";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usart2: serial@fffb8000{
|
||||
compatible = "atmel,at91sam9260-usart";
|
||||
reg = <0xfffb8000 0x200>;
|
||||
interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
atmel,use-dma-rx;
|
||||
atmel,use-dma-tx;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_usart2>;
|
||||
clocks = <&usart2_clk>;
|
||||
clock-names = "usart";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ssc0: ssc@fffbc000 {
|
||||
compatible = "atmel,at91rm9200-ssc";
|
||||
reg = <0xfffbc000 0x4000>;
|
||||
interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
|
||||
clocks = <&ssc0_clk>;
|
||||
clock-names = "pclk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ssc1: ssc@fffc0000 {
|
||||
compatible = "atmel,at91rm9200-ssc";
|
||||
reg = <0xfffc0000 0x4000>;
|
||||
interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
|
||||
clocks = <&ssc1_clk>;
|
||||
clock-names = "pclk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ssc2: ssc@fffc4000 {
|
||||
compatible = "atmel,at91rm9200-ssc";
|
||||
reg = <0xfffc4000 0x4000>;
|
||||
interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_ssc2_tx &pinctrl_ssc2_rx>;
|
||||
clocks = <&ssc2_clk>;
|
||||
clock-names = "pclk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi0: spi@fffc8000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "atmel,at91rm9200-spi";
|
||||
reg = <0xfffc8000 0x200>;
|
||||
cs-gpios = <0>, <0>, <0>, <0>;
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_spi0>;
|
||||
clocks = <&spi0_clk>;
|
||||
clock-names = "spi_clk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
spi1: spi@fffcc000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "atmel,at91rm9200-spi";
|
||||
reg = <0xfffcc000 0x200>;
|
||||
interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_spi1>;
|
||||
clocks = <&spi1_clk>;
|
||||
clock-names = "spi_clk";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ramc: ramc@ffffea00 {
|
||||
compatible = "atmel,at91sam9260-sdramc";
|
||||
reg = <0xffffea00 0x200>;
|
||||
};
|
||||
|
||||
matrix: matrix@ffffee00 {
|
||||
compatible = "atmel,at91sam9260-bus-matrix", "syscon";
|
||||
reg = <0xffffee00 0x200>;
|
||||
};
|
||||
|
||||
aic: interrupt-controller@fffff000 {
|
||||
#interrupt-cells = <3>;
|
||||
compatible = "atmel,at91rm9200-aic";
|
||||
interrupt-controller;
|
||||
reg = <0xfffff000 0x200>;
|
||||
atmel,external-irqs = <29 30 31>;
|
||||
};
|
||||
|
||||
dbgu: serial@fffff200 {
|
||||
compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
|
||||
reg = <0xfffff200 0x200>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_dbgu>;
|
||||
clocks = <&mck>;
|
||||
clock-names = "usart";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pinctrl@fffff400 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "atmel,at91rm9200-pinctrl", "simple-bus";
|
||||
ranges = <0xfffff400 0xfffff400 0x600>;
|
||||
|
||||
atmel,mux-mask =
|
||||
/* A B */
|
||||
<0xffffffff 0xfffffff7>, /* pioA */
|
||||
<0xffffffff 0xfffffff4>, /* pioB */
|
||||
<0xffffffff 0xffffff07>; /* pioC */
|
||||
|
||||
/* shared pinctrl settings */
|
||||
dbgu {
|
||||
pinctrl_dbgu: dbgu-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
usart0 {
|
||||
pinctrl_usart0: usart0-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 8 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOC 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_usart0_rts: usart0_rts-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 10 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_usart0_cts: usart0_cts-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 11 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
usart1 {
|
||||
pinctrl_usart1: usart1-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOC 13 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_usart1_rts: usart1_rts-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 12 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_usart1_cts: usart1_cts-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 13 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
usart2 {
|
||||
pinctrl_usart2: usart2-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOC 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_usart2_rts: usart2_rts-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_usart2_cts: usart2_cts-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
nand {
|
||||
pinctrl_nand: nand-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOC 14 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
mmc0 {
|
||||
pinctrl_mmc0_clk: mmc0_clk-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_mmc0_slot0_cmd_dat0: mmc0_slot0_cmd_dat0-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 1 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOA 0 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
pinctrl_mmc0_slot0_dat1_3: mmc0_slot0_dat1_3-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 4 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOA 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOA 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
ssc0 {
|
||||
pinctrl_ssc0_tx: ssc0_tx-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOB 21 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 22 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 23 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_ssc0_rx: ssc0_rx-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOB 24 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 26 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
ssc1 {
|
||||
pinctrl_ssc1_tx: ssc1_tx-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 17 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_ssc1_rx: ssc1_rx-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 20 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 21 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
ssc2 {
|
||||
pinctrl_ssc2_tx: ssc2_tx-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOC 26 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOC 27 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_ssc2_rx: ssc2_rx-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 28 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOC 29 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOC 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
spi0 {
|
||||
pinctrl_spi0: spi0-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
spi1 {
|
||||
pinctrl_spi1: spi1-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOB 30 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 31 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
tcb0 {
|
||||
pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
|
||||
atmel,pins = <AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tclk1: tcb0_tclk1-0 {
|
||||
atmel,pins = <AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tclk2: tcb0_tclk2-0 {
|
||||
atmel,pins = <AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tioa0: tcb0_tioa0-0 {
|
||||
atmel,pins = <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tioa1: tcb0_tioa1-0 {
|
||||
atmel,pins = <AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tioa2: tcb0_tioa2-0 {
|
||||
atmel,pins = <AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tiob0: tcb0_tiob0-0 {
|
||||
atmel,pins = <AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tiob1: tcb0_tiob1-0 {
|
||||
atmel,pins = <AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
|
||||
pinctrl_tcb0_tiob2: tcb0_tiob2-0 {
|
||||
atmel,pins = <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0 {
|
||||
pinctrl_i2c_bitbang: i2c-0-bitbang {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 8 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
|
||||
};
|
||||
pinctrl_i2c_twi: i2c-0-twi {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
fb {
|
||||
pinctrl_fb: fb-0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 8 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 9 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 10 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 11 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 12 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 16 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 17 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 18 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 19 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 20 AT91_PERIPH_A AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 23 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 24 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 25 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE>,
|
||||
<AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
pioA: gpio@fffff400 {
|
||||
compatible = "atmel,at91rm9200-gpio";
|
||||
reg = <0xfffff400 0x200>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
clocks = <&pioA_clk>;
|
||||
};
|
||||
|
||||
pioB: gpio@fffff600 {
|
||||
compatible = "atmel,at91rm9200-gpio";
|
||||
reg = <0xfffff600 0x200>;
|
||||
interrupts = <3 IRQ_TYPE_LEVEL_HIGH 1>;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
clocks = <&pioB_clk>;
|
||||
};
|
||||
|
||||
pioC: gpio@fffff800 {
|
||||
compatible = "atmel,at91rm9200-gpio";
|
||||
reg = <0xfffff800 0x200>;
|
||||
interrupts = <4 IRQ_TYPE_LEVEL_HIGH 1>;
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
clocks = <&pioC_clk>;
|
||||
};
|
||||
};
|
||||
|
||||
pmc: pmc@fffffc00 {
|
||||
compatible = "atmel,at91rm9200-pmc", "syscon";
|
||||
reg = <0xfffffc00 0x100>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
interrupt-controller;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
|
||||
main_osc: main_osc {
|
||||
compatible = "atmel,at91rm9200-clk-main-osc";
|
||||
#clock-cells = <0>;
|
||||
interrupts-extended = <&pmc AT91_PMC_MOSCS>;
|
||||
clocks = <&main_xtal>;
|
||||
};
|
||||
|
||||
main: mainck {
|
||||
compatible = "atmel,at91rm9200-clk-main";
|
||||
#clock-cells = <0>;
|
||||
clocks = <&main_osc>;
|
||||
};
|
||||
|
||||
plla: pllack {
|
||||
compatible = "atmel,at91rm9200-clk-pll";
|
||||
#clock-cells = <0>;
|
||||
interrupts-extended = <&pmc AT91_PMC_LOCKA>;
|
||||
clocks = <&main>;
|
||||
reg = <0>;
|
||||
atmel,clk-input-range = <1000000 32000000>;
|
||||
#atmel,pll-clk-output-range-cells = <4>;
|
||||
atmel,pll-clk-output-ranges = <80000000 200000000 0 1>,
|
||||
<190000000 240000000 2 1>;
|
||||
};
|
||||
|
||||
pllb: pllbck {
|
||||
compatible = "atmel,at91rm9200-clk-pll";
|
||||
#clock-cells = <0>;
|
||||
interrupts-extended = <&pmc AT91_PMC_LOCKB>;
|
||||
clocks = <&main>;
|
||||
reg = <1>;
|
||||
atmel,clk-input-range = <1000000 5000000>;
|
||||
#atmel,pll-clk-output-range-cells = <4>;
|
||||
atmel,pll-clk-output-ranges = <70000000 130000000 1 1>;
|
||||
};
|
||||
|
||||
mck: masterck {
|
||||
compatible = "atmel,at91rm9200-clk-master";
|
||||
#clock-cells = <0>;
|
||||
interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
|
||||
clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
|
||||
atmel,clk-output-range = <0 94000000>;
|
||||
atmel,clk-divisors = <1 2 4 0>;
|
||||
};
|
||||
|
||||
usb: usbck {
|
||||
compatible = "atmel,at91rm9200-clk-usb";
|
||||
#clock-cells = <0>;
|
||||
atmel,clk-divisors = <1 2 4 0>;
|
||||
clocks = <&pllb>;
|
||||
};
|
||||
|
||||
prog: progck {
|
||||
compatible = "atmel,at91rm9200-clk-programmable";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupt-parent = <&pmc>;
|
||||
clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
|
||||
|
||||
prog0: prog0 {
|
||||
#clock-cells = <0>;
|
||||
reg = <0>;
|
||||
interrupts = <AT91_PMC_PCKRDY(0)>;
|
||||
};
|
||||
|
||||
prog1: prog1 {
|
||||
#clock-cells = <0>;
|
||||
reg = <1>;
|
||||
interrupts = <AT91_PMC_PCKRDY(1)>;
|
||||
};
|
||||
|
||||
prog2: prog2 {
|
||||
#clock-cells = <0>;
|
||||
reg = <2>;
|
||||
interrupts = <AT91_PMC_PCKRDY(2)>;
|
||||
};
|
||||
|
||||
prog3: prog3 {
|
||||
#clock-cells = <0>;
|
||||
reg = <3>;
|
||||
interrupts = <AT91_PMC_PCKRDY(3)>;
|
||||
};
|
||||
};
|
||||
|
||||
systemck {
|
||||
compatible = "atmel,at91rm9200-clk-system";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
uhpck: uhpck {
|
||||
#clock-cells = <0>;
|
||||
reg = <6>;
|
||||
clocks = <&usb>;
|
||||
};
|
||||
|
||||
udpck: udpck {
|
||||
#clock-cells = <0>;
|
||||
reg = <7>;
|
||||
clocks = <&usb>;
|
||||
};
|
||||
|
||||
pck0: pck0 {
|
||||
#clock-cells = <0>;
|
||||
reg = <8>;
|
||||
clocks = <&prog0>;
|
||||
};
|
||||
|
||||
pck1: pck1 {
|
||||
#clock-cells = <0>;
|
||||
reg = <9>;
|
||||
clocks = <&prog1>;
|
||||
};
|
||||
|
||||
pck2: pck2 {
|
||||
#clock-cells = <0>;
|
||||
reg = <10>;
|
||||
clocks = <&prog2>;
|
||||
};
|
||||
|
||||
pck3: pck3 {
|
||||
#clock-cells = <0>;
|
||||
reg = <11>;
|
||||
clocks = <&prog3>;
|
||||
};
|
||||
|
||||
hclk0: hclk0 {
|
||||
#clock-cells = <0>;
|
||||
reg = <16>;
|
||||
clocks = <&mck>;
|
||||
};
|
||||
|
||||
hclk1: hclk1 {
|
||||
#clock-cells = <0>;
|
||||
reg = <17>;
|
||||
clocks = <&mck>;
|
||||
};
|
||||
};
|
||||
|
||||
periphck {
|
||||
compatible = "atmel,at91rm9200-clk-peripheral";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&mck>;
|
||||
|
||||
pioA_clk: pioA_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
pioB_clk: pioB_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <3>;
|
||||
};
|
||||
|
||||
pioC_clk: pioC_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <4>;
|
||||
};
|
||||
|
||||
usart0_clk: usart0_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <6>;
|
||||
};
|
||||
|
||||
usart1_clk: usart1_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <7>;
|
||||
};
|
||||
|
||||
usart2_clk: usart2_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <8>;
|
||||
};
|
||||
|
||||
mci0_clk: mci0_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <9>;
|
||||
};
|
||||
|
||||
udc_clk: udc_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <10>;
|
||||
};
|
||||
|
||||
twi0_clk: twi0_clk {
|
||||
reg = <11>;
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
spi0_clk: spi0_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <12>;
|
||||
};
|
||||
|
||||
spi1_clk: spi1_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <13>;
|
||||
};
|
||||
|
||||
ssc0_clk: ssc0_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <14>;
|
||||
};
|
||||
|
||||
ssc1_clk: ssc1_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <15>;
|
||||
};
|
||||
|
||||
ssc2_clk: ssc2_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <16>;
|
||||
};
|
||||
|
||||
tc0_clk: tc0_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <17>;
|
||||
};
|
||||
|
||||
tc1_clk: tc1_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <18>;
|
||||
};
|
||||
|
||||
tc2_clk: tc2_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <19>;
|
||||
};
|
||||
|
||||
ohci_clk: ohci_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <20>;
|
||||
};
|
||||
|
||||
lcd_clk: lcd_clk {
|
||||
#clock-cells = <0>;
|
||||
reg = <21>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rstc@fffffd00 {
|
||||
compatible = "atmel,at91sam9260-rstc";
|
||||
reg = <0xfffffd00 0x10>;
|
||||
clocks = <&slow_xtal>;
|
||||
};
|
||||
|
||||
shdwc@fffffd10 {
|
||||
compatible = "atmel,at91sam9260-shdwc";
|
||||
reg = <0xfffffd10 0x10>;
|
||||
clocks = <&slow_xtal>;
|
||||
};
|
||||
|
||||
pit: timer@fffffd30 {
|
||||
compatible = "atmel,at91sam9260-pit";
|
||||
reg = <0xfffffd30 0xf>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
clocks = <&mck>;
|
||||
};
|
||||
|
||||
rtc@fffffd20 {
|
||||
compatible = "atmel,at91sam9260-rtt";
|
||||
reg = <0xfffffd20 0x10>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
clocks = <&slow_xtal>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
watchdog@fffffd40 {
|
||||
compatible = "atmel,at91sam9260-wdt";
|
||||
reg = <0xfffffd40 0x10>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
|
||||
clocks = <&slow_xtal>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpbr: syscon@fffffd50 {
|
||||
compatible = "atmel,at91sam9260-gpbr", "syscon";
|
||||
reg = <0xfffffd50 0x10>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
i2c@0 {
|
||||
compatible = "i2c-gpio";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c_bitbang>;
|
||||
gpios = <&pioA 7 GPIO_ACTIVE_HIGH>, /* sda */
|
||||
<&pioA 8 GPIO_ACTIVE_HIGH>; /* scl */
|
||||
i2c-gpio,sda-open-drain;
|
||||
i2c-gpio,scl-open-drain;
|
||||
i2c-gpio,delay-us = <2>; /* ~100 kHz */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
1034
arch/arm/dts/at91sam9263.dtsi
Normal file
1034
arch/arm/dts/at91sam9263.dtsi
Normal file
File diff suppressed because it is too large
Load Diff
119
arch/arm/dts/at91sam9g20-taurus.dts
Normal file
119
arch/arm/dts/at91sam9g20-taurus.dts
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* at91sam9g20-taurus.dts
|
||||
* (C) Copyright 2016
|
||||
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
|
||||
*
|
||||
* Based on:
|
||||
* at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board
|
||||
*
|
||||
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
||||
*
|
||||
* Licensed under GPLv2.
|
||||
*/
|
||||
/dts-v1/;
|
||||
#include "at91sam9g20.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Siemens taurus";
|
||||
compatible = "atmel,at91sam9g20ek", "atmel,at91sam9g20", "atmel,at91sam9";
|
||||
|
||||
chosen {
|
||||
stdout-path = &dbgu;
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x20000000 0x4000000>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
slow_xtal {
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
|
||||
main_xtal {
|
||||
clock-frequency = <18432000>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb {
|
||||
apb {
|
||||
pinctrl@fffff400 {
|
||||
board {
|
||||
pinctrl_pck0_as_mck: pck0_as_mck {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC1 periph B */
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
dbgu: serial@fffff200 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usart0: serial@fffb0000 {
|
||||
pinctrl-0 =
|
||||
<&pinctrl_usart0
|
||||
&pinctrl_usart0_rts
|
||||
&pinctrl_usart0_cts
|
||||
&pinctrl_usart0_dtr_dsr
|
||||
&pinctrl_usart0_dcd
|
||||
&pinctrl_usart0_ri>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usart1: serial@fffb4000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
macb0: ethernet@fffc4000 {
|
||||
phy-mode = "rmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb1: gadget@fffa4000 {
|
||||
atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ssc0: ssc@fffbc000 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pinctrl_ssc0_tx>;
|
||||
};
|
||||
|
||||
spi0: spi@fffc8000 {
|
||||
cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
|
||||
mtd_dataflash@0 {
|
||||
compatible = "atmel,at45", "atmel,dataflash";
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
rtc@fffffd20 {
|
||||
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@fffffd40 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpbr: syscon@fffffd50 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
nand0: nand@40000000 {
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-on-flash-bbt;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb0: ohci@00500000 {
|
||||
num-ports = <2>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
68
arch/arm/dts/at91sam9g20.dtsi
Normal file
68
arch/arm/dts/at91sam9g20.dtsi
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC
|
||||
*
|
||||
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
||||
*
|
||||
* Licensed under GPLv2.
|
||||
*/
|
||||
|
||||
#include "at91sam9260.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Atmel AT91SAM9G20 family SoC";
|
||||
compatible = "atmel,at91sam9g20";
|
||||
|
||||
memory {
|
||||
reg = <0x20000000 0x08000000>;
|
||||
};
|
||||
|
||||
sram0: sram@002ff000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
sram1: sram@002fc000 {
|
||||
compatible = "mmio-sram";
|
||||
reg = <0x002fc000 0x8000>;
|
||||
};
|
||||
|
||||
ahb {
|
||||
apb {
|
||||
i2c0: i2c@fffac000 {
|
||||
compatible = "atmel,at91sam9g20-i2c";
|
||||
};
|
||||
|
||||
ssc0: ssc@fffbc000 {
|
||||
compatible = "atmel,at91sam9rl-ssc";
|
||||
};
|
||||
|
||||
adc0: adc@fffe0000 {
|
||||
atmel,adc-startup-time = <40>;
|
||||
};
|
||||
|
||||
pmc: pmc@fffffc00 {
|
||||
plla: pllack {
|
||||
atmel,clk-input-range = <2000000 32000000>;
|
||||
atmel,pll-clk-output-ranges = <745000000 800000000 0 0>,
|
||||
<695000000 750000000 1 0>,
|
||||
<645000000 700000000 2 0>,
|
||||
<595000000 650000000 3 0>,
|
||||
<545000000 600000000 0 1>,
|
||||
<495000000 550000000 1 1>,
|
||||
<445000000 500000000 2 1>,
|
||||
<400000000 450000000 3 1>;
|
||||
};
|
||||
|
||||
pllb: pllbck {
|
||||
compatible = "atmel,at91sam9g20-clk-pllb";
|
||||
atmel,clk-input-range = <2000000 32000000>;
|
||||
atmel,pll-clk-output-ranges = <30000000 100000000 0 0>;
|
||||
};
|
||||
|
||||
mck: masterck {
|
||||
atmel,clk-output-range = <0 133000000>;
|
||||
atmel,clk-divisors = <1 2 4 6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
108
arch/arm/dts/at91sam9g45-corvus.dts
Normal file
108
arch/arm/dts/at91sam9g45-corvus.dts
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* at91sam9g45-corvus.dts Device Tree file fir Siemens corvus board
|
||||
* (C) Copyright 2016 Heiko Schocher <hs@denx.de>
|
||||
*
|
||||
* based on:
|
||||
* at91sam9m10g45ek.dts - Device Tree file for AT91SAM9M10G45-EK board
|
||||
*
|
||||
* Copyright (C) 2011 Atmel,
|
||||
* 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
/dts-v1/;
|
||||
#include "at91sam9g45.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Siemens corvus";
|
||||
compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
|
||||
|
||||
chosen {
|
||||
stdout-path = &dbgu;
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x70000000 0x8000000>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
slow_xtal {
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
|
||||
main_xtal {
|
||||
clock-frequency = <12000000>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb {
|
||||
apb {
|
||||
dbgu: serial@ffffee00 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usart1: serial@fff90000 {
|
||||
pinctrl-0 =
|
||||
<&pinctrl_usart1
|
||||
&pinctrl_usart1_rts
|
||||
&pinctrl_usart1_cts>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
macb0: ethernet@fffbc000 {
|
||||
phy-mode = "rmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@fffffd40 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
spi0: spi@fffa4000{
|
||||
status = "okay";
|
||||
cs-gpios = <&pioB 3 0>, <0>, <0>, <0>;
|
||||
mtd_dataflash@0 {
|
||||
compatible = "atmel,at45", "atmel,dataflash";
|
||||
spi-max-frequency = <13000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
usb2: gadget@fff78000 {
|
||||
atmel,vbus-gpio = <&pioB 19 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
rtc@fffffd20 {
|
||||
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpbr: syscon@fffffd60 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
rtc@fffffdb0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
nand0: nand@40000000 {
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-on-flash-bbt;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb0: ohci@00700000 {
|
||||
status = "okay";
|
||||
num-ports = <2>;
|
||||
atmel,vbus-gpio = <&pioD 1 GPIO_ACTIVE_LOW
|
||||
&pioD 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb1: ehci@00800000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
};
|
||||
157
arch/arm/dts/at91sam9g45-gurnard.dts
Normal file
157
arch/arm/dts/at91sam9g45-gurnard.dts
Normal file
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board
|
||||
*
|
||||
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
||||
*
|
||||
* Licensed under GPLv2.
|
||||
*/
|
||||
/dts-v1/;
|
||||
#include "at91sam9g45.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Bluewater Systems Gurnard";
|
||||
compatible = "atmel,at91sam9g45", "atmel,at91sam9";
|
||||
|
||||
chosen {
|
||||
bootargs = "mem=64M root=/dev/mtdblock5 rw rootfstype=ubifs";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x20000000 0x8000000>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
slow_xtal {
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
|
||||
main_xtal {
|
||||
clock-frequency = <18432000>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb {
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
fb@0x00500000 {
|
||||
u-boot,dm-pre-reloc;
|
||||
status = "okay";
|
||||
display-timings {
|
||||
rev1 {
|
||||
clock-frequency = <4166666>;
|
||||
hactive = <480>;
|
||||
vactive = <272>;
|
||||
hfront-porch = <1>;
|
||||
hback-porch = <1>;
|
||||
hsync-len = <1>;
|
||||
vback-porch = <4>;
|
||||
vfront-porch = <2>;
|
||||
vsync-len = <1>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
};
|
||||
|
||||
rev2 {
|
||||
clock-frequency = <4166666>;
|
||||
hactive = <480>;
|
||||
vactive = <272>;
|
||||
hfront-porch = <2>;
|
||||
hback-porch = <2>;
|
||||
hsync-len = <10>;
|
||||
vback-porch = <2>;
|
||||
vfront-porch = <2>;
|
||||
vsync-len = <10>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
apb {
|
||||
pinctrl@fffff400 {
|
||||
board {
|
||||
pinctrl_pck0_as_mck: pck0_as_mck {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC1 periph B */
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
mmc0_slot1 {
|
||||
pinctrl_board_mmc0_slot1: mmc0_slot1-board {
|
||||
atmel,pins =
|
||||
<AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PC9 gpio CD pin pull up and deglitch */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dbgu: serial@ffffee00 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
macb0: ethernet@fffbc000 {
|
||||
phy-mode = "rmii";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
mmc0: mmc@fff80000 {
|
||||
pinctrl-0 = <
|
||||
&pinctrl_board_mmc0_slot1
|
||||
&pinctrl_mmc0_slot0_clk_cmd_dat0
|
||||
&pinctrl_mmc0_slot0_dat1_3>;
|
||||
status = "okay";
|
||||
slot@1 {
|
||||
reg = <1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
ssc0: ssc@fff9c000 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pinctrl_ssc0_tx>;
|
||||
};
|
||||
|
||||
spi0: spi@fffa4000 {
|
||||
cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
|
||||
mtd_dataflash@0 {
|
||||
compatible = "atmel,at45", "atmel,dataflash";
|
||||
spi-max-frequency = <50000000>;
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
shdwc@fffffd10 {
|
||||
atmel,wakeup-counter = <10>;
|
||||
atmel,wakeup-rtt-timer;
|
||||
};
|
||||
|
||||
rtc@fffffd20 {
|
||||
atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@fffffd40 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
gpbr: syscon@fffffd60 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
nand0: nand@40000000 {
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "hardware";
|
||||
nand-on-flash-bbt;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb1: ehci@00800000 {
|
||||
atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
1335
arch/arm/dts/at91sam9g45.dtsi
Normal file
1335
arch/arm/dts/at91sam9g45.dtsi
Normal file
File diff suppressed because it is too large
Load Diff
@@ -141,5 +141,15 @@
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "rtc_ldo";
|
||||
};
|
||||
|
||||
reg_drivevbus: drivevbus {
|
||||
regulator-name = "drivevbus";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
usb_power_supply: usb_power_supply {
|
||||
compatible = "x-powers,axp221-usb-power-supply";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,18 +9,6 @@
|
||||
/ {
|
||||
compatible = "fsl,ls1012a";
|
||||
interrupt-parent = <&gic>;
|
||||
cpus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53";
|
||||
reg = <0x0 0x0>;
|
||||
clocks = <&clockgen 1 0>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
sysclk: sysclk {
|
||||
compatible = "fixed-clock";
|
||||
|
||||
@@ -15,38 +15,6 @@
|
||||
/ {
|
||||
compatible = "fsl,ls1043a";
|
||||
interrupt-parent = <&gic>;
|
||||
cpus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53";
|
||||
reg = <0x0 0x0>;
|
||||
clocks = <&clockgen 1 0>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53";
|
||||
reg = <0x0 0x1>;
|
||||
clocks = <&clockgen 1 0>;
|
||||
};
|
||||
|
||||
cpu2: cpu@2 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53";
|
||||
reg = <0x0 0x2>;
|
||||
clocks = <&clockgen 1 0>;
|
||||
};
|
||||
|
||||
cpu3: cpu@3 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53";
|
||||
reg = <0x0 0x3>;
|
||||
clocks = <&clockgen 1 0>;
|
||||
};
|
||||
};
|
||||
|
||||
sysclk: sysclk {
|
||||
compatible = "fixed-clock";
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
compatible = "fsl,ls2080a-qds", "fsl,ls2080a";
|
||||
|
||||
aliases {
|
||||
spi0 = &qspi;
|
||||
spi1 = &dspi;
|
||||
};
|
||||
};
|
||||
@@ -51,3 +52,16 @@
|
||||
reg = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
&qspi {
|
||||
bus-num = <0>;
|
||||
status = "okay";
|
||||
|
||||
qflash0: s25fs256s@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spi-flash";
|
||||
spi-max-frequency = <20000000>;
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -12,67 +12,6 @@
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/*
|
||||
* We expect the enable-method for cpu's to be "psci", but this
|
||||
* is dependent on the SoC FW, which will fill this in.
|
||||
*
|
||||
* Currently supported enable-method is psci v0.2
|
||||
*/
|
||||
|
||||
/* We have 4 clusters having 2 Cortex-A57 cores each */
|
||||
cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x0>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x1>;
|
||||
};
|
||||
|
||||
cpu@100 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x100>;
|
||||
};
|
||||
|
||||
cpu@101 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x101>;
|
||||
};
|
||||
|
||||
cpu@200 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x200>;
|
||||
};
|
||||
|
||||
cpu@201 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x201>;
|
||||
};
|
||||
|
||||
cpu@300 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x300>;
|
||||
};
|
||||
|
||||
cpu@301 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a57";
|
||||
reg = <0x0 0x301>;
|
||||
};
|
||||
};
|
||||
|
||||
memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x80000000 0 0x80000000>;
|
||||
@@ -126,4 +65,14 @@
|
||||
interrupts = <0 26 0x4>; /* Level high type */
|
||||
num-cs = <6>;
|
||||
};
|
||||
|
||||
qspi: quadspi@1550000 {
|
||||
compatible = "fsl,vf610-qspi";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x0 0x20c0000 0x0 0x10000>,
|
||||
<0x0 0x20000000 0x0 0x10000000>;
|
||||
reg-names = "QuadSPI", "QuadSPI-memory";
|
||||
num-cs = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
106
arch/arm/dts/socfpga_cyclone5_is1.dts
Normal file
106
arch/arm/dts/socfpga_cyclone5_is1.dts
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Altera Corporation <www.altera.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include "socfpga_cyclone5.dtsi"
|
||||
|
||||
/ {
|
||||
model = "SoCFPGA Cyclone V IS1";
|
||||
compatible = "anonymous,socfpga-is1", "altr,socfpga-cyclone5", "altr,socfpga";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
memory {
|
||||
name = "memory";
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x10000000>;
|
||||
};
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
udc0 = &usb1;
|
||||
};
|
||||
|
||||
regulator_3_3v: 3-3-v-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "3.3V";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
phy-mode = "rgmii";
|
||||
|
||||
rxd0-skew-ps = <0>;
|
||||
rxd1-skew-ps = <0>;
|
||||
rxd2-skew-ps = <0>;
|
||||
rxd3-skew-ps = <0>;
|
||||
txen-skew-ps = <0>;
|
||||
txc-skew-ps = <2600>;
|
||||
rxdv-skew-ps = <0>;
|
||||
rxc-skew-ps = <2000>;
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
eeprom@51 {
|
||||
compatible = "atmel,24c32";
|
||||
reg = <0x51>;
|
||||
pagesize = <32>;
|
||||
};
|
||||
|
||||
rtc@68 {
|
||||
compatible = "dallas,ds1339";
|
||||
reg = <0x68>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
status = "okay";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
cd-gpios = <&portb 18 0>;
|
||||
vmmc-supply = <®ulator_3_3v>;
|
||||
vqmmc-supply = <®ulator_3_3v>;
|
||||
};
|
||||
|
||||
&qspi {
|
||||
status = "okay";
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
flash0: n25q00@0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "n25q00";
|
||||
reg = <0>; /* chip select */
|
||||
spi-max-frequency = <100000000>;
|
||||
m25p,fast-read;
|
||||
page-size = <256>;
|
||||
block-size = <16>; /* 2^16, 64KB */
|
||||
read-delay = <4>; /* delay value in read data capture register */
|
||||
tshsl-ns = <50>;
|
||||
tsd2d-ns = <50>;
|
||||
tchsh-ns = <4>;
|
||||
tslch-ns = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
293
arch/arm/dts/sun8i-a23-inet86dz.dts
Normal file
293
arch/arm/dts/sun8i-a23-inet86dz.dts
Normal file
@@ -0,0 +1,293 @@
|
||||
/*
|
||||
* Copyright 2016 Hans de Goede <hdegoede@redhat.com>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "sun8i-a23.dtsi"
|
||||
#include "sunxi-common-regulators.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
model = "INet-86DZ Rev 01";
|
||||
compatible = "primux,inet86dz", "allwinner,sun8i-a23";
|
||||
|
||||
aliases {
|
||||
serial0 = &r_uart;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bl_en_pin_inet86dz>;
|
||||
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
default-brightness-level = <8>;
|
||||
enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins_a>;
|
||||
status = "okay";
|
||||
/*
|
||||
* The gsl1680 is rated at 400KHz and it will not work reliable at
|
||||
* 100KHz, this has been confirmed on multiple different tablets.
|
||||
* The gsl1680 is the only device on this bus.
|
||||
*/
|
||||
clock-frequency = <400000>;
|
||||
|
||||
gsl1680: touchscreen@40 {
|
||||
compatible = "silead,gsl1680";
|
||||
reg = <0x40>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ts_power_pin_inet86dz>;
|
||||
power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
|
||||
touchscreen-size-x = <960>;
|
||||
touchscreen-size-y = <640>;
|
||||
touchscreen-max-fingers = <5>;
|
||||
touchscreen-fw-name = "silead/gsl1680-inet86dz.fw";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&lradc {
|
||||
vref-supply = <®_vcc3v0>;
|
||||
status = "okay";
|
||||
|
||||
button@200 {
|
||||
label = "Volume Up";
|
||||
linux,code = <KEY_VOLUMEUP>;
|
||||
channel = <0>;
|
||||
voltage = <200000>;
|
||||
};
|
||||
|
||||
button@400 {
|
||||
label = "Volume Down";
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
channel = <0>;
|
||||
voltage = <400000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet86dz>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
bl_en_pin_inet86dz: bl_en_pin@0 {
|
||||
allwinner,pins = "PH6";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
mmc0_cd_pin_inet86dz: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PB4";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
ts_power_pin_inet86dz: ts_power_pin@0 {
|
||||
allwinner,pins = "PH1";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb0_id_detect_pin: usb0_id_detect_pin@0 {
|
||||
allwinner,pins = "PH8";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@3a3 {
|
||||
compatible = "x-powers,axp223";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
eldoin-supply = <®_dcdc1>;
|
||||
x-powers,drive-vbus-en;
|
||||
};
|
||||
};
|
||||
|
||||
&r_uart {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&r_uart_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
#include "axp22x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-io";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2350000>;
|
||||
regulator-max-microvolt = <2650000>;
|
||||
regulator-name = "vdd-dll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-pll-avcc";
|
||||
};
|
||||
|
||||
®_dc1sw {
|
||||
regulator-name = "vcc-lcd";
|
||||
};
|
||||
|
||||
®_dc5ldo {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dldo1 {
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi";
|
||||
};
|
||||
|
||||
®_drivevbus {
|
||||
regulator-name = "usb0-vbus";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
&simplefb_lcd {
|
||||
vcc-lcd-supply = <®_dc1sw>;
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_power_supply {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb0_id_detect_pin>;
|
||||
usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
|
||||
usb0_vbus_power-supply = <&usb_power_supply>;
|
||||
usb0_vbus-supply = <®_drivevbus>;
|
||||
usb1_vbus-supply = <®_dldo1>;
|
||||
status = "okay";
|
||||
};
|
||||
292
arch/arm/dts/sun8i-a23-polaroid-mid2407pxe03.dts
Normal file
292
arch/arm/dts/sun8i-a23-polaroid-mid2407pxe03.dts
Normal file
@@ -0,0 +1,292 @@
|
||||
/*
|
||||
* Copyright 2016 Hans de Goede <hdegoede@redhat.com>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "sun8i-a23.dtsi"
|
||||
#include "sunxi-common-regulators.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/pinctrl/sun4i-a10.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/ {
|
||||
model = "Polaroid MID2407PXE03 tablet";
|
||||
compatible = "polaroid,mid2407pxe03", "allwinner,sun8i-a23";
|
||||
|
||||
aliases {
|
||||
serial0 = &r_uart;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&bl_en_pin_mid2407>;
|
||||
pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
default-brightness-level = <8>;
|
||||
enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_pins_a>;
|
||||
status = "okay";
|
||||
/*
|
||||
* The gsl1680 is rated at 400KHz and it will not work reliable at
|
||||
* 100KHz, this has been confirmed on multiple different tablets.
|
||||
* The gsl1680 is the only device on this bus.
|
||||
*/
|
||||
clock-frequency = <400000>;
|
||||
|
||||
gsl1680: touchscreen@40 {
|
||||
compatible = "silead,gsl1680";
|
||||
reg = <0x40>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ts_power_pin_mid2407>;
|
||||
power-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
|
||||
touchscreen-size-x = <960>;
|
||||
touchscreen-size-y = <640>;
|
||||
touchscreen-inverted-x;
|
||||
touchscreen-inverted-y;
|
||||
touchscreen-max-fingers = <5>;
|
||||
touchscreen-fw-name = "silead/gsl1680-polaroid-mid2407pxe03.fw";
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&lradc {
|
||||
vref-supply = <®_vcc3v0>;
|
||||
status = "okay";
|
||||
|
||||
button@200 {
|
||||
label = "Volume Up";
|
||||
linux,code = <KEY_VOLUMEUP>;
|
||||
channel = <0>;
|
||||
voltage = <200000>;
|
||||
};
|
||||
|
||||
button@400 {
|
||||
label = "Volume Down";
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
channel = <0>;
|
||||
voltage = <400000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_mid2407>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
|
||||
cd-inverted;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
bl_en_pin_mid2407: bl_en_pin@0 {
|
||||
allwinner,pins = "PH6";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
mmc0_cd_pin_mid2407: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PB4";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
ts_power_pin_mid2407: ts_power_pin@0 {
|
||||
allwinner,pins = "PH1";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb0_id_detect_pin: usb0_id_detect_pin@0 {
|
||||
allwinner,pins = "PH8";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
};
|
||||
|
||||
&pwm {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm0_pins>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@3a3 {
|
||||
compatible = "x-powers,axp223";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
eldoin-supply = <®_dcdc1>;
|
||||
x-powers,drive-vbus-en;
|
||||
};
|
||||
};
|
||||
|
||||
&r_uart {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&r_uart_pins_a>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
#include "axp22x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-io";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2350000>;
|
||||
regulator-max-microvolt = <2650000>;
|
||||
regulator-name = "vdd-dll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-pll-avcc";
|
||||
};
|
||||
|
||||
®_dc1sw {
|
||||
regulator-name = "vcc-lcd";
|
||||
};
|
||||
|
||||
®_dc5ldo {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_drivevbus {
|
||||
regulator-name = "usb0-vbus";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_ldo_io1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-touchscreen";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_rtc_ldo {
|
||||
regulator-name = "vcc-rtc";
|
||||
};
|
||||
|
||||
&simplefb_lcd {
|
||||
vcc-lcd-supply = <®_dc1sw>;
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_power_supply {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb0_id_detect_pin>;
|
||||
usb0_id_det-gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
|
||||
usb0_vbus_power-supply = <&usb_power_supply>;
|
||||
usb0_vbus-supply = <®_drivevbus>;
|
||||
status = "okay";
|
||||
};
|
||||
348
arch/arm/dts/sun8i-r16-parrot.dts
Normal file
348
arch/arm/dts/sun8i-r16-parrot.dts
Normal file
@@ -0,0 +1,348 @@
|
||||
/*
|
||||
* Copyright 2016 Quentin Schulz
|
||||
*
|
||||
* Quentin Schulz <quentin.schulz@free-electrons.com>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "sun8i-a33.dtsi"
|
||||
#include "sunxi-common-regulators.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
model = "Allwinner R16 EVB (Parrot)";
|
||||
compatible = "allwinner,parrot", "allwinner,sun8i-a33";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&led_pins_parrot>;
|
||||
|
||||
led1 {
|
||||
label = "parrot:led1:usr";
|
||||
gpio = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
|
||||
};
|
||||
|
||||
led2 {
|
||||
label = "parrot:led2:usr";
|
||||
gpio = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */
|
||||
};
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL06 */
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_pins_a>;
|
||||
status = "okay";
|
||||
|
||||
/* FIXME: An as-yet-unknown accelerometer is connected to this i2c bus. */
|
||||
};
|
||||
|
||||
&lradc {
|
||||
vref-supply = <®_aldo3>;
|
||||
status = "okay";
|
||||
|
||||
button@0 {
|
||||
label = "V+";
|
||||
linux,code = <KEY_VOLUMEUP>;
|
||||
channel = <0>;
|
||||
voltage = <190000>;
|
||||
};
|
||||
|
||||
button@1 {
|
||||
label = "V-";
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
channel = <0>;
|
||||
voltage = <390000>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_parrot>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
cd-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */
|
||||
bus-width = <4>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc1_pins_a>, <&wifi_reset_pin_parrot>;
|
||||
vmmc-supply = <®_aldo1>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_8bit_pins>;
|
||||
vmmc-supply = <®_dcdc1>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2_8bit_pins {
|
||||
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
mmc0_cd_pin_parrot: mmc0_cd_pin@0 {
|
||||
allwinner,pins = "PD14";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
led_pins_parrot: led_pins@0 {
|
||||
allwinner,pins = "PE16", "PE17";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
|
||||
usb0_id_det: usb0_id_detect_pin@0 {
|
||||
allwinner,pins = "PD10";
|
||||
allwinner,function = "gpio_in";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
usb1_vbus_pin_parrot: usb1_vbus_pin@0 {
|
||||
allwinner,pins = "PD12";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
&r_pio {
|
||||
wifi_reset_pin_parrot: wifi_reset_pin@0 {
|
||||
allwinner,pins = "PL6";
|
||||
allwinner,function = "gpio_out";
|
||||
allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
||||
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
||||
};
|
||||
};
|
||||
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
axp22x: pmic@3a3 {
|
||||
compatible = "x-powers,axp223";
|
||||
reg = <0x3a3>;
|
||||
interrupt-parent = <&nmi_intc>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
||||
drivevbus-supply = <®_vcc5v0>;
|
||||
x-powers,drive-vbus-en;
|
||||
};
|
||||
};
|
||||
|
||||
#include "axp22x.dtsi"
|
||||
|
||||
®_aldo1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-io";
|
||||
};
|
||||
|
||||
®_aldo2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2350000>;
|
||||
regulator-max-microvolt = <2650000>;
|
||||
regulator-name = "vdd-dll";
|
||||
};
|
||||
|
||||
®_aldo3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <2700000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-pll-avcc";
|
||||
};
|
||||
|
||||
®_dc5ldo {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpus";
|
||||
};
|
||||
|
||||
®_dcdc1 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0";
|
||||
};
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-sys";
|
||||
};
|
||||
|
||||
®_dcdc3 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1400000>;
|
||||
regulator-name = "vdd-cpu";
|
||||
};
|
||||
|
||||
®_dcdc5 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
regulator-name = "vcc-dram";
|
||||
};
|
||||
|
||||
®_dldo1 {
|
||||
/*
|
||||
* TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
|
||||
* Remove next line once it is possible to sync two regulators.
|
||||
*/
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi0";
|
||||
};
|
||||
|
||||
®_dldo2 {
|
||||
/*
|
||||
* TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
|
||||
* Remove next line once it is possible to sync two regulators.
|
||||
*/
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc-wifi1";
|
||||
};
|
||||
|
||||
®_dldo3 {
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-3v0-csi";
|
||||
};
|
||||
|
||||
®_drivevbus {
|
||||
regulator-name = "usb0-vbus";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
®_eldo1 {
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-name = "vcc-1v2-hsic";
|
||||
};
|
||||
|
||||
®_eldo2 {
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "vcc-dsp";
|
||||
};
|
||||
|
||||
®_eldo3 {
|
||||
regulator-min-microvolt = <3000000>;
|
||||
regulator-max-microvolt = <3000000>;
|
||||
regulator-name = "eldo3";
|
||||
};
|
||||
|
||||
®_usb1_vbus {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb1_vbus_pin_parrot>;
|
||||
gpio = <&pio 3 12 GPIO_ACTIVE_HIGH>; /* PD12 */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&uart0_pins_b>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_power_supply {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&usb0_id_det>;
|
||||
usb0_vbus-supply = <®_drivevbus>;
|
||||
usb0_id_det-gpios = <&pio 3 10 GPIO_ACTIVE_HIGH>; /* PD10 */
|
||||
usb0_vbus_power-supply = <&usb_power_supply>;
|
||||
usb1_vbus-supply = <®_usb1_vbus>;
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "skeleton.dtsi"
|
||||
#include <dt-bindings/gpio/tegra-gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/mailbox/tegra-hsp.h>
|
||||
|
||||
/ {
|
||||
compatible = "nvidia,tegra186";
|
||||
@@ -40,6 +41,18 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
hsp: hsp@3c00000 {
|
||||
compatible = "nvidia,tegra186-hsp";
|
||||
reg = <0x0 0x03c00000 0x0 0xa0000>;
|
||||
interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
|
||||
nvidia,num-SM = <0x8>;
|
||||
nvidia,num-AS = <0x2>;
|
||||
nvidia,num-SS = <0x2>;
|
||||
nvidia,num-DB = <0x7>;
|
||||
nvidia,num-SI = <0x8>;
|
||||
#mbox-cells = <1>;
|
||||
};
|
||||
|
||||
gpio@c2f0000 {
|
||||
compatible = "nvidia,tegra186-gpio-aon";
|
||||
reg-names = "security", "gpio";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include "tegra20.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -11,6 +12,9 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
rtc0 = "/i2c@7000d000/tps6586x@34";
|
||||
rtc1 = "/rtc@7000e000";
|
||||
serial0 = &uartd;
|
||||
usb0 = "/usb@c5008000";
|
||||
usb1 = "/usb@c5004000";
|
||||
sdhci0 = "/sdhci@c8000600";
|
||||
@@ -27,15 +31,295 @@
|
||||
status = "okay";
|
||||
rgb {
|
||||
status = "okay";
|
||||
nvidia,panel = <&lcd_panel>;
|
||||
|
||||
nvidia,panel = <&panel>;
|
||||
|
||||
display-timings {
|
||||
timing@0 {
|
||||
/* Seaboard has 1366x768 */
|
||||
clock-frequency = <42430000>;
|
||||
hactive = <1024>;
|
||||
vactive = <600>;
|
||||
hback-porch = <138>;
|
||||
hfront-porch = <34>;
|
||||
hsync-len = <136>;
|
||||
vback-porch = <21>;
|
||||
vfront-porch = <4>;
|
||||
vsync-len = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hdmi@54280000 {
|
||||
status = "okay";
|
||||
|
||||
hdmi-supply = <&vdd_5v0_hdmi>;
|
||||
vdd-supply = <&hdmi_vdd_reg>;
|
||||
pll-supply = <&hdmi_pll_reg>;
|
||||
|
||||
nvidia,ddc-i2c-bus = <&hdmi_ddc>;
|
||||
nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
pinmux@70000014 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&state_default>;
|
||||
|
||||
state_default: pinmux {
|
||||
ata {
|
||||
nvidia,pins = "ata";
|
||||
nvidia,function = "ide";
|
||||
};
|
||||
atb {
|
||||
nvidia,pins = "atb", "gma", "gme";
|
||||
nvidia,function = "sdio4";
|
||||
};
|
||||
atc {
|
||||
nvidia,pins = "atc";
|
||||
nvidia,function = "nand";
|
||||
};
|
||||
atd {
|
||||
nvidia,pins = "atd", "ate", "gmb", "gmd", "gpu",
|
||||
"spia", "spib", "spic";
|
||||
nvidia,function = "gmi";
|
||||
};
|
||||
cdev1 {
|
||||
nvidia,pins = "cdev1";
|
||||
nvidia,function = "plla_out";
|
||||
};
|
||||
cdev2 {
|
||||
nvidia,pins = "cdev2";
|
||||
nvidia,function = "pllp_out4";
|
||||
};
|
||||
crtp {
|
||||
nvidia,pins = "crtp";
|
||||
nvidia,function = "crt";
|
||||
};
|
||||
csus {
|
||||
nvidia,pins = "csus";
|
||||
nvidia,function = "vi_sensor_clk";
|
||||
};
|
||||
dap1 {
|
||||
nvidia,pins = "dap1";
|
||||
nvidia,function = "dap1";
|
||||
};
|
||||
dap2 {
|
||||
nvidia,pins = "dap2";
|
||||
nvidia,function = "dap2";
|
||||
};
|
||||
dap3 {
|
||||
nvidia,pins = "dap3";
|
||||
nvidia,function = "dap3";
|
||||
};
|
||||
dap4 {
|
||||
nvidia,pins = "dap4";
|
||||
nvidia,function = "dap4";
|
||||
};
|
||||
ddc {
|
||||
nvidia,pins = "ddc";
|
||||
nvidia,function = "i2c2";
|
||||
};
|
||||
dta {
|
||||
nvidia,pins = "dta", "dtd";
|
||||
nvidia,function = "sdio2";
|
||||
};
|
||||
dtb {
|
||||
nvidia,pins = "dtb", "dtc", "dte";
|
||||
nvidia,function = "rsvd1";
|
||||
};
|
||||
dtf {
|
||||
nvidia,pins = "dtf";
|
||||
nvidia,function = "i2c3";
|
||||
};
|
||||
gmc {
|
||||
nvidia,pins = "gmc";
|
||||
nvidia,function = "uartd";
|
||||
};
|
||||
gpu7 {
|
||||
nvidia,pins = "gpu7";
|
||||
nvidia,function = "rtck";
|
||||
};
|
||||
gpv {
|
||||
nvidia,pins = "gpv", "slxa", "slxk";
|
||||
nvidia,function = "pcie";
|
||||
};
|
||||
hdint {
|
||||
nvidia,pins = "hdint", "pta";
|
||||
nvidia,function = "hdmi";
|
||||
};
|
||||
i2cp {
|
||||
nvidia,pins = "i2cp";
|
||||
nvidia,function = "i2cp";
|
||||
};
|
||||
irrx {
|
||||
nvidia,pins = "irrx", "irtx";
|
||||
nvidia,function = "uarta";
|
||||
};
|
||||
kbca {
|
||||
nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd",
|
||||
"kbce", "kbcf";
|
||||
nvidia,function = "kbc";
|
||||
};
|
||||
lcsn {
|
||||
nvidia,pins = "lcsn", "ld0", "ld1", "ld2",
|
||||
"ld3", "ld4", "ld5", "ld6", "ld7",
|
||||
"ld8", "ld9", "ld10", "ld11", "ld12",
|
||||
"ld13", "ld14", "ld15", "ld16", "ld17",
|
||||
"ldc", "ldi", "lhp0", "lhp1", "lhp2",
|
||||
"lhs", "lm0", "lm1", "lpp", "lpw0",
|
||||
"lpw1", "lpw2", "lsc0", "lsc1", "lsck",
|
||||
"lsda", "lsdi", "lspi", "lvp0", "lvp1",
|
||||
"lvs";
|
||||
nvidia,function = "displaya";
|
||||
};
|
||||
owc {
|
||||
nvidia,pins = "owc", "spdi", "spdo", "uac";
|
||||
nvidia,function = "rsvd2";
|
||||
};
|
||||
pmc {
|
||||
nvidia,pins = "pmc";
|
||||
nvidia,function = "pwr_on";
|
||||
};
|
||||
rm {
|
||||
nvidia,pins = "rm";
|
||||
nvidia,function = "i2c1";
|
||||
};
|
||||
sdb {
|
||||
nvidia,pins = "sdb", "sdc", "sdd";
|
||||
nvidia,function = "pwm";
|
||||
};
|
||||
sdio1 {
|
||||
nvidia,pins = "sdio1";
|
||||
nvidia,function = "sdio1";
|
||||
};
|
||||
slxc {
|
||||
nvidia,pins = "slxc", "slxd";
|
||||
nvidia,function = "spdif";
|
||||
};
|
||||
spid {
|
||||
nvidia,pins = "spid", "spie", "spif";
|
||||
nvidia,function = "spi1";
|
||||
};
|
||||
spig {
|
||||
nvidia,pins = "spig", "spih";
|
||||
nvidia,function = "spi2_alt";
|
||||
};
|
||||
uaa {
|
||||
nvidia,pins = "uaa", "uab", "uda";
|
||||
nvidia,function = "ulpi";
|
||||
};
|
||||
uad {
|
||||
nvidia,pins = "uad";
|
||||
nvidia,function = "irda";
|
||||
};
|
||||
uca {
|
||||
nvidia,pins = "uca", "ucb";
|
||||
nvidia,function = "uartc";
|
||||
};
|
||||
conf_ata {
|
||||
nvidia,pins = "ata", "atb", "atc", "atd", "ate",
|
||||
"cdev1", "cdev2", "dap1", "dtb", "gma",
|
||||
"gmb", "gmc", "gmd", "gme", "gpu7",
|
||||
"gpv", "i2cp", "pta", "rm", "slxa",
|
||||
"slxk", "spia", "spib", "uac";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
conf_ck32 {
|
||||
nvidia,pins = "ck32", "ddrc", "pmca", "pmcb",
|
||||
"pmcc", "pmcd", "pmce", "xm2c", "xm2d";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
};
|
||||
conf_csus {
|
||||
nvidia,pins = "csus", "spid", "spif";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_crtp {
|
||||
nvidia,pins = "crtp", "dap2", "dap3", "dap4",
|
||||
"dtc", "dte", "dtf", "gpu", "sdio1",
|
||||
"slxc", "slxd", "spdi", "spdo", "spig",
|
||||
"uda";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_ddc {
|
||||
nvidia,pins = "ddc", "dta", "dtd", "kbca",
|
||||
"kbcb", "kbcc", "kbcd", "kbce", "kbcf",
|
||||
"sdc";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_UP>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
conf_hdint {
|
||||
nvidia,pins = "hdint", "lcsn", "ldc", "lm1",
|
||||
"lpw1", "lsc1", "lsck", "lsda", "lsdi",
|
||||
"lvp0", "owc", "sdb";
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_irrx {
|
||||
nvidia,pins = "irrx", "irtx", "sdd", "spic",
|
||||
"spie", "spih", "uaa", "uab", "uad",
|
||||
"uca", "ucb";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_UP>;
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_lc {
|
||||
nvidia,pins = "lc", "ls";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_UP>;
|
||||
};
|
||||
conf_ld0 {
|
||||
nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4",
|
||||
"ld5", "ld6", "ld7", "ld8", "ld9",
|
||||
"ld10", "ld11", "ld12", "ld13", "ld14",
|
||||
"ld15", "ld16", "ld17", "ldi", "lhp0",
|
||||
"lhp1", "lhp2", "lhs", "lm0", "lpp",
|
||||
"lpw0", "lpw2", "lsc0", "lspi", "lvp1",
|
||||
"lvs", "pmc";
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
conf_ld17_0 {
|
||||
nvidia,pins = "ld17_0", "ld19_18", "ld21_20",
|
||||
"ld23_22";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
i2s@70002800 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
serial@70006300 {
|
||||
status = "okay";
|
||||
clock-frequency = < 216000000 >;
|
||||
};
|
||||
|
||||
pwm: pwm@7000a000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
i2c@7000c000 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
wm8903: wm8903@1a {
|
||||
compatible = "wlf,wm8903";
|
||||
reg = <0x1a>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
micdet-cfg = <0>;
|
||||
micdet-delay = <100>;
|
||||
gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
|
||||
};
|
||||
};
|
||||
|
||||
nand-controller@70008000 {
|
||||
nvidia,wp-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_HIGH>;
|
||||
nvidia,width = <8>;
|
||||
@@ -46,15 +330,319 @@
|
||||
};
|
||||
};
|
||||
|
||||
hdmi_ddc: i2c@7000c400 {
|
||||
status = "okay";
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
i2c@7000c500 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
};
|
||||
|
||||
i2c@7000d000 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
pmic: tps6586x@34 {
|
||||
compatible = "ti,tps6586x";
|
||||
reg = <0x34>;
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
ti,system-power-controller;
|
||||
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
|
||||
sys-supply = <&vdd_5v0_reg>;
|
||||
vin-sm0-supply = <&sys_reg>;
|
||||
vin-sm1-supply = <&sys_reg>;
|
||||
vin-sm2-supply = <&sys_reg>;
|
||||
vinldo01-supply = <&sm2_reg>;
|
||||
vinldo23-supply = <&sm2_reg>;
|
||||
vinldo4-supply = <&sm2_reg>;
|
||||
vinldo678-supply = <&sm2_reg>;
|
||||
vinldo9-supply = <&sm2_reg>;
|
||||
|
||||
regulators {
|
||||
sys_reg: sys {
|
||||
regulator-name = "vdd_sys";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sm0 {
|
||||
regulator-name = "vdd_sm0,vdd_core";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sm1 {
|
||||
regulator-name = "vdd_sm1,vdd_cpu";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sm2_reg: sm2 {
|
||||
regulator-name = "vdd_sm2,vin_ldo*";
|
||||
regulator-min-microvolt = <3700000>;
|
||||
regulator-max-microvolt = <3700000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
pci_clk_reg: ldo0 {
|
||||
regulator-name = "vdd_ldo0,vddio_pex_clk";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
ldo1 {
|
||||
regulator-name = "vdd_ldo1,avdd_pll*";
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo2 {
|
||||
regulator-name = "vdd_ldo2,vdd_rtc";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
};
|
||||
|
||||
ldo3 {
|
||||
regulator-name = "vdd_ldo3,avdd_usb*";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo4 {
|
||||
regulator-name = "vdd_ldo4,avdd_osc,vddio_sys";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo5 {
|
||||
regulator-name = "vdd_ldo5,vcore_mmc";
|
||||
regulator-min-microvolt = <2850000>;
|
||||
regulator-max-microvolt = <2850000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo6 {
|
||||
regulator-name = "vdd_ldo6,avdd_vdac";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
hdmi_vdd_reg: ldo7 {
|
||||
regulator-name = "vdd_ldo7,avdd_hdmi";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
hdmi_pll_reg: ldo8 {
|
||||
regulator-name = "vdd_ldo8,avdd_hdmi_pll";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
ldo9 {
|
||||
regulator-name = "vdd_ldo9,avdd_2v85,vdd_ddr_rx";
|
||||
regulator-min-microvolt = <2850000>;
|
||||
regulator-max-microvolt = <2850000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo_rtc {
|
||||
regulator-name = "vdd_rtc_out,vdd_cell";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
temperature-sensor@4c {
|
||||
compatible = "adi,adt7461";
|
||||
reg = <0x4c>;
|
||||
};
|
||||
};
|
||||
|
||||
kbc@7000e200 {
|
||||
status = "okay";
|
||||
nvidia,debounce-delay-ms = <2>;
|
||||
nvidia,repeat-delay-ms = <160>;
|
||||
nvidia,kbc-row-pins = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15>;
|
||||
nvidia,kbc-col-pins = <16 17 18 19 20 21 22 23>;
|
||||
linux,keymap = <MATRIX_KEY(0x00, 0x02, KEY_W)
|
||||
MATRIX_KEY(0x00, 0x03, KEY_S)
|
||||
MATRIX_KEY(0x00, 0x04, KEY_A)
|
||||
MATRIX_KEY(0x00, 0x05, KEY_Z)
|
||||
MATRIX_KEY(0x00, 0x07, KEY_FN)
|
||||
MATRIX_KEY(0x01, 0x07, KEY_MENU)
|
||||
MATRIX_KEY(0x02, 0x06, KEY_LEFTALT)
|
||||
MATRIX_KEY(0x02, 0x07, KEY_RIGHTALT)
|
||||
MATRIX_KEY(0x03, 0x00, KEY_5)
|
||||
MATRIX_KEY(0x03, 0x01, KEY_4)
|
||||
MATRIX_KEY(0x03, 0x02, KEY_R)
|
||||
MATRIX_KEY(0x03, 0x03, KEY_E)
|
||||
MATRIX_KEY(0x03, 0x04, KEY_F)
|
||||
MATRIX_KEY(0x03, 0x05, KEY_D)
|
||||
MATRIX_KEY(0x03, 0x06, KEY_X)
|
||||
MATRIX_KEY(0x04, 0x00, KEY_7)
|
||||
MATRIX_KEY(0x04, 0x01, KEY_6)
|
||||
MATRIX_KEY(0x04, 0x02, KEY_T)
|
||||
MATRIX_KEY(0x04, 0x03, KEY_H)
|
||||
MATRIX_KEY(0x04, 0x04, KEY_G)
|
||||
MATRIX_KEY(0x04, 0x05, KEY_V)
|
||||
MATRIX_KEY(0x04, 0x06, KEY_C)
|
||||
MATRIX_KEY(0x04, 0x07, KEY_SPACE)
|
||||
MATRIX_KEY(0x05, 0x00, KEY_9)
|
||||
MATRIX_KEY(0x05, 0x01, KEY_8)
|
||||
MATRIX_KEY(0x05, 0x02, KEY_U)
|
||||
MATRIX_KEY(0x05, 0x03, KEY_Y)
|
||||
MATRIX_KEY(0x05, 0x04, KEY_J)
|
||||
MATRIX_KEY(0x05, 0x05, KEY_N)
|
||||
MATRIX_KEY(0x05, 0x06, KEY_B)
|
||||
MATRIX_KEY(0x05, 0x07, KEY_BACKSLASH)
|
||||
MATRIX_KEY(0x06, 0x00, KEY_MINUS)
|
||||
MATRIX_KEY(0x06, 0x01, KEY_0)
|
||||
MATRIX_KEY(0x06, 0x02, KEY_O)
|
||||
MATRIX_KEY(0x06, 0x03, KEY_I)
|
||||
MATRIX_KEY(0x06, 0x04, KEY_L)
|
||||
MATRIX_KEY(0x06, 0x05, KEY_K)
|
||||
MATRIX_KEY(0x06, 0x06, KEY_COMMA)
|
||||
MATRIX_KEY(0x06, 0x07, KEY_M)
|
||||
MATRIX_KEY(0x07, 0x01, KEY_EQUAL)
|
||||
MATRIX_KEY(0x07, 0x02, KEY_RIGHTBRACE)
|
||||
MATRIX_KEY(0x07, 0x03, KEY_ENTER)
|
||||
MATRIX_KEY(0x07, 0x07, KEY_MENU)
|
||||
MATRIX_KEY(0x08, 0x04, KEY_LEFTSHIFT)
|
||||
MATRIX_KEY(0x08, 0x05, KEY_RIGHTSHIFT)
|
||||
MATRIX_KEY(0x09, 0x05, KEY_LEFTCTRL)
|
||||
MATRIX_KEY(0x09, 0x07, KEY_RIGHTCTRL)
|
||||
MATRIX_KEY(0x0B, 0x00, KEY_LEFTBRACE)
|
||||
MATRIX_KEY(0x0B, 0x01, KEY_P)
|
||||
MATRIX_KEY(0x0B, 0x02, KEY_APOSTROPHE)
|
||||
MATRIX_KEY(0x0B, 0x03, KEY_SEMICOLON)
|
||||
MATRIX_KEY(0x0B, 0x04, KEY_SLASH)
|
||||
MATRIX_KEY(0x0B, 0x05, KEY_DOT)
|
||||
MATRIX_KEY(0x0C, 0x00, KEY_F10)
|
||||
MATRIX_KEY(0x0C, 0x01, KEY_F9)
|
||||
MATRIX_KEY(0x0C, 0x02, KEY_BACKSPACE)
|
||||
MATRIX_KEY(0x0C, 0x03, KEY_3)
|
||||
MATRIX_KEY(0x0C, 0x04, KEY_2)
|
||||
MATRIX_KEY(0x0C, 0x05, KEY_UP)
|
||||
MATRIX_KEY(0x0C, 0x06, KEY_PRINT)
|
||||
MATRIX_KEY(0x0C, 0x07, KEY_PAUSE)
|
||||
MATRIX_KEY(0x0D, 0x00, KEY_INSERT)
|
||||
MATRIX_KEY(0x0D, 0x01, KEY_DELETE)
|
||||
MATRIX_KEY(0x0D, 0x03, KEY_PAGEUP )
|
||||
MATRIX_KEY(0x0D, 0x04, KEY_PAGEDOWN)
|
||||
MATRIX_KEY(0x0D, 0x05, KEY_RIGHT)
|
||||
MATRIX_KEY(0x0D, 0x06, KEY_DOWN)
|
||||
MATRIX_KEY(0x0D, 0x07, KEY_LEFT)
|
||||
MATRIX_KEY(0x0E, 0x00, KEY_F11)
|
||||
MATRIX_KEY(0x0E, 0x01, KEY_F12)
|
||||
MATRIX_KEY(0x0E, 0x02, KEY_F8)
|
||||
MATRIX_KEY(0x0E, 0x03, KEY_Q)
|
||||
MATRIX_KEY(0x0E, 0x04, KEY_F4)
|
||||
MATRIX_KEY(0x0E, 0x05, KEY_F3)
|
||||
MATRIX_KEY(0x0E, 0x06, KEY_1)
|
||||
MATRIX_KEY(0x0E, 0x07, KEY_F7)
|
||||
MATRIX_KEY(0x0F, 0x00, KEY_ESC)
|
||||
MATRIX_KEY(0x0F, 0x01, KEY_GRAVE)
|
||||
MATRIX_KEY(0x0F, 0x02, KEY_F5)
|
||||
MATRIX_KEY(0x0F, 0x03, KEY_TAB)
|
||||
MATRIX_KEY(0x0F, 0x04, KEY_F1)
|
||||
MATRIX_KEY(0x0F, 0x05, KEY_F2)
|
||||
MATRIX_KEY(0x0F, 0x06, KEY_CAPSLOCK)
|
||||
MATRIX_KEY(0x0F, 0x07, KEY_F6)
|
||||
MATRIX_KEY(0x14, 0x00, KEY_KP7)
|
||||
MATRIX_KEY(0x15, 0x00, KEY_KP9)
|
||||
MATRIX_KEY(0x15, 0x01, KEY_KP8)
|
||||
MATRIX_KEY(0x15, 0x02, KEY_KP4)
|
||||
MATRIX_KEY(0x15, 0x04, KEY_KP1)
|
||||
MATRIX_KEY(0x16, 0x01, KEY_KPSLASH)
|
||||
MATRIX_KEY(0x16, 0x02, KEY_KP6)
|
||||
MATRIX_KEY(0x16, 0x03, KEY_KP5)
|
||||
MATRIX_KEY(0x16, 0x04, KEY_KP3)
|
||||
MATRIX_KEY(0x16, 0x05, KEY_KP2)
|
||||
MATRIX_KEY(0x16, 0x07, KEY_KP0)
|
||||
MATRIX_KEY(0x1B, 0x01, KEY_KPASTERISK)
|
||||
MATRIX_KEY(0x1B, 0x03, KEY_KPMINUS)
|
||||
MATRIX_KEY(0x1B, 0x04, KEY_KPPLUS)
|
||||
MATRIX_KEY(0x1B, 0x05, KEY_KPDOT)
|
||||
MATRIX_KEY(0x1C, 0x05, KEY_VOLUMEUP)
|
||||
MATRIX_KEY(0x1D, 0x03, KEY_HOME)
|
||||
MATRIX_KEY(0x1D, 0x04, KEY_END)
|
||||
MATRIX_KEY(0x1D, 0x05, KEY_BRIGHTNESSUP)
|
||||
MATRIX_KEY(0x1D, 0x06, KEY_VOLUMEDOWN)
|
||||
MATRIX_KEY(0x1D, 0x07, KEY_BRIGHTNESSDOWN)
|
||||
MATRIX_KEY(0x1E, 0x00, KEY_NUMLOCK)
|
||||
MATRIX_KEY(0x1E, 0x01, KEY_SCROLLLOCK)
|
||||
MATRIX_KEY(0x1E, 0x02, KEY_MUTE)
|
||||
MATRIX_KEY(0x1F, 0x04, KEY_QUESTION)>;
|
||||
};
|
||||
|
||||
pmc@7000e400 {
|
||||
nvidia,invert-interrupt;
|
||||
nvidia,suspend-mode = <1>;
|
||||
nvidia,cpu-pwr-good-time = <5000>;
|
||||
nvidia,cpu-pwr-off-time = <5000>;
|
||||
nvidia,core-pwr-good-time = <3845 3845>;
|
||||
nvidia,core-pwr-off-time = <3875>;
|
||||
nvidia,sys-clock-req-active-high;
|
||||
};
|
||||
|
||||
pcie-controller@80003000 {
|
||||
status = "okay";
|
||||
|
||||
avdd-pex-supply = <&pci_vdd_reg>;
|
||||
vdd-pex-supply = <&pci_vdd_reg>;
|
||||
avdd-pex-pll-supply = <&pci_vdd_reg>;
|
||||
avdd-plle-supply = <&pci_vdd_reg>;
|
||||
vddio-pex-clk-supply = <&pci_clk_reg>;
|
||||
|
||||
pci@1,0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
pci@2,0 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
usb@c5000000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@c5000000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@c5004000 {
|
||||
statuc = "okay";
|
||||
status = "okay";
|
||||
nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1) 0>;
|
||||
};
|
||||
|
||||
usb-phy@c5004000 {
|
||||
status = "okay";
|
||||
nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
|
||||
GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb@c5008000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@c5008000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sdhci@c8000200 {
|
||||
status = "okay";
|
||||
cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
|
||||
@@ -71,6 +659,17 @@
|
||||
bus-width = <8>;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
|
||||
enable-gpios = <&gpio TEGRA_GPIO(B, 5) GPIO_ACTIVE_HIGH>;
|
||||
power-supply = <&vdd_bl_reg>;
|
||||
pwms = <&pwm 0 5000000>;
|
||||
|
||||
brightness-levels = <0 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <6>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
@@ -84,32 +683,130 @@
|
||||
};
|
||||
};
|
||||
|
||||
pwm: pwm@7000a000 {
|
||||
status = "okay";
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
power {
|
||||
label = "Power";
|
||||
gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_POWER>;
|
||||
gpio-key,wakeup;
|
||||
};
|
||||
};
|
||||
|
||||
lcd_panel: panel {
|
||||
clock = <42430000>;
|
||||
xres = <1024>;
|
||||
yres = <600>;
|
||||
left-margin = <138>;
|
||||
right-margin = <34>;
|
||||
hsync-len = <136>;
|
||||
lower-margin = <4>;
|
||||
upper-margin = <21>;
|
||||
vsync-len = <4>;
|
||||
hsync-active-high;
|
||||
vsyncx-active-high;
|
||||
nvidia,bits-per-pixel = <16>;
|
||||
nvidia,pwm = <&pwm 0 0>;
|
||||
nvidia,backlight-enable-gpios = <&gpio TEGRA_GPIO(B, 5)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,lvds-shutdown-gpios = <&gpio TEGRA_GPIO(B, 2)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,backlight-vdd-gpios = <&gpio TEGRA_GPIO(W, 0)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,panel-vdd-gpios = <&gpio TEGRA_GPIO(C, 6)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,panel-timings = <0 0 200 0 0>;
|
||||
panel: panel {
|
||||
compatible = "auo,b101aw03", "simple-panel";
|
||||
|
||||
power-supply = <&vdd_pnl_reg>;
|
||||
enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
|
||||
|
||||
backlight = <&backlight>;
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
vdd_5v0_reg: regulator@0 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <0>;
|
||||
regulator-name = "vdd_5v0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
regulator@1 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <1>;
|
||||
regulator-name = "vdd_1v5";
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
regulator@2 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <2>;
|
||||
regulator-name = "vdd_1v2";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
pci_vdd_reg: regulator@3 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <3>;
|
||||
regulator-name = "vdd_1v05";
|
||||
regulator-min-microvolt = <1050000>;
|
||||
regulator-max-microvolt = <1050000>;
|
||||
gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vdd_pnl_reg: regulator@4 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <4>;
|
||||
regulator-name = "vdd_pnl";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
gpio = <&gpio TEGRA_GPIO(C, 6) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vdd_bl_reg: regulator@5 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <5>;
|
||||
regulator-name = "vdd_bl";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
gpio = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vdd_5v0_hdmi: regulator@6 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <6>;
|
||||
regulator-name = "VDDIO_HDMI";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
gpio = <&gpio TEGRA_GPIO(T, 2) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
vin-supply = <&vdd_5v0_reg>;
|
||||
};
|
||||
};
|
||||
|
||||
sound {
|
||||
compatible = "nvidia,tegra-audio-wm8903-harmony",
|
||||
"nvidia,tegra-audio-wm8903";
|
||||
nvidia,model = "NVIDIA Tegra Harmony";
|
||||
|
||||
nvidia,audio-routing =
|
||||
"Headphone Jack", "HPOUTR",
|
||||
"Headphone Jack", "HPOUTL",
|
||||
"Int Spk", "ROP",
|
||||
"Int Spk", "RON",
|
||||
"Int Spk", "LOP",
|
||||
"Int Spk", "LON",
|
||||
"Mic Jack", "MICBIAS",
|
||||
"IN1L", "Mic Jack";
|
||||
|
||||
nvidia,i2s-controller = <&tegra_i2s1>;
|
||||
nvidia,audio-codec = <&wm8903>;
|
||||
|
||||
nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
|
||||
nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(X, 0)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
|
||||
clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
|
||||
<&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
|
||||
<&tegra_car TEGRA20_CLK_CDEV1>;
|
||||
clock-names = "pll_a", "pll_a_out0", "mclk";
|
||||
};
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include "tegra20.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -11,6 +12,9 @@
|
||||
};
|
||||
|
||||
aliases {
|
||||
rtc0 = "/i2c@7000d000/tps6586x@34";
|
||||
rtc1 = "/rtc@7000e000";
|
||||
serial0 = &uartd;
|
||||
usb0 = "/usb@c5008000";
|
||||
sdhci0 = "/sdhci@c8000600";
|
||||
sdhci1 = "/sdhci@c8000400";
|
||||
@@ -26,19 +30,557 @@
|
||||
status = "okay";
|
||||
rgb {
|
||||
status = "okay";
|
||||
nvidia,panel = <&lcd_panel>;
|
||||
|
||||
nvidia,panel = <&panel>;
|
||||
|
||||
display-timings {
|
||||
timing@0 {
|
||||
/* Seaboard has 1366x768 */
|
||||
clock-frequency = <70600000>;
|
||||
hactive = <1366>;
|
||||
vactive = <768>;
|
||||
hback-porch = <58>;
|
||||
hfront-porch = <58>;
|
||||
hsync-len = <58>;
|
||||
vback-porch = <4>;
|
||||
vfront-porch = <4>;
|
||||
vsync-len = <4>;
|
||||
hsync-active = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hdmi@54280000 {
|
||||
status = "okay";
|
||||
|
||||
vdd-supply = <&hdmi_vdd_reg>;
|
||||
pll-supply = <&hdmi_pll_reg>;
|
||||
|
||||
nvidia,ddc-i2c-bus = <&hdmi_ddc>;
|
||||
nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
pinmux@70000014 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&state_default>;
|
||||
|
||||
state_default: pinmux {
|
||||
ata {
|
||||
nvidia,pins = "ata";
|
||||
nvidia,function = "ide";
|
||||
};
|
||||
atb {
|
||||
nvidia,pins = "atb", "gma", "gme";
|
||||
nvidia,function = "sdio4";
|
||||
};
|
||||
atc {
|
||||
nvidia,pins = "atc";
|
||||
nvidia,function = "nand";
|
||||
};
|
||||
atd {
|
||||
nvidia,pins = "atd", "ate", "gmb", "spia",
|
||||
"spib", "spic";
|
||||
nvidia,function = "gmi";
|
||||
};
|
||||
cdev1 {
|
||||
nvidia,pins = "cdev1";
|
||||
nvidia,function = "plla_out";
|
||||
};
|
||||
cdev2 {
|
||||
nvidia,pins = "cdev2";
|
||||
nvidia,function = "pllp_out4";
|
||||
};
|
||||
crtp {
|
||||
nvidia,pins = "crtp", "lm1";
|
||||
nvidia,function = "crt";
|
||||
};
|
||||
csus {
|
||||
nvidia,pins = "csus";
|
||||
nvidia,function = "vi_sensor_clk";
|
||||
};
|
||||
dap1 {
|
||||
nvidia,pins = "dap1";
|
||||
nvidia,function = "dap1";
|
||||
};
|
||||
dap2 {
|
||||
nvidia,pins = "dap2";
|
||||
nvidia,function = "dap2";
|
||||
};
|
||||
dap3 {
|
||||
nvidia,pins = "dap3";
|
||||
nvidia,function = "dap3";
|
||||
};
|
||||
dap4 {
|
||||
nvidia,pins = "dap4";
|
||||
nvidia,function = "dap4";
|
||||
};
|
||||
dta {
|
||||
nvidia,pins = "dta", "dtb", "dtc", "dtd", "dte";
|
||||
nvidia,function = "vi";
|
||||
};
|
||||
dtf {
|
||||
nvidia,pins = "dtf";
|
||||
nvidia,function = "i2c3";
|
||||
};
|
||||
gmc {
|
||||
nvidia,pins = "gmc";
|
||||
nvidia,function = "uartd";
|
||||
};
|
||||
gmd {
|
||||
nvidia,pins = "gmd";
|
||||
nvidia,function = "sflash";
|
||||
};
|
||||
gpu {
|
||||
nvidia,pins = "gpu";
|
||||
nvidia,function = "pwm";
|
||||
};
|
||||
gpu7 {
|
||||
nvidia,pins = "gpu7";
|
||||
nvidia,function = "rtck";
|
||||
};
|
||||
gpv {
|
||||
nvidia,pins = "gpv", "slxa", "slxk";
|
||||
nvidia,function = "pcie";
|
||||
};
|
||||
hdint {
|
||||
nvidia,pins = "hdint";
|
||||
nvidia,function = "hdmi";
|
||||
};
|
||||
i2cp {
|
||||
nvidia,pins = "i2cp";
|
||||
nvidia,function = "i2cp";
|
||||
};
|
||||
irrx {
|
||||
nvidia,pins = "irrx", "irtx";
|
||||
nvidia,function = "uartb";
|
||||
};
|
||||
kbca {
|
||||
nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd",
|
||||
"kbce", "kbcf";
|
||||
nvidia,function = "kbc";
|
||||
};
|
||||
lcsn {
|
||||
nvidia,pins = "lcsn", "ldc", "lm0", "lpw1",
|
||||
"lsdi", "lvp0";
|
||||
nvidia,function = "rsvd4";
|
||||
};
|
||||
ld0 {
|
||||
nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4",
|
||||
"ld5", "ld6", "ld7", "ld8", "ld9",
|
||||
"ld10", "ld11", "ld12", "ld13", "ld14",
|
||||
"ld15", "ld16", "ld17", "ldi", "lhp0",
|
||||
"lhp1", "lhp2", "lhs", "lpp", "lpw0",
|
||||
"lpw2", "lsc0", "lsc1", "lsck", "lsda",
|
||||
"lspi", "lvp1", "lvs";
|
||||
nvidia,function = "displaya";
|
||||
};
|
||||
owc {
|
||||
nvidia,pins = "owc", "spdi", "spdo", "uac";
|
||||
nvidia,function = "rsvd2";
|
||||
};
|
||||
pmc {
|
||||
nvidia,pins = "pmc";
|
||||
nvidia,function = "pwr_on";
|
||||
};
|
||||
rm {
|
||||
nvidia,pins = "rm";
|
||||
nvidia,function = "i2c1";
|
||||
};
|
||||
sdb {
|
||||
nvidia,pins = "sdb", "sdc", "sdd", "slxc";
|
||||
nvidia,function = "sdio3";
|
||||
};
|
||||
sdio1 {
|
||||
nvidia,pins = "sdio1";
|
||||
nvidia,function = "sdio1";
|
||||
};
|
||||
slxd {
|
||||
nvidia,pins = "slxd";
|
||||
nvidia,function = "spdif";
|
||||
};
|
||||
spid {
|
||||
nvidia,pins = "spid", "spie", "spif";
|
||||
nvidia,function = "spi1";
|
||||
};
|
||||
spig {
|
||||
nvidia,pins = "spig", "spih";
|
||||
nvidia,function = "spi2_alt";
|
||||
};
|
||||
uaa {
|
||||
nvidia,pins = "uaa", "uab", "uda";
|
||||
nvidia,function = "ulpi";
|
||||
};
|
||||
uad {
|
||||
nvidia,pins = "uad";
|
||||
nvidia,function = "irda";
|
||||
};
|
||||
uca {
|
||||
nvidia,pins = "uca", "ucb";
|
||||
nvidia,function = "uartc";
|
||||
};
|
||||
conf_ata {
|
||||
nvidia,pins = "ata", "atb", "atc", "atd",
|
||||
"cdev1", "cdev2", "dap1", "dap2",
|
||||
"dap4", "ddc", "dtf", "gma", "gmc",
|
||||
"gme", "gpu", "gpu7", "i2cp", "irrx",
|
||||
"irtx", "pta", "rm", "sdc", "sdd",
|
||||
"slxc", "slxd", "slxk", "spdi", "spdo",
|
||||
"uac", "uad", "uca", "ucb", "uda";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
conf_ate {
|
||||
nvidia,pins = "ate", "csus", "dap3", "gmd",
|
||||
"gpv", "owc", "spia", "spib", "spic",
|
||||
"spid", "spie", "spig";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_ck32 {
|
||||
nvidia,pins = "ck32", "ddrc", "pmca", "pmcb",
|
||||
"pmcc", "pmcd", "pmce", "xm2c", "xm2d";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
|
||||
};
|
||||
conf_crtp {
|
||||
nvidia,pins = "crtp", "gmb", "slxa", "spih";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_UP>;
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_dta {
|
||||
nvidia,pins = "dta", "dtb", "dtc", "dtd";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
conf_dte {
|
||||
nvidia,pins = "dte", "spif";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_hdint {
|
||||
nvidia,pins = "hdint", "lcsn", "ldc", "lm1",
|
||||
"lpw1", "lsck", "lsda", "lsdi", "lvp0";
|
||||
nvidia,tristate = <TEGRA_PIN_ENABLE>;
|
||||
};
|
||||
conf_kbca {
|
||||
nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd",
|
||||
"kbce", "kbcf", "sdio1", "uaa", "uab";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_UP>;
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
conf_lc {
|
||||
nvidia,pins = "lc", "ls";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_UP>;
|
||||
};
|
||||
conf_ld0 {
|
||||
nvidia,pins = "ld0", "ld1", "ld2", "ld3", "ld4",
|
||||
"ld5", "ld6", "ld7", "ld8", "ld9",
|
||||
"ld10", "ld11", "ld12", "ld13", "ld14",
|
||||
"ld15", "ld16", "ld17", "ldi", "lhp0",
|
||||
"lhp1", "lhp2", "lhs", "lm0", "lpp",
|
||||
"lpw0", "lpw2", "lsc0", "lsc1", "lspi",
|
||||
"lvp1", "lvs", "pmc", "sdb";
|
||||
nvidia,tristate = <TEGRA_PIN_DISABLE>;
|
||||
};
|
||||
conf_ld17_0 {
|
||||
nvidia,pins = "ld17_0", "ld19_18", "ld21_20",
|
||||
"ld23_22";
|
||||
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
|
||||
};
|
||||
drive_sdio1 {
|
||||
nvidia,pins = "drive_sdio1";
|
||||
nvidia,high-speed-mode = <TEGRA_PIN_DISABLE>;
|
||||
nvidia,schmitt = <TEGRA_PIN_ENABLE>;
|
||||
nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
|
||||
nvidia,pull-down-strength = <31>;
|
||||
nvidia,pull-up-strength = <31>;
|
||||
nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
|
||||
nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_SLOWEST>;
|
||||
};
|
||||
};
|
||||
|
||||
state_i2cmux_ddc: pinmux_i2cmux_ddc {
|
||||
ddc {
|
||||
nvidia,pins = "ddc";
|
||||
nvidia,function = "i2c2";
|
||||
};
|
||||
pta {
|
||||
nvidia,pins = "pta";
|
||||
nvidia,function = "rsvd4";
|
||||
};
|
||||
};
|
||||
|
||||
state_i2cmux_pta: pinmux_i2cmux_pta {
|
||||
ddc {
|
||||
nvidia,pins = "ddc";
|
||||
nvidia,function = "rsvd4";
|
||||
};
|
||||
pta {
|
||||
nvidia,pins = "pta";
|
||||
nvidia,function = "i2c2";
|
||||
};
|
||||
};
|
||||
|
||||
state_i2cmux_idle: pinmux_i2cmux_idle {
|
||||
ddc {
|
||||
nvidia,pins = "ddc";
|
||||
nvidia,function = "rsvd4";
|
||||
};
|
||||
pta {
|
||||
nvidia,pins = "pta";
|
||||
nvidia,function = "rsvd4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
i2s@70002800 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
serial@70006300 {
|
||||
clock-frequency = < 216000000 >;
|
||||
status = "okay";
|
||||
clock-frequency = < 216000000 >; };
|
||||
|
||||
pwm: pwm@7000a000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
i2c@7000c000 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
wm8903: wm8903@1a {
|
||||
compatible = "wlf,wm8903";
|
||||
reg = <0x1a>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <TEGRA_GPIO(X, 3) IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
micdet-cfg = <0>;
|
||||
micdet-delay = <100>;
|
||||
gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
|
||||
};
|
||||
|
||||
/* ALS and proximity sensor */
|
||||
isl29018@44 {
|
||||
compatible = "isil,isl29018";
|
||||
reg = <0x44>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <TEGRA_GPIO(Z, 2) IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@7000c400 {
|
||||
status = "okay";
|
||||
clock-frequency = <100000>;
|
||||
};
|
||||
|
||||
i2cmux {
|
||||
compatible = "i2c-mux-pinctrl";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
i2c-parent = <&{/i2c@7000c400}>;
|
||||
|
||||
pinctrl-names = "ddc", "pta", "idle";
|
||||
pinctrl-0 = <&state_i2cmux_ddc>;
|
||||
pinctrl-1 = <&state_i2cmux_pta>;
|
||||
pinctrl-2 = <&state_i2cmux_idle>;
|
||||
|
||||
hdmi_ddc: i2c@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
|
||||
lvds_ddc: i2c@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c@7000c500 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
};
|
||||
|
||||
i2c@7000d000 {
|
||||
status = "okay";
|
||||
clock-frequency = <400000>;
|
||||
|
||||
pmic: tps6586x@34 {
|
||||
compatible = "ti,tps6586x";
|
||||
reg = <0x34>;
|
||||
interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
|
||||
|
||||
ti,system-power-controller;
|
||||
|
||||
#gpio-cells = <2>;
|
||||
gpio-controller;
|
||||
|
||||
sys-supply = <&vdd_5v0_reg>;
|
||||
vin-sm0-supply = <&sys_reg>;
|
||||
vin-sm1-supply = <&sys_reg>;
|
||||
vin-sm2-supply = <&sys_reg>;
|
||||
vinldo01-supply = <&sm2_reg>;
|
||||
vinldo23-supply = <&sm2_reg>;
|
||||
vinldo4-supply = <&sm2_reg>;
|
||||
vinldo678-supply = <&sm2_reg>;
|
||||
vinldo9-supply = <&sm2_reg>;
|
||||
|
||||
regulators {
|
||||
sys_reg: sys {
|
||||
regulator-name = "vdd_sys";
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sm0 {
|
||||
regulator-name = "vdd_sm0,vdd_core";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sm1 {
|
||||
regulator-name = "vdd_sm1,vdd_cpu";
|
||||
regulator-min-microvolt = <1000000>;
|
||||
regulator-max-microvolt = <1000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
sm2_reg: sm2 {
|
||||
regulator-name = "vdd_sm2,vin_ldo*";
|
||||
regulator-min-microvolt = <3700000>;
|
||||
regulator-max-microvolt = <3700000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
/* LDO0 is not connected to anything */
|
||||
|
||||
ldo1 {
|
||||
regulator-name = "vdd_ldo1,avdd_pll*";
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1100000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo2 {
|
||||
regulator-name = "vdd_ldo2,vdd_rtc";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
};
|
||||
|
||||
ldo3 {
|
||||
regulator-name = "vdd_ldo3,avdd_usb*";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo4 {
|
||||
regulator-name = "vdd_ldo4,avdd_osc,vddio_sys";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo5 {
|
||||
regulator-name = "vdd_ldo5,vcore_mmc";
|
||||
regulator-min-microvolt = <2850000>;
|
||||
regulator-max-microvolt = <2850000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo6 {
|
||||
regulator-name = "vdd_ldo6,avdd_vdac";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
hdmi_vdd_reg: ldo7 {
|
||||
regulator-name = "vdd_ldo7,avdd_hdmi,vdd_fuse";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
hdmi_pll_reg: ldo8 {
|
||||
regulator-name = "vdd_ldo8,avdd_hdmi_pll";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
ldo9 {
|
||||
regulator-name = "vdd_ldo9,avdd_2v85,vdd_ddr_rx";
|
||||
regulator-min-microvolt = <2850000>;
|
||||
regulator-max-microvolt = <2850000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
ldo_rtc {
|
||||
regulator-name = "vdd_rtc_out,vdd_cell";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
temperature-sensor@4c {
|
||||
compatible = "onnn,nct1008";
|
||||
reg = <0x4c>;
|
||||
};
|
||||
};
|
||||
|
||||
pmc@7000e400 {
|
||||
nvidia,invert-interrupt;
|
||||
nvidia,suspend-mode = <1>;
|
||||
nvidia,cpu-pwr-good-time = <2000>;
|
||||
nvidia,cpu-pwr-off-time = <100>;
|
||||
nvidia,core-pwr-good-time = <3845 3845>;
|
||||
nvidia,core-pwr-off-time = <458>;
|
||||
nvidia,sys-clock-req-active-high;
|
||||
};
|
||||
|
||||
usb@c5000000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@c5000000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb@c5004000 {
|
||||
status = "okay";
|
||||
nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
|
||||
GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb-phy@c5004000 {
|
||||
status = "okay";
|
||||
nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
|
||||
GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb@c5008000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb-phy@c5008000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
sdhci@c8000000 {
|
||||
status = "okay";
|
||||
power-gpios = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
|
||||
bus-width = <4>;
|
||||
keep-power-in-suspend;
|
||||
};
|
||||
|
||||
sdhci@c8000400 {
|
||||
status = "okay";
|
||||
cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
|
||||
@@ -50,6 +592,18 @@
|
||||
sdhci@c8000600 {
|
||||
status = "okay";
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
|
||||
enable-gpios = <&gpio TEGRA_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
|
||||
power-supply = <&vdd_bl_reg>;
|
||||
pwms = <&pwm 2 5000000>;
|
||||
|
||||
brightness-levels = <0 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <6>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
@@ -65,32 +619,109 @@
|
||||
};
|
||||
};
|
||||
|
||||
pwm: pwm@7000a000 {
|
||||
status = "okay";
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
power {
|
||||
label = "Power";
|
||||
gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_POWER>;
|
||||
gpio-key,wakeup;
|
||||
};
|
||||
};
|
||||
|
||||
lcd_panel: panel {
|
||||
clock = <72072000>;
|
||||
xres = <1366>;
|
||||
yres = <768>;
|
||||
left-margin = <58>;
|
||||
right-margin = <58>;
|
||||
hsync-len = <58>;
|
||||
lower-margin = <4>;
|
||||
upper-margin = <4>;
|
||||
vsync-len = <4>;
|
||||
hsync-active-high;
|
||||
vsync-active-high;
|
||||
nvidia,bits-per-pixel = <16>;
|
||||
nvidia,pwm = <&pwm 2 0>;
|
||||
nvidia,backlight-enable-gpios = <&gpio TEGRA_GPIO(D, 4)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,lvds-shutdown-gpios = <&gpio TEGRA_GPIO(B, 2)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,backlight-vdd-gpios = <&gpio TEGRA_GPIO(W, 0)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,panel-vdd-gpios = <&gpio TEGRA_GPIO(C, 6)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,panel-timings = <0 0 200 0 0>;
|
||||
panel: panel {
|
||||
compatible = "chunghwa,claa101wa01a", "simple-panel";
|
||||
|
||||
power-supply = <&vdd_pnl_reg>;
|
||||
enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
|
||||
|
||||
backlight = <&backlight>;
|
||||
ddc-i2c-bus = <&lvds_ddc>;
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
vdd_5v0_reg: regulator@0 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <0>;
|
||||
regulator-name = "vdd_5v0";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
};
|
||||
|
||||
regulator@1 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <1>;
|
||||
regulator-name = "vdd_1v5";
|
||||
regulator-min-microvolt = <1500000>;
|
||||
regulator-max-microvolt = <1500000>;
|
||||
gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
regulator@2 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <2>;
|
||||
regulator-name = "vdd_1v2";
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vdd_pnl_reg: regulator@3 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <3>;
|
||||
regulator-name = "vdd_pnl";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
gpio = <&gpio TEGRA_GPIO(C, 6) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
vdd_bl_reg: regulator@4 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <4>;
|
||||
regulator-name = "vdd_bl";
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
gpio = <&gpio TEGRA_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
sound {
|
||||
compatible = "nvidia,tegra-audio-wm8903-ventana",
|
||||
"nvidia,tegra-audio-wm8903";
|
||||
nvidia,model = "NVIDIA Tegra Ventana";
|
||||
|
||||
nvidia,audio-routing =
|
||||
"Headphone Jack", "HPOUTR",
|
||||
"Headphone Jack", "HPOUTL",
|
||||
"Int Spk", "ROP",
|
||||
"Int Spk", "RON",
|
||||
"Int Spk", "LOP",
|
||||
"Int Spk", "LON",
|
||||
"Mic Jack", "MICBIAS",
|
||||
"IN1L", "Mic Jack";
|
||||
|
||||
nvidia,i2s-controller = <&tegra_i2s1>;
|
||||
nvidia,audio-codec = <&wm8903>;
|
||||
|
||||
nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
|
||||
nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
|
||||
nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(X, 0)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1)
|
||||
GPIO_ACTIVE_HIGH>;
|
||||
|
||||
clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
|
||||
<&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
|
||||
<&tegra_car TEGRA20_CLK_CDEV1>;
|
||||
clock-names = "pll_a", "pll_a_out0", "mclk";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
interrupt-parent = <&intc>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
serial0: serial@54006800 {
|
||||
compatible = "socionext,uniphier-uart";
|
||||
@@ -65,9 +66,12 @@
|
||||
|
||||
system_bus: system-bus@58c00000 {
|
||||
compatible = "socionext,uniphier-system-bus";
|
||||
status = "disabled";
|
||||
reg = <0x58c00000 0x400>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_system_bus>;
|
||||
};
|
||||
|
||||
smpctrl@59800000 {
|
||||
@@ -109,9 +113,15 @@
|
||||
interrupt-controller;
|
||||
};
|
||||
|
||||
pinctrl: pinctrl@5f801000 {
|
||||
/* specify compatible in each SoC DTSI */
|
||||
reg = <0x5f801000 0xe00>;
|
||||
soc-glue@5f800000 {
|
||||
compatible = "simple-mfd", "syscon";
|
||||
reg = <0x5f800000 0x2000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
pinctrl: pinctrl {
|
||||
/* specify compatible in each SoC DTSI */
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
sysctrl: sysctrl@61840000 {
|
||||
@@ -124,8 +134,12 @@
|
||||
|
||||
nand: nand@68000000 {
|
||||
compatible = "denali,denali-nand-dt";
|
||||
reg = <0x68000000 0x20>, <0x68100000 0x1000>;
|
||||
status = "disabled";
|
||||
reg-names = "nand_data", "denali_reg";
|
||||
reg = <0x68000000 0x20>, <0x68100000 0x1000>;
|
||||
interrupts = <0 65 4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_nand>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/*
|
||||
* Device Tree Source for UniPhier PH1-LD11 Reference Board
|
||||
*
|
||||
* Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
* Copyright (C) 2016 Socionext Inc.
|
||||
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+ X11
|
||||
*/
|
||||
@@ -62,20 +63,10 @@
|
||||
};
|
||||
|
||||
/* for U-Boot only */
|
||||
/ {
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
/*
|
||||
* Device Tree Source for UniPhier PH1-LD11 SoC
|
||||
*
|
||||
* Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
* Copyright (C) 2016 Socionext Inc.
|
||||
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+ X11
|
||||
*/
|
||||
|
||||
/memreserve/ 0x80000000 0x00000008; /* cpu-release-addr */
|
||||
|
||||
/ {
|
||||
compatible = "socionext,ph1-ld11";
|
||||
#address-cells = <2>;
|
||||
@@ -16,24 +19,41 @@
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu@0 {
|
||||
cpu-map {
|
||||
cluster0 {
|
||||
core0 {
|
||||
cpu = <&cpu0>;
|
||||
};
|
||||
core1 {
|
||||
cpu = <&cpu1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0 0x000>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0 0x80000100>;
|
||||
cpu-release-addr = <0 0x80000000>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
cpu1: cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0 0x001>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0 0x80000100>;
|
||||
cpu-release-addr = <0 0x80000000>;
|
||||
};
|
||||
};
|
||||
|
||||
clocks {
|
||||
refclk: ref {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <25000000>;
|
||||
};
|
||||
|
||||
uart_clk: uart_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
@@ -60,6 +80,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0 0xffffffff>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
serial0: serial@54006800 {
|
||||
compatible = "socionext,uniphier-uart";
|
||||
@@ -183,6 +204,8 @@
|
||||
reg = <0x58c00000 0x400>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_system_bus>;
|
||||
};
|
||||
|
||||
smpctrl@59800000 {
|
||||
@@ -226,9 +249,20 @@
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
pinctrl: pinctrl@5f801000 {
|
||||
compatible = "socionext,ph1-ld11-pinctrl", "syscon";
|
||||
reg = <0x5f801000 0xe00>;
|
||||
soc-glue@5f800000 {
|
||||
compatible = "simple-mfd", "syscon";
|
||||
reg = <0x5f800000 0x2000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
pinctrl: pinctrl {
|
||||
compatible = "socionext,uniphier-ld11-pinctrl";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
aidet@5fc20000 {
|
||||
compatible = "simple-mfd", "syscon";
|
||||
reg = <0x5fc20000 0x200>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@5fe00000 {
|
||||
|
||||
@@ -51,20 +51,10 @@
|
||||
};
|
||||
|
||||
/* for U-Boot only */
|
||||
/ {
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* SPDX-License-Identifier: GPL-2.0+ X11
|
||||
*/
|
||||
|
||||
/memreserve/ 0x80000000 0x00000008; /* cpu-release-addr */
|
||||
|
||||
/ {
|
||||
compatible = "socionext,ph1-ld20";
|
||||
#address-cells = <2>;
|
||||
@@ -41,7 +43,7 @@
|
||||
compatible = "arm,cortex-a72", "arm,armv8";
|
||||
reg = <0 0x000>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0 0x80000100>;
|
||||
cpu-release-addr = <0 0x80000000>;
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
@@ -49,7 +51,7 @@
|
||||
compatible = "arm,cortex-a72", "arm,armv8";
|
||||
reg = <0 0x001>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0 0x80000100>;
|
||||
cpu-release-addr = <0 0x80000000>;
|
||||
};
|
||||
|
||||
cpu2: cpu@100 {
|
||||
@@ -57,7 +59,7 @@
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0 0x100>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0 0x80000100>;
|
||||
cpu-release-addr = <0 0x80000000>;
|
||||
};
|
||||
|
||||
cpu3: cpu@101 {
|
||||
@@ -65,11 +67,17 @@
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0 0x101>;
|
||||
enable-method = "spin-table";
|
||||
cpu-release-addr = <0 0x80000100>;
|
||||
cpu-release-addr = <0 0x80000000>;
|
||||
};
|
||||
};
|
||||
|
||||
clocks {
|
||||
refclk: ref {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <25000000>;
|
||||
};
|
||||
|
||||
uart_clk: uart_clk {
|
||||
#clock-cells = <0>;
|
||||
compatible = "fixed-clock";
|
||||
@@ -96,6 +104,7 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges = <0 0 0 0xffffffff>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
serial0: serial@54006800 {
|
||||
compatible = "socionext,uniphier-uart";
|
||||
@@ -219,6 +228,8 @@
|
||||
reg = <0x58c00000 0x400>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_system_bus>;
|
||||
};
|
||||
|
||||
smpctrl@59800000 {
|
||||
@@ -243,9 +254,20 @@
|
||||
bus-width = <4>;
|
||||
};
|
||||
|
||||
pinctrl: pinctrl@5f801000 {
|
||||
compatible = "socionext,ph1-ld20-pinctrl", "syscon";
|
||||
reg = <0x5f801000 0xe00>;
|
||||
soc-glue@5f800000 {
|
||||
compatible = "simple-mfd", "syscon";
|
||||
reg = <0x5f800000 0x2000>;
|
||||
u-boot,dm-pre-reloc;
|
||||
|
||||
pinctrl: pinctrl {
|
||||
compatible = "socionext,uniphier-ld20-pinctrl";
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
aidet@5fc20000 {
|
||||
compatible = "simple-mfd", "syscon";
|
||||
reg = <0x5fc20000 0x200>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@5fe00000 {
|
||||
|
||||
@@ -69,20 +69,10 @@
|
||||
};
|
||||
|
||||
/* for U-Boot only */
|
||||
/ {
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -274,6 +274,11 @@
|
||||
pinctrl-0 = <&pinctrl_usb2>;
|
||||
clocks = <&mio 5>, <&mio 6>;
|
||||
};
|
||||
|
||||
aidet@61830000 {
|
||||
compatible = "simple-mfd", "syscon";
|
||||
reg = <0x61830000 0x200>;
|
||||
};
|
||||
};
|
||||
|
||||
&refclk {
|
||||
@@ -310,7 +315,7 @@
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
compatible = "socionext,ph1-ld4-pinctrl", "syscon";
|
||||
compatible = "socionext,uniphier-ld4-pinctrl";
|
||||
};
|
||||
|
||||
&sysctrl {
|
||||
|
||||
@@ -71,20 +71,10 @@
|
||||
};
|
||||
|
||||
/* for U-Boot only */
|
||||
/ {
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
compatible = "socionext,ph1-ld6b";
|
||||
};
|
||||
|
||||
/* UART3 unavilable: the pads are not wired to the package balls */
|
||||
/* UART3 unavailable: the pads are not wired to the package balls */
|
||||
&serial3 {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -27,5 +27,5 @@
|
||||
* which makes the pinctrl driver unshareable.
|
||||
*/
|
||||
&pinctrl {
|
||||
compatible = "socionext,ph1-ld6b-pinctrl", "syscon";
|
||||
compatible = "socionext,uniphier-ld6b-pinctrl";
|
||||
};
|
||||
|
||||
@@ -90,20 +90,10 @@
|
||||
};
|
||||
|
||||
/* for U-Boot only */
|
||||
/ {
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -80,20 +80,10 @@
|
||||
};
|
||||
|
||||
/* for U-Boot only */
|
||||
/ {
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -85,12 +85,6 @@
|
||||
};
|
||||
|
||||
/* for U-Boot only */
|
||||
/ {
|
||||
soc {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
@@ -103,10 +97,6 @@
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
&pinctrl_uart0 {
|
||||
u-boot,dm-pre-reloc;
|
||||
};
|
||||
|
||||
@@ -400,6 +400,11 @@
|
||||
clocks = <&mio 4>, <&mio 6>;
|
||||
};
|
||||
|
||||
aidet@5fc20000 {
|
||||
compatible = "simple-mfd", "syscon";
|
||||
reg = <0x5fc20000 0x200>;
|
||||
};
|
||||
|
||||
usb0: usb@65a00000 {
|
||||
compatible = "socionext,uniphier-xhci", "generic-xhci";
|
||||
status = "disabled";
|
||||
@@ -452,7 +457,7 @@
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
compatible = "socionext,ph1-pro4-pinctrl", "syscon";
|
||||
compatible = "socionext,uniphier-pro4-pinctrl";
|
||||
};
|
||||
|
||||
&sysctrl {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user