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

MIPS: BMIPS: Add device tree example for BCM6358

This adds a device tree example for SFR Neufbox4 (Sercomm version), which
also serves as a real example for brcm,bcm6358-leds.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Cc: f.fainelli@gmail.com
Cc: jogo@openwrt.org
Cc: cernekee@gmail.com
Cc: robh@kernel.org
Cc: simon@fire.lp0.eu
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13041/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Álvaro Fernández Rojas and committed by
Ralf Baechle
7537d273 3604b451

+183 -1
+1 -1
Documentation/devicetree/bindings/mips/brcm/soc.txt
··· 4 4 5 5 - compatible: "brcm,bcm3384", "brcm,bcm33843" 6 6 "brcm,bcm3384-viper", "brcm,bcm33843-viper" 7 - "brcm,bcm6328", "brcm,bcm6368", 7 + "brcm,bcm6328", "brcm,bcm6358", "brcm,bcm6368", 8 8 "brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360", 9 9 "brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425" 10 10
+4
arch/mips/bmips/Kconfig
··· 21 21 bool "BCM93384WVG Viper CPU (EXPERIMENTAL)" 22 22 select BUILTIN_DTB 23 23 24 + config DT_BCM96358NB4SER 25 + bool "BCM96358NB4SER" 26 + select BUILTIN_DTB 27 + 24 28 config DT_BCM96368MVWG 25 29 bool "BCM96368MVWG" 26 30 select BUILTIN_DTB
+2
arch/mips/boot/dts/brcm/Makefile
··· 1 1 dtb-$(CONFIG_DT_BCM93384WVG) += bcm93384wvg.dtb 2 2 dtb-$(CONFIG_DT_BCM93384WVG_VIPER) += bcm93384wvg_viper.dtb 3 + dtb-$(CONFIG_DT_BCM96358NB4SER) += bcm96358nb4ser.dtb 3 4 dtb-$(CONFIG_DT_BCM96368MVWG) += bcm96368mvwg.dtb 4 5 dtb-$(CONFIG_DT_BCM9EJTAGPRB) += bcm9ejtagprb.dtb 5 6 dtb-$(CONFIG_DT_BCM97125CBMB) += bcm97125cbmb.dtb ··· 15 14 dtb-$(CONFIG_DT_NONE) += \ 16 15 bcm93384wvg.dtb \ 17 16 bcm93384wvg_viper.dtb \ 17 + bcm96358nb4ser.dtb \ 18 18 bcm96368mvwg.dtb \ 19 19 bcm9ejtagprb.dtb \ 20 20 bcm97125cbmb.dtb \
+130
arch/mips/boot/dts/brcm/bcm6358.dtsi
··· 1 + / { 2 + #address-cells = <1>; 3 + #size-cells = <1>; 4 + compatible = "brcm,bcm6358"; 5 + 6 + cpus { 7 + #address-cells = <1>; 8 + #size-cells = <0>; 9 + 10 + mips-hpt-frequency = <150000000>; 11 + 12 + cpu@0 { 13 + compatible = "brcm,bmips4350"; 14 + device_type = "cpu"; 15 + reg = <0>; 16 + }; 17 + 18 + cpu@1 { 19 + compatible = "brcm,bmips4350"; 20 + device_type = "cpu"; 21 + reg = <1>; 22 + }; 23 + }; 24 + 25 + clocks { 26 + periph_clk: periph-clk { 27 + compatible = "fixed-clock"; 28 + #clock-cells = <0>; 29 + clock-frequency = <50000000>; 30 + }; 31 + }; 32 + 33 + aliases { 34 + serial0 = &uart0; 35 + serial1 = &uart1; 36 + }; 37 + 38 + cpu_intc: interrupt-controller { 39 + #address-cells = <0>; 40 + compatible = "mti,cpu-interrupt-controller"; 41 + 42 + interrupt-controller; 43 + #interrupt-cells = <1>; 44 + }; 45 + 46 + ubus { 47 + #address-cells = <1>; 48 + #size-cells = <1>; 49 + 50 + compatible = "simple-bus"; 51 + ranges; 52 + 53 + periph_cntl: syscon@fffe0000 { 54 + compatible = "syscon"; 55 + reg = <0xfffe0000 0xc>; 56 + native-endian; 57 + }; 58 + 59 + reboot: syscon-reboot@fffe0008 { 60 + compatible = "syscon-reboot"; 61 + regmap = <&periph_cntl>; 62 + offset = <0x8>; 63 + mask = <0x1>; 64 + }; 65 + 66 + periph_intc: interrupt-controller@fffe000c { 67 + compatible = "brcm,bcm6345-l1-intc"; 68 + reg = <0xfffe000c 0x8>, 69 + <0xfffe0038 0x8>; 70 + 71 + interrupt-controller; 72 + #interrupt-cells = <1>; 73 + 74 + interrupt-parent = <&cpu_intc>; 75 + interrupts = <2>, <3>; 76 + }; 77 + 78 + leds0: led-controller@fffe00d0 { 79 + #address-cells = <1>; 80 + #size-cells = <0>; 81 + compatible = "brcm,bcm6358-leds"; 82 + reg = <0xfffe00d0 0x8>; 83 + 84 + status = "disabled"; 85 + }; 86 + 87 + uart0: serial@fffe0100 { 88 + compatible = "brcm,bcm6345-uart"; 89 + reg = <0xfffe0100 0x18>; 90 + 91 + interrupt-parent = <&periph_intc>; 92 + interrupts = <2>; 93 + 94 + clocks = <&periph_clk>; 95 + 96 + status = "disabled"; 97 + }; 98 + 99 + uart1: serial@fffe0120 { 100 + compatible = "brcm,bcm6345-uart"; 101 + reg = <0xfffe0120 0x18>; 102 + 103 + interrupt-parent = <&periph_intc>; 104 + interrupts = <3>; 105 + 106 + clocks = <&periph_clk>; 107 + 108 + status = "disabled"; 109 + }; 110 + 111 + ehci: usb@fffe1300 { 112 + compatible = "brcm,bcm6358-ehci", "generic-ehci"; 113 + reg = <0xfffe1300 0x100>; 114 + big-endian; 115 + interrupt-parent = <&periph_intc>; 116 + interrupts = <10>; 117 + status = "disabled"; 118 + }; 119 + 120 + ohci: usb@fffe1400 { 121 + compatible = "brcm,bcm6358-ohci", "generic-ohci"; 122 + reg = <0xfffe1400 0x100>; 123 + big-endian; 124 + no-big-frame-no; 125 + interrupt-parent = <&periph_intc>; 126 + interrupts = <5>; 127 + status = "disabled"; 128 + }; 129 + }; 130 + };
+46
arch/mips/boot/dts/brcm/bcm96358nb4ser.dts
··· 1 + /dts-v1/; 2 + 3 + /include/ "bcm6358.dtsi" 4 + 5 + / { 6 + compatible = "sfr,nb4-ser", "brcm,bcm6358"; 7 + model = "SFR Neufbox 4 (Sercomm)"; 8 + 9 + memory@0 { 10 + device_type = "memory"; 11 + reg = <0x00000000 0x02000000>; 12 + }; 13 + 14 + chosen { 15 + stdout-path = &uart0; 16 + }; 17 + }; 18 + 19 + &leds0 { 20 + status = "ok"; 21 + 22 + led@0 { 23 + reg = <0>; 24 + active-low; 25 + label = "nb4-ser:white:alarm"; 26 + }; 27 + led@2 { 28 + reg = <2>; 29 + active-low; 30 + label = "nb4-ser:white:tv"; 31 + }; 32 + led@3 { 33 + reg = <3>; 34 + active-low; 35 + label = "nb4-ser:white:tel"; 36 + }; 37 + led@4 { 38 + reg = <4>; 39 + active-low; 40 + label = "nb4-ser:white:adsl"; 41 + }; 42 + }; 43 + 44 + &uart0 { 45 + status = "okay"; 46 + };