Loading Documentation/devicetree/bindings/media/video/msm-cam-cpas.txt +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,11 @@ First Level Node - CAM CPAS device Value type: <u32> Definition: Interrupt associated with CAMNOC HW. - qcom,cpas-hw-ver Usage: required Value type: <u32> Definition: CAM HW Version information. - regulator-names Usage: required Value type: <string> Loading Loading @@ -181,6 +186,7 @@ Example: reg-cam-base = <0x40000 0x42000>; interrupt-names = "cpas_camnoc"; interrupts = <0 459 0>; qcom,cpas-hw-ver = <0x170100>; /* Titan v170 v1.0.0 */ regulator-names = "camss-vdd"; camss-vdd-supply = <&titan_top_gdsc>; clock-names = "gcc_ahb_clk", Loading arch/arm64/boot/dts/qcom/sdm845-camera.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ reg-cam-base = <0x40000 0x42000>; interrupt-names = "cpas_camnoc"; interrupts = <0 459 0>; qcom,cpas-hw-ver = <0x170100>; /* Titan v170 v1.0.0 */ regulator-names = "camss-vdd"; camss-vdd-supply = <&titan_top_gdsc>; clock-names = "gcc_ahb_clk", Loading arch/arm64/boot/dts/qcom/sdm845-v2-camera.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,7 @@ reg-cam-base = <0x40000 0x42000>; interrupt-names = "cpas_camnoc"; interrupts = <0 459 0>; qcom,cpas-hw-ver = <0x170110>; /* Titan v170 v1.1.0 */ regulator-names = "camss-vdd"; camss-vdd-supply = <&titan_top_gdsc>; clock-names = "gcc_ahb_clk", Loading drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c +25 −0 Original line number Diff line number Diff line Loading @@ -1302,6 +1302,27 @@ static int cam_cpas_util_get_internal_ops(struct platform_device *pdev, return rc; } static int cam_cpas_util_get_hw_version(struct platform_device *pdev, struct cam_hw_soc_info *soc_info) { struct device_node *of_node = pdev->dev.of_node; int rc; soc_info->hw_version = 0; rc = of_property_read_u32(of_node, "qcom,cpas-hw-ver", &soc_info->hw_version); CAM_DBG(CAM_CPAS, "CPAS HW VERSION %x", soc_info->hw_version); if (rc) { CAM_ERR(CAM_CPAS, "failed to get CPAS HW Version rc=%d", rc); return -EINVAL; } return rc; } int cam_cpas_hw_probe(struct platform_device *pdev, struct cam_hw_intf **hw_intf) { Loading Loading @@ -1442,6 +1463,10 @@ int cam_cpas_hw_probe(struct platform_device *pdev, if (rc) goto axi_cleanup; rc = cam_cpas_util_get_hw_version(pdev, &cpas_hw->soc_info); if (rc) goto axi_cleanup; *hw_intf = cpas_hw_intf; return 0; Loading drivers/media/platform/msm/camera/cam_cpas/cam_cpas_intf.c +27 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,33 @@ struct cam_cpas_intf { static struct cam_cpas_intf *g_cpas_intf; int cam_cpas_get_cpas_hw_version(uint32_t *hw_version) { struct cam_hw_info *cpas_hw = NULL; if (!CAM_CPAS_INTF_INITIALIZED()) { CAM_ERR(CAM_CPAS, "cpas intf not initialized"); return -ENODEV; } if (!hw_version) { CAM_ERR(CAM_CPAS, "invalid input %pK", hw_version); return -EINVAL; } cpas_hw = (struct cam_hw_info *) g_cpas_intf->hw_intf->hw_priv; *hw_version = cpas_hw->soc_info.hw_version; if (*hw_version == CAM_CPAS_TITAN_NONE) { CAM_DBG(CAM_CPAS, "Didn't find a valid HW Version %d", *hw_version); } return 0; } int cam_cpas_get_hw_info(uint32_t *camera_family, struct cam_hw_version *camera_version, struct cam_hw_version *cpas_version) Loading Loading
Documentation/devicetree/bindings/media/video/msm-cam-cpas.txt +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,11 @@ First Level Node - CAM CPAS device Value type: <u32> Definition: Interrupt associated with CAMNOC HW. - qcom,cpas-hw-ver Usage: required Value type: <u32> Definition: CAM HW Version information. - regulator-names Usage: required Value type: <string> Loading Loading @@ -181,6 +186,7 @@ Example: reg-cam-base = <0x40000 0x42000>; interrupt-names = "cpas_camnoc"; interrupts = <0 459 0>; qcom,cpas-hw-ver = <0x170100>; /* Titan v170 v1.0.0 */ regulator-names = "camss-vdd"; camss-vdd-supply = <&titan_top_gdsc>; clock-names = "gcc_ahb_clk", Loading
arch/arm64/boot/dts/qcom/sdm845-camera.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,7 @@ reg-cam-base = <0x40000 0x42000>; interrupt-names = "cpas_camnoc"; interrupts = <0 459 0>; qcom,cpas-hw-ver = <0x170100>; /* Titan v170 v1.0.0 */ regulator-names = "camss-vdd"; camss-vdd-supply = <&titan_top_gdsc>; clock-names = "gcc_ahb_clk", Loading
arch/arm64/boot/dts/qcom/sdm845-v2-camera.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,7 @@ reg-cam-base = <0x40000 0x42000>; interrupt-names = "cpas_camnoc"; interrupts = <0 459 0>; qcom,cpas-hw-ver = <0x170110>; /* Titan v170 v1.1.0 */ regulator-names = "camss-vdd"; camss-vdd-supply = <&titan_top_gdsc>; clock-names = "gcc_ahb_clk", Loading
drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c +25 −0 Original line number Diff line number Diff line Loading @@ -1302,6 +1302,27 @@ static int cam_cpas_util_get_internal_ops(struct platform_device *pdev, return rc; } static int cam_cpas_util_get_hw_version(struct platform_device *pdev, struct cam_hw_soc_info *soc_info) { struct device_node *of_node = pdev->dev.of_node; int rc; soc_info->hw_version = 0; rc = of_property_read_u32(of_node, "qcom,cpas-hw-ver", &soc_info->hw_version); CAM_DBG(CAM_CPAS, "CPAS HW VERSION %x", soc_info->hw_version); if (rc) { CAM_ERR(CAM_CPAS, "failed to get CPAS HW Version rc=%d", rc); return -EINVAL; } return rc; } int cam_cpas_hw_probe(struct platform_device *pdev, struct cam_hw_intf **hw_intf) { Loading Loading @@ -1442,6 +1463,10 @@ int cam_cpas_hw_probe(struct platform_device *pdev, if (rc) goto axi_cleanup; rc = cam_cpas_util_get_hw_version(pdev, &cpas_hw->soc_info); if (rc) goto axi_cleanup; *hw_intf = cpas_hw_intf; return 0; Loading
drivers/media/platform/msm/camera/cam_cpas/cam_cpas_intf.c +27 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,33 @@ struct cam_cpas_intf { static struct cam_cpas_intf *g_cpas_intf; int cam_cpas_get_cpas_hw_version(uint32_t *hw_version) { struct cam_hw_info *cpas_hw = NULL; if (!CAM_CPAS_INTF_INITIALIZED()) { CAM_ERR(CAM_CPAS, "cpas intf not initialized"); return -ENODEV; } if (!hw_version) { CAM_ERR(CAM_CPAS, "invalid input %pK", hw_version); return -EINVAL; } cpas_hw = (struct cam_hw_info *) g_cpas_intf->hw_intf->hw_priv; *hw_version = cpas_hw->soc_info.hw_version; if (*hw_version == CAM_CPAS_TITAN_NONE) { CAM_DBG(CAM_CPAS, "Didn't find a valid HW Version %d", *hw_version); } return 0; } int cam_cpas_get_hw_info(uint32_t *camera_family, struct cam_hw_version *camera_version, struct cam_hw_version *cpas_version) Loading