Message ID | 20241224092310.3814460-1-kever.yang@rock-chips.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | [v2,1/3] dt-bindings: clock: add rk3562 cru bindings | expand |
On Tue, Dec 24, 2024 at 05:23:08PM +0800, Kever Yang wrote: > Document the device tree bindings of the rockchip rk3562 SoC > clock and reset unit. > > Signed-off-by: Kever Yang <kever.yang@rock-chips.com> > --- A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also: https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 s/rk3562/Rocchip RK3562/ or whatever your proper name is (and use proper capitalized parts of products) > +properties: > + compatible: > + const: rockchip,rk3562-cru > + > + reg: > + maxItems: 1 > + > + "#clock-cells": > + const: 1 > + > + "#reset-cells": > + const: 1 > + > + clocks: > + maxItems: 2 Why clocks are not required? > + > + clock-names: > + items: > + - const: xin24m > + - const: xin32k > + > +required: > + - compatible > + - reg > + - "#clock-cells" > + - "#reset-cells" > + > +additionalProperties: false > + > +examples: > + - | > + clock-controller@ff100000 { > + compatible = "rockchip,rk3562-cru"; > + reg = <0xff100000 0x40000>; > + #clock-cells = <1>; > + #reset-cells = <1>; Why clocks are not here? Best regards, Krzysztof
Hi Krzysztof, On 2024/12/27 16:25, Krzysztof Kozlowski wrote: > On Tue, Dec 24, 2024 at 05:23:08PM +0800, Kever Yang wrote: >> Document the device tree bindings of the rockchip rk3562 SoC >> clock and reset unit. >> >> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> >> --- > A nit, subject: drop second/last, redundant "bindings". The > "dt-bindings" prefix is already stating that these are bindings. > See also: > https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 > > > s/rk3562/Rocchip RK3562/ > or whatever your proper name is (and use proper capitalized parts of > products) Will update. > >> +properties: >> + compatible: >> + const: rockchip,rk3562-cru >> + >> + reg: >> + maxItems: 1 >> + >> + "#clock-cells": >> + const: 1 >> + >> + "#reset-cells": >> + const: 1 >> + >> + clocks: >> + maxItems: 2 > > Why clocks are not required? The cru is the clock-controller, which is always on module in SoC, so we don't need to enable "clock" for this clock-controller. Thanks, - Kever > >> + >> + clock-names: >> + items: >> + - const: xin24m >> + - const: xin32k >> + >> +required: >> + - compatible >> + - reg >> + - "#clock-cells" >> + - "#reset-cells" >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + clock-controller@ff100000 { >> + compatible = "rockchip,rk3562-cru"; >> + reg = <0xff100000 0x40000>; >> + #clock-cells = <1>; >> + #reset-cells = <1>; > Why clocks are not here? > > Best regards, > Krzysztof > >
Am Montag, 24. Februar 2025, 09:52:12 MEZ schrieb Kever Yang: > Hi Krzysztof, > > On 2024/12/27 16:25, Krzysztof Kozlowski wrote: > > On Tue, Dec 24, 2024 at 05:23:08PM +0800, Kever Yang wrote: > >> Document the device tree bindings of the rockchip rk3562 SoC > >> clock and reset unit. > >> > >> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> > >> --- > > A nit, subject: drop second/last, redundant "bindings". The > > "dt-bindings" prefix is already stating that these are bindings. > > See also: > > https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 > > > > > > s/rk3562/Rocchip RK3562/ > > or whatever your proper name is (and use proper capitalized parts of > > products) > Will update. > > > >> +properties: > >> + compatible: > >> + const: rockchip,rk3562-cru > >> + > >> + reg: > >> + maxItems: 1 > >> + > >> + "#clock-cells": > >> + const: 1 > >> + > >> + "#reset-cells": > >> + const: 1 > >> + > >> + clocks: > >> + maxItems: 2 > > > > Why clocks are not required? > The cru is the clock-controller, which is always on module in SoC, > so we don't need to enable "clock" for this clock-controller. hmm, shouldn't clocks be clocks: minItems: 1 maxItems: 2 The CRU _needs_ the xin24m because that is the main oscillator supplying everything, but _can_ work work without xin32k . Sidenote: itseems we're doing this wrong on rk3588 Heiko
On 24/02/2025 10:05, Heiko Stübner wrote: > Am Montag, 24. Februar 2025, 09:52:12 MEZ schrieb Kever Yang: >> Hi Krzysztof, >> >> On 2024/12/27 16:25, Krzysztof Kozlowski wrote: >>> On Tue, Dec 24, 2024 at 05:23:08PM +0800, Kever Yang wrote: >>>> Document the device tree bindings of the rockchip rk3562 SoC >>>> clock and reset unit. >>>> >>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> >>>> --- >>> A nit, subject: drop second/last, redundant "bindings". The >>> "dt-bindings" prefix is already stating that these are bindings. >>> See also: >>> https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 >>> >>> >>> s/rk3562/Rocchip RK3562/ >>> or whatever your proper name is (and use proper capitalized parts of >>> products) >> Will update. >>> >>>> +properties: >>>> + compatible: >>>> + const: rockchip,rk3562-cru >>>> + >>>> + reg: >>>> + maxItems: 1 >>>> + >>>> + "#clock-cells": >>>> + const: 1 >>>> + >>>> + "#reset-cells": >>>> + const: 1 >>>> + >>>> + clocks: >>>> + maxItems: 2 >>> >>> Why clocks are not required? >> The cru is the clock-controller, which is always on module in SoC, >> so we don't need to enable "clock" for this clock-controller. > > hmm, shouldn't clocks be > > clocks: > minItems: 1 > maxItems: 2 > > The CRU _needs_ the xin24m because that is the main oscillator > supplying everything, but _can_ work work without xin32k . > > Sidenote: itseems we're doing this wrong on rk3588 Kever responded to a review 2 months ago. None of these emails are in my inbox anymore. All context is gone as well. No, I expect the comments to be applied full in such case. This is a bit ridicilous that now I need to look for that email somwhere to check whether implementation follows received response. Response after 2 months! > > Heiko > > Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3562-cru.yaml b/Documentation/devicetree/bindings/clock/rockchip,rk3562-cru.yaml new file mode 100644 index 000000000000..36a353f5c42a --- /dev/null +++ b/Documentation/devicetree/bindings/clock/rockchip,rk3562-cru.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/rockchip,rk3562-cru.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip rk3562 Clock and Reset Control Module + +maintainers: + - Elaine Zhang <zhangqing@rock-chips.com> + - Heiko Stuebner <heiko@sntech.de> + +description: + The RK3562 clock controller generates the clock and also implements a reset + controller for SoC peripherals. For example it provides SCLK_UART2 and + PCLK_UART2, as well as SRST_P_UART2 and SRST_S_UART2 for the second UART + module. + +properties: + compatible: + const: rockchip,rk3562-cru + + reg: + maxItems: 1 + + "#clock-cells": + const: 1 + + "#reset-cells": + const: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: xin24m + - const: xin32k + +required: + - compatible + - reg + - "#clock-cells" + - "#reset-cells" + +additionalProperties: false + +examples: + - | + clock-controller@ff100000 { + compatible = "rockchip,rk3562-cru"; + reg = <0xff100000 0x40000>; + #clock-cells = <1>; + #reset-cells = <1>; + };
Document the device tree bindings of the rockchip rk3562 SoC clock and reset unit. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> --- Changes in v2: - remove rockchip,grf info .../bindings/clock/rockchip,rk3562-cru.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3562-cru.yaml