]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
MIPS: BMIPS: Add device tree example for BCM6358
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 9 Apr 2016 10:56:48 +0000 (12:56 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:02:09 +0000 (14:02 +0200)
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>
Documentation/devicetree/bindings/mips/brcm/soc.txt
arch/mips/bmips/Kconfig
arch/mips/boot/dts/brcm/Makefile
arch/mips/boot/dts/brcm/bcm6358.dtsi [new file with mode: 0644]
arch/mips/boot/dts/brcm/bcm96358nb4ser.dts [new file with mode: 0644]

index 7bab90cc4a7bf45ba42b8492605f8dd41e3ba6d2..e58a4f6d1360bb3028ebe02f0d2916312d9015a3 100644 (file)
@@ -4,7 +4,7 @@ Required properties:
 
 - compatible: "brcm,bcm3384", "brcm,bcm33843"
               "brcm,bcm3384-viper", "brcm,bcm33843-viper"
-              "brcm,bcm6328", "brcm,bcm6368",
+              "brcm,bcm6328", "brcm,bcm6358", "brcm,bcm6368",
               "brcm,bcm7125", "brcm,bcm7346", "brcm,bcm7358", "brcm,bcm7360",
               "brcm,bcm7362", "brcm,bcm7420", "brcm,bcm7425"
 
index e2c4fd682c740822eb2bcf1a2101a7e1fa47dc61..264328d528c72e40ad12c6b8bbff2bbb9ccda742 100644 (file)
@@ -21,6 +21,10 @@ config DT_BCM93384WVG_VIPER
        bool "BCM93384WVG Viper CPU (EXPERIMENTAL)"
        select BUILTIN_DTB
 
+config DT_BCM96358NB4SER
+       bool "BCM96358NB4SER"
+       select BUILTIN_DTB
+
 config DT_BCM96368MVWG
        bool "BCM96368MVWG"
        select BUILTIN_DTB
index eabeb603e805d72c0869867594fbea49dd26189c..fda9d387cc08640067ef93650aa01e78d4536007 100644 (file)
@@ -1,5 +1,6 @@
 dtb-$(CONFIG_DT_BCM93384WVG)           += bcm93384wvg.dtb
 dtb-$(CONFIG_DT_BCM93384WVG_VIPER)     += bcm93384wvg_viper.dtb
+dtb-$(CONFIG_DT_BCM96358NB4SER)                += bcm96358nb4ser.dtb
 dtb-$(CONFIG_DT_BCM96368MVWG)          += bcm96368mvwg.dtb
 dtb-$(CONFIG_DT_BCM9EJTAGPRB)          += bcm9ejtagprb.dtb
 dtb-$(CONFIG_DT_BCM97125CBMB)          += bcm97125cbmb.dtb
@@ -14,6 +15,7 @@ dtb-$(CONFIG_DT_BCM97435SVMB)         += bcm97435svmb.dtb
 dtb-$(CONFIG_DT_NONE)                  += \
                                                bcm93384wvg.dtb         \
                                                bcm93384wvg_viper.dtb   \
+                                               bcm96358nb4ser.dtb      \
                                                bcm96368mvwg.dtb        \
                                                bcm9ejtagprb.dtb        \
                                                bcm97125cbmb.dtb        \
diff --git a/arch/mips/boot/dts/brcm/bcm6358.dtsi b/arch/mips/boot/dts/brcm/bcm6358.dtsi
new file mode 100644 (file)
index 0000000..f9d8d39
--- /dev/null
@@ -0,0 +1,130 @@
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       compatible = "brcm,bcm6358";
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               mips-hpt-frequency = <150000000>;
+
+               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@fffe0000 {
+                       compatible = "syscon";
+                       reg = <0xfffe0000 0xc>;
+                       native-endian;
+               };
+
+               reboot: syscon-reboot@fffe0008 {
+                       compatible = "syscon-reboot";
+                       regmap = <&periph_cntl>;
+                       offset = <0x8>;
+                       mask = <0x1>;
+               };
+
+               periph_intc: interrupt-controller@fffe000c {
+                       compatible = "brcm,bcm6345-l1-intc";
+                       reg = <0xfffe000c 0x8>,
+                             <0xfffe0038 0x8>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+
+                       interrupt-parent = <&cpu_intc>;
+                       interrupts = <2>, <3>;
+               };
+
+               leds0: led-controller@fffe00d0 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "brcm,bcm6358-leds";
+                       reg = <0xfffe00d0 0x8>;
+
+                       status = "disabled";
+               };
+
+               uart0: serial@fffe0100 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0xfffe0100 0x18>;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <2>;
+
+                       clocks = <&periph_clk>;
+
+                       status = "disabled";
+               };
+
+               uart1: serial@fffe0120 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0xfffe0120 0x18>;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <3>;
+
+                       clocks = <&periph_clk>;
+
+                       status = "disabled";
+               };
+
+               ehci: usb@fffe1300 {
+                       compatible = "brcm,bcm6358-ehci", "generic-ehci";
+                       reg = <0xfffe1300 0x100>;
+                       big-endian;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <10>;
+                       status = "disabled";
+               };
+
+               ohci: usb@fffe1400 {
+                       compatible = "brcm,bcm6358-ohci", "generic-ohci";
+                       reg = <0xfffe1400 0x100>;
+                       big-endian;
+                       no-big-frame-no;
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <5>;
+                       status = "disabled";
+               };
+       };
+};
diff --git a/arch/mips/boot/dts/brcm/bcm96358nb4ser.dts b/arch/mips/boot/dts/brcm/bcm96358nb4ser.dts
new file mode 100644 (file)
index 0000000..f412117
--- /dev/null
@@ -0,0 +1,46 @@
+/dts-v1/;
+
+/include/ "bcm6358.dtsi"
+
+/ {
+       compatible = "sfr,nb4-ser", "brcm,bcm6358";
+       model = "SFR Neufbox 4 (Sercomm)";
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x00000000 0x02000000>;
+       };
+
+       chosen {
+               stdout-path = &uart0;
+       };
+};
+
+&leds0 {
+       status = "ok";
+
+       led@0 {
+               reg = <0>;
+               active-low;
+               label = "nb4-ser:white:alarm";
+       };
+       led@2 {
+               reg = <2>;
+               active-low;
+               label = "nb4-ser:white:tv";
+       };
+       led@3 {
+               reg = <3>;
+               active-low;
+               label = "nb4-ser:white:tel";
+       };
+       led@4 {
+               reg = <4>;
+               active-low;
+               label = "nb4-ser:white:adsl";
+       };
+};
+
+&uart0 {
+       status = "okay";
+};