mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
98830350d3
Add support for Microchip OTP controller available on SAMA7G5. The OTPC controls the access to a non-volatile memory. The memory behind OTPC is organized into packets, packets are composed by a fixed length header (4 bytes long) and a variable length payload (payload length is available in the header). When software request the data at an offset in memory the OTPC will return (via header + data registers) the whole packet that has a word at that offset. For the OTP memory layout like below: offset OTP Memory layout . . . ... . . . 0x0E +-----------+ <--- packet X | header X | 0x12 +-----------+ | payload X | 0x16 | | | | 0x1A | | +-----------+ . . . ... . . . if user requests data at address 0x16 the data started at 0x0E will be returned by controller. User will be able to fetch the whole packet starting at 0x0E (or parts of the packet) via proper registers. The same packet will be returned if software request the data at offset 0x0E or 0x12 or 0x1A. The OTP will be populated by Microchip with at least 2 packets first one being boot configuration packet and the 2nd one being temperature calibration packet. The packet order will be preserved b/w different chip revisions but the packet sizes may change. For the above reasons and to keep the same software able to work on all chip variants the read function of the driver is working with a packet id instead of an offset in OTP memory. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220706100627.6534-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
72 lines
2.9 KiB
Makefile
72 lines
2.9 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for nvmem drivers.
|
|
#
|
|
|
|
obj-$(CONFIG_NVMEM) += nvmem_core.o
|
|
nvmem_core-y := core.o
|
|
|
|
# Devices
|
|
obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o
|
|
nvmem-bcm-ocotp-y := bcm-ocotp.o
|
|
obj-$(CONFIG_NVMEM_IMX_IIM) += nvmem-imx-iim.o
|
|
nvmem-imx-iim-y := imx-iim.o
|
|
obj-$(CONFIG_NVMEM_IMX_OCOTP) += nvmem-imx-ocotp.o
|
|
nvmem-imx-ocotp-y := imx-ocotp.o
|
|
obj-$(CONFIG_NVMEM_IMX_OCOTP_SCU) += nvmem-imx-ocotp-scu.o
|
|
nvmem-imx-ocotp-scu-y := imx-ocotp-scu.o
|
|
obj-$(CONFIG_JZ4780_EFUSE) += nvmem_jz4780_efuse.o
|
|
nvmem_jz4780_efuse-y := jz4780-efuse.o
|
|
obj-$(CONFIG_NVMEM_LPC18XX_EEPROM) += nvmem_lpc18xx_eeprom.o
|
|
nvmem_lpc18xx_eeprom-y := lpc18xx_eeprom.o
|
|
obj-$(CONFIG_NVMEM_LPC18XX_OTP) += nvmem_lpc18xx_otp.o
|
|
nvmem_lpc18xx_otp-y := lpc18xx_otp.o
|
|
obj-$(CONFIG_NVMEM_MXS_OCOTP) += nvmem-mxs-ocotp.o
|
|
nvmem-mxs-ocotp-y := mxs-ocotp.o
|
|
obj-$(CONFIG_NVMEM_NINTENDO_OTP) += nvmem-nintendo-otp.o
|
|
nvmem-nintendo-otp-y := nintendo-otp.o
|
|
obj-$(CONFIG_MTK_EFUSE) += nvmem_mtk-efuse.o
|
|
nvmem_mtk-efuse-y := mtk-efuse.o
|
|
obj-$(CONFIG_QCOM_QFPROM) += nvmem_qfprom.o
|
|
nvmem_qfprom-y := qfprom.o
|
|
obj-$(CONFIG_NVMEM_SPMI_SDAM) += nvmem_qcom-spmi-sdam.o
|
|
nvmem_qcom-spmi-sdam-y += qcom-spmi-sdam.o
|
|
obj-$(CONFIG_ROCKCHIP_EFUSE) += nvmem_rockchip_efuse.o
|
|
nvmem_rockchip_efuse-y := rockchip-efuse.o
|
|
obj-$(CONFIG_ROCKCHIP_OTP) += nvmem-rockchip-otp.o
|
|
nvmem-rockchip-otp-y := rockchip-otp.o
|
|
obj-$(CONFIG_NVMEM_SUNXI_SID) += nvmem_sunxi_sid.o
|
|
nvmem_stm32_romem-y := stm32-romem.o
|
|
obj-$(CONFIG_NVMEM_STM32_ROMEM) += nvmem_stm32_romem.o
|
|
nvmem_sunxi_sid-y := sunxi_sid.o
|
|
obj-$(CONFIG_UNIPHIER_EFUSE) += nvmem-uniphier-efuse.o
|
|
nvmem-uniphier-efuse-y := uniphier-efuse.o
|
|
obj-$(CONFIG_NVMEM_VF610_OCOTP) += nvmem-vf610-ocotp.o
|
|
nvmem-vf610-ocotp-y := vf610-ocotp.o
|
|
obj-$(CONFIG_MESON_EFUSE) += nvmem_meson_efuse.o
|
|
nvmem_meson_efuse-y := meson-efuse.o
|
|
obj-$(CONFIG_MESON_MX_EFUSE) += nvmem_meson_mx_efuse.o
|
|
nvmem_meson_mx_efuse-y := meson-mx-efuse.o
|
|
obj-$(CONFIG_NVMEM_SNVS_LPGPR) += nvmem_snvs_lpgpr.o
|
|
nvmem_snvs_lpgpr-y := snvs_lpgpr.o
|
|
obj-$(CONFIG_RAVE_SP_EEPROM) += nvmem-rave-sp-eeprom.o
|
|
nvmem-rave-sp-eeprom-y := rave-sp-eeprom.o
|
|
obj-$(CONFIG_SC27XX_EFUSE) += nvmem-sc27xx-efuse.o
|
|
nvmem-sc27xx-efuse-y := sc27xx-efuse.o
|
|
obj-$(CONFIG_NVMEM_ZYNQMP) += nvmem_zynqmp_nvmem.o
|
|
nvmem_zynqmp_nvmem-y := zynqmp_nvmem.o
|
|
obj-$(CONFIG_SPRD_EFUSE) += nvmem_sprd_efuse.o
|
|
nvmem_sprd_efuse-y := sprd-efuse.o
|
|
obj-$(CONFIG_NVMEM_RMEM) += nvmem-rmem.o
|
|
nvmem-rmem-y := rmem.o
|
|
obj-$(CONFIG_NVMEM_BRCM_NVRAM) += nvmem_brcm_nvram.o
|
|
nvmem_brcm_nvram-y := brcm_nvram.o
|
|
obj-$(CONFIG_NVMEM_LAYERSCAPE_SFP) += nvmem-layerscape-sfp.o
|
|
nvmem-layerscape-sfp-y := layerscape-sfp.o
|
|
obj-$(CONFIG_NVMEM_SUNPLUS_OCOTP) += nvmem_sunplus_ocotp.o
|
|
nvmem_sunplus_ocotp-y := sunplus-ocotp.o
|
|
obj-$(CONFIG_NVMEM_APPLE_EFUSES) += nvmem-apple-efuses.o
|
|
nvmem-apple-efuses-y := apple-efuses.o
|
|
obj-$(CONFIG_MICROCHIP_OTPC) += nvmem-microchip-otpc.o
|
|
nvmem-microchip-otpc-y := microchip-otpc.o
|