Re: [PATCH 4/5] ARC: AXS103: DTS: Set cpu frequency explicitly via dts
On Tue, 2017-08-22 at 14:40 -0700, Vineet Gupta wrote: > On 08/14/2017 09:12 AM, Eugeniy Paltsev wrote: > > Set cpu frequency explicitly via "cpu-freq" param in cpu 0 node > > in device tree. > > > > We add "cpu-freq" only to cpu 0 as all cpus are clocking from same > > clock source (same pll in our case). > > > > We override cpus node in skeleton as we don't need this change for > > nsim. > > Given that you added a generic feature as part of 1/5 - do other > platforms > abilis/nps need corresponding fixups as this one ! Actually no. If cpu 0 node don't have "cpu-freq" property we simply print cpu frequency and don't try to change it. So we can left other dts untouched. > > > > Signed-off-by: Eugeniy Paltsev > > --- > > arch/arc/boot/dts/axc003.dtsi | 13 + > > arch/arc/boot/dts/axc003_idu.dtsi | 35 > > +++ > > 2 files changed, 48 insertions(+) > > > > diff --git a/arch/arc/boot/dts/axc003.dtsi > > b/arch/arc/boot/dts/axc003.dtsi > > index dca7e39..7c7411c 100644 > > --- a/arch/arc/boot/dts/axc003.dtsi > > +++ b/arch/arc/boot/dts/axc003.dtsi > > @@ -17,6 +17,19 @@ > > #address-cells = <2>; > > #size-cells = <2>; > > > > + cpus { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + cpu@0 { > > + device_type = "cpu"; > > + compatible = "snps,archs38"; > > + reg = <0>; > > + cpu-freq = <1>; > > + clocks = <&core_clk>; > > + }; > > + }; > > + > > cpu_card { > > compatible = "simple-bus"; > > #address-cells = <1>; > > diff --git a/arch/arc/boot/dts/axc003_idu.dtsi > > b/arch/arc/boot/dts/axc003_idu.dtsi > > index 5b56bef..44bc01e 100644 > > --- a/arch/arc/boot/dts/axc003_idu.dtsi > > +++ b/arch/arc/boot/dts/axc003_idu.dtsi > > @@ -17,6 +17,41 @@ > > #address-cells = <2>; > > #size-cells = <2>; > > > > + cpus { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + /* > > + * "cpu-freq" was added only to cpu 0 as all cpus > > are clocking > > + * from same clock source (same pll (core_clk) in > > our case). > > + */ > > + cpu@0 { > > + device_type = "cpu"; > > + compatible = "snps,archs38"; > > + reg = <0>; > > + cpu-freq = <1>; > > + clocks = <&core_clk>; > > + }; > > + cpu@1 { > > + device_type = "cpu"; > > + compatible = "snps,archs38"; > > + reg = <1>; > > + clocks = <&core_clk>; > > + }; > > + cpu@2 { > > + device_type = "cpu"; > > + compatible = "snps,archs38"; > > + reg = <2>; > > + clocks = <&core_clk>; > > + }; > > + cpu@3 { > > + device_type = "cpu"; > > + compatible = "snps,archs38"; > > + reg = <3>; > > + clocks = <&core_clk>; > > + }; > > + }; > > + > > cpu_card { > > compatible = "simple-bus"; > > #address-cells = <1>; > > -- Eugeniy Paltsev ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH 3/5] ARC: AXS103: DTS: Add core pll node to manage cpu frequency
On Tue, 2017-08-22 at 13:45 -0700, Vineet Gupta wrote: > On 08/14/2017 09:12 AM, Eugeniy Paltsev wrote: > > Add core pll node (core_clk) to manage cpu frequency. > > core_clk represents pll itself. > > input_clk represents clock signal source (basically xtal) which > > comes to pll input. > > > > Signed-off-by: Eugeniy Paltsev > > --- > > arch/arc/boot/dts/axc003.dtsi | 11 +-- > > arch/arc/boot/dts/axc003_idu.dtsi | 11 +-- > > 2 files changed, 18 insertions(+), 4 deletions(-) > > > > diff --git a/arch/arc/boot/dts/axc003.dtsi > > b/arch/arc/boot/dts/axc003.dtsi > > index cc9239e..dca7e39 100644 > > --- a/arch/arc/boot/dts/axc003.dtsi > > +++ b/arch/arc/boot/dts/axc003.dtsi > > @@ -24,10 +24,17 @@ > > > > ranges = <0x 0x0 0xf000 0x1000>; > > > > - core_clk: core_clk { > > + input_clk: input-clk { > > #clock-cells = <0>; > > compatible = "fixed-clock"; > > - clock-frequency = <9000>; > > + clock-frequency = <>; > > + }; > > + > > + core_clk: core-clk@80 { > > + compatible = "snps,axs10x-arc-pll-clock"; > > + reg = <0x80 0x10>, <0x100 0x10>; > > + #clock-cells = <0>; > > + clocks = <&input_clk>; > > }; > > > > core_intc: archs-intc@cpu { > > diff --git a/arch/arc/boot/dts/axc003_idu.dtsi > > b/arch/arc/boot/dts/axc003_idu.dtsi > > index 4ebb2170..5b56bef 100644 > > --- a/arch/arc/boot/dts/axc003_idu.dtsi > > +++ b/arch/arc/boot/dts/axc003_idu.dtsi > > @@ -24,10 +24,17 @@ > > > > ranges = <0x 0x0 0xf000 0x1000>; > > > > - core_clk: core_clk { > > + input_clk: input-clk { > > #clock-cells = <0>; > > compatible = "fixed-clock"; > > - clock-frequency = <1>; > > + clock-frequency = <>; > > + }; > > + > > + core_clk: core-clk@80 { > > + compatible = "snps,axs10x-arc-pll-clock"; > > + reg = <0x80 0x10>, <0x100 0x10>; > > + #clock-cells = <0>; > > + clocks = <&input_clk>; > > }; > > > > core_intc: archs-intc@cpu { > > > Do we have a bisectability issue here - isn't system broken > temporarily at 2/5 - > and only 3/5 makes it work again - if so we need to squash them > together ! Could you please be more specific about this bisectability issue as I can't see it here. If we apply 2/5 and don't apply 3/5 we simply won't change frequency after linux boot. We won't increase frequency so I can't see any problem here here. --- The only problem I can see is in 4/5: I should use cpu-freq = <9000>; instead of cpu-freq = <1>; in arch/arc/boot/dts/axc003.dtsi So diff should be like --->8--- + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "snps,archs38"; + reg = <0>; + cpu-freq = <9000>; + clocks = <&core_clk>; + }; + }; + --->8--- Should I send you v2 respin or you'll fix that up locally? > -Vineet -- Eugeniy Paltsev ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH 4/5] ARC: AXS103: DTS: Set cpu frequency explicitly via dts
On 08/23/2017 04:24 AM, Eugeniy Paltsev wrote: Given that you added a generic feature as part of 1/5 - do other platforms abilis/nps need corresponding fixups as this one ! Actually no. If cpu 0 node don't have "cpu-freq" property we simply print cpu frequency and don't try to change it. So we can left other dts untouched. OK good. But to keep things consistent lets fix the rest of DTs, as needed, as a separate patch. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc