From patchwork Wed Mar 20 07:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 781390 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D8952BD01; Wed, 20 Mar 2024 07:58:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710921499; cv=none; b=YiUaEl3bTfh3HdK7cYJLifATQ95tSXP5mbGsn2e96RLKQePWbwkC5FCeAGXoO9jBNMAwDhtjR1i8V97pg0rXG1r7/6Z1vZ+4c7SdWcXZEvjcSWVAXVxhWe5kZU3Dj92j4Uf6N/1ggE/hwMXGeOX/pYheE2MKTeefyw8onF+zunE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710921499; c=relaxed/simple; bh=Vmdh+vWcv9Qh7j4Gv87DPTe0KSHtausnDIvXv9rreDg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZNPHFemXfdAizBsUKRgcUDOvt/fa7nWjOwjZTKKX1EEZEkMK/Nzn2X1QyISb7P0jHbLbw9h00g/oyuUArpohYhSLMsG/bEtzCIRRlKisLF4ypHFjTN/xq7AdfoWMoYijM0vGSc1lpCGvfqI1hHgp28N06e3SFErR6tlnUgN7hp4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qweS+dAd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qweS+dAd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B31FC433B2; Wed, 20 Mar 2024 07:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710921499; bh=Vmdh+vWcv9Qh7j4Gv87DPTe0KSHtausnDIvXv9rreDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qweS+dAdyHfejLbT6tXXJbz5wveNirqZQNYgMtRMEsBJdFzJy91qJN9ZN0IA3L+dt aooGZgm/1ZWXVPE/YA6+6wY2H/Qa73rcj/ZGXiD2uzBIcyYxTBilDXUMugQ1wojMLz iiEK01ChERPXt9EphpqqFfDREeMLMbodoTioIuQadHKErR0Pt0weGQ/ugQ7rEeNY8m iiK1j1/o38TXyJiuVNfRRNLwWc0//zxn2jCWiafYcNxuhqqKj9qCAw4xXg7Zsottqm zg/Kt+0wiNPs6XU0PinoCQeNvACWwc5a5CJ73RRR4wwvk8Eiz27Sc8SQa9UFcy1Aq3 9YfZyz4Kh+Erw== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rmqq9-0000000029M-1Pp1; Wed, 20 Mar 2024 08:58:25 +0100 From: Johan Hovold To: Marcel Holtmann , Luiz Augusto von Dentz , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, Konrad Dybcio , Johan Hedberg , Balakrishna Godavarthi , Matthias Kaehlcke , Douglas Anderson , Rocky Liao , Dmitry Baryshkov , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v4 1/4] dt-bindings: bluetooth: add 'qcom,local-bd-address-broken' Date: Wed, 20 Mar 2024 08:55:51 +0100 Message-ID: <20240320075554.8178-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240320075554.8178-1-johan+linaro@kernel.org> References: <20240320075554.8178-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Several Qualcomm Bluetooth controllers lack persistent storage for the device address and instead one can be provided by the boot firmware using the 'local-bd-address' devicetree property. The Bluetooth bindings clearly states that the address should be specified in little-endian order, but due to a long-standing bug in the Qualcomm driver which reversed the address some boot firmware has been providing the address in big-endian order instead. The only device out there that should be affected by this is the WCN3991 used in some Chromebooks. Add a 'qcom,local-bd-address-broken' property which can be set on these platforms to indicate that the boot firmware is using the wrong byte order. Note that ChromeOS always updates the kernel and devicetree in lockstep so that there is no need to handle backwards compatibility with older devicetrees. Reviewed-by: Douglas Anderson Signed-off-by: Johan Hovold Reviewed-by: Rob Herring --- .../devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml index eba2f3026ab0..fdaea08e7442 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml +++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml @@ -94,6 +94,10 @@ properties: local-bd-address: true + qcom,local-bd-address-broken: + type: boolean + description: + boot firmware is incorrectly passing the address in big-endian order required: - compatible