Re: [PATCH v5 2/4] arm64: dts: mt8183: Add node for the Mali GPU

2020-03-06 Thread kbuild test robot
Hi Nicolas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20200305]
[also build test ERROR on v5.6-rc4]
[cannot apply to robh/for-next linux/master linus/master v5.6-rc4 v5.6-rc3 
v5.6-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Nicolas-Boichat/Add-dts-for-mt8183-GPU-and-misc-panfrost-patches/20200306-160905
base:47466dcf84ee66a973ea7d2fca7e582fe9328932
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.5.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

>> arch/arm64/boot/dts/mediatek/mt8183-evb.dts:10:10: fatal error: mt6358.dtsi: 
>> No such file or directory
#include "mt6358.dtsi"
 ^
   compilation terminated.

vim +10 arch/arm64/boot/dts/mediatek/mt8183-evb.dts

  > 10  #include "mt6358.dtsi"
11  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v5 2/4] arm64: dts: mt8183: Add node for the Mali GPU

2020-03-05 Thread Nicolas Boichat
Add a basic GPU node for mt8183.

Signed-off-by: Nicolas Boichat 
Reviewed-by: Alyssa Rosenzweig 
---
Upstreaming what matches existing bindings from our Chromium OS tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.19/arch/arm64/boot/dts/mediatek/mt8183.dtsi#1411

The evb part of this change depends on this patch to add PMIC dtsi:
https://patchwork.kernel.org/patch/10928161/

The binding we use with out-of-tree Mali drivers includes more
clocks, this is used for devfreq: the out-of-tree driver switches
clk_mux to clk_sub_parent (26Mhz), adjusts clk_main_parent, then
switches clk_mux back to clk_main_parent:
(see 
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.19/drivers/gpu/arm/midgard/platform/mediatek/mali_kbase_runtime_pm.c#423)
clocks =
<&topckgen CLK_TOP_MFGPLL_CK>,
<&topckgen CLK_TOP_MUX_MFG>,
<&clk26m>,
<&mfgcfg CLK_MFG_BG3D>;
clock-names =
"clk_main_parent",
"clk_mux",
"clk_sub_parent",
"subsys_mfg_cg";
(based on discussions, this probably belongs in the clock core)

v5:
 - Rename "2d" power domain to "core2" (keep R-B again).

v4:
 - Add power-domain-names to describe the 3 domains.
   (kept Alyssa's reviewed-by as the change is minor)

v3:
 - No changes

v2:
 - Use sram instead of mali_sram as SRAM supply name.
 - Rename mali@ to gpu@.

 arch/arm64/boot/dts/mediatek/mt8183-evb.dts |   7 ++
 arch/arm64/boot/dts/mediatek/mt8183.dtsi| 105 
 2 files changed, 112 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts 
b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts
index 1fb195c683c3d01..7d609e0cd9b4975 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts
@@ -7,6 +7,7 @@
 
 /dts-v1/;
 #include "mt8183.dtsi"
+#include "mt6358.dtsi"
 
 / {
model = "MediaTek MT8183 evaluation board";
@@ -30,6 +31,12 @@ &auxadc {
status = "okay";
 };
 
+&gpu {
+   supply-names = "mali", "sram";
+   mali-supply = <&mt6358_vgpu_reg>;
+   sram-supply = <&mt6358_vsram_gpu_reg>;
+};
+
 &i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c_pins_0>;
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi 
b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 97863adb7bc02b4..fc690c54988c8cc 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -652,6 +652,111 @@ mfgcfg: syscon@1300 {
#clock-cells = <1>;
};
 
+   gpu: gpu@1304 {
+   compatible = "mediatek,mt8183-mali", "arm,mali-bifrost";
+   reg = <0 0x1304 0 0x4000>;
+   interrupts =
+   ,
+   ,
+   ;
+   interrupt-names = "job", "mmu", "gpu";
+
+   clocks = <&topckgen CLK_TOP_MFGPLL_CK>;
+
+   power-domains =
+   <&scpsys MT8183_POWER_DOMAIN_MFG_CORE0>,
+   <&scpsys MT8183_POWER_DOMAIN_MFG_CORE1>,
+   <&scpsys MT8183_POWER_DOMAIN_MFG_2D>;
+   power-domain-names = "core0", "core1", "core2";
+
+   operating-points-v2 = <&gpu_opp_table>;
+   };
+
+   gpu_opp_table: opp_table0 {
+   compatible = "operating-points-v2";
+   opp-shared;
+
+   opp-3 {
+   opp-hz = /bits/ 64 <3>;
+   opp-microvolt = <625000>, <85>;
+   };
+
+   opp-32000 {
+   opp-hz = /bits/ 64 <32000>;
+   opp-microvolt = <631250>, <85>;
+   };
+
+   opp-34000 {
+   opp-hz = /bits/ 64 <34000>;
+   opp-microvolt = <637500>, <85>;
+   };
+
+   opp-36000 {
+   opp-hz = /bits/ 64 <36000>;
+   opp-microvolt = <643750>, <85>;
+   };
+
+   opp-38000 {
+   opp-hz = /bits/ 64 <38000>;
+   opp-microvolt = <65>, <85>;
+   };
+
+   opp-4 {
+   opp-hz = /bits/ 64 <4>;
+   opp-microvolt = <656250>, <85>;
+   };
+
+   opp-42000 {
+   opp-hz = /bits/ 64 <42000>;
+   opp-microvolt = <662500>, <85>;
+   };
+
+