diff options
author | Brian Masney <masneyb@onstation.org> | 2018-08-02 20:18:53 -0400 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2018-09-13 15:49:47 -0400 |
commit | fe8d81fe7d9aab6a8e22c8b115eb06b7707087db (patch) | |
tree | 365db269cf99ebfb7ceca390bb757bc1301a047f | |
parent | 14e63a953a8dc536a5b07df087171aaeba052d40 (diff) |
ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for mpu6515
This patch adds device tree bindings for the mpu6515 to the LG Nexus 5
(hammerhead) phone. Confirmed that the gyroscope / accelerometer
(mpu6515), magnetometer (ak8963), and temperature / pressure (bmp280)
sensors are available on the phone.
Interrupts are not working properly on the ak8963 magnetometer so they
are currently not configured.
The bmp280 retuns temperature/pressure measurement skipped errors but
will reliably work if I run:
echo 1 > in_pressure_oversampling_ratio
echo 1 > in_temp_oversampling_ratio
Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
-rw-r--r-- | arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 56 | ||||
-rw-r--r-- | arch/arm/boot/dts/qcom-msm8974.dtsi | 11 |
2 files changed, 67 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts index c2dc9d09484a..928affae1885 100644 --- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | |||
@@ -241,6 +241,24 @@ | |||
241 | bias-pull-up; | 241 | bias-pull-up; |
242 | }; | 242 | }; |
243 | }; | 243 | }; |
244 | |||
245 | i2c12_pins: i2c12 { | ||
246 | mux { | ||
247 | pins = "gpio87", "gpio88"; | ||
248 | function = "blsp_i2c12"; | ||
249 | drive-strength = <2>; | ||
250 | bias-disable; | ||
251 | }; | ||
252 | }; | ||
253 | |||
254 | mpu6515_pin: mpu6515 { | ||
255 | irq { | ||
256 | pins = "gpio73"; | ||
257 | function = "gpio"; | ||
258 | bias-disable; | ||
259 | input-enable; | ||
260 | }; | ||
261 | }; | ||
244 | }; | 262 | }; |
245 | 263 | ||
246 | sdhci@f9824900 { | 264 | sdhci@f9824900 { |
@@ -277,6 +295,44 @@ | |||
277 | linux,code = <KEY_VOLUMEDOWN>; | 295 | linux,code = <KEY_VOLUMEDOWN>; |
278 | }; | 296 | }; |
279 | }; | 297 | }; |
298 | |||
299 | i2c@f9968000 { | ||
300 | status = "ok"; | ||
301 | pinctrl-names = "default"; | ||
302 | pinctrl-0 = <&i2c12_pins>; | ||
303 | clock-frequency = <100000>; | ||
304 | qcom,src-freq = <50000000>; | ||
305 | |||
306 | mpu6515@68 { | ||
307 | compatible = "invensense,mpu6515"; | ||
308 | reg = <0x68>; | ||
309 | interrupts-extended = <&msmgpio 73 IRQ_TYPE_EDGE_FALLING>; | ||
310 | vddio-supply = <&pm8941_lvs1>; | ||
311 | |||
312 | pinctrl-names = "default"; | ||
313 | pinctrl-0 = <&mpu6515_pin>; | ||
314 | |||
315 | i2c-gate { | ||
316 | #address-cells = <1>; | ||
317 | #size-cells = <0>; | ||
318 | ak8963@f { | ||
319 | compatible = "asahi-kasei,ak8963"; | ||
320 | reg = <0x0f>; | ||
321 | // Currently only works in polling mode. | ||
322 | // gpios = <&msmgpio 61 0>; | ||
323 | vid-supply = <&pm8941_lvs1>; | ||
324 | vdd-supply = <&pm8941_l17>; | ||
325 | }; | ||
326 | |||
327 | bmp280@76 { | ||
328 | compatible = "bosch,bmp280"; | ||
329 | reg = <0x76>; | ||
330 | vdda-supply = <&pm8941_lvs1>; | ||
331 | vddd-supply = <&pm8941_l17>; | ||
332 | }; | ||
333 | }; | ||
334 | }; | ||
335 | }; | ||
280 | }; | 336 | }; |
281 | 337 | ||
282 | &spmi_bus { | 338 | &spmi_bus { |
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index 9550f0612918..439ca8c3a8b4 100644 --- a/arch/arm/boot/dts/qcom-msm8974.dtsi +++ b/arch/arm/boot/dts/qcom-msm8974.dtsi | |||
@@ -739,6 +739,17 @@ | |||
739 | dma-names = "tx", "rx"; | 739 | dma-names = "tx", "rx"; |
740 | }; | 740 | }; |
741 | 741 | ||
742 | blsp_i2c12: i2c@f9968000 { | ||
743 | status = "disabled"; | ||
744 | compatible = "qcom,i2c-qup-v2.1.1"; | ||
745 | reg = <0xf9968000 0x1000>; | ||
746 | interrupts = <0 106 IRQ_TYPE_NONE>; | ||
747 | clocks = <&gcc GCC_BLSP2_QUP6_I2C_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>; | ||
748 | clock-names = "core", "iface"; | ||
749 | #address-cells = <1>; | ||
750 | #size-cells = <0>; | ||
751 | }; | ||
752 | |||
742 | spmi_bus: spmi@fc4cf000 { | 753 | spmi_bus: spmi@fc4cf000 { |
743 | compatible = "qcom,spmi-pmic-arb"; | 754 | compatible = "qcom,spmi-pmic-arb"; |
744 | reg-names = "core", "intr", "cnfg"; | 755 | reg-names = "core", "intr", "cnfg"; |