forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/drivers/clk/sunxi-ng/ccu-sun8i-a83t.c
....@@ -1,17 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2017 Chen-Yu Tsai. All rights reserved.
3
- *
4
- * This software is licensed under the terms of the GNU General Public
5
- * License version 2, as published by the Free Software Foundation, and
6
- * may be copied, distributed, and modified under those terms.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135
146 #include <linux/clk-provider.h>
7
+#include <linux/io.h>
158 #include <linux/of_address.h>
169 #include <linux/platform_device.h>
1710
....@@ -108,6 +101,7 @@
108101 .n = _SUNXI_CCU_MULT_OFFSET_MIN_MAX(8, 8, 0, 12, 0),
109102 .m = _SUNXI_CCU_DIV(16, 1), /* input divider */
110103 .p = _SUNXI_CCU_DIV(0, 2), /* output divider */
104
+ .max_rate = 3000000000UL,
111105 .common = {
112106 .reg = 0x010,
113107 .lock_reg = CCU_SUN8I_A83T_LOCK_REG,
....@@ -220,6 +214,7 @@
220214 .n = _SUNXI_CCU_MULT_OFFSET_MIN_MAX(8, 8, 0, 12, 0),
221215 .m = _SUNXI_CCU_DIV(16, 1), /* input divider */
222216 .p = _SUNXI_CCU_DIV(0, 2), /* external divider p */
217
+ .max_rate = 3000000000UL,
223218 .common = {
224219 .reg = 0x04c,
225220 .lock_reg = CCU_SUN8I_A83T_LOCK_REG,
....@@ -511,8 +506,9 @@
511506
512507 static SUNXI_CCU_GATE(mipi_csi_clk, "mipi-csi", "osc24M", 0x130, BIT(31), 0);
513508
514
-static const char * const csi_mclk_parents[] = { "pll-de", "osc24M" };
515
-static const u8 csi_mclk_table[] = { 3, 5 };
509
+static const char * const csi_mclk_parents[] = { "pll-video0", "pll-de",
510
+ "osc24M" };
511
+static const u8 csi_mclk_table[] = { 0, 3, 5 };
516512 static SUNXI_CCU_M_WITH_MUX_TABLE_GATE(csi_mclk_clk, "csi-mclk",
517513 csi_mclk_parents, csi_mclk_table,
518514 0x134,