Re: [PATCH v7 5/5] arm64: dts: imx8m: Add ddr controller nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-11-28 4:43 PM, Adam Ford wrote:
> On Fri, Nov 22, 2019 at 3:46 PM Leonard Crestez <leonard.crestez@xxxxxxx> wrote:
>>
>> This is used by the imx-ddrc devfreq driver to implement dynamic
>> frequency scaling of DRAM.
>>
>> Support for proactive scaling via interconnect will come later. The
>> high-performance bus masters which need that (display, vpu, gpu) are
>> mostly not yet enabled in upstream anyway.
>>
>> Signed-off-by: Leonard Crestez <leonard.crestez@xxxxxxx>
>> ---
>>   arch/arm64/boot/dts/freescale/imx8mm-evk.dts  | 18 ++++++++++++++
>>   arch/arm64/boot/dts/freescale/imx8mm.dtsi     | 10 ++++++++
>>   .../boot/dts/freescale/imx8mn-ddr4-evk.dts    | 18 ++++++++++++++
>>   arch/arm64/boot/dts/freescale/imx8mn.dtsi     | 10 ++++++++
>>   arch/arm64/boot/dts/freescale/imx8mq-evk.dts  | 24 +++++++++++++++++++
>>   arch/arm64/boot/dts/freescale/imx8mq.dtsi     | 10 ++++++++
>>   6 files changed, 90 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
>> index 28ab17a277bb..ecf0d385c164 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
>> +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dts
>> @@ -75,10 +75,28 @@
>>
>>   &A53_0 {
>>          cpu-supply = <&buck2_reg>;
>>   };
>>
>> +&ddrc {
>> +       operating-points-v2 = <&ddrc_opp_table>;
>> +
>> +       ddrc_opp_table: opp-table {
>> +               compatible = "operating-points-v2";
>> +
>> +               opp-25M {
>> +                       opp-hz = /bits/ 64 <25000000>;
>> +               };
>> +               opp-100M {
>> +                       opp-hz = /bits/ 64 <100000000>;
>> +               };
>> +               opp-750M {
>> +                       opp-hz = /bits/ 64 <750000000>;
>> +               };
>> +       };
>> +};
> 
> The SoC's device tree has the opp for the SoC.  Since the SoC also has
> the DDR controller, why not put the opp for the DDR into the SoC's
> device tree set for its maximum rates.  If the individual boards need
> to change them, they can do it on a case-by-case basis.
> 
> As more and more people add devices based on imx8m q/m/n, I can
> imaging a lot of these entries will be duplicated if they base their
> design on the reference evk for their respective SoC.

The OPPs can vary from board to board for the same SoC. For example ddr4 
and lpddr4 variants of the NXP evk boards have different setpoints.

If a default set was included in soc dtsi then some boards would end up 
having to use /delete-node/ and I wanted to avoid that. Last I check 
that feature wasn't even officially documented for dtc?

Perhaps this could be revisited if it ends up being duplicated on many 
boards.

--
Regards,
Leonard




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux