Path: blob/main/sys/contrib/device-tree/Bindings/devfreq/rk3399_dmc.txt
48375 views
* Rockchip rk3399 DMC (Dynamic Memory Controller) device12Required properties:3- compatible: Must be "rockchip,rk3399-dmc".4- devfreq-events: Node to get DDR loading, Refer to5Documentation/devicetree/bindings/devfreq/event/6rockchip-dfi.txt7- clocks: Phandles for clock specified in "clock-names" property8- clock-names : The name of clock used by the DFI, must be9"pclk_ddr_mon";10- operating-points-v2: Refer to Documentation/devicetree/bindings/opp/opp-v2.yaml11for details.12- center-supply: DMC supply node.13- status: Marks the node enabled/disabled.14- rockchip,pmu: Phandle to the syscon managing the "PMU general register15files".1617Optional properties:18- interrupts: The CPU interrupt number. The interrupt specifier19format depends on the interrupt controller.20It should be a DCF interrupt. When DDR DVFS finishes21a DCF interrupt is triggered.22- rockchip,pmu: Phandle to the syscon managing the "PMU general register23files".2425Following properties relate to DDR timing:2627- rockchip,dram_speed_bin : Value reference include/dt-bindings/clock/rk3399-ddr.h,28it selects the DDR3 cl-trp-trcd type. It must be29set according to "Speed Bin" in DDR3 datasheet,30DO NOT use a smaller "Speed Bin" than specified31for the DDR3 being used.3233- rockchip,pd_idle : Configure the PD_IDLE value. Defines the34power-down idle period in which memories are35placed into power-down mode if bus is idle36for PD_IDLE DFI clock cycles.3738- rockchip,sr_idle : Configure the SR_IDLE value. Defines the39self-refresh idle period in which memories are40placed into self-refresh mode if bus is idle41for SR_IDLE * 1024 DFI clock cycles (DFI42clocks freq is half of DRAM clock), default43value is "0".4445- rockchip,sr_mc_gate_idle : Defines the memory self-refresh and controller46clock gating idle period. Memories are placed47into self-refresh mode and memory controller48clock arg gating started if bus is idle for49sr_mc_gate_idle*1024 DFI clock cycles.5051- rockchip,srpd_lite_idle : Defines the self-refresh power down idle52period in which memories are placed into53self-refresh power down mode if bus is idle54for srpd_lite_idle * 1024 DFI clock cycles.55This parameter is for LPDDR4 only.5657- rockchip,standby_idle : Defines the standby idle period in which58memories are placed into self-refresh mode.59The controller, pi, PHY and DRAM clock will60be gated if bus is idle for standby_idle * DFI61clock cycles.6263- rockchip,dram_dll_dis_freq : Defines the DDR3 DLL bypass frequency in MHz.64When DDR frequency is less than DRAM_DLL_DISB_FREQ,65DDR3 DLL will be bypassed. Note: if DLL was bypassed,66the odt will also stop working.6768- rockchip,phy_dll_dis_freq : Defines the PHY dll bypass frequency in69MHz (Mega Hz). When DDR frequency is less than70DRAM_DLL_DISB_FREQ, PHY DLL will be bypassed.71Note: PHY DLL and PHY ODT are independent.7273- rockchip,ddr3_odt_dis_freq : When the DRAM type is DDR3, this parameter defines74the ODT disable frequency in MHz (Mega Hz).75when the DDR frequency is less then ddr3_odt_dis_freq,76the ODT on the DRAM side and controller side are77both disabled.7879- rockchip,ddr3_drv : When the DRAM type is DDR3, this parameter defines80the DRAM side driver strength in ohms. Default81value is 40.8283- rockchip,ddr3_odt : When the DRAM type is DDR3, this parameter defines84the DRAM side ODT strength in ohms. Default value85is 120.8687- rockchip,phy_ddr3_ca_drv : When the DRAM type is DDR3, this parameter defines88the phy side CA line (incluing command line,89address line and clock line) driver strength.90Default value is 40.9192- rockchip,phy_ddr3_dq_drv : When the DRAM type is DDR3, this parameter defines93the PHY side DQ line (including DQS/DQ/DM line)94driver strength. Default value is 40.9596- rockchip,phy_ddr3_odt : When the DRAM type is DDR3, this parameter defines97the PHY side ODT strength. Default value is 240.9899- rockchip,lpddr3_odt_dis_freq : When the DRAM type is LPDDR3, this parameter defines100then ODT disable frequency in MHz (Mega Hz).101When DDR frequency is less then ddr3_odt_dis_freq,102the ODT on the DRAM side and controller side are103both disabled.104105- rockchip,lpddr3_drv : When the DRAM type is LPDDR3, this parameter defines106the DRAM side driver strength in ohms. Default107value is 34.108109- rockchip,lpddr3_odt : When the DRAM type is LPDDR3, this parameter defines110the DRAM side ODT strength in ohms. Default value111is 240.112113- rockchip,phy_lpddr3_ca_drv : When the DRAM type is LPDDR3, this parameter defines114the PHY side CA line (including command line,115address line and clock line) driver strength.116Default value is 40.117118- rockchip,phy_lpddr3_dq_drv : When the DRAM type is LPDDR3, this parameter defines119the PHY side DQ line (including DQS/DQ/DM line)120driver strength. Default value is 40.121122- rockchip,phy_lpddr3_odt : When dram type is LPDDR3, this parameter define123the phy side odt strength, default value is 240.124125- rockchip,lpddr4_odt_dis_freq : When the DRAM type is LPDDR4, this parameter126defines the ODT disable frequency in127MHz (Mega Hz). When the DDR frequency is less then128ddr3_odt_dis_freq, the ODT on the DRAM side and129controller side are both disabled.130131- rockchip,lpddr4_drv : When the DRAM type is LPDDR4, this parameter defines132the DRAM side driver strength in ohms. Default133value is 60.134135- rockchip,lpddr4_dq_odt : When the DRAM type is LPDDR4, this parameter defines136the DRAM side ODT on DQS/DQ line strength in ohms.137Default value is 40.138139- rockchip,lpddr4_ca_odt : When the DRAM type is LPDDR4, this parameter defines140the DRAM side ODT on CA line strength in ohms.141Default value is 40.142143- rockchip,phy_lpddr4_ca_drv : When the DRAM type is LPDDR4, this parameter defines144the PHY side CA line (including command address145line) driver strength. Default value is 40.146147- rockchip,phy_lpddr4_ck_cs_drv : When the DRAM type is LPDDR4, this parameter defines148the PHY side clock line and CS line driver149strength. Default value is 80.150151- rockchip,phy_lpddr4_dq_drv : When the DRAM type is LPDDR4, this parameter defines152the PHY side DQ line (including DQS/DQ/DM line)153driver strength. Default value is 80.154155- rockchip,phy_lpddr4_odt : When the DRAM type is LPDDR4, this parameter defines156the PHY side ODT strength. Default value is 60.157158Example:159dmc_opp_table: dmc_opp_table {160compatible = "operating-points-v2";161162opp00 {163opp-hz = /bits/ 64 <300000000>;164opp-microvolt = <900000>;165};166opp01 {167opp-hz = /bits/ 64 <666000000>;168opp-microvolt = <900000>;169};170};171172dmc: dmc {173compatible = "rockchip,rk3399-dmc";174devfreq-events = <&dfi>;175interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;176clocks = <&cru SCLK_DDRC>;177clock-names = "dmc_clk";178operating-points-v2 = <&dmc_opp_table>;179center-supply = <&ppvar_centerlogic>;180upthreshold = <15>;181downdifferential = <10>;182rockchip,ddr3_speed_bin = <21>;183rockchip,pd_idle = <0x40>;184rockchip,sr_idle = <0x2>;185rockchip,sr_mc_gate_idle = <0x3>;186rockchip,srpd_lite_idle = <0x4>;187rockchip,standby_idle = <0x2000>;188rockchip,dram_dll_dis_freq = <300>;189rockchip,phy_dll_dis_freq = <125>;190rockchip,auto_pd_dis_freq = <666>;191rockchip,ddr3_odt_dis_freq = <333>;192rockchip,ddr3_drv = <40>;193rockchip,ddr3_odt = <120>;194rockchip,phy_ddr3_ca_drv = <40>;195rockchip,phy_ddr3_dq_drv = <40>;196rockchip,phy_ddr3_odt = <240>;197rockchip,lpddr3_odt_dis_freq = <333>;198rockchip,lpddr3_drv = <34>;199rockchip,lpddr3_odt = <240>;200rockchip,phy_lpddr3_ca_drv = <40>;201rockchip,phy_lpddr3_dq_drv = <40>;202rockchip,phy_lpddr3_odt = <240>;203rockchip,lpddr4_odt_dis_freq = <333>;204rockchip,lpddr4_drv = <60>;205rockchip,lpddr4_dq_odt = <40>;206rockchip,lpddr4_ca_odt = <40>;207rockchip,phy_lpddr4_ca_drv = <40>;208rockchip,phy_lpddr4_ck_cs_drv = <80>;209rockchip,phy_lpddr4_dq_drv = <80>;210rockchip,phy_lpddr4_odt = <60>;211};212213214