|
@@ -434,3 +434,68 @@ static int dsiphy_set_rate(struct clk *clk, unsigned long rate)
|
|
|
value = (value & ~0x3f) + idx;
|
|
|
|
|
|
__raw_writel(value, clk->mapping->base);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static struct sh_clk_ops dsiphy_clk_ops = {
|
|
|
+ .recalc = dsiphy_recalc,
|
|
|
+ .round_rate = dsiphy_round_rate,
|
|
|
+ .set_rate = dsiphy_set_rate,
|
|
|
+ .enable = dsiphy_enable,
|
|
|
+ .disable = dsiphy_disable,
|
|
|
+};
|
|
|
+
|
|
|
+static struct clk_mapping dsi0phy_clk_mapping = {
|
|
|
+ .phys = DSI0PHYCR,
|
|
|
+ .len = 4,
|
|
|
+};
|
|
|
+
|
|
|
+static struct clk_mapping dsi1phy_clk_mapping = {
|
|
|
+ .phys = DSI1PHYCR,
|
|
|
+ .len = 4,
|
|
|
+};
|
|
|
+
|
|
|
+static struct clk dsi0phy_clk = {
|
|
|
+ .ops = &dsiphy_clk_ops,
|
|
|
+ .parent = &div6_clks[DIV6_DSI0P], /* late install */
|
|
|
+ .mapping = &dsi0phy_clk_mapping,
|
|
|
+};
|
|
|
+
|
|
|
+static struct clk dsi1phy_clk = {
|
|
|
+ .ops = &dsiphy_clk_ops,
|
|
|
+ .parent = &div6_clks[DIV6_DSI1P], /* late install */
|
|
|
+ .mapping = &dsi1phy_clk_mapping,
|
|
|
+};
|
|
|
+
|
|
|
+static struct clk *late_main_clks[] = {
|
|
|
+ &dsi0phy_clk,
|
|
|
+ &dsi1phy_clk,
|
|
|
+};
|
|
|
+
|
|
|
+enum { MSTP001,
|
|
|
+ MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP118, MSTP116, MSTP100,
|
|
|
+ MSTP219, MSTP218, MSTP217,
|
|
|
+ MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
|
|
|
+ MSTP331, MSTP329, MSTP328, MSTP325, MSTP323, MSTP322,
|
|
|
+ MSTP314, MSTP313, MSTP312, MSTP311,
|
|
|
+ MSTP303, MSTP302, MSTP301, MSTP300,
|
|
|
+ MSTP411, MSTP410, MSTP403,
|
|
|
+ MSTP_NR };
|
|
|
+
|
|
|
+#define MSTP(_parent, _reg, _bit, _flags) \
|
|
|
+ SH_CLK_MSTP32(_parent, _reg, _bit, _flags)
|
|
|
+
|
|
|
+static struct clk mstp_clks[MSTP_NR] = {
|
|
|
+ [MSTP001] = MSTP(&div4_clks[DIV4_HP], SMSTPCR0, 1, 0), /* IIC2 */
|
|
|
+ [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* CEU1 */
|
|
|
+ [MSTP128] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 28, 0), /* CSI2-RX1 */
|
|
|
+ [MSTP127] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 27, 0), /* CEU0 */
|
|
|
+ [MSTP126] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 26, 0), /* CSI2-RX0 */
|
|
|
+ [MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */
|
|
|
+ [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX0 */
|
|
|
+ [MSTP116] = MSTP(&div4_clks[DIV4_HP], SMSTPCR1, 16, 0), /* IIC0 */
|
|
|
+ [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */
|
|
|
+ [MSTP219] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 19, 0), /* SCIFA7 */
|
|
|
+ [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* SY-DMAC */
|
|
|
+ [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* MP-DMAC */
|