MIPS: BMIPS: Add device tree example for BCM6362
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 3 Aug 2016 09:58:30 +0000 (11:58 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 4 Oct 2016 14:13:57 +0000 (16:13 +0200)
This adds a device tree example for SFR NeufBox 6.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Cc: f.fainelli@gmail.com
Cc: jogo@openwrt.org
Cc: cernekee@gmail.com
Cc: robh@kernel.org
Cc: simon@fire.lp0.eu
Cc: john@phrozen.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13844/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/bmips/Kconfig
arch/mips/boot/dts/brcm/Makefile
arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts [new file with mode: 0644]
arch/mips/boot/dts/brcm/bcm6362.dtsi [new file with mode: 0644]

index f499fd251e3a340404d7ab64f4644d1428cf5e6f..2d60f25403de1128833a2b525061acf97c46cfbe 100644 (file)
@@ -73,6 +73,10 @@ config DT_SFR_NEUFBOX4_SERCOMM
        bool "SFR Neufbox 4 (Sercomm)"
        select BUILTIN_DTB
 
+config DT_SFR_NEUFBOX6_SERCOMM
+       bool "SFR Neufbox 6 (Sercomm)"
+       select BUILTIN_DTB
+
 endchoice
 
 endif
index a698e845ec53e00005b99da2474351700e6e8986..d61bc2aebf69b423ba65fe1d02284fb2feed0814 100644 (file)
@@ -13,10 +13,12 @@ dtb-$(CONFIG_DT_BCM97435SVMB)               += bcm97435svmb.dtb
 dtb-$(CONFIG_DT_COMTREND_VR3032U)      += bcm63268-comtrend-vr-3032u.dtb
 dtb-$(CONFIG_DT_NETGEAR_CVG834G)       += bcm3368-netgear-cvg834g.dtb
 dtb-$(CONFIG_DT_SFR_NEUFBOX4_SERCOMM)  += bcm6358-neufbox4-sercomm.dtb
+dtb-$(CONFIG_DT_SFR_NEUFBOX6_SERCOMM)  += bcm6362-neufbox6-sercomm.dtb
 
 dtb-$(CONFIG_DT_NONE) += \
        bcm3368-netgear-cvg834g.dtb \
        bcm6358-neufbox4-sercomm.dtb \
+       bcm6362-neufbox6-sercomm.dtb \
        bcm63268-comtrend-vr-3032u.dtb \
        bcm93384wvg.dtb \
        bcm93384wvg_viper.dtb \
diff --git a/arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts b/arch/mips/boot/dts/brcm/bcm6362-neufbox6-sercomm.dts
new file mode 100644 (file)
index 0000000..480f2a5
--- /dev/null
@@ -0,0 +1,22 @@
+/dts-v1/;
+
+/include/ "bcm6362.dtsi"
+
+/ {
+       compatible = "sfr,nb6-ser", "brcm,bcm6362";
+       model = "SFR NeufBox 6 (Sercomm)";
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x00000000 0x08000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+               stdout-path = &uart0;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi
new file mode 100644 (file)
index 0000000..c507da5
--- /dev/null
@@ -0,0 +1,134 @@
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       compatible = "brcm,bcm6362";
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               mips-hpt-frequency = <200000000>;
+
+               cpu@0 {
+                       compatible = "brcm,bmips4350";
+                       device_type = "cpu";
+                       reg = <0>;
+               };
+
+               cpu@1 {
+                       compatible = "brcm,bmips4350";
+                       device_type = "cpu";
+                       reg = <1>;
+               };
+       };
+
+       clocks {
+               periph_clk: periph-clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <50000000>;
+               };
+       };
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       cpu_intc: interrupt-controller {
+               #address-cells = <0>;
+               compatible = "mti,cpu-interrupt-controller";
+
+               interrupt-controller;
+               #interrupt-cells = <1>;
+       };
+
+       ubus {
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               compatible = "simple-bus";
+               ranges;
+
+               periph_cntl: syscon@10000000 {
+                       compatible = "syscon";
+                       reg = <0x10000000 0x14>;
+                       native-endian;
+               };
+
+               reboot: syscon-reboot@10000008 {
+                       compatible = "syscon-reboot";
+                       regmap = <&periph_cntl>;
+                       offset = <0x8>;
+                       mask = <0x1>;
+               };
+
+               periph_intc: interrupt-controller@10000020 {
+                       compatible = "brcm,bcm6345-l1-intc";
+                       reg = <0x10000020 0x10>,
+                             <0x10000030 0x10>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+
+                       interrupt-parent = <&cpu_intc>;
+                       interrupts = <2>, <3>;
+               };
+
+               uart0: serial@10000100 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0x10000100 0x18>;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <3>;
+
+                       clocks = <&periph_clk>;
+
+                       status = "disabled";
+               };
+
+               uart1: serial@10000120 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0x10000120 0x18>;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <4>;
+
+                       clocks = <&periph_clk>;
+
+                       status = "disabled";
+               };
+
+               leds0: led-controller@10001900 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,bcm6328-leds";
+                       reg = <0x10001900 0x24>;
+
+                       status = "disabled";
+               };
+
+               ehci: usb@10002500 {
+                       compatible = "brcm,bcm6362-ehci", "generic-ehci";
+                       reg = <0x10002500 0x100>;
+                       big-endian;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <10>;
+
+                       status = "disabled";
+               };
+
+               ohci: usb@10002600 {
+                       compatible = "brcm,bcm6362-ohci", "generic-ohci";
+                       reg = <0x10002600 0x100>;
+                       big-endian;
+                       no-big-frame-no;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <9>;
+
+                       status = "disabled";
+               };
+       };
+};