hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/pwm/pwm-mtk-disp.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * MediaTek display pulse-width-modulation controller driver.
34 * Copyright (c) 2015 MediaTek Inc.
45 * Author: YH Huang <yh.huang@mediatek.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
146 */
157
168 #include <linux/clk.h>
....@@ -277,10 +269,21 @@
277269 .commit_mask = 0x1,
278270 };
279271
272
+static const struct mtk_pwm_data mt8183_pwm_data = {
273
+ .enable_mask = BIT(0),
274
+ .con0 = 0x18,
275
+ .con0_sel = 0x0,
276
+ .con1 = 0x1c,
277
+ .has_commit = false,
278
+ .bls_debug = 0x80,
279
+ .bls_debug_mask = 0x3,
280
+};
281
+
280282 static const struct of_device_id mtk_disp_pwm_of_match[] = {
281283 { .compatible = "mediatek,mt2701-disp-pwm", .data = &mt2701_pwm_data},
282284 { .compatible = "mediatek,mt6595-disp-pwm", .data = &mt8173_pwm_data},
283285 { .compatible = "mediatek,mt8173-disp-pwm", .data = &mt8173_pwm_data},
286
+ { .compatible = "mediatek,mt8183-disp-pwm", .data = &mt8183_pwm_data},
284287 { }
285288 };
286289 MODULE_DEVICE_TABLE(of, mtk_disp_pwm_of_match);