Add an nvmem-efivar provider exposing the "MacAddresses" UEFI variable, carrying the Bluetooth BD_ADDR (bytes 0-5) and the WLAN MAC address (bytes 6-11), both MSB first. The variable is looked up by name, so no vendor GUID needs to be hardcoded. Wire the bd-address cell to the Bluetooth controller and the mac-address cell to the WLAN endpoint (pci17cb,1107) via the standard nvmem-cells binding. Until the variable is provisioned the cells read as zeroes and the controllers keep using their default addresses. Assisted-by: LLM Signed-off-by: Abel Vesa --- arch/arm64/boot/dts/qcom/glymur-crd.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/glymur-crd.dtsi b/arch/arm64/boot/dts/qcom/glymur-crd.dtsi index 58158b51fe29..2dd09ab1d550 100644 --- a/arch/arm64/boot/dts/qcom/glymur-crd.dtsi +++ b/arch/arm64/boot/dts/qcom/glymur-crd.dtsi @@ -31,6 +31,22 @@ chosen { stdout-path = "serial0:115200n8"; }; + /* BD_ADDR and WLAN MAC from the "MacAddresses" UEFI variable. */ + efivar_macs: nvmem-efivar { + compatible = "nvmem-efivar"; + efivar-name = "MacAddresses"; + #address-cells = <1>; + #size-cells = <1>; + + bt_bdaddr: bd-address@0 { + reg = <0x0 0x6>; + }; + + net_mac: mac-address@6 { + reg = <0x6 0x6>; + }; + }; + clocks { xo_board: xo-board { compatible = "fixed-clock"; @@ -776,6 +792,9 @@ wifi@0 { compatible = "pci17cb,1107"; reg = <0x10000 0x0 0x0 0x0 0x0>; + nvmem-cells = <&net_mac>; + nvmem-cell-names = "mac-address"; + vddaon-supply = <&vreg_pmu_aon_0p59>; vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; @@ -1163,6 +1182,9 @@ bluetooth { compatible = "qcom,wcn7850-bt"; max-speed = <3200000>; + nvmem-cells = <&bt_bdaddr>; + nvmem-cell-names = "bd-address"; + vddaon-supply = <&vreg_pmu_aon_0p59>; vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; -- 2.54.0