Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'v6.0-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers

pmic-wrapper:
- add support for mt8188

SVS:
- several driver cleanups

power-domain:
- several cleanups of the dt-bindings and driver

mutex:
- add support to mt6795 disp mutex
- add support for mt8186 mdp3 mutex

* tag 'v6.0-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
soc: mediatek: Add mmsys func to adapt to dpi output for MT8186
soc: mediatek: mutex: Add support for MT6795 Helio X10 display mutex
dt-bindings: soc: mediatek: Add display mutex support for MT6795
soc: mediatek: mutex: Add mt8186 mutex mod settings for mdp3
dt-bindings: soc: mediatek: Add mdp3 mutex support for mt8186
soc: mediatek: pm-domains: Simplify some error message
soc: mediatek: mtk-svs: Explicitly include bitfield header
soc: mediatek: mtk-svs: Use bitfield access macros where possible
soc: mediatek: mtk-svs: Commonize t-calibration-data fuse array read
dt-bindings: power: mediatek: Update maintainer list
dt-bindings: power: mediatek: Support naming power controller node with unit address
dt-bindings: power: mediatek: Refine multiple level power domain nodes
soc: mediatek: mtk-svs: Use devm variant for dev_pm_opp_of_add_table()
soc: mediatek: mtk-svs: Drop of_match_ptr() for of_match_table
soc: mediatek: mtk-svs: Remove hardcoded irqflags
soc: mediatek: mtk-svs: Switch to platform_get_irq()
dt-bindings: soc: mediatek: pwrap: add compatible for mt8188
soc: mediatek: Let PMIC Wrapper and SCPSYS depend on OF

Link: https://lore.kernel.org/r/498fe3e5-a237-121a-d500-fbb0994906cb@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+273 -233
+19 -116
Documentation/devicetree/bindings/power/mediatek,power-controller.yaml
··· 7 7 title: Mediatek Power Domains Controller 8 8 9 9 maintainers: 10 - - Weiyi Lu <weiyi.lu@mediatek.com> 10 + - MandyJH Liu <mandyjh.liu@mediatek.com> 11 11 - Matthias Brugger <mbrugger@suse.com> 12 12 13 13 description: | ··· 19 19 20 20 properties: 21 21 $nodename: 22 - const: power-controller 22 + pattern: '^power-controller(@[0-9a-f]+)?$' 23 23 24 24 compatible: 25 25 enum: ··· 42 42 43 43 patternProperties: 44 44 "^power-domain@[0-9a-f]+$": 45 + $ref: "#/$defs/power-domain-node" 46 + patternProperties: 47 + "^power-domain@[0-9a-f]+$": 48 + $ref: "#/$defs/power-domain-node" 49 + patternProperties: 50 + "^power-domain@[0-9a-f]+$": 51 + $ref: "#/$defs/power-domain-node" 52 + patternProperties: 53 + "^power-domain@[0-9a-f]+$": 54 + $ref: "#/$defs/power-domain-node" 55 + unevaluatedProperties: false 56 + unevaluatedProperties: false 57 + unevaluatedProperties: false 58 + unevaluatedProperties: false 59 + 60 + $defs: 61 + power-domain-node: 45 62 type: object 46 63 description: | 47 64 Represents the power domains within the power controller node as documented ··· 117 100 $ref: /schemas/types.yaml#/definitions/phandle 118 101 description: phandle to the device containing the SMI register range. 119 102 120 - patternProperties: 121 - "^power-domain@[0-9a-f]+$": 122 - type: object 123 - description: | 124 - Represents a power domain child within a power domain parent node. 125 - 126 - properties: 127 - 128 - '#power-domain-cells': 129 - description: 130 - Must be 0 for nodes representing a single PM domain and 1 for nodes 131 - providing multiple PM domains. 132 - 133 - '#address-cells': 134 - const: 1 135 - 136 - '#size-cells': 137 - const: 0 138 - 139 - reg: 140 - maxItems: 1 141 - 142 - clocks: 143 - description: | 144 - A number of phandles to clocks that need to be enabled during domain 145 - power-up sequencing. 146 - 147 - clock-names: 148 - description: | 149 - List of names of clocks, in order to match the power-up sequencing 150 - for each power domain we need to group the clocks by name. BASIC 151 - clocks need to be enabled before enabling the corresponding power 152 - domain, and should not have a '-' in their name (i.e mm, mfg, venc). 153 - SUSBYS clocks need to be enabled before releasing the bus protection, 154 - and should contain a '-' in their name (i.e mm-0, isp-0, cam-0). 155 - 156 - In order to follow properly the power-up sequencing, the clocks must 157 - be specified by order, adding first the BASIC clocks followed by the 158 - SUSBSYS clocks. 159 - 160 - domain-supply: 161 - description: domain regulator supply. 162 - 163 - mediatek,infracfg: 164 - $ref: /schemas/types.yaml#/definitions/phandle 165 - description: phandle to the device containing the INFRACFG register range. 166 - 167 - mediatek,smi: 168 - $ref: /schemas/types.yaml#/definitions/phandle 169 - description: phandle to the device containing the SMI register range. 170 - 171 - patternProperties: 172 - "^power-domain@[0-9a-f]+$": 173 - type: object 174 - description: | 175 - Represents a power domain child within a power domain parent node. 176 - 177 - properties: 178 - 179 - '#power-domain-cells': 180 - description: 181 - Must be 0 for nodes representing a single PM domain and 1 for nodes 182 - providing multiple PM domains. 183 - 184 - '#address-cells': 185 - const: 1 186 - 187 - '#size-cells': 188 - const: 0 189 - 190 - reg: 191 - maxItems: 1 192 - 193 - clocks: 194 - description: | 195 - A number of phandles to clocks that need to be enabled during domain 196 - power-up sequencing. 197 - 198 - clock-names: 199 - description: | 200 - List of names of clocks, in order to match the power-up sequencing 201 - for each power domain we need to group the clocks by name. BASIC 202 - clocks need to be enabled before enabling the corresponding power 203 - domain, and should not have a '-' in their name (i.e mm, mfg, venc). 204 - SUSBYS clocks need to be enabled before releasing the bus protection, 205 - and should contain a '-' in their name (i.e mm-0, isp-0, cam-0). 206 - 207 - In order to follow properly the power-up sequencing, the clocks must 208 - be specified by order, adding first the BASIC clocks followed by the 209 - SUSBSYS clocks. 210 - 211 - domain-supply: 212 - description: domain regulator supply. 213 - 214 - mediatek,infracfg: 215 - $ref: /schemas/types.yaml#/definitions/phandle 216 - description: phandle to the device containing the INFRACFG register range. 217 - 218 - mediatek,smi: 219 - $ref: /schemas/types.yaml#/definitions/phandle 220 - description: phandle to the device containing the SMI register range. 221 - 222 - required: 223 - - reg 224 - 225 - additionalProperties: false 226 - 227 - required: 228 - - reg 229 - 230 - additionalProperties: false 231 - 232 103 required: 233 104 - reg 234 - 235 - additionalProperties: false 236 105 237 106 required: 238 107 - compatible
+2
Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml
··· 26 26 enum: 27 27 - mediatek,mt2701-disp-mutex 28 28 - mediatek,mt2712-disp-mutex 29 + - mediatek,mt6795-disp-mutex 29 30 - mediatek,mt8167-disp-mutex 30 31 - mediatek,mt8173-disp-mutex 31 32 - mediatek,mt8183-disp-mutex 32 33 - mediatek,mt8186-disp-mutex 34 + - mediatek,mt8186-mdp3-mutex 33 35 - mediatek,mt8192-disp-mutex 34 36 - mediatek,mt8195-disp-mutex 35 37
+1
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
··· 28 28 "mediatek,mt8173-pwrap" for MT8173 SoCs 29 29 "mediatek,mt8183-pwrap" for MT8183 SoCs 30 30 "mediatek,mt8186-pwrap" for MT8186 SoCs 31 + "mediatek,mt8188-pwrap", "mediatek,mt8195-pwrap" for MT8188 SoCs 31 32 "mediatek,mt8195-pwrap" for MT8195 SoCs 32 33 "mediatek,mt8516-pwrap" for MT8516 SoCs 33 34 - interrupts: IRQ for pwrap in SOC
+2
drivers/soc/mediatek/Kconfig
··· 37 37 config MTK_PMIC_WRAP 38 38 tristate "MediaTek PMIC Wrapper Support" 39 39 depends on RESET_CONTROLLER 40 + depends on OF 40 41 select REGMAP 41 42 help 42 43 Say yes here to add support for MediaTek PMIC Wrapper found ··· 47 46 config MTK_SCPSYS 48 47 bool "MediaTek SCPSYS Support" 49 48 default ARCH_MEDIATEK 49 + depends on OF 50 50 select REGMAP 51 51 select MTK_INFRACFG 52 52 select PM_GENERIC_DOMAINS if PM
+6
drivers/soc/mediatek/mt8186-mmsys.h
··· 3 3 #ifndef __SOC_MEDIATEK_MT8186_MMSYS_H 4 4 #define __SOC_MEDIATEK_MT8186_MMSYS_H 5 5 6 + /* Values for DPI configuration in MMSYS address space */ 7 + #define MT8186_MMSYS_DPI_OUTPUT_FORMAT 0x400 8 + #define DPI_FORMAT_MASK 0x1 9 + #define DPI_RGB888_DDR_CON BIT(0) 10 + #define DPI_RGB565_SDR_CON BIT(1) 11 + 6 12 #define MT8186_MMSYS_OVL_CON 0xF04 7 13 #define MT8186_MMSYS_OVL0_CON_MASK 0x3 8 14 #define MT8186_MMSYS_OVL0_2L_CON_MASK 0xC
+20
drivers/soc/mediatek/mtk-mmsys.c
··· 227 227 } 228 228 EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_disconnect); 229 229 230 + static void mtk_mmsys_update_bits(struct mtk_mmsys *mmsys, u32 offset, u32 mask, u32 val) 231 + { 232 + u32 tmp; 233 + 234 + tmp = readl_relaxed(mmsys->regs + offset); 235 + tmp = (tmp & ~mask) | val; 236 + writel_relaxed(tmp, mmsys->regs + offset); 237 + } 238 + 239 + void mtk_mmsys_ddp_dpi_fmt_config(struct device *dev, u32 val) 240 + { 241 + if (val) 242 + mtk_mmsys_update_bits(dev_get_drvdata(dev), MT8186_MMSYS_DPI_OUTPUT_FORMAT, 243 + DPI_RGB888_DDR_CON, DPI_FORMAT_MASK); 244 + else 245 + mtk_mmsys_update_bits(dev_get_drvdata(dev), MT8186_MMSYS_DPI_OUTPUT_FORMAT, 246 + DPI_RGB565_SDR_CON, DPI_FORMAT_MASK); 247 + } 248 + EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_dpi_fmt_config); 249 + 230 250 static int mtk_mmsys_reset_update(struct reset_controller_dev *rcdev, unsigned long id, 231 251 bool assert) 232 252 {
+44
drivers/soc/mediatek/mtk-mutex.c
··· 91 91 #define MT8183_MUTEX_MOD_MDP_AAL0 23 92 92 #define MT8183_MUTEX_MOD_MDP_CCORR0 24 93 93 94 + #define MT8186_MUTEX_MOD_MDP_RDMA0 0 95 + #define MT8186_MUTEX_MOD_MDP_AAL0 2 96 + #define MT8186_MUTEX_MOD_MDP_HDR0 4 97 + #define MT8186_MUTEX_MOD_MDP_RSZ0 5 98 + #define MT8186_MUTEX_MOD_MDP_RSZ1 6 99 + #define MT8186_MUTEX_MOD_MDP_WROT0 7 100 + #define MT8186_MUTEX_MOD_MDP_TDSHP0 9 101 + #define MT8186_MUTEX_MOD_MDP_COLOR0 14 102 + 94 103 #define MT8173_MUTEX_MOD_DISP_OVL0 11 95 104 #define MT8173_MUTEX_MOD_DISP_OVL1 12 96 105 #define MT8173_MUTEX_MOD_DISP_RDMA0 13 ··· 333 324 [DDP_COMPONENT_RDMA1] = MT8186_MUTEX_MOD_DISP_RDMA1, 334 325 }; 335 326 327 + static const unsigned int mt8186_mdp_mutex_table_mod[MUTEX_MOD_IDX_MAX] = { 328 + [MUTEX_MOD_IDX_MDP_RDMA0] = MT8186_MUTEX_MOD_MDP_RDMA0, 329 + [MUTEX_MOD_IDX_MDP_RSZ0] = MT8186_MUTEX_MOD_MDP_RSZ0, 330 + [MUTEX_MOD_IDX_MDP_RSZ1] = MT8186_MUTEX_MOD_MDP_RSZ1, 331 + [MUTEX_MOD_IDX_MDP_TDSHP0] = MT8186_MUTEX_MOD_MDP_TDSHP0, 332 + [MUTEX_MOD_IDX_MDP_WROT0] = MT8186_MUTEX_MOD_MDP_WROT0, 333 + [MUTEX_MOD_IDX_MDP_HDR0] = MT8186_MUTEX_MOD_MDP_HDR0, 334 + [MUTEX_MOD_IDX_MDP_AAL0] = MT8186_MUTEX_MOD_MDP_AAL0, 335 + [MUTEX_MOD_IDX_MDP_COLOR0] = MT8186_MUTEX_MOD_MDP_COLOR0, 336 + }; 337 + 336 338 static const unsigned int mt8192_mutex_mod[DDP_COMPONENT_ID_MAX] = { 337 339 [DDP_COMPONENT_AAL0] = MT8192_MUTEX_MOD_DISP_AAL0, 338 340 [DDP_COMPONENT_CCORR] = MT8192_MUTEX_MOD_DISP_CCORR0, ··· 400 380 [MUTEX_SOF_DSI3] = MUTEX_SOF_DSI3, 401 381 }; 402 382 383 + static const unsigned int mt6795_mutex_sof[DDP_MUTEX_SOF_MAX] = { 384 + [MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE, 385 + [MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0, 386 + [MUTEX_SOF_DSI1] = MUTEX_SOF_DSI1, 387 + [MUTEX_SOF_DPI0] = MUTEX_SOF_DPI0, 388 + }; 389 + 403 390 static const unsigned int mt8167_mutex_sof[DDP_MUTEX_SOF_MAX] = { 404 391 [MUTEX_SOF_SINGLE_MODE] = MUTEX_SOF_SINGLE_MODE, 405 392 [MUTEX_SOF_DSI0] = MUTEX_SOF_DSI0, ··· 461 434 .mutex_sof_reg = MT2701_MUTEX0_SOF0, 462 435 }; 463 436 437 + static const struct mtk_mutex_data mt6795_mutex_driver_data = { 438 + .mutex_mod = mt8173_mutex_mod, 439 + .mutex_sof = mt6795_mutex_sof, 440 + .mutex_mod_reg = MT2701_MUTEX0_MOD0, 441 + .mutex_sof_reg = MT2701_MUTEX0_SOF0, 442 + }; 443 + 464 444 static const struct mtk_mutex_data mt8167_mutex_driver_data = { 465 445 .mutex_mod = mt8167_mutex_mod, 466 446 .mutex_sof = mt8167_mutex_sof, ··· 490 456 .mutex_sof_reg = MT8183_MUTEX0_SOF0, 491 457 .mutex_table_mod = mt8183_mutex_table_mod, 492 458 .no_clk = true, 459 + }; 460 + 461 + static const struct mtk_mutex_data mt8186_mdp_mutex_driver_data = { 462 + .mutex_mod_reg = MT8183_MUTEX0_MOD0, 463 + .mutex_sof_reg = MT8183_MUTEX0_SOF0, 464 + .mutex_table_mod = mt8186_mdp_mutex_table_mod, 493 465 }; 494 466 495 467 static const struct mtk_mutex_data mt8186_mutex_driver_data = { ··· 842 802 .data = &mt2701_mutex_driver_data}, 843 803 { .compatible = "mediatek,mt2712-disp-mutex", 844 804 .data = &mt2712_mutex_driver_data}, 805 + { .compatible = "mediatek,mt6795-disp-mutex", 806 + .data = &mt6795_mutex_driver_data}, 845 807 { .compatible = "mediatek,mt8167-disp-mutex", 846 808 .data = &mt8167_mutex_driver_data}, 847 809 { .compatible = "mediatek,mt8173-disp-mutex", ··· 852 810 .data = &mt8183_mutex_driver_data}, 853 811 { .compatible = "mediatek,mt8186-disp-mutex", 854 812 .data = &mt8186_mutex_driver_data}, 813 + { .compatible = "mediatek,mt8186-mdp3-mutex", 814 + .data = &mt8186_mdp_mutex_driver_data}, 855 815 { .compatible = "mediatek,mt8192-disp-mutex", 856 816 .data = &mt8192_mutex_driver_data}, 857 817 { .compatible = "mediatek,mt8195-disp-mutex",
+3 -3
drivers/soc/mediatek/mtk-pm-domains.c
··· 393 393 if (IS_ERR(clk)) { 394 394 ret = PTR_ERR(clk); 395 395 dev_err_probe(scpsys->dev, ret, 396 - "%pOF: failed to get clk at index %d: %d\n", node, i, ret); 396 + "%pOF: failed to get clk at index %d\n", node, i); 397 397 goto err_put_clocks; 398 398 } 399 399 ··· 405 405 if (IS_ERR(clk)) { 406 406 ret = PTR_ERR(clk); 407 407 dev_err_probe(scpsys->dev, ret, 408 - "%pOF: failed to get clk at index %d: %d\n", node, 409 - i + clk_ind, ret); 408 + "%pOF: failed to get clk at index %d\n", node, 409 + i + clk_ind); 410 410 goto err_put_subsys_clocks; 411 411 } 412 412
+1 -1
drivers/soc/mediatek/mtk-pmic-wrap.c
··· 2316 2316 static struct platform_driver pwrap_drv = { 2317 2317 .driver = { 2318 2318 .name = "mt-pmic-pwrap", 2319 - .of_match_table = of_match_ptr(of_pwrap_match_tbl), 2319 + .of_match_table = of_pwrap_match_tbl, 2320 2320 }, 2321 2321 .probe = pwrap_probe, 2322 2322 };
+1 -1
drivers/soc/mediatek/mtk-scpsys.c
··· 1141 1141 .name = "mtk-scpsys", 1142 1142 .suppress_bind_attrs = true, 1143 1143 .owner = THIS_MODULE, 1144 - .of_match_table = of_match_ptr(of_scpsys_match_tbl), 1144 + .of_match_table = of_scpsys_match_tbl, 1145 1145 }, 1146 1146 }; 1147 1147 builtin_platform_driver(scpsys_drv);
+170 -112
drivers/soc/mediatek/mtk-svs.c
··· 3 3 * Copyright (C) 2022 MediaTek Inc. 4 4 */ 5 5 6 + #include <linux/bitfield.h> 6 7 #include <linux/bits.h> 7 8 #include <linux/clk.h> 8 9 #include <linux/completion.h> ··· 54 53 #define SVSB_MON_VOLT_IGNORE BIT(16) 55 54 #define SVSB_REMOVE_DVTFIXED_VOLT BIT(24) 56 55 57 - /* svs bank register common configuration */ 58 - #define SVSB_DET_MAX 0xffff 56 + /* svs bank register fields and common configuration */ 57 + #define SVSB_PTPCONFIG_DETMAX GENMASK(15, 0) 58 + #define SVSB_DET_MAX FIELD_PREP(SVSB_PTPCONFIG_DETMAX, 0xffff) 59 59 #define SVSB_DET_WINDOW 0xa28 60 - #define SVSB_DTHI 0x1 61 - #define SVSB_DTLO 0xfe 62 - #define SVSB_EN_INIT01 0x1 63 - #define SVSB_EN_INIT02 0x5 64 - #define SVSB_EN_MON 0x2 65 - #define SVSB_EN_OFF 0x0 66 - #define SVSB_INTEN_INIT0x 0x00005f01 67 - #define SVSB_INTEN_MONVOPEN 0x00ff0000 68 - #define SVSB_INTSTS_CLEAN 0x00ffffff 69 - #define SVSB_INTSTS_COMPLETE 0x1 70 - #define SVSB_INTSTS_MONVOP 0x00ff0000 60 + 61 + /* DESCHAR */ 62 + #define SVSB_DESCHAR_FLD_MDES GENMASK(7, 0) 63 + #define SVSB_DESCHAR_FLD_BDES GENMASK(15, 8) 64 + 65 + /* TEMPCHAR */ 66 + #define SVSB_TEMPCHAR_FLD_DVT_FIXED GENMASK(7, 0) 67 + #define SVSB_TEMPCHAR_FLD_MTDES GENMASK(15, 8) 68 + #define SVSB_TEMPCHAR_FLD_VCO GENMASK(23, 16) 69 + 70 + /* DETCHAR */ 71 + #define SVSB_DETCHAR_FLD_DCMDET GENMASK(7, 0) 72 + #define SVSB_DETCHAR_FLD_DCBDET GENMASK(15, 8) 73 + 74 + /* SVSEN (PTPEN) */ 75 + #define SVSB_PTPEN_INIT01 BIT(0) 76 + #define SVSB_PTPEN_MON BIT(1) 77 + #define SVSB_PTPEN_INIT02 (SVSB_PTPEN_INIT01 | BIT(2)) 78 + #define SVSB_PTPEN_OFF 0x0 79 + 80 + /* FREQPCTS */ 81 + #define SVSB_FREQPCTS_FLD_PCT0_4 GENMASK(7, 0) 82 + #define SVSB_FREQPCTS_FLD_PCT1_5 GENMASK(15, 8) 83 + #define SVSB_FREQPCTS_FLD_PCT2_6 GENMASK(23, 16) 84 + #define SVSB_FREQPCTS_FLD_PCT3_7 GENMASK(31, 24) 85 + 86 + /* INTSTS */ 87 + #define SVSB_INTSTS_VAL_CLEAN 0x00ffffff 88 + #define SVSB_INTSTS_F0_COMPLETE BIT(0) 89 + #define SVSB_INTSTS_FLD_MONVOP GENMASK(23, 16) 71 90 #define SVSB_RUNCONFIG_DEFAULT 0x80000000 91 + 92 + /* LIMITVALS */ 93 + #define SVSB_LIMITVALS_FLD_DTLO GENMASK(7, 0) 94 + #define SVSB_LIMITVALS_FLD_DTHI GENMASK(15, 8) 95 + #define SVSB_LIMITVALS_FLD_VMIN GENMASK(23, 16) 96 + #define SVSB_LIMITVALS_FLD_VMAX GENMASK(31, 24) 97 + #define SVSB_VAL_DTHI 0x1 98 + #define SVSB_VAL_DTLO 0xfe 99 + 100 + /* INTEN */ 101 + #define SVSB_INTEN_F0EN BIT(0) 102 + #define SVSB_INTEN_DACK0UPEN BIT(8) 103 + #define SVSB_INTEN_DC0EN BIT(9) 104 + #define SVSB_INTEN_DC1EN BIT(10) 105 + #define SVSB_INTEN_DACK0LOEN BIT(11) 106 + #define SVSB_INTEN_INITPROD_OVF_EN BIT(12) 107 + #define SVSB_INTEN_INITSUM_OVF_EN BIT(14) 108 + #define SVSB_INTEN_MONVOPEN GENMASK(23, 16) 109 + #define SVSB_INTEN_INIT0x (SVSB_INTEN_F0EN | SVSB_INTEN_DACK0UPEN | \ 110 + SVSB_INTEN_DC0EN | SVSB_INTEN_DC1EN | \ 111 + SVSB_INTEN_DACK0LOEN | \ 112 + SVSB_INTEN_INITPROD_OVF_EN | \ 113 + SVSB_INTEN_INITSUM_OVF_EN) 114 + 115 + /* TSCALCS */ 116 + #define SVSB_TSCALCS_FLD_MTS GENMASK(11, 0) 117 + #define SVSB_TSCALCS_FLD_BTS GENMASK(23, 12) 118 + 119 + /* INIT2VALS */ 120 + #define SVSB_INIT2VALS_FLD_DCVOFFSETIN GENMASK(15, 0) 121 + #define SVSB_INIT2VALS_FLD_AGEVOFFSETIN GENMASK(31, 16) 122 + 123 + /* VOPS */ 124 + #define SVSB_VOPS_FLD_VOP0_4 GENMASK(7, 0) 125 + #define SVSB_VOPS_FLD_VOP1_5 GENMASK(15, 8) 126 + #define SVSB_VOPS_FLD_VOP2_6 GENMASK(23, 16) 127 + #define SVSB_VOPS_FLD_VOP3_7 GENMASK(31, 24) 72 128 73 129 /* svs bank related setting */ 74 130 #define BITS8 8 ··· 320 262 * @rst: svs platform reset control 321 263 * @efuse_parsing: svs platform efuse parsing function pointer 322 264 * @probe: svs platform probe function pointer 323 - * @irqflags: svs platform irq settings flags 324 265 * @efuse_max: total number of svs efuse 325 266 * @tefuse_max: total number of thermal efuse 326 267 * @regs: svs platform registers map ··· 337 280 struct reset_control *rst; 338 281 bool (*efuse_parsing)(struct svs_platform *svsp); 339 282 int (*probe)(struct svs_platform *svsp); 340 - unsigned long irqflags; 341 283 size_t efuse_max; 342 284 size_t tefuse_max; 343 285 const u32 *regs; ··· 350 294 struct svs_bank *banks; 351 295 bool (*efuse_parsing)(struct svs_platform *svsp); 352 296 int (*probe)(struct svs_platform *svsp); 353 - unsigned long irqflags; 354 297 const u32 *regs; 355 298 u32 bank_max; 356 299 }; ··· 723 668 svsp->pbank = svsb; 724 669 svsb->mode_support = SVSB_MODE_ALL_DISABLE; 725 670 svs_switch_bank(svsp); 726 - svs_writel_relaxed(svsp, SVSB_EN_OFF, SVSEN); 727 - svs_writel_relaxed(svsp, SVSB_INTSTS_CLEAN, INTSTS); 671 + svs_writel_relaxed(svsp, SVSB_PTPEN_OFF, SVSEN); 672 + svs_writel_relaxed(svsp, SVSB_INTSTS_VAL_CLEAN, INTSTS); 728 673 spin_unlock_irqrestore(&svs_lock, flags); 729 674 730 675 svsb->phase = SVSB_PHASE_ERROR; ··· 885 830 } else if (svsb->type == SVSB_LOW) { 886 831 /* volt[turn_pt] + volt[j] ~ volt[opp_count - 1] */ 887 832 j = svsb->opp_count - 7; 888 - svsb->volt[turn_pt] = vop30 & GENMASK(7, 0); 833 + svsb->volt[turn_pt] = FIELD_GET(SVSB_VOPS_FLD_VOP0_4, vop30); 889 834 shift_byte++; 890 835 for (i = j; i < svsb->opp_count; i++) { 891 836 b_sft = BITS8 * (shift_byte % REG_BYTES); ··· 907 852 if (svsb->type == SVSB_HIGH) { 908 853 /* volt[0] + volt[j] ~ volt[turn_pt - 1] */ 909 854 j = turn_pt - 7; 910 - svsb->volt[0] = vop30 & GENMASK(7, 0); 855 + svsb->volt[0] = FIELD_GET(SVSB_VOPS_FLD_VOP0_4, vop30); 911 856 shift_byte++; 912 857 for (i = j; i < turn_pt; i++) { 913 858 b_sft = BITS8 * (shift_byte % REG_BYTES); ··· 1038 983 u32 temp, i; 1039 984 1040 985 temp = svs_readl_relaxed(svsp, VOP74); 1041 - svsb->volt[14] = (temp >> 24) & GENMASK(7, 0); 1042 - svsb->volt[12] = (temp >> 16) & GENMASK(7, 0); 1043 - svsb->volt[10] = (temp >> 8) & GENMASK(7, 0); 1044 - svsb->volt[8] = (temp & GENMASK(7, 0)); 986 + svsb->volt[14] = FIELD_GET(SVSB_VOPS_FLD_VOP3_7, temp); 987 + svsb->volt[12] = FIELD_GET(SVSB_VOPS_FLD_VOP2_6, temp); 988 + svsb->volt[10] = FIELD_GET(SVSB_VOPS_FLD_VOP1_5, temp); 989 + svsb->volt[8] = FIELD_GET(SVSB_VOPS_FLD_VOP0_4, temp); 1045 990 1046 991 temp = svs_readl_relaxed(svsp, VOP30); 1047 - svsb->volt[6] = (temp >> 24) & GENMASK(7, 0); 1048 - svsb->volt[4] = (temp >> 16) & GENMASK(7, 0); 1049 - svsb->volt[2] = (temp >> 8) & GENMASK(7, 0); 1050 - svsb->volt[0] = (temp & GENMASK(7, 0)); 992 + svsb->volt[6] = FIELD_GET(SVSB_VOPS_FLD_VOP3_7, temp); 993 + svsb->volt[4] = FIELD_GET(SVSB_VOPS_FLD_VOP2_6, temp); 994 + svsb->volt[2] = FIELD_GET(SVSB_VOPS_FLD_VOP1_5, temp); 995 + svsb->volt[0] = FIELD_GET(SVSB_VOPS_FLD_VOP0_4, temp); 1051 996 1052 997 for (i = 0; i <= 12; i += 2) 1053 998 svsb->volt[i + 1] = interpolate(svsb->freq_pct[i], ··· 1069 1014 static void svs_set_bank_freq_pct_v2(struct svs_platform *svsp) 1070 1015 { 1071 1016 struct svs_bank *svsb = svsp->pbank; 1017 + u32 freqpct74_val, freqpct30_val; 1072 1018 1073 - svs_writel_relaxed(svsp, 1074 - (svsb->freq_pct[14] << 24) | 1075 - (svsb->freq_pct[12] << 16) | 1076 - (svsb->freq_pct[10] << 8) | 1077 - svsb->freq_pct[8], 1078 - FREQPCT74); 1019 + freqpct74_val = FIELD_PREP(SVSB_FREQPCTS_FLD_PCT0_4, svsb->freq_pct[8]) | 1020 + FIELD_PREP(SVSB_FREQPCTS_FLD_PCT1_5, svsb->freq_pct[10]) | 1021 + FIELD_PREP(SVSB_FREQPCTS_FLD_PCT2_6, svsb->freq_pct[12]) | 1022 + FIELD_PREP(SVSB_FREQPCTS_FLD_PCT3_7, svsb->freq_pct[14]); 1079 1023 1080 - svs_writel_relaxed(svsp, 1081 - (svsb->freq_pct[6] << 24) | 1082 - (svsb->freq_pct[4] << 16) | 1083 - (svsb->freq_pct[2] << 8) | 1084 - svsb->freq_pct[0], 1085 - FREQPCT30); 1024 + freqpct30_val = FIELD_PREP(SVSB_FREQPCTS_FLD_PCT0_4, svsb->freq_pct[0]) | 1025 + FIELD_PREP(SVSB_FREQPCTS_FLD_PCT1_5, svsb->freq_pct[2]) | 1026 + FIELD_PREP(SVSB_FREQPCTS_FLD_PCT2_6, svsb->freq_pct[4]) | 1027 + FIELD_PREP(SVSB_FREQPCTS_FLD_PCT3_7, svsb->freq_pct[6]); 1028 + 1029 + svs_writel_relaxed(svsp, freqpct74_val, FREQPCT74); 1030 + svs_writel_relaxed(svsp, freqpct30_val, FREQPCT30); 1086 1031 } 1087 1032 1088 1033 static void svs_set_bank_phase(struct svs_platform *svsp, ··· 1093 1038 1094 1039 svs_switch_bank(svsp); 1095 1040 1096 - des_char = (svsb->bdes << 8) | svsb->mdes; 1041 + des_char = FIELD_PREP(SVSB_DESCHAR_FLD_BDES, svsb->bdes) | 1042 + FIELD_PREP(SVSB_DESCHAR_FLD_MDES, svsb->mdes); 1097 1043 svs_writel_relaxed(svsp, des_char, DESCHAR); 1098 1044 1099 - temp_char = (svsb->vco << 16) | (svsb->mtdes << 8) | svsb->dvt_fixed; 1045 + temp_char = FIELD_PREP(SVSB_TEMPCHAR_FLD_VCO, svsb->vco) | 1046 + FIELD_PREP(SVSB_TEMPCHAR_FLD_MTDES, svsb->mtdes) | 1047 + FIELD_PREP(SVSB_TEMPCHAR_FLD_DVT_FIXED, svsb->dvt_fixed); 1100 1048 svs_writel_relaxed(svsp, temp_char, TEMPCHAR); 1101 1049 1102 - det_char = (svsb->dcbdet << 8) | svsb->dcmdet; 1050 + det_char = FIELD_PREP(SVSB_DETCHAR_FLD_DCBDET, svsb->dcbdet) | 1051 + FIELD_PREP(SVSB_DETCHAR_FLD_DCMDET, svsb->dcmdet); 1103 1052 svs_writel_relaxed(svsp, det_char, DETCHAR); 1104 1053 1105 1054 svs_writel_relaxed(svsp, svsb->dc_config, DCCONFIG); ··· 1112 1053 1113 1054 svsb->set_freq_pct(svsp); 1114 1055 1115 - limit_vals = (svsb->vmax << 24) | (svsb->vmin << 16) | 1116 - (SVSB_DTHI << 8) | SVSB_DTLO; 1056 + limit_vals = FIELD_PREP(SVSB_LIMITVALS_FLD_DTLO, SVSB_VAL_DTLO) | 1057 + FIELD_PREP(SVSB_LIMITVALS_FLD_DTHI, SVSB_VAL_DTHI) | 1058 + FIELD_PREP(SVSB_LIMITVALS_FLD_VMIN, svsb->vmin) | 1059 + FIELD_PREP(SVSB_LIMITVALS_FLD_VMAX, svsb->vmax); 1117 1060 svs_writel_relaxed(svsp, limit_vals, LIMITVALS); 1118 1061 1119 1062 svs_writel_relaxed(svsp, SVSB_DET_WINDOW, DETWINDOW); 1120 1063 svs_writel_relaxed(svsp, SVSB_DET_MAX, CONFIG); 1121 1064 svs_writel_relaxed(svsp, svsb->chk_shift, CHKSHIFT); 1122 1065 svs_writel_relaxed(svsp, svsb->ctl0, CTL0); 1123 - svs_writel_relaxed(svsp, SVSB_INTSTS_CLEAN, INTSTS); 1066 + svs_writel_relaxed(svsp, SVSB_INTSTS_VAL_CLEAN, INTSTS); 1124 1067 1125 1068 switch (target_phase) { 1126 1069 case SVSB_PHASE_INIT01: 1127 1070 svs_writel_relaxed(svsp, svsb->vboot, VBOOT); 1128 1071 svs_writel_relaxed(svsp, SVSB_INTEN_INIT0x, INTEN); 1129 - svs_writel_relaxed(svsp, SVSB_EN_INIT01, SVSEN); 1072 + svs_writel_relaxed(svsp, SVSB_PTPEN_INIT01, SVSEN); 1130 1073 break; 1131 1074 case SVSB_PHASE_INIT02: 1075 + init2vals = FIELD_PREP(SVSB_INIT2VALS_FLD_AGEVOFFSETIN, svsb->age_voffset_in) | 1076 + FIELD_PREP(SVSB_INIT2VALS_FLD_DCVOFFSETIN, svsb->dc_voffset_in); 1132 1077 svs_writel_relaxed(svsp, SVSB_INTEN_INIT0x, INTEN); 1133 - init2vals = (svsb->age_voffset_in << 16) | svsb->dc_voffset_in; 1134 1078 svs_writel_relaxed(svsp, init2vals, INIT2VALS); 1135 - svs_writel_relaxed(svsp, SVSB_EN_INIT02, SVSEN); 1079 + svs_writel_relaxed(svsp, SVSB_PTPEN_INIT02, SVSEN); 1136 1080 break; 1137 1081 case SVSB_PHASE_MON: 1138 - ts_calcs = (svsb->bts << 12) | svsb->mts; 1082 + ts_calcs = FIELD_PREP(SVSB_TSCALCS_FLD_BTS, svsb->bts) | 1083 + FIELD_PREP(SVSB_TSCALCS_FLD_MTS, svsb->mts); 1139 1084 svs_writel_relaxed(svsp, ts_calcs, TSCALCS); 1140 1085 svs_writel_relaxed(svsp, SVSB_INTEN_MONVOPEN, INTEN); 1141 - svs_writel_relaxed(svsp, SVSB_EN_MON, SVSEN); 1086 + svs_writel_relaxed(svsp, SVSB_PTPEN_MON, SVSEN); 1142 1087 break; 1143 1088 default: 1144 1089 dev_err(svsb->dev, "requested unknown target phase: %u\n", ··· 1178 1115 svs_save_bank_register_data(svsp, SVSB_PHASE_ERROR); 1179 1116 1180 1117 svsb->phase = SVSB_PHASE_ERROR; 1181 - svs_writel_relaxed(svsp, SVSB_EN_OFF, SVSEN); 1182 - svs_writel_relaxed(svsp, SVSB_INTSTS_CLEAN, INTSTS); 1118 + svs_writel_relaxed(svsp, SVSB_PTPEN_OFF, SVSEN); 1119 + svs_writel_relaxed(svsp, SVSB_INTSTS_VAL_CLEAN, INTSTS); 1183 1120 } 1184 1121 1185 1122 static inline void svs_init01_isr_handler(struct svs_platform *svsp) ··· 1204 1141 svsb->age_voffset_in = svs_readl_relaxed(svsp, AGEVALUES) & 1205 1142 GENMASK(15, 0); 1206 1143 1207 - svs_writel_relaxed(svsp, SVSB_EN_OFF, SVSEN); 1208 - svs_writel_relaxed(svsp, SVSB_INTSTS_COMPLETE, INTSTS); 1144 + svs_writel_relaxed(svsp, SVSB_PTPEN_OFF, SVSEN); 1145 + svs_writel_relaxed(svsp, SVSB_INTSTS_F0_COMPLETE, INTSTS); 1209 1146 svsb->core_sel &= ~SVSB_DET_CLK_EN; 1210 1147 } 1211 1148 ··· 1223 1160 svsb->phase = SVSB_PHASE_INIT02; 1224 1161 svsb->get_volts(svsp); 1225 1162 1226 - svs_writel_relaxed(svsp, SVSB_EN_OFF, SVSEN); 1227 - svs_writel_relaxed(svsp, SVSB_INTSTS_COMPLETE, INTSTS); 1163 + svs_writel_relaxed(svsp, SVSB_PTPEN_OFF, SVSEN); 1164 + svs_writel_relaxed(svsp, SVSB_INTSTS_F0_COMPLETE, INTSTS); 1228 1165 } 1229 1166 1230 1167 static inline void svs_mon_mode_isr_handler(struct svs_platform *svsp) ··· 1237 1174 svsb->get_volts(svsp); 1238 1175 1239 1176 svsb->temp = svs_readl_relaxed(svsp, TEMP) & GENMASK(7, 0); 1240 - svs_writel_relaxed(svsp, SVSB_INTSTS_MONVOP, INTSTS); 1177 + svs_writel_relaxed(svsp, SVSB_INTSTS_FLD_MONVOP, INTSTS); 1241 1178 } 1242 1179 1243 1180 static irqreturn_t svs_isr(int irq, void *data) ··· 1264 1201 int_sts = svs_readl_relaxed(svsp, INTSTS); 1265 1202 svs_en = svs_readl_relaxed(svsp, SVSEN); 1266 1203 1267 - if (int_sts == SVSB_INTSTS_COMPLETE && 1268 - svs_en == SVSB_EN_INIT01) 1204 + if (int_sts == SVSB_INTSTS_F0_COMPLETE && 1205 + svs_en == SVSB_PTPEN_INIT01) 1269 1206 svs_init01_isr_handler(svsp); 1270 - else if (int_sts == SVSB_INTSTS_COMPLETE && 1271 - svs_en == SVSB_EN_INIT02) 1207 + else if (int_sts == SVSB_INTSTS_F0_COMPLETE && 1208 + svs_en == SVSB_PTPEN_INIT02) 1272 1209 svs_init02_isr_handler(svsp); 1273 - else if (int_sts & SVSB_INTSTS_MONVOP) 1210 + else if (int_sts & SVSB_INTSTS_FLD_MONVOP) 1274 1211 svs_mon_mode_isr_handler(svsp); 1275 1212 else 1276 1213 svs_error_isr_handler(svsp); ··· 1556 1493 spin_lock_irqsave(&svs_lock, flags); 1557 1494 svsp->pbank = svsb; 1558 1495 svs_switch_bank(svsp); 1559 - svs_writel_relaxed(svsp, SVSB_EN_OFF, SVSEN); 1560 - svs_writel_relaxed(svsp, SVSB_INTSTS_CLEAN, INTSTS); 1496 + svs_writel_relaxed(svsp, SVSB_PTPEN_OFF, SVSEN); 1497 + svs_writel_relaxed(svsp, SVSB_INTSTS_VAL_CLEAN, INTSTS); 1561 1498 spin_unlock_irqrestore(&svs_lock, flags); 1562 1499 1563 1500 svsb->phase = SVSB_PHASE_ERROR; ··· 1652 1589 1653 1590 dev_set_drvdata(svsb->dev, svsp); 1654 1591 1655 - ret = dev_pm_opp_of_add_table(svsb->opp_dev); 1592 + ret = devm_pm_opp_of_add_table(svsb->opp_dev); 1656 1593 if (ret) { 1657 1594 dev_err(svsb->dev, "add opp table fail: %d\n", ret); 1658 1595 return ret; ··· 1707 1644 return 0; 1708 1645 } 1709 1646 1647 + static int svs_thermal_efuse_get_data(struct svs_platform *svsp) 1648 + { 1649 + struct nvmem_cell *cell; 1650 + 1651 + /* Thermal efuse parsing */ 1652 + cell = nvmem_cell_get(svsp->dev, "t-calibration-data"); 1653 + if (IS_ERR_OR_NULL(cell)) { 1654 + dev_err(svsp->dev, "no \"t-calibration-data\"? %ld\n", PTR_ERR(cell)); 1655 + return PTR_ERR(cell); 1656 + } 1657 + 1658 + svsp->tefuse = nvmem_cell_read(cell, &svsp->tefuse_max); 1659 + if (IS_ERR(svsp->tefuse)) { 1660 + dev_err(svsp->dev, "cannot read thermal efuse: %ld\n", 1661 + PTR_ERR(svsp->tefuse)); 1662 + nvmem_cell_put(cell); 1663 + return PTR_ERR(svsp->tefuse); 1664 + } 1665 + 1666 + svsp->tefuse_max /= sizeof(u32); 1667 + nvmem_cell_put(cell); 1668 + 1669 + return 0; 1670 + } 1671 + 1710 1672 static bool svs_mt8192_efuse_parsing(struct svs_platform *svsp) 1711 1673 { 1712 1674 struct svs_bank *svsb; 1713 - struct nvmem_cell *cell; 1714 1675 u32 idx, i, vmin, golden_temp; 1676 + int ret; 1715 1677 1716 1678 for (i = 0; i < svsp->efuse_max; i++) 1717 1679 if (svsp->efuse[i]) ··· 1774 1686 svsb->vmax += svsb->dvt_fixed; 1775 1687 } 1776 1688 1777 - /* Thermal efuse parsing */ 1778 - cell = nvmem_cell_get(svsp->dev, "t-calibration-data"); 1779 - if (IS_ERR_OR_NULL(cell)) { 1780 - dev_err(svsp->dev, "no \"t-calibration-data\"? %ld\n", 1781 - PTR_ERR(cell)); 1689 + ret = svs_thermal_efuse_get_data(svsp); 1690 + if (ret) 1782 1691 return false; 1783 - } 1784 - 1785 - svsp->tefuse = nvmem_cell_read(cell, &svsp->tefuse_max); 1786 - if (IS_ERR(svsp->tefuse)) { 1787 - dev_err(svsp->dev, "cannot read thermal efuse: %ld\n", 1788 - PTR_ERR(svsp->tefuse)); 1789 - nvmem_cell_put(cell); 1790 - return false; 1791 - } 1792 - 1793 - svsp->tefuse_max /= sizeof(u32); 1794 - nvmem_cell_put(cell); 1795 1692 1796 1693 for (i = 0; i < svsp->tefuse_max; i++) 1797 1694 if (svsp->tefuse[i] != 0) ··· 1799 1726 static bool svs_mt8183_efuse_parsing(struct svs_platform *svsp) 1800 1727 { 1801 1728 struct svs_bank *svsb; 1802 - struct nvmem_cell *cell; 1803 1729 int format[6], x_roomt[6], o_vtsmcu[5], o_vtsabb, tb_roomt = 0; 1804 1730 int adc_ge_t, adc_oe_t, ge, oe, gain, degc_cali, adc_cali_en_t; 1805 1731 int o_slope, o_slope_sign, ts_id; 1806 1732 u32 idx, i, ft_pgm, mts, temp0, temp1, temp2; 1733 + int ret; 1807 1734 1808 1735 for (i = 0; i < svsp->efuse_max; i++) 1809 1736 if (svsp->efuse[i]) ··· 1879 1806 } 1880 1807 } 1881 1808 1882 - /* Get thermal efuse by nvmem */ 1883 - cell = nvmem_cell_get(svsp->dev, "t-calibration-data"); 1884 - if (IS_ERR(cell)) { 1885 - dev_err(svsp->dev, "no \"t-calibration-data\"? %ld\n", 1886 - PTR_ERR(cell)); 1887 - goto remove_mt8183_svsb_mon_mode; 1888 - } 1889 - 1890 - svsp->tefuse = nvmem_cell_read(cell, &svsp->tefuse_max); 1891 - if (IS_ERR(svsp->tefuse)) { 1892 - dev_err(svsp->dev, "cannot read thermal efuse: %ld\n", 1893 - PTR_ERR(svsp->tefuse)); 1894 - nvmem_cell_put(cell); 1895 - goto remove_mt8183_svsb_mon_mode; 1896 - } 1897 - 1898 - svsp->tefuse_max /= sizeof(u32); 1899 - nvmem_cell_put(cell); 1809 + ret = svs_thermal_efuse_get_data(svsp); 1810 + if (ret) 1811 + return false; 1900 1812 1901 1813 /* Thermal efuse parsing */ 1902 1814 adc_ge_t = (svsp->tefuse[1] >> 22) & GENMASK(9, 0); ··· 2302 2244 .banks = svs_mt8192_banks, 2303 2245 .efuse_parsing = svs_mt8192_efuse_parsing, 2304 2246 .probe = svs_mt8192_platform_probe, 2305 - .irqflags = IRQF_TRIGGER_HIGH, 2306 2247 .regs = svs_regs_v2, 2307 2248 .bank_max = ARRAY_SIZE(svs_mt8192_banks), 2308 2249 }; ··· 2311 2254 .banks = svs_mt8183_banks, 2312 2255 .efuse_parsing = svs_mt8183_efuse_parsing, 2313 2256 .probe = svs_mt8183_platform_probe, 2314 - .irqflags = IRQF_TRIGGER_LOW, 2315 2257 .regs = svs_regs_v2, 2316 2258 .bank_max = ARRAY_SIZE(svs_mt8183_banks), 2317 2259 }; ··· 2348 2292 svsp->banks = svsp_data->banks; 2349 2293 svsp->efuse_parsing = svsp_data->efuse_parsing; 2350 2294 svsp->probe = svsp_data->probe; 2351 - svsp->irqflags = svsp_data->irqflags; 2352 2295 svsp->regs = svsp_data->regs; 2353 2296 svsp->bank_max = svsp_data->bank_max; 2354 2297 ··· 2361 2306 static int svs_probe(struct platform_device *pdev) 2362 2307 { 2363 2308 struct svs_platform *svsp; 2364 - unsigned int svsp_irq; 2365 - int ret; 2309 + int svsp_irq, ret; 2366 2310 2367 2311 svsp = svs_platform_probe(pdev); 2368 2312 if (IS_ERR(svsp)) ··· 2379 2325 goto svs_probe_free_resource; 2380 2326 } 2381 2327 2382 - svsp_irq = irq_of_parse_and_map(svsp->dev->of_node, 0); 2328 + svsp_irq = platform_get_irq(pdev, 0); 2329 + if (svsp_irq < 0) { 2330 + ret = svsp_irq; 2331 + goto svs_probe_free_resource; 2332 + } 2333 + 2383 2334 ret = devm_request_threaded_irq(svsp->dev, svsp_irq, NULL, svs_isr, 2384 - svsp->irqflags | IRQF_ONESHOT, 2385 - svsp->name, svsp); 2335 + IRQF_ONESHOT, svsp->name, svsp); 2386 2336 if (ret) { 2387 2337 dev_err(svsp->dev, "register irq(%d) failed: %d\n", 2388 2338 svsp_irq, ret); ··· 2450 2392 .driver = { 2451 2393 .name = "mtk-svs", 2452 2394 .pm = &svs_pm_ops, 2453 - .of_match_table = of_match_ptr(svs_of_match), 2395 + .of_match_table = svs_of_match, 2454 2396 }, 2455 2397 }; 2456 2398
+2
include/linux/soc/mediatek/mtk-mmsys.h
··· 65 65 enum mtk_ddp_comp_id cur, 66 66 enum mtk_ddp_comp_id next); 67 67 68 + void mtk_mmsys_ddp_dpi_fmt_config(struct device *dev, u32 val); 69 + 68 70 #endif /* __MTK_MMSYS_H */
+2
include/linux/soc/mediatek/mtk-mutex.h
··· 20 20 MUTEX_MOD_IDX_MDP_WDMA, 21 21 MUTEX_MOD_IDX_MDP_AAL0, 22 22 MUTEX_MOD_IDX_MDP_CCORR0, 23 + MUTEX_MOD_IDX_MDP_HDR0, 24 + MUTEX_MOD_IDX_MDP_COLOR0, 23 25 24 26 MUTEX_MOD_IDX_MAX /* ALWAYS keep at the end */ 25 27 };