All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-20  3:06 ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  3:06 UTC (permalink / raw)
  To: srinivas.kandagatla, robh+dt, shawnguo, mark.rutland, s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

Introduce fusable-node property for i.MX OCOTP driver.
The property will only be used by Firmware(eg. U-Boot) to
runtime disable the nodes.

Take i.MX6ULL for example, there are several parts that only
have limited modules enabled controlled by OCOTP fuse. It is
not flexible to provide several dts for the serval parts, instead
we could provide one device tree and let Firmware to runtime disable
the device tree nodes for those modules that are disable(fused).

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

Currently NXP vendor use U-Boot to set status to disabled for devices
that could not function,
https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
But this approach is will not work if kernel dts node path changed.

There are two approaches to resolve:

1. This patch is to add a fusable-node property, and Firmware will parse
   the property and read fuse to decide whether to disable or keeep enable
   the nodes.

2. There is another approach is that add nvmem-cells for all nodes that
   could be disabled(fused). Then in each linux driver to use nvmem
   api to detect fused or not, or in linux driver common code to check
   device functionable or not with nvmem API.


To make it easy to work, we choose [1] here. Please advise whether
it is acceptable, because the property is not used by linux driver in
approach [1]. Or you prefer [2] or please advise if any better solution.

Thanks.

 Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
index 7a999a135e56..e9a998588dbd 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
@@ -21,6 +21,8 @@ Required properties:
 
 Optional properties:
 - read-only: disable write access
+- fusable-node: array of phandles with reg base and bit offset, this
+		property is used by Firmware to runtime disable nodes.
 
 Optional Child nodes:
 
@@ -42,4 +44,7 @@ Example:
 		tempmon_temp_grade: temp-grade@20 {
 			reg = <0x20 4>;
 		};
+
+		fusable-node = <&usdhc1 0x10 4
+				&usdhc2 0x10 5>;
 	};
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-20  3:06 ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  3:06 UTC (permalink / raw)
  To: srinivas.kandagatla, robh+dt, shawnguo, mark.rutland, s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

Introduce fusable-node property for i.MX OCOTP driver.
The property will only be used by Firmware(eg. U-Boot) to
runtime disable the nodes.

Take i.MX6ULL for example, there are several parts that only
have limited modules enabled controlled by OCOTP fuse. It is
not flexible to provide several dts for the serval parts, instead
we could provide one device tree and let Firmware to runtime disable
the device tree nodes for those modules that are disable(fused).

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

Currently NXP vendor use U-Boot to set status to disabled for devices
that could not function,
https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
But this approach is will not work if kernel dts node path changed.

There are two approaches to resolve:

1. This patch is to add a fusable-node property, and Firmware will parse
   the property and read fuse to decide whether to disable or keeep enable
   the nodes.

2. There is another approach is that add nvmem-cells for all nodes that
   could be disabled(fused). Then in each linux driver to use nvmem
   api to detect fused or not, or in linux driver common code to check
   device functionable or not with nvmem API.


To make it easy to work, we choose [1] here. Please advise whether
it is acceptable, because the property is not used by linux driver in
approach [1]. Or you prefer [2] or please advise if any better solution.

Thanks.

 Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
index 7a999a135e56..e9a998588dbd 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
@@ -21,6 +21,8 @@ Required properties:
 
 Optional properties:
 - read-only: disable write access
+- fusable-node: array of phandles with reg base and bit offset, this
+		property is used by Firmware to runtime disable nodes.
 
 Optional Child nodes:
 
@@ -42,4 +44,7 @@ Example:
 		tempmon_temp_grade: temp-grade@20 {
 			reg = <0x20 4>;
 		};
+
+		fusable-node = <&usdhc1 0x10 4
+				&usdhc2 0x10 5>;
 	};
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-20  3:06 ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  3:06 UTC (permalink / raw)
  To: srinivas.kandagatla, robh+dt, shawnguo, mark.rutland, s.hauer, kernel
  Cc: devicetree, Peng Fan, linux-kernel, dl-linux-imx, festevam,
	linux-arm-kernel

Introduce fusable-node property for i.MX OCOTP driver.
The property will only be used by Firmware(eg. U-Boot) to
runtime disable the nodes.

Take i.MX6ULL for example, there are several parts that only
have limited modules enabled controlled by OCOTP fuse. It is
not flexible to provide several dts for the serval parts, instead
we could provide one device tree and let Firmware to runtime disable
the device tree nodes for those modules that are disable(fused).

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

Currently NXP vendor use U-Boot to set status to disabled for devices
that could not function,
https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
But this approach is will not work if kernel dts node path changed.

There are two approaches to resolve:

1. This patch is to add a fusable-node property, and Firmware will parse
   the property and read fuse to decide whether to disable or keeep enable
   the nodes.

2. There is another approach is that add nvmem-cells for all nodes that
   could be disabled(fused). Then in each linux driver to use nvmem
   api to detect fused or not, or in linux driver common code to check
   device functionable or not with nvmem API.


To make it easy to work, we choose [1] here. Please advise whether
it is acceptable, because the property is not used by linux driver in
approach [1]. Or you prefer [2] or please advise if any better solution.

Thanks.

 Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
index 7a999a135e56..e9a998588dbd 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
@@ -21,6 +21,8 @@ Required properties:
 
 Optional properties:
 - read-only: disable write access
+- fusable-node: array of phandles with reg base and bit offset, this
+		property is used by Firmware to runtime disable nodes.
 
 Optional Child nodes:
 
@@ -42,4 +44,7 @@ Example:
 		tempmon_temp_grade: temp-grade@20 {
 			reg = <0x20 4>;
 		};
+
+		fusable-node = <&usdhc1 0x10 4
+				&usdhc2 0x10 5>;
 	};
-- 
2.16.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC 2/2] ARM: dts: imx6ull/z: add fusable-node property
  2019-05-20  3:06 ` Peng Fan
  (?)
@ 2019-05-20  3:06   ` Peng Fan
  -1 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  3:06 UTC (permalink / raw)
  To: srinivas.kandagatla, robh+dt, shawnguo, mark.rutland, s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

Add fusable-node property for OCOTP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/boot/dts/imx6ull.dtsi | 7 +++++++
 arch/arm/boot/dts/imx6ulz.dtsi | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi
index 22e4a307fa59..b616ed6ee4bf 100644
--- a/arch/arm/boot/dts/imx6ull.dtsi
+++ b/arch/arm/boot/dts/imx6ull.dtsi
@@ -32,6 +32,13 @@
 
 &ocotp {
 	compatible = "fsl,imx6ull-ocotp", "syscon";
+
+	fusable-node = <&tsc	0xc 22
+			&can1	0xc 26
+			&can2	0xc 27
+			&usdhc1 0x10 4
+			&usdhc2 0x10 5
+			>;
 };
 
 &usdhc1 {
diff --git a/arch/arm/boot/dts/imx6ulz.dtsi b/arch/arm/boot/dts/imx6ulz.dtsi
index 0b5f1a763567..8edd9008e38b 100644
--- a/arch/arm/boot/dts/imx6ulz.dtsi
+++ b/arch/arm/boot/dts/imx6ulz.dtsi
@@ -19,6 +19,12 @@
 	};
 };
 
+&ocotp {
+	fusable-node = <&usdhc1 0x10 4
+			&usdhc2 0x10 5
+			>;
+};
+
 /delete-node/ &adc1;
 /delete-node/ &ecspi3;
 /delete-node/ &ecspi4;
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC 2/2] ARM: dts: imx6ull/z: add fusable-node property
@ 2019-05-20  3:06   ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  3:06 UTC (permalink / raw)
  To: srinivas.kandagatla, robh+dt, shawnguo, mark.rutland, s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel, Peng Fan

Add fusable-node property for OCOTP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/boot/dts/imx6ull.dtsi | 7 +++++++
 arch/arm/boot/dts/imx6ulz.dtsi | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi
index 22e4a307fa59..b616ed6ee4bf 100644
--- a/arch/arm/boot/dts/imx6ull.dtsi
+++ b/arch/arm/boot/dts/imx6ull.dtsi
@@ -32,6 +32,13 @@
 
 &ocotp {
 	compatible = "fsl,imx6ull-ocotp", "syscon";
+
+	fusable-node = <&tsc	0xc 22
+			&can1	0xc 26
+			&can2	0xc 27
+			&usdhc1 0x10 4
+			&usdhc2 0x10 5
+			>;
 };
 
 &usdhc1 {
diff --git a/arch/arm/boot/dts/imx6ulz.dtsi b/arch/arm/boot/dts/imx6ulz.dtsi
index 0b5f1a763567..8edd9008e38b 100644
--- a/arch/arm/boot/dts/imx6ulz.dtsi
+++ b/arch/arm/boot/dts/imx6ulz.dtsi
@@ -19,6 +19,12 @@
 	};
 };
 
+&ocotp {
+	fusable-node = <&usdhc1 0x10 4
+			&usdhc2 0x10 5
+			>;
+};
+
 /delete-node/ &adc1;
 /delete-node/ &ecspi3;
 /delete-node/ &ecspi4;
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [RFC 2/2] ARM: dts: imx6ull/z: add fusable-node property
@ 2019-05-20  3:06   ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  3:06 UTC (permalink / raw)
  To: srinivas.kandagatla, robh+dt, shawnguo, mark.rutland, s.hauer, kernel
  Cc: devicetree, Peng Fan, linux-kernel, dl-linux-imx, festevam,
	linux-arm-kernel

Add fusable-node property for OCOTP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/boot/dts/imx6ull.dtsi | 7 +++++++
 arch/arm/boot/dts/imx6ulz.dtsi | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi
index 22e4a307fa59..b616ed6ee4bf 100644
--- a/arch/arm/boot/dts/imx6ull.dtsi
+++ b/arch/arm/boot/dts/imx6ull.dtsi
@@ -32,6 +32,13 @@
 
 &ocotp {
 	compatible = "fsl,imx6ull-ocotp", "syscon";
+
+	fusable-node = <&tsc	0xc 22
+			&can1	0xc 26
+			&can2	0xc 27
+			&usdhc1 0x10 4
+			&usdhc2 0x10 5
+			>;
 };
 
 &usdhc1 {
diff --git a/arch/arm/boot/dts/imx6ulz.dtsi b/arch/arm/boot/dts/imx6ulz.dtsi
index 0b5f1a763567..8edd9008e38b 100644
--- a/arch/arm/boot/dts/imx6ulz.dtsi
+++ b/arch/arm/boot/dts/imx6ulz.dtsi
@@ -19,6 +19,12 @@
 	};
 };
 
+&ocotp {
+	fusable-node = <&usdhc1 0x10 4
+			&usdhc2 0x10 5
+			>;
+};
+
 /delete-node/ &adc1;
 /delete-node/ &ecspi3;
 /delete-node/ &ecspi4;
-- 
2.16.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
  2019-05-20  3:06 ` Peng Fan
  (?)
@ 2019-05-20  9:33   ` Leonard Crestez
  -1 siblings, 0 replies; 22+ messages in thread
From: Leonard Crestez @ 2019-05-20  9:33 UTC (permalink / raw)
  To: Peng Fan, srinivas.kandagatla, robh+dt, shawnguo, mark.rutland,
	s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel, linux-kernel

On 20.05.2019 06:06, Peng Fan wrote:
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to
> runtime disable the nodes.
> 
> Take i.MX6ULL for example, there are several parts that only
> have limited modules enabled controlled by OCOTP fuse. It is
> not flexible to provide several dts for the serval parts, instead
> we could provide one device tree and let Firmware to runtime disable
> the device tree nodes for those modules that are disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices
> that could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.
> 
> There are two approaches to resolve:
> 
> 1. This patch is to add a fusable-node property, and Firmware will parse
>     the property and read fuse to decide whether to disable or keeep enable
>     the nodes.
> 
> 2. There is another approach is that add nvmem-cells for all nodes that
>     could be disabled(fused). Then in each linux driver to use nvmem
>     api to detect fused or not, or in linux driver common code to check
>     device functionable or not with nvmem API.
> 
> 
> To make it easy to work, we choose [1] here. Please advise whether
> it is acceptable, because the property is not used by linux driver in
> approach [1]. Or you prefer [2] or please advise if any better solution.

Couldn't firmware parse nvmem-cells? Even without a full nvmem subsystem 
it would be possible for imx-specific code to walk the entire device 
tree, parse nvmem-cells and disable nodes which are disabled by fuse.

--
Regards,
Leonard

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-20  9:33   ` Leonard Crestez
  0 siblings, 0 replies; 22+ messages in thread
From: Leonard Crestez @ 2019-05-20  9:33 UTC (permalink / raw)
  To: Peng Fan, srinivas.kandagatla, robh+dt, shawnguo, mark.rutland,
	s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel, linux-kernel

On 20.05.2019 06:06, Peng Fan wrote:
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to
> runtime disable the nodes.
> 
> Take i.MX6ULL for example, there are several parts that only
> have limited modules enabled controlled by OCOTP fuse. It is
> not flexible to provide several dts for the serval parts, instead
> we could provide one device tree and let Firmware to runtime disable
> the device tree nodes for those modules that are disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices
> that could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.
> 
> There are two approaches to resolve:
> 
> 1. This patch is to add a fusable-node property, and Firmware will parse
>     the property and read fuse to decide whether to disable or keeep enable
>     the nodes.
> 
> 2. There is another approach is that add nvmem-cells for all nodes that
>     could be disabled(fused). Then in each linux driver to use nvmem
>     api to detect fused or not, or in linux driver common code to check
>     device functionable or not with nvmem API.
> 
> 
> To make it easy to work, we choose [1] here. Please advise whether
> it is acceptable, because the property is not used by linux driver in
> approach [1]. Or you prefer [2] or please advise if any better solution.

Couldn't firmware parse nvmem-cells? Even without a full nvmem subsystem 
it would be possible for imx-specific code to walk the entire device 
tree, parse nvmem-cells and disable nodes which are disabled by fuse.

--
Regards,
Leonard

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-20  9:33   ` Leonard Crestez
  0 siblings, 0 replies; 22+ messages in thread
From: Leonard Crestez @ 2019-05-20  9:33 UTC (permalink / raw)
  To: Peng Fan, srinivas.kandagatla, robh+dt, shawnguo, mark.rutland,
	s.hauer, kernel
  Cc: devicetree, festevam, dl-linux-imx, linux-arm-kernel, linux-kernel

On 20.05.2019 06:06, Peng Fan wrote:
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to
> runtime disable the nodes.
> 
> Take i.MX6ULL for example, there are several parts that only
> have limited modules enabled controlled by OCOTP fuse. It is
> not flexible to provide several dts for the serval parts, instead
> we could provide one device tree and let Firmware to runtime disable
> the device tree nodes for those modules that are disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices
> that could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.
> 
> There are two approaches to resolve:
> 
> 1. This patch is to add a fusable-node property, and Firmware will parse
>     the property and read fuse to decide whether to disable or keeep enable
>     the nodes.
> 
> 2. There is another approach is that add nvmem-cells for all nodes that
>     could be disabled(fused). Then in each linux driver to use nvmem
>     api to detect fused or not, or in linux driver common code to check
>     device functionable or not with nvmem API.
> 
> 
> To make it easy to work, we choose [1] here. Please advise whether
> it is acceptable, because the property is not used by linux driver in
> approach [1]. Or you prefer [2] or please advise if any better solution.

Couldn't firmware parse nvmem-cells? Even without a full nvmem subsystem 
it would be possible for imx-specific code to walk the entire device 
tree, parse nvmem-cells and disable nodes which are disabled by fuse.

--
Regards,
Leonard

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
  2019-05-20  9:33   ` Leonard Crestez
  (?)
@ 2019-05-20  9:37     ` Peng Fan
  -1 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  9:37 UTC (permalink / raw)
  To: Leonard Crestez, srinivas.kandagatla, robh+dt, shawnguo,
	mark.rutland, s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel, linux-kernel

> Subject: Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
> 
> On 20.05.2019 06:06, Peng Fan wrote:
> > Introduce fusable-node property for i.MX OCOTP driver.
> > The property will only be used by Firmware(eg. U-Boot) to runtime
> > disable the nodes.
> >
> > Take i.MX6ULL for example, there are several parts that only have
> > limited modules enabled controlled by OCOTP fuse. It is not flexible
> > to provide several dts for the serval parts, instead we could provide
> > one device tree and let Firmware to runtime disable the device tree
> > nodes for those modules that are disable(fused).
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > Currently NXP vendor use U-Boot to set status to disabled for devices
> > that could not function,
> >
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mac
> > h-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> > But this approach is will not work if kernel dts node path changed.
> >
> > There are two approaches to resolve:
> >
> > 1. This patch is to add a fusable-node property, and Firmware will parse
> >     the property and read fuse to decide whether to disable or keeep
> enable
> >     the nodes.
> >
> > 2. There is another approach is that add nvmem-cells for all nodes that
> >     could be disabled(fused). Then in each linux driver to use nvmem
> >     api to detect fused or not, or in linux driver common code to check
> >     device functionable or not with nvmem API.
> >
> >
> > To make it easy to work, we choose [1] here. Please advise whether it
> > is acceptable, because the property is not used by linux driver in
> > approach [1]. Or you prefer [2] or please advise if any better solution.
> 
> Couldn't firmware parse nvmem-cells? Even without a full nvmem subsystem
> it would be possible for imx-specific code to walk the entire device tree, parse
> nvmem-cells and disable nodes which are disabled by fuse.

Firmware could parse nvmem-cells, but there are lots of modules that could
be fused. If using nvmem-cells, that means need to add nvmem property
for all the modules that could be fused. To make is looks cleaner, so introduced
a fusable-node property.

Regards,
Peng.

> 
> --
> Regards,
> Leonard

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-20  9:37     ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  9:37 UTC (permalink / raw)
  To: Leonard Crestez, srinivas.kandagatla, robh+dt, shawnguo,
	mark.rutland, s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel, linux-kernel

> Subject: Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
> 
> On 20.05.2019 06:06, Peng Fan wrote:
> > Introduce fusable-node property for i.MX OCOTP driver.
> > The property will only be used by Firmware(eg. U-Boot) to runtime
> > disable the nodes.
> >
> > Take i.MX6ULL for example, there are several parts that only have
> > limited modules enabled controlled by OCOTP fuse. It is not flexible
> > to provide several dts for the serval parts, instead we could provide
> > one device tree and let Firmware to runtime disable the device tree
> > nodes for those modules that are disable(fused).
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > Currently NXP vendor use U-Boot to set status to disabled for devices
> > that could not function,
> >
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mac
> > h-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> > But this approach is will not work if kernel dts node path changed.
> >
> > There are two approaches to resolve:
> >
> > 1. This patch is to add a fusable-node property, and Firmware will parse
> >     the property and read fuse to decide whether to disable or keeep
> enable
> >     the nodes.
> >
> > 2. There is another approach is that add nvmem-cells for all nodes that
> >     could be disabled(fused). Then in each linux driver to use nvmem
> >     api to detect fused or not, or in linux driver common code to check
> >     device functionable or not with nvmem API.
> >
> >
> > To make it easy to work, we choose [1] here. Please advise whether it
> > is acceptable, because the property is not used by linux driver in
> > approach [1]. Or you prefer [2] or please advise if any better solution.
> 
> Couldn't firmware parse nvmem-cells? Even without a full nvmem subsystem
> it would be possible for imx-specific code to walk the entire device tree, parse
> nvmem-cells and disable nodes which are disabled by fuse.

Firmware could parse nvmem-cells, but there are lots of modules that could
be fused. If using nvmem-cells, that means need to add nvmem property
for all the modules that could be fused. To make is looks cleaner, so introduced
a fusable-node property.

Regards,
Peng.

> 
> --
> Regards,
> Leonard

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-20  9:37     ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-20  9:37 UTC (permalink / raw)
  To: Leonard Crestez, srinivas.kandagatla, robh+dt, shawnguo,
	mark.rutland, s.hauer, kernel
  Cc: devicetree, festevam, dl-linux-imx, linux-arm-kernel, linux-kernel

> Subject: Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
> 
> On 20.05.2019 06:06, Peng Fan wrote:
> > Introduce fusable-node property for i.MX OCOTP driver.
> > The property will only be used by Firmware(eg. U-Boot) to runtime
> > disable the nodes.
> >
> > Take i.MX6ULL for example, there are several parts that only have
> > limited modules enabled controlled by OCOTP fuse. It is not flexible
> > to provide several dts for the serval parts, instead we could provide
> > one device tree and let Firmware to runtime disable the device tree
> > nodes for those modules that are disable(fused).
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > Currently NXP vendor use U-Boot to set status to disabled for devices
> > that could not function,
> >
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mac
> > h-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> > But this approach is will not work if kernel dts node path changed.
> >
> > There are two approaches to resolve:
> >
> > 1. This patch is to add a fusable-node property, and Firmware will parse
> >     the property and read fuse to decide whether to disable or keeep
> enable
> >     the nodes.
> >
> > 2. There is another approach is that add nvmem-cells for all nodes that
> >     could be disabled(fused). Then in each linux driver to use nvmem
> >     api to detect fused or not, or in linux driver common code to check
> >     device functionable or not with nvmem API.
> >
> >
> > To make it easy to work, we choose [1] here. Please advise whether it
> > is acceptable, because the property is not used by linux driver in
> > approach [1]. Or you prefer [2] or please advise if any better solution.
> 
> Couldn't firmware parse nvmem-cells? Even without a full nvmem subsystem
> it would be possible for imx-specific code to walk the entire device tree, parse
> nvmem-cells and disable nodes which are disabled by fuse.

Firmware could parse nvmem-cells, but there are lots of modules that could
be fused. If using nvmem-cells, that means need to add nvmem property
for all the modules that could be fused. To make is looks cleaner, so introduced
a fusable-node property.

Regards,
Peng.

> 
> --
> Regards,
> Leonard

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
  2019-05-20  3:06 ` Peng Fan
  (?)
@ 2019-05-29 11:48   ` Peng Fan
  -1 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-29 11:48 UTC (permalink / raw)
  To: Peng Fan, srinivas.kandagatla, robh+dt, shawnguo, mark.rutland,
	s.hauer, kernel
  Cc: festevam, dl-linux-imx, devicetree, linux-arm-kernel, linux-kernel

Hi Rob, Srinivas

> Subject: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property

Do you have any comments about this patch?

Thanks,
Peng.

> 
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to runtime disable the
> nodes.
> 
> Take i.MX6ULL for example, there are several parts that only have limited
> modules enabled controlled by OCOTP fuse. It is not flexible to provide several
> dts for the serval parts, instead we could provide one device tree and let
> Firmware to runtime disable the device tree nodes for those modules that are
> disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices that
> could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach
> -imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.
> 
> There are two approaches to resolve:
> 
> 1. This patch is to add a fusable-node property, and Firmware will parse
>    the property and read fuse to decide whether to disable or keeep enable
>    the nodes.
> 
> 2. There is another approach is that add nvmem-cells for all nodes that
>    could be disabled(fused). Then in each linux driver to use nvmem
>    api to detect fused or not, or in linux driver common code to check
>    device functionable or not with nvmem API.
> 
> 
> To make it easy to work, we choose [1] here. Please advise whether it is
> acceptable, because the property is not used by linux driver in approach [1].
> Or you prefer [2] or please advise if any better solution.
> 
> Thanks.
> 
>  Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> index 7a999a135e56..e9a998588dbd 100644
> --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> @@ -21,6 +21,8 @@ Required properties:
> 
>  Optional properties:
>  - read-only: disable write access
> +- fusable-node: array of phandles with reg base and bit offset, this
> +		property is used by Firmware to runtime disable nodes.
> 
>  Optional Child nodes:
> 
> @@ -42,4 +44,7 @@ Example:
>  		tempmon_temp_grade: temp-grade@20 {
>  			reg = <0x20 4>;
>  		};
> +
> +		fusable-node = <&usdhc1 0x10 4
> +				&usdhc2 0x10 5>;
>  	};
> --
> 2.16.4


^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-29 11:48   ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-29 11:48 UTC (permalink / raw)
  To: Peng Fan, srinivas.kandagatla, robh+dt, shawnguo, mark.rutland,
	s.hauer, kernel
  Cc: devicetree, festevam, dl-linux-imx, linux-arm-kernel, linux-kernel

Hi Rob, Srinivas

> Subject: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property

Do you have any comments about this patch?

Thanks,
Peng.

> 
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to runtime disable the
> nodes.
> 
> Take i.MX6ULL for example, there are several parts that only have limited
> modules enabled controlled by OCOTP fuse. It is not flexible to provide several
> dts for the serval parts, instead we could provide one device tree and let
> Firmware to runtime disable the device tree nodes for those modules that are
> disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices that
> could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach
> -imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.
> 
> There are two approaches to resolve:
> 
> 1. This patch is to add a fusable-node property, and Firmware will parse
>    the property and read fuse to decide whether to disable or keeep enable
>    the nodes.
> 
> 2. There is another approach is that add nvmem-cells for all nodes that
>    could be disabled(fused). Then in each linux driver to use nvmem
>    api to detect fused or not, or in linux driver common code to check
>    device functionable or not with nvmem API.
> 
> 
> To make it easy to work, we choose [1] here. Please advise whether it is
> acceptable, because the property is not used by linux driver in approach [1].
> Or you prefer [2] or please advise if any better solution.
> 
> Thanks.
> 
>  Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> index 7a999a135e56..e9a998588dbd 100644
> --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> @@ -21,6 +21,8 @@ Required properties:
> 
>  Optional properties:
>  - read-only: disable write access
> +- fusable-node: array of phandles with reg base and bit offset, this
> +		property is used by Firmware to runtime disable nodes.
> 
>  Optional Child nodes:
> 
> @@ -42,4 +44,7 @@ Example:
>  		tempmon_temp_grade: temp-grade@20 {
>  			reg = <0x20 4>;
>  		};
> +
> +		fusable-node = <&usdhc1 0x10 4
> +				&usdhc2 0x10 5>;
>  	};
> --
> 2.16.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-05-29 11:48   ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-05-29 11:48 UTC (permalink / raw)
  To: Peng Fan, srinivas.kandagatla, robh+dt, shawnguo, mark.rutland,
	s.hauer, kernel
  Cc: devicetree, festevam, dl-linux-imx, linux-arm-kernel, linux-kernel

Hi Rob, Srinivas

> Subject: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property

Do you have any comments about this patch?

Thanks,
Peng.

> 
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to runtime disable the
> nodes.
> 
> Take i.MX6ULL for example, there are several parts that only have limited
> modules enabled controlled by OCOTP fuse. It is not flexible to provide several
> dts for the serval parts, instead we could provide one device tree and let
> Firmware to runtime disable the device tree nodes for those modules that are
> disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices that
> could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach
> -imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.
> 
> There are two approaches to resolve:
> 
> 1. This patch is to add a fusable-node property, and Firmware will parse
>    the property and read fuse to decide whether to disable or keeep enable
>    the nodes.
> 
> 2. There is another approach is that add nvmem-cells for all nodes that
>    could be disabled(fused). Then in each linux driver to use nvmem
>    api to detect fused or not, or in linux driver common code to check
>    device functionable or not with nvmem API.
> 
> 
> To make it easy to work, we choose [1] here. Please advise whether it is
> acceptable, because the property is not used by linux driver in approach [1].
> Or you prefer [2] or please advise if any better solution.
> 
> Thanks.
> 
>  Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> index 7a999a135e56..e9a998588dbd 100644
> --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.txt
> @@ -21,6 +21,8 @@ Required properties:
> 
>  Optional properties:
>  - read-only: disable write access
> +- fusable-node: array of phandles with reg base and bit offset, this
> +		property is used by Firmware to runtime disable nodes.
> 
>  Optional Child nodes:
> 
> @@ -42,4 +44,7 @@ Example:
>  		tempmon_temp_grade: temp-grade@20 {
>  			reg = <0x20 4>;
>  		};
> +
> +		fusable-node = <&usdhc1 0x10 4
> +				&usdhc2 0x10 5>;
>  	};
> --
> 2.16.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
  2019-05-20  3:06 ` Peng Fan
  (?)
@ 2019-06-13 23:00   ` Rob Herring
  -1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2019-06-13 23:00 UTC (permalink / raw)
  To: Peng Fan
  Cc: srinivas.kandagatla, shawnguo, mark.rutland, s.hauer, kernel,
	festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel

On Mon, May 20, 2019 at 03:06:35AM +0000, Peng Fan wrote:
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to
> runtime disable the nodes.
> 
> Take i.MX6ULL for example, there are several parts that only
> have limited modules enabled controlled by OCOTP fuse. It is
> not flexible to provide several dts for the serval parts, instead
> we could provide one device tree and let Firmware to runtime disable
> the device tree nodes for those modules that are disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices
> that could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.

Why would the path change? The DT should be stable.

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-06-13 23:00   ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2019-06-13 23:00 UTC (permalink / raw)
  To: Peng Fan
  Cc: srinivas.kandagatla, shawnguo, mark.rutland, s.hauer, kernel,
	festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel

On Mon, May 20, 2019 at 03:06:35AM +0000, Peng Fan wrote:
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to
> runtime disable the nodes.
> 
> Take i.MX6ULL for example, there are several parts that only
> have limited modules enabled controlled by OCOTP fuse. It is
> not flexible to provide several dts for the serval parts, instead
> we could provide one device tree and let Firmware to runtime disable
> the device tree nodes for those modules that are disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices
> that could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.

Why would the path change? The DT should be stable.

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-06-13 23:00   ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2019-06-13 23:00 UTC (permalink / raw)
  To: Peng Fan
  Cc: mark.rutland, devicetree, festevam, s.hauer, linux-kernel,
	srinivas.kandagatla, dl-linux-imx, kernel, shawnguo,
	linux-arm-kernel

On Mon, May 20, 2019 at 03:06:35AM +0000, Peng Fan wrote:
> Introduce fusable-node property for i.MX OCOTP driver.
> The property will only be used by Firmware(eg. U-Boot) to
> runtime disable the nodes.
> 
> Take i.MX6ULL for example, there are several parts that only
> have limited modules enabled controlled by OCOTP fuse. It is
> not flexible to provide several dts for the serval parts, instead
> we could provide one device tree and let Firmware to runtime disable
> the device tree nodes for those modules that are disable(fused).
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> 
> Currently NXP vendor use U-Boot to set status to disabled for devices
> that could not function,
> https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/mach-imx/mx6/module_fuse.c?h=imx_v2018.03_4.14.98_2.0.0_ga#n149
> But this approach is will not work if kernel dts node path changed.

Why would the path change? The DT should be stable.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
  2019-06-13 23:00   ` Rob Herring
  (?)
@ 2019-06-14  1:19     ` Peng Fan
  -1 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-06-14  1:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: srinivas.kandagatla, shawnguo, mark.rutland, s.hauer, kernel,
	festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel

Hi Rob,

> Subject: Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
> 
> On Mon, May 20, 2019 at 03:06:35AM +0000, Peng Fan wrote:
> > Introduce fusable-node property for i.MX OCOTP driver.
> > The property will only be used by Firmware(eg. U-Boot) to runtime
> > disable the nodes.
> >
> > Take i.MX6ULL for example, there are several parts that only have
> > limited modules enabled controlled by OCOTP fuse. It is not flexible
> > to provide several dts for the serval parts, instead we could provide
> > one device tree and let Firmware to runtime disable the device tree
> > nodes for those modules that are disable(fused).
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > Currently NXP vendor use U-Boot to set status to disabled for devices
> > that could not function,
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour
> >
> ce.codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Ftree%2Farch%2Far
> m%2Fm
> >
> ach-imx%2Fmx6%2Fmodule_fuse.c%3Fh%3Dimx_v2018.03_4.14.98_2.0.0_g
> a%23n1
> >
> 49&amp;data=02%7C01%7Cpeng.fan%40nxp.com%7Ceb74876c943c4471d7f
> f08d6f05
> >
> 2fffb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63696063660
> 6051306&
> >
> amp;sdata=MrjCP0ufBu3uTb1ehTEu2g5eSQuYcho4UxuR9KUFEOA%3D&amp;
> reserved=
> > 0 But this approach is will not work if kernel dts node path changed.
> 
> Why would the path change? The DT should be stable.

It changes sometimes, such as
efb9adb27475 ("ARM: dts: imx6ul: Remove leading zeroes from unit addresses"),

in bootloader, we are using node path, so if the node name changes, the bootloader
will fail to disable the node.

Thanks,
Peng.

> 
> Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-06-14  1:19     ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-06-14  1:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: srinivas.kandagatla, shawnguo, mark.rutland, s.hauer, kernel,
	festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel

Hi Rob,

> Subject: Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
> 
> On Mon, May 20, 2019 at 03:06:35AM +0000, Peng Fan wrote:
> > Introduce fusable-node property for i.MX OCOTP driver.
> > The property will only be used by Firmware(eg. U-Boot) to runtime
> > disable the nodes.
> >
> > Take i.MX6ULL for example, there are several parts that only have
> > limited modules enabled controlled by OCOTP fuse. It is not flexible
> > to provide several dts for the serval parts, instead we could provide
> > one device tree and let Firmware to runtime disable the device tree
> > nodes for those modules that are disable(fused).
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > Currently NXP vendor use U-Boot to set status to disabled for devices
> > that could not function,
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour
> >
> ce.codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Ftree%2Farch%2Far
> m%2Fm
> >
> ach-imx%2Fmx6%2Fmodule_fuse.c%3Fh%3Dimx_v2018.03_4.14.98_2.0.0_g
> a%23n1
> >
> 49&amp;data=02%7C01%7Cpeng.fan%40nxp.com%7Ceb74876c943c4471d7f
> f08d6f05
> >
> 2fffb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63696063660
> 6051306&
> >
> amp;sdata=MrjCP0ufBu3uTb1ehTEu2g5eSQuYcho4UxuR9KUFEOA%3D&amp;
> reserved=
> > 0 But this approach is will not work if kernel dts node path changed.
> 
> Why would the path change? The DT should be stable.

It changes sometimes, such as
efb9adb27475 ("ARM: dts: imx6ul: Remove leading zeroes from unit addresses"),

in bootloader, we are using node path, so if the node name changes, the bootloader
will fail to disable the node.

Thanks,
Peng.

> 
> Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* RE: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
@ 2019-06-14  1:19     ` Peng Fan
  0 siblings, 0 replies; 22+ messages in thread
From: Peng Fan @ 2019-06-14  1:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: mark.rutland, devicetree, festevam, s.hauer, linux-kernel,
	srinivas.kandagatla, dl-linux-imx, kernel, shawnguo,
	linux-arm-kernel

Hi Rob,

> Subject: Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
> 
> On Mon, May 20, 2019 at 03:06:35AM +0000, Peng Fan wrote:
> > Introduce fusable-node property for i.MX OCOTP driver.
> > The property will only be used by Firmware(eg. U-Boot) to runtime
> > disable the nodes.
> >
> > Take i.MX6ULL for example, there are several parts that only have
> > limited modules enabled controlled by OCOTP fuse. It is not flexible
> > to provide several dts for the serval parts, instead we could provide
> > one device tree and let Firmware to runtime disable the device tree
> > nodes for those modules that are disable(fused).
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >
> > Currently NXP vendor use U-Boot to set status to disabled for devices
> > that could not function,
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour
> >
> ce.codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Ftree%2Farch%2Far
> m%2Fm
> >
> ach-imx%2Fmx6%2Fmodule_fuse.c%3Fh%3Dimx_v2018.03_4.14.98_2.0.0_g
> a%23n1
> >
> 49&amp;data=02%7C01%7Cpeng.fan%40nxp.com%7Ceb74876c943c4471d7f
> f08d6f05
> >
> 2fffb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63696063660
> 6051306&
> >
> amp;sdata=MrjCP0ufBu3uTb1ehTEu2g5eSQuYcho4UxuR9KUFEOA%3D&amp;
> reserved=
> > 0 But this approach is will not work if kernel dts node path changed.
> 
> Why would the path change? The DT should be stable.

It changes sometimes, such as
efb9adb27475 ("ARM: dts: imx6ul: Remove leading zeroes from unit addresses"),

in bootloader, we are using node path, so if the node name changes, the bootloader
will fail to disable the node.

Thanks,
Peng.

> 
> Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
  2019-06-14  1:19     ` Peng Fan
  (?)
  (?)
@ 2019-06-14 13:05     ` Rob Herring
  -1 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2019-06-14 13:05 UTC (permalink / raw)
  To: Peng Fan
  Cc: srinivas.kandagatla, shawnguo, mark.rutland, s.hauer, kernel,
	festevam, dl-linux-imx, devicetree, linux-arm-kernel,
	linux-kernel

On Thu, Jun 13, 2019 at 7:19 PM Peng Fan <peng.fan@nxp.com> wrote:
>
> Hi Rob,
>
> > Subject: Re: [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property
> >
> > On Mon, May 20, 2019 at 03:06:35AM +0000, Peng Fan wrote:
> > > Introduce fusable-node property for i.MX OCOTP driver.
> > > The property will only be used by Firmware(eg. U-Boot) to runtime
> > > disable the nodes.
> > >
> > > Take i.MX6ULL for example, there are several parts that only have
> > > limited modules enabled controlled by OCOTP fuse. It is not flexible
> > > to provide several dts for the serval parts, instead we could provide
> > > one device tree and let Firmware to runtime disable the device tree
> > > nodes for those modules that are disable(fused).
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > >
> > > Currently NXP vendor use U-Boot to set status to disabled for devices
> > > that could not function,
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsour
> > >
> > ce.codeaurora.org%2Fexternal%2Fimx%2Fuboot-imx%2Ftree%2Farch%2Far
> > m%2Fm
> > >
> > ach-imx%2Fmx6%2Fmodule_fuse.c%3Fh%3Dimx_v2018.03_4.14.98_2.0.0_g
> > a%23n1
> > >
> > 49&amp;data=02%7C01%7Cpeng.fan%40nxp.com%7Ceb74876c943c4471d7f
> > f08d6f05
> > >
> > 2fffb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63696063660
> > 6051306&
> > >
> > amp;sdata=MrjCP0ufBu3uTb1ehTEu2g5eSQuYcho4UxuR9KUFEOA%3D&amp;
> > reserved=
> > > 0 But this approach is will not work if kernel dts node path changed.
> >
> > Why would the path change? The DT should be stable.
>
> It changes sometimes, such as
> efb9adb27475 ("ARM: dts: imx6ul: Remove leading zeroes from unit addresses"),
>
> in bootloader, we are using node path, so if the node name changes, the bootloader
> will fail to disable the node.
>
> Thanks,
> Peng.
>
> >
> > Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-06-14 13:05 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20  3:06 [RFC 1/2] dt-bindings: imx-ocotp: Add fusable-node property Peng Fan
2019-05-20  3:06 ` Peng Fan
2019-05-20  3:06 ` Peng Fan
2019-05-20  3:06 ` [RFC 2/2] ARM: dts: imx6ull/z: add " Peng Fan
2019-05-20  3:06   ` Peng Fan
2019-05-20  3:06   ` Peng Fan
2019-05-20  9:33 ` [RFC 1/2] dt-bindings: imx-ocotp: Add " Leonard Crestez
2019-05-20  9:33   ` Leonard Crestez
2019-05-20  9:33   ` Leonard Crestez
2019-05-20  9:37   ` Peng Fan
2019-05-20  9:37     ` Peng Fan
2019-05-20  9:37     ` Peng Fan
2019-05-29 11:48 ` Peng Fan
2019-05-29 11:48   ` Peng Fan
2019-05-29 11:48   ` Peng Fan
2019-06-13 23:00 ` Rob Herring
2019-06-13 23:00   ` Rob Herring
2019-06-13 23:00   ` Rob Herring
2019-06-14  1:19   ` Peng Fan
2019-06-14  1:19     ` Peng Fan
2019-06-14  1:19     ` Peng Fan
2019-06-14 13:05     ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.