Fuse 讀寫可透過核心 sysfs 完成.

/sys/devices/platform/tegra-fuse

Fuse 寫入必需要啟動電源 VPP_FUSE, 來源為電源管理晶片 AS3722 LDO11. 寫入完畢應關閉 VPP_FUSE.

注意! 以下為不可逆操作, 位元被寫入為 "1" 後, 無法回複為 "0".
注意! 不要寫入不瞭解的欄位.

<< 導入以下修正於系统啟動時關閉 VPP_FUSE >>

Tegra Fuse 驅動程式在執行寫入作業時動態控制 VPP_FUSE. VPP_FUSE 在系统啟動後應為關閉裝態.  

(https://github.com/ArtisteHsu/jetson-tk1-r21.2-kernel/commit/95c3d5ff6d3f7ed7845006b96fec9ca5a4fcb246)

diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index c6be1d3..ecce47a 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -119,6 +119,9 @@ static void of_get_regulation_constraints(struct device_node *np,
        if (of_find_property(np, "regulator-boot-on", NULL))
                constraints->boot_on = true;
        
+      if (of_find_property(np, "regulator-boot-off", NULL))
+              constraints->boot_off = true;
+
        if (of_find_property(np, "regulator-always-on", NULL))
                constraints->always_on = true;
        else /* status change should be possible if not always on. */

(https://github.com/ArtisteHsu/jetson-tk1-r21.2-kernel/commit/827239348de886f15b832e547a9354445d6df163)

diff --git a/arch/arm/boot/dts/tegra124-platforms/tegra124-jetson_tk1-pmic-pm375-0000-c00-00.dtsi b/arch/arm/boot/dts/tegra124-p
index dfaf9d0..5de6f5e 100644
--- a/arch/arm/boot/dts/tegra124-platforms/tegra124-jetson_tk1-pmic-pm375-0000-c00-00.dtsi
+++ b/arch/arm/boot/dts/tegra124-platforms/tegra124-jetson_tk1-pmic-pm375-0000-c00-00.dtsi
@@ -503,6 +503,7 @@
                                regulator-name = "vpp-fuse";
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <1800000>;
+                              regulator-boot-off;
                        };
                };
        };

<< 寫入 odm_reserved fuse 位元 7 >>

root@tegra-ubuntu:/sys/devices/platform/tegra-fuse# cat odm_reserved 
0x0000000000000000000000000000000000000000000000000000000000000000
root@tegra-ubuntu:/sys/devices/platform/tegra-fuse# echo 0x80 > odm_reserved 
root@tegra-ubuntu:/sys/devices/platform/tegra-fuse# cat odm_reserved 
0x0000000000000000000000000000000000000000000000000000000000000080

(完)

 

文章標籤
創作者介紹
創作者 版大 的頭像
版大

嵌入式系統

版大 發表在 痞客邦 留言(0) 人氣()