Unverified Commit fba27fe5 authored by Mark Brown's avatar Mark Brown
Browse files

regulator: Add FP9931/JD9930

Merge series from Andreas Kemnade <andreas@kemnade.info>:

Add a driver for the FP9931/JD9930 regulator which provides the
comparatively high voltages needed for electronic paper displays.

Datasheet for the FP9931 is at
https://www.fitipower.com/dl/file/flXa6hIchVeu0W3K

Although it is in English, it seems to be only downloadable
from the Chinese part of that website.
For the JD9930 there can be a datasheet found at
https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/196/JD9930_2D00_0.7_2D00_JUN_2D00_2019.pdf

To simplify things, include the hwmon part directly which is only
one register read and there are not other functions besides
regulators in this chip.
parents 670500b4 12d821bd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -206,6 +206,7 @@ Danilo Krummrich <dakr@kernel.org> <dakr@redhat.com>
David Brownell <david-b@pacbell.net>
David Collins <quic_collinsd@quicinc.com> <collinsd@codeaurora.org>
David Heidelberg <david@ixit.cz> <d.okias@gmail.com>
David Hildenbrand <david@kernel.org> <david@redhat.com>
David Rheinsberg <david@readahead.eu> <dh.herrmann@gmail.com>
David Rheinsberg <david@readahead.eu> <dh.herrmann@googlemail.com>
David Rheinsberg <david@readahead.eu> <david.rheinsberg@gmail.com>
@@ -426,7 +427,7 @@ Kenneth W Chen <kenneth.w.chen@intel.com>
Kenneth Westfield <quic_kwestfie@quicinc.com> <kwestfie@codeaurora.org>
Kiran Gunda <quic_kgunda@quicinc.com> <kgunda@codeaurora.org>
Kirill Tkhai <tkhai@ya.ru> <ktkhai@virtuozzo.com>
Kirill A. Shutemov <kas@kernel.org> <kirill.shutemov@linux.intel.com>
Kiryl Shutsemau <kas@kernel.org> <kirill.shutemov@linux.intel.com>
Kishon Vijay Abraham I <kishon@kernel.org> <kishon@ti.com>
Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@linaro.org>
Konrad Dybcio <konradybcio@kernel.org> <konrad.dybcio@somainline.org>
@@ -605,7 +606,8 @@ Oleksij Rempel <o.rempel@pengutronix.de>
Oleksij Rempel <o.rempel@pengutronix.de> <ore@pengutronix.de>
Oliver Hartkopp <socketcan@hartkopp.net> <oliver.hartkopp@volkswagen.de>
Oliver Hartkopp <socketcan@hartkopp.net> <oliver@hartkopp.net>
Oliver Upton <oliver.upton@linux.dev> <oupton@google.com>
Oliver Upton <oupton@kernel.org> <oupton@google.com>
Oliver Upton <oupton@kernel.org> <oliver.upton@linux.dev>
Ondřej Jirman <megi@xff.cz> <megous@megous.com>
Oza Pawandeep <quic_poza@quicinc.com> <poza@codeaurora.org>
Pali Rohár <pali@kernel.org> <pali.rohar@gmail.com>
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/ti,twl4030-gpio.yaml#
$id: http://devicetree.org/schemas/gpio/ti,twl4030-gpio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI TWL4030 GPIO controller
+110 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/fitipower,fp9931.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: FitiPower FP9931/JD9930 Power Management Integrated Circuit

maintainers:
  - Andreas Kemnade <andreas@kemnade.info>

description:
  FP9931 is a Power Management IC to provide Power for EPDs with one 3.3V
  switch, 2 symmetric LDOs behind 2 DC/DC converters, and one unsymmetric
  regulator for a compensation voltage.
  JD9930 has in addition some kind of night mode.

properties:
  compatible:
    oneOf:
      - const: fitipower,fp9931

      - items:
          - const: fitipower,jd9930
          - const: fitipower,fp9931

  reg:
    maxItems: 1

  enable-gpios:
    maxItems: 1

  pg-gpios:
    maxItems: 1

  en-ts-gpios:
    maxItems: 1

  xon-gpios:
    maxItems: 1

  vin-supply:
    description:
      Supply for the whole chip. Some vendor kernels and devicetrees
      declare this as a non-existing GPIO named "pwrall".

  fitipower,tdly-ms:
    description:
      Power up soft start delay settings tDLY1-4 bitfields in the
      POWERON_DELAY register
    items:
      - enum: [0, 1, 2, 4]
      - enum: [0, 1, 2, 4]
      - enum: [0, 1, 2, 4]
      - enum: [0, 1, 2, 4]

  regulators:
    type: object
    additionalProperties: false
    patternProperties:
      "^(vcom|vposneg|v3p3)$":
        unevaluatedProperties: false
        type: object
        $ref: /schemas/regulator/regulator.yaml

required:
  - compatible
  - reg
  - pg-gpios
  - enable-gpios

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        pmic@18 {
            compatible = "fitipower,fp9931";
            reg = <0x18>;
            pinctrl-names = "default";
            pinctrl-0 = <&pinctrl_fp9931_gpio>;
            vin-supply = <&epd_pmic_supply>;
            pg-gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
            en-ts-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
            enable-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
            fitipower,tdly-ms = <2 2 4 4>;

            regulators {
                vcom {
                    regulator-name = "vcom";
                    regulator-min-microvolt = <2352840>;
                    regulator-max-microvolt = <2352840>;
                };

                vposneg {
                    regulator-name = "vposneg";
                    regulator-min-microvolt = <15060000>;
                    regulator-max-microvolt = <15060000>;
                };

                v3p3 {
                    regulator-name = "v3p3";
                };
            };
        };
    };
+2 −0
Original line number Diff line number Diff line
@@ -570,6 +570,8 @@ patternProperties:
    description: Foxconn Industrial Internet
  "^firefly,.*":
    description: Firefly
  "^fitipower,.*":
    description: Fitipower Integrated Technology Inc.
  "^flipkart,.*":
    description: Flipkart Inc.
  "^focaltech,.*":
+4 −4
Original line number Diff line number Diff line
@@ -37,8 +37,8 @@ which corresponds to the following ASL (in the scope of \_SB)::
                    Name (_HID, ...)
                    Name (_CRS, ResourceTemplate () {
                        I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
                                    AddressingMode7Bit, "\\_SB.SMB1.CH00", 0x00,
                                    ResourceConsumer,,)
                                    AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH00",
                                    0x00, ResourceConsumer,,)
                    }
                }
            }
@@ -52,8 +52,8 @@ which corresponds to the following ASL (in the scope of \_SB)::
                    Name (_HID, ...)
                    Name (_CRS, ResourceTemplate () {
                        I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
                                    AddressingMode7Bit, "\\_SB.SMB1.CH01", 0x00,
                                    ResourceConsumer,,)
                                    AddressingMode7Bit, "\\_SB.SMB1.MUX0.CH01",
                                    0x00, ResourceConsumer,,)
                    }
                }
            }
Loading