This adds a device tree example for Netgear CVG834G.

Signed-off-by: Álvaro Fernández Rojas <[email protected]>
---
 arch/mips/bmips/Kconfig                     |   4 ++
 arch/mips/boot/dts/brcm/Makefile            |   2 +
 arch/mips/boot/dts/brcm/bcm3368.dtsi        | 101 ++++++++++++++++++++++++++++
 arch/mips/boot/dts/brcm/bcm93368cvg834g.dts |  22 ++++++
 4 files changed, 129 insertions(+)
 create mode 100644 arch/mips/boot/dts/brcm/bcm3368.dtsi
 create mode 100644 arch/mips/boot/dts/brcm/bcm93368cvg834g.dts

diff --git a/arch/mips/bmips/Kconfig b/arch/mips/bmips/Kconfig
index 14f4b4c..5b0ad8c 100644
--- a/arch/mips/bmips/Kconfig
+++ b/arch/mips/bmips/Kconfig
@@ -13,6 +13,10 @@ choice
 config DT_NONE
        bool "None"
 
+config DT_BCM93368CVG834G
+       bool "BCM93368CVG834G"
+       select BUILTIN_DTB
+
 config DT_BCM93384WVG
        bool "BCM93384WVG Zephyr CPU"
        select BUILTIN_DTB
diff --git a/arch/mips/boot/dts/brcm/Makefile b/arch/mips/boot/dts/brcm/Makefile
index 2060e70..c553b95 100644
--- a/arch/mips/boot/dts/brcm/Makefile
+++ b/arch/mips/boot/dts/brcm/Makefile
@@ -1,3 +1,4 @@
+dtb-$(CONFIG_DT_BCM93368CVG834G)       += bcm93368cvg834g.dtb
 dtb-$(CONFIG_DT_BCM93384WVG)           += bcm93384wvg.dtb
 dtb-$(CONFIG_DT_BCM93384WVG_VIPER)     += bcm93384wvg_viper.dtb
 dtb-$(CONFIG_DT_BCM963268VR3032U)      += bcm963268vr3032u.dtb
@@ -14,6 +15,7 @@ dtb-$(CONFIG_DT_BCM97425SVMB)         += bcm97425svmb.dtb
 dtb-$(CONFIG_DT_BCM97435SVMB)          += bcm97435svmb.dtb
 
 dtb-$(CONFIG_DT_NONE)                  += \
+                                               bcm93368cvg834g.dtb     \
                                                bcm93384wvg.dtb         \
                                                bcm93384wvg_viper.dtb   \
                                                bcm963268vr3032u.dtb    \
diff --git a/arch/mips/boot/dts/brcm/bcm3368.dtsi 
b/arch/mips/boot/dts/brcm/bcm3368.dtsi
new file mode 100644
index 0000000..bee855c
--- /dev/null
+++ b/arch/mips/boot/dts/brcm/bcm3368.dtsi
@@ -0,0 +1,101 @@
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+       compatible = "brcm,bcm3368";
+
+       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@fff8c000 {
+                       compatible = "syscon";
+                       reg = <0xfff8c000 0xc>;
+                       native-endian;
+               };
+
+               reboot: syscon-reboot@fff8c008 {
+                       compatible = "syscon-reboot";
+                       regmap = <&periph_cntl>;
+                       offset = <0x8>;
+                       mask = <0x1>;
+               };
+
+               periph_intc: interrupt-controller@fff8c00c {
+                       compatible = "brcm,bcm6345-l1-intc";
+                       reg = <0xfff8c00c 0x8>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+
+                       interrupt-parent = <&cpu_intc>;
+                       interrupts = <2>;
+               };
+
+               uart0: serial@fff8c100 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0xfff8c100 0x18>;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <2>;
+
+                       clocks = <&periph_clk>;
+
+                       status = "disabled";
+               };
+
+               uart1: serial@fff8c120 {
+                       compatible = "brcm,bcm6345-uart";
+                       reg = <0xfff8c120 0x18>;
+
+                       interrupt-parent = <&periph_intc>;
+                       interrupts = <3>;
+
+                       clocks = <&periph_clk>;
+
+                       status = "disabled";
+               };
+       };
+};
diff --git a/arch/mips/boot/dts/brcm/bcm93368cvg834g.dts 
b/arch/mips/boot/dts/brcm/bcm93368cvg834g.dts
new file mode 100644
index 0000000..68475c4
--- /dev/null
+++ b/arch/mips/boot/dts/brcm/bcm93368cvg834g.dts
@@ -0,0 +1,22 @@
+/dts-v1/;
+
+/include/ "bcm3368.dtsi"
+
+/ {
+       compatible = "netgear,cvg834g", "brcm,bcm3368";
+       model = "Netgear CVG834G";
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x00000000 0x02000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+               stdout-path = &uart0;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
-- 
2.1.4

Reply via email to