]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM64: dts: darcy: add xlate and extcon-gpio node
authorVenkat Reddy Talla <vreddytalla@nvidia.com>
Wed, 24 Feb 2016 10:27:00 +0000 (15:57 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 29 Mar 2016 23:01:40 +0000 (16:01 -0700)
Adding cable-xlate and extcon-gpio-states dt node to support
cable connection state change based on sysfs entry.

Bug 1720549

Change-Id: Ica0d1280c424a1fec242fb09883f1a6ab3fb5f22
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1018110
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Martin Gao <marting@nvidia.com>
Tested-by: Martin Gao <marting@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
arch/arm64/boot/dts/tegra210-platforms/tegra210-darcy-extcon-p2894-0000-a00.dtsi

index 28d990da245da39c4849708b23c10e7734823947..b0d8b64def1513d77b524654a703f7f0ce6f17ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2015-2016, NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
                        extcon-gpio,out-cable-names = "USB";
                        #extcon-cells = <1>;
                };
+
+               id_extcon: extcon@2 {
+                       compatible = "extcon-gpio-states";
+                       reg = <0x2>;
+                       extcon-gpio,name = "ID";
+                       extcon-gpio,cable-states = <0x0 0x1
+                                               0x1 0x0>;
+                       extcon-gpio,out-cable-names = "USB-HOST";
+                       #extcon-cells = <1>;
+               };
+
+               extcon_cable_xlate: extcon@3 {
+                       compatible = "extcon-cable-xlate";
+                       reg = <0x3>;
+                       extcon-name = "cable-xlate";
+                       output-cable-names = "USB", "USB-Host";
+                       extcon-cables = <&vbus_gpio_extcon 0 &id_extcon 0>;
+                       extcon-cable-names = "vbus", "id";
+                       cable-new-states = <0x0    0x0    0x3F    0x0    0x0
+                                       0x0     0x1     0x3F    0x1   0x0
+                                       0x0     0x2     0x3F    0x2   0x0
+                                       0x2     0x3     0x3F    0x2   0x0
+                                       0x2     0x1     0x3F    0x2   0x0
+                                       0x1     0x0     0x3F    0x0   0x0
+                                       0x3     0x0     0x3F    0x0   0x0
+                                       0x3     0x1     0x3F    0x0   0x0
+                                       0x2     0x0     0x3F    0x0   0x0>;
+                       #extcon-cells = <1>;
+               };
        };
 
        udc@7d000000 {
                nvidia,enable-pmu-vbus-detection;
-               nvidia,id-detection-type = <2>;
-               extcon-cables = <&vbus_gpio_extcon 0>;
+               nvidia,id-detection-type = <1>;
+               extcon-cables = <&extcon_cable_xlate 0>;
                extcon-cable-names = "vbus";
        };
 
        otg@7d000000 {
-               /delete-property/ nvidia,enable-pmu-vbus-detection;
-               nvidia,id-detection-type = <2>;
-               /delete-property/ extcon-cables;
-               /delete-property/ extcon-cable-names;
+               nvidia,enable-pmu-vbus-detection;
+               nvidia,id-detection-type = <1>;
+               extcon-cables = <&extcon_cable_xlate 0 &extcon_cable_xlate 1>;
+               extcon-cable-names = "vbus", "id";
        };
 
        xudc@700d0000 {
-               extcon-cables = <&vbus_gpio_extcon 0>;
+               extcon-cables = <&extcon_cable_xlate 0>;
                extcon-cable-names = "vbus";
        };
 
        xotg {
-               extcon-cables = <&vbus_gpio_extcon 1>;
+               extcon-cables = <&extcon_cable_xlate 1>;
                extcon-cable-names = "id";
        };
 };