bcm53xx: add patch specifying USB controllers in DT
authorRafał Miłecki <rafal@milecki.pl>
Sat, 1 Oct 2016 14:22:24 +0000 (16:22 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Sat, 1 Oct 2016 14:52:08 +0000 (16:52 +0200)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/bcm53xx/patches-4.4/197-USB-bcma-add-USB-3.0-support.patch
target/linux/bcm53xx/patches-4.4/302-ARM-BCM5301X-Specify-USB-controllers-in-DT.patch [new file with mode: 0644]

index c7b65867d88cdaf3f300b836a5cf2d94cb5d277b..37d5b1e7ca97c89e8e201bd03682afcd59cac68b 100644 (file)
@@ -192,10 +192,11 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  static int bcma_hcd_usb30_init(struct bcma_hcd_device *bcma_hcd)
  {
        struct bcma_device *core = bcma_hcd->core;
  static int bcma_hcd_usb30_init(struct bcma_hcd_device *bcma_hcd)
  {
        struct bcma_device *core = bcma_hcd->core;
-@@ -419,6 +569,14 @@ static int bcma_hcd_usb30_init(struct bc
+@@ -419,7 +569,13 @@ static int bcma_hcd_usb30_init(struct bc
  
        bcma_core_enable(core, 0);
  
  
        bcma_core_enable(core, 0);
  
+-      of_platform_default_populate(dev->of_node, NULL, dev);
 +      bcma_hcd_usb30_phy_init(bcma_hcd);
 +
 +      bcma_hcd->xhci_dev = bcma_hcd_create_pdev(core, "xhci-hcd", core->addr,
 +      bcma_hcd_usb30_phy_init(bcma_hcd);
 +
 +      bcma_hcd->xhci_dev = bcma_hcd_create_pdev(core, "xhci-hcd", core->addr,
@@ -203,11 +204,10 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 +                                                sizeof(xhci_pdata));
 +      if (IS_ERR(bcma_hcd->ohci_dev))
 +              return PTR_ERR(bcma_hcd->ohci_dev);
 +                                                sizeof(xhci_pdata));
 +      if (IS_ERR(bcma_hcd->ohci_dev))
 +              return PTR_ERR(bcma_hcd->ohci_dev);
-+
-       of_platform_default_populate(dev->of_node, NULL, dev);
  
        return 0;
  
        return 0;
-@@ -471,11 +629,14 @@ static void bcma_hcd_remove(struct bcma_
+ }
+@@ -471,11 +627,14 @@ static void bcma_hcd_remove(struct bcma_
        struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
        struct platform_device *ohci_dev = usb_dev->ohci_dev;
        struct platform_device *ehci_dev = usb_dev->ehci_dev;
        struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
        struct platform_device *ohci_dev = usb_dev->ohci_dev;
        struct platform_device *ehci_dev = usb_dev->ehci_dev;
diff --git a/target/linux/bcm53xx/patches-4.4/302-ARM-BCM5301X-Specify-USB-controllers-in-DT.patch b/target/linux/bcm53xx/patches-4.4/302-ARM-BCM5301X-Specify-USB-controllers-in-DT.patch
new file mode 100644 (file)
index 0000000..49fd6c2
--- /dev/null
@@ -0,0 +1,60 @@
+From 0ec09deb054c9cb37c444f2d40eccdba0ab0372f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Sat, 1 Oct 2016 13:57:59 +0200
+Subject: [PATCH] ARM: BCM5301X: Specify USB controllers in DT
+
+---
+
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -248,8 +248,29 @@
+                       #address-cells = <1>;
+                       #size-cells = <1>;
++                      ranges;
+-                      phys = <&usb2_phy>;
++                      interrupt-parent = <&gic>;
++
++                      ohci: ohci@21000 {
++                              #usb-cells = <0>;
++
++                              compatible = "generic-ohci";
++                              reg = <0x00022000 0x1000>;
++                              interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
++                      };
++
++                      ehci: ehci@22000 {
++                              #usb-cells = <0>;
++
++                              compatible = "generic-ehci";
++                              reg = <0x00021000 0x1000>;
++                              interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
++                              phys = <&usb2_phy>;
++
++                              #address-cells = <1>;
++                              #size-cells = <0>;
++                      };
+               };
+               usb3: usb3@23000 {
+@@ -257,6 +278,19 @@
+                       #address-cells = <1>;
+                       #size-cells = <1>;
++                      ranges;
++
++                      interrupt-parent = <&gic>;
++
++                      xhci: xhci@23000 {
++                              #usb-cells = <0>;
++
++                              compatible = "generic-xhci";
++                              reg = <0x00023000 0x1000>;
++                              interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
++                              phys = <&usb3_phy>;
++                              phy-names = "usb";
++                      };
+               };
+               spi@29000 {