Message ID | 20231121094642.2973795-2-qiujingbao.dlmu@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | riscv: sophgo: add rtc support for CV1800B | expand |
On 21/11/2023 10:46, Jingbao Qiu wrote: > Add devicetree binding for Sophgo CV1800B SoC rtc controller. A nit, subject: drop second/last, redundant "binding for". The "dt-bindings" prefix is already stating that these are bindings. > > Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com> > --- > .../bindings/rtc/sophgo,cv1800b-rtc.yaml | 37 +++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml > > diff --git a/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml b/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml > new file mode 100644 > index 000000000000..fefb1e70c45c > --- /dev/null > +++ b/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml > @@ -0,0 +1,37 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/rtc/sophgo,cv1800b-rtc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Sophgo CV1800B SoC RTC Controller What is a RTC Controller? You have multiple RTCs there? > + > +maintainers: > + - Jingbao Qiu <qiujingbao.dlmu@gmail.com> > + Missing ref to rtc.yaml. Unless it is not applicable but then why? > +properties: > + compatible: > + enum: > + - sophgo,cv1800b-rtc Blank line > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - interrupts > + > +additionalProperties: false unevaluatedProperties instead > + > +examples: > + - | > + rtc-controller@05026000{ The names is always "rtc", unless this is not RTC. If it isn't, please add full description of the hardware. > + compatible = "sophgo,cv800b-rtc"; > + reg = <0x05026000 0x1000>; > + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-parent = <&plic0>; > + clocks = <&osc>; Why do you send untested bindings? Review costs significant amount of effort. Code was also not compiled? Warnings not fixed? Best regards, Krzysztof
On Tue, 21 Nov 2023 17:46:40 +0800, Jingbao Qiu wrote: > Add devicetree binding for Sophgo CV1800B SoC rtc controller. > > Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com> > --- > .../bindings/rtc/sophgo,cv1800b-rtc.yaml | 37 +++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Error: Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.example.dts:27.28-29 syntax error FATAL ERROR: Unable to parse input tree make[2]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1424: dt_binding_check] Error 2 make: *** [Makefile:234: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231121094642.2973795-2-qiujingbao.dlmu@gmail.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Tue, Nov 21, 2023 at 5:57 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 21/11/2023 10:46, Jingbao Qiu wrote: > > Add devicetree binding for Sophgo CV1800B SoC rtc controller. > > A nit, subject: drop second/last, redundant "binding for". The > "dt-bindings" prefix is already stating that these are bindings. will fix. > > > > > Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com> > > --- > > .../bindings/rtc/sophgo,cv1800b-rtc.yaml | 37 +++++++++++++++++++ > > 1 file changed, 37 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml > > > > diff --git a/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml b/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml > > new file mode 100644 > > index 000000000000..fefb1e70c45c > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml > > @@ -0,0 +1,37 @@ > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/rtc/sophgo,cv1800b-rtc.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Sophgo CV1800B SoC RTC Controller > > What is a RTC Controller? You have multiple RTCs there? > will drop "Controller", as I think RTC is not something like I2C, eMMC, USB, which have the "controller <-> client/device" model. > > + > > +maintainers: > > + - Jingbao Qiu <qiujingbao.dlmu@gmail.com> > > + > > Missing ref to rtc.yaml. Unless it is not applicable but then why? ok, I should ref this file. > > > +properties: > > + compatible: > > + enum: > > + - sophgo,cv1800b-rtc > > Blank line ok > > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + > > +additionalProperties: false > > unevaluatedProperties instead will fix . > > > + > > +examples: > > + - | > > + rtc-controller@05026000{ > > The names is always "rtc", unless this is not RTC. If it isn't, please > add full description of the hardware. I will use "rtc" replace "rtc-controller" . > > > + compatible = "sophgo,cv800b-rtc"; > > + reg = <0x05026000 0x1000>; > > + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; > > + interrupt-parent = <&plic0>; > > + clocks = <&osc>; > > Why do you send untested bindings? Review costs significant amount of > effort. Code was also not compiled? Warnings not fixed? I will check it. Leading 0 and referencing issues will be fixed. > > Best regards, > Krzysztof > I'm sorry for taking so long to reply. I took a few days off due to being infected with the flu. Thank you again for your patient reply. Best regards, Jingbao Qiu
diff --git a/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml b/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml new file mode 100644 index 000000000000..fefb1e70c45c --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/sophgo,cv1800b-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo CV1800B SoC RTC Controller + +maintainers: + - Jingbao Qiu <qiujingbao.dlmu@gmail.com> + +properties: + compatible: + enum: + - sophgo,cv1800b-rtc + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + rtc-controller@05026000{ + compatible = "sophgo,cv800b-rtc"; + reg = <0x05026000 0x1000>; + interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&plic0>; + clocks = <&osc>; + };
Add devicetree binding for Sophgo CV1800B SoC rtc controller. Signed-off-by: Jingbao Qiu <qiujingbao.dlmu@gmail.com> --- .../bindings/rtc/sophgo,cv1800b-rtc.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/sophgo,cv1800b-rtc.yaml