Skip to contentSkip to conversation

Add support for Silicon Mitus SM5703 MFD

PATCH Superseded Markuss Broks 2 participants 8 messages Apr 15, 2022 – Apr 19, 2022

Subsystems (3)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 cover Add support for Silicon Mitus SM5703 MFD

This series adds support for Silicon Mitus SM5703 MFD and the appropriate device-tree bindings. This only adds support for the regulator module, leaving room for other modules implemented in future (code for other modules is really not ready for submission right now). Silicon Mitus SM5703 is used on various mobile phones, mostly Samsung Galaxy (J5 (2015, 2016), On7, J7 (2015, 2016) ...).

v2:
- mfd bindings: add "SM5703" to the title
- mfd bindings: indent the example
- regulators/Makefile: sort alphabetically
v3:
- mfd bindings: fix an error in example: there should be no newline between #size-cells and #address-cells and the node

Markuss Broks (4):
dt-bindings: regulator: Add bindings for Silicon Mitus SM5703
regulators
dt-bindings: mfd: Add bindings for Silicon Mitus SM5703 MFD
mfd: sm5703: Add support for SM5703 MFD
regulator: sm5703-regulator: Add regulators support for SM5703 MFD

 .../bindings/mfd/siliconmitus,sm5703.yaml     |  91 ++++++++++
 .../siliconmitus,sm5703-regulator.yaml        |  48 ++++++
 MAINTAINERS                                   |   8 +
 drivers/mfd/Kconfig                           |  12 ++
 drivers/mfd/Makefile                          |   1 +
 drivers/mfd/sm5703.c                          |  81 +++++++++
 drivers/regulator/Kconfig                     |   7 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/sm5703-regulator.c          | 162 ++++++++++++++++++
 include/linux/mfd/sm5703.h                    | 105 ++++++++++++
 10 files changed, 516 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
 create mode 100644 Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml
 create mode 100644 drivers/mfd/sm5703.c
 create mode 100644 drivers/regulator/sm5703-regulator.c
 create mode 100644 include/linux/mfd/sm5703.h
Signature · 1 line
2.35.1
#1 lore raw

PATCH v3 1/4 dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators

This patch adds device-tree bindings for regulators on Silicon Mitus SM5703 MFD.

---
 .../siliconmitus,sm5703-regulator.yaml        | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml
Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml new file +48 -0
new file mode 100644
index 000000000000..560df4c020ca
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/siliconmitus,sm5703-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Mitus SM5703 multi function device regulators
+
+maintainers:
+  - Markuss Broks <[email protected]>
+
+description: |
+  SM5703 regulators node should be a sub node of the SM5703 MFD node. See SM5703 MFD
+  bindings at Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
+  Regulator nodes should be named as USBLDO_<number>, BUCK, VBUS, LDO_<number>.
+  The definition for each of these nodes is defined using the standard
+  binding for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
+
+properties:
+  compatible:
+    const: siliconmitus,sm5703-regulator
+
+  buck:
+    type: object
+    $ref: regulator.yaml#
+    description:
+      Properties for the BUCK regulator.
+
+  vbus:
+    type: object
+    $ref: regulator.yaml#
+    description:
+      Properties for the VBUS regulator.
+
+patternProperties:
+  "^ldo[1-3]$":
+    type: object
+    $ref: regulator.yaml#
+    description:
+      Properties for single LDO regulator.
+
+  "^usbldo[1-2]$":
+    type: object
+    $ref: regulator.yaml#
+    description:
+      Properties for a single USBLDO regulator.
+
+additionalProperties: false
Signature · 1 line
2.35.1
maintainer
#2 lore raw

Re: [PATCH v3 1/4] dt-bindings: regulator: Add bindings for Silicon Mitus SM5703 regulators

Quoted 30 lines · Markuss Broks

This patch adds device-tree bindings for regulators on Silicon Mitus SM5703 MFD.

---
 .../siliconmitus,sm5703-regulator.yaml        | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml
Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml new file +15 -0
new file mode 100644
index 000000000000..560df4c020ca
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/siliconmitus,sm5703-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Mitus SM5703 multi function device regulators
+
+maintainers:
+  - Markuss Broks <[email protected]>
+
+description: |
+  SM5703 regulators node should be a sub node of the SM5703 MFD node. See SM5703 MFD
+  bindings at Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
+  Regulator nodes should be named as USBLDO_<number>, BUCK, VBUS, LDO_<number>.

Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml line 25

Quoted 10 lines
Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml new file +10 -0
+  The definition for each of these nodes is defined using the standard
+  binding for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
+
+properties:
+  compatible:
+    const: siliconmitus,sm5703-regulator
+
+  buck:
+    type: object
+    $ref: regulator.yaml#

unevaluatedProperties: false

Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml line 31

Quoted 6 lines
Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml new file +6 -0
+    description:
+      Properties for the BUCK regulator.
+
+  vbus:
+    type: object
+    $ref: regulator.yaml# 

unevaluatedProperties: false

Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml line 38

Quoted 7 lines
Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml new file +7 -0
+    description:
+      Properties for the VBUS regulator.
+
+patternProperties:
+  "^ldo[1-3]$":
+    type: object
+    $ref: regulator.yaml#

unevaluatedProperties: false

Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml line 44

Quoted 6 lines
Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml new file +6 -0
+    description:
+      Properties for single LDO regulator.
+
+  "^usbldo[1-2]$":
+    type: object
+    $ref: regulator.yaml#

unevaluatedProperties: false

Quoted 8 lines
Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml new file +4 -0
+    description:
+      Properties for a single USBLDO regulator.
+
+additionalProperties: false
Signature · 1 line
2.35.1
#3 lore raw

PATCH v3 2/4 dt-bindings: mfd: Add bindings for Silicon Mitus SM5703 MFD

In reply to Markuss Broks

This patch adds device-tree bindings for the Silicon Mitus SM5703 MFD.

---
 .../bindings/mfd/siliconmitus,sm5703.yaml     | 95 +++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +95 -0
new file mode 100644
index 000000000000..aa676967593d
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/siliconmitus,sm5703.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Mitus SM5703 multi-function device bindings
+
+maintainers:
+  - Markuss Broks <[email protected]>
+
+description: |
+  Silicon Mitus SM5703 is a multi-function device, that consists of several
+  modules, designed for a mobile phone use. It consists of
+  LDO, Buck, USBLDO and VBUS regulators, a flash LED driver, a MUIC unit,
+  a fuel gauge and a battery charger circuit. The MUIC and Fuel-Gauge units
+  are separate from the main MFD, having their own i2c lines, while the
+  LED driver, regulators and charger are sharing the main i2c bus of the MFD.
+
+properties:
+  compatible:
+    const: siliconmitus,sm5703-mfd
+
+  reg:
+    description:
+      I2C slave address.
+    maxItems: 1
+
+  regulators:
+    $ref: ../regulator/siliconmitus,sm5703-regulator.yaml
+    description:
+      List of child nodes that specify the regulators.
+
+  reset-gpio:
+    description:
+      GPIO which is connected to the MRSTB pin.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      mfd@49 {
+        compatible = "siliconmitus,sm5703-mfd";
+        reg = <0x49>;
+
+        reset-gpio = <&msmgpio 24 GPIO_ACTIVE_HIGH>;
+        pinctrl-0 = <&mrstb_default>;
+
+        regulator {
+          compatible = "siliconmitus,sm5703-regulator";
+
+          regulators {
+            sm5703_ldo1: ldo1 {
+              regulator-min-microvolt = <2800000>;
+              regulator-max-microvolt = <2800000>;
+            };
+
+            sm5703_ldo2: ldo2 {
+              regulator-min-microvolt = <1500000>;
+              regulator-max-microvolt = <3300000>;
+            };
+
+            sm5703_ldo3: ldo3 {
+              regulator-min-microvolt = <3300000>;
+              regulator-max-microvolt = <3300000>;
+            };
+
+            sm5703_usbldo1: usbldo1 {
+              regulator-min-microvolt = <4800000>;
+              regulator-max-microvolt = <4800000>;
+            };
+
+            sm5703_usbldo2: usbldo2 {
+              regulator-min-microvolt = <4800000>;
+              regulator-max-microvolt = <4800000>;
+            };
+
+            sm5703_vbus: vbus {
+              regulator-min-microvolt = <5000000>;
+              regulator-max-microvolt = <5000000>;
+            };
+          };
+        };
+      };
+    };
+...
Signature · 1 line
2.35.1
maintainer
#4 lore raw

Re: [PATCH v3 2/4] dt-bindings: mfd: Add bindings for Silicon Mitus SM5703 MFD

Quoted 27 lines · Markuss Broks

This patch adds device-tree bindings for the Silicon Mitus SM5703 MFD.

---
 .../bindings/mfd/siliconmitus,sm5703.yaml     | 95 +++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +12 -0
new file mode 100644
index 000000000000..aa676967593d
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/siliconmitus,sm5703.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Mitus SM5703 multi-function device bindings
+
+maintainers:
+  - Markuss Broks <[email protected]>
+
+description: |

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 22

Quoted 10 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +10 -0
+  Silicon Mitus SM5703 is a multi-function device, that consists of several
+  modules, designed for a mobile phone use. It consists of
+  LDO, Buck, USBLDO and VBUS regulators, a flash LED driver, a MUIC unit,
+  a fuel gauge and a battery charger circuit. The MUIC and Fuel-Gauge units
+  are separate from the main MFD, having their own i2c lines, while the
+  LED driver, regulators and charger are sharing the main i2c bus of the MFD.
+
+properties:
+  compatible:
+    const: siliconmitus,sm5703-mfd

'-mfd' is redundant. Drop.

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 30

Quoted 8 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +8 -0
+
+  reg:
+    description:
+      I2C slave address.
+    maxItems: 1
+
+  regulators:
+    $ref: ../regulator/siliconmitus,sm5703-regulator.yaml

/schemas/regulator/...

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 34

Quoted 4 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +4 -0
+    description:
+      List of child nodes that specify the regulators.
+
+  reset-gpio:

'-gpios' is the preferred form even with 1.

Are the MUIC and Fuel-Gauge units independent from this reset?

Quoted 7 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +7 -0
+    description:
+      GPIO which is connected to the MRSTB pin.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 51

Quoted 10 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +10 -0
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      mfd@49 {

'pmic' is the standard name.

Quoted 48 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +44 -0
+        compatible = "siliconmitus,sm5703-mfd";
+        reg = <0x49>;
+
+        reset-gpio = <&msmgpio 24 GPIO_ACTIVE_HIGH>;
+        pinctrl-0 = <&mrstb_default>;
+
+        regulator {
+          compatible = "siliconmitus,sm5703-regulator";
+
+          regulators {
+            sm5703_ldo1: ldo1 {
+              regulator-min-microvolt = <2800000>;
+              regulator-max-microvolt = <2800000>;
+            };
+
+            sm5703_ldo2: ldo2 {
+              regulator-min-microvolt = <1500000>;
+              regulator-max-microvolt = <3300000>;
+            };
+
+            sm5703_ldo3: ldo3 {
+              regulator-min-microvolt = <3300000>;
+              regulator-max-microvolt = <3300000>;
+            };
+
+            sm5703_usbldo1: usbldo1 {
+              regulator-min-microvolt = <4800000>;
+              regulator-max-microvolt = <4800000>;
+            };
+
+            sm5703_usbldo2: usbldo2 {
+              regulator-min-microvolt = <4800000>;
+              regulator-max-microvolt = <4800000>;
+            };
+
+            sm5703_vbus: vbus {
+              regulator-min-microvolt = <5000000>;
+              regulator-max-microvolt = <5000000>;
+            };
+          };
+        };
+      };
+    };
+...
Signature · 1 line
2.35.1
#5 lore raw

Re: [PATCH v3 2/4] dt-bindings: mfd: Add bindings for Silicon Mitus SM5703 MFD

Hi Rob,

Quoted 50 lines · Rob Herring
Quoted 27 lines · Markuss Broks

This patch adds device-tree bindings for the Silicon Mitus SM5703 MFD.

---
  .../bindings/mfd/siliconmitus,sm5703.yaml     | 95 +++++++++++++++++++
  1 file changed, 95 insertions(+)

create mode 100644 Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +12 -0
new file mode 100644
index 000000000000..aa676967593d
@@ -0,0 +1,95 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/siliconmitus,sm5703.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Mitus SM5703 multi-function device bindings
+
+maintainers:
+  - Markuss Broks <[email protected]>
+
+description: |

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 22

Quoted 10 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +10 -0
+  Silicon Mitus SM5703 is a multi-function device, that consists of several
+  modules, designed for a mobile phone use. It consists of
+  LDO, Buck, USBLDO and VBUS regulators, a flash LED driver, a MUIC unit,
+  a fuel gauge and a battery charger circuit. The MUIC and Fuel-Gauge units
+  are separate from the main MFD, having their own i2c lines, while the
+  LED driver, regulators and charger are sharing the main i2c bus of the MFD.
+
+properties:
+  compatible:
+    const: siliconmitus,sm5703-mfd

'-mfd' is redundant. Drop.

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 30

Quoted 8 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +8 -0
+
+  reg:
+    description:
+      I2C slave address.
+    maxItems: 1
+
+  regulators:
+    $ref: ../regulator/siliconmitus,sm5703-regulator.yaml

/schemas/regulator/...

Quoted 7 lines

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 34

Quoted 4 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +4 -0
+    description:
+      List of child nodes that specify the regulators.
+
+  reset-gpio:

'-gpios' is the preferred form even with 1.

Are the MUIC and Fuel-Gauge units independent from this reset?

From my understanding, they're completely separate from the main unit. The tests also confirm that they both work normally no matter the reset GPIO state.

Quoted 60 lines
Quoted 8 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +7 -0
+    description:
+      GPIO which is connected to the MRSTB pin.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml line 51

Quoted 10 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +10 -0
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      mfd@49 {

'pmic' is the standard name.

Quoted 40 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +40 -0
+        compatible = "siliconmitus,sm5703-mfd";
+        reg = <0x49>;
+
+        reset-gpio = <&msmgpio 24 GPIO_ACTIVE_HIGH>;
+        pinctrl-0 = <&mrstb_default>;
+
+        regulator {
+          compatible = "siliconmitus,sm5703-regulator";
+
+          regulators {
+            sm5703_ldo1: ldo1 {
+              regulator-min-microvolt = <2800000>;
+              regulator-max-microvolt = <2800000>;
+            };
+
+            sm5703_ldo2: ldo2 {
+              regulator-min-microvolt = <1500000>;
+              regulator-max-microvolt = <3300000>;
+            };
+
+            sm5703_ldo3: ldo3 {
+              regulator-min-microvolt = <3300000>;
+              regulator-max-microvolt = <3300000>;
+            };
+
+            sm5703_usbldo1: usbldo1 {
+              regulator-min-microvolt = <4800000>;
+              regulator-max-microvolt = <4800000>;
+            };
+
+            sm5703_usbldo2: usbldo2 {
+              regulator-min-microvolt = <4800000>;
+              regulator-max-microvolt = <4800000>;
+            };
+
+            sm5703_vbus: vbus {
+              regulator-min-microvolt = <5000000>;
+              regulator-max-microvolt = <5000000>;
+            };
+          };
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml new file +4 -0
+        };
+      };
+    };
+...
Signature · 1 line
2.35.1

- Markuss

#6 lore raw

PATCH v3 3/4 mfd: sm5703: Add support for SM5703 MFD

In reply to Markuss Broks

Silicon Mitus SM5703 is a multi-function device, meant to be used in mobile devices. It has several modules: LDO, BUCK regulators, charger circuit, flash LED driver, a fuel gauge for monitoring the battery and a MUIC USB switcher. The MUIC and fuel gauge parts are separate in that they use separate i2c lines to communicate with the device, while charger circuit, LED driver and regulators are on the main i2c line the device is controlled with.

---
 MAINTAINERS                |   8 +++
 drivers/mfd/Kconfig        |  12 +++++
 drivers/mfd/Makefile       |   1 +
 drivers/mfd/sm5703.c       |  81 ++++++++++++++++++++++++++++
 include/linux/mfd/sm5703.h | 105 +++++++++++++++++++++++++++++++++++++
 5 files changed, 207 insertions(+)
 create mode 100644 drivers/mfd/sm5703.c
 create mode 100644 include/linux/mfd/sm5703.h
MAINTAINERS +8 -0
index 2a83ac6bfa4d..d3eef171eb8c 100644
@@ -17886,6 +17886,14 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev
 F:	include/linux/srcu*.h
 F:	kernel/rcu/srcu*.c
 
+SM5703 MFD DRIVER
+M:	Markuss Broks <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/mfd/siliconmitus,sm5703.yaml
+F:	Documentation/devicetree/bindings/regulator/siliconmitus,sm5703-regulator.yaml
+F:	drivers/mfd/sm5703.c
+F:	drivers/regulator/sm5703-regulator.c
+
 SMACK SECURITY MODULE
 M:	Casey Schaufler <[email protected]>
 L:	[email protected]
drivers/mfd/Kconfig +12 -0
index e0d2fcb10a0c..e553a8db24c2 100644
@@ -1223,6 +1223,18 @@ config MFD_SM501
 	  interface. The device may be connected by PCI or local bus with
 	  varying functions enabled.
 
+config MFD_SM5703
+	tristate "Silicon Mitus SM5703 MFD"
+	depends on I2C
+	select MFD_CORE
+	select REGMAP_I2C
+	help
+	  This is the core driver for the Silicon Mitus SM5703 multi-function
+	  device. This device is meant to be used in phones and it has numerous
+	  modules, including LED controller, regulators, fuel gauge, MUIC and
+	  charger circuit. It also support muxing a serial interface over USB
+	  data lines.
+
 config MFD_SM501_GPIO
 	bool "Export GPIO via GPIO layer"
 	depends on MFD_SM501 && GPIOLIB
drivers/mfd/Makefile +1 -0
index df1ecc4a4c95..3278069d3461 100644
@@ -275,3 +275,4 @@ rsmu-i2c-objs			:= rsmu_core.o rsmu_i2c.o
 rsmu-spi-objs			:= rsmu_core.o rsmu_spi.o
 obj-$(CONFIG_MFD_RSMU_I2C)	+= rsmu-i2c.o
 obj-$(CONFIG_MFD_RSMU_SPI)	+= rsmu-spi.o
+obj-$(CONFIG_MFD_SM5703)	+= sm5703.o
drivers/mfd/sm5703.c new file +81 -0

81 lines not on this page · raw message

include/linux/mfd/sm5703.h new file +105 -0

105 lines not on this page · raw message

Signature · 1 line
2.35.1
#7 lore raw

PATCH v3 4/4 regulator: sm5703-regulator: Add regulators support for SM5703 MFD

In reply to Markuss Broks

Regulators block of SM5703 controls several voltage regulators which are used to power various components. There are 3 LDO outputs ranging from 1.5 to 3.3V, a buck regulator ranging from 1V to 3V, two fixed voltage LDO regulators for powering the USB devices and one high-power fixed voltage LDO line (actually two lines) meant to power high-power USB devices.

---
 drivers/regulator/Kconfig            |   7 ++
 drivers/regulator/Makefile           |   1 +
 drivers/regulator/sm5703-regulator.c | 162 +++++++++++++++++++++++++++
 3 files changed, 170 insertions(+)
 create mode 100644 drivers/regulator/sm5703-regulator.c
drivers/regulator/Kconfig +7 -0
index 5d0a360d7244..318bbdc27ae4 100644
@@ -1147,6 +1147,13 @@ config REGULATOR_SLG51000
 	  The SLG51000 is seven compact and customizable low dropout
 	  regulators.
 
+config REGULATOR_SM5703
+	tristate "Silicon Mitus SM5703 regulators"
+	depends on SM5703_MFD
+	help
+	  This driver provides support for voltage regulators of SM5703
+	  multi-function device.
+
 config REGULATOR_STM32_BOOSTER
 	tristate "STMicroelectronics STM32 BOOSTER"
 	depends on ARCH_STM32 || COMPILE_TEST
drivers/regulator/Makefile +1 -0
index 4b8794a73e17..c491fe528ba4 100644
@@ -137,6 +137,7 @@ obj-$(CONFIG_REGULATOR_S5M8767) += s5m8767.o
 obj-$(CONFIG_REGULATOR_SC2731) += sc2731-regulator.o
 obj-$(CONFIG_REGULATOR_SKY81452) += sky81452-regulator.o
 obj-$(CONFIG_REGULATOR_SLG51000) += slg51000-regulator.o
+obj-$(CONFIG_REGULATOR_SM5703) += sm5703-regulator.o
 obj-$(CONFIG_REGULATOR_STM32_BOOSTER) += stm32-booster.o
 obj-$(CONFIG_REGULATOR_STM32_VREFBUF) += stm32-vrefbuf.o
 obj-$(CONFIG_REGULATOR_STM32_PWR) += stm32-pwr.o
drivers/regulator/sm5703-regulator.c new file +162 -0

162 lines not on this page · raw message

Signature · 1 line
2.35.1