Lines Matching +full:axg +full:- +full:pdm
1 // SPDX-License-Identifier: GPL-2.0+
113 CLK_MSR_ID(12, "pdm"),
494 struct meson_msr *priv = clk_msr_id->priv; in meson_measure_id()
502 regmap_write(priv->regmap, MSR_CLK_REG0, 0); in meson_measure_id()
505 regmap_update_bits(priv->regmap, MSR_CLK_REG0, MSR_DURATION, in meson_measure_id()
506 FIELD_PREP(MSR_DURATION, duration - 1)); in meson_measure_id()
509 regmap_update_bits(priv->regmap, MSR_CLK_REG0, MSR_CLK_SRC, in meson_measure_id()
510 FIELD_PREP(MSR_CLK_SRC, clk_msr_id->id)); in meson_measure_id()
513 regmap_update_bits(priv->regmap, MSR_CLK_REG0, in meson_measure_id()
517 ret = regmap_read_poll_timeout(priv->regmap, MSR_CLK_REG0, in meson_measure_id()
525 regmap_update_bits(priv->regmap, MSR_CLK_REG0, MSR_ENABLE, 0); in meson_measure_id()
528 regmap_read(priv->regmap, MSR_CLK_REG2, &val); in meson_measure_id()
533 return -EINVAL; in meson_measure_id()
551 duration -= DIV_STEP; in meson_measure_best_id()
552 } while (duration >= DIV_MIN && ret == -EINVAL); in meson_measure_best_id()
559 struct meson_msr_id *clk_msr_id = s->private; in clk_msr_show()
567 seq_printf(s, "%d\t+/-%dHz\n", val, precision); in clk_msr_show()
575 struct meson_msr_id *msr_table = s->private; in clk_msr_summary_show()
580 seq_puts(s, "---------------------------------------------\n"); in clk_msr_summary_show()
590 seq_printf(s, " %-20s %10d +/-%dHz\n", in clk_msr_summary_show()
613 priv = devm_kzalloc(&pdev->dev, sizeof(struct meson_msr), in meson_msr_probe()
616 return -ENOMEM; in meson_msr_probe()
618 match_data = device_get_match_data(&pdev->dev); in meson_msr_probe()
620 dev_err(&pdev->dev, "failed to get match data\n"); in meson_msr_probe()
621 return -ENODEV; in meson_msr_probe()
624 memcpy(priv->msr_table, match_data, sizeof(priv->msr_table)); in meson_msr_probe()
630 priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, in meson_msr_probe()
632 if (IS_ERR(priv->regmap)) in meson_msr_probe()
633 return PTR_ERR(priv->regmap); in meson_msr_probe()
635 root = debugfs_create_dir("meson-clk-msr", NULL); in meson_msr_probe()
639 priv->msr_table, &clk_msr_summary_fops); in meson_msr_probe()
642 if (!priv->msr_table[i].name) in meson_msr_probe()
645 priv->msr_table[i].priv = priv; in meson_msr_probe()
647 debugfs_create_file(priv->msr_table[i].name, 0444, clks, in meson_msr_probe()
648 &priv->msr_table[i], &clk_msr_fops); in meson_msr_probe()
656 .compatible = "amlogic,meson-gx-clk-measure",
660 .compatible = "amlogic,meson8-clk-measure",
664 .compatible = "amlogic,meson8b-clk-measure",
668 .compatible = "amlogic,meson-axg-clk-measure",
672 .compatible = "amlogic,meson-g12a-clk-measure",
676 .compatible = "amlogic,meson-sm1-clk-measure",