diff mbox series

[v1,1/3] dt-bindings: rtc: sophgo: add RTC for Sophgo CV1800 series SoC.

Message ID 20231229090643.116575-2-qiujingbao.dlmu@gmail.com
State Changes Requested
Headers show
Series dt-bindings: riscv: sophgo: add mfd RTC and power for CV1800 | expand

Commit Message

Jingbao Qiu Dec. 29, 2023, 9:06 a.m. UTC
Add devicetree binding to describe the RTC for Sophgo CV1800 SoC.

Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
---
This patch depends on the clk driver
Clk driver link:
https://lore.kernel.org/all/IA1PR20MB49539CDAD9A268CBF6CA184BBB9FA@IA1PR20MB4953.namprd20.prod.outlook.com/

 .../bindings/rtc/sophgo,cv1800-rtc.yaml       | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800-rtc.yaml

Comments

Krzysztof Kozlowski Jan. 4, 2024, 8:32 a.m. UTC | #1
On 29/12/2023 10:06, Jingbao Qiu wrote:
> Add devicetree binding to describe the RTC for Sophgo CV1800 SoC.
> 
> Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
> ---
> This patch depends on the clk driver
> Clk driver link:
> https://lore.kernel.org/all/IA1PR20MB49539CDAD9A268CBF6CA184BBB9FA@IA1PR20MB4953.namprd20.prod.outlook.com/

I don't understand how binding can depend on a driver. This is very
confusing and suggests you write binding for the driver, which is not
what we want.

What's more, I really do not see the dependency here, so your message is
incorrect?

> 
>  .../bindings/rtc/sophgo,cv1800-rtc.yaml       | 40 +++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800-rtc.yaml
> 

You have dependencies between patches, but I do not see this explained
at all. How people can figure out merging strategy if they are not aware
there is dependency?


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Jingbao Qiu Jan. 4, 2024, 10:34 a.m. UTC | #2
On Thu, Jan 4, 2024 at 4:32 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 29/12/2023 10:06, Jingbao Qiu wrote:
> > Add devicetree binding to describe the RTC for Sophgo CV1800 SoC.
> >
> > Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
> > ---
> > This patch depends on the clk driver
> > Clk driver link:
> > https://lore.kernel.org/all/IA1PR20MB49539CDAD9A268CBF6CA184BBB9FA@IA1PR20MB4953.namprd20.prod.outlook.com/
>
> I don't understand how binding can depend on a driver. This is very
> confusing and suggests you write binding for the driver, which is not
> what we want.
>
> What's more, I really do not see the dependency here, so your message is
> incorrect?
>

What I mean is that clk is used in the following example. In the clk
patch, there
is a macro definition that can be used to replace this number.

> >
> >  .../bindings/rtc/sophgo,cv1800-rtc.yaml       | 40 +++++++++++++++++++
> >  1 file changed, 40 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800-rtc.yaml
> >
>
> You have dependencies between patches, but I do not see this explained
> at all. How people can figure out merging strategy if they are not aware
> there is dependency?

I'm sorry for that, I will add an explanation in the description.

Happy new year!

Best regards,
Jingbao Qiu

>
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Jan. 4, 2024, 10:44 a.m. UTC | #3
On 04/01/2024 11:34, Jingbao Qiu wrote:
> On Thu, Jan 4, 2024 at 4:32 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 29/12/2023 10:06, Jingbao Qiu wrote:
>>> Add devicetree binding to describe the RTC for Sophgo CV1800 SoC.
>>>
>>> Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
>>> ---
>>> This patch depends on the clk driver
>>> Clk driver link:
>>> https://lore.kernel.org/all/IA1PR20MB49539CDAD9A268CBF6CA184BBB9FA@IA1PR20MB4953.namprd20.prod.outlook.com/
>>
>> I don't understand how binding can depend on a driver. This is very
>> confusing and suggests you write binding for the driver, which is not
>> what we want.
>>
>> What's more, I really do not see the dependency here, so your message is
>> incorrect?
>>
> 
> What I mean is that clk is used in the following example. In the clk
> patch, there
> is a macro definition that can be used to replace this number.

And how is this a dependency?


Best regards,
Krzysztof
Jingbao Qiu Jan. 4, 2024, 10:49 a.m. UTC | #4
On Thu, Jan 4, 2024 at 6:44 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 04/01/2024 11:34, Jingbao Qiu wrote:
> > On Thu, Jan 4, 2024 at 4:32 PM Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 29/12/2023 10:06, Jingbao Qiu wrote:
> >>> Add devicetree binding to describe the RTC for Sophgo CV1800 SoC.
> >>>
> >>> Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com>
> >>> ---
> >>> This patch depends on the clk driver
> >>> Clk driver link:
> >>> https://lore.kernel.org/all/IA1PR20MB49539CDAD9A268CBF6CA184BBB9FA@IA1PR20MB4953.namprd20.prod.outlook.com/
> >>
> >> I don't understand how binding can depend on a driver. This is very
> >> confusing and suggests you write binding for the driver, which is not
> >> what we want.
> >>
> >> What's more, I really do not see the dependency here, so your message is
> >> incorrect?
> >>
> >
> > What I mean is that clk is used in the following example. In the clk
> > patch, there
> > is a macro definition that can be used to replace this number.
>
> And how is this a dependency?

Thanks. I will drop it.

Best regards,
Jingbao Qiu

>
>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/rtc/sophgo,cv1800-rtc.yaml b/Documentation/devicetree/bindings/rtc/sophgo,cv1800-rtc.yaml
new file mode 100644
index 000000000000..595d3289b183
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/sophgo,cv1800-rtc.yaml
@@ -0,0 +1,40 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/sophgo,cv1800-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Real Time Clock of the Sophgo CV1800 SoC
+
+maintainers:
+  - Jingbao Qiu <qiujingbao.dlmu@gmail.com>
+
+allOf:
+  - $ref: rtc.yaml#
+
+properties:
+  compatible:
+    const: sophgo,cv1800-rtc
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    rtc {
+      compatible = "sophgo,cv1800-rtc";
+      interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+      clocks = <&clk 15>;
+    };