@@ -634,6 +634,159 @@ static const struct meson_msr_id clk_msr_c3[] = {
634
634
635
635
};
636
636
637
+ static const struct meson_msr_id clk_msr_s4 [] = {
638
+ CLK_MSR_ID (0 , "sys_clk" ),
639
+ CLK_MSR_ID (1 , "axi_clk" ),
640
+ CLK_MSR_ID (2 , "rtc_clk" ),
641
+ CLK_MSR_ID (5 , "mali" ),
642
+ CLK_MSR_ID (6 , "cpu_clk_div16" ),
643
+ CLK_MSR_ID (7 , "ceca_clk" ),
644
+ CLK_MSR_ID (8 , "cecb_clk" ),
645
+ CLK_MSR_ID (10 , "fclk_div5" ),
646
+ CLK_MSR_ID (11 , "mpll0" ),
647
+ CLK_MSR_ID (12 , "mpll1" ),
648
+ CLK_MSR_ID (13 , "mpll2" ),
649
+ CLK_MSR_ID (14 , "mpll3" ),
650
+ CLK_MSR_ID (15 , "fclk_50m" ),
651
+ CLK_MSR_ID (16 , "pcie_clk_inp" ),
652
+ CLK_MSR_ID (17 , "pcie_clk_inn" ),
653
+ CLK_MSR_ID (18 , "mpll_clk_test_out" ),
654
+ CLK_MSR_ID (19 , "hifi_pll" ),
655
+ CLK_MSR_ID (20 , "gp0_pll" ),
656
+ CLK_MSR_ID (21 , "gp1_pll" ),
657
+ CLK_MSR_ID (22 , "eth_mppll_50m_ckout" ),
658
+ CLK_MSR_ID (23 , "sys_pll_div16" ),
659
+ CLK_MSR_ID (24 , "ddr_dpll_pt_clk" ),
660
+ CLK_MSR_ID (30 , "mod_eth_phy_ref_clk" ),
661
+ CLK_MSR_ID (31 , "mod_eth_tx_clk" ),
662
+ CLK_MSR_ID (32 , "eth_125m" ),
663
+ CLK_MSR_ID (33 , "eth_rmii" ),
664
+ CLK_MSR_ID (34 , "co_clkin_to_mac" ),
665
+ CLK_MSR_ID (35 , "mod_eth_rx_clk_rmii" ),
666
+ CLK_MSR_ID (36 , "co_rx_clk" ),
667
+ CLK_MSR_ID (37 , "co_tx_clk" ),
668
+ CLK_MSR_ID (38 , "eth_phy_rxclk" ),
669
+ CLK_MSR_ID (39 , "eth_phy_plltxclk" ),
670
+ CLK_MSR_ID (40 , "ephy_test_clk" ),
671
+ CLK_MSR_ID (50 , "vid_pll_div_clk_out" ),
672
+ CLK_MSR_ID (51 , "enci" ),
673
+ CLK_MSR_ID (52 , "encp" ),
674
+ CLK_MSR_ID (53 , "encl" ),
675
+ CLK_MSR_ID (54 , "vdac" ),
676
+ CLK_MSR_ID (55 , "cdac_clk_c" ),
677
+ CLK_MSR_ID (56 , "mod_tcon_clko" ),
678
+ CLK_MSR_ID (57 , "lcd_an_clk_ph2" ),
679
+ CLK_MSR_ID (58 , "lcd_an_clk_ph3" ),
680
+ CLK_MSR_ID (59 , "hdmitx_pixel" ),
681
+ CLK_MSR_ID (60 , "vdin_meas" ),
682
+ CLK_MSR_ID (61 , "vpu" ),
683
+ CLK_MSR_ID (62 , "vpu_clkb" ),
684
+ CLK_MSR_ID (63 , "vpu_clkb_tmp" ),
685
+ CLK_MSR_ID (64 , "vpu_clkc" ),
686
+ CLK_MSR_ID (65 , "vid_lock" ),
687
+ CLK_MSR_ID (66 , "vapb" ),
688
+ CLK_MSR_ID (67 , "ge2d" ),
689
+ CLK_MSR_ID (68 , "cts_hdcp22_esmclk" ),
690
+ CLK_MSR_ID (69 , "cts_hdcp22_skpclk" ),
691
+ CLK_MSR_ID (76 , "hdmitx_tmds" ),
692
+ CLK_MSR_ID (77 , "hdmitx_sys_clk" ),
693
+ CLK_MSR_ID (78 , "hdmitx_fe_clk" ),
694
+ CLK_MSR_ID (79 , "rama" ),
695
+ CLK_MSR_ID (93 , "vdec" ),
696
+ CLK_MSR_ID (99 , "hevcf" ),
697
+ CLK_MSR_ID (100 , "demod_core" ),
698
+ CLK_MSR_ID (101 , "adc_extclk_in" ),
699
+ CLK_MSR_ID (102 , "cts_demod_core_t2_clk" ),
700
+ CLK_MSR_ID (103 , "adc_dpll_intclk" ),
701
+ CLK_MSR_ID (104 , "adc_dpll_clk_b3" ),
702
+ CLK_MSR_ID (105 , "s2_adc_clk" ),
703
+ CLK_MSR_ID (106 , "deskew_pll_clk_div32_out" ),
704
+ CLK_MSR_ID (110 , "sc" ),
705
+ CLK_MSR_ID (111 , "sar_adc" ),
706
+ CLK_MSR_ID (113 , "sd_emmc_c" ),
707
+ CLK_MSR_ID (114 , "sd_emmc_b" ),
708
+ CLK_MSR_ID (115 , "sd_emmc_a" ),
709
+ CLK_MSR_ID (116 , "gpio_msr_clk" ),
710
+ CLK_MSR_ID (118 , "spicc0" ),
711
+ CLK_MSR_ID (121 , "ts" ),
712
+ CLK_MSR_ID (130 , "audio_vad_clk" ),
713
+ CLK_MSR_ID (131 , "acodec_dac_clk_x128" ),
714
+ CLK_MSR_ID (132 , "audio_locker_in_clk" ),
715
+ CLK_MSR_ID (133 , "audio_locker_out_clk" ),
716
+ CLK_MSR_ID (134 , "audio_tdmout_c_sclk" ),
717
+ CLK_MSR_ID (135 , "audio_tdmout_b_sclk" ),
718
+ CLK_MSR_ID (136 , "audio_tdmout_a_sclk" ),
719
+ CLK_MSR_ID (137 , "audio_tdmin_lb_sclk" ),
720
+ CLK_MSR_ID (138 , "audio_tdmin_c_sclk" ),
721
+ CLK_MSR_ID (139 , "audio_tdmin_b_sclk" ),
722
+ CLK_MSR_ID (140 , "audio_tdmin_a_sclk" ),
723
+ CLK_MSR_ID (141 , "audio_resamplea_clk" ),
724
+ CLK_MSR_ID (142 , "audio_pdm_sysclk" ),
725
+ CLK_MSR_ID (143 , "audio_spdifout_b_mst_clk" ),
726
+ CLK_MSR_ID (144 , "audio_spdifout_mst_clk" ),
727
+ CLK_MSR_ID (145 , "audio_spdifin_mst_clk" ),
728
+ CLK_MSR_ID (146 , "audio_pdm_dclk" ),
729
+ CLK_MSR_ID (147 , "audio_resampleb_clk" ),
730
+ CLK_MSR_ID (160 , "pwm_j" ),
731
+ CLK_MSR_ID (161 , "pwm_i" ),
732
+ CLK_MSR_ID (162 , "pwm_h" ),
733
+ CLK_MSR_ID (163 , "pwm_g" ),
734
+ CLK_MSR_ID (164 , "pwm_f" ),
735
+ CLK_MSR_ID (165 , "pwm_e" ),
736
+ CLK_MSR_ID (166 , "pwm_d" ),
737
+ CLK_MSR_ID (167 , "pwm_c" ),
738
+ CLK_MSR_ID (168 , "pwm_b" ),
739
+ CLK_MSR_ID (169 , "pwm_a" ),
740
+ CLK_MSR_ID (176 , "rng_ring_0" ),
741
+ CLK_MSR_ID (177 , "rng_ring_1" ),
742
+ CLK_MSR_ID (178 , "rng_ring_2" ),
743
+ CLK_MSR_ID (179 , "rng_ring_3" ),
744
+ CLK_MSR_ID (180 , "dmc_osc_ring(LVT16)" ),
745
+ CLK_MSR_ID (181 , "gpu_osc_ring0(LVT16)" ),
746
+ CLK_MSR_ID (182 , "gpu_osc_ring1(ULVT16)" ),
747
+ CLK_MSR_ID (183 , "gpu_osc_ring2(SLVT16)" ),
748
+ CLK_MSR_ID (184 , "vpu_osc_ring0(SVT24)" ),
749
+ CLK_MSR_ID (185 , "vpu_osc_ring1(LVT20)" ),
750
+ CLK_MSR_ID (186 , "vpu_osc_ring2(LVT16)" ),
751
+ CLK_MSR_ID (187 , "dos_osc_ring0(SVT24)" ),
752
+ CLK_MSR_ID (188 , "dos_osc_ring1(SVT16)" ),
753
+ CLK_MSR_ID (189 , "dos_osc_ring2(LVT16)" ),
754
+ CLK_MSR_ID (190 , "dos_osc_ring3(ULVT20)" ),
755
+ CLK_MSR_ID (192 , "axi_sram_osc_ring(SVT16)" ),
756
+ CLK_MSR_ID (193 , "demod_osc_ring0" ),
757
+ CLK_MSR_ID (194 , "demod_osc_ring1" ),
758
+ CLK_MSR_ID (195 , "sar_osc_ring" ),
759
+ CLK_MSR_ID (196 , "sys_cpu_osc_ring0" ),
760
+ CLK_MSR_ID (197 , "sys_cpu_osc_ring1" ),
761
+ CLK_MSR_ID (198 , "sys_cpu_osc_ring2" ),
762
+ CLK_MSR_ID (199 , "sys_cpu_osc_ring3" ),
763
+ CLK_MSR_ID (200 , "sys_cpu_osc_ring4" ),
764
+ CLK_MSR_ID (201 , "sys_cpu_osc_ring5" ),
765
+ CLK_MSR_ID (202 , "sys_cpu_osc_ring6" ),
766
+ CLK_MSR_ID (203 , "sys_cpu_osc_ring7" ),
767
+ CLK_MSR_ID (204 , "sys_cpu_osc_ring8" ),
768
+ CLK_MSR_ID (205 , "sys_cpu_osc_ring9" ),
769
+ CLK_MSR_ID (206 , "sys_cpu_osc_ring10" ),
770
+ CLK_MSR_ID (207 , "sys_cpu_osc_ring11" ),
771
+ CLK_MSR_ID (208 , "sys_cpu_osc_ring12" ),
772
+ CLK_MSR_ID (209 , "sys_cpu_osc_ring13" ),
773
+ CLK_MSR_ID (210 , "sys_cpu_osc_ring14" ),
774
+ CLK_MSR_ID (211 , "sys_cpu_osc_ring15" ),
775
+ CLK_MSR_ID (212 , "sys_cpu_osc_ring16" ),
776
+ CLK_MSR_ID (213 , "sys_cpu_osc_ring17" ),
777
+ CLK_MSR_ID (214 , "sys_cpu_osc_ring18" ),
778
+ CLK_MSR_ID (215 , "sys_cpu_osc_ring19" ),
779
+ CLK_MSR_ID (216 , "sys_cpu_osc_ring20" ),
780
+ CLK_MSR_ID (217 , "sys_cpu_osc_ring21" ),
781
+ CLK_MSR_ID (218 , "sys_cpu_osc_ring22" ),
782
+ CLK_MSR_ID (219 , "sys_cpu_osc_ring23" ),
783
+ CLK_MSR_ID (220 , "sys_cpu_osc_ring24" ),
784
+ CLK_MSR_ID (221 , "sys_cpu_osc_ring25" ),
785
+ CLK_MSR_ID (222 , "sys_cpu_osc_ring26" ),
786
+ CLK_MSR_ID (223 , "sys_cpu_osc_ring27" ),
787
+
788
+ };
789
+
637
790
static int meson_measure_id (struct meson_msr_id * clk_msr_id ,
638
791
unsigned int duration )
639
792
{
@@ -867,6 +1020,12 @@ static const struct meson_msr_data clk_msr_c3_data = {
867
1020
.reg = & msr_reg_offset_v2 ,
868
1021
};
869
1022
1023
+ static const struct meson_msr_data clk_msr_s4_data = {
1024
+ .msr_table = (void * )clk_msr_s4 ,
1025
+ .msr_count = ARRAY_SIZE (clk_msr_s4 ),
1026
+ .reg = & msr_reg_offset_v2 ,
1027
+ };
1028
+
870
1029
static const struct of_device_id meson_msr_match_table [] = {
871
1030
{
872
1031
.compatible = "amlogic,meson-gx-clk-measure" ,
@@ -896,6 +1055,10 @@ static const struct of_device_id meson_msr_match_table[] = {
896
1055
.compatible = "amlogic,c3-clk-measure" ,
897
1056
.data = & clk_msr_c3_data ,
898
1057
},
1058
+ {
1059
+ .compatible = "amlogic,s4-clk-measure" ,
1060
+ .data = & clk_msr_s4_data ,
1061
+ },
899
1062
{ /* sentinel */ }
900
1063
};
901
1064
MODULE_DEVICE_TABLE (of , meson_msr_match_table );
0 commit comments