Skip to contentSkip to conversation

ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

PATCH New Marek Vasut 3 participants 10 messages Feb 13, 2018 – Feb 15, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Regulator setup is suboptimal on H2 Stout too.

Cc Geert Uytterhoeven <[email protected]>
Cc Kuninori Morimoto <[email protected]>
Cc Simon Horman <[email protected]>
Cc Wolfram Sang <[email protected]>
---
 arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +4 -3
index 44438f344dc8..b749450d361f 100644
@@ -1,9 +1,9 @@
 /*
  * R-Car Generation 2 da9063/da9210 regulator quirk
  *
- * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
- * da9210 regulators.  Both regulators have their interrupt request lines tied
- * to the same interrupt pin (IRQ2) on the SoC.
+ * The r8a7790/lager,stout and r8a7791/koelsch development boards have da9063
+ * and da9210 regulators.  Both regulators have their interrupt request lines
+ * tied to the same interrupt pin (IRQ2) on the SoC.
  *
  * After cold boot or da9063-induced restart, both the da9063 and da9210 seem
  * to assert their interrupt request lines.  Hence as soon as one driver
@@ -118,6 +118,7 @@ static int __init rcar_gen2_regulator_quirk(void)
 
 	if (!of_machine_is_compatible("renesas,koelsch") &&
 	    !of_machine_is_compatible("renesas,lager") &&
+	    !of_machine_is_compatible("renesas,stout") &&
 	    !of_machine_is_compatible("renesas,gose"))
 		return -ENODEV;
 
Signature · 1 line
2.15.1
#1 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Quoted 7 lines

- * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
- * da9210 regulators. Both regulators have their interrupt request lines tied
- * to the same interrupt pin (IRQ2) on the SoC.
+ * The r8a7790/lager,stout and r8a7791/koelsch development boards have da9063
+ * and da9210 regulators. Both regulators have their interrupt request lines
+ * tied to the same interrupt pin (IRQ2) on the SoC.

I think listing the boards here doesn't scale well. Gose is already missing. How about rephrasing the paragraph to something like "Some Gen2 development boards have..."?

Quoted 14 lines

*
* After cold boot or da9063-induced restart, both the da9063 and da9210 seem
* to assert their interrupt request lines. Hence as soon as one driver

arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +1 -0
@@ -118,6 +118,7 @@ static int __init rcar_gen2_regulator_quirk(void)
 
 	if (!of_machine_is_compatible("renesas,koelsch") &&
 	    !of_machine_is_compatible("renesas,lager") &&
+	    !of_machine_is_compatible("renesas,stout") &&
 	    !of_machine_is_compatible("renesas,gose"))
 		return -ENODEV;
 
Signature · 1 line
2.15.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180214/5c6ad971/attachment.sig>

#2 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Quoted 10 lines · Wolfram Sang
Quoted 6 lines

- * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
- * da9210 regulators. Both regulators have their interrupt request lines tied
- * to the same interrupt pin (IRQ2) on the SoC.
+ * The r8a7790/lager,stout and r8a7791/koelsch development boards have da9063
+ * and da9210 regulators. Both regulators have their interrupt request lines
+ * tied to the same interrupt pin (IRQ2) on the SoC.

I think listing the boards here doesn't scale well. Gose is already missing. How about rephrasing the paragraph to something like "Some Gen2 development boards have..."?

+1

Quoted 10 lines

arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c static int __init rcar_gen2_regulator_quirk(void) · line 123

Quoted 10 lines

*
* After cold boot or da9063-induced restart, both the da9063 and da9210 seem
* to assert their interrupt request lines. Hence as soon as one driver

arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +1 -0
@@ -118,6 +118,7 @@ static int __init rcar_gen2_regulator_quirk(void)
 
      if (!of_machine_is_compatible("renesas,koelsch") &&
          !of_machine_is_compatible("renesas,lager") &&
+         !of_machine_is_compatible("renesas,stout") &&
          !of_machine_is_compatible("renesas,gose"))
              return -ENODEV;

Have we reached critical mass to start using array-based matching with of_device_compatible_match()?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Quoted 19 lines · Geert Uytterhoeven
Quoted 10 lines · Wolfram Sang
Quoted 6 lines

- * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
- * da9210 regulators. Both regulators have their interrupt request lines tied
- * to the same interrupt pin (IRQ2) on the SoC.
+ * The r8a7790/lager,stout and r8a7791/koelsch development boards have da9063
+ * and da9210 regulators. Both regulators have their interrupt request lines
+ * tied to the same interrupt pin (IRQ2) on the SoC.

I think listing the boards here doesn't scale well. Gose is already missing. How about rephrasing the paragraph to something like "Some Gen2 development boards have..."?

+1

Quoted 5 lines
Quoted 5 lines

*
* After cold boot or da9063-induced restart, both the da9063 and da9210 seem
* to assert their interrupt request lines. Hence as soon as one driver

(quoted diff) +0 -0
@@ -118,6 +118,7 @@ static int __init rcar_gen2_regulator_quirk(void)
 
Quoted 8 lines
Quoted 5 lines

arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c static int __init rcar_gen2_regulator_quirk(void) · line 123

Quoted 5 lines
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +1 -0
      if (!of_machine_is_compatible("renesas,koelsch") &&
          !of_machine_is_compatible("renesas,lager") &&
+         !of_machine_is_compatible("renesas,stout") &&
          !of_machine_is_compatible("renesas,gose"))
              return -ENODEV;

Have we reached critical mass to start using array-based matching with of_device_compatible_match()?

We're matching on machine , not device , here . I guess our device node would be / ?

Signature · 2 lines
Best regards,
Marek Vasut
#4 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Hi Marek,

Quoted 29 lines · Marek Vasut
Quoted 19 lines · Geert Uytterhoeven
Quoted 10 lines · Wolfram Sang
Quoted 6 lines

- * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
- * da9210 regulators. Both regulators have their interrupt request lines tied
- * to the same interrupt pin (IRQ2) on the SoC.
+ * The r8a7790/lager,stout and r8a7791/koelsch development boards have da9063
+ * and da9210 regulators. Both regulators have their interrupt request lines
+ * tied to the same interrupt pin (IRQ2) on the SoC.

I think listing the boards here doesn't scale well. Gose is already missing. How about rephrasing the paragraph to something like "Some Gen2 development boards have..."?

+1

Quoted 5 lines
Quoted 5 lines

*
* After cold boot or da9063-induced restart, both the da9063 and da9210 seem
* to assert their interrupt request lines. Hence as soon as one driver

(quoted diff) +0 -0
@@ -118,6 +118,7 @@ static int __init rcar_gen2_regulator_quirk(void)
 
Quoted 8 lines
Quoted 5 lines

arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c static int __init rcar_gen2_regulator_quirk(void) · line 123

Quoted 5 lines
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +1 -0
      if (!of_machine_is_compatible("renesas,koelsch") &&
          !of_machine_is_compatible("renesas,lager") &&
+         !of_machine_is_compatible("renesas,stout") &&
          !of_machine_is_compatible("renesas,gose"))
              return -ENODEV;

Have we reached critical mass to start using array-based matching with of_device_compatible_match()?

Quoted 2 lines

We're matching on machine , not device , here . I guess our device node would be / ?

Correct, cfr. the implementation of of_machine_is_compatible().

BTW, several PPC platforms use of_device_compatible_match(of_root, ...), but I believe of_root is not guaranteed to be set up.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Quoted 32 lines · Geert Uytterhoeven

Hi Marek,

Quoted 29 lines · Marek Vasut
Quoted 27 lines · Geert Uytterhoeven
Quoted 10 lines · Wolfram Sang
Quoted 6 lines

- * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
- * da9210 regulators. Both regulators have their interrupt request lines tied
- * to the same interrupt pin (IRQ2) on the SoC.
+ * The r8a7790/lager,stout and r8a7791/koelsch development boards have da9063
+ * and da9210 regulators. Both regulators have their interrupt request lines
+ * tied to the same interrupt pin (IRQ2) on the SoC.

I think listing the boards here doesn't scale well. Gose is already missing. How about rephrasing the paragraph to something like "Some Gen2 development boards have..."?

+1

Quoted 10 lines

arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c static int __init rcar_gen2_regulator_quirk(void) · line 123

Quoted 10 lines

*
* After cold boot or da9063-induced restart, both the da9063 and da9210 seem
* to assert their interrupt request lines. Hence as soon as one driver

arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +1 -0
@@ -118,6 +118,7 @@ static int __init rcar_gen2_regulator_quirk(void)
 
      if (!of_machine_is_compatible("renesas,koelsch") &&
          !of_machine_is_compatible("renesas,lager") &&
+         !of_machine_is_compatible("renesas,stout") &&
          !of_machine_is_compatible("renesas,gose"))
              return -ENODEV;

Have we reached critical mass to start using array-based matching with of_device_compatible_match()?

Quoted 7 lines
Quoted 2 lines

We're matching on machine , not device , here . I guess our device node would be / ?

Correct, cfr. the implementation of of_machine_is_compatible().

BTW, several PPC platforms use of_device_compatible_match(of_root, ...), but I believe of_root is not guaranteed to be set up.

OK, subsequent patch then. Added to TODO.

Signature · 2 lines
Best regards,
Marek Vasut
#6 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Quoted 5 lines
Quoted 3 lines

BTW, several PPC platforms use of_device_compatible_match(of_root, ...), but I believe of_root is not guaranteed to be set up.

OK, subsequent patch then. Added to TODO.

Can you place it below the PCIE patches, please? ;)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180215/f8a717f5/attachment-0001.sig>

#7 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Quoted 7 lines · Wolfram Sang
Quoted 5 lines
Quoted 3 lines

BTW, several PPC platforms use of_device_compatible_match(of_root, ...), but I believe of_root is not guaranteed to be set up.

OK, subsequent patch then. Added to TODO.

Can you place it below the PCIE patches, please? ;)

Grumble, yeah.

Signature · 2 lines
Best regards,
Marek Vasut
#8 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

In reply to Marek Vasut

Hi Marek,

Quoted 1 line · Marek Vasut

Regulator setup is suboptimal on H2 Stout too.

Worse, Stout has 2 DA9210 regulators, so you have to add a check for a DA9210 at address 0x70.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#9 lore raw

PATCH 1/1 ARM: shmobile: stout: enable R-Car Gen2 regulator quirk

Quoted 7 lines · Geert Uytterhoeven

Hi Marek,

Quoted 1 line · Marek Vasut

Regulator setup is suboptimal on H2 Stout too.

Worse, Stout has 2 DA9210 regulators, so you have to add a check for a DA9210 at address 0x70.

Fixed

Signature · 2 lines
Best regards,
Marek Vasut