ARM: dts: qcom: Add ks8851 node for wired ethernet
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 16 Jun 2015 20:31:15 +0000 (13:31 -0700)
committerAndy Gross <agross@codeaurora.org>
Thu, 23 Jul 2015 21:34:12 +0000 (16:34 -0500)
The micrel ks8851 device is present on MSM8960 CDP boards. It is
connected to two regulators, one controlled via a gpio and
another controlled via the RPM. Add the gsbi, spi, gpio
regulator, and micrel ks8851 nodes so that ethernet works
properly.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
arch/arm/boot/dts/qcom-msm8960-cdp.dts
arch/arm/boot/dts/qcom-msm8960.dtsi

index be241f14246d7f76568719675d1bcdb8f88ad010..fad71d5527b0f80d88e7bc433318d53ca35ec8ca 100644 (file)
                                };
                        };
                };
+
+               gsbi@16000000 {
+                       status = "ok";
+                       qcom,mode = <GSBI_PROT_SPI>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&spi1_default>;
+                       spi@16080000 {
+                               status = "ok";
+                               eth@0 {
+                                       compatible = "micrel,ks8851";
+                                       reg = <0>;
+                                       interrupt-parent = <&msmgpio>;
+                                       interrupts = <90 8>;
+                                       spi-max-frequency = <5400000>;
+                                       vdd-supply = <&ext_l2>;
+                                       vdd-io-supply = <&pm8921_lvs6>;
+                                       reset-gpios = <&msmgpio 89 0>;
+                               };
+                       };
+               };
+
+               pinctrl@800000 {
+                       spi1_default: spi1_default {
+                               mux {
+                                       pins = "gpio6", "gpio7", "gpio9";
+                                       function = "gsbi1";
+                               };
+
+                               mosi {
+                                       pins = "gpio6";
+                                       drive-strength = <12>;
+                                       bias-disable;
+                               };
+
+                               miso {
+                                       pins = "gpio7";
+                                       drive-strength = <12>;
+                                       bias-disable;
+                               };
+
+                               cs {
+                                       pins = "gpio8";
+                                       drive-strength = <12>;
+                                       bias-disable;
+                                       output-low;
+                               };
+
+                               clk {
+                                       pins = "gpio9";
+                                       drive-strength = <12>;
+                                       bias-disable;
+                               };
+                       };
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+
+               ext_l2: gpio-regulator@91 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "ext_l2";
+                       gpio = <&msmgpio 91 0>;
+                       startup-delay-us = <10000>;
+                       enable-active-high;
+               };
        };
 };
 
index fcf4bb5f9c3fb5cd9c4ea9d1ccba5102aea81c2d..2096a94c9b525faa47df980d751763804f10e7c5 100644 (file)
                        compatible = "qcom,tcsr-msm8960", "syscon";
                        reg = <0x1a400000 0x100>;
                };
+
+               gsbi@16000000 {
+                       compatible = "qcom,gsbi-v1.0.0";
+                       cell-index = <1>;
+                       reg = <0x16000000 0x100>;
+                       clocks = <&gcc GSBI1_H_CLK>;
+                       clock-names = "iface";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       spi@16080000 {
+                               compatible = "qcom,spi-qup-v1.1.1";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x16080000 0x1000>;
+                               interrupts = <0 147 0>;
+                               spi-max-frequency = <24000000>;
+                               cs-gpios = <&msmgpio 8 0>;
+
+                               clocks = <&gcc GSBI1_QUP_CLK>, <&gcc GSBI1_H_CLK>;
+                               clock-names = "core", "iface";
+                               status = "disabled";
+                       };
+               };
        };
 };