diff options
author | 2025-03-08 22:04:20 +0800 | |
---|---|---|
committer | 2025-03-08 22:04:20 +0800 | |
commit | a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a (patch) | |
tree | 84f21bd0bf7071bc5fc7dd989e77d7ceb5476682 /arch/mips/boot | |
download | ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.tar.gz ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.zip |
Initial commit: OpenHarmony-v4.0-ReleaseOpenHarmony-v4.0-Release
Diffstat (limited to 'arch/mips/boot')
140 files changed, 20661 insertions, 0 deletions
diff --git a/arch/mips/boot/.gitignore b/arch/mips/boot/.gitignore new file mode 100644 index 000000000..2adc8581a --- /dev/null +++ b/arch/mips/boot/.gitignore | |||
@@ -0,0 +1,8 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | mkboot | ||
3 | elf2ecoff | ||
4 | vmlinux.* | ||
5 | zImage | ||
6 | zImage.tmp | ||
7 | calc_vmlinuz_load_addr | ||
8 | uImage | ||
diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile new file mode 100644 index 000000000..a3da2c5d6 --- /dev/null +++ b/arch/mips/boot/Makefile | |||
@@ -0,0 +1,173 @@ | |||
1 | # | ||
2 | # This file is subject to the terms and conditions of the GNU General Public | ||
3 | # License. See the file "COPYING" in the main directory of this archive | ||
4 | # for more details. | ||
5 | # | ||
6 | # Copyright (C) 1995, 1998, 2001, 2002 by Ralf Baechle | ||
7 | # Copyright (C) 2004 Maciej W. Rozycki | ||
8 | # | ||
9 | |||
10 | # | ||
11 | # Some DECstations need all possible sections of an ECOFF executable | ||
12 | # | ||
13 | ifdef CONFIG_MACH_DECSTATION | ||
14 | e2eflag := -a | ||
15 | endif | ||
16 | |||
17 | # | ||
18 | # Drop some uninteresting sections in the kernel. | ||
19 | # This is only relevant for ELF kernels but doesn't hurt a.out | ||
20 | # | ||
21 | drop-sections := .reginfo .mdebug .comment .note .pdr .options .MIPS.options | ||
22 | strip-flags := $(addprefix --remove-section=,$(drop-sections)) | ||
23 | |||
24 | hostprogs := elf2ecoff | ||
25 | |||
26 | suffix-y := bin | ||
27 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | ||
28 | suffix-$(CONFIG_KERNEL_GZIP) := gz | ||
29 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | ||
30 | suffix-$(CONFIG_KERNEL_LZO) := lzo | ||
31 | |||
32 | targets := vmlinux.ecoff | ||
33 | quiet_cmd_ecoff = ECOFF $@ | ||
34 | cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $@ $(e2eflag) | ||
35 | $(obj)/vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX) FORCE | ||
36 | $(call if_changed,ecoff) | ||
37 | |||
38 | targets += vmlinux.bin | ||
39 | quiet_cmd_bin = OBJCOPY $@ | ||
40 | cmd_bin = $(OBJCOPY) -O binary $(strip-flags) $(VMLINUX) $@ | ||
41 | $(obj)/vmlinux.bin: $(VMLINUX) FORCE | ||
42 | $(call if_changed,bin) | ||
43 | |||
44 | targets += vmlinux.srec | ||
45 | quiet_cmd_srec = OBJCOPY $@ | ||
46 | cmd_srec = $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $@ | ||
47 | $(obj)/vmlinux.srec: $(VMLINUX) FORCE | ||
48 | $(call if_changed,srec) | ||
49 | |||
50 | UIMAGE_LOADADDR = $(VMLINUX_LOAD_ADDRESS) | ||
51 | UIMAGE_ENTRYADDR = $(VMLINUX_ENTRY_ADDRESS) | ||
52 | |||
53 | # | ||
54 | # Compressed vmlinux images | ||
55 | # | ||
56 | |||
57 | extra-y += vmlinux.bin.bz2 | ||
58 | extra-y += vmlinux.bin.gz | ||
59 | extra-y += vmlinux.bin.lzma | ||
60 | extra-y += vmlinux.bin.lzo | ||
61 | |||
62 | $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE | ||
63 | $(call if_changed,bzip2) | ||
64 | |||
65 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | ||
66 | $(call if_changed,gzip) | ||
67 | |||
68 | $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE | ||
69 | $(call if_changed,lzma) | ||
70 | |||
71 | $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE | ||
72 | $(call if_changed,lzo) | ||
73 | |||
74 | # | ||
75 | # Compressed u-boot images | ||
76 | # | ||
77 | |||
78 | targets += uImage | ||
79 | targets += uImage.bin | ||
80 | targets += uImage.bz2 | ||
81 | targets += uImage.gz | ||
82 | targets += uImage.lzma | ||
83 | targets += uImage.lzo | ||
84 | |||
85 | $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE | ||
86 | $(call if_changed,uimage,none) | ||
87 | |||
88 | $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORCE | ||
89 | $(call if_changed,uimage,bzip2) | ||
90 | |||
91 | $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE | ||
92 | $(call if_changed,uimage,gzip) | ||
93 | |||
94 | $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE | ||
95 | $(call if_changed,uimage,lzma) | ||
96 | |||
97 | $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo FORCE | ||
98 | $(call if_changed,uimage,lzo) | ||
99 | |||
100 | $(obj)/uImage: $(obj)/uImage.$(suffix-y) | ||
101 | @ln -sf $(notdir $<) $@ | ||
102 | @echo ' Image $@ is ready' | ||
103 | |||
104 | # | ||
105 | # Flattened Image Tree (.itb) images | ||
106 | # | ||
107 | |||
108 | ifeq ($(ADDR_BITS),32) | ||
109 | itb_addr_cells = 1 | ||
110 | endif | ||
111 | ifeq ($(ADDR_BITS),64) | ||
112 | itb_addr_cells = 2 | ||
113 | endif | ||
114 | |||
115 | targets += vmlinux.its.S | ||
116 | |||
117 | quiet_cmd_its_cat = CAT $@ | ||
118 | cmd_its_cat = cat $(real-prereqs) >$@ | ||
119 | |||
120 | $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE | ||
121 | $(call if_changed,its_cat) | ||
122 | |||
123 | targets += vmlinux.its | ||
124 | targets += vmlinux.gz.its | ||
125 | targets += vmlinux.bz2.its | ||
126 | targets += vmlinux.lzma.its | ||
127 | targets += vmlinux.lzo.its | ||
128 | |||
129 | quiet_cmd_cpp_its_S = ITS $@ | ||
130 | cmd_cpp_its_S = $(CPP) -P -C -o $@ $< \ | ||
131 | -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \ | ||
132 | -DVMLINUX_BINARY="\"$(3)\"" \ | ||
133 | -DVMLINUX_COMPRESSION="\"$(2)\"" \ | ||
134 | -DVMLINUX_LOAD_ADDRESS=$(VMLINUX_LOAD_ADDRESS) \ | ||
135 | -DVMLINUX_ENTRY_ADDRESS=$(VMLINUX_ENTRY_ADDRESS) \ | ||
136 | -DADDR_BITS=$(ADDR_BITS) \ | ||
137 | -DADDR_CELLS=$(itb_addr_cells) | ||
138 | |||
139 | $(obj)/vmlinux.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE | ||
140 | $(call if_changed,cpp_its_S,none,vmlinux.bin) | ||
141 | |||
142 | $(obj)/vmlinux.gz.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE | ||
143 | $(call if_changed,cpp_its_S,gzip,vmlinux.bin.gz) | ||
144 | |||
145 | $(obj)/vmlinux.bz2.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE | ||
146 | $(call if_changed,cpp_its_S,bzip2,vmlinux.bin.bz2) | ||
147 | |||
148 | $(obj)/vmlinux.lzma.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE | ||
149 | $(call if_changed,cpp_its_S,lzma,vmlinux.bin.lzma) | ||
150 | |||
151 | $(obj)/vmlinux.lzo.its: $(obj)/vmlinux.its.S $(VMLINUX) FORCE | ||
152 | $(call if_changed,cpp_its_S,lzo,vmlinux.bin.lzo) | ||
153 | |||
154 | targets += vmlinux.itb | ||
155 | targets += vmlinux.gz.itb | ||
156 | targets += vmlinux.bz2.itb | ||
157 | targets += vmlinux.lzma.itb | ||
158 | targets += vmlinux.lzo.itb | ||
159 | |||
160 | quiet_cmd_itb-image = ITB $@ | ||
161 | cmd_itb-image = \ | ||
162 | env PATH="$(objtree)/scripts/dtc:$(PATH)" \ | ||
163 | $(BASH) $(MKIMAGE) \ | ||
164 | -D "-I dts -O dtb -p 500 \ | ||
165 | --include $(objtree)/arch/mips \ | ||
166 | --warning no-unit_address_vs_reg" \ | ||
167 | -f $(2) $@ | ||
168 | |||
169 | $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE | ||
170 | $(call if_changed,itb-image,$<) | ||
171 | |||
172 | $(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE | ||
173 | $(call if_changed,itb-image,$<) | ||
diff --git a/arch/mips/boot/compressed/.gitignore b/arch/mips/boot/compressed/.gitignore new file mode 100644 index 000000000..d35839561 --- /dev/null +++ b/arch/mips/boot/compressed/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | ashldi3.c | ||
3 | bswapsi.c | ||
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile new file mode 100644 index 000000000..eae0fad30 --- /dev/null +++ b/arch/mips/boot/compressed/Makefile | |||
@@ -0,0 +1,155 @@ | |||
1 | # | ||
2 | # This file is subject to the terms and conditions of the GNU General Public | ||
3 | # License. | ||
4 | # | ||
5 | # Adapted for MIPS Pete Popov, Dan Malek | ||
6 | # | ||
7 | # Copyright (C) 1994 by Linus Torvalds | ||
8 | # Adapted for PowerPC by Gary Thomas | ||
9 | # modified by Cort (cort@cs.nmt.edu) | ||
10 | # | ||
11 | # Copyright (C) 2009 Lemote Inc. & DSLab, Lanzhou University | ||
12 | # Author: Wu Zhangjin <wuzhangjin@gmail.com> | ||
13 | # | ||
14 | |||
15 | include $(srctree)/arch/mips/Kbuild.platforms | ||
16 | |||
17 | # set the default size of the mallocing area for decompressing | ||
18 | BOOT_HEAP_SIZE := 0x400000 | ||
19 | |||
20 | # Disable Function Tracer | ||
21 | KBUILD_CFLAGS := $(filter-out -pg, $(KBUILD_CFLAGS)) | ||
22 | |||
23 | KBUILD_CFLAGS := $(filter-out -fstack-protector, $(KBUILD_CFLAGS)) | ||
24 | |||
25 | # Disable lq/sq in zboot | ||
26 | ifdef CONFIG_CPU_LOONGSON64 | ||
27 | KBUILD_CFLAGS := $(filter-out -march=loongson3a, $(KBUILD_CFLAGS)) -march=mips64r2 | ||
28 | endif | ||
29 | |||
30 | KBUILD_CFLAGS := $(KBUILD_CFLAGS) -D__KERNEL__ -D__DISABLE_EXPORTS \ | ||
31 | -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) -D"VMLINUX_LOAD_ADDRESS_ULL=$(VMLINUX_LOAD_ADDRESS)ull" | ||
32 | |||
33 | KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ | ||
34 | -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ | ||
35 | -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) | ||
36 | |||
37 | # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. | ||
38 | KCOV_INSTRUMENT := n | ||
39 | UBSAN_SANITIZE := n | ||
40 | |||
41 | # decompressor objects (linked with vmlinuz) | ||
42 | vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o | ||
43 | |||
44 | ifdef CONFIG_DEBUG_ZBOOT | ||
45 | vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o | ||
46 | vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o | ||
47 | vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o | ||
48 | vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o | ||
49 | vmlinuzobjs-$(CONFIG_ATH79) += $(obj)/uart-ath79.o | ||
50 | endif | ||
51 | |||
52 | extra-y += uart-ath79.c | ||
53 | $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c | ||
54 | $(call cmd,shipped) | ||
55 | |||
56 | vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o | ||
57 | |||
58 | extra-y += ashldi3.c | ||
59 | $(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE | ||
60 | $(call if_changed,shipped) | ||
61 | |||
62 | extra-y += bswapsi.c | ||
63 | $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE | ||
64 | $(call if_changed,shipped) | ||
65 | |||
66 | targets := $(notdir $(vmlinuzobjs-y)) | ||
67 | |||
68 | targets += vmlinux.bin | ||
69 | OBJCOPYFLAGS_vmlinux.bin := $(OBJCOPYFLAGS) -O binary -R .comment -S | ||
70 | $(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE | ||
71 | $(call if_changed,objcopy) | ||
72 | |||
73 | tool_$(CONFIG_KERNEL_GZIP) = gzip | ||
74 | tool_$(CONFIG_KERNEL_BZIP2) = bzip2 | ||
75 | tool_$(CONFIG_KERNEL_LZ4) = lz4 | ||
76 | tool_$(CONFIG_KERNEL_LZMA) = lzma | ||
77 | tool_$(CONFIG_KERNEL_LZO) = lzo | ||
78 | tool_$(CONFIG_KERNEL_XZ) = xzkern | ||
79 | tool_$(CONFIG_KERNEL_ZSTD) = zstd22 | ||
80 | |||
81 | targets += vmlinux.bin.z | ||
82 | $(obj)/vmlinux.bin.z: $(obj)/vmlinux.bin FORCE | ||
83 | $(call if_changed,$(tool_y)) | ||
84 | |||
85 | targets += piggy.o dummy.o | ||
86 | OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \ | ||
87 | --set-section-flags=.image=contents,alloc,load,readonly,data | ||
88 | $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE | ||
89 | $(call if_changed,objcopy) | ||
90 | |||
91 | HOSTCFLAGS_calc_vmlinuz_load_addr.o += $(LINUXINCLUDE) | ||
92 | |||
93 | # Calculate the load address of the compressed kernel image | ||
94 | hostprogs := calc_vmlinuz_load_addr | ||
95 | |||
96 | ifneq ($(zload-y),) | ||
97 | VMLINUZ_LOAD_ADDRESS := $(zload-y) | ||
98 | else | ||
99 | VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ | ||
100 | $(obj)/vmlinux.bin $(LINKER_LOAD_ADDRESS)) | ||
101 | endif | ||
102 | UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS) | ||
103 | |||
104 | vmlinuzobjs-y += $(obj)/piggy.o | ||
105 | |||
106 | quiet_cmd_zld = LD $@ | ||
107 | cmd_zld = $(LD) $(KBUILD_LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ | ||
108 | quiet_cmd_strip = STRIP $@ | ||
109 | cmd_strip = $(STRIP) -s $@ | ||
110 | vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr | ||
111 | $(call cmd,zld) | ||
112 | $(call cmd,strip) | ||
113 | |||
114 | # | ||
115 | # Some DECstations need all possible sections of an ECOFF executable | ||
116 | # | ||
117 | ifdef CONFIG_MACH_DECSTATION | ||
118 | e2eflag := -a | ||
119 | endif | ||
120 | |||
121 | # elf2ecoff can only handle 32bit image | ||
122 | hostprogs += ../elf2ecoff | ||
123 | |||
124 | ifdef CONFIG_32BIT | ||
125 | VMLINUZ = vmlinuz | ||
126 | else | ||
127 | VMLINUZ = vmlinuz.32 | ||
128 | endif | ||
129 | |||
130 | quiet_cmd_32 = OBJCOPY $@ | ||
131 | cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@ | ||
132 | vmlinuz.32: vmlinuz | ||
133 | $(call cmd,32) | ||
134 | |||
135 | quiet_cmd_ecoff = ECOFF $@ | ||
136 | cmd_ecoff = $< $(VMLINUZ) $@ $(e2eflag) | ||
137 | vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ) | ||
138 | $(call cmd,ecoff) | ||
139 | |||
140 | OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary | ||
141 | vmlinuz.bin: vmlinuz | ||
142 | $(call cmd,objcopy) | ||
143 | |||
144 | OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec | ||
145 | vmlinuz.srec: vmlinuz | ||
146 | $(call cmd,objcopy) | ||
147 | |||
148 | uzImage.bin: vmlinuz.bin FORCE | ||
149 | $(call if_changed,uimage,none) | ||
150 | |||
151 | clean-files += $(objtree)/vmlinuz | ||
152 | clean-files += $(objtree)/vmlinuz.32 | ||
153 | clean-files += $(objtree)/vmlinuz.ecoff | ||
154 | clean-files += $(objtree)/vmlinuz.bin | ||
155 | clean-files += $(objtree)/vmlinuz.srec | ||
diff --git a/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c b/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c new file mode 100644 index 000000000..080b926d2 --- /dev/null +++ b/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c | |||
@@ -0,0 +1,54 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
2 | /* | ||
3 | * Copyright (C) 2010 "Wu Zhangjin" <wuzhangjin@gmail.com> | ||
4 | */ | ||
5 | |||
6 | #include <sys/types.h> | ||
7 | #include <sys/stat.h> | ||
8 | #include <errno.h> | ||
9 | #include <stdint.h> | ||
10 | #include <stdio.h> | ||
11 | #include <stdlib.h> | ||
12 | #include <linux/sizes.h> | ||
13 | |||
14 | int main(int argc, char *argv[]) | ||
15 | { | ||
16 | unsigned long long vmlinux_size, vmlinux_load_addr, vmlinuz_load_addr; | ||
17 | struct stat sb; | ||
18 | |||
19 | if (argc != 3) { | ||
20 | fprintf(stderr, "Usage: %s <pathname> <vmlinux_load_addr>\n", | ||
21 | argv[0]); | ||
22 | return EXIT_FAILURE; | ||
23 | } | ||
24 | |||
25 | if (stat(argv[1], &sb) == -1) { | ||
26 | perror("stat"); | ||
27 | return EXIT_FAILURE; | ||
28 | } | ||
29 | |||
30 | /* Convert hex characters to dec number */ | ||
31 | errno = 0; | ||
32 | if (sscanf(argv[2], "%llx", &vmlinux_load_addr) != 1) { | ||
33 | if (errno != 0) | ||
34 | perror("sscanf"); | ||
35 | else | ||
36 | fprintf(stderr, "No matching characters\n"); | ||
37 | |||
38 | return EXIT_FAILURE; | ||
39 | } | ||
40 | |||
41 | vmlinux_size = (uint64_t)sb.st_size; | ||
42 | vmlinuz_load_addr = vmlinux_load_addr + vmlinux_size; | ||
43 | |||
44 | /* | ||
45 | * Align with 64KB: KEXEC needs load sections to be aligned to PAGE_SIZE, | ||
46 | * which may be as large as 64KB depending on the kernel configuration. | ||
47 | */ | ||
48 | |||
49 | vmlinuz_load_addr += (SZ_64K - vmlinux_size % SZ_64K); | ||
50 | |||
51 | printf("0x%llx\n", vmlinuz_load_addr); | ||
52 | |||
53 | return EXIT_SUCCESS; | ||
54 | } | ||
diff --git a/arch/mips/boot/compressed/dbg.c b/arch/mips/boot/compressed/dbg.c new file mode 100644 index 000000000..f6728a8fd --- /dev/null +++ b/arch/mips/boot/compressed/dbg.c | |||
@@ -0,0 +1,37 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * MIPS-specific debug support for pre-boot environment | ||
4 | * | ||
5 | * NOTE: putc() is board specific, if your board have a 16550 compatible uart, | ||
6 | * please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you | ||
7 | * need to implement your own putc(). | ||
8 | */ | ||
9 | #include <linux/compiler.h> | ||
10 | #include <linux/types.h> | ||
11 | |||
12 | void __weak putc(char c) | ||
13 | { | ||
14 | } | ||
15 | |||
16 | void puts(const char *s) | ||
17 | { | ||
18 | char c; | ||
19 | while ((c = *s++) != '\0') { | ||
20 | putc(c); | ||
21 | if (c == '\n') | ||
22 | putc('\r'); | ||
23 | } | ||
24 | } | ||
25 | |||
26 | void puthex(unsigned long long val) | ||
27 | { | ||
28 | |||
29 | unsigned char buf[10]; | ||
30 | int i; | ||
31 | for (i = 7; i >= 0; i--) { | ||
32 | buf[i] = "0123456789ABCDEF"[val & 0x0F]; | ||
33 | val >>= 4; | ||
34 | } | ||
35 | buf[8] = '\0'; | ||
36 | puts(buf); | ||
37 | } | ||
diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c new file mode 100644 index 000000000..1e91155be --- /dev/null +++ b/arch/mips/boot/compressed/decompress.c | |||
@@ -0,0 +1,132 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
2 | /* | ||
3 | * Copyright 2001 MontaVista Software Inc. | ||
4 | * Author: Matt Porter <mporter@mvista.com> | ||
5 | * | ||
6 | * Copyright (C) 2009 Lemote, Inc. | ||
7 | * Author: Wu Zhangjin <wuzhangjin@gmail.com> | ||
8 | */ | ||
9 | |||
10 | #define DISABLE_BRANCH_PROFILING | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/string.h> | ||
15 | #include <linux/libfdt.h> | ||
16 | |||
17 | #include <asm/addrspace.h> | ||
18 | #include <asm/unaligned.h> | ||
19 | |||
20 | /* | ||
21 | * These two variables specify the free mem region | ||
22 | * that can be used for temporary malloc area | ||
23 | */ | ||
24 | unsigned long free_mem_ptr; | ||
25 | unsigned long free_mem_end_ptr; | ||
26 | |||
27 | /* The linker tells us where the image is. */ | ||
28 | extern unsigned char __image_begin, __image_end; | ||
29 | |||
30 | /* debug interfaces */ | ||
31 | #ifdef CONFIG_DEBUG_ZBOOT | ||
32 | extern void puts(const char *s); | ||
33 | extern void puthex(unsigned long long val); | ||
34 | #else | ||
35 | #define puts(s) do {} while (0) | ||
36 | #define puthex(val) do {} while (0) | ||
37 | #endif | ||
38 | |||
39 | extern char __appended_dtb[]; | ||
40 | |||
41 | void error(char *x) | ||
42 | { | ||
43 | puts("\n\n"); | ||
44 | puts(x); | ||
45 | puts("\n\n -- System halted"); | ||
46 | |||
47 | while (1) | ||
48 | ; /* Halt */ | ||
49 | } | ||
50 | |||
51 | /* activate the code for pre-boot environment */ | ||
52 | #define STATIC static | ||
53 | |||
54 | #ifdef CONFIG_KERNEL_GZIP | ||
55 | #include "../../../../lib/decompress_inflate.c" | ||
56 | #endif | ||
57 | |||
58 | #ifdef CONFIG_KERNEL_BZIP2 | ||
59 | #include "../../../../lib/decompress_bunzip2.c" | ||
60 | #endif | ||
61 | |||
62 | #ifdef CONFIG_KERNEL_LZ4 | ||
63 | #include "../../../../lib/decompress_unlz4.c" | ||
64 | #endif | ||
65 | |||
66 | #ifdef CONFIG_KERNEL_LZMA | ||
67 | #include "../../../../lib/decompress_unlzma.c" | ||
68 | #endif | ||
69 | |||
70 | #ifdef CONFIG_KERNEL_LZO | ||
71 | #include "../../../../lib/decompress_unlzo.c" | ||
72 | #endif | ||
73 | |||
74 | #ifdef CONFIG_KERNEL_XZ | ||
75 | #include "../../../../lib/decompress_unxz.c" | ||
76 | #endif | ||
77 | |||
78 | #ifdef CONFIG_KERNEL_ZSTD | ||
79 | #include "../../../../lib/decompress_unzstd.c" | ||
80 | #endif | ||
81 | |||
82 | const unsigned long __stack_chk_guard = 0x000a0dff; | ||
83 | |||
84 | void __stack_chk_fail(void) | ||
85 | { | ||
86 | error("stack-protector: Kernel stack is corrupted\n"); | ||
87 | } | ||
88 | |||
89 | void decompress_kernel(unsigned long boot_heap_start) | ||
90 | { | ||
91 | unsigned long zimage_start, zimage_size; | ||
92 | |||
93 | zimage_start = (unsigned long)(&__image_begin); | ||
94 | zimage_size = (unsigned long)(&__image_end) - | ||
95 | (unsigned long)(&__image_begin); | ||
96 | |||
97 | puts("zimage at: "); | ||
98 | puthex(zimage_start); | ||
99 | puts(" "); | ||
100 | puthex(zimage_size + zimage_start); | ||
101 | puts("\n"); | ||
102 | |||
103 | /* This area are prepared for mallocing when decompressing */ | ||
104 | free_mem_ptr = boot_heap_start; | ||
105 | free_mem_end_ptr = boot_heap_start + BOOT_HEAP_SIZE; | ||
106 | |||
107 | /* Display standard Linux/MIPS boot prompt */ | ||
108 | puts("Uncompressing Linux at load address "); | ||
109 | puthex(VMLINUX_LOAD_ADDRESS_ULL); | ||
110 | puts("\n"); | ||
111 | |||
112 | /* Decompress the kernel with according algorithm */ | ||
113 | __decompress((char *)zimage_start, zimage_size, 0, 0, | ||
114 | (void *)VMLINUX_LOAD_ADDRESS_ULL, 0, 0, error); | ||
115 | |||
116 | if (IS_ENABLED(CONFIG_MIPS_RAW_APPENDED_DTB) && | ||
117 | fdt_magic((void *)&__appended_dtb) == FDT_MAGIC) { | ||
118 | unsigned int image_size, dtb_size; | ||
119 | |||
120 | dtb_size = fdt_totalsize((void *)&__appended_dtb); | ||
121 | |||
122 | /* last four bytes is always image size in little endian */ | ||
123 | image_size = get_unaligned_le32((void *)&__image_end - 4); | ||
124 | |||
125 | /* copy dtb to where the booted kernel will expect it */ | ||
126 | memcpy((void *)VMLINUX_LOAD_ADDRESS_ULL + image_size, | ||
127 | __appended_dtb, dtb_size); | ||
128 | } | ||
129 | |||
130 | /* FIXME: should we flush cache here? */ | ||
131 | puts("Now, booting the kernel...\n"); | ||
132 | } | ||
diff --git a/arch/mips/boot/compressed/dummy.c b/arch/mips/boot/compressed/dummy.c new file mode 100644 index 000000000..31dbf45bf --- /dev/null +++ b/arch/mips/boot/compressed/dummy.c | |||
@@ -0,0 +1,4 @@ | |||
1 | int main(void) | ||
2 | { | ||
3 | return 0; | ||
4 | } | ||
diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S new file mode 100644 index 000000000..409cb483a --- /dev/null +++ b/arch/mips/boot/compressed/head.S | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1994, 1995 Waldorf Electronics | ||
7 | * Written by Ralf Baechle and Andreas Busse | ||
8 | * Copyright (C) 1995 - 1999 Ralf Baechle | ||
9 | * Copyright (C) 1996 Paul M. Antoine | ||
10 | * Modified for DECStation and hence R3000 support by Paul M. Antoine | ||
11 | * Further modifications by David S. Miller and Harald Koerfgen | ||
12 | * Copyright (C) 1999 Silicon Graphics, Inc. | ||
13 | */ | ||
14 | |||
15 | #include <asm/asm.h> | ||
16 | #include <asm/regdef.h> | ||
17 | |||
18 | .set noreorder | ||
19 | .cprestore | ||
20 | LEAF(start) | ||
21 | start: | ||
22 | /* Save boot rom start args */ | ||
23 | move s0, a0 | ||
24 | move s1, a1 | ||
25 | move s2, a2 | ||
26 | move s3, a3 | ||
27 | |||
28 | /* Clear BSS */ | ||
29 | PTR_LA a0, _edata | ||
30 | PTR_LA a2, _end | ||
31 | 1: sw zero, 0(a0) | ||
32 | bne a2, a0, 1b | ||
33 | addiu a0, a0, 4 | ||
34 | |||
35 | PTR_LA a0, (.heap) /* heap address */ | ||
36 | PTR_LA sp, (.stack + 8192) /* stack address */ | ||
37 | |||
38 | PTR_LA ra, 2f | ||
39 | PTR_LA k0, decompress_kernel | ||
40 | jr k0 | ||
41 | nop | ||
42 | 2: | ||
43 | move a0, s0 | ||
44 | move a1, s1 | ||
45 | move a2, s2 | ||
46 | move a3, s3 | ||
47 | PTR_LI k0, KERNEL_ENTRY | ||
48 | jr k0 | ||
49 | nop | ||
50 | 3: | ||
51 | b 3b | ||
52 | nop | ||
53 | END(start) | ||
54 | |||
55 | .comm .heap,BOOT_HEAP_SIZE,4 | ||
56 | .comm .stack,4096*2,4 | ||
diff --git a/arch/mips/boot/compressed/ld.script b/arch/mips/boot/compressed/ld.script new file mode 100644 index 000000000..2ed08fbef --- /dev/null +++ b/arch/mips/boot/compressed/ld.script | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * ld.script for compressed kernel support of MIPS | ||
3 | * | ||
4 | * Copyright (C) 2009 Lemote Inc. | ||
5 | * Author: Wu Zhangjin <wuzhanjing@gmail.com> | ||
6 | * Copyright (C) 2010 "Wu Zhangjin" <wuzhanjing@gmail.com> | ||
7 | */ | ||
8 | |||
9 | OUTPUT_ARCH(mips) | ||
10 | ENTRY(start) | ||
11 | PHDRS { | ||
12 | text PT_LOAD FLAGS(7); /* RWX */ | ||
13 | } | ||
14 | SECTIONS | ||
15 | { | ||
16 | /* Text and read-only data */ | ||
17 | /* . = VMLINUZ_LOAD_ADDRESS; */ | ||
18 | .text : { | ||
19 | *(.text) | ||
20 | *(.rodata) | ||
21 | }: text | ||
22 | /* End of text section */ | ||
23 | |||
24 | /* Writable data */ | ||
25 | .data : { | ||
26 | *(.data) | ||
27 | /* Put the compressed image here */ | ||
28 | __image_begin = .; | ||
29 | *(.image) | ||
30 | __image_end = .; | ||
31 | CONSTRUCTORS | ||
32 | . = ALIGN(16); | ||
33 | } | ||
34 | __appended_dtb = .; | ||
35 | /* leave space for appended DTB */ | ||
36 | . += 0x100000; | ||
37 | |||
38 | _edata = .; | ||
39 | /* End of data section */ | ||
40 | |||
41 | /* BSS */ | ||
42 | .bss : { | ||
43 | *(.bss) | ||
44 | } | ||
45 | . = ALIGN(16); | ||
46 | _end = .; | ||
47 | |||
48 | /* Sections to be discarded */ | ||
49 | /DISCARD/ : { | ||
50 | *(.MIPS.options) | ||
51 | *(.options) | ||
52 | *(.pdr) | ||
53 | *(.reginfo) | ||
54 | *(.comment) | ||
55 | *(.note) | ||
56 | } | ||
57 | } | ||
diff --git a/arch/mips/boot/compressed/string.c b/arch/mips/boot/compressed/string.c new file mode 100644 index 000000000..0b593b709 --- /dev/null +++ b/arch/mips/boot/compressed/string.c | |||
@@ -0,0 +1,46 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * arch/mips/boot/compressed/string.c | ||
4 | * | ||
5 | * Very small subset of simple string routines | ||
6 | */ | ||
7 | |||
8 | #include <linux/compiler_attributes.h> | ||
9 | #include <linux/types.h> | ||
10 | |||
11 | void *memcpy(void *dest, const void *src, size_t n) | ||
12 | { | ||
13 | int i; | ||
14 | const char *s = src; | ||
15 | char *d = dest; | ||
16 | |||
17 | for (i = 0; i < n; i++) | ||
18 | d[i] = s[i]; | ||
19 | return dest; | ||
20 | } | ||
21 | |||
22 | void *memset(void *s, int c, size_t n) | ||
23 | { | ||
24 | int i; | ||
25 | char *ss = s; | ||
26 | |||
27 | for (i = 0; i < n; i++) | ||
28 | ss[i] = c; | ||
29 | return s; | ||
30 | } | ||
31 | |||
32 | void * __weak memmove(void *dest, const void *src, size_t n) | ||
33 | { | ||
34 | unsigned int i; | ||
35 | const char *s = src; | ||
36 | char *d = dest; | ||
37 | |||
38 | if ((uintptr_t)dest < (uintptr_t)src) { | ||
39 | for (i = 0; i < n; i++) | ||
40 | d[i] = s[i]; | ||
41 | } else { | ||
42 | for (i = n; i > 0; i--) | ||
43 | d[i - 1] = s[i - 1]; | ||
44 | } | ||
45 | return dest; | ||
46 | } | ||
diff --git a/arch/mips/boot/compressed/uart-16550.c b/arch/mips/boot/compressed/uart-16550.c new file mode 100644 index 000000000..aee8d7b8f --- /dev/null +++ b/arch/mips/boot/compressed/uart-16550.c | |||
@@ -0,0 +1,64 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * 16550 compatible uart based serial debug support for zboot | ||
4 | */ | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | #include <linux/serial_reg.h> | ||
8 | |||
9 | #include <asm/addrspace.h> | ||
10 | |||
11 | #if defined(CONFIG_MACH_LOONGSON64) || defined(CONFIG_MIPS_MALTA) | ||
12 | #define UART_BASE 0x1fd003f8 | ||
13 | #define PORT(offset) (CKSEG1ADDR(UART_BASE) + (offset)) | ||
14 | #endif | ||
15 | |||
16 | #ifdef CONFIG_AR7 | ||
17 | #include <ar7.h> | ||
18 | #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset)) | ||
19 | #endif | ||
20 | |||
21 | #ifdef CONFIG_MACH_INGENIC | ||
22 | #define INGENIC_UART0_BASE_ADDR 0x10030000 | ||
23 | #define PORT(offset) (CKSEG1ADDR(INGENIC_UART0_BASE_ADDR) + (4 * offset)) | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_CPU_XLR | ||
27 | #define UART0_BASE 0x1EF14000 | ||
28 | #define PORT(offset) (CKSEG1ADDR(UART0_BASE) + (4 * offset)) | ||
29 | #define IOTYPE unsigned int | ||
30 | #endif | ||
31 | |||
32 | #ifdef CONFIG_CPU_XLP | ||
33 | #define UART0_BASE 0x18030100 | ||
34 | #define PORT(offset) (CKSEG1ADDR(UART0_BASE) + (4 * offset)) | ||
35 | #define IOTYPE unsigned int | ||
36 | #endif | ||
37 | |||
38 | #ifndef IOTYPE | ||
39 | #define IOTYPE char | ||
40 | #endif | ||
41 | |||
42 | #ifndef PORT | ||
43 | #error please define the serial port address for your own machine | ||
44 | #endif | ||
45 | |||
46 | static inline unsigned int serial_in(int offset) | ||
47 | { | ||
48 | return *((volatile IOTYPE *)PORT(offset)) & 0xFF; | ||
49 | } | ||
50 | |||
51 | static inline void serial_out(int offset, int value) | ||
52 | { | ||
53 | *((volatile IOTYPE *)PORT(offset)) = value & 0xFF; | ||
54 | } | ||
55 | |||
56 | void putc(char c) | ||
57 | { | ||
58 | int timeout = 1000000; | ||
59 | |||
60 | while (((serial_in(UART_LSR) & UART_LSR_THRE) == 0) && (timeout-- > 0)) | ||
61 | ; | ||
62 | |||
63 | serial_out(UART_TX, c); | ||
64 | } | ||
diff --git a/arch/mips/boot/compressed/uart-alchemy.c b/arch/mips/boot/compressed/uart-alchemy.c new file mode 100644 index 000000000..8ec63011e --- /dev/null +++ b/arch/mips/boot/compressed/uart-alchemy.c | |||
@@ -0,0 +1,7 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <asm/mach-au1x00/au1000.h> | ||
3 | |||
4 | void putc(char c) | ||
5 | { | ||
6 | alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c); | ||
7 | } | ||
diff --git a/arch/mips/boot/compressed/uart-prom.c b/arch/mips/boot/compressed/uart-prom.c new file mode 100644 index 000000000..a8a0a32e0 --- /dev/null +++ b/arch/mips/boot/compressed/uart-prom.c | |||
@@ -0,0 +1,7 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <asm/setup.h> | ||
3 | |||
4 | void putc(char c) | ||
5 | { | ||
6 | prom_putchar(c); | ||
7 | } | ||
diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile new file mode 100644 index 000000000..19027129a --- /dev/null +++ b/arch/mips/boot/dts/Makefile | |||
@@ -0,0 +1,19 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | subdir-$(CONFIG_BMIPS_GENERIC) += brcm | ||
3 | subdir-$(CONFIG_CAVIUM_OCTEON_SOC) += cavium-octeon | ||
4 | subdir-$(CONFIG_MACH_PISTACHIO) += img | ||
5 | subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += img | ||
6 | subdir-$(CONFIG_MACH_INGENIC) += ingenic | ||
7 | subdir-$(CONFIG_LANTIQ) += lantiq | ||
8 | subdir-$(CONFIG_MACH_LOONGSON64) += loongson | ||
9 | subdir-$(CONFIG_MSCC_OCELOT) += mscc | ||
10 | subdir-$(CONFIG_MIPS_MALTA) += mti | ||
11 | subdir-$(CONFIG_LEGACY_BOARD_SEAD3) += mti | ||
12 | subdir-$(CONFIG_NLM_XLP_BOARD) += netlogic | ||
13 | subdir-$(CONFIG_FIT_IMAGE_FDT_NI169445) += ni | ||
14 | subdir-$(CONFIG_MACH_PIC32) += pic32 | ||
15 | subdir-$(CONFIG_ATH79) += qca | ||
16 | subdir-$(CONFIG_RALINK) += ralink | ||
17 | subdir-$(CONFIG_FIT_IMAGE_FDT_XILFPGA) += xilfpga | ||
18 | |||
19 | obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix /, $(subdir-y)) | ||
diff --git a/arch/mips/boot/dts/brcm/Makefile b/arch/mips/boot/dts/brcm/Makefile new file mode 100644 index 000000000..d85f446cc --- /dev/null +++ b/arch/mips/boot/dts/brcm/Makefile | |||
@@ -0,0 +1,37 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_DT_BCM93384WVG) += bcm93384wvg.dtb | ||
3 | dtb-$(CONFIG_DT_BCM93384WVG_VIPER) += bcm93384wvg_viper.dtb | ||
4 | dtb-$(CONFIG_DT_BCM96368MVWG) += bcm96368mvwg.dtb | ||
5 | dtb-$(CONFIG_DT_BCM9EJTAGPRB) += bcm9ejtagprb.dtb | ||
6 | dtb-$(CONFIG_DT_BCM97125CBMB) += bcm97125cbmb.dtb | ||
7 | dtb-$(CONFIG_DT_BCM97346DBSMB) += bcm97346dbsmb.dtb | ||
8 | dtb-$(CONFIG_DT_BCM97358SVMB) += bcm97358svmb.dtb | ||
9 | dtb-$(CONFIG_DT_BCM97360SVMB) += bcm97360svmb.dtb | ||
10 | dtb-$(CONFIG_DT_BCM97362SVMB) += bcm97362svmb.dtb | ||
11 | dtb-$(CONFIG_DT_BCM97420C) += bcm97420c.dtb | ||
12 | dtb-$(CONFIG_DT_BCM97425SVMB) += bcm97425svmb.dtb | ||
13 | dtb-$(CONFIG_DT_BCM97435SVMB) += bcm97435svmb.dtb | ||
14 | dtb-$(CONFIG_DT_COMTREND_VR3032U) += bcm63268-comtrend-vr-3032u.dtb | ||
15 | dtb-$(CONFIG_DT_NETGEAR_CVG834G) += bcm3368-netgear-cvg834g.dtb | ||
16 | dtb-$(CONFIG_DT_SFR_NEUFBOX4_SERCOMM) += bcm6358-neufbox4-sercomm.dtb | ||
17 | dtb-$(CONFIG_DT_SFR_NEUFBOX6_SERCOMM) += bcm6362-neufbox6-sercomm.dtb | ||
18 | |||
19 | dtb-$(CONFIG_DT_NONE) += \ | ||
20 | bcm3368-netgear-cvg834g.dtb \ | ||
21 | bcm6358-neufbox4-sercomm.dtb \ | ||
22 | bcm6362-neufbox6-sercomm.dtb \ | ||
23 | bcm63268-comtrend-vr-3032u.dtb \ | ||
24 | bcm93384wvg.dtb \ | ||
25 | bcm93384wvg_viper.dtb \ | ||
26 | bcm96368mvwg.dtb \ | ||
27 | bcm9ejtagprb.dtb \ | ||
28 | bcm97125cbmb.dtb \ | ||
29 | bcm97346dbsmb.dtb \ | ||
30 | bcm97358svmb.dtb \ | ||
31 | bcm97360svmb.dtb \ | ||
32 | bcm97362svmb.dtb \ | ||
33 | bcm97420c.dtb \ | ||
34 | bcm97425svmb.dtb \ | ||
35 | bcm97435svmb.dtb | ||
36 | |||
37 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/brcm/bcm3368-netgear-cvg834g.dts b/arch/mips/boot/dts/brcm/bcm3368-netgear-cvg834g.dts new file mode 100644 index 000000000..ed6023a91 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm3368-netgear-cvg834g.dts | |||
@@ -0,0 +1,23 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm3368.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "netgear,cvg834g", "brcm,bcm3368"; | ||
8 | model = "NETGEAR CVG834G"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x02000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &uart0 { | ||
22 | status = "okay"; | ||
23 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm3368.dtsi b/arch/mips/boot/dts/brcm/bcm3368.dtsi new file mode 100644 index 000000000..d4b2b430d --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm3368.dtsi | |||
@@ -0,0 +1,110 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm3368"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <150000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4350"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4350"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | clocks { | ||
27 | periph_clk: periph-clk { | ||
28 | compatible = "fixed-clock"; | ||
29 | #clock-cells = <0>; | ||
30 | clock-frequency = <50000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | aliases { | ||
35 | serial0 = &uart0; | ||
36 | serial1 = &uart1; | ||
37 | }; | ||
38 | |||
39 | cpu_intc: interrupt-controller { | ||
40 | #address-cells = <0>; | ||
41 | compatible = "mti,cpu-interrupt-controller"; | ||
42 | |||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <1>; | ||
45 | }; | ||
46 | |||
47 | ubus { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | |||
51 | compatible = "simple-bus"; | ||
52 | ranges; | ||
53 | |||
54 | clkctl: clock-controller@fff8c004 { | ||
55 | compatible = "brcm,bcm3368-clocks"; | ||
56 | reg = <0xfff8c004 0x4>; | ||
57 | #clock-cells = <1>; | ||
58 | }; | ||
59 | |||
60 | periph_cntl: syscon@fff8c008 { | ||
61 | compatible = "syscon"; | ||
62 | reg = <0xfff8c008 0x4>; | ||
63 | native-endian; | ||
64 | }; | ||
65 | |||
66 | reboot: syscon-reboot@fff8c008 { | ||
67 | compatible = "syscon-reboot"; | ||
68 | regmap = <&periph_cntl>; | ||
69 | offset = <0x0>; | ||
70 | mask = <0x1>; | ||
71 | }; | ||
72 | |||
73 | periph_intc: interrupt-controller@fff8c00c { | ||
74 | compatible = "brcm,bcm6345-l1-intc"; | ||
75 | reg = <0xfff8c00c 0x8>; | ||
76 | |||
77 | interrupt-controller; | ||
78 | #interrupt-cells = <1>; | ||
79 | |||
80 | interrupt-parent = <&cpu_intc>; | ||
81 | interrupts = <2>; | ||
82 | }; | ||
83 | |||
84 | uart0: serial@fff8c100 { | ||
85 | compatible = "brcm,bcm6345-uart"; | ||
86 | reg = <0xfff8c100 0x18>; | ||
87 | |||
88 | interrupt-parent = <&periph_intc>; | ||
89 | interrupts = <2>; | ||
90 | |||
91 | clocks = <&periph_clk>; | ||
92 | clock-names = "refclk"; | ||
93 | |||
94 | status = "disabled"; | ||
95 | }; | ||
96 | |||
97 | uart1: serial@fff8c120 { | ||
98 | compatible = "brcm,bcm6345-uart"; | ||
99 | reg = <0xfff8c120 0x18>; | ||
100 | |||
101 | interrupt-parent = <&periph_intc>; | ||
102 | interrupts = <3>; | ||
103 | |||
104 | clocks = <&periph_clk>; | ||
105 | clock-names = "refclk"; | ||
106 | |||
107 | status = "disabled"; | ||
108 | }; | ||
109 | }; | ||
110 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm3384_viper.dtsi b/arch/mips/boot/dts/brcm/bcm3384_viper.dtsi new file mode 100644 index 000000000..eb2a9c6ed --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm3384_viper.dtsi | |||
@@ -0,0 +1,109 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm3384-viper", "brcm,bcm33843-viper"; | ||
6 | |||
7 | memory@0 { | ||
8 | device_type = "memory"; | ||
9 | |||
10 | /* Typical ranges. The bootloader should fill these in. */ | ||
11 | reg = <0x06000000 0x02000000>, | ||
12 | <0x0e000000 0x02000000>; | ||
13 | }; | ||
14 | |||
15 | cpus { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <0>; | ||
18 | |||
19 | /* 1/2 of the CPU core clock (standard MIPS behavior) */ | ||
20 | mips-hpt-frequency = <300000000>; | ||
21 | |||
22 | cpu@0 { | ||
23 | compatible = "brcm,bmips4350"; | ||
24 | device_type = "cpu"; | ||
25 | reg = <0>; | ||
26 | }; | ||
27 | }; | ||
28 | |||
29 | cpu_intc: cpu_intc { | ||
30 | #address-cells = <0>; | ||
31 | compatible = "mti,cpu-interrupt-controller"; | ||
32 | |||
33 | interrupt-controller; | ||
34 | #interrupt-cells = <1>; | ||
35 | }; | ||
36 | |||
37 | clocks { | ||
38 | periph_clk: periph_clk { | ||
39 | compatible = "fixed-clock"; | ||
40 | #clock-cells = <0>; | ||
41 | clock-frequency = <54000000>; | ||
42 | }; | ||
43 | }; | ||
44 | |||
45 | aliases { | ||
46 | uart0 = &uart0; | ||
47 | }; | ||
48 | |||
49 | ubus { | ||
50 | #address-cells = <1>; | ||
51 | #size-cells = <1>; | ||
52 | |||
53 | compatible = "brcm,ubus", "simple-bus"; | ||
54 | ranges; | ||
55 | /* No dma-ranges on Viper. */ | ||
56 | |||
57 | periph_intc: periph_intc@14e00048 { | ||
58 | compatible = "brcm,bcm3380-l2-intc"; | ||
59 | reg = <0x14e00048 0x4 0x14e0004c 0x4>, | ||
60 | <0x14e00350 0x4 0x14e00354 0x4>; | ||
61 | |||
62 | interrupt-controller; | ||
63 | #interrupt-cells = <1>; | ||
64 | |||
65 | interrupt-parent = <&cpu_intc>; | ||
66 | interrupts = <4>; | ||
67 | }; | ||
68 | |||
69 | cmips_intc: cmips_intc@151f8048 { | ||
70 | compatible = "brcm,bcm3380-l2-intc"; | ||
71 | reg = <0x151f8048 0x4 0x151f804c 0x4>; | ||
72 | |||
73 | interrupt-controller; | ||
74 | #interrupt-cells = <1>; | ||
75 | |||
76 | interrupt-parent = <&periph_intc>; | ||
77 | interrupts = <30>; | ||
78 | brcm,int-map-mask = <0xffffffff>; | ||
79 | }; | ||
80 | |||
81 | uart0: serial@14e00520 { | ||
82 | compatible = "brcm,bcm6345-uart"; | ||
83 | reg = <0x14e00520 0x18>; | ||
84 | interrupt-parent = <&periph_intc>; | ||
85 | interrupts = <2>; | ||
86 | clocks = <&periph_clk>; | ||
87 | status = "disabled"; | ||
88 | }; | ||
89 | |||
90 | ehci0: usb@15400300 { | ||
91 | compatible = "brcm,bcm3384-ehci", "generic-ehci"; | ||
92 | reg = <0x15400300 0x100>; | ||
93 | big-endian; | ||
94 | interrupt-parent = <&periph_intc>; | ||
95 | interrupts = <41>; | ||
96 | status = "disabled"; | ||
97 | }; | ||
98 | |||
99 | ohci0: usb@15400400 { | ||
100 | compatible = "brcm,bcm3384-ohci", "generic-ohci"; | ||
101 | reg = <0x15400400 0x100>; | ||
102 | big-endian; | ||
103 | no-big-frame-no; | ||
104 | interrupt-parent = <&periph_intc>; | ||
105 | interrupts = <40>; | ||
106 | status = "disabled"; | ||
107 | }; | ||
108 | }; | ||
109 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm3384_zephyr.dtsi b/arch/mips/boot/dts/brcm/bcm3384_zephyr.dtsi new file mode 100644 index 000000000..d7ad769a4 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm3384_zephyr.dtsi | |||
@@ -0,0 +1,127 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm3384", "brcm,bcm33843"; | ||
6 | |||
7 | memory@0 { | ||
8 | device_type = "memory"; | ||
9 | |||
10 | /* Typical range. The bootloader should fill this in. */ | ||
11 | reg = <0x0 0x08000000>; | ||
12 | }; | ||
13 | |||
14 | cpus { | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <0>; | ||
17 | |||
18 | /* On BMIPS5000 this is 1/8th of the CPU core clock */ | ||
19 | mips-hpt-frequency = <100000000>; | ||
20 | |||
21 | cpu@0 { | ||
22 | compatible = "brcm,bmips5000"; | ||
23 | device_type = "cpu"; | ||
24 | reg = <0>; | ||
25 | }; | ||
26 | |||
27 | cpu@1 { | ||
28 | compatible = "brcm,bmips5000"; | ||
29 | device_type = "cpu"; | ||
30 | reg = <1>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | cpu_intc: cpu_intc { | ||
35 | #address-cells = <0>; | ||
36 | compatible = "mti,cpu-interrupt-controller"; | ||
37 | |||
38 | interrupt-controller; | ||
39 | #interrupt-cells = <1>; | ||
40 | }; | ||
41 | |||
42 | clocks { | ||
43 | periph_clk: periph_clk { | ||
44 | compatible = "fixed-clock"; | ||
45 | #clock-cells = <0>; | ||
46 | clock-frequency = <54000000>; | ||
47 | }; | ||
48 | }; | ||
49 | |||
50 | aliases { | ||
51 | uart0 = &uart0; | ||
52 | }; | ||
53 | |||
54 | ubus { | ||
55 | #address-cells = <1>; | ||
56 | #size-cells = <1>; | ||
57 | |||
58 | compatible = "brcm,ubus", "simple-bus"; | ||
59 | ranges; | ||
60 | dma-ranges = <0x00000000 0x08000000 0x08000000>, | ||
61 | <0x08000000 0x00000000 0x08000000>; | ||
62 | |||
63 | periph_intc: periph_intc@14e00038 { | ||
64 | compatible = "brcm,bcm3380-l2-intc"; | ||
65 | reg = <0x14e00038 0x4 0x14e0003c 0x4>, | ||
66 | <0x14e00340 0x4 0x14e00344 0x4>; | ||
67 | |||
68 | interrupt-controller; | ||
69 | #interrupt-cells = <1>; | ||
70 | |||
71 | interrupt-parent = <&cpu_intc>; | ||
72 | interrupts = <4>; | ||
73 | }; | ||
74 | |||
75 | zmips_intc: zmips_intc@104b0060 { | ||
76 | compatible = "brcm,bcm3380-l2-intc"; | ||
77 | reg = <0x104b0060 0x4 0x104b0064 0x4>; | ||
78 | |||
79 | interrupt-controller; | ||
80 | #interrupt-cells = <1>; | ||
81 | |||
82 | interrupt-parent = <&periph_intc>; | ||
83 | interrupts = <29>; | ||
84 | brcm,int-map-mask = <0xffffffff>; | ||
85 | }; | ||
86 | |||
87 | iop_intc: iop_intc@14e00058 { | ||
88 | compatible = "brcm,bcm3380-l2-intc"; | ||
89 | reg = <0x14e00058 0x4 0x14e0005c 0x4>; | ||
90 | |||
91 | interrupt-controller; | ||
92 | #interrupt-cells = <1>; | ||
93 | |||
94 | interrupt-parent = <&cpu_intc>; | ||
95 | interrupts = <6>; | ||
96 | brcm,int-map-mask = <0xffffffff>; | ||
97 | }; | ||
98 | |||
99 | uart0: serial@14e00520 { | ||
100 | compatible = "brcm,bcm6345-uart"; | ||
101 | reg = <0x14e00520 0x18>; | ||
102 | interrupt-parent = <&periph_intc>; | ||
103 | interrupts = <2>; | ||
104 | clocks = <&periph_clk>; | ||
105 | status = "disabled"; | ||
106 | }; | ||
107 | |||
108 | ehci0: usb@15400300 { | ||
109 | compatible = "brcm,bcm3384-ehci", "generic-ehci"; | ||
110 | reg = <0x15400300 0x100>; | ||
111 | big-endian; | ||
112 | interrupt-parent = <&periph_intc>; | ||
113 | interrupts = <41>; | ||
114 | status = "disabled"; | ||
115 | }; | ||
116 | |||
117 | ohci0: usb@15400400 { | ||
118 | compatible = "brcm,bcm3384-ohci", "generic-ohci"; | ||
119 | reg = <0x15400400 0x100>; | ||
120 | big-endian; | ||
121 | no-big-frame-no; | ||
122 | interrupt-parent = <&periph_intc>; | ||
123 | interrupts = <40>; | ||
124 | status = "disabled"; | ||
125 | }; | ||
126 | }; | ||
127 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm63268-comtrend-vr-3032u.dts b/arch/mips/boot/dts/brcm/bcm63268-comtrend-vr-3032u.dts new file mode 100644 index 000000000..8d010b919 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm63268-comtrend-vr-3032u.dts | |||
@@ -0,0 +1,109 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm63268.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "comtrend,vr-3032u", "brcm,bcm63268"; | ||
8 | model = "Comtrend VR-3032u"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x04000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &leds0 { | ||
22 | status = "okay"; | ||
23 | brcm,serial-leds; | ||
24 | brcm,serial-dat-low; | ||
25 | brcm,serial-shift-inv; | ||
26 | |||
27 | led@0 { | ||
28 | reg = <0>; | ||
29 | brcm,hardware-controlled; | ||
30 | brcm,link-signal-sources = <0>; | ||
31 | /* GPHY0 Speed 0 */ | ||
32 | }; | ||
33 | led@1 { | ||
34 | reg = <1>; | ||
35 | brcm,hardware-controlled; | ||
36 | brcm,link-signal-sources = <1>; | ||
37 | /* GPHY0 Speed 1 */ | ||
38 | }; | ||
39 | led@2 { | ||
40 | reg = <2>; | ||
41 | active-low; | ||
42 | label = "vr-3032u:red:inet"; | ||
43 | }; | ||
44 | led@3 { | ||
45 | reg = <3>; | ||
46 | active-low; | ||
47 | label = "vr-3032u:green:dsl"; | ||
48 | }; | ||
49 | led@4 { | ||
50 | reg = <4>; | ||
51 | active-low; | ||
52 | label = "vr-3032u:green:usb"; | ||
53 | }; | ||
54 | led@7 { | ||
55 | reg = <7>; | ||
56 | active-low; | ||
57 | label = "vr-3032u:green:wps"; | ||
58 | }; | ||
59 | led@8 { | ||
60 | reg = <8>; | ||
61 | active-low; | ||
62 | label = "vr-3032u:green:inet"; | ||
63 | }; | ||
64 | led@9 { | ||
65 | reg = <9>; | ||
66 | brcm,hardware-controlled; | ||
67 | /* EPHY0 Activity */ | ||
68 | }; | ||
69 | led@10 { | ||
70 | reg = <10>; | ||
71 | brcm,hardware-controlled; | ||
72 | /* EPHY1 Activity */ | ||
73 | }; | ||
74 | led@11 { | ||
75 | reg = <11>; | ||
76 | brcm,hardware-controlled; | ||
77 | /* EPHY2 Activity */ | ||
78 | }; | ||
79 | led@12 { | ||
80 | reg = <12>; | ||
81 | brcm,hardware-controlled; | ||
82 | /* GPHY0 Activity */ | ||
83 | }; | ||
84 | led@13 { | ||
85 | reg = <13>; | ||
86 | brcm,hardware-controlled; | ||
87 | /* EPHY0 Speed */ | ||
88 | }; | ||
89 | led@14 { | ||
90 | reg = <14>; | ||
91 | brcm,hardware-controlled; | ||
92 | /* EPHY1 Speed */ | ||
93 | }; | ||
94 | led@15 { | ||
95 | reg = <15>; | ||
96 | brcm,hardware-controlled; | ||
97 | /* EPHY2 Speed */ | ||
98 | }; | ||
99 | led@20 { | ||
100 | reg = <20>; | ||
101 | active-low; | ||
102 | label = "vr-3032u:green:power"; | ||
103 | default-state = "on"; | ||
104 | }; | ||
105 | }; | ||
106 | |||
107 | &uart0 { | ||
108 | status = "okay"; | ||
109 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm63268.dtsi b/arch/mips/boot/dts/brcm/bcm63268.dtsi new file mode 100644 index 000000000..365fa75cd --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm63268.dtsi | |||
@@ -0,0 +1,149 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm63268"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <200000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4350"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4350"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | clocks { | ||
27 | periph_clk: periph-clk { | ||
28 | compatible = "fixed-clock"; | ||
29 | #clock-cells = <0>; | ||
30 | clock-frequency = <50000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | aliases { | ||
35 | serial0 = &uart0; | ||
36 | serial1 = &uart1; | ||
37 | }; | ||
38 | |||
39 | cpu_intc: interrupt-controller { | ||
40 | #address-cells = <0>; | ||
41 | compatible = "mti,cpu-interrupt-controller"; | ||
42 | |||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <1>; | ||
45 | }; | ||
46 | |||
47 | ubus { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | |||
51 | compatible = "simple-bus"; | ||
52 | ranges; | ||
53 | |||
54 | clkctl: clock-controller@10000004 { | ||
55 | compatible = "brcm,bcm63268-clocks"; | ||
56 | reg = <0x10000004 0x4>; | ||
57 | #clock-cells = <1>; | ||
58 | }; | ||
59 | |||
60 | periph_cntl: syscon@10000008 { | ||
61 | compatible = "syscon"; | ||
62 | reg = <0x10000008 0x4>; | ||
63 | native-endian; | ||
64 | }; | ||
65 | |||
66 | reboot: syscon-reboot@10000008 { | ||
67 | compatible = "syscon-reboot"; | ||
68 | regmap = <&periph_cntl>; | ||
69 | offset = <0x0>; | ||
70 | mask = <0x1>; | ||
71 | }; | ||
72 | |||
73 | periph_intc: interrupt-controller@10000020 { | ||
74 | compatible = "brcm,bcm6345-l1-intc"; | ||
75 | reg = <0x10000020 0x20>, | ||
76 | <0x10000040 0x20>; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&cpu_intc>; | ||
82 | interrupts = <2>, <3>; | ||
83 | }; | ||
84 | |||
85 | uart0: serial@10000180 { | ||
86 | compatible = "brcm,bcm6345-uart"; | ||
87 | reg = <0x10000180 0x18>; | ||
88 | |||
89 | interrupt-parent = <&periph_intc>; | ||
90 | interrupts = <5>; | ||
91 | |||
92 | clocks = <&periph_clk>; | ||
93 | clock-names = "refclk"; | ||
94 | |||
95 | status = "disabled"; | ||
96 | }; | ||
97 | |||
98 | uart1: serial@100001a0 { | ||
99 | compatible = "brcm,bcm6345-uart"; | ||
100 | reg = <0x100001a0 0x18>; | ||
101 | |||
102 | interrupt-parent = <&periph_intc>; | ||
103 | interrupts = <34>; | ||
104 | |||
105 | clocks = <&periph_clk>; | ||
106 | clock-names = "refclk"; | ||
107 | |||
108 | status = "disabled"; | ||
109 | }; | ||
110 | |||
111 | leds0: led-controller@10001900 { | ||
112 | #address-cells = <1>; | ||
113 | #size-cells = <0>; | ||
114 | compatible = "brcm,bcm6328-leds"; | ||
115 | reg = <0x10001900 0x24>; | ||
116 | |||
117 | status = "disabled"; | ||
118 | }; | ||
119 | |||
120 | periph_pwr: power-controller@1000184c { | ||
121 | compatible = "brcm,bcm6328-power-controller"; | ||
122 | reg = <0x1000184c 0x4>; | ||
123 | #power-domain-cells = <1>; | ||
124 | }; | ||
125 | |||
126 | ehci: usb@10002500 { | ||
127 | compatible = "brcm,bcm63268-ehci", "generic-ehci"; | ||
128 | reg = <0x10002500 0x100>; | ||
129 | big-endian; | ||
130 | |||
131 | interrupt-parent = <&periph_intc>; | ||
132 | interrupts = <10>; | ||
133 | |||
134 | status = "disabled"; | ||
135 | }; | ||
136 | |||
137 | ohci: usb@10002600 { | ||
138 | compatible = "brcm,bcm63268-ohci", "generic-ohci"; | ||
139 | reg = <0x10002600 0x100>; | ||
140 | big-endian; | ||
141 | no-big-frame-no; | ||
142 | |||
143 | interrupt-parent = <&periph_intc>; | ||
144 | interrupts = <9>; | ||
145 | |||
146 | status = "disabled"; | ||
147 | }; | ||
148 | }; | ||
149 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm6328.dtsi b/arch/mips/boot/dts/brcm/bcm6328.dtsi new file mode 100644 index 000000000..1f9edd710 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm6328.dtsi | |||
@@ -0,0 +1,138 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm6328"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <160000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4350"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4350"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | clocks { | ||
27 | periph_clk: periph-clk { | ||
28 | compatible = "fixed-clock"; | ||
29 | #clock-cells = <0>; | ||
30 | clock-frequency = <50000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | aliases { | ||
35 | serial0 = &uart0; | ||
36 | serial1 = &uart1; | ||
37 | }; | ||
38 | |||
39 | cpu_intc: interrupt-controller { | ||
40 | #address-cells = <0>; | ||
41 | compatible = "mti,cpu-interrupt-controller"; | ||
42 | |||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <1>; | ||
45 | }; | ||
46 | |||
47 | ubus { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | |||
51 | compatible = "simple-bus"; | ||
52 | ranges; | ||
53 | |||
54 | clkctl: clock-controller@10000004 { | ||
55 | compatible = "brcm,bcm6328-clocks"; | ||
56 | reg = <0x10000004 0x4>; | ||
57 | #clock-cells = <1>; | ||
58 | }; | ||
59 | |||
60 | periph_intc: interrupt-controller@10000020 { | ||
61 | compatible = "brcm,bcm6345-l1-intc"; | ||
62 | reg = <0x10000020 0x10>, | ||
63 | <0x10000030 0x10>; | ||
64 | |||
65 | interrupt-controller; | ||
66 | #interrupt-cells = <1>; | ||
67 | |||
68 | interrupt-parent = <&cpu_intc>; | ||
69 | interrupts = <2>, <3>; | ||
70 | }; | ||
71 | |||
72 | uart0: serial@10000100 { | ||
73 | compatible = "brcm,bcm6345-uart"; | ||
74 | reg = <0x10000100 0x18>; | ||
75 | interrupt-parent = <&periph_intc>; | ||
76 | interrupts = <28>; | ||
77 | clocks = <&periph_clk>; | ||
78 | clock-names = "refclk"; | ||
79 | status = "disabled"; | ||
80 | }; | ||
81 | |||
82 | uart1: serial@10000120 { | ||
83 | compatible = "brcm,bcm6345-uart"; | ||
84 | reg = <0x10000120 0x18>; | ||
85 | interrupt-parent = <&periph_intc>; | ||
86 | interrupts = <39>; | ||
87 | clocks = <&periph_clk>; | ||
88 | clock-names = "refclk"; | ||
89 | status = "disabled"; | ||
90 | }; | ||
91 | |||
92 | timer: syscon@10000040 { | ||
93 | compatible = "syscon"; | ||
94 | reg = <0x10000040 0x2c>; | ||
95 | native-endian; | ||
96 | }; | ||
97 | |||
98 | reboot: syscon-reboot@10000068 { | ||
99 | compatible = "syscon-reboot"; | ||
100 | regmap = <&timer>; | ||
101 | offset = <0x28>; | ||
102 | mask = <0x1>; | ||
103 | }; | ||
104 | |||
105 | leds0: led-controller@10000800 { | ||
106 | #address-cells = <1>; | ||
107 | #size-cells = <0>; | ||
108 | compatible = "brcm,bcm6328-leds"; | ||
109 | reg = <0x10000800 0x24>; | ||
110 | status = "disabled"; | ||
111 | }; | ||
112 | |||
113 | periph_pwr: power-controller@10001848 { | ||
114 | compatible = "brcm,bcm6328-power-controller"; | ||
115 | reg = <0x10001848 0x4>; | ||
116 | #power-domain-cells = <1>; | ||
117 | }; | ||
118 | |||
119 | ehci: usb@10002500 { | ||
120 | compatible = "brcm,bcm6328-ehci", "generic-ehci"; | ||
121 | reg = <0x10002500 0x100>; | ||
122 | big-endian; | ||
123 | interrupt-parent = <&periph_intc>; | ||
124 | interrupts = <42>; | ||
125 | status = "disabled"; | ||
126 | }; | ||
127 | |||
128 | ohci: usb@10002600 { | ||
129 | compatible = "brcm,bcm6328-ohci", "generic-ohci"; | ||
130 | reg = <0x10002600 0x100>; | ||
131 | big-endian; | ||
132 | no-big-frame-no; | ||
133 | interrupt-parent = <&periph_intc>; | ||
134 | interrupts = <41>; | ||
135 | status = "disabled"; | ||
136 | }; | ||
137 | }; | ||
138 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm6358-neufbox4-sercomm.dts b/arch/mips/boot/dts/brcm/bcm6358-neufbox4-sercomm.dts new file mode 100644 index 000000000..53e57cc29 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm6358-neufbox4-sercomm.dts | |||
@@ -0,0 +1,48 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm6358.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "sfr,nb4-ser", "brcm,bcm6358"; | ||
8 | model = "SFR Neufbox 4 (Sercomm)"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x02000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &leds0 { | ||
22 | status = "okay"; | ||
23 | |||
24 | led@0 { | ||
25 | reg = <0>; | ||
26 | active-low; | ||
27 | label = "nb4-ser:white:alarm"; | ||
28 | }; | ||
29 | led@2 { | ||
30 | reg = <2>; | ||
31 | active-low; | ||
32 | label = "nb4-ser:white:tv"; | ||
33 | }; | ||
34 | led@3 { | ||
35 | reg = <3>; | ||
36 | active-low; | ||
37 | label = "nb4-ser:white:tel"; | ||
38 | }; | ||
39 | led@4 { | ||
40 | reg = <4>; | ||
41 | active-low; | ||
42 | label = "nb4-ser:white:adsl"; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | &uart0 { | ||
47 | status = "okay"; | ||
48 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm6358.dtsi b/arch/mips/boot/dts/brcm/bcm6358.dtsi new file mode 100644 index 000000000..89a3107ca --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm6358.dtsi | |||
@@ -0,0 +1,139 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm6358"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <150000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4350"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4350"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | clocks { | ||
27 | periph_clk: periph-clk { | ||
28 | compatible = "fixed-clock"; | ||
29 | #clock-cells = <0>; | ||
30 | clock-frequency = <50000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | aliases { | ||
35 | serial0 = &uart0; | ||
36 | serial1 = &uart1; | ||
37 | }; | ||
38 | |||
39 | cpu_intc: interrupt-controller { | ||
40 | #address-cells = <0>; | ||
41 | compatible = "mti,cpu-interrupt-controller"; | ||
42 | |||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <1>; | ||
45 | }; | ||
46 | |||
47 | ubus { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | |||
51 | compatible = "simple-bus"; | ||
52 | ranges; | ||
53 | |||
54 | clkctl: clock-controller@fffe0004 { | ||
55 | compatible = "brcm,bcm6358-clocks"; | ||
56 | reg = <0xfffe0004 0x4>; | ||
57 | #clock-cells = <1>; | ||
58 | }; | ||
59 | |||
60 | periph_cntl: syscon@fffe0008 { | ||
61 | compatible = "syscon"; | ||
62 | reg = <0xfffe0008 0x4>; | ||
63 | native-endian; | ||
64 | }; | ||
65 | |||
66 | reboot: syscon-reboot@fffe0008 { | ||
67 | compatible = "syscon-reboot"; | ||
68 | regmap = <&periph_cntl>; | ||
69 | offset = <0x0>; | ||
70 | mask = <0x1>; | ||
71 | }; | ||
72 | |||
73 | periph_intc: interrupt-controller@fffe000c { | ||
74 | compatible = "brcm,bcm6345-l1-intc"; | ||
75 | reg = <0xfffe000c 0x8>, | ||
76 | <0xfffe0038 0x8>; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&cpu_intc>; | ||
82 | interrupts = <2>, <3>; | ||
83 | }; | ||
84 | |||
85 | leds0: led-controller@fffe00d0 { | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <0>; | ||
88 | compatible = "brcm,bcm6358-leds"; | ||
89 | reg = <0xfffe00d0 0x8>; | ||
90 | |||
91 | status = "disabled"; | ||
92 | }; | ||
93 | |||
94 | uart0: serial@fffe0100 { | ||
95 | compatible = "brcm,bcm6345-uart"; | ||
96 | reg = <0xfffe0100 0x18>; | ||
97 | |||
98 | interrupt-parent = <&periph_intc>; | ||
99 | interrupts = <2>; | ||
100 | |||
101 | clocks = <&periph_clk>; | ||
102 | clock-names = "refclk"; | ||
103 | |||
104 | status = "disabled"; | ||
105 | }; | ||
106 | |||
107 | uart1: serial@fffe0120 { | ||
108 | compatible = "brcm,bcm6345-uart"; | ||
109 | reg = <0xfffe0120 0x18>; | ||
110 | |||
111 | interrupt-parent = <&periph_intc>; | ||
112 | interrupts = <3>; | ||
113 | |||
114 | clocks = <&periph_clk>; | ||
115 | clock-names = "refclk"; | ||
116 | |||
117 | status = "disabled"; | ||
118 | }; | ||
119 | |||
120 | ehci: usb@fffe1300 { | ||
121 | compatible = "brcm,bcm6358-ehci", "generic-ehci"; | ||
122 | reg = <0xfffe1300 0x100>; | ||
123 | big-endian; | ||
124 | interrupt-parent = <&periph_intc>; | ||
125 | interrupts = <10>; | ||
126 | status = "disabled"; | ||
127 | }; | ||
128 | |||
129 | ohci: usb@fffe1400 { | ||
130 | compatible = "brcm,bcm6358-ohci", "generic-ohci"; | ||
131 | reg = <0xfffe1400 0x100>; | ||
132 | big-endian; | ||
133 | no-big-frame-no; | ||
134 | interrupt-parent = <&periph_intc>; | ||
135 | interrupts = <5>; | ||
136 | status = "disabled"; | ||
137 | }; | ||
138 | }; | ||
139 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts b/arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts new file mode 100644 index 000000000..3e83bee5b --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts | |||
@@ -0,0 +1,23 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm6362.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "sfr,nb6-ser", "brcm,bcm6362"; | ||
8 | model = "SFR NeufBox 6 (Sercomm)"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x08000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &uart0 { | ||
22 | status = "okay"; | ||
23 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi new file mode 100644 index 000000000..0b2adefd7 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm6362.dtsi | |||
@@ -0,0 +1,149 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm6362"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <200000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4350"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4350"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | clocks { | ||
27 | periph_clk: periph-clk { | ||
28 | compatible = "fixed-clock"; | ||
29 | #clock-cells = <0>; | ||
30 | clock-frequency = <50000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | aliases { | ||
35 | serial0 = &uart0; | ||
36 | serial1 = &uart1; | ||
37 | }; | ||
38 | |||
39 | cpu_intc: interrupt-controller { | ||
40 | #address-cells = <0>; | ||
41 | compatible = "mti,cpu-interrupt-controller"; | ||
42 | |||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <1>; | ||
45 | }; | ||
46 | |||
47 | ubus { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | |||
51 | compatible = "simple-bus"; | ||
52 | ranges; | ||
53 | |||
54 | clkctl: clock-controller@10000004 { | ||
55 | compatible = "brcm,bcm6362-clocks"; | ||
56 | reg = <0x10000004 0x4>; | ||
57 | #clock-cells = <1>; | ||
58 | }; | ||
59 | |||
60 | periph_cntl: syscon@10000008 { | ||
61 | compatible = "syscon"; | ||
62 | reg = <0x10000008 0x4>; | ||
63 | native-endian; | ||
64 | }; | ||
65 | |||
66 | reboot: syscon-reboot@10000008 { | ||
67 | compatible = "syscon-reboot"; | ||
68 | regmap = <&periph_cntl>; | ||
69 | offset = <0x0>; | ||
70 | mask = <0x1>; | ||
71 | }; | ||
72 | |||
73 | periph_intc: interrupt-controller@10000020 { | ||
74 | compatible = "brcm,bcm6345-l1-intc"; | ||
75 | reg = <0x10000020 0x10>, | ||
76 | <0x10000030 0x10>; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&cpu_intc>; | ||
82 | interrupts = <2>, <3>; | ||
83 | }; | ||
84 | |||
85 | uart0: serial@10000100 { | ||
86 | compatible = "brcm,bcm6345-uart"; | ||
87 | reg = <0x10000100 0x18>; | ||
88 | |||
89 | interrupt-parent = <&periph_intc>; | ||
90 | interrupts = <3>; | ||
91 | |||
92 | clocks = <&periph_clk>; | ||
93 | clock-names = "refclk"; | ||
94 | |||
95 | status = "disabled"; | ||
96 | }; | ||
97 | |||
98 | uart1: serial@10000120 { | ||
99 | compatible = "brcm,bcm6345-uart"; | ||
100 | reg = <0x10000120 0x18>; | ||
101 | |||
102 | interrupt-parent = <&periph_intc>; | ||
103 | interrupts = <4>; | ||
104 | |||
105 | clocks = <&periph_clk>; | ||
106 | clock-names = "refclk"; | ||
107 | |||
108 | status = "disabled"; | ||
109 | }; | ||
110 | |||
111 | periph_pwr: power-controller@10001848 { | ||
112 | compatible = "brcm,bcm6362-power-controller"; | ||
113 | reg = <0x10001848 0x4>; | ||
114 | #power-domain-cells = <1>; | ||
115 | }; | ||
116 | |||
117 | leds0: led-controller@10001900 { | ||
118 | #address-cells = <1>; | ||
119 | #size-cells = <0>; | ||
120 | compatible = "brcm,bcm6328-leds"; | ||
121 | reg = <0x10001900 0x24>; | ||
122 | |||
123 | status = "disabled"; | ||
124 | }; | ||
125 | |||
126 | ehci: usb@10002500 { | ||
127 | compatible = "brcm,bcm6362-ehci", "generic-ehci"; | ||
128 | reg = <0x10002500 0x100>; | ||
129 | big-endian; | ||
130 | |||
131 | interrupt-parent = <&periph_intc>; | ||
132 | interrupts = <10>; | ||
133 | |||
134 | status = "disabled"; | ||
135 | }; | ||
136 | |||
137 | ohci: usb@10002600 { | ||
138 | compatible = "brcm,bcm6362-ohci", "generic-ohci"; | ||
139 | reg = <0x10002600 0x100>; | ||
140 | big-endian; | ||
141 | no-big-frame-no; | ||
142 | |||
143 | interrupt-parent = <&periph_intc>; | ||
144 | interrupts = <9>; | ||
145 | |||
146 | status = "disabled"; | ||
147 | }; | ||
148 | }; | ||
149 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm6368.dtsi b/arch/mips/boot/dts/brcm/bcm6368.dtsi new file mode 100644 index 000000000..b84a3bfe8 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm6368.dtsi | |||
@@ -0,0 +1,132 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm6368"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <200000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4350"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4350"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | clocks { | ||
27 | periph_clk: periph-clk { | ||
28 | compatible = "fixed-clock"; | ||
29 | #clock-cells = <0>; | ||
30 | clock-frequency = <50000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | aliases { | ||
35 | serial0 = &uart0; | ||
36 | serial1 = &uart1; | ||
37 | }; | ||
38 | |||
39 | cpu_intc: interrupt-controller { | ||
40 | #address-cells = <0>; | ||
41 | compatible = "mti,cpu-interrupt-controller"; | ||
42 | |||
43 | interrupt-controller; | ||
44 | #interrupt-cells = <1>; | ||
45 | }; | ||
46 | |||
47 | ubus { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | |||
51 | compatible = "simple-bus"; | ||
52 | ranges; | ||
53 | |||
54 | clkctl: clock-controller@10000004 { | ||
55 | compatible = "brcm,bcm6368-clocks"; | ||
56 | reg = <0x10000004 0x4>; | ||
57 | #clock-cells = <1>; | ||
58 | }; | ||
59 | |||
60 | periph_cntl: syscon@100000008 { | ||
61 | compatible = "syscon"; | ||
62 | reg = <0x10000008 0x4>; | ||
63 | native-endian; | ||
64 | }; | ||
65 | |||
66 | reboot: syscon-reboot@10000008 { | ||
67 | compatible = "syscon-reboot"; | ||
68 | regmap = <&periph_cntl>; | ||
69 | offset = <0x0>; | ||
70 | mask = <0x1>; | ||
71 | }; | ||
72 | |||
73 | periph_intc: interrupt-controller@10000020 { | ||
74 | compatible = "brcm,bcm6345-l1-intc"; | ||
75 | reg = <0x10000020 0x10>, | ||
76 | <0x10000030 0x10>; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&cpu_intc>; | ||
82 | interrupts = <2>, <3>; | ||
83 | }; | ||
84 | |||
85 | leds0: led-controller@100000d0 { | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <0>; | ||
88 | compatible = "brcm,bcm6358-leds"; | ||
89 | reg = <0x100000d0 0x8>; | ||
90 | status = "disabled"; | ||
91 | }; | ||
92 | |||
93 | uart0: serial@10000100 { | ||
94 | compatible = "brcm,bcm6345-uart"; | ||
95 | reg = <0x10000100 0x18>; | ||
96 | interrupt-parent = <&periph_intc>; | ||
97 | interrupts = <2>; | ||
98 | clocks = <&periph_clk>; | ||
99 | clock-names = "refclk"; | ||
100 | status = "disabled"; | ||
101 | }; | ||
102 | |||
103 | uart1: serial@10000120 { | ||
104 | compatible = "brcm,bcm6345-uart"; | ||
105 | reg = <0x10000120 0x18>; | ||
106 | interrupt-parent = <&periph_intc>; | ||
107 | interrupts = <3>; | ||
108 | clocks = <&periph_clk>; | ||
109 | clock-names = "refclk"; | ||
110 | status = "disabled"; | ||
111 | }; | ||
112 | |||
113 | ehci: usb@10001500 { | ||
114 | compatible = "brcm,bcm6368-ehci", "generic-ehci"; | ||
115 | reg = <0x10001500 0x100>; | ||
116 | big-endian; | ||
117 | interrupt-parent = <&periph_intc>; | ||
118 | interrupts = <7>; | ||
119 | status = "disabled"; | ||
120 | }; | ||
121 | |||
122 | ohci: usb@10001600 { | ||
123 | compatible = "brcm,bcm6368-ohci", "generic-ohci"; | ||
124 | reg = <0x10001600 0x100>; | ||
125 | big-endian; | ||
126 | no-big-frame-no; | ||
127 | interrupt-parent = <&periph_intc>; | ||
128 | interrupts = <5>; | ||
129 | status = "disabled"; | ||
130 | }; | ||
131 | }; | ||
132 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7125.dtsi b/arch/mips/boot/dts/brcm/bcm7125.dtsi new file mode 100644 index 000000000..5bf77b6fc --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7125.dtsi | |||
@@ -0,0 +1,281 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7125"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <202500000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4380"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4380"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | aliases { | ||
27 | uart0 = &uart0; | ||
28 | }; | ||
29 | |||
30 | cpu_intc: interrupt-controller { | ||
31 | #address-cells = <0>; | ||
32 | compatible = "mti,cpu-interrupt-controller"; | ||
33 | |||
34 | interrupt-controller; | ||
35 | #interrupt-cells = <1>; | ||
36 | }; | ||
37 | |||
38 | clocks { | ||
39 | uart_clk: uart_clk { | ||
40 | compatible = "fixed-clock"; | ||
41 | #clock-cells = <0>; | ||
42 | clock-frequency = <81000000>; | ||
43 | }; | ||
44 | |||
45 | upg_clk: upg_clk { | ||
46 | compatible = "fixed-clock"; | ||
47 | #clock-cells = <0>; | ||
48 | clock-frequency = <27000000>; | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | rdb { | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <1>; | ||
55 | |||
56 | compatible = "simple-bus"; | ||
57 | ranges = <0 0x10000000 0x01000000>; | ||
58 | |||
59 | periph_intc: interrupt-controller@441400 { | ||
60 | compatible = "brcm,bcm7038-l1-intc"; | ||
61 | reg = <0x441400 0x30>, <0x441600 0x30>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <1>; | ||
65 | |||
66 | interrupt-parent = <&cpu_intc>; | ||
67 | interrupts = <2>, <3>; | ||
68 | }; | ||
69 | |||
70 | sun_l2_intc: interrupt-controller@401800 { | ||
71 | compatible = "brcm,l2-intc"; | ||
72 | reg = <0x401800 0x30>; | ||
73 | interrupt-controller; | ||
74 | #interrupt-cells = <1>; | ||
75 | interrupt-parent = <&periph_intc>; | ||
76 | interrupts = <23>; | ||
77 | }; | ||
78 | |||
79 | gisb-arb@400000 { | ||
80 | compatible = "brcm,bcm7400-gisb-arb"; | ||
81 | reg = <0x400000 0xdc>; | ||
82 | native-endian; | ||
83 | interrupt-parent = <&sun_l2_intc>; | ||
84 | interrupts = <0>, <2>; | ||
85 | brcm,gisb-arb-master-mask = <0x2f7>; | ||
86 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "pci_0", | ||
87 | "bsp_0", "rdc_0", "rptd_0", | ||
88 | "avd_0", "jtag_0"; | ||
89 | }; | ||
90 | |||
91 | upg_irq0_intc: interrupt-controller@406780 { | ||
92 | compatible = "brcm,bcm7120-l2-intc"; | ||
93 | reg = <0x406780 0x8>; | ||
94 | |||
95 | brcm,int-map-mask = <0x44>, <0xf000000>, <0x100000>; | ||
96 | brcm,int-fwd-mask = <0x70000>; | ||
97 | |||
98 | interrupt-controller; | ||
99 | #interrupt-cells = <1>; | ||
100 | |||
101 | interrupt-parent = <&periph_intc>; | ||
102 | interrupts = <18>, <19>, <20>; | ||
103 | interrupt-names = "upg_main", "upg_bsc", "upg_spi"; | ||
104 | }; | ||
105 | |||
106 | sun_top_ctrl: syscon@404000 { | ||
107 | compatible = "brcm,bcm7125-sun-top-ctrl", "syscon"; | ||
108 | reg = <0x404000 0x60c>; | ||
109 | native-endian; | ||
110 | }; | ||
111 | |||
112 | reboot { | ||
113 | compatible = "brcm,bcm7038-reboot"; | ||
114 | syscon = <&sun_top_ctrl 0x8 0x14>; | ||
115 | }; | ||
116 | |||
117 | uart0: serial@406b00 { | ||
118 | compatible = "ns16550a"; | ||
119 | reg = <0x406b00 0x20>; | ||
120 | reg-io-width = <0x4>; | ||
121 | reg-shift = <0x2>; | ||
122 | native-endian; | ||
123 | interrupt-parent = <&periph_intc>; | ||
124 | interrupts = <21>; | ||
125 | clocks = <&uart_clk>; | ||
126 | status = "disabled"; | ||
127 | }; | ||
128 | |||
129 | uart1: serial@406b40 { | ||
130 | compatible = "ns16550a"; | ||
131 | reg = <0x406b40 0x20>; | ||
132 | reg-io-width = <0x4>; | ||
133 | reg-shift = <0x2>; | ||
134 | native-endian; | ||
135 | interrupt-parent = <&periph_intc>; | ||
136 | interrupts = <64>; | ||
137 | clocks = <&uart_clk>; | ||
138 | status = "disabled"; | ||
139 | }; | ||
140 | |||
141 | uart2: serial@406b80 { | ||
142 | compatible = "ns16550a"; | ||
143 | reg = <0x406b80 0x20>; | ||
144 | reg-io-width = <0x4>; | ||
145 | reg-shift = <0x2>; | ||
146 | native-endian; | ||
147 | interrupt-parent = <&periph_intc>; | ||
148 | interrupts = <65>; | ||
149 | clocks = <&uart_clk>; | ||
150 | status = "disabled"; | ||
151 | }; | ||
152 | |||
153 | bsca: i2c@406200 { | ||
154 | clock-frequency = <390000>; | ||
155 | compatible = "brcm,brcmstb-i2c"; | ||
156 | interrupt-parent = <&upg_irq0_intc>; | ||
157 | reg = <0x406200 0x58>; | ||
158 | interrupts = <24>; | ||
159 | interrupt-names = "upg_bsca"; | ||
160 | status = "disabled"; | ||
161 | }; | ||
162 | |||
163 | bscb: i2c@406280 { | ||
164 | clock-frequency = <390000>; | ||
165 | compatible = "brcm,brcmstb-i2c"; | ||
166 | interrupt-parent = <&upg_irq0_intc>; | ||
167 | reg = <0x406280 0x58>; | ||
168 | interrupts = <25>; | ||
169 | interrupt-names = "upg_bscb"; | ||
170 | status = "disabled"; | ||
171 | }; | ||
172 | |||
173 | bscc: i2c@406300 { | ||
174 | clock-frequency = <390000>; | ||
175 | compatible = "brcm,brcmstb-i2c"; | ||
176 | interrupt-parent = <&upg_irq0_intc>; | ||
177 | reg = <0x406300 0x58>; | ||
178 | interrupts = <26>; | ||
179 | interrupt-names = "upg_bscc"; | ||
180 | status = "disabled"; | ||
181 | }; | ||
182 | |||
183 | bscd: i2c@406380 { | ||
184 | clock-frequency = <390000>; | ||
185 | compatible = "brcm,brcmstb-i2c"; | ||
186 | interrupt-parent = <&upg_irq0_intc>; | ||
187 | reg = <0x406380 0x58>; | ||
188 | interrupts = <27>; | ||
189 | interrupt-names = "upg_bscd"; | ||
190 | status = "disabled"; | ||
191 | }; | ||
192 | |||
193 | pwma: pwm@406580 { | ||
194 | compatible = "brcm,bcm7038-pwm"; | ||
195 | reg = <0x406580 0x28>; | ||
196 | #pwm-cells = <2>; | ||
197 | clocks = <&upg_clk>; | ||
198 | status = "disabled"; | ||
199 | }; | ||
200 | |||
201 | watchdog: watchdog@4067e8 { | ||
202 | clocks = <&upg_clk>; | ||
203 | compatible = "brcm,bcm7038-wdt"; | ||
204 | reg = <0x4067e8 0x14>; | ||
205 | status = "disabled"; | ||
206 | }; | ||
207 | |||
208 | upg_gio: gpio@406700 { | ||
209 | compatible = "brcm,brcmstb-gpio"; | ||
210 | reg = <0x406700 0x80>; | ||
211 | #gpio-cells = <2>; | ||
212 | #interrupt-cells = <2>; | ||
213 | gpio-controller; | ||
214 | interrupt-controller; | ||
215 | interrupt-parent = <&upg_irq0_intc>; | ||
216 | interrupts = <6>; | ||
217 | brcm,gpio-bank-widths = <32 32 32 18>; | ||
218 | }; | ||
219 | |||
220 | ehci0: usb@488300 { | ||
221 | compatible = "brcm,bcm7125-ehci", "generic-ehci"; | ||
222 | reg = <0x488300 0x100>; | ||
223 | native-endian; | ||
224 | interrupt-parent = <&periph_intc>; | ||
225 | interrupts = <60>; | ||
226 | status = "disabled"; | ||
227 | }; | ||
228 | |||
229 | ohci0: usb@488400 { | ||
230 | compatible = "brcm,bcm7125-ohci", "generic-ohci"; | ||
231 | reg = <0x488400 0x100>; | ||
232 | native-endian; | ||
233 | interrupt-parent = <&periph_intc>; | ||
234 | interrupts = <61>; | ||
235 | status = "disabled"; | ||
236 | }; | ||
237 | |||
238 | spi_l2_intc: interrupt-controller@411d00 { | ||
239 | compatible = "brcm,l2-intc"; | ||
240 | reg = <0x411d00 0x30>; | ||
241 | interrupt-controller; | ||
242 | #interrupt-cells = <1>; | ||
243 | interrupt-parent = <&periph_intc>; | ||
244 | interrupts = <79>; | ||
245 | }; | ||
246 | |||
247 | qspi: spi@443000 { | ||
248 | #address-cells = <0x1>; | ||
249 | #size-cells = <0x0>; | ||
250 | compatible = "brcm,spi-bcm-qspi", | ||
251 | "brcm,spi-brcmstb-qspi"; | ||
252 | clocks = <&upg_clk>; | ||
253 | reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>; | ||
254 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
255 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
256 | interrupt-parent = <&spi_l2_intc>; | ||
257 | interrupt-names = "spi_lr_fullness_reached", | ||
258 | "spi_lr_session_aborted", | ||
259 | "spi_lr_impatient", | ||
260 | "spi_lr_session_done", | ||
261 | "spi_lr_overread", | ||
262 | "mspi_done", | ||
263 | "mspi_halted"; | ||
264 | status = "disabled"; | ||
265 | }; | ||
266 | |||
267 | mspi: spi@406400 { | ||
268 | #address-cells = <1>; | ||
269 | #size-cells = <0>; | ||
270 | compatible = "brcm,spi-bcm-qspi", | ||
271 | "brcm,spi-brcmstb-mspi"; | ||
272 | clocks = <&upg_clk>; | ||
273 | reg = <0x406400 0x180>; | ||
274 | reg-names = "mspi"; | ||
275 | interrupts = <0x14>; | ||
276 | interrupt-parent = <&upg_irq0_intc>; | ||
277 | interrupt-names = "mspi_done"; | ||
278 | status = "disabled"; | ||
279 | }; | ||
280 | }; | ||
281 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7346.dtsi b/arch/mips/boot/dts/brcm/bcm7346.dtsi new file mode 100644 index 000000000..2afa0dada --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7346.dtsi | |||
@@ -0,0 +1,549 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7346"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <163125000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips5000"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips5000"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | aliases { | ||
27 | uart0 = &uart0; | ||
28 | }; | ||
29 | |||
30 | cpu_intc: interrupt-controller { | ||
31 | #address-cells = <0>; | ||
32 | compatible = "mti,cpu-interrupt-controller"; | ||
33 | |||
34 | interrupt-controller; | ||
35 | #interrupt-cells = <1>; | ||
36 | }; | ||
37 | |||
38 | clocks { | ||
39 | uart_clk: uart_clk { | ||
40 | compatible = "fixed-clock"; | ||
41 | #clock-cells = <0>; | ||
42 | clock-frequency = <81000000>; | ||
43 | }; | ||
44 | |||
45 | upg_clk: upg_clk { | ||
46 | compatible = "fixed-clock"; | ||
47 | #clock-cells = <0>; | ||
48 | clock-frequency = <27000000>; | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | rdb { | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <1>; | ||
55 | |||
56 | compatible = "simple-bus"; | ||
57 | ranges = <0 0x10000000 0x01000000>; | ||
58 | |||
59 | periph_intc: interrupt-controller@411400 { | ||
60 | compatible = "brcm,bcm7038-l1-intc"; | ||
61 | reg = <0x411400 0x30>, <0x411600 0x30>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <1>; | ||
65 | |||
66 | interrupt-parent = <&cpu_intc>; | ||
67 | interrupts = <2>, <3>; | ||
68 | }; | ||
69 | |||
70 | sun_l2_intc: interrupt-controller@403000 { | ||
71 | compatible = "brcm,l2-intc"; | ||
72 | reg = <0x403000 0x30>; | ||
73 | interrupt-controller; | ||
74 | #interrupt-cells = <1>; | ||
75 | interrupt-parent = <&periph_intc>; | ||
76 | interrupts = <51>; | ||
77 | }; | ||
78 | |||
79 | gisb-arb@400000 { | ||
80 | compatible = "brcm,bcm7400-gisb-arb"; | ||
81 | reg = <0x400000 0xdc>; | ||
82 | native-endian; | ||
83 | interrupt-parent = <&sun_l2_intc>; | ||
84 | interrupts = <0>, <2>; | ||
85 | brcm,gisb-arb-master-mask = <0x673>; | ||
86 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0", | ||
87 | "rdc_0", "raaga_0", | ||
88 | "jtag_0", "svd_0"; | ||
89 | }; | ||
90 | |||
91 | upg_irq0_intc: interrupt-controller@406780 { | ||
92 | compatible = "brcm,bcm7120-l2-intc"; | ||
93 | reg = <0x406780 0x8>; | ||
94 | |||
95 | brcm,int-map-mask = <0x44>, <0xf000000>; | ||
96 | brcm,int-fwd-mask = <0x70000>; | ||
97 | |||
98 | interrupt-controller; | ||
99 | #interrupt-cells = <1>; | ||
100 | |||
101 | interrupt-parent = <&periph_intc>; | ||
102 | interrupts = <59>, <57>; | ||
103 | interrupt-names = "upg_main", "upg_bsc"; | ||
104 | }; | ||
105 | |||
106 | upg_aon_irq0_intc: interrupt-controller@408b80 { | ||
107 | compatible = "brcm,bcm7120-l2-intc"; | ||
108 | reg = <0x408b80 0x8>; | ||
109 | |||
110 | brcm,int-map-mask = <0x40>, <0x8000000>, <0x100000>; | ||
111 | brcm,int-fwd-mask = <0>; | ||
112 | brcm,irq-can-wake; | ||
113 | |||
114 | interrupt-controller; | ||
115 | #interrupt-cells = <1>; | ||
116 | |||
117 | interrupt-parent = <&periph_intc>; | ||
118 | interrupts = <60>, <58>, <62>; | ||
119 | interrupt-names = "upg_main_aon", "upg_bsc_aon", | ||
120 | "upg_spi"; | ||
121 | }; | ||
122 | |||
123 | sun_top_ctrl: syscon@404000 { | ||
124 | compatible = "brcm,bcm7346-sun-top-ctrl", "syscon"; | ||
125 | reg = <0x404000 0x51c>; | ||
126 | native-endian; | ||
127 | }; | ||
128 | |||
129 | reboot { | ||
130 | compatible = "brcm,brcmstb-reboot"; | ||
131 | syscon = <&sun_top_ctrl 0x304 0x308>; | ||
132 | }; | ||
133 | |||
134 | uart0: serial@406900 { | ||
135 | compatible = "ns16550a"; | ||
136 | reg = <0x406900 0x20>; | ||
137 | reg-io-width = <0x4>; | ||
138 | reg-shift = <0x2>; | ||
139 | native-endian; | ||
140 | interrupt-parent = <&periph_intc>; | ||
141 | interrupts = <64>; | ||
142 | clocks = <&uart_clk>; | ||
143 | status = "disabled"; | ||
144 | }; | ||
145 | |||
146 | uart1: serial@406940 { | ||
147 | compatible = "ns16550a"; | ||
148 | reg = <0x406940 0x20>; | ||
149 | reg-io-width = <0x4>; | ||
150 | reg-shift = <0x2>; | ||
151 | native-endian; | ||
152 | interrupt-parent = <&periph_intc>; | ||
153 | interrupts = <65>; | ||
154 | clocks = <&uart_clk>; | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | |||
158 | uart2: serial@406980 { | ||
159 | compatible = "ns16550a"; | ||
160 | reg = <0x406980 0x20>; | ||
161 | reg-io-width = <0x4>; | ||
162 | reg-shift = <0x2>; | ||
163 | native-endian; | ||
164 | interrupt-parent = <&periph_intc>; | ||
165 | interrupts = <66>; | ||
166 | clocks = <&uart_clk>; | ||
167 | status = "disabled"; | ||
168 | }; | ||
169 | |||
170 | bsca: i2c@406200 { | ||
171 | clock-frequency = <390000>; | ||
172 | compatible = "brcm,brcmstb-i2c"; | ||
173 | interrupt-parent = <&upg_irq0_intc>; | ||
174 | reg = <0x406200 0x58>; | ||
175 | interrupts = <24>; | ||
176 | interrupt-names = "upg_bsca"; | ||
177 | status = "disabled"; | ||
178 | }; | ||
179 | |||
180 | bscb: i2c@406280 { | ||
181 | clock-frequency = <390000>; | ||
182 | compatible = "brcm,brcmstb-i2c"; | ||
183 | interrupt-parent = <&upg_irq0_intc>; | ||
184 | reg = <0x406280 0x58>; | ||
185 | interrupts = <25>; | ||
186 | interrupt-names = "upg_bscb"; | ||
187 | status = "disabled"; | ||
188 | }; | ||
189 | |||
190 | bscc: i2c@406300 { | ||
191 | clock-frequency = <390000>; | ||
192 | compatible = "brcm,brcmstb-i2c"; | ||
193 | interrupt-parent = <&upg_irq0_intc>; | ||
194 | reg = <0x406300 0x58>; | ||
195 | interrupts = <26>; | ||
196 | interrupt-names = "upg_bscc"; | ||
197 | status = "disabled"; | ||
198 | }; | ||
199 | |||
200 | bscd: i2c@406380 { | ||
201 | clock-frequency = <390000>; | ||
202 | compatible = "brcm,brcmstb-i2c"; | ||
203 | interrupt-parent = <&upg_irq0_intc>; | ||
204 | reg = <0x406380 0x58>; | ||
205 | interrupts = <27>; | ||
206 | interrupt-names = "upg_bscd"; | ||
207 | status = "disabled"; | ||
208 | }; | ||
209 | |||
210 | bsce: i2c@408980 { | ||
211 | clock-frequency = <390000>; | ||
212 | compatible = "brcm,brcmstb-i2c"; | ||
213 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
214 | reg = <0x408980 0x58>; | ||
215 | interrupts = <27>; | ||
216 | interrupt-names = "upg_bsce"; | ||
217 | status = "disabled"; | ||
218 | }; | ||
219 | |||
220 | pwma: pwm@406580 { | ||
221 | compatible = "brcm,bcm7038-pwm"; | ||
222 | reg = <0x406580 0x28>; | ||
223 | #pwm-cells = <2>; | ||
224 | clocks = <&upg_clk>; | ||
225 | status = "disabled"; | ||
226 | }; | ||
227 | |||
228 | pwmb: pwm@406800 { | ||
229 | compatible = "brcm,bcm7038-pwm"; | ||
230 | reg = <0x406800 0x28>; | ||
231 | #pwm-cells = <2>; | ||
232 | clocks = <&upg_clk>; | ||
233 | status = "disabled"; | ||
234 | }; | ||
235 | |||
236 | watchdog: watchdog@4067e8 { | ||
237 | clocks = <&upg_clk>; | ||
238 | compatible = "brcm,bcm7038-wdt"; | ||
239 | reg = <0x4067e8 0x14>; | ||
240 | status = "disabled"; | ||
241 | }; | ||
242 | |||
243 | aon_pm_l2_intc: interrupt-controller@408440 { | ||
244 | compatible = "brcm,l2-intc"; | ||
245 | reg = <0x408440 0x30>; | ||
246 | interrupt-controller; | ||
247 | #interrupt-cells = <1>; | ||
248 | interrupt-parent = <&periph_intc>; | ||
249 | interrupts = <53>; | ||
250 | brcm,irq-can-wake; | ||
251 | }; | ||
252 | |||
253 | aon_ctrl: syscon@408000 { | ||
254 | compatible = "brcm,brcmstb-aon-ctrl"; | ||
255 | reg = <0x408000 0x100>, <0x408200 0x200>; | ||
256 | reg-names = "aon-ctrl", "aon-sram"; | ||
257 | }; | ||
258 | |||
259 | timers: timer@4067c0 { | ||
260 | compatible = "brcm,brcmstb-timers"; | ||
261 | reg = <0x4067c0 0x40>; | ||
262 | }; | ||
263 | |||
264 | upg_gio: gpio@406700 { | ||
265 | compatible = "brcm,brcmstb-gpio"; | ||
266 | reg = <0x406700 0x60>; | ||
267 | #gpio-cells = <2>; | ||
268 | #interrupt-cells = <2>; | ||
269 | gpio-controller; | ||
270 | interrupt-controller; | ||
271 | interrupt-parent = <&upg_irq0_intc>; | ||
272 | interrupts = <6>; | ||
273 | brcm,gpio-bank-widths = <32 32 16>; | ||
274 | }; | ||
275 | |||
276 | upg_gio_aon: gpio@408c00 { | ||
277 | compatible = "brcm,brcmstb-gpio"; | ||
278 | reg = <0x408c00 0x60>; | ||
279 | #gpio-cells = <2>; | ||
280 | #interrupt-cells = <2>; | ||
281 | gpio-controller; | ||
282 | interrupt-controller; | ||
283 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
284 | interrupts = <6>; | ||
285 | interrupts-extended = <&upg_aon_irq0_intc 6>, | ||
286 | <&aon_pm_l2_intc 5>; | ||
287 | wakeup-source; | ||
288 | brcm,gpio-bank-widths = <27 32 2>; | ||
289 | }; | ||
290 | |||
291 | enet0: ethernet@430000 { | ||
292 | phy-mode = "internal"; | ||
293 | phy-handle = <&phy1>; | ||
294 | mac-address = [ 00 10 18 36 23 1a ]; | ||
295 | compatible = "brcm,genet-v2"; | ||
296 | #address-cells = <0x1>; | ||
297 | #size-cells = <0x1>; | ||
298 | reg = <0x430000 0x4c8c>; | ||
299 | interrupts = <24>, <25>; | ||
300 | interrupt-parent = <&periph_intc>; | ||
301 | status = "disabled"; | ||
302 | |||
303 | mdio@e14 { | ||
304 | compatible = "brcm,genet-mdio-v2"; | ||
305 | #address-cells = <0x1>; | ||
306 | #size-cells = <0x0>; | ||
307 | reg = <0xe14 0x8>; | ||
308 | |||
309 | phy1: ethernet-phy@1 { | ||
310 | max-speed = <100>; | ||
311 | reg = <0x1>; | ||
312 | compatible = "brcm,40nm-ephy", | ||
313 | "ethernet-phy-ieee802.3-c22"; | ||
314 | }; | ||
315 | }; | ||
316 | }; | ||
317 | |||
318 | ehci0: usb@480300 { | ||
319 | compatible = "brcm,bcm7346-ehci", "generic-ehci"; | ||
320 | reg = <0x480300 0x100>; | ||
321 | native-endian; | ||
322 | interrupt-parent = <&periph_intc>; | ||
323 | interrupts = <68>; | ||
324 | status = "disabled"; | ||
325 | }; | ||
326 | |||
327 | ohci0: usb@480400 { | ||
328 | compatible = "brcm,bcm7346-ohci", "generic-ohci"; | ||
329 | reg = <0x480400 0x100>; | ||
330 | native-endian; | ||
331 | no-big-frame-no; | ||
332 | interrupt-parent = <&periph_intc>; | ||
333 | interrupts = <70>; | ||
334 | status = "disabled"; | ||
335 | }; | ||
336 | |||
337 | ehci1: usb@480500 { | ||
338 | compatible = "brcm,bcm7346-ehci", "generic-ehci"; | ||
339 | reg = <0x480500 0x100>; | ||
340 | native-endian; | ||
341 | interrupt-parent = <&periph_intc>; | ||
342 | interrupts = <69>; | ||
343 | status = "disabled"; | ||
344 | }; | ||
345 | |||
346 | ohci1: usb@480600 { | ||
347 | compatible = "brcm,bcm7346-ohci", "generic-ohci"; | ||
348 | reg = <0x480600 0x100>; | ||
349 | native-endian; | ||
350 | no-big-frame-no; | ||
351 | interrupt-parent = <&periph_intc>; | ||
352 | interrupts = <71>; | ||
353 | status = "disabled"; | ||
354 | }; | ||
355 | |||
356 | ehci2: usb@490300 { | ||
357 | compatible = "brcm,bcm7346-ehci", "generic-ehci"; | ||
358 | reg = <0x490300 0x100>; | ||
359 | native-endian; | ||
360 | interrupt-parent = <&periph_intc>; | ||
361 | interrupts = <73>; | ||
362 | status = "disabled"; | ||
363 | }; | ||
364 | |||
365 | ohci2: usb@490400 { | ||
366 | compatible = "brcm,bcm7346-ohci", "generic-ohci"; | ||
367 | reg = <0x490400 0x100>; | ||
368 | native-endian; | ||
369 | no-big-frame-no; | ||
370 | interrupt-parent = <&periph_intc>; | ||
371 | interrupts = <75>; | ||
372 | status = "disabled"; | ||
373 | }; | ||
374 | |||
375 | ehci3: usb@490500 { | ||
376 | compatible = "brcm,bcm7346-ehci", "generic-ehci"; | ||
377 | reg = <0x490500 0x100>; | ||
378 | native-endian; | ||
379 | interrupt-parent = <&periph_intc>; | ||
380 | interrupts = <74>; | ||
381 | status = "disabled"; | ||
382 | }; | ||
383 | |||
384 | ohci3: usb@490600 { | ||
385 | compatible = "brcm,bcm7346-ohci", "generic-ohci"; | ||
386 | reg = <0x490600 0x100>; | ||
387 | native-endian; | ||
388 | no-big-frame-no; | ||
389 | interrupt-parent = <&periph_intc>; | ||
390 | interrupts = <76>; | ||
391 | status = "disabled"; | ||
392 | }; | ||
393 | |||
394 | hif_l2_intc: interrupt-controller@411000 { | ||
395 | compatible = "brcm,l2-intc"; | ||
396 | reg = <0x411000 0x30>; | ||
397 | interrupt-controller; | ||
398 | #interrupt-cells = <1>; | ||
399 | interrupt-parent = <&periph_intc>; | ||
400 | interrupts = <30>; | ||
401 | }; | ||
402 | |||
403 | nand: nand@412800 { | ||
404 | compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand"; | ||
405 | #address-cells = <1>; | ||
406 | #size-cells = <0>; | ||
407 | reg-names = "nand"; | ||
408 | reg = <0x412800 0x400>; | ||
409 | interrupt-parent = <&hif_l2_intc>; | ||
410 | interrupts = <24>; | ||
411 | status = "disabled"; | ||
412 | }; | ||
413 | |||
414 | sata: sata@181000 { | ||
415 | compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci"; | ||
416 | reg-names = "ahci", "top-ctrl"; | ||
417 | reg = <0x181000 0xa9c>, <0x180020 0x1c>; | ||
418 | interrupt-parent = <&periph_intc>; | ||
419 | interrupts = <40>; | ||
420 | #address-cells = <1>; | ||
421 | #size-cells = <0>; | ||
422 | status = "disabled"; | ||
423 | |||
424 | sata0: sata-port@0 { | ||
425 | reg = <0>; | ||
426 | phys = <&sata_phy0>; | ||
427 | }; | ||
428 | |||
429 | sata1: sata-port@1 { | ||
430 | reg = <1>; | ||
431 | phys = <&sata_phy1>; | ||
432 | }; | ||
433 | }; | ||
434 | |||
435 | sata_phy: sata-phy@180100 { | ||
436 | compatible = "brcm,bcm7425-sata-phy", "brcm,phy-sata3"; | ||
437 | reg = <0x180100 0x0eff>; | ||
438 | reg-names = "phy"; | ||
439 | #address-cells = <1>; | ||
440 | #size-cells = <0>; | ||
441 | status = "disabled"; | ||
442 | |||
443 | sata_phy0: sata-phy@0 { | ||
444 | reg = <0>; | ||
445 | #phy-cells = <0>; | ||
446 | }; | ||
447 | |||
448 | sata_phy1: sata-phy@1 { | ||
449 | reg = <1>; | ||
450 | #phy-cells = <0>; | ||
451 | }; | ||
452 | }; | ||
453 | |||
454 | sdhci0: sdhci@413500 { | ||
455 | compatible = "brcm,bcm7425-sdhci"; | ||
456 | reg = <0x413500 0x100>; | ||
457 | interrupt-parent = <&periph_intc>; | ||
458 | interrupts = <85>; | ||
459 | status = "disabled"; | ||
460 | }; | ||
461 | |||
462 | spi_l2_intc: interrupt-controller@411d00 { | ||
463 | compatible = "brcm,l2-intc"; | ||
464 | reg = <0x411d00 0x30>; | ||
465 | interrupt-controller; | ||
466 | #interrupt-cells = <1>; | ||
467 | interrupt-parent = <&periph_intc>; | ||
468 | interrupts = <31>; | ||
469 | }; | ||
470 | |||
471 | qspi: spi@413000 { | ||
472 | #address-cells = <0x1>; | ||
473 | #size-cells = <0x0>; | ||
474 | compatible = "brcm,spi-bcm-qspi", | ||
475 | "brcm,spi-brcmstb-qspi"; | ||
476 | clocks = <&upg_clk>; | ||
477 | reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>; | ||
478 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
479 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
480 | interrupt-parent = <&spi_l2_intc>; | ||
481 | interrupt-names = "spi_lr_fullness_reached", | ||
482 | "spi_lr_session_aborted", | ||
483 | "spi_lr_impatient", | ||
484 | "spi_lr_session_done", | ||
485 | "spi_lr_overread", | ||
486 | "mspi_done", | ||
487 | "mspi_halted"; | ||
488 | status = "disabled"; | ||
489 | }; | ||
490 | |||
491 | mspi: spi@408a00 { | ||
492 | #address-cells = <1>; | ||
493 | #size-cells = <0>; | ||
494 | compatible = "brcm,spi-bcm-qspi", | ||
495 | "brcm,spi-brcmstb-mspi"; | ||
496 | clocks = <&upg_clk>; | ||
497 | reg = <0x408a00 0x180>; | ||
498 | reg-names = "mspi"; | ||
499 | interrupts = <0x14>; | ||
500 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
501 | interrupt-names = "mspi_done"; | ||
502 | status = "disabled"; | ||
503 | }; | ||
504 | |||
505 | waketimer: waketimer@408e80 { | ||
506 | compatible = "brcm,brcmstb-waketimer"; | ||
507 | reg = <0x408e80 0x14>; | ||
508 | interrupts = <0x3>; | ||
509 | interrupt-parent = <&aon_pm_l2_intc>; | ||
510 | interrupt-names = "timer"; | ||
511 | clocks = <&upg_clk>; | ||
512 | status = "disabled"; | ||
513 | }; | ||
514 | }; | ||
515 | |||
516 | memory_controllers { | ||
517 | compatible = "simple-bus"; | ||
518 | ranges = <0x0 0x103b0000 0xa000>; | ||
519 | #address-cells = <1>; | ||
520 | #size-cells = <1>; | ||
521 | |||
522 | memory-controller@0 { | ||
523 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
524 | ranges = <0x0 0x0 0xa000>; | ||
525 | #address-cells = <1>; | ||
526 | #size-cells = <1>; | ||
527 | |||
528 | memc-arb@1000 { | ||
529 | compatible = "brcm,brcmstb-memc-arb"; | ||
530 | reg = <0x1000 0x248>; | ||
531 | }; | ||
532 | |||
533 | memc-ddr@2000 { | ||
534 | compatible = "brcm,brcmstb-memc-ddr"; | ||
535 | reg = <0x2000 0x300>; | ||
536 | }; | ||
537 | |||
538 | ddr-phy@6000 { | ||
539 | compatible = "brcm,brcmstb-ddr-phy"; | ||
540 | reg = <0x6000 0xc8>; | ||
541 | }; | ||
542 | |||
543 | shimphy@8000 { | ||
544 | compatible = "brcm,brcmstb-ddr-shimphy"; | ||
545 | reg = <0x8000 0x13c>; | ||
546 | }; | ||
547 | }; | ||
548 | }; | ||
549 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7358.dtsi b/arch/mips/boot/dts/brcm/bcm7358.dtsi new file mode 100644 index 000000000..6375fc77f --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7358.dtsi | |||
@@ -0,0 +1,383 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7358"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <375000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips3300"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | }; | ||
19 | |||
20 | aliases { | ||
21 | uart0 = &uart0; | ||
22 | }; | ||
23 | |||
24 | cpu_intc: interrupt-controller { | ||
25 | #address-cells = <0>; | ||
26 | compatible = "mti,cpu-interrupt-controller"; | ||
27 | |||
28 | interrupt-controller; | ||
29 | #interrupt-cells = <1>; | ||
30 | }; | ||
31 | |||
32 | clocks { | ||
33 | uart_clk: uart_clk { | ||
34 | compatible = "fixed-clock"; | ||
35 | #clock-cells = <0>; | ||
36 | clock-frequency = <81000000>; | ||
37 | }; | ||
38 | |||
39 | upg_clk: upg_clk { | ||
40 | compatible = "fixed-clock"; | ||
41 | #clock-cells = <0>; | ||
42 | clock-frequency = <27000000>; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | rdb { | ||
47 | #address-cells = <1>; | ||
48 | #size-cells = <1>; | ||
49 | |||
50 | compatible = "simple-bus"; | ||
51 | ranges = <0 0x10000000 0x01000000>; | ||
52 | |||
53 | periph_intc: interrupt-controller@411400 { | ||
54 | compatible = "brcm,bcm7038-l1-intc"; | ||
55 | reg = <0x411400 0x30>; | ||
56 | |||
57 | interrupt-controller; | ||
58 | #interrupt-cells = <1>; | ||
59 | |||
60 | interrupt-parent = <&cpu_intc>; | ||
61 | interrupts = <2>; | ||
62 | }; | ||
63 | |||
64 | sun_l2_intc: interrupt-controller@403000 { | ||
65 | compatible = "brcm,l2-intc"; | ||
66 | reg = <0x403000 0x30>; | ||
67 | interrupt-controller; | ||
68 | #interrupt-cells = <1>; | ||
69 | interrupt-parent = <&periph_intc>; | ||
70 | interrupts = <48>; | ||
71 | }; | ||
72 | |||
73 | gisb-arb@400000 { | ||
74 | compatible = "brcm,bcm7400-gisb-arb"; | ||
75 | reg = <0x400000 0xdc>; | ||
76 | native-endian; | ||
77 | interrupt-parent = <&sun_l2_intc>; | ||
78 | interrupts = <0>, <2>; | ||
79 | brcm,gisb-arb-master-mask = <0x2f3>; | ||
80 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0", | ||
81 | "rdc_0", "raaga_0", | ||
82 | "avd_0", "jtag_0"; | ||
83 | }; | ||
84 | |||
85 | upg_irq0_intc: interrupt-controller@406600 { | ||
86 | compatible = "brcm,bcm7120-l2-intc"; | ||
87 | reg = <0x406600 0x8>; | ||
88 | |||
89 | brcm,int-map-mask = <0x44>, <0x7000000>; | ||
90 | brcm,int-fwd-mask = <0x70000>; | ||
91 | |||
92 | interrupt-controller; | ||
93 | #interrupt-cells = <1>; | ||
94 | |||
95 | interrupt-parent = <&periph_intc>; | ||
96 | interrupts = <56>, <54>; | ||
97 | interrupt-names = "upg_main", "upg_bsc"; | ||
98 | }; | ||
99 | |||
100 | upg_aon_irq0_intc: interrupt-controller@408b80 { | ||
101 | compatible = "brcm,bcm7120-l2-intc"; | ||
102 | reg = <0x408b80 0x8>; | ||
103 | |||
104 | brcm,int-map-mask = <0x40>, <0x8000000>, <0x100000>; | ||
105 | brcm,int-fwd-mask = <0>; | ||
106 | brcm,irq-can-wake; | ||
107 | |||
108 | interrupt-controller; | ||
109 | #interrupt-cells = <1>; | ||
110 | |||
111 | interrupt-parent = <&periph_intc>; | ||
112 | interrupts = <57>, <55>, <59>; | ||
113 | interrupt-names = "upg_main_aon", "upg_bsc_aon", | ||
114 | "upg_spi"; | ||
115 | }; | ||
116 | |||
117 | sun_top_ctrl: syscon@404000 { | ||
118 | compatible = "brcm,bcm7358-sun-top-ctrl", "syscon"; | ||
119 | reg = <0x404000 0x51c>; | ||
120 | native-endian; | ||
121 | }; | ||
122 | |||
123 | reboot { | ||
124 | compatible = "brcm,brcmstb-reboot"; | ||
125 | syscon = <&sun_top_ctrl 0x304 0x308>; | ||
126 | }; | ||
127 | |||
128 | uart0: serial@406800 { | ||
129 | compatible = "ns16550a"; | ||
130 | reg = <0x406800 0x20>; | ||
131 | reg-io-width = <0x4>; | ||
132 | reg-shift = <0x2>; | ||
133 | native-endian; | ||
134 | interrupt-parent = <&periph_intc>; | ||
135 | interrupts = <61>; | ||
136 | clocks = <&uart_clk>; | ||
137 | status = "disabled"; | ||
138 | }; | ||
139 | |||
140 | uart1: serial@406840 { | ||
141 | compatible = "ns16550a"; | ||
142 | reg = <0x406840 0x20>; | ||
143 | reg-io-width = <0x4>; | ||
144 | reg-shift = <0x2>; | ||
145 | native-endian; | ||
146 | interrupt-parent = <&periph_intc>; | ||
147 | interrupts = <62>; | ||
148 | clocks = <&uart_clk>; | ||
149 | status = "disabled"; | ||
150 | }; | ||
151 | |||
152 | uart2: serial@406880 { | ||
153 | compatible = "ns16550a"; | ||
154 | reg = <0x406880 0x20>; | ||
155 | reg-io-width = <0x4>; | ||
156 | reg-shift = <0x2>; | ||
157 | native-endian; | ||
158 | interrupt-parent = <&periph_intc>; | ||
159 | interrupts = <63>; | ||
160 | clocks = <&uart_clk>; | ||
161 | status = "disabled"; | ||
162 | }; | ||
163 | |||
164 | bsca: i2c@406200 { | ||
165 | clock-frequency = <390000>; | ||
166 | compatible = "brcm,brcmstb-i2c"; | ||
167 | interrupt-parent = <&upg_irq0_intc>; | ||
168 | reg = <0x406200 0x58>; | ||
169 | interrupts = <24>; | ||
170 | interrupt-names = "upg_bsca"; | ||
171 | status = "disabled"; | ||
172 | }; | ||
173 | |||
174 | bscb: i2c@406280 { | ||
175 | clock-frequency = <390000>; | ||
176 | compatible = "brcm,brcmstb-i2c"; | ||
177 | interrupt-parent = <&upg_irq0_intc>; | ||
178 | reg = <0x406280 0x58>; | ||
179 | interrupts = <25>; | ||
180 | interrupt-names = "upg_bscb"; | ||
181 | status = "disabled"; | ||
182 | }; | ||
183 | |||
184 | bscc: i2c@406300 { | ||
185 | clock-frequency = <390000>; | ||
186 | compatible = "brcm,brcmstb-i2c"; | ||
187 | interrupt-parent = <&upg_irq0_intc>; | ||
188 | reg = <0x406300 0x58>; | ||
189 | interrupts = <26>; | ||
190 | interrupt-names = "upg_bscc"; | ||
191 | status = "disabled"; | ||
192 | }; | ||
193 | |||
194 | bscd: i2c@408980 { | ||
195 | clock-frequency = <390000>; | ||
196 | compatible = "brcm,brcmstb-i2c"; | ||
197 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
198 | reg = <0x408980 0x58>; | ||
199 | interrupts = <27>; | ||
200 | interrupt-names = "upg_bscd"; | ||
201 | status = "disabled"; | ||
202 | }; | ||
203 | |||
204 | pwma: pwm@406400 { | ||
205 | compatible = "brcm,bcm7038-pwm"; | ||
206 | reg = <0x406400 0x28>; | ||
207 | #pwm-cells = <2>; | ||
208 | clocks = <&upg_clk>; | ||
209 | status = "disabled"; | ||
210 | }; | ||
211 | |||
212 | pwmb: pwm@406700 { | ||
213 | compatible = "brcm,bcm7038-pwm"; | ||
214 | reg = <0x406700 0x28>; | ||
215 | #pwm-cells = <2>; | ||
216 | clocks = <&upg_clk>; | ||
217 | status = "disabled"; | ||
218 | }; | ||
219 | |||
220 | watchdog: watchdog@4066a8 { | ||
221 | clocks = <&upg_clk>; | ||
222 | compatible = "brcm,bcm7038-wdt"; | ||
223 | reg = <0x4066a8 0x14>; | ||
224 | status = "disabled"; | ||
225 | }; | ||
226 | |||
227 | aon_pm_l2_intc: interrupt-controller@408240 { | ||
228 | compatible = "brcm,l2-intc"; | ||
229 | reg = <0x408240 0x30>; | ||
230 | interrupt-controller; | ||
231 | #interrupt-cells = <1>; | ||
232 | interrupt-parent = <&periph_intc>; | ||
233 | interrupts = <50>; | ||
234 | brcm,irq-can-wake; | ||
235 | }; | ||
236 | |||
237 | upg_gio: gpio@406500 { | ||
238 | compatible = "brcm,brcmstb-gpio"; | ||
239 | reg = <0x406500 0xa0>; | ||
240 | #gpio-cells = <2>; | ||
241 | #interrupt-cells = <2>; | ||
242 | gpio-controller; | ||
243 | interrupt-controller; | ||
244 | interrupt-parent = <&upg_irq0_intc>; | ||
245 | interrupts = <6>; | ||
246 | brcm,gpio-bank-widths = <32 32 32 29 4>; | ||
247 | }; | ||
248 | |||
249 | upg_gio_aon: gpio@408c00 { | ||
250 | compatible = "brcm,brcmstb-gpio"; | ||
251 | reg = <0x408c00 0x60>; | ||
252 | #gpio-cells = <2>; | ||
253 | #interrupt-cells = <2>; | ||
254 | gpio-controller; | ||
255 | interrupt-controller; | ||
256 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
257 | interrupts = <6>; | ||
258 | interrupts-extended = <&upg_aon_irq0_intc 6>, | ||
259 | <&aon_pm_l2_intc 5>; | ||
260 | wakeup-source; | ||
261 | brcm,gpio-bank-widths = <21 32 2>; | ||
262 | }; | ||
263 | |||
264 | enet0: ethernet@430000 { | ||
265 | phy-mode = "internal"; | ||
266 | phy-handle = <&phy1>; | ||
267 | mac-address = [ 00 10 18 36 23 1a ]; | ||
268 | compatible = "brcm,genet-v2"; | ||
269 | #address-cells = <0x1>; | ||
270 | #size-cells = <0x1>; | ||
271 | reg = <0x430000 0x4c8c>; | ||
272 | interrupts = <24>, <25>; | ||
273 | interrupt-parent = <&periph_intc>; | ||
274 | status = "disabled"; | ||
275 | |||
276 | mdio@e14 { | ||
277 | compatible = "brcm,genet-mdio-v2"; | ||
278 | #address-cells = <0x1>; | ||
279 | #size-cells = <0x0>; | ||
280 | reg = <0xe14 0x8>; | ||
281 | |||
282 | phy1: ethernet-phy@1 { | ||
283 | max-speed = <100>; | ||
284 | reg = <0x1>; | ||
285 | compatible = "brcm,40nm-ephy", | ||
286 | "ethernet-phy-ieee802.3-c22"; | ||
287 | }; | ||
288 | }; | ||
289 | }; | ||
290 | |||
291 | ehci0: usb@480300 { | ||
292 | compatible = "brcm,bcm7358-ehci", "generic-ehci"; | ||
293 | reg = <0x480300 0x100>; | ||
294 | native-endian; | ||
295 | interrupt-parent = <&periph_intc>; | ||
296 | interrupts = <65>; | ||
297 | status = "disabled"; | ||
298 | }; | ||
299 | |||
300 | ohci0: usb@480400 { | ||
301 | compatible = "brcm,bcm7358-ohci", "generic-ohci"; | ||
302 | reg = <0x480400 0x100>; | ||
303 | native-endian; | ||
304 | no-big-frame-no; | ||
305 | interrupt-parent = <&periph_intc>; | ||
306 | interrupts = <66>; | ||
307 | status = "disabled"; | ||
308 | }; | ||
309 | |||
310 | hif_l2_intc: interrupt-controller@411000 { | ||
311 | compatible = "brcm,l2-intc"; | ||
312 | reg = <0x411000 0x30>; | ||
313 | interrupt-controller; | ||
314 | #interrupt-cells = <1>; | ||
315 | interrupt-parent = <&periph_intc>; | ||
316 | interrupts = <30>; | ||
317 | }; | ||
318 | |||
319 | nand: nand@412800 { | ||
320 | compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand"; | ||
321 | #address-cells = <1>; | ||
322 | #size-cells = <0>; | ||
323 | reg-names = "nand"; | ||
324 | reg = <0x412800 0x400>; | ||
325 | interrupt-parent = <&hif_l2_intc>; | ||
326 | interrupts = <24>; | ||
327 | status = "disabled"; | ||
328 | }; | ||
329 | |||
330 | spi_l2_intc: interrupt-controller@411d00 { | ||
331 | compatible = "brcm,l2-intc"; | ||
332 | reg = <0x411d00 0x30>; | ||
333 | interrupt-controller; | ||
334 | #interrupt-cells = <1>; | ||
335 | interrupt-parent = <&periph_intc>; | ||
336 | interrupts = <31>; | ||
337 | }; | ||
338 | |||
339 | qspi: spi@413000 { | ||
340 | #address-cells = <0x1>; | ||
341 | #size-cells = <0x0>; | ||
342 | compatible = "brcm,spi-bcm-qspi", | ||
343 | "brcm,spi-brcmstb-qspi"; | ||
344 | clocks = <&upg_clk>; | ||
345 | reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>; | ||
346 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
347 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
348 | interrupt-parent = <&spi_l2_intc>; | ||
349 | interrupt-names = "spi_lr_fullness_reached", | ||
350 | "spi_lr_session_aborted", | ||
351 | "spi_lr_impatient", | ||
352 | "spi_lr_session_done", | ||
353 | "spi_lr_overread", | ||
354 | "mspi_done", | ||
355 | "mspi_halted"; | ||
356 | status = "disabled"; | ||
357 | }; | ||
358 | |||
359 | mspi: spi@408a00 { | ||
360 | #address-cells = <1>; | ||
361 | #size-cells = <0>; | ||
362 | compatible = "brcm,spi-bcm-qspi", | ||
363 | "brcm,spi-brcmstb-mspi"; | ||
364 | clocks = <&upg_clk>; | ||
365 | reg = <0x408a00 0x180>; | ||
366 | reg-names = "mspi"; | ||
367 | interrupts = <0x14>; | ||
368 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
369 | interrupt-names = "mspi_done"; | ||
370 | status = "disabled"; | ||
371 | }; | ||
372 | |||
373 | waketimer: waketimer@408e80 { | ||
374 | compatible = "brcm,brcmstb-waketimer"; | ||
375 | reg = <0x408e80 0x14>; | ||
376 | interrupts = <0x3>; | ||
377 | interrupt-parent = <&aon_pm_l2_intc>; | ||
378 | interrupt-names = "timer"; | ||
379 | clocks = <&upg_clk>; | ||
380 | status = "disabled"; | ||
381 | }; | ||
382 | }; | ||
383 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7360.dtsi b/arch/mips/boot/dts/brcm/bcm7360.dtsi new file mode 100644 index 000000000..a57cacea9 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7360.dtsi | |||
@@ -0,0 +1,468 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7360"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <375000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips3300"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | }; | ||
19 | |||
20 | aliases { | ||
21 | uart0 = &uart0; | ||
22 | }; | ||
23 | |||
24 | cpu_intc: interrupt-controller { | ||
25 | #address-cells = <0>; | ||
26 | compatible = "mti,cpu-interrupt-controller"; | ||
27 | |||
28 | interrupt-controller; | ||
29 | #interrupt-cells = <1>; | ||
30 | }; | ||
31 | |||
32 | clocks { | ||
33 | uart_clk: uart_clk { | ||
34 | compatible = "fixed-clock"; | ||
35 | #clock-cells = <0>; | ||
36 | clock-frequency = <81000000>; | ||
37 | }; | ||
38 | |||
39 | upg_clk: upg_clk { | ||
40 | compatible = "fixed-clock"; | ||
41 | #clock-cells = <0>; | ||
42 | clock-frequency = <27000000>; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | rdb { | ||
47 | #address-cells = <1>; | ||
48 | #size-cells = <1>; | ||
49 | |||
50 | compatible = "simple-bus"; | ||
51 | ranges = <0 0x10000000 0x01000000>; | ||
52 | |||
53 | periph_intc: interrupt-controller@411400 { | ||
54 | compatible = "brcm,bcm7038-l1-intc"; | ||
55 | reg = <0x411400 0x30>; | ||
56 | |||
57 | interrupt-controller; | ||
58 | #interrupt-cells = <1>; | ||
59 | |||
60 | interrupt-parent = <&cpu_intc>; | ||
61 | interrupts = <2>; | ||
62 | }; | ||
63 | |||
64 | sun_l2_intc: interrupt-controller@403000 { | ||
65 | compatible = "brcm,l2-intc"; | ||
66 | reg = <0x403000 0x30>; | ||
67 | interrupt-controller; | ||
68 | #interrupt-cells = <1>; | ||
69 | interrupt-parent = <&periph_intc>; | ||
70 | interrupts = <48>; | ||
71 | }; | ||
72 | |||
73 | gisb-arb@400000 { | ||
74 | compatible = "brcm,bcm7400-gisb-arb"; | ||
75 | reg = <0x400000 0xdc>; | ||
76 | native-endian; | ||
77 | interrupt-parent = <&sun_l2_intc>; | ||
78 | interrupts = <0>, <2>; | ||
79 | brcm,gisb-arb-master-mask = <0x2f3>; | ||
80 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0", | ||
81 | "rdc_0", "raaga_0", | ||
82 | "avd_0", "jtag_0"; | ||
83 | }; | ||
84 | |||
85 | upg_irq0_intc: interrupt-controller@406600 { | ||
86 | compatible = "brcm,bcm7120-l2-intc"; | ||
87 | reg = <0x406600 0x8>; | ||
88 | |||
89 | brcm,int-map-mask = <0x44>, <0x7000000>; | ||
90 | brcm,int-fwd-mask = <0x70000>; | ||
91 | |||
92 | interrupt-controller; | ||
93 | #interrupt-cells = <1>; | ||
94 | |||
95 | interrupt-parent = <&periph_intc>; | ||
96 | interrupts = <56>, <54>; | ||
97 | interrupt-names = "upg_main", "upg_bsc"; | ||
98 | }; | ||
99 | |||
100 | upg_aon_irq0_intc: interrupt-controller@408b80 { | ||
101 | compatible = "brcm,bcm7120-l2-intc"; | ||
102 | reg = <0x408b80 0x8>; | ||
103 | |||
104 | brcm,int-map-mask = <0x40>, <0x8000000>, <0x100000>; | ||
105 | brcm,int-fwd-mask = <0>; | ||
106 | brcm,irq-can-wake; | ||
107 | |||
108 | interrupt-controller; | ||
109 | #interrupt-cells = <1>; | ||
110 | |||
111 | interrupt-parent = <&periph_intc>; | ||
112 | interrupts = <57>, <55>, <59>; | ||
113 | interrupt-names = "upg_main_aon", "upg_bsc_aon", | ||
114 | "upg_spi"; | ||
115 | }; | ||
116 | |||
117 | sun_top_ctrl: syscon@404000 { | ||
118 | compatible = "brcm,bcm7360-sun-top-ctrl", "syscon"; | ||
119 | reg = <0x404000 0x51c>; | ||
120 | native-endian; | ||
121 | }; | ||
122 | |||
123 | reboot { | ||
124 | compatible = "brcm,brcmstb-reboot"; | ||
125 | syscon = <&sun_top_ctrl 0x304 0x308>; | ||
126 | }; | ||
127 | |||
128 | uart0: serial@406800 { | ||
129 | compatible = "ns16550a"; | ||
130 | reg = <0x406800 0x20>; | ||
131 | reg-io-width = <0x4>; | ||
132 | reg-shift = <0x2>; | ||
133 | native-endian; | ||
134 | interrupt-parent = <&periph_intc>; | ||
135 | interrupts = <61>; | ||
136 | clocks = <&uart_clk>; | ||
137 | status = "disabled"; | ||
138 | }; | ||
139 | |||
140 | uart1: serial@406840 { | ||
141 | compatible = "ns16550a"; | ||
142 | reg = <0x406840 0x20>; | ||
143 | reg-io-width = <0x4>; | ||
144 | reg-shift = <0x2>; | ||
145 | native-endian; | ||
146 | interrupt-parent = <&periph_intc>; | ||
147 | interrupts = <62>; | ||
148 | clocks = <&uart_clk>; | ||
149 | status = "disabled"; | ||
150 | }; | ||
151 | |||
152 | uart2: serial@406880 { | ||
153 | compatible = "ns16550a"; | ||
154 | reg = <0x406880 0x20>; | ||
155 | reg-io-width = <0x4>; | ||
156 | reg-shift = <0x2>; | ||
157 | native-endian; | ||
158 | interrupt-parent = <&periph_intc>; | ||
159 | interrupts = <63>; | ||
160 | clocks = <&uart_clk>; | ||
161 | status = "disabled"; | ||
162 | }; | ||
163 | |||
164 | bsca: i2c@406200 { | ||
165 | clock-frequency = <390000>; | ||
166 | compatible = "brcm,brcmstb-i2c"; | ||
167 | interrupt-parent = <&upg_irq0_intc>; | ||
168 | reg = <0x406200 0x58>; | ||
169 | interrupts = <24>; | ||
170 | interrupt-names = "upg_bsca"; | ||
171 | status = "disabled"; | ||
172 | }; | ||
173 | |||
174 | bscb: i2c@406280 { | ||
175 | clock-frequency = <390000>; | ||
176 | compatible = "brcm,brcmstb-i2c"; | ||
177 | interrupt-parent = <&upg_irq0_intc>; | ||
178 | reg = <0x406280 0x58>; | ||
179 | interrupts = <25>; | ||
180 | interrupt-names = "upg_bscb"; | ||
181 | status = "disabled"; | ||
182 | }; | ||
183 | |||
184 | bscc: i2c@406300 { | ||
185 | clock-frequency = <390000>; | ||
186 | compatible = "brcm,brcmstb-i2c"; | ||
187 | interrupt-parent = <&upg_irq0_intc>; | ||
188 | reg = <0x406300 0x58>; | ||
189 | interrupts = <26>; | ||
190 | interrupt-names = "upg_bscc"; | ||
191 | status = "disabled"; | ||
192 | }; | ||
193 | |||
194 | bscd: i2c@408980 { | ||
195 | clock-frequency = <390000>; | ||
196 | compatible = "brcm,brcmstb-i2c"; | ||
197 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
198 | reg = <0x408980 0x58>; | ||
199 | interrupts = <27>; | ||
200 | interrupt-names = "upg_bscd"; | ||
201 | status = "disabled"; | ||
202 | }; | ||
203 | |||
204 | pwma: pwm@406400 { | ||
205 | compatible = "brcm,bcm7038-pwm"; | ||
206 | reg = <0x406400 0x28>; | ||
207 | #pwm-cells = <2>; | ||
208 | clocks = <&upg_clk>; | ||
209 | status = "disabled"; | ||
210 | }; | ||
211 | |||
212 | watchdog: watchdog@4066a8 { | ||
213 | clocks = <&upg_clk>; | ||
214 | compatible = "brcm,bcm7038-wdt"; | ||
215 | reg = <0x4066a8 0x14>; | ||
216 | status = "disabled"; | ||
217 | }; | ||
218 | |||
219 | aon_pm_l2_intc: interrupt-controller@408440 { | ||
220 | compatible = "brcm,l2-intc"; | ||
221 | reg = <0x408440 0x30>; | ||
222 | interrupt-controller; | ||
223 | #interrupt-cells = <1>; | ||
224 | interrupt-parent = <&periph_intc>; | ||
225 | interrupts = <50>; | ||
226 | brcm,irq-can-wake; | ||
227 | }; | ||
228 | |||
229 | aon_ctrl: syscon@408000 { | ||
230 | compatible = "brcm,brcmstb-aon-ctrl"; | ||
231 | reg = <0x408000 0x100>, <0x408200 0x200>; | ||
232 | reg-names = "aon-ctrl", "aon-sram"; | ||
233 | }; | ||
234 | |||
235 | timers: timer@406680 { | ||
236 | compatible = "brcm,brcmstb-timers"; | ||
237 | reg = <0x406680 0x40>; | ||
238 | }; | ||
239 | |||
240 | upg_gio: gpio@406500 { | ||
241 | compatible = "brcm,brcmstb-gpio"; | ||
242 | reg = <0x406500 0xa0>; | ||
243 | #gpio-cells = <2>; | ||
244 | #interrupt-cells = <2>; | ||
245 | gpio-controller; | ||
246 | interrupt-controller; | ||
247 | interrupt-parent = <&upg_irq0_intc>; | ||
248 | interrupts = <6>; | ||
249 | brcm,gpio-bank-widths = <32 32 32 29 4>; | ||
250 | }; | ||
251 | |||
252 | upg_gio_aon: gpio@408c00 { | ||
253 | compatible = "brcm,brcmstb-gpio"; | ||
254 | reg = <0x408c00 0x60>; | ||
255 | #gpio-cells = <2>; | ||
256 | #interrupt-cells = <2>; | ||
257 | gpio-controller; | ||
258 | interrupt-controller; | ||
259 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
260 | interrupts = <6>; | ||
261 | interrupts-extended = <&upg_aon_irq0_intc 6>, | ||
262 | <&aon_pm_l2_intc 5>; | ||
263 | wakeup-source; | ||
264 | brcm,gpio-bank-widths = <21 32 2>; | ||
265 | }; | ||
266 | |||
267 | enet0: ethernet@430000 { | ||
268 | phy-mode = "internal"; | ||
269 | phy-handle = <&phy1>; | ||
270 | mac-address = [ 00 10 18 36 23 1a ]; | ||
271 | compatible = "brcm,genet-v2"; | ||
272 | #address-cells = <0x1>; | ||
273 | #size-cells = <0x1>; | ||
274 | reg = <0x430000 0x4c8c>; | ||
275 | interrupts = <24>, <25>; | ||
276 | interrupt-parent = <&periph_intc>; | ||
277 | status = "disabled"; | ||
278 | |||
279 | mdio@e14 { | ||
280 | compatible = "brcm,genet-mdio-v2"; | ||
281 | #address-cells = <0x1>; | ||
282 | #size-cells = <0x0>; | ||
283 | reg = <0xe14 0x8>; | ||
284 | |||
285 | phy1: ethernet-phy@1 { | ||
286 | max-speed = <100>; | ||
287 | reg = <0x1>; | ||
288 | compatible = "brcm,40nm-ephy", | ||
289 | "ethernet-phy-ieee802.3-c22"; | ||
290 | }; | ||
291 | }; | ||
292 | }; | ||
293 | |||
294 | ehci0: usb@480300 { | ||
295 | compatible = "brcm,bcm7360-ehci", "generic-ehci"; | ||
296 | reg = <0x480300 0x100>; | ||
297 | native-endian; | ||
298 | interrupt-parent = <&periph_intc>; | ||
299 | interrupts = <65>; | ||
300 | status = "disabled"; | ||
301 | }; | ||
302 | |||
303 | ohci0: usb@480400 { | ||
304 | compatible = "brcm,bcm7360-ohci", "generic-ohci"; | ||
305 | reg = <0x480400 0x100>; | ||
306 | native-endian; | ||
307 | no-big-frame-no; | ||
308 | interrupt-parent = <&periph_intc>; | ||
309 | interrupts = <66>; | ||
310 | status = "disabled"; | ||
311 | }; | ||
312 | |||
313 | hif_l2_intc: interrupt-controller@411000 { | ||
314 | compatible = "brcm,l2-intc"; | ||
315 | reg = <0x411000 0x30>; | ||
316 | interrupt-controller; | ||
317 | #interrupt-cells = <1>; | ||
318 | interrupt-parent = <&periph_intc>; | ||
319 | interrupts = <30>; | ||
320 | }; | ||
321 | |||
322 | nand: nand@412800 { | ||
323 | compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand"; | ||
324 | #address-cells = <1>; | ||
325 | #size-cells = <0>; | ||
326 | reg-names = "nand"; | ||
327 | reg = <0x412800 0x400>; | ||
328 | interrupt-parent = <&hif_l2_intc>; | ||
329 | interrupts = <24>; | ||
330 | status = "disabled"; | ||
331 | }; | ||
332 | |||
333 | sata: sata@181000 { | ||
334 | compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci"; | ||
335 | reg-names = "ahci", "top-ctrl"; | ||
336 | reg = <0x181000 0xa9c>, <0x180020 0x1c>; | ||
337 | interrupt-parent = <&periph_intc>; | ||
338 | interrupts = <86>; | ||
339 | #address-cells = <1>; | ||
340 | #size-cells = <0>; | ||
341 | status = "disabled"; | ||
342 | |||
343 | sata0: sata-port@0 { | ||
344 | reg = <0>; | ||
345 | phys = <&sata_phy0>; | ||
346 | }; | ||
347 | |||
348 | sata1: sata-port@1 { | ||
349 | reg = <1>; | ||
350 | phys = <&sata_phy1>; | ||
351 | }; | ||
352 | }; | ||
353 | |||
354 | sata_phy: sata-phy@180100 { | ||
355 | compatible = "brcm,bcm7425-sata-phy", "brcm,phy-sata3"; | ||
356 | reg = <0x180100 0x0eff>; | ||
357 | reg-names = "phy"; | ||
358 | #address-cells = <1>; | ||
359 | #size-cells = <0>; | ||
360 | status = "disabled"; | ||
361 | |||
362 | sata_phy0: sata-phy@0 { | ||
363 | reg = <0>; | ||
364 | #phy-cells = <0>; | ||
365 | }; | ||
366 | |||
367 | sata_phy1: sata-phy@1 { | ||
368 | reg = <1>; | ||
369 | #phy-cells = <0>; | ||
370 | }; | ||
371 | }; | ||
372 | |||
373 | sdhci0: sdhci@410000 { | ||
374 | compatible = "brcm,bcm7425-sdhci"; | ||
375 | reg = <0x410000 0x100>; | ||
376 | interrupt-parent = <&periph_intc>; | ||
377 | interrupts = <82>; | ||
378 | status = "disabled"; | ||
379 | }; | ||
380 | |||
381 | spi_l2_intc: interrupt-controller@411d00 { | ||
382 | compatible = "brcm,l2-intc"; | ||
383 | reg = <0x411d00 0x30>; | ||
384 | interrupt-controller; | ||
385 | #interrupt-cells = <1>; | ||
386 | interrupt-parent = <&periph_intc>; | ||
387 | interrupts = <31>; | ||
388 | }; | ||
389 | |||
390 | qspi: spi@413000 { | ||
391 | #address-cells = <0x1>; | ||
392 | #size-cells = <0x0>; | ||
393 | compatible = "brcm,spi-bcm-qspi", | ||
394 | "brcm,spi-brcmstb-qspi"; | ||
395 | clocks = <&upg_clk>; | ||
396 | reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>; | ||
397 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
398 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
399 | interrupt-parent = <&spi_l2_intc>; | ||
400 | interrupt-names = "spi_lr_fullness_reached", | ||
401 | "spi_lr_session_aborted", | ||
402 | "spi_lr_impatient", | ||
403 | "spi_lr_session_done", | ||
404 | "spi_lr_overread", | ||
405 | "mspi_done", | ||
406 | "mspi_halted"; | ||
407 | status = "disabled"; | ||
408 | }; | ||
409 | |||
410 | mspi: spi@408a00 { | ||
411 | #address-cells = <1>; | ||
412 | #size-cells = <0>; | ||
413 | compatible = "brcm,spi-bcm-qspi", | ||
414 | "brcm,spi-brcmstb-mspi"; | ||
415 | clocks = <&upg_clk>; | ||
416 | reg = <0x408a00 0x180>; | ||
417 | reg-names = "mspi"; | ||
418 | interrupts = <0x14>; | ||
419 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
420 | interrupt-names = "mspi_done"; | ||
421 | status = "disabled"; | ||
422 | }; | ||
423 | |||
424 | waketimer: waketimer@408e80 { | ||
425 | compatible = "brcm,brcmstb-waketimer"; | ||
426 | reg = <0x408e80 0x14>; | ||
427 | interrupts = <0x3>; | ||
428 | interrupt-parent = <&aon_pm_l2_intc>; | ||
429 | interrupt-names = "timer"; | ||
430 | clocks = <&upg_clk>; | ||
431 | status = "disabled"; | ||
432 | }; | ||
433 | }; | ||
434 | |||
435 | memory_controllers { | ||
436 | compatible = "simple-bus"; | ||
437 | ranges = <0x0 0x103b0000 0xa000>; | ||
438 | #address-cells = <1>; | ||
439 | #size-cells = <1>; | ||
440 | |||
441 | memory-controller@0 { | ||
442 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
443 | ranges = <0x0 0x0 0xa000>; | ||
444 | #address-cells = <1>; | ||
445 | #size-cells = <1>; | ||
446 | |||
447 | memc-arb@1000 { | ||
448 | compatible = "brcm,brcmstb-memc-arb"; | ||
449 | reg = <0x1000 0x248>; | ||
450 | }; | ||
451 | |||
452 | memc-ddr@2000 { | ||
453 | compatible = "brcm,brcmstb-memc-ddr"; | ||
454 | reg = <0x2000 0x300>; | ||
455 | }; | ||
456 | |||
457 | ddr-phy@6000 { | ||
458 | compatible = "brcm,brcmstb-ddr-phy"; | ||
459 | reg = <0x6000 0xc8>; | ||
460 | }; | ||
461 | |||
462 | shimphy@8000 { | ||
463 | compatible = "brcm,brcmstb-ddr-shimphy"; | ||
464 | reg = <0x8000 0x13c>; | ||
465 | }; | ||
466 | }; | ||
467 | }; | ||
468 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7362.dtsi b/arch/mips/boot/dts/brcm/bcm7362.dtsi new file mode 100644 index 000000000..728b9e9f8 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7362.dtsi | |||
@@ -0,0 +1,464 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7362"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <375000000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips4380"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips4380"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | aliases { | ||
27 | uart0 = &uart0; | ||
28 | }; | ||
29 | |||
30 | cpu_intc: interrupt-controller { | ||
31 | #address-cells = <0>; | ||
32 | compatible = "mti,cpu-interrupt-controller"; | ||
33 | |||
34 | interrupt-controller; | ||
35 | #interrupt-cells = <1>; | ||
36 | }; | ||
37 | |||
38 | clocks { | ||
39 | uart_clk: uart_clk { | ||
40 | compatible = "fixed-clock"; | ||
41 | #clock-cells = <0>; | ||
42 | clock-frequency = <81000000>; | ||
43 | }; | ||
44 | |||
45 | upg_clk: upg_clk { | ||
46 | compatible = "fixed-clock"; | ||
47 | #clock-cells = <0>; | ||
48 | clock-frequency = <27000000>; | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | rdb { | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <1>; | ||
55 | |||
56 | compatible = "simple-bus"; | ||
57 | ranges = <0 0x10000000 0x01000000>; | ||
58 | |||
59 | periph_intc: interrupt-controller@411400 { | ||
60 | compatible = "brcm,bcm7038-l1-intc"; | ||
61 | reg = <0x411400 0x30>, <0x411600 0x30>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <1>; | ||
65 | |||
66 | interrupt-parent = <&cpu_intc>; | ||
67 | interrupts = <2>, <3>; | ||
68 | }; | ||
69 | |||
70 | sun_l2_intc: interrupt-controller@403000 { | ||
71 | compatible = "brcm,l2-intc"; | ||
72 | reg = <0x403000 0x30>; | ||
73 | interrupt-controller; | ||
74 | #interrupt-cells = <1>; | ||
75 | interrupt-parent = <&periph_intc>; | ||
76 | interrupts = <48>; | ||
77 | }; | ||
78 | |||
79 | gisb-arb@400000 { | ||
80 | compatible = "brcm,bcm7400-gisb-arb"; | ||
81 | reg = <0x400000 0xdc>; | ||
82 | native-endian; | ||
83 | interrupt-parent = <&sun_l2_intc>; | ||
84 | interrupts = <0>, <2>; | ||
85 | brcm,gisb-arb-master-mask = <0x2f3>; | ||
86 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "bsp_0", | ||
87 | "rdc_0", "raaga_0", | ||
88 | "avd_0", "jtag_0"; | ||
89 | }; | ||
90 | |||
91 | upg_irq0_intc: interrupt-controller@406600 { | ||
92 | compatible = "brcm,bcm7120-l2-intc"; | ||
93 | reg = <0x406600 0x8>; | ||
94 | |||
95 | brcm,int-map-mask = <0x44>, <0x7000000>; | ||
96 | brcm,int-fwd-mask = <0x70000>; | ||
97 | |||
98 | interrupt-controller; | ||
99 | #interrupt-cells = <1>; | ||
100 | |||
101 | interrupt-parent = <&periph_intc>; | ||
102 | interrupts = <56>, <54>; | ||
103 | interrupt-names = "upg_main", "upg_bsc"; | ||
104 | }; | ||
105 | |||
106 | upg_aon_irq0_intc: interrupt-controller@408b80 { | ||
107 | compatible = "brcm,bcm7120-l2-intc"; | ||
108 | reg = <0x408b80 0x8>; | ||
109 | |||
110 | brcm,int-map-mask = <0x40>, <0x8000000>, <0x100000>; | ||
111 | brcm,int-fwd-mask = <0>; | ||
112 | brcm,irq-can-wake; | ||
113 | |||
114 | interrupt-controller; | ||
115 | #interrupt-cells = <1>; | ||
116 | |||
117 | interrupt-parent = <&periph_intc>; | ||
118 | interrupts = <57>, <55>, <59>; | ||
119 | interrupt-names = "upg_main_aon", "upg_bsc_aon", | ||
120 | "upg_spi"; | ||
121 | }; | ||
122 | |||
123 | sun_top_ctrl: syscon@404000 { | ||
124 | compatible = "brcm,bcm7362-sun-top-ctrl", "syscon"; | ||
125 | reg = <0x404000 0x51c>; | ||
126 | native-endian; | ||
127 | }; | ||
128 | |||
129 | reboot { | ||
130 | compatible = "brcm,brcmstb-reboot"; | ||
131 | syscon = <&sun_top_ctrl 0x304 0x308>; | ||
132 | }; | ||
133 | |||
134 | uart0: serial@406800 { | ||
135 | compatible = "ns16550a"; | ||
136 | reg = <0x406800 0x20>; | ||
137 | reg-io-width = <0x4>; | ||
138 | reg-shift = <0x2>; | ||
139 | native-endian; | ||
140 | interrupt-parent = <&periph_intc>; | ||
141 | interrupts = <61>; | ||
142 | clocks = <&uart_clk>; | ||
143 | status = "disabled"; | ||
144 | }; | ||
145 | |||
146 | uart1: serial@406840 { | ||
147 | compatible = "ns16550a"; | ||
148 | reg = <0x406840 0x20>; | ||
149 | reg-io-width = <0x4>; | ||
150 | reg-shift = <0x2>; | ||
151 | native-endian; | ||
152 | interrupt-parent = <&periph_intc>; | ||
153 | interrupts = <62>; | ||
154 | clocks = <&uart_clk>; | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | |||
158 | uart2: serial@406880 { | ||
159 | compatible = "ns16550a"; | ||
160 | reg = <0x406880 0x20>; | ||
161 | reg-io-width = <0x4>; | ||
162 | reg-shift = <0x2>; | ||
163 | native-endian; | ||
164 | interrupt-parent = <&periph_intc>; | ||
165 | interrupts = <63>; | ||
166 | clocks = <&uart_clk>; | ||
167 | status = "disabled"; | ||
168 | }; | ||
169 | |||
170 | bsca: i2c@406200 { | ||
171 | clock-frequency = <390000>; | ||
172 | compatible = "brcm,brcmstb-i2c"; | ||
173 | interrupt-parent = <&upg_irq0_intc>; | ||
174 | reg = <0x406200 0x58>; | ||
175 | interrupts = <24>; | ||
176 | interrupt-names = "upg_bsca"; | ||
177 | status = "disabled"; | ||
178 | }; | ||
179 | |||
180 | bscb: i2c@406280 { | ||
181 | clock-frequency = <390000>; | ||
182 | compatible = "brcm,brcmstb-i2c"; | ||
183 | interrupt-parent = <&upg_irq0_intc>; | ||
184 | reg = <0x406280 0x58>; | ||
185 | interrupts = <25>; | ||
186 | interrupt-names = "upg_bscb"; | ||
187 | status = "disabled"; | ||
188 | }; | ||
189 | |||
190 | bscd: i2c@408980 { | ||
191 | clock-frequency = <390000>; | ||
192 | compatible = "brcm,brcmstb-i2c"; | ||
193 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
194 | reg = <0x408980 0x58>; | ||
195 | interrupts = <27>; | ||
196 | interrupt-names = "upg_bscd"; | ||
197 | status = "disabled"; | ||
198 | }; | ||
199 | |||
200 | pwma: pwm@406400 { | ||
201 | compatible = "brcm,bcm7038-pwm"; | ||
202 | reg = <0x406400 0x28>; | ||
203 | #pwm-cells = <2>; | ||
204 | clocks = <&upg_clk>; | ||
205 | status = "disabled"; | ||
206 | }; | ||
207 | |||
208 | watchdog: watchdog@4066a8 { | ||
209 | clocks = <&upg_clk>; | ||
210 | compatible = "brcm,bcm7038-wdt"; | ||
211 | reg = <0x4066a8 0x14>; | ||
212 | status = "disabled"; | ||
213 | }; | ||
214 | |||
215 | aon_pm_l2_intc: interrupt-controller@408440 { | ||
216 | compatible = "brcm,l2-intc"; | ||
217 | reg = <0x408440 0x30>; | ||
218 | interrupt-controller; | ||
219 | #interrupt-cells = <1>; | ||
220 | interrupt-parent = <&periph_intc>; | ||
221 | interrupts = <50>; | ||
222 | brcm,irq-can-wake; | ||
223 | }; | ||
224 | |||
225 | aon_ctrl: syscon@408000 { | ||
226 | compatible = "brcm,brcmstb-aon-ctrl"; | ||
227 | reg = <0x408000 0x100>, <0x408200 0x200>; | ||
228 | reg-names = "aon-ctrl", "aon-sram"; | ||
229 | }; | ||
230 | |||
231 | timers: timer@406680 { | ||
232 | compatible = "brcm,brcmstb-timers"; | ||
233 | reg = <0x406680 0x40>; | ||
234 | }; | ||
235 | |||
236 | upg_gio: gpio@406500 { | ||
237 | compatible = "brcm,brcmstb-gpio"; | ||
238 | reg = <0x406500 0xa0>; | ||
239 | #gpio-cells = <2>; | ||
240 | #interrupt-cells = <2>; | ||
241 | gpio-controller; | ||
242 | interrupt-controller; | ||
243 | interrupt-parent = <&upg_irq0_intc>; | ||
244 | interrupts = <6>; | ||
245 | brcm,gpio-bank-widths = <32 32 32 29 4>; | ||
246 | }; | ||
247 | |||
248 | upg_gio_aon: gpio@408c00 { | ||
249 | compatible = "brcm,brcmstb-gpio"; | ||
250 | reg = <0x408c00 0x60>; | ||
251 | #gpio-cells = <2>; | ||
252 | #interrupt-cells = <2>; | ||
253 | gpio-controller; | ||
254 | interrupt-controller; | ||
255 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
256 | interrupts = <6>; | ||
257 | interrupts-extended = <&upg_aon_irq0_intc 6>, | ||
258 | <&aon_pm_l2_intc 5>; | ||
259 | wakeup-source; | ||
260 | brcm,gpio-bank-widths = <21 32 2>; | ||
261 | }; | ||
262 | |||
263 | enet0: ethernet@430000 { | ||
264 | phy-mode = "internal"; | ||
265 | phy-handle = <&phy1>; | ||
266 | mac-address = [ 00 10 18 36 23 1a ]; | ||
267 | compatible = "brcm,genet-v2"; | ||
268 | #address-cells = <0x1>; | ||
269 | #size-cells = <0x1>; | ||
270 | reg = <0x430000 0x4c8c>; | ||
271 | interrupts = <24>, <25>; | ||
272 | interrupt-parent = <&periph_intc>; | ||
273 | status = "disabled"; | ||
274 | |||
275 | mdio@e14 { | ||
276 | compatible = "brcm,genet-mdio-v2"; | ||
277 | #address-cells = <0x1>; | ||
278 | #size-cells = <0x0>; | ||
279 | reg = <0xe14 0x8>; | ||
280 | |||
281 | phy1: ethernet-phy@1 { | ||
282 | max-speed = <100>; | ||
283 | reg = <0x1>; | ||
284 | compatible = "brcm,40nm-ephy", | ||
285 | "ethernet-phy-ieee802.3-c22"; | ||
286 | }; | ||
287 | }; | ||
288 | }; | ||
289 | |||
290 | ehci0: usb@480300 { | ||
291 | compatible = "brcm,bcm7362-ehci", "generic-ehci"; | ||
292 | reg = <0x480300 0x100>; | ||
293 | native-endian; | ||
294 | interrupt-parent = <&periph_intc>; | ||
295 | interrupts = <65>; | ||
296 | status = "disabled"; | ||
297 | }; | ||
298 | |||
299 | ohci0: usb@480400 { | ||
300 | compatible = "brcm,bcm7362-ohci", "generic-ohci"; | ||
301 | reg = <0x480400 0x100>; | ||
302 | native-endian; | ||
303 | no-big-frame-no; | ||
304 | interrupt-parent = <&periph_intc>; | ||
305 | interrupts = <66>; | ||
306 | status = "disabled"; | ||
307 | }; | ||
308 | |||
309 | hif_l2_intc: interrupt-controller@411000 { | ||
310 | compatible = "brcm,l2-intc"; | ||
311 | reg = <0x411000 0x30>; | ||
312 | interrupt-controller; | ||
313 | #interrupt-cells = <1>; | ||
314 | interrupt-parent = <&periph_intc>; | ||
315 | interrupts = <30>; | ||
316 | }; | ||
317 | |||
318 | nand: nand@412800 { | ||
319 | compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand"; | ||
320 | #address-cells = <1>; | ||
321 | #size-cells = <0>; | ||
322 | reg-names = "nand"; | ||
323 | reg = <0x412800 0x400>; | ||
324 | interrupt-parent = <&hif_l2_intc>; | ||
325 | interrupts = <24>; | ||
326 | status = "disabled"; | ||
327 | }; | ||
328 | |||
329 | sata: sata@181000 { | ||
330 | compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci"; | ||
331 | reg-names = "ahci", "top-ctrl"; | ||
332 | reg = <0x181000 0xa9c>, <0x180020 0x1c>; | ||
333 | interrupt-parent = <&periph_intc>; | ||
334 | interrupts = <86>; | ||
335 | #address-cells = <1>; | ||
336 | #size-cells = <0>; | ||
337 | status = "disabled"; | ||
338 | |||
339 | sata0: sata-port@0 { | ||
340 | reg = <0>; | ||
341 | phys = <&sata_phy0>; | ||
342 | }; | ||
343 | |||
344 | sata1: sata-port@1 { | ||
345 | reg = <1>; | ||
346 | phys = <&sata_phy1>; | ||
347 | }; | ||
348 | }; | ||
349 | |||
350 | sata_phy: sata-phy@180100 { | ||
351 | compatible = "brcm,bcm7425-sata-phy", "brcm,phy-sata3"; | ||
352 | reg = <0x180100 0x0eff>; | ||
353 | reg-names = "phy"; | ||
354 | #address-cells = <1>; | ||
355 | #size-cells = <0>; | ||
356 | status = "disabled"; | ||
357 | |||
358 | sata_phy0: sata-phy@0 { | ||
359 | reg = <0>; | ||
360 | #phy-cells = <0>; | ||
361 | }; | ||
362 | |||
363 | sata_phy1: sata-phy@1 { | ||
364 | reg = <1>; | ||
365 | #phy-cells = <0>; | ||
366 | }; | ||
367 | }; | ||
368 | |||
369 | sdhci0: sdhci@410000 { | ||
370 | compatible = "brcm,bcm7425-sdhci"; | ||
371 | reg = <0x410000 0x100>; | ||
372 | interrupt-parent = <&periph_intc>; | ||
373 | interrupts = <82>; | ||
374 | status = "disabled"; | ||
375 | }; | ||
376 | |||
377 | spi_l2_intc: interrupt-controller@411d00 { | ||
378 | compatible = "brcm,l2-intc"; | ||
379 | reg = <0x411d00 0x30>; | ||
380 | interrupt-controller; | ||
381 | #interrupt-cells = <1>; | ||
382 | interrupt-parent = <&periph_intc>; | ||
383 | interrupts = <31>; | ||
384 | }; | ||
385 | |||
386 | qspi: spi@413000 { | ||
387 | #address-cells = <0x1>; | ||
388 | #size-cells = <0x0>; | ||
389 | compatible = "brcm,spi-bcm-qspi", | ||
390 | "brcm,spi-brcmstb-qspi"; | ||
391 | clocks = <&upg_clk>; | ||
392 | reg = <0x410920 0x4 0x413200 0x188 0x413000 0x50>; | ||
393 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
394 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
395 | interrupt-parent = <&spi_l2_intc>; | ||
396 | interrupt-names = "spi_lr_fullness_reached", | ||
397 | "spi_lr_session_aborted", | ||
398 | "spi_lr_impatient", | ||
399 | "spi_lr_session_done", | ||
400 | "spi_lr_overread", | ||
401 | "mspi_done", | ||
402 | "mspi_halted"; | ||
403 | status = "disabled"; | ||
404 | }; | ||
405 | |||
406 | mspi: spi@408a00 { | ||
407 | #address-cells = <1>; | ||
408 | #size-cells = <0>; | ||
409 | compatible = "brcm,spi-bcm-qspi", | ||
410 | "brcm,spi-brcmstb-mspi"; | ||
411 | clocks = <&upg_clk>; | ||
412 | reg = <0x408a00 0x180>; | ||
413 | reg-names = "mspi"; | ||
414 | interrupts = <0x14>; | ||
415 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
416 | interrupt-names = "mspi_done"; | ||
417 | status = "disabled"; | ||
418 | }; | ||
419 | |||
420 | waketimer: waketimer@408e80 { | ||
421 | compatible = "brcm,brcmstb-waketimer"; | ||
422 | reg = <0x408e80 0x14>; | ||
423 | interrupts = <0x3>; | ||
424 | interrupt-parent = <&aon_pm_l2_intc>; | ||
425 | interrupt-names = "timer"; | ||
426 | clocks = <&upg_clk>; | ||
427 | status = "disabled"; | ||
428 | }; | ||
429 | }; | ||
430 | |||
431 | memory_controllers { | ||
432 | compatible = "simple-bus"; | ||
433 | ranges = <0x0 0x103b0000 0xa000>; | ||
434 | #address-cells = <1>; | ||
435 | #size-cells = <1>; | ||
436 | |||
437 | memory-controller@0 { | ||
438 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
439 | ranges = <0x0 0x0 0xa000>; | ||
440 | #address-cells = <1>; | ||
441 | #size-cells = <1>; | ||
442 | |||
443 | memc-arb@1000 { | ||
444 | compatible = "brcm,brcmstb-memc-arb"; | ||
445 | reg = <0x1000 0x248>; | ||
446 | }; | ||
447 | |||
448 | memc-ddr@2000 { | ||
449 | compatible = "brcm,brcmstb-memc-ddr"; | ||
450 | reg = <0x2000 0x300>; | ||
451 | }; | ||
452 | |||
453 | ddr-phy@6000 { | ||
454 | compatible = "brcm,brcmstb-ddr-phy"; | ||
455 | reg = <0x6000 0xc8>; | ||
456 | }; | ||
457 | |||
458 | shimphy@8000 { | ||
459 | compatible = "brcm,brcmstb-ddr-shimphy"; | ||
460 | reg = <0x8000 0x13c>; | ||
461 | }; | ||
462 | }; | ||
463 | }; | ||
464 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7420.dtsi b/arch/mips/boot/dts/brcm/bcm7420.dtsi new file mode 100644 index 000000000..9540c27f1 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7420.dtsi | |||
@@ -0,0 +1,342 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7420"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <93750000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips5000"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips5000"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | aliases { | ||
27 | uart0 = &uart0; | ||
28 | }; | ||
29 | |||
30 | cpu_intc: interrupt-controller { | ||
31 | #address-cells = <0>; | ||
32 | compatible = "mti,cpu-interrupt-controller"; | ||
33 | |||
34 | interrupt-controller; | ||
35 | #interrupt-cells = <1>; | ||
36 | }; | ||
37 | |||
38 | clocks { | ||
39 | uart_clk: uart_clk { | ||
40 | compatible = "fixed-clock"; | ||
41 | #clock-cells = <0>; | ||
42 | clock-frequency = <81000000>; | ||
43 | }; | ||
44 | |||
45 | upg_clk: upg_clk { | ||
46 | compatible = "fixed-clock"; | ||
47 | #clock-cells = <0>; | ||
48 | clock-frequency = <27000000>; | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | rdb { | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <1>; | ||
55 | |||
56 | compatible = "simple-bus"; | ||
57 | ranges = <0 0x10000000 0x01000000>; | ||
58 | |||
59 | periph_intc: interrupt-controller@441400 { | ||
60 | compatible = "brcm,bcm7038-l1-intc"; | ||
61 | reg = <0x441400 0x30>, <0x441600 0x30>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <1>; | ||
65 | |||
66 | interrupt-parent = <&cpu_intc>; | ||
67 | interrupts = <2>, <3>; | ||
68 | }; | ||
69 | |||
70 | sun_l2_intc: interrupt-controller@401800 { | ||
71 | compatible = "brcm,l2-intc"; | ||
72 | reg = <0x401800 0x30>; | ||
73 | interrupt-controller; | ||
74 | #interrupt-cells = <1>; | ||
75 | interrupt-parent = <&periph_intc>; | ||
76 | interrupts = <23>; | ||
77 | }; | ||
78 | |||
79 | gisb-arb@400000 { | ||
80 | compatible = "brcm,bcm7400-gisb-arb"; | ||
81 | reg = <0x400000 0xdc>; | ||
82 | native-endian; | ||
83 | interrupt-parent = <&sun_l2_intc>; | ||
84 | interrupts = <0>, <2>; | ||
85 | brcm,gisb-arb-master-mask = <0x3ff>; | ||
86 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "pci_0", | ||
87 | "pcie_0", "bsp_0", "rdc_0", | ||
88 | "rptd_0", "avd_0", "avd_1", | ||
89 | "jtag_0"; | ||
90 | }; | ||
91 | |||
92 | upg_irq0_intc: interrupt-controller@406780 { | ||
93 | compatible = "brcm,bcm7120-l2-intc"; | ||
94 | reg = <0x406780 0x8>; | ||
95 | |||
96 | brcm,int-map-mask = <0x44>, <0x1f000000>, <0x100000>; | ||
97 | brcm,int-fwd-mask = <0x70000>; | ||
98 | |||
99 | interrupt-controller; | ||
100 | #interrupt-cells = <1>; | ||
101 | |||
102 | interrupt-parent = <&periph_intc>; | ||
103 | interrupts = <18>, <19>, <20>; | ||
104 | interrupt-names = "upg_main", "upg_bsc", "upg_spi"; | ||
105 | }; | ||
106 | |||
107 | sun_top_ctrl: syscon@404000 { | ||
108 | compatible = "brcm,bcm7420-sun-top-ctrl", "syscon"; | ||
109 | reg = <0x404000 0x60c>; | ||
110 | native-endian; | ||
111 | }; | ||
112 | |||
113 | reboot { | ||
114 | compatible = "brcm,bcm7038-reboot"; | ||
115 | syscon = <&sun_top_ctrl 0x8 0x14>; | ||
116 | }; | ||
117 | |||
118 | uart0: serial@406b00 { | ||
119 | compatible = "ns16550a"; | ||
120 | reg = <0x406b00 0x20>; | ||
121 | reg-io-width = <0x4>; | ||
122 | reg-shift = <0x2>; | ||
123 | interrupt-parent = <&periph_intc>; | ||
124 | interrupts = <21>; | ||
125 | clocks = <&uart_clk>; | ||
126 | status = "disabled"; | ||
127 | }; | ||
128 | |||
129 | uart1: serial@406b40 { | ||
130 | compatible = "ns16550a"; | ||
131 | reg = <0x406b40 0x20>; | ||
132 | reg-io-width = <0x4>; | ||
133 | reg-shift = <0x2>; | ||
134 | interrupt-parent = <&periph_intc>; | ||
135 | interrupts = <64>; | ||
136 | clocks = <&uart_clk>; | ||
137 | status = "disabled"; | ||
138 | }; | ||
139 | |||
140 | uart2: serial@406b80 { | ||
141 | compatible = "ns16550a"; | ||
142 | reg = <0x406b80 0x20>; | ||
143 | reg-io-width = <0x4>; | ||
144 | reg-shift = <0x2>; | ||
145 | interrupt-parent = <&periph_intc>; | ||
146 | interrupts = <65>; | ||
147 | clocks = <&uart_clk>; | ||
148 | status = "disabled"; | ||
149 | }; | ||
150 | |||
151 | bsca: i2c@406200 { | ||
152 | clock-frequency = <390000>; | ||
153 | compatible = "brcm,brcmstb-i2c"; | ||
154 | interrupt-parent = <&upg_irq0_intc>; | ||
155 | reg = <0x406200 0x58>; | ||
156 | interrupts = <24>; | ||
157 | interrupt-names = "upg_bsca"; | ||
158 | status = "disabled"; | ||
159 | }; | ||
160 | |||
161 | bscb: i2c@406280 { | ||
162 | clock-frequency = <390000>; | ||
163 | compatible = "brcm,brcmstb-i2c"; | ||
164 | interrupt-parent = <&upg_irq0_intc>; | ||
165 | reg = <0x406280 0x58>; | ||
166 | interrupts = <25>; | ||
167 | interrupt-names = "upg_bscb"; | ||
168 | status = "disabled"; | ||
169 | }; | ||
170 | |||
171 | bscc: i2c@406300 { | ||
172 | clock-frequency = <390000>; | ||
173 | compatible = "brcm,brcmstb-i2c"; | ||
174 | interrupt-parent = <&upg_irq0_intc>; | ||
175 | reg = <0x406300 0x58>; | ||
176 | interrupts = <26>; | ||
177 | interrupt-names = "upg_bscc"; | ||
178 | status = "disabled"; | ||
179 | }; | ||
180 | |||
181 | bscd: i2c@406380 { | ||
182 | clock-frequency = <390000>; | ||
183 | compatible = "brcm,brcmstb-i2c"; | ||
184 | interrupt-parent = <&upg_irq0_intc>; | ||
185 | reg = <0x406380 0x58>; | ||
186 | interrupts = <27>; | ||
187 | interrupt-names = "upg_bscd"; | ||
188 | status = "disabled"; | ||
189 | }; | ||
190 | |||
191 | bsce: i2c@406800 { | ||
192 | clock-frequency = <390000>; | ||
193 | compatible = "brcm,brcmstb-i2c"; | ||
194 | interrupt-parent = <&upg_irq0_intc>; | ||
195 | reg = <0x406800 0x58>; | ||
196 | interrupts = <28>; | ||
197 | interrupt-names = "upg_bsce"; | ||
198 | status = "disabled"; | ||
199 | }; | ||
200 | |||
201 | pwma: pwm@406580 { | ||
202 | compatible = "brcm,bcm7038-pwm"; | ||
203 | reg = <0x406580 0x28>; | ||
204 | #pwm-cells = <2>; | ||
205 | clocks = <&upg_clk>; | ||
206 | status = "disabled"; | ||
207 | }; | ||
208 | |||
209 | pwmb: pwm@406880 { | ||
210 | compatible = "brcm,bcm7038-pwm"; | ||
211 | reg = <0x406880 0x28>; | ||
212 | #pwm-cells = <2>; | ||
213 | clocks = <&upg_clk>; | ||
214 | status = "disabled"; | ||
215 | }; | ||
216 | |||
217 | watchdog: watchdog@4067e8 { | ||
218 | clocks = <&upg_clk>; | ||
219 | compatible = "brcm,bcm7038-wdt"; | ||
220 | reg = <0x4067e8 0x14>; | ||
221 | status = "disabled"; | ||
222 | }; | ||
223 | |||
224 | upg_gio: gpio@406700 { | ||
225 | compatible = "brcm,brcmstb-gpio"; | ||
226 | reg = <0x406700 0x80>; | ||
227 | #gpio-cells = <2>; | ||
228 | #interrupt-cells = <2>; | ||
229 | gpio-controller; | ||
230 | interrupt-controller; | ||
231 | interrupt-parent = <&upg_irq0_intc>; | ||
232 | interrupts = <6>; | ||
233 | brcm,gpio-bank-widths = <32 32 32 27>; | ||
234 | }; | ||
235 | |||
236 | enet0: ethernet@468000 { | ||
237 | phy-mode = "internal"; | ||
238 | phy-handle = <&phy1>; | ||
239 | mac-address = [ 00 10 18 36 23 1a ]; | ||
240 | compatible = "brcm,genet-v1"; | ||
241 | #address-cells = <0x1>; | ||
242 | #size-cells = <0x1>; | ||
243 | reg = <0x468000 0x3c8c>; | ||
244 | interrupts = <69>, <79>; | ||
245 | interrupt-parent = <&periph_intc>; | ||
246 | status = "disabled"; | ||
247 | |||
248 | mdio@e14 { | ||
249 | compatible = "brcm,genet-mdio-v1"; | ||
250 | #address-cells = <0x1>; | ||
251 | #size-cells = <0x0>; | ||
252 | reg = <0xe14 0x8>; | ||
253 | |||
254 | phy1: ethernet-phy@1 { | ||
255 | max-speed = <100>; | ||
256 | reg = <0x1>; | ||
257 | compatible = "brcm,65nm-ephy", | ||
258 | "ethernet-phy-ieee802.3-c22"; | ||
259 | }; | ||
260 | }; | ||
261 | }; | ||
262 | |||
263 | ehci0: usb@488300 { | ||
264 | compatible = "brcm,bcm7420-ehci", "generic-ehci"; | ||
265 | reg = <0x488300 0x100>; | ||
266 | interrupt-parent = <&periph_intc>; | ||
267 | interrupts = <60>; | ||
268 | status = "disabled"; | ||
269 | }; | ||
270 | |||
271 | ohci0: usb@488400 { | ||
272 | compatible = "brcm,bcm7420-ohci", "generic-ohci"; | ||
273 | reg = <0x488400 0x100>; | ||
274 | native-endian; | ||
275 | no-big-frame-no; | ||
276 | interrupt-parent = <&periph_intc>; | ||
277 | interrupts = <61>; | ||
278 | status = "disabled"; | ||
279 | }; | ||
280 | |||
281 | ehci1: usb@488500 { | ||
282 | compatible = "brcm,bcm7420-ehci", "generic-ehci"; | ||
283 | reg = <0x488500 0x100>; | ||
284 | interrupt-parent = <&periph_intc>; | ||
285 | interrupts = <55>; | ||
286 | status = "disabled"; | ||
287 | }; | ||
288 | |||
289 | ohci1: usb@488600 { | ||
290 | compatible = "brcm,bcm7420-ohci", "generic-ohci"; | ||
291 | reg = <0x488600 0x100>; | ||
292 | native-endian; | ||
293 | no-big-frame-no; | ||
294 | interrupt-parent = <&periph_intc>; | ||
295 | interrupts = <62>; | ||
296 | status = "disabled"; | ||
297 | }; | ||
298 | |||
299 | spi_l2_intc: interrupt-controller@411d00 { | ||
300 | compatible = "brcm,l2-intc"; | ||
301 | reg = <0x411d00 0x30>; | ||
302 | interrupt-controller; | ||
303 | #interrupt-cells = <1>; | ||
304 | interrupt-parent = <&periph_intc>; | ||
305 | interrupts = <78>; | ||
306 | }; | ||
307 | |||
308 | qspi: spi@443000 { | ||
309 | #address-cells = <0x1>; | ||
310 | #size-cells = <0x0>; | ||
311 | compatible = "brcm,spi-bcm-qspi", | ||
312 | "brcm,spi-brcmstb-qspi"; | ||
313 | clocks = <&upg_clk>; | ||
314 | reg = <0x440920 0x4 0x443200 0x188 0x443000 0x50>; | ||
315 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
316 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
317 | interrupt-parent = <&spi_l2_intc>; | ||
318 | interrupt-names = "spi_lr_fullness_reached", | ||
319 | "spi_lr_session_aborted", | ||
320 | "spi_lr_impatient", | ||
321 | "spi_lr_session_done", | ||
322 | "spi_lr_overread", | ||
323 | "mspi_done", | ||
324 | "mspi_halted"; | ||
325 | status = "disabled"; | ||
326 | }; | ||
327 | |||
328 | mspi: spi@406400 { | ||
329 | #address-cells = <1>; | ||
330 | #size-cells = <0>; | ||
331 | compatible = "brcm,spi-bcm-qspi", | ||
332 | "brcm,spi-brcmstb-mspi"; | ||
333 | clocks = <&upg_clk>; | ||
334 | reg = <0x406400 0x180>; | ||
335 | reg-names = "mspi"; | ||
336 | interrupts = <0x14>; | ||
337 | interrupt-parent = <&upg_irq0_intc>; | ||
338 | interrupt-names = "mspi_done"; | ||
339 | status = "disabled"; | ||
340 | }; | ||
341 | }; | ||
342 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7425.dtsi b/arch/mips/boot/dts/brcm/bcm7425.dtsi new file mode 100644 index 000000000..aa0b2d39c --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7425.dtsi | |||
@@ -0,0 +1,587 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7425"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <163125000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips5000"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips5000"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | }; | ||
25 | |||
26 | aliases { | ||
27 | uart0 = &uart0; | ||
28 | }; | ||
29 | |||
30 | cpu_intc: interrupt-controller { | ||
31 | #address-cells = <0>; | ||
32 | compatible = "mti,cpu-interrupt-controller"; | ||
33 | |||
34 | interrupt-controller; | ||
35 | #interrupt-cells = <1>; | ||
36 | }; | ||
37 | |||
38 | clocks { | ||
39 | uart_clk: uart_clk { | ||
40 | compatible = "fixed-clock"; | ||
41 | #clock-cells = <0>; | ||
42 | clock-frequency = <81000000>; | ||
43 | }; | ||
44 | |||
45 | upg_clk: upg_clk { | ||
46 | compatible = "fixed-clock"; | ||
47 | #clock-cells = <0>; | ||
48 | clock-frequency = <27000000>; | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | rdb { | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <1>; | ||
55 | |||
56 | compatible = "simple-bus"; | ||
57 | ranges = <0 0x10000000 0x01000000>; | ||
58 | |||
59 | periph_intc: interrupt-controller@41a400 { | ||
60 | compatible = "brcm,bcm7038-l1-intc"; | ||
61 | reg = <0x41a400 0x30>, <0x41a600 0x30>; | ||
62 | |||
63 | interrupt-controller; | ||
64 | #interrupt-cells = <1>; | ||
65 | |||
66 | interrupt-parent = <&cpu_intc>; | ||
67 | interrupts = <2>, <3>; | ||
68 | }; | ||
69 | |||
70 | sun_l2_intc: interrupt-controller@403000 { | ||
71 | compatible = "brcm,l2-intc"; | ||
72 | reg = <0x403000 0x30>; | ||
73 | interrupt-controller; | ||
74 | #interrupt-cells = <1>; | ||
75 | interrupt-parent = <&periph_intc>; | ||
76 | interrupts = <47>; | ||
77 | }; | ||
78 | |||
79 | gisb-arb@400000 { | ||
80 | compatible = "brcm,bcm7400-gisb-arb"; | ||
81 | reg = <0x400000 0xdc>; | ||
82 | native-endian; | ||
83 | interrupt-parent = <&sun_l2_intc>; | ||
84 | interrupts = <0>, <2>; | ||
85 | brcm,gisb-arb-master-mask = <0x177b>; | ||
86 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "pcie_0", | ||
87 | "bsp_0", "rdc_0", | ||
88 | "raaga_0", "avd_1", | ||
89 | "jtag_0", "svd_0", | ||
90 | "vice_0"; | ||
91 | }; | ||
92 | |||
93 | upg_irq0_intc: interrupt-controller@406780 { | ||
94 | compatible = "brcm,bcm7120-l2-intc"; | ||
95 | reg = <0x406780 0x8>; | ||
96 | |||
97 | brcm,int-map-mask = <0x44>, <0x7000000>; | ||
98 | brcm,int-fwd-mask = <0x70000>; | ||
99 | |||
100 | interrupt-controller; | ||
101 | #interrupt-cells = <1>; | ||
102 | |||
103 | interrupt-parent = <&periph_intc>; | ||
104 | interrupts = <55>, <53>; | ||
105 | interrupt-names = "upg_main", "upg_bsc"; | ||
106 | }; | ||
107 | |||
108 | upg_aon_irq0_intc: interrupt-controller@409480 { | ||
109 | compatible = "brcm,bcm7120-l2-intc"; | ||
110 | reg = <0x409480 0x8>; | ||
111 | |||
112 | brcm,int-map-mask = <0x40>, <0x18000000>, <0x100000>; | ||
113 | brcm,int-fwd-mask = <0>; | ||
114 | brcm,irq-can-wake; | ||
115 | |||
116 | interrupt-controller; | ||
117 | #interrupt-cells = <1>; | ||
118 | |||
119 | interrupt-parent = <&periph_intc>; | ||
120 | interrupts = <56>, <54>, <59>; | ||
121 | interrupt-names = "upg_main_aon", "upg_bsc_aon", | ||
122 | "upg_spi"; | ||
123 | }; | ||
124 | |||
125 | sun_top_ctrl: syscon@404000 { | ||
126 | compatible = "brcm,bcm7425-sun-top-ctrl", "syscon"; | ||
127 | reg = <0x404000 0x51c>; | ||
128 | native-endian; | ||
129 | }; | ||
130 | |||
131 | reboot { | ||
132 | compatible = "brcm,brcmstb-reboot"; | ||
133 | syscon = <&sun_top_ctrl 0x304 0x308>; | ||
134 | }; | ||
135 | |||
136 | uart0: serial@406b00 { | ||
137 | compatible = "ns16550a"; | ||
138 | reg = <0x406b00 0x20>; | ||
139 | reg-io-width = <0x4>; | ||
140 | reg-shift = <0x2>; | ||
141 | interrupt-parent = <&periph_intc>; | ||
142 | interrupts = <61>; | ||
143 | clocks = <&uart_clk>; | ||
144 | status = "disabled"; | ||
145 | }; | ||
146 | |||
147 | uart1: serial@406b40 { | ||
148 | compatible = "ns16550a"; | ||
149 | reg = <0x406b40 0x20>; | ||
150 | reg-io-width = <0x4>; | ||
151 | reg-shift = <0x2>; | ||
152 | interrupt-parent = <&periph_intc>; | ||
153 | interrupts = <62>; | ||
154 | clocks = <&uart_clk>; | ||
155 | status = "disabled"; | ||
156 | }; | ||
157 | |||
158 | uart2: serial@406b80 { | ||
159 | compatible = "ns16550a"; | ||
160 | reg = <0x406b80 0x20>; | ||
161 | reg-io-width = <0x4>; | ||
162 | reg-shift = <0x2>; | ||
163 | interrupt-parent = <&periph_intc>; | ||
164 | interrupts = <63>; | ||
165 | clocks = <&uart_clk>; | ||
166 | status = "disabled"; | ||
167 | }; | ||
168 | |||
169 | bsca: i2c@409180 { | ||
170 | clock-frequency = <390000>; | ||
171 | compatible = "brcm,brcmstb-i2c"; | ||
172 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
173 | reg = <0x409180 0x58>; | ||
174 | interrupts = <27>; | ||
175 | interrupt-names = "upg_bsca"; | ||
176 | status = "disabled"; | ||
177 | }; | ||
178 | |||
179 | bscb: i2c@409400 { | ||
180 | clock-frequency = <390000>; | ||
181 | compatible = "brcm,brcmstb-i2c"; | ||
182 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
183 | reg = <0x409400 0x58>; | ||
184 | interrupts = <28>; | ||
185 | interrupt-names = "upg_bscb"; | ||
186 | status = "disabled"; | ||
187 | }; | ||
188 | |||
189 | bscc: i2c@406200 { | ||
190 | clock-frequency = <390000>; | ||
191 | compatible = "brcm,brcmstb-i2c"; | ||
192 | interrupt-parent = <&upg_irq0_intc>; | ||
193 | reg = <0x406200 0x58>; | ||
194 | interrupts = <24>; | ||
195 | interrupt-names = "upg_bscc"; | ||
196 | status = "disabled"; | ||
197 | }; | ||
198 | |||
199 | bscd: i2c@406280 { | ||
200 | clock-frequency = <390000>; | ||
201 | compatible = "brcm,brcmstb-i2c"; | ||
202 | interrupt-parent = <&upg_irq0_intc>; | ||
203 | reg = <0x406280 0x58>; | ||
204 | interrupts = <25>; | ||
205 | interrupt-names = "upg_bscd"; | ||
206 | status = "disabled"; | ||
207 | }; | ||
208 | |||
209 | bsce: i2c@406300 { | ||
210 | clock-frequency = <390000>; | ||
211 | compatible = "brcm,brcmstb-i2c"; | ||
212 | interrupt-parent = <&upg_irq0_intc>; | ||
213 | reg = <0x406300 0x58>; | ||
214 | interrupts = <26>; | ||
215 | interrupt-names = "upg_bsce"; | ||
216 | status = "disabled"; | ||
217 | }; | ||
218 | |||
219 | pwma: pwm@406580 { | ||
220 | compatible = "brcm,bcm7038-pwm"; | ||
221 | reg = <0x406580 0x28>; | ||
222 | #pwm-cells = <2>; | ||
223 | clocks = <&upg_clk>; | ||
224 | status = "disabled"; | ||
225 | }; | ||
226 | |||
227 | pwmb: pwm@406800 { | ||
228 | compatible = "brcm,bcm7038-pwm"; | ||
229 | reg = <0x406800 0x28>; | ||
230 | #pwm-cells = <2>; | ||
231 | clocks = <&upg_clk>; | ||
232 | status = "disabled"; | ||
233 | }; | ||
234 | |||
235 | watchdog: watchdog@4067e8 { | ||
236 | clocks = <&upg_clk>; | ||
237 | compatible = "brcm,bcm7038-wdt"; | ||
238 | reg = <0x4067e8 0x14>; | ||
239 | status = "disabled"; | ||
240 | }; | ||
241 | |||
242 | aon_pm_l2_intc: interrupt-controller@408440 { | ||
243 | compatible = "brcm,l2-intc"; | ||
244 | reg = <0x408440 0x30>; | ||
245 | interrupt-controller; | ||
246 | #interrupt-cells = <1>; | ||
247 | interrupt-parent = <&periph_intc>; | ||
248 | interrupts = <49>; | ||
249 | brcm,irq-can-wake; | ||
250 | }; | ||
251 | |||
252 | aon_ctrl: syscon@408000 { | ||
253 | compatible = "brcm,brcmstb-aon-ctrl"; | ||
254 | reg = <0x408000 0x100>, <0x408200 0x200>; | ||
255 | reg-names = "aon-ctrl", "aon-sram"; | ||
256 | }; | ||
257 | |||
258 | timers: timer@4067c0 { | ||
259 | compatible = "brcm,brcmstb-timers"; | ||
260 | reg = <0x4067c0 0x40>; | ||
261 | }; | ||
262 | |||
263 | upg_gio: gpio@406700 { | ||
264 | compatible = "brcm,brcmstb-gpio"; | ||
265 | reg = <0x406700 0x80>; | ||
266 | #gpio-cells = <2>; | ||
267 | #interrupt-cells = <2>; | ||
268 | gpio-controller; | ||
269 | interrupt-controller; | ||
270 | interrupt-parent = <&upg_irq0_intc>; | ||
271 | interrupts = <6>; | ||
272 | brcm,gpio-bank-widths = <32 32 32 21>; | ||
273 | }; | ||
274 | |||
275 | upg_gio_aon: gpio@4094c0 { | ||
276 | compatible = "brcm,brcmstb-gpio"; | ||
277 | reg = <0x4094c0 0x40>; | ||
278 | #gpio-cells = <2>; | ||
279 | #interrupt-cells = <2>; | ||
280 | gpio-controller; | ||
281 | interrupt-controller; | ||
282 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
283 | interrupts = <6>; | ||
284 | interrupts-extended = <&upg_aon_irq0_intc 6>, | ||
285 | <&aon_pm_l2_intc 5>; | ||
286 | wakeup-source; | ||
287 | brcm,gpio-bank-widths = <18 4>; | ||
288 | }; | ||
289 | |||
290 | enet0: ethernet@b80000 { | ||
291 | phy-mode = "internal"; | ||
292 | phy-handle = <&phy1>; | ||
293 | mac-address = [ 00 10 18 36 23 1a ]; | ||
294 | compatible = "brcm,genet-v3"; | ||
295 | #address-cells = <0x1>; | ||
296 | #size-cells = <0x1>; | ||
297 | reg = <0xb80000 0x11c88>; | ||
298 | interrupts = <17>, <18>; | ||
299 | interrupt-parent = <&periph_intc>; | ||
300 | status = "disabled"; | ||
301 | |||
302 | mdio@e14 { | ||
303 | compatible = "brcm,genet-mdio-v3"; | ||
304 | #address-cells = <0x1>; | ||
305 | #size-cells = <0x0>; | ||
306 | reg = <0xe14 0x8>; | ||
307 | |||
308 | phy1: ethernet-phy@1 { | ||
309 | max-speed = <100>; | ||
310 | reg = <0x1>; | ||
311 | compatible = "brcm,40nm-ephy", | ||
312 | "ethernet-phy-ieee802.3-c22"; | ||
313 | }; | ||
314 | }; | ||
315 | }; | ||
316 | |||
317 | ehci0: usb@480300 { | ||
318 | compatible = "brcm,bcm7425-ehci", "generic-ehci"; | ||
319 | reg = <0x480300 0x100>; | ||
320 | native-endian; | ||
321 | interrupt-parent = <&periph_intc>; | ||
322 | interrupts = <65>; | ||
323 | status = "disabled"; | ||
324 | }; | ||
325 | |||
326 | ohci0: usb@480400 { | ||
327 | compatible = "brcm,bcm7425-ohci", "generic-ohci"; | ||
328 | reg = <0x480400 0x100>; | ||
329 | native-endian; | ||
330 | no-big-frame-no; | ||
331 | interrupt-parent = <&periph_intc>; | ||
332 | interrupts = <67>; | ||
333 | status = "disabled"; | ||
334 | }; | ||
335 | |||
336 | ehci1: usb@480500 { | ||
337 | compatible = "brcm,bcm7425-ehci", "generic-ehci"; | ||
338 | reg = <0x480500 0x100>; | ||
339 | native-endian; | ||
340 | interrupt-parent = <&periph_intc>; | ||
341 | interrupts = <66>; | ||
342 | status = "disabled"; | ||
343 | }; | ||
344 | |||
345 | ohci1: usb@480600 { | ||
346 | compatible = "brcm,bcm7425-ohci", "generic-ohci"; | ||
347 | reg = <0x480600 0x100>; | ||
348 | native-endian; | ||
349 | no-big-frame-no; | ||
350 | interrupt-parent = <&periph_intc>; | ||
351 | interrupts = <68>; | ||
352 | status = "disabled"; | ||
353 | }; | ||
354 | |||
355 | ehci2: usb@490300 { | ||
356 | compatible = "brcm,bcm7425-ehci", "generic-ehci"; | ||
357 | reg = <0x490300 0x100>; | ||
358 | native-endian; | ||
359 | interrupt-parent = <&periph_intc>; | ||
360 | interrupts = <70>; | ||
361 | status = "disabled"; | ||
362 | }; | ||
363 | |||
364 | ohci2: usb@490400 { | ||
365 | compatible = "brcm,bcm7425-ohci", "generic-ohci"; | ||
366 | reg = <0x490400 0x100>; | ||
367 | native-endian; | ||
368 | no-big-frame-no; | ||
369 | interrupt-parent = <&periph_intc>; | ||
370 | interrupts = <72>; | ||
371 | status = "disabled"; | ||
372 | }; | ||
373 | |||
374 | ehci3: usb@490500 { | ||
375 | compatible = "brcm,bcm7425-ehci", "generic-ehci"; | ||
376 | reg = <0x490500 0x100>; | ||
377 | native-endian; | ||
378 | interrupt-parent = <&periph_intc>; | ||
379 | interrupts = <71>; | ||
380 | status = "disabled"; | ||
381 | }; | ||
382 | |||
383 | ohci3: usb@490600 { | ||
384 | compatible = "brcm,bcm7425-ohci", "generic-ohci"; | ||
385 | reg = <0x490600 0x100>; | ||
386 | native-endian; | ||
387 | no-big-frame-no; | ||
388 | interrupt-parent = <&periph_intc>; | ||
389 | interrupts = <73>; | ||
390 | status = "disabled"; | ||
391 | }; | ||
392 | |||
393 | hif_l2_intc: interrupt-controller@41a000 { | ||
394 | compatible = "brcm,l2-intc"; | ||
395 | reg = <0x41a000 0x30>; | ||
396 | interrupt-controller; | ||
397 | #interrupt-cells = <1>; | ||
398 | interrupt-parent = <&periph_intc>; | ||
399 | interrupts = <24>; | ||
400 | }; | ||
401 | |||
402 | nand: nand@41b800 { | ||
403 | compatible = "brcm,brcmnand-v5.0", "brcm,brcmnand"; | ||
404 | #address-cells = <1>; | ||
405 | #size-cells = <0>; | ||
406 | reg-names = "nand", "flash-edu"; | ||
407 | reg = <0x41b800 0x400>, <0x41bc00 0x24>; | ||
408 | interrupt-parent = <&hif_l2_intc>; | ||
409 | interrupts = <24>; | ||
410 | status = "disabled"; | ||
411 | }; | ||
412 | |||
413 | sata: sata@181000 { | ||
414 | compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci"; | ||
415 | reg-names = "ahci", "top-ctrl"; | ||
416 | reg = <0x181000 0xa9c>, <0x180020 0x1c>; | ||
417 | interrupt-parent = <&periph_intc>; | ||
418 | interrupts = <41>; | ||
419 | #address-cells = <1>; | ||
420 | #size-cells = <0>; | ||
421 | status = "disabled"; | ||
422 | |||
423 | sata0: sata-port@0 { | ||
424 | reg = <0>; | ||
425 | phys = <&sata_phy0>; | ||
426 | }; | ||
427 | |||
428 | sata1: sata-port@1 { | ||
429 | reg = <1>; | ||
430 | phys = <&sata_phy1>; | ||
431 | }; | ||
432 | }; | ||
433 | |||
434 | sata_phy: sata-phy@180100 { | ||
435 | compatible = "brcm,bcm7425-sata-phy", "brcm,phy-sata3"; | ||
436 | reg = <0x180100 0x0eff>; | ||
437 | reg-names = "phy"; | ||
438 | #address-cells = <1>; | ||
439 | #size-cells = <0>; | ||
440 | status = "disabled"; | ||
441 | |||
442 | sata_phy0: sata-phy@0 { | ||
443 | reg = <0>; | ||
444 | #phy-cells = <0>; | ||
445 | }; | ||
446 | |||
447 | sata_phy1: sata-phy@1 { | ||
448 | reg = <1>; | ||
449 | #phy-cells = <0>; | ||
450 | }; | ||
451 | }; | ||
452 | |||
453 | sdhci0: sdhci@419000 { | ||
454 | compatible = "brcm,bcm7425-sdhci"; | ||
455 | reg = <0x419000 0x100>; | ||
456 | interrupt-parent = <&periph_intc>; | ||
457 | interrupts = <43>; | ||
458 | sd-uhs-sdr50; | ||
459 | mmc-hs200-1_8v; | ||
460 | status = "disabled"; | ||
461 | }; | ||
462 | |||
463 | sdhci1: sdhci@419200 { | ||
464 | compatible = "brcm,bcm7425-sdhci"; | ||
465 | reg = <0x419200 0x100>; | ||
466 | interrupt-parent = <&periph_intc>; | ||
467 | interrupts = <44>; | ||
468 | sd-uhs-sdr50; | ||
469 | mmc-hs200-1_8v; | ||
470 | status = "disabled"; | ||
471 | }; | ||
472 | |||
473 | spi_l2_intc: interrupt-controller@41ad00 { | ||
474 | compatible = "brcm,l2-intc"; | ||
475 | reg = <0x41ad00 0x30>; | ||
476 | interrupt-controller; | ||
477 | #interrupt-cells = <1>; | ||
478 | interrupt-parent = <&periph_intc>; | ||
479 | interrupts = <25>; | ||
480 | }; | ||
481 | |||
482 | qspi: spi@41c000 { | ||
483 | #address-cells = <0x1>; | ||
484 | #size-cells = <0x0>; | ||
485 | compatible = "brcm,spi-bcm-qspi", | ||
486 | "brcm,spi-brcmstb-qspi"; | ||
487 | clocks = <&upg_clk>; | ||
488 | reg = <0x419920 0x4 0x41c200 0x188 0x41c000 0x50>; | ||
489 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
490 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
491 | interrupt-parent = <&spi_l2_intc>; | ||
492 | interrupt-names = "spi_lr_fullness_reached", | ||
493 | "spi_lr_session_aborted", | ||
494 | "spi_lr_impatient", | ||
495 | "spi_lr_session_done", | ||
496 | "spi_lr_overread", | ||
497 | "mspi_done", | ||
498 | "mspi_halted"; | ||
499 | status = "disabled"; | ||
500 | }; | ||
501 | |||
502 | mspi: spi@409200 { | ||
503 | #address-cells = <1>; | ||
504 | #size-cells = <0>; | ||
505 | compatible = "brcm,spi-bcm-qspi", | ||
506 | "brcm,spi-brcmstb-mspi"; | ||
507 | clocks = <&upg_clk>; | ||
508 | reg = <0x409200 0x180>; | ||
509 | reg-names = "mspi"; | ||
510 | interrupts = <0x14>; | ||
511 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
512 | interrupt-names = "mspi_done"; | ||
513 | status = "disabled"; | ||
514 | }; | ||
515 | |||
516 | waketimer: waketimer@409580 { | ||
517 | compatible = "brcm,brcmstb-waketimer"; | ||
518 | reg = <0x409580 0x14>; | ||
519 | interrupts = <0x3>; | ||
520 | interrupt-parent = <&aon_pm_l2_intc>; | ||
521 | interrupt-names = "timer"; | ||
522 | clocks = <&upg_clk>; | ||
523 | status = "disabled"; | ||
524 | }; | ||
525 | }; | ||
526 | |||
527 | memory_controllers { | ||
528 | compatible = "simple-bus"; | ||
529 | ranges = <0x0 0x103b0000 0x1a000>; | ||
530 | #address-cells = <1>; | ||
531 | #size-cells = <1>; | ||
532 | |||
533 | memory-controller@0 { | ||
534 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
535 | ranges = <0x0 0x0 0xa000>; | ||
536 | #address-cells = <1>; | ||
537 | #size-cells = <1>; | ||
538 | |||
539 | memc-arb@1000 { | ||
540 | compatible = "brcm,brcmstb-memc-arb"; | ||
541 | reg = <0x1000 0x248>; | ||
542 | }; | ||
543 | |||
544 | memc-ddr@2000 { | ||
545 | compatible = "brcm,brcmstb-memc-ddr"; | ||
546 | reg = <0x2000 0x300>; | ||
547 | }; | ||
548 | |||
549 | ddr-phy@6000 { | ||
550 | compatible = "brcm,brcmstb-ddr-phy"; | ||
551 | reg = <0x6000 0xc8>; | ||
552 | }; | ||
553 | |||
554 | shimphy@8000 { | ||
555 | compatible = "brcm,brcmstb-ddr-shimphy"; | ||
556 | reg = <0x8000 0x13c>; | ||
557 | }; | ||
558 | }; | ||
559 | |||
560 | memory-controller@1 { | ||
561 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
562 | ranges = <0x0 0x10000 0xa000>; | ||
563 | #address-cells = <1>; | ||
564 | #size-cells = <1>; | ||
565 | |||
566 | memc-arb@1000 { | ||
567 | compatible = "brcm,brcmstb-memc-arb"; | ||
568 | reg = <0x1000 0x248>; | ||
569 | }; | ||
570 | |||
571 | memc-ddr@2000 { | ||
572 | compatible = "brcm,brcmstb-memc-ddr"; | ||
573 | reg = <0x2000 0x300>; | ||
574 | }; | ||
575 | |||
576 | ddr-phy@6000 { | ||
577 | compatible = "brcm,brcmstb-ddr-phy"; | ||
578 | reg = <0x6000 0xc8>; | ||
579 | }; | ||
580 | |||
581 | shimphy@8000 { | ||
582 | compatible = "brcm,brcmstb-ddr-shimphy"; | ||
583 | reg = <0x8000 0x13c>; | ||
584 | }; | ||
585 | }; | ||
586 | }; | ||
587 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm7435.dtsi b/arch/mips/boot/dts/brcm/bcm7435.dtsi new file mode 100644 index 000000000..8398b7f68 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm7435.dtsi | |||
@@ -0,0 +1,602 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "brcm,bcm7435"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | |||
11 | mips-hpt-frequency = <175625000>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "brcm,bmips5200"; | ||
15 | device_type = "cpu"; | ||
16 | reg = <0>; | ||
17 | }; | ||
18 | |||
19 | cpu@1 { | ||
20 | compatible = "brcm,bmips5200"; | ||
21 | device_type = "cpu"; | ||
22 | reg = <1>; | ||
23 | }; | ||
24 | |||
25 | cpu@2 { | ||
26 | compatible = "brcm,bmips5200"; | ||
27 | device_type = "cpu"; | ||
28 | reg = <2>; | ||
29 | }; | ||
30 | |||
31 | cpu@3 { | ||
32 | compatible = "brcm,bmips5200"; | ||
33 | device_type = "cpu"; | ||
34 | reg = <3>; | ||
35 | }; | ||
36 | }; | ||
37 | |||
38 | aliases { | ||
39 | uart0 = &uart0; | ||
40 | }; | ||
41 | |||
42 | cpu_intc: interrupt-controller { | ||
43 | #address-cells = <0>; | ||
44 | compatible = "mti,cpu-interrupt-controller"; | ||
45 | |||
46 | interrupt-controller; | ||
47 | #interrupt-cells = <1>; | ||
48 | }; | ||
49 | |||
50 | clocks { | ||
51 | uart_clk: uart_clk { | ||
52 | compatible = "fixed-clock"; | ||
53 | #clock-cells = <0>; | ||
54 | clock-frequency = <81000000>; | ||
55 | }; | ||
56 | |||
57 | upg_clk: upg_clk { | ||
58 | compatible = "fixed-clock"; | ||
59 | #clock-cells = <0>; | ||
60 | clock-frequency = <27000000>; | ||
61 | }; | ||
62 | }; | ||
63 | |||
64 | rdb { | ||
65 | #address-cells = <1>; | ||
66 | #size-cells = <1>; | ||
67 | |||
68 | compatible = "simple-bus"; | ||
69 | ranges = <0 0x10000000 0x01000000>; | ||
70 | |||
71 | periph_intc: interrupt-controller@41b500 { | ||
72 | compatible = "brcm,bcm7038-l1-intc"; | ||
73 | reg = <0x41b500 0x40>, <0x41b600 0x40>, | ||
74 | <0x41b700 0x40>, <0x41b800 0x40>; | ||
75 | |||
76 | interrupt-controller; | ||
77 | #interrupt-cells = <1>; | ||
78 | |||
79 | interrupt-parent = <&cpu_intc>; | ||
80 | interrupts = <2>, <3>, <2>, <3>; | ||
81 | }; | ||
82 | |||
83 | sun_l2_intc: interrupt-controller@403000 { | ||
84 | compatible = "brcm,l2-intc"; | ||
85 | reg = <0x403000 0x30>; | ||
86 | interrupt-controller; | ||
87 | #interrupt-cells = <1>; | ||
88 | interrupt-parent = <&periph_intc>; | ||
89 | interrupts = <52>; | ||
90 | }; | ||
91 | |||
92 | gisb-arb@400000 { | ||
93 | compatible = "brcm,bcm7435-gisb-arb"; | ||
94 | reg = <0x400000 0xdc>; | ||
95 | native-endian; | ||
96 | interrupt-parent = <&sun_l2_intc>; | ||
97 | interrupts = <0>, <2>; | ||
98 | brcm,gisb-arb-master-mask = <0xf77f>; | ||
99 | brcm,gisb-arb-master-names = "ssp_0", "cpu_0", "webcpu_0", | ||
100 | "pcie_0", "bsp_0", | ||
101 | "rdc_0", "raaga_0", | ||
102 | "avd_1", "jtag_0", | ||
103 | "svd_0", "vice_0", | ||
104 | "vice_1", "raaga_1", | ||
105 | "scpu"; | ||
106 | }; | ||
107 | |||
108 | upg_irq0_intc: interrupt-controller@406780 { | ||
109 | compatible = "brcm,bcm7120-l2-intc"; | ||
110 | reg = <0x406780 0x8>; | ||
111 | |||
112 | brcm,int-map-mask = <0x44>, <0x7000000>; | ||
113 | brcm,int-fwd-mask = <0x70000>; | ||
114 | |||
115 | interrupt-controller; | ||
116 | #interrupt-cells = <1>; | ||
117 | |||
118 | interrupt-parent = <&periph_intc>; | ||
119 | interrupts = <60>, <58>; | ||
120 | interrupt-names = "upg_main", "upg_bsc"; | ||
121 | }; | ||
122 | |||
123 | upg_aon_irq0_intc: interrupt-controller@409480 { | ||
124 | compatible = "brcm,bcm7120-l2-intc"; | ||
125 | reg = <0x409480 0x8>; | ||
126 | |||
127 | brcm,int-map-mask = <0x40>, <0x18000000>, <0x100000>; | ||
128 | brcm,int-fwd-mask = <0>; | ||
129 | brcm,irq-can-wake; | ||
130 | |||
131 | interrupt-controller; | ||
132 | #interrupt-cells = <1>; | ||
133 | |||
134 | interrupt-parent = <&periph_intc>; | ||
135 | interrupts = <61>, <59>, <64>; | ||
136 | interrupt-names = "upg_main_aon", "upg_bsc_aon", | ||
137 | "upg_spi"; | ||
138 | }; | ||
139 | |||
140 | sun_top_ctrl: syscon@404000 { | ||
141 | compatible = "brcm,bcm7425-sun-top-ctrl", "syscon"; | ||
142 | reg = <0x404000 0x51c>; | ||
143 | native-endian; | ||
144 | }; | ||
145 | |||
146 | reboot { | ||
147 | compatible = "brcm,brcmstb-reboot"; | ||
148 | syscon = <&sun_top_ctrl 0x304 0x308>; | ||
149 | }; | ||
150 | |||
151 | uart0: serial@406b00 { | ||
152 | compatible = "ns16550a"; | ||
153 | reg = <0x406b00 0x20>; | ||
154 | reg-io-width = <0x4>; | ||
155 | reg-shift = <0x2>; | ||
156 | interrupt-parent = <&periph_intc>; | ||
157 | interrupts = <66>; | ||
158 | clocks = <&uart_clk>; | ||
159 | status = "disabled"; | ||
160 | }; | ||
161 | |||
162 | uart1: serial@406b40 { | ||
163 | compatible = "ns16550a"; | ||
164 | reg = <0x406b40 0x20>; | ||
165 | reg-io-width = <0x4>; | ||
166 | reg-shift = <0x2>; | ||
167 | interrupt-parent = <&periph_intc>; | ||
168 | interrupts = <67>; | ||
169 | clocks = <&uart_clk>; | ||
170 | status = "disabled"; | ||
171 | }; | ||
172 | |||
173 | uart2: serial@406b80 { | ||
174 | compatible = "ns16550a"; | ||
175 | reg = <0x406b80 0x20>; | ||
176 | reg-io-width = <0x4>; | ||
177 | reg-shift = <0x2>; | ||
178 | interrupt-parent = <&periph_intc>; | ||
179 | interrupts = <68>; | ||
180 | clocks = <&uart_clk>; | ||
181 | status = "disabled"; | ||
182 | }; | ||
183 | |||
184 | bsca: i2c@406300 { | ||
185 | clock-frequency = <390000>; | ||
186 | compatible = "brcm,brcmstb-i2c"; | ||
187 | interrupt-parent = <&upg_irq0_intc>; | ||
188 | reg = <0x406300 0x58>; | ||
189 | interrupts = <26>; | ||
190 | interrupt-names = "upg_bsca"; | ||
191 | status = "disabled"; | ||
192 | }; | ||
193 | |||
194 | bscb: i2c@409400 { | ||
195 | clock-frequency = <390000>; | ||
196 | compatible = "brcm,brcmstb-i2c"; | ||
197 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
198 | reg = <0x409400 0x58>; | ||
199 | interrupts = <28>; | ||
200 | interrupt-names = "upg_bscb"; | ||
201 | status = "disabled"; | ||
202 | }; | ||
203 | |||
204 | bscc: i2c@406200 { | ||
205 | clock-frequency = <390000>; | ||
206 | compatible = "brcm,brcmstb-i2c"; | ||
207 | interrupt-parent = <&upg_irq0_intc>; | ||
208 | reg = <0x406200 0x58>; | ||
209 | interrupts = <24>; | ||
210 | interrupt-names = "upg_bscc"; | ||
211 | status = "disabled"; | ||
212 | }; | ||
213 | |||
214 | bscd: i2c@406280 { | ||
215 | clock-frequency = <390000>; | ||
216 | compatible = "brcm,brcmstb-i2c"; | ||
217 | interrupt-parent = <&upg_irq0_intc>; | ||
218 | reg = <0x406280 0x58>; | ||
219 | interrupts = <25>; | ||
220 | interrupt-names = "upg_bscd"; | ||
221 | status = "disabled"; | ||
222 | }; | ||
223 | |||
224 | bsce: i2c@409180 { | ||
225 | clock-frequency = <390000>; | ||
226 | compatible = "brcm,brcmstb-i2c"; | ||
227 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
228 | reg = <0x409180 0x58>; | ||
229 | interrupts = <27>; | ||
230 | interrupt-names = "upg_bsce"; | ||
231 | status = "disabled"; | ||
232 | }; | ||
233 | |||
234 | pwma: pwm@406580 { | ||
235 | compatible = "brcm,bcm7038-pwm"; | ||
236 | reg = <0x406580 0x28>; | ||
237 | #pwm-cells = <2>; | ||
238 | clocks = <&upg_clk>; | ||
239 | status = "disabled"; | ||
240 | }; | ||
241 | |||
242 | pwmb: pwm@406800 { | ||
243 | compatible = "brcm,bcm7038-pwm"; | ||
244 | reg = <0x406800 0x28>; | ||
245 | #pwm-cells = <2>; | ||
246 | clocks = <&upg_clk>; | ||
247 | status = "disabled"; | ||
248 | }; | ||
249 | |||
250 | watchdog: watchdog@4067e8 { | ||
251 | clocks = <&upg_clk>; | ||
252 | compatible = "brcm,bcm7038-wdt"; | ||
253 | reg = <0x4067e8 0x14>; | ||
254 | status = "disabled"; | ||
255 | }; | ||
256 | |||
257 | aon_pm_l2_intc: interrupt-controller@408440 { | ||
258 | compatible = "brcm,l2-intc"; | ||
259 | reg = <0x408440 0x30>; | ||
260 | interrupt-controller; | ||
261 | #interrupt-cells = <1>; | ||
262 | interrupt-parent = <&periph_intc>; | ||
263 | interrupts = <54>; | ||
264 | brcm,irq-can-wake; | ||
265 | }; | ||
266 | |||
267 | aon_ctrl: syscon@408000 { | ||
268 | compatible = "brcm,brcmstb-aon-ctrl"; | ||
269 | reg = <0x408000 0x100>, <0x408200 0x200>; | ||
270 | reg-names = "aon-ctrl", "aon-sram"; | ||
271 | }; | ||
272 | |||
273 | timers: timer@4067c0 { | ||
274 | compatible = "brcm,brcmstb-timers"; | ||
275 | reg = <0x4067c0 0x40>; | ||
276 | }; | ||
277 | |||
278 | upg_gio: gpio@406700 { | ||
279 | compatible = "brcm,brcmstb-gpio"; | ||
280 | reg = <0x406700 0x80>; | ||
281 | #gpio-cells = <2>; | ||
282 | #interrupt-cells = <2>; | ||
283 | gpio-controller; | ||
284 | interrupt-controller; | ||
285 | interrupt-parent = <&upg_irq0_intc>; | ||
286 | interrupts = <6>; | ||
287 | brcm,gpio-bank-widths = <32 32 32 21>; | ||
288 | }; | ||
289 | |||
290 | upg_gio_aon: gpio@4094c0 { | ||
291 | compatible = "brcm,brcmstb-gpio"; | ||
292 | reg = <0x4094c0 0x40>; | ||
293 | #gpio-cells = <2>; | ||
294 | #interrupt-cells = <2>; | ||
295 | gpio-controller; | ||
296 | interrupt-controller; | ||
297 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
298 | interrupts = <6>; | ||
299 | interrupts-extended = <&upg_aon_irq0_intc 6>, | ||
300 | <&aon_pm_l2_intc 5>; | ||
301 | wakeup-source; | ||
302 | brcm,gpio-bank-widths = <18 4>; | ||
303 | }; | ||
304 | |||
305 | enet0: ethernet@b80000 { | ||
306 | phy-mode = "internal"; | ||
307 | phy-handle = <&phy1>; | ||
308 | mac-address = [ 00 10 18 36 23 1a ]; | ||
309 | compatible = "brcm,genet-v3"; | ||
310 | #address-cells = <0x1>; | ||
311 | #size-cells = <0x1>; | ||
312 | reg = <0xb80000 0x11c88>; | ||
313 | interrupts = <17>, <18>; | ||
314 | interrupt-parent = <&periph_intc>; | ||
315 | status = "disabled"; | ||
316 | |||
317 | mdio@e14 { | ||
318 | compatible = "brcm,genet-mdio-v3"; | ||
319 | #address-cells = <0x1>; | ||
320 | #size-cells = <0x0>; | ||
321 | reg = <0xe14 0x8>; | ||
322 | |||
323 | phy1: ethernet-phy@1 { | ||
324 | max-speed = <100>; | ||
325 | reg = <0x1>; | ||
326 | compatible = "brcm,40nm-ephy", | ||
327 | "ethernet-phy-ieee802.3-c22"; | ||
328 | }; | ||
329 | }; | ||
330 | }; | ||
331 | |||
332 | ehci0: usb@480300 { | ||
333 | compatible = "brcm,bcm7435-ehci", "generic-ehci"; | ||
334 | reg = <0x480300 0x100>; | ||
335 | native-endian; | ||
336 | interrupt-parent = <&periph_intc>; | ||
337 | interrupts = <70>; | ||
338 | status = "disabled"; | ||
339 | }; | ||
340 | |||
341 | ohci0: usb@480400 { | ||
342 | compatible = "brcm,bcm7435-ohci", "generic-ohci"; | ||
343 | reg = <0x480400 0x100>; | ||
344 | native-endian; | ||
345 | no-big-frame-no; | ||
346 | interrupt-parent = <&periph_intc>; | ||
347 | interrupts = <72>; | ||
348 | status = "disabled"; | ||
349 | }; | ||
350 | |||
351 | ehci1: usb@480500 { | ||
352 | compatible = "brcm,bcm7435-ehci", "generic-ehci"; | ||
353 | reg = <0x480500 0x100>; | ||
354 | native-endian; | ||
355 | interrupt-parent = <&periph_intc>; | ||
356 | interrupts = <71>; | ||
357 | status = "disabled"; | ||
358 | }; | ||
359 | |||
360 | ohci1: usb@480600 { | ||
361 | compatible = "brcm,bcm7435-ohci", "generic-ohci"; | ||
362 | reg = <0x480600 0x100>; | ||
363 | native-endian; | ||
364 | no-big-frame-no; | ||
365 | interrupt-parent = <&periph_intc>; | ||
366 | interrupts = <73>; | ||
367 | status = "disabled"; | ||
368 | }; | ||
369 | |||
370 | ehci2: usb@490300 { | ||
371 | compatible = "brcm,bcm7435-ehci", "generic-ehci"; | ||
372 | reg = <0x490300 0x100>; | ||
373 | native-endian; | ||
374 | interrupt-parent = <&periph_intc>; | ||
375 | interrupts = <75>; | ||
376 | status = "disabled"; | ||
377 | }; | ||
378 | |||
379 | ohci2: usb@490400 { | ||
380 | compatible = "brcm,bcm7435-ohci", "generic-ohci"; | ||
381 | reg = <0x490400 0x100>; | ||
382 | native-endian; | ||
383 | no-big-frame-no; | ||
384 | interrupt-parent = <&periph_intc>; | ||
385 | interrupts = <77>; | ||
386 | status = "disabled"; | ||
387 | }; | ||
388 | |||
389 | ehci3: usb@490500 { | ||
390 | compatible = "brcm,bcm7435-ehci", "generic-ehci"; | ||
391 | reg = <0x490500 0x100>; | ||
392 | native-endian; | ||
393 | interrupt-parent = <&periph_intc>; | ||
394 | interrupts = <76>; | ||
395 | status = "disabled"; | ||
396 | }; | ||
397 | |||
398 | ohci3: usb@490600 { | ||
399 | compatible = "brcm,bcm7435-ohci", "generic-ohci"; | ||
400 | reg = <0x490600 0x100>; | ||
401 | native-endian; | ||
402 | no-big-frame-no; | ||
403 | interrupt-parent = <&periph_intc>; | ||
404 | interrupts = <78>; | ||
405 | status = "disabled"; | ||
406 | }; | ||
407 | |||
408 | hif_l2_intc: interrupt-controller@41b000 { | ||
409 | compatible = "brcm,l2-intc"; | ||
410 | reg = <0x41b000 0x30>; | ||
411 | interrupt-controller; | ||
412 | #interrupt-cells = <1>; | ||
413 | interrupt-parent = <&periph_intc>; | ||
414 | interrupts = <24>; | ||
415 | }; | ||
416 | |||
417 | nand: nand@41c800 { | ||
418 | compatible = "brcm,brcmnand-v6.2", "brcm,brcmnand"; | ||
419 | #address-cells = <1>; | ||
420 | #size-cells = <0>; | ||
421 | reg-names = "nand", "flash-dma"; | ||
422 | reg = <0x41c800 0x600>, <0x41d000 0x100>; | ||
423 | interrupt-parent = <&hif_l2_intc>; | ||
424 | interrupts = <24>, <4>; | ||
425 | status = "disabled"; | ||
426 | }; | ||
427 | |||
428 | sata: sata@181000 { | ||
429 | compatible = "brcm,bcm7425-ahci", "brcm,sata3-ahci"; | ||
430 | reg-names = "ahci", "top-ctrl"; | ||
431 | reg = <0x181000 0xa9c>, <0x180020 0x1c>; | ||
432 | interrupt-parent = <&periph_intc>; | ||
433 | interrupts = <45>; | ||
434 | #address-cells = <1>; | ||
435 | #size-cells = <0>; | ||
436 | status = "disabled"; | ||
437 | |||
438 | sata0: sata-port@0 { | ||
439 | reg = <0>; | ||
440 | phys = <&sata_phy0>; | ||
441 | }; | ||
442 | |||
443 | sata1: sata-port@1 { | ||
444 | reg = <1>; | ||
445 | phys = <&sata_phy1>; | ||
446 | }; | ||
447 | }; | ||
448 | |||
449 | sata_phy: sata-phy@180100 { | ||
450 | compatible = "brcm,bcm7425-sata-phy", "brcm,phy-sata3"; | ||
451 | reg = <0x180100 0x0eff>; | ||
452 | reg-names = "phy"; | ||
453 | #address-cells = <1>; | ||
454 | #size-cells = <0>; | ||
455 | status = "disabled"; | ||
456 | |||
457 | sata_phy0: sata-phy@0 { | ||
458 | reg = <0>; | ||
459 | #phy-cells = <0>; | ||
460 | }; | ||
461 | |||
462 | sata_phy1: sata-phy@1 { | ||
463 | reg = <1>; | ||
464 | #phy-cells = <0>; | ||
465 | }; | ||
466 | }; | ||
467 | |||
468 | sdhci0: sdhci@41a000 { | ||
469 | compatible = "brcm,bcm7425-sdhci"; | ||
470 | reg = <0x41a000 0x100>; | ||
471 | interrupt-parent = <&periph_intc>; | ||
472 | interrupts = <47>; | ||
473 | sd-uhs-sdr50; | ||
474 | mmc-hs200-1_8v; | ||
475 | status = "disabled"; | ||
476 | }; | ||
477 | |||
478 | sdhci1: sdhci@41a200 { | ||
479 | compatible = "brcm,bcm7425-sdhci"; | ||
480 | reg = <0x41a200 0x100>; | ||
481 | interrupt-parent = <&periph_intc>; | ||
482 | interrupts = <48>; | ||
483 | sd-uhs-sdr50; | ||
484 | mmc-hs200-1_8v; | ||
485 | status = "disabled"; | ||
486 | }; | ||
487 | |||
488 | spi_l2_intc: interrupt-controller@41bd00 { | ||
489 | compatible = "brcm,l2-intc"; | ||
490 | reg = <0x41bd00 0x30>; | ||
491 | interrupt-controller; | ||
492 | #interrupt-cells = <1>; | ||
493 | interrupt-parent = <&periph_intc>; | ||
494 | interrupts = <25>; | ||
495 | }; | ||
496 | |||
497 | qspi: spi@41d200 { | ||
498 | #address-cells = <0x1>; | ||
499 | #size-cells = <0x0>; | ||
500 | compatible = "brcm,spi-bcm-qspi", | ||
501 | "brcm,spi-brcmstb-qspi"; | ||
502 | clocks = <&upg_clk>; | ||
503 | reg = <0x41a920 0x4 0x41d400 0x188 0x41d200 0x50>; | ||
504 | reg-names = "cs_reg", "hif_mspi", "bspi"; | ||
505 | interrupts = <0x0 0x1 0x2 0x3 0x4 0x5 0x6>; | ||
506 | interrupt-parent = <&spi_l2_intc>; | ||
507 | interrupt-names = "spi_lr_fullness_reached", | ||
508 | "spi_lr_session_aborted", | ||
509 | "spi_lr_impatient", | ||
510 | "spi_lr_session_done", | ||
511 | "spi_lr_overread", | ||
512 | "mspi_done", | ||
513 | "mspi_halted"; | ||
514 | status = "disabled"; | ||
515 | }; | ||
516 | |||
517 | mspi: spi@409200 { | ||
518 | #address-cells = <1>; | ||
519 | #size-cells = <0>; | ||
520 | compatible = "brcm,spi-bcm-qspi", | ||
521 | "brcm,spi-brcmstb-mspi"; | ||
522 | clocks = <&upg_clk>; | ||
523 | reg = <0x409200 0x180>; | ||
524 | reg-names = "mspi"; | ||
525 | interrupts = <0x14>; | ||
526 | interrupt-parent = <&upg_aon_irq0_intc>; | ||
527 | interrupt-names = "mspi_done"; | ||
528 | status = "disabled"; | ||
529 | }; | ||
530 | |||
531 | waketimer: waketimer@409580 { | ||
532 | compatible = "brcm,brcmstb-waketimer"; | ||
533 | reg = <0x409580 0x14>; | ||
534 | interrupts = <0x3>; | ||
535 | interrupt-parent = <&aon_pm_l2_intc>; | ||
536 | interrupt-names = "timer"; | ||
537 | clocks = <&upg_clk>; | ||
538 | status = "disabled"; | ||
539 | }; | ||
540 | }; | ||
541 | |||
542 | memory_controllers { | ||
543 | compatible = "simple-bus"; | ||
544 | ranges = <0x0 0x103b0000 0x1a000>; | ||
545 | #address-cells = <1>; | ||
546 | #size-cells = <1>; | ||
547 | |||
548 | memory-controller@0 { | ||
549 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
550 | ranges = <0x0 0x0 0xa000>; | ||
551 | #address-cells = <1>; | ||
552 | #size-cells = <1>; | ||
553 | |||
554 | memc-arb@1000 { | ||
555 | compatible = "brcm,brcmstb-memc-arb"; | ||
556 | reg = <0x1000 0x248>; | ||
557 | }; | ||
558 | |||
559 | memc-ddr@2000 { | ||
560 | compatible = "brcm,brcmstb-memc-ddr"; | ||
561 | reg = <0x2000 0x300>; | ||
562 | }; | ||
563 | |||
564 | ddr-phy@6000 { | ||
565 | compatible = "brcm,brcmstb-ddr-phy"; | ||
566 | reg = <0x6000 0xc8>; | ||
567 | }; | ||
568 | |||
569 | shimphy@8000 { | ||
570 | compatible = "brcm,brcmstb-ddr-shimphy"; | ||
571 | reg = <0x8000 0x13c>; | ||
572 | }; | ||
573 | }; | ||
574 | |||
575 | memory-controller@1 { | ||
576 | compatible = "brcm,brcmstb-memc", "simple-bus"; | ||
577 | ranges = <0x0 0x10000 0xa000>; | ||
578 | #address-cells = <1>; | ||
579 | #size-cells = <1>; | ||
580 | |||
581 | memc-arb@1000 { | ||
582 | compatible = "brcm,brcmstb-memc-arb"; | ||
583 | reg = <0x1000 0x248>; | ||
584 | }; | ||
585 | |||
586 | memc-ddr@2000 { | ||
587 | compatible = "brcm,brcmstb-memc-ddr"; | ||
588 | reg = <0x2000 0x300>; | ||
589 | }; | ||
590 | |||
591 | ddr-phy@6000 { | ||
592 | compatible = "brcm,brcmstb-ddr-phy"; | ||
593 | reg = <0x6000 0xc8>; | ||
594 | }; | ||
595 | |||
596 | shimphy@8000 { | ||
597 | compatible = "brcm,brcmstb-ddr-shimphy"; | ||
598 | reg = <0x8000 0x13c>; | ||
599 | }; | ||
600 | }; | ||
601 | }; | ||
602 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm93384wvg.dts b/arch/mips/boot/dts/brcm/bcm93384wvg.dts new file mode 100644 index 000000000..601e4d929 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm93384wvg.dts | |||
@@ -0,0 +1,26 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm3384_zephyr.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "brcm,bcm93384wvg", "brcm,bcm3384"; | ||
8 | model = "Broadcom BCM93384WVG"; | ||
9 | |||
10 | chosen { | ||
11 | bootargs = "console=ttyS0,115200"; | ||
12 | stdout-path = &uart0; | ||
13 | }; | ||
14 | }; | ||
15 | |||
16 | &uart0 { | ||
17 | status = "okay"; | ||
18 | }; | ||
19 | |||
20 | &ehci0 { | ||
21 | status = "okay"; | ||
22 | }; | ||
23 | |||
24 | &ohci0 { | ||
25 | status = "okay"; | ||
26 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm93384wvg_viper.dts b/arch/mips/boot/dts/brcm/bcm93384wvg_viper.dts new file mode 100644 index 000000000..938a8e661 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm93384wvg_viper.dts | |||
@@ -0,0 +1,26 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm3384_viper.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "brcm,bcm93384wvg-viper", "brcm,bcm3384-viper"; | ||
8 | model = "Broadcom BCM93384WVG-viper"; | ||
9 | |||
10 | chosen { | ||
11 | bootargs = "console=ttyS0,115200"; | ||
12 | stdout-path = &uart0; | ||
13 | }; | ||
14 | }; | ||
15 | |||
16 | &uart0 { | ||
17 | status = "okay"; | ||
18 | }; | ||
19 | |||
20 | &ehci0 { | ||
21 | status = "okay"; | ||
22 | }; | ||
23 | |||
24 | &ohci0 { | ||
25 | status = "okay"; | ||
26 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm96368mvwg.dts b/arch/mips/boot/dts/brcm/bcm96368mvwg.dts new file mode 100644 index 000000000..6d772c394 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm96368mvwg.dts | |||
@@ -0,0 +1,32 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm6368.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "brcm,bcm96368mvwg", "brcm,bcm6368"; | ||
8 | model = "Broadcom BCM96368MVWG"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x04000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &uart0 { | ||
22 | status = "okay"; | ||
23 | }; | ||
24 | |||
25 | /* FIXME: need to set up USB_CTRL registers first */ | ||
26 | &ehci { | ||
27 | status = "disabled"; | ||
28 | }; | ||
29 | |||
30 | &ohci { | ||
31 | status = "disabled"; | ||
32 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97125cbmb.dts b/arch/mips/boot/dts/brcm/bcm97125cbmb.dts new file mode 100644 index 000000000..79e9769f7 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97125cbmb.dts | |||
@@ -0,0 +1,68 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7125.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "brcm,bcm97125cbmb", "brcm,bcm7125"; | ||
8 | model = "Broadcom BCM97125CBMB"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x10000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &uart0 { | ||
22 | status = "okay"; | ||
23 | }; | ||
24 | |||
25 | &uart1 { | ||
26 | status = "okay"; | ||
27 | }; | ||
28 | |||
29 | &uart2 { | ||
30 | status = "okay"; | ||
31 | }; | ||
32 | |||
33 | &bsca { | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | |||
37 | &bscb { | ||
38 | status = "okay"; | ||
39 | }; | ||
40 | |||
41 | &bscc { | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | &bscd { | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | |||
49 | &pwma { | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | |||
53 | &watchdog { | ||
54 | status = "okay"; | ||
55 | }; | ||
56 | |||
57 | /* FIXME: USB is wonky; disable it for now */ | ||
58 | &ehci0 { | ||
59 | status = "disabled"; | ||
60 | }; | ||
61 | |||
62 | &ohci0 { | ||
63 | status = "disabled"; | ||
64 | }; | ||
65 | |||
66 | &mspi { | ||
67 | status = "okay"; | ||
68 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97346dbsmb.dts b/arch/mips/boot/dts/brcm/bcm97346dbsmb.dts new file mode 100644 index 000000000..28370ff77 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97346dbsmb.dts | |||
@@ -0,0 +1,124 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7346.dtsi" | ||
5 | /include/ "bcm97xxx-nand-cs1-bch24.dtsi" | ||
6 | |||
7 | / { | ||
8 | compatible = "brcm,bcm97346dbsmb", "brcm,bcm7346"; | ||
9 | model = "Broadcom BCM97346DBSMB"; | ||
10 | |||
11 | memory@0 { | ||
12 | device_type = "memory"; | ||
13 | reg = <0x00000000 0x10000000>, <0x20000000 0x30000000>; | ||
14 | }; | ||
15 | |||
16 | chosen { | ||
17 | bootargs = "console=ttyS0,115200"; | ||
18 | stdout-path = &uart0; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | &uart0 { | ||
23 | status = "okay"; | ||
24 | }; | ||
25 | |||
26 | &uart1 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | &uart2 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | |||
34 | &bsca { | ||
35 | status = "okay"; | ||
36 | }; | ||
37 | |||
38 | &bscb { | ||
39 | status = "okay"; | ||
40 | }; | ||
41 | |||
42 | &bscc { | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | |||
46 | &bscd { | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | &bsce { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | &pwma { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | &pwmb { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | &watchdog { | ||
63 | status = "okay"; | ||
64 | }; | ||
65 | |||
66 | &enet0 { | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | |||
70 | &ehci0 { | ||
71 | status = "okay"; | ||
72 | }; | ||
73 | |||
74 | &ohci0 { | ||
75 | status = "okay"; | ||
76 | }; | ||
77 | |||
78 | &ehci1 { | ||
79 | status = "okay"; | ||
80 | }; | ||
81 | |||
82 | &ohci1 { | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | |||
86 | &ehci2 { | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
90 | &ohci2 { | ||
91 | status = "okay"; | ||
92 | }; | ||
93 | |||
94 | &ehci3 { | ||
95 | status = "okay"; | ||
96 | }; | ||
97 | |||
98 | &ohci3 { | ||
99 | status = "okay"; | ||
100 | }; | ||
101 | |||
102 | &nand { | ||
103 | status = "okay"; | ||
104 | }; | ||
105 | |||
106 | &sata { | ||
107 | status = "okay"; | ||
108 | }; | ||
109 | |||
110 | &sata_phy { | ||
111 | status = "okay"; | ||
112 | }; | ||
113 | |||
114 | &sdhci0 { | ||
115 | status = "okay"; | ||
116 | }; | ||
117 | |||
118 | &mspi { | ||
119 | status = "okay"; | ||
120 | }; | ||
121 | |||
122 | &waketimer { | ||
123 | status = "okay"; | ||
124 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97358svmb.dts b/arch/mips/boot/dts/brcm/bcm97358svmb.dts new file mode 100644 index 000000000..41c1b510c --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97358svmb.dts | |||
@@ -0,0 +1,116 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7358.dtsi" | ||
5 | /include/ "bcm97xxx-nand-cs1-bch4.dtsi" | ||
6 | |||
7 | / { | ||
8 | compatible = "brcm,bcm97358svmb", "brcm,bcm7358"; | ||
9 | model = "Broadcom BCM97358SVMB"; | ||
10 | |||
11 | memory@0 { | ||
12 | device_type = "memory"; | ||
13 | reg = <0x00000000 0x10000000>; | ||
14 | }; | ||
15 | |||
16 | chosen { | ||
17 | bootargs = "console=ttyS0,115200"; | ||
18 | stdout-path = &uart0; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | &uart0 { | ||
23 | status = "okay"; | ||
24 | }; | ||
25 | |||
26 | &uart1 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | &uart2 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | |||
34 | &bsca { | ||
35 | status = "okay"; | ||
36 | }; | ||
37 | |||
38 | &bscb { | ||
39 | status = "okay"; | ||
40 | }; | ||
41 | |||
42 | &bscc { | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | |||
46 | &bscd { | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | &pwma { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | &pwmb { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | &watchdog { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | &enet0 { | ||
63 | status = "okay"; | ||
64 | }; | ||
65 | |||
66 | &ehci0 { | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | |||
70 | &ohci0 { | ||
71 | status = "okay"; | ||
72 | }; | ||
73 | |||
74 | &nand { | ||
75 | status = "okay"; | ||
76 | }; | ||
77 | |||
78 | &qspi { | ||
79 | status = "okay"; | ||
80 | |||
81 | m25p80@0 { | ||
82 | compatible = "m25p80"; | ||
83 | reg = <0>; | ||
84 | spi-max-frequency = <40000000>; | ||
85 | spi-cpol; | ||
86 | spi-cpha; | ||
87 | use-bspi; | ||
88 | m25p,fast-read; | ||
89 | |||
90 | partitions { | ||
91 | compatible = "fixed-partitions"; | ||
92 | #address-cells = <1>; | ||
93 | #size-cells = <1>; | ||
94 | |||
95 | flash0.cfe@0 { | ||
96 | reg = <0x0 0x200000>; | ||
97 | }; | ||
98 | |||
99 | flash0.mac@200000 { | ||
100 | reg = <0x200000 0x40000>; | ||
101 | }; | ||
102 | |||
103 | flash0.nvram@240000 { | ||
104 | reg = <0x240000 0x10000>; | ||
105 | }; | ||
106 | }; | ||
107 | }; | ||
108 | }; | ||
109 | |||
110 | &mspi { | ||
111 | status = "okay"; | ||
112 | }; | ||
113 | |||
114 | &waketimer { | ||
115 | status = "okay"; | ||
116 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97360svmb.dts b/arch/mips/boot/dts/brcm/bcm97360svmb.dts new file mode 100644 index 000000000..9f6c6c9b7 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97360svmb.dts | |||
@@ -0,0 +1,119 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7360.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "brcm,bcm97360svmb", "brcm,bcm7360"; | ||
8 | model = "Broadcom BCM97360SVMB"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x10000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &uart0 { | ||
22 | status = "okay"; | ||
23 | }; | ||
24 | |||
25 | &uart1 { | ||
26 | status = "okay"; | ||
27 | }; | ||
28 | |||
29 | &uart2 { | ||
30 | status = "okay"; | ||
31 | }; | ||
32 | |||
33 | &bsca { | ||
34 | status = "okay"; | ||
35 | }; | ||
36 | |||
37 | &bscb { | ||
38 | status = "okay"; | ||
39 | }; | ||
40 | |||
41 | &bscc { | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | &bscd { | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | |||
49 | &pwma { | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | |||
53 | &watchdog { | ||
54 | status = "okay"; | ||
55 | }; | ||
56 | |||
57 | &enet0 { | ||
58 | status = "okay"; | ||
59 | }; | ||
60 | |||
61 | &ehci0 { | ||
62 | status = "okay"; | ||
63 | }; | ||
64 | |||
65 | &ohci0 { | ||
66 | status = "okay"; | ||
67 | }; | ||
68 | |||
69 | &sata { | ||
70 | status = "okay"; | ||
71 | }; | ||
72 | |||
73 | &sata_phy { | ||
74 | status = "okay"; | ||
75 | }; | ||
76 | |||
77 | &sdhci0 { | ||
78 | status = "okay"; | ||
79 | }; | ||
80 | |||
81 | &qspi { | ||
82 | status = "okay"; | ||
83 | |||
84 | m25p80@0 { | ||
85 | compatible = "m25p80"; | ||
86 | reg = <0>; | ||
87 | spi-max-frequency = <40000000>; | ||
88 | spi-cpol; | ||
89 | spi-cpha; | ||
90 | use-bspi; | ||
91 | m25p,fast-read; | ||
92 | |||
93 | partitions { | ||
94 | compatible = "fixed-partitions"; | ||
95 | #address-cells = <1>; | ||
96 | #size-cells = <1>; | ||
97 | |||
98 | flash0.cfe@0 { | ||
99 | reg = <0x0 0x200000>; | ||
100 | }; | ||
101 | |||
102 | flash0.mac@200000 { | ||
103 | reg = <0x200000 0x40000>; | ||
104 | }; | ||
105 | |||
106 | flash0.nvram@240000 { | ||
107 | reg = <0x240000 0x10000>; | ||
108 | }; | ||
109 | }; | ||
110 | }; | ||
111 | }; | ||
112 | |||
113 | &mspi { | ||
114 | status = "okay"; | ||
115 | }; | ||
116 | |||
117 | &waketimer { | ||
118 | status = "okay"; | ||
119 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97362svmb.dts b/arch/mips/boot/dts/brcm/bcm97362svmb.dts new file mode 100644 index 000000000..df8b755c3 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97362svmb.dts | |||
@@ -0,0 +1,88 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7362.dtsi" | ||
5 | /include/ "bcm97xxx-nand-cs1-bch4.dtsi" | ||
6 | |||
7 | / { | ||
8 | compatible = "brcm,bcm97362svmb", "brcm,bcm7362"; | ||
9 | model = "Broadcom BCM97362SVMB"; | ||
10 | |||
11 | memory@0 { | ||
12 | device_type = "memory"; | ||
13 | reg = <0x00000000 0x10000000>, <0x20000000 0x30000000>; | ||
14 | }; | ||
15 | |||
16 | chosen { | ||
17 | bootargs = "console=ttyS0,115200"; | ||
18 | stdout-path = &uart0; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | &uart0 { | ||
23 | status = "okay"; | ||
24 | }; | ||
25 | |||
26 | &uart1 { | ||
27 | status = "okay"; | ||
28 | }; | ||
29 | |||
30 | &uart2 { | ||
31 | status = "okay"; | ||
32 | }; | ||
33 | |||
34 | &bsca { | ||
35 | status = "okay"; | ||
36 | }; | ||
37 | |||
38 | &bscb { | ||
39 | status = "okay"; | ||
40 | }; | ||
41 | |||
42 | &bscd { | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | |||
46 | &pwma { | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | &watchdog { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | &enet0 { | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | &ehci0 { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | &ohci0 { | ||
63 | status = "okay"; | ||
64 | }; | ||
65 | |||
66 | &nand { | ||
67 | status = "okay"; | ||
68 | }; | ||
69 | |||
70 | &sata { | ||
71 | status = "okay"; | ||
72 | }; | ||
73 | |||
74 | &sata_phy { | ||
75 | status = "okay"; | ||
76 | }; | ||
77 | |||
78 | &sdhci0 { | ||
79 | status = "okay"; | ||
80 | }; | ||
81 | |||
82 | &mspi { | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | |||
86 | &waketimer { | ||
87 | status = "okay"; | ||
88 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97420c.dts b/arch/mips/boot/dts/brcm/bcm97420c.dts new file mode 100644 index 000000000..086faeaa3 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97420c.dts | |||
@@ -0,0 +1,90 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7420.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "brcm,bcm97420c", "brcm,bcm7420"; | ||
8 | model = "Broadcom BCM97420C"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x10000000>, | ||
13 | <0x20000000 0x30000000>, | ||
14 | <0x60000000 0x10000000>; | ||
15 | }; | ||
16 | |||
17 | chosen { | ||
18 | bootargs = "console=ttyS0,115200"; | ||
19 | stdout-path = &uart0; | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | &uart0 { | ||
24 | status = "okay"; | ||
25 | }; | ||
26 | |||
27 | &uart1 { | ||
28 | status = "okay"; | ||
29 | }; | ||
30 | |||
31 | &uart2 { | ||
32 | status = "okay"; | ||
33 | }; | ||
34 | |||
35 | &bsca { | ||
36 | status = "okay"; | ||
37 | }; | ||
38 | |||
39 | &bscb { | ||
40 | status = "okay"; | ||
41 | }; | ||
42 | |||
43 | &bscc { | ||
44 | status = "okay"; | ||
45 | }; | ||
46 | |||
47 | &bscd { | ||
48 | status = "okay"; | ||
49 | }; | ||
50 | |||
51 | &bsce { | ||
52 | status = "okay"; | ||
53 | }; | ||
54 | |||
55 | &pwma { | ||
56 | status = "okay"; | ||
57 | }; | ||
58 | |||
59 | &pwmb { | ||
60 | status = "okay"; | ||
61 | }; | ||
62 | |||
63 | &watchdog { | ||
64 | status = "okay"; | ||
65 | }; | ||
66 | |||
67 | /* FIXME: MAC driver comes up but cannot attach to PHY */ | ||
68 | &enet0 { | ||
69 | status = "disabled"; | ||
70 | }; | ||
71 | |||
72 | &ehci0 { | ||
73 | status = "okay"; | ||
74 | }; | ||
75 | |||
76 | &ohci0 { | ||
77 | status = "okay"; | ||
78 | }; | ||
79 | |||
80 | &ehci1 { | ||
81 | status = "okay"; | ||
82 | }; | ||
83 | |||
84 | &ohci1 { | ||
85 | status = "okay"; | ||
86 | }; | ||
87 | |||
88 | &mspi { | ||
89 | status = "okay"; | ||
90 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97425svmb.dts b/arch/mips/boot/dts/brcm/bcm97425svmb.dts new file mode 100644 index 000000000..0ed22217b --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97425svmb.dts | |||
@@ -0,0 +1,154 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7425.dtsi" | ||
5 | /include/ "bcm97xxx-nand-cs1-bch24.dtsi" | ||
6 | |||
7 | / { | ||
8 | compatible = "brcm,bcm97425svmb", "brcm,bcm7425"; | ||
9 | model = "Broadcom BCM97425SVMB"; | ||
10 | |||
11 | memory@0 { | ||
12 | device_type = "memory"; | ||
13 | reg = <0x00000000 0x10000000>, | ||
14 | <0x20000000 0x30000000>, | ||
15 | <0x90000000 0x40000000>; | ||
16 | }; | ||
17 | |||
18 | chosen { | ||
19 | bootargs = "console=ttyS0,115200"; | ||
20 | stdout-path = &uart0; | ||
21 | }; | ||
22 | }; | ||
23 | |||
24 | &uart0 { | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | |||
28 | &uart1 { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | &uart2 { | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | &bsca { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | &bscb { | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | &bscc { | ||
45 | status = "okay"; | ||
46 | }; | ||
47 | |||
48 | &bscd { | ||
49 | status = "okay"; | ||
50 | }; | ||
51 | |||
52 | &bsce { | ||
53 | status = "okay"; | ||
54 | }; | ||
55 | |||
56 | &pwma { | ||
57 | status = "okay"; | ||
58 | }; | ||
59 | |||
60 | &pwmb { | ||
61 | status = "okay"; | ||
62 | }; | ||
63 | |||
64 | &watchdog { | ||
65 | status = "okay"; | ||
66 | }; | ||
67 | |||
68 | &enet0 { | ||
69 | status = "okay"; | ||
70 | }; | ||
71 | |||
72 | &ehci0 { | ||
73 | status = "okay"; | ||
74 | }; | ||
75 | |||
76 | &ohci0 { | ||
77 | status = "okay"; | ||
78 | }; | ||
79 | |||
80 | &ehci1 { | ||
81 | status = "okay"; | ||
82 | }; | ||
83 | |||
84 | &ohci1 { | ||
85 | status = "okay"; | ||
86 | }; | ||
87 | |||
88 | &ehci2 { | ||
89 | status = "okay"; | ||
90 | }; | ||
91 | |||
92 | &ohci2 { | ||
93 | status = "okay"; | ||
94 | }; | ||
95 | |||
96 | &ehci3 { | ||
97 | status = "okay"; | ||
98 | }; | ||
99 | |||
100 | &ohci3 { | ||
101 | status = "okay"; | ||
102 | }; | ||
103 | |||
104 | &nand { | ||
105 | status = "okay"; | ||
106 | }; | ||
107 | |||
108 | &sdhci0 { | ||
109 | status = "okay"; | ||
110 | }; | ||
111 | |||
112 | &sdhci1 { | ||
113 | status = "okay"; | ||
114 | }; | ||
115 | |||
116 | &qspi { | ||
117 | status = "okay"; | ||
118 | |||
119 | m25p80@0 { | ||
120 | compatible = "m25p80"; | ||
121 | reg = <0>; | ||
122 | spi-max-frequency = <40000000>; | ||
123 | spi-cpol; | ||
124 | spi-cpha; | ||
125 | use-bspi; | ||
126 | m25p,fast-read; | ||
127 | |||
128 | partitions { | ||
129 | compatible = "fixed-partitions"; | ||
130 | #address-cells = <1>; | ||
131 | #size-cells = <1>; | ||
132 | |||
133 | flash0.cfe@0 { | ||
134 | reg = <0x0 0x200000>; | ||
135 | }; | ||
136 | |||
137 | flash0.mac@200000 { | ||
138 | reg = <0x200000 0x40000>; | ||
139 | }; | ||
140 | |||
141 | flash0.nvram@240000 { | ||
142 | reg = <0x240000 0x10000>; | ||
143 | }; | ||
144 | }; | ||
145 | }; | ||
146 | }; | ||
147 | |||
148 | &mspi { | ||
149 | status = "okay"; | ||
150 | }; | ||
151 | |||
152 | &waketimer { | ||
153 | status = "okay"; | ||
154 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97435svmb.dts b/arch/mips/boot/dts/brcm/bcm97435svmb.dts new file mode 100644 index 000000000..2c145a883 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97435svmb.dts | |||
@@ -0,0 +1,130 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm7435.dtsi" | ||
5 | /include/ "bcm97xxx-nand-cs1-bch24.dtsi" | ||
6 | |||
7 | / { | ||
8 | compatible = "brcm,bcm97435svmb", "brcm,bcm7435"; | ||
9 | model = "Broadcom BCM97435SVMB"; | ||
10 | |||
11 | memory@0 { | ||
12 | device_type = "memory"; | ||
13 | reg = <0x00000000 0x10000000>, | ||
14 | <0x20000000 0x30000000>, | ||
15 | <0x90000000 0x40000000>; | ||
16 | }; | ||
17 | |||
18 | chosen { | ||
19 | bootargs = "console=ttyS0,115200"; | ||
20 | stdout-path = &uart0; | ||
21 | }; | ||
22 | }; | ||
23 | |||
24 | &uart0 { | ||
25 | status = "okay"; | ||
26 | }; | ||
27 | |||
28 | &uart1 { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | &uart2 { | ||
33 | status = "okay"; | ||
34 | }; | ||
35 | |||
36 | &bsca { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | &bscb { | ||
41 | status = "okay"; | ||
42 | }; | ||
43 | |||
44 | &bscc { | ||
45 | status = "okay"; | ||
46 | }; | ||
47 | |||
48 | &bscd { | ||
49 | status = "okay"; | ||
50 | }; | ||
51 | |||
52 | &bsce { | ||
53 | status = "okay"; | ||
54 | }; | ||
55 | |||
56 | &pwma { | ||
57 | status = "okay"; | ||
58 | }; | ||
59 | |||
60 | &pwmb { | ||
61 | status = "okay"; | ||
62 | }; | ||
63 | |||
64 | &watchdog { | ||
65 | status = "okay"; | ||
66 | }; | ||
67 | |||
68 | &enet0 { | ||
69 | status = "okay"; | ||
70 | }; | ||
71 | |||
72 | &ehci0 { | ||
73 | status = "okay"; | ||
74 | }; | ||
75 | |||
76 | &ohci0 { | ||
77 | status = "okay"; | ||
78 | }; | ||
79 | |||
80 | &ehci1 { | ||
81 | status = "okay"; | ||
82 | }; | ||
83 | |||
84 | &ohci1 { | ||
85 | status = "okay"; | ||
86 | }; | ||
87 | |||
88 | &ehci2 { | ||
89 | status = "okay"; | ||
90 | }; | ||
91 | |||
92 | &ohci2 { | ||
93 | status = "okay"; | ||
94 | }; | ||
95 | |||
96 | &ehci3 { | ||
97 | status = "okay"; | ||
98 | }; | ||
99 | |||
100 | &ohci3 { | ||
101 | status = "okay"; | ||
102 | }; | ||
103 | |||
104 | &nand { | ||
105 | status = "okay"; | ||
106 | }; | ||
107 | |||
108 | &sata { | ||
109 | status = "okay"; | ||
110 | }; | ||
111 | |||
112 | &sata_phy { | ||
113 | status = "okay"; | ||
114 | }; | ||
115 | |||
116 | &sdhci0 { | ||
117 | status = "okay"; | ||
118 | }; | ||
119 | |||
120 | &sdhci1 { | ||
121 | status = "okay"; | ||
122 | }; | ||
123 | |||
124 | &mspi { | ||
125 | status = "okay"; | ||
126 | }; | ||
127 | |||
128 | &waketimer { | ||
129 | status = "okay"; | ||
130 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi b/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi new file mode 100644 index 000000000..96c30d857 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch24.dtsi | |||
@@ -0,0 +1,26 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | &nand { | ||
3 | nandcs@1 { | ||
4 | compatible = "brcm,nandcs"; | ||
5 | reg = <1>; | ||
6 | nand-on-flash-bbt; | ||
7 | |||
8 | nand-ecc-strength = <24>; | ||
9 | nand-ecc-step-size = <1024>; | ||
10 | brcm,nand-oob-sector-size = <27>; | ||
11 | |||
12 | partitions { | ||
13 | compatible = "fixed-partitions"; | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <1>; | ||
16 | |||
17 | flash1.rootfs@0 { | ||
18 | reg = <0x0 0x10000000>; | ||
19 | }; | ||
20 | |||
21 | flash1.kernel@10000000 { | ||
22 | reg = <0x10000000 0x400000>; | ||
23 | }; | ||
24 | }; | ||
25 | }; | ||
26 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi b/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi new file mode 100644 index 000000000..7b5afefbb --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm97xxx-nand-cs1-bch4.dtsi | |||
@@ -0,0 +1,26 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | &nand { | ||
3 | nandcs@1 { | ||
4 | compatible = "brcm,nandcs"; | ||
5 | reg = <1>; | ||
6 | nand-on-flash-bbt; | ||
7 | |||
8 | nand-ecc-strength = <4>; | ||
9 | nand-ecc-step-size = <512>; | ||
10 | brcm,nand-oob-sector-size = <16>; | ||
11 | |||
12 | partitions { | ||
13 | compatible = "fixed-partitions"; | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <1>; | ||
16 | |||
17 | flash1.rootfs@0 { | ||
18 | reg = <0x0 0x10000000>; | ||
19 | }; | ||
20 | |||
21 | flash1.kernel@10000000 { | ||
22 | reg = <0x10000000 0x400000>; | ||
23 | }; | ||
24 | }; | ||
25 | }; | ||
26 | }; | ||
diff --git a/arch/mips/boot/dts/brcm/bcm9ejtagprb.dts b/arch/mips/boot/dts/brcm/bcm9ejtagprb.dts new file mode 100644 index 000000000..8d58c1971 --- /dev/null +++ b/arch/mips/boot/dts/brcm/bcm9ejtagprb.dts | |||
@@ -0,0 +1,23 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "bcm6328.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "brcm,bcm9ejtagprb", "brcm,bcm6328"; | ||
8 | model = "Broadcom BCM9EJTAGPRB"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x00000000 0x08000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,115200"; | ||
17 | stdout-path = &uart0; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &uart0 { | ||
22 | status = "okay"; | ||
23 | }; | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/Makefile b/arch/mips/boot/dts/cavium-octeon/Makefile new file mode 100644 index 000000000..17aef35f3 --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/Makefile | |||
@@ -0,0 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_CAVIUM_OCTEON_SOC) += octeon_3xxx.dtb octeon_68xx.dtb | ||
3 | |||
4 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/dlink_dsr-1000n.dts b/arch/mips/boot/dts/cavium-octeon/dlink_dsr-1000n.dts new file mode 100644 index 000000000..2fdb4baad --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/dlink_dsr-1000n.dts | |||
@@ -0,0 +1,48 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Device tree source for D-Link DSR-1000N. | ||
4 | * | ||
5 | * Written by: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
6 | */ | ||
7 | |||
8 | /include/ "dlink_dsr-500n-1000n.dtsi" | ||
9 | #include <dt-bindings/gpio/gpio.h> | ||
10 | |||
11 | / { | ||
12 | model = "dlink,dsr-1000n"; | ||
13 | |||
14 | soc@0 { | ||
15 | uart0: serial@1180000000800 { | ||
16 | clock-frequency = <500000000>; | ||
17 | }; | ||
18 | }; | ||
19 | |||
20 | leds { | ||
21 | compatible = "gpio-leds"; | ||
22 | |||
23 | usb1 { | ||
24 | label = "usb1"; | ||
25 | gpios = <&gpio 9 GPIO_ACTIVE_LOW>; | ||
26 | }; | ||
27 | |||
28 | usb2 { | ||
29 | label = "usb2"; | ||
30 | gpios = <&gpio 10 GPIO_ACTIVE_LOW>; | ||
31 | }; | ||
32 | |||
33 | wps { | ||
34 | label = "wps"; | ||
35 | gpios = <&gpio 11 GPIO_ACTIVE_LOW>; | ||
36 | }; | ||
37 | |||
38 | wireless1 { | ||
39 | label = "5g"; | ||
40 | gpios = <&gpio 17 GPIO_ACTIVE_LOW>; | ||
41 | }; | ||
42 | |||
43 | wireless2 { | ||
44 | label = "2.4g"; | ||
45 | gpios = <&gpio 18 GPIO_ACTIVE_LOW>; | ||
46 | }; | ||
47 | }; | ||
48 | }; | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/dlink_dsr-500n-1000n.dtsi b/arch/mips/boot/dts/cavium-octeon/dlink_dsr-500n-1000n.dtsi new file mode 100644 index 000000000..b4acdb26a --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/dlink_dsr-500n-1000n.dtsi | |||
@@ -0,0 +1,55 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Device tree source for D-Link DSR-500N/1000N (common parts). | ||
4 | * | ||
5 | * Written by: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
6 | */ | ||
7 | |||
8 | /include/ "octeon_3xxx.dtsi" | ||
9 | |||
10 | / { | ||
11 | soc@0 { | ||
12 | smi0: mdio@1180000001800 { | ||
13 | phy8: ethernet-phy@8 { | ||
14 | reg = <8>; | ||
15 | compatible = "ethernet-phy-ieee802.3-c22"; | ||
16 | }; | ||
17 | }; | ||
18 | |||
19 | pip: pip@11800a0000000 { | ||
20 | interface@0 { | ||
21 | ethernet@0 { | ||
22 | fixed-link { | ||
23 | speed = <1000>; | ||
24 | full-duplex; | ||
25 | }; | ||
26 | }; | ||
27 | ethernet@1 { | ||
28 | fixed-link { | ||
29 | speed = <1000>; | ||
30 | full-duplex; | ||
31 | }; | ||
32 | }; | ||
33 | ethernet@2 { | ||
34 | phy-handle = <&phy8>; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | twsi0: i2c@1180000001000 { | ||
40 | rtc@68 { | ||
41 | compatible = "dallas,ds1337"; | ||
42 | reg = <0x68>; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | usbn: usbn@1180068000000 { | ||
47 | refclk-frequency = <12000000>; | ||
48 | refclk-type = "crystal"; | ||
49 | }; | ||
50 | }; | ||
51 | |||
52 | aliases { | ||
53 | pip = &pip; | ||
54 | }; | ||
55 | }; | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/dlink_dsr-500n.dts b/arch/mips/boot/dts/cavium-octeon/dlink_dsr-500n.dts new file mode 100644 index 000000000..e04237281 --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/dlink_dsr-500n.dts | |||
@@ -0,0 +1,37 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Device tree source for D-Link DSR-500N. | ||
4 | * | ||
5 | * Written by: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
6 | */ | ||
7 | |||
8 | /include/ "dlink_dsr-500n-1000n.dtsi" | ||
9 | #include <dt-bindings/gpio/gpio.h> | ||
10 | |||
11 | / { | ||
12 | model = "dlink,dsr-500n"; | ||
13 | compatible = "dlink,dsr-500n", "cavium,octeon-3860"; | ||
14 | |||
15 | soc@0 { | ||
16 | uart0: serial@1180000000800 { | ||
17 | clock-frequency = <300000000>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | leds { | ||
22 | compatible = "gpio-leds"; | ||
23 | |||
24 | usb { | ||
25 | gpios = <&gpio 9 GPIO_ACTIVE_LOW>; | ||
26 | }; | ||
27 | |||
28 | wps { | ||
29 | gpios = <&gpio 11 GPIO_ACTIVE_LOW>; | ||
30 | }; | ||
31 | |||
32 | wireless { | ||
33 | label = "2.4g"; | ||
34 | gpios = <&gpio 18 GPIO_ACTIVE_LOW>; | ||
35 | }; | ||
36 | }; | ||
37 | }; | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts b/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts new file mode 100644 index 000000000..dda0559ce --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts | |||
@@ -0,0 +1,406 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * OCTEON 3XXX, 5XXX, 63XX device tree skeleton. | ||
4 | * | ||
5 | * This device tree is pruned and patched by early boot code before | ||
6 | * use. Because of this, it contains a super-set of the available | ||
7 | * devices and properties. | ||
8 | */ | ||
9 | |||
10 | /include/ "octeon_3xxx.dtsi" | ||
11 | |||
12 | / { | ||
13 | soc@0 { | ||
14 | smi0: mdio@1180000001800 { | ||
15 | phy0: ethernet-phy@0 { | ||
16 | compatible = "marvell,88e1118"; | ||
17 | marvell,reg-init = | ||
18 | /* Fix rx and tx clock transition timing */ | ||
19 | <2 0x15 0xffcf 0>, /* Reg 2,21 Clear bits 4, 5 */ | ||
20 | /* Adjust LED drive. */ | ||
21 | <3 0x11 0 0x442a>, /* Reg 3,17 <- 0442a */ | ||
22 | /* irq, blink-activity, blink-link */ | ||
23 | <3 0x10 0 0x0242>; /* Reg 3,16 <- 0x0242 */ | ||
24 | reg = <0>; | ||
25 | }; | ||
26 | |||
27 | phy1: ethernet-phy@1 { | ||
28 | compatible = "marvell,88e1118"; | ||
29 | marvell,reg-init = | ||
30 | /* Fix rx and tx clock transition timing */ | ||
31 | <2 0x15 0xffcf 0>, /* Reg 2,21 Clear bits 4, 5 */ | ||
32 | /* Adjust LED drive. */ | ||
33 | <3 0x11 0 0x442a>, /* Reg 3,17 <- 0442a */ | ||
34 | /* irq, blink-activity, blink-link */ | ||
35 | <3 0x10 0 0x0242>; /* Reg 3,16 <- 0x0242 */ | ||
36 | reg = <1>; | ||
37 | }; | ||
38 | |||
39 | phy2: ethernet-phy@2 { | ||
40 | reg = <2>; | ||
41 | compatible = "marvell,88e1149r"; | ||
42 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
43 | <3 0x11 0 0x00aa>, | ||
44 | <3 0x12 0 0x4105>, | ||
45 | <3 0x13 0 0x0a60>; | ||
46 | }; | ||
47 | phy3: ethernet-phy@3 { | ||
48 | reg = <3>; | ||
49 | compatible = "marvell,88e1149r"; | ||
50 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
51 | <3 0x11 0 0x00aa>, | ||
52 | <3 0x12 0 0x4105>, | ||
53 | <3 0x13 0 0x0a60>; | ||
54 | }; | ||
55 | phy4: ethernet-phy@4 { | ||
56 | reg = <4>; | ||
57 | compatible = "marvell,88e1149r"; | ||
58 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
59 | <3 0x11 0 0x00aa>, | ||
60 | <3 0x12 0 0x4105>, | ||
61 | <3 0x13 0 0x0a60>; | ||
62 | }; | ||
63 | phy5: ethernet-phy@5 { | ||
64 | reg = <5>; | ||
65 | compatible = "marvell,88e1149r"; | ||
66 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
67 | <3 0x11 0 0x00aa>, | ||
68 | <3 0x12 0 0x4105>, | ||
69 | <3 0x13 0 0x0a60>; | ||
70 | }; | ||
71 | |||
72 | phy6: ethernet-phy@6 { | ||
73 | reg = <6>; | ||
74 | compatible = "marvell,88e1149r"; | ||
75 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
76 | <3 0x11 0 0x00aa>, | ||
77 | <3 0x12 0 0x4105>, | ||
78 | <3 0x13 0 0x0a60>; | ||
79 | }; | ||
80 | phy7: ethernet-phy@7 { | ||
81 | reg = <7>; | ||
82 | compatible = "marvell,88e1149r"; | ||
83 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
84 | <3 0x11 0 0x00aa>, | ||
85 | <3 0x12 0 0x4105>, | ||
86 | <3 0x13 0 0x0a60>; | ||
87 | }; | ||
88 | phy8: ethernet-phy@8 { | ||
89 | reg = <8>; | ||
90 | compatible = "marvell,88e1149r"; | ||
91 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
92 | <3 0x11 0 0x00aa>, | ||
93 | <3 0x12 0 0x4105>, | ||
94 | <3 0x13 0 0x0a60>; | ||
95 | }; | ||
96 | phy9: ethernet-phy@9 { | ||
97 | reg = <9>; | ||
98 | compatible = "marvell,88e1149r"; | ||
99 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
100 | <3 0x11 0 0x00aa>, | ||
101 | <3 0x12 0 0x4105>, | ||
102 | <3 0x13 0 0x0a60>; | ||
103 | }; | ||
104 | }; | ||
105 | |||
106 | smi1: mdio@1180000001900 { | ||
107 | compatible = "cavium,octeon-3860-mdio"; | ||
108 | #address-cells = <1>; | ||
109 | #size-cells = <0>; | ||
110 | reg = <0x11800 0x00001900 0x0 0x40>; | ||
111 | |||
112 | phy100: ethernet-phy@1 { | ||
113 | reg = <1>; | ||
114 | compatible = "marvell,88e1149r"; | ||
115 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
116 | <3 0x11 0 0x00aa>, | ||
117 | <3 0x12 0 0x4105>, | ||
118 | <3 0x13 0 0x0a60>; | ||
119 | interrupt-parent = <&gpio>; | ||
120 | interrupts = <12 8>; /* Pin 12, active low */ | ||
121 | }; | ||
122 | phy101: ethernet-phy@2 { | ||
123 | reg = <2>; | ||
124 | compatible = "marvell,88e1149r"; | ||
125 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
126 | <3 0x11 0 0x00aa>, | ||
127 | <3 0x12 0 0x4105>, | ||
128 | <3 0x13 0 0x0a60>; | ||
129 | interrupt-parent = <&gpio>; | ||
130 | interrupts = <12 8>; /* Pin 12, active low */ | ||
131 | }; | ||
132 | phy102: ethernet-phy@3 { | ||
133 | reg = <3>; | ||
134 | compatible = "marvell,88e1149r"; | ||
135 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
136 | <3 0x11 0 0x00aa>, | ||
137 | <3 0x12 0 0x4105>, | ||
138 | <3 0x13 0 0x0a60>; | ||
139 | interrupt-parent = <&gpio>; | ||
140 | interrupts = <12 8>; /* Pin 12, active low */ | ||
141 | }; | ||
142 | phy103: ethernet-phy@4 { | ||
143 | reg = <4>; | ||
144 | compatible = "marvell,88e1149r"; | ||
145 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
146 | <3 0x11 0 0x00aa>, | ||
147 | <3 0x12 0 0x4105>, | ||
148 | <3 0x13 0 0x0a60>; | ||
149 | interrupt-parent = <&gpio>; | ||
150 | interrupts = <12 8>; /* Pin 12, active low */ | ||
151 | }; | ||
152 | }; | ||
153 | |||
154 | mix0: ethernet@1070000100000 { | ||
155 | compatible = "cavium,octeon-5750-mix"; | ||
156 | reg = <0x10700 0x00100000 0x0 0x100>, /* MIX */ | ||
157 | <0x11800 0xE0000000 0x0 0x300>, /* AGL */ | ||
158 | <0x11800 0xE0000400 0x0 0x400>, /* AGL_SHARED */ | ||
159 | <0x11800 0xE0002000 0x0 0x8>; /* AGL_PRT_CTL */ | ||
160 | cell-index = <0>; | ||
161 | interrupts = <0 62>, <1 46>; | ||
162 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
163 | phy-handle = <&phy0>; | ||
164 | }; | ||
165 | |||
166 | mix1: ethernet@1070000100800 { | ||
167 | compatible = "cavium,octeon-5750-mix"; | ||
168 | reg = <0x10700 0x00100800 0x0 0x100>, /* MIX */ | ||
169 | <0x11800 0xE0000800 0x0 0x300>, /* AGL */ | ||
170 | <0x11800 0xE0000400 0x0 0x400>, /* AGL_SHARED */ | ||
171 | <0x11800 0xE0002008 0x0 0x8>; /* AGL_PRT_CTL */ | ||
172 | cell-index = <1>; | ||
173 | interrupts = <1 18>, < 1 46>; | ||
174 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
175 | phy-handle = <&phy1>; | ||
176 | }; | ||
177 | |||
178 | pip: pip@11800a0000000 { | ||
179 | interface@0 { | ||
180 | ethernet@0 { | ||
181 | phy-handle = <&phy2>; | ||
182 | cavium,alt-phy-handle = <&phy100>; | ||
183 | rx-delay = <0>; | ||
184 | tx-delay = <0>; | ||
185 | fixed-link { | ||
186 | speed = <1000>; | ||
187 | full-duplex; | ||
188 | }; | ||
189 | }; | ||
190 | ethernet@1 { | ||
191 | phy-handle = <&phy3>; | ||
192 | cavium,alt-phy-handle = <&phy101>; | ||
193 | rx-delay = <0>; | ||
194 | tx-delay = <0>; | ||
195 | fixed-link { | ||
196 | speed = <1000>; | ||
197 | full-duplex; | ||
198 | }; | ||
199 | }; | ||
200 | ethernet@2 { | ||
201 | phy-handle = <&phy4>; | ||
202 | cavium,alt-phy-handle = <&phy102>; | ||
203 | rx-delay = <0>; | ||
204 | tx-delay = <0>; | ||
205 | }; | ||
206 | ethernet@3 { | ||
207 | compatible = "cavium,octeon-3860-pip-port"; | ||
208 | reg = <0x3>; /* Port */ | ||
209 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
210 | phy-handle = <&phy5>; | ||
211 | cavium,alt-phy-handle = <&phy103>; | ||
212 | }; | ||
213 | ethernet@4 { | ||
214 | compatible = "cavium,octeon-3860-pip-port"; | ||
215 | reg = <0x4>; /* Port */ | ||
216 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
217 | }; | ||
218 | ethernet@5 { | ||
219 | compatible = "cavium,octeon-3860-pip-port"; | ||
220 | reg = <0x5>; /* Port */ | ||
221 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
222 | }; | ||
223 | ethernet@6 { | ||
224 | compatible = "cavium,octeon-3860-pip-port"; | ||
225 | reg = <0x6>; /* Port */ | ||
226 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
227 | }; | ||
228 | ethernet@7 { | ||
229 | compatible = "cavium,octeon-3860-pip-port"; | ||
230 | reg = <0x7>; /* Port */ | ||
231 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
232 | }; | ||
233 | ethernet@8 { | ||
234 | compatible = "cavium,octeon-3860-pip-port"; | ||
235 | reg = <0x8>; /* Port */ | ||
236 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
237 | }; | ||
238 | ethernet@9 { | ||
239 | compatible = "cavium,octeon-3860-pip-port"; | ||
240 | reg = <0x9>; /* Port */ | ||
241 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
242 | }; | ||
243 | ethernet@a { | ||
244 | compatible = "cavium,octeon-3860-pip-port"; | ||
245 | reg = <0xa>; /* Port */ | ||
246 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
247 | }; | ||
248 | ethernet@b { | ||
249 | compatible = "cavium,octeon-3860-pip-port"; | ||
250 | reg = <0xb>; /* Port */ | ||
251 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
252 | }; | ||
253 | ethernet@c { | ||
254 | compatible = "cavium,octeon-3860-pip-port"; | ||
255 | reg = <0xc>; /* Port */ | ||
256 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
257 | }; | ||
258 | ethernet@d { | ||
259 | compatible = "cavium,octeon-3860-pip-port"; | ||
260 | reg = <0xd>; /* Port */ | ||
261 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
262 | }; | ||
263 | ethernet@e { | ||
264 | compatible = "cavium,octeon-3860-pip-port"; | ||
265 | reg = <0xe>; /* Port */ | ||
266 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
267 | }; | ||
268 | ethernet@f { | ||
269 | compatible = "cavium,octeon-3860-pip-port"; | ||
270 | reg = <0xf>; /* Port */ | ||
271 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
272 | }; | ||
273 | }; | ||
274 | |||
275 | interface@1 { | ||
276 | ethernet@0 { | ||
277 | compatible = "cavium,octeon-3860-pip-port"; | ||
278 | reg = <0x0>; /* Port */ | ||
279 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
280 | phy-handle = <&phy6>; | ||
281 | }; | ||
282 | ethernet@1 { | ||
283 | compatible = "cavium,octeon-3860-pip-port"; | ||
284 | reg = <0x1>; /* Port */ | ||
285 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
286 | phy-handle = <&phy7>; | ||
287 | }; | ||
288 | ethernet@2 { | ||
289 | compatible = "cavium,octeon-3860-pip-port"; | ||
290 | reg = <0x2>; /* Port */ | ||
291 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
292 | phy-handle = <&phy8>; | ||
293 | }; | ||
294 | ethernet@3 { | ||
295 | compatible = "cavium,octeon-3860-pip-port"; | ||
296 | reg = <0x3>; /* Port */ | ||
297 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
298 | phy-handle = <&phy9>; | ||
299 | }; | ||
300 | }; | ||
301 | }; | ||
302 | |||
303 | twsi0: i2c@1180000001000 { | ||
304 | rtc@68 { | ||
305 | compatible = "dallas,ds1337"; | ||
306 | reg = <0x68>; | ||
307 | }; | ||
308 | tmp@4c { | ||
309 | compatible = "ti,tmp421"; | ||
310 | reg = <0x4c>; | ||
311 | }; | ||
312 | }; | ||
313 | |||
314 | twsi1: i2c@1180000001200 { | ||
315 | #address-cells = <1>; | ||
316 | #size-cells = <0>; | ||
317 | compatible = "cavium,octeon-3860-twsi"; | ||
318 | reg = <0x11800 0x00001200 0x0 0x200>; | ||
319 | interrupts = <0 59>; | ||
320 | clock-frequency = <100000>; | ||
321 | }; | ||
322 | |||
323 | uart1: serial@1180000000c00 { | ||
324 | compatible = "cavium,octeon-3860-uart","ns16550"; | ||
325 | reg = <0x11800 0x00000c00 0x0 0x400>; | ||
326 | clock-frequency = <0>; | ||
327 | current-speed = <115200>; | ||
328 | reg-shift = <3>; | ||
329 | interrupts = <0 35>; | ||
330 | }; | ||
331 | |||
332 | uart2: serial@1180000000400 { | ||
333 | compatible = "cavium,octeon-3860-uart","ns16550"; | ||
334 | reg = <0x11800 0x00000400 0x0 0x400>; | ||
335 | clock-frequency = <0>; | ||
336 | current-speed = <115200>; | ||
337 | reg-shift = <3>; | ||
338 | interrupts = <1 16>; | ||
339 | }; | ||
340 | |||
341 | bootbus: bootbus@1180000000000 { | ||
342 | led0: led-display@4,0 { | ||
343 | compatible = "avago,hdsp-253x"; | ||
344 | reg = <4 0x20 0x20>, <4 0 0x20>; | ||
345 | }; | ||
346 | |||
347 | cf0: compact-flash@5,0 { | ||
348 | compatible = "cavium,ebt3000-compact-flash"; | ||
349 | reg = <5 0 0x10000>, <6 0 0x10000>; | ||
350 | cavium,bus-width = <16>; | ||
351 | cavium,true-ide; | ||
352 | cavium,dma-engine-handle = <&dma0>; | ||
353 | }; | ||
354 | }; | ||
355 | |||
356 | uctl: uctl@118006f000000 { | ||
357 | compatible = "cavium,octeon-6335-uctl"; | ||
358 | reg = <0x11800 0x6f000000 0x0 0x100>; | ||
359 | ranges; /* Direct mapping */ | ||
360 | #address-cells = <2>; | ||
361 | #size-cells = <2>; | ||
362 | /* 12MHz, 24MHz and 48MHz allowed */ | ||
363 | refclk-frequency = <12000000>; | ||
364 | /* Either "crystal" or "external" */ | ||
365 | refclk-type = "crystal"; | ||
366 | |||
367 | ehci@16f0000000000 { | ||
368 | compatible = "cavium,octeon-6335-ehci","usb-ehci"; | ||
369 | reg = <0x16f00 0x00000000 0x0 0x100>; | ||
370 | interrupts = <0 56>; | ||
371 | big-endian-regs; | ||
372 | }; | ||
373 | ohci@16f0000000400 { | ||
374 | compatible = "cavium,octeon-6335-ohci","usb-ohci"; | ||
375 | reg = <0x16f00 0x00000400 0x0 0x100>; | ||
376 | interrupts = <0 56>; | ||
377 | big-endian-regs; | ||
378 | }; | ||
379 | }; | ||
380 | |||
381 | usbn: usbn@1180068000000 { | ||
382 | /* 12MHz, 24MHz and 48MHz allowed */ | ||
383 | refclk-frequency = <12000000>; | ||
384 | /* Either "crystal" or "external" */ | ||
385 | refclk-type = "crystal"; | ||
386 | }; | ||
387 | }; | ||
388 | |||
389 | aliases { | ||
390 | mix0 = &mix0; | ||
391 | mix1 = &mix1; | ||
392 | pip = &pip; | ||
393 | smi0 = &smi0; | ||
394 | smi1 = &smi1; | ||
395 | twsi0 = &twsi0; | ||
396 | twsi1 = &twsi1; | ||
397 | uart0 = &uart0; | ||
398 | uart1 = &uart1; | ||
399 | uart2 = &uart2; | ||
400 | flash0 = &flash0; | ||
401 | cf0 = &cf0; | ||
402 | uctl = &uctl; | ||
403 | usbn = &usbn; | ||
404 | led0 = &led0; | ||
405 | }; | ||
406 | }; | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dtsi b/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dtsi new file mode 100644 index 000000000..3c296623d --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dtsi | |||
@@ -0,0 +1,232 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* OCTEON 3XXX DTS common parts. */ | ||
3 | |||
4 | /dts-v1/; | ||
5 | |||
6 | / { | ||
7 | compatible = "cavium,octeon-3860"; | ||
8 | #address-cells = <2>; | ||
9 | #size-cells = <2>; | ||
10 | interrupt-parent = <&ciu>; | ||
11 | |||
12 | soc@0 { | ||
13 | compatible = "simple-bus"; | ||
14 | #address-cells = <2>; | ||
15 | #size-cells = <2>; | ||
16 | ranges; /* Direct mapping */ | ||
17 | |||
18 | ciu: interrupt-controller@1070000000000 { | ||
19 | compatible = "cavium,octeon-3860-ciu"; | ||
20 | interrupt-controller; | ||
21 | /* Interrupts are specified by two parts: | ||
22 | * 1) Controller register (0 or 1) | ||
23 | * 2) Bit within the register (0..63) | ||
24 | */ | ||
25 | #interrupt-cells = <2>; | ||
26 | reg = <0x10700 0x00000000 0x0 0x7000>; | ||
27 | }; | ||
28 | |||
29 | gpio: gpio-controller@1070000000800 { | ||
30 | #gpio-cells = <2>; | ||
31 | compatible = "cavium,octeon-3860-gpio"; | ||
32 | reg = <0x10700 0x00000800 0x0 0x100>; | ||
33 | gpio-controller; | ||
34 | /* Interrupts are specified by two parts: | ||
35 | * 1) GPIO pin number (0..15) | ||
36 | * 2) Triggering (1 - edge rising | ||
37 | * 2 - edge falling | ||
38 | * 4 - level active high | ||
39 | * 8 - level active low) | ||
40 | */ | ||
41 | interrupt-controller; | ||
42 | #interrupt-cells = <2>; | ||
43 | /* The GPIO pin connect to 16 consecutive CUI bits */ | ||
44 | interrupts = <0 16>, <0 17>, <0 18>, <0 19>, | ||
45 | <0 20>, <0 21>, <0 22>, <0 23>, | ||
46 | <0 24>, <0 25>, <0 26>, <0 27>, | ||
47 | <0 28>, <0 29>, <0 30>, <0 31>; | ||
48 | }; | ||
49 | |||
50 | smi0: mdio@1180000001800 { | ||
51 | compatible = "cavium,octeon-3860-mdio"; | ||
52 | #address-cells = <1>; | ||
53 | #size-cells = <0>; | ||
54 | reg = <0x11800 0x00001800 0x0 0x40>; | ||
55 | }; | ||
56 | |||
57 | pip: pip@11800a0000000 { | ||
58 | compatible = "cavium,octeon-3860-pip"; | ||
59 | #address-cells = <1>; | ||
60 | #size-cells = <0>; | ||
61 | reg = <0x11800 0xa0000000 0x0 0x2000>; | ||
62 | |||
63 | interface@0 { | ||
64 | compatible = "cavium,octeon-3860-pip-interface"; | ||
65 | #address-cells = <1>; | ||
66 | #size-cells = <0>; | ||
67 | reg = <0>; /* interface */ | ||
68 | |||
69 | ethernet@0 { | ||
70 | compatible = "cavium,octeon-3860-pip-port"; | ||
71 | reg = <0x0>; /* Port */ | ||
72 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
73 | }; | ||
74 | ethernet@1 { | ||
75 | compatible = "cavium,octeon-3860-pip-port"; | ||
76 | reg = <0x1>; /* Port */ | ||
77 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
78 | }; | ||
79 | ethernet@2 { | ||
80 | compatible = "cavium,octeon-3860-pip-port"; | ||
81 | reg = <0x2>; /* Port */ | ||
82 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | interface@1 { | ||
87 | compatible = "cavium,octeon-3860-pip-interface"; | ||
88 | #address-cells = <1>; | ||
89 | #size-cells = <0>; | ||
90 | reg = <1>; /* interface */ | ||
91 | }; | ||
92 | }; | ||
93 | |||
94 | twsi0: i2c@1180000001000 { | ||
95 | #address-cells = <1>; | ||
96 | #size-cells = <0>; | ||
97 | compatible = "cavium,octeon-3860-twsi"; | ||
98 | reg = <0x11800 0x00001000 0x0 0x200>; | ||
99 | interrupts = <0 45>; | ||
100 | clock-frequency = <100000>; | ||
101 | }; | ||
102 | |||
103 | uart0: serial@1180000000800 { | ||
104 | compatible = "cavium,octeon-3860-uart","ns16550"; | ||
105 | reg = <0x11800 0x00000800 0x0 0x400>; | ||
106 | clock-frequency = <0>; | ||
107 | current-speed = <115200>; | ||
108 | reg-shift = <3>; | ||
109 | interrupts = <0 34>; | ||
110 | }; | ||
111 | |||
112 | bootbus: bootbus@1180000000000 { | ||
113 | compatible = "cavium,octeon-3860-bootbus"; | ||
114 | reg = <0x11800 0x00000000 0x0 0x200>; | ||
115 | /* The chip select number and offset */ | ||
116 | #address-cells = <2>; | ||
117 | /* The size of the chip select region */ | ||
118 | #size-cells = <1>; | ||
119 | ranges = <0 0 0x0 0x1f400000 0xc00000>, | ||
120 | <1 0 0x10000 0x30000000 0>, | ||
121 | <2 0 0x10000 0x40000000 0>, | ||
122 | <3 0 0x10000 0x50000000 0>, | ||
123 | <4 0 0x0 0x1d020000 0x10000>, | ||
124 | <5 0 0x0 0x1d040000 0x10000>, | ||
125 | <6 0 0x0 0x1d050000 0x10000>, | ||
126 | <7 0 0x10000 0x90000000 0>; | ||
127 | |||
128 | cavium,cs-config@0 { | ||
129 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
130 | cavium,cs-index = <0>; | ||
131 | cavium,t-adr = <20>; | ||
132 | cavium,t-ce = <60>; | ||
133 | cavium,t-oe = <60>; | ||
134 | cavium,t-we = <45>; | ||
135 | cavium,t-rd-hld = <35>; | ||
136 | cavium,t-wr-hld = <45>; | ||
137 | cavium,t-pause = <0>; | ||
138 | cavium,t-wait = <0>; | ||
139 | cavium,t-page = <35>; | ||
140 | cavium,t-rd-dly = <0>; | ||
141 | |||
142 | cavium,pages = <0>; | ||
143 | cavium,bus-width = <8>; | ||
144 | }; | ||
145 | cavium,cs-config@4 { | ||
146 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
147 | cavium,cs-index = <4>; | ||
148 | cavium,t-adr = <320>; | ||
149 | cavium,t-ce = <320>; | ||
150 | cavium,t-oe = <320>; | ||
151 | cavium,t-we = <320>; | ||
152 | cavium,t-rd-hld = <320>; | ||
153 | cavium,t-wr-hld = <320>; | ||
154 | cavium,t-pause = <320>; | ||
155 | cavium,t-wait = <320>; | ||
156 | cavium,t-page = <320>; | ||
157 | cavium,t-rd-dly = <0>; | ||
158 | |||
159 | cavium,pages = <0>; | ||
160 | cavium,bus-width = <8>; | ||
161 | }; | ||
162 | cavium,cs-config@5 { | ||
163 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
164 | cavium,cs-index = <5>; | ||
165 | cavium,t-adr = <5>; | ||
166 | cavium,t-ce = <300>; | ||
167 | cavium,t-oe = <125>; | ||
168 | cavium,t-we = <150>; | ||
169 | cavium,t-rd-hld = <100>; | ||
170 | cavium,t-wr-hld = <30>; | ||
171 | cavium,t-pause = <0>; | ||
172 | cavium,t-wait = <30>; | ||
173 | cavium,t-page = <320>; | ||
174 | cavium,t-rd-dly = <0>; | ||
175 | |||
176 | cavium,pages = <0>; | ||
177 | cavium,bus-width = <16>; | ||
178 | }; | ||
179 | cavium,cs-config@6 { | ||
180 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
181 | cavium,cs-index = <6>; | ||
182 | cavium,t-adr = <5>; | ||
183 | cavium,t-ce = <300>; | ||
184 | cavium,t-oe = <270>; | ||
185 | cavium,t-we = <150>; | ||
186 | cavium,t-rd-hld = <100>; | ||
187 | cavium,t-wr-hld = <70>; | ||
188 | cavium,t-pause = <0>; | ||
189 | cavium,t-wait = <0>; | ||
190 | cavium,t-page = <320>; | ||
191 | cavium,t-rd-dly = <0>; | ||
192 | |||
193 | cavium,pages = <0>; | ||
194 | cavium,wait-mode; | ||
195 | cavium,bus-width = <16>; | ||
196 | }; | ||
197 | |||
198 | flash0: nor@0,0 { | ||
199 | compatible = "cfi-flash"; | ||
200 | reg = <0 0 0x800000>; | ||
201 | #address-cells = <1>; | ||
202 | #size-cells = <1>; | ||
203 | }; | ||
204 | }; | ||
205 | |||
206 | dma0: dma-engine@1180000000100 { | ||
207 | compatible = "cavium,octeon-5750-bootbus-dma"; | ||
208 | reg = <0x11800 0x00000100 0x0 0x8>; | ||
209 | interrupts = <0 63>; | ||
210 | }; | ||
211 | |||
212 | dma1: dma-engine@1180000000108 { | ||
213 | compatible = "cavium,octeon-5750-bootbus-dma"; | ||
214 | reg = <0x11800 0x00000108 0x0 0x8>; | ||
215 | interrupts = <0 63>; | ||
216 | }; | ||
217 | |||
218 | usbn: usbn@1180068000000 { | ||
219 | compatible = "cavium,octeon-5750-usbn"; | ||
220 | reg = <0x11800 0x68000000 0x0 0x1000>; | ||
221 | ranges; /* Direct mapping */ | ||
222 | #address-cells = <2>; | ||
223 | #size-cells = <2>; | ||
224 | |||
225 | usbc@16f0010000000 { | ||
226 | compatible = "cavium,octeon-5750-usbc"; | ||
227 | reg = <0x16f00 0x10000000 0x0 0x80000>; | ||
228 | interrupts = <0 56>; | ||
229 | }; | ||
230 | }; | ||
231 | }; | ||
232 | }; | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/octeon_68xx.dts b/arch/mips/boot/dts/cavium-octeon/octeon_68xx.dts new file mode 100644 index 000000000..3d0acbb2e --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/octeon_68xx.dts | |||
@@ -0,0 +1,626 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | /* | ||
4 | * OCTEON 68XX device tree skeleton. | ||
5 | * | ||
6 | * This device tree is pruned and patched by early boot code before | ||
7 | * use. Because of this, it contains a super-set of the available | ||
8 | * devices and properties. | ||
9 | */ | ||
10 | / { | ||
11 | compatible = "cavium,octeon-6880"; | ||
12 | #address-cells = <2>; | ||
13 | #size-cells = <2>; | ||
14 | interrupt-parent = <&ciu2>; | ||
15 | |||
16 | soc@0 { | ||
17 | compatible = "simple-bus"; | ||
18 | #address-cells = <2>; | ||
19 | #size-cells = <2>; | ||
20 | ranges; /* Direct mapping */ | ||
21 | |||
22 | ciu2: interrupt-controller@1070100000000 { | ||
23 | compatible = "cavium,octeon-6880-ciu2"; | ||
24 | interrupt-controller; | ||
25 | /* Interrupts are specified by two parts: | ||
26 | * 1) Controller register (0 or 7) | ||
27 | * 2) Bit within the register (0..63) | ||
28 | */ | ||
29 | #address-cells = <0>; | ||
30 | #interrupt-cells = <2>; | ||
31 | reg = <0x10701 0x00000000 0x0 0x4000000>; | ||
32 | }; | ||
33 | |||
34 | gpio: gpio-controller@1070000000800 { | ||
35 | #gpio-cells = <2>; | ||
36 | compatible = "cavium,octeon-3860-gpio"; | ||
37 | reg = <0x10700 0x00000800 0x0 0x100>; | ||
38 | gpio-controller; | ||
39 | /* Interrupts are specified by two parts: | ||
40 | * 1) GPIO pin number (0..15) | ||
41 | * 2) Triggering (1 - edge rising | ||
42 | * 2 - edge falling | ||
43 | * 4 - level active high | ||
44 | * 8 - level active low) | ||
45 | */ | ||
46 | interrupt-controller; | ||
47 | #interrupt-cells = <2>; | ||
48 | /* The GPIO pins connect to 16 consecutive CUI bits */ | ||
49 | interrupts = <7 0>, <7 1>, <7 2>, <7 3>, | ||
50 | <7 4>, <7 5>, <7 6>, <7 7>, | ||
51 | <7 8>, <7 9>, <7 10>, <7 11>, | ||
52 | <7 12>, <7 13>, <7 14>, <7 15>; | ||
53 | }; | ||
54 | |||
55 | smi0: mdio@1180000003800 { | ||
56 | compatible = "cavium,octeon-3860-mdio"; | ||
57 | #address-cells = <1>; | ||
58 | #size-cells = <0>; | ||
59 | reg = <0x11800 0x00003800 0x0 0x40>; | ||
60 | |||
61 | phy0: ethernet-phy@6 { | ||
62 | compatible = "marvell,88e1118"; | ||
63 | marvell,reg-init = | ||
64 | /* Fix rx and tx clock transition timing */ | ||
65 | <2 0x15 0xffcf 0>, /* Reg 2,21 Clear bits 4, 5 */ | ||
66 | /* Adjust LED drive. */ | ||
67 | <3 0x11 0 0x442a>, /* Reg 3,17 <- 0442a */ | ||
68 | /* irq, blink-activity, blink-link */ | ||
69 | <3 0x10 0 0x0242>; /* Reg 3,16 <- 0x0242 */ | ||
70 | reg = <6>; | ||
71 | }; | ||
72 | |||
73 | phy1: ethernet-phy@1 { | ||
74 | cavium,qlm-trim = "4,sgmii"; | ||
75 | reg = <1>; | ||
76 | compatible = "marvell,88e1149r"; | ||
77 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
78 | <3 0x11 0 0x00aa>, | ||
79 | <3 0x12 0 0x4105>, | ||
80 | <3 0x13 0 0x0a60>; | ||
81 | }; | ||
82 | phy2: ethernet-phy@2 { | ||
83 | cavium,qlm-trim = "4,sgmii"; | ||
84 | reg = <2>; | ||
85 | compatible = "marvell,88e1149r"; | ||
86 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
87 | <3 0x11 0 0x00aa>, | ||
88 | <3 0x12 0 0x4105>, | ||
89 | <3 0x13 0 0x0a60>; | ||
90 | }; | ||
91 | phy3: ethernet-phy@3 { | ||
92 | cavium,qlm-trim = "4,sgmii"; | ||
93 | reg = <3>; | ||
94 | compatible = "marvell,88e1149r"; | ||
95 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
96 | <3 0x11 0 0x00aa>, | ||
97 | <3 0x12 0 0x4105>, | ||
98 | <3 0x13 0 0x0a60>; | ||
99 | }; | ||
100 | phy4: ethernet-phy@4 { | ||
101 | cavium,qlm-trim = "4,sgmii"; | ||
102 | reg = <4>; | ||
103 | compatible = "marvell,88e1149r"; | ||
104 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
105 | <3 0x11 0 0x00aa>, | ||
106 | <3 0x12 0 0x4105>, | ||
107 | <3 0x13 0 0x0a60>; | ||
108 | }; | ||
109 | }; | ||
110 | |||
111 | smi1: mdio@1180000003880 { | ||
112 | compatible = "cavium,octeon-3860-mdio"; | ||
113 | #address-cells = <1>; | ||
114 | #size-cells = <0>; | ||
115 | reg = <0x11800 0x00003880 0x0 0x40>; | ||
116 | |||
117 | phy41: ethernet-phy@1 { | ||
118 | cavium,qlm-trim = "0,sgmii"; | ||
119 | reg = <1>; | ||
120 | compatible = "marvell,88e1149r"; | ||
121 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
122 | <3 0x11 0 0x00aa>, | ||
123 | <3 0x12 0 0x4105>, | ||
124 | <3 0x13 0 0x0a60>; | ||
125 | }; | ||
126 | phy42: ethernet-phy@2 { | ||
127 | cavium,qlm-trim = "0,sgmii"; | ||
128 | reg = <2>; | ||
129 | compatible = "marvell,88e1149r"; | ||
130 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
131 | <3 0x11 0 0x00aa>, | ||
132 | <3 0x12 0 0x4105>, | ||
133 | <3 0x13 0 0x0a60>; | ||
134 | }; | ||
135 | phy43: ethernet-phy@3 { | ||
136 | cavium,qlm-trim = "0,sgmii"; | ||
137 | reg = <3>; | ||
138 | compatible = "marvell,88e1149r"; | ||
139 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
140 | <3 0x11 0 0x00aa>, | ||
141 | <3 0x12 0 0x4105>, | ||
142 | <3 0x13 0 0x0a60>; | ||
143 | }; | ||
144 | phy44: ethernet-phy@4 { | ||
145 | cavium,qlm-trim = "0,sgmii"; | ||
146 | reg = <4>; | ||
147 | compatible = "marvell,88e1149r"; | ||
148 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
149 | <3 0x11 0 0x00aa>, | ||
150 | <3 0x12 0 0x4105>, | ||
151 | <3 0x13 0 0x0a60>; | ||
152 | }; | ||
153 | }; | ||
154 | |||
155 | smi2: mdio@1180000003900 { | ||
156 | compatible = "cavium,octeon-3860-mdio"; | ||
157 | #address-cells = <1>; | ||
158 | #size-cells = <0>; | ||
159 | reg = <0x11800 0x00003900 0x0 0x40>; | ||
160 | |||
161 | phy21: ethernet-phy@1 { | ||
162 | cavium,qlm-trim = "2,sgmii"; | ||
163 | reg = <1>; | ||
164 | compatible = "marvell,88e1149r"; | ||
165 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
166 | <3 0x11 0 0x00aa>, | ||
167 | <3 0x12 0 0x4105>, | ||
168 | <3 0x13 0 0x0a60>; | ||
169 | }; | ||
170 | phy22: ethernet-phy@2 { | ||
171 | cavium,qlm-trim = "2,sgmii"; | ||
172 | reg = <2>; | ||
173 | compatible = "marvell,88e1149r"; | ||
174 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
175 | <3 0x11 0 0x00aa>, | ||
176 | <3 0x12 0 0x4105>, | ||
177 | <3 0x13 0 0x0a60>; | ||
178 | }; | ||
179 | phy23: ethernet-phy@3 { | ||
180 | cavium,qlm-trim = "2,sgmii"; | ||
181 | reg = <3>; | ||
182 | compatible = "marvell,88e1149r"; | ||
183 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
184 | <3 0x11 0 0x00aa>, | ||
185 | <3 0x12 0 0x4105>, | ||
186 | <3 0x13 0 0x0a60>; | ||
187 | }; | ||
188 | phy24: ethernet-phy@4 { | ||
189 | cavium,qlm-trim = "2,sgmii"; | ||
190 | reg = <4>; | ||
191 | compatible = "marvell,88e1149r"; | ||
192 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
193 | <3 0x11 0 0x00aa>, | ||
194 | <3 0x12 0 0x4105>, | ||
195 | <3 0x13 0 0x0a60>; | ||
196 | }; | ||
197 | }; | ||
198 | |||
199 | smi3: mdio@1180000003980 { | ||
200 | compatible = "cavium,octeon-3860-mdio"; | ||
201 | #address-cells = <1>; | ||
202 | #size-cells = <0>; | ||
203 | reg = <0x11800 0x00003980 0x0 0x40>; | ||
204 | |||
205 | phy11: ethernet-phy@1 { | ||
206 | cavium,qlm-trim = "3,sgmii"; | ||
207 | reg = <1>; | ||
208 | compatible = "marvell,88e1149r"; | ||
209 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
210 | <3 0x11 0 0x00aa>, | ||
211 | <3 0x12 0 0x4105>, | ||
212 | <3 0x13 0 0x0a60>; | ||
213 | }; | ||
214 | phy12: ethernet-phy@2 { | ||
215 | cavium,qlm-trim = "3,sgmii"; | ||
216 | reg = <2>; | ||
217 | compatible = "marvell,88e1149r"; | ||
218 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
219 | <3 0x11 0 0x00aa>, | ||
220 | <3 0x12 0 0x4105>, | ||
221 | <3 0x13 0 0x0a60>; | ||
222 | }; | ||
223 | phy13: ethernet-phy@3 { | ||
224 | cavium,qlm-trim = "3,sgmii"; | ||
225 | reg = <3>; | ||
226 | compatible = "marvell,88e1149r"; | ||
227 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
228 | <3 0x11 0 0x00aa>, | ||
229 | <3 0x12 0 0x4105>, | ||
230 | <3 0x13 0 0x0a60>; | ||
231 | }; | ||
232 | phy14: ethernet-phy@4 { | ||
233 | cavium,qlm-trim = "3,sgmii"; | ||
234 | reg = <4>; | ||
235 | compatible = "marvell,88e1149r"; | ||
236 | marvell,reg-init = <3 0x10 0 0x5777>, | ||
237 | <3 0x11 0 0x00aa>, | ||
238 | <3 0x12 0 0x4105>, | ||
239 | <3 0x13 0 0x0a60>; | ||
240 | }; | ||
241 | }; | ||
242 | |||
243 | mix0: ethernet@1070000100000 { | ||
244 | compatible = "cavium,octeon-5750-mix"; | ||
245 | reg = <0x10700 0x00100000 0x0 0x100>, /* MIX */ | ||
246 | <0x11800 0xE0000000 0x0 0x300>, /* AGL */ | ||
247 | <0x11800 0xE0000400 0x0 0x400>, /* AGL_SHARED */ | ||
248 | <0x11800 0xE0002000 0x0 0x8>; /* AGL_PRT_CTL */ | ||
249 | cell-index = <0>; | ||
250 | interrupts = <6 40>, <6 32>; | ||
251 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
252 | phy-handle = <&phy0>; | ||
253 | }; | ||
254 | |||
255 | pip: pip@11800a0000000 { | ||
256 | compatible = "cavium,octeon-3860-pip"; | ||
257 | #address-cells = <1>; | ||
258 | #size-cells = <0>; | ||
259 | reg = <0x11800 0xa0000000 0x0 0x2000>; | ||
260 | |||
261 | interface@4 { | ||
262 | compatible = "cavium,octeon-3860-pip-interface"; | ||
263 | #address-cells = <1>; | ||
264 | #size-cells = <0>; | ||
265 | reg = <0x4>; /* interface */ | ||
266 | |||
267 | ethernet@0 { | ||
268 | compatible = "cavium,octeon-3860-pip-port"; | ||
269 | reg = <0x0>; /* Port */ | ||
270 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
271 | phy-handle = <&phy1>; | ||
272 | }; | ||
273 | ethernet@1 { | ||
274 | compatible = "cavium,octeon-3860-pip-port"; | ||
275 | reg = <0x1>; /* Port */ | ||
276 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
277 | phy-handle = <&phy2>; | ||
278 | }; | ||
279 | ethernet@2 { | ||
280 | compatible = "cavium,octeon-3860-pip-port"; | ||
281 | reg = <0x2>; /* Port */ | ||
282 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
283 | phy-handle = <&phy3>; | ||
284 | }; | ||
285 | ethernet@3 { | ||
286 | compatible = "cavium,octeon-3860-pip-port"; | ||
287 | reg = <0x3>; /* Port */ | ||
288 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
289 | phy-handle = <&phy4>; | ||
290 | }; | ||
291 | }; | ||
292 | |||
293 | interface@3 { | ||
294 | compatible = "cavium,octeon-3860-pip-interface"; | ||
295 | #address-cells = <1>; | ||
296 | #size-cells = <0>; | ||
297 | reg = <0x3>; /* interface */ | ||
298 | |||
299 | ethernet@0 { | ||
300 | compatible = "cavium,octeon-3860-pip-port"; | ||
301 | reg = <0x0>; /* Port */ | ||
302 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
303 | phy-handle = <&phy11>; | ||
304 | }; | ||
305 | ethernet@1 { | ||
306 | compatible = "cavium,octeon-3860-pip-port"; | ||
307 | reg = <0x1>; /* Port */ | ||
308 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
309 | phy-handle = <&phy12>; | ||
310 | }; | ||
311 | ethernet@2 { | ||
312 | compatible = "cavium,octeon-3860-pip-port"; | ||
313 | reg = <0x2>; /* Port */ | ||
314 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
315 | phy-handle = <&phy13>; | ||
316 | }; | ||
317 | ethernet@3 { | ||
318 | compatible = "cavium,octeon-3860-pip-port"; | ||
319 | reg = <0x3>; /* Port */ | ||
320 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
321 | phy-handle = <&phy14>; | ||
322 | }; | ||
323 | }; | ||
324 | |||
325 | interface@2 { | ||
326 | compatible = "cavium,octeon-3860-pip-interface"; | ||
327 | #address-cells = <1>; | ||
328 | #size-cells = <0>; | ||
329 | reg = <0x2>; /* interface */ | ||
330 | |||
331 | ethernet@0 { | ||
332 | compatible = "cavium,octeon-3860-pip-port"; | ||
333 | reg = <0x0>; /* Port */ | ||
334 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
335 | phy-handle = <&phy21>; | ||
336 | }; | ||
337 | ethernet@1 { | ||
338 | compatible = "cavium,octeon-3860-pip-port"; | ||
339 | reg = <0x1>; /* Port */ | ||
340 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
341 | phy-handle = <&phy22>; | ||
342 | }; | ||
343 | ethernet@2 { | ||
344 | compatible = "cavium,octeon-3860-pip-port"; | ||
345 | reg = <0x2>; /* Port */ | ||
346 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
347 | phy-handle = <&phy23>; | ||
348 | }; | ||
349 | ethernet@3 { | ||
350 | compatible = "cavium,octeon-3860-pip-port"; | ||
351 | reg = <0x3>; /* Port */ | ||
352 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
353 | phy-handle = <&phy24>; | ||
354 | }; | ||
355 | }; | ||
356 | |||
357 | interface@1 { | ||
358 | compatible = "cavium,octeon-3860-pip-interface"; | ||
359 | #address-cells = <1>; | ||
360 | #size-cells = <0>; | ||
361 | reg = <0x1>; /* interface */ | ||
362 | |||
363 | ethernet@0 { | ||
364 | compatible = "cavium,octeon-3860-pip-port"; | ||
365 | reg = <0x0>; /* Port */ | ||
366 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
367 | }; | ||
368 | }; | ||
369 | |||
370 | interface@0 { | ||
371 | compatible = "cavium,octeon-3860-pip-interface"; | ||
372 | #address-cells = <1>; | ||
373 | #size-cells = <0>; | ||
374 | reg = <0x0>; /* interface */ | ||
375 | |||
376 | ethernet@0 { | ||
377 | compatible = "cavium,octeon-3860-pip-port"; | ||
378 | reg = <0x0>; /* Port */ | ||
379 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
380 | phy-handle = <&phy41>; | ||
381 | }; | ||
382 | ethernet@1 { | ||
383 | compatible = "cavium,octeon-3860-pip-port"; | ||
384 | reg = <0x1>; /* Port */ | ||
385 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
386 | phy-handle = <&phy42>; | ||
387 | }; | ||
388 | ethernet@2 { | ||
389 | compatible = "cavium,octeon-3860-pip-port"; | ||
390 | reg = <0x2>; /* Port */ | ||
391 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
392 | phy-handle = <&phy43>; | ||
393 | }; | ||
394 | ethernet@3 { | ||
395 | compatible = "cavium,octeon-3860-pip-port"; | ||
396 | reg = <0x3>; /* Port */ | ||
397 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
398 | phy-handle = <&phy44>; | ||
399 | }; | ||
400 | }; | ||
401 | }; | ||
402 | |||
403 | twsi0: i2c@1180000001000 { | ||
404 | #address-cells = <1>; | ||
405 | #size-cells = <0>; | ||
406 | compatible = "cavium,octeon-3860-twsi"; | ||
407 | reg = <0x11800 0x00001000 0x0 0x200>; | ||
408 | interrupts = <3 32>; | ||
409 | clock-frequency = <100000>; | ||
410 | |||
411 | rtc@68 { | ||
412 | compatible = "dallas,ds1337"; | ||
413 | reg = <0x68>; | ||
414 | }; | ||
415 | tmp@4c { | ||
416 | compatible = "ti,tmp421"; | ||
417 | reg = <0x4c>; | ||
418 | }; | ||
419 | }; | ||
420 | |||
421 | twsi1: i2c@1180000001200 { | ||
422 | #address-cells = <1>; | ||
423 | #size-cells = <0>; | ||
424 | compatible = "cavium,octeon-3860-twsi"; | ||
425 | reg = <0x11800 0x00001200 0x0 0x200>; | ||
426 | interrupts = <3 33>; | ||
427 | clock-frequency = <100000>; | ||
428 | }; | ||
429 | |||
430 | uart0: serial@1180000000800 { | ||
431 | compatible = "cavium,octeon-3860-uart","ns16550"; | ||
432 | reg = <0x11800 0x00000800 0x0 0x400>; | ||
433 | clock-frequency = <0>; | ||
434 | current-speed = <115200>; | ||
435 | reg-shift = <3>; | ||
436 | interrupts = <3 36>; | ||
437 | }; | ||
438 | |||
439 | uart1: serial@1180000000c00 { | ||
440 | compatible = "cavium,octeon-3860-uart","ns16550"; | ||
441 | reg = <0x11800 0x00000c00 0x0 0x400>; | ||
442 | clock-frequency = <0>; | ||
443 | current-speed = <115200>; | ||
444 | reg-shift = <3>; | ||
445 | interrupts = <3 37>; | ||
446 | }; | ||
447 | |||
448 | bootbus: bootbus@1180000000000 { | ||
449 | compatible = "cavium,octeon-3860-bootbus"; | ||
450 | reg = <0x11800 0x00000000 0x0 0x200>; | ||
451 | /* The chip select number and offset */ | ||
452 | #address-cells = <2>; | ||
453 | /* The size of the chip select region */ | ||
454 | #size-cells = <1>; | ||
455 | ranges = <0 0 0 0x1f400000 0xc00000>, | ||
456 | <1 0 0x10000 0x30000000 0>, | ||
457 | <2 0 0x10000 0x40000000 0>, | ||
458 | <3 0 0x10000 0x50000000 0>, | ||
459 | <4 0 0 0x1d020000 0x10000>, | ||
460 | <5 0 0 0x1d040000 0x10000>, | ||
461 | <6 0 0 0x1d050000 0x10000>, | ||
462 | <7 0 0x10000 0x90000000 0>; | ||
463 | |||
464 | cavium,cs-config@0 { | ||
465 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
466 | cavium,cs-index = <0>; | ||
467 | cavium,t-adr = <10>; | ||
468 | cavium,t-ce = <50>; | ||
469 | cavium,t-oe = <50>; | ||
470 | cavium,t-we = <35>; | ||
471 | cavium,t-rd-hld = <25>; | ||
472 | cavium,t-wr-hld = <35>; | ||
473 | cavium,t-pause = <0>; | ||
474 | cavium,t-wait = <300>; | ||
475 | cavium,t-page = <25>; | ||
476 | cavium,t-rd-dly = <0>; | ||
477 | |||
478 | cavium,pages = <0>; | ||
479 | cavium,bus-width = <8>; | ||
480 | }; | ||
481 | cavium,cs-config@4 { | ||
482 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
483 | cavium,cs-index = <4>; | ||
484 | cavium,t-adr = <320>; | ||
485 | cavium,t-ce = <320>; | ||
486 | cavium,t-oe = <320>; | ||
487 | cavium,t-we = <320>; | ||
488 | cavium,t-rd-hld = <320>; | ||
489 | cavium,t-wr-hld = <320>; | ||
490 | cavium,t-pause = <320>; | ||
491 | cavium,t-wait = <320>; | ||
492 | cavium,t-page = <320>; | ||
493 | cavium,t-rd-dly = <0>; | ||
494 | |||
495 | cavium,pages = <0>; | ||
496 | cavium,bus-width = <8>; | ||
497 | }; | ||
498 | cavium,cs-config@5 { | ||
499 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
500 | cavium,cs-index = <5>; | ||
501 | cavium,t-adr = <0>; | ||
502 | cavium,t-ce = <300>; | ||
503 | cavium,t-oe = <125>; | ||
504 | cavium,t-we = <150>; | ||
505 | cavium,t-rd-hld = <100>; | ||
506 | cavium,t-wr-hld = <300>; | ||
507 | cavium,t-pause = <0>; | ||
508 | cavium,t-wait = <300>; | ||
509 | cavium,t-page = <310>; | ||
510 | cavium,t-rd-dly = <0>; | ||
511 | |||
512 | cavium,pages = <0>; | ||
513 | cavium,bus-width = <16>; | ||
514 | }; | ||
515 | cavium,cs-config@6 { | ||
516 | compatible = "cavium,octeon-3860-bootbus-config"; | ||
517 | cavium,cs-index = <6>; | ||
518 | cavium,t-adr = <0>; | ||
519 | cavium,t-ce = <30>; | ||
520 | cavium,t-oe = <125>; | ||
521 | cavium,t-we = <150>; | ||
522 | cavium,t-rd-hld = <100>; | ||
523 | cavium,t-wr-hld = <30>; | ||
524 | cavium,t-pause = <0>; | ||
525 | cavium,t-wait = <30>; | ||
526 | cavium,t-page = <310>; | ||
527 | cavium,t-rd-dly = <0>; | ||
528 | |||
529 | cavium,pages = <0>; | ||
530 | cavium,wait-mode; | ||
531 | cavium,bus-width = <16>; | ||
532 | }; | ||
533 | |||
534 | flash0: nor@0,0 { | ||
535 | compatible = "cfi-flash"; | ||
536 | reg = <0 0 0x800000>; | ||
537 | #address-cells = <1>; | ||
538 | #size-cells = <1>; | ||
539 | |||
540 | partition@0 { | ||
541 | label = "bootloader"; | ||
542 | reg = <0 0x200000>; | ||
543 | read-only; | ||
544 | }; | ||
545 | partition@200000 { | ||
546 | label = "kernel"; | ||
547 | reg = <0x200000 0x200000>; | ||
548 | }; | ||
549 | partition@400000 { | ||
550 | label = "cramfs"; | ||
551 | reg = <0x400000 0x3fe000>; | ||
552 | }; | ||
553 | partition@7fe000 { | ||
554 | label = "environment"; | ||
555 | reg = <0x7fe000 0x2000>; | ||
556 | read-only; | ||
557 | }; | ||
558 | }; | ||
559 | |||
560 | led0: led-display@4,0 { | ||
561 | compatible = "avago,hdsp-253x"; | ||
562 | reg = <4 0x20 0x20>, <4 0 0x20>; | ||
563 | }; | ||
564 | |||
565 | compact-flash@5,0 { | ||
566 | compatible = "cavium,ebt3000-compact-flash"; | ||
567 | reg = <5 0 0x10000>, <6 0 0x10000>; | ||
568 | cavium,bus-width = <16>; | ||
569 | cavium,true-ide; | ||
570 | cavium,dma-engine-handle = <&dma0>; | ||
571 | }; | ||
572 | }; | ||
573 | |||
574 | dma0: dma-engine@1180000000100 { | ||
575 | compatible = "cavium,octeon-5750-bootbus-dma"; | ||
576 | reg = <0x11800 0x00000100 0x0 0x8>; | ||
577 | interrupts = <0 63>; | ||
578 | }; | ||
579 | dma1: dma-engine@1180000000108 { | ||
580 | compatible = "cavium,octeon-5750-bootbus-dma"; | ||
581 | reg = <0x11800 0x00000108 0x0 0x8>; | ||
582 | interrupts = <0 63>; | ||
583 | }; | ||
584 | |||
585 | uctl: uctl@118006f000000 { | ||
586 | compatible = "cavium,octeon-6335-uctl"; | ||
587 | reg = <0x11800 0x6f000000 0x0 0x100>; | ||
588 | ranges; /* Direct mapping */ | ||
589 | #address-cells = <2>; | ||
590 | #size-cells = <2>; | ||
591 | /* 12MHz, 24MHz and 48MHz allowed */ | ||
592 | refclk-frequency = <12000000>; | ||
593 | /* Either "crystal" or "external" */ | ||
594 | refclk-type = "crystal"; | ||
595 | |||
596 | ehci@16f0000000000 { | ||
597 | compatible = "cavium,octeon-6335-ehci","usb-ehci"; | ||
598 | reg = <0x16f00 0x00000000 0x0 0x100>; | ||
599 | interrupts = <3 44>; | ||
600 | big-endian-regs; | ||
601 | }; | ||
602 | ohci@16f0000000400 { | ||
603 | compatible = "cavium,octeon-6335-ohci","usb-ohci"; | ||
604 | reg = <0x16f00 0x00000400 0x0 0x100>; | ||
605 | interrupts = <3 44>; | ||
606 | big-endian-regs; | ||
607 | }; | ||
608 | }; | ||
609 | }; | ||
610 | |||
611 | aliases { | ||
612 | mix0 = &mix0; | ||
613 | pip = &pip; | ||
614 | smi0 = &smi0; | ||
615 | smi1 = &smi1; | ||
616 | smi2 = &smi2; | ||
617 | smi3 = &smi3; | ||
618 | twsi0 = &twsi0; | ||
619 | twsi1 = &twsi1; | ||
620 | uart0 = &uart0; | ||
621 | uart1 = &uart1; | ||
622 | uctl = &uctl; | ||
623 | led0 = &led0; | ||
624 | flash0 = &flash0; | ||
625 | }; | ||
626 | }; | ||
diff --git a/arch/mips/boot/dts/cavium-octeon/ubnt_e100.dts b/arch/mips/boot/dts/cavium-octeon/ubnt_e100.dts new file mode 100644 index 000000000..cb219b730 --- /dev/null +++ b/arch/mips/boot/dts/cavium-octeon/ubnt_e100.dts | |||
@@ -0,0 +1,62 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Device tree source for EdgeRouter Lite. | ||
4 | * | ||
5 | * Written by: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
6 | */ | ||
7 | |||
8 | /include/ "octeon_3xxx.dtsi" | ||
9 | |||
10 | / { | ||
11 | model = "ubnt,e100"; | ||
12 | |||
13 | soc@0 { | ||
14 | smi0: mdio@1180000001800 { | ||
15 | phy5: ethernet-phy@5 { | ||
16 | reg = <5>; | ||
17 | compatible = "ethernet-phy-ieee802.3-c22"; | ||
18 | }; | ||
19 | phy6: ethernet-phy@6 { | ||
20 | reg = <6>; | ||
21 | compatible = "ethernet-phy-ieee802.3-c22"; | ||
22 | }; | ||
23 | phy7: ethernet-phy@7 { | ||
24 | reg = <7>; | ||
25 | compatible = "ethernet-phy-ieee802.3-c22"; | ||
26 | }; | ||
27 | }; | ||
28 | |||
29 | pip: pip@11800a0000000 { | ||
30 | interface@0 { | ||
31 | ethernet@0 { | ||
32 | phy-handle = <&phy7>; | ||
33 | rx-delay = <0>; | ||
34 | tx-delay = <0x10>; | ||
35 | }; | ||
36 | ethernet@1 { | ||
37 | phy-handle = <&phy6>; | ||
38 | rx-delay = <0>; | ||
39 | tx-delay = <0x10>; | ||
40 | }; | ||
41 | ethernet@2 { | ||
42 | phy-handle = <&phy5>; | ||
43 | rx-delay = <0>; | ||
44 | tx-delay = <0x10>; | ||
45 | }; | ||
46 | }; | ||
47 | }; | ||
48 | |||
49 | uart0: serial@1180000000800 { | ||
50 | clock-frequency = <500000000>; | ||
51 | }; | ||
52 | |||
53 | usbn: usbn@1180068000000 { | ||
54 | refclk-frequency = <12000000>; | ||
55 | refclk-type = "crystal"; | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | aliases { | ||
60 | pip = &pip; | ||
61 | }; | ||
62 | }; | ||
diff --git a/arch/mips/boot/dts/img/Makefile b/arch/mips/boot/dts/img/Makefile new file mode 100644 index 000000000..441a3c16e --- /dev/null +++ b/arch/mips/boot/dts/img/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += boston.dtb | ||
3 | |||
4 | dtb-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb | ||
5 | obj-$(CONFIG_MACH_PISTACHIO) += pistachio_marduk.dtb.o | ||
diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts new file mode 100644 index 000000000..84328afa3 --- /dev/null +++ b/arch/mips/boot/dts/img/boston.dts | |||
@@ -0,0 +1,237 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include <dt-bindings/clock/boston-clock.h> | ||
5 | #include <dt-bindings/gpio/gpio.h> | ||
6 | #include <dt-bindings/interrupt-controller/irq.h> | ||
7 | #include <dt-bindings/interrupt-controller/mips-gic.h> | ||
8 | |||
9 | / { | ||
10 | #address-cells = <1>; | ||
11 | #size-cells = <1>; | ||
12 | compatible = "img,boston"; | ||
13 | |||
14 | chosen { | ||
15 | stdout-path = "uart0:115200"; | ||
16 | }; | ||
17 | |||
18 | aliases { | ||
19 | uart0 = &uart0; | ||
20 | }; | ||
21 | |||
22 | cpus { | ||
23 | #address-cells = <1>; | ||
24 | #size-cells = <0>; | ||
25 | |||
26 | cpu@0 { | ||
27 | device_type = "cpu"; | ||
28 | compatible = "img,mips"; | ||
29 | reg = <0>; | ||
30 | clocks = <&clk_boston BOSTON_CLK_CPU>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | memory@0 { | ||
35 | device_type = "memory"; | ||
36 | reg = <0x00000000 0x10000000>; | ||
37 | }; | ||
38 | |||
39 | pci0: pci@10000000 { | ||
40 | compatible = "xlnx,axi-pcie-host-1.00.a"; | ||
41 | device_type = "pci"; | ||
42 | reg = <0x10000000 0x2000000>; | ||
43 | |||
44 | #address-cells = <3>; | ||
45 | #size-cells = <2>; | ||
46 | #interrupt-cells = <1>; | ||
47 | |||
48 | interrupt-parent = <&gic>; | ||
49 | interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>; | ||
50 | |||
51 | ranges = <0x02000000 0 0x40000000 | ||
52 | 0x40000000 0 0x40000000>; | ||
53 | |||
54 | bus-range = <0x00 0xff>; | ||
55 | |||
56 | interrupt-map-mask = <0 0 0 7>; | ||
57 | interrupt-map = <0 0 0 1 &pci0_intc 1>, | ||
58 | <0 0 0 2 &pci0_intc 2>, | ||
59 | <0 0 0 3 &pci0_intc 3>, | ||
60 | <0 0 0 4 &pci0_intc 4>; | ||
61 | |||
62 | pci0_intc: interrupt-controller { | ||
63 | interrupt-controller; | ||
64 | #address-cells = <0>; | ||
65 | #interrupt-cells = <1>; | ||
66 | }; | ||
67 | }; | ||
68 | |||
69 | pci1: pci@12000000 { | ||
70 | compatible = "xlnx,axi-pcie-host-1.00.a"; | ||
71 | device_type = "pci"; | ||
72 | reg = <0x12000000 0x2000000>; | ||
73 | |||
74 | #address-cells = <3>; | ||
75 | #size-cells = <2>; | ||
76 | #interrupt-cells = <1>; | ||
77 | |||
78 | interrupt-parent = <&gic>; | ||
79 | interrupts = <GIC_SHARED 1 IRQ_TYPE_LEVEL_HIGH>; | ||
80 | |||
81 | ranges = <0x02000000 0 0x20000000 | ||
82 | 0x20000000 0 0x20000000>; | ||
83 | |||
84 | bus-range = <0x00 0xff>; | ||
85 | |||
86 | interrupt-map-mask = <0 0 0 7>; | ||
87 | interrupt-map = <0 0 0 1 &pci1_intc 1>, | ||
88 | <0 0 0 2 &pci1_intc 2>, | ||
89 | <0 0 0 3 &pci1_intc 3>, | ||
90 | <0 0 0 4 &pci1_intc 4>; | ||
91 | |||
92 | pci1_intc: interrupt-controller { | ||
93 | interrupt-controller; | ||
94 | #address-cells = <0>; | ||
95 | #interrupt-cells = <1>; | ||
96 | }; | ||
97 | }; | ||
98 | |||
99 | pci2: pci@14000000 { | ||
100 | compatible = "xlnx,axi-pcie-host-1.00.a"; | ||
101 | device_type = "pci"; | ||
102 | reg = <0x14000000 0x2000000>; | ||
103 | |||
104 | #address-cells = <3>; | ||
105 | #size-cells = <2>; | ||
106 | #interrupt-cells = <1>; | ||
107 | |||
108 | interrupt-parent = <&gic>; | ||
109 | interrupts = <GIC_SHARED 0 IRQ_TYPE_LEVEL_HIGH>; | ||
110 | |||
111 | ranges = <0x02000000 0 0x16000000 | ||
112 | 0x16000000 0 0x100000>; | ||
113 | |||
114 | bus-range = <0x00 0xff>; | ||
115 | |||
116 | interrupt-map-mask = <0 0 0 7>; | ||
117 | interrupt-map = <0 0 0 1 &pci2_intc 1>, | ||
118 | <0 0 0 2 &pci2_intc 2>, | ||
119 | <0 0 0 3 &pci2_intc 3>, | ||
120 | <0 0 0 4 &pci2_intc 4>; | ||
121 | |||
122 | pci2_intc: interrupt-controller { | ||
123 | interrupt-controller; | ||
124 | #address-cells = <0>; | ||
125 | #interrupt-cells = <1>; | ||
126 | }; | ||
127 | |||
128 | pci2_root@0,0,0 { | ||
129 | compatible = "pci10ee,7021"; | ||
130 | reg = <0x00000000 0 0 0 0>; | ||
131 | |||
132 | #address-cells = <3>; | ||
133 | #size-cells = <2>; | ||
134 | #interrupt-cells = <1>; | ||
135 | |||
136 | eg20t_bridge@1,0,0 { | ||
137 | compatible = "pci8086,8800"; | ||
138 | reg = <0x00010000 0 0 0 0>; | ||
139 | |||
140 | #address-cells = <3>; | ||
141 | #size-cells = <2>; | ||
142 | #interrupt-cells = <1>; | ||
143 | |||
144 | eg20t_phub@2,0,0 { | ||
145 | compatible = "pci8086,8801"; | ||
146 | reg = <0x00020000 0 0 0 0>; | ||
147 | intel,eg20t-prefetch = <0>; | ||
148 | }; | ||
149 | |||
150 | eg20t_mac@2,0,1 { | ||
151 | compatible = "pci8086,8802"; | ||
152 | reg = <0x00020100 0 0 0 0>; | ||
153 | phy-reset-gpios = <&eg20t_gpio 6 | ||
154 | GPIO_ACTIVE_LOW>; | ||
155 | }; | ||
156 | |||
157 | eg20t_gpio: eg20t_gpio@2,0,2 { | ||
158 | compatible = "pci8086,8803"; | ||
159 | reg = <0x00020200 0 0 0 0>; | ||
160 | |||
161 | gpio-controller; | ||
162 | #gpio-cells = <2>; | ||
163 | }; | ||
164 | |||
165 | eg20t_i2c@2,12,2 { | ||
166 | compatible = "pci8086,8817"; | ||
167 | reg = <0x00026200 0 0 0 0>; | ||
168 | |||
169 | #address-cells = <1>; | ||
170 | #size-cells = <0>; | ||
171 | |||
172 | rtc@68 { | ||
173 | compatible = "st,m41t81s"; | ||
174 | reg = <0x68>; | ||
175 | }; | ||
176 | }; | ||
177 | }; | ||
178 | }; | ||
179 | }; | ||
180 | |||
181 | gic: interrupt-controller@16120000 { | ||
182 | compatible = "mti,gic"; | ||
183 | reg = <0x16120000 0x20000>; | ||
184 | |||
185 | interrupt-controller; | ||
186 | #interrupt-cells = <3>; | ||
187 | |||
188 | timer { | ||
189 | compatible = "mti,gic-timer"; | ||
190 | interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>; | ||
191 | clocks = <&clk_boston BOSTON_CLK_CPU>; | ||
192 | }; | ||
193 | }; | ||
194 | |||
195 | cdmm@16140000 { | ||
196 | compatible = "mti,mips-cdmm"; | ||
197 | reg = <0x16140000 0x8000>; | ||
198 | }; | ||
199 | |||
200 | cpc@16200000 { | ||
201 | compatible = "mti,mips-cpc"; | ||
202 | reg = <0x16200000 0x8000>; | ||
203 | }; | ||
204 | |||
205 | plat_regs: system-controller@17ffd000 { | ||
206 | compatible = "img,boston-platform-regs", "syscon"; | ||
207 | reg = <0x17ffd000 0x1000>; | ||
208 | |||
209 | clk_boston: clock { | ||
210 | compatible = "img,boston-clock"; | ||
211 | #clock-cells = <1>; | ||
212 | }; | ||
213 | }; | ||
214 | |||
215 | reboot: syscon-reboot { | ||
216 | compatible = "syscon-reboot"; | ||
217 | regmap = <&plat_regs>; | ||
218 | offset = <0x10>; | ||
219 | mask = <0x10>; | ||
220 | }; | ||
221 | |||
222 | uart0: uart@17ffe000 { | ||
223 | compatible = "ns16550a"; | ||
224 | reg = <0x17ffe000 0x1000>; | ||
225 | reg-shift = <2>; | ||
226 | |||
227 | interrupt-parent = <&gic>; | ||
228 | interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>; | ||
229 | |||
230 | clocks = <&clk_boston BOSTON_CLK_SYS>; | ||
231 | }; | ||
232 | |||
233 | lcd: lcd@17fff000 { | ||
234 | compatible = "img,boston-lcd"; | ||
235 | reg = <0x17fff000 0x8>; | ||
236 | }; | ||
237 | }; | ||
diff --git a/arch/mips/boot/dts/img/pistachio.dtsi b/arch/mips/boot/dts/img/pistachio.dtsi new file mode 100644 index 000000000..dc3b7909d --- /dev/null +++ b/arch/mips/boot/dts/img/pistachio.dtsi | |||
@@ -0,0 +1,920 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Copyright (C) 2015, 2016 Imagination Technologies Ltd. | ||
4 | * Copyright (C) 2015 Google, Inc. | ||
5 | */ | ||
6 | |||
7 | #include <dt-bindings/clock/pistachio-clk.h> | ||
8 | #include <dt-bindings/gpio/gpio.h> | ||
9 | #include <dt-bindings/interrupt-controller/irq.h> | ||
10 | #include <dt-bindings/interrupt-controller/mips-gic.h> | ||
11 | #include <dt-bindings/reset/pistachio-resets.h> | ||
12 | |||
13 | / { | ||
14 | compatible = "img,pistachio"; | ||
15 | |||
16 | #address-cells = <1>; | ||
17 | #size-cells = <1>; | ||
18 | |||
19 | interrupt-parent = <&gic>; | ||
20 | |||
21 | cpus { | ||
22 | #address-cells = <1>; | ||
23 | #size-cells = <0>; | ||
24 | |||
25 | cpu0: cpu@0 { | ||
26 | device_type = "cpu"; | ||
27 | compatible = "mti,interaptiv"; | ||
28 | reg = <0>; | ||
29 | clocks = <&clk_core CLK_MIPS_PLL>; | ||
30 | clock-names = "cpu"; | ||
31 | clock-latency = <1000>; | ||
32 | operating-points = < | ||
33 | /* kHz uV(dummy) */ | ||
34 | 546000 1150000 | ||
35 | 520000 1100000 | ||
36 | 494000 1000000 | ||
37 | 468000 950000 | ||
38 | 442000 900000 | ||
39 | 416000 800000 | ||
40 | >; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | i2c0: i2c@18100000 { | ||
45 | compatible = "img,scb-i2c"; | ||
46 | reg = <0x18100000 0x200>; | ||
47 | interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>; | ||
48 | clocks = <&clk_periph PERIPH_CLK_I2C0>, | ||
49 | <&cr_periph SYS_CLK_I2C0>; | ||
50 | clock-names = "scb", "sys"; | ||
51 | assigned-clocks = <&clk_periph PERIPH_CLK_I2C0_PRE_DIV>, | ||
52 | <&clk_periph PERIPH_CLK_I2C0_DIV>; | ||
53 | assigned-clock-rates = <100000000>, <33333334>; | ||
54 | status = "disabled"; | ||
55 | pinctrl-names = "default"; | ||
56 | pinctrl-0 = <&i2c0_pins>; | ||
57 | |||
58 | #address-cells = <1>; | ||
59 | #size-cells = <0>; | ||
60 | }; | ||
61 | |||
62 | i2c1: i2c@18100200 { | ||
63 | compatible = "img,scb-i2c"; | ||
64 | reg = <0x18100200 0x200>; | ||
65 | interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>; | ||
66 | clocks = <&clk_periph PERIPH_CLK_I2C1>, | ||
67 | <&cr_periph SYS_CLK_I2C1>; | ||
68 | clock-names = "scb", "sys"; | ||
69 | assigned-clocks = <&clk_periph PERIPH_CLK_I2C1_PRE_DIV>, | ||
70 | <&clk_periph PERIPH_CLK_I2C1_DIV>; | ||
71 | assigned-clock-rates = <100000000>, <33333334>; | ||
72 | status = "disabled"; | ||
73 | pinctrl-names = "default"; | ||
74 | pinctrl-0 = <&i2c1_pins>; | ||
75 | |||
76 | #address-cells = <1>; | ||
77 | #size-cells = <0>; | ||
78 | }; | ||
79 | |||
80 | i2c2: i2c@18100400 { | ||
81 | compatible = "img,scb-i2c"; | ||
82 | reg = <0x18100400 0x200>; | ||
83 | interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>; | ||
84 | clocks = <&clk_periph PERIPH_CLK_I2C2>, | ||
85 | <&cr_periph SYS_CLK_I2C2>; | ||
86 | clock-names = "scb", "sys"; | ||
87 | assigned-clocks = <&clk_periph PERIPH_CLK_I2C2_PRE_DIV>, | ||
88 | <&clk_periph PERIPH_CLK_I2C2_DIV>; | ||
89 | assigned-clock-rates = <100000000>, <33333334>; | ||
90 | status = "disabled"; | ||
91 | pinctrl-names = "default"; | ||
92 | pinctrl-0 = <&i2c2_pins>; | ||
93 | |||
94 | #address-cells = <1>; | ||
95 | #size-cells = <0>; | ||
96 | }; | ||
97 | |||
98 | i2c3: i2c@18100600 { | ||
99 | compatible = "img,scb-i2c"; | ||
100 | reg = <0x18100600 0x200>; | ||
101 | interrupts = <GIC_SHARED 5 IRQ_TYPE_LEVEL_HIGH>; | ||
102 | clocks = <&clk_periph PERIPH_CLK_I2C3>, | ||
103 | <&cr_periph SYS_CLK_I2C3>; | ||
104 | clock-names = "scb", "sys"; | ||
105 | assigned-clocks = <&clk_periph PERIPH_CLK_I2C3_PRE_DIV>, | ||
106 | <&clk_periph PERIPH_CLK_I2C3_DIV>; | ||
107 | assigned-clock-rates = <100000000>, <33333334>; | ||
108 | status = "disabled"; | ||
109 | pinctrl-names = "default"; | ||
110 | pinctrl-0 = <&i2c3_pins>; | ||
111 | |||
112 | #address-cells = <1>; | ||
113 | #size-cells = <0>; | ||
114 | }; | ||
115 | |||
116 | i2s_in: i2s-in@18100800 { | ||
117 | compatible = "img,i2s-in"; | ||
118 | reg = <0x18100800 0x200>; | ||
119 | interrupts = <GIC_SHARED 7 IRQ_TYPE_LEVEL_HIGH>; | ||
120 | dmas = <&mdc 30 0xffffffff 0>; | ||
121 | dma-names = "rx"; | ||
122 | clocks = <&cr_periph SYS_CLK_I2S_IN>; | ||
123 | clock-names = "sys"; | ||
124 | img,i2s-channels = <6>; | ||
125 | pinctrl-names = "default"; | ||
126 | pinctrl-0 = <&i2s_in_pins>; | ||
127 | status = "disabled"; | ||
128 | |||
129 | #sound-dai-cells = <0>; | ||
130 | }; | ||
131 | |||
132 | i2s_out: i2s-out@18100a00 { | ||
133 | compatible = "img,i2s-out"; | ||
134 | reg = <0x18100a00 0x200>; | ||
135 | interrupts = <GIC_SHARED 13 IRQ_TYPE_LEVEL_HIGH>; | ||
136 | dmas = <&mdc 23 0xffffffff 0>; | ||
137 | dma-names = "tx"; | ||
138 | clocks = <&cr_periph SYS_CLK_I2S_OUT>, | ||
139 | <&clk_core CLK_I2S>; | ||
140 | clock-names = "sys", "ref"; | ||
141 | assigned-clocks = <&clk_core CLK_I2S_DIV>; | ||
142 | assigned-clock-rates = <12288000>; | ||
143 | img,i2s-channels = <6>; | ||
144 | pinctrl-names = "default"; | ||
145 | pinctrl-0 = <&i2s_out_pins>; | ||
146 | status = "disabled"; | ||
147 | resets = <&pistachio_reset PISTACHIO_RESET_I2S_OUT>; | ||
148 | reset-names = "rst"; | ||
149 | #sound-dai-cells = <0>; | ||
150 | }; | ||
151 | |||
152 | parallel_out: parallel-audio-out@18100c00 { | ||
153 | compatible = "img,parallel-out"; | ||
154 | reg = <0x18100c00 0x100>; | ||
155 | interrupts = <GIC_SHARED 19 IRQ_TYPE_LEVEL_HIGH>; | ||
156 | dmas = <&mdc 16 0xffffffff 0>; | ||
157 | dma-names = "tx"; | ||
158 | clocks = <&cr_periph SYS_CLK_PAUD_OUT>, | ||
159 | <&clk_core CLK_AUDIO_DAC>; | ||
160 | clock-names = "sys", "ref"; | ||
161 | assigned-clocks = <&clk_core CLK_AUDIO_DAC_DIV>; | ||
162 | assigned-clock-rates = <12288000>; | ||
163 | status = "disabled"; | ||
164 | resets = <&pistachio_reset PISTACHIO_RESET_PRL_OUT>; | ||
165 | reset-names = "rst"; | ||
166 | #sound-dai-cells = <0>; | ||
167 | }; | ||
168 | |||
169 | spdif_out: spdif-out@18100d00 { | ||
170 | compatible = "img,spdif-out"; | ||
171 | reg = <0x18100d00 0x100>; | ||
172 | interrupts = <GIC_SHARED 21 IRQ_TYPE_LEVEL_HIGH>; | ||
173 | dmas = <&mdc 14 0xffffffff 0>; | ||
174 | dma-names = "tx"; | ||
175 | clocks = <&cr_periph SYS_CLK_SPDIF_OUT>, | ||
176 | <&clk_core CLK_SPDIF>; | ||
177 | clock-names = "sys", "ref"; | ||
178 | assigned-clocks = <&clk_core CLK_SPDIF_DIV>; | ||
179 | assigned-clock-rates = <12288000>; | ||
180 | pinctrl-names = "default"; | ||
181 | pinctrl-0 = <&spdif_out_pin>; | ||
182 | status = "disabled"; | ||
183 | resets = <&pistachio_reset PISTACHIO_RESET_SPDIF_OUT>; | ||
184 | reset-names = "rst"; | ||
185 | #sound-dai-cells = <0>; | ||
186 | }; | ||
187 | |||
188 | spdif_in: spdif-in@18100e00 { | ||
189 | compatible = "img,spdif-in"; | ||
190 | reg = <0x18100e00 0x100>; | ||
191 | interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>; | ||
192 | dmas = <&mdc 15 0xffffffff 0>; | ||
193 | dma-names = "rx"; | ||
194 | clocks = <&cr_periph SYS_CLK_SPDIF_IN>; | ||
195 | clock-names = "sys"; | ||
196 | pinctrl-names = "default"; | ||
197 | pinctrl-0 = <&spdif_in_pin>; | ||
198 | status = "disabled"; | ||
199 | |||
200 | #sound-dai-cells = <0>; | ||
201 | }; | ||
202 | |||
203 | internal_dac: internal-dac { | ||
204 | compatible = "img,pistachio-internal-dac"; | ||
205 | img,cr-top = <&cr_top>; | ||
206 | img,voltage-select = <1>; | ||
207 | |||
208 | #sound-dai-cells = <0>; | ||
209 | }; | ||
210 | |||
211 | spfi0: spi@18100f00 { | ||
212 | compatible = "img,spfi"; | ||
213 | reg = <0x18100f00 0x100>; | ||
214 | interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>; | ||
215 | clocks = <&clk_core CLK_SPI0>, <&cr_periph SYS_CLK_SPI0_MASTER>; | ||
216 | clock-names = "sys", "spfi"; | ||
217 | dmas = <&mdc 9 0xffffffff 0>, <&mdc 10 0xffffffff 0>; | ||
218 | dma-names = "rx", "tx"; | ||
219 | spfi-max-frequency = <50000000>; | ||
220 | status = "disabled"; | ||
221 | |||
222 | #address-cells = <1>; | ||
223 | #size-cells = <0>; | ||
224 | }; | ||
225 | |||
226 | spfi1: spi@18101000 { | ||
227 | compatible = "img,spfi"; | ||
228 | reg = <0x18101000 0x100>; | ||
229 | interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>; | ||
230 | clocks = <&clk_core CLK_SPI1>, <&cr_periph SYS_CLK_SPI1>; | ||
231 | clock-names = "sys", "spfi"; | ||
232 | dmas = <&mdc 1 0xffffffff 0>, <&mdc 2 0xffffffff 0>; | ||
233 | dma-names = "rx", "tx"; | ||
234 | img,supports-quad-mode; | ||
235 | spfi-max-frequency = <50000000>; | ||
236 | status = "disabled"; | ||
237 | |||
238 | #address-cells = <1>; | ||
239 | #size-cells = <0>; | ||
240 | }; | ||
241 | |||
242 | pwm: pwm@18101300 { | ||
243 | compatible = "img,pistachio-pwm"; | ||
244 | reg = <0x18101300 0x100>; | ||
245 | clocks = <&clk_periph PERIPH_CLK_PWM>, | ||
246 | <&cr_periph SYS_CLK_PWM>; | ||
247 | clock-names = "pwm", "sys"; | ||
248 | img,cr-periph = <&cr_periph>; | ||
249 | #pwm-cells = <2>; | ||
250 | status = "disabled"; | ||
251 | }; | ||
252 | |||
253 | uart0: uart@18101400 { | ||
254 | compatible = "snps,dw-apb-uart"; | ||
255 | reg = <0x18101400 0x100>; | ||
256 | interrupts = <GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>; | ||
257 | clocks = <&clk_core CLK_UART0>, <&cr_periph SYS_CLK_UART0>; | ||
258 | clock-names = "baudclk", "apb_pclk"; | ||
259 | assigned-clocks = <&clk_core CLK_UART0_INTERNAL_DIV>, | ||
260 | <&clk_core CLK_UART0_DIV>; | ||
261 | reg-shift = <2>; | ||
262 | reg-io-width = <4>; | ||
263 | pinctrl-0 = <&uart0_pins>, <&uart0_rts_cts_pins>; | ||
264 | pinctrl-names = "default"; | ||
265 | status = "disabled"; | ||
266 | }; | ||
267 | |||
268 | uart1: uart@18101500 { | ||
269 | compatible = "snps,dw-apb-uart"; | ||
270 | reg = <0x18101500 0x100>; | ||
271 | interrupts = <GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>; | ||
272 | clocks = <&clk_core CLK_UART1>, <&cr_periph SYS_CLK_UART1>; | ||
273 | clock-names = "baudclk", "apb_pclk"; | ||
274 | assigned-clocks = <&clk_core CLK_UART1_INTERNAL_DIV>, | ||
275 | <&clk_core CLK_UART1_DIV>; | ||
276 | assigned-clock-rates = <114278400>, <1843200>; | ||
277 | reg-shift = <2>; | ||
278 | reg-io-width = <4>; | ||
279 | pinctrl-0 = <&uart1_pins>; | ||
280 | pinctrl-names = "default"; | ||
281 | status = "disabled"; | ||
282 | }; | ||
283 | |||
284 | adc: adc@18101600 { | ||
285 | compatible = "cosmic,10001-adc"; | ||
286 | reg = <0x18101600 0x24>; | ||
287 | adc-reserved-channels = <0x30>; | ||
288 | clocks = <&clk_core CLK_AUX_ADC>; | ||
289 | clock-names = "adc"; | ||
290 | assigned-clocks = <&clk_core CLK_AUX_ADC_INTERNAL_DIV>, | ||
291 | <&clk_core CLK_AUX_ADC_DIV>; | ||
292 | assigned-clock-rates = <100000000>, <1000000>; | ||
293 | status = "disabled"; | ||
294 | |||
295 | #io-channel-cells = <1>; | ||
296 | }; | ||
297 | |||
298 | pinctrl: pinctrl@18101c00 { | ||
299 | compatible = "img,pistachio-system-pinctrl"; | ||
300 | reg = <0x18101c00 0x400>; | ||
301 | |||
302 | gpio0: gpio0 { | ||
303 | interrupts = <GIC_SHARED 71 IRQ_TYPE_LEVEL_HIGH>; | ||
304 | |||
305 | gpio-controller; | ||
306 | #gpio-cells = <2>; | ||
307 | gpio-ranges = <&pinctrl 0 0 16>; | ||
308 | |||
309 | interrupt-controller; | ||
310 | #interrupt-cells = <2>; | ||
311 | }; | ||
312 | |||
313 | gpio1: gpio1 { | ||
314 | interrupts = <GIC_SHARED 72 IRQ_TYPE_LEVEL_HIGH>; | ||
315 | |||
316 | gpio-controller; | ||
317 | #gpio-cells = <2>; | ||
318 | gpio-ranges = <&pinctrl 0 16 16>; | ||
319 | |||
320 | interrupt-controller; | ||
321 | #interrupt-cells = <2>; | ||
322 | }; | ||
323 | |||
324 | gpio2: gpio2 { | ||
325 | interrupts = <GIC_SHARED 73 IRQ_TYPE_LEVEL_HIGH>; | ||
326 | |||
327 | gpio-controller; | ||
328 | #gpio-cells = <2>; | ||
329 | gpio-ranges = <&pinctrl 0 32 16>; | ||
330 | |||
331 | interrupt-controller; | ||
332 | #interrupt-cells = <2>; | ||
333 | }; | ||
334 | |||
335 | gpio3: gpio3 { | ||
336 | interrupts = <GIC_SHARED 74 IRQ_TYPE_LEVEL_HIGH>; | ||
337 | |||
338 | gpio-controller; | ||
339 | #gpio-cells = <2>; | ||
340 | gpio-ranges = <&pinctrl 0 48 16>; | ||
341 | |||
342 | interrupt-controller; | ||
343 | #interrupt-cells = <2>; | ||
344 | }; | ||
345 | |||
346 | gpio4: gpio4 { | ||
347 | interrupts = <GIC_SHARED 75 IRQ_TYPE_LEVEL_HIGH>; | ||
348 | |||
349 | gpio-controller; | ||
350 | #gpio-cells = <2>; | ||
351 | gpio-ranges = <&pinctrl 0 64 16>; | ||
352 | |||
353 | interrupt-controller; | ||
354 | #interrupt-cells = <2>; | ||
355 | }; | ||
356 | |||
357 | gpio5: gpio5 { | ||
358 | interrupts = <GIC_SHARED 76 IRQ_TYPE_LEVEL_HIGH>; | ||
359 | |||
360 | gpio-controller; | ||
361 | #gpio-cells = <2>; | ||
362 | gpio-ranges = <&pinctrl 0 80 10>; | ||
363 | |||
364 | interrupt-controller; | ||
365 | #interrupt-cells = <2>; | ||
366 | }; | ||
367 | |||
368 | i2c0_pins: i2c0-pins { | ||
369 | pin_i2c0: i2c0 { | ||
370 | pins = "mfio28", "mfio29"; | ||
371 | function = "i2c0"; | ||
372 | drive-strength = <4>; | ||
373 | }; | ||
374 | }; | ||
375 | |||
376 | i2c1_pins: i2c1-pins { | ||
377 | pin_i2c1: i2c1 { | ||
378 | pins = "mfio30", "mfio31"; | ||
379 | function = "i2c1"; | ||
380 | drive-strength = <4>; | ||
381 | }; | ||
382 | }; | ||
383 | |||
384 | i2c2_pins: i2c2-pins { | ||
385 | pin_i2c2: i2c2 { | ||
386 | pins = "mfio32", "mfio33"; | ||
387 | function = "i2c2"; | ||
388 | drive-strength = <4>; | ||
389 | }; | ||
390 | }; | ||
391 | |||
392 | i2c3_pins: i2c3-pins { | ||
393 | pin_i2c3: i2c3 { | ||
394 | pins = "mfio34", "mfio35"; | ||
395 | function = "i2c3"; | ||
396 | drive-strength = <4>; | ||
397 | }; | ||
398 | }; | ||
399 | |||
400 | spim0_pins: spim0-pins { | ||
401 | pin_spim0: spim0 { | ||
402 | pins = "mfio9", "mfio10"; | ||
403 | function = "spim0"; | ||
404 | drive-strength = <4>; | ||
405 | }; | ||
406 | spim0_clk: spim0-clk { | ||
407 | pins = "mfio8"; | ||
408 | function = "spim0"; | ||
409 | drive-strength = <4>; | ||
410 | }; | ||
411 | }; | ||
412 | |||
413 | spim0_cs0_alt_pin: spim0-cs0-alt-pin { | ||
414 | spim0-cs0 { | ||
415 | pins = "mfio2"; | ||
416 | drive-strength = <2>; | ||
417 | }; | ||
418 | }; | ||
419 | |||
420 | spim0_cs1_pin: spim0-cs1-pin { | ||
421 | spim0-cs1 { | ||
422 | pins = "mfio1"; | ||
423 | drive-strength = <2>; | ||
424 | }; | ||
425 | }; | ||
426 | |||
427 | spim0_cs2_pin: spim0-cs2-pin { | ||
428 | spim0-cs2 { | ||
429 | pins = "mfio55"; | ||
430 | drive-strength = <2>; | ||
431 | }; | ||
432 | }; | ||
433 | |||
434 | spim0_cs2_alt_pin: spim0-cs2-alt-pin { | ||
435 | spim0-cs2 { | ||
436 | pins = "mfio28"; | ||
437 | drive-strength = <2>; | ||
438 | }; | ||
439 | }; | ||
440 | |||
441 | spim0_cs3_pin: spim0-cs3-pin { | ||
442 | spim0-cs3 { | ||
443 | pins = "mfio56"; | ||
444 | drive-strength = <2>; | ||
445 | }; | ||
446 | }; | ||
447 | |||
448 | spim0_cs3_alt_pin: spim0-cs3-alt-pin { | ||
449 | spim0-cs3 { | ||
450 | pins = "mfio29"; | ||
451 | drive-strength = <2>; | ||
452 | }; | ||
453 | }; | ||
454 | |||
455 | spim0_cs4_pin: spim0-cs4-pin { | ||
456 | spim0-cs4 { | ||
457 | pins = "mfio57"; | ||
458 | drive-strength = <2>; | ||
459 | }; | ||
460 | }; | ||
461 | |||
462 | spim0_cs4_alt_pin: spim0-cs4-alt-pin { | ||
463 | spim0-cs4 { | ||
464 | pins = "mfio30"; | ||
465 | drive-strength = <2>; | ||
466 | }; | ||
467 | }; | ||
468 | |||
469 | spim1_pins: spim1-pins { | ||
470 | spim1 { | ||
471 | pins = "mfio3", "mfio4", "mfio5"; | ||
472 | function = "spim1"; | ||
473 | drive-strength = <2>; | ||
474 | }; | ||
475 | }; | ||
476 | |||
477 | spim1_quad_pins: spim1-quad-pins { | ||
478 | spim1-quad { | ||
479 | pins = "mfio6", "mfio7"; | ||
480 | function = "spim1"; | ||
481 | drive-strength = <2>; | ||
482 | }; | ||
483 | }; | ||
484 | |||
485 | spim1_cs0_pin: spim1-cs0-pins { | ||
486 | spim1-cs0 { | ||
487 | pins = "mfio0"; | ||
488 | function = "spim1"; | ||
489 | drive-strength = <2>; | ||
490 | }; | ||
491 | }; | ||
492 | |||
493 | spim1_cs1_pin: spim1-cs1-pin { | ||
494 | spim1-cs1 { | ||
495 | pins = "mfio1"; | ||
496 | function = "spim1"; | ||
497 | drive-strength = <2>; | ||
498 | }; | ||
499 | }; | ||
500 | |||
501 | spim1_cs1_alt_pin: spim1-cs1-alt-pin { | ||
502 | spim1-cs1 { | ||
503 | pins = "mfio58"; | ||
504 | function = "spim1"; | ||
505 | drive-strength = <2>; | ||
506 | }; | ||
507 | }; | ||
508 | |||
509 | spim1_cs2_pin: spim1-cs2-pin { | ||
510 | spim1-cs2 { | ||
511 | pins = "mfio2"; | ||
512 | function = "spim1"; | ||
513 | drive-strength = <2>; | ||
514 | }; | ||
515 | }; | ||
516 | |||
517 | spim1_cs2_alt0_pin: spim1-cs2-alt0-pin { | ||
518 | spim1-cs2 { | ||
519 | pins = "mfio31"; | ||
520 | function = "spim1"; | ||
521 | drive-strength = <2>; | ||
522 | }; | ||
523 | }; | ||
524 | |||
525 | spim1_cs2_alt1_pin: spim1-cs2-alt1-pin { | ||
526 | spim1-cs2 { | ||
527 | pins = "mfio55"; | ||
528 | function = "spim1"; | ||
529 | drive-strength = <2>; | ||
530 | }; | ||
531 | }; | ||
532 | |||
533 | spim1_cs3_pin: spim1-cs3-pin { | ||
534 | spim1-cs3 { | ||
535 | pins = "mfio56"; | ||
536 | function = "spim1"; | ||
537 | drive-strength = <2>; | ||
538 | }; | ||
539 | }; | ||
540 | |||
541 | spim1_cs4_pin: spim1-cs4-pin { | ||
542 | spim1-cs4 { | ||
543 | pins = "mfio57"; | ||
544 | function = "spim1"; | ||
545 | drive-strength = <2>; | ||
546 | }; | ||
547 | }; | ||
548 | |||
549 | uart0_pins: uart0-pins { | ||
550 | uart0 { | ||
551 | pins = "mfio55", "mfio56"; | ||
552 | function = "uart0"; | ||
553 | drive-strength = <2>; | ||
554 | }; | ||
555 | }; | ||
556 | |||
557 | uart0_rts_cts_pins: uart0-rts-cts-pins { | ||
558 | uart0-rts-cts { | ||
559 | pins = "mfio57", "mfio58"; | ||
560 | function = "uart0"; | ||
561 | drive-strength = <2>; | ||
562 | }; | ||
563 | }; | ||
564 | |||
565 | uart1_pins: uart1-pins { | ||
566 | uart1 { | ||
567 | pins = "mfio59", "mfio60"; | ||
568 | function = "uart1"; | ||
569 | drive-strength = <2>; | ||
570 | }; | ||
571 | }; | ||
572 | |||
573 | uart1_rts_cts_pins: uart1-rts-cts-pins { | ||
574 | uart1-rts-cts { | ||
575 | pins = "mfio1", "mfio2"; | ||
576 | function = "uart1"; | ||
577 | drive-strength = <2>; | ||
578 | }; | ||
579 | }; | ||
580 | |||
581 | enet_pins: enet-pins { | ||
582 | pin_enet: enet { | ||
583 | pins = "mfio63", "mfio64", "mfio65", "mfio66", | ||
584 | "mfio67", "mfio68", "mfio69", "mfio70"; | ||
585 | function = "eth"; | ||
586 | slew-rate = <1>; | ||
587 | drive-strength = <4>; | ||
588 | }; | ||
589 | pin_enet_phy_clk: enet-phy-clk { | ||
590 | pins = "mfio71"; | ||
591 | function = "eth"; | ||
592 | slew-rate = <1>; | ||
593 | drive-strength = <8>; | ||
594 | }; | ||
595 | }; | ||
596 | |||
597 | sdhost_pins: sdhost-pins { | ||
598 | pin_sdhost_clk: sdhost-clk { | ||
599 | pins = "mfio15"; | ||
600 | function = "sdhost"; | ||
601 | slew-rate = <1>; | ||
602 | drive-strength = <4>; | ||
603 | }; | ||
604 | pin_sdhost_cmd: sdhost-cmd { | ||
605 | pins = "mfio16"; | ||
606 | function = "sdhost"; | ||
607 | slew-rate = <1>; | ||
608 | drive-strength = <4>; | ||
609 | }; | ||
610 | pin_sdhost_data: sdhost-data { | ||
611 | pins = "mfio17", "mfio18", "mfio19", "mfio20", | ||
612 | "mfio21", "mfio22", "mfio23", "mfio24"; | ||
613 | function = "sdhost"; | ||
614 | slew-rate = <1>; | ||
615 | drive-strength = <4>; | ||
616 | }; | ||
617 | pin_sdhost_power_select: sdhost-power-select { | ||
618 | pins = "mfio25"; | ||
619 | function = "sdhost"; | ||
620 | slew-rate = <1>; | ||
621 | drive-strength = <2>; | ||
622 | }; | ||
623 | pin_sdhost_card_detect: sdhost-card-detect { | ||
624 | pins = "mfio26"; | ||
625 | function = "sdhost"; | ||
626 | drive-strength = <2>; | ||
627 | }; | ||
628 | pin_sdhost_write_protect: sdhost-write-protect { | ||
629 | pins = "mfio27"; | ||
630 | function = "sdhost"; | ||
631 | drive-strength = <2>; | ||
632 | }; | ||
633 | }; | ||
634 | |||
635 | ir_pin: ir-pin { | ||
636 | ir-data { | ||
637 | pins = "mfio72"; | ||
638 | function = "ir"; | ||
639 | drive-strength = <2>; | ||
640 | }; | ||
641 | }; | ||
642 | |||
643 | pwmpdm0_pin: pwmpdm0-pin { | ||
644 | pwmpdm0 { | ||
645 | pins = "mfio73"; | ||
646 | function = "pwmpdm"; | ||
647 | drive-strength = <2>; | ||
648 | }; | ||
649 | }; | ||
650 | |||
651 | pwmpdm1_pin: pwmpdm1-pin { | ||
652 | pwmpdm1 { | ||
653 | pins = "mfio74"; | ||
654 | function = "pwmpdm"; | ||
655 | drive-strength = <2>; | ||
656 | }; | ||
657 | }; | ||
658 | |||
659 | pwmpdm2_pin: pwmpdm2-pin { | ||
660 | pwmpdm2 { | ||
661 | pins = "mfio75"; | ||
662 | function = "pwmpdm"; | ||
663 | drive-strength = <2>; | ||
664 | }; | ||
665 | }; | ||
666 | |||
667 | pwmpdm3_pin: pwmpdm3-pin { | ||
668 | pwmpdm3 { | ||
669 | pins = "mfio76"; | ||
670 | function = "pwmpdm"; | ||
671 | drive-strength = <2>; | ||
672 | }; | ||
673 | }; | ||
674 | |||
675 | dac_clk_pin: dac-clk-pin { | ||
676 | pin_dac_clk: dac-clk { | ||
677 | pins = "mfio45"; | ||
678 | function = "i2s_dac_clk"; | ||
679 | drive-strength = <4>; | ||
680 | }; | ||
681 | }; | ||
682 | |||
683 | i2s_mclk_pin: i2s-mclk-pin { | ||
684 | pin_i2s_mclk: i2s-mclk { | ||
685 | pins = "mfio36"; | ||
686 | function = "i2s_out"; | ||
687 | drive-strength = <4>; | ||
688 | }; | ||
689 | }; | ||
690 | |||
691 | spdif_out_pin: spdif-out-pin { | ||
692 | spdif-out { | ||
693 | pins = "mfio61"; | ||
694 | function = "spdif_out"; | ||
695 | slew-rate = <1>; | ||
696 | drive-strength = <2>; | ||
697 | }; | ||
698 | }; | ||
699 | |||
700 | spdif_in_pin: spdif-in-pin { | ||
701 | spdif-in { | ||
702 | pins = "mfio62"; | ||
703 | function = "spdif_in"; | ||
704 | drive-strength = <2>; | ||
705 | }; | ||
706 | }; | ||
707 | |||
708 | i2s_out_pins: i2s-out-pins { | ||
709 | pins_i2s_out_clk: i2s-out-clk { | ||
710 | pins = "mfio37", "mfio38"; | ||
711 | function = "i2s_out"; | ||
712 | drive-strength = <4>; | ||
713 | }; | ||
714 | pins_i2s_out: i2s-out { | ||
715 | pins = "mfio39", "mfio40", | ||
716 | "mfio41", "mfio42", | ||
717 | "mfio43", "mfio44"; | ||
718 | function = "i2s_out"; | ||
719 | drive-strength = <2>; | ||
720 | }; | ||
721 | }; | ||
722 | |||
723 | i2s_in_pins: i2s-in-pins { | ||
724 | i2s-in { | ||
725 | pins = "mfio47", "mfio48", "mfio49", | ||
726 | "mfio50", "mfio51", "mfio52", | ||
727 | "mfio53", "mfio54"; | ||
728 | function = "i2s_in"; | ||
729 | drive-strength = <2>; | ||
730 | }; | ||
731 | }; | ||
732 | }; | ||
733 | |||
734 | timer: timer@18102000 { | ||
735 | compatible = "img,pistachio-gptimer"; | ||
736 | reg = <0x18102000 0x100>; | ||
737 | interrupts = <GIC_SHARED 60 IRQ_TYPE_LEVEL_HIGH>; | ||
738 | clocks = <&clk_periph PERIPH_CLK_COUNTER_FAST>, | ||
739 | <&cr_periph SYS_CLK_TIMER>; | ||
740 | clock-names = "fast", "sys"; | ||
741 | img,cr-periph = <&cr_periph>; | ||
742 | }; | ||
743 | |||
744 | wdt: watchdog@18102100 { | ||
745 | compatible = "img,pdc-wdt"; | ||
746 | reg = <0x18102100 0x100>; | ||
747 | interrupts = <GIC_SHARED 52 IRQ_TYPE_LEVEL_HIGH>; | ||
748 | clocks = <&clk_periph PERIPH_CLK_WD>, <&cr_periph SYS_CLK_WD>; | ||
749 | clock-names = "wdt", "sys"; | ||
750 | assigned-clocks = <&clk_periph PERIPH_CLK_WD_PRE_DIV>, | ||
751 | <&clk_periph PERIPH_CLK_WD_DIV>; | ||
752 | assigned-clock-rates = <4000000>, <32768>; | ||
753 | }; | ||
754 | |||
755 | ir: ir@18102200 { | ||
756 | compatible = "img,ir-rev1"; | ||
757 | reg = <0x18102200 0x100>; | ||
758 | interrupts = <GIC_SHARED 51 IRQ_TYPE_LEVEL_HIGH>; | ||
759 | clocks = <&clk_periph PERIPH_CLK_IR>, <&cr_periph SYS_CLK_IR>; | ||
760 | clock-names = "core", "sys"; | ||
761 | assigned-clocks = <&clk_periph PERIPH_CLK_IR_PRE_DIV>, | ||
762 | <&clk_periph PERIPH_CLK_IR_DIV>; | ||
763 | assigned-clock-rates = <4000000>, <32768>; | ||
764 | pinctrl-0 = <&ir_pin>; | ||
765 | pinctrl-names = "default"; | ||
766 | status = "disabled"; | ||
767 | }; | ||
768 | |||
769 | usb: usb@18120000 { | ||
770 | compatible = "snps,dwc2"; | ||
771 | reg = <0x18120000 0x1c000>; | ||
772 | interrupts = <GIC_SHARED 49 IRQ_TYPE_LEVEL_HIGH>; | ||
773 | phys = <&usb_phy>; | ||
774 | phy-names = "usb2-phy"; | ||
775 | g-tx-fifo-size = <256 256 256 256>; | ||
776 | status = "disabled"; | ||
777 | }; | ||
778 | |||
779 | enet: ethernet@18140000 { | ||
780 | compatible = "snps,dwmac"; | ||
781 | reg = <0x18140000 0x2000>; | ||
782 | interrupts = <GIC_SHARED 50 IRQ_TYPE_LEVEL_HIGH>; | ||
783 | interrupt-names = "macirq"; | ||
784 | clocks = <&clk_core CLK_ENET>, <&cr_periph SYS_CLK_ENET>; | ||
785 | clock-names = "stmmaceth", "pclk"; | ||
786 | assigned-clocks = <&clk_core CLK_ENET_MUX>, | ||
787 | <&clk_core CLK_ENET_DIV>; | ||
788 | assigned-clock-parents = <&clk_core CLK_SYS_INTERNAL_DIV>; | ||
789 | assigned-clock-rates = <0>, <50000000>; | ||
790 | pinctrl-0 = <&enet_pins>; | ||
791 | pinctrl-names = "default"; | ||
792 | phy-mode = "rmii"; | ||
793 | status = "disabled"; | ||
794 | }; | ||
795 | |||
796 | sdhost: mmc@18142000 { | ||
797 | compatible = "img,pistachio-dw-mshc"; | ||
798 | reg = <0x18142000 0x400>; | ||
799 | interrupts = <GIC_SHARED 39 IRQ_TYPE_LEVEL_HIGH>; | ||
800 | clocks = <&clk_core CLK_SD_HOST>, <&cr_periph SYS_CLK_SD_HOST>; | ||
801 | clock-names = "ciu", "biu"; | ||
802 | pinctrl-0 = <&sdhost_pins>; | ||
803 | pinctrl-names = "default"; | ||
804 | fifo-depth = <0x20>; | ||
805 | clock-frequency = <50000000>; | ||
806 | bus-width = <8>; | ||
807 | cap-mmc-highspeed; | ||
808 | cap-sd-highspeed; | ||
809 | status = "disabled"; | ||
810 | }; | ||
811 | |||
812 | sram: sram@1b000000 { | ||
813 | compatible = "mmio-sram"; | ||
814 | reg = <0x1b000000 0x10000>; | ||
815 | }; | ||
816 | |||
817 | mdc: dma-controller@18143000 { | ||
818 | compatible = "img,pistachio-mdc-dma"; | ||
819 | reg = <0x18143000 0x1000>; | ||
820 | interrupts = <GIC_SHARED 27 IRQ_TYPE_LEVEL_HIGH>, | ||
821 | <GIC_SHARED 28 IRQ_TYPE_LEVEL_HIGH>, | ||
822 | <GIC_SHARED 29 IRQ_TYPE_LEVEL_HIGH>, | ||
823 | <GIC_SHARED 30 IRQ_TYPE_LEVEL_HIGH>, | ||
824 | <GIC_SHARED 31 IRQ_TYPE_LEVEL_HIGH>, | ||
825 | <GIC_SHARED 32 IRQ_TYPE_LEVEL_HIGH>, | ||
826 | <GIC_SHARED 33 IRQ_TYPE_LEVEL_HIGH>, | ||
827 | <GIC_SHARED 34 IRQ_TYPE_LEVEL_HIGH>, | ||
828 | <GIC_SHARED 35 IRQ_TYPE_LEVEL_HIGH>, | ||
829 | <GIC_SHARED 36 IRQ_TYPE_LEVEL_HIGH>, | ||
830 | <GIC_SHARED 37 IRQ_TYPE_LEVEL_HIGH>, | ||
831 | <GIC_SHARED 38 IRQ_TYPE_LEVEL_HIGH>; | ||
832 | clocks = <&cr_periph SYS_CLK_MDC>; | ||
833 | clock-names = "sys"; | ||
834 | |||
835 | img,max-burst-multiplier = <16>; | ||
836 | img,cr-periph = <&cr_periph>; | ||
837 | |||
838 | #dma-cells = <3>; | ||
839 | }; | ||
840 | |||
841 | clk_core: clk@18144000 { | ||
842 | compatible = "img,pistachio-clk", "syscon"; | ||
843 | clocks = <&xtal>, <&cr_top EXT_CLK_AUDIO_IN>, | ||
844 | <&cr_top EXT_CLK_ENET_IN>; | ||
845 | clock-names = "xtal", "audio_refclk_ext_gate", | ||
846 | "ext_enet_in_gate"; | ||
847 | reg = <0x18144000 0x800>; | ||
848 | #clock-cells = <1>; | ||
849 | }; | ||
850 | |||
851 | clk_periph: clk@18144800 { | ||
852 | compatible = "img,pistachio-clk-periph"; | ||
853 | reg = <0x18144800 0x1000>; | ||
854 | clocks = <&clk_core CLK_PERIPH_SYS>; | ||
855 | clock-names = "periph_sys_core"; | ||
856 | #clock-cells = <1>; | ||
857 | }; | ||
858 | |||
859 | cr_periph: clk@18148000 { | ||
860 | compatible = "img,pistachio-cr-periph", "syscon", "simple-bus"; | ||
861 | reg = <0x18148000 0x1000>; | ||
862 | clocks = <&clk_periph PERIPH_CLK_SYS>; | ||
863 | clock-names = "sys"; | ||
864 | #clock-cells = <1>; | ||
865 | |||
866 | pistachio_reset: reset-controller { | ||
867 | compatible = "img,pistachio-reset"; | ||
868 | #reset-cells = <1>; | ||
869 | }; | ||
870 | }; | ||
871 | |||
872 | cr_top: clk@18149000 { | ||
873 | compatible = "img,pistachio-cr-top", "syscon"; | ||
874 | reg = <0x18149000 0x200>; | ||
875 | #clock-cells = <1>; | ||
876 | }; | ||
877 | |||
878 | hash: hash@18149600 { | ||
879 | compatible = "img,hash-accelerator"; | ||
880 | reg = <0x18149600 0x100>, <0x18101100 0x4>; | ||
881 | interrupts = <GIC_SHARED 59 IRQ_TYPE_LEVEL_HIGH>; | ||
882 | dmas = <&mdc 8 0xffffffff 0>; | ||
883 | dma-names = "tx"; | ||
884 | clocks = <&cr_periph SYS_CLK_HASH>, | ||
885 | <&clk_periph PERIPH_CLK_ROM>; | ||
886 | clock-names = "sys", "hash"; | ||
887 | }; | ||
888 | |||
889 | gic: interrupt-controller@1bdc0000 { | ||
890 | compatible = "mti,gic"; | ||
891 | reg = <0x1bdc0000 0x20000>; | ||
892 | |||
893 | interrupt-controller; | ||
894 | #interrupt-cells = <3>; | ||
895 | |||
896 | timer { | ||
897 | compatible = "mti,gic-timer"; | ||
898 | interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>; | ||
899 | clocks = <&clk_core CLK_MIPS>; | ||
900 | }; | ||
901 | }; | ||
902 | |||
903 | usb_phy: usb-phy { | ||
904 | compatible = "img,pistachio-usb-phy"; | ||
905 | clocks = <&clk_core CLK_USB_PHY>; | ||
906 | clock-names = "usb_phy"; | ||
907 | assigned-clocks = <&clk_core CLK_USB_PHY_DIV>; | ||
908 | assigned-clock-rates = <50000000>; | ||
909 | img,refclk = <0x2>; | ||
910 | img,cr-top = <&cr_top>; | ||
911 | #phy-cells = <0>; | ||
912 | }; | ||
913 | |||
914 | xtal: xtal { | ||
915 | compatible = "fixed-clock"; | ||
916 | #clock-cells = <0>; | ||
917 | clock-frequency = <52000000>; | ||
918 | clock-output-names = "xtal"; | ||
919 | }; | ||
920 | }; | ||
diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts new file mode 100644 index 000000000..bf69da96d --- /dev/null +++ b/arch/mips/boot/dts/img/pistachio_marduk.dts | |||
@@ -0,0 +1,160 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Copyright (C) 2015, 2016 Imagination Technologies Ltd. | ||
4 | * | ||
5 | * IMG Marduk board is also known as Creator Ci40. | ||
6 | */ | ||
7 | |||
8 | /dts-v1/; | ||
9 | |||
10 | #include "pistachio.dtsi" | ||
11 | |||
12 | / { | ||
13 | model = "IMG Marduk (Creator Ci40)"; | ||
14 | compatible = "img,pistachio-marduk", "img,pistachio"; | ||
15 | |||
16 | aliases { | ||
17 | serial0 = &uart0; | ||
18 | serial1 = &uart1; | ||
19 | ethernet0 = &enet; | ||
20 | spi0 = &spfi0; | ||
21 | spi1 = &spfi1; | ||
22 | }; | ||
23 | |||
24 | chosen { | ||
25 | bootargs = "root=/dev/sda1 rootwait ro lpj=723968"; | ||
26 | stdout-path = "serial1:115200"; | ||
27 | }; | ||
28 | |||
29 | memory { | ||
30 | device_type = "memory"; | ||
31 | reg = <0x00000000 0x10000000>; | ||
32 | }; | ||
33 | |||
34 | reg_1v8: fixed-regulator { | ||
35 | compatible = "regulator-fixed"; | ||
36 | regulator-name = "aux_adc_vref"; | ||
37 | regulator-min-microvolt = <1800000>; | ||
38 | regulator-max-microvolt = <1800000>; | ||
39 | regulator-boot-on; | ||
40 | }; | ||
41 | |||
42 | internal_dac_supply: internal-dac-supply { | ||
43 | compatible = "regulator-fixed"; | ||
44 | regulator-name = "internal_dac_supply"; | ||
45 | regulator-min-microvolt = <1800000>; | ||
46 | regulator-max-microvolt = <1800000>; | ||
47 | }; | ||
48 | |||
49 | leds { | ||
50 | compatible = "pwm-leds"; | ||
51 | heartbeat { | ||
52 | label = "marduk:red:heartbeat"; | ||
53 | pwms = <&pwm 3 300000>; | ||
54 | max-brightness = <255>; | ||
55 | linux,default-trigger = "heartbeat"; | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | keys { | ||
60 | compatible = "gpio-keys"; | ||
61 | button@1 { | ||
62 | label = "Button 1"; | ||
63 | linux,code = <0x101>; /* BTN_1 */ | ||
64 | gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; | ||
65 | }; | ||
66 | button@2 { | ||
67 | label = "Button 2"; | ||
68 | linux,code = <0x102>; /* BTN_2 */ | ||
69 | gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; | ||
70 | }; | ||
71 | }; | ||
72 | }; | ||
73 | |||
74 | &internal_dac { | ||
75 | VDD-supply = <&internal_dac_supply>; | ||
76 | }; | ||
77 | |||
78 | &spfi1 { | ||
79 | status = "okay"; | ||
80 | |||
81 | pinctrl-0 = <&spim1_pins>, <&spim1_quad_pins>, <&spim1_cs0_pin>, | ||
82 | <&spim1_cs1_pin>; | ||
83 | pinctrl-names = "default"; | ||
84 | cs-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>, <&gpio0 1 GPIO_ACTIVE_HIGH>; | ||
85 | |||
86 | flash@0 { | ||
87 | compatible = "spansion,s25fl016k", "jedec,spi-nor"; | ||
88 | reg = <0>; | ||
89 | spi-max-frequency = <50000000>; | ||
90 | }; | ||
91 | }; | ||
92 | |||
93 | &uart0 { | ||
94 | status = "okay"; | ||
95 | assigned-clock-rates = <114278400>, <1843200>; | ||
96 | }; | ||
97 | |||
98 | &uart1 { | ||
99 | status = "okay"; | ||
100 | }; | ||
101 | |||
102 | &usb { | ||
103 | status = "okay"; | ||
104 | }; | ||
105 | |||
106 | &enet { | ||
107 | status = "okay"; | ||
108 | }; | ||
109 | |||
110 | &pin_enet { | ||
111 | drive-strength = <2>; | ||
112 | }; | ||
113 | |||
114 | &pin_enet_phy_clk { | ||
115 | drive-strength = <2>; | ||
116 | }; | ||
117 | |||
118 | &sdhost { | ||
119 | status = "okay"; | ||
120 | bus-width = <4>; | ||
121 | disable-wp; | ||
122 | }; | ||
123 | |||
124 | &pin_sdhost_cmd { | ||
125 | drive-strength = <2>; | ||
126 | }; | ||
127 | |||
128 | &pin_sdhost_data { | ||
129 | drive-strength = <2>; | ||
130 | }; | ||
131 | |||
132 | &pwm { | ||
133 | status = "okay"; | ||
134 | |||
135 | pinctrl-0 = <&pwmpdm0_pin>, <&pwmpdm1_pin>, <&pwmpdm2_pin>, | ||
136 | <&pwmpdm3_pin>; | ||
137 | pinctrl-names = "default"; | ||
138 | }; | ||
139 | |||
140 | &adc { | ||
141 | status = "okay"; | ||
142 | vref-supply = <®_1v8>; | ||
143 | adc-reserved-channels = <0x10>; | ||
144 | }; | ||
145 | |||
146 | &i2c2 { | ||
147 | status = "okay"; | ||
148 | clock-frequency = <400000>; | ||
149 | |||
150 | tpm@20 { | ||
151 | compatible = "infineon,slb9645tt"; | ||
152 | reg = <0x20>; | ||
153 | }; | ||
154 | |||
155 | }; | ||
156 | |||
157 | &i2c3 { | ||
158 | status = "okay"; | ||
159 | clock-frequency = <400000>; | ||
160 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/Makefile b/arch/mips/boot/dts/ingenic/Makefile new file mode 100644 index 000000000..54aa0c4e6 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/Makefile | |||
@@ -0,0 +1,9 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_JZ4740_QI_LB60) += qi_lb60.dtb | ||
3 | dtb-$(CONFIG_JZ4740_RS90) += rs90.dtb | ||
4 | dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb | ||
5 | dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb | ||
6 | dtb-$(CONFIG_X1000_CU1000_NEO) += cu1000-neo.dtb | ||
7 | dtb-$(CONFIG_X1830_CU1830_NEO) += cu1830-neo.dtb | ||
8 | |||
9 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts new file mode 100644 index 000000000..75f5bfbf2 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/ci20.dts | |||
@@ -0,0 +1,495 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "jz4780.dtsi" | ||
5 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
6 | #include <dt-bindings/gpio/gpio.h> | ||
7 | #include <dt-bindings/input/input.h> | ||
8 | #include <dt-bindings/interrupt-controller/irq.h> | ||
9 | #include <dt-bindings/regulator/active-semi,8865-regulator.h> | ||
10 | |||
11 | / { | ||
12 | compatible = "img,ci20", "ingenic,jz4780"; | ||
13 | |||
14 | aliases { | ||
15 | serial0 = &uart0; | ||
16 | serial1 = &uart1; | ||
17 | serial3 = &uart3; | ||
18 | serial4 = &uart4; | ||
19 | }; | ||
20 | |||
21 | chosen { | ||
22 | stdout-path = &uart4; | ||
23 | }; | ||
24 | |||
25 | memory { | ||
26 | device_type = "memory"; | ||
27 | reg = <0x0 0x10000000 | ||
28 | 0x30000000 0x30000000>; | ||
29 | }; | ||
30 | |||
31 | gpio-keys { | ||
32 | compatible = "gpio-keys"; | ||
33 | |||
34 | sw1 { | ||
35 | label = "ci20:sw1"; | ||
36 | linux,code = <KEY_F13>; | ||
37 | gpios = <&gpd 17 GPIO_ACTIVE_HIGH>; | ||
38 | wakeup-source; | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | leds { | ||
43 | compatible = "gpio-leds"; | ||
44 | |||
45 | led0 { | ||
46 | label = "ci20:red:led0"; | ||
47 | gpios = <&gpc 3 GPIO_ACTIVE_HIGH>; | ||
48 | linux,default-trigger = "none"; | ||
49 | }; | ||
50 | |||
51 | led1 { | ||
52 | label = "ci20:red:led1"; | ||
53 | gpios = <&gpc 2 GPIO_ACTIVE_HIGH>; | ||
54 | linux,default-trigger = "nand-disk"; | ||
55 | }; | ||
56 | |||
57 | led2 { | ||
58 | label = "ci20:red:led2"; | ||
59 | gpios = <&gpc 1 GPIO_ACTIVE_HIGH>; | ||
60 | linux,default-trigger = "cpu1"; | ||
61 | }; | ||
62 | |||
63 | led3 { | ||
64 | label = "ci20:red:led3"; | ||
65 | gpios = <&gpc 0 GPIO_ACTIVE_HIGH>; | ||
66 | linux,default-trigger = "cpu0"; | ||
67 | }; | ||
68 | }; | ||
69 | |||
70 | eth0_power: fixedregulator@0 { | ||
71 | compatible = "regulator-fixed"; | ||
72 | regulator-name = "eth0_power"; | ||
73 | regulator-min-microvolt = <3300000>; | ||
74 | regulator-max-microvolt = <3300000>; | ||
75 | gpio = <&gpb 25 GPIO_ACTIVE_LOW>; | ||
76 | enable-active-high; | ||
77 | }; | ||
78 | |||
79 | ir: ir { | ||
80 | compatible = "gpio-ir-receiver"; | ||
81 | gpios = <&gpe 3 GPIO_ACTIVE_LOW>; | ||
82 | }; | ||
83 | |||
84 | wlan0_power: fixedregulator@1 { | ||
85 | compatible = "regulator-fixed"; | ||
86 | regulator-name = "wlan0_power"; | ||
87 | gpio = <&gpb 19 GPIO_ACTIVE_LOW>; | ||
88 | enable-active-high; | ||
89 | }; | ||
90 | }; | ||
91 | |||
92 | &ext { | ||
93 | clock-frequency = <48000000>; | ||
94 | }; | ||
95 | |||
96 | &mmc0 { | ||
97 | status = "okay"; | ||
98 | |||
99 | bus-width = <4>; | ||
100 | max-frequency = <50000000>; | ||
101 | |||
102 | pinctrl-names = "default"; | ||
103 | pinctrl-0 = <&pins_mmc0>; | ||
104 | |||
105 | cd-gpios = <&gpf 20 GPIO_ACTIVE_LOW>; | ||
106 | }; | ||
107 | |||
108 | &mmc1 { | ||
109 | status = "okay"; | ||
110 | |||
111 | bus-width = <4>; | ||
112 | max-frequency = <50000000>; | ||
113 | non-removable; | ||
114 | |||
115 | pinctrl-names = "default"; | ||
116 | pinctrl-0 = <&pins_mmc1>; | ||
117 | |||
118 | brcmf: wifi@1 { | ||
119 | /* reg = <4>;*/ | ||
120 | compatible = "brcm,bcm4330-fmac"; | ||
121 | vcc-supply = <&wlan0_power>; | ||
122 | device-wakeup-gpios = <&gpd 9 GPIO_ACTIVE_HIGH>; | ||
123 | shutdown-gpios = <&gpf 7 GPIO_ACTIVE_LOW>; | ||
124 | }; | ||
125 | }; | ||
126 | |||
127 | &uart0 { | ||
128 | status = "okay"; | ||
129 | |||
130 | pinctrl-names = "default"; | ||
131 | pinctrl-0 = <&pins_uart0>; | ||
132 | }; | ||
133 | |||
134 | &uart1 { | ||
135 | status = "okay"; | ||
136 | |||
137 | pinctrl-names = "default"; | ||
138 | pinctrl-0 = <&pins_uart1>; | ||
139 | }; | ||
140 | |||
141 | &uart2 { | ||
142 | status = "okay"; | ||
143 | |||
144 | pinctrl-names = "default"; | ||
145 | pinctrl-0 = <&pins_uart2>; | ||
146 | uart-has-rtscts; | ||
147 | |||
148 | bluetooth { | ||
149 | compatible = "brcm,bcm4330-bt"; | ||
150 | reset-gpios = <&gpf 8 GPIO_ACTIVE_HIGH>; | ||
151 | vcc-supply = <&wlan0_power>; | ||
152 | device-wakeup-gpios = <&gpf 5 GPIO_ACTIVE_HIGH>; | ||
153 | host-wakeup-gpios = <&gpf 6 GPIO_ACTIVE_HIGH>; | ||
154 | shutdown-gpios = <&gpf 4 GPIO_ACTIVE_LOW>; | ||
155 | }; | ||
156 | }; | ||
157 | |||
158 | &uart3 { | ||
159 | status = "okay"; | ||
160 | |||
161 | pinctrl-names = "default"; | ||
162 | pinctrl-0 = <&pins_uart3>; | ||
163 | }; | ||
164 | |||
165 | &uart4 { | ||
166 | status = "okay"; | ||
167 | |||
168 | pinctrl-names = "default"; | ||
169 | pinctrl-0 = <&pins_uart4>; | ||
170 | }; | ||
171 | |||
172 | &i2c0 { | ||
173 | status = "okay"; | ||
174 | |||
175 | pinctrl-names = "default"; | ||
176 | pinctrl-0 = <&pins_i2c0>; | ||
177 | |||
178 | clock-frequency = <400000>; | ||
179 | |||
180 | act8600: act8600@5a { | ||
181 | compatible = "active-semi,act8600"; | ||
182 | reg = <0x5a>; | ||
183 | status = "okay"; | ||
184 | |||
185 | regulators { | ||
186 | vddcore: SUDCDC1 { | ||
187 | regulator-name = "DCDC_REG1"; | ||
188 | regulator-min-microvolt = <1100000>; | ||
189 | regulator-max-microvolt = <1100000>; | ||
190 | regulator-always-on; | ||
191 | }; | ||
192 | vddmem: SUDCDC2 { | ||
193 | regulator-name = "DCDC_REG2"; | ||
194 | regulator-min-microvolt = <1500000>; | ||
195 | regulator-max-microvolt = <1500000>; | ||
196 | regulator-always-on; | ||
197 | }; | ||
198 | vcc_33: SUDCDC3 { | ||
199 | regulator-name = "DCDC_REG3"; | ||
200 | regulator-min-microvolt = <3300000>; | ||
201 | regulator-max-microvolt = <3300000>; | ||
202 | regulator-always-on; | ||
203 | }; | ||
204 | vcc_50: SUDCDC4 { | ||
205 | regulator-name = "SUDCDC_REG4"; | ||
206 | regulator-min-microvolt = <5000000>; | ||
207 | regulator-max-microvolt = <5000000>; | ||
208 | regulator-always-on; | ||
209 | }; | ||
210 | vcc_25: LDO_REG5 { | ||
211 | regulator-name = "LDO_REG5"; | ||
212 | regulator-min-microvolt = <2500000>; | ||
213 | regulator-max-microvolt = <2500000>; | ||
214 | regulator-always-on; | ||
215 | }; | ||
216 | wifi_io: LDO_REG6 { | ||
217 | regulator-name = "LDO_REG6"; | ||
218 | regulator-min-microvolt = <2500000>; | ||
219 | regulator-max-microvolt = <2500000>; | ||
220 | regulator-always-on; | ||
221 | }; | ||
222 | vcc_28: LDO_REG7 { | ||
223 | regulator-name = "LDO_REG7"; | ||
224 | regulator-min-microvolt = <2800000>; | ||
225 | regulator-max-microvolt = <2800000>; | ||
226 | regulator-always-on; | ||
227 | }; | ||
228 | vcc_15: LDO_REG8 { | ||
229 | regulator-name = "LDO_REG8"; | ||
230 | regulator-min-microvolt = <1500000>; | ||
231 | regulator-max-microvolt = <1500000>; | ||
232 | regulator-always-on; | ||
233 | }; | ||
234 | vrtc_18: LDO_REG9 { | ||
235 | regulator-name = "LDO_REG9"; | ||
236 | /* Despite the datasheet stating 3.3V | ||
237 | * for REG9 and the driver expecting that, | ||
238 | * REG9 outputs 1.8V. | ||
239 | * Likely the CI20 uses a proprietary | ||
240 | * factory programmed chip variant. | ||
241 | * Since this is a simple on/off LDO the | ||
242 | * exact values do not matter. | ||
243 | */ | ||
244 | regulator-min-microvolt = <3300000>; | ||
245 | regulator-max-microvolt = <3300000>; | ||
246 | regulator-always-on; | ||
247 | }; | ||
248 | vcc_11: LDO_REG10 { | ||
249 | regulator-name = "LDO_REG10"; | ||
250 | regulator-min-microvolt = <1200000>; | ||
251 | regulator-max-microvolt = <1200000>; | ||
252 | regulator-always-on; | ||
253 | }; | ||
254 | }; | ||
255 | }; | ||
256 | }; | ||
257 | |||
258 | &i2c1 { | ||
259 | status = "okay"; | ||
260 | |||
261 | pinctrl-names = "default"; | ||
262 | pinctrl-0 = <&pins_i2c1>; | ||
263 | |||
264 | }; | ||
265 | |||
266 | &i2c2 { | ||
267 | status = "okay"; | ||
268 | |||
269 | pinctrl-names = "default"; | ||
270 | pinctrl-0 = <&pins_i2c2>; | ||
271 | |||
272 | }; | ||
273 | |||
274 | &i2c3 { | ||
275 | status = "okay"; | ||
276 | |||
277 | pinctrl-names = "default"; | ||
278 | pinctrl-0 = <&pins_i2c3>; | ||
279 | |||
280 | }; | ||
281 | |||
282 | &i2c4 { | ||
283 | status = "okay"; | ||
284 | |||
285 | pinctrl-names = "default"; | ||
286 | pinctrl-0 = <&pins_i2c4>; | ||
287 | |||
288 | clock-frequency = <400000>; | ||
289 | |||
290 | rtc@51 { | ||
291 | compatible = "nxp,pcf8563"; | ||
292 | reg = <0x51>; | ||
293 | |||
294 | interrupt-parent = <&gpf>; | ||
295 | interrupts = <30 IRQ_TYPE_LEVEL_LOW>; | ||
296 | }; | ||
297 | }; | ||
298 | |||
299 | &nemc { | ||
300 | status = "okay"; | ||
301 | |||
302 | nandc: nand-controller@1 { | ||
303 | compatible = "ingenic,jz4780-nand"; | ||
304 | reg = <1 0 0x1000000>; | ||
305 | |||
306 | #address-cells = <1>; | ||
307 | #size-cells = <0>; | ||
308 | |||
309 | ingenic,bch-controller = <&bch>; | ||
310 | |||
311 | ingenic,nemc-tAS = <10>; | ||
312 | ingenic,nemc-tAH = <5>; | ||
313 | ingenic,nemc-tBP = <10>; | ||
314 | ingenic,nemc-tAW = <15>; | ||
315 | ingenic,nemc-tSTRV = <100>; | ||
316 | |||
317 | /* | ||
318 | * Only CLE/ALE are needed for the devices that are connected, rather | ||
319 | * than the full address line set. | ||
320 | */ | ||
321 | pinctrl-names = "default"; | ||
322 | pinctrl-0 = <&pins_nemc>; | ||
323 | |||
324 | nand@1 { | ||
325 | reg = <1>; | ||
326 | |||
327 | nand-ecc-step-size = <1024>; | ||
328 | nand-ecc-strength = <24>; | ||
329 | nand-ecc-mode = "hw"; | ||
330 | nand-on-flash-bbt; | ||
331 | |||
332 | pinctrl-names = "default"; | ||
333 | pinctrl-0 = <&pins_nemc_cs1>; | ||
334 | |||
335 | partitions { | ||
336 | compatible = "fixed-partitions"; | ||
337 | #address-cells = <2>; | ||
338 | #size-cells = <2>; | ||
339 | |||
340 | partition@0 { | ||
341 | label = "u-boot-spl"; | ||
342 | reg = <0x0 0x0 0x0 0x800000>; | ||
343 | }; | ||
344 | |||
345 | partition@800000 { | ||
346 | label = "u-boot"; | ||
347 | reg = <0x0 0x800000 0x0 0x200000>; | ||
348 | }; | ||
349 | |||
350 | partition@a00000 { | ||
351 | label = "u-boot-env"; | ||
352 | reg = <0x0 0xa00000 0x0 0x200000>; | ||
353 | }; | ||
354 | |||
355 | partition@c00000 { | ||
356 | label = "boot"; | ||
357 | reg = <0x0 0xc00000 0x0 0x4000000>; | ||
358 | }; | ||
359 | |||
360 | partition@4c00000 { | ||
361 | label = "system"; | ||
362 | reg = <0x0 0x4c00000 0x1 0xfb400000>; | ||
363 | }; | ||
364 | }; | ||
365 | }; | ||
366 | }; | ||
367 | |||
368 | dm9000@6 { | ||
369 | compatible = "davicom,dm9000"; | ||
370 | davicom,no-eeprom; | ||
371 | |||
372 | pinctrl-names = "default"; | ||
373 | pinctrl-0 = <&pins_nemc_cs6>; | ||
374 | |||
375 | reg = <6 0 1 /* addr */ | ||
376 | 6 2 1>; /* data */ | ||
377 | |||
378 | ingenic,nemc-tAS = <15>; | ||
379 | ingenic,nemc-tAH = <10>; | ||
380 | ingenic,nemc-tBP = <20>; | ||
381 | ingenic,nemc-tAW = <50>; | ||
382 | ingenic,nemc-tSTRV = <100>; | ||
383 | |||
384 | reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>; | ||
385 | vcc-supply = <ð0_power>; | ||
386 | |||
387 | interrupt-parent = <&gpe>; | ||
388 | interrupts = <19 4>; | ||
389 | |||
390 | nvmem-cells = <ð0_addr>; | ||
391 | nvmem-cell-names = "mac-address"; | ||
392 | }; | ||
393 | }; | ||
394 | |||
395 | &bch { | ||
396 | status = "okay"; | ||
397 | }; | ||
398 | |||
399 | &pinctrl { | ||
400 | pins_uart0: uart0 { | ||
401 | function = "uart0"; | ||
402 | groups = "uart0-data"; | ||
403 | bias-disable; | ||
404 | }; | ||
405 | |||
406 | pins_uart1: uart1 { | ||
407 | function = "uart1"; | ||
408 | groups = "uart1-data"; | ||
409 | bias-disable; | ||
410 | }; | ||
411 | |||
412 | pins_uart2: uart2 { | ||
413 | function = "uart2"; | ||
414 | groups = "uart2-data", "uart2-hwflow"; | ||
415 | bias-disable; | ||
416 | }; | ||
417 | |||
418 | pins_uart3: uart3 { | ||
419 | function = "uart3"; | ||
420 | groups = "uart3-data", "uart3-hwflow"; | ||
421 | bias-disable; | ||
422 | }; | ||
423 | |||
424 | pins_uart4: uart4 { | ||
425 | function = "uart4"; | ||
426 | groups = "uart4-data"; | ||
427 | bias-disable; | ||
428 | }; | ||
429 | |||
430 | pins_i2c0: i2c0 { | ||
431 | function = "i2c0"; | ||
432 | groups = "i2c0-data"; | ||
433 | bias-disable; | ||
434 | }; | ||
435 | |||
436 | pins_i2c1: i2c1 { | ||
437 | function = "i2c1"; | ||
438 | groups = "i2c1-data"; | ||
439 | bias-disable; | ||
440 | }; | ||
441 | |||
442 | pins_i2c2: i2c2 { | ||
443 | function = "i2c2"; | ||
444 | groups = "i2c2-data"; | ||
445 | bias-disable; | ||
446 | }; | ||
447 | |||
448 | pins_i2c3: i2c3 { | ||
449 | function = "i2c3"; | ||
450 | groups = "i2c3-data"; | ||
451 | bias-disable; | ||
452 | }; | ||
453 | |||
454 | pins_i2c4: i2c4 { | ||
455 | function = "i2c4"; | ||
456 | groups = "i2c4-data-e"; | ||
457 | bias-disable; | ||
458 | }; | ||
459 | |||
460 | pins_nemc: nemc { | ||
461 | function = "nemc"; | ||
462 | groups = "nemc-data", "nemc-cle-ale", "nemc-rd-we", "nemc-frd-fwe"; | ||
463 | bias-disable; | ||
464 | }; | ||
465 | |||
466 | pins_nemc_cs1: nemc-cs1 { | ||
467 | function = "nemc-cs1"; | ||
468 | groups = "nemc-cs1"; | ||
469 | bias-disable; | ||
470 | }; | ||
471 | |||
472 | pins_nemc_cs6: nemc-cs6 { | ||
473 | function = "nemc-cs6"; | ||
474 | groups = "nemc-cs6"; | ||
475 | bias-disable; | ||
476 | }; | ||
477 | |||
478 | pins_mmc0: mmc0 { | ||
479 | function = "mmc0"; | ||
480 | groups = "mmc0-1bit-e", "mmc0-4bit-e"; | ||
481 | bias-disable; | ||
482 | }; | ||
483 | |||
484 | pins_mmc1: mmc1 { | ||
485 | function = "mmc1"; | ||
486 | groups = "mmc1-1bit-d", "mmc1-4bit-d"; | ||
487 | bias-disable; | ||
488 | }; | ||
489 | }; | ||
490 | |||
491 | &tcu { | ||
492 | /* 3 MHz for the system timer and clocksource */ | ||
493 | assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>; | ||
494 | assigned-clock-rates = <3000000>, <3000000>; | ||
495 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/cu1000-neo.dts b/arch/mips/boot/dts/ingenic/cu1000-neo.dts new file mode 100644 index 000000000..22a1066d6 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/cu1000-neo.dts | |||
@@ -0,0 +1,168 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "x1000.dtsi" | ||
5 | #include <dt-bindings/gpio/gpio.h> | ||
6 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
7 | #include <dt-bindings/interrupt-controller/irq.h> | ||
8 | |||
9 | / { | ||
10 | compatible = "yna,cu1000-neo", "ingenic,x1000e"; | ||
11 | model = "YSH & ATIL General Board CU1000-Neo"; | ||
12 | |||
13 | aliases { | ||
14 | serial2 = &uart2; | ||
15 | }; | ||
16 | |||
17 | chosen { | ||
18 | stdout-path = "serial2:115200n8"; | ||
19 | }; | ||
20 | |||
21 | memory { | ||
22 | device_type = "memory"; | ||
23 | reg = <0x0 0x04000000>; | ||
24 | }; | ||
25 | |||
26 | leds { | ||
27 | compatible = "gpio-leds"; | ||
28 | led-0 { | ||
29 | gpios = <&gpb 21 GPIO_ACTIVE_HIGH>; | ||
30 | linux,default-trigger = "mmc0"; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | wlan_pwrseq: msc1-pwrseq { | ||
35 | compatible = "mmc-pwrseq-simple"; | ||
36 | |||
37 | reset-gpios = <&gpc 17 GPIO_ACTIVE_LOW>; | ||
38 | post-power-on-delay-ms = <200>; | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | &exclk { | ||
43 | clock-frequency = <24000000>; | ||
44 | }; | ||
45 | |||
46 | &tcu { | ||
47 | /* 1500 kHz for the system timer and clocksource */ | ||
48 | assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; | ||
49 | assigned-clock-rates = <1500000>, <1500000>; | ||
50 | |||
51 | /* Use channel #0 for the system timer channel #2 for the clocksource */ | ||
52 | ingenic,pwm-channels-mask = <0xfa>; | ||
53 | }; | ||
54 | |||
55 | &uart2 { | ||
56 | status = "okay"; | ||
57 | |||
58 | pinctrl-names = "default"; | ||
59 | pinctrl-0 = <&pins_uart2>; | ||
60 | }; | ||
61 | |||
62 | &i2c0 { | ||
63 | status = "okay"; | ||
64 | |||
65 | clock-frequency = <400000>; | ||
66 | |||
67 | pinctrl-names = "default"; | ||
68 | pinctrl-0 = <&pins_i2c0>; | ||
69 | |||
70 | ads7830: adc@48 { | ||
71 | compatible = "ti,ads7830"; | ||
72 | reg = <0x48>; | ||
73 | }; | ||
74 | }; | ||
75 | |||
76 | &msc0 { | ||
77 | status = "okay"; | ||
78 | |||
79 | bus-width = <8>; | ||
80 | max-frequency = <50000000>; | ||
81 | |||
82 | pinctrl-names = "default"; | ||
83 | pinctrl-0 = <&pins_msc0>; | ||
84 | |||
85 | non-removable; | ||
86 | }; | ||
87 | |||
88 | &msc1 { | ||
89 | status = "okay"; | ||
90 | |||
91 | #address-cells = <1>; | ||
92 | #size-cells = <0>; | ||
93 | bus-width = <4>; | ||
94 | max-frequency = <50000000>; | ||
95 | |||
96 | pinctrl-names = "default"; | ||
97 | pinctrl-0 = <&pins_msc1>; | ||
98 | |||
99 | non-removable; | ||
100 | |||
101 | mmc-pwrseq = <&wlan_pwrseq>; | ||
102 | |||
103 | ap6212a: wifi@1 { | ||
104 | compatible = "brcm,bcm4329-fmac"; | ||
105 | reg = <1>; | ||
106 | |||
107 | interrupt-parent = <&gpc>; | ||
108 | interrupts = <16 IRQ_TYPE_EDGE_FALLING>; | ||
109 | interrupt-names = "host-wake"; | ||
110 | |||
111 | brcm,drive-strength = <10>; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | &mac { | ||
116 | status = "okay"; | ||
117 | |||
118 | phy-mode = "rmii"; | ||
119 | phy-handle = <&lan8720a>; | ||
120 | |||
121 | pinctrl-names = "default"; | ||
122 | pinctrl-0 = <&pins_mac>; | ||
123 | |||
124 | snps,reset-gpio = <&gpc 23 GPIO_ACTIVE_LOW>; /* PC23 */ | ||
125 | snps,reset-active-low; | ||
126 | snps,reset-delays-us = <0 10000 30000>; | ||
127 | }; | ||
128 | |||
129 | &mdio { | ||
130 | status = "okay"; | ||
131 | |||
132 | lan8720a: ethernet-phy@0 { | ||
133 | compatible = "ethernet-phy-id0007.c0f0", "ethernet-phy-ieee802.3-c22"; | ||
134 | reg = <0>; | ||
135 | }; | ||
136 | }; | ||
137 | |||
138 | &pinctrl { | ||
139 | pins_uart2: uart2 { | ||
140 | function = "uart2"; | ||
141 | groups = "uart2-data-d"; | ||
142 | bias-pull-up; | ||
143 | }; | ||
144 | |||
145 | pins_i2c0: i2c0 { | ||
146 | function = "i2c0"; | ||
147 | groups = "i2c0-data"; | ||
148 | bias-pull-up; | ||
149 | }; | ||
150 | |||
151 | pins_msc0: msc0 { | ||
152 | function = "mmc0"; | ||
153 | groups = "mmc0-1bit", "mmc0-4bit", "mmc0-8bit"; | ||
154 | bias-disable; | ||
155 | }; | ||
156 | |||
157 | pins_msc1: msc1 { | ||
158 | function = "mmc1"; | ||
159 | groups = "mmc1-1bit", "mmc1-4bit"; | ||
160 | bias-disable; | ||
161 | }; | ||
162 | |||
163 | pins_mac: mac { | ||
164 | function = "mac"; | ||
165 | groups = "mac"; | ||
166 | bias-disable; | ||
167 | }; | ||
168 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/cu1830-neo.dts b/arch/mips/boot/dts/ingenic/cu1830-neo.dts new file mode 100644 index 000000000..640f96c00 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/cu1830-neo.dts | |||
@@ -0,0 +1,168 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "x1830.dtsi" | ||
5 | #include <dt-bindings/gpio/gpio.h> | ||
6 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
7 | #include <dt-bindings/interrupt-controller/irq.h> | ||
8 | |||
9 | / { | ||
10 | compatible = "yna,cu1830-neo", "ingenic,x1830"; | ||
11 | model = "YSH & ATIL General Board CU1830-Neo"; | ||
12 | |||
13 | aliases { | ||
14 | serial1 = &uart1; | ||
15 | }; | ||
16 | |||
17 | chosen { | ||
18 | stdout-path = "serial1:115200n8"; | ||
19 | }; | ||
20 | |||
21 | memory { | ||
22 | device_type = "memory"; | ||
23 | reg = <0x0 0x08000000>; | ||
24 | }; | ||
25 | |||
26 | leds { | ||
27 | compatible = "gpio-leds"; | ||
28 | led-0 { | ||
29 | gpios = <&gpc 17 GPIO_ACTIVE_HIGH>; | ||
30 | linux,default-trigger = "mmc0"; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | wlan_pwrseq: msc1-pwrseq { | ||
35 | compatible = "mmc-pwrseq-simple"; | ||
36 | |||
37 | reset-gpios = <&gpc 13 GPIO_ACTIVE_LOW>; | ||
38 | post-power-on-delay-ms = <200>; | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | &exclk { | ||
43 | clock-frequency = <24000000>; | ||
44 | }; | ||
45 | |||
46 | &tcu { | ||
47 | /* 1500 kHz for the system timer and clocksource */ | ||
48 | assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; | ||
49 | assigned-clock-rates = <1500000>, <1500000>; | ||
50 | |||
51 | /* Use channel #0 for the system timer channel #2 for the clocksource */ | ||
52 | ingenic,pwm-channels-mask = <0xfa>; | ||
53 | }; | ||
54 | |||
55 | &uart1 { | ||
56 | status = "okay"; | ||
57 | |||
58 | pinctrl-names = "default"; | ||
59 | pinctrl-0 = <&pins_uart1>; | ||
60 | }; | ||
61 | |||
62 | &i2c0 { | ||
63 | status = "okay"; | ||
64 | |||
65 | clock-frequency = <400000>; | ||
66 | |||
67 | pinctrl-names = "default"; | ||
68 | pinctrl-0 = <&pins_i2c0>; | ||
69 | |||
70 | ads7830: adc@48 { | ||
71 | compatible = "ti,ads7830"; | ||
72 | reg = <0x48>; | ||
73 | }; | ||
74 | }; | ||
75 | |||
76 | &msc0 { | ||
77 | status = "okay"; | ||
78 | |||
79 | bus-width = <4>; | ||
80 | max-frequency = <50000000>; | ||
81 | |||
82 | pinctrl-names = "default"; | ||
83 | pinctrl-0 = <&pins_msc0>; | ||
84 | |||
85 | non-removable; | ||
86 | }; | ||
87 | |||
88 | &msc1 { | ||
89 | status = "okay"; | ||
90 | |||
91 | #address-cells = <1>; | ||
92 | #size-cells = <0>; | ||
93 | bus-width = <4>; | ||
94 | max-frequency = <50000000>; | ||
95 | |||
96 | pinctrl-names = "default"; | ||
97 | pinctrl-0 = <&pins_msc1>; | ||
98 | |||
99 | non-removable; | ||
100 | |||
101 | mmc-pwrseq = <&wlan_pwrseq>; | ||
102 | |||
103 | ap6212a: wifi@1 { | ||
104 | compatible = "brcm,bcm4329-fmac"; | ||
105 | reg = <1>; | ||
106 | |||
107 | interrupt-parent = <&gpc>; | ||
108 | interrupts = <25 IRQ_TYPE_EDGE_FALLING>; | ||
109 | interrupt-names = "host-wake"; | ||
110 | |||
111 | brcm,drive-strength = <10>; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | &mac { | ||
116 | status = "okay"; | ||
117 | |||
118 | phy-mode = "rmii"; | ||
119 | phy-handle = <&ip101gr>; | ||
120 | |||
121 | pinctrl-names = "default"; | ||
122 | pinctrl-0 = <&pins_mac>; | ||
123 | |||
124 | snps,reset-gpio = <&gpb 28 GPIO_ACTIVE_LOW>; /* PB28 */ | ||
125 | snps,reset-active-low; | ||
126 | snps,reset-delays-us = <0 10000 30000>; | ||
127 | }; | ||
128 | |||
129 | &mdio { | ||
130 | status = "okay"; | ||
131 | |||
132 | ip101gr: ethernet-phy@0 { | ||
133 | compatible = "ethernet-phy-id0243.0c54", "ethernet-phy-ieee802.3-c22"; | ||
134 | reg = <0>; | ||
135 | }; | ||
136 | }; | ||
137 | |||
138 | &pinctrl { | ||
139 | pins_uart1: uart1 { | ||
140 | function = "uart1"; | ||
141 | groups = "uart1-data"; | ||
142 | bias-pull-up; | ||
143 | }; | ||
144 | |||
145 | pins_i2c0: i2c0 { | ||
146 | function = "i2c0"; | ||
147 | groups = "i2c0-data"; | ||
148 | bias-pull-up; | ||
149 | }; | ||
150 | |||
151 | pins_msc0: msc0 { | ||
152 | function = "mmc0"; | ||
153 | groups = "mmc0-1bit", "mmc0-4bit"; | ||
154 | bias-disable; | ||
155 | }; | ||
156 | |||
157 | pins_msc1: msc1 { | ||
158 | function = "mmc1"; | ||
159 | groups = "mmc1-1bit", "mmc1-4bit"; | ||
160 | bias-disable; | ||
161 | }; | ||
162 | |||
163 | pins_mac: mac { | ||
164 | function = "mac"; | ||
165 | groups = "mac"; | ||
166 | bias-disable; | ||
167 | }; | ||
168 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/gcw0.dts b/arch/mips/boot/dts/ingenic/gcw0.dts new file mode 100644 index 000000000..bc72304a2 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/gcw0.dts | |||
@@ -0,0 +1,547 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "jz4770.dtsi" | ||
5 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
6 | |||
7 | #include <dt-bindings/gpio/gpio.h> | ||
8 | #include <dt-bindings/iio/adc/ingenic,adc.h> | ||
9 | #include <dt-bindings/input/input.h> | ||
10 | |||
11 | / { | ||
12 | compatible = "gcw,zero", "ingenic,jz4770"; | ||
13 | model = "GCW Zero"; | ||
14 | |||
15 | aliases { | ||
16 | serial0 = &uart0; | ||
17 | serial1 = &uart1; | ||
18 | serial2 = &uart2; | ||
19 | serial3 = &uart3; | ||
20 | }; | ||
21 | |||
22 | memory: memory { | ||
23 | device_type = "memory"; | ||
24 | reg = <0x0 0x10000000>, | ||
25 | <0x30000000 0x10000000>; | ||
26 | }; | ||
27 | |||
28 | chosen { | ||
29 | stdout-path = "serial2:57600n8"; | ||
30 | }; | ||
31 | |||
32 | vcc: regulator@0 { | ||
33 | compatible = "regulator-fixed"; | ||
34 | regulator-name = "vcc"; | ||
35 | |||
36 | regulator-min-microvolt = <3300000>; | ||
37 | regulator-max-microvolt = <3300000>; | ||
38 | regulator-always-on; | ||
39 | }; | ||
40 | |||
41 | mmc1_power: regulator@1 { | ||
42 | compatible = "regulator-fixed"; | ||
43 | regulator-name = "mmc1_vcc"; | ||
44 | gpio = <&gpe 9 0>; | ||
45 | |||
46 | regulator-min-microvolt = <3300000>; | ||
47 | regulator-max-microvolt = <3300000>; | ||
48 | vin-supply = <&vcc>; | ||
49 | }; | ||
50 | |||
51 | headphones_amp: analog-amplifier@0 { | ||
52 | compatible = "simple-audio-amplifier"; | ||
53 | enable-gpios = <&gpf 3 GPIO_ACTIVE_LOW>; | ||
54 | enable-delay-ms = <50>; | ||
55 | |||
56 | VCC-supply = <&ldo5>; | ||
57 | sound-name-prefix = "Headphones Amp"; | ||
58 | }; | ||
59 | |||
60 | speaker_amp: analog-amplifier@1 { | ||
61 | compatible = "simple-audio-amplifier"; | ||
62 | enable-gpios = <&gpf 20 GPIO_ACTIVE_HIGH>; | ||
63 | |||
64 | VCC-supply = <&ldo5>; | ||
65 | sound-name-prefix = "Speaker Amp"; | ||
66 | }; | ||
67 | |||
68 | sound { | ||
69 | compatible = "simple-audio-card"; | ||
70 | |||
71 | simple-audio-card,name = "gcw0-audio"; | ||
72 | simple-audio-card,format = "i2s"; | ||
73 | |||
74 | simple-audio-card,widgets = | ||
75 | "Speaker", "Speaker", | ||
76 | "Headphone", "Headphones", | ||
77 | "Line", "FM Radio", | ||
78 | "Microphone", "Built-in Mic"; | ||
79 | simple-audio-card,routing = | ||
80 | "Headphones Amp INL", "LHPOUT", | ||
81 | "Headphones Amp INR", "RHPOUT", | ||
82 | "Headphones", "Headphones Amp OUTL", | ||
83 | "Headphones", "Headphones Amp OUTR", | ||
84 | "Speaker Amp INL", "LOUT", | ||
85 | "Speaker Amp INR", "ROUT", | ||
86 | "Speaker", "Speaker Amp OUTL", | ||
87 | "Speaker", "Speaker Amp OUTR", | ||
88 | "LLINEIN", "FM Radio", | ||
89 | "RLINEIN", "FM Radio", | ||
90 | "Built-in Mic", "MICBIAS", | ||
91 | "MIC1P", "Built-in Mic", | ||
92 | "MIC1N", "Built-in Mic"; | ||
93 | simple-audio-card,pin-switches = "Speaker", "Headphones"; | ||
94 | |||
95 | simple-audio-card,hp-det-gpio = <&gpf 21 GPIO_ACTIVE_LOW>; | ||
96 | simple-audio-card,aux-devs = <&speaker_amp>, <&headphones_amp>; | ||
97 | |||
98 | simple-audio-card,bitclock-master = <&dai_codec>; | ||
99 | simple-audio-card,frame-master = <&dai_codec>; | ||
100 | |||
101 | dai_cpu: simple-audio-card,cpu { | ||
102 | sound-dai = <&aic>; | ||
103 | }; | ||
104 | |||
105 | dai_codec: simple-audio-card,codec { | ||
106 | sound-dai = <&codec>; | ||
107 | }; | ||
108 | }; | ||
109 | |||
110 | rumble { | ||
111 | compatible = "pwm-vibrator"; | ||
112 | pwms = <&pwm 4 2000000 0>; | ||
113 | pwm-names = "enable"; | ||
114 | |||
115 | pinctrl-names = "default"; | ||
116 | pinctrl-0 = <&pins_pwm4>; | ||
117 | }; | ||
118 | |||
119 | backlight: backlight { | ||
120 | compatible = "pwm-backlight"; | ||
121 | pwms = <&pwm 1 40000 0>; | ||
122 | power-supply = <&vcc>; | ||
123 | |||
124 | brightness-levels = <0 16 32 48 64 80 96 112 128 | ||
125 | 144 160 176 192 208 224 240 255>; | ||
126 | default-brightness-level = <12>; | ||
127 | |||
128 | pinctrl-names = "default"; | ||
129 | pinctrl-0 = <&pins_pwm1>; | ||
130 | }; | ||
131 | |||
132 | gpio-keys { | ||
133 | compatible = "gpio-keys"; | ||
134 | #address-cells = <1>; | ||
135 | #size-cells = <0>; | ||
136 | |||
137 | autorepeat; | ||
138 | |||
139 | button@0 { | ||
140 | label = "D-pad up"; | ||
141 | linux,code = <KEY_UP>; | ||
142 | linux,can-disable; | ||
143 | gpios = <&gpe 21 GPIO_ACTIVE_LOW>; | ||
144 | }; | ||
145 | |||
146 | button@1 { | ||
147 | label = "D-pad down"; | ||
148 | linux,code = <KEY_DOWN>; | ||
149 | linux,can-disable; | ||
150 | gpios = <&gpe 25 GPIO_ACTIVE_LOW>; | ||
151 | }; | ||
152 | |||
153 | button@2 { | ||
154 | label = "D-pad left"; | ||
155 | linux,code = <KEY_LEFT>; | ||
156 | linux,can-disable; | ||
157 | gpios = <&gpe 23 GPIO_ACTIVE_LOW>; | ||
158 | }; | ||
159 | |||
160 | button@3 { | ||
161 | label = "D-pad right"; | ||
162 | linux,code = <KEY_RIGHT>; | ||
163 | linux,can-disable; | ||
164 | gpios = <&gpe 24 GPIO_ACTIVE_LOW>; | ||
165 | }; | ||
166 | |||
167 | button@4 { | ||
168 | label = "Button A"; | ||
169 | linux,code = <KEY_LEFTCTRL>; | ||
170 | linux,can-disable; | ||
171 | gpios = <&gpe 29 GPIO_ACTIVE_LOW>; | ||
172 | }; | ||
173 | |||
174 | button@5 { | ||
175 | label = "Button B"; | ||
176 | linux,code = <KEY_LEFTALT>; | ||
177 | linux,can-disable; | ||
178 | gpios = <&gpe 20 GPIO_ACTIVE_LOW>; | ||
179 | }; | ||
180 | |||
181 | button@6 { | ||
182 | label = "Button Y"; | ||
183 | linux,code = <KEY_SPACE>; | ||
184 | linux,can-disable; | ||
185 | gpios = <&gpe 27 GPIO_ACTIVE_LOW>; | ||
186 | }; | ||
187 | |||
188 | button@7 { | ||
189 | label = "Button X"; | ||
190 | linux,code = <KEY_LEFTSHIFT>; | ||
191 | linux,can-disable; | ||
192 | gpios = <&gpe 28 GPIO_ACTIVE_LOW>; | ||
193 | }; | ||
194 | |||
195 | button@8 { | ||
196 | label = "Left shoulder button"; | ||
197 | linux,code = <KEY_TAB>; | ||
198 | linux,can-disable; | ||
199 | gpios = <&gpb 20 GPIO_ACTIVE_LOW>; | ||
200 | }; | ||
201 | |||
202 | button@9 { | ||
203 | label = "Right shoulder button"; | ||
204 | linux,code = <KEY_BACKSPACE>; | ||
205 | linux,can-disable; | ||
206 | gpios = <&gpe 26 GPIO_ACTIVE_LOW>; | ||
207 | }; | ||
208 | |||
209 | button@10 { | ||
210 | label = "Start button"; | ||
211 | linux,code = <KEY_ENTER>; | ||
212 | linux,can-disable; | ||
213 | gpios = <&gpb 21 GPIO_ACTIVE_LOW>; | ||
214 | }; | ||
215 | |||
216 | button@11 { | ||
217 | label = "Select button"; | ||
218 | linux,code = <KEY_ESC>; | ||
219 | linux,can-disable; | ||
220 | /* | ||
221 | * This is the only button that is active high, | ||
222 | * since it doubles as BOOT_SEL1. | ||
223 | */ | ||
224 | gpios = <&gpd 18 GPIO_ACTIVE_HIGH>; | ||
225 | }; | ||
226 | |||
227 | button@12 { | ||
228 | label = "Power slider"; | ||
229 | linux,code = <KEY_POWER>; | ||
230 | linux,can-disable; | ||
231 | gpios = <&gpa 30 GPIO_ACTIVE_LOW>; | ||
232 | wakeup-source; | ||
233 | }; | ||
234 | |||
235 | button@13 { | ||
236 | label = "Power hold"; | ||
237 | linux,code = <KEY_PAUSE>; | ||
238 | linux,can-disable; | ||
239 | gpios = <&gpf 11 GPIO_ACTIVE_LOW>; | ||
240 | }; | ||
241 | }; | ||
242 | |||
243 | i2c3: i2c-controller@3 { | ||
244 | compatible = "i2c-gpio"; | ||
245 | #address-cells = <1>; | ||
246 | #size-cells = <0>; | ||
247 | |||
248 | sda-gpios = <&gpd 5 GPIO_ACTIVE_HIGH>; | ||
249 | scl-gpios = <&gpd 4 GPIO_ACTIVE_HIGH>; | ||
250 | i2c-gpio,delay-us = <2>; /* 250 kHz */ | ||
251 | |||
252 | act8600: pmic@5a { | ||
253 | compatible = "active-semi,act8600"; | ||
254 | reg = <0x5a>; | ||
255 | |||
256 | regulators { | ||
257 | /* USB OTG */ | ||
258 | otg_vbus: SUDCDC_REG4 { | ||
259 | /* | ||
260 | * 5.3V instead of 5.0V to compensate | ||
261 | * for the voltage drop of a diode | ||
262 | * between the regulator and the | ||
263 | * connector. | ||
264 | */ | ||
265 | regulator-min-microvolt = <5300000>; | ||
266 | regulator-max-microvolt = <5300000>; | ||
267 | inl-supply = <&vcc>; | ||
268 | }; | ||
269 | |||
270 | /* | ||
271 | * When this is off, there is no sound, but also | ||
272 | * no USB networking. | ||
273 | */ | ||
274 | ldo5: LDO5 { | ||
275 | regulator-min-microvolt = <2500000>; | ||
276 | regulator-max-microvolt = <2500000>; | ||
277 | inl-supply = <&vcc>; | ||
278 | }; | ||
279 | |||
280 | /* LCD panel and FM radio */ | ||
281 | ldo6: LDO6 { | ||
282 | regulator-min-microvolt = <3300000>; | ||
283 | regulator-max-microvolt = <3300000>; | ||
284 | inl-supply = <&vcc>; | ||
285 | }; | ||
286 | |||
287 | /* ??? */ | ||
288 | LDO7 { | ||
289 | regulator-min-microvolt = <3300000>; | ||
290 | regulator-max-microvolt = <3300000>; | ||
291 | /*regulator-always-on;*/ | ||
292 | inl-supply = <&vcc>; | ||
293 | }; | ||
294 | |||
295 | /* | ||
296 | * The colors on the LCD are wrong when this is | ||
297 | * off. Which is strange, since the LCD panel | ||
298 | * data sheet only mentions a 3.3V input. | ||
299 | */ | ||
300 | LDO8 { | ||
301 | regulator-min-microvolt = <1800000>; | ||
302 | regulator-max-microvolt = <1800000>; | ||
303 | regulator-always-on; | ||
304 | inl-supply = <&vcc>; | ||
305 | }; | ||
306 | |||
307 | /* RTC fixed 3.3V */ | ||
308 | LDO_REG9 { | ||
309 | regulator-min-microvolt = <3300000>; | ||
310 | regulator-max-microvolt = <3300000>; | ||
311 | regulator-always-on; | ||
312 | inl-supply = <&vcc>; | ||
313 | }; | ||
314 | |||
315 | /* Unused fixed 1.2V */ | ||
316 | LDO_REG10 { | ||
317 | inl-supply = <&vcc>; | ||
318 | }; | ||
319 | }; | ||
320 | }; | ||
321 | }; | ||
322 | |||
323 | leds { | ||
324 | compatible = "gpio-leds"; | ||
325 | |||
326 | led { | ||
327 | gpios = <&gpb 30 GPIO_ACTIVE_LOW>; | ||
328 | default-state = "on"; | ||
329 | }; | ||
330 | }; | ||
331 | |||
332 | spi { | ||
333 | compatible = "spi-gpio"; | ||
334 | #address-cells = <1>; | ||
335 | #size-cells = <0>; | ||
336 | |||
337 | sck-gpios = <&gpe 15 GPIO_ACTIVE_HIGH>; | ||
338 | mosi-gpios = <&gpe 17 GPIO_ACTIVE_HIGH>; | ||
339 | cs-gpios = <&gpe 16 GPIO_ACTIVE_HIGH>; | ||
340 | num-chipselects = <1>; | ||
341 | |||
342 | nt39016@0 { | ||
343 | compatible = "kingdisplay,kd035g6-54nt"; | ||
344 | reg = <0>; | ||
345 | |||
346 | spi-max-frequency = <3125000>; | ||
347 | spi-3wire; | ||
348 | spi-cs-high; | ||
349 | |||
350 | reset-gpios = <&gpe 2 GPIO_ACTIVE_LOW>; | ||
351 | |||
352 | backlight = <&backlight>; | ||
353 | power-supply = <&ldo6>; | ||
354 | |||
355 | port { | ||
356 | panel_input: endpoint { | ||
357 | remote-endpoint = <&panel_output>; | ||
358 | }; | ||
359 | }; | ||
360 | }; | ||
361 | }; | ||
362 | |||
363 | connector { | ||
364 | compatible = "gpio-usb-b-connector", "usb-b-connector"; | ||
365 | label = "mini-USB"; | ||
366 | type = "mini"; | ||
367 | |||
368 | /* | ||
369 | * USB OTG is not yet working reliably, the ID detection | ||
370 | * mechanism tends to fry easily for unknown reasons. | ||
371 | * Until this is fixed, disable OTG by not providing the | ||
372 | * ID GPIO to the driver. | ||
373 | */ | ||
374 | //id-gpios = <&gpf 18 GPIO_ACTIVE_LOW>; | ||
375 | |||
376 | vbus-gpios = <&gpb 5 GPIO_ACTIVE_HIGH>; | ||
377 | vbus-supply = <&otg_vbus>; | ||
378 | |||
379 | pinctrl-names = "default"; | ||
380 | pinctrl-0 = <&pins_otg>; | ||
381 | |||
382 | port { | ||
383 | usb_ep: endpoint { | ||
384 | remote-endpoint = <&usb_otg_ep>; | ||
385 | }; | ||
386 | }; | ||
387 | }; | ||
388 | }; | ||
389 | |||
390 | &ext { | ||
391 | clock-frequency = <12000000>; | ||
392 | }; | ||
393 | |||
394 | &pinctrl { | ||
395 | pins_lcd: lcd { | ||
396 | function = "lcd"; | ||
397 | groups = "lcd-24bit"; | ||
398 | }; | ||
399 | |||
400 | pins_uart2: uart2 { | ||
401 | function = "uart2"; | ||
402 | groups = "uart2-data"; | ||
403 | }; | ||
404 | |||
405 | pins_mmc0: mmc0 { | ||
406 | function = "mmc0"; | ||
407 | groups = "mmc0-1bit-a", "mmc0-4bit-a"; | ||
408 | }; | ||
409 | |||
410 | pins_mmc1: mmc1 { | ||
411 | function = "mmc1"; | ||
412 | groups = "mmc1-1bit-d", "mmc1-4bit-d"; | ||
413 | }; | ||
414 | |||
415 | pins_otg: otg { | ||
416 | otg-vbus-pin { | ||
417 | function = "otg"; | ||
418 | groups = "otg-vbus"; | ||
419 | }; | ||
420 | |||
421 | vbus-pin { | ||
422 | pins = "PB5"; | ||
423 | bias-disable; | ||
424 | }; | ||
425 | }; | ||
426 | |||
427 | pins_pwm1: pwm1 { | ||
428 | function = "pwm1"; | ||
429 | groups = "pwm1"; | ||
430 | }; | ||
431 | |||
432 | pins_pwm4: pwm4 { | ||
433 | function = "pwm4"; | ||
434 | groups = "pwm4"; | ||
435 | }; | ||
436 | }; | ||
437 | |||
438 | &uart2 { | ||
439 | pinctrl-names = "default"; | ||
440 | pinctrl-0 = <&pins_uart2>; | ||
441 | |||
442 | status = "okay"; | ||
443 | }; | ||
444 | |||
445 | &cgu { | ||
446 | /* | ||
447 | * Put high-speed peripherals under PLL1, such that we can change the | ||
448 | * PLL0 frequency on demand without having to suspend peripherals. | ||
449 | * We use a rate of 432 MHz, which is the least common multiple of | ||
450 | * 27 MHz (required by TV encoder) and 48 MHz (required by USB host). | ||
451 | * Put the GPU under PLL0 since we want a higher frequency. | ||
452 | * Use the 32 kHz oscillator as the parent of the RTC for a higher | ||
453 | * precision. | ||
454 | */ | ||
455 | assigned-clocks = | ||
456 | <&cgu JZ4770_CLK_PLL1>, | ||
457 | <&cgu JZ4770_CLK_GPU>, | ||
458 | <&cgu JZ4770_CLK_RTC>, | ||
459 | <&cgu JZ4770_CLK_UHC>, | ||
460 | <&cgu JZ4770_CLK_LPCLK_MUX>, | ||
461 | <&cgu JZ4770_CLK_MMC0_MUX>, | ||
462 | <&cgu JZ4770_CLK_MMC1_MUX>; | ||
463 | assigned-clock-parents = | ||
464 | <0>, | ||
465 | <&cgu JZ4770_CLK_PLL0>, | ||
466 | <&cgu JZ4770_CLK_OSC32K>, | ||
467 | <&cgu JZ4770_CLK_PLL1>, | ||
468 | <&cgu JZ4770_CLK_PLL1>, | ||
469 | <&cgu JZ4770_CLK_PLL1>, | ||
470 | <&cgu JZ4770_CLK_PLL1>; | ||
471 | assigned-clock-rates = | ||
472 | <432000000>, | ||
473 | <600000000>; | ||
474 | }; | ||
475 | |||
476 | &uhc { | ||
477 | /* The WiFi module is connected to the UHC. */ | ||
478 | status = "okay"; | ||
479 | }; | ||
480 | |||
481 | &tcu { | ||
482 | /* | ||
483 | * 750 kHz for the system timer and clocksource, 12 MHz for the OST, | ||
484 | * and use RTC as the parent for the watchdog clock | ||
485 | */ | ||
486 | assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>, | ||
487 | <&tcu TCU_CLK_OST>, <&tcu TCU_CLK_WDT>; | ||
488 | assigned-clock-parents = <0>, <0>, <0>, <&cgu JZ4770_CLK_RTC>; | ||
489 | assigned-clock-rates = <750000>, <750000>, <12000000>; | ||
490 | |||
491 | /* PWM1 is in use, so use channel #2 for the clocksource */ | ||
492 | ingenic,pwm-channels-mask = <0xfa>; | ||
493 | }; | ||
494 | |||
495 | &usb_otg { | ||
496 | port { | ||
497 | usb_otg_ep: endpoint { | ||
498 | remote-endpoint = <&usb_ep>; | ||
499 | }; | ||
500 | }; | ||
501 | }; | ||
502 | |||
503 | &otg_phy { | ||
504 | vcc-supply = <&ldo5>; | ||
505 | }; | ||
506 | |||
507 | &rtc { | ||
508 | clocks = <&cgu JZ4770_CLK_RTC>; | ||
509 | clock-names = "rtc"; | ||
510 | |||
511 | system-power-controller; | ||
512 | }; | ||
513 | |||
514 | &mmc0 { | ||
515 | status = "okay"; | ||
516 | |||
517 | bus-width = <4>; | ||
518 | max-frequency = <48000000>; | ||
519 | vmmc-supply = <&vcc>; | ||
520 | non-removable; | ||
521 | |||
522 | pinctrl-names = "default"; | ||
523 | pinctrl-0 = <&pins_mmc0>; | ||
524 | }; | ||
525 | |||
526 | &mmc1 { | ||
527 | status = "okay"; | ||
528 | |||
529 | bus-width = <4>; | ||
530 | max-frequency = <48000000>; | ||
531 | cd-gpios = <&gpb 2 GPIO_ACTIVE_LOW>; | ||
532 | vmmc-supply = <&mmc1_power>; | ||
533 | |||
534 | pinctrl-names = "default"; | ||
535 | pinctrl-0 = <&pins_mmc1>; | ||
536 | }; | ||
537 | |||
538 | &lcd { | ||
539 | pinctrl-names = "default"; | ||
540 | pinctrl-0 = <&pins_lcd>; | ||
541 | |||
542 | port { | ||
543 | panel_output: endpoint { | ||
544 | remote-endpoint = <&panel_input>; | ||
545 | }; | ||
546 | }; | ||
547 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/gcw0_proto.dts b/arch/mips/boot/dts/ingenic/gcw0_proto.dts new file mode 100644 index 000000000..02df22f8a --- /dev/null +++ b/arch/mips/boot/dts/ingenic/gcw0_proto.dts | |||
@@ -0,0 +1,13 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "gcw0.dts" | ||
5 | |||
6 | / { | ||
7 | model = "GCW Zero Prototype"; | ||
8 | }; | ||
9 | |||
10 | &memory { | ||
11 | /* Prototype has only 256 MiB of RAM */ | ||
12 | reg = <0x0 0x10000000>; | ||
13 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/jz4725b.dtsi b/arch/mips/boot/dts/ingenic/jz4725b.dtsi new file mode 100644 index 000000000..a1f0b71c9 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/jz4725b.dtsi | |||
@@ -0,0 +1,378 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/jz4725b-cgu.h> | ||
3 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
4 | |||
5 | / { | ||
6 | #address-cells = <1>; | ||
7 | #size-cells = <1>; | ||
8 | compatible = "ingenic,jz4725b"; | ||
9 | |||
10 | cpus { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <0>; | ||
13 | |||
14 | cpu0: cpu@0 { | ||
15 | device_type = "cpu"; | ||
16 | compatible = "ingenic,xburst-mxu1.0"; | ||
17 | reg = <0>; | ||
18 | |||
19 | clocks = <&cgu JZ4725B_CLK_CCLK>; | ||
20 | clock-names = "cpu"; | ||
21 | }; | ||
22 | }; | ||
23 | |||
24 | cpuintc: interrupt-controller { | ||
25 | #address-cells = <0>; | ||
26 | #interrupt-cells = <1>; | ||
27 | interrupt-controller; | ||
28 | compatible = "mti,cpu-interrupt-controller"; | ||
29 | }; | ||
30 | |||
31 | intc: interrupt-controller@10001000 { | ||
32 | compatible = "ingenic,jz4725b-intc", "ingenic,jz4740-intc"; | ||
33 | reg = <0x10001000 0x14>; | ||
34 | |||
35 | interrupt-controller; | ||
36 | #interrupt-cells = <1>; | ||
37 | |||
38 | interrupt-parent = <&cpuintc>; | ||
39 | interrupts = <2>; | ||
40 | }; | ||
41 | |||
42 | ext: ext { | ||
43 | compatible = "fixed-clock"; | ||
44 | #clock-cells = <0>; | ||
45 | }; | ||
46 | |||
47 | osc32k: osc32k { | ||
48 | compatible = "fixed-clock"; | ||
49 | #clock-cells = <0>; | ||
50 | clock-frequency = <32768>; | ||
51 | }; | ||
52 | |||
53 | cgu: clock-controller@10000000 { | ||
54 | compatible = "ingenic,jz4725b-cgu"; | ||
55 | reg = <0x10000000 0x100>; | ||
56 | |||
57 | clocks = <&ext>, <&osc32k>; | ||
58 | clock-names = "ext", "osc32k"; | ||
59 | |||
60 | #clock-cells = <1>; | ||
61 | }; | ||
62 | |||
63 | tcu: timer@10002000 { | ||
64 | compatible = "ingenic,jz4725b-tcu", "simple-mfd"; | ||
65 | reg = <0x10002000 0x1000>; | ||
66 | #address-cells = <1>; | ||
67 | #size-cells = <1>; | ||
68 | ranges = <0x0 0x10002000 0x1000>; | ||
69 | |||
70 | #clock-cells = <1>; | ||
71 | |||
72 | clocks = <&cgu JZ4725B_CLK_RTC>, | ||
73 | <&cgu JZ4725B_CLK_EXT>, | ||
74 | <&cgu JZ4725B_CLK_PCLK>, | ||
75 | <&cgu JZ4725B_CLK_TCU>; | ||
76 | clock-names = "rtc", "ext", "pclk", "tcu"; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&intc>; | ||
82 | interrupts = <23>, <22>, <21>; | ||
83 | |||
84 | watchdog: watchdog@0 { | ||
85 | compatible = "ingenic,jz4725b-watchdog", "ingenic,jz4740-watchdog"; | ||
86 | reg = <0x0 0xc>; | ||
87 | |||
88 | clocks = <&tcu TCU_CLK_WDT>; | ||
89 | clock-names = "wdt"; | ||
90 | }; | ||
91 | |||
92 | pwm: pwm@60 { | ||
93 | compatible = "ingenic,jz4725b-pwm"; | ||
94 | reg = <0x60 0x40>; | ||
95 | |||
96 | #pwm-cells = <3>; | ||
97 | |||
98 | clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, | ||
99 | <&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>, | ||
100 | <&tcu TCU_CLK_TIMER4>, <&tcu TCU_CLK_TIMER5>; | ||
101 | clock-names = "timer0", "timer1", "timer2", | ||
102 | "timer3", "timer4", "timer5"; | ||
103 | }; | ||
104 | |||
105 | ost: timer@e0 { | ||
106 | compatible = "ingenic,jz4725b-ost"; | ||
107 | reg = <0xe0 0x20>; | ||
108 | |||
109 | clocks = <&tcu TCU_CLK_OST>; | ||
110 | clock-names = "ost"; | ||
111 | |||
112 | interrupts = <15>; | ||
113 | }; | ||
114 | }; | ||
115 | |||
116 | rtc_dev: rtc@10003000 { | ||
117 | compatible = "ingenic,jz4725b-rtc", "ingenic,jz4740-rtc"; | ||
118 | reg = <0x10003000 0x40>; | ||
119 | |||
120 | interrupt-parent = <&intc>; | ||
121 | interrupts = <6>; | ||
122 | |||
123 | clocks = <&cgu JZ4725B_CLK_RTC>; | ||
124 | clock-names = "rtc"; | ||
125 | }; | ||
126 | |||
127 | pinctrl: pinctrl@10010000 { | ||
128 | compatible = "ingenic,jz4725b-pinctrl"; | ||
129 | reg = <0x10010000 0x400>; | ||
130 | |||
131 | #address-cells = <1>; | ||
132 | #size-cells = <0>; | ||
133 | |||
134 | gpa: gpio@0 { | ||
135 | compatible = "ingenic,jz4725b-gpio"; | ||
136 | reg = <0>; | ||
137 | |||
138 | gpio-controller; | ||
139 | gpio-ranges = <&pinctrl 0 0 32>; | ||
140 | #gpio-cells = <2>; | ||
141 | |||
142 | interrupt-controller; | ||
143 | #interrupt-cells = <2>; | ||
144 | |||
145 | interrupt-parent = <&intc>; | ||
146 | interrupts = <16>; | ||
147 | }; | ||
148 | |||
149 | gpb: gpio@1 { | ||
150 | compatible = "ingenic,jz4725b-gpio"; | ||
151 | reg = <1>; | ||
152 | |||
153 | gpio-controller; | ||
154 | gpio-ranges = <&pinctrl 0 32 32>; | ||
155 | #gpio-cells = <2>; | ||
156 | |||
157 | interrupt-controller; | ||
158 | #interrupt-cells = <2>; | ||
159 | |||
160 | interrupt-parent = <&intc>; | ||
161 | interrupts = <15>; | ||
162 | }; | ||
163 | |||
164 | gpc: gpio@2 { | ||
165 | compatible = "ingenic,jz4725b-gpio"; | ||
166 | reg = <2>; | ||
167 | |||
168 | gpio-controller; | ||
169 | gpio-ranges = <&pinctrl 0 64 32>; | ||
170 | #gpio-cells = <2>; | ||
171 | |||
172 | interrupt-controller; | ||
173 | #interrupt-cells = <2>; | ||
174 | |||
175 | interrupt-parent = <&intc>; | ||
176 | interrupts = <14>; | ||
177 | }; | ||
178 | |||
179 | gpd: gpio@3 { | ||
180 | compatible = "ingenic,jz4725b-gpio"; | ||
181 | reg = <3>; | ||
182 | |||
183 | gpio-controller; | ||
184 | gpio-ranges = <&pinctrl 0 96 32>; | ||
185 | #gpio-cells = <2>; | ||
186 | |||
187 | interrupt-controller; | ||
188 | #interrupt-cells = <2>; | ||
189 | |||
190 | interrupt-parent = <&intc>; | ||
191 | interrupts = <13>; | ||
192 | }; | ||
193 | }; | ||
194 | |||
195 | aic: audio-controller@10020000 { | ||
196 | compatible = "ingenic,jz4725b-i2s", "ingenic,jz4740-i2s"; | ||
197 | reg = <0x10020000 0x38>; | ||
198 | |||
199 | #sound-dai-cells = <0>; | ||
200 | |||
201 | clocks = <&cgu JZ4725B_CLK_AIC>, | ||
202 | <&cgu JZ4725B_CLK_I2S>, | ||
203 | <&cgu JZ4725B_CLK_EXT>, | ||
204 | <&cgu JZ4725B_CLK_PLL_HALF>; | ||
205 | clock-names = "aic", "i2s", "ext", "pll half"; | ||
206 | |||
207 | interrupt-parent = <&intc>; | ||
208 | interrupts = <10>; | ||
209 | |||
210 | dmas = <&dmac 25 0xffffffff>, <&dmac 24 0xffffffff>; | ||
211 | dma-names = "rx", "tx"; | ||
212 | }; | ||
213 | |||
214 | codec: audio-codec@100200a4 { | ||
215 | compatible = "ingenic,jz4725b-codec"; | ||
216 | reg = <0x100200a4 0x8>; | ||
217 | |||
218 | #sound-dai-cells = <0>; | ||
219 | |||
220 | clocks = <&cgu JZ4725B_CLK_AIC>; | ||
221 | clock-names = "aic"; | ||
222 | }; | ||
223 | |||
224 | mmc0: mmc@10021000 { | ||
225 | compatible = "ingenic,jz4725b-mmc"; | ||
226 | reg = <0x10021000 0x1000>; | ||
227 | |||
228 | clocks = <&cgu JZ4725B_CLK_MMC0>; | ||
229 | clock-names = "mmc"; | ||
230 | |||
231 | interrupt-parent = <&intc>; | ||
232 | interrupts = <25>; | ||
233 | |||
234 | dmas = <&dmac 27 0xffffffff>, <&dmac 26 0xffffffff>; | ||
235 | dma-names = "rx", "tx"; | ||
236 | |||
237 | cap-sd-highspeed; | ||
238 | cap-mmc-highspeed; | ||
239 | cap-sdio-irq; | ||
240 | }; | ||
241 | |||
242 | mmc1: mmc@10022000 { | ||
243 | compatible = "ingenic,jz4725b-mmc"; | ||
244 | reg = <0x10022000 0x1000>; | ||
245 | |||
246 | clocks = <&cgu JZ4725B_CLK_MMC1>; | ||
247 | clock-names = "mmc"; | ||
248 | |||
249 | interrupt-parent = <&intc>; | ||
250 | interrupts = <24>; | ||
251 | |||
252 | dmas = <&dmac 31 0xffffffff>, <&dmac 30 0xffffffff>; | ||
253 | dma-names = "rx", "tx"; | ||
254 | |||
255 | cap-sd-highspeed; | ||
256 | cap-mmc-highspeed; | ||
257 | cap-sdio-irq; | ||
258 | }; | ||
259 | |||
260 | uart: serial@10030000 { | ||
261 | compatible = "ingenic,jz4725b-uart", "ingenic,jz4740-uart"; | ||
262 | reg = <0x10030000 0x100>; | ||
263 | |||
264 | interrupt-parent = <&intc>; | ||
265 | interrupts = <9>; | ||
266 | |||
267 | clocks = <&ext>, <&cgu JZ4725B_CLK_UART>; | ||
268 | clock-names = "baud", "module"; | ||
269 | }; | ||
270 | |||
271 | adc: adc@10070000 { | ||
272 | compatible = "ingenic,jz4725b-adc"; | ||
273 | #io-channel-cells = <1>; | ||
274 | |||
275 | reg = <0x10070000 0x30>; | ||
276 | #address-cells = <1>; | ||
277 | #size-cells = <1>; | ||
278 | ranges = <0x0 0x10070000 0x30>; | ||
279 | |||
280 | clocks = <&cgu JZ4725B_CLK_ADC>; | ||
281 | clock-names = "adc"; | ||
282 | |||
283 | interrupt-parent = <&intc>; | ||
284 | interrupts = <18>; | ||
285 | }; | ||
286 | |||
287 | nemc: memory-controller@13010000 { | ||
288 | compatible = "ingenic,jz4725b-nemc", "ingenic,jz4740-nemc"; | ||
289 | reg = <0x13010000 0x10000>; | ||
290 | #address-cells = <2>; | ||
291 | #size-cells = <1>; | ||
292 | ranges = <1 0 0x18000000 0x4000000>, <2 0 0x14000000 0x4000000>, | ||
293 | <3 0 0x0c000000 0x4000000>, <4 0 0x08000000 0x4000000>; | ||
294 | |||
295 | clocks = <&cgu JZ4725B_CLK_MCLK>; | ||
296 | }; | ||
297 | |||
298 | dmac: dma-controller@13020000 { | ||
299 | compatible = "ingenic,jz4725b-dma"; | ||
300 | reg = <0x13020000 0xd8>, <0x13020300 0x14>; | ||
301 | |||
302 | #dma-cells = <2>; | ||
303 | |||
304 | interrupt-parent = <&intc>; | ||
305 | interrupts = <29>; | ||
306 | |||
307 | clocks = <&cgu JZ4725B_CLK_DMA>; | ||
308 | }; | ||
309 | |||
310 | udc: usb@13040000 { | ||
311 | compatible = "ingenic,jz4725b-musb", "ingenic,jz4740-musb"; | ||
312 | reg = <0x13040000 0x10000>; | ||
313 | |||
314 | interrupt-parent = <&intc>; | ||
315 | interrupts = <27>; | ||
316 | interrupt-names = "mc"; | ||
317 | |||
318 | clocks = <&cgu JZ4725B_CLK_UDC>; | ||
319 | clock-names = "udc"; | ||
320 | }; | ||
321 | |||
322 | lcd: lcd-controller@13050000 { | ||
323 | compatible = "ingenic,jz4725b-lcd"; | ||
324 | reg = <0x13050000 0x1000>; | ||
325 | |||
326 | interrupt-parent = <&intc>; | ||
327 | interrupts = <31>; | ||
328 | |||
329 | clocks = <&cgu JZ4725B_CLK_LCD>; | ||
330 | clock-names = "lcd_pclk"; | ||
331 | |||
332 | lcd_ports: ports { | ||
333 | #address-cells = <1>; | ||
334 | #size-cells = <0>; | ||
335 | |||
336 | port@8 { | ||
337 | reg = <8>; | ||
338 | |||
339 | ipu_output: endpoint { | ||
340 | remote-endpoint = <&ipu_input>; | ||
341 | }; | ||
342 | }; | ||
343 | }; | ||
344 | }; | ||
345 | |||
346 | ipu: ipu@13080000 { | ||
347 | compatible = "ingenic,jz4725b-ipu"; | ||
348 | reg = <0x13080000 0x64>; | ||
349 | |||
350 | interrupt-parent = <&intc>; | ||
351 | interrupts = <30>; | ||
352 | |||
353 | clocks = <&cgu JZ4725B_CLK_IPU>; | ||
354 | clock-names = "ipu"; | ||
355 | |||
356 | port { | ||
357 | ipu_input: endpoint { | ||
358 | remote-endpoint = <&ipu_output>; | ||
359 | }; | ||
360 | }; | ||
361 | }; | ||
362 | |||
363 | bch: ecc-controller@130d0000 { | ||
364 | compatible = "ingenic,jz4725b-bch"; | ||
365 | reg = <0x130d0000 0x44>; | ||
366 | |||
367 | clocks = <&cgu JZ4725B_CLK_BCH>; | ||
368 | }; | ||
369 | |||
370 | rom: memory@1fc00000 { | ||
371 | compatible = "mtd-rom"; | ||
372 | probe-type = "map_rom"; | ||
373 | reg = <0x1fc00000 0x2000>; | ||
374 | |||
375 | bank-width = <4>; | ||
376 | device-width = <1>; | ||
377 | }; | ||
378 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/jz4740.dtsi b/arch/mips/boot/dts/ingenic/jz4740.dtsi new file mode 100644 index 000000000..eee523678 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/jz4740.dtsi | |||
@@ -0,0 +1,334 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/jz4740-cgu.h> | ||
3 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
4 | |||
5 | / { | ||
6 | #address-cells = <1>; | ||
7 | #size-cells = <1>; | ||
8 | compatible = "ingenic,jz4740"; | ||
9 | |||
10 | cpus { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <0>; | ||
13 | |||
14 | cpu0: cpu@0 { | ||
15 | device_type = "cpu"; | ||
16 | compatible = "ingenic,xburst-mxu1.0"; | ||
17 | reg = <0>; | ||
18 | |||
19 | clocks = <&cgu JZ4740_CLK_CCLK>; | ||
20 | clock-names = "cpu"; | ||
21 | }; | ||
22 | }; | ||
23 | |||
24 | cpuintc: interrupt-controller { | ||
25 | #address-cells = <0>; | ||
26 | #interrupt-cells = <1>; | ||
27 | interrupt-controller; | ||
28 | compatible = "mti,cpu-interrupt-controller"; | ||
29 | }; | ||
30 | |||
31 | intc: interrupt-controller@10001000 { | ||
32 | compatible = "ingenic,jz4740-intc"; | ||
33 | reg = <0x10001000 0x14>; | ||
34 | |||
35 | interrupt-controller; | ||
36 | #interrupt-cells = <1>; | ||
37 | |||
38 | interrupt-parent = <&cpuintc>; | ||
39 | interrupts = <2>; | ||
40 | }; | ||
41 | |||
42 | ext: ext { | ||
43 | compatible = "fixed-clock"; | ||
44 | #clock-cells = <0>; | ||
45 | }; | ||
46 | |||
47 | rtc: rtc { | ||
48 | compatible = "fixed-clock"; | ||
49 | #clock-cells = <0>; | ||
50 | clock-frequency = <32768>; | ||
51 | }; | ||
52 | |||
53 | cgu: jz4740-cgu@10000000 { | ||
54 | compatible = "ingenic,jz4740-cgu"; | ||
55 | reg = <0x10000000 0x100>; | ||
56 | |||
57 | clocks = <&ext>, <&rtc>; | ||
58 | clock-names = "ext", "rtc"; | ||
59 | |||
60 | #clock-cells = <1>; | ||
61 | }; | ||
62 | |||
63 | tcu: timer@10002000 { | ||
64 | compatible = "ingenic,jz4740-tcu", "simple-mfd"; | ||
65 | reg = <0x10002000 0x1000>; | ||
66 | #address-cells = <1>; | ||
67 | #size-cells = <1>; | ||
68 | ranges = <0x0 0x10002000 0x1000>; | ||
69 | |||
70 | #clock-cells = <1>; | ||
71 | |||
72 | clocks = <&cgu JZ4740_CLK_RTC>, | ||
73 | <&cgu JZ4740_CLK_EXT>, | ||
74 | <&cgu JZ4740_CLK_PCLK>, | ||
75 | <&cgu JZ4740_CLK_TCU>; | ||
76 | clock-names = "rtc", "ext", "pclk", "tcu"; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&intc>; | ||
82 | interrupts = <23 22 21>; | ||
83 | |||
84 | watchdog: watchdog@0 { | ||
85 | compatible = "ingenic,jz4740-watchdog"; | ||
86 | reg = <0x0 0xc>; | ||
87 | |||
88 | clocks = <&tcu TCU_CLK_WDT>; | ||
89 | clock-names = "wdt"; | ||
90 | }; | ||
91 | |||
92 | pwm: pwm@40 { | ||
93 | compatible = "ingenic,jz4740-pwm"; | ||
94 | reg = <0x40 0x80>; | ||
95 | |||
96 | #pwm-cells = <3>; | ||
97 | |||
98 | clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, | ||
99 | <&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>, | ||
100 | <&tcu TCU_CLK_TIMER4>, <&tcu TCU_CLK_TIMER5>, | ||
101 | <&tcu TCU_CLK_TIMER6>, <&tcu TCU_CLK_TIMER7>; | ||
102 | clock-names = "timer0", "timer1", "timer2", "timer3", | ||
103 | "timer4", "timer5", "timer6", "timer7"; | ||
104 | }; | ||
105 | }; | ||
106 | |||
107 | rtc_dev: rtc@10003000 { | ||
108 | compatible = "ingenic,jz4740-rtc"; | ||
109 | reg = <0x10003000 0x40>; | ||
110 | |||
111 | interrupt-parent = <&intc>; | ||
112 | interrupts = <15>; | ||
113 | |||
114 | clocks = <&cgu JZ4740_CLK_RTC>; | ||
115 | clock-names = "rtc"; | ||
116 | }; | ||
117 | |||
118 | pinctrl: pin-controller@10010000 { | ||
119 | compatible = "ingenic,jz4740-pinctrl"; | ||
120 | reg = <0x10010000 0x400>; | ||
121 | |||
122 | #address-cells = <1>; | ||
123 | #size-cells = <0>; | ||
124 | |||
125 | gpa: gpio@0 { | ||
126 | compatible = "ingenic,jz4740-gpio"; | ||
127 | reg = <0>; | ||
128 | |||
129 | gpio-controller; | ||
130 | gpio-ranges = <&pinctrl 0 0 32>; | ||
131 | #gpio-cells = <2>; | ||
132 | |||
133 | interrupt-controller; | ||
134 | #interrupt-cells = <2>; | ||
135 | |||
136 | interrupt-parent = <&intc>; | ||
137 | interrupts = <28>; | ||
138 | }; | ||
139 | |||
140 | gpb: gpio@1 { | ||
141 | compatible = "ingenic,jz4740-gpio"; | ||
142 | reg = <1>; | ||
143 | |||
144 | gpio-controller; | ||
145 | gpio-ranges = <&pinctrl 0 32 32>; | ||
146 | #gpio-cells = <2>; | ||
147 | |||
148 | interrupt-controller; | ||
149 | #interrupt-cells = <2>; | ||
150 | |||
151 | interrupt-parent = <&intc>; | ||
152 | interrupts = <27>; | ||
153 | }; | ||
154 | |||
155 | gpc: gpio@2 { | ||
156 | compatible = "ingenic,jz4740-gpio"; | ||
157 | reg = <2>; | ||
158 | |||
159 | gpio-controller; | ||
160 | gpio-ranges = <&pinctrl 0 64 32>; | ||
161 | #gpio-cells = <2>; | ||
162 | |||
163 | interrupt-controller; | ||
164 | #interrupt-cells = <2>; | ||
165 | |||
166 | interrupt-parent = <&intc>; | ||
167 | interrupts = <26>; | ||
168 | }; | ||
169 | |||
170 | gpd: gpio@3 { | ||
171 | compatible = "ingenic,jz4740-gpio"; | ||
172 | reg = <3>; | ||
173 | |||
174 | gpio-controller; | ||
175 | gpio-ranges = <&pinctrl 0 96 32>; | ||
176 | #gpio-cells = <2>; | ||
177 | |||
178 | interrupt-controller; | ||
179 | #interrupt-cells = <2>; | ||
180 | |||
181 | interrupt-parent = <&intc>; | ||
182 | interrupts = <25>; | ||
183 | }; | ||
184 | }; | ||
185 | |||
186 | aic: audio-controller@10020000 { | ||
187 | compatible = "ingenic,jz4740-i2s"; | ||
188 | reg = <0x10020000 0x38>; | ||
189 | |||
190 | #sound-dai-cells = <0>; | ||
191 | |||
192 | interrupt-parent = <&intc>; | ||
193 | interrupts = <18>; | ||
194 | |||
195 | clocks = <&cgu JZ4740_CLK_AIC>, | ||
196 | <&cgu JZ4740_CLK_I2S>, | ||
197 | <&cgu JZ4740_CLK_EXT>, | ||
198 | <&cgu JZ4740_CLK_PLL_HALF>; | ||
199 | clock-names = "aic", "i2s", "ext", "pll half"; | ||
200 | |||
201 | dmas = <&dmac 25 0xffffffff>, <&dmac 24 0xffffffff>; | ||
202 | dma-names = "rx", "tx"; | ||
203 | }; | ||
204 | |||
205 | codec: audio-codec@100200a4 { | ||
206 | compatible = "ingenic,jz4740-codec"; | ||
207 | reg = <0x10020080 0x8>; | ||
208 | |||
209 | #sound-dai-cells = <0>; | ||
210 | |||
211 | clocks = <&cgu JZ4740_CLK_AIC>; | ||
212 | clock-names = "aic"; | ||
213 | }; | ||
214 | |||
215 | mmc: mmc@10021000 { | ||
216 | compatible = "ingenic,jz4740-mmc"; | ||
217 | reg = <0x10021000 0x1000>; | ||
218 | |||
219 | clocks = <&cgu JZ4740_CLK_MMC>; | ||
220 | clock-names = "mmc"; | ||
221 | |||
222 | interrupt-parent = <&intc>; | ||
223 | interrupts = <14>; | ||
224 | |||
225 | dmas = <&dmac 27 0xffffffff>, <&dmac 26 0xffffffff>; | ||
226 | dma-names = "rx", "tx"; | ||
227 | |||
228 | cap-sd-highspeed; | ||
229 | cap-mmc-highspeed; | ||
230 | cap-sdio-irq; | ||
231 | }; | ||
232 | |||
233 | uart0: serial@10030000 { | ||
234 | compatible = "ingenic,jz4740-uart"; | ||
235 | reg = <0x10030000 0x100>; | ||
236 | |||
237 | interrupt-parent = <&intc>; | ||
238 | interrupts = <9>; | ||
239 | |||
240 | clocks = <&ext>, <&cgu JZ4740_CLK_UART0>; | ||
241 | clock-names = "baud", "module"; | ||
242 | }; | ||
243 | |||
244 | uart1: serial@10031000 { | ||
245 | compatible = "ingenic,jz4740-uart"; | ||
246 | reg = <0x10031000 0x100>; | ||
247 | |||
248 | interrupt-parent = <&intc>; | ||
249 | interrupts = <8>; | ||
250 | |||
251 | clocks = <&ext>, <&cgu JZ4740_CLK_UART1>; | ||
252 | clock-names = "baud", "module"; | ||
253 | }; | ||
254 | |||
255 | adc: adc@10070000 { | ||
256 | compatible = "ingenic,jz4740-adc"; | ||
257 | reg = <0x10070000 0x30>; | ||
258 | #io-channel-cells = <1>; | ||
259 | |||
260 | clocks = <&cgu JZ4740_CLK_ADC>; | ||
261 | clock-names = "adc"; | ||
262 | |||
263 | interrupt-parent = <&intc>; | ||
264 | interrupts = <12>; | ||
265 | }; | ||
266 | |||
267 | nemc: memory-controller@13010000 { | ||
268 | compatible = "ingenic,jz4740-nemc"; | ||
269 | reg = <0x13010000 0x54>; | ||
270 | #address-cells = <2>; | ||
271 | #size-cells = <1>; | ||
272 | ranges = <1 0 0x18000000 0x4000000>, | ||
273 | <2 0 0x14000000 0x4000000>, | ||
274 | <3 0 0x0c000000 0x4000000>, | ||
275 | <4 0 0x08000000 0x4000000>; | ||
276 | |||
277 | clocks = <&cgu JZ4740_CLK_MCLK>; | ||
278 | }; | ||
279 | |||
280 | ecc: ecc-controller@13010100 { | ||
281 | compatible = "ingenic,jz4740-ecc"; | ||
282 | reg = <0x13010100 0x2C>; | ||
283 | |||
284 | clocks = <&cgu JZ4740_CLK_MCLK>; | ||
285 | }; | ||
286 | |||
287 | dmac: dma-controller@13020000 { | ||
288 | compatible = "ingenic,jz4740-dma"; | ||
289 | reg = <0x13020000 0xbc>, <0x13020300 0x14>; | ||
290 | #dma-cells = <2>; | ||
291 | |||
292 | interrupt-parent = <&intc>; | ||
293 | interrupts = <20>; | ||
294 | |||
295 | clocks = <&cgu JZ4740_CLK_DMA>; | ||
296 | }; | ||
297 | |||
298 | uhc: uhc@13030000 { | ||
299 | compatible = "ingenic,jz4740-ohci", "generic-ohci"; | ||
300 | reg = <0x13030000 0x1000>; | ||
301 | |||
302 | clocks = <&cgu JZ4740_CLK_UHC>; | ||
303 | assigned-clocks = <&cgu JZ4740_CLK_UHC>; | ||
304 | assigned-clock-rates = <48000000>; | ||
305 | |||
306 | interrupt-parent = <&intc>; | ||
307 | interrupts = <3>; | ||
308 | |||
309 | status = "disabled"; | ||
310 | }; | ||
311 | |||
312 | udc: usb@13040000 { | ||
313 | compatible = "ingenic,jz4740-musb"; | ||
314 | reg = <0x13040000 0x10000>; | ||
315 | |||
316 | interrupt-parent = <&intc>; | ||
317 | interrupts = <24>; | ||
318 | interrupt-names = "mc"; | ||
319 | |||
320 | clocks = <&cgu JZ4740_CLK_UDC>; | ||
321 | clock-names = "udc"; | ||
322 | }; | ||
323 | |||
324 | lcd: lcd-controller@13050000 { | ||
325 | compatible = "ingenic,jz4740-lcd"; | ||
326 | reg = <0x13050000 0x1000>; | ||
327 | |||
328 | interrupt-parent = <&intc>; | ||
329 | interrupts = <30>; | ||
330 | |||
331 | clocks = <&cgu JZ4740_CLK_LCD_PCLK>, <&cgu JZ4740_CLK_LCD>; | ||
332 | clock-names = "lcd_pclk", "lcd"; | ||
333 | }; | ||
334 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/jz4770.dtsi b/arch/mips/boot/dts/ingenic/jz4770.dtsi new file mode 100644 index 000000000..018721a9e --- /dev/null +++ b/arch/mips/boot/dts/ingenic/jz4770.dtsi | |||
@@ -0,0 +1,471 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/jz4770-cgu.h> | ||
3 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
4 | |||
5 | / { | ||
6 | #address-cells = <1>; | ||
7 | #size-cells = <1>; | ||
8 | compatible = "ingenic,jz4770"; | ||
9 | |||
10 | cpus { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <0>; | ||
13 | |||
14 | cpu0: cpu@0 { | ||
15 | device_type = "cpu"; | ||
16 | compatible = "ingenic,xburst-fpu1.0-mxu1.1"; | ||
17 | reg = <0>; | ||
18 | |||
19 | clocks = <&cgu JZ4770_CLK_CCLK>; | ||
20 | clock-names = "cpu"; | ||
21 | }; | ||
22 | }; | ||
23 | |||
24 | cpuintc: interrupt-controller { | ||
25 | #address-cells = <0>; | ||
26 | #interrupt-cells = <1>; | ||
27 | interrupt-controller; | ||
28 | compatible = "mti,cpu-interrupt-controller"; | ||
29 | }; | ||
30 | |||
31 | intc: interrupt-controller@10001000 { | ||
32 | compatible = "ingenic,jz4770-intc"; | ||
33 | reg = <0x10001000 0x40>; | ||
34 | |||
35 | interrupt-controller; | ||
36 | #interrupt-cells = <1>; | ||
37 | |||
38 | interrupt-parent = <&cpuintc>; | ||
39 | interrupts = <2>; | ||
40 | }; | ||
41 | |||
42 | ext: ext { | ||
43 | compatible = "fixed-clock"; | ||
44 | #clock-cells = <0>; | ||
45 | }; | ||
46 | |||
47 | osc32k: osc32k { | ||
48 | compatible = "fixed-clock"; | ||
49 | #clock-cells = <0>; | ||
50 | clock-frequency = <32768>; | ||
51 | }; | ||
52 | |||
53 | cgu: jz4770-cgu@10000000 { | ||
54 | compatible = "ingenic,jz4770-cgu", "simple-mfd"; | ||
55 | reg = <0x10000000 0x100>; | ||
56 | #address-cells = <1>; | ||
57 | #size-cells = <1>; | ||
58 | ranges = <0x0 0x10000000 0x100>; | ||
59 | |||
60 | clocks = <&ext>, <&osc32k>; | ||
61 | clock-names = "ext", "osc32k"; | ||
62 | |||
63 | #clock-cells = <1>; | ||
64 | |||
65 | otg_phy: usb-phy@3c { | ||
66 | compatible = "ingenic,jz4770-phy"; | ||
67 | reg = <0x3c 0x10>; | ||
68 | |||
69 | clocks = <&cgu JZ4770_CLK_OTG_PHY>; | ||
70 | |||
71 | #phy-cells = <0>; | ||
72 | }; | ||
73 | }; | ||
74 | |||
75 | tcu: timer@10002000 { | ||
76 | compatible = "ingenic,jz4770-tcu", "simple-mfd"; | ||
77 | reg = <0x10002000 0x1000>; | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <1>; | ||
80 | ranges = <0x0 0x10002000 0x1000>; | ||
81 | |||
82 | #clock-cells = <1>; | ||
83 | |||
84 | clocks = <&cgu JZ4770_CLK_RTC>, | ||
85 | <&cgu JZ4770_CLK_EXT>, | ||
86 | <&cgu JZ4770_CLK_PCLK>; | ||
87 | clock-names = "rtc", "ext", "pclk"; | ||
88 | |||
89 | interrupt-controller; | ||
90 | #interrupt-cells = <1>; | ||
91 | |||
92 | interrupt-parent = <&intc>; | ||
93 | interrupts = <27 26 25>; | ||
94 | |||
95 | watchdog: watchdog@0 { | ||
96 | compatible = "ingenic,jz4770-watchdog", | ||
97 | "ingenic,jz4740-watchdog"; | ||
98 | reg = <0x0 0xc>; | ||
99 | |||
100 | clocks = <&tcu TCU_CLK_WDT>; | ||
101 | clock-names = "wdt"; | ||
102 | }; | ||
103 | |||
104 | pwm: pwm@40 { | ||
105 | compatible = "ingenic,jz4770-pwm", "ingenic,jz4740-pwm"; | ||
106 | reg = <0x40 0x80>; | ||
107 | |||
108 | #pwm-cells = <3>; | ||
109 | |||
110 | clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, | ||
111 | <&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>, | ||
112 | <&tcu TCU_CLK_TIMER4>, <&tcu TCU_CLK_TIMER5>, | ||
113 | <&tcu TCU_CLK_TIMER6>, <&tcu TCU_CLK_TIMER7>; | ||
114 | clock-names = "timer0", "timer1", "timer2", "timer3", | ||
115 | "timer4", "timer5", "timer6", "timer7"; | ||
116 | }; | ||
117 | |||
118 | ost: timer@e0 { | ||
119 | compatible = "ingenic,jz4770-ost"; | ||
120 | reg = <0xe0 0x20>; | ||
121 | |||
122 | clocks = <&tcu TCU_CLK_OST>; | ||
123 | clock-names = "ost"; | ||
124 | |||
125 | interrupts = <15>; | ||
126 | }; | ||
127 | }; | ||
128 | |||
129 | rtc: rtc@10003000 { | ||
130 | compatible = "ingenic,jz4770-rtc", "ingenic,jz4760-rtc"; | ||
131 | reg = <0x10003000 0x40>; | ||
132 | |||
133 | interrupt-parent = <&intc>; | ||
134 | interrupts = <32>; | ||
135 | }; | ||
136 | |||
137 | pinctrl: pin-controller@10010000 { | ||
138 | compatible = "ingenic,jz4770-pinctrl"; | ||
139 | reg = <0x10010000 0x600>; | ||
140 | |||
141 | #address-cells = <1>; | ||
142 | #size-cells = <0>; | ||
143 | |||
144 | gpa: gpio@0 { | ||
145 | compatible = "ingenic,jz4770-gpio"; | ||
146 | reg = <0>; | ||
147 | |||
148 | gpio-controller; | ||
149 | gpio-ranges = <&pinctrl 0 0 32>; | ||
150 | #gpio-cells = <2>; | ||
151 | |||
152 | interrupt-controller; | ||
153 | #interrupt-cells = <2>; | ||
154 | |||
155 | interrupt-parent = <&intc>; | ||
156 | interrupts = <17>; | ||
157 | }; | ||
158 | |||
159 | gpb: gpio@1 { | ||
160 | compatible = "ingenic,jz4770-gpio"; | ||
161 | reg = <1>; | ||
162 | |||
163 | gpio-controller; | ||
164 | gpio-ranges = <&pinctrl 0 32 32>; | ||
165 | #gpio-cells = <2>; | ||
166 | |||
167 | interrupt-controller; | ||
168 | #interrupt-cells = <2>; | ||
169 | |||
170 | interrupt-parent = <&intc>; | ||
171 | interrupts = <16>; | ||
172 | }; | ||
173 | |||
174 | gpc: gpio@2 { | ||
175 | compatible = "ingenic,jz4770-gpio"; | ||
176 | reg = <2>; | ||
177 | |||
178 | gpio-controller; | ||
179 | gpio-ranges = <&pinctrl 0 64 32>; | ||
180 | #gpio-cells = <2>; | ||
181 | |||
182 | interrupt-controller; | ||
183 | #interrupt-cells = <2>; | ||
184 | |||
185 | interrupt-parent = <&intc>; | ||
186 | interrupts = <15>; | ||
187 | }; | ||
188 | |||
189 | gpd: gpio@3 { | ||
190 | compatible = "ingenic,jz4770-gpio"; | ||
191 | reg = <3>; | ||
192 | |||
193 | gpio-controller; | ||
194 | gpio-ranges = <&pinctrl 0 96 32>; | ||
195 | #gpio-cells = <2>; | ||
196 | |||
197 | interrupt-controller; | ||
198 | #interrupt-cells = <2>; | ||
199 | |||
200 | interrupt-parent = <&intc>; | ||
201 | interrupts = <14>; | ||
202 | }; | ||
203 | |||
204 | gpe: gpio@4 { | ||
205 | compatible = "ingenic,jz4770-gpio"; | ||
206 | reg = <4>; | ||
207 | |||
208 | gpio-controller; | ||
209 | gpio-ranges = <&pinctrl 0 128 32>; | ||
210 | #gpio-cells = <2>; | ||
211 | |||
212 | interrupt-controller; | ||
213 | #interrupt-cells = <2>; | ||
214 | |||
215 | interrupt-parent = <&intc>; | ||
216 | interrupts = <13>; | ||
217 | }; | ||
218 | |||
219 | gpf: gpio@5 { | ||
220 | compatible = "ingenic,jz4770-gpio"; | ||
221 | reg = <5>; | ||
222 | |||
223 | gpio-controller; | ||
224 | gpio-ranges = <&pinctrl 0 160 32>; | ||
225 | #gpio-cells = <2>; | ||
226 | |||
227 | interrupt-controller; | ||
228 | #interrupt-cells = <2>; | ||
229 | |||
230 | interrupt-parent = <&intc>; | ||
231 | interrupts = <12>; | ||
232 | }; | ||
233 | }; | ||
234 | |||
235 | aic: audio-controller@10020000 { | ||
236 | compatible = "ingenic,jz4770-i2s"; | ||
237 | reg = <0x10020000 0x94>; | ||
238 | |||
239 | #sound-dai-cells = <0>; | ||
240 | |||
241 | clocks = <&cgu JZ4770_CLK_AIC>, <&cgu JZ4770_CLK_I2S>, | ||
242 | <&cgu JZ4770_CLK_EXT>, <&cgu JZ4770_CLK_PLL0>; | ||
243 | clock-names = "aic", "i2s", "ext", "pll half"; | ||
244 | |||
245 | interrupt-parent = <&intc>; | ||
246 | interrupts = <34>; | ||
247 | |||
248 | dmas = <&dmac0 25 0xffffffff>, <&dmac0 24 0xffffffff>; | ||
249 | dma-names = "rx", "tx"; | ||
250 | }; | ||
251 | |||
252 | codec: audio-codec@100200a0 { | ||
253 | compatible = "ingenic,jz4770-codec"; | ||
254 | reg = <0x100200a4 0x8>; | ||
255 | |||
256 | #sound-dai-cells = <0>; | ||
257 | |||
258 | clocks = <&cgu JZ4770_CLK_AIC>; | ||
259 | clock-names = "aic"; | ||
260 | }; | ||
261 | |||
262 | mmc0: mmc@10021000 { | ||
263 | compatible = "ingenic,jz4770-mmc", "ingenic,jz4760-mmc"; | ||
264 | reg = <0x10021000 0x1000>; | ||
265 | |||
266 | clocks = <&cgu JZ4770_CLK_MMC0>; | ||
267 | clock-names = "mmc"; | ||
268 | |||
269 | interrupt-parent = <&intc>; | ||
270 | interrupts = <37>; | ||
271 | |||
272 | dmas = <&dmac1 27 0xffffffff>, <&dmac1 26 0xffffffff>; | ||
273 | dma-names = "rx", "tx"; | ||
274 | |||
275 | cap-sd-highspeed; | ||
276 | cap-mmc-highspeed; | ||
277 | cap-sdio-irq; | ||
278 | |||
279 | status = "disabled"; | ||
280 | }; | ||
281 | |||
282 | mmc1: mmc@10022000 { | ||
283 | compatible = "ingenic,jz4770-mmc", "ingenic,jz4760-mmc"; | ||
284 | reg = <0x10022000 0x1000>; | ||
285 | |||
286 | clocks = <&cgu JZ4770_CLK_MMC1>; | ||
287 | clock-names = "mmc"; | ||
288 | |||
289 | interrupt-parent = <&intc>; | ||
290 | interrupts = <36>; | ||
291 | |||
292 | dmas = <&dmac1 31 0xffffffff>, <&dmac1 30 0xffffffff>; | ||
293 | dma-names = "rx", "tx"; | ||
294 | |||
295 | cap-sd-highspeed; | ||
296 | cap-mmc-highspeed; | ||
297 | cap-sdio-irq; | ||
298 | |||
299 | status = "disabled"; | ||
300 | }; | ||
301 | |||
302 | mmc2: mmc@10023000 { | ||
303 | compatible = "ingenic,jz4770-mmc", "ingenic,jz4760-mmc"; | ||
304 | reg = <0x10023000 0x1000>; | ||
305 | |||
306 | clocks = <&cgu JZ4770_CLK_MMC2>; | ||
307 | clock-names = "mmc"; | ||
308 | |||
309 | interrupt-parent = <&intc>; | ||
310 | interrupts = <35>; | ||
311 | |||
312 | dmas = <&dmac1 37 0xffffffff>, <&dmac1 36 0xffffffff>; | ||
313 | dma-names = "rx", "tx"; | ||
314 | |||
315 | cap-sd-highspeed; | ||
316 | cap-mmc-highspeed; | ||
317 | cap-sdio-irq; | ||
318 | |||
319 | status = "disabled"; | ||
320 | }; | ||
321 | |||
322 | uart0: serial@10030000 { | ||
323 | compatible = "ingenic,jz4770-uart"; | ||
324 | reg = <0x10030000 0x100>; | ||
325 | |||
326 | clocks = <&ext>, <&cgu JZ4770_CLK_UART0>; | ||
327 | clock-names = "baud", "module"; | ||
328 | |||
329 | interrupt-parent = <&intc>; | ||
330 | interrupts = <5>; | ||
331 | |||
332 | status = "disabled"; | ||
333 | }; | ||
334 | |||
335 | uart1: serial@10031000 { | ||
336 | compatible = "ingenic,jz4770-uart"; | ||
337 | reg = <0x10031000 0x100>; | ||
338 | |||
339 | clocks = <&ext>, <&cgu JZ4770_CLK_UART1>; | ||
340 | clock-names = "baud", "module"; | ||
341 | |||
342 | interrupt-parent = <&intc>; | ||
343 | interrupts = <4>; | ||
344 | |||
345 | status = "disabled"; | ||
346 | }; | ||
347 | |||
348 | uart2: serial@10032000 { | ||
349 | compatible = "ingenic,jz4770-uart"; | ||
350 | reg = <0x10032000 0x100>; | ||
351 | |||
352 | clocks = <&ext>, <&cgu JZ4770_CLK_UART2>; | ||
353 | clock-names = "baud", "module"; | ||
354 | |||
355 | interrupt-parent = <&intc>; | ||
356 | interrupts = <3>; | ||
357 | |||
358 | status = "disabled"; | ||
359 | }; | ||
360 | |||
361 | uart3: serial@10033000 { | ||
362 | compatible = "ingenic,jz4770-uart"; | ||
363 | reg = <0x10033000 0x100>; | ||
364 | |||
365 | clocks = <&ext>, <&cgu JZ4770_CLK_UART3>; | ||
366 | clock-names = "baud", "module"; | ||
367 | |||
368 | interrupt-parent = <&intc>; | ||
369 | interrupts = <2>; | ||
370 | |||
371 | status = "disabled"; | ||
372 | }; | ||
373 | |||
374 | adc: adc@10070000 { | ||
375 | compatible = "ingenic,jz4770-adc"; | ||
376 | reg = <0x10070000 0x30>; | ||
377 | |||
378 | #io-channel-cells = <1>; | ||
379 | |||
380 | clocks = <&cgu JZ4770_CLK_ADC>; | ||
381 | clock-names = "adc"; | ||
382 | |||
383 | interrupt-parent = <&intc>; | ||
384 | interrupts = <18>; | ||
385 | }; | ||
386 | |||
387 | gpu: gpu@13040000 { | ||
388 | compatible = "vivante,gc"; | ||
389 | reg = <0x13040000 0x10000>; | ||
390 | |||
391 | clocks = <&cgu JZ4770_CLK_GPU>, | ||
392 | <&cgu JZ4770_CLK_GPU>, | ||
393 | <&cgu JZ4770_CLK_GPU>; | ||
394 | clock-names = "bus", "core", "shader"; | ||
395 | |||
396 | interrupt-parent = <&intc>; | ||
397 | interrupts = <6>; | ||
398 | }; | ||
399 | |||
400 | lcd: lcd-controller@13050000 { | ||
401 | compatible = "ingenic,jz4770-lcd"; | ||
402 | reg = <0x13050000 0x300>; | ||
403 | |||
404 | interrupt-parent = <&intc>; | ||
405 | interrupts = <31>; | ||
406 | |||
407 | clocks = <&cgu JZ4770_CLK_LPCLK_MUX>; | ||
408 | clock-names = "lcd_pclk"; | ||
409 | }; | ||
410 | |||
411 | dmac0: dma-controller@13420000 { | ||
412 | compatible = "ingenic,jz4770-dma"; | ||
413 | reg = <0x13420000 0xC0>, <0x13420300 0x20>; | ||
414 | |||
415 | #dma-cells = <2>; | ||
416 | |||
417 | clocks = <&cgu JZ4770_CLK_DMA>; | ||
418 | interrupt-parent = <&intc>; | ||
419 | interrupts = <24>; | ||
420 | }; | ||
421 | |||
422 | dmac1: dma-controller@13420100 { | ||
423 | compatible = "ingenic,jz4770-dma"; | ||
424 | reg = <0x13420100 0xC0>, <0x13420400 0x20>; | ||
425 | |||
426 | #dma-cells = <2>; | ||
427 | |||
428 | clocks = <&cgu JZ4770_CLK_DMA>; | ||
429 | interrupt-parent = <&intc>; | ||
430 | interrupts = <23>; | ||
431 | }; | ||
432 | |||
433 | uhc: uhc@13430000 { | ||
434 | compatible = "generic-ohci"; | ||
435 | reg = <0x13430000 0x1000>; | ||
436 | |||
437 | clocks = <&cgu JZ4770_CLK_UHC>, <&cgu JZ4770_CLK_UHC_PHY>; | ||
438 | assigned-clocks = <&cgu JZ4770_CLK_UHC>; | ||
439 | assigned-clock-rates = <48000000>; | ||
440 | |||
441 | interrupt-parent = <&intc>; | ||
442 | interrupts = <20>; | ||
443 | |||
444 | status = "disabled"; | ||
445 | }; | ||
446 | |||
447 | usb_otg: usb@13440000 { | ||
448 | compatible = "ingenic,jz4770-musb"; | ||
449 | reg = <0x13440000 0x10000>; | ||
450 | |||
451 | clocks = <&cgu JZ4770_CLK_OTG>; | ||
452 | clock-names = "udc"; | ||
453 | |||
454 | interrupt-parent = <&intc>; | ||
455 | interrupts = <21>; | ||
456 | interrupt-names = "mc"; | ||
457 | |||
458 | phys = <&otg_phy>; | ||
459 | |||
460 | usb-role-switch; | ||
461 | }; | ||
462 | |||
463 | rom: memory@1fc00000 { | ||
464 | compatible = "mtd-rom"; | ||
465 | probe-type = "map_rom"; | ||
466 | reg = <0x1fc00000 0x2000>; | ||
467 | |||
468 | bank-width = <4>; | ||
469 | device-width = <1>; | ||
470 | }; | ||
471 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi new file mode 100644 index 000000000..830e5dd35 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi | |||
@@ -0,0 +1,497 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/jz4780-cgu.h> | ||
3 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
4 | #include <dt-bindings/dma/jz4780-dma.h> | ||
5 | |||
6 | / { | ||
7 | #address-cells = <1>; | ||
8 | #size-cells = <1>; | ||
9 | compatible = "ingenic,jz4780"; | ||
10 | |||
11 | cpus { | ||
12 | #address-cells = <1>; | ||
13 | #size-cells = <0>; | ||
14 | |||
15 | cpu0: cpu@0 { | ||
16 | device_type = "cpu"; | ||
17 | compatible = "ingenic,xburst-fpu1.0-mxu1.1"; | ||
18 | reg = <0>; | ||
19 | |||
20 | clocks = <&cgu JZ4780_CLK_CPU>; | ||
21 | clock-names = "cpu"; | ||
22 | }; | ||
23 | |||
24 | cpu1: cpu@1 { | ||
25 | device_type = "cpu"; | ||
26 | compatible = "ingenic,xburst-fpu1.0-mxu1.1"; | ||
27 | reg = <1>; | ||
28 | |||
29 | clocks = <&cgu JZ4780_CLK_CORE1>; | ||
30 | clock-names = "cpu"; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | cpuintc: interrupt-controller { | ||
35 | #address-cells = <0>; | ||
36 | #interrupt-cells = <1>; | ||
37 | interrupt-controller; | ||
38 | compatible = "mti,cpu-interrupt-controller"; | ||
39 | }; | ||
40 | |||
41 | intc: interrupt-controller@10001000 { | ||
42 | compatible = "ingenic,jz4780-intc"; | ||
43 | reg = <0x10001000 0x50>; | ||
44 | |||
45 | interrupt-controller; | ||
46 | #interrupt-cells = <1>; | ||
47 | |||
48 | interrupt-parent = <&cpuintc>; | ||
49 | interrupts = <2>; | ||
50 | }; | ||
51 | |||
52 | ext: ext { | ||
53 | compatible = "fixed-clock"; | ||
54 | #clock-cells = <0>; | ||
55 | }; | ||
56 | |||
57 | rtc: rtc { | ||
58 | compatible = "fixed-clock"; | ||
59 | #clock-cells = <0>; | ||
60 | clock-frequency = <32768>; | ||
61 | }; | ||
62 | |||
63 | cgu: jz4780-cgu@10000000 { | ||
64 | compatible = "ingenic,jz4780-cgu"; | ||
65 | reg = <0x10000000 0x100>; | ||
66 | |||
67 | clocks = <&ext>, <&rtc>; | ||
68 | clock-names = "ext", "rtc"; | ||
69 | |||
70 | #clock-cells = <1>; | ||
71 | }; | ||
72 | |||
73 | tcu: timer@10002000 { | ||
74 | compatible = "ingenic,jz4780-tcu", | ||
75 | "ingenic,jz4770-tcu", | ||
76 | "simple-mfd"; | ||
77 | reg = <0x10002000 0x1000>; | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <1>; | ||
80 | ranges = <0x0 0x10002000 0x1000>; | ||
81 | |||
82 | #clock-cells = <1>; | ||
83 | |||
84 | clocks = <&cgu JZ4780_CLK_RTCLK>, | ||
85 | <&cgu JZ4780_CLK_EXCLK>, | ||
86 | <&cgu JZ4780_CLK_PCLK>; | ||
87 | clock-names = "rtc", "ext", "pclk"; | ||
88 | |||
89 | interrupt-controller; | ||
90 | #interrupt-cells = <1>; | ||
91 | |||
92 | interrupt-parent = <&intc>; | ||
93 | interrupts = <27 26 25>; | ||
94 | |||
95 | watchdog: watchdog@0 { | ||
96 | compatible = "ingenic,jz4780-watchdog"; | ||
97 | reg = <0x0 0xc>; | ||
98 | |||
99 | clocks = <&tcu TCU_CLK_WDT>; | ||
100 | clock-names = "wdt"; | ||
101 | }; | ||
102 | |||
103 | pwm: pwm@40 { | ||
104 | compatible = "ingenic,jz4780-pwm", "ingenic,jz4740-pwm"; | ||
105 | reg = <0x40 0x80>; | ||
106 | |||
107 | #pwm-cells = <3>; | ||
108 | |||
109 | clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, | ||
110 | <&tcu TCU_CLK_TIMER2>, <&tcu TCU_CLK_TIMER3>, | ||
111 | <&tcu TCU_CLK_TIMER4>, <&tcu TCU_CLK_TIMER5>, | ||
112 | <&tcu TCU_CLK_TIMER6>, <&tcu TCU_CLK_TIMER7>; | ||
113 | clock-names = "timer0", "timer1", "timer2", "timer3", | ||
114 | "timer4", "timer5", "timer6", "timer7"; | ||
115 | }; | ||
116 | |||
117 | ost: timer@e0 { | ||
118 | compatible = "ingenic,jz4780-ost", "ingenic,jz4770-ost"; | ||
119 | reg = <0xe0 0x20>; | ||
120 | |||
121 | clocks = <&tcu TCU_CLK_OST>; | ||
122 | clock-names = "ost"; | ||
123 | |||
124 | interrupts = <15>; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | rtc_dev: rtc@10003000 { | ||
129 | compatible = "ingenic,jz4780-rtc"; | ||
130 | reg = <0x10003000 0x4c>; | ||
131 | |||
132 | interrupt-parent = <&intc>; | ||
133 | interrupts = <32>; | ||
134 | |||
135 | clocks = <&cgu JZ4780_CLK_RTCLK>; | ||
136 | clock-names = "rtc"; | ||
137 | }; | ||
138 | |||
139 | pinctrl: pin-controller@10010000 { | ||
140 | compatible = "ingenic,jz4780-pinctrl"; | ||
141 | reg = <0x10010000 0x600>; | ||
142 | |||
143 | #address-cells = <1>; | ||
144 | #size-cells = <0>; | ||
145 | |||
146 | gpa: gpio@0 { | ||
147 | compatible = "ingenic,jz4780-gpio"; | ||
148 | reg = <0>; | ||
149 | |||
150 | gpio-controller; | ||
151 | gpio-ranges = <&pinctrl 0 0 32>; | ||
152 | #gpio-cells = <2>; | ||
153 | |||
154 | interrupt-controller; | ||
155 | #interrupt-cells = <2>; | ||
156 | |||
157 | interrupt-parent = <&intc>; | ||
158 | interrupts = <17>; | ||
159 | }; | ||
160 | |||
161 | gpb: gpio@1 { | ||
162 | compatible = "ingenic,jz4780-gpio"; | ||
163 | reg = <1>; | ||
164 | |||
165 | gpio-controller; | ||
166 | gpio-ranges = <&pinctrl 0 32 32>; | ||
167 | #gpio-cells = <2>; | ||
168 | |||
169 | interrupt-controller; | ||
170 | #interrupt-cells = <2>; | ||
171 | |||
172 | interrupt-parent = <&intc>; | ||
173 | interrupts = <16>; | ||
174 | }; | ||
175 | |||
176 | gpc: gpio@2 { | ||
177 | compatible = "ingenic,jz4780-gpio"; | ||
178 | reg = <2>; | ||
179 | |||
180 | gpio-controller; | ||
181 | gpio-ranges = <&pinctrl 0 64 32>; | ||
182 | #gpio-cells = <2>; | ||
183 | |||
184 | interrupt-controller; | ||
185 | #interrupt-cells = <2>; | ||
186 | |||
187 | interrupt-parent = <&intc>; | ||
188 | interrupts = <15>; | ||
189 | }; | ||
190 | |||
191 | gpd: gpio@3 { | ||
192 | compatible = "ingenic,jz4780-gpio"; | ||
193 | reg = <3>; | ||
194 | |||
195 | gpio-controller; | ||
196 | gpio-ranges = <&pinctrl 0 96 32>; | ||
197 | #gpio-cells = <2>; | ||
198 | |||
199 | interrupt-controller; | ||
200 | #interrupt-cells = <2>; | ||
201 | |||
202 | interrupt-parent = <&intc>; | ||
203 | interrupts = <14>; | ||
204 | }; | ||
205 | |||
206 | gpe: gpio@4 { | ||
207 | compatible = "ingenic,jz4780-gpio"; | ||
208 | reg = <4>; | ||
209 | |||
210 | gpio-controller; | ||
211 | gpio-ranges = <&pinctrl 0 128 32>; | ||
212 | #gpio-cells = <2>; | ||
213 | |||
214 | interrupt-controller; | ||
215 | #interrupt-cells = <2>; | ||
216 | |||
217 | interrupt-parent = <&intc>; | ||
218 | interrupts = <13>; | ||
219 | }; | ||
220 | |||
221 | gpf: gpio@5 { | ||
222 | compatible = "ingenic,jz4780-gpio"; | ||
223 | reg = <5>; | ||
224 | |||
225 | gpio-controller; | ||
226 | gpio-ranges = <&pinctrl 0 160 32>; | ||
227 | #gpio-cells = <2>; | ||
228 | |||
229 | interrupt-controller; | ||
230 | #interrupt-cells = <2>; | ||
231 | |||
232 | interrupt-parent = <&intc>; | ||
233 | interrupts = <12>; | ||
234 | }; | ||
235 | }; | ||
236 | |||
237 | spi_gpio { | ||
238 | compatible = "spi-gpio"; | ||
239 | #address-cells = <1>; | ||
240 | #size-cells = <0>; | ||
241 | num-chipselects = <2>; | ||
242 | |||
243 | gpio-miso = <&gpe 14 0>; | ||
244 | gpio-sck = <&gpe 15 0>; | ||
245 | gpio-mosi = <&gpe 17 0>; | ||
246 | cs-gpios = <&gpe 16 0>, <&gpe 18 0>; | ||
247 | |||
248 | spidev@0 { | ||
249 | compatible = "spidev"; | ||
250 | reg = <0>; | ||
251 | spi-max-frequency = <1000000>; | ||
252 | }; | ||
253 | }; | ||
254 | |||
255 | uart0: serial@10030000 { | ||
256 | compatible = "ingenic,jz4780-uart"; | ||
257 | reg = <0x10030000 0x100>; | ||
258 | |||
259 | interrupt-parent = <&intc>; | ||
260 | interrupts = <51>; | ||
261 | |||
262 | clocks = <&ext>, <&cgu JZ4780_CLK_UART0>; | ||
263 | clock-names = "baud", "module"; | ||
264 | |||
265 | status = "disabled"; | ||
266 | }; | ||
267 | |||
268 | uart1: serial@10031000 { | ||
269 | compatible = "ingenic,jz4780-uart"; | ||
270 | reg = <0x10031000 0x100>; | ||
271 | |||
272 | interrupt-parent = <&intc>; | ||
273 | interrupts = <50>; | ||
274 | |||
275 | clocks = <&ext>, <&cgu JZ4780_CLK_UART1>; | ||
276 | clock-names = "baud", "module"; | ||
277 | |||
278 | status = "disabled"; | ||
279 | }; | ||
280 | |||
281 | uart2: serial@10032000 { | ||
282 | compatible = "ingenic,jz4780-uart"; | ||
283 | reg = <0x10032000 0x100>; | ||
284 | |||
285 | interrupt-parent = <&intc>; | ||
286 | interrupts = <49>; | ||
287 | |||
288 | clocks = <&ext>, <&cgu JZ4780_CLK_UART2>; | ||
289 | clock-names = "baud", "module"; | ||
290 | |||
291 | status = "disabled"; | ||
292 | }; | ||
293 | |||
294 | uart3: serial@10033000 { | ||
295 | compatible = "ingenic,jz4780-uart"; | ||
296 | reg = <0x10033000 0x100>; | ||
297 | |||
298 | interrupt-parent = <&intc>; | ||
299 | interrupts = <48>; | ||
300 | |||
301 | clocks = <&ext>, <&cgu JZ4780_CLK_UART3>; | ||
302 | clock-names = "baud", "module"; | ||
303 | |||
304 | status = "disabled"; | ||
305 | }; | ||
306 | |||
307 | uart4: serial@10034000 { | ||
308 | compatible = "ingenic,jz4780-uart"; | ||
309 | reg = <0x10034000 0x100>; | ||
310 | |||
311 | interrupt-parent = <&intc>; | ||
312 | interrupts = <34>; | ||
313 | |||
314 | clocks = <&ext>, <&cgu JZ4780_CLK_UART4>; | ||
315 | clock-names = "baud", "module"; | ||
316 | |||
317 | status = "disabled"; | ||
318 | }; | ||
319 | |||
320 | i2c0: i2c@10050000 { | ||
321 | compatible = "ingenic,jz4780-i2c"; | ||
322 | #address-cells = <1>; | ||
323 | #size-cells = <0>; | ||
324 | |||
325 | reg = <0x10050000 0x1000>; | ||
326 | |||
327 | interrupt-parent = <&intc>; | ||
328 | interrupts = <60>; | ||
329 | |||
330 | clocks = <&cgu JZ4780_CLK_SMB0>; | ||
331 | clock-frequency = <100000>; | ||
332 | pinctrl-names = "default"; | ||
333 | pinctrl-0 = <&pins_i2c0_data>; | ||
334 | |||
335 | status = "disabled"; | ||
336 | }; | ||
337 | |||
338 | i2c1: i2c@10051000 { | ||
339 | compatible = "ingenic,jz4780-i2c"; | ||
340 | #address-cells = <1>; | ||
341 | #size-cells = <0>; | ||
342 | reg = <0x10051000 0x1000>; | ||
343 | |||
344 | interrupt-parent = <&intc>; | ||
345 | interrupts = <59>; | ||
346 | |||
347 | clocks = <&cgu JZ4780_CLK_SMB1>; | ||
348 | clock-frequency = <100000>; | ||
349 | pinctrl-names = "default"; | ||
350 | pinctrl-0 = <&pins_i2c1_data>; | ||
351 | |||
352 | status = "disabled"; | ||
353 | }; | ||
354 | |||
355 | i2c2: i2c@10052000 { | ||
356 | compatible = "ingenic,jz4780-i2c"; | ||
357 | #address-cells = <1>; | ||
358 | #size-cells = <0>; | ||
359 | reg = <0x10052000 0x1000>; | ||
360 | |||
361 | interrupt-parent = <&intc>; | ||
362 | interrupts = <58>; | ||
363 | |||
364 | clocks = <&cgu JZ4780_CLK_SMB2>; | ||
365 | clock-frequency = <100000>; | ||
366 | pinctrl-names = "default"; | ||
367 | pinctrl-0 = <&pins_i2c2_data>; | ||
368 | |||
369 | status = "disabled"; | ||
370 | }; | ||
371 | |||
372 | i2c3: i2c@10053000 { | ||
373 | compatible = "ingenic,jz4780-i2c"; | ||
374 | #address-cells = <1>; | ||
375 | #size-cells = <0>; | ||
376 | reg = <0x10053000 0x1000>; | ||
377 | |||
378 | interrupt-parent = <&intc>; | ||
379 | interrupts = <57>; | ||
380 | |||
381 | clocks = <&cgu JZ4780_CLK_SMB3>; | ||
382 | clock-frequency = <100000>; | ||
383 | pinctrl-names = "default"; | ||
384 | pinctrl-0 = <&pins_i2c3_data>; | ||
385 | |||
386 | status = "disabled"; | ||
387 | }; | ||
388 | |||
389 | i2c4: i2c@10054000 { | ||
390 | compatible = "ingenic,jz4780-i2c"; | ||
391 | #address-cells = <1>; | ||
392 | #size-cells = <0>; | ||
393 | reg = <0x10054000 0x1000>; | ||
394 | |||
395 | interrupt-parent = <&intc>; | ||
396 | interrupts = <56>; | ||
397 | |||
398 | clocks = <&cgu JZ4780_CLK_SMB4>; | ||
399 | clock-frequency = <100000>; | ||
400 | pinctrl-names = "default"; | ||
401 | pinctrl-0 = <&pins_i2c4_data>; | ||
402 | |||
403 | status = "disabled"; | ||
404 | }; | ||
405 | |||
406 | nemc: nemc@13410000 { | ||
407 | compatible = "ingenic,jz4780-nemc", "simple-mfd"; | ||
408 | reg = <0x13410000 0x10000>; | ||
409 | #address-cells = <2>; | ||
410 | #size-cells = <1>; | ||
411 | ranges = <0 0 0x13410000 0x10000>, | ||
412 | <1 0 0x1b000000 0x1000000>, | ||
413 | <2 0 0x1a000000 0x1000000>, | ||
414 | <3 0 0x19000000 0x1000000>, | ||
415 | <4 0 0x18000000 0x1000000>, | ||
416 | <5 0 0x17000000 0x1000000>, | ||
417 | <6 0 0x16000000 0x1000000>; | ||
418 | |||
419 | clocks = <&cgu JZ4780_CLK_NEMC>; | ||
420 | |||
421 | status = "disabled"; | ||
422 | |||
423 | efuse: efuse@d0 { | ||
424 | reg = <0 0xd0 0x30>; | ||
425 | compatible = "ingenic,jz4780-efuse"; | ||
426 | |||
427 | clocks = <&cgu JZ4780_CLK_AHB2>; | ||
428 | |||
429 | #address-cells = <1>; | ||
430 | #size-cells = <1>; | ||
431 | |||
432 | eth0_addr: eth-mac-addr@22 { | ||
433 | reg = <0x22 0x6>; | ||
434 | }; | ||
435 | }; | ||
436 | }; | ||
437 | |||
438 | dma: dma@13420000 { | ||
439 | compatible = "ingenic,jz4780-dma"; | ||
440 | reg = <0x13420000 0x400>, <0x13421000 0x40>; | ||
441 | #dma-cells = <2>; | ||
442 | |||
443 | interrupt-parent = <&intc>; | ||
444 | interrupts = <10>; | ||
445 | |||
446 | clocks = <&cgu JZ4780_CLK_PDMA>; | ||
447 | }; | ||
448 | |||
449 | mmc0: mmc@13450000 { | ||
450 | compatible = "ingenic,jz4780-mmc"; | ||
451 | reg = <0x13450000 0x1000>; | ||
452 | |||
453 | interrupt-parent = <&intc>; | ||
454 | interrupts = <37>; | ||
455 | |||
456 | clocks = <&cgu JZ4780_CLK_MSC0>; | ||
457 | clock-names = "mmc"; | ||
458 | |||
459 | cap-sd-highspeed; | ||
460 | cap-mmc-highspeed; | ||
461 | cap-sdio-irq; | ||
462 | dmas = <&dma JZ4780_DMA_MSC0_RX 0xffffffff>, | ||
463 | <&dma JZ4780_DMA_MSC0_TX 0xffffffff>; | ||
464 | dma-names = "rx", "tx"; | ||
465 | |||
466 | status = "disabled"; | ||
467 | }; | ||
468 | |||
469 | mmc1: mmc@13460000 { | ||
470 | compatible = "ingenic,jz4780-mmc"; | ||
471 | reg = <0x13460000 0x1000>; | ||
472 | |||
473 | interrupt-parent = <&intc>; | ||
474 | interrupts = <36>; | ||
475 | |||
476 | clocks = <&cgu JZ4780_CLK_MSC1>; | ||
477 | clock-names = "mmc"; | ||
478 | |||
479 | cap-sd-highspeed; | ||
480 | cap-mmc-highspeed; | ||
481 | cap-sdio-irq; | ||
482 | dmas = <&dma JZ4780_DMA_MSC1_RX 0xffffffff>, | ||
483 | <&dma JZ4780_DMA_MSC1_TX 0xffffffff>; | ||
484 | dma-names = "rx", "tx"; | ||
485 | |||
486 | status = "disabled"; | ||
487 | }; | ||
488 | |||
489 | bch: bch@134d0000 { | ||
490 | compatible = "ingenic,jz4780-bch"; | ||
491 | reg = <0x134d0000 0x10000>; | ||
492 | |||
493 | clocks = <&cgu JZ4780_CLK_BCH>; | ||
494 | |||
495 | status = "disabled"; | ||
496 | }; | ||
497 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/qi_lb60.dts b/arch/mips/boot/dts/ingenic/qi_lb60.dts new file mode 100644 index 000000000..ba0218971 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/qi_lb60.dts | |||
@@ -0,0 +1,363 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "jz4740.dtsi" | ||
5 | |||
6 | #include <dt-bindings/gpio/gpio.h> | ||
7 | #include <dt-bindings/iio/adc/ingenic,adc.h> | ||
8 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
9 | #include <dt-bindings/input/input.h> | ||
10 | |||
11 | #define KEY_QI_QI KEY_F13 | ||
12 | #define KEY_QI_UPRED KEY_RIGHTALT | ||
13 | #define KEY_QI_VOLUP KEY_VOLUMEUP | ||
14 | #define KEY_QI_VOLDOWN KEY_VOLUMEDOWN | ||
15 | #define KEY_QI_FN KEY_LEFTCTRL | ||
16 | |||
17 | / { | ||
18 | compatible = "qi,lb60", "ingenic,jz4740"; | ||
19 | model = "Ben Nanonote"; | ||
20 | |||
21 | memory { | ||
22 | device_type = "memory"; | ||
23 | reg = <0x0 0x2000000>; | ||
24 | }; | ||
25 | |||
26 | chosen { | ||
27 | stdout-path = &uart0; | ||
28 | }; | ||
29 | |||
30 | vcc: regulator@0 { | ||
31 | compatible = "regulator-fixed"; | ||
32 | regulator-name = "vcc"; | ||
33 | |||
34 | regulator-min-microvolt = <3300000>; | ||
35 | regulator-max-microvolt = <3300000>; | ||
36 | regulator-always-on; | ||
37 | }; | ||
38 | |||
39 | mmc_power: regulator@1 { | ||
40 | compatible = "regulator-fixed"; | ||
41 | regulator-name = "mmc_vcc"; | ||
42 | gpio = <&gpd 2 0>; | ||
43 | |||
44 | regulator-min-microvolt = <3300000>; | ||
45 | regulator-max-microvolt = <3300000>; | ||
46 | }; | ||
47 | |||
48 | amp_supply: regulator@2 { | ||
49 | compatible = "regulator-fixed"; | ||
50 | regulator-name = "amp_supply"; | ||
51 | gpio = <&gpd 4 0>; | ||
52 | enable-active-high; | ||
53 | |||
54 | regulator-min-microvolt = <3300000>; | ||
55 | regulator-max-microvolt = <3300000>; | ||
56 | }; | ||
57 | |||
58 | amp: analog-amplifier { | ||
59 | compatible = "simple-audio-amplifier"; | ||
60 | enable-gpios = <&gpb 29 GPIO_ACTIVE_HIGH>; | ||
61 | VCC-supply = <&_supply>; | ||
62 | }; | ||
63 | |||
64 | sound { | ||
65 | compatible = "simple-audio-card"; | ||
66 | |||
67 | simple-audio-card,name = "QI LB60"; | ||
68 | simple-audio-card,format = "i2s"; | ||
69 | |||
70 | simple-audio-card,widgets = | ||
71 | "Speaker", "Speaker", | ||
72 | "Microphone", "Mic"; | ||
73 | simple-audio-card,routing = | ||
74 | "MIC", "Mic", | ||
75 | "Speaker", "OUTL", | ||
76 | "Speaker", "OUTR", | ||
77 | "INL", "LOUT", | ||
78 | "INR", "ROUT"; | ||
79 | |||
80 | simple-audio-card,aux-devs = <&>; | ||
81 | |||
82 | simple-audio-card,bitclock-master = <&dai_codec>; | ||
83 | simple-audio-card,frame-master = <&dai_codec>; | ||
84 | |||
85 | dai_cpu: simple-audio-card,cpu { | ||
86 | sound-dai = <&aic>; | ||
87 | }; | ||
88 | |||
89 | dai_codec: simple-audio-card,codec { | ||
90 | sound-dai = <&codec>; | ||
91 | }; | ||
92 | }; | ||
93 | |||
94 | keys { | ||
95 | compatible = "gpio-keys"; | ||
96 | |||
97 | key { | ||
98 | label = "Power"; | ||
99 | wakeup-source; | ||
100 | linux,code = <KEY_POWER>; | ||
101 | gpios = <&gpd 29 GPIO_ACTIVE_LOW>; | ||
102 | }; | ||
103 | }; | ||
104 | |||
105 | keyboard { | ||
106 | compatible = "gpio-matrix-keypad"; | ||
107 | |||
108 | col-scan-delay-us = <10>; | ||
109 | debounce-delay-ms = <10>; | ||
110 | wakeup-source; | ||
111 | |||
112 | row-gpios = <&gpd 18 0>, <&gpd 19 0>, <&gpd 20 0>, <&gpd 21 0>, | ||
113 | <&gpd 22 0>, <&gpd 23 0>, <&gpd 24 0>, <&gpd 26 0>; | ||
114 | col-gpios = <&gpc 10 0>, <&gpc 11 0>, <&gpc 12 0>, <&gpc 13 0>, | ||
115 | <&gpc 14 0>, <&gpc 15 0>, <&gpc 16 0>, <&gpc 17 0>; | ||
116 | gpio-activelow; | ||
117 | |||
118 | linux,keymap = | ||
119 | <MATRIX_KEY(0, 0, KEY_F1)>, /* S2 */ | ||
120 | <MATRIX_KEY(0, 1, KEY_F2)>, /* S3 */ | ||
121 | <MATRIX_KEY(0, 2, KEY_F3)>, /* S4 */ | ||
122 | <MATRIX_KEY(0, 3, KEY_F4)>, /* S5 */ | ||
123 | <MATRIX_KEY(0, 4, KEY_F5)>, /* S6 */ | ||
124 | <MATRIX_KEY(0, 5, KEY_F6)>, /* S7 */ | ||
125 | <MATRIX_KEY(0, 6, KEY_F7)>, /* S8 */ | ||
126 | |||
127 | <MATRIX_KEY(1, 0, KEY_Q)>, /* S10 */ | ||
128 | <MATRIX_KEY(1, 1, KEY_W)>, /* S11 */ | ||
129 | <MATRIX_KEY(1, 2, KEY_E)>, /* S12 */ | ||
130 | <MATRIX_KEY(1, 3, KEY_R)>, /* S13 */ | ||
131 | <MATRIX_KEY(1, 4, KEY_T)>, /* S14 */ | ||
132 | <MATRIX_KEY(1, 5, KEY_Y)>, /* S15 */ | ||
133 | <MATRIX_KEY(1, 6, KEY_U)>, /* S16 */ | ||
134 | <MATRIX_KEY(1, 7, KEY_I)>, /* S17 */ | ||
135 | <MATRIX_KEY(2, 0, KEY_A)>, /* S18 */ | ||
136 | <MATRIX_KEY(2, 1, KEY_S)>, /* S19 */ | ||
137 | <MATRIX_KEY(2, 2, KEY_D)>, /* S20 */ | ||
138 | <MATRIX_KEY(2, 3, KEY_F)>, /* S21 */ | ||
139 | <MATRIX_KEY(2, 4, KEY_G)>, /* S22 */ | ||
140 | <MATRIX_KEY(2, 5, KEY_H)>, /* S23 */ | ||
141 | <MATRIX_KEY(2, 6, KEY_J)>, /* S24 */ | ||
142 | <MATRIX_KEY(2, 7, KEY_K)>, /* S25 */ | ||
143 | <MATRIX_KEY(3, 0, KEY_ESC)>, /* S26 */ | ||
144 | <MATRIX_KEY(3, 1, KEY_Z)>, /* S27 */ | ||
145 | <MATRIX_KEY(3, 2, KEY_X)>, /* S28 */ | ||
146 | <MATRIX_KEY(3, 3, KEY_C)>, /* S29 */ | ||
147 | <MATRIX_KEY(3, 4, KEY_V)>, /* S30 */ | ||
148 | <MATRIX_KEY(3, 5, KEY_B)>, /* S31 */ | ||
149 | <MATRIX_KEY(3, 6, KEY_N)>, /* S32 */ | ||
150 | <MATRIX_KEY(3, 7, KEY_M)>, /* S33 */ | ||
151 | <MATRIX_KEY(4, 0, KEY_TAB)>, /* S34 */ | ||
152 | <MATRIX_KEY(4, 1, KEY_CAPSLOCK)>, /* S35 */ | ||
153 | <MATRIX_KEY(4, 2, KEY_BACKSLASH)>, /* S36 */ | ||
154 | <MATRIX_KEY(4, 3, KEY_APOSTROPHE)>, /* S37 */ | ||
155 | <MATRIX_KEY(4, 4, KEY_COMMA)>, /* S38 */ | ||
156 | <MATRIX_KEY(4, 5, KEY_DOT)>, /* S39 */ | ||
157 | <MATRIX_KEY(4, 6, KEY_SLASH)>, /* S40 */ | ||
158 | <MATRIX_KEY(4, 7, KEY_UP)>, /* S41 */ | ||
159 | <MATRIX_KEY(5, 0, KEY_O)>, /* S42 */ | ||
160 | <MATRIX_KEY(5, 1, KEY_L)>, /* S43 */ | ||
161 | <MATRIX_KEY(5, 2, KEY_EQUAL)>, /* S44 */ | ||
162 | <MATRIX_KEY(5, 3, KEY_QI_UPRED)>, /* S45 */ | ||
163 | <MATRIX_KEY(5, 4, KEY_SPACE)>, /* S46 */ | ||
164 | <MATRIX_KEY(5, 5, KEY_QI_QI)>, /* S47 */ | ||
165 | <MATRIX_KEY(5, 6, KEY_RIGHTCTRL)>, /* S48 */ | ||
166 | <MATRIX_KEY(5, 7, KEY_LEFT)>, /* S49 */ | ||
167 | <MATRIX_KEY(6, 0, KEY_F8)>, /* S50 */ | ||
168 | <MATRIX_KEY(6, 1, KEY_P)>, /* S51 */ | ||
169 | <MATRIX_KEY(6, 2, KEY_BACKSPACE)>,/* S52 */ | ||
170 | <MATRIX_KEY(6, 3, KEY_ENTER)>, /* S53 */ | ||
171 | <MATRIX_KEY(6, 4, KEY_QI_VOLUP)>, /* S54 */ | ||
172 | <MATRIX_KEY(6, 5, KEY_QI_VOLDOWN)>, /* S55 */ | ||
173 | <MATRIX_KEY(6, 6, KEY_DOWN)>, /* S56 */ | ||
174 | <MATRIX_KEY(6, 7, KEY_RIGHT)>, /* S57 */ | ||
175 | |||
176 | <MATRIX_KEY(7, 0, KEY_LEFTSHIFT)>, /* S58 */ | ||
177 | <MATRIX_KEY(7, 1, KEY_LEFTALT)>, /* S59 */ | ||
178 | <MATRIX_KEY(7, 2, KEY_QI_FN)>; /* S60 */ | ||
179 | }; | ||
180 | |||
181 | spi { | ||
182 | compatible = "spi-gpio"; | ||
183 | #address-cells = <1>; | ||
184 | #size-cells = <0>; | ||
185 | |||
186 | sck-gpios = <&gpc 23 GPIO_ACTIVE_HIGH>; | ||
187 | mosi-gpios = <&gpc 22 GPIO_ACTIVE_HIGH>; | ||
188 | cs-gpios = <&gpc 21 GPIO_ACTIVE_LOW>; | ||
189 | num-chipselects = <1>; | ||
190 | }; | ||
191 | |||
192 | usb_charger: charger { | ||
193 | compatible = "gpio-charger"; | ||
194 | charger-type = "usb-sdp"; | ||
195 | gpios = <&gpd 28 GPIO_ACTIVE_LOW>; | ||
196 | status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>; | ||
197 | }; | ||
198 | |||
199 | simple_battery: battery { | ||
200 | compatible = "simple-battery"; | ||
201 | voltage-min-design-microvolt = <3600000>; | ||
202 | voltage-max-design-microvolt = <4200000>; | ||
203 | }; | ||
204 | |||
205 | pmu { | ||
206 | compatible = "ingenic,jz4740-battery"; | ||
207 | io-channels = <&adc INGENIC_ADC_BATTERY>; | ||
208 | io-channel-names = "battery"; | ||
209 | power-supplies = <&usb_charger>; | ||
210 | monitored-battery = <&simple_battery>; | ||
211 | }; | ||
212 | |||
213 | hwmon { | ||
214 | compatible = "iio-hwmon"; | ||
215 | io-channels = <&adc INGENIC_ADC_AUX>; | ||
216 | }; | ||
217 | |||
218 | panel: panel { | ||
219 | compatible = "giantplus,gpm940b0"; | ||
220 | |||
221 | power-supply = <&vcc>; | ||
222 | |||
223 | port { | ||
224 | panel_input: endpoint { | ||
225 | remote-endpoint = <&panel_output>; | ||
226 | }; | ||
227 | }; | ||
228 | }; | ||
229 | |||
230 | usb_phy: usb-phy { | ||
231 | compatible = "usb-nop-xceiv"; | ||
232 | #phy-cells = <0>; | ||
233 | |||
234 | vcc-supply = <&vcc>; | ||
235 | }; | ||
236 | }; | ||
237 | |||
238 | &ext { | ||
239 | clock-frequency = <12000000>; | ||
240 | }; | ||
241 | |||
242 | &rtc_dev { | ||
243 | system-power-controller; | ||
244 | }; | ||
245 | |||
246 | &uart0 { | ||
247 | pinctrl-names = "default"; | ||
248 | pinctrl-0 = <&pins_uart0>; | ||
249 | }; | ||
250 | |||
251 | &uart1 { | ||
252 | status = "disabled"; | ||
253 | }; | ||
254 | |||
255 | &nemc { | ||
256 | nandc: nand-controller@1 { | ||
257 | compatible = "ingenic,jz4740-nand"; | ||
258 | reg = <1 0 0x4000000>; | ||
259 | |||
260 | #address-cells = <1>; | ||
261 | #size-cells = <0>; | ||
262 | |||
263 | ecc-engine = <&ecc>; | ||
264 | |||
265 | pinctrl-names = "default"; | ||
266 | pinctrl-0 = <&pins_nemc>; | ||
267 | |||
268 | rb-gpios = <&gpc 30 GPIO_ACTIVE_HIGH>; | ||
269 | |||
270 | nand@1 { | ||
271 | reg = <1>; | ||
272 | |||
273 | nand-ecc-step-size = <512>; | ||
274 | nand-ecc-strength = <4>; | ||
275 | nand-ecc-mode = "hw"; | ||
276 | nand-is-boot-medium; | ||
277 | nand-on-flash-bbt; | ||
278 | |||
279 | partitions { | ||
280 | compatible = "fixed-partitions"; | ||
281 | #address-cells = <1>; | ||
282 | #size-cells = <1>; | ||
283 | |||
284 | partition@0 { | ||
285 | label = "boot"; | ||
286 | reg = <0x0 0x400000>; | ||
287 | }; | ||
288 | |||
289 | partition@400000 { | ||
290 | label = "kernel"; | ||
291 | reg = <0x400000 0x400000>; | ||
292 | }; | ||
293 | |||
294 | partition@800000 { | ||
295 | label = "rootfs"; | ||
296 | reg = <0x800000 0x0>; | ||
297 | }; | ||
298 | }; | ||
299 | }; | ||
300 | }; | ||
301 | }; | ||
302 | |||
303 | &lcd { | ||
304 | pinctrl-names = "default"; | ||
305 | pinctrl-0 = <&pins_lcd>; | ||
306 | |||
307 | port { | ||
308 | panel_output: endpoint { | ||
309 | remote-endpoint = <&panel_input>; | ||
310 | }; | ||
311 | }; | ||
312 | }; | ||
313 | |||
314 | &udc { | ||
315 | phys = <&usb_phy>; | ||
316 | }; | ||
317 | |||
318 | &pinctrl { | ||
319 | pins_lcd: lcd { | ||
320 | function = "lcd"; | ||
321 | groups = "lcd-8bit"; | ||
322 | }; | ||
323 | |||
324 | pins_nemc: nemc { | ||
325 | function = "nand"; | ||
326 | groups = "nand-fre-fwe", "nand-cs1"; | ||
327 | }; | ||
328 | |||
329 | pins_uart0: uart0 { | ||
330 | function = "uart0"; | ||
331 | groups = "uart0-data"; | ||
332 | bias-disable; | ||
333 | }; | ||
334 | |||
335 | pins_mmc: mmc { | ||
336 | mmc { | ||
337 | function = "mmc"; | ||
338 | groups = "mmc-1bit", "mmc-4bit"; | ||
339 | bias-disable; | ||
340 | }; | ||
341 | |||
342 | mmc-gpios { | ||
343 | pins = "PD0", "PD2"; | ||
344 | bias-disable; | ||
345 | }; | ||
346 | }; | ||
347 | }; | ||
348 | |||
349 | &mmc { | ||
350 | bus-width = <4>; | ||
351 | max-frequency = <24000000>; | ||
352 | cd-gpios = <&gpd 0 GPIO_ACTIVE_HIGH>; | ||
353 | vmmc-supply = <&mmc_power>; | ||
354 | |||
355 | pinctrl-names = "default"; | ||
356 | pinctrl-0 = <&pins_mmc>; | ||
357 | }; | ||
358 | |||
359 | &tcu { | ||
360 | /* 750 kHz for the system timer and clocksource */ | ||
361 | assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>; | ||
362 | assigned-clock-rates = <750000>, <750000>; | ||
363 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/rs90.dts b/arch/mips/boot/dts/ingenic/rs90.dts new file mode 100644 index 000000000..4eb1edbfc --- /dev/null +++ b/arch/mips/boot/dts/ingenic/rs90.dts | |||
@@ -0,0 +1,315 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "jz4725b.dtsi" | ||
5 | |||
6 | #include <dt-bindings/gpio/gpio.h> | ||
7 | #include <dt-bindings/iio/adc/ingenic,adc.h> | ||
8 | #include <dt-bindings/input/linux-event-codes.h> | ||
9 | |||
10 | / { | ||
11 | compatible = "ylm,rs90", "ingenic,jz4725b"; | ||
12 | model = "RS-90"; | ||
13 | |||
14 | memory { | ||
15 | device_type = "memory"; | ||
16 | reg = <0x0 0x2000000>; | ||
17 | }; | ||
18 | |||
19 | vcc: regulator { | ||
20 | compatible = "regulator-fixed"; | ||
21 | |||
22 | regulator-name = "vcc"; | ||
23 | regulaor-min-microvolt = <3300000>; | ||
24 | regulaor-max-microvolt = <3300000>; | ||
25 | regulator-always-on; | ||
26 | }; | ||
27 | |||
28 | backlight: backlight { | ||
29 | compatible = "pwm-backlight"; | ||
30 | pwms = <&pwm 3 40000 0>; | ||
31 | |||
32 | brightness-levels = <0 16 32 48 64 80 112 144 192 255>; | ||
33 | default-brightness-level = <8>; | ||
34 | |||
35 | pinctrl-names = "default"; | ||
36 | pinctrl-0 = <&pins_pwm3>; | ||
37 | |||
38 | power-supply = <&vcc>; | ||
39 | }; | ||
40 | |||
41 | keys@0 { | ||
42 | compatible = "gpio-keys"; | ||
43 | #address-cells = <1>; | ||
44 | #size-cells = <0>; | ||
45 | |||
46 | key@0 { | ||
47 | label = "D-pad up"; | ||
48 | linux,code = <KEY_UP>; | ||
49 | gpios = <&gpc 10 GPIO_ACTIVE_LOW>; | ||
50 | }; | ||
51 | |||
52 | key@1 { | ||
53 | label = "D-pad down"; | ||
54 | linux,code = <KEY_DOWN>; | ||
55 | gpios = <&gpc 11 GPIO_ACTIVE_LOW>; | ||
56 | }; | ||
57 | |||
58 | key@2 { | ||
59 | label = "D-pad left"; | ||
60 | linux,code = <KEY_LEFT>; | ||
61 | gpios = <&gpb 31 GPIO_ACTIVE_LOW>; | ||
62 | }; | ||
63 | |||
64 | key@3 { | ||
65 | label = "D-pad right"; | ||
66 | linux,code = <KEY_RIGHT>; | ||
67 | gpios = <&gpd 21 GPIO_ACTIVE_LOW>; | ||
68 | }; | ||
69 | |||
70 | key@4 { | ||
71 | label = "Button A"; | ||
72 | linux,code = <KEY_LEFTCTRL>; | ||
73 | gpios = <&gpc 31 GPIO_ACTIVE_LOW>; | ||
74 | }; | ||
75 | |||
76 | key@5 { | ||
77 | label = "Button B"; | ||
78 | linux,code = <KEY_LEFTALT>; | ||
79 | gpios = <&gpc 30 GPIO_ACTIVE_LOW>; | ||
80 | }; | ||
81 | |||
82 | key@6 { | ||
83 | label = "Right shoulder button"; | ||
84 | linux,code = <KEY_BACKSPACE>; | ||
85 | gpios = <&gpc 12 GPIO_ACTIVE_LOW>; | ||
86 | debounce-interval = <10>; | ||
87 | }; | ||
88 | |||
89 | key@7 { | ||
90 | label = "Start button"; | ||
91 | linux,code = <KEY_ENTER>; | ||
92 | gpios = <&gpd 17 GPIO_ACTIVE_LOW>; | ||
93 | }; | ||
94 | }; | ||
95 | |||
96 | keys@1 { | ||
97 | compatible = "adc-keys"; | ||
98 | io-channels = <&adc INGENIC_ADC_AUX>; | ||
99 | io-channel-names = "buttons"; | ||
100 | keyup-threshold-microvolt = <1400000>; | ||
101 | poll-interval = <30>; | ||
102 | |||
103 | key@0 { | ||
104 | label = "Left shoulder button"; | ||
105 | linux,code = <KEY_TAB>; | ||
106 | press-threshold-microvolt = <800000>; | ||
107 | }; | ||
108 | |||
109 | key@1 { | ||
110 | label = "Select button"; | ||
111 | linux,code = <KEY_ESC>; | ||
112 | press-threshold-microvolt = <1100000>; | ||
113 | }; | ||
114 | }; | ||
115 | |||
116 | amp: analog-amplifier { | ||
117 | compatible = "simple-audio-amplifier"; | ||
118 | enable-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>; | ||
119 | |||
120 | VCC-supply = <&vcc>; | ||
121 | }; | ||
122 | |||
123 | sound { | ||
124 | compatible = "simple-audio-card"; | ||
125 | |||
126 | simple-audio-card,name = "rs90-audio"; | ||
127 | simple-audio-card,format = "i2s"; | ||
128 | |||
129 | simple-audio-card,widgets = | ||
130 | "Speaker", "Speaker", | ||
131 | "Headphone", "Headphones"; | ||
132 | simple-audio-card,routing = | ||
133 | "INL", "LHPOUT", | ||
134 | "INR", "RHPOUT", | ||
135 | "Headphones", "LHPOUT", | ||
136 | "Headphones", "RHPOUT", | ||
137 | "Speaker", "OUTL", | ||
138 | "Speaker", "OUTR"; | ||
139 | simple-audio-card,pin-switches = "Speaker"; | ||
140 | |||
141 | simple-audio-card,hp-det-gpio = <&gpd 16 GPIO_ACTIVE_LOW>; | ||
142 | simple-audio-card,aux-devs = <&>; | ||
143 | |||
144 | simple-audio-card,bitclock-master = <&dai_codec>; | ||
145 | simple-audio-card,frame-master = <&dai_codec>; | ||
146 | |||
147 | dai_cpu: simple-audio-card,cpu { | ||
148 | sound-dai = <&aic>; | ||
149 | }; | ||
150 | |||
151 | dai_codec: simple-audio-card,codec { | ||
152 | sound-dai = <&codec>; | ||
153 | }; | ||
154 | |||
155 | }; | ||
156 | |||
157 | usb_phy: usb-phy { | ||
158 | compatible = "usb-nop-xceiv"; | ||
159 | #phy-cells = <0>; | ||
160 | |||
161 | clocks = <&cgu JZ4725B_CLK_UDC_PHY>; | ||
162 | clock-names = "main_clk"; | ||
163 | vcc-supply = <&vcc>; | ||
164 | }; | ||
165 | |||
166 | panel { | ||
167 | compatible = "sharp,ls020b1dd01d"; | ||
168 | |||
169 | backlight = <&backlight>; | ||
170 | power-supply = <&vcc>; | ||
171 | |||
172 | port { | ||
173 | panel_input: endpoint { | ||
174 | remote-endpoint = <&panel_output>; | ||
175 | }; | ||
176 | }; | ||
177 | }; | ||
178 | }; | ||
179 | |||
180 | &ext { | ||
181 | clock-frequency = <12000000>; | ||
182 | }; | ||
183 | |||
184 | &rtc_dev { | ||
185 | system-power-controller; | ||
186 | }; | ||
187 | |||
188 | &udc { | ||
189 | phys = <&usb_phy>; | ||
190 | }; | ||
191 | |||
192 | &pinctrl { | ||
193 | pins_mmc1: mmc1 { | ||
194 | function = "mmc1"; | ||
195 | groups = "mmc1-1bit"; | ||
196 | }; | ||
197 | |||
198 | pins_nemc: nemc { | ||
199 | function = "nand"; | ||
200 | groups = "nand-cs1", "nand-cle-ale", "nand-fre-fwe"; | ||
201 | }; | ||
202 | |||
203 | pins_pwm3: pwm3 { | ||
204 | function = "pwm3"; | ||
205 | groups = "pwm3"; | ||
206 | bias-disable; | ||
207 | }; | ||
208 | |||
209 | pins_lcd: lcd { | ||
210 | function = "lcd"; | ||
211 | groups = "lcd-8bit", "lcd-16bit", "lcd-special"; | ||
212 | }; | ||
213 | }; | ||
214 | |||
215 | &mmc0 { | ||
216 | status = "disabled"; | ||
217 | }; | ||
218 | |||
219 | &mmc1 { | ||
220 | bus-width = <1>; | ||
221 | max-frequency = <48000000>; | ||
222 | |||
223 | pinctrl-names = "default"; | ||
224 | pinctrl-0 = <&pins_mmc1>; | ||
225 | |||
226 | cd-gpios = <&gpc 20 GPIO_ACTIVE_LOW>; | ||
227 | }; | ||
228 | |||
229 | &uart { | ||
230 | /* | ||
231 | * The pins for RX/TX are used for the right shoulder button and | ||
232 | * backlight PWM. | ||
233 | */ | ||
234 | status = "disabled"; | ||
235 | }; | ||
236 | |||
237 | &nemc { | ||
238 | nandc: nand-controller@1 { | ||
239 | compatible = "ingenic,jz4725b-nand"; | ||
240 | reg = <1 0 0x4000000>; | ||
241 | |||
242 | #address-cells = <1>; | ||
243 | #size-cells = <0>; | ||
244 | |||
245 | ecc-engine = <&bch>; | ||
246 | |||
247 | ingenic,nemc-tAS = <10>; | ||
248 | ingenic,nemc-tAH = <5>; | ||
249 | ingenic,nemc-tBP = <10>; | ||
250 | ingenic,nemc-tAW = <15>; | ||
251 | ingenic,nemc-tSTRV = <100>; | ||
252 | |||
253 | pinctrl-names = "default"; | ||
254 | pinctrl-0 = <&pins_nemc>; | ||
255 | |||
256 | rb-gpios = <&gpc 27 GPIO_ACTIVE_HIGH>; | ||
257 | |||
258 | nand@1 { | ||
259 | reg = <1>; | ||
260 | |||
261 | nand-ecc-step-size = <512>; | ||
262 | nand-ecc-strength = <8>; | ||
263 | nand-ecc-mode = "hw"; | ||
264 | nand-is-boot-medium; | ||
265 | nand-on-flash-bbt; | ||
266 | |||
267 | partitions { | ||
268 | compatible = "fixed-partitions"; | ||
269 | #address-cells = <1>; | ||
270 | #size-cells = <1>; | ||
271 | |||
272 | partition@0 { | ||
273 | label = "bootloader"; | ||
274 | reg = <0x0 0x20000>; | ||
275 | }; | ||
276 | |||
277 | partition@20000 { | ||
278 | label = "system"; | ||
279 | reg = <0x20000 0x0>; | ||
280 | }; | ||
281 | }; | ||
282 | }; | ||
283 | }; | ||
284 | }; | ||
285 | |||
286 | &cgu { | ||
287 | /* Use 32kHz oscillator as the parent of the RTC clock */ | ||
288 | assigned-clocks = <&cgu JZ4725B_CLK_RTC>; | ||
289 | assigned-clock-parents = <&cgu JZ4725B_CLK_OSC32K>; | ||
290 | }; | ||
291 | |||
292 | &tcu { | ||
293 | /* | ||
294 | * 750 kHz for the system timer and clocksource, and use RTC as the | ||
295 | * parent for the watchdog clock. | ||
296 | */ | ||
297 | assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, <&tcu TCU_CLK_WDT>; | ||
298 | assigned-clock-parents = <0>, <0>, <&cgu JZ4725B_CLK_RTC>; | ||
299 | assigned-clock-rates = <750000>, <750000>; | ||
300 | }; | ||
301 | |||
302 | &lcd { | ||
303 | pinctrl-names = "default"; | ||
304 | pinctrl-0 = <&pins_lcd>; | ||
305 | }; | ||
306 | |||
307 | &lcd_ports { | ||
308 | port@0 { | ||
309 | reg = <0>; | ||
310 | |||
311 | panel_output: endpoint { | ||
312 | remote-endpoint = <&panel_input>; | ||
313 | }; | ||
314 | }; | ||
315 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi new file mode 100644 index 000000000..1f1f896dd --- /dev/null +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi | |||
@@ -0,0 +1,326 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
3 | #include <dt-bindings/clock/x1000-cgu.h> | ||
4 | #include <dt-bindings/dma/x1000-dma.h> | ||
5 | |||
6 | / { | ||
7 | #address-cells = <1>; | ||
8 | #size-cells = <1>; | ||
9 | compatible = "ingenic,x1000", "ingenic,x1000e"; | ||
10 | |||
11 | cpus { | ||
12 | #address-cells = <1>; | ||
13 | #size-cells = <0>; | ||
14 | |||
15 | cpu0: cpu@0 { | ||
16 | device_type = "cpu"; | ||
17 | compatible = "ingenic,xburst-fpu1.0-mxu1.1"; | ||
18 | reg = <0>; | ||
19 | |||
20 | clocks = <&cgu X1000_CLK_CPU>; | ||
21 | clock-names = "cpu"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | cpuintc: interrupt-controller { | ||
26 | #address-cells = <0>; | ||
27 | #interrupt-cells = <1>; | ||
28 | interrupt-controller; | ||
29 | compatible = "mti,cpu-interrupt-controller"; | ||
30 | }; | ||
31 | |||
32 | intc: interrupt-controller@10001000 { | ||
33 | compatible = "ingenic,x1000-intc", "ingenic,jz4780-intc"; | ||
34 | reg = <0x10001000 0x50>; | ||
35 | |||
36 | interrupt-controller; | ||
37 | #interrupt-cells = <1>; | ||
38 | |||
39 | interrupt-parent = <&cpuintc>; | ||
40 | interrupts = <2>; | ||
41 | }; | ||
42 | |||
43 | exclk: ext { | ||
44 | compatible = "fixed-clock"; | ||
45 | #clock-cells = <0>; | ||
46 | }; | ||
47 | |||
48 | rtclk: rtc { | ||
49 | compatible = "fixed-clock"; | ||
50 | #clock-cells = <0>; | ||
51 | clock-frequency = <32768>; | ||
52 | }; | ||
53 | |||
54 | cgu: x1000-cgu@10000000 { | ||
55 | compatible = "ingenic,x1000-cgu"; | ||
56 | reg = <0x10000000 0x100>; | ||
57 | |||
58 | #clock-cells = <1>; | ||
59 | |||
60 | clocks = <&exclk>, <&rtclk>; | ||
61 | clock-names = "ext", "rtc"; | ||
62 | }; | ||
63 | |||
64 | tcu: timer@10002000 { | ||
65 | compatible = "ingenic,x1000-tcu", "simple-mfd"; | ||
66 | reg = <0x10002000 0x1000>; | ||
67 | #address-cells = <1>; | ||
68 | #size-cells = <1>; | ||
69 | ranges = <0x0 0x10002000 0x1000>; | ||
70 | |||
71 | #clock-cells = <1>; | ||
72 | |||
73 | clocks = <&cgu X1000_CLK_RTCLK>, | ||
74 | <&cgu X1000_CLK_EXCLK>, | ||
75 | <&cgu X1000_CLK_PCLK>; | ||
76 | clock-names = "rtc", "ext", "pclk"; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&intc>; | ||
82 | interrupts = <27 26 25>; | ||
83 | |||
84 | wdt: watchdog@0 { | ||
85 | compatible = "ingenic,x1000-watchdog", "ingenic,jz4780-watchdog"; | ||
86 | reg = <0x0 0x10>; | ||
87 | |||
88 | clocks = <&tcu TCU_CLK_WDT>; | ||
89 | clock-names = "wdt"; | ||
90 | }; | ||
91 | }; | ||
92 | |||
93 | rtc: rtc@10003000 { | ||
94 | compatible = "ingenic,x1000-rtc", "ingenic,jz4780-rtc"; | ||
95 | reg = <0x10003000 0x4c>; | ||
96 | |||
97 | interrupt-parent = <&intc>; | ||
98 | interrupts = <32>; | ||
99 | |||
100 | clocks = <&cgu X1000_CLK_RTCLK>; | ||
101 | clock-names = "rtc"; | ||
102 | }; | ||
103 | |||
104 | pinctrl: pin-controller@10010000 { | ||
105 | compatible = "ingenic,x1000-pinctrl"; | ||
106 | reg = <0x10010000 0x800>; | ||
107 | #address-cells = <1>; | ||
108 | #size-cells = <0>; | ||
109 | |||
110 | gpa: gpio@0 { | ||
111 | compatible = "ingenic,x1000-gpio"; | ||
112 | reg = <0>; | ||
113 | |||
114 | gpio-controller; | ||
115 | gpio-ranges = <&pinctrl 0 0 32>; | ||
116 | #gpio-cells = <2>; | ||
117 | |||
118 | interrupt-controller; | ||
119 | #interrupt-cells = <2>; | ||
120 | |||
121 | interrupt-parent = <&intc>; | ||
122 | interrupts = <17>; | ||
123 | }; | ||
124 | |||
125 | gpb: gpio@1 { | ||
126 | compatible = "ingenic,x1000-gpio"; | ||
127 | reg = <1>; | ||
128 | |||
129 | gpio-controller; | ||
130 | gpio-ranges = <&pinctrl 0 32 32>; | ||
131 | #gpio-cells = <2>; | ||
132 | |||
133 | interrupt-controller; | ||
134 | #interrupt-cells = <2>; | ||
135 | |||
136 | interrupt-parent = <&intc>; | ||
137 | interrupts = <16>; | ||
138 | }; | ||
139 | |||
140 | gpc: gpio@2 { | ||
141 | compatible = "ingenic,x1000-gpio"; | ||
142 | reg = <2>; | ||
143 | |||
144 | gpio-controller; | ||
145 | gpio-ranges = <&pinctrl 0 64 32>; | ||
146 | #gpio-cells = <2>; | ||
147 | |||
148 | interrupt-controller; | ||
149 | #interrupt-cells = <2>; | ||
150 | |||
151 | interrupt-parent = <&intc>; | ||
152 | interrupts = <15>; | ||
153 | }; | ||
154 | |||
155 | gpd: gpio@3 { | ||
156 | compatible = "ingenic,x1000-gpio"; | ||
157 | reg = <3>; | ||
158 | |||
159 | gpio-controller; | ||
160 | gpio-ranges = <&pinctrl 0 96 32>; | ||
161 | #gpio-cells = <2>; | ||
162 | |||
163 | interrupt-controller; | ||
164 | #interrupt-cells = <2>; | ||
165 | |||
166 | interrupt-parent = <&intc>; | ||
167 | interrupts = <14>; | ||
168 | }; | ||
169 | }; | ||
170 | |||
171 | uart0: serial@10030000 { | ||
172 | compatible = "ingenic,x1000-uart"; | ||
173 | reg = <0x10030000 0x100>; | ||
174 | |||
175 | interrupt-parent = <&intc>; | ||
176 | interrupts = <51>; | ||
177 | |||
178 | clocks = <&exclk>, <&cgu X1000_CLK_UART0>; | ||
179 | clock-names = "baud", "module"; | ||
180 | |||
181 | status = "disabled"; | ||
182 | }; | ||
183 | |||
184 | uart1: serial@10031000 { | ||
185 | compatible = "ingenic,x1000-uart"; | ||
186 | reg = <0x10031000 0x100>; | ||
187 | |||
188 | interrupt-parent = <&intc>; | ||
189 | interrupts = <50>; | ||
190 | |||
191 | clocks = <&exclk>, <&cgu X1000_CLK_UART1>; | ||
192 | clock-names = "baud", "module"; | ||
193 | |||
194 | status = "disabled"; | ||
195 | }; | ||
196 | |||
197 | uart2: serial@10032000 { | ||
198 | compatible = "ingenic,x1000-uart"; | ||
199 | reg = <0x10032000 0x100>; | ||
200 | |||
201 | interrupt-parent = <&intc>; | ||
202 | interrupts = <49>; | ||
203 | |||
204 | clocks = <&exclk>, <&cgu X1000_CLK_UART2>; | ||
205 | clock-names = "baud", "module"; | ||
206 | |||
207 | status = "disabled"; | ||
208 | }; | ||
209 | |||
210 | i2c0: i2c-controller@10050000 { | ||
211 | compatible = "ingenic,x1000-i2c"; | ||
212 | reg = <0x10050000 0x1000>; | ||
213 | #address-cells = <1>; | ||
214 | #size-cells = <0>; | ||
215 | |||
216 | interrupt-parent = <&intc>; | ||
217 | interrupts = <60>; | ||
218 | |||
219 | clocks = <&cgu X1000_CLK_I2C0>; | ||
220 | |||
221 | status = "disabled"; | ||
222 | }; | ||
223 | |||
224 | i2c1: i2c-controller@10051000 { | ||
225 | compatible = "ingenic,x1000-i2c"; | ||
226 | reg = <0x10051000 0x1000>; | ||
227 | #address-cells = <1>; | ||
228 | #size-cells = <0>; | ||
229 | |||
230 | interrupt-parent = <&intc>; | ||
231 | interrupts = <59>; | ||
232 | |||
233 | clocks = <&cgu X1000_CLK_I2C1>; | ||
234 | |||
235 | status = "disabled"; | ||
236 | }; | ||
237 | |||
238 | i2c2: i2c-controller@10052000 { | ||
239 | compatible = "ingenic,x1000-i2c"; | ||
240 | reg = <0x10052000 0x1000>; | ||
241 | #address-cells = <1>; | ||
242 | #size-cells = <0>; | ||
243 | |||
244 | interrupt-parent = <&intc>; | ||
245 | interrupts = <58>; | ||
246 | |||
247 | clocks = <&cgu X1000_CLK_I2C2>; | ||
248 | |||
249 | status = "disabled"; | ||
250 | }; | ||
251 | |||
252 | pdma: dma-controller@13420000 { | ||
253 | compatible = "ingenic,x1000-dma"; | ||
254 | reg = <0x13420000 0x400>, <0x13421000 0x40>; | ||
255 | #dma-cells = <2>; | ||
256 | |||
257 | interrupt-parent = <&intc>; | ||
258 | interrupts = <10>; | ||
259 | |||
260 | clocks = <&cgu X1000_CLK_PDMA>; | ||
261 | }; | ||
262 | |||
263 | msc0: mmc@13450000 { | ||
264 | compatible = "ingenic,x1000-mmc"; | ||
265 | reg = <0x13450000 0x1000>; | ||
266 | |||
267 | interrupt-parent = <&intc>; | ||
268 | interrupts = <37>; | ||
269 | |||
270 | clocks = <&cgu X1000_CLK_MSC0>; | ||
271 | clock-names = "mmc"; | ||
272 | |||
273 | cap-sd-highspeed; | ||
274 | cap-mmc-highspeed; | ||
275 | cap-sdio-irq; | ||
276 | |||
277 | dmas = <&pdma X1000_DMA_MSC0_RX 0xffffffff>, | ||
278 | <&pdma X1000_DMA_MSC0_TX 0xffffffff>; | ||
279 | dma-names = "rx", "tx"; | ||
280 | |||
281 | status = "disabled"; | ||
282 | }; | ||
283 | |||
284 | msc1: mmc@13460000 { | ||
285 | compatible = "ingenic,x1000-mmc"; | ||
286 | reg = <0x13460000 0x1000>; | ||
287 | |||
288 | interrupt-parent = <&intc>; | ||
289 | interrupts = <36>; | ||
290 | |||
291 | clocks = <&cgu X1000_CLK_MSC1>; | ||
292 | clock-names = "mmc"; | ||
293 | |||
294 | cap-sd-highspeed; | ||
295 | cap-mmc-highspeed; | ||
296 | cap-sdio-irq; | ||
297 | |||
298 | dmas = <&pdma X1000_DMA_MSC1_RX 0xffffffff>, | ||
299 | <&pdma X1000_DMA_MSC1_TX 0xffffffff>; | ||
300 | dma-names = "rx", "tx"; | ||
301 | |||
302 | status = "disabled"; | ||
303 | }; | ||
304 | |||
305 | mac: ethernet@134b0000 { | ||
306 | compatible = "ingenic,x1000-mac", "snps,dwmac"; | ||
307 | reg = <0x134b0000 0x2000>; | ||
308 | |||
309 | interrupt-parent = <&intc>; | ||
310 | interrupts = <55>; | ||
311 | interrupt-names = "macirq"; | ||
312 | |||
313 | clocks = <&cgu X1000_CLK_MAC>; | ||
314 | clock-names = "stmmaceth"; | ||
315 | |||
316 | status = "disabled"; | ||
317 | |||
318 | mdio: mdio { | ||
319 | compatible = "snps,dwmac-mdio"; | ||
320 | #address-cells = <1>; | ||
321 | #size-cells = <0>; | ||
322 | |||
323 | status = "disabled"; | ||
324 | }; | ||
325 | }; | ||
326 | }; | ||
diff --git a/arch/mips/boot/dts/ingenic/x1830.dtsi b/arch/mips/boot/dts/ingenic/x1830.dtsi new file mode 100644 index 000000000..b05dac3ae --- /dev/null +++ b/arch/mips/boot/dts/ingenic/x1830.dtsi | |||
@@ -0,0 +1,314 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/ingenic,tcu.h> | ||
3 | #include <dt-bindings/clock/x1830-cgu.h> | ||
4 | #include <dt-bindings/dma/x1830-dma.h> | ||
5 | |||
6 | / { | ||
7 | #address-cells = <1>; | ||
8 | #size-cells = <1>; | ||
9 | compatible = "ingenic,x1830"; | ||
10 | |||
11 | cpus { | ||
12 | #address-cells = <1>; | ||
13 | #size-cells = <0>; | ||
14 | |||
15 | cpu0: cpu@0 { | ||
16 | device_type = "cpu"; | ||
17 | compatible = "ingenic,xburst-fpu2.0-mxu2.0"; | ||
18 | reg = <0>; | ||
19 | |||
20 | clocks = <&cgu X1830_CLK_CPU>; | ||
21 | clock-names = "cpu"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | cpuintc: interrupt-controller { | ||
26 | #address-cells = <0>; | ||
27 | #interrupt-cells = <1>; | ||
28 | interrupt-controller; | ||
29 | compatible = "mti,cpu-interrupt-controller"; | ||
30 | }; | ||
31 | |||
32 | intc: interrupt-controller@10001000 { | ||
33 | compatible = "ingenic,x1830-intc", "ingenic,jz4780-intc"; | ||
34 | reg = <0x10001000 0x50>; | ||
35 | |||
36 | interrupt-controller; | ||
37 | #interrupt-cells = <1>; | ||
38 | |||
39 | interrupt-parent = <&cpuintc>; | ||
40 | interrupts = <2>; | ||
41 | }; | ||
42 | |||
43 | exclk: ext { | ||
44 | compatible = "fixed-clock"; | ||
45 | #clock-cells = <0>; | ||
46 | }; | ||
47 | |||
48 | rtclk: rtc { | ||
49 | compatible = "fixed-clock"; | ||
50 | #clock-cells = <0>; | ||
51 | clock-frequency = <32768>; | ||
52 | }; | ||
53 | |||
54 | cgu: x1830-cgu@10000000 { | ||
55 | compatible = "ingenic,x1830-cgu"; | ||
56 | reg = <0x10000000 0x100>; | ||
57 | |||
58 | #clock-cells = <1>; | ||
59 | |||
60 | clocks = <&exclk>, <&rtclk>; | ||
61 | clock-names = "ext", "rtc"; | ||
62 | }; | ||
63 | |||
64 | tcu: timer@10002000 { | ||
65 | compatible = "ingenic,x1830-tcu", "ingenic,x1000-tcu", "simple-mfd"; | ||
66 | reg = <0x10002000 0x1000>; | ||
67 | #address-cells = <1>; | ||
68 | #size-cells = <1>; | ||
69 | ranges = <0x0 0x10002000 0x1000>; | ||
70 | |||
71 | #clock-cells = <1>; | ||
72 | |||
73 | clocks = <&cgu X1830_CLK_RTCLK | ||
74 | &cgu X1830_CLK_EXCLK | ||
75 | &cgu X1830_CLK_PCLK>; | ||
76 | clock-names = "rtc", "ext", "pclk"; | ||
77 | |||
78 | interrupt-controller; | ||
79 | #interrupt-cells = <1>; | ||
80 | |||
81 | interrupt-parent = <&intc>; | ||
82 | interrupts = <27 26 25>; | ||
83 | |||
84 | wdt: watchdog@0 { | ||
85 | compatible = "ingenic,x1830-watchdog", "ingenic,jz4780-watchdog"; | ||
86 | reg = <0x0 0x10>; | ||
87 | |||
88 | clocks = <&tcu TCU_CLK_WDT>; | ||
89 | clock-names = "wdt"; | ||
90 | }; | ||
91 | }; | ||
92 | |||
93 | rtc: rtc@10003000 { | ||
94 | compatible = "ingenic,x1830-rtc", "ingenic,jz4780-rtc"; | ||
95 | reg = <0x10003000 0x4c>; | ||
96 | |||
97 | interrupt-parent = <&intc>; | ||
98 | interrupts = <32>; | ||
99 | |||
100 | clocks = <&cgu X1830_CLK_RTCLK>; | ||
101 | clock-names = "rtc"; | ||
102 | }; | ||
103 | |||
104 | pinctrl: pin-controller@10010000 { | ||
105 | compatible = "ingenic,x1830-pinctrl"; | ||
106 | reg = <0x10010000 0x800>; | ||
107 | #address-cells = <1>; | ||
108 | #size-cells = <0>; | ||
109 | |||
110 | gpa: gpio@0 { | ||
111 | compatible = "ingenic,x1830-gpio"; | ||
112 | reg = <0>; | ||
113 | |||
114 | gpio-controller; | ||
115 | gpio-ranges = <&pinctrl 0 0 32>; | ||
116 | #gpio-cells = <2>; | ||
117 | |||
118 | interrupt-controller; | ||
119 | #interrupt-cells = <2>; | ||
120 | |||
121 | interrupt-parent = <&intc>; | ||
122 | interrupts = <17>; | ||
123 | }; | ||
124 | |||
125 | gpb: gpio@1 { | ||
126 | compatible = "ingenic,x1830-gpio"; | ||
127 | reg = <1>; | ||
128 | |||
129 | gpio-controller; | ||
130 | gpio-ranges = <&pinctrl 0 32 32>; | ||
131 | #gpio-cells = <2>; | ||
132 | |||
133 | interrupt-controller; | ||
134 | #interrupt-cells = <2>; | ||
135 | |||
136 | interrupt-parent = <&intc>; | ||
137 | interrupts = <16>; | ||
138 | }; | ||
139 | |||
140 | gpc: gpio@2 { | ||
141 | compatible = "ingenic,x1830-gpio"; | ||
142 | reg = <2>; | ||
143 | |||
144 | gpio-controller; | ||
145 | gpio-ranges = <&pinctrl 0 64 32>; | ||
146 | #gpio-cells = <2>; | ||
147 | |||
148 | interrupt-controller; | ||
149 | #interrupt-cells = <2>; | ||
150 | |||
151 | interrupt-parent = <&intc>; | ||
152 | interrupts = <15>; | ||
153 | }; | ||
154 | |||
155 | gpd: gpio@3 { | ||
156 | compatible = "ingenic,x1830-gpio"; | ||
157 | reg = <3>; | ||
158 | |||
159 | gpio-controller; | ||
160 | gpio-ranges = <&pinctrl 0 96 32>; | ||
161 | #gpio-cells = <2>; | ||
162 | |||
163 | interrupt-controller; | ||
164 | #interrupt-cells = <2>; | ||
165 | |||
166 | interrupt-parent = <&intc>; | ||
167 | interrupts = <14>; | ||
168 | }; | ||
169 | }; | ||
170 | |||
171 | uart0: serial@10030000 { | ||
172 | compatible = "ingenic,x1830-uart", "ingenic,x1000-uart"; | ||
173 | reg = <0x10030000 0x100>; | ||
174 | |||
175 | interrupt-parent = <&intc>; | ||
176 | interrupts = <51>; | ||
177 | |||
178 | clocks = <&exclk>, <&cgu X1830_CLK_UART0>; | ||
179 | clock-names = "baud", "module"; | ||
180 | |||
181 | status = "disabled"; | ||
182 | }; | ||
183 | |||
184 | uart1: serial@10031000 { | ||
185 | compatible = "ingenic,x1830-uart", "ingenic,x1000-uart"; | ||
186 | reg = <0x10031000 0x100>; | ||
187 | |||
188 | interrupt-parent = <&intc>; | ||
189 | interrupts = <50>; | ||
190 | |||
191 | clocks = <&exclk>, <&cgu X1830_CLK_UART1>; | ||
192 | clock-names = "baud", "module"; | ||
193 | |||
194 | status = "disabled"; | ||
195 | }; | ||
196 | |||
197 | i2c0: i2c-controller@10050000 { | ||
198 | compatible = "ingenic,x1830-i2c", "ingenic,x1000-i2c"; | ||
199 | reg = <0x10050000 0x1000>; | ||
200 | #address-cells = <1>; | ||
201 | #size-cells = <0>; | ||
202 | |||
203 | interrupt-parent = <&intc>; | ||
204 | interrupts = <60>; | ||
205 | |||
206 | clocks = <&cgu X1830_CLK_SMB0>; | ||
207 | |||
208 | status = "disabled"; | ||
209 | }; | ||
210 | |||
211 | i2c1: i2c-controller@10051000 { | ||
212 | compatible = "ingenic,x1830-i2c", "ingenic,x1000-i2c"; | ||
213 | reg = <0x10051000 0x1000>; | ||
214 | #address-cells = <1>; | ||
215 | #size-cells = <0>; | ||
216 | |||
217 | interrupt-parent = <&intc>; | ||
218 | interrupts = <59>; | ||
219 | |||
220 | clocks = <&cgu X1830_CLK_SMB1>; | ||
221 | |||
222 | status = "disabled"; | ||
223 | }; | ||
224 | |||
225 | i2c2: i2c-controller@10052000 { | ||
226 | compatible = "ingenic,x1830-i2c", "ingenic,x1000-i2c"; | ||
227 | reg = <0x10052000 0x1000>; | ||
228 | #address-cells = <1>; | ||
229 | #size-cells = <0>; | ||
230 | |||
231 | interrupt-parent = <&intc>; | ||
232 | interrupts = <58>; | ||
233 | |||
234 | clocks = <&cgu X1830_CLK_SMB2>; | ||
235 | |||
236 | status = "disabled"; | ||
237 | }; | ||
238 | |||
239 | pdma: dma-controller@13420000 { | ||
240 | compatible = "ingenic,x1830-dma"; | ||
241 | reg = <0x13420000 0x400 | ||
242 | 0x13421000 0x40>; | ||
243 | #dma-cells = <2>; | ||
244 | |||
245 | interrupt-parent = <&intc>; | ||
246 | interrupts = <10>; | ||
247 | |||
248 | clocks = <&cgu X1830_CLK_PDMA>; | ||
249 | }; | ||
250 | |||
251 | msc0: mmc@13450000 { | ||
252 | compatible = "ingenic,x1830-mmc", "ingenic,x1000-mmc"; | ||
253 | reg = <0x13450000 0x1000>; | ||
254 | |||
255 | interrupt-parent = <&intc>; | ||
256 | interrupts = <37>; | ||
257 | |||
258 | clocks = <&cgu X1830_CLK_MSC0>; | ||
259 | clock-names = "mmc"; | ||
260 | |||
261 | cap-sd-highspeed; | ||
262 | cap-mmc-highspeed; | ||
263 | cap-sdio-irq; | ||
264 | |||
265 | dmas = <&pdma X1830_DMA_MSC0_RX 0xffffffff>, | ||
266 | <&pdma X1830_DMA_MSC0_TX 0xffffffff>; | ||
267 | dma-names = "rx", "tx"; | ||
268 | |||
269 | status = "disabled"; | ||
270 | }; | ||
271 | |||
272 | msc1: mmc@13460000 { | ||
273 | compatible = "ingenic,x1830-mmc", "ingenic,x1000-mmc"; | ||
274 | reg = <0x13460000 0x1000>; | ||
275 | |||
276 | interrupt-parent = <&intc>; | ||
277 | interrupts = <36>; | ||
278 | |||
279 | clocks = <&cgu X1830_CLK_MSC1>; | ||
280 | clock-names = "mmc"; | ||
281 | |||
282 | cap-sd-highspeed; | ||
283 | cap-mmc-highspeed; | ||
284 | cap-sdio-irq; | ||
285 | |||
286 | dmas = <&pdma X1830_DMA_MSC1_RX 0xffffffff>, | ||
287 | <&pdma X1830_DMA_MSC1_TX 0xffffffff>; | ||
288 | dma-names = "rx", "tx"; | ||
289 | |||
290 | status = "disabled"; | ||
291 | }; | ||
292 | |||
293 | mac: ethernet@134b0000 { | ||
294 | compatible = "ingenic,x1830-mac", "snps,dwmac"; | ||
295 | reg = <0x134b0000 0x2000>; | ||
296 | |||
297 | interrupt-parent = <&intc>; | ||
298 | interrupts = <55>; | ||
299 | interrupt-names = "macirq"; | ||
300 | |||
301 | clocks = <&cgu X1830_CLK_MAC>; | ||
302 | clock-names = "stmmaceth"; | ||
303 | |||
304 | status = "disabled"; | ||
305 | |||
306 | mdio: mdio { | ||
307 | compatible = "snps,dwmac-mdio"; | ||
308 | #address-cells = <1>; | ||
309 | #size-cells = <0>; | ||
310 | |||
311 | status = "disabled"; | ||
312 | }; | ||
313 | }; | ||
314 | }; | ||
diff --git a/arch/mips/boot/dts/lantiq/Makefile b/arch/mips/boot/dts/lantiq/Makefile new file mode 100644 index 000000000..f5dfc0624 --- /dev/null +++ b/arch/mips/boot/dts/lantiq/Makefile | |||
@@ -0,0 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_DT_EASY50712) += easy50712.dtb | ||
3 | |||
4 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/lantiq/danube.dtsi b/arch/mips/boot/dts/lantiq/danube.dtsi new file mode 100644 index 000000000..510be63c8 --- /dev/null +++ b/arch/mips/boot/dts/lantiq/danube.dtsi | |||
@@ -0,0 +1,106 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "lantiq,xway", "lantiq,danube"; | ||
6 | |||
7 | cpus { | ||
8 | cpu@0 { | ||
9 | compatible = "mips,mips24Kc"; | ||
10 | }; | ||
11 | }; | ||
12 | |||
13 | biu@1f800000 { | ||
14 | #address-cells = <1>; | ||
15 | #size-cells = <1>; | ||
16 | compatible = "lantiq,biu", "simple-bus"; | ||
17 | reg = <0x1f800000 0x800000>; | ||
18 | ranges = <0x0 0x1f800000 0x7fffff>; | ||
19 | |||
20 | icu0: icu@80200 { | ||
21 | #interrupt-cells = <1>; | ||
22 | interrupt-controller; | ||
23 | compatible = "lantiq,icu"; | ||
24 | reg = <0x80200 0x120>; | ||
25 | }; | ||
26 | |||
27 | watchdog@803f0 { | ||
28 | compatible = "lantiq,wdt"; | ||
29 | reg = <0x803f0 0x10>; | ||
30 | }; | ||
31 | }; | ||
32 | |||
33 | sram@1f000000 { | ||
34 | #address-cells = <1>; | ||
35 | #size-cells = <1>; | ||
36 | compatible = "lantiq,sram"; | ||
37 | reg = <0x1f000000 0x800000>; | ||
38 | ranges = <0x0 0x1f000000 0x7fffff>; | ||
39 | |||
40 | eiu0: eiu@101000 { | ||
41 | #interrupt-cells = <1>; | ||
42 | interrupt-controller; | ||
43 | interrupt-parent; | ||
44 | compatible = "lantiq,eiu-xway"; | ||
45 | reg = <0x101000 0x1000>; | ||
46 | }; | ||
47 | |||
48 | pmu0: pmu@102000 { | ||
49 | compatible = "lantiq,pmu-xway"; | ||
50 | reg = <0x102000 0x1000>; | ||
51 | }; | ||
52 | |||
53 | cgu0: cgu@103000 { | ||
54 | compatible = "lantiq,cgu-xway"; | ||
55 | reg = <0x103000 0x1000>; | ||
56 | #clock-cells = <1>; | ||
57 | }; | ||
58 | |||
59 | rcu0: rcu@203000 { | ||
60 | compatible = "lantiq,rcu-xway"; | ||
61 | reg = <0x203000 0x1000>; | ||
62 | }; | ||
63 | }; | ||
64 | |||
65 | fpi@10000000 { | ||
66 | #address-cells = <1>; | ||
67 | #size-cells = <1>; | ||
68 | compatible = "lantiq,fpi", "simple-bus"; | ||
69 | ranges = <0x0 0x10000000 0xeefffff>; | ||
70 | reg = <0x10000000 0xef00000>; | ||
71 | |||
72 | gptu@e100a00 { | ||
73 | compatible = "lantiq,gptu-xway"; | ||
74 | reg = <0xe100a00 0x100>; | ||
75 | }; | ||
76 | |||
77 | serial@e100c00 { | ||
78 | compatible = "lantiq,asc"; | ||
79 | reg = <0xe100c00 0x400>; | ||
80 | interrupt-parent = <&icu0>; | ||
81 | interrupts = <112 113 114>; | ||
82 | }; | ||
83 | |||
84 | dma0: dma@e104100 { | ||
85 | compatible = "lantiq,dma-xway"; | ||
86 | reg = <0xe104100 0x800>; | ||
87 | }; | ||
88 | |||
89 | ebu0: ebu@e105300 { | ||
90 | compatible = "lantiq,ebu-xway"; | ||
91 | reg = <0xe105300 0x100>; | ||
92 | }; | ||
93 | |||
94 | pci0: pci@e105400 { | ||
95 | #address-cells = <3>; | ||
96 | #size-cells = <2>; | ||
97 | #interrupt-cells = <1>; | ||
98 | compatible = "lantiq,pci-xway"; | ||
99 | bus-range = <0x0 0x0>; | ||
100 | ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000 /* pci memory */ | ||
101 | 0x1000000 0 0x00000000 0xae00000 0 0x200000>; /* io space */ | ||
102 | reg = <0x7000000 0x8000 /* config space */ | ||
103 | 0xe105400 0x400>; /* pci bridge */ | ||
104 | }; | ||
105 | }; | ||
106 | }; | ||
diff --git a/arch/mips/boot/dts/lantiq/easy50712.dts b/arch/mips/boot/dts/lantiq/easy50712.dts new file mode 100644 index 000000000..1ce20b7d0 --- /dev/null +++ b/arch/mips/boot/dts/lantiq/easy50712.dts | |||
@@ -0,0 +1,115 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "danube.dtsi" | ||
5 | |||
6 | / { | ||
7 | chosen { | ||
8 | bootargs = "console=ttyLTQ0,115200 init=/etc/preinit"; | ||
9 | }; | ||
10 | |||
11 | memory@0 { | ||
12 | device_type = "memory"; | ||
13 | reg = <0x0 0x2000000>; | ||
14 | }; | ||
15 | |||
16 | fpi@10000000 { | ||
17 | #address-cells = <1>; | ||
18 | #size-cells = <1>; | ||
19 | localbus@0 { | ||
20 | #address-cells = <2>; | ||
21 | #size-cells = <1>; | ||
22 | ranges = <0 0 0x0 0x3ffffff /* addrsel0 */ | ||
23 | 1 0 0x4000000 0x4000010>; /* addsel1 */ | ||
24 | compatible = "lantiq,localbus", "simple-bus"; | ||
25 | |||
26 | nor-boot@0 { | ||
27 | compatible = "lantiq,nor"; | ||
28 | bank-width = <2>; | ||
29 | reg = <0 0x0 0x2000000>; | ||
30 | #address-cells = <1>; | ||
31 | #size-cells = <1>; | ||
32 | |||
33 | partition@0 { | ||
34 | label = "uboot"; | ||
35 | reg = <0x00000 0x10000>; /* 64 KB */ | ||
36 | }; | ||
37 | |||
38 | partition@10000 { | ||
39 | label = "uboot_env"; | ||
40 | reg = <0x10000 0x10000>; /* 64 KB */ | ||
41 | }; | ||
42 | |||
43 | partition@20000 { | ||
44 | label = "linux"; | ||
45 | reg = <0x20000 0x3d0000>; | ||
46 | }; | ||
47 | |||
48 | partition@400000 { | ||
49 | label = "rootfs"; | ||
50 | reg = <0x400000 0x400000>; | ||
51 | }; | ||
52 | }; | ||
53 | }; | ||
54 | |||
55 | gpio: pinmux@e100b10 { | ||
56 | compatible = "lantiq,danube-pinctrl"; | ||
57 | pinctrl-names = "default"; | ||
58 | pinctrl-0 = <&state_default>; | ||
59 | |||
60 | #gpio-cells = <2>; | ||
61 | gpio-controller; | ||
62 | reg = <0xe100b10 0xa0>; | ||
63 | |||
64 | state_default: pinmux { | ||
65 | stp { | ||
66 | lantiq,groups = "stp"; | ||
67 | lantiq,function = "stp"; | ||
68 | }; | ||
69 | exin { | ||
70 | lantiq,groups = "exin1"; | ||
71 | lantiq,function = "exin"; | ||
72 | }; | ||
73 | pci { | ||
74 | lantiq,groups = "gnt1"; | ||
75 | lantiq,function = "pci"; | ||
76 | }; | ||
77 | conf_out { | ||
78 | lantiq,pins = "io4", "io5", "io6"; /* stp */ | ||
79 | lantiq,open-drain; | ||
80 | lantiq,pull = <0>; | ||
81 | }; | ||
82 | }; | ||
83 | }; | ||
84 | |||
85 | etop@e180000 { | ||
86 | compatible = "lantiq,etop-xway"; | ||
87 | reg = <0xe180000 0x40000>; | ||
88 | interrupt-parent = <&icu0>; | ||
89 | interrupts = <73 78>; | ||
90 | phy-mode = "rmii"; | ||
91 | mac-address = [ 00 11 22 33 44 55 ]; | ||
92 | }; | ||
93 | |||
94 | stp0: stp@e100bb0 { | ||
95 | #gpio-cells = <2>; | ||
96 | compatible = "lantiq,gpio-stp-xway"; | ||
97 | gpio-controller; | ||
98 | reg = <0xe100bb0 0x40>; | ||
99 | |||
100 | lantiq,shadow = <0xfff>; | ||
101 | lantiq,groups = <0x3>; | ||
102 | }; | ||
103 | |||
104 | pci@e105400 { | ||
105 | lantiq,bus-clock = <33333333>; | ||
106 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
107 | interrupt-map = < | ||
108 | 0x7000 0 0 1 &icu0 29 1 // slot 14, irq 29 | ||
109 | >; | ||
110 | gpios-reset = <&gpio 21 0>; | ||
111 | req-mask = <0x1>; /* GNT1 */ | ||
112 | }; | ||
113 | |||
114 | }; | ||
115 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/Makefile b/arch/mips/boot/dts/loongson/Makefile new file mode 100644 index 000000000..8fd0efb37 --- /dev/null +++ b/arch/mips/boot/dts/loongson/Makefile | |||
@@ -0,0 +1,8 @@ | |||
1 | # SPDX_License_Identifier: GPL_2.0 | ||
2 | dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_ls7a.dtb | ||
3 | dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_rs780e.dtb | ||
4 | dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_8core_rs780e.dtb | ||
5 | dtb-$(CONFIG_MACH_LOONGSON64) += loongson64g_4core_ls7a.dtb | ||
6 | dtb-$(CONFIG_MACH_LOONGSON64) += loongson64v_4core_virtio.dtb | ||
7 | |||
8 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/loongson/loongson64c-package.dtsi b/arch/mips/boot/dts/loongson/loongson64c-package.dtsi new file mode 100644 index 000000000..5bb876a4d --- /dev/null +++ b/arch/mips/boot/dts/loongson/loongson64c-package.dtsi | |||
@@ -0,0 +1,64 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | #include <dt-bindings/interrupt-controller/irq.h> | ||
4 | |||
5 | / { | ||
6 | #address-cells = <2>; | ||
7 | #size-cells = <2>; | ||
8 | |||
9 | cpuintc: interrupt-controller { | ||
10 | #address-cells = <0>; | ||
11 | #interrupt-cells = <1>; | ||
12 | interrupt-controller; | ||
13 | compatible = "mti,cpu-interrupt-controller"; | ||
14 | }; | ||
15 | |||
16 | package0: bus@1fe00000 { | ||
17 | compatible = "simple-bus"; | ||
18 | #address-cells = <2>; | ||
19 | #size-cells = <1>; | ||
20 | ranges = <0 0x1fe00000 0 0x1fe00000 0x100000 | ||
21 | 0 0x3ff00000 0 0x3ff00000 0x100000 | ||
22 | /* 3A HT Config Space */ | ||
23 | 0xefd 0xfb000000 0xefd 0xfb000000 0x10000000 | ||
24 | /* 3B HT Config Space */ | ||
25 | 0x1efd 0xfb000000 0x1efd 0xfb000000 0x10000000>; | ||
26 | |||
27 | liointc: interrupt-controller@3ff01400 { | ||
28 | compatible = "loongson,liointc-1.0"; | ||
29 | reg = <0 0x3ff01400 0x64>; | ||
30 | |||
31 | interrupt-controller; | ||
32 | #interrupt-cells = <2>; | ||
33 | |||
34 | interrupt-parent = <&cpuintc>; | ||
35 | interrupts = <2>, <3>; | ||
36 | interrupt-names = "int0", "int1"; | ||
37 | |||
38 | loongson,parent_int_map = <0xf0ffffff>, /* int0 */ | ||
39 | <0x0f000000>, /* int1 */ | ||
40 | <0x00000000>, /* int2 */ | ||
41 | <0x00000000>; /* int3 */ | ||
42 | |||
43 | }; | ||
44 | |||
45 | cpu_uart0: serial@1fe001e0 { | ||
46 | compatible = "ns16550a"; | ||
47 | reg = <0 0x1fe001e0 0x8>; | ||
48 | clock-frequency = <33000000>; | ||
49 | interrupt-parent = <&liointc>; | ||
50 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; | ||
51 | no-loopback-test; | ||
52 | }; | ||
53 | |||
54 | cpu_uart1: serial@1fe001e8 { | ||
55 | status = "disabled"; | ||
56 | compatible = "ns16550a"; | ||
57 | reg = <0 0x1fe001e8 0x8>; | ||
58 | clock-frequency = <33000000>; | ||
59 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; | ||
60 | interrupt-parent = <&liointc>; | ||
61 | no-loopback-test; | ||
62 | }; | ||
63 | }; | ||
64 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/loongson64c_4core_ls7a.dts b/arch/mips/boot/dts/loongson/loongson64c_4core_ls7a.dts new file mode 100644 index 000000000..c7ea4f1c0 --- /dev/null +++ b/arch/mips/boot/dts/loongson/loongson64c_4core_ls7a.dts | |||
@@ -0,0 +1,37 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | /dts-v1/; | ||
4 | |||
5 | #include "loongson64c-package.dtsi" | ||
6 | #include "ls7a-pch.dtsi" | ||
7 | |||
8 | / { | ||
9 | compatible = "loongson,loongson64c-4core-ls7a"; | ||
10 | }; | ||
11 | |||
12 | &package0 { | ||
13 | htvec: interrupt-controller@efdfb000080 { | ||
14 | compatible = "loongson,htvec-1.0"; | ||
15 | reg = <0xefd 0xfb000080 0x40>; | ||
16 | interrupt-controller; | ||
17 | #interrupt-cells = <1>; | ||
18 | |||
19 | interrupt-parent = <&liointc>; | ||
20 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, | ||
21 | <25 IRQ_TYPE_LEVEL_HIGH>, | ||
22 | <26 IRQ_TYPE_LEVEL_HIGH>, | ||
23 | <27 IRQ_TYPE_LEVEL_HIGH>; | ||
24 | }; | ||
25 | }; | ||
26 | |||
27 | &pch { | ||
28 | msi: msi-controller@2ff00000 { | ||
29 | compatible = "loongson,pch-msi-1.0"; | ||
30 | reg = <0 0x2ff00000 0 0x8>; | ||
31 | interrupt-controller; | ||
32 | msi-controller; | ||
33 | loongson,msi-base-vec = <64>; | ||
34 | loongson,msi-num-vecs = <64>; | ||
35 | interrupt-parent = <&htvec>; | ||
36 | }; | ||
37 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/loongson64c_4core_rs780e.dts b/arch/mips/boot/dts/loongson/loongson64c_4core_rs780e.dts new file mode 100644 index 000000000..d681a295d --- /dev/null +++ b/arch/mips/boot/dts/loongson/loongson64c_4core_rs780e.dts | |||
@@ -0,0 +1,25 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | /dts-v1/; | ||
4 | |||
5 | #include "loongson64c-package.dtsi" | ||
6 | #include "rs780e-pch.dtsi" | ||
7 | |||
8 | / { | ||
9 | compatible = "loongson,loongson64c-4core-rs780e"; | ||
10 | }; | ||
11 | |||
12 | &package0 { | ||
13 | htpic: interrupt-controller@efdfb000080 { | ||
14 | compatible = "loongson,htpic-1.0"; | ||
15 | reg = <0xefd 0xfb000080 0x40>; | ||
16 | interrupt-controller; | ||
17 | #interrupt-cells = <1>; | ||
18 | |||
19 | interrupt-parent = <&liointc>; | ||
20 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, | ||
21 | <25 IRQ_TYPE_LEVEL_HIGH>, | ||
22 | <26 IRQ_TYPE_LEVEL_HIGH>, | ||
23 | <27 IRQ_TYPE_LEVEL_HIGH>; | ||
24 | }; | ||
25 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/loongson64c_8core_rs780e.dts b/arch/mips/boot/dts/loongson/loongson64c_8core_rs780e.dts new file mode 100644 index 000000000..3c2044142 --- /dev/null +++ b/arch/mips/boot/dts/loongson/loongson64c_8core_rs780e.dts | |||
@@ -0,0 +1,25 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | /dts-v1/; | ||
4 | |||
5 | #include "loongson64c-package.dtsi" | ||
6 | #include "rs780e-pch.dtsi" | ||
7 | |||
8 | / { | ||
9 | compatible = "loongson,loongson64c-8core-rs780e"; | ||
10 | }; | ||
11 | |||
12 | &package0 { | ||
13 | htpic: interrupt-controller@1efdfb000080 { | ||
14 | compatible = "loongson,htpic-1.0"; | ||
15 | reg = <0x1efd 0xfb000080 0x40>; | ||
16 | interrupt-controller; | ||
17 | #interrupt-cells = <1>; | ||
18 | |||
19 | interrupt-parent = <&liointc>; | ||
20 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, | ||
21 | <25 IRQ_TYPE_LEVEL_HIGH>, | ||
22 | <26 IRQ_TYPE_LEVEL_HIGH>, | ||
23 | <27 IRQ_TYPE_LEVEL_HIGH>; | ||
24 | }; | ||
25 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/loongson64g-package.dtsi b/arch/mips/boot/dts/loongson/loongson64g-package.dtsi new file mode 100644 index 000000000..38abc570c --- /dev/null +++ b/arch/mips/boot/dts/loongson/loongson64g-package.dtsi | |||
@@ -0,0 +1,61 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | #include <dt-bindings/interrupt-controller/irq.h> | ||
4 | |||
5 | / { | ||
6 | #address-cells = <2>; | ||
7 | #size-cells = <2>; | ||
8 | |||
9 | cpuintc: interrupt-controller { | ||
10 | #address-cells = <0>; | ||
11 | #interrupt-cells = <1>; | ||
12 | interrupt-controller; | ||
13 | compatible = "mti,cpu-interrupt-controller"; | ||
14 | }; | ||
15 | |||
16 | package0: bus@1fe00000 { | ||
17 | compatible = "simple-bus"; | ||
18 | #address-cells = <2>; | ||
19 | #size-cells = <1>; | ||
20 | ranges = <0 0x1fe00000 0 0x1fe00000 0x100000 | ||
21 | 0 0x3ff00000 0 0x3ff00000 0x100000 | ||
22 | 0xefd 0xfb000000 0xefd 0xfb000000 0x10000000>; | ||
23 | |||
24 | liointc: interrupt-controller@3ff01400 { | ||
25 | compatible = "loongson,liointc-1.0"; | ||
26 | reg = <0 0x3ff01400 0x64>; | ||
27 | |||
28 | interrupt-controller; | ||
29 | #interrupt-cells = <2>; | ||
30 | |||
31 | interrupt-parent = <&cpuintc>; | ||
32 | interrupts = <2>, <3>; | ||
33 | interrupt-names = "int0", "int1"; | ||
34 | |||
35 | loongson,parent_int_map = <0x00ffffff>, /* int0 */ | ||
36 | <0xff000000>, /* int1 */ | ||
37 | <0x00000000>, /* int2 */ | ||
38 | <0x00000000>; /* int3 */ | ||
39 | |||
40 | }; | ||
41 | |||
42 | cpu_uart0: serial@1fe001e0 { | ||
43 | compatible = "ns16550a"; | ||
44 | reg = <0 0x1fe00100 0x10>; | ||
45 | clock-frequency = <100000000>; | ||
46 | interrupt-parent = <&liointc>; | ||
47 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; | ||
48 | no-loopback-test; | ||
49 | }; | ||
50 | |||
51 | cpu_uart1: serial@1fe001e8 { | ||
52 | status = "disabled"; | ||
53 | compatible = "ns16550a"; | ||
54 | reg = <0 0x1fe00110 0x10>; | ||
55 | clock-frequency = <100000000>; | ||
56 | interrupts = <15 IRQ_TYPE_LEVEL_HIGH>; | ||
57 | interrupt-parent = <&liointc>; | ||
58 | no-loopback-test; | ||
59 | }; | ||
60 | }; | ||
61 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts b/arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts new file mode 100644 index 000000000..c945f8565 --- /dev/null +++ b/arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts | |||
@@ -0,0 +1,41 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | /dts-v1/; | ||
4 | |||
5 | #include "loongson64g-package.dtsi" | ||
6 | #include "ls7a-pch.dtsi" | ||
7 | |||
8 | / { | ||
9 | compatible = "loongson,loongson64g-4core-ls7a"; | ||
10 | }; | ||
11 | |||
12 | &package0 { | ||
13 | htvec: interrupt-controller@efdfb000080 { | ||
14 | compatible = "loongson,htvec-1.0"; | ||
15 | reg = <0xefd 0xfb000080 0x40>; | ||
16 | interrupt-controller; | ||
17 | #interrupt-cells = <1>; | ||
18 | |||
19 | interrupt-parent = <&liointc>; | ||
20 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, | ||
21 | <25 IRQ_TYPE_LEVEL_HIGH>, | ||
22 | <26 IRQ_TYPE_LEVEL_HIGH>, | ||
23 | <27 IRQ_TYPE_LEVEL_HIGH>, | ||
24 | <28 IRQ_TYPE_LEVEL_HIGH>, | ||
25 | <29 IRQ_TYPE_LEVEL_HIGH>, | ||
26 | <30 IRQ_TYPE_LEVEL_HIGH>, | ||
27 | <31 IRQ_TYPE_LEVEL_HIGH>; | ||
28 | }; | ||
29 | }; | ||
30 | |||
31 | &pch { | ||
32 | msi: msi-controller@2ff00000 { | ||
33 | compatible = "loongson,pch-msi-1.0"; | ||
34 | reg = <0 0x2ff00000 0 0x8>; | ||
35 | interrupt-controller; | ||
36 | msi-controller; | ||
37 | loongson,msi-base-vec = <64>; | ||
38 | loongson,msi-num-vecs = <192>; | ||
39 | interrupt-parent = <&htvec>; | ||
40 | }; | ||
41 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts b/arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts new file mode 100644 index 000000000..41f0b110d --- /dev/null +++ b/arch/mips/boot/dts/loongson/loongson64v_4core_virtio.dts | |||
@@ -0,0 +1,102 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | #include <dt-bindings/interrupt-controller/irq.h> | ||
4 | |||
5 | /dts-v1/; | ||
6 | / { | ||
7 | compatible = "loongson,loongson64v-4core-virtio"; | ||
8 | #address-cells = <2>; | ||
9 | #size-cells = <2>; | ||
10 | |||
11 | cpuintc: interrupt-controller { | ||
12 | #address-cells = <0>; | ||
13 | #interrupt-cells = <1>; | ||
14 | interrupt-controller; | ||
15 | compatible = "mti,cpu-interrupt-controller"; | ||
16 | }; | ||
17 | |||
18 | package0: bus@1fe00000 { | ||
19 | compatible = "simple-bus"; | ||
20 | #address-cells = <2>; | ||
21 | #size-cells = <1>; | ||
22 | ranges = <0 0x1fe00000 0 0x1fe00000 0x100000 | ||
23 | 0 0x3ff00000 0 0x3ff00000 0x100000 | ||
24 | 0xefd 0xfb000000 0xefd 0xfb000000 0x10000000>; | ||
25 | |||
26 | liointc: interrupt-controller@3ff01400 { | ||
27 | compatible = "loongson,liointc-1.0"; | ||
28 | reg = <0 0x3ff01400 0x64>; | ||
29 | |||
30 | interrupt-controller; | ||
31 | #interrupt-cells = <2>; | ||
32 | |||
33 | interrupt-parent = <&cpuintc>; | ||
34 | interrupts = <2>, <3>; | ||
35 | interrupt-names = "int0", "int1"; | ||
36 | |||
37 | loongson,parent_int_map = <0x00000001>, /* int0 */ | ||
38 | <0xfffffffe>, /* int1 */ | ||
39 | <0x00000000>, /* int2 */ | ||
40 | <0x00000000>; /* int3 */ | ||
41 | |||
42 | }; | ||
43 | |||
44 | cpu_uart0: serial@1fe001e0 { | ||
45 | compatible = "ns16550a"; | ||
46 | reg = <0 0x1fe001e0 0x8>; | ||
47 | clock-frequency = <33000000>; | ||
48 | interrupt-parent = <&liointc>; | ||
49 | interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; | ||
50 | no-loopback-test; | ||
51 | }; | ||
52 | }; | ||
53 | |||
54 | bus@10000000 { | ||
55 | compatible = "simple-bus"; | ||
56 | #address-cells = <2>; | ||
57 | #size-cells = <2>; | ||
58 | ranges = <0 0x10000000 0 0x10000000 0 0x10000000 /* PIO & CONF & APB */ | ||
59 | 0 0x40000000 0 0x40000000 0 0x40000000>; /* PCI MEM */ | ||
60 | |||
61 | rtc0: rtc@10081000 { | ||
62 | compatible = "google,goldfish-rtc"; | ||
63 | reg = <0 0x10081000 0 0x1000>; | ||
64 | interrupts = <1 IRQ_TYPE_LEVEL_HIGH>; | ||
65 | interrupt-parent = <&liointc>; | ||
66 | }; | ||
67 | |||
68 | pci@1a000000 { | ||
69 | compatible = "pci-host-ecam-generic"; | ||
70 | device_type = "pci"; | ||
71 | #address-cells = <3>; | ||
72 | #size-cells = <2>; | ||
73 | #interrupt-cells = <1>; | ||
74 | |||
75 | bus-range = <0x0 0x1f>; | ||
76 | reg = <0 0x1a000000 0 0x02000000>; | ||
77 | |||
78 | ranges = <0x01000000 0x0 0x00004000 0x0 0x18004000 0x0 0x0000c000>, | ||
79 | <0x02000000 0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>; | ||
80 | |||
81 | interrupt-map = < | ||
82 | 0x0000 0x0 0x0 0x1 &liointc 0x2 IRQ_TYPE_LEVEL_HIGH | ||
83 | 0x0800 0x0 0x0 0x1 &liointc 0x3 IRQ_TYPE_LEVEL_HIGH | ||
84 | 0x1000 0x0 0x0 0x1 &liointc 0x4 IRQ_TYPE_LEVEL_HIGH | ||
85 | 0x1800 0x0 0x0 0x1 &liointc 0x5 IRQ_TYPE_LEVEL_HIGH | ||
86 | >; | ||
87 | |||
88 | interrupt-map-mask = <0x1800 0x0 0x0 0x7>; | ||
89 | }; | ||
90 | |||
91 | isa { | ||
92 | compatible = "isa"; | ||
93 | #address-cells = <2>; | ||
94 | #size-cells = <1>; | ||
95 | ranges = <1 0 0 0x18000000 0x4000>; | ||
96 | }; | ||
97 | }; | ||
98 | |||
99 | hypervisor { | ||
100 | compatible = "linux,kvm"; | ||
101 | }; | ||
102 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/ls7a-pch.dtsi b/arch/mips/boot/dts/loongson/ls7a-pch.dtsi new file mode 100644 index 000000000..f99a7a11f --- /dev/null +++ b/arch/mips/boot/dts/loongson/ls7a-pch.dtsi | |||
@@ -0,0 +1,417 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | / { | ||
4 | pch: bus@10000000 { | ||
5 | compatible = "simple-bus"; | ||
6 | #address-cells = <2>; | ||
7 | #size-cells = <2>; | ||
8 | ranges = <0 0x10000000 0 0x10000000 0 0x10000000 /* PIO & CONF & APB */ | ||
9 | 0 0x20000000 0 0x20000000 0 0x10000000 | ||
10 | 0 0x40000000 0 0x40000000 0 0x40000000 /* PCI MEM */ | ||
11 | 0xe00 0x00000000 0xe00 0x00000000 0x100 0x0000000>; | ||
12 | |||
13 | pic: interrupt-controller@10000000 { | ||
14 | compatible = "loongson,pch-pic-1.0"; | ||
15 | reg = <0 0x10000000 0 0x400>; | ||
16 | interrupt-controller; | ||
17 | interrupt-parent = <&htvec>; | ||
18 | loongson,pic-base-vec = <0>; | ||
19 | #interrupt-cells = <2>; | ||
20 | }; | ||
21 | |||
22 | ls7a_uart0: serial@10080000 { | ||
23 | compatible = "ns16550a"; | ||
24 | reg = <0 0x10080000 0 0x100>; | ||
25 | clock-frequency = <50000000>; | ||
26 | interrupt-parent = <&pic>; | ||
27 | interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; | ||
28 | no-loopback-test; | ||
29 | }; | ||
30 | |||
31 | ls7a_uart1: serial@10080100 { | ||
32 | status = "disabled"; | ||
33 | compatible = "ns16550a"; | ||
34 | reg = <0 0x10080100 0 0x100>; | ||
35 | clock-frequency = <50000000>; | ||
36 | interrupt-parent = <&pic>; | ||
37 | interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; | ||
38 | no-loopback-test; | ||
39 | }; | ||
40 | |||
41 | ls7a_uart2: serial@10080200 { | ||
42 | status = "disabled"; | ||
43 | compatible = "ns16550a"; | ||
44 | reg = <0 0x10080200 0 0x100>; | ||
45 | clock-frequency = <50000000>; | ||
46 | interrupt-parent = <&pic>; | ||
47 | interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; | ||
48 | no-loopback-test; | ||
49 | }; | ||
50 | |||
51 | ls7a_uart3: serial@10080300 { | ||
52 | status = "disabled"; | ||
53 | compatible = "ns16550a"; | ||
54 | reg = <0 0x10080300 0 0x100>; | ||
55 | clock-frequency = <50000000>; | ||
56 | interrupt-parent = <&pic>; | ||
57 | interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; | ||
58 | no-loopback-test; | ||
59 | }; | ||
60 | |||
61 | pci@1a000000 { | ||
62 | compatible = "loongson,ls7a-pci"; | ||
63 | device_type = "pci"; | ||
64 | #address-cells = <3>; | ||
65 | #size-cells = <2>; | ||
66 | #interrupt-cells = <2>; | ||
67 | msi-parent = <&msi>; | ||
68 | |||
69 | reg = <0 0x1a000000 0 0x02000000>, | ||
70 | <0xefe 0x00000000 0 0x20000000>; | ||
71 | |||
72 | ranges = <0x01000000 0x0 0x00020000 0x0 0x18020000 0x0 0x00020000>, | ||
73 | <0x02000000 0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>; | ||
74 | |||
75 | ohci@4,0 { | ||
76 | compatible = "pci0014,7a24.0", | ||
77 | "pci0014,7a24", | ||
78 | "pciclass0c0310", | ||
79 | "pciclass0c03"; | ||
80 | |||
81 | reg = <0x2000 0x0 0x0 0x0 0x0>; | ||
82 | interrupts = <49 IRQ_TYPE_LEVEL_HIGH>; | ||
83 | interrupt-parent = <&pic>; | ||
84 | }; | ||
85 | |||
86 | ehci@4,1 { | ||
87 | compatible = "pci0014,7a14.0", | ||
88 | "pci0014,7a14", | ||
89 | "pciclass0c0320", | ||
90 | "pciclass0c03"; | ||
91 | |||
92 | reg = <0x2100 0x0 0x0 0x0 0x0>; | ||
93 | interrupts = <48 IRQ_TYPE_LEVEL_HIGH>; | ||
94 | interrupt-parent = <&pic>; | ||
95 | }; | ||
96 | |||
97 | ohci@5,0 { | ||
98 | compatible = "pci0014,7a24.0", | ||
99 | "pci0014,7a24", | ||
100 | "pciclass0c0310", | ||
101 | "pciclass0c03"; | ||
102 | |||
103 | reg = <0x2800 0x0 0x0 0x0 0x0>; | ||
104 | interrupts = <51 IRQ_TYPE_LEVEL_HIGH>; | ||
105 | interrupt-parent = <&pic>; | ||
106 | }; | ||
107 | |||
108 | ehci@5,1 { | ||
109 | compatible = "pci0014,7a14.0", | ||
110 | "pci0014,7a14", | ||
111 | "pciclass0c0320", | ||
112 | "pciclass0c03"; | ||
113 | |||
114 | reg = <0x2900 0x0 0x0 0x0 0x0>; | ||
115 | interrupts = <50 IRQ_TYPE_LEVEL_HIGH>; | ||
116 | interrupt-parent = <&pic>; | ||
117 | }; | ||
118 | |||
119 | sata@8,0 { | ||
120 | compatible = "pci0014,7a08.0", | ||
121 | "pci0014,7a08", | ||
122 | "pciclass010601", | ||
123 | "pciclass0106"; | ||
124 | |||
125 | reg = <0x4000 0x0 0x0 0x0 0x0>; | ||
126 | interrupts = <16 IRQ_TYPE_LEVEL_HIGH>; | ||
127 | interrupt-parent = <&pic>; | ||
128 | }; | ||
129 | |||
130 | sata@8,1 { | ||
131 | compatible = "pci0014,7a08.0", | ||
132 | "pci0014,7a08", | ||
133 | "pciclass010601", | ||
134 | "pciclass0106"; | ||
135 | |||
136 | reg = <0x4100 0x0 0x0 0x0 0x0>; | ||
137 | interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; | ||
138 | interrupt-parent = <&pic>; | ||
139 | }; | ||
140 | |||
141 | sata@8,2 { | ||
142 | compatible = "pci0014,7a08.0", | ||
143 | "pci0014,7a08", | ||
144 | "pciclass010601", | ||
145 | "pciclass0106"; | ||
146 | |||
147 | reg = <0x4200 0x0 0x0 0x0 0x0>; | ||
148 | interrupts = <18 IRQ_TYPE_LEVEL_HIGH>; | ||
149 | interrupt-parent = <&pic>; | ||
150 | }; | ||
151 | |||
152 | gpu@6,0 { | ||
153 | compatible = "pci0014,7a15.0", | ||
154 | "pci0014,7a15", | ||
155 | "pciclass030200", | ||
156 | "pciclass0302"; | ||
157 | |||
158 | reg = <0x3000 0x0 0x0 0x0 0x0>; | ||
159 | interrupts = <29 IRQ_TYPE_LEVEL_HIGH>; | ||
160 | interrupt-parent = <&pic>; | ||
161 | }; | ||
162 | |||
163 | dc@6,1 { | ||
164 | compatible = "pci0014,7a06.0", | ||
165 | "pci0014,7a06", | ||
166 | "pciclass030000", | ||
167 | "pciclass0300"; | ||
168 | |||
169 | reg = <0x3100 0x0 0x0 0x0 0x0>; | ||
170 | interrupts = <28 IRQ_TYPE_LEVEL_HIGH>; | ||
171 | interrupt-parent = <&pic>; | ||
172 | }; | ||
173 | |||
174 | hda@7,0 { | ||
175 | compatible = "pci0014,7a07.0", | ||
176 | "pci0014,7a07", | ||
177 | "pciclass040300", | ||
178 | "pciclass0403"; | ||
179 | |||
180 | reg = <0x3800 0x0 0x0 0x0 0x0>; | ||
181 | interrupts = <58 IRQ_TYPE_LEVEL_HIGH>; | ||
182 | interrupt-parent = <&pic>; | ||
183 | }; | ||
184 | |||
185 | gmac@3,0 { | ||
186 | compatible = "pci0014,7a03.0", | ||
187 | "pci0014,7a03", | ||
188 | "pciclass020000", | ||
189 | "pciclass0200"; | ||
190 | |||
191 | reg = <0x1800 0x0 0x0 0x0 0x0>; | ||
192 | interrupts = <12 IRQ_TYPE_LEVEL_HIGH>, | ||
193 | <13 IRQ_TYPE_LEVEL_HIGH>; | ||
194 | interrupt-names = "macirq", "eth_lpi"; | ||
195 | interrupt-parent = <&pic>; | ||
196 | phy-mode = "rgmii"; | ||
197 | mdio { | ||
198 | #address-cells = <1>; | ||
199 | #size-cells = <0>; | ||
200 | compatible = "snps,dwmac-mdio"; | ||
201 | phy0: ethernet-phy@0 { | ||
202 | reg = <0>; | ||
203 | }; | ||
204 | }; | ||
205 | }; | ||
206 | |||
207 | gmac@3,1 { | ||
208 | compatible = "pci0014,7a03.0", | ||
209 | "pci0014,7a03", | ||
210 | "pciclass020000", | ||
211 | "pciclass0200"; | ||
212 | |||
213 | reg = <0x1900 0x0 0x0 0x0 0x0>; | ||
214 | interrupts = <14 IRQ_TYPE_LEVEL_HIGH>, | ||
215 | <15 IRQ_TYPE_LEVEL_HIGH>; | ||
216 | interrupt-names = "macirq", "eth_lpi"; | ||
217 | interrupt-parent = <&pic>; | ||
218 | phy-mode = "rgmii"; | ||
219 | mdio { | ||
220 | #address-cells = <1>; | ||
221 | #size-cells = <0>; | ||
222 | compatible = "snps,dwmac-mdio"; | ||
223 | phy1: ethernet-phy@1 { | ||
224 | reg = <0>; | ||
225 | }; | ||
226 | }; | ||
227 | }; | ||
228 | |||
229 | pci_bridge@9,0 { | ||
230 | compatible = "pci0014,7a19.1", | ||
231 | "pci0014,7a19", | ||
232 | "pciclass060400", | ||
233 | "pciclass0604"; | ||
234 | |||
235 | reg = <0x4800 0x0 0x0 0x0 0x0>; | ||
236 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH>; | ||
237 | interrupt-parent = <&pic>; | ||
238 | |||
239 | #interrupt-cells = <1>; | ||
240 | interrupt-map-mask = <0 0 0 0>; | ||
241 | interrupt-map = <0 0 0 0 &pic 32 IRQ_TYPE_LEVEL_HIGH>; | ||
242 | }; | ||
243 | |||
244 | pci_bridge@a,0 { | ||
245 | compatible = "pci0014,7a09.1", | ||
246 | "pci0014,7a09", | ||
247 | "pciclass060400", | ||
248 | "pciclass0604"; | ||
249 | |||
250 | reg = <0x5000 0x0 0x0 0x0 0x0>; | ||
251 | interrupts = <33 IRQ_TYPE_LEVEL_HIGH>; | ||
252 | interrupt-parent = <&pic>; | ||
253 | |||
254 | #interrupt-cells = <1>; | ||
255 | interrupt-map-mask = <0 0 0 0>; | ||
256 | interrupt-map = <0 0 0 0 &pic 33 IRQ_TYPE_LEVEL_HIGH>; | ||
257 | }; | ||
258 | |||
259 | pci_bridge@b,0 { | ||
260 | compatible = "pci0014,7a09.1", | ||
261 | "pci0014,7a09", | ||
262 | "pciclass060400", | ||
263 | "pciclass0604"; | ||
264 | |||
265 | reg = <0x5800 0x0 0x0 0x0 0x0>; | ||
266 | interrupts = <34 IRQ_TYPE_LEVEL_HIGH>; | ||
267 | interrupt-parent = <&pic>; | ||
268 | |||
269 | #interrupt-cells = <1>; | ||
270 | interrupt-map-mask = <0 0 0 0>; | ||
271 | interrupt-map = <0 0 0 0 &pic 34 IRQ_TYPE_LEVEL_HIGH>; | ||
272 | }; | ||
273 | |||
274 | pci_bridge@c,0 { | ||
275 | compatible = "pci0014,7a09.1", | ||
276 | "pci0014,7a09", | ||
277 | "pciclass060400", | ||
278 | "pciclass0604"; | ||
279 | |||
280 | reg = <0x6000 0x0 0x0 0x0 0x0>; | ||
281 | interrupts = <35 IRQ_TYPE_LEVEL_HIGH>; | ||
282 | interrupt-parent = <&pic>; | ||
283 | |||
284 | #interrupt-cells = <1>; | ||
285 | interrupt-map-mask = <0 0 0 0>; | ||
286 | interrupt-map = <0 0 0 0 &pic 35 IRQ_TYPE_LEVEL_HIGH>; | ||
287 | }; | ||
288 | |||
289 | pci_bridge@d,0 { | ||
290 | compatible = "pci0014,7a19.1", | ||
291 | "pci0014,7a19", | ||
292 | "pciclass060400", | ||
293 | "pciclass0604"; | ||
294 | |||
295 | reg = <0x6800 0x0 0x0 0x0 0x0>; | ||
296 | interrupts = <36 IRQ_TYPE_LEVEL_HIGH>; | ||
297 | interrupt-parent = <&pic>; | ||
298 | |||
299 | #interrupt-cells = <1>; | ||
300 | interrupt-map-mask = <0 0 0 0>; | ||
301 | interrupt-map = <0 0 0 0 &pic 36 IRQ_TYPE_LEVEL_HIGH>; | ||
302 | }; | ||
303 | |||
304 | pci_bridge@e,0 { | ||
305 | compatible = "pci0014,7a09.1", | ||
306 | "pci0014,7a09", | ||
307 | "pciclass060400", | ||
308 | "pciclass0604"; | ||
309 | |||
310 | reg = <0x7000 0x0 0x0 0x0 0x0>; | ||
311 | interrupts = <37 IRQ_TYPE_LEVEL_HIGH>; | ||
312 | interrupt-parent = <&pic>; | ||
313 | |||
314 | #interrupt-cells = <1>; | ||
315 | interrupt-map-mask = <0 0 0 0>; | ||
316 | interrupt-map = <0 0 0 0 &pic 37 IRQ_TYPE_LEVEL_HIGH>; | ||
317 | }; | ||
318 | |||
319 | pci_bridge@f,0 { | ||
320 | compatible = "pci0014,7a29.1", | ||
321 | "pci0014,7a29", | ||
322 | "pciclass060400", | ||
323 | "pciclass0604"; | ||
324 | |||
325 | reg = <0x7800 0x0 0x0 0x0 0x0>; | ||
326 | interrupts = <40 IRQ_TYPE_LEVEL_HIGH>; | ||
327 | interrupt-parent = <&pic>; | ||
328 | |||
329 | #interrupt-cells = <1>; | ||
330 | interrupt-map-mask = <0 0 0 0>; | ||
331 | interrupt-map = <0 0 0 0 &pic 40 IRQ_TYPE_LEVEL_HIGH>; | ||
332 | }; | ||
333 | |||
334 | pci_bridge@10,0 { | ||
335 | compatible = "pci0014,7a19.1", | ||
336 | "pci0014,7a19", | ||
337 | "pciclass060400", | ||
338 | "pciclass0604"; | ||
339 | |||
340 | reg = <0x8000 0x0 0x0 0x0 0x0>; | ||
341 | interrupts = <41 IRQ_TYPE_LEVEL_HIGH>; | ||
342 | interrupt-parent = <&pic>; | ||
343 | |||
344 | #interrupt-cells = <1>; | ||
345 | interrupt-map-mask = <0 0 0 0>; | ||
346 | interrupt-map = <0 0 0 0 &pic 41 IRQ_TYPE_LEVEL_HIGH>; | ||
347 | }; | ||
348 | |||
349 | pci_bridge@11,0 { | ||
350 | compatible = "pci0014,7a29.1", | ||
351 | "pci0014,7a29", | ||
352 | "pciclass060400", | ||
353 | "pciclass0604"; | ||
354 | |||
355 | reg = <0x8800 0x0 0x0 0x0 0x0>; | ||
356 | interrupts = <42 IRQ_TYPE_LEVEL_HIGH>; | ||
357 | interrupt-parent = <&pic>; | ||
358 | |||
359 | #interrupt-cells = <1>; | ||
360 | interrupt-map-mask = <0 0 0 0>; | ||
361 | interrupt-map = <0 0 0 0 &pic 42 IRQ_TYPE_LEVEL_HIGH>; | ||
362 | }; | ||
363 | |||
364 | pci_bridge@12,0 { | ||
365 | compatible = "pci0014,7a19.1", | ||
366 | "pci0014,7a19", | ||
367 | "pciclass060400", | ||
368 | "pciclass0604"; | ||
369 | |||
370 | reg = <0x9000 0x0 0x0 0x0 0x0>; | ||
371 | interrupts = <43 IRQ_TYPE_LEVEL_HIGH>; | ||
372 | interrupt-parent = <&pic>; | ||
373 | |||
374 | #interrupt-cells = <1>; | ||
375 | interrupt-map-mask = <0 0 0 0>; | ||
376 | interrupt-map = <0 0 0 0 &pic 43 IRQ_TYPE_LEVEL_HIGH>; | ||
377 | }; | ||
378 | |||
379 | pci_bridge@13,0 { | ||
380 | compatible = "pci0014,7a29.1", | ||
381 | "pci0014,7a29", | ||
382 | "pciclass060400", | ||
383 | "pciclass0604"; | ||
384 | |||
385 | reg = <0x9800 0x0 0x0 0x0 0x0>; | ||
386 | interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; | ||
387 | interrupt-parent = <&pic>; | ||
388 | |||
389 | #interrupt-cells = <1>; | ||
390 | interrupt-map-mask = <0 0 0 0>; | ||
391 | interrupt-map = <0 0 0 0 &pic 38 IRQ_TYPE_LEVEL_HIGH>; | ||
392 | }; | ||
393 | |||
394 | pci_bridge@14,0 { | ||
395 | compatible = "pci0014,7a19.1", | ||
396 | "pci0014,7a19", | ||
397 | "pciclass060400", | ||
398 | "pciclass0604"; | ||
399 | |||
400 | reg = <0xa000 0x0 0x0 0x0 0x0>; | ||
401 | interrupts = <39 IRQ_TYPE_LEVEL_HIGH>; | ||
402 | interrupt-parent = <&pic>; | ||
403 | |||
404 | #interrupt-cells = <1>; | ||
405 | interrupt-map-mask = <0 0 0 0>; | ||
406 | interrupt-map = <0 0 0 0 &pic 39 IRQ_TYPE_LEVEL_HIGH>; | ||
407 | }; | ||
408 | }; | ||
409 | |||
410 | isa { | ||
411 | compatible = "isa"; | ||
412 | #address-cells = <2>; | ||
413 | #size-cells = <1>; | ||
414 | ranges = <1 0 0 0x18000000 0x20000>; | ||
415 | }; | ||
416 | }; | ||
417 | }; | ||
diff --git a/arch/mips/boot/dts/loongson/rs780e-pch.dtsi b/arch/mips/boot/dts/loongson/rs780e-pch.dtsi new file mode 100644 index 000000000..871c866e0 --- /dev/null +++ b/arch/mips/boot/dts/loongson/rs780e-pch.dtsi | |||
@@ -0,0 +1,43 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | / { | ||
4 | bus@10000000 { | ||
5 | compatible = "simple-bus"; | ||
6 | #address-cells = <2>; | ||
7 | #size-cells = <2>; | ||
8 | ranges = <0 0x10000000 0 0x10000000 0 0x10000000 | ||
9 | 0 0x40000000 0 0x40000000 0 0x40000000 | ||
10 | 0xfd 0xfe000000 0xfd 0xfe000000 0 0x2000000 /* PCI Config Space */>; | ||
11 | |||
12 | pci@1a000000 { | ||
13 | compatible = "loongson,rs780e-pci"; | ||
14 | device_type = "pci"; | ||
15 | #address-cells = <3>; | ||
16 | #size-cells = <2>; | ||
17 | |||
18 | reg = <0 0x1a000000 0 0x02000000>; | ||
19 | |||
20 | ranges = <0x01000000 0 0x00004000 0 0x18004000 0 0x0000c000>, | ||
21 | <0x02000000 0 0x40000000 0 0x40000000 0 0x40000000>; | ||
22 | }; | ||
23 | |||
24 | isa { | ||
25 | compatible = "isa"; | ||
26 | #address-cells = <2>; | ||
27 | #size-cells = <1>; | ||
28 | ranges = <1 0 0 0x18000000 0x4000>; | ||
29 | |||
30 | rtc0: rtc@70 { | ||
31 | compatible = "motorola,mc146818"; | ||
32 | reg = <1 0x70 0x8>; | ||
33 | interrupts = <8>; | ||
34 | interrupt-parent = <&htpic>; | ||
35 | }; | ||
36 | |||
37 | acpi@800 { | ||
38 | compatible = "loongson,rs780e-acpi"; | ||
39 | reg = <1 0x800 0x100>; | ||
40 | }; | ||
41 | }; | ||
42 | }; | ||
43 | }; | ||
diff --git a/arch/mips/boot/dts/mscc/Makefile b/arch/mips/boot/dts/mscc/Makefile new file mode 100644 index 000000000..eb7151587 --- /dev/null +++ b/arch/mips/boot/dts/mscc/Makefile | |||
@@ -0,0 +1,4 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | dtb-$(CONFIG_MSCC_OCELOT) += ocelot_pcb123.dtb ocelot_pcb120.dtb | ||
3 | |||
4 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/mscc/ocelot.dtsi b/arch/mips/boot/dts/mscc/ocelot.dtsi new file mode 100644 index 000000000..535a98284 --- /dev/null +++ b/arch/mips/boot/dts/mscc/ocelot.dtsi | |||
@@ -0,0 +1,267 @@ | |||
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
2 | /* Copyright (c) 2017 Microsemi Corporation */ | ||
3 | |||
4 | / { | ||
5 | #address-cells = <1>; | ||
6 | #size-cells = <1>; | ||
7 | compatible = "mscc,ocelot"; | ||
8 | |||
9 | cpus { | ||
10 | #address-cells = <1>; | ||
11 | #size-cells = <0>; | ||
12 | |||
13 | cpu@0 { | ||
14 | compatible = "mips,mips24KEc"; | ||
15 | device_type = "cpu"; | ||
16 | clocks = <&cpu_clk>; | ||
17 | reg = <0>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | aliases { | ||
22 | serial0 = &uart0; | ||
23 | }; | ||
24 | |||
25 | cpuintc: interrupt-controller { | ||
26 | #address-cells = <0>; | ||
27 | #interrupt-cells = <1>; | ||
28 | interrupt-controller; | ||
29 | compatible = "mti,cpu-interrupt-controller"; | ||
30 | }; | ||
31 | |||
32 | cpu_clk: cpu-clock { | ||
33 | compatible = "fixed-clock"; | ||
34 | #clock-cells = <0>; | ||
35 | clock-frequency = <500000000>; | ||
36 | }; | ||
37 | |||
38 | ahb_clk: ahb-clk { | ||
39 | compatible = "fixed-factor-clock"; | ||
40 | #clock-cells = <0>; | ||
41 | clocks = <&cpu_clk>; | ||
42 | clock-div = <2>; | ||
43 | clock-mult = <1>; | ||
44 | }; | ||
45 | |||
46 | ahb@70000000 { | ||
47 | compatible = "simple-bus"; | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <1>; | ||
50 | ranges = <0 0x70000000 0x2000000>; | ||
51 | |||
52 | interrupt-parent = <&intc>; | ||
53 | |||
54 | cpu_ctrl: syscon@0 { | ||
55 | compatible = "mscc,ocelot-cpu-syscon", "syscon"; | ||
56 | reg = <0x0 0x2c>; | ||
57 | }; | ||
58 | |||
59 | intc: interrupt-controller@70 { | ||
60 | compatible = "mscc,ocelot-icpu-intr"; | ||
61 | reg = <0x70 0x70>; | ||
62 | #interrupt-cells = <1>; | ||
63 | interrupt-controller; | ||
64 | interrupt-parent = <&cpuintc>; | ||
65 | interrupts = <2>; | ||
66 | }; | ||
67 | |||
68 | uart0: serial@100000 { | ||
69 | pinctrl-0 = <&uart_pins>; | ||
70 | pinctrl-names = "default"; | ||
71 | compatible = "ns16550a"; | ||
72 | reg = <0x100000 0x20>; | ||
73 | interrupts = <6>; | ||
74 | clocks = <&ahb_clk>; | ||
75 | reg-io-width = <4>; | ||
76 | reg-shift = <2>; | ||
77 | |||
78 | status = "disabled"; | ||
79 | }; | ||
80 | |||
81 | i2c: i2c@100400 { | ||
82 | compatible = "mscc,ocelot-i2c", "snps,designware-i2c"; | ||
83 | pinctrl-0 = <&i2c_pins>; | ||
84 | pinctrl-names = "default"; | ||
85 | reg = <0x100400 0x100>, <0x198 0x8>; | ||
86 | #address-cells = <1>; | ||
87 | #size-cells = <0>; | ||
88 | interrupts = <8>; | ||
89 | clocks = <&ahb_clk>; | ||
90 | |||
91 | status = "disabled"; | ||
92 | }; | ||
93 | |||
94 | uart2: serial@100800 { | ||
95 | pinctrl-0 = <&uart2_pins>; | ||
96 | pinctrl-names = "default"; | ||
97 | compatible = "ns16550a"; | ||
98 | reg = <0x100800 0x20>; | ||
99 | interrupts = <7>; | ||
100 | clocks = <&ahb_clk>; | ||
101 | reg-io-width = <4>; | ||
102 | reg-shift = <2>; | ||
103 | |||
104 | status = "disabled"; | ||
105 | }; | ||
106 | |||
107 | spi: spi@101000 { | ||
108 | compatible = "mscc,ocelot-spi", "snps,dw-apb-ssi"; | ||
109 | #address-cells = <1>; | ||
110 | #size-cells = <0>; | ||
111 | reg = <0x101000 0x100>, <0x3c 0x18>; | ||
112 | interrupts = <9>; | ||
113 | clocks = <&ahb_clk>; | ||
114 | |||
115 | status = "disabled"; | ||
116 | }; | ||
117 | |||
118 | switch@1010000 { | ||
119 | compatible = "mscc,vsc7514-switch"; | ||
120 | reg = <0x1010000 0x10000>, | ||
121 | <0x1030000 0x10000>, | ||
122 | <0x1080000 0x100>, | ||
123 | <0x10e0000 0x10000>, | ||
124 | <0x11e0000 0x100>, | ||
125 | <0x11f0000 0x100>, | ||
126 | <0x1200000 0x100>, | ||
127 | <0x1210000 0x100>, | ||
128 | <0x1220000 0x100>, | ||
129 | <0x1230000 0x100>, | ||
130 | <0x1240000 0x100>, | ||
131 | <0x1250000 0x100>, | ||
132 | <0x1260000 0x100>, | ||
133 | <0x1270000 0x100>, | ||
134 | <0x1280000 0x100>, | ||
135 | <0x1800000 0x80000>, | ||
136 | <0x1880000 0x10000>, | ||
137 | <0x1040000 0x10000>, | ||
138 | <0x1050000 0x10000>, | ||
139 | <0x1060000 0x10000>; | ||
140 | reg-names = "sys", "rew", "qs", "ptp", "port0", "port1", | ||
141 | "port2", "port3", "port4", "port5", "port6", | ||
142 | "port7", "port8", "port9", "port10", "qsys", | ||
143 | "ana", "s0", "s1", "s2"; | ||
144 | interrupts = <18 21 22>; | ||
145 | interrupt-names = "ptp_rdy", "xtr", "inj"; | ||
146 | |||
147 | ethernet-ports { | ||
148 | #address-cells = <1>; | ||
149 | #size-cells = <0>; | ||
150 | |||
151 | port0: port@0 { | ||
152 | reg = <0>; | ||
153 | }; | ||
154 | port1: port@1 { | ||
155 | reg = <1>; | ||
156 | }; | ||
157 | port2: port@2 { | ||
158 | reg = <2>; | ||
159 | }; | ||
160 | port3: port@3 { | ||
161 | reg = <3>; | ||
162 | }; | ||
163 | port4: port@4 { | ||
164 | reg = <4>; | ||
165 | }; | ||
166 | port5: port@5 { | ||
167 | reg = <5>; | ||
168 | }; | ||
169 | port6: port@6 { | ||
170 | reg = <6>; | ||
171 | }; | ||
172 | port7: port@7 { | ||
173 | reg = <7>; | ||
174 | }; | ||
175 | port8: port@8 { | ||
176 | reg = <8>; | ||
177 | }; | ||
178 | port9: port@9 { | ||
179 | reg = <9>; | ||
180 | }; | ||
181 | port10: port@10 { | ||
182 | reg = <10>; | ||
183 | }; | ||
184 | }; | ||
185 | }; | ||
186 | |||
187 | reset@1070008 { | ||
188 | compatible = "mscc,ocelot-chip-reset"; | ||
189 | reg = <0x1070008 0x4>; | ||
190 | }; | ||
191 | |||
192 | gpio: pinctrl@1070034 { | ||
193 | compatible = "mscc,ocelot-pinctrl"; | ||
194 | reg = <0x1070034 0x68>; | ||
195 | gpio-controller; | ||
196 | #gpio-cells = <2>; | ||
197 | gpio-ranges = <&gpio 0 0 22>; | ||
198 | interrupt-controller; | ||
199 | interrupts = <13>; | ||
200 | #interrupt-cells = <2>; | ||
201 | |||
202 | i2c_pins: i2c-pins { | ||
203 | pins = "GPIO_16", "GPIO_17"; | ||
204 | function = "twi"; | ||
205 | }; | ||
206 | |||
207 | uart_pins: uart-pins { | ||
208 | pins = "GPIO_6", "GPIO_7"; | ||
209 | function = "uart"; | ||
210 | }; | ||
211 | |||
212 | uart2_pins: uart2-pins { | ||
213 | pins = "GPIO_12", "GPIO_13"; | ||
214 | function = "uart2"; | ||
215 | }; | ||
216 | |||
217 | miim1: miim1 { | ||
218 | pins = "GPIO_14", "GPIO_15"; | ||
219 | function = "miim"; | ||
220 | }; | ||
221 | |||
222 | }; | ||
223 | |||
224 | mdio0: mdio@107009c { | ||
225 | #address-cells = <1>; | ||
226 | #size-cells = <0>; | ||
227 | compatible = "mscc,ocelot-miim"; | ||
228 | reg = <0x107009c 0x24>, <0x10700f0 0x8>; | ||
229 | interrupts = <14>; | ||
230 | status = "disabled"; | ||
231 | |||
232 | phy0: ethernet-phy@0 { | ||
233 | reg = <0>; | ||
234 | }; | ||
235 | phy1: ethernet-phy@1 { | ||
236 | reg = <1>; | ||
237 | }; | ||
238 | phy2: ethernet-phy@2 { | ||
239 | reg = <2>; | ||
240 | }; | ||
241 | phy3: ethernet-phy@3 { | ||
242 | reg = <3>; | ||
243 | }; | ||
244 | }; | ||
245 | |||
246 | mdio1: mdio@10700c0 { | ||
247 | #address-cells = <1>; | ||
248 | #size-cells = <0>; | ||
249 | compatible = "mscc,ocelot-miim"; | ||
250 | reg = <0x10700c0 0x24>; | ||
251 | interrupts = <15>; | ||
252 | pinctrl-names = "default"; | ||
253 | pinctrl-0 = <&miim1>; | ||
254 | status = "disabled"; | ||
255 | }; | ||
256 | |||
257 | hsio: syscon@10d0000 { | ||
258 | compatible = "mscc,ocelot-hsio", "syscon", "simple-mfd"; | ||
259 | reg = <0x10d0000 0x10000>; | ||
260 | |||
261 | serdes: serdes { | ||
262 | compatible = "mscc,vsc7514-serdes"; | ||
263 | #phy-cells = <2>; | ||
264 | }; | ||
265 | }; | ||
266 | }; | ||
267 | }; | ||
diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb120.dts b/arch/mips/boot/dts/mscc/ocelot_pcb120.dts new file mode 100644 index 000000000..897de5025 --- /dev/null +++ b/arch/mips/boot/dts/mscc/ocelot_pcb120.dts | |||
@@ -0,0 +1,117 @@ | |||
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
2 | /* Copyright (c) 2017 Microsemi Corporation */ | ||
3 | |||
4 | /dts-v1/; | ||
5 | |||
6 | #include <dt-bindings/gpio/gpio.h> | ||
7 | #include <dt-bindings/interrupt-controller/irq.h> | ||
8 | #include <dt-bindings/phy/phy-ocelot-serdes.h> | ||
9 | #include "ocelot.dtsi" | ||
10 | |||
11 | / { | ||
12 | compatible = "mscc,ocelot-pcb120", "mscc,ocelot"; | ||
13 | |||
14 | chosen { | ||
15 | stdout-path = "serial0:115200n8"; | ||
16 | }; | ||
17 | |||
18 | memory@0 { | ||
19 | device_type = "memory"; | ||
20 | reg = <0x0 0x0e000000>; | ||
21 | }; | ||
22 | }; | ||
23 | |||
24 | &gpio { | ||
25 | phy_int_pins: phy_int_pins { | ||
26 | pins = "GPIO_4"; | ||
27 | function = "gpio"; | ||
28 | }; | ||
29 | |||
30 | phy_load_save_pins: phy_load_save_pins { | ||
31 | pins = "GPIO_10"; | ||
32 | function = "ptp2"; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | &mdio0 { | ||
37 | status = "okay"; | ||
38 | }; | ||
39 | |||
40 | &mdio1 { | ||
41 | status = "okay"; | ||
42 | pinctrl-names = "default"; | ||
43 | pinctrl-0 = <&miim1>, <&phy_int_pins>, <&phy_load_save_pins>; | ||
44 | |||
45 | phy7: ethernet-phy@0 { | ||
46 | reg = <0>; | ||
47 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
48 | interrupt-parent = <&gpio>; | ||
49 | load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; | ||
50 | }; | ||
51 | phy6: ethernet-phy@1 { | ||
52 | reg = <1>; | ||
53 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
54 | interrupt-parent = <&gpio>; | ||
55 | load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; | ||
56 | }; | ||
57 | phy5: ethernet-phy@2 { | ||
58 | reg = <2>; | ||
59 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
60 | interrupt-parent = <&gpio>; | ||
61 | load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; | ||
62 | }; | ||
63 | phy4: ethernet-phy@3 { | ||
64 | reg = <3>; | ||
65 | interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; | ||
66 | interrupt-parent = <&gpio>; | ||
67 | load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>; | ||
68 | }; | ||
69 | }; | ||
70 | |||
71 | &port0 { | ||
72 | phy-handle = <&phy0>; | ||
73 | }; | ||
74 | |||
75 | &port1 { | ||
76 | phy-handle = <&phy1>; | ||
77 | }; | ||
78 | |||
79 | &port2 { | ||
80 | phy-handle = <&phy2>; | ||
81 | }; | ||
82 | |||
83 | &port3 { | ||
84 | phy-handle = <&phy3>; | ||
85 | }; | ||
86 | |||
87 | &port4 { | ||
88 | phy-handle = <&phy7>; | ||
89 | phy-mode = "sgmii"; | ||
90 | phys = <&serdes 4 SERDES1G(2)>; | ||
91 | }; | ||
92 | |||
93 | &port5 { | ||
94 | phy-handle = <&phy4>; | ||
95 | phy-mode = "sgmii"; | ||
96 | phys = <&serdes 5 SERDES1G(5)>; | ||
97 | }; | ||
98 | |||
99 | &port6 { | ||
100 | phy-handle = <&phy6>; | ||
101 | phy-mode = "sgmii"; | ||
102 | phys = <&serdes 6 SERDES1G(3)>; | ||
103 | }; | ||
104 | |||
105 | &port9 { | ||
106 | phy-handle = <&phy5>; | ||
107 | phy-mode = "sgmii"; | ||
108 | phys = <&serdes 9 SERDES1G(4)>; | ||
109 | }; | ||
110 | |||
111 | &uart0 { | ||
112 | status = "okay"; | ||
113 | }; | ||
114 | |||
115 | &uart2 { | ||
116 | status = "okay"; | ||
117 | }; | ||
diff --git a/arch/mips/boot/dts/mscc/ocelot_pcb123.dts b/arch/mips/boot/dts/mscc/ocelot_pcb123.dts new file mode 100644 index 000000000..ef852f382 --- /dev/null +++ b/arch/mips/boot/dts/mscc/ocelot_pcb123.dts | |||
@@ -0,0 +1,63 @@ | |||
1 | // SPDX-License-Identifier: (GPL-2.0 OR MIT) | ||
2 | /* Copyright (c) 2017 Microsemi Corporation */ | ||
3 | |||
4 | /dts-v1/; | ||
5 | |||
6 | #include "ocelot.dtsi" | ||
7 | |||
8 | / { | ||
9 | compatible = "mscc,ocelot-pcb123", "mscc,ocelot"; | ||
10 | |||
11 | chosen { | ||
12 | stdout-path = "serial0:115200n8"; | ||
13 | }; | ||
14 | |||
15 | memory@0 { | ||
16 | device_type = "memory"; | ||
17 | reg = <0x0 0x0e000000>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
21 | &uart0 { | ||
22 | status = "okay"; | ||
23 | }; | ||
24 | |||
25 | &uart2 { | ||
26 | status = "okay"; | ||
27 | }; | ||
28 | |||
29 | &spi { | ||
30 | status = "okay"; | ||
31 | |||
32 | flash@0 { | ||
33 | compatible = "macronix,mx25l25635f", "jedec,spi-nor"; | ||
34 | spi-max-frequency = <20000000>; | ||
35 | reg = <0>; | ||
36 | }; | ||
37 | }; | ||
38 | |||
39 | &i2c { | ||
40 | clock-frequency = <100000>; | ||
41 | i2c-sda-hold-time-ns = <300>; | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | &mdio0 { | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | |||
49 | &port0 { | ||
50 | phy-handle = <&phy0>; | ||
51 | }; | ||
52 | |||
53 | &port1 { | ||
54 | phy-handle = <&phy1>; | ||
55 | }; | ||
56 | |||
57 | &port2 { | ||
58 | phy-handle = <&phy2>; | ||
59 | }; | ||
60 | |||
61 | &port3 { | ||
62 | phy-handle = <&phy3>; | ||
63 | }; | ||
diff --git a/arch/mips/boot/dts/mti/Makefile b/arch/mips/boot/dts/mti/Makefile new file mode 100644 index 000000000..b5f742699 --- /dev/null +++ b/arch/mips/boot/dts/mti/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_MIPS_MALTA) += malta.dtb | ||
3 | dtb-$(CONFIG_LEGACY_BOARD_SEAD3) += sead3.dtb | ||
4 | |||
5 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/mti/malta.dts b/arch/mips/boot/dts/mti/malta.dts new file mode 100644 index 000000000..f03279b1c --- /dev/null +++ b/arch/mips/boot/dts/mti/malta.dts | |||
@@ -0,0 +1,117 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include <dt-bindings/interrupt-controller/irq.h> | ||
5 | #include <dt-bindings/interrupt-controller/mips-gic.h> | ||
6 | |||
7 | /memreserve/ 0x00000000 0x00001000; /* YAMON exception vectors */ | ||
8 | /memreserve/ 0x00001000 0x000ef000; /* YAMON */ | ||
9 | /memreserve/ 0x000f0000 0x00010000; /* PIIX4 ISA memory */ | ||
10 | |||
11 | / { | ||
12 | #address-cells = <1>; | ||
13 | #size-cells = <1>; | ||
14 | compatible = "mti,malta"; | ||
15 | |||
16 | cpu_intc: interrupt-controller { | ||
17 | compatible = "mti,cpu-interrupt-controller"; | ||
18 | |||
19 | interrupt-controller; | ||
20 | #interrupt-cells = <1>; | ||
21 | }; | ||
22 | |||
23 | gic: interrupt-controller@1bdc0000 { | ||
24 | compatible = "mti,gic"; | ||
25 | reg = <0x1bdc0000 0x20000>; | ||
26 | |||
27 | interrupt-controller; | ||
28 | #interrupt-cells = <3>; | ||
29 | |||
30 | /* | ||
31 | * Declare the interrupt-parent even though the mti,gic | ||
32 | * binding doesn't require it, such that the kernel can | ||
33 | * figure out that cpu_intc is the root interrupt | ||
34 | * controller & should be probed first. | ||
35 | */ | ||
36 | interrupt-parent = <&cpu_intc>; | ||
37 | |||
38 | timer { | ||
39 | compatible = "mti,gic-timer"; | ||
40 | interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | i8259: interrupt-controller@20 { | ||
45 | compatible = "intel,i8259"; | ||
46 | |||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <1>; | ||
49 | |||
50 | interrupt-parent = <&gic>; | ||
51 | interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>; | ||
52 | }; | ||
53 | |||
54 | flash@1e000000 { | ||
55 | compatible = "intel,dt28f160", "cfi-flash"; | ||
56 | reg = <0x1e000000 0x400000>; | ||
57 | bank-width = <4>; | ||
58 | #address-cells = <1>; | ||
59 | #size-cells = <1>; | ||
60 | |||
61 | partitions { | ||
62 | compatible = "fixed-partitions"; | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <1>; | ||
65 | |||
66 | yamon@0 { | ||
67 | label = "YAMON"; | ||
68 | reg = <0x0 0x100000>; | ||
69 | read-only; | ||
70 | }; | ||
71 | |||
72 | user-fs@100000 { | ||
73 | label = "User FS"; | ||
74 | reg = <0x100000 0x2e0000>; | ||
75 | }; | ||
76 | |||
77 | board-config@3e0000 { | ||
78 | label = "Board Config"; | ||
79 | reg = <0x3e0000 0x20000>; | ||
80 | read-only; | ||
81 | }; | ||
82 | }; | ||
83 | }; | ||
84 | |||
85 | fpga_regs: system-controller@1f000000 { | ||
86 | compatible = "mti,malta-fpga", "syscon", "simple-mfd"; | ||
87 | reg = <0x1f000000 0x1000>; | ||
88 | native-endian; | ||
89 | |||
90 | lcd@410 { | ||
91 | compatible = "mti,malta-lcd"; | ||
92 | offset = <0x410>; | ||
93 | }; | ||
94 | |||
95 | reboot { | ||
96 | compatible = "syscon-reboot"; | ||
97 | regmap = <&fpga_regs>; | ||
98 | offset = <0x500>; | ||
99 | mask = <0x42>; | ||
100 | }; | ||
101 | }; | ||
102 | |||
103 | isa { | ||
104 | compatible = "isa"; | ||
105 | #address-cells = <2>; | ||
106 | #size-cells = <1>; | ||
107 | ranges = <1 0 0 0x1000>; | ||
108 | |||
109 | rtc@70 { | ||
110 | compatible = "motorola,mc146818"; | ||
111 | reg = <1 0x70 0x8>; | ||
112 | |||
113 | interrupt-parent = <&i8259>; | ||
114 | interrupts = <8>; | ||
115 | }; | ||
116 | }; | ||
117 | }; | ||
diff --git a/arch/mips/boot/dts/mti/sead3.dts b/arch/mips/boot/dts/mti/sead3.dts new file mode 100644 index 000000000..192c26ff1 --- /dev/null +++ b/arch/mips/boot/dts/mti/sead3.dts | |||
@@ -0,0 +1,259 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /memreserve/ 0x00000000 0x00001000; // reserved | ||
5 | /memreserve/ 0x00001000 0x000ef000; // ROM data | ||
6 | /memreserve/ 0x000f0000 0x004cc000; // reserved | ||
7 | |||
8 | #include <dt-bindings/interrupt-controller/mips-gic.h> | ||
9 | |||
10 | / { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <1>; | ||
13 | compatible = "mti,sead-3"; | ||
14 | model = "MIPS SEAD-3"; | ||
15 | |||
16 | chosen { | ||
17 | stdout-path = "serial1:115200"; | ||
18 | }; | ||
19 | |||
20 | aliases { | ||
21 | serial0 = &uart0; | ||
22 | serial1 = &uart1; | ||
23 | }; | ||
24 | |||
25 | cpus { | ||
26 | cpu@0 { | ||
27 | compatible = "mti,mips14KEc", "mti,mips14Kc"; | ||
28 | }; | ||
29 | }; | ||
30 | |||
31 | memory { | ||
32 | device_type = "memory"; | ||
33 | reg = <0x0 0x08000000>; | ||
34 | }; | ||
35 | |||
36 | cpu_intc: interrupt-controller { | ||
37 | compatible = "mti,cpu-interrupt-controller"; | ||
38 | |||
39 | interrupt-controller; | ||
40 | #interrupt-cells = <1>; | ||
41 | }; | ||
42 | |||
43 | gic: interrupt-controller@1b1c0000 { | ||
44 | compatible = "mti,gic"; | ||
45 | reg = <0x1b1c0000 0x20000>; | ||
46 | |||
47 | interrupt-controller; | ||
48 | #interrupt-cells = <3>; | ||
49 | |||
50 | /* | ||
51 | * Declare the interrupt-parent even though the mti,gic | ||
52 | * binding doesn't require it, such that the kernel can | ||
53 | * figure out that cpu_intc is the root interrupt | ||
54 | * controller & should be probed first. | ||
55 | */ | ||
56 | interrupt-parent = <&cpu_intc>; | ||
57 | }; | ||
58 | |||
59 | ehci@1b200000 { | ||
60 | compatible = "generic-ehci"; | ||
61 | reg = <0x1b200000 0x1000>; | ||
62 | |||
63 | interrupt-parent = <&gic>; | ||
64 | interrupts = <GIC_SHARED 0 IRQ_TYPE_LEVEL_HIGH>; /* GIC 0 or CPU 6 */ | ||
65 | |||
66 | has-transaction-translator; | ||
67 | }; | ||
68 | |||
69 | flash@1c000000 { | ||
70 | compatible = "intel,28f128j3", "cfi-flash"; | ||
71 | reg = <0x1c000000 0x2000000>; | ||
72 | #address-cells = <1>; | ||
73 | #size-cells = <1>; | ||
74 | bank-width = <4>; | ||
75 | |||
76 | partitions { | ||
77 | compatible = "fixed-partitions"; | ||
78 | #address-cells = <1>; | ||
79 | #size-cells = <1>; | ||
80 | |||
81 | user-fs@0 { | ||
82 | label = "User FS"; | ||
83 | reg = <0x0 0x1fc0000>; | ||
84 | }; | ||
85 | |||
86 | board-config@3e0000 { | ||
87 | label = "Board Config"; | ||
88 | reg = <0x1fc0000 0x40000>; | ||
89 | }; | ||
90 | }; | ||
91 | }; | ||
92 | |||
93 | fpga_regs: system-controller@1f000000 { | ||
94 | compatible = "mti,sead3-fpga", "syscon", "simple-mfd"; | ||
95 | reg = <0x1f000000 0x200>; | ||
96 | |||
97 | reboot { | ||
98 | compatible = "syscon-reboot"; | ||
99 | regmap = <&fpga_regs>; | ||
100 | offset = <0x50>; | ||
101 | mask = <0x4d>; | ||
102 | }; | ||
103 | |||
104 | poweroff { | ||
105 | compatible = "restart-poweroff"; | ||
106 | }; | ||
107 | }; | ||
108 | |||
109 | system-controller@1f000200 { | ||
110 | compatible = "mti,sead3-cpld", "syscon", "simple-mfd"; | ||
111 | reg = <0x1f000200 0x300>; | ||
112 | |||
113 | led@10.0 { | ||
114 | compatible = "register-bit-led"; | ||
115 | offset = <0x10>; | ||
116 | mask = <0x1>; | ||
117 | label = "pled0"; | ||
118 | }; | ||
119 | led@10.1 { | ||
120 | compatible = "register-bit-led"; | ||
121 | offset = <0x10>; | ||
122 | mask = <0x2>; | ||
123 | label = "pled1"; | ||
124 | }; | ||
125 | led@10.2 { | ||
126 | compatible = "register-bit-led"; | ||
127 | offset = <0x10>; | ||
128 | mask = <0x4>; | ||
129 | label = "pled2"; | ||
130 | }; | ||
131 | led@10.3 { | ||
132 | compatible = "register-bit-led"; | ||
133 | offset = <0x10>; | ||
134 | mask = <0x8>; | ||
135 | label = "pled3"; | ||
136 | }; | ||
137 | led@10.4 { | ||
138 | compatible = "register-bit-led"; | ||
139 | offset = <0x10>; | ||
140 | mask = <0x10>; | ||
141 | label = "pled4"; | ||
142 | }; | ||
143 | led@10.5 { | ||
144 | compatible = "register-bit-led"; | ||
145 | offset = <0x10>; | ||
146 | mask = <0x20>; | ||
147 | label = "pled5"; | ||
148 | }; | ||
149 | led@10.6 { | ||
150 | compatible = "register-bit-led"; | ||
151 | offset = <0x10>; | ||
152 | mask = <0x40>; | ||
153 | label = "pled6"; | ||
154 | }; | ||
155 | led@10.7 { | ||
156 | compatible = "register-bit-led"; | ||
157 | offset = <0x10>; | ||
158 | mask = <0x80>; | ||
159 | label = "pled7"; | ||
160 | }; | ||
161 | |||
162 | led@18.0 { | ||
163 | compatible = "register-bit-led"; | ||
164 | offset = <0x18>; | ||
165 | mask = <0x1>; | ||
166 | label = "fled0"; | ||
167 | }; | ||
168 | led@18.1 { | ||
169 | compatible = "register-bit-led"; | ||
170 | offset = <0x18>; | ||
171 | mask = <0x2>; | ||
172 | label = "fled1"; | ||
173 | }; | ||
174 | led@18.2 { | ||
175 | compatible = "register-bit-led"; | ||
176 | offset = <0x18>; | ||
177 | mask = <0x4>; | ||
178 | label = "fled2"; | ||
179 | }; | ||
180 | led@18.3 { | ||
181 | compatible = "register-bit-led"; | ||
182 | offset = <0x18>; | ||
183 | mask = <0x8>; | ||
184 | label = "fled3"; | ||
185 | }; | ||
186 | led@18.4 { | ||
187 | compatible = "register-bit-led"; | ||
188 | offset = <0x18>; | ||
189 | mask = <0x10>; | ||
190 | label = "fled4"; | ||
191 | }; | ||
192 | led@18.5 { | ||
193 | compatible = "register-bit-led"; | ||
194 | offset = <0x18>; | ||
195 | mask = <0x20>; | ||
196 | label = "fled5"; | ||
197 | }; | ||
198 | led@18.6 { | ||
199 | compatible = "register-bit-led"; | ||
200 | offset = <0x18>; | ||
201 | mask = <0x40>; | ||
202 | label = "fled6"; | ||
203 | }; | ||
204 | led@18.7 { | ||
205 | compatible = "register-bit-led"; | ||
206 | offset = <0x18>; | ||
207 | mask = <0x80>; | ||
208 | label = "fled7"; | ||
209 | }; | ||
210 | |||
211 | lcd@200 { | ||
212 | compatible = "mti,sead3-lcd"; | ||
213 | offset = <0x200>; | ||
214 | }; | ||
215 | }; | ||
216 | |||
217 | /* UART connected to FTDI & miniUSB socket */ | ||
218 | uart0: uart@1f000900 { | ||
219 | compatible = "ns16550a"; | ||
220 | reg = <0x1f000900 0x20>; | ||
221 | reg-io-width = <4>; | ||
222 | reg-shift = <2>; | ||
223 | |||
224 | clock-frequency = <14745600>; | ||
225 | |||
226 | interrupt-parent = <&gic>; | ||
227 | interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>; /* GIC 3 or CPU 4 */ | ||
228 | |||
229 | no-loopback-test; | ||
230 | }; | ||
231 | |||
232 | /* UART connected to RS232 socket */ | ||
233 | uart1: uart@1f000800 { | ||
234 | compatible = "ns16550a"; | ||
235 | reg = <0x1f000800 0x20>; | ||
236 | reg-io-width = <4>; | ||
237 | reg-shift = <2>; | ||
238 | |||
239 | clock-frequency = <14745600>; | ||
240 | |||
241 | interrupt-parent = <&gic>; | ||
242 | interrupts = <GIC_SHARED 2 IRQ_TYPE_LEVEL_HIGH>; /* GIC 2 or CPU 4 */ | ||
243 | |||
244 | no-loopback-test; | ||
245 | }; | ||
246 | |||
247 | eth@1f010000 { | ||
248 | compatible = "smsc,lan9115"; | ||
249 | reg = <0x1f010000 0x10000>; | ||
250 | reg-io-width = <4>; | ||
251 | |||
252 | interrupt-parent = <&gic>; | ||
253 | interrupts = <GIC_SHARED 0 IRQ_TYPE_LEVEL_HIGH>; /* GIC 0 or CPU 6 */ | ||
254 | |||
255 | phy-mode = "mii"; | ||
256 | smsc,irq-push-pull; | ||
257 | smsc,save-mac-address; | ||
258 | }; | ||
259 | }; | ||
diff --git a/arch/mips/boot/dts/netlogic/Makefile b/arch/mips/boot/dts/netlogic/Makefile new file mode 100644 index 000000000..45af42244 --- /dev/null +++ b/arch/mips/boot/dts/netlogic/Makefile | |||
@@ -0,0 +1,8 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_DT_XLP_EVP) += xlp_evp.dtb | ||
3 | dtb-$(CONFIG_DT_XLP_SVP) += xlp_svp.dtb | ||
4 | dtb-$(CONFIG_DT_XLP_FVP) += xlp_fvp.dtb | ||
5 | dtb-$(CONFIG_DT_XLP_GVP) += xlp_gvp.dtb | ||
6 | dtb-$(CONFIG_DT_XLP_RVP) += xlp_rvp.dtb | ||
7 | |||
8 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/netlogic/xlp_evp.dts b/arch/mips/boot/dts/netlogic/xlp_evp.dts new file mode 100644 index 000000000..e63e55926 --- /dev/null +++ b/arch/mips/boot/dts/netlogic/xlp_evp.dts | |||
@@ -0,0 +1,131 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * XLP8XX Device Tree Source for EVP boards | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | / { | ||
8 | model = "netlogic,XLP-EVP"; | ||
9 | compatible = "netlogic,xlp"; | ||
10 | #address-cells = <2>; | ||
11 | #size-cells = <2>; | ||
12 | |||
13 | soc { | ||
14 | #address-cells = <2>; | ||
15 | #size-cells = <1>; | ||
16 | compatible = "simple-bus"; | ||
17 | ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG | ||
18 | 1 0 0 0x16000000 0x02000000>; // GBU chipselects | ||
19 | |||
20 | serial0: serial@30000 { | ||
21 | device_type = "serial"; | ||
22 | compatible = "ns16550"; | ||
23 | reg = <0 0x30100 0xa00>; | ||
24 | reg-shift = <2>; | ||
25 | reg-io-width = <4>; | ||
26 | clock-frequency = <133333333>; | ||
27 | interrupt-parent = <&pic>; | ||
28 | interrupts = <17>; | ||
29 | }; | ||
30 | serial1: serial@31000 { | ||
31 | device_type = "serial"; | ||
32 | compatible = "ns16550"; | ||
33 | reg = <0 0x31100 0xa00>; | ||
34 | reg-shift = <2>; | ||
35 | reg-io-width = <4>; | ||
36 | clock-frequency = <133333333>; | ||
37 | interrupt-parent = <&pic>; | ||
38 | interrupts = <18>; | ||
39 | }; | ||
40 | i2c0: ocores@32000 { | ||
41 | compatible = "opencores,i2c-ocores"; | ||
42 | #address-cells = <1>; | ||
43 | #size-cells = <0>; | ||
44 | reg = <0 0x32100 0xa00>; | ||
45 | reg-shift = <2>; | ||
46 | reg-io-width = <4>; | ||
47 | clock-frequency = <32000000>; | ||
48 | interrupt-parent = <&pic>; | ||
49 | interrupts = <30>; | ||
50 | }; | ||
51 | i2c1: ocores@33000 { | ||
52 | compatible = "opencores,i2c-ocores"; | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <0>; | ||
55 | reg = <0 0x33100 0xa00>; | ||
56 | reg-shift = <2>; | ||
57 | reg-io-width = <4>; | ||
58 | clock-frequency = <32000000>; | ||
59 | interrupt-parent = <&pic>; | ||
60 | interrupts = <31>; | ||
61 | |||
62 | rtc@68 { | ||
63 | compatible = "dallas,ds1374"; | ||
64 | reg = <0x68>; | ||
65 | }; | ||
66 | |||
67 | dtt@4c { | ||
68 | compatible = "national,lm90"; | ||
69 | reg = <0x4c>; | ||
70 | }; | ||
71 | }; | ||
72 | pic: pic@4000 { | ||
73 | compatible = "netlogic,xlp-pic"; | ||
74 | #address-cells = <0>; | ||
75 | #interrupt-cells = <1>; | ||
76 | reg = <0 0x4000 0x200>; | ||
77 | interrupt-controller; | ||
78 | }; | ||
79 | |||
80 | nor_flash@1,0 { | ||
81 | compatible = "cfi-flash"; | ||
82 | #address-cells = <1>; | ||
83 | #size-cells = <1>; | ||
84 | bank-width = <2>; | ||
85 | reg = <1 0 0x1000000>; | ||
86 | |||
87 | partition@0 { | ||
88 | label = "x-loader"; | ||
89 | reg = <0x0 0x100000>; /* 1M */ | ||
90 | read-only; | ||
91 | }; | ||
92 | |||
93 | partition@100000 { | ||
94 | label = "u-boot"; | ||
95 | reg = <0x100000 0x100000>; /* 1M */ | ||
96 | }; | ||
97 | |||
98 | partition@200000 { | ||
99 | label = "kernel"; | ||
100 | reg = <0x200000 0x500000>; /* 5M */ | ||
101 | }; | ||
102 | |||
103 | partition@700000 { | ||
104 | label = "rootfs"; | ||
105 | reg = <0x700000 0x800000>; /* 8M */ | ||
106 | }; | ||
107 | |||
108 | partition@f00000 { | ||
109 | label = "env"; | ||
110 | reg = <0xf00000 0x100000>; /* 1M */ | ||
111 | read-only; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | gpio: xlp_gpio@34100 { | ||
116 | compatible = "netlogic,xlp832-gpio"; | ||
117 | reg = <0 0x34100 0x1000>; | ||
118 | #gpio-cells = <2>; | ||
119 | gpio-controller; | ||
120 | |||
121 | #interrupt-cells = <2>; | ||
122 | interrupt-parent = <&pic>; | ||
123 | interrupts = <39>; | ||
124 | interrupt-controller; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | chosen { | ||
129 | bootargs = "console=ttyS0,115200 rdinit=/sbin/init"; | ||
130 | }; | ||
131 | }; | ||
diff --git a/arch/mips/boot/dts/netlogic/xlp_fvp.dts b/arch/mips/boot/dts/netlogic/xlp_fvp.dts new file mode 100644 index 000000000..d05abf13f --- /dev/null +++ b/arch/mips/boot/dts/netlogic/xlp_fvp.dts | |||
@@ -0,0 +1,131 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * XLP2XX Device Tree Source for FVP boards | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | / { | ||
8 | model = "netlogic,XLP-FVP"; | ||
9 | compatible = "netlogic,xlp"; | ||
10 | #address-cells = <2>; | ||
11 | #size-cells = <2>; | ||
12 | |||
13 | soc { | ||
14 | #address-cells = <2>; | ||
15 | #size-cells = <1>; | ||
16 | compatible = "simple-bus"; | ||
17 | ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG | ||
18 | 1 0 0 0x16000000 0x02000000>; // GBU chipselects | ||
19 | |||
20 | serial0: serial@30000 { | ||
21 | device_type = "serial"; | ||
22 | compatible = "ns16550"; | ||
23 | reg = <0 0x30100 0xa00>; | ||
24 | reg-shift = <2>; | ||
25 | reg-io-width = <4>; | ||
26 | clock-frequency = <133333333>; | ||
27 | interrupt-parent = <&pic>; | ||
28 | interrupts = <17>; | ||
29 | }; | ||
30 | serial1: serial@31000 { | ||
31 | device_type = "serial"; | ||
32 | compatible = "ns16550"; | ||
33 | reg = <0 0x31100 0xa00>; | ||
34 | reg-shift = <2>; | ||
35 | reg-io-width = <4>; | ||
36 | clock-frequency = <133333333>; | ||
37 | interrupt-parent = <&pic>; | ||
38 | interrupts = <18>; | ||
39 | }; | ||
40 | i2c0: ocores@37100 { | ||
41 | compatible = "opencores,i2c-ocores"; | ||
42 | #address-cells = <1>; | ||
43 | #size-cells = <0>; | ||
44 | reg = <0 0x37100 0x20>; | ||
45 | reg-shift = <2>; | ||
46 | reg-io-width = <4>; | ||
47 | clock-frequency = <32000000>; | ||
48 | interrupt-parent = <&pic>; | ||
49 | interrupts = <30>; | ||
50 | }; | ||
51 | i2c1: ocores@37120 { | ||
52 | compatible = "opencores,i2c-ocores"; | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <0>; | ||
55 | reg = <0 0x37120 0x20>; | ||
56 | reg-shift = <2>; | ||
57 | reg-io-width = <4>; | ||
58 | clock-frequency = <32000000>; | ||
59 | interrupt-parent = <&pic>; | ||
60 | interrupts = <31>; | ||
61 | |||
62 | rtc@68 { | ||
63 | compatible = "dallas,ds1374"; | ||
64 | reg = <0x68>; | ||
65 | }; | ||
66 | |||
67 | dtt@4c { | ||
68 | compatible = "national,lm90"; | ||
69 | reg = <0x4c>; | ||
70 | }; | ||
71 | }; | ||
72 | pic: pic@4000 { | ||
73 | compatible = "netlogic,xlp-pic"; | ||
74 | #address-cells = <0>; | ||
75 | #interrupt-cells = <1>; | ||
76 | reg = <0 0x4000 0x200>; | ||
77 | interrupt-controller; | ||
78 | }; | ||
79 | |||
80 | nor_flash@1,0 { | ||
81 | compatible = "cfi-flash"; | ||
82 | #address-cells = <1>; | ||
83 | #size-cells = <1>; | ||
84 | bank-width = <2>; | ||
85 | reg = <1 0 0x1000000>; | ||
86 | |||
87 | partition@0 { | ||
88 | label = "x-loader"; | ||
89 | reg = <0x0 0x100000>; /* 1M */ | ||
90 | read-only; | ||
91 | }; | ||
92 | |||
93 | partition@100000 { | ||
94 | label = "u-boot"; | ||
95 | reg = <0x100000 0x100000>; /* 1M */ | ||
96 | }; | ||
97 | |||
98 | partition@200000 { | ||
99 | label = "kernel"; | ||
100 | reg = <0x200000 0x500000>; /* 5M */ | ||
101 | }; | ||
102 | |||
103 | partition@700000 { | ||
104 | label = "rootfs"; | ||
105 | reg = <0x700000 0x800000>; /* 8M */ | ||
106 | }; | ||
107 | |||
108 | partition@f00000 { | ||
109 | label = "env"; | ||
110 | reg = <0xf00000 0x100000>; /* 1M */ | ||
111 | read-only; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | gpio: xlp_gpio@34100 { | ||
116 | compatible = "netlogic,xlp208-gpio"; | ||
117 | reg = <0 0x34100 0x1000>; | ||
118 | #gpio-cells = <2>; | ||
119 | gpio-controller; | ||
120 | |||
121 | #interrupt-cells = <2>; | ||
122 | interrupt-parent = <&pic>; | ||
123 | interrupts = <39>; | ||
124 | interrupt-controller; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | chosen { | ||
129 | bootargs = "console=ttyS0,115200 rdinit=/sbin/init"; | ||
130 | }; | ||
131 | }; | ||
diff --git a/arch/mips/boot/dts/netlogic/xlp_gvp.dts b/arch/mips/boot/dts/netlogic/xlp_gvp.dts new file mode 100644 index 000000000..d47de4851 --- /dev/null +++ b/arch/mips/boot/dts/netlogic/xlp_gvp.dts | |||
@@ -0,0 +1,89 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * XLP9XX Device Tree Source for GVP boards | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | / { | ||
8 | model = "netlogic,XLP-GVP"; | ||
9 | compatible = "netlogic,xlp"; | ||
10 | #address-cells = <2>; | ||
11 | #size-cells = <2>; | ||
12 | |||
13 | soc { | ||
14 | #address-cells = <2>; | ||
15 | #size-cells = <1>; | ||
16 | compatible = "simple-bus"; | ||
17 | ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG | ||
18 | 1 0 0 0x16000000 0x02000000>; // GBU chipselects | ||
19 | |||
20 | serial0: serial@30000 { | ||
21 | device_type = "serial"; | ||
22 | compatible = "ns16550"; | ||
23 | reg = <0 0x112100 0xa00>; | ||
24 | reg-shift = <2>; | ||
25 | reg-io-width = <4>; | ||
26 | clock-frequency = <125000000>; | ||
27 | interrupt-parent = <&pic>; | ||
28 | interrupts = <17>; | ||
29 | }; | ||
30 | pic: pic@110000 { | ||
31 | compatible = "netlogic,xlp-pic"; | ||
32 | #address-cells = <0>; | ||
33 | #interrupt-cells = <1>; | ||
34 | reg = <0 0x110000 0x200>; | ||
35 | interrupt-controller; | ||
36 | }; | ||
37 | |||
38 | nor_flash@1,0 { | ||
39 | compatible = "cfi-flash"; | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <1>; | ||
42 | bank-width = <2>; | ||
43 | reg = <1 0 0x1000000>; | ||
44 | |||
45 | partition@0 { | ||
46 | label = "x-loader"; | ||
47 | reg = <0x0 0x100000>; /* 1M */ | ||
48 | read-only; | ||
49 | }; | ||
50 | |||
51 | partition@100000 { | ||
52 | label = "u-boot"; | ||
53 | reg = <0x100000 0x100000>; /* 1M */ | ||
54 | }; | ||
55 | |||
56 | partition@200000 { | ||
57 | label = "kernel"; | ||
58 | reg = <0x200000 0x500000>; /* 5M */ | ||
59 | }; | ||
60 | |||
61 | partition@700000 { | ||
62 | label = "rootfs"; | ||
63 | reg = <0x700000 0x800000>; /* 8M */ | ||
64 | }; | ||
65 | |||
66 | partition@f00000 { | ||
67 | label = "env"; | ||
68 | reg = <0xf00000 0x100000>; /* 1M */ | ||
69 | read-only; | ||
70 | }; | ||
71 | }; | ||
72 | |||
73 | gpio: xlp_gpio@114100 { | ||
74 | compatible = "netlogic,xlp980-gpio"; | ||
75 | reg = <0 0x114100 0x1000>; | ||
76 | #gpio-cells = <2>; | ||
77 | gpio-controller; | ||
78 | |||
79 | #interrupt-cells = <2>; | ||
80 | interrupt-parent = <&pic>; | ||
81 | interrupts = <39>; | ||
82 | interrupt-controller; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | chosen { | ||
87 | bootargs = "console=ttyS0,115200 rdinit=/sbin/init"; | ||
88 | }; | ||
89 | }; | ||
diff --git a/arch/mips/boot/dts/netlogic/xlp_rvp.dts b/arch/mips/boot/dts/netlogic/xlp_rvp.dts new file mode 100644 index 000000000..aa0faee19 --- /dev/null +++ b/arch/mips/boot/dts/netlogic/xlp_rvp.dts | |||
@@ -0,0 +1,89 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * XLP5XX Device Tree Source for RVP boards | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | / { | ||
8 | model = "netlogic,XLP-RVP"; | ||
9 | compatible = "netlogic,xlp"; | ||
10 | #address-cells = <2>; | ||
11 | #size-cells = <2>; | ||
12 | |||
13 | soc { | ||
14 | #address-cells = <2>; | ||
15 | #size-cells = <1>; | ||
16 | compatible = "simple-bus"; | ||
17 | ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG | ||
18 | 1 0 0 0x16000000 0x02000000>; // GBU chipselects | ||
19 | |||
20 | serial0: serial@30000 { | ||
21 | device_type = "serial"; | ||
22 | compatible = "ns16550"; | ||
23 | reg = <0 0x112100 0xa00>; | ||
24 | reg-shift = <2>; | ||
25 | reg-io-width = <4>; | ||
26 | clock-frequency = <125000000>; | ||
27 | interrupt-parent = <&pic>; | ||
28 | interrupts = <17>; | ||
29 | }; | ||
30 | pic: pic@110000 { | ||
31 | compatible = "netlogic,xlp-pic"; | ||
32 | #address-cells = <0>; | ||
33 | #interrupt-cells = <1>; | ||
34 | reg = <0 0x110000 0x200>; | ||
35 | interrupt-controller; | ||
36 | }; | ||
37 | |||
38 | nor_flash@1,0 { | ||
39 | compatible = "cfi-flash"; | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <1>; | ||
42 | bank-width = <2>; | ||
43 | reg = <1 0 0x1000000>; | ||
44 | |||
45 | partition@0 { | ||
46 | label = "x-loader"; | ||
47 | reg = <0x0 0x100000>; /* 1M */ | ||
48 | read-only; | ||
49 | }; | ||
50 | |||
51 | partition@100000 { | ||
52 | label = "u-boot"; | ||
53 | reg = <0x100000 0x100000>; /* 1M */ | ||
54 | }; | ||
55 | |||
56 | partition@200000 { | ||
57 | label = "kernel"; | ||
58 | reg = <0x200000 0x500000>; /* 5M */ | ||
59 | }; | ||
60 | |||
61 | partition@700000 { | ||
62 | label = "rootfs"; | ||
63 | reg = <0x700000 0x800000>; /* 8M */ | ||
64 | }; | ||
65 | |||
66 | partition@f00000 { | ||
67 | label = "env"; | ||
68 | reg = <0xf00000 0x100000>; /* 1M */ | ||
69 | read-only; | ||
70 | }; | ||
71 | }; | ||
72 | |||
73 | gpio: xlp_gpio@114100 { | ||
74 | compatible = "netlogic,xlp532-gpio"; | ||
75 | reg = <0 0x114100 0x1000>; | ||
76 | #gpio-cells = <2>; | ||
77 | gpio-controller; | ||
78 | |||
79 | #interrupt-cells = <2>; | ||
80 | interrupt-parent = <&pic>; | ||
81 | interrupts = <39>; | ||
82 | interrupt-controller; | ||
83 | }; | ||
84 | }; | ||
85 | |||
86 | chosen { | ||
87 | bootargs = "console=ttyS0,115200 rdinit=/sbin/init"; | ||
88 | }; | ||
89 | }; | ||
diff --git a/arch/mips/boot/dts/netlogic/xlp_svp.dts b/arch/mips/boot/dts/netlogic/xlp_svp.dts new file mode 100644 index 000000000..3bb0b2e08 --- /dev/null +++ b/arch/mips/boot/dts/netlogic/xlp_svp.dts | |||
@@ -0,0 +1,131 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * XLP3XX Device Tree Source for SVP boards | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | / { | ||
8 | model = "netlogic,XLP-SVP"; | ||
9 | compatible = "netlogic,xlp"; | ||
10 | #address-cells = <2>; | ||
11 | #size-cells = <2>; | ||
12 | |||
13 | soc { | ||
14 | #address-cells = <2>; | ||
15 | #size-cells = <1>; | ||
16 | compatible = "simple-bus"; | ||
17 | ranges = <0 0 0 0x18000000 0x04000000 // PCIe CFG | ||
18 | 1 0 0 0x16000000 0x02000000>; // GBU chipselects | ||
19 | |||
20 | serial0: serial@30000 { | ||
21 | device_type = "serial"; | ||
22 | compatible = "ns16550"; | ||
23 | reg = <0 0x30100 0xa00>; | ||
24 | reg-shift = <2>; | ||
25 | reg-io-width = <4>; | ||
26 | clock-frequency = <133333333>; | ||
27 | interrupt-parent = <&pic>; | ||
28 | interrupts = <17>; | ||
29 | }; | ||
30 | serial1: serial@31000 { | ||
31 | device_type = "serial"; | ||
32 | compatible = "ns16550"; | ||
33 | reg = <0 0x31100 0xa00>; | ||
34 | reg-shift = <2>; | ||
35 | reg-io-width = <4>; | ||
36 | clock-frequency = <133333333>; | ||
37 | interrupt-parent = <&pic>; | ||
38 | interrupts = <18>; | ||
39 | }; | ||
40 | i2c0: ocores@32000 { | ||
41 | compatible = "opencores,i2c-ocores"; | ||
42 | #address-cells = <1>; | ||
43 | #size-cells = <0>; | ||
44 | reg = <0 0x32100 0xa00>; | ||
45 | reg-shift = <2>; | ||
46 | reg-io-width = <4>; | ||
47 | clock-frequency = <32000000>; | ||
48 | interrupt-parent = <&pic>; | ||
49 | interrupts = <30>; | ||
50 | }; | ||
51 | i2c1: ocores@33000 { | ||
52 | compatible = "opencores,i2c-ocores"; | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <0>; | ||
55 | reg = <0 0x33100 0xa00>; | ||
56 | reg-shift = <2>; | ||
57 | reg-io-width = <4>; | ||
58 | clock-frequency = <32000000>; | ||
59 | interrupt-parent = <&pic>; | ||
60 | interrupts = <31>; | ||
61 | |||
62 | rtc@68 { | ||
63 | compatible = "dallas,ds1374"; | ||
64 | reg = <0x68>; | ||
65 | }; | ||
66 | |||
67 | dtt@4c { | ||
68 | compatible = "national,lm90"; | ||
69 | reg = <0x4c>; | ||
70 | }; | ||
71 | }; | ||
72 | pic: pic@4000 { | ||
73 | compatible = "netlogic,xlp-pic"; | ||
74 | #address-cells = <0>; | ||
75 | #interrupt-cells = <1>; | ||
76 | reg = <0 0x4000 0x200>; | ||
77 | interrupt-controller; | ||
78 | }; | ||
79 | |||
80 | nor_flash@1,0 { | ||
81 | compatible = "cfi-flash"; | ||
82 | #address-cells = <1>; | ||
83 | #size-cells = <1>; | ||
84 | bank-width = <2>; | ||
85 | reg = <1 0 0x1000000>; | ||
86 | |||
87 | partition@0 { | ||
88 | label = "x-loader"; | ||
89 | reg = <0x0 0x100000>; /* 1M */ | ||
90 | read-only; | ||
91 | }; | ||
92 | |||
93 | partition@100000 { | ||
94 | label = "u-boot"; | ||
95 | reg = <0x100000 0x100000>; /* 1M */ | ||
96 | }; | ||
97 | |||
98 | partition@200000 { | ||
99 | label = "kernel"; | ||
100 | reg = <0x200000 0x500000>; /* 5M */ | ||
101 | }; | ||
102 | |||
103 | partition@700000 { | ||
104 | label = "rootfs"; | ||
105 | reg = <0x700000 0x800000>; /* 8M */ | ||
106 | }; | ||
107 | |||
108 | partition@f00000 { | ||
109 | label = "env"; | ||
110 | reg = <0xf00000 0x100000>; /* 1M */ | ||
111 | read-only; | ||
112 | }; | ||
113 | }; | ||
114 | |||
115 | gpio: xlp_gpio@34100 { | ||
116 | compatible = "netlogic,xlp316-gpio"; | ||
117 | reg = <0 0x34100 0x1000>; | ||
118 | #gpio-cells = <2>; | ||
119 | gpio-controller; | ||
120 | |||
121 | #interrupt-cells = <2>; | ||
122 | interrupt-parent = <&pic>; | ||
123 | interrupts = <39>; | ||
124 | interrupt-controller; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | chosen { | ||
129 | bootargs = "console=ttyS0,115200 rdinit=/sbin/init"; | ||
130 | }; | ||
131 | }; | ||
diff --git a/arch/mips/boot/dts/ni/169445.dts b/arch/mips/boot/dts/ni/169445.dts new file mode 100644 index 000000000..5389ef46c --- /dev/null +++ b/arch/mips/boot/dts/ni/169445.dts | |||
@@ -0,0 +1,100 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | / { | ||
4 | #address-cells = <1>; | ||
5 | #size-cells = <1>; | ||
6 | compatible = "ni,169445"; | ||
7 | |||
8 | cpus { | ||
9 | #address-cells = <1>; | ||
10 | #size-cells = <0>; | ||
11 | cpu@0 { | ||
12 | device_type = "cpu"; | ||
13 | compatible = "mti,mips14KEc"; | ||
14 | clocks = <&baseclk>; | ||
15 | reg = <0>; | ||
16 | }; | ||
17 | }; | ||
18 | |||
19 | memory@0 { | ||
20 | device_type = "memory"; | ||
21 | reg = <0x0 0x10000000>; | ||
22 | }; | ||
23 | |||
24 | baseclk: baseclock { | ||
25 | compatible = "fixed-clock"; | ||
26 | #clock-cells = <0>; | ||
27 | clock-frequency = <50000000>; | ||
28 | }; | ||
29 | |||
30 | cpu_intc: interrupt-controller { | ||
31 | #address-cells = <0>; | ||
32 | compatible = "mti,cpu-interrupt-controller"; | ||
33 | interrupt-controller; | ||
34 | #interrupt-cells = <1>; | ||
35 | }; | ||
36 | |||
37 | ahb@1f300000 { | ||
38 | compatible = "simple-bus"; | ||
39 | #address-cells = <1>; | ||
40 | #size-cells = <1>; | ||
41 | ranges = <0x0 0x1f300000 0x80FFF>; | ||
42 | |||
43 | gpio1: gpio@10 { | ||
44 | compatible = "ni,169445-nand-gpio"; | ||
45 | reg = <0x10 0x4>; | ||
46 | reg-names = "dat"; | ||
47 | gpio-controller; | ||
48 | #gpio-cells = <2>; | ||
49 | }; | ||
50 | |||
51 | gpio2: gpio@14 { | ||
52 | compatible = "ni,169445-nand-gpio"; | ||
53 | reg = <0x14 0x4>; | ||
54 | reg-names = "dat"; | ||
55 | gpio-controller; | ||
56 | #gpio-cells = <2>; | ||
57 | no-output; | ||
58 | }; | ||
59 | |||
60 | nand@0 { | ||
61 | compatible = "gpio-control-nand"; | ||
62 | nand-on-flash-bbt; | ||
63 | nand-ecc-mode = "soft_bch"; | ||
64 | nand-ecc-step-size = <512>; | ||
65 | nand-ecc-strength = <4>; | ||
66 | reg = <0x0 4>; | ||
67 | gpios = <&gpio2 0 0>, /* rdy */ | ||
68 | <&gpio1 1 0>, /* nce */ | ||
69 | <&gpio1 2 0>, /* ale */ | ||
70 | <&gpio1 3 0>, /* cle */ | ||
71 | <&gpio1 4 0>; /* nwp */ | ||
72 | }; | ||
73 | |||
74 | serial@80000 { | ||
75 | compatible = "ns16550a"; | ||
76 | reg = <0x80000 0x1000>; | ||
77 | interrupt-parent = <&cpu_intc>; | ||
78 | interrupts = <6>; | ||
79 | clocks = <&baseclk>; | ||
80 | reg-shift = <0>; | ||
81 | }; | ||
82 | |||
83 | ethernet@40000 { | ||
84 | compatible = "snps,dwmac-4.10a"; | ||
85 | interrupt-parent = <&cpu_intc>; | ||
86 | interrupts = <5>; | ||
87 | interrupt-names = "macirq"; | ||
88 | reg = <0x40000 0x2000>; | ||
89 | clock-names = "stmmaceth", "pclk"; | ||
90 | clocks = <&baseclk>, <&baseclk>; | ||
91 | |||
92 | phy-mode = "rgmii"; | ||
93 | |||
94 | fixed-link { | ||
95 | speed = <1000>; | ||
96 | full-duplex; | ||
97 | }; | ||
98 | }; | ||
99 | }; | ||
100 | }; | ||
diff --git a/arch/mips/boot/dts/ni/Makefile b/arch/mips/boot/dts/ni/Makefile new file mode 100644 index 000000000..93867e1a5 --- /dev/null +++ b/arch/mips/boot/dts/ni/Makefile | |||
@@ -0,0 +1,2 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | dtb-$(CONFIG_FIT_IMAGE_FDT_NI169445) += 169445.dtb | ||
diff --git a/arch/mips/boot/dts/pic32/Makefile b/arch/mips/boot/dts/pic32/Makefile new file mode 100644 index 000000000..fb57f3632 --- /dev/null +++ b/arch/mips/boot/dts/pic32/Makefile | |||
@@ -0,0 +1,7 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_DTB_PIC32_MZDA_SK) += pic32mzda_sk.dtb | ||
3 | |||
4 | dtb-$(CONFIG_DTB_PIC32_NONE) += \ | ||
5 | pic32mzda_sk.dtb | ||
6 | |||
7 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/pic32/pic32mzda.dtsi b/arch/mips/boot/dts/pic32/pic32mzda.dtsi new file mode 100644 index 000000000..f1e3dad6b --- /dev/null +++ b/arch/mips/boot/dts/pic32/pic32mzda.dtsi | |||
@@ -0,0 +1,298 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Copyright (C) 2015 Microchip Technology Inc. All rights reserved. | ||
4 | */ | ||
5 | #include <dt-bindings/clock/microchip,pic32-clock.h> | ||
6 | #include <dt-bindings/interrupt-controller/irq.h> | ||
7 | |||
8 | / { | ||
9 | #address-cells = <1>; | ||
10 | #size-cells = <1>; | ||
11 | interrupt-parent = <&evic>; | ||
12 | |||
13 | aliases { | ||
14 | gpio0 = &gpio0; | ||
15 | gpio1 = &gpio1; | ||
16 | gpio2 = &gpio2; | ||
17 | gpio3 = &gpio3; | ||
18 | gpio4 = &gpio4; | ||
19 | gpio5 = &gpio5; | ||
20 | gpio6 = &gpio6; | ||
21 | gpio7 = &gpio7; | ||
22 | gpio8 = &gpio8; | ||
23 | gpio9 = &gpio9; | ||
24 | serial0 = &uart1; | ||
25 | serial1 = &uart2; | ||
26 | serial2 = &uart3; | ||
27 | serial3 = &uart4; | ||
28 | serial4 = &uart5; | ||
29 | serial5 = &uart6; | ||
30 | }; | ||
31 | |||
32 | cpus { | ||
33 | #address-cells = <1>; | ||
34 | #size-cells = <0>; | ||
35 | |||
36 | cpu@0 { | ||
37 | compatible = "mti,mips14KEc"; | ||
38 | device_type = "cpu"; | ||
39 | }; | ||
40 | }; | ||
41 | |||
42 | soc { | ||
43 | compatible = "microchip,pic32mzda-infra"; | ||
44 | interrupts = <0 IRQ_TYPE_EDGE_RISING>; | ||
45 | }; | ||
46 | |||
47 | /* external clock input on TxCLKI pin */ | ||
48 | txcki: txcki_clk { | ||
49 | #clock-cells = <0>; | ||
50 | compatible = "fixed-clock"; | ||
51 | clock-frequency = <4000000>; | ||
52 | status = "disabled"; | ||
53 | }; | ||
54 | |||
55 | /* external input on REFCLKIx pin */ | ||
56 | refix: refix_clk { | ||
57 | #clock-cells = <0>; | ||
58 | compatible = "fixed-clock"; | ||
59 | clock-frequency = <24000000>; | ||
60 | status = "disabled"; | ||
61 | }; | ||
62 | |||
63 | rootclk: clock-controller@1f801200 { | ||
64 | compatible = "microchip,pic32mzda-clk"; | ||
65 | reg = <0x1f801200 0x200>; | ||
66 | #clock-cells = <1>; | ||
67 | microchip,pic32mzda-sosc; | ||
68 | }; | ||
69 | |||
70 | evic: interrupt-controller@1f810000 { | ||
71 | compatible = "microchip,pic32mzda-evic"; | ||
72 | interrupt-controller; | ||
73 | #interrupt-cells = <2>; | ||
74 | reg = <0x1f810000 0x1000>; | ||
75 | microchip,external-irqs = <3 8 13 18 23>; | ||
76 | }; | ||
77 | |||
78 | pic32_pinctrl: pinctrl@1f801400{ | ||
79 | #address-cells = <1>; | ||
80 | #size-cells = <1>; | ||
81 | compatible = "microchip,pic32mzda-pinctrl"; | ||
82 | reg = <0x1f801400 0x400>; | ||
83 | clocks = <&rootclk PB1CLK>; | ||
84 | }; | ||
85 | |||
86 | /* PORTA */ | ||
87 | gpio0: gpio0@1f860000 { | ||
88 | compatible = "microchip,pic32mzda-gpio"; | ||
89 | reg = <0x1f860000 0x100>; | ||
90 | interrupts = <118 IRQ_TYPE_LEVEL_HIGH>; | ||
91 | #gpio-cells = <2>; | ||
92 | gpio-controller; | ||
93 | interrupt-controller; | ||
94 | #interrupt-cells = <2>; | ||
95 | clocks = <&rootclk PB4CLK>; | ||
96 | microchip,gpio-bank = <0>; | ||
97 | gpio-ranges = <&pic32_pinctrl 0 0 16>; | ||
98 | }; | ||
99 | |||
100 | /* PORTB */ | ||
101 | gpio1: gpio1@1f860100 { | ||
102 | compatible = "microchip,pic32mzda-gpio"; | ||
103 | reg = <0x1f860100 0x100>; | ||
104 | interrupts = <119 IRQ_TYPE_LEVEL_HIGH>; | ||
105 | #gpio-cells = <2>; | ||
106 | gpio-controller; | ||
107 | interrupt-controller; | ||
108 | #interrupt-cells = <2>; | ||
109 | clocks = <&rootclk PB4CLK>; | ||
110 | microchip,gpio-bank = <1>; | ||
111 | gpio-ranges = <&pic32_pinctrl 0 16 16>; | ||
112 | }; | ||
113 | |||
114 | /* PORTC */ | ||
115 | gpio2: gpio2@1f860200 { | ||
116 | compatible = "microchip,pic32mzda-gpio"; | ||
117 | reg = <0x1f860200 0x100>; | ||
118 | interrupts = <120 IRQ_TYPE_LEVEL_HIGH>; | ||
119 | #gpio-cells = <2>; | ||
120 | gpio-controller; | ||
121 | interrupt-controller; | ||
122 | #interrupt-cells = <2>; | ||
123 | clocks = <&rootclk PB4CLK>; | ||
124 | microchip,gpio-bank = <2>; | ||
125 | gpio-ranges = <&pic32_pinctrl 0 32 16>; | ||
126 | }; | ||
127 | |||
128 | /* PORTD */ | ||
129 | gpio3: gpio3@1f860300 { | ||
130 | compatible = "microchip,pic32mzda-gpio"; | ||
131 | reg = <0x1f860300 0x100>; | ||
132 | interrupts = <121 IRQ_TYPE_LEVEL_HIGH>; | ||
133 | #gpio-cells = <2>; | ||
134 | gpio-controller; | ||
135 | interrupt-controller; | ||
136 | #interrupt-cells = <2>; | ||
137 | clocks = <&rootclk PB4CLK>; | ||
138 | microchip,gpio-bank = <3>; | ||
139 | gpio-ranges = <&pic32_pinctrl 0 48 16>; | ||
140 | }; | ||
141 | |||
142 | /* PORTE */ | ||
143 | gpio4: gpio4@1f860400 { | ||
144 | compatible = "microchip,pic32mzda-gpio"; | ||
145 | reg = <0x1f860400 0x100>; | ||
146 | interrupts = <122 IRQ_TYPE_LEVEL_HIGH>; | ||
147 | #gpio-cells = <2>; | ||
148 | gpio-controller; | ||
149 | interrupt-controller; | ||
150 | #interrupt-cells = <2>; | ||
151 | clocks = <&rootclk PB4CLK>; | ||
152 | microchip,gpio-bank = <4>; | ||
153 | gpio-ranges = <&pic32_pinctrl 0 64 16>; | ||
154 | }; | ||
155 | |||
156 | /* PORTF */ | ||
157 | gpio5: gpio5@1f860500 { | ||
158 | compatible = "microchip,pic32mzda-gpio"; | ||
159 | reg = <0x1f860500 0x100>; | ||
160 | interrupts = <123 IRQ_TYPE_LEVEL_HIGH>; | ||
161 | #gpio-cells = <2>; | ||
162 | gpio-controller; | ||
163 | interrupt-controller; | ||
164 | #interrupt-cells = <2>; | ||
165 | clocks = <&rootclk PB4CLK>; | ||
166 | microchip,gpio-bank = <5>; | ||
167 | gpio-ranges = <&pic32_pinctrl 0 80 16>; | ||
168 | }; | ||
169 | |||
170 | /* PORTG */ | ||
171 | gpio6: gpio6@1f860600 { | ||
172 | compatible = "microchip,pic32mzda-gpio"; | ||
173 | reg = <0x1f860600 0x100>; | ||
174 | interrupts = <124 IRQ_TYPE_LEVEL_HIGH>; | ||
175 | #gpio-cells = <2>; | ||
176 | gpio-controller; | ||
177 | interrupt-controller; | ||
178 | #interrupt-cells = <2>; | ||
179 | clocks = <&rootclk PB4CLK>; | ||
180 | microchip,gpio-bank = <6>; | ||
181 | gpio-ranges = <&pic32_pinctrl 0 96 16>; | ||
182 | }; | ||
183 | |||
184 | /* PORTH */ | ||
185 | gpio7: gpio7@1f860700 { | ||
186 | compatible = "microchip,pic32mzda-gpio"; | ||
187 | reg = <0x1f860700 0x100>; | ||
188 | interrupts = <125 IRQ_TYPE_LEVEL_HIGH>; | ||
189 | #gpio-cells = <2>; | ||
190 | gpio-controller; | ||
191 | interrupt-controller; | ||
192 | #interrupt-cells = <2>; | ||
193 | clocks = <&rootclk PB4CLK>; | ||
194 | microchip,gpio-bank = <7>; | ||
195 | gpio-ranges = <&pic32_pinctrl 0 112 16>; | ||
196 | }; | ||
197 | |||
198 | /* PORTI does not exist */ | ||
199 | |||
200 | /* PORTJ */ | ||
201 | gpio8: gpio8@1f860800 { | ||
202 | compatible = "microchip,pic32mzda-gpio"; | ||
203 | reg = <0x1f860800 0x100>; | ||
204 | interrupts = <126 IRQ_TYPE_LEVEL_HIGH>; | ||
205 | #gpio-cells = <2>; | ||
206 | gpio-controller; | ||
207 | interrupt-controller; | ||
208 | #interrupt-cells = <2>; | ||
209 | clocks = <&rootclk PB4CLK>; | ||
210 | microchip,gpio-bank = <8>; | ||
211 | gpio-ranges = <&pic32_pinctrl 0 128 16>; | ||
212 | }; | ||
213 | |||
214 | /* PORTK */ | ||
215 | gpio9: gpio9@1f860900 { | ||
216 | compatible = "microchip,pic32mzda-gpio"; | ||
217 | reg = <0x1f860900 0x100>; | ||
218 | interrupts = <127 IRQ_TYPE_LEVEL_HIGH>; | ||
219 | #gpio-cells = <2>; | ||
220 | gpio-controller; | ||
221 | interrupt-controller; | ||
222 | #interrupt-cells = <2>; | ||
223 | clocks = <&rootclk PB4CLK>; | ||
224 | microchip,gpio-bank = <9>; | ||
225 | gpio-ranges = <&pic32_pinctrl 0 144 16>; | ||
226 | }; | ||
227 | |||
228 | sdhci: sdhci@1f8ec000 { | ||
229 | compatible = "microchip,pic32mzda-sdhci"; | ||
230 | reg = <0x1f8ec000 0x100>; | ||
231 | interrupts = <191 IRQ_TYPE_LEVEL_HIGH>; | ||
232 | clocks = <&rootclk REF4CLK>, <&rootclk PB5CLK>; | ||
233 | clock-names = "base_clk", "sys_clk"; | ||
234 | bus-width = <4>; | ||
235 | cap-sd-highspeed; | ||
236 | status = "disabled"; | ||
237 | }; | ||
238 | |||
239 | uart1: serial@1f822000 { | ||
240 | compatible = "microchip,pic32mzda-uart"; | ||
241 | reg = <0x1f822000 0x50>; | ||
242 | interrupts = <112 IRQ_TYPE_LEVEL_HIGH>, | ||
243 | <113 IRQ_TYPE_LEVEL_HIGH>, | ||
244 | <114 IRQ_TYPE_LEVEL_HIGH>; | ||
245 | clocks = <&rootclk PB2CLK>; | ||
246 | status = "disabled"; | ||
247 | }; | ||
248 | |||
249 | uart2: serial@1f822200 { | ||
250 | compatible = "microchip,pic32mzda-uart"; | ||
251 | reg = <0x1f822200 0x50>; | ||
252 | interrupts = <145 IRQ_TYPE_LEVEL_HIGH>, | ||
253 | <146 IRQ_TYPE_LEVEL_HIGH>, | ||
254 | <147 IRQ_TYPE_LEVEL_HIGH>; | ||
255 | clocks = <&rootclk PB2CLK>; | ||
256 | status = "disabled"; | ||
257 | }; | ||
258 | |||
259 | uart3: serial@1f822400 { | ||
260 | compatible = "microchip,pic32mzda-uart"; | ||
261 | reg = <0x1f822400 0x50>; | ||
262 | interrupts = <157 IRQ_TYPE_LEVEL_HIGH>, | ||
263 | <158 IRQ_TYPE_LEVEL_HIGH>, | ||
264 | <159 IRQ_TYPE_LEVEL_HIGH>; | ||
265 | clocks = <&rootclk PB2CLK>; | ||
266 | status = "disabled"; | ||
267 | }; | ||
268 | |||
269 | uart4: serial@1f822600 { | ||
270 | compatible = "microchip,pic32mzda-uart"; | ||
271 | reg = <0x1f822600 0x50>; | ||
272 | interrupts = <170 IRQ_TYPE_LEVEL_HIGH>, | ||
273 | <171 IRQ_TYPE_LEVEL_HIGH>, | ||
274 | <172 IRQ_TYPE_LEVEL_HIGH>; | ||
275 | clocks = <&rootclk PB2CLK>; | ||
276 | status = "disabled"; | ||
277 | }; | ||
278 | |||
279 | uart5: serial@1f822800 { | ||
280 | compatible = "microchip,pic32mzda-uart"; | ||
281 | reg = <0x1f822800 0x50>; | ||
282 | interrupts = <179 IRQ_TYPE_LEVEL_HIGH>, | ||
283 | <180 IRQ_TYPE_LEVEL_HIGH>, | ||
284 | <181 IRQ_TYPE_LEVEL_HIGH>; | ||
285 | clocks = <&rootclk PB2CLK>; | ||
286 | status = "disabled"; | ||
287 | }; | ||
288 | |||
289 | uart6: serial@1f822A00 { | ||
290 | compatible = "microchip,pic32mzda-uart"; | ||
291 | reg = <0x1f822A00 0x50>; | ||
292 | interrupts = <188 IRQ_TYPE_LEVEL_HIGH>, | ||
293 | <189 IRQ_TYPE_LEVEL_HIGH>, | ||
294 | <190 IRQ_TYPE_LEVEL_HIGH>; | ||
295 | clocks = <&rootclk PB2CLK>; | ||
296 | status = "disabled"; | ||
297 | }; | ||
298 | }; | ||
diff --git a/arch/mips/boot/dts/pic32/pic32mzda_sk.dts b/arch/mips/boot/dts/pic32/pic32mzda_sk.dts new file mode 100644 index 000000000..d7fa5d55d --- /dev/null +++ b/arch/mips/boot/dts/pic32/pic32mzda_sk.dts | |||
@@ -0,0 +1,148 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Copyright (C) 2015 Microchip Technology Inc. All rights reserved. | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | |||
8 | #include <dt-bindings/gpio/gpio.h> | ||
9 | #include <dt-bindings/interrupt-controller/irq.h> | ||
10 | |||
11 | #include "pic32mzda.dtsi" | ||
12 | |||
13 | / { | ||
14 | compatible = "microchip,pic32mzda-sk", "microchip,pic32mzda"; | ||
15 | model = "Microchip PIC32MZDA Starter Kit"; | ||
16 | |||
17 | memory { | ||
18 | device_type = "memory"; | ||
19 | reg = <0x08000000 0x08000000>; | ||
20 | }; | ||
21 | |||
22 | chosen { | ||
23 | bootargs = "earlyprintk=ttyPIC1,115200n8r console=ttyPIC1,115200n8"; | ||
24 | }; | ||
25 | |||
26 | leds0 { | ||
27 | compatible = "gpio-leds"; | ||
28 | pinctrl-names = "default"; | ||
29 | pinctrl-0 = <&user_leds_s0>; | ||
30 | |||
31 | led@1 { | ||
32 | label = "pic32mzda_sk:red:led1"; | ||
33 | gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; | ||
34 | linux,default-trigger = "heartbeat"; | ||
35 | }; | ||
36 | |||
37 | led@2 { | ||
38 | label = "pic32mzda_sk:yellow:led2"; | ||
39 | gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; | ||
40 | linux,default-trigger = "mmc0"; | ||
41 | }; | ||
42 | |||
43 | led@3 { | ||
44 | label = "pic32mzda_sk:green:led3"; | ||
45 | gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>; | ||
46 | default-state = "on"; | ||
47 | }; | ||
48 | }; | ||
49 | |||
50 | keys0 { | ||
51 | compatible = "gpio-keys"; | ||
52 | pinctrl-0 = <&user_buttons_s0>; | ||
53 | pinctrl-names = "default"; | ||
54 | |||
55 | #address-cells = <1>; | ||
56 | #size-cells = <0>; | ||
57 | |||
58 | button@sw1 { | ||
59 | label = "ESC"; | ||
60 | linux,code = <1>; | ||
61 | gpios = <&gpio1 12 0>; | ||
62 | }; | ||
63 | |||
64 | button@sw2 { | ||
65 | label = "Home"; | ||
66 | linux,code = <102>; | ||
67 | gpios = <&gpio1 13 0>; | ||
68 | }; | ||
69 | |||
70 | button@sw3 { | ||
71 | label = "Menu"; | ||
72 | linux,code = <139>; | ||
73 | gpios = <&gpio1 14 0>; | ||
74 | }; | ||
75 | }; | ||
76 | }; | ||
77 | |||
78 | &uart2 { | ||
79 | pinctrl-names = "default"; | ||
80 | pinctrl-0 = <&pinctrl_uart2>; | ||
81 | status = "okay"; | ||
82 | }; | ||
83 | |||
84 | &uart4 { | ||
85 | pinctrl-names = "default"; | ||
86 | pinctrl-0 = <&pinctrl_uart4>; | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
90 | &sdhci { | ||
91 | pinctrl-names = "default"; | ||
92 | pinctrl-0 = <&pinctrl_sdhc1>; | ||
93 | status = "okay"; | ||
94 | assigned-clocks = <&rootclk REF2CLK>, <&rootclk REF4CLK>, | ||
95 | <&rootclk REF5CLK>; | ||
96 | assigned-clock-rates = <50000000>, <25000000>, <40000000>; | ||
97 | }; | ||
98 | |||
99 | &pic32_pinctrl { | ||
100 | |||
101 | pinctrl_sdhc1: sdhc1_pins0 { | ||
102 | pins = "A6", "D4", "G13", "G12", "G14", "A7", "A0"; | ||
103 | microchip,digital; | ||
104 | }; | ||
105 | |||
106 | user_leds_s0: user_leds_s0 { | ||
107 | pins = "H0", "H1", "H2"; | ||
108 | output-low; | ||
109 | microchip,digital; | ||
110 | }; | ||
111 | |||
112 | user_buttons_s0: user_buttons_s0 { | ||
113 | pins = "B12", "B13", "B14"; | ||
114 | microchip,digital; | ||
115 | input-enable; | ||
116 | bias-pull-up; | ||
117 | }; | ||
118 | |||
119 | pinctrl_uart2: pinctrl_uart2 { | ||
120 | uart2-tx { | ||
121 | pins = "G9"; | ||
122 | function = "U2TX"; | ||
123 | microchip,digital; | ||
124 | output-high; | ||
125 | }; | ||
126 | uart2-rx { | ||
127 | pins = "B0"; | ||
128 | function = "U2RX"; | ||
129 | microchip,digital; | ||
130 | input-enable; | ||
131 | }; | ||
132 | }; | ||
133 | |||
134 | pinctrl_uart4: uart4-0 { | ||
135 | uart4-tx { | ||
136 | pins = "C3"; | ||
137 | function = "U4TX"; | ||
138 | microchip,digital; | ||
139 | output-high; | ||
140 | }; | ||
141 | uart4-rx { | ||
142 | pins = "E8"; | ||
143 | function = "U4RX"; | ||
144 | microchip,digital; | ||
145 | input-enable; | ||
146 | }; | ||
147 | }; | ||
148 | }; | ||
diff --git a/arch/mips/boot/dts/qca/Makefile b/arch/mips/boot/dts/qca/Makefile new file mode 100644 index 000000000..4451cf45b --- /dev/null +++ b/arch/mips/boot/dts/qca/Makefile | |||
@@ -0,0 +1,7 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | # All DTBs | ||
3 | dtb-$(CONFIG_ATH79) += ar9132_tl_wr1043nd_v1.dtb | ||
4 | dtb-$(CONFIG_ATH79) += ar9331_dpt_module.dtb | ||
5 | dtb-$(CONFIG_ATH79) += ar9331_dragino_ms14.dtb | ||
6 | dtb-$(CONFIG_ATH79) += ar9331_omega.dtb | ||
7 | dtb-$(CONFIG_ATH79) += ar9331_tl_mr3020.dtb | ||
diff --git a/arch/mips/boot/dts/qca/ar9132.dtsi b/arch/mips/boot/dts/qca/ar9132.dtsi new file mode 100644 index 000000000..61dcfa5b6 --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9132.dtsi | |||
@@ -0,0 +1,171 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/ath79-clk.h> | ||
3 | |||
4 | / { | ||
5 | compatible = "qca,ar9132"; | ||
6 | |||
7 | #address-cells = <1>; | ||
8 | #size-cells = <1>; | ||
9 | |||
10 | cpus { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <0>; | ||
13 | |||
14 | cpu@0 { | ||
15 | device_type = "cpu"; | ||
16 | compatible = "mips,mips24Kc"; | ||
17 | clocks = <&pll ATH79_CLK_CPU>; | ||
18 | reg = <0>; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | cpuintc: interrupt-controller { | ||
23 | compatible = "qca,ar9132-cpu-intc", "qca,ar7100-cpu-intc"; | ||
24 | |||
25 | interrupt-controller; | ||
26 | #interrupt-cells = <1>; | ||
27 | |||
28 | qca,ddr-wb-channel-interrupts = <2>, <3>, <4>, <5>; | ||
29 | qca,ddr-wb-channels = <&ddr_ctrl 3>, <&ddr_ctrl 2>, | ||
30 | <&ddr_ctrl 0>, <&ddr_ctrl 1>; | ||
31 | }; | ||
32 | |||
33 | ahb { | ||
34 | compatible = "simple-bus"; | ||
35 | ranges; | ||
36 | |||
37 | #address-cells = <1>; | ||
38 | #size-cells = <1>; | ||
39 | |||
40 | interrupt-parent = <&cpuintc>; | ||
41 | |||
42 | apb { | ||
43 | compatible = "simple-bus"; | ||
44 | ranges; | ||
45 | |||
46 | #address-cells = <1>; | ||
47 | #size-cells = <1>; | ||
48 | |||
49 | interrupt-parent = <&miscintc>; | ||
50 | |||
51 | ddr_ctrl: memory-controller@18000000 { | ||
52 | compatible = "qca,ar9132-ddr-controller", | ||
53 | "qca,ar7240-ddr-controller"; | ||
54 | reg = <0x18000000 0x100>; | ||
55 | |||
56 | #qca,ddr-wb-channel-cells = <1>; | ||
57 | }; | ||
58 | |||
59 | uart: uart@18020000 { | ||
60 | compatible = "ns8250"; | ||
61 | reg = <0x18020000 0x20>; | ||
62 | interrupts = <3>; | ||
63 | |||
64 | clocks = <&pll ATH79_CLK_AHB>; | ||
65 | clock-names = "uart"; | ||
66 | |||
67 | reg-io-width = <4>; | ||
68 | reg-shift = <2>; | ||
69 | no-loopback-test; | ||
70 | |||
71 | status = "disabled"; | ||
72 | }; | ||
73 | |||
74 | gpio: gpio@18040000 { | ||
75 | compatible = "qca,ar9132-gpio", | ||
76 | "qca,ar7100-gpio"; | ||
77 | reg = <0x18040000 0x30>; | ||
78 | interrupts = <2>; | ||
79 | |||
80 | ngpios = <22>; | ||
81 | |||
82 | gpio-controller; | ||
83 | #gpio-cells = <2>; | ||
84 | |||
85 | interrupt-controller; | ||
86 | #interrupt-cells = <2>; | ||
87 | }; | ||
88 | |||
89 | pll: pll-controller@18050000 { | ||
90 | compatible = "qca,ar9132-pll", | ||
91 | "qca,ar9130-pll"; | ||
92 | reg = <0x18050000 0x20>; | ||
93 | |||
94 | clock-names = "ref"; | ||
95 | /* The board must provides the ref clock */ | ||
96 | |||
97 | #clock-cells = <1>; | ||
98 | clock-output-names = "cpu", "ddr", "ahb"; | ||
99 | }; | ||
100 | |||
101 | wdt: wdt@18060008 { | ||
102 | compatible = "qca,ar7130-wdt"; | ||
103 | reg = <0x18060008 0x8>; | ||
104 | |||
105 | interrupts = <4>; | ||
106 | |||
107 | clocks = <&pll ATH79_CLK_AHB>; | ||
108 | clock-names = "wdt"; | ||
109 | }; | ||
110 | |||
111 | miscintc: interrupt-controller@18060010 { | ||
112 | compatible = "qca,ar9132-misc-intc", | ||
113 | "qca,ar7100-misc-intc"; | ||
114 | reg = <0x18060010 0x8>; | ||
115 | |||
116 | interrupt-parent = <&cpuintc>; | ||
117 | interrupts = <6>; | ||
118 | |||
119 | interrupt-controller; | ||
120 | #interrupt-cells = <1>; | ||
121 | }; | ||
122 | |||
123 | rst: reset-controller@1806001c { | ||
124 | compatible = "qca,ar9132-reset", | ||
125 | "qca,ar7100-reset"; | ||
126 | reg = <0x1806001c 0x4>; | ||
127 | |||
128 | #reset-cells = <1>; | ||
129 | }; | ||
130 | }; | ||
131 | |||
132 | usb: usb@1b000100 { | ||
133 | compatible = "qca,ar7100-ehci", "generic-ehci"; | ||
134 | reg = <0x1b000100 0x100>; | ||
135 | |||
136 | interrupts = <3>; | ||
137 | resets = <&rst 5>; | ||
138 | |||
139 | has-transaction-translator; | ||
140 | |||
141 | phy-names = "usb"; | ||
142 | phys = <&usb_phy>; | ||
143 | |||
144 | status = "disabled"; | ||
145 | }; | ||
146 | |||
147 | spi: spi@1f000000 { | ||
148 | compatible = "qca,ar9132-spi", "qca,ar7100-spi"; | ||
149 | reg = <0x1f000000 0x10>; | ||
150 | |||
151 | clocks = <&pll ATH79_CLK_AHB>; | ||
152 | clock-names = "ahb"; | ||
153 | |||
154 | status = "disabled"; | ||
155 | |||
156 | #address-cells = <1>; | ||
157 | #size-cells = <0>; | ||
158 | }; | ||
159 | }; | ||
160 | |||
161 | usb_phy: usb-phy { | ||
162 | compatible = "qca,ar7100-usb-phy"; | ||
163 | |||
164 | reset-names = "phy", "suspend-override"; | ||
165 | resets = <&rst 4>, <&rst 3>; | ||
166 | |||
167 | #phy-cells = <0>; | ||
168 | |||
169 | status = "disabled"; | ||
170 | }; | ||
171 | }; | ||
diff --git a/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts new file mode 100644 index 000000000..7fccf6357 --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | |||
@@ -0,0 +1,112 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include <dt-bindings/gpio/gpio.h> | ||
5 | #include <dt-bindings/input/input.h> | ||
6 | |||
7 | #include "ar9132.dtsi" | ||
8 | |||
9 | / { | ||
10 | compatible = "tplink,tl-wr1043nd-v1", "qca,ar9132"; | ||
11 | model = "TP-Link TL-WR1043ND Version 1"; | ||
12 | |||
13 | memory@0 { | ||
14 | device_type = "memory"; | ||
15 | reg = <0x0 0x2000000>; | ||
16 | }; | ||
17 | |||
18 | extosc: ref { | ||
19 | compatible = "fixed-clock"; | ||
20 | #clock-cells = <0>; | ||
21 | clock-frequency = <40000000>; | ||
22 | }; | ||
23 | |||
24 | gpio-keys { | ||
25 | compatible = "gpio-keys"; | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | |||
29 | button@0 { | ||
30 | label = "reset"; | ||
31 | linux,code = <KEY_RESTART>; | ||
32 | gpios = <&gpio 3 GPIO_ACTIVE_LOW>; | ||
33 | debounce-interval = <60>; | ||
34 | }; | ||
35 | |||
36 | button@1 { | ||
37 | label = "qss"; | ||
38 | linux,code = <KEY_WPS_BUTTON>; | ||
39 | gpios = <&gpio 7 GPIO_ACTIVE_LOW>; | ||
40 | debounce-interval = <60>; | ||
41 | }; | ||
42 | }; | ||
43 | |||
44 | leds { | ||
45 | compatible = "gpio-leds"; | ||
46 | led@0 { | ||
47 | label = "tp-link:green:usb"; | ||
48 | gpios = <&gpio 1 GPIO_ACTIVE_LOW>; | ||
49 | }; | ||
50 | |||
51 | led@1 { | ||
52 | label = "tp-link:green:system"; | ||
53 | gpios = <&gpio 2 GPIO_ACTIVE_LOW>; | ||
54 | linux,default-trigger = "heartbeat"; | ||
55 | }; | ||
56 | |||
57 | led@2 { | ||
58 | label = "tp-link:green:qss"; | ||
59 | gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; | ||
60 | }; | ||
61 | |||
62 | led@3 { | ||
63 | label = "tp-link:green:wlan"; | ||
64 | gpios = <&gpio 9 GPIO_ACTIVE_LOW>; | ||
65 | }; | ||
66 | }; | ||
67 | }; | ||
68 | |||
69 | &uart { | ||
70 | status = "okay"; | ||
71 | }; | ||
72 | |||
73 | &pll { | ||
74 | clocks = <&extosc>; | ||
75 | }; | ||
76 | |||
77 | &usb { | ||
78 | status = "okay"; | ||
79 | }; | ||
80 | |||
81 | &usb_phy { | ||
82 | status = "okay"; | ||
83 | }; | ||
84 | |||
85 | &spi { | ||
86 | status = "okay"; | ||
87 | num-cs = <1>; | ||
88 | |||
89 | flash@0 { | ||
90 | #address-cells = <1>; | ||
91 | #size-cells = <1>; | ||
92 | compatible = "s25sl064a"; | ||
93 | reg = <0>; | ||
94 | spi-max-frequency = <25000000>; | ||
95 | |||
96 | partition@0 { | ||
97 | label = "u-boot"; | ||
98 | reg = <0x000000 0x020000>; | ||
99 | }; | ||
100 | |||
101 | partition@1 { | ||
102 | label = "firmware"; | ||
103 | reg = <0x020000 0x7D0000>; | ||
104 | }; | ||
105 | |||
106 | partition@2 { | ||
107 | label = "art"; | ||
108 | reg = <0x7F0000 0x010000>; | ||
109 | read-only; | ||
110 | }; | ||
111 | }; | ||
112 | }; | ||
diff --git a/arch/mips/boot/dts/qca/ar9331.dtsi b/arch/mips/boot/dts/qca/ar9331.dtsi new file mode 100644 index 000000000..83b3c0ce1 --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9331.dtsi | |||
@@ -0,0 +1,299 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <dt-bindings/clock/ath79-clk.h> | ||
3 | |||
4 | / { | ||
5 | compatible = "qca,ar9331"; | ||
6 | |||
7 | #address-cells = <1>; | ||
8 | #size-cells = <1>; | ||
9 | |||
10 | cpus { | ||
11 | #address-cells = <1>; | ||
12 | #size-cells = <0>; | ||
13 | |||
14 | cpu@0 { | ||
15 | device_type = "cpu"; | ||
16 | compatible = "mips,mips24Kc"; | ||
17 | clocks = <&pll ATH79_CLK_CPU>; | ||
18 | reg = <0>; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | cpuintc: interrupt-controller { | ||
23 | compatible = "qca,ar7100-cpu-intc"; | ||
24 | |||
25 | interrupt-controller; | ||
26 | #interrupt-cells = <1>; | ||
27 | |||
28 | qca,ddr-wb-channel-interrupts = <2>, <3>; | ||
29 | qca,ddr-wb-channels = <&ddr_ctrl 3>, <&ddr_ctrl 2>; | ||
30 | }; | ||
31 | |||
32 | ref: ref { | ||
33 | compatible = "fixed-clock"; | ||
34 | #clock-cells = <0>; | ||
35 | }; | ||
36 | |||
37 | ahb { | ||
38 | compatible = "simple-bus"; | ||
39 | ranges; | ||
40 | |||
41 | #address-cells = <1>; | ||
42 | #size-cells = <1>; | ||
43 | |||
44 | interrupt-parent = <&cpuintc>; | ||
45 | |||
46 | apb { | ||
47 | compatible = "simple-bus"; | ||
48 | ranges; | ||
49 | |||
50 | #address-cells = <1>; | ||
51 | #size-cells = <1>; | ||
52 | |||
53 | interrupt-parent = <&miscintc>; | ||
54 | |||
55 | ddr_ctrl: memory-controller@18000000 { | ||
56 | compatible = "qca,ar7240-ddr-controller"; | ||
57 | reg = <0x18000000 0x100>; | ||
58 | |||
59 | #qca,ddr-wb-channel-cells = <1>; | ||
60 | }; | ||
61 | |||
62 | uart: serial@18020000 { | ||
63 | compatible = "qca,ar9330-uart"; | ||
64 | reg = <0x18020000 0x14>; | ||
65 | |||
66 | interrupts = <3>; | ||
67 | |||
68 | clocks = <&ref>; | ||
69 | clock-names = "uart"; | ||
70 | |||
71 | status = "disabled"; | ||
72 | }; | ||
73 | |||
74 | gpio: gpio@18040000 { | ||
75 | compatible = "qca,ar7100-gpio"; | ||
76 | reg = <0x18040000 0x34>; | ||
77 | interrupts = <2>; | ||
78 | |||
79 | ngpios = <30>; | ||
80 | |||
81 | gpio-controller; | ||
82 | #gpio-cells = <2>; | ||
83 | |||
84 | interrupt-controller; | ||
85 | #interrupt-cells = <2>; | ||
86 | |||
87 | status = "disabled"; | ||
88 | }; | ||
89 | |||
90 | pll: pll-controller@18050000 { | ||
91 | compatible = "qca,ar9330-pll"; | ||
92 | reg = <0x18050000 0x100>; | ||
93 | |||
94 | clocks = <&ref>; | ||
95 | clock-names = "ref"; | ||
96 | |||
97 | #clock-cells = <1>; | ||
98 | }; | ||
99 | |||
100 | miscintc: interrupt-controller@18060010 { | ||
101 | compatible = "qca,ar7240-misc-intc"; | ||
102 | reg = <0x18060010 0x8>; | ||
103 | |||
104 | interrupt-parent = <&cpuintc>; | ||
105 | interrupts = <6>; | ||
106 | |||
107 | interrupt-controller; | ||
108 | #interrupt-cells = <1>; | ||
109 | }; | ||
110 | |||
111 | rst: reset-controller@1806001c { | ||
112 | compatible = "qca,ar7100-reset"; | ||
113 | reg = <0x1806001c 0x4>; | ||
114 | |||
115 | #reset-cells = <1>; | ||
116 | }; | ||
117 | }; | ||
118 | |||
119 | eth0: ethernet@19000000 { | ||
120 | compatible = "qca,ar9330-eth"; | ||
121 | reg = <0x19000000 0x200>; | ||
122 | interrupts = <4>; | ||
123 | |||
124 | resets = <&rst 9>, <&rst 22>; | ||
125 | reset-names = "mac", "mdio"; | ||
126 | clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; | ||
127 | clock-names = "eth", "mdio"; | ||
128 | |||
129 | phy-mode = "mii"; | ||
130 | phy-handle = <&phy_port4>; | ||
131 | |||
132 | status = "disabled"; | ||
133 | }; | ||
134 | |||
135 | eth1: ethernet@1a000000 { | ||
136 | compatible = "qca,ar9330-eth"; | ||
137 | reg = <0x1a000000 0x200>; | ||
138 | interrupts = <5>; | ||
139 | resets = <&rst 13>, <&rst 23>; | ||
140 | reset-names = "mac", "mdio"; | ||
141 | clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_AHB>; | ||
142 | clock-names = "eth", "mdio"; | ||
143 | |||
144 | phy-mode = "gmii"; | ||
145 | |||
146 | status = "disabled"; | ||
147 | |||
148 | fixed-link { | ||
149 | speed = <1000>; | ||
150 | full-duplex; | ||
151 | }; | ||
152 | |||
153 | mdio { | ||
154 | #address-cells = <1>; | ||
155 | #size-cells = <0>; | ||
156 | |||
157 | switch10: switch@10 { | ||
158 | #address-cells = <1>; | ||
159 | #size-cells = <0>; | ||
160 | |||
161 | compatible = "qca,ar9331-switch"; | ||
162 | reg = <0x10>; | ||
163 | resets = <&rst 8>; | ||
164 | reset-names = "switch"; | ||
165 | |||
166 | interrupt-parent = <&miscintc>; | ||
167 | interrupts = <12>; | ||
168 | |||
169 | interrupt-controller; | ||
170 | #interrupt-cells = <1>; | ||
171 | |||
172 | ports { | ||
173 | #address-cells = <1>; | ||
174 | #size-cells = <0>; | ||
175 | |||
176 | switch_port0: port@0 { | ||
177 | reg = <0x0>; | ||
178 | label = "cpu"; | ||
179 | ethernet = <ð1>; | ||
180 | |||
181 | phy-mode = "gmii"; | ||
182 | |||
183 | fixed-link { | ||
184 | speed = <1000>; | ||
185 | full-duplex; | ||
186 | }; | ||
187 | }; | ||
188 | |||
189 | switch_port1: port@1 { | ||
190 | reg = <0x1>; | ||
191 | phy-handle = <&phy_port0>; | ||
192 | phy-mode = "internal"; | ||
193 | |||
194 | status = "disabled"; | ||
195 | }; | ||
196 | |||
197 | switch_port2: port@2 { | ||
198 | reg = <0x2>; | ||
199 | phy-handle = <&phy_port1>; | ||
200 | phy-mode = "internal"; | ||
201 | |||
202 | status = "disabled"; | ||
203 | }; | ||
204 | |||
205 | switch_port3: port@3 { | ||
206 | reg = <0x3>; | ||
207 | phy-handle = <&phy_port2>; | ||
208 | phy-mode = "internal"; | ||
209 | |||
210 | status = "disabled"; | ||
211 | }; | ||
212 | |||
213 | switch_port4: port@4 { | ||
214 | reg = <0x4>; | ||
215 | phy-handle = <&phy_port3>; | ||
216 | phy-mode = "internal"; | ||
217 | |||
218 | status = "disabled"; | ||
219 | }; | ||
220 | }; | ||
221 | |||
222 | mdio { | ||
223 | #address-cells = <1>; | ||
224 | #size-cells = <0>; | ||
225 | |||
226 | interrupt-parent = <&switch10>; | ||
227 | |||
228 | phy_port0: phy@0 { | ||
229 | reg = <0x0>; | ||
230 | interrupts = <0>; | ||
231 | status = "disabled"; | ||
232 | }; | ||
233 | |||
234 | phy_port1: phy@1 { | ||
235 | reg = <0x1>; | ||
236 | interrupts = <0>; | ||
237 | status = "disabled"; | ||
238 | }; | ||
239 | |||
240 | phy_port2: phy@2 { | ||
241 | reg = <0x2>; | ||
242 | interrupts = <0>; | ||
243 | status = "disabled"; | ||
244 | }; | ||
245 | |||
246 | phy_port3: phy@3 { | ||
247 | reg = <0x3>; | ||
248 | interrupts = <0>; | ||
249 | status = "disabled"; | ||
250 | }; | ||
251 | |||
252 | phy_port4: phy@4 { | ||
253 | reg = <0x4>; | ||
254 | interrupts = <0>; | ||
255 | status = "disabled"; | ||
256 | }; | ||
257 | }; | ||
258 | }; | ||
259 | }; | ||
260 | }; | ||
261 | |||
262 | usb: usb@1b000100 { | ||
263 | compatible = "chipidea,usb2"; | ||
264 | reg = <0x1b000000 0x200>; | ||
265 | |||
266 | interrupts = <3>; | ||
267 | resets = <&rst 5>; | ||
268 | |||
269 | phy-names = "usb-phy"; | ||
270 | phys = <&usb_phy>; | ||
271 | |||
272 | status = "disabled"; | ||
273 | }; | ||
274 | |||
275 | spi: spi@1f000000 { | ||
276 | compatible = "qca,ar7100-spi"; | ||
277 | reg = <0x1f000000 0x10>; | ||
278 | |||
279 | clocks = <&pll ATH79_CLK_AHB>; | ||
280 | clock-names = "ahb"; | ||
281 | |||
282 | #address-cells = <1>; | ||
283 | #size-cells = <0>; | ||
284 | |||
285 | status = "disabled"; | ||
286 | }; | ||
287 | }; | ||
288 | |||
289 | usb_phy: usb-phy { | ||
290 | compatible = "qca,ar7100-usb-phy"; | ||
291 | |||
292 | reset-names = "phy", "suspend-override"; | ||
293 | resets = <&rst 4>, <&rst 3>; | ||
294 | |||
295 | #phy-cells = <0>; | ||
296 | |||
297 | status = "disabled"; | ||
298 | }; | ||
299 | }; | ||
diff --git a/arch/mips/boot/dts/qca/ar9331_dpt_module.dts b/arch/mips/boot/dts/qca/ar9331_dpt_module.dts new file mode 100644 index 000000000..7695d326d --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9331_dpt_module.dts | |||
@@ -0,0 +1,101 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include <dt-bindings/gpio/gpio.h> | ||
5 | #include <dt-bindings/input/input.h> | ||
6 | #include <dt-bindings/leds/common.h> | ||
7 | |||
8 | #include "ar9331.dtsi" | ||
9 | |||
10 | / { | ||
11 | model = "DPTechnics DPT-Module"; | ||
12 | compatible = "dptechnics,dpt-module"; | ||
13 | |||
14 | aliases { | ||
15 | serial0 = &uart; | ||
16 | }; | ||
17 | |||
18 | memory@0 { | ||
19 | device_type = "memory"; | ||
20 | reg = <0x0 0x4000000>; | ||
21 | }; | ||
22 | |||
23 | leds { | ||
24 | compatible = "gpio-leds"; | ||
25 | |||
26 | led-0 { | ||
27 | function = LED_FUNCTION_STATUS; | ||
28 | color = <LED_COLOR_ID_GREEN>; | ||
29 | gpios = <&gpio 27 GPIO_ACTIVE_LOW>; | ||
30 | default-state = "off"; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | gpio-keys { | ||
35 | compatible = "gpio-keys"; | ||
36 | #address-cells = <1>; | ||
37 | #size-cells = <0>; | ||
38 | |||
39 | button@0 { | ||
40 | label = "reset"; | ||
41 | linux,code = <KEY_RESTART>; | ||
42 | gpios = <&gpio 11 GPIO_ACTIVE_LOW>; | ||
43 | }; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | &ref { | ||
48 | clock-frequency = <25000000>; | ||
49 | }; | ||
50 | |||
51 | &uart { | ||
52 | status = "okay"; | ||
53 | }; | ||
54 | |||
55 | &gpio { | ||
56 | status = "okay"; | ||
57 | }; | ||
58 | |||
59 | &usb { | ||
60 | dr_mode = "host"; | ||
61 | status = "okay"; | ||
62 | }; | ||
63 | |||
64 | &usb_phy { | ||
65 | status = "okay"; | ||
66 | }; | ||
67 | |||
68 | &spi { | ||
69 | num-chipselects = <1>; | ||
70 | status = "okay"; | ||
71 | |||
72 | /* Winbond 25Q128FVSG SPI flash */ | ||
73 | spiflash: w25q128@0 { | ||
74 | #address-cells = <1>; | ||
75 | #size-cells = <1>; | ||
76 | compatible = "winbond,w25q128", "jedec,spi-nor"; | ||
77 | spi-max-frequency = <104000000>; | ||
78 | reg = <0>; | ||
79 | }; | ||
80 | }; | ||
81 | |||
82 | ð0 { | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | |||
86 | ð1 { | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
90 | &switch_port1 { | ||
91 | label = "lan0"; | ||
92 | status = "okay"; | ||
93 | }; | ||
94 | |||
95 | &phy_port0 { | ||
96 | status = "okay"; | ||
97 | }; | ||
98 | |||
99 | &phy_port4 { | ||
100 | status = "okay"; | ||
101 | }; | ||
diff --git a/arch/mips/boot/dts/qca/ar9331_dragino_ms14.dts b/arch/mips/boot/dts/qca/ar9331_dragino_ms14.dts new file mode 100644 index 000000000..d38aa73f1 --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9331_dragino_ms14.dts | |||
@@ -0,0 +1,102 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include <dt-bindings/gpio/gpio.h> | ||
5 | #include <dt-bindings/input/input.h> | ||
6 | |||
7 | #include "ar9331.dtsi" | ||
8 | |||
9 | / { | ||
10 | model = "Dragino MS14 (Dragino 2)"; | ||
11 | compatible = "dragino,ms14"; | ||
12 | |||
13 | aliases { | ||
14 | serial0 = &uart; | ||
15 | }; | ||
16 | |||
17 | memory@0 { | ||
18 | device_type = "memory"; | ||
19 | reg = <0x0 0x4000000>; | ||
20 | }; | ||
21 | |||
22 | leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | wlan { | ||
26 | label = "dragino2:red:wlan"; | ||
27 | gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; | ||
28 | default-state = "off"; | ||
29 | }; | ||
30 | |||
31 | lan { | ||
32 | label = "dragino2:red:lan"; | ||
33 | gpios = <&gpio 13 GPIO_ACTIVE_LOW>; | ||
34 | default-state = "off"; | ||
35 | }; | ||
36 | |||
37 | wan { | ||
38 | label = "dragino2:red:wan"; | ||
39 | gpios = <&gpio 17 GPIO_ACTIVE_LOW>; | ||
40 | default-state = "off"; | ||
41 | }; | ||
42 | |||
43 | system { | ||
44 | label = "dragino2:red:system"; | ||
45 | gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; | ||
46 | default-state = "off"; | ||
47 | }; | ||
48 | }; | ||
49 | |||
50 | gpio-keys { | ||
51 | compatible = "gpio-keys"; | ||
52 | #address-cells = <1>; | ||
53 | #size-cells = <0>; | ||
54 | |||
55 | button@0 { | ||
56 | label = "jumpstart"; | ||
57 | linux,code = <KEY_WPS_BUTTON>; | ||
58 | gpios = <&gpio 11 GPIO_ACTIVE_LOW>; | ||
59 | }; | ||
60 | |||
61 | button@1 { | ||
62 | label = "reset"; | ||
63 | linux,code = <KEY_RESTART>; | ||
64 | gpios = <&gpio 12 GPIO_ACTIVE_LOW>; | ||
65 | }; | ||
66 | }; | ||
67 | }; | ||
68 | |||
69 | &ref { | ||
70 | clock-frequency = <25000000>; | ||
71 | }; | ||
72 | |||
73 | &uart { | ||
74 | status = "okay"; | ||
75 | }; | ||
76 | |||
77 | &gpio { | ||
78 | status = "okay"; | ||
79 | }; | ||
80 | |||
81 | &usb { | ||
82 | dr_mode = "host"; | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | |||
86 | &usb_phy { | ||
87 | status = "okay"; | ||
88 | }; | ||
89 | |||
90 | &spi { | ||
91 | num-chipselects = <1>; | ||
92 | status = "okay"; | ||
93 | |||
94 | /* Winbond 25Q128BVFG SPI flash */ | ||
95 | spiflash: w25q128@0 { | ||
96 | #address-cells = <1>; | ||
97 | #size-cells = <1>; | ||
98 | compatible = "winbond,w25q128", "jedec,spi-nor"; | ||
99 | spi-max-frequency = <104000000>; | ||
100 | reg = <0>; | ||
101 | }; | ||
102 | }; | ||
diff --git a/arch/mips/boot/dts/qca/ar9331_omega.dts b/arch/mips/boot/dts/qca/ar9331_omega.dts new file mode 100644 index 000000000..11778abac --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9331_omega.dts | |||
@@ -0,0 +1,78 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include <dt-bindings/gpio/gpio.h> | ||
5 | #include <dt-bindings/input/input.h> | ||
6 | |||
7 | #include "ar9331.dtsi" | ||
8 | |||
9 | / { | ||
10 | model = "Onion Omega"; | ||
11 | compatible = "onion,omega"; | ||
12 | |||
13 | aliases { | ||
14 | serial0 = &uart; | ||
15 | }; | ||
16 | |||
17 | memory@0 { | ||
18 | device_type = "memory"; | ||
19 | reg = <0x0 0x4000000>; | ||
20 | }; | ||
21 | |||
22 | leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | system { | ||
26 | label = "onion:amber:system"; | ||
27 | gpios = <&gpio 27 GPIO_ACTIVE_LOW>; | ||
28 | default-state = "off"; | ||
29 | }; | ||
30 | }; | ||
31 | |||
32 | gpio-keys { | ||
33 | compatible = "gpio-keys"; | ||
34 | #address-cells = <1>; | ||
35 | #size-cells = <0>; | ||
36 | |||
37 | button@0 { | ||
38 | label = "reset"; | ||
39 | linux,code = <KEY_RESTART>; | ||
40 | gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; | ||
41 | }; | ||
42 | }; | ||
43 | }; | ||
44 | |||
45 | &ref { | ||
46 | clock-frequency = <25000000>; | ||
47 | }; | ||
48 | |||
49 | &uart { | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | |||
53 | &gpio { | ||
54 | status = "okay"; | ||
55 | }; | ||
56 | |||
57 | &usb { | ||
58 | dr_mode = "host"; | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | &usb_phy { | ||
63 | status = "okay"; | ||
64 | }; | ||
65 | |||
66 | &spi { | ||
67 | num-chipselects = <1>; | ||
68 | status = "okay"; | ||
69 | |||
70 | /* Winbond 25Q128FVSG SPI flash */ | ||
71 | spiflash: w25q128@0 { | ||
72 | #address-cells = <1>; | ||
73 | #size-cells = <1>; | ||
74 | compatible = "winbond,w25q128", "jedec,spi-nor"; | ||
75 | spi-max-frequency = <104000000>; | ||
76 | reg = <0>; | ||
77 | }; | ||
78 | }; | ||
diff --git a/arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts b/arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts new file mode 100644 index 000000000..c8290d36c --- /dev/null +++ b/arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts | |||
@@ -0,0 +1,118 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include <dt-bindings/gpio/gpio.h> | ||
5 | #include <dt-bindings/input/input.h> | ||
6 | |||
7 | #include "ar9331.dtsi" | ||
8 | |||
9 | / { | ||
10 | model = "TP-Link TL-MR3020"; | ||
11 | compatible = "tplink,tl-mr3020"; | ||
12 | |||
13 | aliases { | ||
14 | serial0 = &uart; | ||
15 | }; | ||
16 | |||
17 | memory@0 { | ||
18 | device_type = "memory"; | ||
19 | reg = <0x0 0x2000000>; | ||
20 | }; | ||
21 | |||
22 | leds { | ||
23 | compatible = "gpio-leds"; | ||
24 | |||
25 | wlan { | ||
26 | label = "tp-link:green:wlan"; | ||
27 | gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; | ||
28 | default-state = "off"; | ||
29 | }; | ||
30 | |||
31 | lan { | ||
32 | label = "tp-link:green:lan"; | ||
33 | gpios = <&gpio 17 GPIO_ACTIVE_LOW>; | ||
34 | default-state = "off"; | ||
35 | }; | ||
36 | |||
37 | wps { | ||
38 | label = "tp-link:green:wps"; | ||
39 | gpios = <&gpio 26 GPIO_ACTIVE_LOW>; | ||
40 | default-state = "off"; | ||
41 | }; | ||
42 | |||
43 | led3g { | ||
44 | label = "tp-link:green:3g"; | ||
45 | gpios = <&gpio 27 GPIO_ACTIVE_LOW>; | ||
46 | default-state = "off"; | ||
47 | }; | ||
48 | }; | ||
49 | |||
50 | gpio-keys { | ||
51 | compatible = "gpio-keys"; | ||
52 | #address-cells = <1>; | ||
53 | #size-cells = <0>; | ||
54 | |||
55 | button@0 { | ||
56 | label = "wps"; | ||
57 | linux,code = <KEY_WPS_BUTTON>; | ||
58 | gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; | ||
59 | }; | ||
60 | |||
61 | button@1 { | ||
62 | label = "sw1"; | ||
63 | linux,code = <BTN_0>; | ||
64 | gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; | ||
65 | }; | ||
66 | |||
67 | button@2 { | ||
68 | label = "sw2"; | ||
69 | linux,code = <BTN_1>; | ||
70 | gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; | ||
71 | }; | ||
72 | }; | ||
73 | |||
74 | reg_usb_vbus: reg_usb_vbus { | ||
75 | compatible = "regulator-fixed"; | ||
76 | regulator-name = "usb_vbus"; | ||
77 | regulator-min-microvolt = <5000000>; | ||
78 | regulator-max-microvolt = <5000000>; | ||
79 | gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; | ||
80 | enable-active-high; | ||
81 | }; | ||
82 | }; | ||
83 | |||
84 | &ref { | ||
85 | clock-frequency = <25000000>; | ||
86 | }; | ||
87 | |||
88 | &uart { | ||
89 | status = "okay"; | ||
90 | }; | ||
91 | |||
92 | &gpio { | ||
93 | status = "okay"; | ||
94 | }; | ||
95 | |||
96 | &usb { | ||
97 | dr_mode = "host"; | ||
98 | vbus-supply = <®_usb_vbus>; | ||
99 | status = "okay"; | ||
100 | }; | ||
101 | |||
102 | &usb_phy { | ||
103 | status = "okay"; | ||
104 | }; | ||
105 | |||
106 | &spi { | ||
107 | num-chipselects = <1>; | ||
108 | status = "okay"; | ||
109 | |||
110 | /* Spansion S25FL032PIF SPI flash */ | ||
111 | spiflash: s25sl032p@0 { | ||
112 | #address-cells = <1>; | ||
113 | #size-cells = <1>; | ||
114 | compatible = "spansion,s25sl032p", "jedec,spi-nor"; | ||
115 | spi-max-frequency = <104000000>; | ||
116 | reg = <0>; | ||
117 | }; | ||
118 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/Makefile b/arch/mips/boot/dts/ralink/Makefile new file mode 100644 index 000000000..6c26dfa0a --- /dev/null +++ b/arch/mips/boot/dts/ralink/Makefile | |||
@@ -0,0 +1,9 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_DTB_RT2880_EVAL) += rt2880_eval.dtb | ||
3 | dtb-$(CONFIG_DTB_RT305X_EVAL) += rt3052_eval.dtb | ||
4 | dtb-$(CONFIG_DTB_RT3883_EVAL) += rt3883_eval.dtb | ||
5 | dtb-$(CONFIG_DTB_MT7620A_EVAL) += mt7620a_eval.dtb | ||
6 | dtb-$(CONFIG_DTB_OMEGA2P) += omega2p.dtb | ||
7 | dtb-$(CONFIG_DTB_VOCORE2) += vocore2.dtb | ||
8 | |||
9 | obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) | ||
diff --git a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts new file mode 100644 index 000000000..6069b33cf --- /dev/null +++ b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts | |||
@@ -0,0 +1,205 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* | ||
3 | * Copyright (c) 2019 Stefan Roese <sr@denx.de> | ||
4 | */ | ||
5 | |||
6 | /dts-v1/; | ||
7 | |||
8 | /include/ "mt7628a.dtsi" | ||
9 | |||
10 | #include <dt-bindings/gpio/gpio.h> | ||
11 | #include <dt-bindings/input/input.h> | ||
12 | |||
13 | / { | ||
14 | compatible = "gardena,smart-gateway-mt7688", "ralink,mt7688a-soc", | ||
15 | "ralink,mt7628a-soc"; | ||
16 | model = "GARDENA smart Gateway (MT7688)"; | ||
17 | |||
18 | memory@0 { | ||
19 | device_type = "memory"; | ||
20 | reg = <0x0 0x8000000>; | ||
21 | }; | ||
22 | |||
23 | gpio-keys { | ||
24 | compatible = "gpio-keys"; | ||
25 | |||
26 | pinctrl-names = "default"; | ||
27 | pinctrl-0 = <&pinmux_gpio_gpio>; /* GPIO11 */ | ||
28 | |||
29 | user_btn1 { | ||
30 | label = "USER_BTN1"; | ||
31 | gpios = <&gpio 11 GPIO_ACTIVE_LOW>; | ||
32 | linux,code =<KEY_PROG1> ; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | leds { | ||
37 | compatible = "gpio-leds"; | ||
38 | |||
39 | pinctrl-names = "default"; | ||
40 | pinctrl-0 = <&pinmux_pwm0_gpio>, /* GPIO18 */ | ||
41 | <&pinmux_pwm1_gpio>, /* GPIO19 */ | ||
42 | <&pinmux_sdmode_gpio>, /* GPIO22..29 */ | ||
43 | <&pinmux_p0led_an_gpio>; /* GPIO43 */ | ||
44 | /* | ||
45 | * <&pinmux_i2s_gpio> (covers GPIO0..3) is needed here as | ||
46 | * well for GPIO3. But this is already claimed for uart1 | ||
47 | * (see below). So we can't include it in this LED node. | ||
48 | */ | ||
49 | |||
50 | power_blue { | ||
51 | label = "smartgw:power:blue"; | ||
52 | gpios = <&gpio 18 GPIO_ACTIVE_HIGH>; | ||
53 | default-state = "off"; | ||
54 | }; | ||
55 | |||
56 | power_green { | ||
57 | label = "smartgw:power:green"; | ||
58 | gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; | ||
59 | default-state = "off"; | ||
60 | }; | ||
61 | |||
62 | power_red { | ||
63 | label = "smartgw:power:red"; | ||
64 | gpios = <&gpio 22 GPIO_ACTIVE_HIGH>; | ||
65 | default-state = "off"; | ||
66 | }; | ||
67 | |||
68 | radio_blue { | ||
69 | label = "smartgw:radio:blue"; | ||
70 | gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; | ||
71 | default-state = "off"; | ||
72 | }; | ||
73 | |||
74 | radio_green { | ||
75 | label = "smartgw:radio:green"; | ||
76 | gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; | ||
77 | default-state = "off"; | ||
78 | }; | ||
79 | |||
80 | radio_red { | ||
81 | label = "smartgw:radio:red"; | ||
82 | gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; | ||
83 | default-state = "off"; | ||
84 | }; | ||
85 | |||
86 | internet_blue { | ||
87 | label = "smartgw:internet:blue"; | ||
88 | gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; | ||
89 | default-state = "off"; | ||
90 | }; | ||
91 | |||
92 | internet_green { | ||
93 | label = "smartgw:internet:green"; | ||
94 | gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; | ||
95 | default-state = "off"; | ||
96 | }; | ||
97 | |||
98 | internet_red { | ||
99 | label = "smartgw:internet:red"; | ||
100 | gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; | ||
101 | default-state = "off"; | ||
102 | }; | ||
103 | |||
104 | ethernet_link { | ||
105 | label = "smartgw:eth:link"; | ||
106 | gpios = <&gpio 3 GPIO_ACTIVE_LOW>; | ||
107 | linux,default-trigger = "netdev"; | ||
108 | }; | ||
109 | |||
110 | ethernet_activity { | ||
111 | label = "smartgw:eth:act"; | ||
112 | gpios = <&gpio 43 GPIO_ACTIVE_LOW>; | ||
113 | linux,default-trigger = "netdev"; | ||
114 | }; | ||
115 | }; | ||
116 | |||
117 | aliases { | ||
118 | serial0 = &uart0; | ||
119 | }; | ||
120 | }; | ||
121 | |||
122 | &i2c { | ||
123 | status = "okay"; | ||
124 | }; | ||
125 | |||
126 | &spi { | ||
127 | status = "okay"; | ||
128 | |||
129 | pinctrl-names = "default"; | ||
130 | pinctrl-0 = <&pinmux_spi_spi>, <&pinmux_spi_cs1_cs>; | ||
131 | |||
132 | m25p80@0 { | ||
133 | compatible = "jedec,spi-nor"; | ||
134 | reg = <0>; | ||
135 | spi-max-frequency = <40000000>; | ||
136 | |||
137 | partitions { | ||
138 | compatible = "fixed-partitions"; | ||
139 | #address-cells = <1>; | ||
140 | #size-cells = <1>; | ||
141 | |||
142 | partition@0 { | ||
143 | label = "uboot"; | ||
144 | reg = <0x0 0xa0000>; | ||
145 | read-only; | ||
146 | }; | ||
147 | |||
148 | partition@a0000 { | ||
149 | label = "uboot_env0"; | ||
150 | reg = <0xa0000 0x10000>; | ||
151 | }; | ||
152 | |||
153 | partition@b0000 { | ||
154 | label = "uboot_env1"; | ||
155 | reg = <0xb0000 0x10000>; | ||
156 | }; | ||
157 | |||
158 | factory: partition@c0000 { | ||
159 | label = "factory"; | ||
160 | reg = <0xc0000 0x10000>; | ||
161 | read-only; | ||
162 | }; | ||
163 | }; | ||
164 | }; | ||
165 | |||
166 | nand_flash@1 { | ||
167 | compatible = "spi-nand"; | ||
168 | linux,mtd-name = "gd5f"; | ||
169 | reg = <1>; | ||
170 | spi-max-frequency = <40000000>; | ||
171 | }; | ||
172 | }; | ||
173 | |||
174 | &uart1 { | ||
175 | status = "okay"; | ||
176 | |||
177 | pinctrl-names = "default"; | ||
178 | pinctrl-0 = <&pinmux_i2s_gpio>; /* GPIO0..3 */ | ||
179 | |||
180 | fifo-size = <8>; | ||
181 | tx-threshold = <8>; | ||
182 | |||
183 | rts-gpios = <&gpio 1 GPIO_ACTIVE_LOW>; | ||
184 | cts-gpios = <&gpio 2 GPIO_ACTIVE_LOW>; | ||
185 | }; | ||
186 | |||
187 | &uart2 { | ||
188 | status = "okay"; | ||
189 | |||
190 | pinctrl-names = "default"; | ||
191 | pinctrl-0 = <&pinmux_p2led_an_gpio>, /* GPIO41 */ | ||
192 | <&pinmux_p3led_an_gpio>; /* GPIO40 */ | ||
193 | |||
194 | rts-gpios = <&gpio 40 GPIO_ACTIVE_LOW>; | ||
195 | cts-gpios = <&gpio 41 GPIO_ACTIVE_LOW>; | ||
196 | }; | ||
197 | |||
198 | &watchdog { | ||
199 | status = "okay"; | ||
200 | }; | ||
201 | |||
202 | &wmac { | ||
203 | status = "okay"; | ||
204 | mediatek,mtd-eeprom = <&factory 0x0000>; | ||
205 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/mt7620a.dtsi b/arch/mips/boot/dts/ralink/mt7620a.dtsi new file mode 100644 index 000000000..1f6e5320f --- /dev/null +++ b/arch/mips/boot/dts/ralink/mt7620a.dtsi | |||
@@ -0,0 +1,59 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "ralink,mtk7620a-soc"; | ||
6 | |||
7 | cpus { | ||
8 | cpu@0 { | ||
9 | compatible = "mips,mips24KEc"; | ||
10 | }; | ||
11 | }; | ||
12 | |||
13 | cpuintc: cpuintc { | ||
14 | #address-cells = <0>; | ||
15 | #interrupt-cells = <1>; | ||
16 | interrupt-controller; | ||
17 | compatible = "mti,cpu-interrupt-controller"; | ||
18 | }; | ||
19 | |||
20 | palmbus@10000000 { | ||
21 | compatible = "palmbus"; | ||
22 | reg = <0x10000000 0x200000>; | ||
23 | ranges = <0x0 0x10000000 0x1FFFFF>; | ||
24 | |||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | |||
28 | sysc@0 { | ||
29 | compatible = "ralink,mt7620a-sysc"; | ||
30 | reg = <0x0 0x100>; | ||
31 | }; | ||
32 | |||
33 | intc: intc@200 { | ||
34 | compatible = "ralink,mt7620a-intc", "ralink,rt2880-intc"; | ||
35 | reg = <0x200 0x100>; | ||
36 | |||
37 | interrupt-controller; | ||
38 | #interrupt-cells = <1>; | ||
39 | |||
40 | interrupt-parent = <&cpuintc>; | ||
41 | interrupts = <2>; | ||
42 | }; | ||
43 | |||
44 | memc@300 { | ||
45 | compatible = "ralink,mt7620a-memc", "ralink,rt3050-memc"; | ||
46 | reg = <0x300 0x100>; | ||
47 | }; | ||
48 | |||
49 | uartlite@c00 { | ||
50 | compatible = "ralink,mt7620a-uart", "ralink,rt2880-uart", "ns16550a"; | ||
51 | reg = <0xc00 0x100>; | ||
52 | |||
53 | interrupt-parent = <&intc>; | ||
54 | interrupts = <12>; | ||
55 | |||
56 | reg-shift = <2>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/mt7620a_eval.dts b/arch/mips/boot/dts/ralink/mt7620a_eval.dts new file mode 100644 index 000000000..8de8f89f3 --- /dev/null +++ b/arch/mips/boot/dts/ralink/mt7620a_eval.dts | |||
@@ -0,0 +1,18 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "mt7620a.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; | ||
8 | model = "Ralink MT7620A evaluation board"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x0 0x2000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,57600"; | ||
17 | }; | ||
18 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi new file mode 100644 index 000000000..892e8ab86 --- /dev/null +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi | |||
@@ -0,0 +1,298 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | / { | ||
4 | #address-cells = <1>; | ||
5 | #size-cells = <1>; | ||
6 | compatible = "ralink,mt7628a-soc"; | ||
7 | |||
8 | cpus { | ||
9 | #address-cells = <1>; | ||
10 | #size-cells = <0>; | ||
11 | |||
12 | cpu@0 { | ||
13 | compatible = "mti,mips24KEc"; | ||
14 | device_type = "cpu"; | ||
15 | reg = <0>; | ||
16 | }; | ||
17 | }; | ||
18 | |||
19 | resetc: reset-controller { | ||
20 | compatible = "ralink,rt2880-reset"; | ||
21 | #reset-cells = <1>; | ||
22 | }; | ||
23 | |||
24 | cpuintc: interrupt-controller { | ||
25 | #address-cells = <0>; | ||
26 | #interrupt-cells = <1>; | ||
27 | interrupt-controller; | ||
28 | compatible = "mti,cpu-interrupt-controller"; | ||
29 | }; | ||
30 | |||
31 | palmbus@10000000 { | ||
32 | compatible = "palmbus"; | ||
33 | reg = <0x10000000 0x200000>; | ||
34 | ranges = <0x0 0x10000000 0x1FFFFF>; | ||
35 | |||
36 | #address-cells = <1>; | ||
37 | #size-cells = <1>; | ||
38 | |||
39 | sysc: system-controller@0 { | ||
40 | compatible = "ralink,mt7620a-sysc", "syscon"; | ||
41 | reg = <0x0 0x60>; | ||
42 | }; | ||
43 | |||
44 | pinmux: pinmux@60 { | ||
45 | compatible = "pinctrl-single"; | ||
46 | reg = <0x60 0x8>; | ||
47 | #address-cells = <1>; | ||
48 | #size-cells = <0>; | ||
49 | #pinctrl-cells = <2>; | ||
50 | pinctrl-single,bit-per-mux; | ||
51 | pinctrl-single,register-width = <32>; | ||
52 | pinctrl-single,function-mask = <0x1>; | ||
53 | |||
54 | pinmux_gpio_gpio: pinmux_gpio_gpio { | ||
55 | pinctrl-single,bits = <0x0 0x0 0x3>; | ||
56 | }; | ||
57 | |||
58 | pinmux_spi_cs1_cs: pinmux_spi_cs1_cs { | ||
59 | pinctrl-single,bits = <0x0 0x0 0x30>; | ||
60 | }; | ||
61 | |||
62 | pinmux_i2s_gpio: pinmux_i2s_gpio { | ||
63 | pinctrl-single,bits = <0x0 0x40 0xc0>; | ||
64 | }; | ||
65 | |||
66 | pinmux_uart0_uart: pinmux_uart0_uart0 { | ||
67 | pinctrl-single,bits = <0x0 0x0 0x300>; | ||
68 | }; | ||
69 | |||
70 | pinmux_sdmode_sdxc: pinmux_sdmode_sdxc { | ||
71 | pinctrl-single,bits = <0x0 0x0 0xc00>; | ||
72 | }; | ||
73 | |||
74 | pinmux_sdmode_gpio: pinmux_sdmode_gpio { | ||
75 | pinctrl-single,bits = <0x0 0x400 0xc00>; | ||
76 | }; | ||
77 | |||
78 | pinmux_spi_spi: pinmux_spi_spi { | ||
79 | pinctrl-single,bits = <0x0 0x0 0x1000>; | ||
80 | }; | ||
81 | |||
82 | pinmux_refclk_gpio: pinmux_refclk_gpio { | ||
83 | pinctrl-single,bits = <0x0 0x40000 0x40000>; | ||
84 | }; | ||
85 | |||
86 | pinmux_i2c_i2c: pinmux_i2c_i2c { | ||
87 | pinctrl-single,bits = <0x0 0x0 0x300000>; | ||
88 | }; | ||
89 | |||
90 | pinmux_uart1_uart: pinmux_uart1_uart1 { | ||
91 | pinctrl-single,bits = <0x0 0x0 0x3000000>; | ||
92 | }; | ||
93 | |||
94 | pinmux_uart2_uart: pinmux_uart2_uart { | ||
95 | pinctrl-single,bits = <0x0 0x0 0xc000000>; | ||
96 | }; | ||
97 | |||
98 | pinmux_pwm0_pwm: pinmux_pwm0_pwm { | ||
99 | pinctrl-single,bits = <0x0 0x0 0x30000000>; | ||
100 | }; | ||
101 | |||
102 | pinmux_pwm0_gpio: pinmux_pwm0_gpio { | ||
103 | pinctrl-single,bits = <0x0 0x10000000 | ||
104 | 0x30000000>; | ||
105 | }; | ||
106 | |||
107 | pinmux_pwm1_pwm: pinmux_pwm1_pwm { | ||
108 | pinctrl-single,bits = <0x0 0x0 0xc0000000>; | ||
109 | }; | ||
110 | |||
111 | pinmux_pwm1_gpio: pinmux_pwm1_gpio { | ||
112 | pinctrl-single,bits = <0x0 0x40000000 | ||
113 | 0xc0000000>; | ||
114 | }; | ||
115 | |||
116 | pinmux_p0led_an_gpio: pinmux_p0led_an_gpio { | ||
117 | pinctrl-single,bits = <0x4 0x4 0xc>; | ||
118 | }; | ||
119 | |||
120 | pinmux_p1led_an_gpio: pinmux_p1led_an_gpio { | ||
121 | pinctrl-single,bits = <0x4 0x10 0x30>; | ||
122 | }; | ||
123 | |||
124 | pinmux_p2led_an_gpio: pinmux_p2led_an_gpio { | ||
125 | pinctrl-single,bits = <0x4 0x40 0xc0>; | ||
126 | }; | ||
127 | |||
128 | pinmux_p3led_an_gpio: pinmux_p3led_an_gpio { | ||
129 | pinctrl-single,bits = <0x4 0x100 0x300>; | ||
130 | }; | ||
131 | |||
132 | pinmux_p4led_an_gpio: pinmux_p4led_an_gpio { | ||
133 | pinctrl-single,bits = <0x4 0x400 0xc00>; | ||
134 | }; | ||
135 | }; | ||
136 | |||
137 | watchdog: watchdog@100 { | ||
138 | compatible = "mediatek,mt7621-wdt"; | ||
139 | reg = <0x100 0x30>; | ||
140 | |||
141 | resets = <&resetc 8>; | ||
142 | reset-names = "wdt"; | ||
143 | |||
144 | interrupt-parent = <&intc>; | ||
145 | interrupts = <24>; | ||
146 | |||
147 | status = "disabled"; | ||
148 | }; | ||
149 | |||
150 | intc: interrupt-controller@200 { | ||
151 | compatible = "ralink,rt2880-intc"; | ||
152 | reg = <0x200 0x100>; | ||
153 | |||
154 | interrupt-controller; | ||
155 | #interrupt-cells = <1>; | ||
156 | |||
157 | resets = <&resetc 9>; | ||
158 | reset-names = "intc"; | ||
159 | |||
160 | interrupt-parent = <&cpuintc>; | ||
161 | interrupts = <2>; | ||
162 | |||
163 | ralink,intc-registers = <0x9c 0xa0 | ||
164 | 0x6c 0xa4 | ||
165 | 0x80 0x78>; | ||
166 | }; | ||
167 | |||
168 | memory-controller@300 { | ||
169 | compatible = "ralink,mt7620a-memc"; | ||
170 | reg = <0x300 0x100>; | ||
171 | }; | ||
172 | |||
173 | gpio: gpio@600 { | ||
174 | compatible = "mediatek,mt7621-gpio"; | ||
175 | reg = <0x600 0x100>; | ||
176 | |||
177 | gpio-controller; | ||
178 | interrupt-controller; | ||
179 | #gpio-cells = <2>; | ||
180 | #interrupt-cells = <2>; | ||
181 | |||
182 | interrupt-parent = <&intc>; | ||
183 | interrupts = <6>; | ||
184 | }; | ||
185 | |||
186 | spi: spi@b00 { | ||
187 | compatible = "ralink,mt7621-spi"; | ||
188 | reg = <0xb00 0x100>; | ||
189 | |||
190 | pinctrl-names = "default"; | ||
191 | pinctrl-0 = <&pinmux_spi_spi>; | ||
192 | |||
193 | resets = <&resetc 18>; | ||
194 | reset-names = "spi"; | ||
195 | |||
196 | #address-cells = <1>; | ||
197 | #size-cells = <0>; | ||
198 | |||
199 | status = "disabled"; | ||
200 | }; | ||
201 | |||
202 | i2c: i2c@900 { | ||
203 | compatible = "mediatek,mt7621-i2c"; | ||
204 | reg = <0x900 0x100>; | ||
205 | |||
206 | pinctrl-names = "default"; | ||
207 | pinctrl-0 = <&pinmux_i2c_i2c>; | ||
208 | |||
209 | resets = <&resetc 16>; | ||
210 | reset-names = "i2c"; | ||
211 | |||
212 | #address-cells = <1>; | ||
213 | #size-cells = <0>; | ||
214 | |||
215 | status = "disabled"; | ||
216 | }; | ||
217 | |||
218 | uart0: uartlite@c00 { | ||
219 | compatible = "ns16550a"; | ||
220 | reg = <0xc00 0x100>; | ||
221 | |||
222 | pinctrl-names = "default"; | ||
223 | pinctrl-0 = <&pinmux_uart0_uart>; | ||
224 | |||
225 | resets = <&resetc 12>; | ||
226 | reset-names = "uart0"; | ||
227 | |||
228 | interrupt-parent = <&intc>; | ||
229 | interrupts = <20>; | ||
230 | |||
231 | reg-shift = <2>; | ||
232 | }; | ||
233 | |||
234 | uart1: uart1@d00 { | ||
235 | compatible = "ns16550a"; | ||
236 | reg = <0xd00 0x100>; | ||
237 | |||
238 | pinctrl-names = "default"; | ||
239 | pinctrl-0 = <&pinmux_uart1_uart>; | ||
240 | |||
241 | resets = <&resetc 19>; | ||
242 | reset-names = "uart1"; | ||
243 | |||
244 | interrupt-parent = <&intc>; | ||
245 | interrupts = <21>; | ||
246 | |||
247 | reg-shift = <2>; | ||
248 | }; | ||
249 | |||
250 | uart2: uart2@e00 { | ||
251 | compatible = "ns16550a"; | ||
252 | reg = <0xe00 0x100>; | ||
253 | |||
254 | pinctrl-names = "default"; | ||
255 | pinctrl-0 = <&pinmux_uart2_uart>; | ||
256 | |||
257 | resets = <&resetc 20>; | ||
258 | reset-names = "uart2"; | ||
259 | |||
260 | interrupt-parent = <&intc>; | ||
261 | interrupts = <22>; | ||
262 | |||
263 | reg-shift = <2>; | ||
264 | }; | ||
265 | }; | ||
266 | |||
267 | usb_phy: usb-phy@10120000 { | ||
268 | compatible = "mediatek,mt7628-usbphy"; | ||
269 | reg = <0x10120000 0x1000>; | ||
270 | |||
271 | #phy-cells = <0>; | ||
272 | |||
273 | ralink,sysctl = <&sysc>; | ||
274 | resets = <&resetc 22 &resetc 25>; | ||
275 | reset-names = "host", "device"; | ||
276 | }; | ||
277 | |||
278 | ehci@101c0000 { | ||
279 | compatible = "generic-ehci"; | ||
280 | reg = <0x101c0000 0x1000>; | ||
281 | |||
282 | phys = <&usb_phy>; | ||
283 | phy-names = "usb"; | ||
284 | |||
285 | interrupt-parent = <&intc>; | ||
286 | interrupts = <18>; | ||
287 | }; | ||
288 | |||
289 | wmac: wmac@10300000 { | ||
290 | compatible = "mediatek,mt7628-wmac"; | ||
291 | reg = <0x10300000 0x100000>; | ||
292 | |||
293 | interrupt-parent = <&cpuintc>; | ||
294 | interrupts = <6>; | ||
295 | |||
296 | status = "disabled"; | ||
297 | }; | ||
298 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/omega2p.dts b/arch/mips/boot/dts/ralink/omega2p.dts new file mode 100644 index 000000000..5884fd48f --- /dev/null +++ b/arch/mips/boot/dts/ralink/omega2p.dts | |||
@@ -0,0 +1,18 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "mt7628a.dtsi" | ||
4 | |||
5 | / { | ||
6 | compatible = "onion,omega2+", "ralink,mt7688a-soc", "ralink,mt7628a-soc"; | ||
7 | model = "Onion Omega2+"; | ||
8 | |||
9 | memory@0 { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x0 0x8000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS0,115200"; | ||
16 | stdout-path = &uart0; | ||
17 | }; | ||
18 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/rt2880.dtsi b/arch/mips/boot/dts/ralink/rt2880.dtsi new file mode 100644 index 000000000..8fc1987d9 --- /dev/null +++ b/arch/mips/boot/dts/ralink/rt2880.dtsi | |||
@@ -0,0 +1,59 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "ralink,rt2880-soc"; | ||
6 | |||
7 | cpus { | ||
8 | cpu@0 { | ||
9 | compatible = "mips,mips4KEc"; | ||
10 | }; | ||
11 | }; | ||
12 | |||
13 | cpuintc: cpuintc { | ||
14 | #address-cells = <0>; | ||
15 | #interrupt-cells = <1>; | ||
16 | interrupt-controller; | ||
17 | compatible = "mti,cpu-interrupt-controller"; | ||
18 | }; | ||
19 | |||
20 | palmbus@300000 { | ||
21 | compatible = "palmbus"; | ||
22 | reg = <0x300000 0x200000>; | ||
23 | ranges = <0x0 0x300000 0x1FFFFF>; | ||
24 | |||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | |||
28 | sysc@0 { | ||
29 | compatible = "ralink,rt2880-sysc"; | ||
30 | reg = <0x0 0x100>; | ||
31 | }; | ||
32 | |||
33 | intc: intc@200 { | ||
34 | compatible = "ralink,rt2880-intc"; | ||
35 | reg = <0x200 0x100>; | ||
36 | |||
37 | interrupt-controller; | ||
38 | #interrupt-cells = <1>; | ||
39 | |||
40 | interrupt-parent = <&cpuintc>; | ||
41 | interrupts = <2>; | ||
42 | }; | ||
43 | |||
44 | memc@300 { | ||
45 | compatible = "ralink,rt2880-memc"; | ||
46 | reg = <0x300 0x100>; | ||
47 | }; | ||
48 | |||
49 | uartlite@c00 { | ||
50 | compatible = "ralink,rt2880-uart", "ns16550a"; | ||
51 | reg = <0xc00 0x100>; | ||
52 | |||
53 | interrupt-parent = <&intc>; | ||
54 | interrupts = <8>; | ||
55 | |||
56 | reg-shift = <2>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/rt2880_eval.dts b/arch/mips/boot/dts/ralink/rt2880_eval.dts new file mode 100644 index 000000000..759bc1dd5 --- /dev/null +++ b/arch/mips/boot/dts/ralink/rt2880_eval.dts | |||
@@ -0,0 +1,48 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "rt2880.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "ralink,rt2880-eval-board", "ralink,rt2880-soc"; | ||
8 | model = "Ralink RT2880 evaluation board"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x8000000 0x2000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,57600"; | ||
17 | }; | ||
18 | |||
19 | cfi@1f000000 { | ||
20 | compatible = "cfi-flash"; | ||
21 | reg = <0x1f000000 0x400000>; | ||
22 | |||
23 | bank-width = <2>; | ||
24 | device-width = <2>; | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | |||
28 | partition@0 { | ||
29 | label = "uboot"; | ||
30 | reg = <0x0 0x30000>; | ||
31 | read-only; | ||
32 | }; | ||
33 | partition@30000 { | ||
34 | label = "uboot-env"; | ||
35 | reg = <0x30000 0x10000>; | ||
36 | read-only; | ||
37 | }; | ||
38 | partition@40000 { | ||
39 | label = "calibration"; | ||
40 | reg = <0x40000 0x10000>; | ||
41 | read-only; | ||
42 | }; | ||
43 | partition@50000 { | ||
44 | label = "linux"; | ||
45 | reg = <0x50000 0x3b0000>; | ||
46 | }; | ||
47 | }; | ||
48 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/rt3050.dtsi b/arch/mips/boot/dts/ralink/rt3050.dtsi new file mode 100644 index 000000000..23062333a --- /dev/null +++ b/arch/mips/boot/dts/ralink/rt3050.dtsi | |||
@@ -0,0 +1,69 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "ralink,rt3050-soc", "ralink,rt3052-soc", "ralink,rt3350-soc"; | ||
6 | |||
7 | cpus { | ||
8 | cpu@0 { | ||
9 | compatible = "mips,mips24KEc"; | ||
10 | }; | ||
11 | }; | ||
12 | |||
13 | cpuintc: cpuintc { | ||
14 | #address-cells = <0>; | ||
15 | #interrupt-cells = <1>; | ||
16 | interrupt-controller; | ||
17 | compatible = "mti,cpu-interrupt-controller"; | ||
18 | }; | ||
19 | |||
20 | palmbus@10000000 { | ||
21 | compatible = "palmbus"; | ||
22 | reg = <0x10000000 0x200000>; | ||
23 | ranges = <0x0 0x10000000 0x1FFFFF>; | ||
24 | |||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | |||
28 | sysc@0 { | ||
29 | compatible = "ralink,rt3052-sysc", "ralink,rt3050-sysc"; | ||
30 | reg = <0x0 0x100>; | ||
31 | }; | ||
32 | |||
33 | intc: intc@200 { | ||
34 | compatible = "ralink,rt3052-intc", "ralink,rt2880-intc"; | ||
35 | reg = <0x200 0x100>; | ||
36 | |||
37 | interrupt-controller; | ||
38 | #interrupt-cells = <1>; | ||
39 | |||
40 | interrupt-parent = <&cpuintc>; | ||
41 | interrupts = <2>; | ||
42 | }; | ||
43 | |||
44 | memc@300 { | ||
45 | compatible = "ralink,rt3052-memc", "ralink,rt3050-memc"; | ||
46 | reg = <0x300 0x100>; | ||
47 | }; | ||
48 | |||
49 | uartlite@c00 { | ||
50 | compatible = "ralink,rt3052-uart", "ralink,rt2880-uart", "ns16550a"; | ||
51 | reg = <0xc00 0x100>; | ||
52 | |||
53 | interrupt-parent = <&intc>; | ||
54 | interrupts = <12>; | ||
55 | |||
56 | reg-shift = <2>; | ||
57 | }; | ||
58 | }; | ||
59 | |||
60 | usb@101c0000 { | ||
61 | compatible = "ralink,rt3050-usb", "snps,dwc2"; | ||
62 | reg = <0x101c0000 40000>; | ||
63 | |||
64 | interrupt-parent = <&intc>; | ||
65 | interrupts = <18>; | ||
66 | |||
67 | status = "disabled"; | ||
68 | }; | ||
69 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/rt3052_eval.dts b/arch/mips/boot/dts/ralink/rt3052_eval.dts new file mode 100644 index 000000000..6408ff629 --- /dev/null +++ b/arch/mips/boot/dts/ralink/rt3052_eval.dts | |||
@@ -0,0 +1,52 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "rt3050.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "ralink,rt3052-eval-board", "ralink,rt3052-soc"; | ||
8 | model = "Ralink RT3052 evaluation board"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x0 0x2000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,57600"; | ||
17 | }; | ||
18 | |||
19 | cfi@1f000000 { | ||
20 | compatible = "cfi-flash"; | ||
21 | reg = <0x1f000000 0x800000>; | ||
22 | |||
23 | bank-width = <2>; | ||
24 | device-width = <2>; | ||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | |||
28 | partition@0 { | ||
29 | label = "uboot"; | ||
30 | reg = <0x0 0x30000>; | ||
31 | read-only; | ||
32 | }; | ||
33 | partition@30000 { | ||
34 | label = "uboot-env"; | ||
35 | reg = <0x30000 0x10000>; | ||
36 | read-only; | ||
37 | }; | ||
38 | partition@40000 { | ||
39 | label = "calibration"; | ||
40 | reg = <0x40000 0x10000>; | ||
41 | read-only; | ||
42 | }; | ||
43 | partition@50000 { | ||
44 | label = "linux"; | ||
45 | reg = <0x50000 0x7b0000>; | ||
46 | }; | ||
47 | }; | ||
48 | |||
49 | usb@101c0000 { | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/rt3883.dtsi b/arch/mips/boot/dts/ralink/rt3883.dtsi new file mode 100644 index 000000000..61132cf15 --- /dev/null +++ b/arch/mips/boot/dts/ralink/rt3883.dtsi | |||
@@ -0,0 +1,59 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "ralink,rt3883-soc"; | ||
6 | |||
7 | cpus { | ||
8 | cpu@0 { | ||
9 | compatible = "mips,mips74Kc"; | ||
10 | }; | ||
11 | }; | ||
12 | |||
13 | cpuintc: cpuintc { | ||
14 | #address-cells = <0>; | ||
15 | #interrupt-cells = <1>; | ||
16 | interrupt-controller; | ||
17 | compatible = "mti,cpu-interrupt-controller"; | ||
18 | }; | ||
19 | |||
20 | palmbus@10000000 { | ||
21 | compatible = "palmbus"; | ||
22 | reg = <0x10000000 0x200000>; | ||
23 | ranges = <0x0 0x10000000 0x1FFFFF>; | ||
24 | |||
25 | #address-cells = <1>; | ||
26 | #size-cells = <1>; | ||
27 | |||
28 | sysc@0 { | ||
29 | compatible = "ralink,rt3883-sysc", "ralink,rt3050-sysc"; | ||
30 | reg = <0x0 0x100>; | ||
31 | }; | ||
32 | |||
33 | intc: intc@200 { | ||
34 | compatible = "ralink,rt3883-intc", "ralink,rt2880-intc"; | ||
35 | reg = <0x200 0x100>; | ||
36 | |||
37 | interrupt-controller; | ||
38 | #interrupt-cells = <1>; | ||
39 | |||
40 | interrupt-parent = <&cpuintc>; | ||
41 | interrupts = <2>; | ||
42 | }; | ||
43 | |||
44 | memc@300 { | ||
45 | compatible = "ralink,rt3883-memc", "ralink,rt3050-memc"; | ||
46 | reg = <0x300 0x100>; | ||
47 | }; | ||
48 | |||
49 | uartlite@c00 { | ||
50 | compatible = "ralink,rt3883-uart", "ralink,rt2880-uart", "ns16550a"; | ||
51 | reg = <0xc00 0x100>; | ||
52 | |||
53 | interrupt-parent = <&intc>; | ||
54 | interrupts = <12>; | ||
55 | |||
56 | reg-shift = <2>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/rt3883_eval.dts b/arch/mips/boot/dts/ralink/rt3883_eval.dts new file mode 100644 index 000000000..c22bc84df --- /dev/null +++ b/arch/mips/boot/dts/ralink/rt3883_eval.dts | |||
@@ -0,0 +1,18 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | /include/ "rt3883.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "ralink,rt3883-eval-board", "ralink,rt3883-soc"; | ||
8 | model = "Ralink RT3883 evaluation board"; | ||
9 | |||
10 | memory@0 { | ||
11 | device_type = "memory"; | ||
12 | reg = <0x0 0x2000000>; | ||
13 | }; | ||
14 | |||
15 | chosen { | ||
16 | bootargs = "console=ttyS0,57600"; | ||
17 | }; | ||
18 | }; | ||
diff --git a/arch/mips/boot/dts/ralink/vocore2.dts b/arch/mips/boot/dts/ralink/vocore2.dts new file mode 100644 index 000000000..fa8a5f8f2 --- /dev/null +++ b/arch/mips/boot/dts/ralink/vocore2.dts | |||
@@ -0,0 +1,18 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | #include "mt7628a.dtsi" | ||
4 | |||
5 | / { | ||
6 | compatible = "vocore,vocore2", "ralink,mt7628a-soc"; | ||
7 | model = "VoCore2"; | ||
8 | |||
9 | memory@0 { | ||
10 | device_type = "memory"; | ||
11 | reg = <0x0 0x8000000>; | ||
12 | }; | ||
13 | |||
14 | chosen { | ||
15 | bootargs = "console=ttyS2,115200"; | ||
16 | stdout-path = &uart2; | ||
17 | }; | ||
18 | }; | ||
diff --git a/arch/mips/boot/dts/xilfpga/Makefile b/arch/mips/boot/dts/xilfpga/Makefile new file mode 100644 index 000000000..69ca00590 --- /dev/null +++ b/arch/mips/boot/dts/xilfpga/Makefile | |||
@@ -0,0 +1,2 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | dtb-$(CONFIG_FIT_IMAGE_FDT_XILFPGA) += nexys4ddr.dtb | ||
diff --git a/arch/mips/boot/dts/xilfpga/microAptiv.dtsi b/arch/mips/boot/dts/xilfpga/microAptiv.dtsi new file mode 100644 index 000000000..87b2b1f9a --- /dev/null +++ b/arch/mips/boot/dts/xilfpga/microAptiv.dtsi | |||
@@ -0,0 +1,22 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | / { | ||
3 | #address-cells = <1>; | ||
4 | #size-cells = <1>; | ||
5 | compatible = "img,xilfpga"; | ||
6 | |||
7 | cpus { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | cpu@0 { | ||
11 | device_type = "cpu"; | ||
12 | compatible = "mips,m14Kc"; | ||
13 | clocks = <&ext>; | ||
14 | reg = <0>; | ||
15 | }; | ||
16 | }; | ||
17 | |||
18 | ext: ext { | ||
19 | compatible = "fixed-clock"; | ||
20 | #clock-cells = <0>; | ||
21 | }; | ||
22 | }; | ||
diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts new file mode 100644 index 000000000..cc8dbea09 --- /dev/null +++ b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts | |||
@@ -0,0 +1,118 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /dts-v1/; | ||
3 | |||
4 | #include "microAptiv.dtsi" | ||
5 | |||
6 | / { | ||
7 | compatible = "digilent,nexys4ddr"; | ||
8 | |||
9 | aliases { | ||
10 | serial0 = &axi_uart16550; | ||
11 | }; | ||
12 | chosen { | ||
13 | bootargs = "console=ttyS0,115200"; | ||
14 | stdout-path = "serial0:115200n8"; | ||
15 | }; | ||
16 | |||
17 | memory { | ||
18 | device_type = "memory"; | ||
19 | reg = <0x0 0x08000000>; | ||
20 | }; | ||
21 | |||
22 | cpuintc: interrupt-controller { | ||
23 | #address-cells = <0>; | ||
24 | #interrupt-cells = <1>; | ||
25 | interrupt-controller; | ||
26 | compatible = "mti,cpu-interrupt-controller"; | ||
27 | }; | ||
28 | |||
29 | axi_intc: interrupt-controller@10200000 { | ||
30 | #interrupt-cells = <1>; | ||
31 | compatible = "xlnx,xps-intc-1.00.a"; | ||
32 | interrupt-controller; | ||
33 | reg = <0x10200000 0x10000>; | ||
34 | xlnx,kind-of-intr = <0x0>; | ||
35 | xlnx,num-intr-inputs = <0x6>; | ||
36 | |||
37 | interrupt-parent = <&cpuintc>; | ||
38 | interrupts = <6>; | ||
39 | }; | ||
40 | |||
41 | axi_gpio: gpio@10600000 { | ||
42 | #gpio-cells = <1>; | ||
43 | compatible = "xlnx,xps-gpio-1.00.a"; | ||
44 | gpio-controller; | ||
45 | reg = <0x10600000 0x10000>; | ||
46 | xlnx,all-inputs = <0x0>; | ||
47 | xlnx,dout-default = <0x0>; | ||
48 | xlnx,gpio-width = <0x16>; | ||
49 | xlnx,interrupt-present = <0x0>; | ||
50 | xlnx,is-dual = <0x0>; | ||
51 | xlnx,tri-default = <0xffffffff>; | ||
52 | } ; | ||
53 | |||
54 | axi_ethernetlite: ethernet@10e00000 { | ||
55 | compatible = "xlnx,xps-ethernetlite-3.00.a"; | ||
56 | device_type = "network"; | ||
57 | interrupt-parent = <&axi_intc>; | ||
58 | interrupts = <1>; | ||
59 | phy-handle = <&phy0>; | ||
60 | reg = <0x10e00000 0x10000>; | ||
61 | xlnx,duplex = <0x1>; | ||
62 | xlnx,include-global-buffers = <0x1>; | ||
63 | xlnx,include-internal-loopback = <0x0>; | ||
64 | xlnx,include-mdio = <0x1>; | ||
65 | xlnx,instance = "axi_ethernetlite_inst"; | ||
66 | xlnx,rx-ping-pong = <0x1>; | ||
67 | xlnx,s-axi-id-width = <0x1>; | ||
68 | xlnx,tx-ping-pong = <0x1>; | ||
69 | xlnx,use-internal = <0x0>; | ||
70 | mdio { | ||
71 | #address-cells = <1>; | ||
72 | #size-cells = <0>; | ||
73 | phy0: phy@1 { | ||
74 | device_type = "ethernet-phy"; | ||
75 | reg = <1>; | ||
76 | }; | ||
77 | }; | ||
78 | }; | ||
79 | |||
80 | axi_uart16550: serial@10400000 { | ||
81 | compatible = "ns16550a"; | ||
82 | reg = <0x10400000 0x10000>; | ||
83 | |||
84 | reg-shift = <2>; | ||
85 | reg-offset = <0x1000>; | ||
86 | |||
87 | clocks = <&ext>; | ||
88 | |||
89 | interrupt-parent = <&axi_intc>; | ||
90 | interrupts = <0>; | ||
91 | }; | ||
92 | |||
93 | axi_i2c: i2c@10a00000 { | ||
94 | compatible = "xlnx,xps-iic-2.00.a"; | ||
95 | interrupt-parent = <&axi_intc>; | ||
96 | interrupts = <4>; | ||
97 | reg = < 0x10a00000 0x10000 >; | ||
98 | clocks = <&ext>; | ||
99 | xlnx,clk-freq = <0x5f5e100>; | ||
100 | xlnx,family = "Artix7"; | ||
101 | xlnx,gpo-width = <0x1>; | ||
102 | xlnx,iic-freq = <0x186a0>; | ||
103 | xlnx,scl-inertial-delay = <0x0>; | ||
104 | xlnx,sda-inertial-delay = <0x0>; | ||
105 | xlnx,ten-bit-adr = <0x0>; | ||
106 | #address-cells = <1>; | ||
107 | #size-cells = <0>; | ||
108 | |||
109 | ad7420@4b { | ||
110 | compatible = "adi,adt7420"; | ||
111 | reg = <0x4b>; | ||
112 | }; | ||
113 | } ; | ||
114 | }; | ||
115 | |||
116 | &ext { | ||
117 | clock-frequency = <50000000>; | ||
118 | }; | ||
diff --git a/arch/mips/boot/ecoff.h b/arch/mips/boot/ecoff.h new file mode 100644 index 000000000..5be79ebfc --- /dev/null +++ b/arch/mips/boot/ecoff.h | |||
@@ -0,0 +1,65 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | /* | ||
3 | * Some ECOFF definitions. | ||
4 | */ | ||
5 | |||
6 | #include <stdint.h> | ||
7 | |||
8 | typedef struct filehdr { | ||
9 | uint16_t f_magic; /* magic number */ | ||
10 | uint16_t f_nscns; /* number of sections */ | ||
11 | int32_t f_timdat; /* time & date stamp */ | ||
12 | int32_t f_symptr; /* file pointer to symbolic header */ | ||
13 | int32_t f_nsyms; /* sizeof(symbolic hdr) */ | ||
14 | uint16_t f_opthdr; /* sizeof(optional hdr) */ | ||
15 | uint16_t f_flags; /* flags */ | ||
16 | } FILHDR; | ||
17 | #define FILHSZ sizeof(FILHDR) | ||
18 | |||
19 | #define MIPSEBMAGIC 0x160 | ||
20 | #define MIPSELMAGIC 0x162 | ||
21 | |||
22 | typedef struct scnhdr { | ||
23 | char s_name[8]; /* section name */ | ||
24 | int32_t s_paddr; /* physical address, aliased s_nlib */ | ||
25 | int32_t s_vaddr; /* virtual address */ | ||
26 | int32_t s_size; /* section size */ | ||
27 | int32_t s_scnptr; /* file ptr to raw data for section */ | ||
28 | int32_t s_relptr; /* file ptr to relocation */ | ||
29 | int32_t s_lnnoptr; /* file ptr to gp histogram */ | ||
30 | uint16_t s_nreloc; /* number of relocation entries */ | ||
31 | uint16_t s_nlnno; /* number of gp histogram entries */ | ||
32 | int32_t s_flags; /* flags */ | ||
33 | } SCNHDR; | ||
34 | #define SCNHSZ sizeof(SCNHDR) | ||
35 | #define SCNROUND ((int32_t)16) | ||
36 | |||
37 | typedef struct aouthdr { | ||
38 | int16_t magic; /* see above */ | ||
39 | int16_t vstamp; /* version stamp */ | ||
40 | int32_t tsize; /* text size in bytes, padded to DW bdry*/ | ||
41 | int32_t dsize; /* initialized data " " */ | ||
42 | int32_t bsize; /* uninitialized data " " */ | ||
43 | int32_t entry; /* entry pt. */ | ||
44 | int32_t text_start; /* base of text used for this file */ | ||
45 | int32_t data_start; /* base of data used for this file */ | ||
46 | int32_t bss_start; /* base of bss used for this file */ | ||
47 | int32_t gprmask; /* general purpose register mask */ | ||
48 | int32_t cprmask[4]; /* co-processor register masks */ | ||
49 | int32_t gp_value; /* the gp value used for this object */ | ||
50 | } AOUTHDR; | ||
51 | #define AOUTHSZ sizeof(AOUTHDR) | ||
52 | |||
53 | #define OMAGIC 0407 | ||
54 | #define NMAGIC 0410 | ||
55 | #define ZMAGIC 0413 | ||
56 | #define SMAGIC 0411 | ||
57 | #define LIBMAGIC 0443 | ||
58 | |||
59 | #define N_TXTOFF(f, a) \ | ||
60 | ((a).magic == ZMAGIC || (a).magic == LIBMAGIC ? 0 : \ | ||
61 | ((a).vstamp < 23 ? \ | ||
62 | ((FILHSZ + AOUTHSZ + (f).f_nscns * SCNHSZ + 7) & 0xfffffff8) : \ | ||
63 | ((FILHSZ + AOUTHSZ + (f).f_nscns * SCNHSZ + SCNROUND-1) & ~(SCNROUND-1)) ) ) | ||
64 | #define N_DATOFF(f, a) \ | ||
65 | N_TXTOFF(f, a) + (a).tsize; | ||
diff --git a/arch/mips/boot/elf2ecoff.c b/arch/mips/boot/elf2ecoff.c new file mode 100644 index 000000000..6972b9723 --- /dev/null +++ b/arch/mips/boot/elf2ecoff.c | |||
@@ -0,0 +1,621 @@ | |||
1 | /* | ||
2 | * Copyright (c) 1995 | ||
3 | * Ted Lemon (hereinafter referred to as the author) | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * 1. Redistributions of source code must retain the above copyright | ||
9 | * notice, this list of conditions and the following disclaimer. | ||
10 | * 2. Redistributions in binary form must reproduce the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer in the | ||
12 | * documentation and/or other materials provided with the distribution. | ||
13 | * 3. The name of the author may not be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND | ||
17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE | ||
20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
26 | * SUCH DAMAGE. | ||
27 | */ | ||
28 | |||
29 | /* elf2ecoff.c | ||
30 | |||
31 | This program converts an elf executable to an ECOFF executable. | ||
32 | No symbol table is retained. This is useful primarily in building | ||
33 | net-bootable kernels for machines (e.g., DECstation and Alpha) which | ||
34 | only support the ECOFF object file format. */ | ||
35 | |||
36 | #include <stdio.h> | ||
37 | #include <string.h> | ||
38 | #include <errno.h> | ||
39 | #include <sys/types.h> | ||
40 | #include <fcntl.h> | ||
41 | #include <unistd.h> | ||
42 | #include <elf.h> | ||
43 | #include <limits.h> | ||
44 | #include <netinet/in.h> | ||
45 | #include <stdlib.h> | ||
46 | #include <stdint.h> | ||
47 | #include <inttypes.h> | ||
48 | |||
49 | #include "ecoff.h" | ||
50 | |||
51 | /* | ||
52 | * Some extra ELF definitions | ||
53 | */ | ||
54 | #define PT_MIPS_REGINFO 0x70000000 /* Register usage information */ | ||
55 | #define PT_MIPS_ABIFLAGS 0x70000003 /* Records ABI related flags */ | ||
56 | |||
57 | /* -------------------------------------------------------------------- */ | ||
58 | |||
59 | struct sect { | ||
60 | uint32_t vaddr; | ||
61 | uint32_t len; | ||
62 | }; | ||
63 | |||
64 | int *symTypeTable; | ||
65 | int must_convert_endian; | ||
66 | int format_bigendian; | ||
67 | |||
68 | static void copy(int out, int in, off_t offset, off_t size) | ||
69 | { | ||
70 | char ibuf[4096]; | ||
71 | int remaining, cur, count; | ||
72 | |||
73 | /* Go to the start of the ELF symbol table... */ | ||
74 | if (lseek(in, offset, SEEK_SET) < 0) { | ||
75 | perror("copy: lseek"); | ||
76 | exit(1); | ||
77 | } | ||
78 | |||
79 | remaining = size; | ||
80 | while (remaining) { | ||
81 | cur = remaining; | ||
82 | if (cur > sizeof ibuf) | ||
83 | cur = sizeof ibuf; | ||
84 | remaining -= cur; | ||
85 | if ((count = read(in, ibuf, cur)) != cur) { | ||
86 | fprintf(stderr, "copy: read: %s\n", | ||
87 | count ? strerror(errno) : | ||
88 | "premature end of file"); | ||
89 | exit(1); | ||
90 | } | ||
91 | if ((count = write(out, ibuf, cur)) != cur) { | ||
92 | perror("copy: write"); | ||
93 | exit(1); | ||
94 | } | ||
95 | } | ||
96 | } | ||
97 | |||
98 | /* | ||
99 | * Combine two segments, which must be contiguous. If pad is true, it's | ||
100 | * okay for there to be padding between. | ||
101 | */ | ||
102 | static void combine(struct sect *base, struct sect *new, int pad) | ||
103 | { | ||
104 | if (!base->len) | ||
105 | *base = *new; | ||
106 | else if (new->len) { | ||
107 | if (base->vaddr + base->len != new->vaddr) { | ||
108 | if (pad) | ||
109 | base->len = new->vaddr - base->vaddr; | ||
110 | else { | ||
111 | fprintf(stderr, | ||
112 | "Non-contiguous data can't be converted.\n"); | ||
113 | exit(1); | ||
114 | } | ||
115 | } | ||
116 | base->len += new->len; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | static int phcmp(const void *v1, const void *v2) | ||
121 | { | ||
122 | const Elf32_Phdr *h1 = v1; | ||
123 | const Elf32_Phdr *h2 = v2; | ||
124 | |||
125 | if (h1->p_vaddr > h2->p_vaddr) | ||
126 | return 1; | ||
127 | else if (h1->p_vaddr < h2->p_vaddr) | ||
128 | return -1; | ||
129 | else | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | static char *saveRead(int file, off_t offset, off_t len, char *name) | ||
134 | { | ||
135 | char *tmp; | ||
136 | int count; | ||
137 | off_t off; | ||
138 | if ((off = lseek(file, offset, SEEK_SET)) < 0) { | ||
139 | fprintf(stderr, "%s: fseek: %s\n", name, strerror(errno)); | ||
140 | exit(1); | ||
141 | } | ||
142 | if (!(tmp = (char *) malloc(len))) { | ||
143 | fprintf(stderr, "%s: Can't allocate %ld bytes.\n", name, | ||
144 | len); | ||
145 | exit(1); | ||
146 | } | ||
147 | count = read(file, tmp, len); | ||
148 | if (count != len) { | ||
149 | fprintf(stderr, "%s: read: %s.\n", | ||
150 | name, | ||
151 | count ? strerror(errno) : "End of file reached"); | ||
152 | exit(1); | ||
153 | } | ||
154 | return tmp; | ||
155 | } | ||
156 | |||
157 | #define swab16(x) \ | ||
158 | ((uint16_t)( \ | ||
159 | (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \ | ||
160 | (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) | ||
161 | |||
162 | #define swab32(x) \ | ||
163 | ((unsigned int)( \ | ||
164 | (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \ | ||
165 | (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \ | ||
166 | (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \ | ||
167 | (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) | ||
168 | |||
169 | static void convert_elf_hdr(Elf32_Ehdr * e) | ||
170 | { | ||
171 | e->e_type = swab16(e->e_type); | ||
172 | e->e_machine = swab16(e->e_machine); | ||
173 | e->e_version = swab32(e->e_version); | ||
174 | e->e_entry = swab32(e->e_entry); | ||
175 | e->e_phoff = swab32(e->e_phoff); | ||
176 | e->e_shoff = swab32(e->e_shoff); | ||
177 | e->e_flags = swab32(e->e_flags); | ||
178 | e->e_ehsize = swab16(e->e_ehsize); | ||
179 | e->e_phentsize = swab16(e->e_phentsize); | ||
180 | e->e_phnum = swab16(e->e_phnum); | ||
181 | e->e_shentsize = swab16(e->e_shentsize); | ||
182 | e->e_shnum = swab16(e->e_shnum); | ||
183 | e->e_shstrndx = swab16(e->e_shstrndx); | ||
184 | } | ||
185 | |||
186 | static void convert_elf_phdrs(Elf32_Phdr * p, int num) | ||
187 | { | ||
188 | int i; | ||
189 | |||
190 | for (i = 0; i < num; i++, p++) { | ||
191 | p->p_type = swab32(p->p_type); | ||
192 | p->p_offset = swab32(p->p_offset); | ||
193 | p->p_vaddr = swab32(p->p_vaddr); | ||
194 | p->p_paddr = swab32(p->p_paddr); | ||
195 | p->p_filesz = swab32(p->p_filesz); | ||
196 | p->p_memsz = swab32(p->p_memsz); | ||
197 | p->p_flags = swab32(p->p_flags); | ||
198 | p->p_align = swab32(p->p_align); | ||
199 | } | ||
200 | |||
201 | } | ||
202 | |||
203 | static void convert_elf_shdrs(Elf32_Shdr * s, int num) | ||
204 | { | ||
205 | int i; | ||
206 | |||
207 | for (i = 0; i < num; i++, s++) { | ||
208 | s->sh_name = swab32(s->sh_name); | ||
209 | s->sh_type = swab32(s->sh_type); | ||
210 | s->sh_flags = swab32(s->sh_flags); | ||
211 | s->sh_addr = swab32(s->sh_addr); | ||
212 | s->sh_offset = swab32(s->sh_offset); | ||
213 | s->sh_size = swab32(s->sh_size); | ||
214 | s->sh_link = swab32(s->sh_link); | ||
215 | s->sh_info = swab32(s->sh_info); | ||
216 | s->sh_addralign = swab32(s->sh_addralign); | ||
217 | s->sh_entsize = swab32(s->sh_entsize); | ||
218 | } | ||
219 | } | ||
220 | |||
221 | static void convert_ecoff_filehdr(struct filehdr *f) | ||
222 | { | ||
223 | f->f_magic = swab16(f->f_magic); | ||
224 | f->f_nscns = swab16(f->f_nscns); | ||
225 | f->f_timdat = swab32(f->f_timdat); | ||
226 | f->f_symptr = swab32(f->f_symptr); | ||
227 | f->f_nsyms = swab32(f->f_nsyms); | ||
228 | f->f_opthdr = swab16(f->f_opthdr); | ||
229 | f->f_flags = swab16(f->f_flags); | ||
230 | } | ||
231 | |||
232 | static void convert_ecoff_aouthdr(struct aouthdr *a) | ||
233 | { | ||
234 | a->magic = swab16(a->magic); | ||
235 | a->vstamp = swab16(a->vstamp); | ||
236 | a->tsize = swab32(a->tsize); | ||
237 | a->dsize = swab32(a->dsize); | ||
238 | a->bsize = swab32(a->bsize); | ||
239 | a->entry = swab32(a->entry); | ||
240 | a->text_start = swab32(a->text_start); | ||
241 | a->data_start = swab32(a->data_start); | ||
242 | a->bss_start = swab32(a->bss_start); | ||
243 | a->gprmask = swab32(a->gprmask); | ||
244 | a->cprmask[0] = swab32(a->cprmask[0]); | ||
245 | a->cprmask[1] = swab32(a->cprmask[1]); | ||
246 | a->cprmask[2] = swab32(a->cprmask[2]); | ||
247 | a->cprmask[3] = swab32(a->cprmask[3]); | ||
248 | a->gp_value = swab32(a->gp_value); | ||
249 | } | ||
250 | |||
251 | static void convert_ecoff_esecs(struct scnhdr *s, int num) | ||
252 | { | ||
253 | int i; | ||
254 | |||
255 | for (i = 0; i < num; i++, s++) { | ||
256 | s->s_paddr = swab32(s->s_paddr); | ||
257 | s->s_vaddr = swab32(s->s_vaddr); | ||
258 | s->s_size = swab32(s->s_size); | ||
259 | s->s_scnptr = swab32(s->s_scnptr); | ||
260 | s->s_relptr = swab32(s->s_relptr); | ||
261 | s->s_lnnoptr = swab32(s->s_lnnoptr); | ||
262 | s->s_nreloc = swab16(s->s_nreloc); | ||
263 | s->s_nlnno = swab16(s->s_nlnno); | ||
264 | s->s_flags = swab32(s->s_flags); | ||
265 | } | ||
266 | } | ||
267 | |||
268 | int main(int argc, char *argv[]) | ||
269 | { | ||
270 | Elf32_Ehdr ex; | ||
271 | Elf32_Phdr *ph; | ||
272 | Elf32_Shdr *sh; | ||
273 | int i, pad; | ||
274 | struct sect text, data, bss; | ||
275 | struct filehdr efh; | ||
276 | struct aouthdr eah; | ||
277 | struct scnhdr esecs[6]; | ||
278 | int infile, outfile; | ||
279 | uint32_t cur_vma = UINT32_MAX; | ||
280 | int addflag = 0; | ||
281 | int nosecs; | ||
282 | |||
283 | text.len = data.len = bss.len = 0; | ||
284 | text.vaddr = data.vaddr = bss.vaddr = 0; | ||
285 | |||
286 | /* Check args... */ | ||
287 | if (argc < 3 || argc > 4) { | ||
288 | usage: | ||
289 | fprintf(stderr, | ||
290 | "usage: elf2ecoff <elf executable> <ecoff executable> [-a]\n"); | ||
291 | exit(1); | ||
292 | } | ||
293 | if (argc == 4) { | ||
294 | if (strcmp(argv[3], "-a")) | ||
295 | goto usage; | ||
296 | addflag = 1; | ||
297 | } | ||
298 | |||
299 | /* Try the input file... */ | ||
300 | if ((infile = open(argv[1], O_RDONLY)) < 0) { | ||
301 | fprintf(stderr, "Can't open %s for read: %s\n", | ||
302 | argv[1], strerror(errno)); | ||
303 | exit(1); | ||
304 | } | ||
305 | |||
306 | /* Read the header, which is at the beginning of the file... */ | ||
307 | i = read(infile, &ex, sizeof ex); | ||
308 | if (i != sizeof ex) { | ||
309 | fprintf(stderr, "ex: %s: %s.\n", | ||
310 | argv[1], | ||
311 | i ? strerror(errno) : "End of file reached"); | ||
312 | exit(1); | ||
313 | } | ||
314 | |||
315 | if (ex.e_ident[EI_DATA] == ELFDATA2MSB) | ||
316 | format_bigendian = 1; | ||
317 | |||
318 | if (ntohs(0xaa55) == 0xaa55) { | ||
319 | if (!format_bigendian) | ||
320 | must_convert_endian = 1; | ||
321 | } else { | ||
322 | if (format_bigendian) | ||
323 | must_convert_endian = 1; | ||
324 | } | ||
325 | if (must_convert_endian) | ||
326 | convert_elf_hdr(&ex); | ||
327 | |||
328 | /* Read the program headers... */ | ||
329 | ph = (Elf32_Phdr *) saveRead(infile, ex.e_phoff, | ||
330 | ex.e_phnum * sizeof(Elf32_Phdr), | ||
331 | "ph"); | ||
332 | if (must_convert_endian) | ||
333 | convert_elf_phdrs(ph, ex.e_phnum); | ||
334 | /* Read the section headers... */ | ||
335 | sh = (Elf32_Shdr *) saveRead(infile, ex.e_shoff, | ||
336 | ex.e_shnum * sizeof(Elf32_Shdr), | ||
337 | "sh"); | ||
338 | if (must_convert_endian) | ||
339 | convert_elf_shdrs(sh, ex.e_shnum); | ||
340 | |||
341 | /* Figure out if we can cram the program header into an ECOFF | ||
342 | header... Basically, we can't handle anything but loadable | ||
343 | segments, but we can ignore some kinds of segments. We can't | ||
344 | handle holes in the address space. Segments may be out of order, | ||
345 | so we sort them first. */ | ||
346 | |||
347 | qsort(ph, ex.e_phnum, sizeof(Elf32_Phdr), phcmp); | ||
348 | |||
349 | for (i = 0; i < ex.e_phnum; i++) { | ||
350 | /* Section types we can ignore... */ | ||
351 | switch (ph[i].p_type) { | ||
352 | case PT_NULL: | ||
353 | case PT_NOTE: | ||
354 | case PT_PHDR: | ||
355 | case PT_MIPS_REGINFO: | ||
356 | case PT_MIPS_ABIFLAGS: | ||
357 | continue; | ||
358 | |||
359 | case PT_LOAD: | ||
360 | /* Writable (data) segment? */ | ||
361 | if (ph[i].p_flags & PF_W) { | ||
362 | struct sect ndata, nbss; | ||
363 | |||
364 | ndata.vaddr = ph[i].p_vaddr; | ||
365 | ndata.len = ph[i].p_filesz; | ||
366 | nbss.vaddr = ph[i].p_vaddr + ph[i].p_filesz; | ||
367 | nbss.len = ph[i].p_memsz - ph[i].p_filesz; | ||
368 | |||
369 | combine(&data, &ndata, 0); | ||
370 | combine(&bss, &nbss, 1); | ||
371 | } else { | ||
372 | struct sect ntxt; | ||
373 | |||
374 | ntxt.vaddr = ph[i].p_vaddr; | ||
375 | ntxt.len = ph[i].p_filesz; | ||
376 | |||
377 | combine(&text, &ntxt, 0); | ||
378 | } | ||
379 | /* Remember the lowest segment start address. */ | ||
380 | if (ph[i].p_vaddr < cur_vma) | ||
381 | cur_vma = ph[i].p_vaddr; | ||
382 | break; | ||
383 | |||
384 | default: | ||
385 | /* Section types we can't handle... */ | ||
386 | fprintf(stderr, | ||
387 | "Program header %d type %d can't be converted.\n", | ||
388 | ex.e_phnum, ph[i].p_type); | ||
389 | exit(1); | ||
390 | } | ||
391 | } | ||
392 | |||
393 | /* Sections must be in order to be converted... */ | ||
394 | if (text.vaddr > data.vaddr || data.vaddr > bss.vaddr || | ||
395 | text.vaddr + text.len > data.vaddr | ||
396 | || data.vaddr + data.len > bss.vaddr) { | ||
397 | fprintf(stderr, | ||
398 | "Sections ordering prevents a.out conversion.\n"); | ||
399 | exit(1); | ||
400 | } | ||
401 | |||
402 | /* If there's a data section but no text section, then the loader | ||
403 | combined everything into one section. That needs to be the | ||
404 | text section, so just make the data section zero length following | ||
405 | text. */ | ||
406 | if (data.len && !text.len) { | ||
407 | text = data; | ||
408 | data.vaddr = text.vaddr + text.len; | ||
409 | data.len = 0; | ||
410 | } | ||
411 | |||
412 | /* If there is a gap between text and data, we'll fill it when we copy | ||
413 | the data, so update the length of the text segment as represented in | ||
414 | a.out to reflect that, since a.out doesn't allow gaps in the program | ||
415 | address space. */ | ||
416 | if (text.vaddr + text.len < data.vaddr) | ||
417 | text.len = data.vaddr - text.vaddr; | ||
418 | |||
419 | /* We now have enough information to cons up an a.out header... */ | ||
420 | eah.magic = OMAGIC; | ||
421 | eah.vstamp = 200; | ||
422 | eah.tsize = text.len; | ||
423 | eah.dsize = data.len; | ||
424 | eah.bsize = bss.len; | ||
425 | eah.entry = ex.e_entry; | ||
426 | eah.text_start = text.vaddr; | ||
427 | eah.data_start = data.vaddr; | ||
428 | eah.bss_start = bss.vaddr; | ||
429 | eah.gprmask = 0xf3fffffe; | ||
430 | memset(&eah.cprmask, '\0', sizeof eah.cprmask); | ||
431 | eah.gp_value = 0; /* unused. */ | ||
432 | |||
433 | if (format_bigendian) | ||
434 | efh.f_magic = MIPSEBMAGIC; | ||
435 | else | ||
436 | efh.f_magic = MIPSELMAGIC; | ||
437 | if (addflag) | ||
438 | nosecs = 6; | ||
439 | else | ||
440 | nosecs = 3; | ||
441 | efh.f_nscns = nosecs; | ||
442 | efh.f_timdat = 0; /* bogus */ | ||
443 | efh.f_symptr = 0; | ||
444 | efh.f_nsyms = 0; | ||
445 | efh.f_opthdr = sizeof eah; | ||
446 | efh.f_flags = 0x100f; /* Stripped, not sharable. */ | ||
447 | |||
448 | memset(esecs, 0, sizeof esecs); | ||
449 | strcpy(esecs[0].s_name, ".text"); | ||
450 | strcpy(esecs[1].s_name, ".data"); | ||
451 | strcpy(esecs[2].s_name, ".bss"); | ||
452 | if (addflag) { | ||
453 | strcpy(esecs[3].s_name, ".rdata"); | ||
454 | strcpy(esecs[4].s_name, ".sdata"); | ||
455 | strcpy(esecs[5].s_name, ".sbss"); | ||
456 | } | ||
457 | esecs[0].s_paddr = esecs[0].s_vaddr = eah.text_start; | ||
458 | esecs[1].s_paddr = esecs[1].s_vaddr = eah.data_start; | ||
459 | esecs[2].s_paddr = esecs[2].s_vaddr = eah.bss_start; | ||
460 | if (addflag) { | ||
461 | esecs[3].s_paddr = esecs[3].s_vaddr = 0; | ||
462 | esecs[4].s_paddr = esecs[4].s_vaddr = 0; | ||
463 | esecs[5].s_paddr = esecs[5].s_vaddr = 0; | ||
464 | } | ||
465 | esecs[0].s_size = eah.tsize; | ||
466 | esecs[1].s_size = eah.dsize; | ||
467 | esecs[2].s_size = eah.bsize; | ||
468 | if (addflag) { | ||
469 | esecs[3].s_size = 0; | ||
470 | esecs[4].s_size = 0; | ||
471 | esecs[5].s_size = 0; | ||
472 | } | ||
473 | esecs[0].s_scnptr = N_TXTOFF(efh, eah); | ||
474 | esecs[1].s_scnptr = N_DATOFF(efh, eah); | ||
475 | #define ECOFF_SEGMENT_ALIGNMENT(a) 0x10 | ||
476 | #define ECOFF_ROUND(s, a) (((s)+(a)-1)&~((a)-1)) | ||
477 | esecs[2].s_scnptr = esecs[1].s_scnptr + | ||
478 | ECOFF_ROUND(esecs[1].s_size, ECOFF_SEGMENT_ALIGNMENT(&eah)); | ||
479 | if (addflag) { | ||
480 | esecs[3].s_scnptr = 0; | ||
481 | esecs[4].s_scnptr = 0; | ||
482 | esecs[5].s_scnptr = 0; | ||
483 | } | ||
484 | esecs[0].s_relptr = esecs[1].s_relptr = esecs[2].s_relptr = 0; | ||
485 | esecs[0].s_lnnoptr = esecs[1].s_lnnoptr = esecs[2].s_lnnoptr = 0; | ||
486 | esecs[0].s_nreloc = esecs[1].s_nreloc = esecs[2].s_nreloc = 0; | ||
487 | esecs[0].s_nlnno = esecs[1].s_nlnno = esecs[2].s_nlnno = 0; | ||
488 | if (addflag) { | ||
489 | esecs[3].s_relptr = esecs[4].s_relptr | ||
490 | = esecs[5].s_relptr = 0; | ||
491 | esecs[3].s_lnnoptr = esecs[4].s_lnnoptr | ||
492 | = esecs[5].s_lnnoptr = 0; | ||
493 | esecs[3].s_nreloc = esecs[4].s_nreloc = esecs[5].s_nreloc = | ||
494 | 0; | ||
495 | esecs[3].s_nlnno = esecs[4].s_nlnno = esecs[5].s_nlnno = 0; | ||
496 | } | ||
497 | esecs[0].s_flags = 0x20; | ||
498 | esecs[1].s_flags = 0x40; | ||
499 | esecs[2].s_flags = 0x82; | ||
500 | if (addflag) { | ||
501 | esecs[3].s_flags = 0x100; | ||
502 | esecs[4].s_flags = 0x200; | ||
503 | esecs[5].s_flags = 0x400; | ||
504 | } | ||
505 | |||
506 | /* Make the output file... */ | ||
507 | if ((outfile = open(argv[2], O_WRONLY | O_CREAT, 0777)) < 0) { | ||
508 | fprintf(stderr, "Unable to create %s: %s\n", argv[2], | ||
509 | strerror(errno)); | ||
510 | exit(1); | ||
511 | } | ||
512 | |||
513 | if (must_convert_endian) | ||
514 | convert_ecoff_filehdr(&efh); | ||
515 | /* Write the headers... */ | ||
516 | i = write(outfile, &efh, sizeof efh); | ||
517 | if (i != sizeof efh) { | ||
518 | perror("efh: write"); | ||
519 | exit(1); | ||
520 | |||
521 | for (i = 0; i < nosecs; i++) { | ||
522 | printf | ||
523 | ("Section %d: %s phys %"PRIx32" size %"PRIx32"\t file offset %"PRIx32"\n", | ||
524 | i, esecs[i].s_name, esecs[i].s_paddr, | ||
525 | esecs[i].s_size, esecs[i].s_scnptr); | ||
526 | } | ||
527 | } | ||
528 | fprintf(stderr, "wrote %d byte file header.\n", i); | ||
529 | |||
530 | if (must_convert_endian) | ||
531 | convert_ecoff_aouthdr(&eah); | ||
532 | i = write(outfile, &eah, sizeof eah); | ||
533 | if (i != sizeof eah) { | ||
534 | perror("eah: write"); | ||
535 | exit(1); | ||
536 | } | ||
537 | fprintf(stderr, "wrote %d byte a.out header.\n", i); | ||
538 | |||
539 | if (must_convert_endian) | ||
540 | convert_ecoff_esecs(&esecs[0], nosecs); | ||
541 | i = write(outfile, &esecs, nosecs * sizeof(struct scnhdr)); | ||
542 | if (i != nosecs * sizeof(struct scnhdr)) { | ||
543 | perror("esecs: write"); | ||
544 | exit(1); | ||
545 | } | ||
546 | fprintf(stderr, "wrote %d bytes of section headers.\n", i); | ||
547 | |||
548 | pad = (sizeof(efh) + sizeof(eah) + nosecs * sizeof(struct scnhdr)) & 15; | ||
549 | if (pad) { | ||
550 | pad = 16 - pad; | ||
551 | i = write(outfile, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0", pad); | ||
552 | if (i < 0) { | ||
553 | perror("ipad: write"); | ||
554 | exit(1); | ||
555 | } | ||
556 | fprintf(stderr, "wrote %d byte pad.\n", i); | ||
557 | } | ||
558 | |||
559 | /* | ||
560 | * Copy the loadable sections. Zero-fill any gaps less than 64k; | ||
561 | * complain about any zero-filling, and die if we're asked to zero-fill | ||
562 | * more than 64k. | ||
563 | */ | ||
564 | for (i = 0; i < ex.e_phnum; i++) { | ||
565 | /* Unprocessable sections were handled above, so just verify that | ||
566 | the section can be loaded before copying. */ | ||
567 | if (ph[i].p_type == PT_LOAD && ph[i].p_filesz) { | ||
568 | if (cur_vma != ph[i].p_vaddr) { | ||
569 | uint32_t gap = ph[i].p_vaddr - cur_vma; | ||
570 | char obuf[1024]; | ||
571 | if (gap > 65536) { | ||
572 | fprintf(stderr, | ||
573 | "Intersegment gap (%"PRId32" bytes) too large.\n", | ||
574 | gap); | ||
575 | exit(1); | ||
576 | } | ||
577 | fprintf(stderr, | ||
578 | "Warning: %d byte intersegment gap.\n", | ||
579 | gap); | ||
580 | memset(obuf, 0, sizeof obuf); | ||
581 | while (gap) { | ||
582 | int count = | ||
583 | write(outfile, obuf, | ||
584 | (gap > | ||
585 | sizeof obuf ? sizeof | ||
586 | obuf : gap)); | ||
587 | if (count < 0) { | ||
588 | fprintf(stderr, | ||
589 | "Error writing gap: %s\n", | ||
590 | strerror(errno)); | ||
591 | exit(1); | ||
592 | } | ||
593 | gap -= count; | ||
594 | } | ||
595 | } | ||
596 | fprintf(stderr, "writing %d bytes...\n", | ||
597 | ph[i].p_filesz); | ||
598 | copy(outfile, infile, ph[i].p_offset, | ||
599 | ph[i].p_filesz); | ||
600 | cur_vma = ph[i].p_vaddr + ph[i].p_filesz; | ||
601 | } | ||
602 | } | ||
603 | |||
604 | /* | ||
605 | * Write a page of padding for boot PROMS that read entire pages. | ||
606 | * Without this, they may attempt to read past the end of the | ||
607 | * data section, incur an error, and refuse to boot. | ||
608 | */ | ||
609 | { | ||
610 | char obuf[4096]; | ||
611 | memset(obuf, 0, sizeof obuf); | ||
612 | if (write(outfile, obuf, sizeof(obuf)) != sizeof(obuf)) { | ||
613 | fprintf(stderr, "Error writing PROM padding: %s\n", | ||
614 | strerror(errno)); | ||
615 | exit(1); | ||
616 | } | ||
617 | } | ||
618 | |||
619 | /* Looks like we won... */ | ||
620 | exit(0); | ||
621 | } | ||
diff --git a/arch/mips/boot/tools/.gitignore b/arch/mips/boot/tools/.gitignore new file mode 100644 index 000000000..d36dc7cf9 --- /dev/null +++ b/arch/mips/boot/tools/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | relocs | ||
diff --git a/arch/mips/boot/tools/Makefile b/arch/mips/boot/tools/Makefile new file mode 100644 index 000000000..592e05a51 --- /dev/null +++ b/arch/mips/boot/tools/Makefile | |||
@@ -0,0 +1,9 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | hostprogs += relocs | ||
4 | relocs-objs += relocs_32.o | ||
5 | relocs-objs += relocs_64.o | ||
6 | relocs-objs += relocs_main.o | ||
7 | PHONY += relocs | ||
8 | relocs: $(obj)/relocs | ||
9 | @: | ||
diff --git a/arch/mips/boot/tools/relocs.c b/arch/mips/boot/tools/relocs.c new file mode 100644 index 000000000..1bf53f352 --- /dev/null +++ b/arch/mips/boot/tools/relocs.c | |||
@@ -0,0 +1,681 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | /* This is included from relocs_32/64.c */ | ||
3 | |||
4 | #define ElfW(type) _ElfW(ELF_BITS, type) | ||
5 | #define _ElfW(bits, type) __ElfW(bits, type) | ||
6 | #define __ElfW(bits, type) Elf##bits##_##type | ||
7 | |||
8 | #define Elf_Addr ElfW(Addr) | ||
9 | #define Elf_Ehdr ElfW(Ehdr) | ||
10 | #define Elf_Phdr ElfW(Phdr) | ||
11 | #define Elf_Shdr ElfW(Shdr) | ||
12 | #define Elf_Sym ElfW(Sym) | ||
13 | |||
14 | static Elf_Ehdr ehdr; | ||
15 | |||
16 | struct relocs { | ||
17 | uint32_t *offset; | ||
18 | unsigned long count; | ||
19 | unsigned long size; | ||
20 | }; | ||
21 | |||
22 | static struct relocs relocs; | ||
23 | |||
24 | struct section { | ||
25 | Elf_Shdr shdr; | ||
26 | struct section *link; | ||
27 | Elf_Sym *symtab; | ||
28 | Elf_Rel *reltab; | ||
29 | char *strtab; | ||
30 | long shdr_offset; | ||
31 | }; | ||
32 | static struct section *secs; | ||
33 | |||
34 | static const char * const regex_sym_kernel = { | ||
35 | /* Symbols matching these regex's should never be relocated */ | ||
36 | "^(__crc_)", | ||
37 | }; | ||
38 | |||
39 | static regex_t sym_regex_c; | ||
40 | |||
41 | static int regex_skip_reloc(const char *sym_name) | ||
42 | { | ||
43 | return !regexec(&sym_regex_c, sym_name, 0, NULL, 0); | ||
44 | } | ||
45 | |||
46 | static void regex_init(void) | ||
47 | { | ||
48 | char errbuf[128]; | ||
49 | int err; | ||
50 | |||
51 | err = regcomp(&sym_regex_c, regex_sym_kernel, | ||
52 | REG_EXTENDED|REG_NOSUB); | ||
53 | |||
54 | if (err) { | ||
55 | regerror(err, &sym_regex_c, errbuf, sizeof(errbuf)); | ||
56 | die("%s", errbuf); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | static const char *rel_type(unsigned type) | ||
61 | { | ||
62 | static const char * const type_name[] = { | ||
63 | #define REL_TYPE(X)[X] = #X | ||
64 | REL_TYPE(R_MIPS_NONE), | ||
65 | REL_TYPE(R_MIPS_16), | ||
66 | REL_TYPE(R_MIPS_32), | ||
67 | REL_TYPE(R_MIPS_REL32), | ||
68 | REL_TYPE(R_MIPS_26), | ||
69 | REL_TYPE(R_MIPS_HI16), | ||
70 | REL_TYPE(R_MIPS_LO16), | ||
71 | REL_TYPE(R_MIPS_GPREL16), | ||
72 | REL_TYPE(R_MIPS_LITERAL), | ||
73 | REL_TYPE(R_MIPS_GOT16), | ||
74 | REL_TYPE(R_MIPS_PC16), | ||
75 | REL_TYPE(R_MIPS_CALL16), | ||
76 | REL_TYPE(R_MIPS_GPREL32), | ||
77 | REL_TYPE(R_MIPS_64), | ||
78 | REL_TYPE(R_MIPS_HIGHER), | ||
79 | REL_TYPE(R_MIPS_HIGHEST), | ||
80 | REL_TYPE(R_MIPS_PC21_S2), | ||
81 | REL_TYPE(R_MIPS_PC26_S2), | ||
82 | #undef REL_TYPE | ||
83 | }; | ||
84 | const char *name = "unknown type rel type name"; | ||
85 | |||
86 | if (type < ARRAY_SIZE(type_name) && type_name[type]) | ||
87 | name = type_name[type]; | ||
88 | return name; | ||
89 | } | ||
90 | |||
91 | static const char *sec_name(unsigned shndx) | ||
92 | { | ||
93 | const char *sec_strtab; | ||
94 | const char *name; | ||
95 | |||
96 | sec_strtab = secs[ehdr.e_shstrndx].strtab; | ||
97 | if (shndx < ehdr.e_shnum) | ||
98 | name = sec_strtab + secs[shndx].shdr.sh_name; | ||
99 | else if (shndx == SHN_ABS) | ||
100 | name = "ABSOLUTE"; | ||
101 | else if (shndx == SHN_COMMON) | ||
102 | name = "COMMON"; | ||
103 | else | ||
104 | name = "<noname>"; | ||
105 | return name; | ||
106 | } | ||
107 | |||
108 | static struct section *sec_lookup(const char *secname) | ||
109 | { | ||
110 | int i; | ||
111 | |||
112 | for (i = 0; i < ehdr.e_shnum; i++) | ||
113 | if (strcmp(secname, sec_name(i)) == 0) | ||
114 | return &secs[i]; | ||
115 | |||
116 | return NULL; | ||
117 | } | ||
118 | |||
119 | static const char *sym_name(const char *sym_strtab, Elf_Sym *sym) | ||
120 | { | ||
121 | const char *name; | ||
122 | |||
123 | if (sym->st_name) | ||
124 | name = sym_strtab + sym->st_name; | ||
125 | else | ||
126 | name = sec_name(sym->st_shndx); | ||
127 | return name; | ||
128 | } | ||
129 | |||
130 | #if BYTE_ORDER == LITTLE_ENDIAN | ||
131 | #define le16_to_cpu(val) (val) | ||
132 | #define le32_to_cpu(val) (val) | ||
133 | #define le64_to_cpu(val) (val) | ||
134 | #define be16_to_cpu(val) bswap_16(val) | ||
135 | #define be32_to_cpu(val) bswap_32(val) | ||
136 | #define be64_to_cpu(val) bswap_64(val) | ||
137 | |||
138 | #define cpu_to_le16(val) (val) | ||
139 | #define cpu_to_le32(val) (val) | ||
140 | #define cpu_to_le64(val) (val) | ||
141 | #define cpu_to_be16(val) bswap_16(val) | ||
142 | #define cpu_to_be32(val) bswap_32(val) | ||
143 | #define cpu_to_be64(val) bswap_64(val) | ||
144 | #endif | ||
145 | #if BYTE_ORDER == BIG_ENDIAN | ||
146 | #define le16_to_cpu(val) bswap_16(val) | ||
147 | #define le32_to_cpu(val) bswap_32(val) | ||
148 | #define le64_to_cpu(val) bswap_64(val) | ||
149 | #define be16_to_cpu(val) (val) | ||
150 | #define be32_to_cpu(val) (val) | ||
151 | #define be64_to_cpu(val) (val) | ||
152 | |||
153 | #define cpu_to_le16(val) bswap_16(val) | ||
154 | #define cpu_to_le32(val) bswap_32(val) | ||
155 | #define cpu_to_le64(val) bswap_64(val) | ||
156 | #define cpu_to_be16(val) (val) | ||
157 | #define cpu_to_be32(val) (val) | ||
158 | #define cpu_to_be64(val) (val) | ||
159 | #endif | ||
160 | |||
161 | static uint16_t elf16_to_cpu(uint16_t val) | ||
162 | { | ||
163 | if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) | ||
164 | return le16_to_cpu(val); | ||
165 | else | ||
166 | return be16_to_cpu(val); | ||
167 | } | ||
168 | |||
169 | static uint32_t elf32_to_cpu(uint32_t val) | ||
170 | { | ||
171 | if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) | ||
172 | return le32_to_cpu(val); | ||
173 | else | ||
174 | return be32_to_cpu(val); | ||
175 | } | ||
176 | |||
177 | static uint32_t cpu_to_elf32(uint32_t val) | ||
178 | { | ||
179 | if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) | ||
180 | return cpu_to_le32(val); | ||
181 | else | ||
182 | return cpu_to_be32(val); | ||
183 | } | ||
184 | |||
185 | #define elf_half_to_cpu(x) elf16_to_cpu(x) | ||
186 | #define elf_word_to_cpu(x) elf32_to_cpu(x) | ||
187 | |||
188 | #if ELF_BITS == 64 | ||
189 | static uint64_t elf64_to_cpu(uint64_t val) | ||
190 | { | ||
191 | if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) | ||
192 | return le64_to_cpu(val); | ||
193 | else | ||
194 | return be64_to_cpu(val); | ||
195 | } | ||
196 | #define elf_addr_to_cpu(x) elf64_to_cpu(x) | ||
197 | #define elf_off_to_cpu(x) elf64_to_cpu(x) | ||
198 | #define elf_xword_to_cpu(x) elf64_to_cpu(x) | ||
199 | #else | ||
200 | #define elf_addr_to_cpu(x) elf32_to_cpu(x) | ||
201 | #define elf_off_to_cpu(x) elf32_to_cpu(x) | ||
202 | #define elf_xword_to_cpu(x) elf32_to_cpu(x) | ||
203 | #endif | ||
204 | |||
205 | static void read_ehdr(FILE *fp) | ||
206 | { | ||
207 | if (fread(&ehdr, sizeof(ehdr), 1, fp) != 1) | ||
208 | die("Cannot read ELF header: %s\n", strerror(errno)); | ||
209 | |||
210 | if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) | ||
211 | die("No ELF magic\n"); | ||
212 | |||
213 | if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) | ||
214 | die("Not a %d bit executable\n", ELF_BITS); | ||
215 | |||
216 | if ((ehdr.e_ident[EI_DATA] != ELFDATA2LSB) && | ||
217 | (ehdr.e_ident[EI_DATA] != ELFDATA2MSB)) | ||
218 | die("Unknown ELF Endianness\n"); | ||
219 | |||
220 | if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) | ||
221 | die("Unknown ELF version\n"); | ||
222 | |||
223 | /* Convert the fields to native endian */ | ||
224 | ehdr.e_type = elf_half_to_cpu(ehdr.e_type); | ||
225 | ehdr.e_machine = elf_half_to_cpu(ehdr.e_machine); | ||
226 | ehdr.e_version = elf_word_to_cpu(ehdr.e_version); | ||
227 | ehdr.e_entry = elf_addr_to_cpu(ehdr.e_entry); | ||
228 | ehdr.e_phoff = elf_off_to_cpu(ehdr.e_phoff); | ||
229 | ehdr.e_shoff = elf_off_to_cpu(ehdr.e_shoff); | ||
230 | ehdr.e_flags = elf_word_to_cpu(ehdr.e_flags); | ||
231 | ehdr.e_ehsize = elf_half_to_cpu(ehdr.e_ehsize); | ||
232 | ehdr.e_phentsize = elf_half_to_cpu(ehdr.e_phentsize); | ||
233 | ehdr.e_phnum = elf_half_to_cpu(ehdr.e_phnum); | ||
234 | ehdr.e_shentsize = elf_half_to_cpu(ehdr.e_shentsize); | ||
235 | ehdr.e_shnum = elf_half_to_cpu(ehdr.e_shnum); | ||
236 | ehdr.e_shstrndx = elf_half_to_cpu(ehdr.e_shstrndx); | ||
237 | |||
238 | if ((ehdr.e_type != ET_EXEC) && (ehdr.e_type != ET_DYN)) | ||
239 | die("Unsupported ELF header type\n"); | ||
240 | |||
241 | if (ehdr.e_machine != ELF_MACHINE) | ||
242 | die("Not for %s\n", ELF_MACHINE_NAME); | ||
243 | |||
244 | if (ehdr.e_version != EV_CURRENT) | ||
245 | die("Unknown ELF version\n"); | ||
246 | |||
247 | if (ehdr.e_ehsize != sizeof(Elf_Ehdr)) | ||
248 | die("Bad Elf header size\n"); | ||
249 | |||
250 | if (ehdr.e_phentsize != sizeof(Elf_Phdr)) | ||
251 | die("Bad program header entry\n"); | ||
252 | |||
253 | if (ehdr.e_shentsize != sizeof(Elf_Shdr)) | ||
254 | die("Bad section header entry\n"); | ||
255 | |||
256 | if (ehdr.e_shstrndx >= ehdr.e_shnum) | ||
257 | die("String table index out of bounds\n"); | ||
258 | } | ||
259 | |||
260 | static void read_shdrs(FILE *fp) | ||
261 | { | ||
262 | int i; | ||
263 | Elf_Shdr shdr; | ||
264 | |||
265 | secs = calloc(ehdr.e_shnum, sizeof(struct section)); | ||
266 | if (!secs) | ||
267 | die("Unable to allocate %d section headers\n", ehdr.e_shnum); | ||
268 | |||
269 | if (fseek(fp, ehdr.e_shoff, SEEK_SET) < 0) | ||
270 | die("Seek to %d failed: %s\n", ehdr.e_shoff, strerror(errno)); | ||
271 | |||
272 | for (i = 0; i < ehdr.e_shnum; i++) { | ||
273 | struct section *sec = &secs[i]; | ||
274 | |||
275 | sec->shdr_offset = ftell(fp); | ||
276 | if (fread(&shdr, sizeof(shdr), 1, fp) != 1) | ||
277 | die("Cannot read ELF section headers %d/%d: %s\n", | ||
278 | i, ehdr.e_shnum, strerror(errno)); | ||
279 | sec->shdr.sh_name = elf_word_to_cpu(shdr.sh_name); | ||
280 | sec->shdr.sh_type = elf_word_to_cpu(shdr.sh_type); | ||
281 | sec->shdr.sh_flags = elf_xword_to_cpu(shdr.sh_flags); | ||
282 | sec->shdr.sh_addr = elf_addr_to_cpu(shdr.sh_addr); | ||
283 | sec->shdr.sh_offset = elf_off_to_cpu(shdr.sh_offset); | ||
284 | sec->shdr.sh_size = elf_xword_to_cpu(shdr.sh_size); | ||
285 | sec->shdr.sh_link = elf_word_to_cpu(shdr.sh_link); | ||
286 | sec->shdr.sh_info = elf_word_to_cpu(shdr.sh_info); | ||
287 | sec->shdr.sh_addralign = elf_xword_to_cpu(shdr.sh_addralign); | ||
288 | sec->shdr.sh_entsize = elf_xword_to_cpu(shdr.sh_entsize); | ||
289 | if (sec->shdr.sh_link < ehdr.e_shnum) | ||
290 | sec->link = &secs[sec->shdr.sh_link]; | ||
291 | } | ||
292 | } | ||
293 | |||
294 | static void read_strtabs(FILE *fp) | ||
295 | { | ||
296 | int i; | ||
297 | |||
298 | for (i = 0; i < ehdr.e_shnum; i++) { | ||
299 | struct section *sec = &secs[i]; | ||
300 | |||
301 | if (sec->shdr.sh_type != SHT_STRTAB) | ||
302 | continue; | ||
303 | |||
304 | sec->strtab = malloc(sec->shdr.sh_size); | ||
305 | if (!sec->strtab) | ||
306 | die("malloc of %d bytes for strtab failed\n", | ||
307 | sec->shdr.sh_size); | ||
308 | |||
309 | if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0) | ||
310 | die("Seek to %d failed: %s\n", | ||
311 | sec->shdr.sh_offset, strerror(errno)); | ||
312 | |||
313 | if (fread(sec->strtab, 1, sec->shdr.sh_size, fp) != | ||
314 | sec->shdr.sh_size) | ||
315 | die("Cannot read symbol table: %s\n", strerror(errno)); | ||
316 | } | ||
317 | } | ||
318 | |||
319 | static void read_symtabs(FILE *fp) | ||
320 | { | ||
321 | int i, j; | ||
322 | |||
323 | for (i = 0; i < ehdr.e_shnum; i++) { | ||
324 | struct section *sec = &secs[i]; | ||
325 | if (sec->shdr.sh_type != SHT_SYMTAB) | ||
326 | continue; | ||
327 | |||
328 | sec->symtab = malloc(sec->shdr.sh_size); | ||
329 | if (!sec->symtab) | ||
330 | die("malloc of %d bytes for symtab failed\n", | ||
331 | sec->shdr.sh_size); | ||
332 | |||
333 | if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0) | ||
334 | die("Seek to %d failed: %s\n", | ||
335 | sec->shdr.sh_offset, strerror(errno)); | ||
336 | |||
337 | if (fread(sec->symtab, 1, sec->shdr.sh_size, fp) != | ||
338 | sec->shdr.sh_size) | ||
339 | die("Cannot read symbol table: %s\n", strerror(errno)); | ||
340 | |||
341 | for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Sym); j++) { | ||
342 | Elf_Sym *sym = &sec->symtab[j]; | ||
343 | |||
344 | sym->st_name = elf_word_to_cpu(sym->st_name); | ||
345 | sym->st_value = elf_addr_to_cpu(sym->st_value); | ||
346 | sym->st_size = elf_xword_to_cpu(sym->st_size); | ||
347 | sym->st_shndx = elf_half_to_cpu(sym->st_shndx); | ||
348 | } | ||
349 | } | ||
350 | } | ||
351 | |||
352 | static void read_relocs(FILE *fp) | ||
353 | { | ||
354 | static unsigned long base = 0; | ||
355 | int i, j; | ||
356 | |||
357 | if (!base) { | ||
358 | struct section *sec = sec_lookup(".text"); | ||
359 | |||
360 | if (!sec) | ||
361 | die("Could not find .text section\n"); | ||
362 | |||
363 | base = sec->shdr.sh_addr; | ||
364 | } | ||
365 | |||
366 | for (i = 0; i < ehdr.e_shnum; i++) { | ||
367 | struct section *sec = &secs[i]; | ||
368 | |||
369 | if (sec->shdr.sh_type != SHT_REL_TYPE) | ||
370 | continue; | ||
371 | |||
372 | sec->reltab = malloc(sec->shdr.sh_size); | ||
373 | if (!sec->reltab) | ||
374 | die("malloc of %d bytes for relocs failed\n", | ||
375 | sec->shdr.sh_size); | ||
376 | |||
377 | if (fseek(fp, sec->shdr.sh_offset, SEEK_SET) < 0) | ||
378 | die("Seek to %d failed: %s\n", | ||
379 | sec->shdr.sh_offset, strerror(errno)); | ||
380 | |||
381 | if (fread(sec->reltab, 1, sec->shdr.sh_size, fp) != | ||
382 | sec->shdr.sh_size) | ||
383 | die("Cannot read symbol table: %s\n", strerror(errno)); | ||
384 | |||
385 | for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) { | ||
386 | Elf_Rel *rel = &sec->reltab[j]; | ||
387 | |||
388 | rel->r_offset = elf_addr_to_cpu(rel->r_offset); | ||
389 | /* Set offset into kernel image */ | ||
390 | rel->r_offset -= base; | ||
391 | #if (ELF_BITS == 32) | ||
392 | rel->r_info = elf_xword_to_cpu(rel->r_info); | ||
393 | #else | ||
394 | /* Convert MIPS64 RELA format - only the symbol | ||
395 | * index needs converting to native endianness | ||
396 | */ | ||
397 | rel->r_info = rel->r_info; | ||
398 | ELF_R_SYM(rel->r_info) = elf32_to_cpu(ELF_R_SYM(rel->r_info)); | ||
399 | #endif | ||
400 | #if (SHT_REL_TYPE == SHT_RELA) | ||
401 | rel->r_addend = elf_xword_to_cpu(rel->r_addend); | ||
402 | #endif | ||
403 | } | ||
404 | } | ||
405 | } | ||
406 | |||
407 | static void remove_relocs(FILE *fp) | ||
408 | { | ||
409 | int i; | ||
410 | Elf_Shdr shdr; | ||
411 | |||
412 | for (i = 0; i < ehdr.e_shnum; i++) { | ||
413 | struct section *sec = &secs[i]; | ||
414 | |||
415 | if (sec->shdr.sh_type != SHT_REL_TYPE) | ||
416 | continue; | ||
417 | |||
418 | if (fseek(fp, sec->shdr_offset, SEEK_SET) < 0) | ||
419 | die("Seek to %d failed: %s\n", | ||
420 | sec->shdr_offset, strerror(errno)); | ||
421 | |||
422 | if (fread(&shdr, sizeof(shdr), 1, fp) != 1) | ||
423 | die("Cannot read ELF section headers %d/%d: %s\n", | ||
424 | i, ehdr.e_shnum, strerror(errno)); | ||
425 | |||
426 | /* Set relocation section size to 0, effectively removing it. | ||
427 | * This is necessary due to lack of support for relocations | ||
428 | * in objcopy when creating 32bit elf from 64bit elf. | ||
429 | */ | ||
430 | shdr.sh_size = 0; | ||
431 | |||
432 | if (fseek(fp, sec->shdr_offset, SEEK_SET) < 0) | ||
433 | die("Seek to %d failed: %s\n", | ||
434 | sec->shdr_offset, strerror(errno)); | ||
435 | |||
436 | if (fwrite(&shdr, sizeof(shdr), 1, fp) != 1) | ||
437 | die("Cannot write ELF section headers %d/%d: %s\n", | ||
438 | i, ehdr.e_shnum, strerror(errno)); | ||
439 | } | ||
440 | } | ||
441 | |||
442 | static void add_reloc(struct relocs *r, uint32_t offset, unsigned type) | ||
443 | { | ||
444 | /* Relocation representation in binary table: | ||
445 | * |76543210|76543210|76543210|76543210| | ||
446 | * | Type | offset from _text >> 2 | | ||
447 | */ | ||
448 | offset >>= 2; | ||
449 | if (offset > 0x00FFFFFF) | ||
450 | die("Kernel image exceeds maximum size for relocation!\n"); | ||
451 | |||
452 | offset = (offset & 0x00FFFFFF) | ((type & 0xFF) << 24); | ||
453 | |||
454 | if (r->count == r->size) { | ||
455 | unsigned long newsize = r->size + 50000; | ||
456 | void *mem = realloc(r->offset, newsize * sizeof(r->offset[0])); | ||
457 | |||
458 | if (!mem) | ||
459 | die("realloc failed\n"); | ||
460 | |||
461 | r->offset = mem; | ||
462 | r->size = newsize; | ||
463 | } | ||
464 | r->offset[r->count++] = offset; | ||
465 | } | ||
466 | |||
467 | static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel, | ||
468 | Elf_Sym *sym, const char *symname)) | ||
469 | { | ||
470 | int i; | ||
471 | |||
472 | /* Walk through the relocations */ | ||
473 | for (i = 0; i < ehdr.e_shnum; i++) { | ||
474 | char *sym_strtab; | ||
475 | Elf_Sym *sh_symtab; | ||
476 | struct section *sec_applies, *sec_symtab; | ||
477 | int j; | ||
478 | struct section *sec = &secs[i]; | ||
479 | |||
480 | if (sec->shdr.sh_type != SHT_REL_TYPE) | ||
481 | continue; | ||
482 | |||
483 | sec_symtab = sec->link; | ||
484 | sec_applies = &secs[sec->shdr.sh_info]; | ||
485 | if (!(sec_applies->shdr.sh_flags & SHF_ALLOC)) | ||
486 | continue; | ||
487 | |||
488 | sh_symtab = sec_symtab->symtab; | ||
489 | sym_strtab = sec_symtab->link->strtab; | ||
490 | for (j = 0; j < sec->shdr.sh_size/sizeof(Elf_Rel); j++) { | ||
491 | Elf_Rel *rel = &sec->reltab[j]; | ||
492 | Elf_Sym *sym = &sh_symtab[ELF_R_SYM(rel->r_info)]; | ||
493 | const char *symname = sym_name(sym_strtab, sym); | ||
494 | |||
495 | process(sec, rel, sym, symname); | ||
496 | } | ||
497 | } | ||
498 | } | ||
499 | |||
500 | static int do_reloc(struct section *sec, Elf_Rel *rel, Elf_Sym *sym, | ||
501 | const char *symname) | ||
502 | { | ||
503 | unsigned r_type = ELF_R_TYPE(rel->r_info); | ||
504 | unsigned bind = ELF_ST_BIND(sym->st_info); | ||
505 | |||
506 | if ((bind == STB_WEAK) && (sym->st_value == 0)) { | ||
507 | /* Don't relocate weak symbols without a target */ | ||
508 | return 0; | ||
509 | } | ||
510 | |||
511 | if (regex_skip_reloc(symname)) | ||
512 | return 0; | ||
513 | |||
514 | switch (r_type) { | ||
515 | case R_MIPS_NONE: | ||
516 | case R_MIPS_REL32: | ||
517 | case R_MIPS_PC16: | ||
518 | case R_MIPS_PC21_S2: | ||
519 | case R_MIPS_PC26_S2: | ||
520 | /* | ||
521 | * NONE can be ignored and PC relative relocations don't | ||
522 | * need to be adjusted. | ||
523 | */ | ||
524 | case R_MIPS_HIGHEST: | ||
525 | case R_MIPS_HIGHER: | ||
526 | /* We support relocating within the same 4Gb segment only, | ||
527 | * thus leaving the top 32bits unchanged | ||
528 | */ | ||
529 | case R_MIPS_LO16: | ||
530 | /* We support relocating by 64k jumps only | ||
531 | * thus leaving the bottom 16bits unchanged | ||
532 | */ | ||
533 | break; | ||
534 | |||
535 | case R_MIPS_64: | ||
536 | case R_MIPS_32: | ||
537 | case R_MIPS_26: | ||
538 | case R_MIPS_HI16: | ||
539 | add_reloc(&relocs, rel->r_offset, r_type); | ||
540 | break; | ||
541 | |||
542 | default: | ||
543 | die("Unsupported relocation type: %s (%d)\n", | ||
544 | rel_type(r_type), r_type); | ||
545 | break; | ||
546 | } | ||
547 | |||
548 | return 0; | ||
549 | } | ||
550 | |||
551 | static int write_reloc_as_bin(uint32_t v, FILE *f) | ||
552 | { | ||
553 | unsigned char buf[4]; | ||
554 | |||
555 | v = cpu_to_elf32(v); | ||
556 | |||
557 | memcpy(buf, &v, sizeof(uint32_t)); | ||
558 | return fwrite(buf, 1, 4, f); | ||
559 | } | ||
560 | |||
561 | static int write_reloc_as_text(uint32_t v, FILE *f) | ||
562 | { | ||
563 | int res; | ||
564 | |||
565 | res = fprintf(f, "\t.long 0x%08"PRIx32"\n", v); | ||
566 | if (res < 0) | ||
567 | return res; | ||
568 | else | ||
569 | return sizeof(uint32_t); | ||
570 | } | ||
571 | |||
572 | static void emit_relocs(int as_text, int as_bin, FILE *outf) | ||
573 | { | ||
574 | int i; | ||
575 | int (*write_reloc)(uint32_t, FILE *) = write_reloc_as_bin; | ||
576 | int size = 0; | ||
577 | int size_reserved; | ||
578 | struct section *sec_reloc; | ||
579 | |||
580 | sec_reloc = sec_lookup(".data.reloc"); | ||
581 | if (!sec_reloc) | ||
582 | die("Could not find relocation section\n"); | ||
583 | |||
584 | size_reserved = sec_reloc->shdr.sh_size; | ||
585 | |||
586 | /* Collect up the relocations */ | ||
587 | walk_relocs(do_reloc); | ||
588 | |||
589 | /* Print the relocations */ | ||
590 | if (as_text) { | ||
591 | /* Print the relocations in a form suitable that | ||
592 | * gas will like. | ||
593 | */ | ||
594 | printf(".section \".data.reloc\",\"a\"\n"); | ||
595 | printf(".balign 4\n"); | ||
596 | /* Output text to stdout */ | ||
597 | write_reloc = write_reloc_as_text; | ||
598 | outf = stdout; | ||
599 | } else if (as_bin) { | ||
600 | /* Output raw binary to stdout */ | ||
601 | outf = stdout; | ||
602 | } else { | ||
603 | /* Seek to offset of the relocation section. | ||
604 | * Each relocation is then written into the | ||
605 | * vmlinux kernel image. | ||
606 | */ | ||
607 | if (fseek(outf, sec_reloc->shdr.sh_offset, SEEK_SET) < 0) { | ||
608 | die("Seek to %d failed: %s\n", | ||
609 | sec_reloc->shdr.sh_offset, strerror(errno)); | ||
610 | } | ||
611 | } | ||
612 | |||
613 | for (i = 0; i < relocs.count; i++) | ||
614 | size += write_reloc(relocs.offset[i], outf); | ||
615 | |||
616 | /* Print a stop, but only if we've actually written some relocs */ | ||
617 | if (size) | ||
618 | size += write_reloc(0, outf); | ||
619 | |||
620 | if (size > size_reserved) | ||
621 | /* Die, but suggest a value for CONFIG_RELOCATION_TABLE_SIZE | ||
622 | * which will fix this problem and allow a bit of headroom | ||
623 | * if more kernel features are enabled | ||
624 | */ | ||
625 | die("Relocations overflow available space!\n" \ | ||
626 | "Please adjust CONFIG_RELOCATION_TABLE_SIZE " \ | ||
627 | "to at least 0x%08x\n", (size + 0x1000) & ~0xFFF); | ||
628 | } | ||
629 | |||
630 | /* | ||
631 | * As an aid to debugging problems with different linkers | ||
632 | * print summary information about the relocs. | ||
633 | * Since different linkers tend to emit the sections in | ||
634 | * different orders we use the section names in the output. | ||
635 | */ | ||
636 | static int do_reloc_info(struct section *sec, Elf_Rel *rel, ElfW(Sym) *sym, | ||
637 | const char *symname) | ||
638 | { | ||
639 | printf("%16s 0x%08x %16s %40s %16s\n", | ||
640 | sec_name(sec->shdr.sh_info), | ||
641 | (unsigned int)rel->r_offset, | ||
642 | rel_type(ELF_R_TYPE(rel->r_info)), | ||
643 | symname, | ||
644 | sec_name(sym->st_shndx)); | ||
645 | return 0; | ||
646 | } | ||
647 | |||
648 | static void print_reloc_info(void) | ||
649 | { | ||
650 | printf("%16s %10s %16s %40s %16s\n", | ||
651 | "reloc section", | ||
652 | "offset", | ||
653 | "reloc type", | ||
654 | "symbol", | ||
655 | "symbol section"); | ||
656 | walk_relocs(do_reloc_info); | ||
657 | } | ||
658 | |||
659 | #if ELF_BITS == 64 | ||
660 | # define process process_64 | ||
661 | #else | ||
662 | # define process process_32 | ||
663 | #endif | ||
664 | |||
665 | void process(FILE *fp, int as_text, int as_bin, | ||
666 | int show_reloc_info, int keep_relocs) | ||
667 | { | ||
668 | regex_init(); | ||
669 | read_ehdr(fp); | ||
670 | read_shdrs(fp); | ||
671 | read_strtabs(fp); | ||
672 | read_symtabs(fp); | ||
673 | read_relocs(fp); | ||
674 | if (show_reloc_info) { | ||
675 | print_reloc_info(); | ||
676 | return; | ||
677 | } | ||
678 | emit_relocs(as_text, as_bin, fp); | ||
679 | if (!keep_relocs) | ||
680 | remove_relocs(fp); | ||
681 | } | ||
diff --git a/arch/mips/boot/tools/relocs.h b/arch/mips/boot/tools/relocs.h new file mode 100644 index 000000000..607ff0103 --- /dev/null +++ b/arch/mips/boot/tools/relocs.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | #ifndef RELOCS_H | ||
3 | #define RELOCS_H | ||
4 | |||
5 | #include <stdio.h> | ||
6 | #include <stdarg.h> | ||
7 | #include <stdlib.h> | ||
8 | #include <stdint.h> | ||
9 | #include <inttypes.h> | ||
10 | #include <string.h> | ||
11 | #include <errno.h> | ||
12 | #include <unistd.h> | ||
13 | #include <elf.h> | ||
14 | #include <byteswap.h> | ||
15 | #define USE_BSD | ||
16 | #include <endian.h> | ||
17 | #include <regex.h> | ||
18 | |||
19 | void die(char *fmt, ...); | ||
20 | |||
21 | /* | ||
22 | * Introduced for MIPSr6 | ||
23 | */ | ||
24 | #ifndef R_MIPS_PC21_S2 | ||
25 | #define R_MIPS_PC21_S2 60 | ||
26 | #endif | ||
27 | |||
28 | #ifndef R_MIPS_PC26_S2 | ||
29 | #define R_MIPS_PC26_S2 61 | ||
30 | #endif | ||
31 | |||
32 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
33 | |||
34 | enum symtype { | ||
35 | S_ABS, | ||
36 | S_REL, | ||
37 | S_SEG, | ||
38 | S_LIN, | ||
39 | S_NSYMTYPES | ||
40 | }; | ||
41 | |||
42 | void process_32(FILE *fp, int as_text, int as_bin, | ||
43 | int show_reloc_info, int keep_relocs); | ||
44 | void process_64(FILE *fp, int as_text, int as_bin, | ||
45 | int show_reloc_info, int keep_relocs); | ||
46 | #endif /* RELOCS_H */ | ||
diff --git a/arch/mips/boot/tools/relocs_32.c b/arch/mips/boot/tools/relocs_32.c new file mode 100644 index 000000000..428bea489 --- /dev/null +++ b/arch/mips/boot/tools/relocs_32.c | |||
@@ -0,0 +1,18 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include "relocs.h" | ||
3 | |||
4 | #define ELF_BITS 32 | ||
5 | |||
6 | #define ELF_MACHINE EM_MIPS | ||
7 | #define ELF_MACHINE_NAME "MIPS" | ||
8 | #define SHT_REL_TYPE SHT_REL | ||
9 | #define Elf_Rel ElfW(Rel) | ||
10 | |||
11 | #define ELF_CLASS ELFCLASS32 | ||
12 | #define ELF_R_SYM(val) ELF32_R_SYM(val) | ||
13 | #define ELF_R_TYPE(val) ELF32_R_TYPE(val) | ||
14 | #define ELF_ST_TYPE(o) ELF32_ST_TYPE(o) | ||
15 | #define ELF_ST_BIND(o) ELF32_ST_BIND(o) | ||
16 | #define ELF_ST_VISIBILITY(o) ELF32_ST_VISIBILITY(o) | ||
17 | |||
18 | #include "relocs.c" | ||
diff --git a/arch/mips/boot/tools/relocs_64.c b/arch/mips/boot/tools/relocs_64.c new file mode 100644 index 000000000..154015d74 --- /dev/null +++ b/arch/mips/boot/tools/relocs_64.c | |||
@@ -0,0 +1,31 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include "relocs.h" | ||
3 | |||
4 | #define ELF_BITS 64 | ||
5 | |||
6 | #define ELF_MACHINE EM_MIPS | ||
7 | #define ELF_MACHINE_NAME "MIPS64" | ||
8 | #define SHT_REL_TYPE SHT_RELA | ||
9 | #define Elf_Rel Elf64_Rela | ||
10 | |||
11 | typedef uint8_t Elf64_Byte; | ||
12 | |||
13 | typedef union { | ||
14 | struct { | ||
15 | Elf64_Word r_sym; /* Symbol index. */ | ||
16 | Elf64_Byte r_ssym; /* Special symbol. */ | ||
17 | Elf64_Byte r_type3; /* Third relocation. */ | ||
18 | Elf64_Byte r_type2; /* Second relocation. */ | ||
19 | Elf64_Byte r_type; /* First relocation. */ | ||
20 | } fields; | ||
21 | Elf64_Xword unused; | ||
22 | } Elf64_Mips_Rela; | ||
23 | |||
24 | #define ELF_CLASS ELFCLASS64 | ||
25 | #define ELF_R_SYM(val) (((Elf64_Mips_Rela *)(&val))->fields.r_sym) | ||
26 | #define ELF_R_TYPE(val) (((Elf64_Mips_Rela *)(&val))->fields.r_type) | ||
27 | #define ELF_ST_TYPE(o) ELF64_ST_TYPE(o) | ||
28 | #define ELF_ST_BIND(o) ELF64_ST_BIND(o) | ||
29 | #define ELF_ST_VISIBILITY(o) ELF64_ST_VISIBILITY(o) | ||
30 | |||
31 | #include "relocs.c" | ||
diff --git a/arch/mips/boot/tools/relocs_main.c b/arch/mips/boot/tools/relocs_main.c new file mode 100644 index 000000000..e2453a564 --- /dev/null +++ b/arch/mips/boot/tools/relocs_main.c | |||
@@ -0,0 +1,85 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | #include <stdio.h> | ||
4 | #include <stdint.h> | ||
5 | #include <stdarg.h> | ||
6 | #include <stdlib.h> | ||
7 | #include <string.h> | ||
8 | #include <errno.h> | ||
9 | #include <endian.h> | ||
10 | #include <elf.h> | ||
11 | |||
12 | #include "relocs.h" | ||
13 | |||
14 | void die(char *fmt, ...) | ||
15 | { | ||
16 | va_list ap; | ||
17 | |||
18 | va_start(ap, fmt); | ||
19 | vfprintf(stderr, fmt, ap); | ||
20 | va_end(ap); | ||
21 | exit(1); | ||
22 | } | ||
23 | |||
24 | static void usage(void) | ||
25 | { | ||
26 | die("relocs [--reloc-info|--text|--bin|--keep] vmlinux\n"); | ||
27 | } | ||
28 | |||
29 | int main(int argc, char **argv) | ||
30 | { | ||
31 | int show_reloc_info, as_text, as_bin, keep_relocs; | ||
32 | const char *fname; | ||
33 | FILE *fp; | ||
34 | int i; | ||
35 | unsigned char e_ident[EI_NIDENT]; | ||
36 | |||
37 | show_reloc_info = 0; | ||
38 | as_text = 0; | ||
39 | as_bin = 0; | ||
40 | keep_relocs = 0; | ||
41 | fname = NULL; | ||
42 | for (i = 1; i < argc; i++) { | ||
43 | char *arg = argv[i]; | ||
44 | |||
45 | if (*arg == '-') { | ||
46 | if (strcmp(arg, "--reloc-info") == 0) { | ||
47 | show_reloc_info = 1; | ||
48 | continue; | ||
49 | } | ||
50 | if (strcmp(arg, "--text") == 0) { | ||
51 | as_text = 1; | ||
52 | continue; | ||
53 | } | ||
54 | if (strcmp(arg, "--bin") == 0) { | ||
55 | as_bin = 1; | ||
56 | continue; | ||
57 | } | ||
58 | if (strcmp(arg, "--keep") == 0) { | ||
59 | keep_relocs = 1; | ||
60 | continue; | ||
61 | } | ||
62 | } else if (!fname) { | ||
63 | fname = arg; | ||
64 | continue; | ||
65 | } | ||
66 | usage(); | ||
67 | } | ||
68 | if (!fname) | ||
69 | usage(); | ||
70 | |||
71 | fp = fopen(fname, "r+"); | ||
72 | if (!fp) | ||
73 | die("Cannot open %s: %s\n", fname, strerror(errno)); | ||
74 | |||
75 | if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT) | ||
76 | die("Cannot read %s: %s", fname, strerror(errno)); | ||
77 | |||
78 | rewind(fp); | ||
79 | if (e_ident[EI_CLASS] == ELFCLASS64) | ||
80 | process_64(fp, as_text, as_bin, show_reloc_info, keep_relocs); | ||
81 | else | ||
82 | process_32(fp, as_text, as_bin, show_reloc_info, keep_relocs); | ||
83 | fclose(fp); | ||
84 | return 0; | ||
85 | } | ||