We will need to be able to set the pixel clock rate for the eDP panel on Genio 720, so as a prerequisite we need to implement a bit more of the set_rate functionality for the clock tree. The way the eDP driver will work is that it sets the PLL rate first, then sets the rate of a gate clock to get it to select the correct parent, which is the PLL that was just set to the exact rate that we need.
While implementing this, we noticed a few bugs in the existing code, so we fix those first. Signed-off-by: David Lechner <[email protected]> --- Changes in v2: - New patch: pass the input rate to mtk_pll_calc_values(), so that mtk_pll_round_rate() looks it up only once. - Explain in the mux rate request comment why the selected input is not enabled. - Link to v1: https://patch.msgid.link/[email protected] --- David Lechner (4): clk: mediatek: don't truncate the requested PLL rate clk: mediatek: return the new rate from PLL set_rate clk: mediatek: pass the input rate to mtk_pll_calc_values() clk: mediatek: select mux inputs by rate arch/arm/mach-mediatek/mt7629/init.c | 8 +- arch/arm/mach-mediatek/mt8516/init.c | 8 +- drivers/clk/mediatek/clk-mtk.c | 306 +++++++++++++++++++++++++++-------- 3 files changed, 247 insertions(+), 75 deletions(-) --- base-commit: ed869863c7e2aca50d57a05d843830dd843138c4 change-id: 20260924-clk-mtk-propagate-rate-310bcc157ef5 prerequisite-message-id: <[email protected]> prerequisite-patch-id: f7d20fd912a63ecd5f74bf715b9440dc51943b20 prerequisite-patch-id: 17573db457a9724fd00a382b6b47041d1e3925b3 prerequisite-patch-id: af5cedd64f7bba7516ad72ed60495245918ba5ea prerequisite-patch-id: 1dfdabc642d685aec02e163eaaaf316f013f27cb prerequisite-patch-id: 01db7b89d970b31f8b7f300182c177ef182e258e prerequisite-patch-id: 2d62bec1fd01c1aaa374796fc331c81c9b86be91 prerequisite-patch-id: f603047a5fe691eb4768638b1dd2c860fcc1093b prerequisite-patch-id: cc0884d959385c6eda0b1584b9e76d66be401905 prerequisite-patch-id: cb3934029d3adf3d1c67fa93284229476b589e65 prerequisite-patch-id: 4851327632c9d0e57fa8220b619f2f8da63ab014 prerequisite-patch-id: 818bc3d5cf951c4dd6740a681503c29ca89169c2 prerequisite-message-id: <[email protected]> prerequisite-patch-id: 46b77492636ad6a60e34f290ed8563dcf4438134 prerequisite-patch-id: 70625bfc712fa2d4b9f27b46c18d4dd58940c5fc prerequisite-patch-id: 647593cda7ed838507a19315dcd2591c526265e4 prerequisite-patch-id: a56141abdc8666de730c913b072ae174af13217b prerequisite-patch-id: df75ef6ff7531c8cd25ac2258ac3c5c600886bb4 prerequisite-patch-id: 5e1dc7764ded4b0fd5e999bd75a25884a13ccd0e prerequisite-patch-id: 92d21ec1e2bdbb1b46f1c74a1917408cfaa865d7 prerequisite-patch-id: 55fb54aebf06acdffcaad16b32560473da088e0d prerequisite-patch-id: 76645ab8a56e3363ef78c65e59a252a3692e7a86 prerequisite-patch-id: d44379cef68a1817282358087bb4103fd6d86bf5 prerequisite-patch-id: 004b1897736569cf060d929c2d47790edf09a742 prerequisite-patch-id: 0dc729831dc5ebf3f6ce3905db5109e7223db713 prerequisite-patch-id: 88a278a3840d5f9b210f58effe6f5b61126cd5f1 prerequisite-patch-id: 393d77072a0bc5d2cafcb672e6a071226422a253 prerequisite-patch-id: 2b0ea0b5f5e178cf0d2af8c307bc1ffe500f5358 Best regards, -- David Lechner <[email protected]>
