Commit a0942a6d3e08490be2871396c977fb5520ecdf33

Authored by Simon Glass
1 parent 1a17c39c3a

exynos: dts: Support EC tunnel and main TPS65090 regulator

On pit and pi the TPS65090 regulator is connected only to the EC and we
must use a tunnel to get to it. The existing U-Boot support relies on a
special driver. Add a tunnel definition so that the new device-model
TPS65090 driver can be used unmodified.

Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 3 changed files with 297 additions and 48 deletions Side-by-side Diff

arch/arm/dts/exynos5250-snow.dts
... ... @@ -25,6 +25,7 @@
25 25 i2c2 = "/i2c@12C80000";
26 26 i2c3 = "/i2c@12C90000";
27 27 i2c4 = "/i2c@12CA0000";
  28 + i2c104 = &i2c_104;
28 29 i2c5 = "/i2c@12CB0000";
29 30 i2c6 = "/i2c@12CC0000";
30 31 i2c7 = "/i2c@12CD0000";
... ... @@ -43,7 +44,7 @@
43 44 };
44 45  
45 46 i2c4: i2c@12CA0000 {
46   - cros_ec: cros-ec@1e {
  47 + cros_ec_old: cros-ec@1e {
47 48 reg = <0x1e>;
48 49 compatible = "google,cros-ec-i2c";
49 50 i2c-max-frequency = <100000>;
... ... @@ -54,6 +55,101 @@
54 55 power-regulator@48 {
55 56 compatible = "ti,tps65090";
56 57 reg = <0x48>;
  58 + };
  59 + };
  60 +
  61 + i2c-arbitrator {
  62 + compatible = "i2c-arb-gpio-challenge";
  63 + #address-cells = <1>;
  64 + #size-cells = <0>;
  65 +
  66 + i2c-parent = <&{/i2c@12CA0000}>;
  67 +
  68 + our-claim-gpio = <&gpf0 3 GPIO_ACTIVE_LOW>;
  69 + their-claim-gpios = <&gpe0 4 GPIO_ACTIVE_LOW>;
  70 + slew-delay-us = <10>;
  71 + wait-retry-us = <3000>;
  72 + wait-free-us = <50000>;
  73 +
  74 + /* Use ID 104 as a hint that we're on physical bus 4 */
  75 + i2c_104: i2c@0 {
  76 + reg = <0>;
  77 + #address-cells = <1>;
  78 + #size-cells = <0>;
  79 +
  80 + battery: sbs-battery@b {
  81 + compatible = "sbs,sbs-battery";
  82 + reg = <0xb>;
  83 + sbs,poll-retry-count = <1>;
  84 + };
  85 +
  86 + cros_ec: embedded-controller {
  87 + compatible = "google,cros-ec-i2c";
  88 + reg = <0x1e>;
  89 + interrupts = <6 IRQ_TYPE_NONE>;
  90 + interrupt-parent = <&gpx1>;
  91 + wakeup-source;
  92 + i2c-max-frequency = <100000>;
  93 + u-boot,i2c-offset-len = <0>;
  94 + ec-interrupt = <&gpx1 6 GPIO_ACTIVE_LOW>;
  95 + };
  96 +
  97 + power-regulator {
  98 + compatible = "ti,tps65090";
  99 + reg = <0x48>;
  100 +
  101 + regulators {
  102 + dcdc1 {
  103 + ti,enable-ext-control;
  104 + };
  105 + dcdc2 {
  106 + ti,enable-ext-control;
  107 + };
  108 + dcdc3 {
  109 + ti,enable-ext-control;
  110 + };
  111 + fet1: fet1 {
  112 + regulator-name = "vcd_led";
  113 + ti,overcurrent-wait = <3>;
  114 + };
  115 + tps65090_fet2: fet2 {
  116 + regulator-name = "video_mid";
  117 + regulator-always-on;
  118 + ti,overcurrent-wait = <3>;
  119 + };
  120 + fet3 {
  121 + regulator-name = "wwan_r";
  122 + regulator-always-on;
  123 + ti,overcurrent-wait = <3>;
  124 + };
  125 + fet4 {
  126 + regulator-name = "sdcard";
  127 + ti,overcurrent-wait = <3>;
  128 + };
  129 + fet5 {
  130 + regulator-name = "camout";
  131 + regulator-always-on;
  132 + ti,overcurrent-wait = <3>;
  133 + };
  134 + fet6: fet6 {
  135 + regulator-name = "lcd_vdd";
  136 + ti,overcurrent-wait = <3>;
  137 + };
  138 + tps65090_fet7: fet7 {
  139 + regulator-name = "video_mid_1a";
  140 + regulator-always-on;
  141 + ti,overcurrent-wait = <3>;
  142 + };
  143 + ldo1 {
  144 + };
  145 + ldo2 {
  146 + };
  147 + };
  148 +
  149 + charger {
  150 + compatible = "ti,tps65090-charger";
  151 + };
  152 + };
57 153 };
58 154 };
59 155  
arch/arm/dts/exynos5420-peach-pit.dts
... ... @@ -26,6 +26,7 @@
26 26 serial0 = "/serial@12C30000";
27 27 console = "/serial@12C30000";
28 28 pmic = "/i2c@12CA0000";
  29 + i2c104 = &i2c_tunnel;
29 30 };
30 31  
31 32 dmc {
... ... @@ -101,30 +102,6 @@
101 102 };
102 103 };
103 104  
104   - spi@12d40000 { /* spi2 */
105   - spi-max-frequency = <4000000>;
106   - spi-deactivate-delay = <200>;
107   -
108   - cros_ec: cros-ec@0 {
109   - compatible = "google,cros-ec-spi";
110   - reg = <0>;
111   - spi-half-duplex;
112   - spi-max-timeout-ms = <1100>;
113   - ec-interrupt = <&gpx1 5 GPIO_ACTIVE_LOW>;
114   -
115   - /*
116   - * This describes the flash memory within the EC. Note
117   - * that the STM32L flash erases to 0, not 0xff.
118   - */
119   - #address-cells = <1>;
120   - #size-cells = <1>;
121   - flash@8000000 {
122   - reg = <0x08000000 0x20000>;
123   - erase-value = <0>;
124   - };
125   - };
126   - };
127   -
128 105 xhci@12000000 {
129 106 samsung,vbus-gpio = <&gph0 0 GPIO_ACTIVE_HIGH>;
130 107 };
... ... @@ -156,6 +133,105 @@
156 133 samsung,interface-mode = <1>;
157 134 samsung,dp-enabled = <1>;
158 135 samsung,dual-lcd-enabled = <0>;
  136 + };
  137 +};
  138 +
  139 +&spi_2 {
  140 + spi-max-frequency = <3125000>;
  141 + spi-deactivate-delay = <200>;
  142 + status = "okay";
  143 + num-cs = <1>;
  144 + samsung,spi-src-clk = <0>;
  145 + cs-gpios = <&gpb1 2 0>;
  146 +
  147 + cros_ec: cros-ec@0 {
  148 + compatible = "google,cros-ec-spi";
  149 + interrupt-parent = <&gpx1>;
  150 + interrupts = <5 0>;
  151 + reg = <0>;
  152 + spi-half-duplex;
  153 + spi-max-timeout-ms = <1100>;
  154 + ec-interrupt = <&gpx1 5 GPIO_ACTIVE_LOW>;
  155 + #address-cells = <1>;
  156 + #size-cells = <1>;
  157 +
  158 + /*
  159 + * This describes the flash memory within the EC. Note
  160 + * that the STM32L flash erases to 0, not 0xff.
  161 + */
  162 + flash@8000000 {
  163 + reg = <0x08000000 0x20000>;
  164 + erase-value = <0>;
  165 + };
  166 +
  167 + controller-data {
  168 + samsung,spi-feedback-delay = <1>;
  169 + };
  170 +
  171 + i2c_tunnel: i2c-tunnel {
  172 + compatible = "google,cros-ec-i2c-tunnel";
  173 + #address-cells = <1>;
  174 + #size-cells = <0>;
  175 + google,remote-bus = <0>;
  176 +
  177 + battery: sbs-battery@b {
  178 + compatible = "sbs,sbs-battery";
  179 + reg = <0xb>;
  180 + sbs,poll-retry-count = <1>;
  181 + sbs,i2c-retry-count = <2>;
  182 + };
  183 +
  184 + power-regulator@48 {
  185 + compatible = "ti,tps65090";
  186 + reg = <0x48>;
  187 +
  188 + regulators {
  189 + tps65090_dcdc1: dcdc1 {
  190 + ti,enable-ext-control;
  191 + };
  192 + tps65090_dcdc2: dcdc2 {
  193 + ti,enable-ext-control;
  194 + };
  195 + tps65090_dcdc3: dcdc3 {
  196 + ti,enable-ext-control;
  197 + };
  198 + tps65090_fet1: fet1 {
  199 + regulator-name = "vcd_led";
  200 + };
  201 + tps65090_fet2: fet2 {
  202 + regulator-name = "video_mid";
  203 + regulator-always-on;
  204 + };
  205 + tps65090_fet3: fet3 {
  206 + regulator-name = "wwan_r";
  207 + regulator-always-on;
  208 + };
  209 + tps65090_fet4: fet4 {
  210 + regulator-name = "sdcard";
  211 + regulator-always-on;
  212 + };
  213 + tps65090_fet5: fet5 {
  214 + regulator-name = "camout";
  215 + regulator-always-on;
  216 + };
  217 + tps65090_fet6: fet6 {
  218 + regulator-name = "lcd_vdd";
  219 + };
  220 + tps65090_fet7: fet7 {
  221 + regulator-name = "video_mid_1a";
  222 + regulator-always-on;
  223 + };
  224 + tps65090_ldo1: ldo1 {
  225 + };
  226 + tps65090_ldo2: ldo2 {
  227 + };
  228 + };
  229 +
  230 + charger {
  231 + compatible = "ti,tps65090-charger";
  232 + };
  233 + };
  234 + };
159 235 };
160 236 };
161 237  
arch/arm/dts/exynos5800-peach-pi.dts
... ... @@ -26,6 +26,7 @@
26 26 serial0 = "/serial@12C30000";
27 27 console = "/serial@12C30000";
28 28 pmic = "/i2c@12CA0000";
  29 + i2c104 = &i2c_tunnel;
29 30 };
30 31  
31 32 dmc {
... ... @@ -93,29 +94,6 @@
93 94 };
94 95 };
95 96  
96   - spi@12d40000 { /* spi2 */
97   - spi-max-frequency = <4000000>;
98   - spi-deactivate-delay = <200>;
99   - cros_ec: cros-ec@0 {
100   - compatible = "google,cros-ec-spi";
101   - reg = <0>;
102   - spi-half-duplex;
103   - spi-max-timeout-ms = <1100>;
104   - ec-interrupt = <&gpx1 5 GPIO_ACTIVE_LOW>;
105   -
106   - /*
107   - * This describes the flash memory within the EC. Note
108   - * that the STM32L flash erases to 0, not 0xff.
109   - */
110   - #address-cells = <1>;
111   - #size-cells = <1>;
112   - flash@8000000 {
113   - reg = <0x08000000 0x20000>;
114   - erase-value = <0>;
115   - };
116   - };
117   - };
118   -
119 97 xhci@12000000 {
120 98 samsung,vbus-gpio = <&gph0 0 GPIO_ACTIVE_HIGH>;
121 99 };
... ... @@ -150,6 +128,105 @@
150 128 samsung,dual-lcd-enabled = <0>;
151 129  
152 130 samsung,bl-en-gpio = <&gpx2 2 GPIO_ACTIVE_HIGH>;
  131 + };
  132 +};
  133 +
  134 +&spi_2 {
  135 + spi-max-frequency = <3125000>;
  136 + spi-deactivate-delay = <200>;
  137 + status = "okay";
  138 + num-cs = <1>;
  139 + samsung,spi-src-clk = <0>;
  140 + cs-gpios = <&gpb1 2 0>;
  141 +
  142 + cros_ec: cros-ec@0 {
  143 + compatible = "google,cros-ec-spi";
  144 + interrupt-parent = <&gpx1>;
  145 + interrupts = <5 0>;
  146 + reg = <0>;
  147 + spi-half-duplex;
  148 + spi-max-timeout-ms = <1100>;
  149 + ec-interrupt = <&gpx1 5 GPIO_ACTIVE_LOW>;
  150 +
  151 + /*
  152 + * This describes the flash memory within the EC. Note
  153 + * that the STM32L flash erases to 0, not 0xff.
  154 + */
  155 + #address-cells = <1>;
  156 + #size-cells = <1>;
  157 + flash@8000000 {
  158 + reg = <0x08000000 0x20000>;
  159 + erase-value = <0>;
  160 + };
  161 +
  162 + controller-data {
  163 + samsung,spi-feedback-delay = <1>;
  164 + };
  165 +
  166 + i2c_tunnel: i2c-tunnel {
  167 + compatible = "google,cros-ec-i2c-tunnel";
  168 + #address-cells = <1>;
  169 + #size-cells = <0>;
  170 + google,remote-bus = <0>;
  171 +
  172 + battery: sbs-battery@b {
  173 + compatible = "sbs,sbs-battery";
  174 + reg = <0xb>;
  175 + sbs,poll-retry-count = <1>;
  176 + sbs,i2c-retry-count = <2>;
  177 + };
  178 +
  179 + power-regulator@48 {
  180 + compatible = "ti,tps65090";
  181 + reg = <0x48>;
  182 +
  183 + regulators {
  184 + tps65090_dcdc1: dcdc1 {
  185 + ti,enable-ext-control;
  186 + };
  187 + tps65090_dcdc2: dcdc2 {
  188 + ti,enable-ext-control;
  189 + };
  190 + tps65090_dcdc3: dcdc3 {
  191 + ti,enable-ext-control;
  192 + };
  193 + tps65090_fet1: fet1 {
  194 + regulator-name = "vcd_led";
  195 + };
  196 + tps65090_fet2: fet2 {
  197 + regulator-name = "video_mid";
  198 + regulator-always-on;
  199 + };
  200 + tps65090_fet3: fet3 {
  201 + regulator-name = "wwan_r";
  202 + regulator-always-on;
  203 + };
  204 + tps65090_fet4: fet4 {
  205 + regulator-name = "sdcard";
  206 + regulator-always-on;
  207 + };
  208 + tps65090_fet5: fet5 {
  209 + regulator-name = "camout";
  210 + regulator-always-on;
  211 + };
  212 + tps65090_fet6: fet6 {
  213 + regulator-name = "lcd_vdd";
  214 + };
  215 + tps65090_fet7: fet7 {
  216 + regulator-name = "video_mid_1a";
  217 + regulator-always-on;
  218 + };
  219 + tps65090_ldo1: ldo1 {
  220 + };
  221 + tps65090_ldo2: ldo2 {
  222 + };
  223 + };
  224 +
  225 + charger {
  226 + compatible = "ti,tps65090-charger";
  227 + };
  228 + };
  229 + };
153 230 };
154 231 };
155 232