* [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 @ 2021-03-25 5:44 Rajendra Nayak 2021-03-25 5:44 ` [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 Rajendra Nayak ` (3 more replies) 0 siblings, 4 replies; 7+ messages in thread From: Rajendra Nayak @ 2021-03-25 5:44 UTC (permalink / raw) To: srinivas.kandagatla, robh+dt Cc: linux-arm-msm, devicetree, linux-kernel, dianders, Rajendra Nayak Document SoC compatible for sc7280 Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> --- Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml index 992777c..861b205 100644 --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml @@ -24,6 +24,7 @@ properties: - qcom,msm8998-qfprom - qcom,qcs404-qfprom - qcom,sc7180-qfprom + - qcom,sc7280-qfprom - qcom,sdm845-qfprom - const: qcom,qfprom -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 2021-03-25 5:44 [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rajendra Nayak @ 2021-03-25 5:44 ` Rajendra Nayak 2021-03-30 21:19 ` Doug Anderson 2021-03-27 17:40 ` [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rob Herring ` (2 subsequent siblings) 3 siblings, 1 reply; 7+ messages in thread From: Rajendra Nayak @ 2021-03-25 5:44 UTC (permalink / raw) To: srinivas.kandagatla, robh+dt Cc: linux-arm-msm, devicetree, linux-kernel, dianders, Rajendra Nayak, Ravi Kumar Bokka Handle the differences across LDO voltage needed for blowing fuses, and the blow timer value, identified using a minor version of 15 on sc7280. Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org> --- Applies on top of https://lore.kernel.org/patchwork/patch/1376175/ drivers/nvmem/qfprom.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c index 100d69d..d6d3f24 100644 --- a/drivers/nvmem/qfprom.c +++ b/drivers/nvmem/qfprom.c @@ -45,11 +45,13 @@ MODULE_PARM_DESC(read_raw_data, "Read raw instead of corrected data"); * @qfprom_blow_timer_value: The timer value of qfprom when doing efuse blow. * @qfprom_blow_set_freq: The frequency required to set when we start the * fuse blowing. + * @qfprom_blow_uV: LDO voltage to be set when doing efuse blow */ struct qfprom_soc_data { u32 accel_value; u32 qfprom_blow_timer_value; u32 qfprom_blow_set_freq; + int qfprom_blow_uV; }; /** @@ -111,6 +113,15 @@ static const struct qfprom_soc_compatible_data sc7180_qfprom = { .nkeepout = ARRAY_SIZE(sc7180_qfprom_keepout) }; +static const struct nvmem_keepout sc7280_qfprom_keepout[] = { + {.start = 0x128, .end = 0x148}, + {.start = 0x238, .end = 0x248} +}; + +static const struct qfprom_soc_compatible_data sc7280_qfprom = { + .keepout = sc7280_qfprom_keepout, + .nkeepout = ARRAY_SIZE(sc7280_qfprom_keepout) +}; /** * qfprom_disable_fuse_blowing() - Undo enabling of fuse blowing. * @priv: Our driver data. @@ -168,6 +179,7 @@ static int qfprom_enable_fuse_blowing(const struct qfprom_priv *priv, struct qfprom_touched_values *old) { int ret; + int qfprom_blow_uV = priv->soc_data->qfprom_blow_uV; ret = clk_prepare_enable(priv->secclk); if (ret) { @@ -187,9 +199,9 @@ static int qfprom_enable_fuse_blowing(const struct qfprom_priv *priv, * a rail shared do don't specify a max--regulator constraints * will handle. */ - ret = regulator_set_voltage(priv->vcc, 1800000, INT_MAX); + ret = regulator_set_voltage(priv->vcc, qfprom_blow_uV, INT_MAX); if (ret) { - dev_err(priv->dev, "Failed to set 1.8 voltage\n"); + dev_err(priv->dev, "Failed to set %duV\n", qfprom_blow_uV); goto err_clk_rate_set; } @@ -311,6 +323,14 @@ static const struct qfprom_soc_data qfprom_7_8_data = { .accel_value = 0xD10, .qfprom_blow_timer_value = 25, .qfprom_blow_set_freq = 4800000, + .qfprom_blow_uV = 1800000, +}; + +static const struct qfprom_soc_data qfprom_7_15_data = { + .accel_value = 0xD08, + .qfprom_blow_timer_value = 24, + .qfprom_blow_set_freq = 4800000, + .qfprom_blow_uV = 1900000, }; static int qfprom_probe(struct platform_device *pdev) @@ -379,6 +399,8 @@ static int qfprom_probe(struct platform_device *pdev) if (major_version == 7 && minor_version == 8) priv->soc_data = &qfprom_7_8_data; + if (major_version == 7 && minor_version == 15) + priv->soc_data = &qfprom_7_15_data; priv->vcc = devm_regulator_get(&pdev->dev, "vcc"); if (IS_ERR(priv->vcc)) @@ -405,6 +427,7 @@ static int qfprom_probe(struct platform_device *pdev) static const struct of_device_id qfprom_of_match[] = { { .compatible = "qcom,qfprom",}, { .compatible = "qcom,sc7180-qfprom", .data = &sc7180_qfprom}, + { .compatible = "qcom,sc7280-qfprom", .data = &sc7280_qfprom}, {/* sentinel */}, }; MODULE_DEVICE_TABLE(of, qfprom_of_match); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 2021-03-25 5:44 ` [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 Rajendra Nayak @ 2021-03-30 21:19 ` Doug Anderson 2021-04-07 6:49 ` Rajendra Nayak 0 siblings, 1 reply; 7+ messages in thread From: Doug Anderson @ 2021-03-30 21:19 UTC (permalink / raw) To: Rajendra Nayak Cc: Srinivas Kandagatla, Rob Herring, linux-arm-msm, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML, Ravi Kumar Bokka Hi, On Wed, Mar 24, 2021 at 10:45 PM Rajendra Nayak <rnayak@codeaurora.org> wrote: > > @@ -111,6 +113,15 @@ static const struct qfprom_soc_compatible_data sc7180_qfprom = { > .nkeepout = ARRAY_SIZE(sc7180_qfprom_keepout) > }; > > +static const struct nvmem_keepout sc7280_qfprom_keepout[] = { > + {.start = 0x128, .end = 0x148}, > + {.start = 0x238, .end = 0x248} > +}; > + > +static const struct qfprom_soc_compatible_data sc7280_qfprom = { > + .keepout = sc7280_qfprom_keepout, > + .nkeepout = ARRAY_SIZE(sc7280_qfprom_keepout) > +}; > /** nit: blank line between structure and comment? > @@ -187,9 +199,9 @@ static int qfprom_enable_fuse_blowing(const struct qfprom_priv *priv, > * a rail shared do don't specify a max--regulator constraints > * will handle. > */ > - ret = regulator_set_voltage(priv->vcc, 1800000, INT_MAX); > + ret = regulator_set_voltage(priv->vcc, qfprom_blow_uV, INT_MAX); > if (ret) { > - dev_err(priv->dev, "Failed to set 1.8 voltage\n"); > + dev_err(priv->dev, "Failed to set %duV\n", qfprom_blow_uV); nit: the comment above this block (not in the unified diff) specifically calls out 1.8V. It'd be nice if you updated the comment since it's no longer fixed at 1.8V. > @@ -379,6 +399,8 @@ static int qfprom_probe(struct platform_device *pdev) > > if (major_version == 7 && minor_version == 8) > priv->soc_data = &qfprom_7_8_data; > + if (major_version == 7 && minor_version == 15) > + priv->soc_data = &qfprom_7_15_data; nit: "else if" instead of "if"? I guess I'm a little late since I think this already got applied, but all the above are nits. Maybe you could send a follow-up patch to address them? -Doug ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 2021-03-30 21:19 ` Doug Anderson @ 2021-04-07 6:49 ` Rajendra Nayak 0 siblings, 0 replies; 7+ messages in thread From: Rajendra Nayak @ 2021-04-07 6:49 UTC (permalink / raw) To: Doug Anderson Cc: Srinivas Kandagatla, Rob Herring, linux-arm-msm, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML, Ravi Kumar Bokka On 3/31/2021 2:49 AM, Doug Anderson wrote: > Hi, > > On Wed, Mar 24, 2021 at 10:45 PM Rajendra Nayak <rnayak@codeaurora.org> wrote: >> >> @@ -111,6 +113,15 @@ static const struct qfprom_soc_compatible_data sc7180_qfprom = { >> .nkeepout = ARRAY_SIZE(sc7180_qfprom_keepout) >> }; >> >> +static const struct nvmem_keepout sc7280_qfprom_keepout[] = { >> + {.start = 0x128, .end = 0x148}, >> + {.start = 0x238, .end = 0x248} >> +}; >> + >> +static const struct qfprom_soc_compatible_data sc7280_qfprom = { >> + .keepout = sc7280_qfprom_keepout, >> + .nkeepout = ARRAY_SIZE(sc7280_qfprom_keepout) >> +}; >> /** > > nit: blank line between structure and comment? > > >> @@ -187,9 +199,9 @@ static int qfprom_enable_fuse_blowing(const struct qfprom_priv *priv, >> * a rail shared do don't specify a max--regulator constraints >> * will handle. >> */ >> - ret = regulator_set_voltage(priv->vcc, 1800000, INT_MAX); >> + ret = regulator_set_voltage(priv->vcc, qfprom_blow_uV, INT_MAX); >> if (ret) { >> - dev_err(priv->dev, "Failed to set 1.8 voltage\n"); >> + dev_err(priv->dev, "Failed to set %duV\n", qfprom_blow_uV); > > nit: the comment above this block (not in the unified diff) > specifically calls out 1.8V. It'd be nice if you updated the comment > since it's no longer fixed at 1.8V. > > >> @@ -379,6 +399,8 @@ static int qfprom_probe(struct platform_device *pdev) >> >> if (major_version == 7 && minor_version == 8) >> priv->soc_data = &qfprom_7_8_data; >> + if (major_version == 7 && minor_version == 15) >> + priv->soc_data = &qfprom_7_15_data; > > nit: "else if" instead of "if"? > > > I guess I'm a little late since I think this already got applied, but > all the above are nits. Maybe you could send a follow-up patch to > address them? Thanks Doug for the review, yes, I'll send a follow-up patch since Srini already has these pulled in. -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 2021-03-25 5:44 [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rajendra Nayak 2021-03-25 5:44 ` [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 Rajendra Nayak @ 2021-03-27 17:40 ` Rob Herring 2021-03-30 10:52 ` Srinivas Kandagatla 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm 3 siblings, 0 replies; 7+ messages in thread From: Rob Herring @ 2021-03-27 17:40 UTC (permalink / raw) To: Rajendra Nayak Cc: srinivas.kandagatla, linux-kernel, dianders, robh+dt, linux-arm-msm, devicetree On Thu, 25 Mar 2021 11:14:15 +0530, Rajendra Nayak wrote: > Document SoC compatible for sc7280 > > Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> > --- > Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 2021-03-25 5:44 [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rajendra Nayak 2021-03-25 5:44 ` [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 Rajendra Nayak 2021-03-27 17:40 ` [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rob Herring @ 2021-03-30 10:52 ` Srinivas Kandagatla 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm 3 siblings, 0 replies; 7+ messages in thread From: Srinivas Kandagatla @ 2021-03-30 10:52 UTC (permalink / raw) To: Rajendra Nayak, robh+dt; +Cc: linux-arm-msm, devicetree, linux-kernel, dianders On 25/03/2021 05:44, Rajendra Nayak wrote: > Document SoC compatible for sc7280 > > Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> > --- > Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > index 992777c..861b205 100644 > --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > @@ -24,6 +24,7 @@ properties: > - qcom,msm8998-qfprom > - qcom,qcs404-qfprom > - qcom,sc7180-qfprom > + - qcom,sc7280-qfprom > - qcom,sdm845-qfprom > - const: qcom,qfprom > > Applied both, thanks, srini ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 2021-03-25 5:44 [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rajendra Nayak ` (2 preceding siblings ...) 2021-03-30 10:52 ` Srinivas Kandagatla @ 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm 3 siblings, 0 replies; 7+ messages in thread From: patchwork-bot+linux-arm-msm @ 2021-05-26 19:03 UTC (permalink / raw) To: Rajendra Nayak; +Cc: linux-arm-msm Hello: This series was applied to qcom/linux.git (refs/heads/for-next): On Thu, 25 Mar 2021 11:14:15 +0530 you wrote: > Document SoC compatible for sc7280 > > Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org> > --- > Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + > 1 file changed, 1 insertion(+) Here is the summary with links: - [1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 https://git.kernel.org/qcom/c/b1f20fd04577 - [2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 https://git.kernel.org/qcom/c/5a1bea2a2572 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-05-26 19:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-25 5:44 [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rajendra Nayak 2021-03-25 5:44 ` [PATCH 2/2] nvmem: qfprom: Add support for fuse blowing on sc7280 Rajendra Nayak 2021-03-30 21:19 ` Doug Anderson 2021-04-07 6:49 ` Rajendra Nayak 2021-03-27 17:40 ` [PATCH 1/2] dt-bindings: nvmem: Add SoC compatible for sc7280 Rob Herring 2021-03-30 10:52 ` Srinivas Kandagatla 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).