brintos

brintos / linux-shallow public Read only

0
0
Text · 9.1 KiB · 2492480 Raw
297 lines · yaml
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause2%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/samsung,s5m8767.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Samsung S5M8767 Power Management IC8 9maintainers:10  - Krzysztof Kozlowski <krzk@kernel.org>11 12description: |13  This is a part of device tree bindings for S2M and S5M family of Power14  Management IC (PMIC).15 16  The Samsung S5M8767 is a Power Management IC which includes voltage17  and current regulators, RTC, clock outputs and other sub-blocks.18 19properties:20  compatible:21    const: samsung,s5m8767-pmic22 23  clocks:24    $ref: /schemas/clock/samsung,s2mps11.yaml25    description:26      Child node describing clock provider.27 28  interrupts:29    maxItems: 130 31  reg:32    maxItems: 133 34  regulators:35    $ref: /schemas/regulator/samsung,s5m8767.yaml36    description:37      List of child nodes that specify the regulators.38 39  s5m8767,pmic-buck2-dvs-voltage:40    $ref: /schemas/types.yaml#/definitions/uint32-array41    minItems: 842    maxItems: 843    description: |44      A set of 8 voltage values in micro-volt (uV) units for buck2 when45      changing voltage using gpio dvs.46 47  s5m8767,pmic-buck3-dvs-voltage:48    $ref: /schemas/types.yaml#/definitions/uint32-array49    minItems: 850    maxItems: 851    description: |52      A set of 8 voltage values in micro-volt (uV) units for buck3 when53      changing voltage using gpio dvs.54 55  s5m8767,pmic-buck4-dvs-voltage:56    $ref: /schemas/types.yaml#/definitions/uint32-array57    minItems: 858    maxItems: 859    description: |60      A set of 8 voltage values in micro-volt (uV) units for buck4 when61      changing voltage using gpio dvs.62 63  s5m8767,pmic-buck-ds-gpios:64    minItems: 365    maxItems: 366    description: |67      GPIO specifiers for three host gpio's used for selecting GPIO DVS lines.68      It is one-to-one mapped to dvs gpio lines.69 70  s5m8767,pmic-buck2-uses-gpio-dvs:71    type: boolean72    description: buck2 can be controlled by gpio dvs.73 74  s5m8767,pmic-buck3-uses-gpio-dvs:75    type: boolean76    description: buck3 can be controlled by gpio dvs.77 78  s5m8767,pmic-buck4-uses-gpio-dvs:79    type: boolean80    description: buck4 can be controlled by gpio dvs.81 82  s5m8767,pmic-buck-default-dvs-idx:83    $ref: /schemas/types.yaml#/definitions/uint32-array84    minimum: 085    maximum: 786    default: 087    description: |88      Default voltage setting selected from the possible 8 options selectable89      by the dvs gpios. The value of this property should be between 0 and 7.90      If not specified or if out of range, the default value of this property91      is set to 0.92 93  s5m8767,pmic-buck-dvs-gpios:94    minItems: 395    maxItems: 396    description: |97      GPIO specifiers for three host gpio's used for dvs.98 99  vinb1-supply:100    description: Power supply for buck1101  vinb2-supply:102    description: Power supply for buck2103  vinb3-supply:104    description: Power supply for buck3105  vinb4-supply:106    description: Power supply for buck4107  vinb5-supply:108    description: Power supply for buck5109  vinb6-supply:110    description: Power supply for buck6111  vinb7-supply:112    description: Power supply for buck7113  vinb8-supply:114    description: Power supply for buck8115  vinb9-supply:116    description: Power supply for buck9117 118  vinl1-supply:119    description: Power supply for LDO3, LDO10, LDO26, LDO27120  vinl2-supply:121    description: Power supply for LDO13, LDO16, LDO25, LDO28122  vinl3-supply:123    description: Power supply for LDO11, LDO14124  vinl4-supply:125    description: Power supply for LDO4, LDO9126  vinl5-supply:127    description: Power supply for LDO12, LDO17, LDO19, LDO23128  vinl6-supply:129    description: Power supply for LDO18, LDO20, LDO21, LDO24130  vinl7-supply:131    description: Power supply for LDO5, LDO22132  vinl8-supply:133    description: Power supply for LDO1, LDO6, LDO7, LDO8, LDO15134  vinl9-supply:135    description: Power supply for LDO2136 137  wakeup-source: true138 139required:140  - compatible141  - reg142  - regulators143  - s5m8767,pmic-buck-ds-gpios144 145dependencies:146  s5m8767,pmic-buck2-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ]147  s5m8767,pmic-buck3-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ]148  s5m8767,pmic-buck4-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ]149  s5m8767,pmic-buck2-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck2-dvs-voltage' ]150  s5m8767,pmic-buck3-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck3-dvs-voltage' ]151  s5m8767,pmic-buck4-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck4-dvs-voltage' ]152 153additionalProperties: false154 155allOf:156  - not:157      required:158        - s5m8767,pmic-buck2-uses-gpio-dvs159        - s5m8767,pmic-buck3-uses-gpio-dvs160  - not:161      required:162        - s5m8767,pmic-buck2-uses-gpio-dvs163        - s5m8767,pmic-buck4-uses-gpio-dvs164  - not:165      required:166        - s5m8767,pmic-buck3-uses-gpio-dvs167        - s5m8767,pmic-buck4-uses-gpio-dvs168 169examples:170  - |171    #include <dt-bindings/gpio/gpio.h>172    #include <dt-bindings/interrupt-controller/irq.h>173 174    i2c {175        #address-cells = <1>;176        #size-cells = <0>;177 178        pmic@66 {179            compatible = "samsung,s5m8767-pmic";180            reg = <0x66>;181 182            interrupt-parent = <&gpx3>;183            interrupts = <2 IRQ_TYPE_LEVEL_LOW>;184            pinctrl-names = "default";185            pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;186            wakeup-source;187 188            s5m8767,pmic-buck-default-dvs-idx = <3>;189            s5m8767,pmic-buck2-uses-gpio-dvs;190 191            s5m8767,pmic-buck-dvs-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>,192                                          <&gpd1 1 GPIO_ACTIVE_LOW>,193                                          <&gpd1 2 GPIO_ACTIVE_LOW>;194 195            s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>,196                                         <&gpx2 4 GPIO_ACTIVE_LOW>,197                                         <&gpx2 5 GPIO_ACTIVE_LOW>;198 199            s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,200                                             <1250000>, <1200000>,201                                             <1150000>, <1100000>,202                                             <1000000>, <950000>;203 204            s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,205                                             <1100000>, <1100000>,206                                             <1000000>, <1000000>,207                                             <1000000>, <1000000>;208 209            s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,210                                             <1200000>, <1200000>,211                                             <1200000>, <1200000>,212                                             <1200000>, <1200000>;213 214            clocks {215                compatible = "samsung,s5m8767-clk";216                #clock-cells = <1>;217                clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt";218            };219 220            regulators {221                LDO1 {222                    regulator-name = "VDD_ALIVE";223                    regulator-min-microvolt = <1100000>;224                    regulator-max-microvolt = <1100000>;225                    regulator-always-on;226                    regulator-boot-on;227                    op_mode = <1>; /* Normal Mode */228                };229 230                // ...231 232                BUCK1 {233                    regulator-name = "VDD_MIF";234                    regulator-min-microvolt = <950000>;235                    regulator-max-microvolt = <1100000>;236                    regulator-always-on;237                    regulator-boot-on;238                    op_mode = <1>; /* Normal Mode */239                };240 241                BUCK2 {242                    regulator-name = "VDD_ARM";243                    regulator-min-microvolt = <900000>;244                    regulator-max-microvolt = <1350000>;245                    regulator-always-on;246                    regulator-boot-on;247                    op_mode = <1>; /* Normal Mode */248                };249 250                // ...251            };252        };253    };254 255  - |256    #include <dt-bindings/gpio/gpio.h>257    #include <dt-bindings/interrupt-controller/irq.h>258 259    i2c {260        #address-cells = <1>;261        #size-cells = <0>;262 263        pmic@66 {264            compatible = "samsung,s5m8767-pmic";265            reg = <0x66>;266 267            interrupt-parent = <&gpx3>;268            interrupts = <2 IRQ_TYPE_LEVEL_LOW>;269            pinctrl-names = "default";270            pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>;271            wakeup-source;272 273            s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>,274                                         <&gpx2 4 GPIO_ACTIVE_LOW>,275                                         <&gpx2 5 GPIO_ACTIVE_LOW>;276 277            clocks {278                compatible = "samsung,s5m8767-clk";279                #clock-cells = <1>;280                clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt";281            };282 283            regulators {284                LDO1 {285                    regulator-name = "VDD_ALIVE";286                    regulator-min-microvolt = <1100000>;287                    regulator-max-microvolt = <1100000>;288                    regulator-always-on;289                    regulator-boot-on;290                    op_mode = <1>; /* Normal Mode */291                };292 293                // ...294            };295        };296    };297