/linux/drivers/nvmem/ |
H A D | layouts.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * NVMEM layout bus handling 10 #include <linux/dma-mapping.h> 11 #include <linux/nvmem-consumer.h> 12 #include <linux/nvmem-provider.h> 31 struct nvmem_layout_driver *drv = to_nvmem_layout_driver(dev->driver); in nvmem_layout_bus_probe() 32 struct nvmem_layout *layout = to_nvmem_layout_device(dev); in nvmem_layout_bus_probe() local 34 if (!drv->probe || !drv->remove) in nvmem_layout_bus_probe() 35 return -EINVAL; in nvmem_layout_bus_probe() 37 return drv->probe(layout); in nvmem_layout_bus_probe() [all …]
|
H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * nvmem framework core. 6 * Copyright (C) 2013 Maxime Ripard <maxime.ripard@free-electrons.com> 16 #include <linux/nvmem-consumer.h> 17 #include <linux/nvmem-provider.h> 37 struct nvmem_device *nvmem; member 55 static int __nvmem_reg_read(struct nvmem_device *nvmem, unsigned int offset, in __nvmem_reg_read() argument 58 if (nvmem->reg_read) in __nvmem_reg_read() 59 return nvmem->reg_read(nvmem->priv, offset, val, bytes); in __nvmem_reg_read() 61 return -EINVAL; in __nvmem_reg_read() [all …]
|
H A D | internals.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #include <linux/nvmem-consumer.h> 8 #include <linux/nvmem-provider.h> 26 void (*fixup_dt_cell_info)(struct nvmem_device *nvmem, 33 struct nvmem_layout *layout; member 41 int nvmem_populate_layout(struct nvmem_device *nvmem); 42 void nvmem_destroy_layout(struct nvmem_device *nvmem); 51 static inline int nvmem_populate_layout(struct nvmem_device *nvmem) in nvmem_populate_layout() argument 56 static inline void nvmem_destroy_layout(struct nvmem_device *nvmem) { } in nvmem_destroy_layout() argument
|
/linux/include/linux/ |
H A D | nvmem-provider.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * nvmem framework provider. 6 * Copyright (C) 2013 Maxime Ripard <maxime.ripard@free-electrons.com> 36 #define NVMEM_DEVID_NONE (-1) 37 #define NVMEM_DEVID_AUTO (-2) 40 * struct nvmem_keepout - NVMEM register keepout range. 53 * struct nvmem_cell_info - NVMEM cell description 55 * @offset: Offset within the NVMEM device. 78 * struct nvmem_config - NVMEM device configuration 84 * @cells: Optional array of pre-defined NVMEM cells. [all …]
|
/linux/Documentation/devicetree/bindings/nvmem/layouts/ |
H A D | fixed-layout.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/nvmem/layouts/fixed-layout.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.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. 17 - Rafał Miłecki <rafal@milecki.pl> [all …]
|
H A D | onie,tlv-layout.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/nvmem/layouts/onie,tlv-layout.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: NVMEM layout of the ONIE tlv table 10 - Miquel Raynal <miquel.raynal@bootlin.com> 14 infrastructure shall provide a non-volatile memory with a table whose the 26 const: onie,tlv-layout 28 product-name: 32 part-number: [all …]
|
H A D | nvmem-layout.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/nvmem/layouts/nvmem-layout.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: NVMEM (Non Volatile Memory) layouts 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 - Michael Walle <michael@walle.cc> 12 - Miquel Raynal <miquel.raynal@bootlin.com> 15 Most NVMEM layouts are static and thus do not require additional description 17 define and might require dynamic reading of the NVMEM device in order to [all …]
|
H A D | kontron,sl28-vpd.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/nvmem/layouts/kontron,sl28-vpd.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: NVMEM layout of the Kontron SMARC-sAL28 vital product data 10 - Michael Walle <michael@walle.cc> 15 on-board ethernet devices are derived from this base MAC address by 22 const: kontron,sl28-vpd 24 serial-number: 30 base-mac-address: [all …]
|
H A D | u-boot,env.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/nvmem/layouts/u-boot,env.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: U-Boot environment variables layout 10 U-Boot uses environment variables to store device parameters and 14 Data is stored using U-Boot specific formats (variant specific header and NUL 15 separated key-value pairs). 24 Variables can be defined as NVMEM device subnodes. 27 - Rafał Miłecki <rafal@milecki.pl> [all …]
|
/linux/drivers/nvmem/layouts/ |
H A D | u-boot-env.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2022 - 2023 Rafał Miłecki <rafal@milecki.pl> 10 #include <linux/nvmem-consumer.h> 11 #include <linux/nvmem-provider.h> 15 #include "u-boot-env.h" 41 return -EINVAL; in u_boot_env_read_post_process_ethaddr() 44 return -EINVAL; in u_boot_env_read_post_process_ethaddr() 54 static int u_boot_env_parse_cells(struct device *dev, struct nvmem_device *nvmem, uint8_t *buf, in u_boot_env_parse_cells() argument 73 return -ENOMEM; in u_boot_env_parse_cells() 74 info.offset = data_offset + value - data; in u_boot_env_parse_cells() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 9 menu "Layout Types" 12 tristate "Kontron sl28 VPD layout support" 15 Say Y here if you want to support the VPD layout of the Kontron 16 SMARC-sAL28 boards. 25 Type-Length-Value standard table. 30 tristate "U-Boot environment variables layout" 34 U-Boot stores its setup as environment variables. This driver adds 36 as NVMEM cells so they can be referenced by other drivers.
|
/linux/Documentation/devicetree/bindings/nvmem/ |
H A D | nvmem.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/nvmem/nvmem.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: NVMEM (Non Volatile Memory) 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 17 some data on NVMEM, for the OS to be able to retrieve these 23 "#address-cells": 26 "#size-cells": 29 read-only: [all …]
|
H A D | apple,spmi-nvmem.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/nvmem/apple,spmi-nvmem.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Apple SPMI NVMEM 9 description: Exports a series of SPMI registers as NVMEM cells 12 - Sasha Finkelstein <fnkl.kernel@gmail.com> 15 - $ref: nvmem.yaml# 20 - enum: 21 - apple,maverick-pmic [all …]
|
H A D | xlnx,zynqmp-nvmem.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/nvmem/xlnx,zynqmp-nvmem.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 14 - Kalyani Akula <kalyani.akula@amd.com> 15 - Praveen Teja Kundanala <praveen.teja.kundanala@amd.com> 18 - $ref: nvmem.yaml# 22 const: xlnx,zynqmp-nvmem-fw 25 - compatible 30 - | [all …]
|
H A D | nvmem-deprecated-cells.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/nvmem/nvmem-deprecated-cells.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: NVMEM old syntax for fixed cells 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 13 Before introducing NVMEM layouts all NVMEM (fixed) cells were defined 14 as direct device subnodes. That syntax was replaced by "fixed-layout" 18 "@[0-9a-f]+(,[0-7])?$": 21 - $ref: layouts/fixed-cell.yaml [all …]
|
/linux/Documentation/devicetree/bindings/mtd/partitions/ |
H A D | ubi-volume.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 14 - Daniel Golle <daniel@makrotopia.org> 27 nvmem-layout: 28 $ref: /schemas/nvmem/layouts/nvmem-layout.yaml# 30 This container may reference an NVMEM layout parser. 33 - required: 34 - volid [all …]
|
/linux/Documentation/devicetree/bindings/mfd/ |
H A D | maxim,max77759.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Maxim Integrated MAX77759 PMIC for USB Type-C applications 10 - André Draszik <andre.draszik@linaro.org> 14 Management IC for USB Type-C applications. 17 Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. 26 interrupt-controller: true 28 "#interrupt-cells": 35 $ref: /schemas/gpio/maxim,max77759-gpio.yaml [all …]
|
/linux/arch/arm64/boot/dts/renesas/ |
H A D | r8a779f4.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 3 * Device Tree Source for the R-Car S4-8 (R8A779F4) SoC 15 nvmem-layout { 16 compatible = "fixed-layout"; 17 #address-cells = <1>; 18 #size-cells = <1>; 27 nvmem-cells = <&ufs_tune>; 28 nvmem-cell-names = "calibration";
|
/linux/arch/arm64/boot/dts/mediatek/ |
H A D | mt7986a-acelink-ew-7886cax.dts | 1 // SPDX-License-Identifier: GPL-2.0-only OR MIT 3 /dts-v1/; 4 #include <dt-bindings/input/input.h> 5 #include <dt-bindings/gpio/gpio.h> 6 #include <dt-bindings/leds/common.h> 11 compatible = "acelink,ew-7886cax", "mediatek,mt7986a"; 12 model = "Acelink EW-7886CAX"; 19 stdout-path = "serial0:115200n8"; 28 compatible = "gpio-keys"; 30 key-restart { [all …]
|
/linux/arch/arm/boot/dts/ti/omap/ |
H A D | am335x-bone-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/ 9 cpu0-supply = <&dcdc2_reg>; 19 stdout-path = &uart0; 23 pinctrl-names = "default"; 24 pinctrl-0 = <&user_leds_s0>; 26 compatible = "gpio-leds"; 31 linux,default-trigger = "heartbeat"; 32 default-state = "off"; 38 linux,default-trigger = "mmc0"; [all …]
|
/linux/Documentation/devicetree/bindings/firmware/xilinx/ |
H A D | xlnx,zynqmp-firmware.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/firmware/xilinx/xlnx,zynqmp-firmware.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Nava kishore Manne <nava.kishore.manne@amd.com> 12 description: The zynqmp-firmware node describes the interface to platform 23 - description: For implementations complying for Zynq Ultrascale+ MPSoC. 24 const: xlnx,zynqmp-firmware 26 - description: For implementations complying for Versal. 27 const: xlnx,versal-firmware [all …]
|
/linux/arch/arm/boot/dts/qcom/ |
H A D | qcom-ipq4018-ap120c-ac.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 3 #include "qcom-ipq4019.dtsi" 4 #include <dt-bindings/gpio/gpio.h> 5 #include <dt-bindings/input/input.h> 8 model = "ALFA Network AP120C-AC"; 9 compatible = "alfa-network,ap120c-ac", "qcom,ipq4018"; 16 stdout-path = "serial0:115200n8"; 20 compatible = "gpio-keys"; 22 key-reset { 31 i2c0_pins: i2c0-state { [all …]
|
/linux/arch/arm/boot/dts/broadcom/ |
H A D | bcm958625-meraki-mx6x-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 5 * Copyright (C) 2020-2021 Matthew Hagan <mnhagan88@gmail.com> 8 #include "bcm-nsp.dtsi" 9 #include <dt-bindings/gpio/gpio.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/leds/common.h> 14 pwm-leds { 15 compatible = "pwm-leds"; 17 led-1 { 21 max-brightness = <255>; [all …]
|
/linux/drivers/mtd/ubi/ |
H A D | nvmem.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 /* UBI NVMEM provider */ 8 #include <linux/nvmem-provider.h> 10 /* List of all NVMEM devices */ 15 struct nvmem_device *nvmem; member 32 desc = ubi_open_volume(unv->ubi_num, unv->vol_id, UBI_READONLY); in ubi_nvmem_reg_read() 36 offs = from % unv->usable_leb_size; in ubi_nvmem_reg_read() 37 lnum = from / unv->usable_leb_size; in ubi_nvmem_reg_read() 39 to_read = unv->usable_leb_size - offs; in ubi_nvmem_reg_read() 50 bytes_left -= to_read; in ubi_nvmem_reg_read() [all …]
|
/linux/arch/arm64/boot/dts/broadcom/bcmbca/ |
H A D | bcm4908-asus-gt-ac5300.dts | 1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT 3 #include <dt-bindings/gpio/gpio.h> 4 #include <dt-bindings/input/input.h> 5 #include <dt-bindings/leds/common.h> 10 compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca"; 11 model = "Asus GT-AC5300"; 18 gpio-keys-polled { 19 compatible = "gpio-keys-polled"; 20 poll-interval = <100>; 22 key-wifi { [all …]
|