24 Commits

Author SHA1 Message Date
Arvin Wang
582c695d37 [ALPS04810678] interconnect: mediatek: Add mt6761 intercoonect
add mt6761 interconnect support

MTK-Commit-Id: 8e90bdddd7ad7f78aed9c4c34d9ef8358e9c5a7c

Change-Id: Ic7169665c07e0bab15e4e3aae5c287dc8ae1262a
Signed-off-by: Arvin Wang <arvin.wang@mediatek.com>
CR-Id: ALPS04810678
Feature: VCORE DVFS
2021-01-28 13:46:07 +08:00
Anthony Huang
0d1b80bb1d interconnect: mediatek: mmqos: Add BW throttle support
1. Add a sysfs file for setting camera max BW
2. Add BW throttle notifier add/remove function
3. Add a wait throttle done API

Change-Id: Id044a845f5cbfe2e6449643c0e05518f23110053
Feature: [Module]MM pipeline/MM DVFS
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
CR-Id: ALPS04672494
2019-09-30 22:47:32 +08:00
Anthony Huang
d4a75bfe8c interconnect: mediatek: mmqos: set bw limiter to soft mode if no qos bound
Set bw limiter to soft mode if qos bound is false

Change-Id: I95039ab96db23fab38c16888af1faca1ade353cc
Feature: [Module]MM pipeline/MM DVFS
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
CR-Id: ALPS04798455
2019-09-25 23:18:46 +08:00
Anthony Huang
535dd8ab6c interconnect: mediatek: mmqos: Change debug level in mmqos_update_comm_bw
Decrease debug log level in mmqos_update_comm_bw to avoid
performance issue.

Change-Id: Ia3c02f3b8a13638c0331ddacd334abaa86698a9b
Feature: [Module]MM pipeline/MM DVFS
CR-Id: ALPS04798439
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-09-25 11:09:22 +08:00
Arvin Wang
0b55145535 interconnect: mediatek: modify dvfsrc icc driver naming
1. modify dvfsrc-icc driver from emi.c to mtk-dvfsrc-emi.c
2. modify compatible name.

Change-Id: I7306a26f0ec3207378877addc8550f02931f8c89
Signed-off-by: Arvin Wang <arvin.wang@mediatek.com>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-09-23 14:33:58 +08:00
Anthony Huang
ff0f53f212 interconnect: mediatek: Add HRT support for MMQoS
1. Use HRT BW array to store all MM modules' HRT BW requirement
2. Add mtk_mmqos_get_avail_hrt_bw API for MM modules to query
   available HRT BW

Change-Id: I3a5a2d7dc2a088b0ce294a41a93585e9a0e43167
Feature: [Module]MM pipeline/MM DVFS
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
CR-Id: ALPS04672494
2019-09-04 11:01:03 +08:00
Anthony Huang
3742a832f0 interconnect: mediatek: mmqos: Handle of_icc_get() fail
Handle of_icc_get fail to avoid exception in icc_set_bw()

Feature: [Module]MM pipeline/MM DVFS
Change-Id: I32f898e8fcf6e03ce569ac806e84124c2332107b
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
CR-Id: ALPS04767457
2019-08-29 22:21:19 +08:00
Anthony Huang
d2efe30cf5 interconnect: mediatek: mmqos add MODULE_LICENSE
Add MODULE_LICENSE("GPL v2")

Change-Id: I4e8ec5130a9cd179fb059f012cfd362a106c83e0
Feature: [Module]MM pipeline/MM DVFS
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
CR-Id: ALPS04754217
2019-08-28 20:17:31 +08:00
Anthony Huang
2a53880175 interconnect: mediatek: mmqos: Set ostd to 1 if BW is 0
Set ostd to 1 if BW is 0

Change-Id: I6ad0d9739deee016dcc6718c722b4525b7883e98
Feature: [Module]MM pipeline/MM DVFS
CR-Id: ALPS04672494
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-08-24 17:38:29 +08:00
Anthony Huang
06244ea875 interconnect: mediatek: mmqos: fix build error for GKI project
1. Change config type of INTERCONNECT_MTK_MMQOS_COMMON from bool
   to tristate
2. Fix wrong parameter of MODULE_DEVICE_TABLE
3. Remove of_phandle_iterator_args because it is not exported and
   it is not necessary
4. Export mtk_mmqos_probe() and mtk_mmqos_remove()

Error message:
drivers/interconnect/mediatek/mmqos-mt6779.c:373:25: error: use of
   undeclared identifier 'mtk_mt6779_mmqos_of_ids'
MODULE_DEVICE_TABLE(of, mtk_mt6779_mmqos_of_ids);

drivers/interconnect/mediatek/mmqos-mtk.o: In function `mtk_mmqos_probe':
   drivers/interconnect/mediatek/mmqos-mtk.c:384: undefined reference to
`register_mmdvfs_notifier'

ERROR: "of_phandle_iterator_args"
   [drivers/interconnect/mediatek/mmqos-mtk.ko] undefined!
ERROR: "mtk_mmqos_remove"
   [drivers/interconnect/mediatek/mmqos-mt6779.ko] undefined!
ERROR: "mtk_mmqos_probe"
   [drivers/interconnect/mediatek/mmqos-mt6779.ko] undefined!

Change-Id: Id374aa1db1572e256dbaef917e3f53f43906e643
Feature: [Module]MM pipeline/MM DVFS
CR-Id: ALPS04754217
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-08-22 17:51:31 +08:00
Anthony Huang
7a318751bd interconnect: mediatek: Don't update smi if BW is zero in clk callback
In clock changing callback, check BW is not zero before update SMI
to avoid possible devapc issue.

Change-Id: I482f69086079e2528a3b2bc9ede539a9c138db52
Feature: [Module]MM pipeline/MM DVFS
CR-Id: ALPS04756518
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-08-21 17:05:41 +08:00
Anthony Huang
3023916aae interconnect: mediatek: mmqos: Initialize mdp wrot ostd to 8
Initialize mdp wrot ostd to 8

Change-Id: Ib459508ab5bece3f8756c8a17d434f600148211f
Feature: [Module]MM pipeline/MM DVFS
CR-Id: ALPS04720252
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-08-15 18:23:25 +08:00
Anthony Huang
532ebc823c interconnect: mediatek: Add max_ratio handling for mmqos
1. Add max_ratio in mmqos data
2. Set max_ratio as upper-bound of the value of mtk_smi_larb_bw_set()

Feature: [Module]MM pipeline/MM DVFS
Change-Id: Ifcf9329a15597a518dd899d97c64e91919194399
CR-Id: ALPS04672494
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-07-22 14:06:41 +08:00
Anthony Huang
72ffe3140f interconnect: mediatek: Pass HRT bandwidth of MM hardware to dvfsrc
1. Define a bool property for each common_port whether it needs HRT
   (Hard Real Time) requirement in platform data
2. Before passing bandwidth of common node to dvfsrc, traverse each
   common_port and accumulate its bandwidth. Peak bandwidth of common_port
   is aggregated if it is HRT

Feature: [Module]MM pipeline/MM DVFS
Change-Id: I41341df0ad5bceac52d70f5cfac8ab0a5f237a52
CR-Id: ALPS04672494
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-07-10 21:10:07 +08:00
Anthony Huang
eac3ba481a interconnect: mediatek: Modify bandwidth passing mechanism on common node
Implement interconnect consumer to pass the bandwidth of common node
to dvfsrc

Feature: [Module]MM pipeline/MM DVFS
Change-Id: I3b18afb022360b091c142ea512d751dbce9b64d1
CR-Id: ALPS04672494
Signed-off-by: Anthony Huang <anthony.huang@mediatek.com>
2019-07-03 17:22:59 +08:00
Ming-Fan Chen
12bf21e0fb interconnect: mediatek: Add mt6779 mmqos provider driver
Introduce Mediatek MT6779 specific multimedia QoS provider driver
using the interconnect framework.

Change-Id: I3a4fb315083770b28a0a4afb6708f74f75470a8b
CR-Id: ALPS04292155
Feature: [Module]MM pipeline/MM DVFS
Signed-off-by: Ming-Fan Chen <ming-fan.chen@mediatek.com>
2019-06-28 17:14:58 +08:00
Arvin Wang
1c753c3c9d interconnect: mediatek: add debugsys icc node
add debugsys icc node for require bw.

Change-Id: I40542653a043b792f6a27cf2368b1a115be3f3d9
Signed-off-by: Arvin Wang <arvin.wang@mediatek.com>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-06-11 13:19:29 +08:00
Arvin Wang
cc1ac9e098 interconnect: mediatek: register emi icc driver earlier
emi icc are used by mediatek mmdvfs soc driver.
so the driver should be registered before mmdvfs drivers get probed.

Change-Id: Ia3dc6cd97d98ed0001eca9208d47b4d0453e05b4
Signed-off-by: Arvin Wang <arvin.wang@mediatek.com>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-06-06 10:11:16 +08:00
Arvin Wang
d6491310fc interconnect: mediatek: Add dvfsrc interconnect provider driver
Introduce Mediatek dvfsrc specific provider driver using the
interconnect framework.

Change-Id: I5da11d17cb702ee4ae9c42d0650a02cb53832f73
Signed-off-by: Arvin Wang <arvin.wang@mediatek.com>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-06-05 20:06:02 +08:00
Georgi Djakov
c59ee7e6e3 FROMLIST: interconnect: Revert to previous config if any request fails
When consumers report their bandwidth needs with icc_set_bw(), it's
possible that the requested amount of bandwidth is not available or just
the new configuration fails to apply on some path. In this case revert to
the previous configuration and propagate the error back to the consumers
to let them know that bandwidth is not available, hardware is busy or
whatever error is returned by the interconnect platform driver.

Change-Id: Ibb383ddd71600fe227932fff177d857f1cb77608
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-05-14 19:53:28 +08:00
David Dai
b1e632b531 FROMLIST: interconnect: qcom: Add sdm845 interconnect provider driver
Introduce Qualcomm SDM845 specific provider driver using the
interconnect framework.

Change-Id: Ia02632a6b3037b9de6177e652abeb8cec407eb17
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-05-14 19:49:07 +08:00
Georgi Djakov
0eaf333b34 FROMLIST: interconnect: Add debugfs support
Add a functionality to provide information about the current constraints
per each node and provider.

Change-Id: I8fa31a3e78a930e3809f2619b3b1a97ec75831c6
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-05-14 16:42:13 +08:00
Georgi Djakov
8c1e407109 FROMLIST: interconnect: Allow endpoints translation via DT
Currently we support only platform data for specifying the interconnect
endpoints. As now the endpoints are hard-coded into the consumer driver
this may lead to complications when a single driver is used by multiple
SoCs, which may have different interconnect topology.
To avoid cluttering the consumer drivers, introduce a translation function
to help us get the board specific interconnect data from device-tree.

Change-Id: I1411d7f4295758a44df9701bf83c5cc50b596581
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-05-14 16:33:49 +08:00
Georgi Djakov
8f4a59336a FROMLIST: interconnect: Add generic on-chip interconnect API
This patch introduces a new API to get requirements and configure the
interconnect buses across the entire chipset to fit with the current
demand.

The API is using a consumer/provider-based model, where the providers are
the interconnect buses and the consumers could be various drivers.
The consumers request interconnect resources (path) between endpoints and
set the desired constraints on this data flow path. The providers receive
requests from consumers and aggregate these requests for all master-slave
pairs on that path. Then the providers configure each node along the path
to support a bandwidth that satisfies all bandwidth requests that cross
through that node. The topology could be complicated and multi-tiered and
is SoC specific.

Change-Id: Idfdac32ea952e6a93ec759fec38e2e4174807014
Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
CR-Id: ALPS04419708
Feature: VCORE DVFS
2019-05-14 16:29:34 +08:00