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

media: qcom: camss: add support for SDM670 camss

The camera subsystem for the SDM670 the same as on SDM845 except with
3 CSIPHY ports instead of 4. Add support for the SDM670 camera
subsystem.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

authored by

Richard Acayan and committed by
Hans Verkuil
c52643b2 0274ea59

+191
+191
drivers/media/platform/qcom/camss/camss.c
··· 738 738 } 739 739 }; 740 740 741 + static const struct camss_subdev_resources csiphy_res_670[] = { 742 + /* CSIPHY0 */ 743 + { 744 + .regulators = { "vdda-phy", "vdda-pll" }, 745 + .clock = { "soc_ahb", "cpas_ahb", 746 + "csiphy0", "csiphy0_timer" }, 747 + .clock_rate = { { 0 }, 748 + { 0 }, 749 + { 0 }, 750 + { 19200000, 240000000, 269333333 } }, 751 + .reg = { "csiphy0" }, 752 + .interrupt = { "csiphy0" }, 753 + .csiphy = { 754 + .hw_ops = &csiphy_ops_3ph_1_0, 755 + .formats = &csiphy_formats_sdm845 756 + } 757 + }, 758 + 759 + /* CSIPHY1 */ 760 + { 761 + .regulators = { "vdda-phy", "vdda-pll" }, 762 + .clock = { "soc_ahb", "cpas_ahb", 763 + "csiphy1", "csiphy1_timer" }, 764 + .clock_rate = { { 0 }, 765 + { 0 }, 766 + { 0 }, 767 + { 19200000, 240000000, 269333333 } }, 768 + .reg = { "csiphy1" }, 769 + .interrupt = { "csiphy1" }, 770 + .csiphy = { 771 + .hw_ops = &csiphy_ops_3ph_1_0, 772 + .formats = &csiphy_formats_sdm845 773 + } 774 + }, 775 + 776 + /* CSIPHY2 */ 777 + { 778 + .regulators = { "vdda-phy", "vdda-pll" }, 779 + .clock = { "soc_ahb", "cpas_ahb", 780 + "csiphy2", "csiphy2_timer" }, 781 + .clock_rate = { { 0 }, 782 + { 0 }, 783 + { 0 }, 784 + { 19200000, 240000000, 269333333 } }, 785 + .reg = { "csiphy2" }, 786 + .interrupt = { "csiphy2" }, 787 + .csiphy = { 788 + .hw_ops = &csiphy_ops_3ph_1_0, 789 + .formats = &csiphy_formats_sdm845 790 + } 791 + } 792 + }; 793 + 794 + static const struct camss_subdev_resources csid_res_670[] = { 795 + /* CSID0 */ 796 + { 797 + .regulators = {}, 798 + .clock = { "cpas_ahb", "soc_ahb", "vfe0", 799 + "vfe0_cphy_rx", "csi0" }, 800 + .clock_rate = { { 0 }, 801 + { 0 }, 802 + { 100000000, 320000000, 404000000, 480000000, 600000000 }, 803 + { 384000000 }, 804 + { 19200000, 75000000, 384000000, 538666667 } }, 805 + .reg = { "csid0" }, 806 + .interrupt = { "csid0" }, 807 + .csid = { 808 + .hw_ops = &csid_ops_gen2, 809 + .parent_dev_ops = &vfe_parent_dev_ops, 810 + .formats = &csid_formats_gen2 811 + } 812 + }, 813 + 814 + /* CSID1 */ 815 + { 816 + .regulators = {}, 817 + .clock = { "cpas_ahb", "soc_ahb", "vfe1", 818 + "vfe1_cphy_rx", "csi1" }, 819 + .clock_rate = { { 0 }, 820 + { 0 }, 821 + { 100000000, 320000000, 404000000, 480000000, 600000000 }, 822 + { 384000000 }, 823 + { 19200000, 75000000, 384000000, 538666667 } }, 824 + .reg = { "csid1" }, 825 + .interrupt = { "csid1" }, 826 + .csid = { 827 + .hw_ops = &csid_ops_gen2, 828 + .parent_dev_ops = &vfe_parent_dev_ops, 829 + .formats = &csid_formats_gen2 830 + } 831 + }, 832 + 833 + /* CSID2 */ 834 + { 835 + .regulators = {}, 836 + .clock = { "cpas_ahb", "soc_ahb", "vfe_lite", 837 + "vfe_lite_cphy_rx", "csi2" }, 838 + .clock_rate = { { 0 }, 839 + { 0 }, 840 + { 100000000, 320000000, 404000000, 480000000, 600000000 }, 841 + { 384000000 }, 842 + { 19200000, 75000000, 384000000, 538666667 } }, 843 + .reg = { "csid2" }, 844 + .interrupt = { "csid2" }, 845 + .csid = { 846 + .is_lite = true, 847 + .hw_ops = &csid_ops_gen2, 848 + .parent_dev_ops = &vfe_parent_dev_ops, 849 + .formats = &csid_formats_gen2 850 + } 851 + } 852 + }; 853 + 854 + static const struct camss_subdev_resources vfe_res_670[] = { 855 + /* VFE0 */ 856 + { 857 + .regulators = {}, 858 + .clock = { "camnoc_axi", "cpas_ahb", "soc_ahb", 859 + "vfe0", "vfe0_axi" }, 860 + .clock_rate = { { 0 }, 861 + { 0 }, 862 + { 0 }, 863 + { 100000000, 320000000, 404000000, 480000000, 600000000 }, 864 + { 0 } }, 865 + .reg = { "vfe0" }, 866 + .interrupt = { "vfe0" }, 867 + .vfe = { 868 + .line_num = 4, 869 + .has_pd = true, 870 + .pd_name = "ife0", 871 + .hw_ops = &vfe_ops_170, 872 + .formats_rdi = &vfe_formats_rdi_845, 873 + .formats_pix = &vfe_formats_pix_845 874 + } 875 + }, 876 + 877 + /* VFE1 */ 878 + { 879 + .regulators = {}, 880 + .clock = { "camnoc_axi", "cpas_ahb", "soc_ahb", 881 + "vfe1", "vfe1_axi" }, 882 + .clock_rate = { { 0 }, 883 + { 0 }, 884 + { 0 }, 885 + { 100000000, 320000000, 404000000, 480000000, 600000000 }, 886 + { 0 } }, 887 + .reg = { "vfe1" }, 888 + .interrupt = { "vfe1" }, 889 + .vfe = { 890 + .line_num = 4, 891 + .has_pd = true, 892 + .pd_name = "ife1", 893 + .hw_ops = &vfe_ops_170, 894 + .formats_rdi = &vfe_formats_rdi_845, 895 + .formats_pix = &vfe_formats_pix_845 896 + } 897 + }, 898 + 899 + /* VFE-lite */ 900 + { 901 + .regulators = {}, 902 + .clock = { "camnoc_axi", "cpas_ahb", "soc_ahb", 903 + "vfe_lite" }, 904 + .clock_rate = { { 0 }, 905 + { 0 }, 906 + { 0 }, 907 + { 100000000, 320000000, 404000000, 480000000, 600000000 } }, 908 + .reg = { "vfe_lite" }, 909 + .interrupt = { "vfe_lite" }, 910 + .vfe = { 911 + .is_lite = true, 912 + .line_num = 4, 913 + .hw_ops = &vfe_ops_170, 914 + .formats_rdi = &vfe_formats_rdi_845, 915 + .formats_pix = &vfe_formats_pix_845 916 + } 917 + } 918 + }; 919 + 741 920 static const struct camss_subdev_resources csiphy_res_845[] = { 742 921 /* CSIPHY0 */ 743 922 { ··· 3425 3246 .link_entities = camss_link_entities 3426 3247 }; 3427 3248 3249 + static const struct camss_resources sdm670_resources = { 3250 + .version = CAMSS_845, 3251 + .csiphy_res = csiphy_res_670, 3252 + .csid_res = csid_res_670, 3253 + .vfe_res = vfe_res_670, 3254 + .csiphy_num = ARRAY_SIZE(csiphy_res_670), 3255 + .csid_num = ARRAY_SIZE(csid_res_670), 3256 + .vfe_num = ARRAY_SIZE(vfe_res_670), 3257 + .link_entities = camss_link_entities 3258 + }; 3259 + 3428 3260 static const struct camss_resources sdm845_resources = { 3429 3261 .version = CAMSS_845, 3430 3262 .csiphy_res = csiphy_res_845, ··· 3512 3322 { .compatible = "qcom,sc7280-camss", .data = &sc7280_resources }, 3513 3323 { .compatible = "qcom,sc8280xp-camss", .data = &sc8280xp_resources }, 3514 3324 { .compatible = "qcom,sdm660-camss", .data = &sdm660_resources }, 3325 + { .compatible = "qcom,sdm670-camss", .data = &sdm670_resources }, 3515 3326 { .compatible = "qcom,sdm845-camss", .data = &sdm845_resources }, 3516 3327 { .compatible = "qcom,sm8250-camss", .data = &sm8250_resources }, 3517 3328 { .compatible = "qcom,sm8550-camss", .data = &sm8550_resources },