]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge tag 'sunxi-dt-h3-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git...
authorOlof Johansson <olof@lixom.net>
Mon, 19 Jun 2017 03:43:28 +0000 (20:43 -0700)
committerOlof Johansson <olof@lixom.net>
Mon, 19 Jun 2017 03:43:28 +0000 (20:43 -0700)
Allwinner H3 changes for 4.13

This tag is about bringing the EMAC support to the H3 boards.

* tag 'sunxi-dt-h3-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  ARM: sun8i: h3: Enable EMAC with external PHY on Orange Pi Plus 2E
  arm: sun8i: orangepi-zero: Enable dwmac-sun8i
  ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i
  ARM: sun8i: orangepi-plus: Enable dwmac-sun8i
  arm: sun8i: nanopi-neo: Enable dwmac-sun8i
  arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high
  arm: sun8i: orangepi-2: Enable dwmac-sun8i
  arm: sun8i: orangepi-one: Enable dwmac-sun8i
  arm: sun8i: orangepi-pc: Enable dwmac-sun8i
  arm: sun8i: sunxi-h3-h5: add dwmac-sun8i ethernet driver
  arm: sun8i: sunxi-h3-h5: Add dt node for the syscon control module
  ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros

Signed-off-by: Olof Johansson <olof@lixom.net>
1  2 
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts

index 0b8b969f7c64fc0b62862d7e42b0687d41cc6849,dd3525a0f06afb80f69143c968f2931fbbef5826..6713d0f2b3f4d3f3f62231bf6a74bf35828ce8b0
@@@ -57,6 -57,7 +57,7 @@@
        aliases {
                serial0 = &uart0;
                /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+               ethernet0 = &emac;
                ethernet1 = &xr819;
        };
  
        status = "okay";
  };
  
+ &emac {
+       phy-handle = <&int_mii_phy>;
+       phy-mode = "mii";
+       allwinner,leds-active-low;
+       status = "okay";
+ };
  &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>;
        status = "okay";
  };
  
 +&spi0 {
 +      /* Disable SPI NOR by default: it optional on Orange Pi Zero boards */
 +      status = "disabled";
 +
 +      flash@0 {
 +              #address-cells = <1>;
 +              #size-cells = <1>;
 +              compatible = "mxicy,mx25l1606e", "winbond,w25q128";
 +              reg = <0>;
 +              spi-max-frequency = <40000000>;
 +      };
 +};
 +
  &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
index 883072b611fa1c5d297f4914cdff56913e31b48a,fef652b883fb951041dc39a565e21edeabbc63eb..d756ff825116029557ec53f022f63e6ab2ed0f25
@@@ -52,6 -52,7 +52,7 @@@
        compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3";
  
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
                serial1 = &uart1;
        };
                };
        };
  
+       reg_gmac_3v3: gmac-3v3 {
+                     compatible = "regulator-fixed";
+                     regulator-name = "gmac-3v3";
+                     regulator-min-microvolt = <3300000>;
+                     regulator-max-microvolt = <3300000>;
+                     startup-delay-us = <100000>;
+                     enable-active-high;
+                     gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
+       };
        wifi_pwrseq: wifi_pwrseq {
                compatible = "mmc-pwrseq-simple";
                pinctrl-names = "default";
        };
  };
  
 +&ehci0 {
 +      status = "okay";
 +};
 +
  &ehci1 {
        status = "okay";
  };
        status = "okay";
  };
  
+ &emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&emac_rgmii_pins>;
+       phy-supply = <&reg_gmac_3v3>;
+       phy-handle = <&ext_rgmii_phy>;
+       phy-mode = "rgmii";
+       allwinner,leds-active-low;
+       status = "okay";
+ };
  &ir {
        pinctrl-names = "default";
        pinctrl-0 = <&ir_pins_a>;
        status = "okay";
  };
  
+ &mdio {
+       ext_rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <0>;
+       };
+ };
  &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
        non-removable;
        status = "okay";
  
 -      brcmf: bcrmf@1 {
 +      brcmf: wifi@1 {
                reg = <1>;
                compatible = "brcm,bcm4329-fmac";
                interrupt-parent = <&pio>;
        status = "okay";
  };
  
 +&ohci0 {
 +      status = "okay";
 +};
 +
  &ohci1 {
        status = "okay";
  };
        };
  };
  
 +&reg_usb0_vbus {
 +      gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
 +      status = "okay";
 +};
 +
  &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
  };
  
 +&usb_otg {
 +      dr_mode = "otg";
 +      status = "okay";
 +};
 +
  &usbphy {
 -      /* USB VBUS is on as long as VCC-IO is on */
 +      usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
 +      usb0_vbus-supply = <&reg_usb0_vbus>;
 +      /* USB host VBUS is on as long as VCC-IO is on */
        status = "okay";
  };
index 8ff71b1bb45b1c918d71e686ef4da4de7250306a,cedd326b608900b8fe08e0dac03adf3d414b2f00..17cdeae19c6f0f297d680c5c4f1c09e36071cfda
@@@ -54,6 -54,7 +54,7 @@@
        aliases {
                serial0 = &uart0;
                /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+               ethernet0 = &emac;
                ethernet1 = &rtl8189;
        };
  
        };
  };
  
 +&codec {
 +      allwinner,pa-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
 +      allwinner,audio-routing =
 +              "Speaker", "LINEOUT",
 +              "MIC1", "Mic",
 +              "Mic",  "MBIAS";
 +      status = "okay";
 +};
 +
  &ehci1 {
        status = "okay";
  };
  
+ &emac {
+       phy-handle = <&int_mii_phy>;
+       phy-mode = "mii";
+       allwinner,leds-active-low;
+       status = "okay";
+ };
  &ir {
        pinctrl-names = "default";
        pinctrl-0 = <&ir_pins_a>;
        status = "disabled";
  };
  
 -&usb1_vbus_pin_a {
 -      pins = "PG13";
 -};
 -
  &usbphy {
        usb1_vbus-supply = <&reg_usb1_vbus>;
        status = "okay";
index 1a044b17d6c61e5cc391782c5e06aa3df7322548,52e65755c51a32b0d6a6511c0ee117d85842be46..998b60f8d295e85fe09e184943ffafd45eb1da33
@@@ -52,6 -52,7 +52,7 @@@
        compatible = "xunlong,orangepi-pc", "allwinner,sun8i-h3";
  
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
        };
  
        status = "okay";
  };
  
 +&ehci0 {
 +      status = "okay";
 +};
 +
  &ehci1 {
        status = "okay";
  };
        status = "okay";
  };
  
+ &emac {
+       phy-handle = <&int_mii_phy>;
+       phy-mode = "mii";
+       allwinner,leds-active-low;
+       status = "okay";
+ };
  &ir {
        pinctrl-names = "default";
        pinctrl-0 = <&ir_pins_a>;
        status = "okay";
  };
  
 +&ohci0 {
 +      status = "okay";
 +};
 +
  &ohci1 {
        status = "okay";
  };
        };
  };
  
 +&reg_usb0_vbus {
 +      gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
 +      status = "okay";
 +};
 +
  &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
        status = "disabled";
  };
  
 +&usb_otg {
 +      dr_mode = "otg";
 +      status = "okay";
 +};
 +
  &usbphy {
 -      /* USB VBUS is always on */
 +      usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
 +      usb0_vbus-supply = <&reg_usb0_vbus>;
 +      /* VBUS on USB host ports are always on */
        status = "okay";
  };