|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/mfd/fsl,mc13xxx.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Freescale MC13xxx Power Management Integrated Circuits (PMIC) |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Alexander Kurz <akurz@blala.de> |
| 11 | + |
| 12 | +description: > |
| 13 | + The MC13xxx PMIC series consists of the three models MC13783, MC13892 |
| 14 | + and MC34708 and provide regulators and other features like RTC, ADC, |
| 15 | + LED, touchscreen, codec and input buttons. |
| 16 | +
|
| 17 | + Link to datasheets |
| 18 | + https://www.nxp.com/docs/en/data-sheet/MC13783.pdf |
| 19 | + https://www.nxp.com/docs/en/data-sheet/MC13892.pdf |
| 20 | + https://www.nxp.com/docs/en/data-sheet/MC34708.pdf |
| 21 | +
|
| 22 | +properties: |
| 23 | + compatible: |
| 24 | + enum: |
| 25 | + - fsl,mc13783 |
| 26 | + - fsl,mc13892 |
| 27 | + - fsl,mc34708 |
| 28 | + |
| 29 | + reg: |
| 30 | + description: I2C slave address or SPI chip select number. |
| 31 | + maxItems: 1 |
| 32 | + |
| 33 | + spi-max-frequency: true |
| 34 | + |
| 35 | + spi-cs-high: true |
| 36 | + |
| 37 | + system-power-controller: true |
| 38 | + |
| 39 | + interrupts: |
| 40 | + maxItems: 1 |
| 41 | + |
| 42 | + leds: |
| 43 | + type: object |
| 44 | + $ref: /schemas/leds/common.yaml# |
| 45 | + |
| 46 | + properties: |
| 47 | + reg: |
| 48 | + description: | |
| 49 | + One of |
| 50 | + MC13783 LED IDs |
| 51 | + 0: Main display |
| 52 | + 1: AUX display |
| 53 | + 2: Keypad |
| 54 | + 3: Red 1 |
| 55 | + 4: Green 1 |
| 56 | + 5: Blue 1 |
| 57 | + 6: Red 2 |
| 58 | + 7: Green 2 |
| 59 | + 8: Blue 2 |
| 60 | + 9: Red 3 |
| 61 | + 10: Green 3 |
| 62 | + 11: Blue 3 |
| 63 | +
|
| 64 | + MC13892 LED IDs |
| 65 | + 0: Main display |
| 66 | + 1: AUX display |
| 67 | + 2: Keypad |
| 68 | + 3: Red |
| 69 | + 4: Green |
| 70 | + 5: Blue |
| 71 | +
|
| 72 | + MC34708 LED IDs |
| 73 | + 0: Charger Red |
| 74 | + 1: Charger Green |
| 75 | + maxItems: 1 |
| 76 | + |
| 77 | + led-control: |
| 78 | + $ref: /schemas/types.yaml#/definitions/uint32-array |
| 79 | + description: | |
| 80 | + Setting for LED-Control register array length depends on model, |
| 81 | + mc13783: 6, mc13892: 4, mc34708: 1 |
| 82 | +
|
| 83 | + regulators: |
| 84 | + type: object |
| 85 | + |
| 86 | + additionalProperties: |
| 87 | + type: object |
| 88 | + |
| 89 | + description: | |
| 90 | + List of child nodes specifying the regulators, depending on chip variant. |
| 91 | + Each child node is defined using the standard binding for regulators and |
| 92 | + the optional regulator properties defined below. |
| 93 | +
|
| 94 | + fsl,mc13xxx-uses-adc: |
| 95 | + type: boolean |
| 96 | + description: Indicate the ADC is being used |
| 97 | + |
| 98 | + fsl,mc13xxx-uses-codec: |
| 99 | + type: boolean |
| 100 | + description: Indicate the Audio Codec is being used |
| 101 | + |
| 102 | + fsl,mc13xxx-uses-rtc: |
| 103 | + type: boolean |
| 104 | + description: Indicate the RTC is being used |
| 105 | + |
| 106 | + fsl,mc13xxx-uses-touch: |
| 107 | + type: boolean |
| 108 | + description: Indicate the touchscreen controller is being used |
| 109 | + |
| 110 | +required: |
| 111 | + - compatible |
| 112 | + - reg |
| 113 | + |
| 114 | +allOf: |
| 115 | + - if: |
| 116 | + properties: |
| 117 | + compatible: |
| 118 | + contains: |
| 119 | + const: fsl,mc13783 |
| 120 | + then: |
| 121 | + properties: |
| 122 | + leds: |
| 123 | + properties: |
| 124 | + led-control: |
| 125 | + minItems: 6 |
| 126 | + maxItems: 6 |
| 127 | + regulators: |
| 128 | + patternProperties: |
| 129 | + "^gpo[1-4]|pwgt[12]spi|sw[12][ab]|sw3|vaudio|vcam|vdig|vesim|vgen|viohi|violo|vmmc[12]|vrf[12]|vrfbg|vrfcp|vrfdig|vrfref|vsim|vvib$": |
| 130 | + type: object |
| 131 | + $ref: /schemas/regulator/regulator.yaml# |
| 132 | + |
| 133 | + unevaluatedProperties: false |
| 134 | + |
| 135 | + - if: |
| 136 | + properties: |
| 137 | + compatible: |
| 138 | + contains: |
| 139 | + const: fsl,mc13892 |
| 140 | + then: |
| 141 | + properties: |
| 142 | + leds: |
| 143 | + properties: |
| 144 | + led-control: |
| 145 | + minItems: 4 |
| 146 | + maxItems: 4 |
| 147 | + regulators: |
| 148 | + patternProperties: |
| 149 | + "^gpo[1-4]|pwgt[12]spi|sw[1-4]|swbst|vaudio|vcam|vcoincell|vdig|vgen[1-3]|viohi|vpll|vsd|vusb|vusb2|vvideo$": |
| 150 | + type: object |
| 151 | + $ref: /schemas/regulator/regulator.yaml# |
| 152 | + |
| 153 | + unevaluatedProperties: false |
| 154 | + |
| 155 | + - if: |
| 156 | + properties: |
| 157 | + compatible: |
| 158 | + contains: |
| 159 | + const: fsl,mc34708 |
| 160 | + then: |
| 161 | + properties: |
| 162 | + leds: |
| 163 | + properties: |
| 164 | + led-control: |
| 165 | + minItems: 1 |
| 166 | + maxItems: 1 |
| 167 | + |
| 168 | +additionalProperties: false |
| 169 | + |
| 170 | +examples: |
| 171 | + - | |
| 172 | + #include <dt-bindings/gpio/gpio.h> |
| 173 | + #include <dt-bindings/interrupt-controller/irq.h> |
| 174 | + #include <dt-bindings/leds/common.h> |
| 175 | +
|
| 176 | + spi { |
| 177 | + #address-cells = <1>; |
| 178 | + #size-cells = <0>; |
| 179 | +
|
| 180 | + pmic: mc13892@0 { |
| 181 | + compatible = "fsl,mc13892"; |
| 182 | + reg = <0>; |
| 183 | + spi-max-frequency = <1000000>; |
| 184 | + spi-cs-high; |
| 185 | + interrupt-parent = <&gpio0>; |
| 186 | + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; |
| 187 | + fsl,mc13xxx-uses-rtc; |
| 188 | + fsl,mc13xxx-uses-adc; |
| 189 | +
|
| 190 | + leds { |
| 191 | + #address-cells = <1>; |
| 192 | + #size-cells = <0>; |
| 193 | + led-control = <0x000 0x000 0x0e0 0x000>; |
| 194 | +
|
| 195 | + sysled@3 { |
| 196 | + reg = <3>; |
| 197 | + label = "system:red:live"; |
| 198 | + linux,default-trigger = "heartbeat"; |
| 199 | + }; |
| 200 | + }; |
| 201 | +
|
| 202 | + regulators { |
| 203 | + sw1_reg: sw1 { |
| 204 | + regulator-min-microvolt = <600000>; |
| 205 | + regulator-max-microvolt = <1375000>; |
| 206 | + regulator-boot-on; |
| 207 | + regulator-always-on; |
| 208 | + }; |
| 209 | +
|
| 210 | + sw2_reg: sw2 { |
| 211 | + regulator-min-microvolt = <900000>; |
| 212 | + regulator-max-microvolt = <1850000>; |
| 213 | + regulator-boot-on; |
| 214 | + regulator-always-on; |
| 215 | + }; |
| 216 | + }; |
| 217 | + }; |
| 218 | + }; |
0 commit comments