linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Make i.MX8M OCOTP work as accessing controller
@ 2025-02-07  8:36 Alexander Stein
  2025-02-07  8:36 ` [PATCH v2 01/10] nvmem: imx-ocotp: Sort header alphabetically Alexander Stein
                   ` (9 more replies)
  0 siblings, 10 replies; 23+ messages in thread
From: Alexander Stein @ 2025-02-07  8:36 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Srinivas Kandagatla
  Cc: Alexander Stein, devicetree, imx, linux-arm-kernel, linux-kernel

Hi,

inspired by [1] this adds the accessing controller feature to i.MX8M.
The OCOTP eFuse has bits which can disable particular peripherals, such as
GPU, MIPI-DSI oder USB.

In OCOTP driver, the nodes under "/" will be iterated, and checked
if property "#access-controllers" exsits. If not allow access, detach
the node.

I successfully used this on a i.MX8M Nano DualLite which has GPU disabled.
Without this patchset the default DT completly freezes the SoC if GPU
is accessed.
Using this patchset the GPU is disabled without any DT modification from
bootloader:
> imx_ocotp 30350000.efuse: /soc@0/gpu@38000000: disabled by fuse, device driver will not be probed

Changes in v2:
* Encode all addresses and bit offsets into DT directly
  This eliminates the need for platform specific code in imx-ocotp
* Added support for imx8mm, imx8mp and imx8mq as well

Best regards,
Alexander

[1] https://lore.kernel.org/all/20250204-imx-ocotp-v8-0-01be4a4bb045@nxp.com/

Alexander Stein (10):
  nvmem: imx-ocotp: Sort header alphabetically
  nvmem: imx-ocotp: Support accessing controller for i.MX8M
  arm64: dts: imx8mn: Add i.MX8M Nano OCOTP disable fuse definitions
  arm64: dts: imx8mn: Add access-controller references
  arm64: dts: imx8mp: Add i.MX8M Plus OCOTP disable fuse definitions
  arm64: dts: imx8mp: Add access-controller references
  arm64: dts: imx8mm: Add i.MX8M Mini OCOTP disable fuse definitions
  arm64: dts: imx8mm: Add access-controller references
  arm64: dts: imx8mq: Add i.MX8M OCOTP disable fuse definitions
  arm64: dts: imx8mq: Add access-controller references

 arch/arm64/boot/dts/freescale/imx8mm-ocotp.h | 31 ++++++++
 arch/arm64/boot/dts/freescale/imx8mm.dtsi    | 13 ++++
 arch/arm64/boot/dts/freescale/imx8mn-ocotp.h | 26 +++++++
 arch/arm64/boot/dts/freescale/imx8mn.dtsi    |  8 +++
 arch/arm64/boot/dts/freescale/imx8mp-ocotp.h | 42 +++++++++++
 arch/arm64/boot/dts/freescale/imx8mp.dtsi    | 26 +++++++
 arch/arm64/boot/dts/freescale/imx8mq-ocotp.h | 37 ++++++++++
 arch/arm64/boot/dts/freescale/imx8mq.dtsi    | 15 ++++
 drivers/nvmem/Kconfig                        |  3 +
 drivers/nvmem/imx-ocotp.c                    | 76 +++++++++++++++++++-
 10 files changed, 275 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mm-ocotp.h
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-ocotp.h
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-ocotp.h
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-ocotp.h

-- 
2.34.1



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

end of thread, other threads:[~2025-02-12  8:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07  8:36 [PATCH v2 00/10] Make i.MX8M OCOTP work as accessing controller Alexander Stein
2025-02-07  8:36 ` [PATCH v2 01/10] nvmem: imx-ocotp: Sort header alphabetically Alexander Stein
2025-02-07  8:36 ` [PATCH v2 02/10] nvmem: imx-ocotp: Support accessing controller for i.MX8M Alexander Stein
2025-02-07 15:22   ` Frank Li
2025-02-07  8:36 ` [PATCH v2 03/10] arm64: dts: imx8mn: Add i.MX8M Nano OCOTP disable fuse definitions Alexander Stein
2025-02-07 11:54   ` Peng Fan
2025-02-07  8:36 ` [PATCH v2 04/10] arm64: dts: imx8mn: Add access-controller references Alexander Stein
2025-02-07 12:02   ` Peng Fan
2025-02-07 12:37     ` Alexander Stein
2025-02-10  2:36       ` Peng Fan
2025-02-10 15:48         ` Alexander Stein
2025-02-11  3:33           ` Peng Fan
2025-02-12  8:10             ` Alexander Stein
2025-02-12  8:22               ` Peng Fan
2025-02-07  8:36 ` [PATCH v2 05/10] arm64: dts: imx8mp: Add i.MX8M Plus OCOTP disable fuse definitions Alexander Stein
2025-02-07 15:23   ` Frank Li
2025-02-07  8:36 ` [PATCH v2 06/10] arm64: dts: imx8mp: Add access-controller references Alexander Stein
2025-02-07  8:36 ` [PATCH v2 07/10] arm64: dts: imx8mm: Add i.MX8M Mini OCOTP disable fuse definitions Alexander Stein
2025-02-07  8:36 ` [PATCH v2 08/10] arm64: dts: imx8mm: Add access-controller references Alexander Stein
2025-02-07  8:36 ` [PATCH v2 09/10] arm64: dts: imx8mq: Add i.MX8M OCOTP disable fuse definitions Alexander Stein
2025-02-07 15:24   ` Frank Li
2025-02-07  8:36 ` [PATCH v2 10/10] arm64: dts: imx8mq: Add access-controller references Alexander Stein
2025-02-07  9:03   ` Alexander Stein

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).