arm64: dts: ti: k3-am62p-j722s-common-wakeup: Add GP_SW1 efuse node for silicon revision
Subsystems (2)
PATCH 1/1 arm64: dts: ti: k3-am62p-j722s-common-wakeup: Add GP_SW1 efuse node for silicon revision
Add efuse node for GP_SW1 register at offset 0x230. The GP_SW1 efuse register is used to determine AM62Px silicon revision. Reference efuse cell from chipid node via nvmem-cells.
--- .../boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +14 -0
@@ -19,9 +19,23 @@ wkup_conf: bus@43000000 { chipid: chipid@14 { compatible = "ti,am654-chipid"; reg = <0x14 0x4>; + nvmem-cells = <&gpsw1>; + nvmem-cell-names = "gpsw1"; bootph-all; }; + gpsw_efuse: efuse@230 { + compatible = "ti,am62p-efuse", "socionext,uniphier-efuse"; + reg = <0x230 0x10>; + #address-cells = <1>; + #size-cells = <1>; + bootph-all; + + gpsw1: gpsw1@4 { + reg = <0x4 0x4>; + }; + }; + opp_efuse_table: syscon@18 { compatible = "ti,am62-opp-efuse-table", "syscon"; reg = <0x18 0x4>;
Signature · 1 line
2.34.1
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] nvmem: uniphier-efuse: 8-bit bus access causes SError crash on TI K3 MMRs - [Medium] dt-bindings…
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] nvmem: uniphier-efuse: 8-bit bus access causes SError crash on TI K3 MMRs
- [Medium] dt-bindings: undocumented compatible ti,am62p-efuse and uniphier hijacking
- [Medium] dts: ti: mismatch between commit message and GP_SW1 register offset --
commit 8299f82c1d81975723ca388690e1c0edc25d737b
Author: Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62p-j722s-common-wakeup: Add GP_SW1 efuse node for silicon revision
This commit adds an efuse node for the GP_SW1 register to determine the AM62Px silicon revision. It also references this efuse cell from the chipid node via nvmem-cells.
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +0
-0@@ -19,9 +19,23 @@ wkup_conf: bus@43000000 {
[ ... ]
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi
Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +0
-0gpsw_efuse: efuse@230 { compatible = "ti,am62p-efuse", "socionext,uniphier-efuse";
[Severity: High]
Does using the socionext,uniphier-efuse compatible string here cause an SError crash on TI K3 hardware?
The Uniphier eFuse driver in drivers/nvmem/uniphier-efuse.c is hardcoded to perform 8-bit byte-wise reads (econfig.stride = 1, econfig.word_size = 1). However, TI K3 WKUP_CONF control MMRs strictly require 32-bit aligned accesses. Attempting a byte-wise read to these registers triggers a hardware bus fault during k3_chipinfo_probe().
[Severity: Medium]
Will this array of compatible strings fail device tree schema validation?
The patch introduces an undocumented compatible string ti,am62p-efuse and reuses socionext,uniphier-efuse to hijack its generic nvmem driver. The existing socionext,uniphier-efuse.yaml schema restricts the compatible property to a single const string, so dtbs_check will reject this array.
Should this node rely on syscon or a regmap-based nvmem binding instead?
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi
Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +0
-0reg = <0x230 0x10>; #address-cells = <1>; #size-cells = <1>; bootph-all; gpsw1: gpsw1@4 { reg = <0x4 0x4>;
[Severity: Medium]
Is the GP_SW1 register located at absolute offset 0x230 or 0x234?
The commit message states "Add efuse node for GP_SW1 register at offset 0x230", but the device tree defines the parent node at base offset 0x230 and this child cell at a relative offset of 0x4. This places the register read at absolute offset 0x234, not 0x230.
If the register is genuinely located at 0x230, should the child cell be defined as gpsw1@0 with a relative offset of 0x0?
Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +0
-0}; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Hi Judith,
Quoted 22 lines · Judith Mendez
Add efuse node for
GP_SW1register at offset0x230. TheGP_SW1efuse register is used to determine AM62Px silicon revision. Reference efuse cell from chipid node via nvmem-cells.Signed-off-by Judith Mendez <[email protected]>--- .../boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +2
-0@@ -19,9 +19,23 @@ wkup_conf: bus@43000000 { chipid: chipid@14 { compatible = "ti,am654-chipid"; reg = <0x14 0x4>; + nvmem-cells = <&gpsw1>; + nvmem-cell-names = "gpsw1"; bootph-all; };
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi wkup_conf: bus@43000000 { · line 36
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +10
-0+ gpsw_efuse: efuse@230 { + compatible = "ti,am62p-efuse", "socionext,uniphier-efuse"; + reg = <0x230 0x10>; + #address-cells = <1>; + #size-cells = <1>; + bootph-all; + + gpsw1: gpsw1@4 { + reg = <0x4 0x4>; + };
For J722S, this register this marked as reserved,
Could you update in am62-p specific dt.
Thanks
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +2
-0+ }; + opp_efuse_table: syscon@18 { compatible = "ti,am62-opp-efuse-table", "syscon"; reg = <0x18 0x4>;
Hi Udit,
Quoted 26 lines · Udit
Hi Judith,
Quoted 22 lines · Judith Mendez
Add efuse node for
GP_SW1register at offset0x230. TheGP_SW1efuse register is used to determine AM62Px silicon revision. Reference efuse cell from chipid node via nvmem-cells.Signed-off-by Judith Mendez <[email protected]>--- .../boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +2
-0@@ -19,9 +19,23 @@ wkup_conf: bus@43000000 { chipid: chipid@14 { compatible = "ti,am654-chipid"; reg = <0x14 0x4>; + nvmem-cells = <&gpsw1>; + nvmem-cell-names = "gpsw1"; bootph-all; };
Quoted 13 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi wkup_conf: bus@43000000 { · line 36
Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +10
-0+ gpsw_efuse: efuse@230 { + compatible = "ti,am62p-efuse", "socionext,uniphier-efuse"; + reg = <0x230 0x10>; + #address-cells = <1>; + #size-cells = <1>; + bootph-all; + + gpsw1: gpsw1@4 { + reg = <0x4 0x4>; + };For J722S, this register this marked as reserved,
Could you update in am62-p specific dt.
Right, let me see what I can do.
Thanks for reviewing.
~ Judith
Quoted 9 lines
Thanks
Quoted 5 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-wakeup.dtsi +2
-0+ }; + opp_efuse_table: syscon@18 { compatible = "ti,am62-opp-efuse-table", "syscon"; reg = <0x18 0x4>;