Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mips_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:

- enable GCOV

- rework setup of protection map

- add support for more MSCC platforms

- add sysfs boardinfo for Loongson64

- enable KASLR for Loogson64

- add reset controller for BCM63xx

- cleanups and fixes

* tag 'mips_5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (70 commits)
mips: fix Section mismatch in reference
MAINTAINERS: Add linux-mips mailing list to JZ47xx entries
MAINTAINERS: Remove JZ4780 DMA driver entry
MAINTAINERS: chenhc@lemote.com -> chenhuacai@kernel.org
MIPS: Octeon: irq: Alloc desc before configuring IRQ
MIPS: mm: Add back define for PAGE_SHARED
MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL to enable sysfs memblock debug
mips: lib: uncached: fix non-standard usage of variable 'sp'
MIPS: DTS: img: Fix schema warnings for pwm-leds
MIPS: KASLR: Avoid endless loop in sync_icache if synci_step is zero
MIPS: Move memblock_dump_all() to the end of setup_arch()
MIPS: SMP-CPS: Add support for irq migration when CPU offline
MIPS: OCTEON: Don't add kernel sections into memblock allocator
MIPS: Don't round up kernel sections size for memblock_add()
MIPS: Enable GCOV
MIPS: configs: drop unused BACKLIGHT_GENERIC option
MIPS: Loongson64: Fix up reserving kernel memory range
MIPS: mm: Remove unused is_aligned_hugepage_range
MIPS: No need to check CPU 0 in {loongson3,bmips,octeon}_cpu_disable()
mips: cdmm: fix use-after-free in mips_cdmm_bus_discover
...

+2329 -279
+2
.mailmap
··· 122 122 Henrik Kretzschmar <henne@nachtwindheim.de> 123 123 Henrik Rydberg <rydberg@bitmath.org> 124 124 Herbert Xu <herbert@gondor.apana.org.au> 125 + Huacai Chen <chenhuacai@kernel.org> <chenhc@lemote.com> 126 + Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn> 125 127 Jacob Shin <Jacob.Shin@amd.com> 126 128 Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk@google.com> 127 129 Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk.kim@samsung.com>
+35
Documentation/ABI/testing/sysfs-firmware-lefi-boardinfo
··· 1 + What: /sys/firmware/lefi/boardinfo 2 + Date: October 2020 3 + Contact: Tiezhu Yang <yangtiezhu@loongson.cn> 4 + Description: 5 + Get mainboard and BIOS info easily on the Loongson platform, 6 + this is useful to point out the current used mainboard type 7 + and BIOS version when there exists problems related with 8 + hardware or firmware. 9 + 10 + The related structures are already defined in the interface 11 + specification about firmware and kernel which are common 12 + requirement and specific for Loongson64, so only add a new 13 + boardinfo.c file in arch/mips/loongson64. 14 + 15 + For example: 16 + 17 + [loongson@linux ~]$ cat /sys/firmware/lefi/boardinfo 18 + Board Info 19 + Manufacturer : LEMOTE 20 + Board Name : LEMOTE-LS3A4000-7A1000-1w-V01-pc 21 + Family : LOONGSON3 22 + 23 + BIOS Info 24 + Vendor : Kunlun 25 + Version : Kunlun-A1901-V4.1.3-20200414093938 26 + ROM Size : 4 KB 27 + Release Date : 2020-04-14 28 + 29 + By the way, using dmidecode command can get the similar info if there 30 + exists SMBIOS in firmware, but the fact is that there is no SMBIOS on 31 + some machines, we can see nothing when execute dmidecode, like this: 32 + 33 + [root@linux loongson]# dmidecode 34 + # dmidecode 2.12 35 + # No SMBIOS nor DMI entry point found, sorry.
+1 -1
Documentation/devicetree/bindings/mips/mscc.txt
··· 4 4 properties: 5 5 6 6 Required properties: 7 - - compatible: "mscc,ocelot" 7 + - compatible: "mscc,ocelot", "mscc,luton", "mscc,serval" or "mscc,jr2" 8 8 9 9 10 10 * Other peripherals:
+37
Documentation/devicetree/bindings/reset/brcm,bcm6345-reset.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: "http://devicetree.org/schemas/reset/brcm,bcm6345-reset.yaml#" 5 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 + 7 + title: BCM6345 reset controller 8 + 9 + description: This document describes the BCM6345 reset controller. 10 + 11 + maintainers: 12 + - Álvaro Fernández Rojas <noltari@gmail.com> 13 + 14 + properties: 15 + compatible: 16 + const: brcm,bcm6345-reset 17 + 18 + reg: 19 + maxItems: 1 20 + 21 + "#reset-cells": 22 + const: 1 23 + 24 + required: 25 + - compatible 26 + - reg 27 + - "#reset-cells" 28 + 29 + additionalProperties: false 30 + 31 + examples: 32 + - | 33 + reset-controller@10000010 { 34 + compatible = "brcm,bcm6345-reset"; 35 + reg = <0x10000010 0x4>; 36 + #reset-cells = <1>; 37 + };
+4 -7
MAINTAINERS
··· 8736 8736 F: samples/bpf/ibumad_kern.c 8737 8737 F: samples/bpf/ibumad_user.c 8738 8738 8739 - INGENIC JZ4780 DMA Driver 8740 - M: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> 8741 - S: Maintained 8742 - F: drivers/dma/dma-jz4780.c 8743 - 8744 8739 INGENIC JZ4780 NAND DRIVER 8745 8740 M: Harvey Hunt <harveyhuntnexus@gmail.com> 8746 8741 L: linux-mtd@lists.infradead.org 8742 + L: linux-mips@vger.kernel.org 8747 8743 S: Maintained 8748 8744 F: drivers/mtd/nand/raw/ingenic/ 8749 8745 8750 8746 INGENIC JZ47xx SoCs 8751 8747 M: Paul Cercueil <paul@crapouillou.net> 8748 + L: linux-mips@vger.kernel.org 8752 8749 S: Maintained 8753 8750 F: arch/mips/boot/dts/ingenic/ 8754 8751 F: arch/mips/generic/board-ingenic.c ··· 9707 9710 F: include/kvm/arm_* 9708 9711 9709 9712 KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips) 9710 - M: Huacai Chen <chenhc@lemote.com> 9713 + M: Huacai Chen <chenhuacai@kernel.org> 9711 9714 M: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com> 9712 9715 L: linux-mips@vger.kernel.org 9713 9716 L: kvm@vger.kernel.org ··· 11849 11852 F: drivers/*/*loongson2* 11850 11853 11851 11854 MIPS/LOONGSON64 ARCHITECTURE 11852 - M: Huacai Chen <chenhc@lemote.com> 11855 + M: Huacai Chen <chenhuacai@kernel.org> 11853 11856 M: Jiaxun Yang <jiaxun.yang@flygoat.com> 11854 11857 L: linux-mips@vger.kernel.org 11855 11858 S: Maintained
+11 -4
arch/mips/Kconfig
··· 9 9 select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI) 10 10 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 11 11 select ARCH_HAS_UBSAN_SANITIZE_ALL 12 + select ARCH_HAS_GCOV_PROFILE_ALL 13 + select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL 12 14 select ARCH_SUPPORTS_UPROBES 13 15 select ARCH_USE_BUILTIN_BSWAP 14 16 select ARCH_USE_CMPXCHG_LOCKREF if 64BIT ··· 250 248 251 249 config BMIPS_GENERIC 252 250 bool "Broadcom Generic BMIPS kernel" 251 + select ARCH_HAS_RESET_CONTROLLER 253 252 select ARCH_HAS_SYNC_DMA_FOR_CPU_ALL 254 253 select ARCH_HAS_PHYS_TO_DMA 255 254 select BOOT_RAW ··· 489 486 select SYS_SUPPORTS_HIGHMEM 490 487 select SYS_SUPPORTS_LITTLE_ENDIAN 491 488 select SYS_SUPPORTS_ZBOOT 489 + select SYS_SUPPORTS_RELOCATABLE 492 490 select ZONE_DMA32 493 491 select NUMA 494 492 select SMP ··· 2488 2484 select SYS_SUPPORTS_SCHED_SMT if CPU_MIPSR6 2489 2485 select SYS_SUPPORTS_SMP 2490 2486 select WEAK_ORDERING 2487 + select GENERIC_IRQ_MIGRATION if HOTPLUG_CPU 2491 2488 help 2492 2489 Select this if you wish to run an SMP kernel across multiple cores 2493 2490 within a MIPS Coherent Processing System. When this option is ··· 2649 2644 # 18. The CACHE instructions Hit_Writeback_Invalidate_D, Hit_Writeback_D, 2650 2645 # Hit_Invalidate_D and Create_Dirty_Excl_D should only be 2651 2646 # executed if there is no other dcache activity. If the dcache is 2652 - # accessed for another instruction immeidately preceding when these 2647 + # accessed for another instruction immediately preceding when these 2653 2648 # cache instructions are executing, it is possible that the dcache 2654 2649 # tag match outputs used by these cache instructions will be 2655 2650 # incorrect. These cache instructions should be preceded by at least ··· 2782 2777 depends on CPU_MIPS32_R2 || CPU_MIPS64_R2 || \ 2783 2778 CPU_MIPS32_R5 || CPU_MIPS64_R5 || \ 2784 2779 CPU_MIPS32_R6 || CPU_MIPS64_R6 || \ 2785 - CPU_P5600 || CAVIUM_OCTEON_SOC 2780 + CPU_P5600 || CAVIUM_OCTEON_SOC || \ 2781 + CPU_LOONGSON64 2786 2782 help 2787 2783 This builds a kernel image that retains relocation information 2788 2784 so it can be loaded someplace besides the default 1MB. ··· 2794 2788 hex "Relocation table size" 2795 2789 depends on RELOCATABLE 2796 2790 range 0x0 0x01000000 2791 + default "0x00200000" if CPU_LOONGSON64 2797 2792 default "0x00100000" 2798 2793 help 2799 2794 A table of relocation data will be appended to the kernel binary ··· 3093 3086 3094 3087 Although binutils currently supports use of this flag the details 3095 3088 concerning its effect upon the O32 ABI in userland are still being 3096 - worked on. In order to avoid userland becoming dependant upon current 3089 + worked on. In order to avoid userland becoming dependent upon current 3097 3090 behaviour before the details have been finalised, this option should 3098 3091 be considered experimental and only enabled by those working upon 3099 3092 said details. ··· 3131 3124 3132 3125 objcopy --update-section .appended_dtb=<filename>.dtb vmlinux 3133 3126 3134 - This is meant as a backward compatiblity convenience for those 3127 + This is meant as a backward compatibility convenience for those 3135 3128 systems with a bootloader that can't be upgraded to accommodate 3136 3129 the documented boot protocol using a device tree. 3137 3130
+2 -1
arch/mips/Makefile
··· 347 347 ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0) 348 348 bootz-y += uzImage.bin 349 349 endif 350 + bootz-y += vmlinuz.itb 350 351 351 352 # 352 353 # Some machines like the Indy need 32-bit ELF binaries for booting purposes. ··· 379 378 # boot/compressed 380 379 $(bootz-y): $(vmlinux-32) FORCE 381 380 $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \ 382 - $(bootvars-y) 32bit-bfd=$(32bit-bfd) $@ 381 + $(bootvars-y) 32bit-bfd=$(32bit-bfd) arch/mips/boot/$@ 383 382 else 384 383 vmlinuz: FORCE 385 384 @echo ' CONFIG_SYS_SUPPORTS_ZBOOT is not enabled'
+1
arch/mips/ar7/gpio.c
··· 319 319 if (ret) { 320 320 printk(KERN_ERR "%s: failed to add gpiochip\n", 321 321 gpch->chip.label); 322 + iounmap(gpch->regs); 322 323 return ret; 323 324 } 324 325 printk(KERN_INFO "%s: registered %d GPIOs\n",
+2
arch/mips/bcm47xx/Kconfig
··· 9 9 select SSB_DRIVER_MIPS 10 10 select SSB_DRIVER_EXTIF 11 11 select SSB_EMBEDDED 12 + select SSB_PCIHOST if PCI 12 13 select SSB_B43_PCI_BRIDGE if PCI 13 14 select SSB_DRIVER_PCICORE if PCI 14 15 select SSB_PCICORE_HOSTMODE if PCI ··· 28 27 select BCMA 29 28 select BCMA_HOST_SOC 30 29 select BCMA_DRIVER_MIPS 30 + select BCMA_DRIVER_PCI if PCI 31 31 select BCMA_DRIVER_PCI_HOSTMODE if PCI 32 32 select BCMA_DRIVER_GPIO 33 33 default y
+1
arch/mips/boot/.gitignore
··· 2 2 mkboot 3 3 elf2ecoff 4 4 vmlinux.* 5 + vmlinuz.* 5 6 zImage 6 7 zImage.tmp 7 8 calc_vmlinuz_load_addr
+83 -14
arch/mips/boot/compressed/Makefile
··· 36 36 37 37 # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. 38 38 KCOV_INSTRUMENT := n 39 + GCOV_PROFILE := n 39 40 40 41 # decompressor objects (linked with vmlinuz) 41 42 vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o ··· 66 65 targets := $(notdir $(vmlinuzobjs-y)) 67 66 68 67 targets += vmlinux.bin 68 + 69 69 OBJCOPYFLAGS_vmlinux.bin := $(OBJCOPYFLAGS) -O binary -R .comment -S 70 + 70 71 $(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE 71 72 $(call if_changed,objcopy) 72 73 ··· 81 78 tool_$(CONFIG_KERNEL_ZSTD) = zstd22 82 79 83 80 targets += vmlinux.bin.z 81 + 84 82 $(obj)/vmlinux.bin.z: $(obj)/vmlinux.bin FORCE 85 83 $(call if_changed,$(tool_y)) 86 84 87 85 targets += piggy.o dummy.o 86 + 88 87 OBJCOPYFLAGS_piggy.o := --add-section=.image=$(obj)/vmlinux.bin.z \ 89 88 --set-section-flags=.image=contents,alloc,load,readonly,data 89 + 90 90 $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE 91 91 $(call if_changed,objcopy) 92 92 ··· 108 102 109 103 vmlinuzobjs-y += $(obj)/piggy.o 110 104 105 + targets += ../../../../vmlinuz 106 + 111 107 quiet_cmd_zld = LD $@ 112 108 cmd_zld = $(LD) $(KBUILD_LDFLAGS) -Ttext $(VMLINUZ_LOAD_ADDRESS) -T $< $(vmlinuzobjs-y) -o $@ 113 - quiet_cmd_strip = STRIP $@ 109 + quiet_cmd_strip = STRIP $@ 114 110 cmd_strip = $(STRIP) -s $@ 115 - vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr 111 + 112 + $(objtree)/vmlinuz: $(src)/ld.script $(vmlinuzobjs-y) $(obj)/calc_vmlinuz_load_addr 116 113 $(call cmd,zld) 117 114 $(call cmd,strip) 115 + 116 + objboot := $(objtree)/arch/mips/boot 117 + 118 + $(objboot)/vmlinuz: $(objtree)/vmlinuz FORCE 118 119 119 120 # 120 121 # Some DECstations need all possible sections of an ECOFF executable ··· 134 121 hostprogs += ../elf2ecoff 135 122 136 123 ifdef CONFIG_32BIT 137 - VMLINUZ = vmlinuz 124 + VMLINUZ = $(objtree)/vmlinuz 138 125 else 139 - VMLINUZ = vmlinuz.32 126 + VMLINUZ = $(objboot)/vmlinuz.32 140 127 endif 128 + 129 + targets += ../vmlinuz.32 141 130 142 131 quiet_cmd_32 = OBJCOPY $@ 143 132 cmd_32 = $(OBJCOPY) -O $(32bit-bfd) $(OBJCOPYFLAGS) $< $@ 144 - vmlinuz.32: vmlinuz 133 + 134 + $(objboot)/vmlinuz.32: $(objtree)/vmlinuz 145 135 $(call cmd,32) 136 + 137 + targets += ../vmlinuz.ecoff 146 138 147 139 quiet_cmd_ecoff = ECOFF $@ 148 140 cmd_ecoff = $< $(VMLINUZ) $@ $(e2eflag) 149 - vmlinuz.ecoff: $(obj)/../elf2ecoff $(VMLINUZ) 141 + 142 + $(objboot)/vmlinuz.ecoff: $(objboot)/elf2ecoff $(VMLINUZ) 150 143 $(call cmd,ecoff) 151 144 145 + targets += ../vmlinuz.bin 146 + 152 147 OBJCOPYFLAGS_vmlinuz.bin := $(OBJCOPYFLAGS) -O binary 153 - vmlinuz.bin: vmlinuz 148 + 149 + $(objboot)/vmlinuz.bin: $(objtree)/vmlinuz 154 150 $(call cmd,objcopy) 151 + 152 + targets += ../vmlinuz.srec 155 153 156 154 OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec 157 - vmlinuz.srec: vmlinuz 155 + 156 + $(objboot)/vmlinuz.srec: $(objtree)/vmlinuz 158 157 $(call cmd,objcopy) 159 158 160 - uzImage.bin: vmlinuz.bin FORCE 159 + targets += ../uzImage.bin 160 + 161 + $(objboot)/uzImage.bin: $(objboot)/vmlinuz.bin FORCE 161 162 $(call if_changed,uimage,none) 162 163 163 - clean-files += $(objtree)/vmlinuz 164 - clean-files += $(objtree)/vmlinuz.32 165 - clean-files += $(objtree)/vmlinuz.ecoff 166 - clean-files += $(objtree)/vmlinuz.bin 167 - clean-files += $(objtree)/vmlinuz.srec 164 + # 165 + # Flattened Image Tree (.itb) image 166 + # 167 + 168 + ifeq ($(ADDR_BITS),32) 169 + itb_addr_cells = 1 170 + endif 171 + ifeq ($(ADDR_BITS),64) 172 + itb_addr_cells = 2 173 + endif 174 + 175 + targets += ../vmlinuz.its.S 176 + 177 + quiet_cmd_its_cat = CAT $@ 178 + cmd_its_cat = cat $(real-prereqs) >$@ 179 + 180 + $(objboot)/vmlinuz.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE 181 + $(call if_changed,its_cat) 182 + 183 + targets += ../vmlinuz.its 184 + 185 + quiet_cmd_cpp_its_S = ITS $@ 186 + cmd_cpp_its_S = $(CPP) -P -C -o $@ $< \ 187 + -DKERNEL_NAME="\"Linux $(KERNELRELEASE)\"" \ 188 + -DVMLINUX_BINARY="\"$(2)\"" \ 189 + -DVMLINUX_COMPRESSION="\"none\"" \ 190 + -DVMLINUX_LOAD_ADDRESS=$(VMLINUZ_LOAD_ADDRESS) \ 191 + -DVMLINUX_ENTRY_ADDRESS=$(VMLINUZ_LOAD_ADDRESS) \ 192 + -DADDR_BITS=$(ADDR_BITS) \ 193 + -DADDR_CELLS=$(itb_addr_cells) 194 + 195 + $(objboot)/vmlinuz.its: $(objboot)/vmlinuz.its.S FORCE 196 + $(call if_changed,cpp_its_S,vmlinuz.bin) 197 + 198 + targets += ../vmlinuz.itb 199 + 200 + quiet_cmd_itb-image = ITB $@ 201 + cmd_itb-image = \ 202 + env PATH="$(objtree)/scripts/dtc:$(PATH)" \ 203 + $(BASH) $(MKIMAGE) \ 204 + -D "-I dts -O dtb -p 500 \ 205 + --include $(objtree)/arch/mips \ 206 + --warning no-unit_address_vs_reg" \ 207 + -f $(2) $@ 208 + 209 + $(objboot)/vmlinuz.itb: $(objboot)/vmlinuz.its $(objboot)/vmlinuz.bin FORCE 210 + $(call if_changed,itb-image,$<)
+6 -3
arch/mips/boot/compressed/ld.script
··· 31 31 CONSTRUCTORS 32 32 . = ALIGN(16); 33 33 } 34 - __appended_dtb = .; 35 - /* leave space for appended DTB */ 36 - . += 0x100000; 34 + 35 + .appended_dtb : { 36 + __appended_dtb = .; 37 + /* leave space for appended DTB */ 38 + . += 0x100000; 39 + } 37 40 38 41 _edata = .; 39 42 /* End of data section */
+1 -1
arch/mips/boot/dts/Makefile
··· 6 6 subdir-$(CONFIG_MACH_INGENIC) += ingenic 7 7 subdir-$(CONFIG_LANTIQ) += lantiq 8 8 subdir-$(CONFIG_MACH_LOONGSON64) += loongson 9 - subdir-$(CONFIG_MSCC_OCELOT) += mscc 9 + subdir-$(CONFIG_SOC_VCOREIII) += mscc 10 10 subdir-$(CONFIG_MIPS_MALTA) += mti 11 11 subdir-$(CONFIG_LEGACY_BOARD_SEAD3) += mti 12 12 subdir-$(CONFIG_NLM_XLP_BOARD) += netlogic
+6
arch/mips/boot/dts/brcm/bcm63268.dtsi
··· 70 70 mask = <0x1>; 71 71 }; 72 72 73 + periph_rst: reset-controller@10000010 { 74 + compatible = "brcm,bcm6345-reset"; 75 + reg = <0x10000010 0x4>; 76 + #reset-cells = <1>; 77 + }; 78 + 73 79 periph_intc: interrupt-controller@10000020 { 74 80 compatible = "brcm,bcm6345-l1-intc"; 75 81 reg = <0x10000020 0x20>,
+6
arch/mips/boot/dts/brcm/bcm6328.dtsi
··· 57 57 #clock-cells = <1>; 58 58 }; 59 59 60 + periph_rst: reset-controller@10000010 { 61 + compatible = "brcm,bcm6345-reset"; 62 + reg = <0x10000010 0x4>; 63 + #reset-cells = <1>; 64 + }; 65 + 60 66 periph_intc: interrupt-controller@10000020 { 61 67 compatible = "brcm,bcm6345-l1-intc"; 62 68 reg = <0x10000020 0x10>,
+6
arch/mips/boot/dts/brcm/bcm6358.dtsi
··· 82 82 interrupts = <2>, <3>; 83 83 }; 84 84 85 + periph_rst: reset-controller@fffe0034 { 86 + compatible = "brcm,bcm6345-reset"; 87 + reg = <0xfffe0034 0x4>; 88 + #reset-cells = <1>; 89 + }; 90 + 85 91 leds0: led-controller@fffe00d0 { 86 92 #address-cells = <1>; 87 93 #size-cells = <0>;
+6
arch/mips/boot/dts/brcm/bcm6362.dtsi
··· 70 70 mask = <0x1>; 71 71 }; 72 72 73 + periph_rst: reset-controller@10000010 { 74 + compatible = "brcm,bcm6345-reset"; 75 + reg = <0x10000010 0x4>; 76 + #reset-cells = <1>; 77 + }; 78 + 73 79 periph_intc: interrupt-controller@10000020 { 74 80 compatible = "brcm,bcm6345-l1-intc"; 75 81 reg = <0x10000020 0x10>,
+6
arch/mips/boot/dts/brcm/bcm6368.dtsi
··· 70 70 mask = <0x1>; 71 71 }; 72 72 73 + periph_rst: reset-controller@10000010 { 74 + compatible = "brcm,bcm6345-reset"; 75 + reg = <0x10000010 0x4>; 76 + #reset-cells = <1>; 77 + }; 78 + 73 79 periph_intc: interrupt-controller@10000020 { 74 80 compatible = "brcm,bcm6345-l1-intc"; 75 81 reg = <0x10000020 0x10>,
+3 -2
arch/mips/boot/dts/img/pistachio_marduk.dts
··· 46 46 regulator-max-microvolt = <1800000>; 47 47 }; 48 48 49 - leds { 49 + led-controller { 50 50 compatible = "pwm-leds"; 51 - heartbeat { 51 + 52 + led-1 { 52 53 label = "marduk:red:heartbeat"; 53 54 pwms = <&pwm 3 300000>; 54 55 max-brightness = <255>;
+42 -3
arch/mips/boot/dts/ingenic/ci20.dts
··· 69 69 70 70 eth0_power: fixedregulator@0 { 71 71 compatible = "regulator-fixed"; 72 + 72 73 regulator-name = "eth0_power"; 73 74 regulator-min-microvolt = <3300000>; 74 75 regulator-max-microvolt = <3300000>; 76 + 75 77 gpio = <&gpb 25 GPIO_ACTIVE_LOW>; 76 78 enable-active-high; 77 79 }; ··· 85 83 86 84 wlan0_power: fixedregulator@1 { 87 85 compatible = "regulator-fixed"; 86 + 88 87 regulator-name = "wlan0_power"; 88 + 89 89 gpio = <&gpb 19 GPIO_ACTIVE_LOW>; 90 + enable-active-high; 91 + }; 92 + 93 + otg_power: fixedregulator@2 { 94 + compatible = "regulator-fixed"; 95 + 96 + regulator-name = "otg_power"; 97 + regulator-min-microvolt = <5000000>; 98 + regulator-max-microvolt = <5000000>; 99 + 100 + gpio = <&gpf 14 GPIO_ACTIVE_LOW>; 90 101 enable-active-high; 91 102 }; 92 103 }; 93 104 94 105 &ext { 95 106 clock-frequency = <48000000>; 107 + }; 108 + 109 + &cgu { 110 + /* 111 + * Use the 32.768 kHz oscillator as the parent of the RTC for a higher 112 + * precision. 113 + */ 114 + assigned-clocks = <&cgu JZ4780_CLK_OTGPHY>, <&cgu JZ4780_CLK_RTC>; 115 + assigned-clock-parents = <0>, <&cgu JZ4780_CLK_RTCLK>; 116 + assigned-clock-rates = <48000000>; 96 117 }; 97 118 98 119 &mmc0 { ··· 421 396 status = "okay"; 422 397 }; 423 398 399 + &otg_phy { 400 + status = "okay"; 401 + 402 + vcc-supply = <&otg_power>; 403 + }; 404 + 405 + &otg { 406 + status = "okay"; 407 + }; 408 + 424 409 &pinctrl { 425 410 pins_uart0: uart0 { 426 411 function = "uart0"; ··· 524 489 }; 525 490 526 491 &tcu { 527 - /* 3 MHz for the system timer and clocksource */ 528 - assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>; 529 - assigned-clock-rates = <3000000>, <3000000>; 492 + /* 493 + * 750 kHz for the system timer and 3 MHz for the clocksource, 494 + * use channel #0 for the system timer, #1 for the clocksource. 495 + */ 496 + assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>, 497 + <&tcu TCU_CLK_OST>; 498 + assigned-clock-rates = <750000>, <3000000>, <3000000>; 530 499 };
+57 -7
arch/mips/boot/dts/ingenic/cu1000-neo.dts
··· 3 3 4 4 #include "x1000.dtsi" 5 5 #include <dt-bindings/gpio/gpio.h> 6 - #include <dt-bindings/clock/ingenic,tcu.h> 6 + #include <dt-bindings/clock/ingenic,sysost.h> 7 7 #include <dt-bindings/interrupt-controller/irq.h> 8 8 9 9 / { ··· 31 31 }; 32 32 }; 33 33 34 + ssi: spi-gpio { 35 + compatible = "spi-gpio"; 36 + #address-cells = <1>; 37 + #size-cells = <0>; 38 + num-chipselects = <1>; 39 + 40 + mosi-gpios = <&gpd 2 GPIO_ACTIVE_HIGH>; 41 + miso-gpios = <&gpd 3 GPIO_ACTIVE_HIGH>; 42 + sck-gpios = <&gpd 0 GPIO_ACTIVE_HIGH>; 43 + cs-gpios = <&gpd 1 GPIO_ACTIVE_HIGH>; 44 + 45 + status = "okay"; 46 + 47 + spi-max-frequency = <50000000>; 48 + 49 + sc16is752: expander@0 { 50 + compatible = "nxp,sc16is752"; 51 + reg = <0>; /* CE0 */ 52 + spi-max-frequency = <4000000>; 53 + 54 + clocks = <&exclk_sc16is752>; 55 + 56 + interrupt-parent = <&gpc>; 57 + interrupts = <6 IRQ_TYPE_EDGE_FALLING>; 58 + 59 + gpio-controller; 60 + #gpio-cells = <2>; 61 + 62 + exclk_sc16is752: sc16is752 { 63 + compatible = "fixed-clock"; 64 + #clock-cells = <0>; 65 + clock-frequency = <48000000>; 66 + }; 67 + }; 68 + }; 69 + 34 70 wlan_pwrseq: msc1-pwrseq { 35 71 compatible = "mmc-pwrseq-simple"; 36 72 ··· 79 43 clock-frequency = <24000000>; 80 44 }; 81 45 82 - &tcu { 83 - /* 1500 kHz for the system timer and clocksource */ 84 - assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; 85 - assigned-clock-rates = <1500000>, <1500000>; 46 + &cgu { 47 + /* 48 + * Use the 32.768 kHz oscillator as the parent of the RTC for a higher 49 + * precision. 50 + */ 51 + assigned-clocks = <&cgu X1000_CLK_RTC>; 52 + assigned-clock-parents = <&cgu X1000_CLK_RTCLK>; 53 + }; 86 54 87 - /* Use channel #0 for the system timer channel #2 for the clocksource */ 88 - ingenic,pwm-channels-mask = <0xfa>; 55 + &ost { 56 + /* 1500 kHz for the system timer and clocksource */ 57 + assigned-clocks = <&ost OST_CLK_PERCPU_TIMER>, <&ost OST_CLK_GLOBAL_TIMER>; 58 + assigned-clock-rates = <1500000>, <1500000>; 89 59 }; 90 60 91 61 &uart2 { ··· 175 133 compatible = "ethernet-phy-id0007.c0f0", "ethernet-phy-ieee802.3-c22"; 176 134 reg = <0>; 177 135 }; 136 + }; 137 + 138 + &otg_phy { 139 + status = "okay"; 140 + }; 141 + 142 + &otg { 143 + status = "okay"; 178 144 }; 179 145 180 146 &pinctrl {
+61 -7
arch/mips/boot/dts/ingenic/cu1830-neo.dts
··· 3 3 4 4 #include "x1830.dtsi" 5 5 #include <dt-bindings/gpio/gpio.h> 6 - #include <dt-bindings/clock/ingenic,tcu.h> 6 + #include <dt-bindings/clock/ingenic,sysost.h> 7 7 #include <dt-bindings/interrupt-controller/irq.h> 8 8 9 9 / { ··· 31 31 }; 32 32 }; 33 33 34 + ssi0: spi-gpio { 35 + compatible = "spi-gpio"; 36 + #address-cells = <1>; 37 + #size-cells = <0>; 38 + num-chipselects = <1>; 39 + 40 + mosi-gpios = <&gpc 12 GPIO_ACTIVE_HIGH>; 41 + miso-gpios = <&gpc 11 GPIO_ACTIVE_HIGH>; 42 + sck-gpios = <&gpc 15 GPIO_ACTIVE_HIGH>; 43 + cs-gpios = <&gpc 16 GPIO_ACTIVE_HIGH>; 44 + 45 + status = "okay"; 46 + 47 + spi-max-frequency = <50000000>; 48 + 49 + sc16is752: expander@0 { 50 + compatible = "nxp,sc16is752"; 51 + reg = <0>; /* CE0 */ 52 + spi-max-frequency = <4000000>; 53 + 54 + clocks = <&exclk_sc16is752>; 55 + 56 + interrupt-parent = <&gpb>; 57 + interrupts = <18 IRQ_TYPE_EDGE_FALLING>; 58 + 59 + gpio-controller; 60 + #gpio-cells = <2>; 61 + 62 + exclk_sc16is752: sc16is752 { 63 + compatible = "fixed-clock"; 64 + #clock-cells = <0>; 65 + clock-frequency = <48000000>; 66 + }; 67 + }; 68 + }; 69 + 34 70 wlan_pwrseq: msc1-pwrseq { 35 71 compatible = "mmc-pwrseq-simple"; 36 72 ··· 79 43 clock-frequency = <24000000>; 80 44 }; 81 45 82 - &tcu { 83 - /* 1500 kHz for the system timer and clocksource */ 84 - assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; 85 - assigned-clock-rates = <1500000>, <1500000>; 46 + &cgu { 47 + /* 48 + * Use the 32.768 kHz oscillator as the parent of the RTC for a higher 49 + * precision. 50 + */ 51 + assigned-clocks = <&cgu X1830_CLK_RTC>; 52 + assigned-clock-parents = <&cgu X1830_CLK_RTCLK>; 53 + }; 86 54 87 - /* Use channel #0 for the system timer channel #2 for the clocksource */ 88 - ingenic,pwm-channels-mask = <0xfa>; 55 + &ost { 56 + /* 1500 kHz for the system timer and clocksource */ 57 + assigned-clocks = <&ost OST_CLK_PERCPU_TIMER>, <&ost OST_CLK_GLOBAL_TIMER>; 58 + assigned-clock-rates = <1500000>, <1500000>; 89 59 }; 90 60 91 61 &uart1 { ··· 113 71 compatible = "ti,ads7830"; 114 72 reg = <0x48>; 115 73 }; 74 + }; 75 + 76 + &dtrng { 77 + status = "okay"; 116 78 }; 117 79 118 80 &msc0 { ··· 179 133 compatible = "ethernet-phy-id0243.0c54", "ethernet-phy-ieee802.3-c22"; 180 134 reg = <0>; 181 135 }; 136 + }; 137 + 138 + &otg_phy { 139 + status = "okay"; 140 + }; 141 + 142 + &otg { 143 + status = "okay"; 182 144 }; 183 145 184 146 &pinctrl {
+1 -1
arch/mips/boot/dts/ingenic/jz4740.dtsi
··· 295 295 clocks = <&cgu JZ4740_CLK_DMA>; 296 296 }; 297 297 298 - uhc: uhc@13030000 { 298 + uhc: usb@13030000 { 299 299 compatible = "ingenic,jz4740-ohci", "generic-ohci"; 300 300 reg = <0x13030000 0x1000>; 301 301
+1 -1
arch/mips/boot/dts/ingenic/jz4770.dtsi
··· 430 430 interrupts = <23>; 431 431 }; 432 432 433 - uhc: uhc@13430000 { 433 + uhc: usb@13430000 { 434 434 compatible = "generic-ohci"; 435 435 reg = <0x13430000 0x1000>; 436 436
+43 -2
arch/mips/boot/dts/ingenic/jz4780.dtsi
··· 61 61 }; 62 62 63 63 cgu: jz4780-cgu@10000000 { 64 - compatible = "ingenic,jz4780-cgu"; 64 + compatible = "ingenic,jz4780-cgu", "simple-mfd"; 65 65 reg = <0x10000000 0x100>; 66 + #address-cells = <1>; 67 + #size-cells = <1>; 68 + ranges = <0x0 0x10000000 0x100>; 69 + 70 + #clock-cells = <1>; 66 71 67 72 clocks = <&ext>, <&rtc>; 68 73 clock-names = "ext", "rtc"; 69 74 70 - #clock-cells = <1>; 75 + otg_phy: usb-phy@3c { 76 + compatible = "ingenic,jz4780-phy"; 77 + reg = <0x3c 0x10>; 78 + 79 + clocks = <&cgu JZ4780_CLK_OTG1>; 80 + 81 + #phy-cells = <0>; 82 + 83 + status = "disabled"; 84 + }; 85 + 86 + rng: rng@d8 { 87 + compatible = "ingenic,jz4780-rng"; 88 + reg = <0xd8 0x8>; 89 + 90 + status = "disabled"; 91 + }; 71 92 }; 72 93 73 94 tcu: timer@10002000 { ··· 512 491 reg = <0x134d0000 0x10000>; 513 492 514 493 clocks = <&cgu JZ4780_CLK_BCH>; 494 + 495 + status = "disabled"; 496 + }; 497 + 498 + otg: usb@13500000 { 499 + compatible = "ingenic,jz4780-otg", "snps,dwc2"; 500 + reg = <0x13500000 0x40000>; 501 + 502 + interrupt-parent = <&intc>; 503 + interrupts = <21>; 504 + 505 + clocks = <&cgu JZ4780_CLK_UHC>; 506 + clock-names = "otg"; 507 + 508 + phys = <&otg_phy>; 509 + phy-names = "usb2-phy"; 510 + 511 + g-rx-fifo-size = <768>; 512 + g-np-tx-fifo-size = <256>; 513 + g-tx-fifo-size = <256 256 256 256 256 256 256 512>; 515 514 516 515 status = "disabled"; 517 516 };
+55 -1
arch/mips/boot/dts/ingenic/x1000.dtsi
··· 52 52 }; 53 53 54 54 cgu: x1000-cgu@10000000 { 55 - compatible = "ingenic,x1000-cgu"; 55 + compatible = "ingenic,x1000-cgu", "simple-mfd"; 56 56 reg = <0x10000000 0x100>; 57 + #address-cells = <1>; 58 + #size-cells = <1>; 59 + ranges = <0x0 0x10000000 0x100>; 57 60 58 61 #clock-cells = <1>; 59 62 60 63 clocks = <&exclk>, <&rtclk>; 61 64 clock-names = "ext", "rtc"; 65 + 66 + otg_phy: usb-phy@3c { 67 + compatible = "ingenic,x1000-phy"; 68 + reg = <0x3c 0x10>; 69 + 70 + clocks = <&cgu X1000_CLK_OTGPHY>; 71 + 72 + #phy-cells = <0>; 73 + 74 + status = "disabled"; 75 + }; 76 + 77 + rng: rng@d8 { 78 + compatible = "ingenic,x1000-rng"; 79 + reg = <0xd8 0x8>; 80 + 81 + status = "disabled"; 82 + }; 83 + }; 84 + 85 + ost: timer@12000000 { 86 + compatible = "ingenic,x1000-ost"; 87 + reg = <0x12000000 0x3c>; 88 + 89 + #clock-cells = <1>; 90 + 91 + clocks = <&cgu X1000_CLK_OST>; 92 + clock-names = "ost"; 93 + 94 + interrupt-parent = <&cpuintc>; 95 + interrupts = <3>; 62 96 }; 63 97 64 98 tcu: timer@10002000 { ··· 356 322 357 323 status = "disabled"; 358 324 }; 325 + }; 326 + 327 + otg: usb@13500000 { 328 + compatible = "ingenic,x1000-otg", "snps,dwc2"; 329 + reg = <0x13500000 0x40000>; 330 + 331 + interrupt-parent = <&intc>; 332 + interrupts = <21>; 333 + 334 + clocks = <&cgu X1000_CLK_OTG>; 335 + clock-names = "otg"; 336 + 337 + phys = <&otg_phy>; 338 + phy-names = "usb2-phy"; 339 + 340 + g-rx-fifo-size = <768>; 341 + g-np-tx-fifo-size = <256>; 342 + g-tx-fifo-size = <256 256 256 256 256 256 256 512>; 343 + 344 + status = "disabled"; 359 345 }; 360 346 };
+57 -1
arch/mips/boot/dts/ingenic/x1830.dtsi
··· 52 52 }; 53 53 54 54 cgu: x1830-cgu@10000000 { 55 - compatible = "ingenic,x1830-cgu"; 55 + compatible = "ingenic,x1830-cgu", "simple-mfd"; 56 56 reg = <0x10000000 0x100>; 57 + #address-cells = <1>; 58 + #size-cells = <1>; 59 + ranges = <0x0 0x10000000 0x100>; 57 60 58 61 #clock-cells = <1>; 59 62 60 63 clocks = <&exclk>, <&rtclk>; 61 64 clock-names = "ext", "rtc"; 65 + 66 + otg_phy: usb-phy@3c { 67 + compatible = "ingenic,x1830-phy"; 68 + reg = <0x3c 0x10>; 69 + 70 + clocks = <&cgu X1830_CLK_OTGPHY>; 71 + 72 + #phy-cells = <0>; 73 + 74 + status = "disabled"; 75 + }; 76 + }; 77 + 78 + ost: timer@12000000 { 79 + compatible = "ingenic,x1830-ost", "ingenic,x1000-ost"; 80 + reg = <0x12000000 0x3c>; 81 + 82 + #clock-cells = <1>; 83 + 84 + clocks = <&cgu X1830_CLK_OST>; 85 + clock-names = "ost"; 86 + 87 + interrupt-parent = <&cpuintc>; 88 + interrupts = <4>; 62 89 }; 63 90 64 91 tcu: timer@10002000 { ··· 263 236 status = "disabled"; 264 237 }; 265 238 239 + dtrng: trng@10072000 { 240 + compatible = "ingenic,x1830-dtrng"; 241 + reg = <0x10072000 0xc>; 242 + 243 + clocks = <&cgu X1830_CLK_DTRNG>; 244 + 245 + status = "disabled"; 246 + }; 247 + 266 248 pdma: dma-controller@13420000 { 267 249 compatible = "ingenic,x1830-dma"; 268 250 reg = <0x13420000 0x400 ··· 346 310 347 311 status = "disabled"; 348 312 }; 313 + }; 314 + 315 + otg: usb@13500000 { 316 + compatible = "ingenic,x1830-otg", "snps,dwc2"; 317 + reg = <0x13500000 0x40000>; 318 + 319 + interrupt-parent = <&intc>; 320 + interrupts = <21>; 321 + 322 + clocks = <&cgu X1830_CLK_OTG>; 323 + clock-names = "otg"; 324 + 325 + phys = <&otg_phy>; 326 + phy-names = "usb2-phy"; 327 + 328 + g-rx-fifo-size = <768>; 329 + g-np-tx-fifo-size = <256>; 330 + g-tx-fifo-size = <256 256 256 256 256 256 256 512>; 331 + 332 + status = "disabled"; 349 333 }; 350 334 };
+10 -1
arch/mips/boot/dts/mscc/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - dtb-$(CONFIG_MSCC_OCELOT) += ocelot_pcb123.dtb ocelot_pcb120.dtb 2 + dtb-$(CONFIG_SOC_VCOREIII) += \ 3 + jaguar2_pcb110.dtb \ 4 + jaguar2_pcb111.dtb \ 5 + jaguar2_pcb118.dtb \ 6 + luton_pcb091.dtb \ 7 + ocelot_pcb120.dtb \ 8 + ocelot_pcb123.dtb \ 9 + serval_pcb105.dtb \ 10 + serval_pcb106.dtb 11 + 3 12 4 13 obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
+167
arch/mips/boot/dts/mscc/jaguar2.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2020 Microsemi Corporation 4 + */ 5 + 6 + / { 7 + #address-cells = <1>; 8 + #size-cells = <1>; 9 + compatible = "mscc,jr2"; 10 + 11 + aliases { 12 + serial0 = &uart0; 13 + serial1 = &uart2; 14 + gpio0 = &gpio; 15 + }; 16 + 17 + cpus { 18 + #address-cells = <1>; 19 + #size-cells = <0>; 20 + 21 + cpu@0 { 22 + compatible = "mips,mips24KEc"; 23 + device_type = "cpu"; 24 + clocks = <&cpu_clk>; 25 + reg = <0>; 26 + }; 27 + }; 28 + 29 + cpuintc: interrupt-controller { 30 + #address-cells = <0>; 31 + #interrupt-cells = <1>; 32 + interrupt-controller; 33 + compatible = "mti,cpu-interrupt-controller"; 34 + }; 35 + 36 + cpu_clk: cpu-clock { 37 + compatible = "fixed-clock"; 38 + #clock-cells = <0>; 39 + clock-frequency = <500000000>; 40 + }; 41 + 42 + ahb_clk: ahb-clk { 43 + compatible = "fixed-factor-clock"; 44 + #clock-cells = <0>; 45 + clocks = <&cpu_clk>; 46 + clock-div = <2>; 47 + clock-mult = <1>; 48 + }; 49 + 50 + ahb: ahb { 51 + compatible = "simple-bus"; 52 + #address-cells = <1>; 53 + #size-cells = <1>; 54 + ranges; 55 + 56 + interrupt-parent = <&intc>; 57 + 58 + cpu_ctrl: syscon@70000000 { 59 + compatible = "mscc,ocelot-cpu-syscon", "syscon"; 60 + reg = <0x70000000 0x2c>; 61 + }; 62 + 63 + intc: interrupt-controller@70000070 { 64 + compatible = "mscc,jaguar2-icpu-intr"; 65 + reg = <0x70000070 0x94>; 66 + #interrupt-cells = <1>; 67 + interrupt-controller; 68 + interrupt-parent = <&cpuintc>; 69 + interrupts = <2>; 70 + }; 71 + 72 + uart0: serial@70100000 { 73 + pinctrl-0 = <&uart_pins>; 74 + pinctrl-names = "default"; 75 + compatible = "ns16550a"; 76 + reg = <0x70100000 0x20>; 77 + interrupts = <6>; 78 + clocks = <&ahb_clk>; 79 + reg-io-width = <4>; 80 + reg-shift = <2>; 81 + 82 + status = "disabled"; 83 + }; 84 + 85 + uart2: serial@70100800 { 86 + pinctrl-0 = <&uart2_pins>; 87 + pinctrl-names = "default"; 88 + compatible = "ns16550a"; 89 + reg = <0x70100800 0x20>; 90 + interrupts = <7>; 91 + clocks = <&ahb_clk>; 92 + reg-io-width = <4>; 93 + reg-shift = <2>; 94 + 95 + status = "disabled"; 96 + }; 97 + 98 + gpio: pinctrl@71010038 { 99 + compatible = "mscc,jaguar2-pinctrl"; 100 + reg = <0x71010038 0x90>; 101 + gpio-controller; 102 + #gpio-cells = <2>; 103 + gpio-ranges = <&gpio 0 0 64>; 104 + 105 + uart_pins: uart-pins { 106 + pins = "GPIO_10", "GPIO_11"; 107 + function = "uart"; 108 + }; 109 + 110 + uart2_pins: uart2-pins { 111 + pins = "GPIO_24", "GPIO_25"; 112 + function = "uart2"; 113 + }; 114 + 115 + cs1_pins: cs1-pins { 116 + pins = "GPIO_16"; 117 + function = "si"; 118 + }; 119 + 120 + cs2_pins: cs2-pins { 121 + pins = "GPIO_17"; 122 + function = "si"; 123 + }; 124 + 125 + cs3_pins: cs3-pins { 126 + pins = "GPIO_18"; 127 + function = "si"; 128 + }; 129 + 130 + i2c_pins: i2c-pins { 131 + pins = "GPIO_14", "GPIO_15"; 132 + function = "twi"; 133 + }; 134 + 135 + i2c2_pins: i2c2-pins { 136 + pins = "GPIO_28", "GPIO_29"; 137 + function = "twi2"; 138 + }; 139 + }; 140 + 141 + i2c0: i2c@70100400 { 142 + compatible = "mscc,ocelot-i2c", "snps,designware-i2c"; 143 + status = "disabled"; 144 + pinctrl-0 = <&i2c_pins>; 145 + pinctrl-names = "default"; 146 + reg = <0x70100400 0x100>, <0x700001b8 0x8>; 147 + #address-cells = <1>; 148 + #size-cells = <0>; 149 + interrupts = <8>; 150 + clock-frequency = <100000>; 151 + clocks = <&ahb_clk>; 152 + }; 153 + 154 + i2c2: i2c@70100c00 { 155 + compatible = "mscc,ocelot-i2c", "snps,designware-i2c"; 156 + status = "disabled"; 157 + pinctrl-0 = <&i2c2_pins>; 158 + pinctrl-names = "default"; 159 + reg = <0x70100c00 0x100>; 160 + #address-cells = <1>; 161 + #size-cells = <0>; 162 + interrupts = <8>; 163 + clock-frequency = <100000>; 164 + clocks = <&ahb_clk>; 165 + }; 166 + }; 167 + };
+25
arch/mips/boot/dts/mscc/jaguar2_common.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2020 Microsemi Corporation 4 + */ 5 + 6 + #include "jaguar2.dtsi" 7 + 8 + / { 9 + chosen { 10 + stdout-path = "serial0:115200n8"; 11 + }; 12 + }; 13 + 14 + &uart0 { 15 + status = "okay"; 16 + }; 17 + 18 + &uart2 { 19 + status = "okay"; 20 + }; 21 + 22 + &i2c0 { 23 + status = "okay"; 24 + i2c-sda-hold-time-ns = <300>; 25 + };
+267
arch/mips/boot/dts/mscc/jaguar2_pcb110.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2020 Microsemi Corporation 4 + */ 5 + 6 + /dts-v1/; 7 + #include "jaguar2_common.dtsi" 8 + #include <dt-bindings/gpio/gpio.h> 9 + 10 + / { 11 + model = "Jaguar2 Cu8-Sfp16 PCB110 Reference Board"; 12 + compatible = "mscc,jr2-pcb110", "mscc,jr2"; 13 + 14 + aliases { 15 + i2c0 = &i2c0; 16 + i2c108 = &i2c108; 17 + i2c109 = &i2c109; 18 + i2c110 = &i2c110; 19 + i2c111 = &i2c111; 20 + i2c112 = &i2c112; 21 + i2c113 = &i2c113; 22 + i2c114 = &i2c114; 23 + i2c115 = &i2c115; 24 + i2c116 = &i2c116; 25 + i2c117 = &i2c117; 26 + i2c118 = &i2c118; 27 + i2c119 = &i2c119; 28 + i2c120 = &i2c120; 29 + i2c121 = &i2c121; 30 + i2c122 = &i2c122; 31 + i2c123 = &i2c123; 32 + i2c124 = &i2c124; 33 + i2c125 = &i2c125; 34 + i2c126 = &i2c126; 35 + i2c127 = &i2c127; 36 + i2c128 = &i2c128; 37 + i2c129 = &i2c129; 38 + i2c130 = &i2c130; 39 + i2c131 = &i2c131; 40 + i2c149 = &i2c149; 41 + i2c150 = &i2c150; 42 + i2c151 = &i2c151; 43 + i2c152 = &i2c152; 44 + }; 45 + i2c0_imux: i2c0-imux { 46 + compatible = "i2c-mux-pinctrl"; 47 + #address-cells = <1>; 48 + #size-cells = <0>; 49 + i2c-parent = <&i2c0>; 50 + pinctrl-names = 51 + "i2c149", "i2c150", "i2c151", "i2c152", "idle"; 52 + pinctrl-0 = <&i2cmux_0>; 53 + pinctrl-1 = <&i2cmux_1>; 54 + pinctrl-2 = <&i2cmux_2>; 55 + pinctrl-3 = <&i2cmux_3>; 56 + pinctrl-4 = <&i2cmux_pins_i>; 57 + i2c149: i2c@0 { 58 + reg = <0x0>; 59 + #address-cells = <1>; 60 + #size-cells = <0>; 61 + }; 62 + i2c150: i2c@1 { 63 + reg = <0x1>; 64 + #address-cells = <1>; 65 + #size-cells = <0>; 66 + }; 67 + i2c151: i2c@2 { 68 + reg = <0x2>; 69 + #address-cells = <1>; 70 + #size-cells = <0>; 71 + }; 72 + i2c152: i2c@3 { 73 + reg = <0x3>; 74 + #address-cells = <1>; 75 + #size-cells = <0>; 76 + }; 77 + }; 78 + i2c0_emux: i2c0-emux { 79 + compatible = "i2c-mux-gpio"; 80 + #address-cells = <1>; 81 + #size-cells = <0>; 82 + i2c-parent = <&i2c0>; 83 + mux-gpios = <&gpio 51 GPIO_ACTIVE_HIGH 84 + &gpio 52 GPIO_ACTIVE_HIGH 85 + &gpio 53 GPIO_ACTIVE_HIGH 86 + &gpio 58 GPIO_ACTIVE_HIGH 87 + &gpio 59 GPIO_ACTIVE_HIGH>; 88 + idle-state = <0x0>; 89 + i2c108: i2c@10 { 90 + reg = <0x10>; 91 + #address-cells = <1>; 92 + #size-cells = <0>; 93 + }; 94 + i2c109: i2c@11 { 95 + reg = <0x11>; 96 + #address-cells = <1>; 97 + #size-cells = <0>; 98 + }; 99 + i2c110: i2c@12 { 100 + reg = <0x12>; 101 + #address-cells = <1>; 102 + #size-cells = <0>; 103 + }; 104 + i2c111: i2c@13 { 105 + reg = <0x13>; 106 + #address-cells = <1>; 107 + #size-cells = <0>; 108 + }; 109 + i2c112: i2c@14 { 110 + reg = <0x14>; 111 + #address-cells = <1>; 112 + #size-cells = <0>; 113 + }; 114 + i2c113: i2c@15 { 115 + reg = <0x15>; 116 + #address-cells = <1>; 117 + #size-cells = <0>; 118 + }; 119 + i2c114: i2c@16 { 120 + reg = <0x16>; 121 + #address-cells = <1>; 122 + #size-cells = <0>; 123 + }; 124 + i2c115: i2c@17 { 125 + reg = <0x17>; 126 + #address-cells = <1>; 127 + #size-cells = <0>; 128 + }; 129 + i2c116: i2c@8 { 130 + reg = <0x8>; 131 + #address-cells = <1>; 132 + #size-cells = <0>; 133 + }; 134 + i2c117: i2c@9 { 135 + reg = <0x9>; 136 + #address-cells = <1>; 137 + #size-cells = <0>; 138 + }; 139 + i2c118: i2c@a { 140 + reg = <0xa>; 141 + #address-cells = <1>; 142 + #size-cells = <0>; 143 + }; 144 + i2c119: i2c@b { 145 + reg = <0xb>; 146 + #address-cells = <1>; 147 + #size-cells = <0>; 148 + }; 149 + i2c120: i2c@c { 150 + reg = <0xc>; 151 + #address-cells = <1>; 152 + #size-cells = <0>; 153 + }; 154 + i2c121: i2c@d { 155 + reg = <0xd>; 156 + #address-cells = <1>; 157 + #size-cells = <0>; 158 + }; 159 + i2c122: i2c@e { 160 + reg = <0xe>; 161 + #address-cells = <1>; 162 + #size-cells = <0>; 163 + }; 164 + i2c123: i2c@f { 165 + reg = <0xf>; 166 + #address-cells = <1>; 167 + #size-cells = <0>; 168 + }; 169 + }; 170 + }; 171 + 172 + &gpio { 173 + synce_pins: synce-pins { 174 + // GPIO 16 == SI_nCS1 175 + pins = "GPIO_16"; 176 + function = "si"; 177 + }; 178 + synce_builtin_pins: synce-builtin-pins { 179 + // GPIO 49 == SI_nCS13 180 + pins = "GPIO_49"; 181 + function = "si"; 182 + }; 183 + i2cmux_pins_i: i2cmux-pins-i { 184 + pins = "GPIO_17", "GPIO_18", "GPIO_20", "GPIO_21"; 185 + function = "twi_scl_m"; 186 + output-low; 187 + }; 188 + i2cmux_0: i2cmux-0 { 189 + pins = "GPIO_17"; 190 + function = "twi_scl_m"; 191 + output-high; 192 + }; 193 + i2cmux_1: i2cmux-1 { 194 + pins = "GPIO_18"; 195 + function = "twi_scl_m"; 196 + output-high; 197 + }; 198 + i2cmux_2: i2cmux-2 { 199 + pins = "GPIO_20"; 200 + function = "twi_scl_m"; 201 + output-high; 202 + }; 203 + i2cmux_3: i2cmux-3 { 204 + pins = "GPIO_21"; 205 + function = "twi_scl_m"; 206 + output-high; 207 + }; 208 + }; 209 + 210 + &i2c0 { 211 + pca9545@70 { 212 + compatible = "nxp,pca9545"; 213 + reg = <0x70>; 214 + #address-cells = <1>; 215 + #size-cells = <0>; 216 + i2c-mux-idle-disconnect; 217 + i2c124: i2c@0 { 218 + #address-cells = <1>; 219 + #size-cells = <0>; 220 + reg = <0>; 221 + }; 222 + i2c125: i2c@1 { 223 + /* FMC B */ 224 + #address-cells = <1>; 225 + #size-cells = <0>; 226 + reg = <1>; 227 + }; 228 + i2c126: i2c@2 { 229 + #address-cells = <1>; 230 + #size-cells = <0>; 231 + reg = <2>; 232 + }; 233 + i2c127: i2c@3 { 234 + #address-cells = <1>; 235 + #size-cells = <0>; 236 + reg = <3>; 237 + }; 238 + }; 239 + pca9545@71 { 240 + compatible = "nxp,pca9545"; 241 + reg = <0x71>; 242 + #address-cells = <1>; 243 + #size-cells = <0>; 244 + i2c-mux-idle-disconnect; 245 + i2c128: i2c@0 { 246 + #address-cells = <1>; 247 + #size-cells = <0>; 248 + reg = <0>; 249 + }; 250 + i2c129: i2c@1 { 251 + /* FMC B */ 252 + #address-cells = <1>; 253 + #size-cells = <0>; 254 + reg = <1>; 255 + }; 256 + i2c130: i2c@2 { 257 + #address-cells = <1>; 258 + #size-cells = <0>; 259 + reg = <2>; 260 + }; 261 + i2c131: i2c@3 { 262 + #address-cells = <1>; 263 + #size-cells = <0>; 264 + reg = <3>; 265 + }; 266 + }; 267 + };
+107
arch/mips/boot/dts/mscc/jaguar2_pcb111.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2018 Microsemi Corporation 4 + */ 5 + 6 + /dts-v1/; 7 + #include "jaguar2_common.dtsi" 8 + 9 + / { 10 + model = "Jaguar2 Cu48 PCB111 Reference Board"; 11 + compatible = "mscc,jr2-pcb111", "mscc,jr2"; 12 + 13 + aliases { 14 + i2c0 = &i2c0; 15 + i2c149 = &i2c149; 16 + i2c150 = &i2c150; 17 + i2c151 = &i2c151; 18 + i2c152 = &i2c152; 19 + i2c203 = &i2c203; 20 + }; 21 + 22 + i2c0_imux: i2c0-imux { 23 + compatible = "i2c-mux-pinctrl"; 24 + #address-cells = <1>; 25 + #size-cells = <0>; 26 + i2c-parent = <&i2c0>; 27 + pinctrl-names = 28 + "i2c149", "i2c150", "i2c151", "i2c152", "i2c203", "idle"; 29 + pinctrl-0 = <&i2cmux_0>; 30 + pinctrl-1 = <&i2cmux_1>; 31 + pinctrl-2 = <&i2cmux_2>; 32 + pinctrl-3 = <&i2cmux_3>; 33 + pinctrl-4 = <&i2cmux_pins_i>; // Added by convention for PoE 34 + pinctrl-5 = <&i2cmux_pins_i>; 35 + i2c149: i2c@0 { 36 + reg = <0x0>; 37 + #address-cells = <1>; 38 + #size-cells = <0>; 39 + }; 40 + i2c150: i2c@1 { 41 + reg = <0x1>; 42 + #address-cells = <1>; 43 + #size-cells = <0>; 44 + }; 45 + i2c151: i2c@2 { 46 + reg = <0x2>; 47 + #address-cells = <1>; 48 + #size-cells = <0>; 49 + }; 50 + i2c152: i2c@3 { 51 + reg = <0x3>; 52 + #address-cells = <1>; 53 + #size-cells = <0>; 54 + }; 55 + i2c203: i2c@4 { 56 + reg = <0x4>; 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + }; 60 + }; 61 + }; 62 + 63 + &gpio { 64 + synce_builtin_pins: synce-builtin-pins { 65 + // GPIO 49 == SI_nCS13 66 + pins = "GPIO_49"; 67 + function = "si"; 68 + }; 69 + cpld_pins: cpld-pins { 70 + // GPIO 50 == SI_nCS14 71 + pins = "GPIO_50"; 72 + function = "si"; 73 + }; 74 + cpld_fifo_pins: synce-builtin-pins { 75 + // GPIO 51 == SI_nCS15 76 + pins = "GPIO_51"; 77 + function = "si"; 78 + }; 79 + }; 80 + 81 + &gpio { 82 + i2cmux_pins_i: i2cmux-pins-i { 83 + pins = "GPIO_17", "GPIO_18"; 84 + function = "twi_scl_m"; 85 + output-low; 86 + }; 87 + i2cmux_0: i2cmux-0 { 88 + pins = "GPIO_17"; 89 + function = "twi_scl_m"; 90 + output-high; 91 + }; 92 + i2cmux_1: i2cmux-1 { 93 + pins = "GPIO_18"; 94 + function = "twi_scl_m"; 95 + output-high; 96 + }; 97 + i2cmux_2: i2cmux-2 { 98 + pins = "GPIO_20"; 99 + function = "twi_scl_m"; 100 + output-high; 101 + }; 102 + i2cmux_3: i2cmux-3 { 103 + pins = "GPIO_21"; 104 + function = "twi_scl_m"; 105 + output-high; 106 + }; 107 + };
+57
arch/mips/boot/dts/mscc/jaguar2_pcb118.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2018 Microsemi Corporation 4 + */ 5 + 6 + /dts-v1/; 7 + #include "jaguar2_common.dtsi" 8 + 9 + / { 10 + model = "Jaguar2/Aquantia PCB118 Reference Board"; 11 + compatible = "mscc,jr2-pcb118", "mscc,jr2"; 12 + 13 + aliases { 14 + i2c150 = &i2c150; 15 + i2c151 = &i2c151; 16 + }; 17 + 18 + i2c0_imux: i2c0-imux { 19 + compatible = "i2c-mux-pinctrl"; 20 + #address-cells = <1>; 21 + #size-cells = <0>; 22 + i2c-parent = <&i2c0>; 23 + pinctrl-names = 24 + "i2c150", "i2c151", "idle"; 25 + pinctrl-0 = <&i2cmux_0>; 26 + pinctrl-1 = <&i2cmux_1>; 27 + pinctrl-2 = <&i2cmux_pins_i>; 28 + i2c150: i2c@0 { 29 + reg = <0>; 30 + #address-cells = <1>; 31 + #size-cells = <0>; 32 + }; 33 + i2c151: i2c@1 { 34 + reg = <1>; 35 + #address-cells = <1>; 36 + #size-cells = <0>; 37 + }; 38 + }; 39 + }; 40 + 41 + &gpio { 42 + i2cmux_pins_i: i2cmux-pins-i { 43 + pins = "GPIO_17", "GPIO_16"; 44 + function = "twi_scl_m"; 45 + output-low; 46 + }; 47 + i2cmux_0: i2cmux-0 { 48 + pins = "GPIO_17"; 49 + function = "twi_scl_m"; 50 + output-high; 51 + }; 52 + i2cmux_1: i2cmux-1 { 53 + pins = "GPIO_16"; 54 + function = "twi_scl_m"; 55 + output-high; 56 + }; 57 + };
+116
arch/mips/boot/dts/mscc/luton.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0 OR MIT) 2 + /* Copyright (c) 2020 Microsemi Corporation */ 3 + 4 + / { 5 + #address-cells = <1>; 6 + #size-cells = <1>; 7 + compatible = "mscc,luton"; 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 = <416666666>; 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@60000000 { 47 + compatible = "simple-bus"; 48 + #address-cells = <1>; 49 + #size-cells = <1>; 50 + ranges = <0 0x60000000 0x20000000>; 51 + 52 + interrupt-parent = <&intc>; 53 + 54 + cpu_ctrl: syscon@10000000 { 55 + compatible = "mscc,ocelot-cpu-syscon", "syscon"; 56 + reg = <0x10000000 0x2c>; 57 + }; 58 + 59 + intc: interrupt-controller@10000084 { 60 + compatible = "mscc,luton-icpu-intr"; 61 + reg = <0x10000084 0x70>; 62 + #interrupt-cells = <1>; 63 + interrupt-controller; 64 + interrupt-parent = <&cpuintc>; 65 + interrupts = <2>; 66 + }; 67 + 68 + uart0: serial@10100000 { 69 + pinctrl-0 = <&uart_pins>; 70 + pinctrl-names = "default"; 71 + compatible = "ns16550a"; 72 + reg = <0x10100000 0x20>; 73 + interrupts = <6>; 74 + clocks = <&ahb_clk>; 75 + reg-io-width = <4>; 76 + reg-shift = <2>; 77 + 78 + status = "disabled"; 79 + }; 80 + 81 + i2c0: i2c@10100400 { 82 + compatible = "mscc,ocelot-i2c", "snps,designware-i2c"; 83 + pinctrl-0 = <&i2c_pins>; 84 + pinctrl-names = "default"; 85 + reg = <0x10100400 0x100>, <0x100002a4 0x8>; 86 + #address-cells = <1>; 87 + #size-cells = <0>; 88 + interrupts = <11>; 89 + clocks = <&ahb_clk>; 90 + 91 + status = "disabled"; 92 + }; 93 + 94 + gpio: pinctrl@70068 { 95 + compatible = "mscc,luton-pinctrl"; 96 + reg = <0x70068 0x28>; 97 + gpio-controller; 98 + #gpio-cells = <2>; 99 + gpio-ranges = <&gpio 0 0 32>; 100 + interrupt-controller; 101 + interrupts = <13>; 102 + #interrupt-cells = <2>; 103 + 104 + i2c_pins: i2c-pins { 105 + pins = "GPIO_5", "GPIO_6"; 106 + function = "twi"; 107 + }; 108 + 109 + uart_pins: uart-pins { 110 + pins = "GPIO_30", "GPIO_31"; 111 + function = "uart"; 112 + }; 113 + 114 + }; 115 + }; 116 + };
+30
arch/mips/boot/dts/mscc/luton_pcb091.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2020 Microsemi Corporation 4 + */ 5 + 6 + /dts-v1/; 7 + 8 + #include "luton.dtsi" 9 + 10 + / { 11 + model = "Luton10 PCB091 Reference Board"; 12 + compatible = "mscc,luton-pcb091", "mscc,luton"; 13 + 14 + aliases { 15 + serial0 = &uart0; 16 + }; 17 + 18 + chosen { 19 + stdout-path = "serial0:115200n8"; 20 + }; 21 + }; 22 + 23 + &uart0 { 24 + status = "okay"; 25 + }; 26 + 27 + &i2c0 { 28 + status = "okay"; 29 + i2c-sda-hold-time-ns = <300>; 30 + };
+153
arch/mips/boot/dts/mscc/serval.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2018 Microsemi Corporation 4 + */ 5 + 6 + / { 7 + #address-cells = <1>; 8 + #size-cells = <1>; 9 + compatible = "mscc,serval"; 10 + 11 + cpus { 12 + #address-cells = <1>; 13 + #size-cells = <0>; 14 + 15 + cpu@0 { 16 + compatible = "mips,mips24KEc"; 17 + device_type = "cpu"; 18 + clocks = <&cpu_clk>; 19 + reg = <0>; 20 + }; 21 + }; 22 + 23 + aliases { 24 + serial0 = &uart0; 25 + gpio0 = &gpio; 26 + }; 27 + 28 + cpuintc: interrupt-controller { 29 + #address-cells = <0>; 30 + #interrupt-cells = <1>; 31 + interrupt-controller; 32 + compatible = "mti,cpu-interrupt-controller"; 33 + }; 34 + 35 + cpu_clk: cpu-clock { 36 + compatible = "fixed-clock"; 37 + #clock-cells = <0>; 38 + clock-frequency = <416666666>; 39 + }; 40 + 41 + ahb_clk: ahb-clk { 42 + compatible = "fixed-factor-clock"; 43 + #clock-cells = <0>; 44 + clocks = <&cpu_clk>; 45 + clock-div = <2>; 46 + clock-mult = <1>; 47 + }; 48 + 49 + ahb: ahb { 50 + compatible = "simple-bus"; 51 + #address-cells = <1>; 52 + #size-cells = <1>; 53 + ranges; 54 + 55 + interrupt-parent = <&intc>; 56 + 57 + cpu_ctrl: syscon@70000000 { 58 + compatible = "mscc,ocelot-cpu-syscon", "syscon"; 59 + reg = <0x70000000 0x2c>; 60 + }; 61 + 62 + intc: interrupt-controller@70000070 { 63 + compatible = "mscc,serval-icpu-intr"; 64 + reg = <0x70000070 0x70>; 65 + #interrupt-cells = <1>; 66 + interrupt-controller; 67 + interrupt-parent = <&cpuintc>; 68 + interrupts = <2>; 69 + }; 70 + 71 + uart0: serial@70100000 { 72 + pinctrl-0 = <&uart_pins>; 73 + pinctrl-names = "default"; 74 + compatible = "ns16550a"; 75 + reg = <0x70100000 0x20>; 76 + interrupts = <6>; 77 + clocks = <&ahb_clk>; 78 + reg-io-width = <4>; 79 + reg-shift = <2>; 80 + 81 + status = "disabled"; 82 + }; 83 + 84 + uart2: serial@70100800 { 85 + pinctrl-0 = <&uart2_pins>; 86 + pinctrl-names = "default"; 87 + compatible = "ns16550a"; 88 + reg = <0x70100800 0x20>; 89 + interrupts = <7>; 90 + clocks = <&ahb_clk>; 91 + reg-io-width = <4>; 92 + reg-shift = <2>; 93 + 94 + status = "disabled"; 95 + }; 96 + 97 + gpio: pinctrl@71070034 { 98 + compatible = "mscc,serval-pinctrl"; 99 + reg = <0x71070034 0x28>; 100 + gpio-controller; 101 + #gpio-cells = <2>; 102 + gpio-ranges = <&gpio 0 0 22>; 103 + 104 + sgpio_pins: sgpio-pins { 105 + pins = "GPIO_0", "GPIO_2", "GPIO_3", "GPIO_1"; 106 + function = "sg0"; 107 + }; 108 + 109 + i2c_pins: i2c-pins { 110 + pins = "GPIO_6", "GPIO_7"; 111 + function = "twi"; 112 + }; 113 + 114 + uart_pins: uart-pins { 115 + pins = "GPIO_26", "GPIO_27"; 116 + function = "uart"; 117 + }; 118 + 119 + uart2_pins: uart2-pins { 120 + pins = "GPIO_13", "GPIO_14"; 121 + function = "uart2"; 122 + }; 123 + 124 + cs1_pins: cs1-pins { 125 + pins = "GPIO_8"; 126 + function = "si"; 127 + }; 128 + 129 + irqext0_pins: irqext0-pins { 130 + pins = "GPIO_28"; 131 + function = "irq0"; 132 + }; 133 + 134 + irqext1_pins: irqext1-pins { 135 + pins = "GPIO_29"; 136 + function = "irq1"; 137 + }; 138 + }; 139 + 140 + i2c0: i2c@70100400 { 141 + compatible = "mscc,ocelot-i2c", "snps,designware-i2c"; 142 + status = "disabled"; 143 + pinctrl-0 = <&i2c_pins>; 144 + pinctrl-names = "default"; 145 + reg = <0x70100400 0x100>, <0x70000190 0x8>; 146 + #address-cells = <1>; 147 + #size-cells = <0>; 148 + interrupts = <8>; 149 + clock-frequency = <100000>; 150 + clocks = <&ahb_clk>; 151 + }; 152 + }; 153 + };
+127
arch/mips/boot/dts/mscc/serval_common.dtsi
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2020 Microsemi Corporation 4 + */ 5 + 6 + #include "serval.dtsi" 7 + 8 + / { 9 + aliases { 10 + serial0 = &uart0; 11 + i2c104 = &i2c104; 12 + i2c105 = &i2c105; 13 + i2c106 = &i2c106; 14 + i2c107 = &i2c107; 15 + i2c108 = &i2c108; 16 + i2c109 = &i2c109; 17 + }; 18 + 19 + chosen { 20 + stdout-path = "serial0:115200n8"; 21 + }; 22 + 23 + i2c0_imux: i2c0-imux{ 24 + compatible = "i2c-mux-pinctrl"; 25 + #address-cells = <1>; 26 + #size-cells = <0>; 27 + i2c-parent = <&i2c0>; 28 + pinctrl-names = 29 + "i2c104", "i2c105", "i2c106", "i2c107", 30 + "i2c108", "i2c109", "idle"; 31 + pinctrl-0 = <&i2cmux_0>; 32 + pinctrl-1 = <&i2cmux_1>; 33 + pinctrl-2 = <&i2cmux_2>; 34 + pinctrl-3 = <&i2cmux_3>; 35 + pinctrl-4 = <&i2cmux_4>; 36 + pinctrl-5 = <&i2cmux_5>; 37 + pinctrl-6 = <&i2cmux_pins_i>; 38 + i2c104: i2c_sfp0@0 { 39 + reg = <0>; 40 + #address-cells = <1>; 41 + #size-cells = <0>; 42 + }; 43 + i2c105: i2c_sfp1@1 { 44 + reg = <1>; 45 + #address-cells = <1>; 46 + #size-cells = <0>; 47 + }; 48 + i2c106: i2c_sfp2@2 { 49 + reg = <2>; 50 + #address-cells = <1>; 51 + #size-cells = <0>; 52 + }; 53 + i2c107: i2c_sfp3@3 { 54 + reg = <3>; 55 + #address-cells = <1>; 56 + #size-cells = <0>; 57 + }; 58 + i2c108: i2c_sfp4@4 { 59 + reg = <4>; 60 + #address-cells = <1>; 61 + #size-cells = <0>; 62 + }; 63 + i2c109: i2c_sfp5@5 { 64 + reg = <5>; 65 + #address-cells = <1>; 66 + #size-cells = <0>; 67 + }; 68 + }; 69 + 70 + }; 71 + 72 + &uart0 { 73 + status = "okay"; 74 + }; 75 + 76 + &uart2 { 77 + status = "okay"; 78 + }; 79 + 80 + &gpio { 81 + i2c_pins: i2c-pins { 82 + pins = "GPIO_7"; /* No "default" scl for i2c0 */ 83 + function = "twi"; 84 + }; 85 + i2cmux_pins_i: i2cmux-pins-i { 86 + pins = "GPIO_11", "GPIO_12", "GPIO_18", "GPIO_19", 87 + "GPIO_20", "GPIO_21"; 88 + function = "twi_scl_m"; 89 + output-low; 90 + }; 91 + i2cmux_0: i2cmux-0 { 92 + pins = "GPIO_11"; 93 + function = "twi_scl_m"; 94 + output-high; 95 + }; 96 + i2cmux_1: i2cmux-1 { 97 + pins = "GPIO_12"; 98 + function = "twi_scl_m"; 99 + output-high; 100 + }; 101 + i2cmux_2: i2cmux-2 { 102 + pins = "GPIO_18"; 103 + function = "twi_scl_m"; 104 + output-high; 105 + }; 106 + i2cmux_3: i2cmux-3 { 107 + pins = "GPIO_19"; 108 + function = "twi_scl_m"; 109 + output-high; 110 + }; 111 + i2cmux_4: i2cmux-4 { 112 + pins = "GPIO_20"; 113 + function = "twi_scl_m"; 114 + output-high; 115 + }; 116 + i2cmux_5: i2cmux-5 { 117 + pins = "GPIO_21"; 118 + function = "twi_scl_m"; 119 + output-high; 120 + }; 121 + }; 122 + 123 + &i2c0 { 124 + status = "okay"; 125 + i2c-sda-hold-time-ns = <300>; 126 + }; 127 +
+17
arch/mips/boot/dts/mscc/serval_pcb105.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2018 Microsemi Corporation 4 + */ 5 + 6 + /dts-v1/; 7 + #include "serval_common.dtsi" 8 + 9 + / { 10 + model = "Serval PCB105 Reference Board"; 11 + compatible = "mscc,serval-pcb105", "mscc,serval"; 12 + 13 + aliases { 14 + }; 15 + 16 + }; 17 +
+17
arch/mips/boot/dts/mscc/serval_pcb106.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * Copyright (c) 2018 Microsemi Corporation 4 + */ 5 + 6 + /dts-v1/; 7 + #include "serval_common.dtsi" 8 + 9 + / { 10 + model = "Serval PCB106 Reference Board"; 11 + compatible = "mscc,serval-pcb106", "mscc,serval"; 12 + 13 + aliases { 14 + }; 15 + 16 + }; 17 +
+1 -1
arch/mips/boot/dts/mti/sead3.dts
··· 56 56 interrupt-parent = <&cpu_intc>; 57 57 }; 58 58 59 - ehci@1b200000 { 59 + usb@1b200000 { 60 60 compatible = "generic-ehci"; 61 61 reg = <0x1b200000 0x1000>; 62 62
+1 -1
arch/mips/boot/dts/ralink/mt7628a.dtsi
··· 275 275 reset-names = "host", "device"; 276 276 }; 277 277 278 - ehci@101c0000 { 278 + usb@101c0000 { 279 279 compatible = "generic-ehci"; 280 280 reg = <0x101c0000 0x1000>; 281 281
+15
arch/mips/cavium-octeon/octeon-irq.c
··· 1505 1505 goto err; 1506 1506 } 1507 1507 1508 + r = irq_alloc_desc_at(OCTEON_IRQ_MBOX0, -1); 1509 + if (r < 0) { 1510 + pr_err("Failed to allocate desc for %s\n", "OCTEON_IRQ_MBOX0"); 1511 + goto err; 1512 + } 1508 1513 r = octeon_irq_set_ciu_mapping( 1509 1514 OCTEON_IRQ_MBOX0, 0, 32, 0, chip_mbox, handle_percpu_irq); 1510 1515 if (r) 1511 1516 goto err; 1517 + r = irq_alloc_desc_at(OCTEON_IRQ_MBOX1, -1); 1518 + if (r < 0) { 1519 + pr_err("Failed to allocate desc for %s\n", "OCTEON_IRQ_MBOX1"); 1520 + goto err; 1521 + } 1512 1522 r = octeon_irq_set_ciu_mapping( 1513 1523 OCTEON_IRQ_MBOX1, 0, 33, 0, chip_mbox, handle_percpu_irq); 1514 1524 if (r) ··· 1556 1546 if (r) 1557 1547 goto err; 1558 1548 1549 + r = irq_alloc_descs(OCTEON_IRQ_WDOG0, OCTEON_IRQ_WDOG0, 16, -1); 1550 + if (r < 0) { 1551 + pr_err("Failed to allocate desc for %s\n", "OCTEON_IRQ_WDOGx"); 1552 + goto err; 1553 + } 1559 1554 /* CIU_1 */ 1560 1555 for (i = 0; i < 16; i++) { 1561 1556 r = octeon_irq_set_ciu_mapping(
-9
arch/mips/cavium-octeon/setup.c
··· 973 973 uint64_t crashk_end; 974 974 #ifndef CONFIG_CRASH_DUMP 975 975 int64_t memory; 976 - uint64_t kernel_start; 977 - uint64_t kernel_size; 978 976 #endif 979 977 980 978 total = 0; ··· 1076 1078 } 1077 1079 } 1078 1080 cvmx_bootmem_unlock(); 1079 - /* Add the memory region for the kernel. */ 1080 - kernel_start = (unsigned long) _text; 1081 - kernel_size = _end - _text; 1082 - 1083 - /* Adjust for physical offset. */ 1084 - kernel_start &= ~0xffffffff80000000ULL; 1085 - memblock_add(kernel_start, kernel_size); 1086 1081 #endif /* CONFIG_CRASH_DUMP */ 1087 1082 1088 1083 #ifdef CONFIG_CAVIUM_RESERVE32
-3
arch/mips/cavium-octeon/smp.c
··· 290 290 { 291 291 unsigned int cpu = smp_processor_id(); 292 292 293 - if (cpu == 0) 294 - return -EBUSY; 295 - 296 293 if (!octeon_bootloader_entry_addr) 297 294 return -ENOTSUPP; 298 295
+13 -2
arch/mips/configs/ci20_defconfig
··· 49 49 CONFIG_MTD_NAND_JZ4780=y 50 50 CONFIG_MTD_UBI=y 51 51 CONFIG_MTD_UBI_FASTMAP=y 52 + CONFIG_SCSI=y 53 + CONFIG_BLK_DEV_SD=y 52 54 CONFIG_NETDEVICES=y 53 55 # CONFIG_NET_VENDOR_ARC is not set 54 56 # CONFIG_NET_VENDOR_BROADCOM is not set ··· 79 77 CONFIG_SERIAL_8250_RUNTIME_UARTS=5 80 78 CONFIG_SERIAL_8250_INGENIC=y 81 79 CONFIG_SERIAL_OF_PLATFORM=y 82 - # CONFIG_HW_RANDOM is not set 83 80 CONFIG_I2C=y 84 81 CONFIG_I2C_JZ4780=y 85 82 CONFIG_SPI=y ··· 100 99 CONFIG_MEDIA_SUPPORT=m 101 100 # CONFIG_VGA_CONSOLE is not set 102 101 # CONFIG_HID is not set 103 - # CONFIG_USB_SUPPORT is not set 102 + CONFIG_USB=y 103 + CONFIG_USB_STORAGE=y 104 + CONFIG_USB_DWC2=y 105 + CONFIG_USB_SERIAL=y 106 + CONFIG_USB_SERIAL_CH341=y 107 + CONFIG_USB_GADGET=y 104 108 CONFIG_MMC=y 105 109 CONFIG_MMC_JZ4740=y 106 110 CONFIG_NEW_LEDS=y ··· 137 131 CONFIG_JZ4780_NEMC=y 138 132 CONFIG_PWM=y 139 133 CONFIG_PWM_JZ4740=m 134 + CONFIG_JZ4780_EFUSE=y 135 + CONFIG_JZ4770_PHY=y 140 136 CONFIG_EXT4_FS=y 141 137 # CONFIG_DNOTIFY is not set 138 + CONFIG_AUTOFS_FS=y 139 + CONFIG_VFAT_FS=y 140 + CONFIG_FAT_DEFAULT_UTF8=y 142 141 CONFIG_PROC_KCORE=y 143 142 # CONFIG_PROC_PAGE_MONITOR is not set 144 143 CONFIG_TMPFS=y
+23 -5
arch/mips/configs/cu1000-neo_defconfig
··· 25 25 CONFIG_HZ_100=y 26 26 # CONFIG_SECCOMP is not set 27 27 # CONFIG_SUSPEND is not set 28 + CONFIG_MODULES=y 28 29 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 29 30 # CONFIG_COMPACTION is not set 30 31 CONFIG_CMA=y ··· 33 32 CONFIG_PACKET=y 34 33 CONFIG_UNIX=y 35 34 CONFIG_INET=y 36 - CONFIG_CFG80211=y 35 + CONFIG_CFG80211=m 37 36 CONFIG_UEVENT_HELPER=y 38 37 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 39 38 CONFIG_DEVTMPFS=y 40 39 # CONFIG_ALLOW_DEV_COREDUMP is not set 40 + CONFIG_SCSI=y 41 + CONFIG_BLK_DEV_SD=y 41 42 CONFIG_NETDEVICES=y 42 43 CONFIG_STMMAC_ETH=y 43 44 CONFIG_SMSC_PHY=y 44 - CONFIG_BRCMFMAC=y 45 + CONFIG_BRCMFMAC=m 45 46 # CONFIG_INPUT_KEYBOARD is not set 46 47 # CONFIG_INPUT_MOUSE is not set 47 48 # CONFIG_SERIO is not set ··· 55 52 CONFIG_SERIAL_8250_RUNTIME_UARTS=3 56 53 CONFIG_SERIAL_8250_INGENIC=y 57 54 CONFIG_SERIAL_OF_PLATFORM=y 58 - # CONFIG_HW_RANDOM is not set 55 + CONFIG_SERIAL_SC16IS7XX=y 56 + # CONFIG_SERIAL_SC16IS7XX_I2C is not set 57 + CONFIG_SERIAL_SC16IS7XX_SPI=y 59 58 CONFIG_I2C=y 60 59 CONFIG_I2C_JZ4780=y 60 + CONFIG_SPI=y 61 + CONFIG_SPI_GPIO=y 61 62 CONFIG_GPIO_SYSFS=y 62 - CONFIG_SENSORS_ADS7828=y 63 + CONFIG_SENSORS_ADS7828=m 63 64 CONFIG_WATCHDOG=y 64 65 CONFIG_JZ4740_WDT=y 65 66 # CONFIG_VGA_CONSOLE is not set 66 67 # CONFIG_HID is not set 67 - # CONFIG_USB_SUPPORT is not set 68 + CONFIG_USB=y 69 + CONFIG_USB_STORAGE=y 70 + CONFIG_USB_DWC2=y 71 + CONFIG_USB_SERIAL=y 72 + CONFIG_USB_SERIAL_CH341=y 73 + CONFIG_USB_GADGET=y 68 74 CONFIG_MMC=y 69 75 CONFIG_MMC_JZ4740=y 70 76 CONFIG_NEW_LEDS=y ··· 84 72 CONFIG_RTC_DRV_JZ4740=y 85 73 CONFIG_DMADEVICES=y 86 74 CONFIG_DMA_JZ4780=y 75 + # CONFIG_INGENIC_TIMER is not set 76 + CONFIG_INGENIC_SYSOST=y 87 77 # CONFIG_IOMMU_SUPPORT is not set 78 + CONFIG_JZ4770_PHY=y 88 79 CONFIG_EXT4_FS=y 89 80 # CONFIG_DNOTIFY is not set 90 81 CONFIG_AUTOFS_FS=y 82 + CONFIG_VFAT_FS=y 83 + CONFIG_FAT_DEFAULT_UTF8=y 91 84 CONFIG_PROC_KCORE=y 92 85 # CONFIG_PROC_PAGE_MONITOR is not set 93 86 CONFIG_TMPFS=y 94 87 CONFIG_CONFIGFS_FS=y 95 88 CONFIG_NFS_FS=y 96 89 CONFIG_NLS=y 90 + CONFIG_NLS_CODEPAGE_437=y 97 91 CONFIG_NLS_CODEPAGE_936=y 98 92 CONFIG_NLS_CODEPAGE_950=y 99 93 CONFIG_NLS_ASCII=y
+25 -7
arch/mips/configs/cu1830-neo_defconfig
··· 25 25 CONFIG_HZ_100=y 26 26 # CONFIG_SECCOMP is not set 27 27 # CONFIG_SUSPEND is not set 28 + CONFIG_MODULES=y 28 29 # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 29 30 # CONFIG_COMPACTION is not set 30 31 CONFIG_CMA=y ··· 33 32 CONFIG_PACKET=y 34 33 CONFIG_UNIX=y 35 34 CONFIG_INET=y 36 - CONFIG_CFG80211=y 35 + CONFIG_CFG80211=m 37 36 CONFIG_UEVENT_HELPER=y 38 37 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 39 38 CONFIG_DEVTMPFS=y 40 39 # CONFIG_ALLOW_DEV_COREDUMP is not set 40 + CONFIG_SCSI=y 41 + CONFIG_BLK_DEV_SD=y 41 42 CONFIG_MD=y 42 - CONFIG_BLK_DEV_MD=y 43 - CONFIG_BLK_DEV_DM=y 43 + CONFIG_BLK_DEV_MD=m 44 + CONFIG_BLK_DEV_DM=m 44 45 CONFIG_NETDEVICES=y 45 46 CONFIG_STMMAC_ETH=y 46 47 CONFIG_ICPLUS_PHY=y 47 - CONFIG_BRCMFMAC=y 48 + CONFIG_BRCMFMAC=m 48 49 # CONFIG_INPUT_KEYBOARD is not set 49 50 # CONFIG_INPUT_MOUSE is not set 50 51 # CONFIG_SERIO is not set ··· 58 55 CONFIG_SERIAL_8250_RUNTIME_UARTS=2 59 56 CONFIG_SERIAL_8250_INGENIC=y 60 57 CONFIG_SERIAL_OF_PLATFORM=y 61 - # CONFIG_HW_RANDOM is not set 58 + CONFIG_SERIAL_SC16IS7XX=y 59 + # CONFIG_SERIAL_SC16IS7XX_I2C is not set 60 + CONFIG_SERIAL_SC16IS7XX_SPI=y 62 61 CONFIG_I2C=y 63 62 CONFIG_I2C_JZ4780=y 63 + CONFIG_SPI=y 64 + CONFIG_SPI_GPIO=y 64 65 CONFIG_GPIO_SYSFS=y 65 - CONFIG_SENSORS_ADS7828=y 66 + CONFIG_SENSORS_ADS7828=m 66 67 CONFIG_WATCHDOG=y 67 68 CONFIG_JZ4740_WDT=y 68 69 # CONFIG_VGA_CONSOLE is not set 69 70 # CONFIG_HID is not set 70 - # CONFIG_USB_SUPPORT is not set 71 + CONFIG_USB=y 72 + CONFIG_USB_STORAGE=y 73 + CONFIG_USB_DWC2=y 74 + CONFIG_USB_SERIAL=y 75 + CONFIG_USB_SERIAL_CH341=y 76 + CONFIG_USB_GADGET=y 71 77 CONFIG_MMC=y 72 78 CONFIG_MMC_JZ4740=y 73 79 CONFIG_NEW_LEDS=y ··· 87 75 CONFIG_RTC_DRV_JZ4740=y 88 76 CONFIG_DMADEVICES=y 89 77 CONFIG_DMA_JZ4780=y 78 + # CONFIG_INGENIC_TIMER is not set 79 + CONFIG_INGENIC_SYSOST=y 90 80 # CONFIG_IOMMU_SUPPORT is not set 81 + CONFIG_JZ4770_PHY=y 91 82 CONFIG_EXT4_FS=y 92 83 # CONFIG_DNOTIFY is not set 93 84 CONFIG_AUTOFS_FS=y 85 + CONFIG_VFAT_FS=y 86 + CONFIG_FAT_DEFAULT_UTF8=y 94 87 CONFIG_PROC_KCORE=y 95 88 # CONFIG_PROC_PAGE_MONITOR is not set 96 89 CONFIG_TMPFS=y 97 90 CONFIG_CONFIGFS_FS=y 98 91 CONFIG_NFS_FS=y 99 92 CONFIG_NLS=y 93 + CONFIG_NLS_CODEPAGE_437=y 100 94 CONFIG_NLS_CODEPAGE_936=y 101 95 CONFIG_NLS_CODEPAGE_950=y 102 96 CONFIG_NLS_ASCII=y
-1
arch/mips/configs/gcw0_defconfig
··· 73 73 CONFIG_DRM_INGENIC=y 74 74 CONFIG_DRM_ETNAVIV=y 75 75 CONFIG_BACKLIGHT_CLASS_DEVICE=y 76 - # CONFIG_BACKLIGHT_GENERIC is not set 77 76 CONFIG_BACKLIGHT_PWM=y 78 77 # CONFIG_VGA_CONSOLE is not set 79 78 CONFIG_FRAMEBUFFER_CONSOLE=y
-1
arch/mips/configs/gpr_defconfig
··· 249 249 # CONFIG_VGA_ARB is not set 250 250 # CONFIG_LCD_CLASS_DEVICE is not set 251 251 CONFIG_BACKLIGHT_CLASS_DEVICE=y 252 - # CONFIG_BACKLIGHT_GENERIC is not set 253 252 # CONFIG_VGA_CONSOLE is not set 254 253 CONFIG_USB_HID=m 255 254 CONFIG_USB_HIDDEV=y
-1
arch/mips/configs/lemote2f_defconfig
··· 145 145 CONFIG_FB_SIS_315=y 146 146 # CONFIG_LCD_CLASS_DEVICE is not set 147 147 CONFIG_BACKLIGHT_CLASS_DEVICE=y 148 - CONFIG_BACKLIGHT_GENERIC=m 149 148 # CONFIG_VGA_CONSOLE is not set 150 149 CONFIG_FRAMEBUFFER_CONSOLE=y 151 150 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-1
arch/mips/configs/loongson3_defconfig
··· 286 286 CONFIG_FB_RADEON=y 287 287 CONFIG_LCD_CLASS_DEVICE=y 288 288 CONFIG_LCD_PLATFORM=m 289 - CONFIG_BACKLIGHT_GENERIC=m 290 289 # CONFIG_VGA_CONSOLE is not set 291 290 CONFIG_FRAMEBUFFER_CONSOLE=y 292 291 CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-1
arch/mips/configs/mtx1_defconfig
··· 448 448 # CONFIG_VGA_ARB is not set 449 449 # CONFIG_LCD_CLASS_DEVICE is not set 450 450 CONFIG_BACKLIGHT_CLASS_DEVICE=y 451 - # CONFIG_BACKLIGHT_GENERIC is not set 452 451 # CONFIG_VGA_CONSOLE is not set 453 452 CONFIG_SOUND=m 454 453 CONFIG_SND=m
-1
arch/mips/configs/rs90_defconfig
··· 97 97 CONFIG_DRM_PANEL_SIMPLE=y 98 98 CONFIG_DRM_INGENIC=y 99 99 CONFIG_BACKLIGHT_CLASS_DEVICE=y 100 - # CONFIG_BACKLIGHT_GENERIC is not set 101 100 CONFIG_BACKLIGHT_PWM=y 102 101 # CONFIG_VGA_CONSOLE is not set 103 102 CONFIG_FRAMEBUFFER_CONSOLE=y
+33 -4
arch/mips/generic/Kconfig
··· 31 31 depends on LEGACY_BOARD_SEAD3 32 32 33 33 config LEGACY_BOARD_OCELOT 34 - bool "Support MSCC Ocelot boards" 34 + bool "Legacy support for Ocelot based boards" 35 35 depends on LEGACY_BOARD_SEAD3=n 36 36 select LEGACY_BOARDS 37 - select MSCC_OCELOT 37 + select SOC_VCOREIII 38 38 select SYS_HAS_EARLY_PRINTK 39 39 select USE_GENERIC_EARLY_PRINTK_8250 40 40 41 - config MSCC_OCELOT 41 + config SOC_VCOREIII 42 42 bool 43 43 select GPIOLIB 44 44 select MSCC_OCELOT_IRQ 45 + select MSCC_OCELOT #will be removed when driver no more use it 46 + 47 + #Will be removed when the driver using it will be converted to SOC_VCOREIII 48 + config MSCC_OCELOT 49 + bool 45 50 46 51 comment "FIT/UHI Boards" 47 52 ··· 72 67 73 68 config FIT_IMAGE_FDT_OCELOT 74 69 bool "Include FDT for Microsemi Ocelot development platforms" 75 - select MSCC_OCELOT 70 + select SOC_VCOREIII 76 71 help 77 72 Enable this to include the FDT for the Ocelot development platforms 73 + from Microsemi in the FIT kernel image. 74 + This requires u-boot on the platform. 75 + 76 + config FIT_IMAGE_FDT_LUTON 77 + bool "Include FDT for Microsemi Luton development platforms" 78 + select SOC_VCOREIII 79 + help 80 + Enable this to include the FDT for the Luton development platforms 81 + from Microsemi in the FIT kernel image. 82 + This requires u-boot on the platform. 83 + 84 + config FIT_IMAGE_FDT_JAGUAR2 85 + bool "Include FDT for Microsemi Jaguar2 development platforms" 86 + select SOC_VCOREIII 87 + help 88 + Enable this to include the FDT for the Jaguar2 development platforms 89 + from Microsemi in the FIT kernel image. 90 + This requires u-boot on the platform. 91 + 92 + config FIT_IMAGE_FDT_SERVAL 93 + bool "Include FDT for Microsemi Serval development platforms" 94 + select SOC_VCOREIII 95 + help 96 + Enable this to include the FDT for the Serval development platforms 78 97 from Microsemi in the FIT kernel image. 79 98 This requires u-boot on the platform. 80 99
+3
arch/mips/generic/Platform
··· 20 20 its-$(CONFIG_FIT_IMAGE_FDT_BOSTON) += board-boston.its.S 21 21 its-$(CONFIG_FIT_IMAGE_FDT_NI169445) += board-ni169445.its.S 22 22 its-$(CONFIG_FIT_IMAGE_FDT_OCELOT) += board-ocelot.its.S 23 + its-$(CONFIG_FIT_IMAGE_FDT_LUTON) += board-luton.its.S 24 + its-$(CONFIG_FIT_IMAGE_FDT_JAGUAR2) += board-jaguar2.its.S 25 + its-$(CONFIG_FIT_IMAGE_FDT_SERVAL) += board-serval.its.S 23 26 its-$(CONFIG_FIT_IMAGE_FDT_XILFPGA) += board-xilfpga.its.S
+40
arch/mips/generic/board-jaguar2.its.S
··· 1 + /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2 + / { 3 + images { 4 + fdt@jaguar2_pcb110 { 5 + description = "MSCC Jaguar2 PCB110 Device Tree"; 6 + data = /incbin/("boot/dts/mscc/jaguar2_pcb110.dtb"); 7 + type = "flat_dt"; 8 + arch = "mips"; 9 + compression = "none"; 10 + hash@0 { 11 + algo = "sha1"; 12 + }; 13 + }; 14 + fdt@jaguar2_pcb111 { 15 + description = "MSCC Jaguar2 PCB111 Device Tree"; 16 + data = /incbin/("boot/dts/mscc/jaguar2_pcb111.dtb"); 17 + type = "flat_dt"; 18 + arch = "mips"; 19 + compression = "none"; 20 + hash@0 { 21 + algo = "sha1"; 22 + }; 23 + }; 24 + }; 25 + 26 + configurations { 27 + pcb110 { 28 + description = "Jaguar2 Linux kernel"; 29 + kernel = "kernel@0"; 30 + fdt = "fdt@jaguar2_pcb110"; 31 + ramdisk = "ramdisk"; 32 + }; 33 + pcb111 { 34 + description = "Jaguar2 Linux kernel"; 35 + kernel = "kernel@0"; 36 + fdt = "fdt@jaguar2_pcb111"; 37 + ramdisk = "ramdisk"; 38 + }; 39 + }; 40 + };
+23
arch/mips/generic/board-luton.its.S
··· 1 + /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2 + / { 3 + images { 4 + fdt@luton_pcb091 { 5 + description = "MSCC Luton PCB091 Device Tree"; 6 + data = /incbin/("boot/dts/mscc/luton_pcb091.dtb"); 7 + type = "flat_dt"; 8 + arch = "mips"; 9 + compression = "none"; 10 + hash@0 { 11 + algo = "sha1"; 12 + }; 13 + }; 14 + }; 15 + 16 + configurations { 17 + pcb091 { 18 + description = "Luton Linux kernel"; 19 + kernel = "kernel@0"; 20 + fdt = "fdt@luton_pcb091"; 21 + }; 22 + }; 23 + };
+24
arch/mips/generic/board-serval.its.S
··· 1 + /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 2 + / { 3 + images { 4 + fdt@serval_pcb105 { 5 + description = "MSCC Serval PCB105 Device Tree"; 6 + data = /incbin/("boot/dts/mscc/serval_pcb105.dtb"); 7 + type = "flat_dt"; 8 + arch = "mips"; 9 + compression = "none"; 10 + hash@0 { 11 + algo = "sha1"; 12 + }; 13 + }; 14 + }; 15 + 16 + configurations { 17 + pcb105 { 18 + description = "Serval Linux kernel"; 19 + kernel = "kernel@0"; 20 + fdt = "fdt@serval_pcb105"; 21 + ramdisk = "ramdisk"; 22 + }; 23 + }; 24 + };
+1 -8
arch/mips/include/asm/compiler.h
··· 43 43 #undef barrier_before_unreachable 44 44 #define barrier_before_unreachable() asm volatile(".insn") 45 45 46 - #if !defined(CONFIG_CC_IS_GCC) || \ 47 - (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) 48 - # define GCC_OFF_SMALL_ASM() "ZC" 49 - #elif defined(CONFIG_CPU_MICROMIPS) 50 - # error "microMIPS compilation unsupported with GCC older than 4.9" 51 - #else 52 - # define GCC_OFF_SMALL_ASM() "R" 53 - #endif 46 + #define GCC_OFF_SMALL_ASM() "ZC" 54 47 55 48 #ifdef CONFIG_CPU_MIPSR6 56 49 #define MIPS_ISA_LEVEL "mips64r6"
-2
arch/mips/include/asm/cpu-features.h
··· 115 115 #ifndef cpu_has_3k_cache 116 116 #define cpu_has_3k_cache __isa_lt_and_opt(1, MIPS_CPU_3K_CACHE) 117 117 #endif 118 - #define cpu_has_6k_cache 0 119 - #define cpu_has_8k_cache 0 120 118 #ifndef cpu_has_4k_cache 121 119 #define cpu_has_4k_cache __isa_ge_or_opt(1, MIPS_CPU_4K_CACHE) 122 120 #endif
+4
arch/mips/include/asm/mach-loongson64/boot_param.h
··· 228 228 extern struct efi_memory_map_loongson *loongson_memmap; 229 229 extern struct loongson_system_configuration loongson_sysconf; 230 230 231 + extern struct board_devices *eboard; 232 + extern struct interface_info *einter; 233 + extern struct loongson_special_attribute *especial; 234 + 231 235 extern u32 node_id_offset; 232 236 extern void ls7a_early_config(void); 233 237 extern void rs780e_early_config(void);
-8
arch/mips/include/asm/mach-loongson64/kernel-entry-init.h
··· 19 19 .macro kernel_entry_setup 20 20 .set push 21 21 .set mips64 22 - /* Set LPA on LOONGSON3 config3 */ 23 - mfc0 t0, CP0_CONFIG3 24 - or t0, (0x1 << 7) 25 - mtc0 t0, CP0_CONFIG3 26 22 /* Set ELPA on LOONGSON3 pagegrain */ 27 23 mfc0 t0, CP0_PAGEGRAIN 28 24 or t0, (0x1 << 29) ··· 50 54 .macro smp_slave_setup 51 55 .set push 52 56 .set mips64 53 - /* Set LPA on LOONGSON3 config3 */ 54 - mfc0 t0, CP0_CONFIG3 55 - or t0, (0x1 << 7) 56 - mtc0 t0, CP0_CONFIG3 57 57 /* Set ELPA on LOONGSON3 pagegrain */ 58 58 mfc0 t0, CP0_PAGEGRAIN 59 59 or t0, (0x1 << 29)
+10
arch/mips/include/asm/mach-loongson64/loongson_regs.h
··· 227 227 #define CSR_IPI_SEND_CPU_SHIFT 16 228 228 #define CSR_IPI_SEND_BLOCK BIT(31) 229 229 230 + #define LOONGSON_CSR_MAIL_BUF0 0x1020 231 + #define LOONGSON_CSR_MAIL_SEND 0x1048 232 + #define CSR_MAIL_SEND_BLOCK BIT_ULL(31) 233 + #define CSR_MAIL_SEND_BOX_LOW(box) (box << 1) 234 + #define CSR_MAIL_SEND_BOX_HIGH(box) ((box << 1) + 1) 235 + #define CSR_MAIL_SEND_BOX_SHIFT 2 236 + #define CSR_MAIL_SEND_CPU_SHIFT 16 237 + #define CSR_MAIL_SEND_BUF_SHIFT 32 238 + #define CSR_MAIL_SEND_H32_MASK 0xFFFFFFFF00000000ULL 239 + 230 240 static inline u64 drdtime(void) 231 241 { 232 242 int rID = 0;
+2 -8
arch/mips/include/asm/pgtable.h
··· 25 25 struct mm_struct; 26 26 struct vm_area_struct; 27 27 28 - #define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_NO_READ | \ 29 - _page_cachable_default) 30 - #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_WRITE | \ 31 - _page_cachable_default) 32 - #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_NO_EXEC | \ 33 - _page_cachable_default) 34 - #define PAGE_READONLY __pgprot(_PAGE_PRESENT | \ 35 - _page_cachable_default) 28 + #define PAGE_SHARED vm_get_page_prot(VM_READ|VM_WRITE|VM_SHARED) 29 + 36 30 #define PAGE_KERNEL __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \ 37 31 _PAGE_GLOBAL | _page_cachable_default) 38 32 #define PAGE_KERNEL_NC __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
-1
arch/mips/include/asm/types.h
··· 12 12 #define _ASM_TYPES_H 13 13 14 14 #include <asm-generic/int-ll64.h> 15 - #include <uapi/asm/types.h> 16 15 17 16 #endif /* _ASM_TYPES_H */
+1
arch/mips/kernel/mips-cm.c
··· 266 266 if ((base_reg & CM_GCR_BASE_GCRBASE) != addr) { 267 267 pr_err("GCRs appear to have been moved (expected them at 0x%08lx)!\n", 268 268 (unsigned long)addr); 269 + iounmap(mips_gcr_base); 269 270 mips_gcr_base = NULL; 270 271 return -ENODEV; 271 272 }
+10 -3
arch/mips/kernel/relocate.c
··· 64 64 : "r" (kbase)); 65 65 66 66 kbase += step; 67 - } while (kbase < kend); 67 + } while (step && kbase < kend); 68 68 69 69 /* Completion barrier */ 70 70 __sync(); ··· 95 95 96 96 /* Original target address */ 97 97 target_addr <<= 2; 98 - target_addr += (unsigned long)loc_orig & ~0x03ffffff; 98 + target_addr += (unsigned long)loc_orig & 0xf0000000; 99 99 100 100 /* Get the new target address */ 101 101 target_addr += offset; ··· 105 105 return -ENOEXEC; 106 106 } 107 107 108 - target_addr -= (unsigned long)loc_new & ~0x03ffffff; 108 + target_addr -= (unsigned long)loc_new & 0xf0000000; 109 109 target_addr >>= 2; 110 110 111 111 *loc_new = (*loc_new & ~0x03ffffff) | (target_addr & 0x03ffffff); ··· 293 293 } 294 294 return 1; 295 295 } 296 + 297 + #if defined(CONFIG_USE_OF) 298 + void __weak *plat_get_fdt(void) 299 + { 300 + return NULL; 301 + } 302 + #endif 296 303 297 304 void *__init relocate_kernel(void) 298 305 {
+4 -4
arch/mips/kernel/setup.c
··· 498 498 499 499 static void __init check_kernel_sections_mem(void) 500 500 { 501 - phys_addr_t start = PFN_PHYS(PFN_DOWN(__pa_symbol(&_text))); 502 - phys_addr_t size = PFN_PHYS(PFN_UP(__pa_symbol(&_end))) - start; 501 + phys_addr_t start = __pa_symbol(&_text); 502 + phys_addr_t size = __pa_symbol(&_end) - start; 503 503 504 504 if (!memblock_is_region_memory(start, size)) { 505 505 pr_info("Kernel sections are not in the memory maps\n"); ··· 688 688 689 689 fdt_init_reserved_mem(); 690 690 691 - memblock_dump_all(); 692 - 693 691 early_memtest(PFN_PHYS(ARCH_PFN_OFFSET), PFN_PHYS(max_low_pfn)); 694 692 } 695 693 ··· 785 787 786 788 cpu_cache_init(); 787 789 paging_init(); 790 + 791 + memblock_dump_all(); 788 792 } 789 793 790 794 unsigned long kernelsp[NR_CPUS];
-3
arch/mips/kernel/smp-bmips.c
··· 362 362 { 363 363 unsigned int cpu = smp_processor_id(); 364 364 365 - if (cpu == 0) 366 - return -EBUSY; 367 - 368 365 pr_info("SMP: CPU%d is offline\n", cpu); 369 366 370 367 set_cpu_online(cpu, false);
+2
arch/mips/kernel/smp-cps.c
··· 12 12 #include <linux/slab.h> 13 13 #include <linux/smp.h> 14 14 #include <linux/types.h> 15 + #include <linux/irq.h> 15 16 16 17 #include <asm/bcache.h> 17 18 #include <asm/mips-cps.h> ··· 462 461 smp_mb__after_atomic(); 463 462 set_cpu_online(cpu, false); 464 463 calculate_cpu_foreign_map(); 464 + irq_migrate_all_off_this_cpu(); 465 465 466 466 return 0; 467 467 }
+2 -2
arch/mips/kernel/vdso.c
··· 161 161 gic_pfn = virt_to_phys(mips_gic_base + MIPS_GIC_USER_OFS) >> PAGE_SHIFT; 162 162 163 163 ret = io_remap_pfn_range(vma, base, gic_pfn, gic_size, 164 - pgprot_noncached(PAGE_READONLY)); 164 + pgprot_noncached(vma->vm_page_prot)); 165 165 if (ret) 166 166 goto out; 167 167 } ··· 169 169 /* Map data page. */ 170 170 ret = remap_pfn_range(vma, data_addr, 171 171 virt_to_phys(vdso_data) >> PAGE_SHIFT, 172 - PAGE_SIZE, PAGE_READONLY); 172 + PAGE_SIZE, vma->vm_page_prot); 173 173 if (ret) 174 174 goto out; 175 175
+3 -1
arch/mips/kvm/mmu.c
··· 1074 1074 { 1075 1075 kvm_pfn_t pfn; 1076 1076 pte_t *ptep; 1077 + pgprot_t prot; 1077 1078 1078 1079 ptep = kvm_trap_emul_pte_for_gva(vcpu, badvaddr); 1079 1080 if (!ptep) { ··· 1084 1083 1085 1084 pfn = PFN_DOWN(virt_to_phys(vcpu->arch.kseg0_commpage)); 1086 1085 /* Also set valid and dirty, so refill handler doesn't have to */ 1087 - *ptep = pte_mkyoung(pte_mkdirty(pfn_pte(pfn, PAGE_SHARED))); 1086 + prot = vm_get_page_prot(VM_READ|VM_WRITE|VM_SHARED); 1087 + *ptep = pte_mkyoung(pte_mkdirty(pfn_pte(pfn, prot))); 1088 1088 1089 1089 /* Invalidate this entry in the TLB, guest kernel ASID only */ 1090 1090 kvm_mips_host_tlb_inv(vcpu, badvaddr, false, true);
+3 -1
arch/mips/lib/uncached.c
··· 37 37 */ 38 38 unsigned long run_uncached(void *func) 39 39 { 40 - register long sp __asm__("$sp"); 41 40 register long ret __asm__("$2"); 42 41 long lfunc = (long)func, ufunc; 43 42 long usp; 43 + long sp; 44 + 45 + __asm__("move %0, $sp" : "=r" (sp)); 44 46 45 47 if (sp >= (long)CKSEG0 && sp < (long)CKSEG2) 46 48 usp = CKSEG1ADDR(sp);
+1
arch/mips/loongson64/Makefile
··· 11 11 obj-$(CONFIG_SUSPEND) += pm.o 12 12 obj-$(CONFIG_PCI_QUIRKS) += vbios_quirk.o 13 13 obj-$(CONFIG_CPU_LOONGSON3_CPUCFG_EMULATION) += cpucfg-emul.o 14 + obj-$(CONFIG_SYSFS) += boardinfo.o
+48
arch/mips/loongson64/boardinfo.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <linux/kobject.h> 3 + #include <boot_param.h> 4 + 5 + static ssize_t boardinfo_show(struct kobject *kobj, 6 + struct kobj_attribute *attr, char *buf) 7 + { 8 + char board_manufacturer[64] = {0}; 9 + char *tmp_board_manufacturer = board_manufacturer; 10 + char bios_vendor[64] = {0}; 11 + char *tmp_bios_vendor = bios_vendor; 12 + 13 + strcpy(board_manufacturer, eboard->name); 14 + strcpy(bios_vendor, einter->description); 15 + 16 + return sprintf(buf, 17 + "Board Info\n" 18 + "Manufacturer\t\t: %s\n" 19 + "Board Name\t\t: %s\n" 20 + "Family\t\t\t: LOONGSON3\n\n" 21 + "BIOS Info\n" 22 + "Vendor\t\t\t: %s\n" 23 + "Version\t\t\t: %s\n" 24 + "ROM Size\t\t: %d KB\n" 25 + "Release Date\t\t: %s\n", 26 + strsep(&tmp_board_manufacturer, "-"), 27 + eboard->name, 28 + strsep(&tmp_bios_vendor, "-"), 29 + einter->description, 30 + einter->size, 31 + especial->special_name); 32 + } 33 + static struct kobj_attribute boardinfo_attr = __ATTR(boardinfo, 0444, 34 + boardinfo_show, NULL); 35 + 36 + static int __init boardinfo_init(void) 37 + { 38 + struct kobject *lefi_kobj; 39 + 40 + lefi_kobj = kobject_create_and_add("lefi", firmware_kobj); 41 + if (!lefi_kobj) { 42 + pr_err("lefi: Firmware registration failed.\n"); 43 + return -ENOMEM; 44 + } 45 + 46 + return sysfs_create_file(lefi_kobj, &boardinfo_attr.attr); 47 + } 48 + late_initcall(boardinfo_init);
+10
arch/mips/loongson64/env.c
··· 28 28 struct efi_memory_map_loongson *loongson_memmap; 29 29 struct loongson_system_configuration loongson_sysconf; 30 30 31 + struct board_devices *eboard; 32 + struct interface_info *einter; 33 + struct loongson_special_attribute *especial; 34 + 31 35 u64 loongson_chipcfg[MAX_PACKAGES] = {0xffffffffbfc00180}; 32 36 u64 loongson_chiptemp[MAX_PACKAGES]; 33 37 u64 loongson_freqctrl[MAX_PACKAGES]; ··· 61 57 ((u64)loongson_p + loongson_p->system_offset); 62 58 ecpu = (struct efi_cpuinfo_loongson *) 63 59 ((u64)loongson_p + loongson_p->cpu_offset); 60 + eboard = (struct board_devices *) 61 + ((u64)loongson_p + loongson_p->boarddev_table_offset); 62 + einter = (struct interface_info *) 63 + ((u64)loongson_p + loongson_p->interface_offset); 64 + especial = (struct loongson_special_attribute *) 65 + ((u64)loongson_p + loongson_p->special_offset); 64 66 eirq_source = (struct irq_source_routing_table *) 65 67 ((u64)loongson_p + loongson_p->irq_offset); 66 68 loongson_memmap = (struct efi_memory_map_loongson *)
+7 -20
arch/mips/loongson64/numa.c
··· 35 35 cpumask_t __node_cpumask[MAX_NUMNODES]; 36 36 EXPORT_SYMBOL(__node_cpumask); 37 37 38 - static void enable_lpa(void) 39 - { 40 - unsigned long value; 41 - 42 - value = __read_32bit_c0_register($16, 3); 43 - value |= 0x00000080; 44 - __write_32bit_c0_register($16, 3, value); 45 - value = __read_32bit_c0_register($16, 3); 46 - pr_info("CP0_Config3: CP0 16.3 (0x%lx)\n", value); 47 - 48 - value = __read_32bit_c0_register($5, 1); 49 - value |= 0x20000000; 50 - __write_32bit_c0_register($5, 1, value); 51 - value = __read_32bit_c0_register($5, 1); 52 - pr_info("CP0_PageGrain: CP0 5.1 (0x%lx)\n", value); 53 - } 54 - 55 38 static void cpu_node_probe(void) 56 39 { 57 40 int i; ··· 151 168 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; 152 169 153 170 if (node == 0) { 171 + /* kernel start address */ 172 + unsigned long kernel_start_pfn = PFN_DOWN(__pa_symbol(&_text)); 173 + 154 174 /* kernel end address */ 155 175 unsigned long kernel_end_pfn = PFN_UP(__pa_symbol(&_end)); 156 176 ··· 161 175 max_low_pfn = end_pfn; 162 176 163 177 /* Reserve the kernel text/data/bss */ 164 - memblock_reserve(start_pfn << PAGE_SHIFT, 165 - ((kernel_end_pfn - start_pfn) << PAGE_SHIFT)); 178 + memblock_reserve(kernel_start_pfn << PAGE_SHIFT, 179 + ((kernel_end_pfn - kernel_start_pfn) << PAGE_SHIFT)); 166 180 167 181 /* Reserve 0xfe000000~0xffffffff for RS780E integrated GPU */ 168 182 if (node_end_pfn(0) >= (0xffffffff >> PAGE_SHIFT)) ··· 229 243 230 244 void __init prom_init_numa_memory(void) 231 245 { 232 - enable_lpa(); 246 + pr_info("CP0_Config3: CP0 16.3 (0x%x)\n", read_c0_config3()); 247 + pr_info("CP0_PageGrain: CP0 5.1 (0x%x)\n", read_c0_pagegrain()); 233 248 prom_meminit(); 234 249 } 235 250 EXPORT_SYMBOL(prom_init_numa_memory);
+99 -27
arch/mips/loongson64/smp.c
··· 53 53 54 54 u32 (*ipi_read_clear)(int cpu); 55 55 void (*ipi_write_action)(int cpu, u32 action); 56 + void (*ipi_write_enable)(int cpu); 57 + void (*ipi_clear_buf)(int cpu); 58 + void (*ipi_write_buf)(int cpu, struct task_struct *idle); 59 + 60 + /* send mail via Mail_Send register for 3A4000+ CPU */ 61 + static void csr_mail_send(uint64_t data, int cpu, int mailbox) 62 + { 63 + uint64_t val; 64 + 65 + /* send high 32 bits */ 66 + val = CSR_MAIL_SEND_BLOCK; 67 + val |= (CSR_MAIL_SEND_BOX_HIGH(mailbox) << CSR_MAIL_SEND_BOX_SHIFT); 68 + val |= (cpu << CSR_MAIL_SEND_CPU_SHIFT); 69 + val |= (data & CSR_MAIL_SEND_H32_MASK); 70 + csr_writeq(val, LOONGSON_CSR_MAIL_SEND); 71 + 72 + /* send low 32 bits */ 73 + val = CSR_MAIL_SEND_BLOCK; 74 + val |= (CSR_MAIL_SEND_BOX_LOW(mailbox) << CSR_MAIL_SEND_BOX_SHIFT); 75 + val |= (cpu << CSR_MAIL_SEND_CPU_SHIFT); 76 + val |= (data << CSR_MAIL_SEND_BUF_SHIFT); 77 + csr_writeq(val, LOONGSON_CSR_MAIL_SEND); 78 + }; 56 79 57 80 static u32 csr_ipi_read_clear(int cpu) 58 81 { ··· 102 79 } 103 80 } 104 81 82 + static void csr_ipi_write_enable(int cpu) 83 + { 84 + csr_writel(0xffffffff, LOONGSON_CSR_IPI_EN); 85 + } 86 + 87 + static void csr_ipi_clear_buf(int cpu) 88 + { 89 + csr_writeq(0, LOONGSON_CSR_MAIL_BUF0); 90 + } 91 + 92 + static void csr_ipi_write_buf(int cpu, struct task_struct *idle) 93 + { 94 + unsigned long startargs[4]; 95 + 96 + /* startargs[] are initial PC, SP and GP for secondary CPU */ 97 + startargs[0] = (unsigned long)&smp_bootstrap; 98 + startargs[1] = (unsigned long)__KSTK_TOS(idle); 99 + startargs[2] = (unsigned long)task_thread_info(idle); 100 + startargs[3] = 0; 101 + 102 + pr_debug("CPU#%d, func_pc=%lx, sp=%lx, gp=%lx\n", 103 + cpu, startargs[0], startargs[1], startargs[2]); 104 + 105 + csr_mail_send(startargs[3], cpu_logical_map(cpu), 3); 106 + csr_mail_send(startargs[2], cpu_logical_map(cpu), 2); 107 + csr_mail_send(startargs[1], cpu_logical_map(cpu), 1); 108 + csr_mail_send(startargs[0], cpu_logical_map(cpu), 0); 109 + } 110 + 105 111 static u32 legacy_ipi_read_clear(int cpu) 106 112 { 107 113 u32 action; ··· 148 96 loongson3_ipi_write32((u32)action, ipi_set0_regs[cpu]); 149 97 } 150 98 99 + static void legacy_ipi_write_enable(int cpu) 100 + { 101 + loongson3_ipi_write32(0xffffffff, ipi_en0_regs[cpu_logical_map(cpu)]); 102 + } 103 + 104 + static void legacy_ipi_clear_buf(int cpu) 105 + { 106 + loongson3_ipi_write64(0, ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x0); 107 + } 108 + 109 + static void legacy_ipi_write_buf(int cpu, struct task_struct *idle) 110 + { 111 + unsigned long startargs[4]; 112 + 113 + /* startargs[] are initial PC, SP and GP for secondary CPU */ 114 + startargs[0] = (unsigned long)&smp_bootstrap; 115 + startargs[1] = (unsigned long)__KSTK_TOS(idle); 116 + startargs[2] = (unsigned long)task_thread_info(idle); 117 + startargs[3] = 0; 118 + 119 + pr_debug("CPU#%d, func_pc=%lx, sp=%lx, gp=%lx\n", 120 + cpu, startargs[0], startargs[1], startargs[2]); 121 + 122 + loongson3_ipi_write64(startargs[3], 123 + ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x18); 124 + loongson3_ipi_write64(startargs[2], 125 + ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x10); 126 + loongson3_ipi_write64(startargs[1], 127 + ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x8); 128 + loongson3_ipi_write64(startargs[0], 129 + ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x0); 130 + } 131 + 151 132 static void csr_ipi_probe(void) 152 133 { 153 134 if (cpu_has_csr() && csr_readl(LOONGSON_CSR_FEATURES) & LOONGSON_CSRF_IPI) { 154 135 ipi_read_clear = csr_ipi_read_clear; 155 136 ipi_write_action = csr_ipi_write_action; 137 + ipi_write_enable = csr_ipi_write_enable; 138 + ipi_clear_buf = csr_ipi_clear_buf; 139 + ipi_write_buf = csr_ipi_write_buf; 156 140 } else { 157 141 ipi_read_clear = legacy_ipi_read_clear; 158 142 ipi_write_action = legacy_ipi_write_action; 143 + ipi_write_enable = legacy_ipi_write_enable; 144 + ipi_clear_buf = legacy_ipi_clear_buf; 145 + ipi_write_buf = legacy_ipi_write_buf; 159 146 } 160 147 } 161 148 ··· 438 347 439 348 /* Set interrupt mask, but don't enable */ 440 349 change_c0_status(ST0_IM, imask); 441 - 442 - for (i = 0; i < num_possible_cpus(); i++) 443 - loongson3_ipi_write32(0xffffffff, ipi_en0_regs[cpu_logical_map(i)]); 350 + ipi_write_enable(cpu); 444 351 445 352 per_cpu(cpu_state, cpu) = CPU_ONLINE; 446 353 cpu_set_core(&cpu_data[cpu], ··· 470 381 471 382 write_c0_compare(read_c0_count() + mips_hpt_frequency/HZ); 472 383 local_irq_enable(); 473 - loongson3_ipi_write64(0, 474 - ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x0); 384 + ipi_clear_buf(cpu); 385 + 475 386 pr_info("CPU#%d finished, CP0_ST=%x\n", 476 387 smp_processor_id(), read_c0_status()); 477 388 } ··· 509 420 ipi_status0_regs_init(); 510 421 ipi_en0_regs_init(); 511 422 ipi_mailbox_buf_init(); 423 + ipi_write_enable(0); 424 + 512 425 cpu_set_core(&cpu_data[0], 513 426 cpu_logical_map(0) % loongson_sysconf.cores_per_package); 514 427 cpu_data[0].package = cpu_logical_map(0) / loongson_sysconf.cores_per_package; ··· 530 439 */ 531 440 static int loongson3_boot_secondary(int cpu, struct task_struct *idle) 532 441 { 533 - unsigned long startargs[4]; 534 - 535 442 pr_info("Booting CPU#%d...\n", cpu); 536 443 537 - /* startargs[] are initial PC, SP and GP for secondary CPU */ 538 - startargs[0] = (unsigned long)&smp_bootstrap; 539 - startargs[1] = (unsigned long)__KSTK_TOS(idle); 540 - startargs[2] = (unsigned long)task_thread_info(idle); 541 - startargs[3] = 0; 444 + ipi_write_buf(cpu, idle); 542 445 543 - pr_debug("CPU#%d, func_pc=%lx, sp=%lx, gp=%lx\n", 544 - cpu, startargs[0], startargs[1], startargs[2]); 545 - 546 - loongson3_ipi_write64(startargs[3], 547 - ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x18); 548 - loongson3_ipi_write64(startargs[2], 549 - ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x10); 550 - loongson3_ipi_write64(startargs[1], 551 - ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x8); 552 - loongson3_ipi_write64(startargs[0], 553 - ipi_mailbox_buf[cpu_logical_map(cpu)] + 0x0); 554 446 return 0; 555 447 } 556 448 ··· 543 469 { 544 470 unsigned long flags; 545 471 unsigned int cpu = smp_processor_id(); 546 - 547 - if (cpu == 0) 548 - return -EBUSY; 549 472 550 473 set_cpu_online(cpu, false); 551 474 calculate_cpu_foreign_map(); ··· 761 690 "1: li %[count], 0x100 \n" /* wait for init loop */ 762 691 "2: bnez %[count], 2b \n" /* limit mailbox access */ 763 692 " addiu %[count], -1 \n" 764 - " ld %[initfunc], 0x20(%[base]) \n" /* get PC via mailbox */ 693 + " lw %[initfunc], 0x20(%[base]) \n" /* check lower 32-bit as jump indicator */ 765 694 " beqz %[initfunc], 1b \n" 766 695 " nop \n" 696 + " ld %[initfunc], 0x20(%[base]) \n" /* get PC (whole 64-bit) via mailbox */ 767 697 " ld $sp, 0x28(%[base]) \n" /* get SP via mailbox */ 768 698 " ld $gp, 0x30(%[base]) \n" /* get GP via mailbox */ 769 699 " ld $a1, 0x38(%[base]) \n"
+5 -7
arch/mips/mm/c-r4k.c
··· 1609 1609 c->options |= MIPS_CPU_INCLUSIVE_CACHES; 1610 1610 } 1611 1611 1612 - static void __init loongson3_sc_init(void) 1612 + static void loongson3_sc_init(void) 1613 1613 { 1614 1614 struct cpuinfo_mips *c = &current_cpu_data; 1615 1615 unsigned int config2, lsize; ··· 1623 1623 c->scache.sets = 64 << ((config2 >> 8) & 15); 1624 1624 c->scache.ways = 1 + (config2 & 15); 1625 1625 1626 - scache_size = c->scache.sets * 1627 - c->scache.ways * 1628 - c->scache.linesz; 1629 - 1630 1626 /* Loongson-3 has 4-Scache banks, while Loongson-2K have only 2 banks */ 1631 1627 if ((c->processor_id & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64R) 1632 - scache_size *= 2; 1628 + c->scache.sets *= 2; 1633 1629 else 1634 - scache_size *= 4; 1630 + c->scache.sets *= 4; 1631 + 1632 + scache_size = c->scache.sets * c->scache.ways * c->scache.linesz; 1635 1633 1636 1634 c->scache.waybit = 0; 1637 1635 c->scache.waysize = scache_size / c->scache.ways;
+21 -46
arch/mips/mm/cache.c
··· 155 155 unsigned long _page_cachable_default; 156 156 EXPORT_SYMBOL(_page_cachable_default); 157 157 158 + #define PM(p) __pgprot(_page_cachable_default | (p)) 159 + 158 160 static inline void setup_protection_map(void) 159 161 { 160 - if (cpu_has_rixi) { 161 - protection_map[0] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 162 - protection_map[1] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC); 163 - protection_map[2] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 164 - protection_map[3] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC); 165 - protection_map[4] = __pgprot(_page_cachable_default | _PAGE_PRESENT); 166 - protection_map[5] = __pgprot(_page_cachable_default | _PAGE_PRESENT); 167 - protection_map[6] = __pgprot(_page_cachable_default | _PAGE_PRESENT); 168 - protection_map[7] = __pgprot(_page_cachable_default | _PAGE_PRESENT); 162 + protection_map[0] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 163 + protection_map[1] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC); 164 + protection_map[2] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 165 + protection_map[3] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC); 166 + protection_map[4] = PM(_PAGE_PRESENT); 167 + protection_map[5] = PM(_PAGE_PRESENT); 168 + protection_map[6] = PM(_PAGE_PRESENT); 169 + protection_map[7] = PM(_PAGE_PRESENT); 169 170 170 - protection_map[8] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 171 - protection_map[9] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC); 172 - protection_map[10] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_WRITE | _PAGE_NO_READ); 173 - protection_map[11] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_WRITE); 174 - protection_map[12] = __pgprot(_page_cachable_default | _PAGE_PRESENT); 175 - protection_map[13] = __pgprot(_page_cachable_default | _PAGE_PRESENT); 176 - protection_map[14] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_WRITE); 177 - protection_map[15] = __pgprot(_page_cachable_default | _PAGE_PRESENT | _PAGE_WRITE); 178 - 179 - } else { 180 - protection_map[0] = PAGE_NONE; 181 - protection_map[1] = PAGE_READONLY; 182 - protection_map[2] = PAGE_COPY; 183 - protection_map[3] = PAGE_COPY; 184 - protection_map[4] = PAGE_READONLY; 185 - protection_map[5] = PAGE_READONLY; 186 - protection_map[6] = PAGE_COPY; 187 - protection_map[7] = PAGE_COPY; 188 - protection_map[8] = PAGE_NONE; 189 - protection_map[9] = PAGE_READONLY; 190 - protection_map[10] = PAGE_SHARED; 191 - protection_map[11] = PAGE_SHARED; 192 - protection_map[12] = PAGE_READONLY; 193 - protection_map[13] = PAGE_READONLY; 194 - protection_map[14] = PAGE_SHARED; 195 - protection_map[15] = PAGE_SHARED; 196 - } 171 + protection_map[8] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_NO_READ); 172 + protection_map[9] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC); 173 + protection_map[10] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_WRITE | 174 + _PAGE_NO_READ); 175 + protection_map[11] = PM(_PAGE_PRESENT | _PAGE_NO_EXEC | _PAGE_WRITE); 176 + protection_map[12] = PM(_PAGE_PRESENT); 177 + protection_map[13] = PM(_PAGE_PRESENT); 178 + protection_map[14] = PM(_PAGE_PRESENT | _PAGE_WRITE); 179 + protection_map[15] = PM(_PAGE_PRESENT | _PAGE_WRITE); 197 180 } 181 + 182 + #undef PM 198 183 199 184 void cpu_cache_init(void) 200 185 { ··· 188 203 189 204 r3k_cache_init(); 190 205 } 191 - if (cpu_has_6k_cache) { 192 - extern void __weak r6k_cache_init(void); 193 - 194 - r6k_cache_init(); 195 - } 196 206 if (cpu_has_4k_cache) { 197 207 extern void __weak r4k_cache_init(void); 198 208 199 209 r4k_cache_init(); 200 - } 201 - if (cpu_has_8k_cache) { 202 - extern void __weak r8k_cache_init(void); 203 - 204 - r8k_cache_init(); 205 210 } 206 211 if (cpu_has_tx39_cache) { 207 212 extern void __weak tx39_cache_init(void);
-12
arch/mips/mm/hugetlbpage.c
··· 58 58 return (pte_t *) pmd; 59 59 } 60 60 61 - /* 62 - * This function checks for proper alignment of input addr and len parameters. 63 - */ 64 - int is_aligned_hugepage_range(unsigned long addr, unsigned long len) 65 - { 66 - if (len & ~HPAGE_MASK) 67 - return -EINVAL; 68 - if (addr & ~HPAGE_MASK) 69 - return -EINVAL; 70 - return 0; 71 - } 72 - 73 61 int pmd_huge(pmd_t pmd) 74 62 { 75 63 return (pmd_val(pmd) & _PAGE_HUGE) != 0;
+2 -2
arch/mips/mm/sc-mips.c
··· 146 146 return 1; 147 147 } 148 148 149 - static int __init mips_sc_probe_cm3(void) 149 + static int mips_sc_probe_cm3(void) 150 150 { 151 151 struct cpuinfo_mips *c = &current_cpu_data; 152 152 unsigned long cfg = read_gcr_l2_config(); ··· 180 180 return 0; 181 181 } 182 182 183 - static inline int __init mips_sc_probe(void) 183 + static inline int mips_sc_probe(void) 184 184 { 185 185 struct cpuinfo_mips *c = &current_cpu_data; 186 186 unsigned int config1, config2;
+3 -1
arch/mips/pci/pci-vr41xx.c
··· 293 293 master = setup->master_io; 294 294 io_map_base = ioremap(master->bus_base_address, 295 295 resource_size(res)); 296 - if (!io_map_base) 296 + if (!io_map_base) { 297 + iounmap(pciu_base); 297 298 return -EBUSY; 299 + } 298 300 299 301 vr41xx_pci_controller.io_map_base = (unsigned long)io_map_base; 300 302 }
+1 -3
drivers/bus/mips_cdmm.c
··· 559 559 dev_set_name(&dev->dev, "cdmm%u-%u", cpu, id); 560 560 ++id; 561 561 ret = device_register(&dev->dev); 562 - if (ret) { 562 + if (ret) 563 563 put_device(&dev->dev); 564 - kfree(dev); 565 - } 566 564 } 567 565 } 568 566
+7
drivers/reset/Kconfig
··· 35 35 help 36 36 This enables the reset controller driver for AXS10x. 37 37 38 + config RESET_BCM6345 39 + bool "BCM6345 Reset Controller" 40 + depends on BMIPS_GENERIC || COMPILE_TEST 41 + default BMIPS_GENERIC 42 + help 43 + This enables the reset controller driver for BCM6345 SoCs. 44 + 38 45 config RESET_BERLIN 39 46 bool "Berlin Reset Driver" if COMPILE_TEST 40 47 default ARCH_BERLIN
+1
drivers/reset/Makefile
··· 6 6 obj-$(CONFIG_RESET_A10SR) += reset-a10sr.o 7 7 obj-$(CONFIG_RESET_ATH79) += reset-ath79.o 8 8 obj-$(CONFIG_RESET_AXS10X) += reset-axs10x.o 9 + obj-$(CONFIG_RESET_BCM6345) += reset-bcm6345.o 9 10 obj-$(CONFIG_RESET_BERLIN) += reset-berlin.o 10 11 obj-$(CONFIG_RESET_BRCMSTB) += reset-brcmstb.o 11 12 obj-$(CONFIG_RESET_BRCMSTB_RESCAL) += reset-brcmstb-rescal.o
+135
drivers/reset/reset-bcm6345.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 + /* 3 + * BCM6345 Reset Controller Driver 4 + * 5 + * Copyright (C) 2020 Álvaro Fernández Rojas <noltari@gmail.com> 6 + */ 7 + 8 + #include <linux/delay.h> 9 + #include <linux/init.h> 10 + #include <linux/io.h> 11 + #include <linux/mod_devicetable.h> 12 + #include <linux/platform_device.h> 13 + #include <linux/reset-controller.h> 14 + 15 + #define BCM6345_RESET_NUM 32 16 + #define BCM6345_RESET_SLEEP_MIN_US 10000 17 + #define BCM6345_RESET_SLEEP_MAX_US 20000 18 + 19 + struct bcm6345_reset { 20 + struct reset_controller_dev rcdev; 21 + void __iomem *base; 22 + spinlock_t lock; 23 + }; 24 + 25 + static inline struct bcm6345_reset * 26 + to_bcm6345_reset(struct reset_controller_dev *rcdev) 27 + { 28 + return container_of(rcdev, struct bcm6345_reset, rcdev); 29 + } 30 + 31 + static int bcm6345_reset_update(struct reset_controller_dev *rcdev, 32 + unsigned long id, bool assert) 33 + { 34 + struct bcm6345_reset *bcm6345_reset = to_bcm6345_reset(rcdev); 35 + unsigned long flags; 36 + uint32_t val; 37 + 38 + spin_lock_irqsave(&bcm6345_reset->lock, flags); 39 + val = __raw_readl(bcm6345_reset->base); 40 + if (assert) 41 + val &= ~BIT(id); 42 + else 43 + val |= BIT(id); 44 + __raw_writel(val, bcm6345_reset->base); 45 + spin_unlock_irqrestore(&bcm6345_reset->lock, flags); 46 + 47 + return 0; 48 + } 49 + 50 + static int bcm6345_reset_assert(struct reset_controller_dev *rcdev, 51 + unsigned long id) 52 + { 53 + return bcm6345_reset_update(rcdev, id, true); 54 + } 55 + 56 + static int bcm6345_reset_deassert(struct reset_controller_dev *rcdev, 57 + unsigned long id) 58 + { 59 + return bcm6345_reset_update(rcdev, id, false); 60 + } 61 + 62 + static int bcm6345_reset_reset(struct reset_controller_dev *rcdev, 63 + unsigned long id) 64 + { 65 + bcm6345_reset_update(rcdev, id, true); 66 + usleep_range(BCM6345_RESET_SLEEP_MIN_US, 67 + BCM6345_RESET_SLEEP_MAX_US); 68 + 69 + bcm6345_reset_update(rcdev, id, false); 70 + /* 71 + * Ensure component is taken out reset state by sleeping also after 72 + * deasserting the reset. Otherwise, the component may not be ready 73 + * for operation. 74 + */ 75 + usleep_range(BCM6345_RESET_SLEEP_MIN_US, 76 + BCM6345_RESET_SLEEP_MAX_US); 77 + 78 + return 0; 79 + } 80 + 81 + static int bcm6345_reset_status(struct reset_controller_dev *rcdev, 82 + unsigned long id) 83 + { 84 + struct bcm6345_reset *bcm6345_reset = to_bcm6345_reset(rcdev); 85 + 86 + return !(__raw_readl(bcm6345_reset->base) & BIT(id)); 87 + } 88 + 89 + static struct reset_control_ops bcm6345_reset_ops = { 90 + .assert = bcm6345_reset_assert, 91 + .deassert = bcm6345_reset_deassert, 92 + .reset = bcm6345_reset_reset, 93 + .status = bcm6345_reset_status, 94 + }; 95 + 96 + static int bcm6345_reset_probe(struct platform_device *pdev) 97 + { 98 + struct bcm6345_reset *bcm6345_reset; 99 + 100 + bcm6345_reset = devm_kzalloc(&pdev->dev, 101 + sizeof(*bcm6345_reset), GFP_KERNEL); 102 + if (!bcm6345_reset) 103 + return -ENOMEM; 104 + 105 + platform_set_drvdata(pdev, bcm6345_reset); 106 + 107 + bcm6345_reset->base = devm_platform_ioremap_resource(pdev, 0); 108 + if (IS_ERR(bcm6345_reset->base)) 109 + return PTR_ERR(bcm6345_reset->base); 110 + 111 + spin_lock_init(&bcm6345_reset->lock); 112 + bcm6345_reset->rcdev.ops = &bcm6345_reset_ops; 113 + bcm6345_reset->rcdev.owner = THIS_MODULE; 114 + bcm6345_reset->rcdev.of_node = pdev->dev.of_node; 115 + bcm6345_reset->rcdev.of_reset_n_cells = 1; 116 + bcm6345_reset->rcdev.nr_resets = BCM6345_RESET_NUM; 117 + 118 + return devm_reset_controller_register(&pdev->dev, 119 + &bcm6345_reset->rcdev); 120 + } 121 + 122 + static const struct of_device_id bcm6345_reset_of_match[] = { 123 + { .compatible = "brcm,bcm6345-reset" }, 124 + { /* sentinel */ }, 125 + }; 126 + 127 + static struct platform_driver bcm6345_reset_driver = { 128 + .probe = bcm6345_reset_probe, 129 + .driver = { 130 + .name = "bcm6345-reset", 131 + .of_match_table = bcm6345_reset_of_match, 132 + .suppress_bind_attrs = true, 133 + }, 134 + }; 135 + builtin_platform_driver(bcm6345_reset_driver);
+20
include/dt-bindings/reset/bcm6318-reset.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + 3 + #ifndef __DT_BINDINGS_RESET_BCM6318_H 4 + #define __DT_BINDINGS_RESET_BCM6318_H 5 + 6 + #define BCM6318_RST_SPI 0 7 + #define BCM6318_RST_EPHY 1 8 + #define BCM6318_RST_SAR 2 9 + #define BCM6318_RST_ENETSW 3 10 + #define BCM6318_RST_USBD 4 11 + #define BCM6318_RST_USBH 5 12 + #define BCM6318_RST_PCIE_CORE 6 13 + #define BCM6318_RST_PCIE 7 14 + #define BCM6318_RST_PCIE_EXT 8 15 + #define BCM6318_RST_PCIE_HARD 9 16 + #define BCM6318_RST_ADSL 10 17 + #define BCM6318_RST_PHYMIPS 11 18 + #define BCM6318_RST_HOSTMIPS 12 19 + 20 + #endif /* __DT_BINDINGS_RESET_BCM6318_H */
+26
include/dt-bindings/reset/bcm63268-reset.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + 3 + #ifndef __DT_BINDINGS_RESET_BCM63268_H 4 + #define __DT_BINDINGS_RESET_BCM63268_H 5 + 6 + #define BCM63268_RST_SPI 0 7 + #define BCM63268_RST_IPSEC 1 8 + #define BCM63268_RST_EPHY 2 9 + #define BCM63268_RST_SAR 3 10 + #define BCM63268_RST_ENETSW 4 11 + #define BCM63268_RST_USBS 5 12 + #define BCM63268_RST_USBH 6 13 + #define BCM63268_RST_PCM 7 14 + #define BCM63268_RST_PCIE_CORE 8 15 + #define BCM63268_RST_PCIE 9 16 + #define BCM63268_RST_PCIE_EXT 10 17 + #define BCM63268_RST_WLAN_SHIM 11 18 + #define BCM63268_RST_DDR_PHY 12 19 + #define BCM63268_RST_FAP0 13 20 + #define BCM63268_RST_WLAN_UBUS 14 21 + #define BCM63268_RST_DECT 15 22 + #define BCM63268_RST_FAP1 16 23 + #define BCM63268_RST_PCIE_HARD 17 24 + #define BCM63268_RST_GPHY 18 25 + 26 + #endif /* __DT_BINDINGS_RESET_BCM63268_H */
+18
include/dt-bindings/reset/bcm6328-reset.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + 3 + #ifndef __DT_BINDINGS_RESET_BCM6328_H 4 + #define __DT_BINDINGS_RESET_BCM6328_H 5 + 6 + #define BCM6328_RST_SPI 0 7 + #define BCM6328_RST_EPHY 1 8 + #define BCM6328_RST_SAR 2 9 + #define BCM6328_RST_ENETSW 3 10 + #define BCM6328_RST_USBS 4 11 + #define BCM6328_RST_USBH 5 12 + #define BCM6328_RST_PCM 6 13 + #define BCM6328_RST_PCIE_CORE 7 14 + #define BCM6328_RST_PCIE 8 15 + #define BCM6328_RST_PCIE_EXT 9 16 + #define BCM6328_RST_PCIE_HARD 10 17 + 18 + #endif /* __DT_BINDINGS_RESET_BCM6328_H */
+15
include/dt-bindings/reset/bcm6358-reset.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + 3 + #ifndef __DT_BINDINGS_RESET_BCM6358_H 4 + #define __DT_BINDINGS_RESET_BCM6358_H 5 + 6 + #define BCM6358_RST_SPI 0 7 + #define BCM6358_RST_ENET 2 8 + #define BCM6358_RST_MPI 3 9 + #define BCM6358_RST_EPHY 6 10 + #define BCM6358_RST_SAR 7 11 + #define BCM6358_RST_USBH 12 12 + #define BCM6358_RST_PCM 13 13 + #define BCM6358_RST_ADSL 14 14 + 15 + #endif /* __DT_BINDINGS_RESET_BCM6358_H */
+22
include/dt-bindings/reset/bcm6362-reset.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + 3 + #ifndef __DT_BINDINGS_RESET_BCM6362_H 4 + #define __DT_BINDINGS_RESET_BCM6362_H 5 + 6 + #define BCM6362_RST_SPI 0 7 + #define BCM6362_RST_IPSEC 1 8 + #define BCM6362_RST_EPHY 2 9 + #define BCM6362_RST_SAR 3 10 + #define BCM6362_RST_ENETSW 4 11 + #define BCM6362_RST_USBD 5 12 + #define BCM6362_RST_USBH 6 13 + #define BCM6362_RST_PCM 7 14 + #define BCM6362_RST_PCIE_CORE 8 15 + #define BCM6362_RST_PCIE 9 16 + #define BCM6362_RST_PCIE_EXT 10 17 + #define BCM6362_RST_WLAN_SHIM 11 18 + #define BCM6362_RST_DDR_PHY 12 19 + #define BCM6362_RST_FAP 13 20 + #define BCM6362_RST_WLAN_UBUS 14 21 + 22 + #endif /* __DT_BINDINGS_RESET_BCM6362_H */
+16
include/dt-bindings/reset/bcm6368-reset.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + 3 + #ifndef __DT_BINDINGS_RESET_BCM6368_H 4 + #define __DT_BINDINGS_RESET_BCM6368_H 5 + 6 + #define BCM6368_RST_SPI 0 7 + #define BCM6368_RST_MPI 3 8 + #define BCM6368_RST_IPSEC 4 9 + #define BCM6368_RST_EPHY 6 10 + #define BCM6368_RST_SAR 7 11 + #define BCM6368_RST_SWITCH 10 12 + #define BCM6368_RST_USBD 11 13 + #define BCM6368_RST_USBH 12 14 + #define BCM6368_RST_PCM 13 15 + 16 + #endif /* __DT_BINDINGS_RESET_BCM6368_H */
-25
include/linux/platform_data/jz4740/jz4740_nand.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 - /* 3 - * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> 4 - * JZ4740 SoC NAND controller driver 5 - */ 6 - 7 - #ifndef __JZ4740_NAND_H__ 8 - #define __JZ4740_NAND_H__ 9 - 10 - #include <linux/mtd/rawnand.h> 11 - #include <linux/mtd/partitions.h> 12 - 13 - #define JZ_NAND_NUM_BANKS 4 14 - 15 - struct jz_nand_platform_data { 16 - int num_partitions; 17 - struct mtd_partition *partitions; 18 - 19 - unsigned char banks[JZ_NAND_NUM_BANKS]; 20 - 21 - void (*ident_callback)(struct platform_device *, struct mtd_info *, 22 - struct mtd_partition **, int *num_partitions); 23 - }; 24 - 25 - #endif