/openbmc/linux/drivers/nvmem/ |
H A D | core.c | 3 * nvmem framework core. 16 #include <linux/nvmem-consumer.h> 17 #include <linux/nvmem-provider.h> 59 struct nvmem_device *nvmem; member 83 static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, in __nvmem_reg_read() argument 86 if (nvmem->reg_read) in __nvmem_reg_read() 87 return nvmem->reg_read(nvmem->priv, offset, val, bytes); in __nvmem_reg_read() 92 static int __nvmem_reg_write(struct nvmem_device *nvmem, unsigned int offset, in __nvmem_reg_write() argument 97 if (nvmem->reg_write) { in __nvmem_reg_write() 98 gpiod_set_value_cansleep(nvmem->wp_gpio, 0); in __nvmem_reg_write() [all …]
|
H A D | Makefile | 3 # Makefile for nvmem drivers. 11 obj-$(CONFIG_NVMEM_APPLE_EFUSES) += nvmem-apple-efuses.o 12 nvmem-apple-efuses-y := apple-efuses.o 13 obj-$(CONFIG_NVMEM_BCM_OCOTP) += nvmem-bcm-ocotp.o 14 nvmem-bcm-ocotp-y := bcm-ocotp.o 17 obj-$(CONFIG_NVMEM_IMX_IIM) += nvmem-imx-iim.o 18 nvmem-imx-iim-y := imx-iim.o 19 obj-$(CONFIG_NVMEM_IMX_OCOTP) += nvmem-imx-ocotp.o 20 nvmem-imx-ocotp-y := imx-ocotp.o 21 obj-$(CONFIG_NVMEM_IMX_OCOTP_ELE) += nvmem-imx-ocotp-ele.o [all …]
|
H A D | Kconfig | 2 menuconfig NVMEM config 3 bool "NVMEM Support" 5 Support for NVMEM(Non Volatile Memory) devices like EEPROM, EFUSES... 7 This framework is designed to provide a generic interface to NVMEM 12 if NVMEM 15 bool "/sys/bus/nvmem/devices/*/nvmem (sysfs interface)" 19 Say Y here to add a sysfs interface for NVMEM. 22 read/write directly into nvmem. 26 source "drivers/nvmem/layouts/Kconfig" 40 be called nvmem-apple-efuses. [all …]
|
H A D | zynqmp_nvmem.c | 7 #include <linux/nvmem-provider.h> 16 struct nvmem_device *nvmem; member 37 .name = "zynqmp-nvmem", 45 { .compatible = "xlnx,zynqmp-nvmem-fw", }, 65 priv->nvmem = devm_nvmem_register(dev, &econfig); in zynqmp_nvmem_probe() 67 return PTR_ERR_OR_ZERO(priv->nvmem); in zynqmp_nvmem_probe() 73 .name = "zynqmp-nvmem", 81 MODULE_DESCRIPTION("ZynqMP NVMEM driver");
|
/openbmc/linux/Documentation/driver-api/ |
H A D | nvmem.rst | 4 NVMEM Subsystem 9 This document explains the NVMEM Framework along with the APIs provided, 14 *NVMEM* is the abbreviation for Non Volatile Memory layer. It is used to 18 Before this framework existed, NVMEM drivers like eeprom were stored in 31 NVMEM Providers 34 NVMEM provider refers to an entity that implements methods to initialize, read 37 2. Registering/Unregistering the NVMEM provider 40 A NVMEM provider can register with NVMEM core by supplying relevant 41 nvmem configuration to nvmem_register(), on success core would return a valid 44 nvmem_unregister(nvmem) is used to unregister a previously registered provider. [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/nvmem/ |
H A D | nvmem-consumer.yaml | 4 $id: http://devicetree.org/schemas/nvmem/nvmem-consumer.yaml# 7 title: NVMEM (Non Volatile Memory) Consumer 15 nvmem: 18 List of phandle to the nvmem providers. 20 nvmem-cells: 23 List of phandle to the nvmem data cells. 25 nvmem-names: 27 Names for the each nvmem provider. 29 nvmem-cell-names: 31 Names for each nvmem-cells specified. [all …]
|
H A D | xlnx,zynqmp-nvmem.txt | 2 = Zynq UltraScale+ MPSoC nvmem firmware driver binding = 8 - compatible: should be "xlnx,zynqmp-nvmem-fw" 12 bindings/nvmem/nvmem.txt 23 compatible = "xlnx,zynqmp-nvmem-fw"; 36 Are device nodes which consume nvmem data cells. 42 nvmem-cells = <&soc_revision>; 43 nvmem-cell-names = "soc_revision";
|
H A D | nvmem.yaml | 4 $id: http://devicetree.org/schemas/nvmem/nvmem.yaml# 7 title: NVMEM (Non Volatile Memory) 17 some data on NVMEM, for the OS to be able to retrieve these 42 nvmem-layout: 43 $ref: /schemas/nvmem/layouts/nvmem-layout.yaml 45 Alternative to the statically defined nvmem cells, this 74 nvmem-layout {
|
/openbmc/linux/Documentation/devicetree/bindings/thermal/ |
H A D | sprd-thermal.yaml | 28 nvmem-cells: 31 Reference to nvmem nodes for the calibration data. 33 nvmem-cell-names: 58 nvmem-cells: 61 Reference to an nvmem node for the calibration data. 63 nvmem-cell-names: 68 - nvmem-cells 69 - nvmem-cell-names 78 - nvmem-cells 79 - nvmem-cell-names [all …]
|
H A D | mediatek,lvts-thermal.yaml | 39 nvmem-cells: 45 nvmem-cell-names: 66 nvmem-cells: 69 nvmem-cell-names: 81 nvmem-cells: 84 nvmem-cell-names: 93 - nvmem-cells 94 - nvmem-cell-names 116 nvmem-cells = <&lvts_efuse_data1 &lvts_efuse_data2>; 117 nvmem-cell-names = "lvts-calib-data-1", "lvts-calib-data-2";
|
/openbmc/linux/Documentation/devicetree/bindings/mtd/partitions/ |
H A D | nvmem-cells.yaml | 4 $id: http://devicetree.org/schemas/mtd/partitions/nvmem-cells.yaml# 7 title: Nvmem cells 10 Any partition containing the compatible "nvmem-cells" will register as a 11 nvmem provider. 12 Each direct subnodes represents a nvmem cell following the nvmem binding. 13 Nvmem binding to declare nvmem-cells can be found in: 14 Documentation/devicetree/bindings/nvmem/nvmem.yaml 21 - $ref: /schemas/nvmem/nvmem.yaml# 25 const: nvmem-cells 43 compatible = "nvmem-cells"; [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/power/reset/ |
H A D | nvmem-reboot-mode.yaml | 4 $id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml# 7 title: Generic NVMEM reboot mode 14 and stores it in the NVMEM cell named "reboot-mode". The bootloader can 19 const: nvmem-reboot-mode 21 nvmem-cells: 23 A phandle pointing to the nvmem-cells node where the vendor-specific 27 nvmem-cell-names: 38 - nvmem-cells 39 - nvmem-cell-names 46 compatible = "nvmem-reboot-mode"; [all …]
|
/openbmc/linux/include/linux/ |
H A D | nvmem-provider.h | 3 * nvmem framework provider. 39 * struct nvmem_keepout - NVMEM register keepout range. 52 * struct nvmem_cell_info - NVMEM cell description 54 * @offset: Offset within the NVMEM device. 77 * struct nvmem_config - NVMEM device configuration 83 * @cells: Optional array of pre-defined NVMEM cells. 85 * @add_legacy_fixed_of_cells: Read fixed NVMEM cells from old OF syntax. 88 * @type: Type of the nvmem storage 100 * @layout: Fixed layout associated with this nvmem device. 102 * Note: A default "nvmem<id>" name will be assigned to the device if [all …]
|
H A D | nvmem-consumer.h | 3 * nvmem framework consumer. 27 * @cell_name: Name of the nvmem cell as defined in the name field of 68 /* direct nvmem device read/write interface */ 72 void nvmem_device_put(struct nvmem_device *nvmem); 73 void devm_nvmem_device_put(struct device *dev, struct nvmem_device *nvmem); 74 int nvmem_device_read(struct nvmem_device *nvmem, unsigned int offset, 76 int nvmem_device_write(struct nvmem_device *nvmem, unsigned int offset, 78 ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem, 80 int nvmem_device_cell_write(struct nvmem_device *nvmem, 83 const char *nvmem_dev_name(struct nvmem_device *nvmem); [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/nvmem/layouts/ |
H A D | fixed-layout.yaml | 4 $id: http://devicetree.org/schemas/nvmem/layouts/fixed-layout.yaml# 7 title: NVMEM layout for fixed NVMEM cells 10 Many NVMEM devices have hardcoded cells layout (offset and size of defined 11 NVMEM content doesn't change). 13 This binding allows defining such NVMEM layout with its cells. It can be used 14 on top of any NVMEM device. 42 nvmem-layout { 50 #nvmem-cell-cells = <1>; 56 #nvmem-cell-cells = <1>;
|
/openbmc/linux/Documentation/devicetree/bindings/iio/adc/ |
H A D | sprd,sc2720-adc.yaml | 37 nvmem-cells: true 39 nvmem-cell-names: true 51 nvmem-cells: 53 nvmem-cell-names: 60 nvmem-cells: 62 nvmem-cell-names: 77 - nvmem-cells 78 - nvmem-cell-names 95 nvmem-cells = <&adc_big_scale>, <&adc_small_scale>; 96 nvmem-cell-names = "big_scale_calib", "small_scale_calib"; [all …]
|
/openbmc/linux/arch/arm64/boot/dts/freescale/ |
H A D | fsl-ls1028a-kontron-kbox-a-230-ls.dts | 59 nvmem-cells = <&base_mac_address 2>; 60 nvmem-cell-names = "mac-address"; 65 nvmem-cells = <&base_mac_address 3>; 66 nvmem-cell-names = "mac-address"; 87 nvmem-cells = <&base_mac_address 4>; 88 nvmem-cell-names = "mac-address"; 97 nvmem-cells = <&base_mac_address 5>; 98 nvmem-cell-names = "mac-address"; 107 nvmem-cells = <&base_mac_address 6>; 108 nvmem-cell-names = "mac-address"; [all …]
|
H A D | fsl-ls1028a-kontron-sl28-var2.dts | 39 nvmem-cells = <&base_mac_address 2>; 40 nvmem-cell-names = "mac-address"; 45 nvmem-cells = <&base_mac_address 3>; 46 nvmem-cell-names = "mac-address"; 59 nvmem-cells = <&base_mac_address 0>; 60 nvmem-cell-names = "mac-address"; 69 nvmem-cells = <&base_mac_address 1>; 70 nvmem-cell-names = "mac-address";
|
/openbmc/linux/drivers/soc/tegra/fuse/ |
H A D | fuse-tegra.c | 11 #include <linux/nvmem-consumer.h> 12 #include <linux/nvmem-provider.h> 119 struct nvmem_config nvmem; in tegra_fuse_probe() local 155 memset(&nvmem, 0, sizeof(nvmem)); in tegra_fuse_probe() 156 nvmem.dev = &pdev->dev; in tegra_fuse_probe() 157 nvmem.name = "fuse"; in tegra_fuse_probe() 158 nvmem.id = -1; in tegra_fuse_probe() 159 nvmem.owner = THIS_MODULE; in tegra_fuse_probe() 160 nvmem.cells = fuse->soc->cells; in tegra_fuse_probe() 161 nvmem.ncells = fuse->soc->num_cells; in tegra_fuse_probe() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/net/ |
H A D | sunplus,sp7021-emac.yaml | 62 nvmem-cells: 64 - description: nvmem cell address of MAC address 66 nvmem-cell-names: 67 description: names corresponding to the nvmem cells 75 - nvmem-cells 76 - nvmem-cell-names 117 nvmem-cells = <&mac_addr0>; 118 nvmem-cell-names = "mac-address"; 125 nvmem-cells = <&mac_addr1>; 126 nvmem-cell-names = "mac-address";
|
H A D | nixge.txt | 15 - nvmem-cells: Phandle of nvmem cell containing the MAC address 16 - nvmem-cell-names: Should be "address" 31 nvmem-cells = <ð1_addr>; 32 nvmem-cell-names = "address"; 54 nvmem-cells = <ð1_addr>; 55 nvmem-cell-names = "address"; 70 nvmem-cells = <ð1_addr>; 71 nvmem-cell-names = "address";
|
/openbmc/linux/drivers/rtc/ |
H A D | nvmem.c | 3 * RTC subsystem, nvmem interface 10 #include <linux/nvmem-consumer.h> 17 struct nvmem_device *nvmem; in devm_rtc_nvmem_register() local 25 nvmem = devm_nvmem_register(dev, nvmem_config); in devm_rtc_nvmem_register() 26 if (IS_ERR(nvmem)) in devm_rtc_nvmem_register() 27 dev_err(dev, "failed to register nvmem device for RTC\n"); in devm_rtc_nvmem_register() 29 return PTR_ERR_OR_ZERO(nvmem); in devm_rtc_nvmem_register()
|
/openbmc/linux/Documentation/devicetree/bindings/phy/ |
H A D | sunplus,sp7021-usb2-phy.yaml | 36 nvmem-cell-names: 37 description: names corresponding to the nvmem cells of disconnect voltage 40 nvmem-cells: 41 description: nvmem cell address of disconnect voltage 55 - nvmem-cell-names 56 - nvmem-cells 70 nvmem-cell-names = "disc_vol"; 71 nvmem-cells = <&disc_vol>;
|
/openbmc/linux/Documentation/ABI/stable/ |
H A D | sysfs-bus-nvmem | 1 What: /sys/bus/nvmem/devices/.../nvmem 6 This file allows user to read/write the raw NVMEM contents. 7 Permissions for write to this file depends on the nvmem 14 hexdump /sys/bus/nvmem/devices/qfprom0/nvmem
|
/openbmc/linux/drivers/nvmem/layouts/ |
H A D | sl28vpd.c | 5 #include <linux/nvmem-consumer.h> 6 #include <linux/nvmem-provider.h> 56 static int sl28vpd_v1_check_crc(struct device *dev, struct nvmem_device *nvmem) in sl28vpd_v1_check_crc() argument 65 ret = nvmem_device_read(nvmem, 0, sizeof(data_v1), &data_v1); in sl28vpd_v1_check_crc() 83 static int sl28vpd_add_cells(struct device *dev, struct nvmem_device *nvmem, in sl28vpd_add_cells() argument 93 ret = nvmem_device_read(nvmem, 0, sizeof(hdr), &hdr); in sl28vpd_add_cells() 109 ret = sl28vpd_v1_check_crc(dev, nvmem); in sl28vpd_add_cells() 113 layout_np = of_nvmem_layout_get_container(nvmem); in sl28vpd_add_cells() 126 ret = nvmem_add_one_cell(nvmem, &info); in sl28vpd_add_cells() 153 MODULE_DESCRIPTION("NVMEM layout driver for the VPD of Kontron sl28 boards");
|