* [PATCH v2 0/4] nvmem: qfprom: Avoid untouchable regions @ 2020-10-16 19:26 Evan Green 2020-10-16 19:26 ` [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings Evan Green 2020-10-16 19:26 ` [PATCH v2 2/4] arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string Evan Green 0 siblings, 2 replies; 6+ messages in thread From: Evan Green @ 2020-10-16 19:26 UTC (permalink / raw) To: Rob Herring, Bjorn Andersson, Srinivas Kandagatla Cc: Stephen Boyd, Douglas Anderson, Evan Green, Andy Gross, devicetree, linux-arm-msm, linux-kernel Certain fuses are protected by the XPU such that the AP cannot access them. Attempting to do so causes an SError. Introduce an SoC-specific compatible string, and introduce support into the nvmem core to avoid accessing specified regions. Then use those new elements in the qfprom driver to avoid SErrors when usermode accesses certain registers. Changes in v2: - Add other soc compatible strings (Doug) - Fix compatible string definition (Doug) - Introduced keepout regions into the core (Srini) - Use new core support in qfprom (Srini) Evan Green (4): dt-bindings: nvmem: Add soc qfprom compatible strings arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string nvmem: core: Add support for keepout regions nvmem: qfprom: Don't touch certain fuses .../bindings/nvmem/qcom,qfprom.yaml | 13 ++- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- drivers/nvmem/core.c | 95 ++++++++++++++++++- drivers/nvmem/qfprom.c | 30 ++++++ include/linux/nvmem-provider.h | 17 ++++ 5 files changed, 151 insertions(+), 6 deletions(-) -- 2.26.2 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings 2020-10-16 19:26 [PATCH v2 0/4] nvmem: qfprom: Avoid untouchable regions Evan Green @ 2020-10-16 19:26 ` Evan Green 2020-10-19 19:55 ` Rob Herring 2020-10-21 21:40 ` Doug Anderson 2020-10-16 19:26 ` [PATCH v2 2/4] arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string Evan Green 1 sibling, 2 replies; 6+ messages in thread From: Evan Green @ 2020-10-16 19:26 UTC (permalink / raw) To: Rob Herring, Bjorn Andersson, Srinivas Kandagatla Cc: Stephen Boyd, Douglas Anderson, Evan Green, Andy Gross, devicetree, linux-arm-msm, linux-kernel Add SoC-specific compatible strings so that data can be attached to it in the driver. Signed-off-by: Evan Green <evgreen@chromium.org> --- Changes in v2: - Add other soc compatible strings (Doug) - Fix compatible string definition (Doug) .../devicetree/bindings/nvmem/qcom,qfprom.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml index 1a18b6bab35e7..eb1440045aff1 100644 --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml @@ -14,7 +14,18 @@ allOf: properties: compatible: - const: qcom,qfprom + items: + - enum: + - qcom,apq8064-qfprom + - qcom,apq8084-qfprom + - qcom,msm8974-qfprom + - qcom,msm8916-qfprom + - qcom,msm8996-qfprom + - qcom,msm8998-qfprom + - qcom,qcs404-qfprom + - qcom,sc7180-qfprom + - qcom,sdm845-qfprom + - const: qcom,qfprom reg: # If the QFPROM is read-only OS image then only the corrected region -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings 2020-10-16 19:26 ` [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings Evan Green @ 2020-10-19 19:55 ` Rob Herring 2020-10-21 21:40 ` Doug Anderson 1 sibling, 0 replies; 6+ messages in thread From: Rob Herring @ 2020-10-19 19:55 UTC (permalink / raw) To: Evan Green Cc: Douglas Anderson, devicetree, Stephen Boyd, Andy Gross, linux-kernel, Rob Herring, linux-arm-msm, Bjorn Andersson, Srinivas Kandagatla On Fri, 16 Oct 2020 12:26:51 -0700, Evan Green wrote: > Add SoC-specific compatible strings so that data can be attached > to it in the driver. > > Signed-off-by: Evan Green <evgreen@chromium.org> > --- > > Changes in v2: > - Add other soc compatible strings (Doug) > - Fix compatible string definition (Doug) > > .../devicetree/bindings/nvmem/qcom,qfprom.yaml | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > My bot found errors running 'make dt_binding_check' on your patch: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible:0: 'qcom,qfprom' is not one of ['qcom,apq8064-qfprom', 'qcom,apq8084-qfprom', 'qcom,msm8974-qfprom', 'qcom,msm8916-qfprom', 'qcom,msm8996-qfprom', 'qcom,msm8998-qfprom', 'qcom,qcs404-qfprom', 'qcom,sc7180-qfprom', 'qcom,sdm845-qfprom'] From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible: ['qcom,qfprom'] is too short From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible:0: 'qcom,qfprom' is not one of ['qcom,apq8064-qfprom', 'qcom,apq8084-qfprom', 'qcom,msm8974-qfprom', 'qcom,msm8916-qfprom', 'qcom,msm8996-qfprom', 'qcom,msm8998-qfprom', 'qcom,qcs404-qfprom', 'qcom,sc7180-qfprom', 'qcom,sdm845-qfprom'] From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible: ['qcom,qfprom'] is too short From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml See https://patchwork.ozlabs.org/patch/1383520 If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure dt-schema is up to date: pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade Please check and re-submit. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings 2020-10-16 19:26 ` [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings Evan Green 2020-10-19 19:55 ` Rob Herring @ 2020-10-21 21:40 ` Doug Anderson 2020-10-29 0:29 ` Evan Green 1 sibling, 1 reply; 6+ messages in thread From: Doug Anderson @ 2020-10-21 21:40 UTC (permalink / raw) To: Evan Green Cc: Rob Herring, Bjorn Andersson, Srinivas Kandagatla, Stephen Boyd, Andy Gross, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-arm-msm, LKML Hi, On Fri, Oct 16, 2020 at 12:27 PM Evan Green <evgreen@chromium.org> wrote: > > Add SoC-specific compatible strings so that data can be attached > to it in the driver. > > Signed-off-by: Evan Green <evgreen@chromium.org> > --- > > Changes in v2: > - Add other soc compatible strings (Doug) > - Fix compatible string definition (Doug) > > .../devicetree/bindings/nvmem/qcom,qfprom.yaml | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > index 1a18b6bab35e7..eb1440045aff1 100644 > --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > @@ -14,7 +14,18 @@ allOf: > > properties: > compatible: > - const: qcom,qfprom > + items: > + - enum: > + - qcom,apq8064-qfprom > + - qcom,apq8084-qfprom > + - qcom,msm8974-qfprom > + - qcom,msm8916-qfprom > + - qcom,msm8996-qfprom > + - qcom,msm8998-qfprom > + - qcom,qcs404-qfprom > + - qcom,sc7180-qfprom > + - qcom,sdm845-qfprom > + - const: qcom,qfprom > > reg: > # If the QFPROM is read-only OS image then only the corrected region As Rob's bot found, your example no longer matches your requirements. It needs an SoC-specific string plus the "qcom,qfprom". It's always good to try running "make dt_binding_check" to catch these sorts of things. -Doug ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings 2020-10-21 21:40 ` Doug Anderson @ 2020-10-29 0:29 ` Evan Green 0 siblings, 0 replies; 6+ messages in thread From: Evan Green @ 2020-10-29 0:29 UTC (permalink / raw) To: Doug Anderson Cc: Rob Herring, Bjorn Andersson, Srinivas Kandagatla, Stephen Boyd, Andy Gross, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-arm-msm, LKML On Wed, Oct 21, 2020 at 2:41 PM Doug Anderson <dianders@chromium.org> wrote: > > Hi, > > On Fri, Oct 16, 2020 at 12:27 PM Evan Green <evgreen@chromium.org> wrote: > > > > Add SoC-specific compatible strings so that data can be attached > > to it in the driver. > > > > Signed-off-by: Evan Green <evgreen@chromium.org> > > --- > > > > Changes in v2: > > - Add other soc compatible strings (Doug) > > - Fix compatible string definition (Doug) > > > > .../devicetree/bindings/nvmem/qcom,qfprom.yaml | 13 ++++++++++++- > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > > index 1a18b6bab35e7..eb1440045aff1 100644 > > --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > > +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml > > @@ -14,7 +14,18 @@ allOf: > > > > properties: > > compatible: > > - const: qcom,qfprom > > + items: > > + - enum: > > + - qcom,apq8064-qfprom > > + - qcom,apq8084-qfprom > > + - qcom,msm8974-qfprom > > + - qcom,msm8916-qfprom > > + - qcom,msm8996-qfprom > > + - qcom,msm8998-qfprom > > + - qcom,qcs404-qfprom > > + - qcom,sc7180-qfprom > > + - qcom,sdm845-qfprom > > + - const: qcom,qfprom > > > > reg: > > # If the QFPROM is read-only OS image then only the corrected region > > As Rob's bot found, your example no longer matches your requirements. > It needs an SoC-specific string plus the "qcom,qfprom". It's always > good to try running "make dt_binding_check" to catch these sorts of > things. Thanks Doug, will do for the next spin! -Evan ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string 2020-10-16 19:26 [PATCH v2 0/4] nvmem: qfprom: Avoid untouchable regions Evan Green 2020-10-16 19:26 ` [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings Evan Green @ 2020-10-16 19:26 ` Evan Green 1 sibling, 0 replies; 6+ messages in thread From: Evan Green @ 2020-10-16 19:26 UTC (permalink / raw) To: Rob Herring, Bjorn Andersson, Srinivas Kandagatla Cc: Stephen Boyd, Douglas Anderson, Evan Green, Andy Gross, devicetree, linux-arm-msm, linux-kernel Add the soc-specific compatible string so that it can be matched more specifically now that the driver cares which SoC it's on. Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> --- (no changes since v1) arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index 6678f1e8e3958..f1f8bbc0b37bc 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -660,7 +660,7 @@ gcc: clock-controller@100000 { }; qfprom: efuse@784000 { - compatible = "qcom,qfprom"; + compatible = "qcom,sc7180-qfprom", "qcom,qfprom"; reg = <0 0x00784000 0 0x8ff>, <0 0x00780000 0 0x7a0>, <0 0x00782000 0 0x100>, -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-29 0:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-16 19:26 [PATCH v2 0/4] nvmem: qfprom: Avoid untouchable regions Evan Green 2020-10-16 19:26 ` [PATCH v2 1/4] dt-bindings: nvmem: Add soc qfprom compatible strings Evan Green 2020-10-19 19:55 ` Rob Herring 2020-10-21 21:40 ` Doug Anderson 2020-10-29 0:29 ` Evan Green 2020-10-16 19:26 ` [PATCH v2 2/4] arm64: dts: qcom: sc7180: Add soc-specific qfprom compat string Evan Green
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).