Loading Documentation/devicetree/bindings/pil/pil-q6v5-mss.txt +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ Optional properties: This may be a shared regulator that is already voted on in the PIL proxy voting code (and also managed by the modem on its own), hence we mark it as as optional. - vdd_mss-uV: Voltage to set for vdd_mss. - vdd_pll-supply: Reference to the regulator that supplies the PLL's rail. - qcom,vdd_pll: Voltage to be set for the PLL's rail. - reg-names: "cxrail_bhs_reg" - control register for modem power Loading arch/arm64/boot/dts/qcom/sdm845-interposer-pm660.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,10 @@ &soc { /delete-node/ gpio_keys; qcom,mss@4080000 { /delete-property/ vdd_mss-supply; }; qcom,lpass@17300000 { /delete-property/ vdd_cx-supply; }; Loading arch/arm64/boot/dts/qcom/sdm845.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,8 @@ vdd_cx-voltage = <RPMH_REGULATOR_LEVEL_TURBO>; vdd_mx-supply = <&pm8998_s6_level>; vdd_mx-uV = <RPMH_REGULATOR_LEVEL_TURBO>; vdd_mss-supply = <&pm8005_s2_level>; vdd_mss-uV = <RPMH_REGULATOR_LEVEL_NOM>; qcom,firmware-name = "modem"; qcom,pil-self-auth; qcom,sysmon-id = <0>; Loading drivers/soc/qcom/pil-msa.c +34 −10 Original line number Diff line number Diff line Loading @@ -124,13 +124,6 @@ static int pil_mss_power_up(struct q6v5_data *drv) int ret = 0; u32 regval; if (drv->vreg) { ret = regulator_enable(drv->vreg); if (ret) dev_err(drv->desc.dev, "Failed to enable modem regulator(rc:%d)\n", ret); } if (drv->cxrail_bhs) { regval = readl_relaxed(drv->cxrail_bhs); regval |= EXTERNAL_BHS_ON; Loading @@ -153,9 +146,6 @@ static int pil_mss_power_down(struct q6v5_data *drv) writel_relaxed(regval, drv->cxrail_bhs); } if (drv->vreg) return regulator_disable(drv->vreg); return 0; } Loading Loading @@ -456,7 +446,37 @@ int pil_mss_make_proxy_votes(struct pil_desc *pil) return ret; } if (drv->vreg) { ret = of_property_read_u32(pil->dev->of_node, "vdd_mss-uV", &uv); if (ret) { dev_err(pil->dev, "missing vdd_mss-uV property(rc:%d)\n", ret); goto out; } ret = regulator_set_voltage(drv->vreg, uv, INT_MAX); if (ret) { dev_err(pil->dev, "Failed to set vreg voltage(rc:%d)\n", ret); goto out; } ret = regulator_set_load(drv->vreg, 100000); if (ret < 0) { dev_err(pil->dev, "Failed to set vreg mode(rc:%d)\n", ret); goto out; } } ret = pil_q6v5_make_proxy_votes(pil); if (ret && drv->vreg) { regulator_disable(drv->vreg); regulator_set_voltage(drv->vreg, 0, INT_MAX); } out: if (ret) { regulator_disable(drv->vreg_mx); regulator_set_voltage(drv->vreg_mx, 0, INT_MAX); Loading @@ -472,6 +492,10 @@ void pil_mss_remove_proxy_votes(struct pil_desc *pil) pil_q6v5_remove_proxy_votes(pil); regulator_disable(drv->vreg_mx); regulator_set_voltage(drv->vreg_mx, 0, INT_MAX); if (drv->vreg) { regulator_disable(drv->vreg); regulator_set_voltage(drv->vreg, 0, INT_MAX); } } static int pil_mss_mem_setup(struct pil_desc *pil, Loading drivers/soc/qcom/pil-msa.h +0 −2 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ #include "peripheral-loader.h" #define VDD_MSS_UV 1000000 struct modem_data { struct q6v5_data *q6; struct subsys_device *subsys; Loading Loading
Documentation/devicetree/bindings/pil/pil-q6v5-mss.txt +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ Optional properties: This may be a shared regulator that is already voted on in the PIL proxy voting code (and also managed by the modem on its own), hence we mark it as as optional. - vdd_mss-uV: Voltage to set for vdd_mss. - vdd_pll-supply: Reference to the regulator that supplies the PLL's rail. - qcom,vdd_pll: Voltage to be set for the PLL's rail. - reg-names: "cxrail_bhs_reg" - control register for modem power Loading
arch/arm64/boot/dts/qcom/sdm845-interposer-pm660.dtsi +4 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,10 @@ &soc { /delete-node/ gpio_keys; qcom,mss@4080000 { /delete-property/ vdd_mss-supply; }; qcom,lpass@17300000 { /delete-property/ vdd_cx-supply; }; Loading
arch/arm64/boot/dts/qcom/sdm845.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,8 @@ vdd_cx-voltage = <RPMH_REGULATOR_LEVEL_TURBO>; vdd_mx-supply = <&pm8998_s6_level>; vdd_mx-uV = <RPMH_REGULATOR_LEVEL_TURBO>; vdd_mss-supply = <&pm8005_s2_level>; vdd_mss-uV = <RPMH_REGULATOR_LEVEL_NOM>; qcom,firmware-name = "modem"; qcom,pil-self-auth; qcom,sysmon-id = <0>; Loading
drivers/soc/qcom/pil-msa.c +34 −10 Original line number Diff line number Diff line Loading @@ -124,13 +124,6 @@ static int pil_mss_power_up(struct q6v5_data *drv) int ret = 0; u32 regval; if (drv->vreg) { ret = regulator_enable(drv->vreg); if (ret) dev_err(drv->desc.dev, "Failed to enable modem regulator(rc:%d)\n", ret); } if (drv->cxrail_bhs) { regval = readl_relaxed(drv->cxrail_bhs); regval |= EXTERNAL_BHS_ON; Loading @@ -153,9 +146,6 @@ static int pil_mss_power_down(struct q6v5_data *drv) writel_relaxed(regval, drv->cxrail_bhs); } if (drv->vreg) return regulator_disable(drv->vreg); return 0; } Loading Loading @@ -456,7 +446,37 @@ int pil_mss_make_proxy_votes(struct pil_desc *pil) return ret; } if (drv->vreg) { ret = of_property_read_u32(pil->dev->of_node, "vdd_mss-uV", &uv); if (ret) { dev_err(pil->dev, "missing vdd_mss-uV property(rc:%d)\n", ret); goto out; } ret = regulator_set_voltage(drv->vreg, uv, INT_MAX); if (ret) { dev_err(pil->dev, "Failed to set vreg voltage(rc:%d)\n", ret); goto out; } ret = regulator_set_load(drv->vreg, 100000); if (ret < 0) { dev_err(pil->dev, "Failed to set vreg mode(rc:%d)\n", ret); goto out; } } ret = pil_q6v5_make_proxy_votes(pil); if (ret && drv->vreg) { regulator_disable(drv->vreg); regulator_set_voltage(drv->vreg, 0, INT_MAX); } out: if (ret) { regulator_disable(drv->vreg_mx); regulator_set_voltage(drv->vreg_mx, 0, INT_MAX); Loading @@ -472,6 +492,10 @@ void pil_mss_remove_proxy_votes(struct pil_desc *pil) pil_q6v5_remove_proxy_votes(pil); regulator_disable(drv->vreg_mx); regulator_set_voltage(drv->vreg_mx, 0, INT_MAX); if (drv->vreg) { regulator_disable(drv->vreg); regulator_set_voltage(drv->vreg, 0, INT_MAX); } } static int pil_mss_mem_setup(struct pil_desc *pil, Loading
drivers/soc/qcom/pil-msa.h +0 −2 Original line number Diff line number Diff line Loading @@ -17,8 +17,6 @@ #include "peripheral-loader.h" #define VDD_MSS_UV 1000000 struct modem_data { struct q6v5_data *q6; struct subsys_device *subsys; Loading