linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526
@ 2021-06-02 11:24 Rudi Heitbaum
  2021-06-02 11:29 ` [PATCH 2/2 v2] regulator: fan53555: add tcs4526 Rudi Heitbaum
  2021-06-15 23:41 ` [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526 Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Rudi Heitbaum @ 2021-06-02 11:24 UTC (permalink / raw)
  To: devicetree, linux-kernel, linux-rockchip
  Cc: broonie, ezequiel, chenjh, pgwipeout

Add a compatible string to support the TCS4526 device,
which is compatible with Fairchild FAN53555 regulators.

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
 Documentation/devicetree/bindings/regulator/fan53555.txt | 2 +-
 1 file changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/fan53555.txt b/Documentation/devicetree/bindings/regulator/fan53555.txt
index e7fc045281d1..013f096ac0aa 100644
--- a/Documentation/devicetree/bindings/regulator/fan53555.txt
+++ b/Documentation/devicetree/bindings/regulator/fan53555.txt
@@ -2,7 +2,7 @@
 
 Required properties:
   - compatible: one of "fcs,fan53555", "fcs,fan53526", "silergy,syr827",
-		"silergy,syr828" or "tcs,tcs4525".
+		"silergy,syr828", "tcs,tcs4525" or "tcs,tcs4526".
   - reg: I2C address
 
 Optional properties:
-- 
2.29.2



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

* [PATCH 2/2 v2] regulator: fan53555: add tcs4526
  2021-06-02 11:24 [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526 Rudi Heitbaum
@ 2021-06-02 11:29 ` Rudi Heitbaum
  2021-06-04 16:32   ` Mark Brown
  2021-06-15 23:41 ` [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526 Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Rudi Heitbaum @ 2021-06-02 11:29 UTC (permalink / raw)
  To: devicetree, linux-kernel, linux-rockchip
  Cc: broonie, ezequiel, chenjh, pgwipeout

For rk3399pro boards the tcs4526 regulator supports the vdd_gpu
regulator. The tcs4526 regulator has a chip id of <0>.
Add the compatibile tcs,tcs4526  

without this patch, the dmesg output is:
  fan53555-regulator 0-0010: Chip ID 0 not supported!
  fan53555-regulator 0-0010: Failed to setup device!
  fan53555-regulator: probe of 0-0010 failed with error -22
with this patch, the dmesg output is:
  vdd_gpu: supplied by vcc5v0_sys

The regulators are described as:
- Dedicated power management IC TCS4525
- Lithium battery protection chip TCS4526

This has been tested with a Radxa Rock Pi N10.

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
 drivers/regulator/fan53555.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index 2695be617373..ddab9359ea20 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -93,6 +93,10 @@ enum {
 	TCS4525_CHIP_ID_12 = 12,
 };
 
+enum {
+	TCS4526_CHIP_ID_00 = 0,
+};
+
 /* IC mask revision */
 enum {
 	FAN53555_CHIP_REV_00 = 0x3,
@@ -374,6 +375,7 @@ static int fan53555_voltages_setup_silergy(struct fan53555_device_info *di)
 {
 	switch (di->chip_id) {
 	case TCS4525_CHIP_ID_12:
+	case TCS4526_CHIP_ID_00:
 		di->slew_reg = TCS4525_TIME;
 		di->slew_mask = TCS_SLEW_MASK;
 		di->slew_shift = TCS_SLEW_MASK;
@@ -564,6 +566,9 @@ static const struct of_device_id __maybe_unused fan53555_dt_ids[] = {
 	}, {
 		.compatible = "tcs,tcs4525",
 		.data = (void *)FAN53526_VENDOR_TCS
+	}, {
+		.compatible = "tcs,tcs4526",
+		.data = (void *)FAN53526_VENDOR_TCS
 	},
 	{ }
 };
@@ -672,6 +677,9 @@ static const struct i2c_device_id fan53555_id[] = {
 	}, {
 		.name = "tcs4525",
 		.driver_data = FAN53526_VENDOR_TCS
+	}, {
+		.name = "tcs4526",
+		.driver_data = FAN53526_VENDOR_TCS
 	},
 	{ },
 };
-- 
2.29.2



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

* Re: [PATCH 2/2 v2] regulator: fan53555: add tcs4526
  2021-06-02 11:29 ` [PATCH 2/2 v2] regulator: fan53555: add tcs4526 Rudi Heitbaum
@ 2021-06-04 16:32   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-06-04 16:32 UTC (permalink / raw)
  To: linux-kernel, Rudi Heitbaum, devicetree, linux-rockchip
  Cc: Mark Brown, chenjh, pgwipeout, ezequiel

On Wed, 2 Jun 2021 11:29:47 +0000, Rudi Heitbaum wrote:
> For rk3399pro boards the tcs4526 regulator supports the vdd_gpu
> regulator. The tcs4526 regulator has a chip id of <0>.
> Add the compatibile tcs,tcs4526
> 
> without this patch, the dmesg output is:
>   fan53555-regulator 0-0010: Chip ID 0 not supported!
>   fan53555-regulator 0-0010: Failed to setup device!
>   fan53555-regulator: probe of 0-0010 failed with error -22
> with this patch, the dmesg output is:
>   vdd_gpu: supplied by vcc5v0_sys
> 
> [...]

Applied to

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

Thanks!

[2/2] regulator: fan53555: add tcs4526
      commit: 5eee5eced95f1b35c8567688ed52932b7e58deee

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] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526
  2021-06-02 11:24 [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526 Rudi Heitbaum
  2021-06-02 11:29 ` [PATCH 2/2 v2] regulator: fan53555: add tcs4526 Rudi Heitbaum
@ 2021-06-15 23:41 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-06-15 23:41 UTC (permalink / raw)
  To: Rudi Heitbaum
  Cc: pgwipeout, broonie, devicetree, ezequiel, linux-rockchip,
	linux-kernel, chenjh

On Wed, 02 Jun 2021 11:24:53 +0000, Rudi Heitbaum wrote:
> Add a compatible string to support the TCS4526 device,
> which is compatible with Fairchild FAN53555 regulators.
> 
> Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
> ---
>  Documentation/devicetree/bindings/regulator/fan53555.txt | 2 +-
>  1 file changed, 1 insertions(+), 1 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2021-06-15 23:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 11:24 [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526 Rudi Heitbaum
2021-06-02 11:29 ` [PATCH 2/2 v2] regulator: fan53555: add tcs4526 Rudi Heitbaum
2021-06-04 16:32   ` Mark Brown
2021-06-15 23:41 ` [PATCH 1/2] dt-bindings: regulator: Add support for TCS4526 Rob Herring

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).