Path: blob/main/sys/contrib/device-tree/Bindings/devfreq/exynos-bus.txt
48378 views
* Generic Exynos Bus frequency device12The Samsung Exynos SoC has many buses for data transfer between DRAM3and sub-blocks in SoC. Most Exynos SoCs share the common architecture4for buses. Generally, each bus of Exynos SoC includes a source clock5and a power line, which are able to change the clock frequency6of the bus in runtime. To monitor the usage of each bus in runtime,7the driver uses the PPMU (Platform Performance Monitoring Unit), which8is able to measure the current load of sub-blocks.910The Exynos SoC includes the various sub-blocks which have the each AXI bus.11The each AXI bus has the owned source clock but, has not the only owned12power line. The power line might be shared among one more sub-blocks.13So, we can divide into two type of device as the role of each sub-block.14There are two type of bus devices as following:15- parent bus device16- passive bus device1718Basically, parent and passive bus device share the same power line.19The parent bus device can only change the voltage of shared power line20and the rest bus devices (passive bus device) depend on the decision of21the parent bus device. If there are three blocks which share the VDD_xxx22power line, Only one block should be parent device and then the rest blocks23should depend on the parent device as passive device.2425VDD_xxx |--- A block (parent)26|--- B block (passive)27|--- C block (passive)2829There are a little different composition among Exynos SoC because each Exynos30SoC has different sub-blocks. Therefore, such difference should be specified31in devicetree file instead of each device driver. In result, this driver32is able to support the bus frequency for all Exynos SoCs.3334Required properties for all bus devices:35- compatible: Should be "samsung,exynos-bus".36- clock-names : the name of clock used by the bus, "bus".37- clocks : phandles for clock specified in "clock-names" property.38- operating-points-v2: the OPP table including frequency/voltage information39to support DVFS (Dynamic Voltage/Frequency Scaling) feature.4041Required properties only for parent bus device:42- vdd-supply: the regulator to provide the buses with the voltage.43- devfreq-events: the devfreq-event device to monitor the current utilization44of buses.4546Required properties only for passive bus device:47- devfreq: the parent bus device.4849Optional properties only for parent bus device:50- exynos,saturation-ratio: the percentage value which is used to calibrate51the performance count against total cycle count.5253Optional properties for the interconnect functionality (QoS frequency54constraints):55- #interconnect-cells: should be 0.56- interconnects: as documented in ../interconnect.txt, describes a path at the57higher level interconnects used by this interconnect provider.58If this interconnect provider is directly linked to a top level interconnect59provider the property contains only one phandle. The provider extends60the interconnect graph by linking its node to a node registered by provider61pointed to by first phandle in the 'interconnects' property.6263- samsung,data-clock-ratio: ratio of the data throughput in B/s to minimum data64clock frequency in Hz, default value is 8 when this property is missing.6566Detailed correlation between sub-blocks and power line according to Exynos SoC:67- In case of Exynos3250, there are two power line as following:68VDD_MIF |--- DMC6970VDD_INT |--- LEFTBUS (parent device)71|--- PERIL72|--- MFC73|--- G3D74|--- RIGHTBUS75|--- PERIR76|--- FSYS77|--- LCD078|--- PERIR79|--- ISP80|--- CAM8182- In case of Exynos4210, there is one power line as following:83VDD_INT |--- DMC (parent device)84|--- LEFTBUS85|--- PERIL86|--- MFC(L)87|--- G3D88|--- TV89|--- LCD090|--- RIGHTBUS91|--- PERIR92|--- MFC(R)93|--- CAM94|--- FSYS95|--- GPS96|--- LCD097|--- LCD19899- In case of Exynos4x12, there are two power line as following:100VDD_MIF |--- DMC101102VDD_INT |--- LEFTBUS (parent device)103|--- PERIL104|--- MFC(L)105|--- G3D106|--- TV107|--- IMAGE108|--- RIGHTBUS109|--- PERIR110|--- MFC(R)111|--- CAM112|--- FSYS113|--- GPS114|--- LCD0115|--- ISP116117- In case of Exynos5422, there are two power line as following:118VDD_MIF |--- DREX 0 (parent device, DRAM EXpress controller)119|--- DREX 1120121VDD_INT |--- NoC_Core (parent device)122|--- G2D123|--- G3D124|--- DISP1125|--- NoC_WCORE126|--- GSCL127|--- MSCL128|--- ISP129|--- MFC130|--- GEN131|--- PERIS132|--- PERIC133|--- FSYS134|--- FSYS2135136- In case of Exynos5433, there is VDD_INT power line as following:137VDD_INT |--- G2D (parent device)138|--- MSCL139|--- GSCL140|--- JPEG141|--- MFC142|--- HEVC143|--- BUS0144|--- BUS1145|--- BUS2146|--- PERIS (Fixed clock rate)147|--- PERIC (Fixed clock rate)148|--- FSYS (Fixed clock rate)149150Example 1:151Show the AXI buses of Exynos3250 SoC. Exynos3250 divides the buses to152power line (regulator). The MIF (Memory Interface) AXI bus is used to153transfer data between DRAM and CPU and uses the VDD_MIF regulator.154155- MIF (Memory Interface) block156: VDD_MIF |--- DMC (Dynamic Memory Controller)157158- INT (Internal) block159: VDD_INT |--- LEFTBUS (parent device)160|--- PERIL161|--- MFC162|--- G3D163|--- RIGHTBUS164|--- FSYS165|--- LCD0166|--- PERIR167|--- ISP168|--- CAM169170- MIF bus's frequency/voltage table171-----------------------172|Lv| Freq | Voltage |173-----------------------174|L1| 50000 |800000 |175|L2| 100000 |800000 |176|L3| 134000 |800000 |177|L4| 200000 |825000 |178|L5| 400000 |875000 |179-----------------------180181- INT bus's frequency/voltage table182----------------------------------------------------------183|Block|LEFTBUS|RIGHTBUS|MCUISP |ISP |PERIL ||VDD_INT |184| name| |LCD0 | | | || |185| | |FSYS | | | || |186| | |MFC | | | || |187----------------------------------------------------------188|Mode |*parent|passive |passive|passive|passive|| |189----------------------------------------------------------190|Lv |Frequency ||Voltage |191----------------------------------------------------------192|L1 |50000 |50000 |50000 |50000 |50000 ||900000 |193|L2 |80000 |80000 |80000 |80000 |80000 ||900000 |194|L3 |100000 |100000 |100000 |100000 |100000 ||1000000 |195|L4 |134000 |134000 |200000 |200000 | ||1000000 |196|L5 |200000 |200000 |400000 |300000 | ||1000000 |197----------------------------------------------------------198199Example 2:200The bus of DMC (Dynamic Memory Controller) block in exynos3250.dtsi201is listed below:202203bus_dmc: bus_dmc {204compatible = "samsung,exynos-bus";205clocks = <&cmu_dmc CLK_DIV_DMC>;206clock-names = "bus";207operating-points-v2 = <&bus_dmc_opp_table>;208status = "disabled";209};210211bus_dmc_opp_table: opp_table1 {212compatible = "operating-points-v2";213opp-shared;214215opp-50000000 {216opp-hz = /bits/ 64 <50000000>;217opp-microvolt = <800000>;218};219opp-100000000 {220opp-hz = /bits/ 64 <100000000>;221opp-microvolt = <800000>;222};223opp-134000000 {224opp-hz = /bits/ 64 <134000000>;225opp-microvolt = <800000>;226};227opp-200000000 {228opp-hz = /bits/ 64 <200000000>;229opp-microvolt = <825000>;230};231opp-400000000 {232opp-hz = /bits/ 64 <400000000>;233opp-microvolt = <875000>;234};235};236237bus_leftbus: bus_leftbus {238compatible = "samsung,exynos-bus";239clocks = <&cmu CLK_DIV_GDL>;240clock-names = "bus";241operating-points-v2 = <&bus_leftbus_opp_table>;242status = "disabled";243};244245bus_rightbus: bus_rightbus {246compatible = "samsung,exynos-bus";247clocks = <&cmu CLK_DIV_GDR>;248clock-names = "bus";249operating-points-v2 = <&bus_leftbus_opp_table>;250status = "disabled";251};252253bus_lcd0: bus_lcd0 {254compatible = "samsung,exynos-bus";255clocks = <&cmu CLK_DIV_ACLK_160>;256clock-names = "bus";257operating-points-v2 = <&bus_leftbus_opp_table>;258status = "disabled";259};260261bus_fsys: bus_fsys {262compatible = "samsung,exynos-bus";263clocks = <&cmu CLK_DIV_ACLK_200>;264clock-names = "bus";265operating-points-v2 = <&bus_leftbus_opp_table>;266status = "disabled";267};268269bus_mcuisp: bus_mcuisp {270compatible = "samsung,exynos-bus";271clocks = <&cmu CLK_DIV_ACLK_400_MCUISP>;272clock-names = "bus";273operating-points-v2 = <&bus_mcuisp_opp_table>;274status = "disabled";275};276277bus_isp: bus_isp {278compatible = "samsung,exynos-bus";279clocks = <&cmu CLK_DIV_ACLK_266>;280clock-names = "bus";281operating-points-v2 = <&bus_isp_opp_table>;282status = "disabled";283};284285bus_peril: bus_peril {286compatible = "samsung,exynos-bus";287clocks = <&cmu CLK_DIV_ACLK_100>;288clock-names = "bus";289operating-points-v2 = <&bus_peril_opp_table>;290status = "disabled";291};292293bus_mfc: bus_mfc {294compatible = "samsung,exynos-bus";295clocks = <&cmu CLK_SCLK_MFC>;296clock-names = "bus";297operating-points-v2 = <&bus_leftbus_opp_table>;298status = "disabled";299};300301bus_leftbus_opp_table: opp_table1 {302compatible = "operating-points-v2";303opp-shared;304305opp-50000000 {306opp-hz = /bits/ 64 <50000000>;307opp-microvolt = <900000>;308};309opp-80000000 {310opp-hz = /bits/ 64 <80000000>;311opp-microvolt = <900000>;312};313opp-100000000 {314opp-hz = /bits/ 64 <100000000>;315opp-microvolt = <1000000>;316};317opp-134000000 {318opp-hz = /bits/ 64 <134000000>;319opp-microvolt = <1000000>;320};321opp-200000000 {322opp-hz = /bits/ 64 <200000000>;323opp-microvolt = <1000000>;324};325};326327bus_mcuisp_opp_table: opp_table2 {328compatible = "operating-points-v2";329opp-shared;330331opp-50000000 {332opp-hz = /bits/ 64 <50000000>;333};334opp-80000000 {335opp-hz = /bits/ 64 <80000000>;336};337opp-100000000 {338opp-hz = /bits/ 64 <100000000>;339};340opp-200000000 {341opp-hz = /bits/ 64 <200000000>;342};343opp-400000000 {344opp-hz = /bits/ 64 <400000000>;345};346};347348bus_isp_opp_table: opp_table3 {349compatible = "operating-points-v2";350opp-shared;351352opp-50000000 {353opp-hz = /bits/ 64 <50000000>;354};355opp-80000000 {356opp-hz = /bits/ 64 <80000000>;357};358opp-100000000 {359opp-hz = /bits/ 64 <100000000>;360};361opp-200000000 {362opp-hz = /bits/ 64 <200000000>;363};364opp-300000000 {365opp-hz = /bits/ 64 <300000000>;366};367};368369bus_peril_opp_table: opp_table4 {370compatible = "operating-points-v2";371opp-shared;372373opp-50000000 {374opp-hz = /bits/ 64 <50000000>;375};376opp-80000000 {377opp-hz = /bits/ 64 <80000000>;378};379opp-100000000 {380opp-hz = /bits/ 64 <100000000>;381};382};383384385Usage case to handle the frequency and voltage of bus on runtime386in exynos3250-rinato.dts is listed below:387388&bus_dmc {389devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;390vdd-supply = <&buck1_reg>; /* VDD_MIF */391status = "okay";392};393394&bus_leftbus {395devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;396vdd-supply = <&buck3_reg>;397status = "okay";398};399400&bus_rightbus {401devfreq = <&bus_leftbus>;402status = "okay";403};404405&bus_lcd0 {406devfreq = <&bus_leftbus>;407status = "okay";408};409410&bus_fsys {411devfreq = <&bus_leftbus>;412status = "okay";413};414415&bus_mcuisp {416devfreq = <&bus_leftbus>;417status = "okay";418};419420&bus_isp {421devfreq = <&bus_leftbus>;422status = "okay";423};424425&bus_peril {426devfreq = <&bus_leftbus>;427status = "okay";428};429430&bus_mfc {431devfreq = <&bus_leftbus>;432status = "okay";433};434435Example 3:436An interconnect path "bus_display -- bus_leftbus -- bus_dmc" on437Exynos4412 SoC with video mixer as an interconnect consumer device.438439soc {440bus_dmc: bus_dmc {441compatible = "samsung,exynos-bus";442clocks = <&clock CLK_DIV_DMC>;443clock-names = "bus";444operating-points-v2 = <&bus_dmc_opp_table>;445samsung,data-clock-ratio = <4>;446#interconnect-cells = <0>;447};448449bus_leftbus: bus_leftbus {450compatible = "samsung,exynos-bus";451clocks = <&clock CLK_DIV_GDL>;452clock-names = "bus";453operating-points-v2 = <&bus_leftbus_opp_table>;454#interconnect-cells = <0>;455interconnects = <&bus_dmc>;456};457458bus_display: bus_display {459compatible = "samsung,exynos-bus";460clocks = <&clock CLK_ACLK160>;461clock-names = "bus";462operating-points-v2 = <&bus_display_opp_table>;463#interconnect-cells = <0>;464interconnects = <&bus_leftbus &bus_dmc>;465};466467bus_dmc_opp_table: opp_table1 {468compatible = "operating-points-v2";469/* ... */470}471472bus_leftbus_opp_table: opp_table3 {473compatible = "operating-points-v2";474/* ... */475};476477bus_display_opp_table: opp_table4 {478compatible = "operating-points-v2";479/* .. */480};481482&mixer {483compatible = "samsung,exynos4212-mixer";484interconnects = <&bus_display &bus_dmc>;485/* ... */486};487};488489490