MIPS: dts: Ci20: Add ethernet and fixed-regulator nodes
authorHarvey Hunt <harvey.hunt@imgtec.com>
Fri, 7 Jul 2017 16:12:08 +0000 (17:12 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 29 Aug 2017 13:21:52 +0000 (15:21 +0200)
Add devicetree nodes for the DM9000 and the ethernet power regulator.
Additionally, add a new pinctrl node for the ethernet chip's pins.

Signed-off-by: Harvey Hunt <harvey.hunt@imgtec.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/16752/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/boot/dts/ingenic/ci20.dts

index fd138d9978c11fb68812f7a2a97b9ec464a8a9ab..6c381844929cf41c5fedba979c1eff2b2b0450b4 100644 (file)
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 #include "jz4780.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        compatible = "img,ci20", "ingenic,jz4780";
                reg = <0x0 0x10000000
                       0x30000000 0x30000000>;
        };
+
+       eth0_power: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "eth0_power";
+               gpio = <&gpb 25 GPIO_ACTIVE_LOW>;
+               enable-active-high;
+       };
 };
 
 &ext {
                        };
                };
        };
+
+       dm9000@6 {
+               compatible = "davicom,dm9000";
+               davicom,no-eeprom;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pins_nemc_cs6>;
+
+               reg = <6 0 1   /* addr */
+                      6 2 1>; /* data */
+
+               ingenic,nemc-tAS = <15>;
+               ingenic,nemc-tAH = <10>;
+               ingenic,nemc-tBP = <20>;
+               ingenic,nemc-tAW = <50>;
+               ingenic,nemc-tSTRV = <100>;
+
+               reset-gpios = <&gpf 12 GPIO_ACTIVE_HIGH>;
+               vcc-supply = <&eth0_power>;
+
+               interrupt-parent = <&gpe>;
+               interrupts = <19 4>;
+       };
 };
 
 &bch {
                groups = "nemc-cs1";
                bias-disable;
        };
+
+       pins_nemc_cs6: nemc-cs6 {
+               function = "nemc-cs6";
+               groups = "nemc-cs6";
+               bias-disable;
+       };
 };