David Collins | 0051564 | 2018-01-11 17:39:58 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. |
David Collins | 7d82ceb | 2017-03-10 11:54:32 -0800 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include <dt-bindings/spmi/spmi.h> |
| 14 | #include <dt-bindings/interrupt-controller/irq.h> |
| 15 | |
| 16 | &spmi_bus { |
| 17 | qcom,pm8005@4 { |
| 18 | compatible = "qcom,spmi-pmic"; |
| 19 | reg = <0x4 SPMI_USID>; |
| 20 | #address-cells = <2>; |
| 21 | #size-cells = <0>; |
| 22 | |
| 23 | pm8005_revid: qcom,revid@100 { |
| 24 | compatible = "qcom,qpnp-revid"; |
| 25 | reg = <0x100 0x100>; |
| 26 | }; |
| 27 | |
David Collins | 0051564 | 2018-01-11 17:39:58 -0800 | [diff] [blame] | 28 | pm8005_tz: qcom,temp-alarm@2400 { |
David Collins | 7d82ceb | 2017-03-10 11:54:32 -0800 | [diff] [blame] | 29 | compatible = "qcom,qpnp-temp-alarm"; |
| 30 | reg = <0x2400 0x100>; |
| 31 | interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_RISING>; |
| 32 | label = "pm8005_tz"; |
David Collins | 0051564 | 2018-01-11 17:39:58 -0800 | [diff] [blame] | 33 | #thermal-sensor-cells = <0>; |
David Collins | 7d82ceb | 2017-03-10 11:54:32 -0800 | [diff] [blame] | 34 | }; |
| 35 | |
Fenglin Wu | 5a50fc8 | 2017-03-22 12:27:31 +0800 | [diff] [blame] | 36 | pm8005_gpios: pinctrl@c000 { |
| 37 | compatible = "qcom,spmi-gpio"; |
| 38 | reg = <0xc000 0x400>; |
| 39 | interrupts = <0x4 0xc0 0 IRQ_TYPE_NONE>, |
| 40 | <0x4 0xc1 0 IRQ_TYPE_NONE>; |
| 41 | interrupt-names = "pm8005_gpio1", "pm8005_gpio2"; |
David Collins | 7d82ceb | 2017-03-10 11:54:32 -0800 | [diff] [blame] | 42 | gpio-controller; |
| 43 | #gpio-cells = <2>; |
Fenglin Wu | 5a50fc8 | 2017-03-22 12:27:31 +0800 | [diff] [blame] | 44 | qcom,gpios-disallowed = <3 4>; |
David Collins | 7d82ceb | 2017-03-10 11:54:32 -0800 | [diff] [blame] | 45 | }; |
| 46 | }; |
| 47 | |
| 48 | qcom,pm8005@5 { |
| 49 | compatible ="qcom,spmi-pmic"; |
| 50 | reg = <0x5 SPMI_USID>; |
| 51 | #address-cells = <2>; |
| 52 | #size-cells = <0>; |
| 53 | |
| 54 | regulator@1400 { |
| 55 | compatible = "qcom,qpnp-regulator"; |
| 56 | reg = <0x1400 0x100>; |
| 57 | regulator-name = "pm8005_s1"; |
| 58 | status = "disabled"; |
| 59 | }; |
| 60 | |
| 61 | regulator@1700 { |
| 62 | compatible = "qcom,qpnp-regulator"; |
| 63 | reg = <0x1700 0x100>; |
| 64 | regulator-name = "pm8005_s2"; |
| 65 | status = "disabled"; |
| 66 | }; |
| 67 | |
| 68 | regulator@1a00 { |
| 69 | compatible = "qcom,qpnp-regulator"; |
| 70 | reg = <0x1a00 0x100>; |
| 71 | regulator-name = "pm8005_s3"; |
| 72 | status = "disabled"; |
| 73 | }; |
| 74 | |
| 75 | regulator@1d00 { |
| 76 | compatible = "qcom,qpnp-regulator"; |
| 77 | reg = <0x1d00 0x100>; |
| 78 | regulator-name = "pm8005_s4"; |
| 79 | status = "disabled"; |
| 80 | }; |
| 81 | }; |
| 82 | }; |
David Collins | 0051564 | 2018-01-11 17:39:58 -0800 | [diff] [blame] | 83 | |
| 84 | &thermal_zones { |
| 85 | pm8005_tz { |
| 86 | polling-delay-passive = <0>; |
| 87 | polling-delay = <0>; |
| 88 | thermal-sensors = <&pm8005_tz>; |
| 89 | trips { |
| 90 | pm8005-trip0 { |
| 91 | temperature = <105000>; |
| 92 | hysteresis = <0>; |
| 93 | type = "passive"; |
| 94 | }; |
| 95 | pm8005-trip1 { |
| 96 | temperature = <125000>; |
| 97 | hysteresis = <0>; |
| 98 | type = "passive"; |
| 99 | }; |
| 100 | pm8005-trip2 { |
| 101 | temperature = <145000>; |
| 102 | hysteresis = <0>; |
| 103 | type = "passive"; |
| 104 | }; |
| 105 | }; |
| 106 | }; |
| 107 | }; |