Support for block device NVMEM providers#780
Conversation
|
Upstream branch: dca922e |
|
Upstream branch: dca922e |
6f62649 to
51bfda0
Compare
482ce5b to
5a9f7c7
Compare
|
Upstream branch: e75a43c |
51bfda0 to
9957a17
Compare
5a9f7c7 to
25a041f
Compare
|
Upstream branch: 66edb90 |
9957a17 to
d2ae2b8
Compare
25a041f to
6f75bd1
Compare
|
Upstream branch: 6d35786 |
d2ae2b8 to
fa7da4c
Compare
6f75bd1 to
1f0d33a
Compare
|
Upstream branch: 6d35786 |
fa7da4c to
496eecd
Compare
|
Upstream branch: 6d35786 |
496eecd to
8fe2955
Compare
|
Upstream branch: 6d35786 |
8fe2955 to
809c9d2
Compare
1f0d33a to
b1870f6
Compare
|
Upstream branch: aa54b1d |
809c9d2 to
751d621
Compare
|
Upstream branch: aa54b1d |
751d621 to
33e188b
Compare
|
Upstream branch: aa54b1d |
33e188b to
05ca1dc
Compare
|
Upstream branch: aa54b1d |
05ca1dc to
270025f
Compare
b1870f6 to
ca57796
Compare
|
Upstream branch: 70eda68 |
270025f to
e6ede4c
Compare
ca57796 to
c1feb59
Compare
|
Upstream branch: 8bc67e4 |
e6ede4c to
e7b7fc4
Compare
c1feb59 to
ea833a1
Compare
|
Upstream branch: 6779b50 |
e7b7fc4 to
e4194c2
Compare
ea833a1 to
7af85d1
Compare
Add support for an nvmem-layout subnode under an eMMC hardware partition. This allows the partition to be exposed as an NVMEM provider and its internal layout to be described. For example, an eMMC boot partition can be used to store device-specific information such as a WiFi MAC address. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Add support for an NVMEM cell provider with the standard "mac-address" cell name. This allows the ath10k device to retrieve its MAC address from non-volatile storage such as an EEPROM or an eMMC partition. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Add support for an NVMEM cell provider for "local-bd-address", allowing the Bluetooth stack to retrieve controller's BD address from non-volatile storage such as an EEPROM or an eMMC partition. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
On embedded devices using an eMMC it is common that one or more partitions on the eMMC are used to store MAC addresses and Wi-Fi calibration EEPROM data. Allow referencing the partition in device tree for the kernel and Wi-Fi drivers accessing it via the NVMEM layer. To safely defer the freeing of the provider private data until all consumers have released their cells, a nvmem_dev() accessor is added to the NVMEM core to expose the struct device embedded in struct nvmem_device. This allows registering a devm action on the nvmem device itself, ensuring the private data outlives any active cell references. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Co-developed-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Factor out the common NVMEM EUI-48 retrieval logic from of_get_mac_address_nvmem() into a new of_get_nvmem_eui48() helper that accepts the NVMEM cell name as a parameter. This allows other subsystems (e.g. Bluetooth) to reuse the same lookup-validate-copy pattern with a different cell name, without duplicating code. of_get_mac_address_nvmem() is updated to call of_get_nvmem_eui48() with "mac-address", preserving its existing behavior. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Some devices store the Bluetooth BD address in non-volatile memory, which can be accessed through the NVMEM framework. Similar to Ethernet or WiFi MAC addresses, add support for reading the BD address from a 'local-bd-address' NVMEM cell. As with the device-tree provided BD address, add a quirk to indicate whether a device or platform should attempt to read the address from NVMEM when no valid in-chip address is present. Also add a quirk to indicate if the address is stored in big-endian byte order. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
When the controller BD address is invalid (zero or default), set the NVMEM quirks to allow retrieving the address from a 'local-bd-address' NVMEM cell. The BD address is often stored alongside the WiFi MAC address in big-endian format, so also set the big-endian quirk. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
…dresses On Arduino Uno-Q, the eMMC boot1 partition is factory provisioned with device-specific information such as the WiFi MAC address and the Bluetooth BD address. This partition can serve as an alternative to additional non-volatile memory, such as a dedicated EEPROM. The eMMC boot partitions are typically good candidates, as they are relatively small, read-only by default (and can be enforced as hardware read-only), and are not affected by board reflashing procedures, which generally target the eMMC user or GP partitions. Describe the corresponding nvmem-layout for the WiFi and Bluetooth addresses, and point the WiFi and Bluetooth nodes to the appropriate NVMEM cells to retrieve them. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
|
Upstream branch: 79bd2dd |
e4194c2 to
4d92047
Compare
Pull request for series with
subject: Support for block device NVMEM providers
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1086905