|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
| 2 | +// common dtsi for MF601xx series LTE modem MIFIs |
| 3 | + |
| 4 | +#include "msm8916-pm8916.dtsi" |
| 5 | + |
| 6 | +#include <dt-bindings/gpio/gpio.h> |
| 7 | +#include <dt-bindings/leds/common.h> |
| 8 | + |
| 9 | +/ { |
| 10 | + chassis-type = "embedded"; |
| 11 | + |
| 12 | + aliases { |
| 13 | + mmc0 = &sdhc_1; /* eMMC */ |
| 14 | + mmc1 = &sdhc_2; /* SD card */ |
| 15 | + serial0 = &blsp_uart2; |
| 16 | + }; |
| 17 | + |
| 18 | + chosen { |
| 19 | + stdout-path = "serial0"; |
| 20 | + }; |
| 21 | + |
| 22 | + /* |
| 23 | + * The battery is removable, so the values listed here are very conservative to ensure |
| 24 | + * charging safety. End-users should override them with matching values. |
| 25 | + */ |
| 26 | + battery: battery { |
| 27 | + compatible = "simple-battery"; |
| 28 | + voltage-min-design-microvolt = <3400000>; |
| 29 | + voltage-max-design-microvolt = <4200000>; |
| 30 | + energy-full-design-microwatt-hours = <7770000>; |
| 31 | + charge-full-design-microamp-hours = <2100000>; |
| 32 | + |
| 33 | + ocv-capacity-celsius = <25>; |
| 34 | + ocv-capacity-table-0 = <4189000 100>, <4073000 95>, |
| 35 | + <4044000 90>, <4039000 85>, <4032000 80>, <4025000 75>, |
| 36 | + <4008000 70>, <3974000 65>, <3953000 60>, <3912000 55>, |
| 37 | + <3884000 50>, <3858000 45>, <3849000 40>, <3839000 35>, |
| 38 | + <3816000 30>, <3774000 25>, <3690000 20>, <3647000 16>, |
| 39 | + <3611000 13>, <3539000 11>, <3477000 10>, <3421000 9>, |
| 40 | + <3388000 8>, <3364000 7>, <3328000 6>, <3235000 5>, |
| 41 | + <3174000 4>, <3096000 3>, <3062000 2>, <3035000 1>, |
| 42 | + <3000000 0>; |
| 43 | + }; |
| 44 | + |
| 45 | + gpio-keys { |
| 46 | + compatible = "gpio-keys"; |
| 47 | + |
| 48 | + pinctrl-0 = <&button_default>; |
| 49 | + pinctrl-names = "default"; |
| 50 | + |
| 51 | + label = "GPIO Buttons"; |
| 52 | + |
| 53 | + button-restart { |
| 54 | + label = "Restart"; |
| 55 | + gpios = <&tlmm 34 GPIO_ACTIVE_LOW>; |
| 56 | + linux,code = <KEY_RESTART>; |
| 57 | + }; |
| 58 | + |
| 59 | + button-wps { |
| 60 | + label = "WPS"; |
| 61 | + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; |
| 62 | + linux,code = <KEY_WPS_BUTTON>; |
| 63 | + |
| 64 | + /* This button is commonly unavailable */ |
| 65 | + status = "disabled"; |
| 66 | + }; |
| 67 | + }; |
| 68 | + |
| 69 | + leds: leds { |
| 70 | + compatible = "gpio-leds"; |
| 71 | + |
| 72 | + pinctrl-0 = <&gpio_leds_default>; |
| 73 | + pinctrl-names = "default"; |
| 74 | + |
| 75 | + /* LEDs gpio are board-specific */ |
| 76 | + led_mobile_g: led-wan-green { |
| 77 | + color = <LED_COLOR_ID_GREEN>; |
| 78 | + default-state = "off"; |
| 79 | + function = LED_FUNCTION_MOBILE; |
| 80 | + }; |
| 81 | + |
| 82 | + led_mobile_r: led-wan-red { |
| 83 | + color = <LED_COLOR_ID_RED>; |
| 84 | + default-state = "off"; |
| 85 | + function = LED_FUNCTION_MOBILE; |
| 86 | + }; |
| 87 | + |
| 88 | + led_bat_g: led-battery-green { |
| 89 | + color = <LED_COLOR_ID_GREEN>; |
| 90 | + default-state = "on"; |
| 91 | + function = LED_FUNCTION_POWER; |
| 92 | + }; |
| 93 | + |
| 94 | + led_bat_r: led-battery-red { |
| 95 | + color = <LED_COLOR_ID_RED>; |
| 96 | + default-state = "off"; |
| 97 | + function = LED_FUNCTION_POWER; |
| 98 | + }; |
| 99 | + |
| 100 | + led_mail_g: led-mail-green { |
| 101 | + color = <LED_COLOR_ID_GREEN>; |
| 102 | + default-state = "off"; |
| 103 | + function = LED_FUNCTION_MAIL; |
| 104 | + }; |
| 105 | + |
| 106 | + led_mail_r: led-mail-red { |
| 107 | + color = <LED_COLOR_ID_RED>; |
| 108 | + default-state = "off"; |
| 109 | + function = LED_FUNCTION_MAIL; |
| 110 | + }; |
| 111 | + |
| 112 | + led_wlan_g: led-wlan-green { |
| 113 | + color = <LED_COLOR_ID_GREEN>; |
| 114 | + default-state = "off"; |
| 115 | + function = LED_FUNCTION_WLAN; |
| 116 | + }; |
| 117 | + |
| 118 | + led_wlan_r: led-wlan-red { |
| 119 | + color = <LED_COLOR_ID_RED>; |
| 120 | + default-state = "off"; |
| 121 | + function = LED_FUNCTION_WLAN; |
| 122 | + }; |
| 123 | + }; |
| 124 | + |
| 125 | + multi-led-mobile { |
| 126 | + compatible = "leds-group-multicolor"; |
| 127 | + color = <LED_COLOR_ID_MULTI>; |
| 128 | + function = LED_FUNCTION_MOBILE; |
| 129 | + leds = <&led_mobile_g>, <&led_mobile_r>; |
| 130 | + }; |
| 131 | + |
| 132 | + multi-led-battery { |
| 133 | + compatible = "leds-group-multicolor"; |
| 134 | + color = <LED_COLOR_ID_MULTI>; |
| 135 | + function = LED_FUNCTION_POWER; |
| 136 | + leds = <&led_bat_g>, <&led_bat_r>; |
| 137 | + }; |
| 138 | + |
| 139 | + multi-led-mail { |
| 140 | + compatible = "leds-group-multicolor"; |
| 141 | + color = <LED_COLOR_ID_MULTI>; |
| 142 | + function = LED_FUNCTION_MAIL; |
| 143 | + leds = <&led_mail_g>, <&led_mail_r>; |
| 144 | + }; |
| 145 | + |
| 146 | + multi-led-wlan { |
| 147 | + compatible = "leds-group-multicolor"; |
| 148 | + color = <LED_COLOR_ID_MULTI>; |
| 149 | + function = LED_FUNCTION_WLAN; |
| 150 | + leds = <&led_wlan_g>, <&led_wlan_r>; |
| 151 | + }; |
| 152 | +}; |
| 153 | + |
| 154 | +&bam_dmux { |
| 155 | + status = "okay"; |
| 156 | +}; |
| 157 | + |
| 158 | +&bam_dmux_dma { |
| 159 | + status = "okay"; |
| 160 | +}; |
| 161 | + |
| 162 | +&blsp_uart2 { |
| 163 | + status = "okay"; |
| 164 | +}; |
| 165 | + |
| 166 | +/* Remove &dsi_phy0 from clocks to make sure that gcc probes with display disabled */ |
| 167 | +&gcc { |
| 168 | + clocks = <&xo_board>, <&sleep_clk>, <0>, <0>, <0>, <0>, <0>; |
| 169 | +}; |
| 170 | + |
| 171 | +&mba_mem { |
| 172 | + status = "okay"; |
| 173 | +}; |
| 174 | + |
| 175 | +&mpss { |
| 176 | + pinctrl-0 = <&sim_ctrl_default>; |
| 177 | + pinctrl-names = "default"; |
| 178 | + |
| 179 | + status = "okay"; |
| 180 | +}; |
| 181 | + |
| 182 | +&mpss_mem { |
| 183 | + reg = <0x0 0x86800000 0x0 0x5500000>; |
| 184 | + status = "okay"; |
| 185 | +}; |
| 186 | + |
| 187 | +&pm8916_bms { |
| 188 | + monitored-battery = <&battery>; |
| 189 | + power-supplies = <&pm8916_charger>; |
| 190 | + |
| 191 | + status = "okay"; |
| 192 | +}; |
| 193 | + |
| 194 | +&pm8916_charger { |
| 195 | + monitored-battery = <&battery>; |
| 196 | + |
| 197 | + /* The values here are conservative and should be overrided in end-products */ |
| 198 | + qcom,fast-charge-safe-current = <500000>; |
| 199 | + qcom,fast-charge-safe-voltage = <4200000>; |
| 200 | + |
| 201 | + status = "okay"; |
| 202 | +}; |
| 203 | + |
| 204 | +&pm8916_rpm_regulators { |
| 205 | + pm8916_l17: l17 { |
| 206 | + regulator-min-microvolt = <2850000>; |
| 207 | + regulator-max-microvolt = <2850000>; |
| 208 | + }; |
| 209 | +}; |
| 210 | + |
| 211 | +&sdhc_1 { |
| 212 | + status = "okay"; |
| 213 | +}; |
| 214 | + |
| 215 | +&sdhc_2 { |
| 216 | + status = "okay"; |
| 217 | +}; |
| 218 | + |
| 219 | +&usb { |
| 220 | + extcon = <&pm8916_charger>; |
| 221 | + usb-role-switch; |
| 222 | + |
| 223 | + status = "okay"; |
| 224 | +}; |
| 225 | + |
| 226 | +&usb_hs_phy { |
| 227 | + extcon = <&pm8916_charger>; |
| 228 | +}; |
| 229 | + |
| 230 | +&venus { |
| 231 | + status = "okay"; |
| 232 | +}; |
| 233 | + |
| 234 | +&venus_mem { |
| 235 | + status = "okay"; |
| 236 | +}; |
| 237 | + |
| 238 | +&wcnss { |
| 239 | + status = "okay"; |
| 240 | +}; |
| 241 | + |
| 242 | +&wcnss_iris { |
| 243 | + compatible = "qcom,wcn3620"; |
| 244 | +}; |
| 245 | + |
| 246 | +&wcnss_mem { |
| 247 | + status = "okay"; |
| 248 | +}; |
| 249 | + |
| 250 | +&tlmm { |
| 251 | + button_default: button-default-state { |
| 252 | + function = "gpio"; |
| 253 | + drive-strength = <2>; |
| 254 | + pins = "gpio34", "gpio107"; |
| 255 | + bias-pull-up; |
| 256 | + }; |
| 257 | + |
| 258 | + gpio_leds_default: gpio-leds-default-state { |
| 259 | + function = "gpio"; |
| 260 | + drive-strength = <2>; |
| 261 | + pins = "gpio20", "gpio21", "gpio22", "gpio110", "gpio112", |
| 262 | + "gpio113", "gpio114", "gpio115", "gpio116", "gpio117", |
| 263 | + "gpio118", "gpio119", "gpio120", "gpio121"; |
| 264 | + bias-disable; |
| 265 | + }; |
| 266 | + |
| 267 | + /* This selects the external SIM card slot by default */ |
| 268 | + sim_ctrl_default: sim-ctrl-default-state { |
| 269 | + esim-sel-pins { |
| 270 | + function = "gpio"; |
| 271 | + drive-strength = <2>; |
| 272 | + pins = "gpio50", "gpio51"; |
| 273 | + bias-disable; |
| 274 | + output-low; |
| 275 | + }; |
| 276 | + |
| 277 | + sim-en-pins { |
| 278 | + function = "gpio"; |
| 279 | + drive-strength = <2>; |
| 280 | + pins = "gpio24"; |
| 281 | + bias-disable; |
| 282 | + output-low; |
| 283 | + }; |
| 284 | + |
| 285 | + sim-sel-pins { |
| 286 | + function = "gpio"; |
| 287 | + drive-strength = <2>; |
| 288 | + pins = "gpio49"; |
| 289 | + bias-disable; |
| 290 | + output-high; |
| 291 | + }; |
| 292 | + }; |
| 293 | +}; |
0 commit comments