1// SPDX-License-Identifier: GPL-2.0-only 2// Copyright (C) 2020 Stephan Gerhold 3 4/dts-v1/; 5 6#include "msm8916-pm8916.dtsi" 7#include <dt-bindings/gpio/gpio.h> 8#include <dt-bindings/input/input.h> 9 10/ { 11 model = "Xiaomi Redmi 2 (Wingtech WT88047)"; 12 compatible = "wingtech,wt88047", "qcom,msm8916"; 13 14 aliases { 15 serial0 = &blsp1_uart2; 16 }; 17 18 chosen { 19 stdout-path = "serial0"; 20 }; 21 22 gpio-keys { 23 compatible = "gpio-keys"; 24 25 pinctrl-names = "default"; 26 pinctrl-0 = <&gpio_keys_default>; 27 28 label = "GPIO Buttons"; 29 30 volume-up { 31 label = "Volume Up"; 32 gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; 33 linux,code = <KEY_VOLUMEUP>; 34 }; 35 }; 36 37 usb_id: usb-id { 38 compatible = "linux,extcon-usb-gpio"; 39 id-gpio = <&msmgpio 110 GPIO_ACTIVE_HIGH>; 40 pinctrl-names = "default"; 41 pinctrl-0 = <&usb_id_default>; 42 }; 43}; 44 45&blsp1_uart2 { 46 status = "okay"; 47}; 48 49&pm8916_resin { 50 status = "okay"; 51 linux,code = <KEY_VOLUMEDOWN>; 52}; 53 54&pm8916_vib { 55 status = "okay"; 56}; 57 58&pronto { 59 status = "okay"; 60}; 61 62&sdhc_1 { 63 status = "okay"; 64 65 pinctrl-names = "default", "sleep"; 66 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; 67 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; 68}; 69 70&sdhc_2 { 71 status = "okay"; 72 73 pinctrl-names = "default", "sleep"; 74 pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>; 75 pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>; 76 77 non-removable; 78}; 79 80&usb { 81 status = "okay"; 82 extcon = <&usb_id>, <&usb_id>; 83}; 84 85&usb_hs_phy { 86 extcon = <&usb_id>; 87}; 88 89&smd_rpm_regulators { 90 vdd_l1_l2_l3-supply = <&pm8916_s3>; 91 vdd_l4_l5_l6-supply = <&pm8916_s4>; 92 vdd_l7-supply = <&pm8916_s4>; 93 94 s3 { 95 regulator-min-microvolt = <1200000>; 96 regulator-max-microvolt = <1300000>; 97 }; 98 99 s4 { 100 regulator-min-microvolt = <1800000>; 101 regulator-max-microvolt = <2100000>; 102 }; 103 104 l1 { 105 regulator-min-microvolt = <1225000>; 106 regulator-max-microvolt = <1225000>; 107 }; 108 109 l2 { 110 regulator-min-microvolt = <1200000>; 111 regulator-max-microvolt = <1200000>; 112 }; 113 114 l4 { 115 regulator-min-microvolt = <2050000>; 116 regulator-max-microvolt = <2050000>; 117 }; 118 119 l5 { 120 regulator-min-microvolt = <1800000>; 121 regulator-max-microvolt = <1800000>; 122 }; 123 124 l6 { 125 regulator-min-microvolt = <1800000>; 126 regulator-max-microvolt = <1800000>; 127 }; 128 129 l7 { 130 regulator-min-microvolt = <1800000>; 131 regulator-max-microvolt = <1800000>; 132 }; 133 134 l8 { 135 regulator-min-microvolt = <2850000>; 136 regulator-max-microvolt = <2900000>; 137 }; 138 139 l9 { 140 regulator-min-microvolt = <3300000>; 141 regulator-max-microvolt = <3300000>; 142 }; 143 144 l10 { 145 regulator-min-microvolt = <2700000>; 146 regulator-max-microvolt = <2800000>; 147 }; 148 149 l11 { 150 regulator-min-microvolt = <2950000>; 151 regulator-max-microvolt = <2950000>; 152 regulator-allow-set-load; 153 regulator-system-load = <200000>; 154 }; 155 156 l12 { 157 regulator-min-microvolt = <1800000>; 158 regulator-max-microvolt = <2950000>; 159 }; 160 161 l13 { 162 regulator-min-microvolt = <3075000>; 163 regulator-max-microvolt = <3075000>; 164 }; 165 166 l14 { 167 regulator-min-microvolt = <1800000>; 168 regulator-max-microvolt = <3300000>; 169 }; 170 171 l15 { 172 regulator-min-microvolt = <1800000>; 173 regulator-max-microvolt = <3300000>; 174 }; 175 176 l16 { 177 regulator-min-microvolt = <2800000>; 178 regulator-max-microvolt = <3300000>; 179 }; 180 181 l17 { 182 regulator-min-microvolt = <2850000>; 183 regulator-max-microvolt = <2850000>; 184 }; 185 186 l18 { 187 regulator-min-microvolt = <2700000>; 188 regulator-max-microvolt = <2700000>; 189 }; 190}; 191 192&msmgpio { 193 gpio_keys_default: gpio-keys-default { 194 pins = "gpio107"; 195 function = "gpio"; 196 197 drive-strength = <2>; 198 bias-pull-up; 199 }; 200 201 usb_id_default: usb-id-default { 202 pins = "gpio110"; 203 function = "gpio"; 204 205 drive-strength = <8>; 206 bias-pull-up; 207 }; 208}; 209