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

Merge tag 'bcm63138-v4' of http://github.com/brcm/linux into next/soc

Merge "ARM: BCM: Broadcom BCM63138 support" from Florian Fainelli:

This patchset adds very minimal support for the BCM63138 SoC which is
a xDSL SoC using a dual Cortex A9 CPU complex.

* tag 'bcm63138-v4' of http://github.com/brcm/linux:
MAINTAINERS: add entry for the Broadcom BCM63xx ARM SoCs
ARM: BCM63XX: add BCM963138DVT Reference platform DTS
ARM: BCM63XX: add BCM63138 minimal Device Tree
ARM: BCM63XX: add low-level UART debug support
ARM: BCM63XX: add basic support for the Broadcom BCM63138 DSL SoC

Conflicts:
arch/arm/Kconfig.debug

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+278 -2
+9
Documentation/devicetree/bindings/arm/bcm/bcm63138.txt
··· 1 + Broadcom BCM63138 DSL System-on-a-Chip device tree bindings 2 + ----------------------------------------------------------- 3 + 4 + Boards compatible with the BCM63138 DSL System-on-a-Chip should have the 5 + following properties: 6 + 7 + Required root node property: 8 + 9 + compatible: should be "brcm,bcm63138"
+8
MAINTAINERS
··· 2033 2033 F: arch/arm/boot/dts/bcm5301x.dtsi 2034 2034 F: arch/arm/boot/dts/bcm470* 2035 2035 2036 + BROADCOM BCM63XX ARM ARCHITECTURE 2037 + M: Florian Fainelli <f.fainelli@gmail.com> 2038 + L: linux-arm-kernel@lists.infradead.org 2039 + T: git git://git.github.com/brcm/linux.git 2040 + S: Maintained 2041 + F: arch/arm/mach-bcm/bcm63xx.c 2042 + F: arch/arm/include/debug/bcm63xx.S 2043 + 2036 2044 BROADCOM BCM7XXX ARM ARCHITECTURE 2037 2045 M: Marc Carino <marc.ceeeee@gmail.com> 2038 2046 M: Brian Norris <computersforpeace@gmail.com>
+16 -2
arch/arm/Kconfig.debug
··· 122 122 mobile SoCs in the Kona family of chips (e.g. bcm28155, 123 123 bcm11351, etc...) 124 124 125 + config DEBUG_BCM63XX 126 + bool "Kernel low-level debugging on BCM63XX UART" 127 + depends on ARCH_BCM_63XX 128 + select DEBUG_UART_BCM63XX 129 + 125 130 config DEBUG_BERLIN_UART 126 131 bool "Marvell Berlin SoC Debug UART" 127 132 depends on ARCH_BERLIN ··· 1067 1062 default "debug/vf.S" if DEBUG_VF_UART 1068 1063 default "debug/vt8500.S" if DEBUG_VT8500_UART0 1069 1064 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 1065 + default "debug/bcm63xx.S" if DEBUG_UART_BCM63XX 1070 1066 default "mach/debug-macro.S" 1071 1067 1072 1068 # Compatibility options for PL01x ··· 1086 1080 ARCH_GEMINI || ARCH_IOP13XX || ARCH_IOP32X || \ 1087 1081 ARCH_IOP33X || ARCH_IXP4XX || \ 1088 1082 ARCH_LPC32XX || ARCH_MV78XX0 || ARCH_ORION5X || ARCH_RPC 1083 + 1084 + # Compatibility options for BCM63xx 1085 + config DEBUG_UART_BCM63XX 1086 + def_bool ARCH_BCM_63XX 1089 1087 1090 1088 config DEBUG_UART_PHYS 1091 1089 hex "Physical base address of debug UART" ··· 1159 1149 default 0xffc02000 if DEBUG_SOCFPGA_UART 1160 1150 default 0xffd82340 if ARCH_IOP13XX 1161 1151 default 0xfff36000 if DEBUG_HIGHBANK_UART 1152 + default 0xfffe8600 if DEBUG_UART_BCM63XX 1162 1153 default 0xfffff700 if ARCH_IOP33X 1163 1154 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1164 1155 DEBUG_LL_UART_EFM32 || \ 1165 1156 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ 1166 - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART 1157 + DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ 1158 + DEBUG_UART_BCM63XX 1167 1159 1168 1160 config DEBUG_UART_VIRT 1169 1161 hex "Virtual base address of debug UART" ··· 1198 1186 default 0xfa71e000 if DEBUG_QCOM_UARTDM 1199 1187 default 0xfb009000 if DEBUG_REALVIEW_STD_PORT 1200 1188 default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT 1189 + default 0xfcfe8600 if DEBUG_UART_BCM63XX 1201 1190 default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX 1202 1191 default 0xfd000000 if ARCH_SPEAR13XX 1203 1192 default 0xfd012000 if ARCH_MV78XX0 ··· 1237 1224 default DEBUG_UART_PHYS if !MMU 1238 1225 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1239 1226 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ 1240 - DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART 1227 + DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ 1228 + DEBUG_UART_BCM63XX 1241 1229 1242 1230 config DEBUG_UART_8250_SHIFT 1243 1231 int "Register offset shift for the 8250 debug UART"
+1
arch/arm/boot/dts/Makefile
··· 53 53 dtb-$(CONFIG_ARCH_AXXIA) += axm5516-amarillo.dtb 54 54 dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb 55 55 dtb-$(CONFIG_ARCH_BCM_5301X) += bcm4708-netgear-r6250.dtb 56 + dtb-$(CONFIG_ARCH_BCM_63XX) += bcm963138dvt.dtb 56 57 dtb-$(CONFIG_ARCH_BCM_MOBILE) += bcm28155-ap.dtb \ 57 58 bcm21664-garnet.dtb 58 59 dtb-$(CONFIG_ARCH_BERLIN) += \
+134
arch/arm/boot/dts/bcm63138.dtsi
··· 1 + /* 2 + * Broadcom BCM63138 DSL SoCs Device Tree 3 + */ 4 + 5 + #include <dt-bindings/interrupt-controller/arm-gic.h> 6 + #include <dt-bindings/interrupt-controller/irq.h> 7 + 8 + #include "skeleton.dtsi" 9 + 10 + / { 11 + compatible = "brcm,bcm63138"; 12 + model = "Broadcom BCM63138 DSL SoC"; 13 + interrupt-parent = <&gic>; 14 + 15 + aliases { 16 + uart0 = &serial0; 17 + uart1 = &serial1; 18 + }; 19 + 20 + cpus { 21 + #address-cells = <1>; 22 + #size-cells = <0>; 23 + 24 + cpu@0 { 25 + device_type = "cpu"; 26 + compatible = "arm,cortex-a9"; 27 + next-level-cache = <&L2>; 28 + reg = <0>; 29 + }; 30 + 31 + cpu@1 { 32 + device_type = "cpu"; 33 + compatible = "arm,cortex-a9"; 34 + next-level-cache = <&L2>; 35 + reg = <1>; 36 + }; 37 + }; 38 + 39 + clocks { 40 + #address-cells = <1>; 41 + #size-cells = <0>; 42 + 43 + arm_timer_clk: arm_timer_clk { 44 + #clock-cells = <0>; 45 + compatible = "fixed-clock"; 46 + clock-frequency = <500000000>; 47 + }; 48 + 49 + periph_clk: periph_clk { 50 + #clock-cells = <0>; 51 + compatible = "fixed-clock"; 52 + clock-frequency = <50000000>; 53 + clock-output-names = "periph"; 54 + }; 55 + }; 56 + 57 + /* ARM bus */ 58 + axi@80000000 { 59 + compatible = "simple-bus"; 60 + ranges = <0 0x80000000 0x784000>; 61 + #address-cells = <1>; 62 + #size-cells = <1>; 63 + 64 + L2: cache-controller@1d000 { 65 + compatible = "arm,pl310-cache"; 66 + reg = <0x1d000 0x1000>; 67 + cache-unified; 68 + cache-level = <2>; 69 + cache-sets = <16>; 70 + cache-size = <0x80000>; 71 + interrupts = <GIC_PPI 0 IRQ_TYPE_LEVEL_HIGH>; 72 + }; 73 + 74 + scu: scu@1e000 { 75 + compatible = "arm,cortex-a9-scu"; 76 + reg = <0x1e000 0x100>; 77 + }; 78 + 79 + gic: interrupt-controller@1e100 { 80 + compatible = "arm,cortex-a9-gic"; 81 + reg = <0x1f000 0x1000 82 + 0x1e100 0x100>; 83 + #interrupt-cells = <3>; 84 + #address-cells = <0>; 85 + interrupt-controller; 86 + }; 87 + 88 + global_timer: timer@1e200 { 89 + compatible = "arm,cortex-a9-global-timer"; 90 + reg = <0x1e200 0x20>; 91 + interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; 92 + clocks = <&arm_timer_clk>; 93 + }; 94 + 95 + local_timer: local-timer@1e600 { 96 + compatible = "arm,cortex-a9-twd-timer"; 97 + reg = <0x1e600 0x20>; 98 + interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; 99 + clocks = <&arm_timer_clk>; 100 + }; 101 + 102 + twd_watchdog: watchdog@1e620 { 103 + compatible = "arm,cortex-a9-twd-wdt"; 104 + reg = <0x1e620 0x20>; 105 + interupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>; 106 + }; 107 + }; 108 + 109 + /* Legacy UBUS base */ 110 + ubus@fffe8000 { 111 + compatible = "simple-bus"; 112 + #address-cells = <1>; 113 + #size-cells = <1>; 114 + ranges = <0 0xfffe8000 0x8100>; 115 + 116 + serial0: serial@600 { 117 + compatible = "brcm,bcm6345-uart"; 118 + reg = <0x600 0x1b>; 119 + interrupts = <GIC_SPI 32 0>; 120 + clocks = <&periph_clk>; 121 + clock-names = "periph"; 122 + status = "disabled"; 123 + }; 124 + 125 + serial1: serial@620 { 126 + compatible = "brcm,bcm6345-uart"; 127 + reg = <0x620 0x1b>; 128 + interrupts = <GIC_SPI 33 0>; 129 + clocks = <&periph_clk>; 130 + clock-names = "periph"; 131 + status = "disabled"; 132 + }; 133 + }; 134 + };
+30
arch/arm/boot/dts/bcm963138dvt.dts
··· 1 + /* 2 + * Broadcom BCM63138 Reference Board DTS 3 + */ 4 + 5 + /dts-v1/; 6 + 7 + #include "bcm63138.dtsi" 8 + 9 + / { 10 + compatible = "brcm,BCM963138DVT", "brcm,bcm63138"; 11 + model = "Broadcom BCM963138DVT"; 12 + 13 + chosen { 14 + bootargs = "console=ttyS0,115200"; 15 + stdout-path = &serial0; 16 + }; 17 + 18 + memory { 19 + reg = <0x0 0x08000000>; 20 + }; 21 + 22 + }; 23 + 24 + &serial0 { 25 + status = "okay"; 26 + }; 27 + 28 + &serial1 { 29 + status = "okay"; 30 + };
+33
arch/arm/include/debug/bcm63xx.S
··· 1 + /* 2 + * Broadcom BCM63xx low-level UART debug 3 + * 4 + * Copyright (C) 2014 Broadcom Corporation 5 + * 6 + * This program is free software; you can redistribute it and/or modify 7 + * it under the terms of the GNU General Public License version 2 as 8 + * published by the Free Software Foundation. 9 + */ 10 + 11 + #include <linux/serial_bcm63xx.h> 12 + 13 + .macro addruart, rp, rv, tmp 14 + ldr \rp, =CONFIG_DEBUG_UART_PHYS 15 + ldr \rv, =CONFIG_DEBUG_UART_VIRT 16 + .endm 17 + 18 + .macro senduart, rd, rx 19 + /* word access do not work */ 20 + strb \rd, [\rx, #UART_FIFO_REG] 21 + .endm 22 + 23 + .macro waituart, rd, rx 24 + 1001: ldr \rd, [\rx, #UART_IR_REG] 25 + tst \rd, #(1 << UART_IR_TXEMPTY) 26 + beq 1001b 27 + .endm 28 + 29 + .macro busyuart, rd, rx 30 + 1002: ldr \rd, [\rx, #UART_IR_REG] 31 + tst \rd, #(1 << UART_IR_TXTRESH) 32 + beq 1002b 33 + .endm
+17
arch/arm/mach-bcm/Kconfig
··· 99 99 different SoC or with the older BCM47XX and BCM53XX based 100 100 network SoC using a MIPS CPU, they are supported by arch/mips/bcm47xx 101 101 102 + config ARCH_BCM_63XX 103 + bool "Broadcom BCM63xx DSL SoC" if ARCH_MULTI_V7 104 + depends on MMU 105 + select ARM_ERRATA_754322 106 + select ARM_ERRATA_764369 if SMP 107 + select ARM_GIC 108 + select ARM_GLOBAL_TIMER 109 + select CACHE_L2X0 110 + select HAVE_ARM_ARCH_TIMER 111 + select HAVE_ARM_TWD if SMP 112 + select HAVE_ARM_SCU if SMP 113 + select HAVE_SMP 114 + help 115 + This enables support for systems based on Broadcom DSL SoCs. 116 + It currently supports the 'BCM63XX' ARM-based family, which includes 117 + the BCM63138 variant. 118 + 102 119 config ARCH_BRCMSTB 103 120 bool "Broadcom BCM7XXX based boards" if ARCH_MULTI_V7 104 121 depends on MMU
+3
arch/arm/mach-bcm/Makefile
··· 34 34 # BCM5301X 35 35 obj-$(CONFIG_ARCH_BCM_5301X) += bcm_5301x.o 36 36 37 + # BCM63XXx 38 + obj-$(CONFIG_ARCH_BCM_63XX) := bcm63xx.o 39 + 37 40 ifeq ($(CONFIG_ARCH_BRCMSTB),y) 38 41 obj-y += brcmstb.o 39 42 endif
+27
arch/arm/mach-bcm/bcm63xx.c
··· 1 + /* 2 + * Copyright (C) 2014 Broadcom Corporation 3 + * 4 + * This program is free software; you can redistribute it and/or 5 + * modify it under the terms of the GNU General Public License as 6 + * published by the Free Software Foundation version 2. 7 + * 8 + * This program is distributed "as is" WITHOUT ANY WARRANTY of any 9 + * kind, whether express or implied; without even the implied warranty 10 + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 + * GNU General Public License for more details. 12 + */ 13 + 14 + #include <linux/of_platform.h> 15 + 16 + #include <asm/mach/arch.h> 17 + 18 + static const char * const bcm63xx_dt_compat[] = { 19 + "brcm,bcm63138", 20 + NULL 21 + }; 22 + 23 + DT_MACHINE_START(BCM63XXX_DT, "BCM63xx DSL SoC") 24 + .dt_compat = bcm63xx_dt_compat, 25 + .l2c_aux_val = 0, 26 + .l2c_aux_mask = ~0, 27 + MACHINE_END