Skip to content

Commit

Permalink
dts: clover: Do not disable mmcc
Browse files Browse the repository at this point in the history
Too many things depend on mmcc - venus, interconnect to name a few.
Disabling it was a bad idea.

Enable mmcc in -common.dtsi, and add clocks & PDs to simplefb nodes for
clover and clover-plus .dts.

See simpledrm driver for some comments [1] [2].

[1] https://elixir.bootlin.com/linux/v6.10.10/source/drivers/gpu/drm/tiny/simpledrm.c#L267
[2] https://elixir.bootlin.com/linux/v6.10.10/source/drivers/gpu/drm/tiny/simpledrm.c#L479

Signed-off-by: Alexey Minnekhanov <[email protected]>
  • Loading branch information
minlexx committed Sep 16, 2024
1 parent 8728c78 commit e5a75ac
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
};

&mmcc {
status = "disabled"; // TODO: enable this when panel works
status = "okay"; // TODO: enable this when panel works
};

&mmss_smmu {
Expand Down
24 changes: 24 additions & 0 deletions arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,30 @@
};

&simplefb {
/*
* Prevent unused clocks and power domains from being disabled. It's
* needed to keep bootloader-enabled display stack (and therefore
* framebuffer) working.
*/
assigned-clocks = <&mmcc MDSS_MDP_CLK>, /* from mdp */
<&mmcc MDSS_VSYNC_CLK>;
assigned-clock-rates = <300000000>,
<19200000>;
clocks = <&mmcc MDSS_AHB_CLK>, /* from mdss & mdp */
<&mmcc MDSS_AXI_CLK>,
<&mmcc MDSS_VSYNC_CLK>,
<&mmcc MDSS_MDP_CLK>,
<&mmcc BYTE0_CLK_SRC>, /* from mdss_dsi0 */
<&mmcc PCLK0_CLK_SRC>,
<&mmcc MDSS_BYTE0_CLK>,
<&mmcc MDSS_BYTE0_INTF_CLK>,
<&mmcc MNOC_AHB_CLK>,
<&mmcc MISC_AHB_CLK>,
<&mmcc MDSS_PCLK0_CLK>,
<&mmcc MDSS_ESC0_CLK>;

power-domains = <&rpmpd SDM660_VDDCX>, <&mmcc MDSS_GDSC>;

/* Let simledrm framebuffer to know panel physical size to
allow userspace to do proper DPI scaling */
panel = <&fb_panel>;
Expand Down
35 changes: 35 additions & 0 deletions arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover.dts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,41 @@
};
};

&simplefb {
/*
* Prevent unused clocks and power domains from being disabled. It's
* needed to keep bootloader-enabled display stack (and therefore
* framebuffer) working.
*/
assigned-clocks = <&mmcc MDSS_MDP_CLK>, /* from mdp */
<&mmcc MDSS_VSYNC_CLK>;
assigned-clock-rates = <300000000>,
<19200000>;
clocks = <&mmcc MDSS_AHB_CLK>, /* from mdss & mdp */
<&mmcc MDSS_AXI_CLK>,
<&mmcc MDSS_VSYNC_CLK>,
<&mmcc MDSS_MDP_CLK>,
<&mmcc BYTE0_CLK_SRC>, /* from mdss_dsi0 */
<&mmcc PCLK0_CLK_SRC>,
<&mmcc MDSS_BYTE0_CLK>,
<&mmcc MDSS_BYTE0_INTF_CLK>,
<&mmcc MNOC_AHB_CLK>,
<&mmcc MISC_AHB_CLK>,
<&mmcc MDSS_PCLK0_CLK>,
<&mmcc MDSS_ESC0_CLK>;

power-domains = <&rpmpd SDM660_VDDCX>, <&mmcc MDSS_GDSC>;

/* Let simledrm framebuffer to know panel physical size to
allow userspace to do proper DPI scaling */
panel = <&fb_panel>;

fb_panel: fb-panel {
width-mm = <107>;
height-mm = <172>;
};
};

&tlmm {
ts_int_active: ts-int-active {
pins = "gpio67";
Expand Down

0 comments on commit e5a75ac

Please sign in to comment.