* [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs
@ 2020-07-10 14:35 Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 1/4] dt-bindings: nvmem: qfprom: Convert to yaml Douglas Anderson
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Douglas Anderson @ 2020-07-10 14:35 UTC (permalink / raw)
To: Srinivas Kandagatla, Rob Herring, Bjorn Andersson, Andy Gross
Cc: sparate, saiprakash.ranjan, mturney, linux-arm-msm, Jeffrey Hugo,
dhavalp, rnayak, mkurumel, Ravi Kumar Bokka, Douglas Anderson,
devicetree, linux-kernel
This series enables blowing of fuses on Qualcomm SoCs by extending the
existing qfprom driver with write support.
A few notes:
- Though I don't have any firsthand knowledge of it, it's my
understanding that these changes could be used on any Qualcomm SoC.
However, it's likely not very useful on most boards because the
bootloader protects against this. Thus the write support here is
likely only useful with a cooperating bootloader.
- Blowing fuses is truly a one-way process. If you mess around with
this and do something wrong you could irreparably brick your chip.
You have been warned.
Versions 1 and 2 of this series were posted by Ravi Kumar Bokka. I
posted version 3 containing my changes / fixups with his consent. I
have left authorship as Ravi but added my own Signed-off-by.
Version 4 is a minor spin over version 3.
Version 5 is an even more minor spin and just bumps up some timings to
fix a failure reported by Ravi on one device. I've collected Rob
Herring's reviews and (as far as I know) this is ready to land.
Changes in v5:
- QFPROM_FUSE_BLOW_POLL_US 10 => 100
- QFPROM_FUSE_BLOW_TIMEOUT_US 100 => 1000
Changes in v4:
- Maintainer now listed as Srinivas.
- Example under "soc" to get #address-cells and #size-cells.
- Clock name is "core", not "sec".
- Example under "soc" to get #address-cells and #size-cells.
- Only get clock/regulator if all address ranges are provided.
- Don't use optional version of clk_get now.
- Clock name is "core", not "sec".
- Cleaned up error message if couldn't get clock.
- Fixed up minor version mask.
- Use GENMASK to generate masks.
- Clock name is "core", not "sec".
Changes in v3:
- Split conversion to yaml into separate patch new in v3.
- Use 'const' for compatible instead of a 1-entry enum.
- Changed filename to match compatible string.
- Add #address-cells and #size-cells to list of properties.
- Fixed up example.
- Add an extra reg range (at 0x6000 offset for SoCs checked)
- Define two options for reg: 1 item or 4 items.
- No reg-names.
- Add "clocks" and "clock-names" to list of properties.
- Clock is now "sec", not "secclk".
- Add "vcc-supply" to list of properties.
- Fixed up example.
- Don't provide "reset" value for things; just save/restore.
- Use the major/minor version read from 0x6000.
- Reading should still read "corrected", not "raw".
- Added a sysfs knob to allow you to read "raw" instead of "corrected"
- Simplified the SoC data structure.
- No need for quite so many levels of abstraction for clocks/regulator.
- Don't set regulator voltage. Rely on device tree to make sure it's right.
- Properly undo things in the case of failure.
- Don't just keep enabling the regulator over and over again.
- Enable / disable the clock each time
- Polling every 100 us but timing out in 10 us didn't make sense; swap.
- No reason for 100 us to be SoC specific.
- No need for reg-names.
- We shouldn't be creating two separate nvmem devices.
- Name is now 'efuse' to match what schema checker wants.
- Reorganized ranges to match driver/bindings changes.
- Added 4th range as per driver/binding changes.
- No more reg-names as per driver/binding changes.
- Clock name is now just "sec" as per driver/binding changes.
Ravi Kumar Bokka (4):
dt-bindings: nvmem: qfprom: Convert to yaml
dt-bindings: nvmem: Add properties needed for blowing fuses
nvmem: qfprom: Add fuse blowing support
arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing
.../bindings/nvmem/qcom,qfprom.yaml | 96 ++++++
.../devicetree/bindings/nvmem/qfprom.txt | 35 --
arch/arm64/boot/dts/qcom/sc7180-idp.dts | 4 +
arch/arm64/boot/dts/qcom/sc7180.dtsi | 10 +-
drivers/nvmem/qfprom.c | 314 +++++++++++++++++-
5 files changed, 411 insertions(+), 48 deletions(-)
create mode 100644 Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
delete mode 100644 Documentation/devicetree/bindings/nvmem/qfprom.txt
--
2.27.0.383.g050319c2ae-goog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v5 1/4] dt-bindings: nvmem: qfprom: Convert to yaml
2020-07-10 14:35 [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Douglas Anderson
@ 2020-07-10 14:35 ` Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 2/4] dt-bindings: nvmem: Add properties needed for blowing fuses Douglas Anderson
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Douglas Anderson @ 2020-07-10 14:35 UTC (permalink / raw)
To: Srinivas Kandagatla, Rob Herring, Bjorn Andersson, Andy Gross
Cc: sparate, saiprakash.ranjan, mturney, linux-arm-msm, Jeffrey Hugo,
dhavalp, rnayak, mkurumel, Ravi Kumar Bokka, Douglas Anderson,
Rob Herring, devicetree, linux-kernel
From: Ravi Kumar Bokka <rbokka@codeaurora.org>
This switches the bindings over from txt to yaml.
Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes in v5: None
Changes in v4:
- Maintainer now listed as Srinivas.
- Example under "soc" to get #address-cells and #size-cells.
Changes in v3:
- Split conversion to yaml into separate patch new in v3.
- Use 'const' for compatible instead of a 1-entry enum.
- Changed filename to match compatible string.
- Add #address-cells and #size-cells to list of properties.
- Fixed up example.
.../bindings/nvmem/qcom,qfprom.yaml | 50 +++++++++++++++++++
.../devicetree/bindings/nvmem/qfprom.txt | 35 -------------
2 files changed, 50 insertions(+), 35 deletions(-)
create mode 100644 Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
delete mode 100644 Documentation/devicetree/bindings/nvmem/qfprom.txt
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
new file mode 100644
index 000000000000..39f97c1c83a4
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/qcom,qfprom.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies Inc, QFPROM Efuse bindings
+
+maintainers:
+ - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+allOf:
+ - $ref: "nvmem.yaml#"
+
+properties:
+ compatible:
+ const: qcom,qfprom
+
+ reg:
+ items:
+ - description: The corrected region.
+
+ # Needed if any child nodes are present.
+ "#address-cells":
+ const: 1
+ "#size-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ efuse@784000 {
+ compatible = "qcom,qfprom";
+ reg = <0 0x00784000 0 0x8ff>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ hstx-trim-primary@1eb {
+ reg = <0x1eb 0x1>;
+ bits = <1 4>;
+ };
+ };
+ };
diff --git a/Documentation/devicetree/bindings/nvmem/qfprom.txt b/Documentation/devicetree/bindings/nvmem/qfprom.txt
deleted file mode 100644
index 26fe878d5c86..000000000000
--- a/Documentation/devicetree/bindings/nvmem/qfprom.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-= Qualcomm QFPROM device tree bindings =
-
-This binding is intended to represent QFPROM which is found in most QCOM SOCs.
-
-Required properties:
-- compatible: should be "qcom,qfprom"
-- reg: Should contain registers location and length
-
-= Data cells =
-Are child nodes of qfprom, bindings of which as described in
-bindings/nvmem/nvmem.txt
-
-Example:
-
- qfprom: qfprom@700000 {
- compatible = "qcom,qfprom";
- reg = <0x00700000 0x8000>;
- ...
- /* Data cells */
- tsens_calibration: calib@404 {
- reg = <0x4404 0x10>;
- };
- };
-
-
-= Data consumers =
-Are device nodes which consume nvmem data cells.
-
-For example:
-
- tsens {
- ...
- nvmem-cells = <&tsens_calibration>;
- nvmem-cell-names = "calibration";
- };
--
2.27.0.383.g050319c2ae-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v5 2/4] dt-bindings: nvmem: Add properties needed for blowing fuses
2020-07-10 14:35 [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 1/4] dt-bindings: nvmem: qfprom: Convert to yaml Douglas Anderson
@ 2020-07-10 14:35 ` Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 4/4] arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing Douglas Anderson
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Douglas Anderson @ 2020-07-10 14:35 UTC (permalink / raw)
To: Srinivas Kandagatla, Rob Herring, Bjorn Andersson, Andy Gross
Cc: sparate, saiprakash.ranjan, mturney, linux-arm-msm, Jeffrey Hugo,
dhavalp, rnayak, mkurumel, Ravi Kumar Bokka, Douglas Anderson,
Rob Herring, devicetree, linux-kernel
From: Ravi Kumar Bokka <rbokka@codeaurora.org>
On some systems it's possible to actually blow the fuses in the qfprom
from the kernel. Add properties to support that.
NOTE: Whether this is possible depends on the BIOS settings and
whether the kernel has permissions here, so not all boards will be
able to blow fuses in the kernel.
Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes in v5: None
Changes in v4:
- Clock name is "core", not "sec".
- Example under "soc" to get #address-cells and #size-cells.
Changes in v3:
- Add an extra reg range (at 0x6000 offset for SoCs checked)
- Define two options for reg: 1 item or 4 items.
- No reg-names.
- Add "clocks" and "clock-names" to list of properties.
- Clock is now "sec", not "secclk".
- Add "vcc-supply" to list of properties.
- Fixed up example.
.../bindings/nvmem/qcom,qfprom.yaml | 50 ++++++++++++++++++-
1 file changed, 48 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 39f97c1c83a4..d10a0cf91ba7 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -17,8 +17,27 @@ properties:
const: qcom,qfprom
reg:
- items:
- - description: The corrected region.
+ # If the QFPROM is read-only OS image then only the corrected region
+ # needs to be provided. If the QFPROM is writable then all 4 regions
+ # must be provided.
+ oneOf:
+ - items:
+ - description: The corrected region.
+ - items:
+ - description: The corrected region.
+ - description: The raw region.
+ - description: The config region.
+ - description: The security control region.
+
+ # Clock must be provided if QFPROM is writable from the OS image.
+ clocks:
+ maxItems: 1
+ clock-names:
+ const: core
+
+ # Supply reference must be provided if QFPROM is writable from the OS image.
+ vcc-supply:
+ description: Our power supply.
# Needed if any child nodes are present.
"#address-cells":
@@ -31,6 +50,33 @@ required:
- reg
examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-sc7180.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ efuse@784000 {
+ compatible = "qcom,qfprom";
+ reg = <0 0x00784000 0 0x8ff>,
+ <0 0x00780000 0 0x7a0>,
+ <0 0x00782000 0 0x100>,
+ <0 0x00786000 0 0x1fff>;
+ clocks = <&gcc GCC_SEC_CTRL_CLK_SRC>;
+ clock-names = "core";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ vcc-supply = <&vreg_l11a_1p8>;
+
+ hstx-trim-primary@25b {
+ reg = <0x25b 0x1>;
+ bits = <1 3>;
+ };
+ };
+ };
+
- |
soc {
#address-cells = <2>;
--
2.27.0.383.g050319c2ae-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v5 4/4] arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing
2020-07-10 14:35 [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 1/4] dt-bindings: nvmem: qfprom: Convert to yaml Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 2/4] dt-bindings: nvmem: Add properties needed for blowing fuses Douglas Anderson
@ 2020-07-10 14:35 ` Douglas Anderson
2020-07-14 22:49 ` [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Doug Anderson
2020-07-20 9:05 ` Srinivas Kandagatla
4 siblings, 0 replies; 6+ messages in thread
From: Douglas Anderson @ 2020-07-10 14:35 UTC (permalink / raw)
To: Srinivas Kandagatla, Rob Herring, Bjorn Andersson, Andy Gross
Cc: sparate, saiprakash.ranjan, mturney, linux-arm-msm, Jeffrey Hugo,
dhavalp, rnayak, mkurumel, Ravi Kumar Bokka, Douglas Anderson,
devicetree, linux-kernel
From: Ravi Kumar Bokka <rbokka@codeaurora.org>
This patch adds properties to the qfprom node to enable fuse blowing.
Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Presumably this patch to the device tree file should go through the
Qualcomm tree. Now that bindings have been reviewed by Rob it could
probably land any time.
Changes in v5: None
Changes in v4:
- Clock name is "core", not "sec".
Changes in v3:
- Name is now 'efuse' to match what schema checker wants.
- Reorganized ranges to match driver/bindings changes.
- Added 4th range as per driver/binding changes.
- No more reg-names as per driver/binding changes.
- Clock name is now just "sec" as per driver/binding changes.
arch/arm64/boot/dts/qcom/sc7180-idp.dts | 4 ++++
arch/arm64/boot/dts/qcom/sc7180.dtsi | 10 ++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc7180-idp.dts b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
index 4e9149d82d09..2a9224e2083f 100644
--- a/arch/arm64/boot/dts/qcom/sc7180-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sc7180-idp.dts
@@ -287,6 +287,10 @@ vreg_bob: bob {
};
};
+&qfprom {
+ vcc-supply = <&vreg_l11a_1p8>;
+};
+
&qspi {
status = "okay";
pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 31b9217bb5bf..fbf9554f1e3a 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -498,9 +498,15 @@ gcc: clock-controller@100000 {
#power-domain-cells = <1>;
};
- qfprom@784000 {
+ qfprom: efuse@784000 {
compatible = "qcom,qfprom";
- reg = <0 0x00784000 0 0x8ff>;
+ reg = <0 0x00784000 0 0x8ff>,
+ <0 0x00780000 0 0x7a0>,
+ <0 0x00782000 0 0x100>,
+ <0 0x00786000 0 0x1fff>;
+
+ clocks = <&gcc GCC_SEC_CTRL_CLK_SRC>;
+ clock-names = "core";
#address-cells = <1>;
#size-cells = <1>;
--
2.27.0.383.g050319c2ae-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs
2020-07-10 14:35 [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Douglas Anderson
` (2 preceding siblings ...)
2020-07-10 14:35 ` [PATCH v5 4/4] arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing Douglas Anderson
@ 2020-07-14 22:49 ` Doug Anderson
2020-07-20 9:05 ` Srinivas Kandagatla
4 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2020-07-14 22:49 UTC (permalink / raw)
To: Srinivas Kandagatla, Rob Herring, Bjorn Andersson, Andy Gross
Cc: sparate, Sai Prakash Ranjan, mturney, linux-arm-msm, Jeffrey Hugo,
dhavalp, Rajendra Nayak, mkurumel, Ravi Kumar Bokka,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML
Srinivas,
On Fri, Jul 10, 2020 at 7:35 AM Douglas Anderson <dianders@chromium.org> wrote:
>
> This series enables blowing of fuses on Qualcomm SoCs by extending the
> existing qfprom driver with write support.
>
> A few notes:
> - Though I don't have any firsthand knowledge of it, it's my
> understanding that these changes could be used on any Qualcomm SoC.
> However, it's likely not very useful on most boards because the
> bootloader protects against this. Thus the write support here is
> likely only useful with a cooperating bootloader.
> - Blowing fuses is truly a one-way process. If you mess around with
> this and do something wrong you could irreparably brick your chip.
> You have been warned.
>
> Versions 1 and 2 of this series were posted by Ravi Kumar Bokka. I
> posted version 3 containing my changes / fixups with his consent. I
> have left authorship as Ravi but added my own Signed-off-by.
>
> Version 4 is a minor spin over version 3.
>
> Version 5 is an even more minor spin and just bumps up some timings to
> fix a failure reported by Ravi on one device. I've collected Rob
> Herring's reviews and (as far as I know) this is ready to land.
>
> Changes in v5:
> - QFPROM_FUSE_BLOW_POLL_US 10 => 100
> - QFPROM_FUSE_BLOW_TIMEOUT_US 100 => 1000
>
> Changes in v4:
> - Maintainer now listed as Srinivas.
> - Example under "soc" to get #address-cells and #size-cells.
> - Clock name is "core", not "sec".
> - Example under "soc" to get #address-cells and #size-cells.
> - Only get clock/regulator if all address ranges are provided.
> - Don't use optional version of clk_get now.
> - Clock name is "core", not "sec".
> - Cleaned up error message if couldn't get clock.
> - Fixed up minor version mask.
> - Use GENMASK to generate masks.
> - Clock name is "core", not "sec".
>
> Changes in v3:
> - Split conversion to yaml into separate patch new in v3.
> - Use 'const' for compatible instead of a 1-entry enum.
> - Changed filename to match compatible string.
> - Add #address-cells and #size-cells to list of properties.
> - Fixed up example.
> - Add an extra reg range (at 0x6000 offset for SoCs checked)
> - Define two options for reg: 1 item or 4 items.
> - No reg-names.
> - Add "clocks" and "clock-names" to list of properties.
> - Clock is now "sec", not "secclk".
> - Add "vcc-supply" to list of properties.
> - Fixed up example.
> - Don't provide "reset" value for things; just save/restore.
> - Use the major/minor version read from 0x6000.
> - Reading should still read "corrected", not "raw".
> - Added a sysfs knob to allow you to read "raw" instead of "corrected"
> - Simplified the SoC data structure.
> - No need for quite so many levels of abstraction for clocks/regulator.
> - Don't set regulator voltage. Rely on device tree to make sure it's right.
> - Properly undo things in the case of failure.
> - Don't just keep enabling the regulator over and over again.
> - Enable / disable the clock each time
> - Polling every 100 us but timing out in 10 us didn't make sense; swap.
> - No reason for 100 us to be SoC specific.
> - No need for reg-names.
> - We shouldn't be creating two separate nvmem devices.
> - Name is now 'efuse' to match what schema checker wants.
> - Reorganized ranges to match driver/bindings changes.
> - Added 4th range as per driver/binding changes.
> - No more reg-names as per driver/binding changes.
> - Clock name is now just "sec" as per driver/binding changes.
>
> Ravi Kumar Bokka (4):
> dt-bindings: nvmem: qfprom: Convert to yaml
> dt-bindings: nvmem: Add properties needed for blowing fuses
> nvmem: qfprom: Add fuse blowing support
> arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing
>
> .../bindings/nvmem/qcom,qfprom.yaml | 96 ++++++
> .../devicetree/bindings/nvmem/qfprom.txt | 35 --
> arch/arm64/boot/dts/qcom/sc7180-idp.dts | 4 +
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 10 +-
> drivers/nvmem/qfprom.c | 314 +++++++++++++++++-
> 5 files changed, 411 insertions(+), 48 deletions(-)
I know it's a little early to ping and that folks are busy, but I'm
getting to a bit of a time crunch to land this driver in the Chrome OS
kernel tree. I'd prefer for it to land upstream first so I can pick
exactly what landed but if not then I'll just pick what I posted to
the mailing list.
Any chance you can give an approximate timeline for when it might land
so I can either wait a little while longer or stop waiting and just
take what I posted to the lists?
Thanks! :-)
-Doug
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs
2020-07-10 14:35 [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Douglas Anderson
` (3 preceding siblings ...)
2020-07-14 22:49 ` [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Doug Anderson
@ 2020-07-20 9:05 ` Srinivas Kandagatla
4 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2020-07-20 9:05 UTC (permalink / raw)
To: Douglas Anderson, Rob Herring, Bjorn Andersson, Andy Gross
Cc: sparate, saiprakash.ranjan, mturney, linux-arm-msm, Jeffrey Hugo,
dhavalp, rnayak, mkurumel, Ravi Kumar Bokka, devicetree,
linux-kernel
On 10/07/2020 15:35, Douglas Anderson wrote:
> This series enables blowing of fuses on Qualcomm SoCs by extending the
> existing qfprom driver with write support.
>
> A few notes:
> - Though I don't have any firsthand knowledge of it, it's my
> understanding that these changes could be used on any Qualcomm SoC.
> However, it's likely not very useful on most boards because the
> bootloader protects against this. Thus the write support here is
> likely only useful with a cooperating bootloader.
> - Blowing fuses is truly a one-way process. If you mess around with
> this and do something wrong you could irreparably brick your chip.
> You have been warned.
>
> Versions 1 and 2 of this series were posted by Ravi Kumar Bokka. I
> posted version 3 containing my changes / fixups with his consent. I
> have left authorship as Ravi but added my own Signed-off-by.
>
> Version 4 is a minor spin over version 3.
>
> Version 5 is an even more minor spin and just bumps up some timings to
> fix a failure reported by Ravi on one device. I've collected Rob
> Herring's reviews and (as far as I know) this is ready to land.
>
> Changes in v5:
> - QFPROM_FUSE_BLOW_POLL_US 10 => 100
> - QFPROM_FUSE_BLOW_TIMEOUT_US 100 => 1000
>
> Changes in v4:
> - Maintainer now listed as Srinivas.
> - Example under "soc" to get #address-cells and #size-cells.
> - Clock name is "core", not "sec".
> - Example under "soc" to get #address-cells and #size-cells.
> - Only get clock/regulator if all address ranges are provided.
> - Don't use optional version of clk_get now.
> - Clock name is "core", not "sec".
> - Cleaned up error message if couldn't get clock.
> - Fixed up minor version mask.
> - Use GENMASK to generate masks.
> - Clock name is "core", not "sec".
>
> Changes in v3:
> - Split conversion to yaml into separate patch new in v3.
> - Use 'const' for compatible instead of a 1-entry enum.
> - Changed filename to match compatible string.
> - Add #address-cells and #size-cells to list of properties.
> - Fixed up example.
> - Add an extra reg range (at 0x6000 offset for SoCs checked)
> - Define two options for reg: 1 item or 4 items.
> - No reg-names.
> - Add "clocks" and "clock-names" to list of properties.
> - Clock is now "sec", not "secclk".
> - Add "vcc-supply" to list of properties.
> - Fixed up example.
> - Don't provide "reset" value for things; just save/restore.
> - Use the major/minor version read from 0x6000.
> - Reading should still read "corrected", not "raw".
> - Added a sysfs knob to allow you to read "raw" instead of "corrected"
> - Simplified the SoC data structure.
> - No need for quite so many levels of abstraction for clocks/regulator.
> - Don't set regulator voltage. Rely on device tree to make sure it's right.
> - Properly undo things in the case of failure.
> - Don't just keep enabling the regulator over and over again.
> - Enable / disable the clock each time
> - Polling every 100 us but timing out in 10 us didn't make sense; swap.
> - No reason for 100 us to be SoC specific.
> - No need for reg-names.
> - We shouldn't be creating two separate nvmem devices.
> - Name is now 'efuse' to match what schema checker wants.
> - Reorganized ranges to match driver/bindings changes.
> - Added 4th range as per driver/binding changes.
> - No more reg-names as per driver/binding changes.
> - Clock name is now just "sec" as per driver/binding changes.
>
> Ravi Kumar Bokka (4):
> dt-bindings: nvmem: qfprom: Convert to yaml
> dt-bindings: nvmem: Add properties needed for blowing fuses
> nvmem: qfprom: Add fuse blowing support
Applied above 3 with merge conflict fixed.
dts patches should go via arm-soc tree, Bjorn could pick that up!
Thanks,
srini
> arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing
>
> .../bindings/nvmem/qcom,qfprom.yaml | 96 ++++++
> .../devicetree/bindings/nvmem/qfprom.txt | 35 --
> arch/arm64/boot/dts/qcom/sc7180-idp.dts | 4 +
> arch/arm64/boot/dts/qcom/sc7180.dtsi | 10 +-
> drivers/nvmem/qfprom.c | 314 +++++++++++++++++-
> 5 files changed, 411 insertions(+), 48 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
> delete mode 100644 Documentation/devicetree/bindings/nvmem/qfprom.txt
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-20 9:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-10 14:35 [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 1/4] dt-bindings: nvmem: qfprom: Convert to yaml Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 2/4] dt-bindings: nvmem: Add properties needed for blowing fuses Douglas Anderson
2020-07-10 14:35 ` [PATCH v5 4/4] arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing Douglas Anderson
2020-07-14 22:49 ` [PATCH v5 0/4] nvmem: qfprom: Patches for fuse blowing on Qualcomm SoCs Doug Anderson
2020-07-20 9:05 ` Srinivas Kandagatla
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).