* [PATCH v4 02/11] dt-bindings: rtc: isl1208: Convert to json-schema
2023-05-18 11:36 [PATCH v4 00/11] Add Renesas PMIC RAA215300 and built-in RTC support Biju Das
@ 2023-05-18 11:36 ` Biju Das
2023-05-18 11:36 ` [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties Biju Das
` (2 subsequent siblings)
3 siblings, 0 replies; 18+ messages in thread
From: Biju Das @ 2023-05-18 11:36 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Trent Piepho, linux-rtc, devicetree, Geert Uytterhoeven,
Fabrizio Castro, linux-renesas-soc, Krzysztof Kozlowski
Convert the isl1208 RTC device tree binding documentation to json-schema.
Update the example to match reality.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
v4->v4_new:
* Moved this patch to PMIC series
* Added minItems to interrupt-names.
* Added interrupt-names in conditional schema check.
v3->v4:
* Added Rb tag from Krzysztof Kozlowski.
* Dropped | from description
* Replaced the pin name #EVDET->EVDET in description.
* Dropped oneOf from compatible.
v2->v3:
* Updated interrupt-names property by keeping the list of names.
* Removed Interrupts from required property as it may not be wired.
* Removed isil,ev-evienb from required property.
RFC->v2:
* Updated maintainers list
* Updated description from original bindings
* removed default from isil,ev-evienb properties to match with the original
bindings.
* Added conditional check for interrupts.
---
.../devicetree/bindings/rtc/isil,isl1208.txt | 38 --------
.../devicetree/bindings/rtc/isil,isl1208.yaml | 89 +++++++++++++++++++
2 files changed, 89 insertions(+), 38 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/rtc/isil,isl1208.txt
create mode 100644 Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl1208.txt b/Documentation/devicetree/bindings/rtc/isil,isl1208.txt
deleted file mode 100644
index 51f003006f04..000000000000
--- a/Documentation/devicetree/bindings/rtc/isil,isl1208.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-Intersil ISL1209/19 I2C RTC/Alarm chip with event in
-
-ISL12X9 have additional pins EVIN and #EVDET for tamper detection, while the
-ISL1208 and ISL1218 do not. They are all use the same driver with the bindings
-described here, with chip specific properties as noted.
-
-Required properties supported by the device:
- - "compatible": Should be one of the following:
- - "isil,isl1208"
- - "isil,isl1209"
- - "isil,isl1218"
- - "isil,isl1219"
- - "reg": I2C bus address of the device
-
-Optional properties:
- - "interrupt-names": list which may contains "irq" and "evdet"
- evdet applies to isl1209 and isl1219 only
- - "interrupts": list of interrupts for "irq" and "evdet"
- evdet applies to isl1209 and isl1219 only
- - "isil,ev-evienb": Enable or disable internal pull on EVIN pin
- Applies to isl1209 and isl1219 only
- Possible values are 0 and 1
- Value 0 enables internal pull-up on evin pin, 1 disables it.
- Default will leave the non-volatile configuration of the pullup
- as is.
-
-Example isl1219 node with #IRQ pin connected to SoC gpio1 pin12 and #EVDET pin
-connected to SoC gpio2 pin 24 and internal pull-up enabled in EVIN pin.
-
- isl1219: rtc@68 {
- compatible = "isil,isl1219";
- reg = <0x68>;
- interrupt-names = "irq", "evdet";
- interrupts-extended = <&gpio1 12 IRQ_TYPE_EDGE_FALLING>,
- <&gpio2 24 IRQ_TYPE_EDGE_FALLING>;
- isil,ev-evienb = <1>;
- };
-
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
new file mode 100644
index 000000000000..565965147ce6
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/isil,isl1208.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intersil ISL1209/19 I2C RTC/Alarm chip with event in
+
+maintainers:
+ - Biju Das <biju.das.jz@bp.renesas.com>
+ - Trent Piepho <tpiepho@gmail.com>
+
+description:
+ ISL12X9 have additional pins EVIN and EVDET for tamper detection, while the
+ ISL1208 and ISL1218 do not.
+
+properties:
+ compatible:
+ enum:
+ - isil,isl1208
+ - isil,isl1209
+ - isil,isl1218
+ - isil,isl1219
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ maxItems: 2
+
+ interrupt-names:
+ minItems: 1
+ items:
+ - const: irq
+ - const: evdet
+
+ isil,ev-evienb:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [ 0, 1 ]
+ description: |
+ Enable or disable internal pull on EVIN pin
+ Default will leave the non-volatile configuration of the pullup
+ as is.
+ <0> : Enables internal pull-up on evin pin
+ <1> : Disables internal pull-up on evin pin
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: rtc.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - isil,isl1209
+ - isil,isl1219
+ then:
+ properties:
+ interrupts:
+ maxItems: 2
+ interrupt-names:
+ items:
+ - const: irq
+ - const: evdet
+ else:
+ properties:
+ interrupts:
+ maxItems: 1
+ interrupt-names:
+ items:
+ - const: irq
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc_twi: rtc@6f {
+ compatible = "isil,isl1208";
+ reg = <0x6f>;
+ };
+ };
--
2.25.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties
2023-05-18 11:36 [PATCH v4 00/11] Add Renesas PMIC RAA215300 and built-in RTC support Biju Das
2023-05-18 11:36 ` [PATCH v4 02/11] dt-bindings: rtc: isl1208: Convert to json-schema Biju Das
@ 2023-05-18 11:36 ` Biju Das
2023-05-18 19:17 ` Conor Dooley
2023-05-19 12:35 ` Geert Uytterhoeven
2023-05-18 11:36 ` [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings Biju Das
2023-05-18 11:36 ` [PATCH v4 11/11] arm64: dts: renesas: rzg2l-smarc-som: Enable PMIC and built-in RTC Biju Das
3 siblings, 2 replies; 18+ messages in thread
From: Biju Das @ 2023-05-18 11:36 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Trent Piepho, linux-rtc, devicetree, Geert Uytterhoeven,
Fabrizio Castro, linux-renesas-soc
As per the HW manual, XTOSCB bit setting is as follows
If using an external clock signal, set the XTOSCB bit as 1 to
disable the crystal oscillator.
If using an external crystal, the XTOSCB bit needs to be set at 0
to enable the crystal oscillator.
Document clock and clock-names properties.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v4:
* New patch
---
.../devicetree/bindings/rtc/isil,isl1208.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
index 565965147ce6..6c270dd53605 100644
--- a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
+++ b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
@@ -25,6 +25,19 @@ properties:
reg:
maxItems: 1
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ description: |
+ Use xin, if connected to an external crystal.
+ Use clkin, if connected to an external clock signal.
+ oneOf:
+ - items:
+ - const: xin
+ - items:
+ - const: clkin
+
interrupts:
minItems: 1
maxItems: 2
--
2.25.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties
2023-05-18 11:36 ` [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties Biju Das
@ 2023-05-18 19:17 ` Conor Dooley
2023-05-19 12:35 ` Geert Uytterhoeven
1 sibling, 0 replies; 18+ messages in thread
From: Conor Dooley @ 2023-05-18 19:17 UTC (permalink / raw)
To: Biju Das
Cc: Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Trent Piepho, linux-rtc,
devicetree, Geert Uytterhoeven, Fabrizio Castro,
linux-renesas-soc
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
On Thu, May 18, 2023 at 12:36:35PM +0100, Biju Das wrote:
> As per the HW manual, XTOSCB bit setting is as follows
>
> If using an external clock signal, set the XTOSCB bit as 1 to
> disable the crystal oscillator.
>
> If using an external crystal, the XTOSCB bit needs to be set at 0
> to enable the crystal oscillator.
>
> Document clock and clock-names properties.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
I notice on v3 you appealed to Rob or Krzysztof for approval about this
approach. Clearly I not either of them, but it seems reasonable to me.
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
Conor.
> ---
> v4:
> * New patch
> ---
> .../devicetree/bindings/rtc/isil,isl1208.yaml | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> index 565965147ce6..6c270dd53605 100644
> --- a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> +++ b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> @@ -25,6 +25,19 @@ properties:
> reg:
> maxItems: 1
>
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + description: |
> + Use xin, if connected to an external crystal.
> + Use clkin, if connected to an external clock signal.
> + oneOf:
> + - items:
> + - const: xin
> + - items:
> + - const: clkin
> +
> interrupts:
> minItems: 1
> maxItems: 2
> --
> 2.25.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties
2023-05-18 11:36 ` [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties Biju Das
2023-05-18 19:17 ` Conor Dooley
@ 2023-05-19 12:35 ` Geert Uytterhoeven
2023-05-19 16:02 ` Biju Das
1 sibling, 1 reply; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-05-19 12:35 UTC (permalink / raw)
To: Biju Das
Cc: Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Trent Piepho, linux-rtc,
devicetree, Geert Uytterhoeven, Fabrizio Castro,
linux-renesas-soc
Hi Biju,
On Thu, May 18, 2023 at 1:37 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> As per the HW manual, XTOSCB bit setting is as follows
>
> If using an external clock signal, set the XTOSCB bit as 1 to
> disable the crystal oscillator.
>
> If using an external crystal, the XTOSCB bit needs to be set at 0
> to enable the crystal oscillator.
>
> Document clock and clock-names properties.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v4:
> * New patch
Thanks for your patch!
> --- a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> +++ b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> @@ -25,6 +25,19 @@ properties:
> reg:
> maxItems: 1
>
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + description: |
> + Use xin, if connected to an external crystal.
> + Use clkin, if connected to an external clock signal.
> + oneOf:
> + - items:
> + - const: xin
> + - items:
> + - const: clkin
> +
I guess that oneOf scheme is equivalent to the simpler
enum:
- xin
- clkin
?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties
2023-05-19 12:35 ` Geert Uytterhoeven
@ 2023-05-19 16:02 ` Biju Das
0 siblings, 0 replies; 18+ messages in thread
From: Biju Das @ 2023-05-19 16:02 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Trent Piepho,
linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
Geert Uytterhoeven, Fabrizio Castro,
linux-renesas-soc@vger.kernel.org
Hi Geert,
Thanks for the feedback.
> Subject: Re: [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document
> clock and clock-names properties
>
> Hi Biju,
>
> On Thu, May 18, 2023 at 1:37 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > As per the HW manual, XTOSCB bit setting is as follows
> >
> > If using an external clock signal, set the XTOSCB bit as 1 to disable
> > the crystal oscillator.
> >
> > If using an external crystal, the XTOSCB bit needs to be set at 0 to
> > enable the crystal oscillator.
> >
> > Document clock and clock-names properties.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v4:
> > * New patch
>
> Thanks for your patch!
>
> > --- a/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> > +++ b/Documentation/devicetree/bindings/rtc/isil,isl1208.yaml
> > @@ -25,6 +25,19 @@ properties:
> > reg:
> > maxItems: 1
> >
> > + clocks:
> > + maxItems: 1
> > +
> > + clock-names:
> > + description: |
> > + Use xin, if connected to an external crystal.
> > + Use clkin, if connected to an external clock signal.
> > + oneOf:
> > + - items:
> > + - const: xin
> > + - items:
> > + - const: clkin
> > +
>
> I guess that oneOf scheme is equivalent to the simpler
>
> enum:
> - xin
> - clkin
Agreed.
Cheers,
Biju
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-18 11:36 [PATCH v4 00/11] Add Renesas PMIC RAA215300 and built-in RTC support Biju Das
2023-05-18 11:36 ` [PATCH v4 02/11] dt-bindings: rtc: isl1208: Convert to json-schema Biju Das
2023-05-18 11:36 ` [PATCH v4 03/11] dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties Biju Das
@ 2023-05-18 11:36 ` Biju Das
2023-05-18 19:13 ` Conor Dooley
2023-05-19 12:58 ` Geert Uytterhoeven
2023-05-18 11:36 ` [PATCH v4 11/11] arm64: dts: renesas: rzg2l-smarc-som: Enable PMIC and built-in RTC Biju Das
3 siblings, 2 replies; 18+ messages in thread
From: Biju Das @ 2023-05-18 11:36 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Liam Girdwood, Mark Brown, Geert Uytterhoeven,
Magnus Damm, devicetree, linux-renesas-soc, Fabrizio Castro
Document Renesas RAA215300 PMIC bindings.
The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
Memory, with Built-In Charger and RTC.
It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power requirements.
The internally compensated regulators, built-in Real-Time Clock (RTC),
32kHz crystal oscillator, and coin cell battery charger provide a
highly integrated, small footprint power solution ideal for
System-On-Module (SOM) applications. A spread spectrum feature
provides an ease-of-use solution for noise-sensitive audio or RF
applications.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v3->v4:
* Moved bindings from mfd->regulator.
* Dropped minItems from reg.
* Dropped renesas,rtc-enabled property and instead used clock-names property
to find RTC is enabled or not.
* Added reg-names in required property.
* Updated the example.
v2->v3:
* Added more detailed description for renesas,rtc-enabled property.
RFC->v2:
* Updated reg property
* Added optional reg-names, interrupts and renesas,rtc-enabled
properties.
* Fixed the node name in the example
* Dropped the cross link property renesas,raa215300-rtc.
* Updated the example
---
.../bindings/regulator/renesas,raa215300.yaml | 84 +++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/renesas,raa215300.yaml
diff --git a/Documentation/devicetree/bindings/regulator/renesas,raa215300.yaml b/Documentation/devicetree/bindings/regulator/renesas,raa215300.yaml
new file mode 100644
index 000000000000..17b16f66f695
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/renesas,raa215300.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/renesas,raa215300.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas RAA215300 Power Management Integrated Circuit (PMIC)
+
+maintainers:
+ - Biju Das <biju.das.jz@bp.renesas.com>
+
+description: |
+ The RAA215300 is a high-performance, low-cost 9-channel PMIC designed for
+ 32-bit and 64-bit MCU and MPU applications. It supports DDR3, DDR3L, DDR4,
+ and LPDDR4 memory power requirements. The internally compensated regulators,
+ built-in Real-Time Clock (RTC), 32kHz crystal oscillator, and coin cell
+ battery charger provide a highly integrated, small footprint power solution
+ ideal for System-On-Module (SOM) applications. A spread spectrum feature
+ provides an ease-of-use solution for noise-sensitive audio or RF applications.
+
+ This device exposes two devices via I2C. One for the integrated RTC IP, and
+ one for everything else.
+
+ Link to datasheet:
+ https://www.renesas.com/in/en/products/power-power-management/multi-channel-power-management-ics-pmics/ssdsoc-power-management-ics-pmic-and-pmus/raa215300-high-performance-9-channel-pmic-supporting-ddr-memory-built-charger-and-rtc
+
+properties:
+ compatible:
+ enum:
+ - renesas,raa215300
+
+ reg:
+ maxItems: 2
+
+ reg-names:
+ items:
+ - const: main
+ - const: rtc
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ description: |
+ Use xin, if connected to an external crystal.
+ Use clkin, if connected to an external clock signal.
+ oneOf:
+ - items:
+ - const: xin
+ - items:
+ - const: clkin
+
+required:
+ - compatible
+ - reg
+ - reg-names
+
+additionalProperties: false
+
+examples:
+ - |
+ /* 32.768kHz crystal */
+ x2: clock-xtal {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ raa215300: pmic@12 {
+ compatible = "renesas,raa215300";
+ reg = <0x12>, <0x6f>;
+ reg-names = "main", "rtc";
+
+ clocks = <&x2>;
+ clock-names = "xin";
+ };
+ };
--
2.25.1
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-18 11:36 ` [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings Biju Das
@ 2023-05-18 19:13 ` Conor Dooley
2023-05-19 6:53 ` Biju Das
2023-05-19 12:58 ` Geert Uytterhoeven
1 sibling, 1 reply; 18+ messages in thread
From: Conor Dooley @ 2023-05-18 19:13 UTC (permalink / raw)
To: Biju Das
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Liam Girdwood,
Mark Brown, Geert Uytterhoeven, Magnus Damm, devicetree,
linux-renesas-soc, Fabrizio Castro
[-- Attachment #1: Type: text/plain, Size: 966 bytes --]
On Thu, May 18, 2023 at 12:36:41PM +0100, Biju Das wrote:
> Document Renesas RAA215300 PMIC bindings.
>
> The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
> Memory, with Built-In Charger and RTC.
>
> It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power requirements.
> The internally compensated regulators, built-in Real-Time Clock (RTC),
> 32kHz crystal oscillator, and coin cell battery charger provide a
> highly integrated, small footprint power solution ideal for
> System-On-Module (SOM) applications. A spread spectrum feature
> provides an ease-of-use solution for noise-sensitive audio or RF
> applications.
> + reg:
> + maxItems: 2
> +
> + reg-names:
> + items:
> + - const: main
> + - const: rtc
> +required:
> + - compatible
> + - reg
> + - reg-names
Out of curiosity as much as anything else, why do you need reg-names if
the two registers are always required?
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-18 19:13 ` Conor Dooley
@ 2023-05-19 6:53 ` Biju Das
2023-05-19 14:10 ` Conor Dooley
0 siblings, 1 reply; 18+ messages in thread
From: Biju Das @ 2023-05-19 6:53 UTC (permalink / raw)
To: Conor Dooley
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Liam Girdwood,
Mark Brown, Geert Uytterhoeven, Magnus Damm,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Fabrizio Castro
Hi Conor,
Thanks for the feedback.
> Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> RAA215300 PMIC bindings
>
> On Thu, May 18, 2023 at 12:36:41PM +0100, Biju Das wrote:
> > Document Renesas RAA215300 PMIC bindings.
> >
> > The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
> > Memory, with Built-In Charger and RTC.
> >
> > It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power requirements.
> > The internally compensated regulators, built-in Real-Time Clock (RTC),
> > 32kHz crystal oscillator, and coin cell battery charger provide a
> > highly integrated, small footprint power solution ideal for
> > System-On-Module (SOM) applications. A spread spectrum feature
> > provides an ease-of-use solution for noise-sensitive audio or RF
> > applications.
> > + reg:
> > + maxItems: 2
> > +
> > + reg-names:
> > + items:
> > + - const: main
> > + - const: rtc
>
> > +required:
> > + - compatible
> > + - reg
> > + - reg-names
>
> Out of curiosity as much as anything else, why do you need reg-names if
> the two registers are always required?
The device has always 2 address spaces and "reg-names" provides a means
of clear differentiation compared to indices.
By enforcing "reg-names" as required property, dt can do some schema-validation
forcing users to specify "reg-names" in device tree.
Implementation wise, we use "rtc" for getting resource details while
creating the second i2c device which overrides the default address.
Strictly speaking reg-names is not required, but from a validation
perspective and since driver is using the same "resource-name" it is
better to have it??
Please share your thoughts.
Cheers,
Biju
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-19 6:53 ` Biju Das
@ 2023-05-19 14:10 ` Conor Dooley
2023-05-19 14:39 ` Biju Das
2023-05-19 14:58 ` Mark Brown
0 siblings, 2 replies; 18+ messages in thread
From: Conor Dooley @ 2023-05-19 14:10 UTC (permalink / raw)
To: Biju Das
Cc: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Liam Girdwood, Mark Brown, Geert Uytterhoeven, Magnus Damm,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Fabrizio Castro
[-- Attachment #1: Type: text/plain, Size: 2154 bytes --]
On Fri, May 19, 2023 at 06:53:03AM +0000, Biju Das wrote:
> > Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> > RAA215300 PMIC bindings
> >
> > On Thu, May 18, 2023 at 12:36:41PM +0100, Biju Das wrote:
> > > Document Renesas RAA215300 PMIC bindings.
> > >
> > > The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
> > > Memory, with Built-In Charger and RTC.
> > >
> > > It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power requirements.
> > > The internally compensated regulators, built-in Real-Time Clock (RTC),
> > > 32kHz crystal oscillator, and coin cell battery charger provide a
> > > highly integrated, small footprint power solution ideal for
> > > System-On-Module (SOM) applications. A spread spectrum feature
> > > provides an ease-of-use solution for noise-sensitive audio or RF
> > > applications.
> > > + reg:
> > > + maxItems: 2
> > > +
> > > + reg-names:
> > > + items:
> > > + - const: main
> > > + - const: rtc
> >
> > > +required:
> > > + - compatible
> > > + - reg
> > > + - reg-names
> >
> > Out of curiosity as much as anything else, why do you need reg-names if
> > the two registers are always required?
>
> The device has always 2 address spaces and "reg-names" provides a means
> of clear differentiation compared to indices.
>
> By enforcing "reg-names" as required property, dt can do some schema-validation
> forcing users to specify "reg-names" in device tree.
Is that not what we have the following for:
reg:
items:
- description: main register space...
- description: special sauce rtc stuff...
?
The schema validation doesn't stop them putting in the wrong address
either way!
> Implementation wise, we use "rtc" for getting resource details while
> creating the second i2c device which overrides the default address.
>
> Strictly speaking reg-names is not required, but from a validation
> perspective and since driver is using the same "resource-name" it is
> better to have it??
If the order is set by the descriptions, reg-names seem superfluous
/shrug
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-19 14:10 ` Conor Dooley
@ 2023-05-19 14:39 ` Biju Das
2023-05-19 14:49 ` Geert Uytterhoeven
2023-05-19 14:58 ` Mark Brown
1 sibling, 1 reply; 18+ messages in thread
From: Biju Das @ 2023-05-19 14:39 UTC (permalink / raw)
To: Conor Dooley
Cc: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Liam Girdwood, Mark Brown, Geert Uytterhoeven, Magnus Damm,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Fabrizio Castro
Hi Conor,
Thanks for the feedback.
> -----Original Message-----
> From: Conor Dooley <conor.dooley@microchip.com>
> Sent: Friday, May 19, 2023 3:10 PM
> To: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: Conor Dooley <conor@kernel.org>; Rob Herring <robh+dt@kernel.org>;
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
> <conor+dt@kernel.org>; Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
> <broonie@kernel.org>; Geert Uytterhoeven <geert+renesas@glider.be>;
> Magnus Damm <magnus.damm@gmail.com>; devicetree@vger.kernel.org; linux-
> renesas-soc@vger.kernel.org; Fabrizio Castro
> <fabrizio.castro.jz@renesas.com>
> Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> RAA215300 PMIC bindings
>
> On Fri, May 19, 2023 at 06:53:03AM +0000, Biju Das wrote:
> > > Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> > > RAA215300 PMIC bindings
> > >
> > > On Thu, May 18, 2023 at 12:36:41PM +0100, Biju Das wrote:
> > > > Document Renesas RAA215300 PMIC bindings.
> > > >
> > > > The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
> > > > Memory, with Built-In Charger and RTC.
> > > >
> > > > It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power
> requirements.
> > > > The internally compensated regulators, built-in Real-Time Clock
> > > > (RTC), 32kHz crystal oscillator, and coin cell battery charger
> > > > provide a highly integrated, small footprint power solution ideal
> > > > for System-On-Module (SOM) applications. A spread spectrum feature
> > > > provides an ease-of-use solution for noise-sensitive audio or RF
> > > > applications.
> > > > + reg:
> > > > + maxItems: 2
> > > > +
> > > > + reg-names:
> > > > + items:
> > > > + - const: main
> > > > + - const: rtc
> > >
> > > > +required:
> > > > + - compatible
> > > > + - reg
> > > > + - reg-names
> > >
> > > Out of curiosity as much as anything else, why do you need reg-names
> > > if the two registers are always required?
> >
> > The device has always 2 address spaces and "reg-names" provides a
> > means of clear differentiation compared to indices.
> >
> > By enforcing "reg-names" as required property, dt can do some
> > schema-validation forcing users to specify "reg-names" in device tree.
>
> Is that not what we have the following for:
> reg:
> items:
> - description: main register space...
> - description: special sauce rtc stuff...
> ?
OK, will add description.
>
> The schema validation doesn't stop them putting in the wrong address
> either way!
OK, will drop reg-names from required property.
>
> > Implementation wise, we use "rtc" for getting resource details while
> > creating the second i2c device which overrides the default address.
> >
> > Strictly speaking reg-names is not required, but from a validation
> > perspective and since driver is using the same "resource-name" it is
> > better to have it??
>
> If the order is set by the descriptions, reg-names seem superfluous
> /shrug
Agreed.
Cheers,
Biju
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-19 14:39 ` Biju Das
@ 2023-05-19 14:49 ` Geert Uytterhoeven
2023-05-19 14:52 ` Geert Uytterhoeven
2023-05-19 15:20 ` Conor Dooley
0 siblings, 2 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-05-19 14:49 UTC (permalink / raw)
To: Biju Das
Cc: Conor Dooley, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Liam Girdwood, Mark Brown, Geert Uytterhoeven,
Magnus Damm, devicetree@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, Fabrizio Castro
Hi Biju,
On Fri, May 19, 2023 at 4:39 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > -----Original Message-----
> > From: Conor Dooley <conor.dooley@microchip.com>
> > Sent: Friday, May 19, 2023 3:10 PM
> > To: Biju Das <biju.das.jz@bp.renesas.com>
> > Cc: Conor Dooley <conor@kernel.org>; Rob Herring <robh+dt@kernel.org>;
> > Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley
> > <conor+dt@kernel.org>; Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
> > <broonie@kernel.org>; Geert Uytterhoeven <geert+renesas@glider.be>;
> > Magnus Damm <magnus.damm@gmail.com>; devicetree@vger.kernel.org; linux-
> > renesas-soc@vger.kernel.org; Fabrizio Castro
> > <fabrizio.castro.jz@renesas.com>
> > Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> > RAA215300 PMIC bindings
> >
> > On Fri, May 19, 2023 at 06:53:03AM +0000, Biju Das wrote:
> > > > Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> > > > RAA215300 PMIC bindings
> > > >
> > > > On Thu, May 18, 2023 at 12:36:41PM +0100, Biju Das wrote:
> > > > > Document Renesas RAA215300 PMIC bindings.
> > > > >
> > > > > The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
> > > > > Memory, with Built-In Charger and RTC.
> > > > >
> > > > > It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power
> > requirements.
> > > > > The internally compensated regulators, built-in Real-Time Clock
> > > > > (RTC), 32kHz crystal oscillator, and coin cell battery charger
> > > > > provide a highly integrated, small footprint power solution ideal
> > > > > for System-On-Module (SOM) applications. A spread spectrum feature
> > > > > provides an ease-of-use solution for noise-sensitive audio or RF
> > > > > applications.
> > > > > + reg:
> > > > > + maxItems: 2
> > > > > +
> > > > > + reg-names:
> > > > > + items:
> > > > > + - const: main
> > > > > + - const: rtc
> > > >
> > > > > +required:
> > > > > + - compatible
> > > > > + - reg
> > > > > + - reg-names
> > > >
> > > > Out of curiosity as much as anything else, why do you need reg-names
> > > > if the two registers are always required?
> > >
> > > The device has always 2 address spaces and "reg-names" provides a
> > > means of clear differentiation compared to indices.
> > >
> > > By enforcing "reg-names" as required property, dt can do some
> > > schema-validation forcing users to specify "reg-names" in device tree.
> >
> > Is that not what we have the following for:
> > reg:
> > items:
> > - description: main register space...
> > - description: special sauce rtc stuff...
> > ?
>
> OK, will add description.
>
> >
> > The schema validation doesn't stop them putting in the wrong address
> > either way!
>
> OK, will drop reg-names from required property.
Please don't, as i2c_new_ancillary_device() does rely on the name
to set the address when overriding from the default.
> > > Implementation wise, we use "rtc" for getting resource details while
> > > creating the second i2c device which overrides the default address.
> > >
> > > Strictly speaking reg-names is not required, but from a validation
> > > perspective and since driver is using the same "resource-name" it is
> > > better to have it??
> >
> > If the order is set by the descriptions, reg-names seem superfluous
> > /shrug
We have plenty of these, as it turned out to be much easier for validation
to fix the order in the bindings than to support random order ;-)
Lots of Linux drivers that do use the names don't care about the order.
If all actual DTS used the same order, usually the order was fixed during
the text to json-schema conversion...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-19 14:49 ` Geert Uytterhoeven
@ 2023-05-19 14:52 ` Geert Uytterhoeven
2023-05-19 15:20 ` Conor Dooley
1 sibling, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-05-19 14:52 UTC (permalink / raw)
To: Biju Das
Cc: Conor Dooley, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Liam Girdwood, Mark Brown, Geert Uytterhoeven,
Magnus Damm, devicetree@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, Fabrizio Castro
On Fri, May 19, 2023 at 4:49 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Fri, May 19, 2023 at 4:39 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > From: Conor Dooley <conor.dooley@microchip.com>
> > > If the order is set by the descriptions, reg-names seem superfluous
> > > /shrug
>
> We have plenty of these, as it turned out to be much easier for validation
> to fix the order in the bindings than to support random order ;-)
> Lots of Linux drivers that do use the names don't care about the order.
> If all actual DTS used the same order, usually the order was fixed during
I meant "When all actual DTS...".
> the text to json-schema conversion...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-19 14:49 ` Geert Uytterhoeven
2023-05-19 14:52 ` Geert Uytterhoeven
@ 2023-05-19 15:20 ` Conor Dooley
1 sibling, 0 replies; 18+ messages in thread
From: Conor Dooley @ 2023-05-19 15:20 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Biju Das, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Liam Girdwood, Mark Brown, Geert Uytterhoeven,
Magnus Damm, devicetree@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, Fabrizio Castro
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
On Fri, May 19, 2023 at 04:49:44PM +0200, Geert Uytterhoeven wrote:
> On Fri, May 19, 2023 at 4:39 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > > -----Original Message-----
> > > From: Conor Dooley <conor.dooley@microchip.com>
> > > On Fri, May 19, 2023 at 06:53:03AM +0000, Biju Das wrote:
> > > > > Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> > > > > > +required:
> > > > > > + - compatible
> > > > > > + - reg
> > > > > > + - reg-names
> > > > >
> > > > > Out of curiosity as much as anything else, why do you need reg-names
> > > > > if the two registers are always required?
> > OK, will drop reg-names from required property.
>
> Please don't, as i2c_new_ancillary_device() does rely on the name
> to set the address when overriding from the default.
That looks like my answer! Thanks Geert & sorry for the noise here.
Modulo Geert's requested change, I think I owe you a
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Biju.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-19 14:10 ` Conor Dooley
2023-05-19 14:39 ` Biju Das
@ 2023-05-19 14:58 ` Mark Brown
1 sibling, 0 replies; 18+ messages in thread
From: Mark Brown @ 2023-05-19 14:58 UTC (permalink / raw)
To: Conor Dooley
Cc: Biju Das, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Liam Girdwood, Geert Uytterhoeven, Magnus Damm,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Fabrizio Castro
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
On Fri, May 19, 2023 at 03:10:25PM +0100, Conor Dooley wrote:
> On Fri, May 19, 2023 at 06:53:03AM +0000, Biju Das wrote:
> > By enforcing "reg-names" as required property, dt can do some schema-validation
> > forcing users to specify "reg-names" in device tree.
> Is that not what we have the following for:
> reg:
> items:
> - description: main register space...
> - description: special sauce rtc stuff...
> ?
> The schema validation doesn't stop them putting in the wrong address
> either way!
Being able to look things up by name does help make the code using the
binding more readable, and it helps with reading the DTs too.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-18 11:36 ` [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings Biju Das
2023-05-18 19:13 ` Conor Dooley
@ 2023-05-19 12:58 ` Geert Uytterhoeven
2023-05-19 16:49 ` Biju Das
1 sibling, 1 reply; 18+ messages in thread
From: Geert Uytterhoeven @ 2023-05-19 12:58 UTC (permalink / raw)
To: Biju Das
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Liam Girdwood,
Mark Brown, Geert Uytterhoeven, Magnus Damm, devicetree,
linux-renesas-soc, Fabrizio Castro
Hi Biju,
On Thu, May 18, 2023 at 1:37 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Document Renesas RAA215300 PMIC bindings.
>
> The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
> Memory, with Built-In Charger and RTC.
>
> It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power requirements.
> The internally compensated regulators, built-in Real-Time Clock (RTC),
> 32kHz crystal oscillator, and coin cell battery charger provide a
> highly integrated, small footprint power solution ideal for
> System-On-Module (SOM) applications. A spread spectrum feature
> provides an ease-of-use solution for noise-sensitive audio or RF
> applications.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v3->v4:
> * Moved bindings from mfd->regulator.
> * Dropped minItems from reg.
> * Dropped renesas,rtc-enabled property and instead used clock-names property
> to find RTC is enabled or not.
> * Added reg-names in required property.
> * Updated the example.
Thanks for your patch!
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/renesas,raa215300.yaml
> @@ -0,0 +1,84 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/renesas,raa215300.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RAA215300 Power Management Integrated Circuit (PMIC)
> +
> +maintainers:
> + - Biju Das <biju.das.jz@bp.renesas.com>
> +
> +description: |
> + The RAA215300 is a high-performance, low-cost 9-channel PMIC designed for
> + 32-bit and 64-bit MCU and MPU applications. It supports DDR3, DDR3L, DDR4,
> + and LPDDR4 memory power requirements. The internally compensated regulators,
> + built-in Real-Time Clock (RTC), 32kHz crystal oscillator, and coin cell
> + battery charger provide a highly integrated, small footprint power solution
> + ideal for System-On-Module (SOM) applications. A spread spectrum feature
> + provides an ease-of-use solution for noise-sensitive audio or RF applications.
> +
> + This device exposes two devices via I2C. One for the integrated RTC IP, and
> + one for everything else.
> +
> + Link to datasheet:
> + https://www.renesas.com/in/en/products/power-power-management/multi-channel-power-management-ics-pmics/ssdsoc-power-management-ics-pmic-and-pmus/raa215300-high-performance-9-channel-pmic-supporting-ddr-memory-built-charger-and-rtc
> +
> +properties:
> + compatible:
> + enum:
> + - renesas,raa215300
> +
> + reg:
> + maxItems: 2
> +
> + reg-names:
> + items:
> + - const: main
> + - const: rtc
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
Perhaps add a description to make it clear that not providing clocks
is supported, and means the RTC is disabled?
> +
> + clock-names:
> + description: |
> + Use xin, if connected to an external crystal.
> + Use clkin, if connected to an external clock signal.
> + oneOf:
> + - items:
> + - const: xin
> + - items:
> + - const: clkin
Please replace oneOf+items by enum.
> +
> +required:
> + - compatible
> + - reg
> + - reg-names
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings
2023-05-19 12:58 ` Geert Uytterhoeven
@ 2023-05-19 16:49 ` Biju Das
0 siblings, 0 replies; 18+ messages in thread
From: Biju Das @ 2023-05-19 16:49 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Liam Girdwood,
Mark Brown, Geert Uytterhoeven, Magnus Damm,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Fabrizio Castro
Hi Geert,
Thanks for the feedback.
> Subject: Re: [PATCH v4 09/11] regulator: dt-bindings: Add Renesas
> RAA215300 PMIC bindings
>
> Hi Biju,
>
> On Thu, May 18, 2023 at 1:37 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > Document Renesas RAA215300 PMIC bindings.
> >
> > The RAA215300 is a high Performance 9-Channel PMIC supporting DDR
> > Memory, with Built-In Charger and RTC.
> >
> > It supports DDR3, DDR3L, DDR4, and LPDDR4 memory power requirements.
> > The internally compensated regulators, built-in Real-Time Clock (RTC),
> > 32kHz crystal oscillator, and coin cell battery charger provide a
> > highly integrated, small footprint power solution ideal for
> > System-On-Module (SOM) applications. A spread spectrum feature
> > provides an ease-of-use solution for noise-sensitive audio or RF
> > applications.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v3->v4:
> > * Moved bindings from mfd->regulator.
> > * Dropped minItems from reg.
> > * Dropped renesas,rtc-enabled property and instead used clock-names
> property
> > to find RTC is enabled or not.
> > * Added reg-names in required property.
> > * Updated the example.
>
> Thanks for your patch!
>
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/regulator/renesas,raa215300.ya
> > +++ ml
> > @@ -0,0 +1,84 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2
> > +---
> > +$id:
> > +title: Renesas RAA215300 Power Management Integrated Circuit (PMIC)
> > +
> > +maintainers:
> > + - Biju Das <biju.das.jz@bp.renesas.com>
> > +
> > +description: |
> > + The RAA215300 is a high-performance, low-cost 9-channel PMIC
> > +designed for
> > + 32-bit and 64-bit MCU and MPU applications. It supports DDR3,
> > +DDR3L, DDR4,
> > + and LPDDR4 memory power requirements. The internally compensated
> > +regulators,
> > + built-in Real-Time Clock (RTC), 32kHz crystal oscillator, and coin
> > +cell
> > + battery charger provide a highly integrated, small footprint power
> > +solution
> > + ideal for System-On-Module (SOM) applications. A spread spectrum
> > +feature
> > + provides an ease-of-use solution for noise-sensitive audio or RF
> applications.
> > +
> > + This device exposes two devices via I2C. One for the integrated RTC
> > + IP, and one for everything else.
> > +
> > + Link to datasheet:
> > +
> > + https://www.renesas.com/in/en/products/power-power-management/multi-
> > + channel-power-management-ics-pmics/ssdsoc-power-management-ics-pmic-
> > + and-pmus/raa215300-high-performance-9-channel-pmic-supporting-ddr-me
> > + mory-built-charger-and-rtc
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - renesas,raa215300
> > +
> > + reg:
> > + maxItems: 2
> > +
> > + reg-names:
> > + items:
> > + - const: main
> > + - const: rtc
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
>
> Perhaps add a description to make it clear that not providing clocks is
> supported, and means the RTC is disabled?
Agreed.
>
> > +
> > + clock-names:
> > + description: |
> > + Use xin, if connected to an external crystal.
> > + Use clkin, if connected to an external clock signal.
> > + oneOf:
> > + - items:
> > + - const: xin
> > + - items:
> > + - const: clkin
>
> Please replace oneOf+items by enum.
OK.
Cheers,
Biju
>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - reg-names
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v4 11/11] arm64: dts: renesas: rzg2l-smarc-som: Enable PMIC and built-in RTC
2023-05-18 11:36 [PATCH v4 00/11] Add Renesas PMIC RAA215300 and built-in RTC support Biju Das
` (2 preceding siblings ...)
2023-05-18 11:36 ` [PATCH v4 09/11] regulator: dt-bindings: Add Renesas RAA215300 PMIC bindings Biju Das
@ 2023-05-18 11:36 ` Biju Das
3 siblings, 0 replies; 18+ messages in thread
From: Biju Das @ 2023-05-18 11:36 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc,
devicetree, Fabrizio Castro
Enable PMIC RAA215300 and the built-in RTC on the RZ/{G2L,V2L} SMARC
EVK.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v3->v4:
* Added clock nodes.
v2->v3:
* No change.
RFC->V2:
* Updated pmic device node based on the bindings.
---
.../boot/dts/renesas/rzg2l-smarc-som.dtsi | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
index fbbb4f03440b..801d1c1c5bc2 100644
--- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi
@@ -73,6 +73,13 @@ vccq_sdhi0: regulator-vccq-sdhi0 {
gpios = <&pinctrl RZG2L_GPIO(39, 0) GPIO_ACTIVE_HIGH>;
regulator-always-on;
};
+
+ /* 32.768kHz crystal */
+ x2: clock-xtal {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
};
&adc {
@@ -351,3 +358,14 @@ &wdt1 {
status = "okay";
timeout-sec = <60>;
};
+
+&i2c3 {
+ raa215300: pmic@12 {
+ compatible = "renesas,raa215300";
+ reg = <0x12>, <0x6f>;
+ reg-names = "main", "rtc";
+
+ clocks = <&x2>;
+ clock-names = "xin";
+ };
+};
--
2.25.1
^ permalink raw reply related [flat|nested] 18+ messages in thread