devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] regulator: sy7636a: define and init all resources needed
@ 2025-09-06  9:09 Andreas Kemnade
  2025-09-06  9:09 ` [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply Andreas Kemnade
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Andreas Kemnade @ 2025-09-06  9:09 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Mark Brown, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-kernel, imx, linux-arm-kernel, Andreas Kemnade

The SY7636A has some pins which can be hardwired or used to have more
more advanced power management available. As several devices containing
this regulator have these pins not hardwired, but instead connected to some
GPIO, enhance the driver to have them defined and initialized.
Also add the ability to power off the chip completely by defining some
input power supply.

Actually implementing better power management is planned to be
implemented as a second step. The regulators in the SY7636A should only
be on for a short time during display refresh, but currently they are
unconditionally forcefully enabled by the hwmon part of this chip.

Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
---
Andreas Kemnade (4):
      dt-bindings: mfd: sy7636a: Add missing gpio pins and supply
      regulator: sy7636a: fix lifecycle of power good gpio
      regulator: sy7636a: add gpios and input regulator
      ARM: dts: imx: e70k02: add sy7636

 .../devicetree/bindings/mfd/silergy,sy7636a.yaml   | 16 +++++++++++
 arch/arm/boot/dts/nxp/imx/e70k02.dtsi              | 25 +++++++++++++++-
 .../arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts | 24 ++++++++++++++++
 .../arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts | 24 ++++++++++++++++
 drivers/regulator/sy7636a-regulator.c              | 33 ++++++++++++++++++++--
 5 files changed, 118 insertions(+), 4 deletions(-)
---
base-commit: 1b237f190eb3d36f52dffe07a40b5eb210280e00
change-id: 20250906-sy7636-rsrc-c20aa6baa2c4

Best regards,
--  
Andreas Kemnade <akemnade@kernel.org>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply
  2025-09-06  9:09 [PATCH 0/4] regulator: sy7636a: define and init all resources needed Andreas Kemnade
@ 2025-09-06  9:09 ` Andreas Kemnade
  2025-09-06 12:01   ` Krzysztof Kozlowski
  2025-09-06  9:09 ` [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio Andreas Kemnade
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Andreas Kemnade @ 2025-09-06  9:09 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Mark Brown, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-kernel, imx, linux-arm-kernel, Andreas Kemnade

To be able to fully describe how the SY7636A is connected to the system,
add properties for the EN and VCOM_EN pins. To squeeze out every bit
of unused current, in many devices it is possible to power off the
complete chip. Add an input regulator to allow that.

Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
---
 .../devicetree/bindings/mfd/silergy,sy7636a.yaml         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
index ee0be32ac0204..08ad593e237f1 100644
--- a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
+++ b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
@@ -32,6 +32,22 @@ properties:
       Specifying the power good GPIOs.
     maxItems: 1
 
+  en-gpios:
+    description:
+      If EN pin is not hardwired, specify it here to have it set up.
+    maxItems: 1
+
+  vcom-en-gpios:
+    description:
+      If VCOM_EN pin is not hardwired, specify it here to have it set up.
+    maxItems: 1
+
+  vin-supply:
+    description:
+      Supply for the chip. Some vendor kernels and devicetrees declare this
+      as a GPIO named "pwrall" which does not exist in the datasheet,
+      disabling it makes the chip disappear on the bus.
+
   regulators:
     type: object
 

-- 
2.39.5


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio
  2025-09-06  9:09 [PATCH 0/4] regulator: sy7636a: define and init all resources needed Andreas Kemnade
  2025-09-06  9:09 ` [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply Andreas Kemnade
@ 2025-09-06  9:09 ` Andreas Kemnade
  2025-09-06 14:35   ` Peng Fan
  2025-09-08  8:00   ` Alistair
  2025-09-06  9:09 ` [PATCH 3/4] regulator: sy7636a: add gpios and input regulator Andreas Kemnade
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 16+ messages in thread
From: Andreas Kemnade @ 2025-09-06  9:09 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Mark Brown, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-kernel, imx, linux-arm-kernel, Andreas Kemnade

Attach the power good gpio to the regulator device devres instead of the
parent device to fix problems if probe is run multiple times
(rmmod/insmod or some deferral).

Fixes: 8c485bedfb785 ("regulator: sy7636a: Initial commit")
Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
---
 drivers/regulator/sy7636a-regulator.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
index d1e7ba1fb3e1a..27e3d939b7bb9 100644
--- a/drivers/regulator/sy7636a-regulator.c
+++ b/drivers/regulator/sy7636a-regulator.c
@@ -83,9 +83,11 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
 	if (!regmap)
 		return -EPROBE_DEFER;
 
-	gdp = devm_gpiod_get(pdev->dev.parent, "epd-pwr-good", GPIOD_IN);
+	device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
+
+	gdp = devm_gpiod_get(&pdev->dev, "epd-pwr-good", GPIOD_IN);
 	if (IS_ERR(gdp)) {
-		dev_err(pdev->dev.parent, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
+		dev_err(&pdev->dev, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
 		return PTR_ERR(gdp);
 	}
 
@@ -105,7 +107,6 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
 	}
 
 	config.dev = &pdev->dev;
-	config.dev->of_node = pdev->dev.parent->of_node;
 	config.regmap = regmap;
 
 	rdev = devm_regulator_register(&pdev->dev, &desc, &config);

-- 
2.39.5


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/4] regulator: sy7636a: add gpios and input regulator
  2025-09-06  9:09 [PATCH 0/4] regulator: sy7636a: define and init all resources needed Andreas Kemnade
  2025-09-06  9:09 ` [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply Andreas Kemnade
  2025-09-06  9:09 ` [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio Andreas Kemnade
@ 2025-09-06  9:09 ` Andreas Kemnade
  2025-09-06 14:32   ` Peng Fan
  2025-09-07 11:26   ` Dan Carpenter
  2025-09-06  9:09 ` [PATCH 4/4] ARM: dts: imx: e70k02: add sy7636 Andreas Kemnade
  2025-09-09 13:34 ` (subset) [PATCH 0/4] regulator: sy7636a: define and init all resources needed Mark Brown
  4 siblings, 2 replies; 16+ messages in thread
From: Andreas Kemnade @ 2025-09-06  9:09 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Mark Brown, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-kernel, imx, linux-arm-kernel, Andreas Kemnade

Initialize input regulator and gpios to proper values to have things
basically working as well as in the case when these things are
hardwired.

Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
---
 drivers/regulator/sy7636a-regulator.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
index 27e3d939b7bb9..bd8739624c727 100644
--- a/drivers/regulator/sy7636a-regulator.c
+++ b/drivers/regulator/sy7636a-regulator.c
@@ -12,6 +12,7 @@
 #include <linux/mfd/sy7636a.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/regulator/consumer.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>
 #include <linux/regmap.h>
@@ -19,6 +20,8 @@
 struct sy7636a_data {
 	struct regmap *regmap;
 	struct gpio_desc *pgood_gpio;
+	struct gpio_desc *en_gpio;
+	struct gpio_desc *vcom_en_gpio;
 };
 
 static int sy7636a_get_vcom_voltage_op(struct regulator_dev *rdev)
@@ -98,6 +101,29 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
 	data->regmap = regmap;
 	data->pgood_gpio = gdp;
 
+	ret = devm_regulator_get_enable_optional(&pdev->dev, "vin");
+	if (ret)
+		return dev_err_probe(&pdev->dev, ret,
+				     "failed to get vin regulator\n");
+
+	data->en_gpio = devm_gpiod_get_optional(&pdev->dev, "en",
+						GPIOD_OUT_HIGH);
+	if (IS_ERR(data->en_gpio))
+		return dev_err_probe(&pdev->dev,
+				     PTR_ERR(data->en_gpio),
+				     "failed to get en gpio\n");
+
+	/* Let VCOM just follow the default power on sequence */
+	data->vcom_en_gpio = devm_gpiod_get_optional(&pdev->dev,
+						     "vcom-en", GPIOD_OUT_LOW);
+	if (IS_ERR(data->vcom_en_gpio))
+		return dev_err_probe(&pdev->dev,
+				     PTR_ERR(data->en_gpio),
+				     "failed to get en gpio\n");
+
+	if (data->en_gpio)
+		usleep_range(2500, 4000);
+
 	platform_set_drvdata(pdev, data);
 
 	ret = regmap_write(regmap, SY7636A_REG_POWER_ON_DELAY_TIME, 0x0);

-- 
2.39.5


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/4] ARM: dts: imx: e70k02: add sy7636
  2025-09-06  9:09 [PATCH 0/4] regulator: sy7636a: define and init all resources needed Andreas Kemnade
                   ` (2 preceding siblings ...)
  2025-09-06  9:09 ` [PATCH 3/4] regulator: sy7636a: add gpios and input regulator Andreas Kemnade
@ 2025-09-06  9:09 ` Andreas Kemnade
  2025-09-08  8:07   ` Alistair
  2025-09-09 13:34 ` (subset) [PATCH 0/4] regulator: sy7636a: define and init all resources needed Mark Brown
  4 siblings, 1 reply; 16+ messages in thread
From: Andreas Kemnade @ 2025-09-06  9:09 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Mark Brown, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-kernel, imx, linux-arm-kernel, Andreas Kemnade

Add the EPD PMIC for the e70k02 based devices as a step towards full EPD
support.

Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
---
 arch/arm/boot/dts/nxp/imx/e70k02.dtsi              | 25 +++++++++++++++++++++-
 .../arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts | 24 +++++++++++++++++++++
 .../arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts | 24 +++++++++++++++++++++
 3 files changed, 72 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/nxp/imx/e70k02.dtsi b/arch/arm/boot/dts/nxp/imx/e70k02.dtsi
index dcc3c9d488a88..5f6b7545a0c0c 100644
--- a/arch/arm/boot/dts/nxp/imx/e70k02.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/e70k02.dtsi
@@ -69,6 +69,14 @@ memory@80000000 {
 		reg = <0x80000000 0x20000000>;
 	};
 
+	epd_pmic_supply: regulator-epd-pmic-in {
+		compatible = "regulator-fixed";
+		regulator-name = "epd_pmic_supply";
+		gpio = <&gpio2 14 GPIO_ACTIVE_HIGH>;
+		startup-delay-us = <20000>;
+		enable-active-high;
+	};
+
 	reg_wifi: regulator-wifi {
 		compatible = "regulator-fixed";
 		regulator-name = "SD3_SPWR";
@@ -133,7 +141,22 @@ touchscreen@24 {
 		vdd-supply = <&ldo5_reg>;
 	};
 
-	/* TODO: SY7636 PMIC for E Ink at 0x62 */
+	sy7636: pmic@62 {
+		compatible = "silergy,sy7636a";
+		reg = <0x62>;
+		en-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
+		vcom-en-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
+		epd-pwr-good-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
+		vin-supply = <&epd_pmic_supply>;
+
+		#thermal-sensor-cells = <0>;
+
+		regulators {
+			reg_epdpmic: vcom {
+				regulator-name = "vcom";
+			};
+		};
+	};
 
 };
 
diff --git a/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts b/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts
index a2534c422a522..f8709a9524093 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts
+++ b/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts
@@ -26,6 +26,11 @@ / {
 	compatible = "kobo,tolino-vision5", "fsl,imx6sl";
 };
 
+&epd_pmic_supply {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_epd_pmic_supply>;
+};
+
 &gpio_keys {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpio_keys>;
@@ -59,6 +64,12 @@ MX6SL_PAD_FEC_RXD1__GPIO4_IO18          0x10059 /* TP_RST */
 		>;
 	};
 
+	pinctrl_epd_pmic_supply: epd-pmic-supplygrp {
+		fsl,pins = <
+			MX6SL_PAD_EPDC_PWRWAKEUP__GPIO2_IO14    0x40010059
+		>;
+	};
+
 	pinctrl_gpio_keys: gpio-keysgrp {
 		fsl,pins = <
 			MX6SL_PAD_FEC_CRS_DV__GPIO4_IO25	0x17059	/* PWR_SW */
@@ -159,6 +170,14 @@ MX6SL_PAD_KEY_COL2__GPIO3_IO28		0x1b8b1 /* ricoh619 bat_low_int */
 		>;
 	};
 
+	pinctrl_sy7636_gpio: sy7636-gpiogrp {
+		fsl,pins = <
+			MX6SL_PAD_EPDC_VCOM0__GPIO2_IO03        0x40010059 /* VCOM_CTRL */
+			MX6SL_PAD_EPDC_PWRCTRL1__GPIO2_IO08     0x40010059 /* EN */
+			MX6SL_PAD_EPDC_PWRSTAT__GPIO2_IO13      0x17059 /* PWR_GOOD */
+		>;
+	};
+
 	pinctrl_uart1: uart1grp {
 		fsl,pins = <
 			MX6SL_PAD_UART1_TXD__UART1_TX_DATA 0x1b0b1
@@ -329,6 +348,11 @@ &ricoh619 {
 	pinctrl-0 = <&pinctrl_ricoh_gpio>;
 };
 
+&sy7636 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sy7636_gpio>;
+};
+
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;
diff --git a/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts b/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts
index 660620d226f71..19bbe60331b36 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts
+++ b/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts
@@ -36,6 +36,11 @@ &cpu0 {
 	soc-supply = <&dcdc1_reg>;
 };
 
+&epd_pmic_supply {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_epd_pmic_supply>;
+};
+
 &gpio_keys {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpio_keys>;
@@ -69,6 +74,12 @@ MX6SLL_PAD_GPIO4_IO18__GPIO4_IO18	0x10059 /* TP_RST */
 		>;
 	};
 
+	pinctrl_epd_pmic_supply: epd-pmic-supplygrp {
+		fsl,pins = <
+			MX6SLL_PAD_EPDC_PWR_WAKE__GPIO2_IO14    0x40010059
+		>;
+	};
+
 	pinctrl_gpio_keys: gpio-keysgrp {
 		fsl,pins = <
 			MX6SLL_PAD_GPIO4_IO25__GPIO4_IO25	0x17059	/* PWR_SW */
@@ -169,6 +180,14 @@ MX6SLL_PAD_KEY_COL2__GPIO3_IO28		0x1b8b1 /* ricoh619 bat_low_int */
 		>;
 	};
 
+	pinctrl_sy7636_gpio: sy7636-gpiogrp {
+		fsl,pins = <
+			MX6SLL_PAD_EPDC_VCOM0__GPIO2_IO03       0x40010059 /* VCOM_CTRL */
+			MX6SLL_PAD_EPDC_PWR_CTRL1__GPIO2_IO08   0x40010059 /* EN */
+			MX6SLL_PAD_EPDC_PWR_STAT__GPIO2_IO13    0x17059 /* PWR_GOOD */
+		>;
+	};
+
 	pinctrl_uart1: uart1grp {
 		fsl,pins = <
 			MX6SLL_PAD_UART1_TXD__UART1_DCE_TX 0x1b0b1
@@ -319,6 +338,11 @@ &ricoh619 {
 	pinctrl-0 = <&pinctrl_ricoh_gpio>;
 };
 
+&sy7636 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_sy7636_gpio>;
+};
+
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_uart1>;

-- 
2.39.5


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply
  2025-09-06  9:09 ` [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply Andreas Kemnade
@ 2025-09-06 12:01   ` Krzysztof Kozlowski
  2025-09-08 10:54     ` Andreas Kemnade
  2025-09-08 14:34     ` Mark Brown
  0 siblings, 2 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2025-09-06 12:01 UTC (permalink / raw)
  To: Andreas Kemnade, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alistair Francis, Liam Girdwood, Mark Brown,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, linux-kernel, imx, linux-arm-kernel

On 06/09/2025 11:09, Andreas Kemnade wrote:
> To be able to fully describe how the SY7636A is connected to the system,
> add properties for the EN and VCOM_EN pins. To squeeze out every bit
> of unused current, in many devices it is possible to power off the
> complete chip. Add an input regulator to allow that.
> 
> Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
> ---
>  .../devicetree/bindings/mfd/silergy,sy7636a.yaml         | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
> index ee0be32ac0204..08ad593e237f1 100644
> --- a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
> +++ b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
> @@ -32,6 +32,22 @@ properties:
>        Specifying the power good GPIOs.
>      maxItems: 1
>  
> +  en-gpios:

enable-gpios, unless it is something else, but then please explain in
the description.

> +    description:
> +      If EN pin is not hardwired, specify it here to have it set up.
> +    maxItems: 1


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/4] regulator: sy7636a: add gpios and input regulator
  2025-09-06  9:09 ` [PATCH 3/4] regulator: sy7636a: add gpios and input regulator Andreas Kemnade
@ 2025-09-06 14:32   ` Peng Fan
  2025-09-07 11:26   ` Dan Carpenter
  1 sibling, 0 replies; 16+ messages in thread
From: Peng Fan @ 2025-09-06 14:32 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Mark Brown, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
	linux-kernel, imx, linux-arm-kernel

On Sat, Sep 06, 2025 at 11:09:14AM +0200, Andreas Kemnade wrote:
>Initialize input regulator and gpios to proper values to have things
>basically working as well as in the case when these things are
>hardwired.
>
>Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
>---
> drivers/regulator/sy7636a-regulator.c | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
>diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
>index 27e3d939b7bb9..bd8739624c727 100644
>--- a/drivers/regulator/sy7636a-regulator.c
>+++ b/drivers/regulator/sy7636a-regulator.c
>@@ -12,6 +12,7 @@
> #include <linux/mfd/sy7636a.h>
> #include <linux/module.h>
> #include <linux/platform_device.h>
>+#include <linux/regulator/consumer.h>
> #include <linux/regulator/driver.h>
> #include <linux/regulator/machine.h>
> #include <linux/regmap.h>
>@@ -19,6 +20,8 @@
> struct sy7636a_data {
> 	struct regmap *regmap;
> 	struct gpio_desc *pgood_gpio;
>+	struct gpio_desc *en_gpio;
>+	struct gpio_desc *vcom_en_gpio;
> };
> 
> static int sy7636a_get_vcom_voltage_op(struct regulator_dev *rdev)
>@@ -98,6 +101,29 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
> 	data->regmap = regmap;
> 	data->pgood_gpio = gdp;
> 
>+	ret = devm_regulator_get_enable_optional(&pdev->dev, "vin");
>+	if (ret)
>+		return dev_err_probe(&pdev->dev, ret,
>+				     "failed to get vin regulator\n");
>+
>+	data->en_gpio = devm_gpiod_get_optional(&pdev->dev, "en",
>+						GPIOD_OUT_HIGH);
>+	if (IS_ERR(data->en_gpio))
>+		return dev_err_probe(&pdev->dev,
>+				     PTR_ERR(data->en_gpio),
>+				     "failed to get en gpio\n");
>+
>+	/* Let VCOM just follow the default power on sequence */
>+	data->vcom_en_gpio = devm_gpiod_get_optional(&pdev->dev,
>+						     "vcom-en", GPIOD_OUT_LOW);
>+	if (IS_ERR(data->vcom_en_gpio))
>+		return dev_err_probe(&pdev->dev,
>+				     PTR_ERR(data->en_gpio),
>+				     "failed to get en gpio\n");

Nit: s/en/vcom en/

>+
>+	if (data->en_gpio)
>+		usleep_range(2500, 4000);

It would be better to add a comment on this delay.

Regards
Peng

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio
  2025-09-06  9:09 ` [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio Andreas Kemnade
@ 2025-09-06 14:35   ` Peng Fan
  2025-09-08  8:00   ` Alistair
  1 sibling, 0 replies; 16+ messages in thread
From: Peng Fan @ 2025-09-06 14:35 UTC (permalink / raw)
  To: Andreas Kemnade
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Mark Brown, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
	linux-kernel, imx, linux-arm-kernel

On Sat, Sep 06, 2025 at 11:09:13AM +0200, Andreas Kemnade wrote:
>Attach the power good gpio to the regulator device devres instead of the
>parent device to fix problems if probe is run multiple times
>(rmmod/insmod or some deferral).
>
>Fixes: 8c485bedfb785 ("regulator: sy7636a: Initial commit")
>Signed-off-by: Andreas Kemnade <akemnade@kernel.org>

Reviewed-by: Peng Fan <peng.fan@nxp.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/4] regulator: sy7636a: add gpios and input regulator
  2025-09-06  9:09 ` [PATCH 3/4] regulator: sy7636a: add gpios and input regulator Andreas Kemnade
  2025-09-06 14:32   ` Peng Fan
@ 2025-09-07 11:26   ` Dan Carpenter
  1 sibling, 0 replies; 16+ messages in thread
From: Dan Carpenter @ 2025-09-07 11:26 UTC (permalink / raw)
  To: oe-kbuild, Andreas Kemnade, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Alistair Francis,
	Liam Girdwood, Mark Brown, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: lkp, oe-kbuild-all, devicetree, linux-kernel, imx,
	linux-arm-kernel, Andreas Kemnade

Hi Andreas,

kernel test robot noticed the following build warnings:

url:    https://github.com/intel-lab-lkp/linux/commits/Andreas-Kemnade/dt-bindings-mfd-sy7636a-Add-missing-gpio-pins-and-supply/20250906-171133
base:   1b237f190eb3d36f52dffe07a40b5eb210280e00
patch link:    https://lore.kernel.org/r/20250906-sy7636-rsrc-v1-3-e2886a9763a7%40kernel.org
patch subject: [PATCH 3/4] regulator: sy7636a: add gpios and input regulator
config: x86_64-randconfig-161-20250907 (https://download.01.org/0day-ci/archive/20250907/202509071141.TSai6ltk-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202509071141.TSai6ltk-lkp@intel.com/

smatch warnings:
drivers/regulator/sy7636a-regulator.c:121 sy7636a_regulator_probe() warn: passing zero to 'PTR_ERR'

vim +/PTR_ERR +121 drivers/regulator/sy7636a-regulator.c

8c485bedfb7852 Alistair Francis 2021-06-15   77  static int sy7636a_regulator_probe(struct platform_device *pdev)
8c485bedfb7852 Alistair Francis 2021-06-15   78  {
cb17820ef71ed7 Alistair Francis 2021-10-15   79  	struct regmap *regmap = dev_get_regmap(pdev->dev.parent, NULL);
8c485bedfb7852 Alistair Francis 2021-06-15   80  	struct regulator_config config = { };
8c485bedfb7852 Alistair Francis 2021-06-15   81  	struct regulator_dev *rdev;
8c485bedfb7852 Alistair Francis 2021-06-15   82  	struct gpio_desc *gdp;
d38d49b140043b Alistair Francis 2021-08-03   83  	struct sy7636a_data *data;
8c485bedfb7852 Alistair Francis 2021-06-15   84  	int ret;
8c485bedfb7852 Alistair Francis 2021-06-15   85  
27fdd3bbb7a138 Alistair Francis 2021-08-06   86  	if (!regmap)
8c485bedfb7852 Alistair Francis 2021-06-15   87  		return -EPROBE_DEFER;
8c485bedfb7852 Alistair Francis 2021-06-15   88  
07678e530d8eab Andreas Kemnade  2025-09-06   89  	device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
07678e530d8eab Andreas Kemnade  2025-09-06   90  
07678e530d8eab Andreas Kemnade  2025-09-06   91  	gdp = devm_gpiod_get(&pdev->dev, "epd-pwr-good", GPIOD_IN);
8c485bedfb7852 Alistair Francis 2021-06-15   92  	if (IS_ERR(gdp)) {
07678e530d8eab Andreas Kemnade  2025-09-06   93  		dev_err(&pdev->dev, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
8c485bedfb7852 Alistair Francis 2021-06-15   94  		return PTR_ERR(gdp);
8c485bedfb7852 Alistair Francis 2021-06-15   95  	}
8c485bedfb7852 Alistair Francis 2021-06-15   96  
d38d49b140043b Alistair Francis 2021-08-03   97  	data = devm_kzalloc(&pdev->dev, sizeof(struct sy7636a_data), GFP_KERNEL);
d38d49b140043b Alistair Francis 2021-08-03   98  	if (!data)
d38d49b140043b Alistair Francis 2021-08-03   99  		return -ENOMEM;
d38d49b140043b Alistair Francis 2021-08-03  100  
27fdd3bbb7a138 Alistair Francis 2021-08-06  101  	data->regmap = regmap;
d38d49b140043b Alistair Francis 2021-08-03  102  	data->pgood_gpio = gdp;
d38d49b140043b Alistair Francis 2021-08-03  103  
327603c2e83590 Andreas Kemnade  2025-09-06  104  	ret = devm_regulator_get_enable_optional(&pdev->dev, "vin");
327603c2e83590 Andreas Kemnade  2025-09-06  105  	if (ret)
327603c2e83590 Andreas Kemnade  2025-09-06  106  		return dev_err_probe(&pdev->dev, ret,
327603c2e83590 Andreas Kemnade  2025-09-06  107  				     "failed to get vin regulator\n");
327603c2e83590 Andreas Kemnade  2025-09-06  108  
327603c2e83590 Andreas Kemnade  2025-09-06  109  	data->en_gpio = devm_gpiod_get_optional(&pdev->dev, "en",
327603c2e83590 Andreas Kemnade  2025-09-06  110  						GPIOD_OUT_HIGH);
327603c2e83590 Andreas Kemnade  2025-09-06  111  	if (IS_ERR(data->en_gpio))
327603c2e83590 Andreas Kemnade  2025-09-06  112  		return dev_err_probe(&pdev->dev,
327603c2e83590 Andreas Kemnade  2025-09-06  113  				     PTR_ERR(data->en_gpio),
327603c2e83590 Andreas Kemnade  2025-09-06  114  				     "failed to get en gpio\n");
327603c2e83590 Andreas Kemnade  2025-09-06  115  
327603c2e83590 Andreas Kemnade  2025-09-06  116  	/* Let VCOM just follow the default power on sequence */
327603c2e83590 Andreas Kemnade  2025-09-06  117  	data->vcom_en_gpio = devm_gpiod_get_optional(&pdev->dev,
327603c2e83590 Andreas Kemnade  2025-09-06  118  						     "vcom-en", GPIOD_OUT_LOW);
327603c2e83590 Andreas Kemnade  2025-09-06  119  	if (IS_ERR(data->vcom_en_gpio))
327603c2e83590 Andreas Kemnade  2025-09-06  120  		return dev_err_probe(&pdev->dev,
327603c2e83590 Andreas Kemnade  2025-09-06 @121  				     PTR_ERR(data->en_gpio),
                                                                                             ^^^^^^^^^^^^^
s/data->en_gpio/data->vcom_en_gpio/

327603c2e83590 Andreas Kemnade  2025-09-06  122  				     "failed to get en gpio\n");
327603c2e83590 Andreas Kemnade  2025-09-06  123  
327603c2e83590 Andreas Kemnade  2025-09-06  124  	if (data->en_gpio)
327603c2e83590 Andreas Kemnade  2025-09-06  125  		usleep_range(2500, 4000);
327603c2e83590 Andreas Kemnade  2025-09-06  126  
d38d49b140043b Alistair Francis 2021-08-03  127  	platform_set_drvdata(pdev, data);
8c485bedfb7852 Alistair Francis 2021-06-15  128  
27fdd3bbb7a138 Alistair Francis 2021-08-06  129  	ret = regmap_write(regmap, SY7636A_REG_POWER_ON_DELAY_TIME, 0x0);
8c485bedfb7852 Alistair Francis 2021-06-15  130  	if (ret) {
4cafe1aeb5fb4e Alistair Francis 2021-08-03  131  		dev_err(pdev->dev.parent, "Failed to initialize regulator: %d\n", ret);
8c485bedfb7852 Alistair Francis 2021-06-15  132  		return ret;
8c485bedfb7852 Alistair Francis 2021-06-15  133  	}
8c485bedfb7852 Alistair Francis 2021-06-15  134  
8c485bedfb7852 Alistair Francis 2021-06-15  135  	config.dev = &pdev->dev;
27fdd3bbb7a138 Alistair Francis 2021-08-06  136  	config.regmap = regmap;
8c485bedfb7852 Alistair Francis 2021-06-15  137  
8c485bedfb7852 Alistair Francis 2021-06-15  138  	rdev = devm_regulator_register(&pdev->dev, &desc, &config);
8c485bedfb7852 Alistair Francis 2021-06-15  139  	if (IS_ERR(rdev)) {
4cafe1aeb5fb4e Alistair Francis 2021-08-03  140  		dev_err(pdev->dev.parent, "Failed to register %s regulator\n",
8c485bedfb7852 Alistair Francis 2021-06-15  141  			pdev->name);
8c485bedfb7852 Alistair Francis 2021-06-15  142  		return PTR_ERR(rdev);
8c485bedfb7852 Alistair Francis 2021-06-15  143  	}
8c485bedfb7852 Alistair Francis 2021-06-15  144  
8c485bedfb7852 Alistair Francis 2021-06-15  145  	return 0;
8c485bedfb7852 Alistair Francis 2021-06-15  146  }

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio
  2025-09-06  9:09 ` [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio Andreas Kemnade
  2025-09-06 14:35   ` Peng Fan
@ 2025-09-08  8:00   ` Alistair
  1 sibling, 0 replies; 16+ messages in thread
From: Alistair @ 2025-09-08  8:00 UTC (permalink / raw)
  To: Andreas Kemnade, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Liam Girdwood, Mark Brown, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, Linux Kernel Mailing List, imx, linux-arm-kernel

On Sat, 6 Sep 2025, at 7:09 PM, Andreas Kemnade wrote:
> Attach the power good gpio to the regulator device devres instead of the
> parent device to fix problems if probe is run multiple times
> (rmmod/insmod or some deferral).
> 
> Fixes: 8c485bedfb785 ("regulator: sy7636a: Initial commit")
> Signed-off-by: Andreas Kemnade <akemnade@kernel.org>

Reviewed-by: Alistair Francis <alistair@alistair23.me>

Alistair

> ---
> drivers/regulator/sy7636a-regulator.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
> index d1e7ba1fb3e1a..27e3d939b7bb9 100644
> --- a/drivers/regulator/sy7636a-regulator.c
> +++ b/drivers/regulator/sy7636a-regulator.c
> @@ -83,9 +83,11 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
> if (!regmap)
> return -EPROBE_DEFER;
>  
> - gdp = devm_gpiod_get(pdev->dev.parent, "epd-pwr-good", GPIOD_IN);
> + device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
> +
> + gdp = devm_gpiod_get(&pdev->dev, "epd-pwr-good", GPIOD_IN);
> if (IS_ERR(gdp)) {
> - dev_err(pdev->dev.parent, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
> + dev_err(&pdev->dev, "Power good GPIO fault %ld\n", PTR_ERR(gdp));
> return PTR_ERR(gdp);
> }
>  
> @@ -105,7 +107,6 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
> }
>  
> config.dev = &pdev->dev;
> - config.dev->of_node = pdev->dev.parent->of_node;
> config.regmap = regmap;
>  
> rdev = devm_regulator_register(&pdev->dev, &desc, &config);
> 
> -- 
> 2.39.5
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 4/4] ARM: dts: imx: e70k02: add sy7636
  2025-09-06  9:09 ` [PATCH 4/4] ARM: dts: imx: e70k02: add sy7636 Andreas Kemnade
@ 2025-09-08  8:07   ` Alistair
  0 siblings, 0 replies; 16+ messages in thread
From: Alistair @ 2025-09-08  8:07 UTC (permalink / raw)
  To: Andreas Kemnade, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Liam Girdwood, Mark Brown, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: devicetree, Linux Kernel Mailing List, imx, linux-arm-kernel

On Sat, 6 Sep 2025, at 7:09 PM, Andreas Kemnade wrote:
> Add the EPD PMIC for the e70k02 based devices as a step towards full EPD
> support.
> 
> Signed-off-by: Andreas Kemnade <akemnade@kernel.org>

Acked-by: Alistair Francis <alistair@alistair23.me>

Alistair

> ---
> arch/arm/boot/dts/nxp/imx/e70k02.dtsi              | 25 +++++++++++++++++++++-
> .../arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts | 24 +++++++++++++++++++++
> .../arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts | 24 +++++++++++++++++++++
> 3 files changed, 72 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/nxp/imx/e70k02.dtsi b/arch/arm/boot/dts/nxp/imx/e70k02.dtsi
> index dcc3c9d488a88..5f6b7545a0c0c 100644
> --- a/arch/arm/boot/dts/nxp/imx/e70k02.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/e70k02.dtsi
> @@ -69,6 +69,14 @@ memory@80000000 {
> reg = <0x80000000 0x20000000>;
> };
>  
> + epd_pmic_supply: regulator-epd-pmic-in {
> + compatible = "regulator-fixed";
> + regulator-name = "epd_pmic_supply";
> + gpio = <&gpio2 14 GPIO_ACTIVE_HIGH>;
> + startup-delay-us = <20000>;
> + enable-active-high;
> + };
> +
> reg_wifi: regulator-wifi {
> compatible = "regulator-fixed";
> regulator-name = "SD3_SPWR";
> @@ -133,7 +141,22 @@ touchscreen@24 {
> vdd-supply = <&ldo5_reg>;
> };
>  
> - /* TODO: SY7636 PMIC for E Ink at 0x62 */
> + sy7636: pmic@62 {
> + compatible = "silergy,sy7636a";
> + reg = <0x62>;
> + en-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
> + vcom-en-gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
> + epd-pwr-good-gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
> + vin-supply = <&epd_pmic_supply>;
> +
> + #thermal-sensor-cells = <0>;
> +
> + regulators {
> + reg_epdpmic: vcom {
> + regulator-name = "vcom";
> + };
> + };
> + };
>  
> };
>  
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts b/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts
> index a2534c422a522..f8709a9524093 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts
> +++ b/arch/arm/boot/dts/nxp/imx/imx6sl-tolino-vision5.dts
> @@ -26,6 +26,11 @@ / {
> compatible = "kobo,tolino-vision5", "fsl,imx6sl";
> };
>  
> +&epd_pmic_supply {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_epd_pmic_supply>;
> +};
> +
> &gpio_keys {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_gpio_keys>;
> @@ -59,6 +64,12 @@ MX6SL_PAD_FEC_RXD1__GPIO4_IO18          0x10059 /* TP_RST */
> >;
> };
>  
> + pinctrl_epd_pmic_supply: epd-pmic-supplygrp {
> + fsl,pins = <
> + MX6SL_PAD_EPDC_PWRWAKEUP__GPIO2_IO14    0x40010059
> + >;
> + };
> +
> pinctrl_gpio_keys: gpio-keysgrp {
> fsl,pins = <
> MX6SL_PAD_FEC_CRS_DV__GPIO4_IO25 0x17059 /* PWR_SW */
> @@ -159,6 +170,14 @@ MX6SL_PAD_KEY_COL2__GPIO3_IO28 0x1b8b1 /* ricoh619 bat_low_int */
> >;
> };
>  
> + pinctrl_sy7636_gpio: sy7636-gpiogrp {
> + fsl,pins = <
> + MX6SL_PAD_EPDC_VCOM0__GPIO2_IO03        0x40010059 /* VCOM_CTRL */
> + MX6SL_PAD_EPDC_PWRCTRL1__GPIO2_IO08     0x40010059 /* EN */
> + MX6SL_PAD_EPDC_PWRSTAT__GPIO2_IO13      0x17059 /* PWR_GOOD */
> + >;
> + };
> +
> pinctrl_uart1: uart1grp {
> fsl,pins = <
> MX6SL_PAD_UART1_TXD__UART1_TX_DATA 0x1b0b1
> @@ -329,6 +348,11 @@ &ricoh619 {
> pinctrl-0 = <&pinctrl_ricoh_gpio>;
> };
>  
> +&sy7636 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sy7636_gpio>;
> +};
> +
> &uart1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_uart1>;
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts b/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts
> index 660620d226f71..19bbe60331b36 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts
> +++ b/arch/arm/boot/dts/nxp/imx/imx6sll-kobo-librah2o.dts
> @@ -36,6 +36,11 @@ &cpu0 {
> soc-supply = <&dcdc1_reg>;
> };
>  
> +&epd_pmic_supply {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_epd_pmic_supply>;
> +};
> +
> &gpio_keys {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_gpio_keys>;
> @@ -69,6 +74,12 @@ MX6SLL_PAD_GPIO4_IO18__GPIO4_IO18 0x10059 /* TP_RST */
> >;
> };
>  
> + pinctrl_epd_pmic_supply: epd-pmic-supplygrp {
> + fsl,pins = <
> + MX6SLL_PAD_EPDC_PWR_WAKE__GPIO2_IO14    0x40010059
> + >;
> + };
> +
> pinctrl_gpio_keys: gpio-keysgrp {
> fsl,pins = <
> MX6SLL_PAD_GPIO4_IO25__GPIO4_IO25 0x17059 /* PWR_SW */
> @@ -169,6 +180,14 @@ MX6SLL_PAD_KEY_COL2__GPIO3_IO28 0x1b8b1 /* ricoh619 bat_low_int */
> >;
> };
>  
> + pinctrl_sy7636_gpio: sy7636-gpiogrp {
> + fsl,pins = <
> + MX6SLL_PAD_EPDC_VCOM0__GPIO2_IO03       0x40010059 /* VCOM_CTRL */
> + MX6SLL_PAD_EPDC_PWR_CTRL1__GPIO2_IO08   0x40010059 /* EN */
> + MX6SLL_PAD_EPDC_PWR_STAT__GPIO2_IO13    0x17059 /* PWR_GOOD */
> + >;
> + };
> +
> pinctrl_uart1: uart1grp {
> fsl,pins = <
> MX6SLL_PAD_UART1_TXD__UART1_DCE_TX 0x1b0b1
> @@ -319,6 +338,11 @@ &ricoh619 {
> pinctrl-0 = <&pinctrl_ricoh_gpio>;
> };
>  
> +&sy7636 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_sy7636_gpio>;
> +};
> +
> &uart1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_uart1>;
> 
> -- 
> 2.39.5
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply
  2025-09-06 12:01   ` Krzysztof Kozlowski
@ 2025-09-08 10:54     ` Andreas Kemnade
  2025-09-08 14:34     ` Mark Brown
  1 sibling, 0 replies; 16+ messages in thread
From: Andreas Kemnade @ 2025-09-08 10:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andreas Kemnade, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alistair Francis, Liam Girdwood, Mark Brown,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	devicetree, linux-kernel, imx, linux-arm-kernel

Am Sat, 6 Sep 2025 14:01:25 +0200
schrieb Krzysztof Kozlowski <krzk@kernel.org>:

> On 06/09/2025 11:09, Andreas Kemnade wrote:
> > To be able to fully describe how the SY7636A is connected to the system,
> > add properties for the EN and VCOM_EN pins. To squeeze out every bit
> > of unused current, in many devices it is possible to power off the
> > complete chip. Add an input regulator to allow that.
> > 
> > Signed-off-by: Andreas Kemnade <akemnade@kernel.org>
> > ---
> >  .../devicetree/bindings/mfd/silergy,sy7636a.yaml         | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
> > index ee0be32ac0204..08ad593e237f1 100644
> > --- a/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/silergy,sy7636a.yaml
> > @@ -32,6 +32,22 @@ properties:
> >        Specifying the power good GPIOs.
> >      maxItems: 1
> >  
> > +  en-gpios:  
> 
> enable-gpios, unless it is something else, but then please explain in
> the description.
>
My idea here was to have it crystal clear which hw pin is meant since
there are two pins which enable-like functions. But since you agree
with the name for the other pin, I can live with enable-gpios here,
as long as EN pin is mentioned in the description.

Regards,
Andreas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply
  2025-09-06 12:01   ` Krzysztof Kozlowski
  2025-09-08 10:54     ` Andreas Kemnade
@ 2025-09-08 14:34     ` Mark Brown
  2025-09-09  0:44       ` Rob Herring
  1 sibling, 1 reply; 16+ messages in thread
From: Mark Brown @ 2025-09-08 14:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andreas Kemnade, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Alistair Francis, Liam Girdwood, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, devicetree,
	linux-kernel, imx, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

On Sat, Sep 06, 2025 at 02:01:25PM +0200, Krzysztof Kozlowski wrote:
> On 06/09/2025 11:09, Andreas Kemnade wrote:

> > +  en-gpios:

> enable-gpios, unless it is something else, but then please explain in
> the description.

> > +    description:
> > +      If EN pin is not hardwired, specify it here to have it set up.
> > +    maxItems: 1

It seems reasonable to name the property after the pin on the device?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply
  2025-09-08 14:34     ` Mark Brown
@ 2025-09-09  0:44       ` Rob Herring
  2025-09-09  7:13         ` Andreas Kemnade
  0 siblings, 1 reply; 16+ messages in thread
From: Rob Herring @ 2025-09-09  0:44 UTC (permalink / raw)
  To: Mark Brown
  Cc: Krzysztof Kozlowski, Andreas Kemnade, Lee Jones,
	Krzysztof Kozlowski, Conor Dooley, Alistair Francis,
	Liam Girdwood, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, devicetree, linux-kernel, imx, linux-arm-kernel

On Mon, Sep 08, 2025 at 03:34:00PM +0100, Mark Brown wrote:
> On Sat, Sep 06, 2025 at 02:01:25PM +0200, Krzysztof Kozlowski wrote:
> > On 06/09/2025 11:09, Andreas Kemnade wrote:
> 
> > > +  en-gpios:
> 
> > enable-gpios, unless it is something else, but then please explain in
> > the description.
> 
> > > +    description:
> > > +      If EN pin is not hardwired, specify it here to have it set up.
> > > +    maxItems: 1
> 
> It seems reasonable to name the property after the pin on the device?

Yes, but in general we've standardized on reset, enable, powerdown, etc. 
rather than all the possible variations of those names. At least with 
'reset', standardizing it has bought us the ability to handle it with 
the reset framework rather than every driver implementing its own GPIO 
twiddling.

Rob

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply
  2025-09-09  0:44       ` Rob Herring
@ 2025-09-09  7:13         ` Andreas Kemnade
  0 siblings, 0 replies; 16+ messages in thread
From: Andreas Kemnade @ 2025-09-09  7:13 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Brown, Krzysztof Kozlowski, Andreas Kemnade, Lee Jones,
	Krzysztof Kozlowski, Conor Dooley, Alistair Francis,
	Liam Girdwood, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, devicetree, linux-kernel, imx, linux-arm-kernel

Am Mon, 8 Sep 2025 19:44:58 -0500
schrieb Rob Herring <robh@kernel.org>:

> On Mon, Sep 08, 2025 at 03:34:00PM +0100, Mark Brown wrote:
> > On Sat, Sep 06, 2025 at 02:01:25PM +0200, Krzysztof Kozlowski wrote:  
> > > On 06/09/2025 11:09, Andreas Kemnade wrote:  
> >   
> > > > +  en-gpios:  
> >   
> > > enable-gpios, unless it is something else, but then please explain in
> > > the description.  
> >   
> > > > +    description:
> > > > +      If EN pin is not hardwired, specify it here to have it set up.
> > > > +    maxItems: 1  
> > 
> > It seems reasonable to name the property after the pin on the device?  
> 
> Yes, but in general we've standardized on reset, enable, powerdown, etc. 
> rather than all the possible variations of those names. At least with 
> 'reset', standardizing it has bought us the ability to handle it with 
> the reset framework rather than every driver implementing its own GPIO 
> twiddling.
> 
ok, then I will do
EN -> enable-gpios
VCOM_EN -> vcom-en-gpios (as is)

Regards,
Andreas



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: (subset) [PATCH 0/4] regulator: sy7636a: define and init all resources needed
  2025-09-06  9:09 [PATCH 0/4] regulator: sy7636a: define and init all resources needed Andreas Kemnade
                   ` (3 preceding siblings ...)
  2025-09-06  9:09 ` [PATCH 4/4] ARM: dts: imx: e70k02: add sy7636 Andreas Kemnade
@ 2025-09-09 13:34 ` Mark Brown
  4 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2025-09-09 13:34 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Alistair Francis, Liam Girdwood, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Andreas Kemnade
  Cc: devicetree, linux-kernel, imx, linux-arm-kernel

On Sat, 06 Sep 2025 11:09:11 +0200, Andreas Kemnade wrote:
> The SY7636A has some pins which can be hardwired or used to have more
> more advanced power management available. As several devices containing
> this regulator have these pins not hardwired, but instead connected to some
> GPIO, enhance the driver to have them defined and initialized.
> Also add the ability to power off the chip completely by defining some
> input power supply.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[2/4] regulator: sy7636a: fix lifecycle of power good gpio
      commit: c05d0b32eebadc8be6e53196e99c64cf2bed1d99

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-09-09 13:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-06  9:09 [PATCH 0/4] regulator: sy7636a: define and init all resources needed Andreas Kemnade
2025-09-06  9:09 ` [PATCH 1/4] dt-bindings: mfd: sy7636a: Add missing gpio pins and supply Andreas Kemnade
2025-09-06 12:01   ` Krzysztof Kozlowski
2025-09-08 10:54     ` Andreas Kemnade
2025-09-08 14:34     ` Mark Brown
2025-09-09  0:44       ` Rob Herring
2025-09-09  7:13         ` Andreas Kemnade
2025-09-06  9:09 ` [PATCH 2/4] regulator: sy7636a: fix lifecycle of power good gpio Andreas Kemnade
2025-09-06 14:35   ` Peng Fan
2025-09-08  8:00   ` Alistair
2025-09-06  9:09 ` [PATCH 3/4] regulator: sy7636a: add gpios and input regulator Andreas Kemnade
2025-09-06 14:32   ` Peng Fan
2025-09-07 11:26   ` Dan Carpenter
2025-09-06  9:09 ` [PATCH 4/4] ARM: dts: imx: e70k02: add sy7636 Andreas Kemnade
2025-09-08  8:07   ` Alistair
2025-09-09 13:34 ` (subset) [PATCH 0/4] regulator: sy7636a: define and init all resources needed Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).