Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp140486lqt; Mon, 18 Mar 2024 04:09:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrbG2x90Y7XDi6Fzf7jKD0m0vvi6JLfdY7CH6Zh0MUonO4hYrzVJJ0lwxD3csbkzpt2KzYDuJeb1Rir5TU6Ag2kwahXo2TfgtbLrpsGQ== X-Google-Smtp-Source: AGHT+IFJcwsXQKkNEiWjAbEE1Ha6BQvdoD8mvToInjGpUkJanWx8syF+D995F0qjYv97zTnbWBp6 X-Received: by 2002:ad4:53a6:0:b0:690:d719:d575 with SMTP id j6-20020ad453a6000000b00690d719d575mr12954504qvv.43.1710760191759; Mon, 18 Mar 2024 04:09:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710760191; cv=pass; d=google.com; s=arc-20160816; b=E48e9u8jyaUXjHVm9uC9v9Tl8ynXkjg7xm5fmpmHfsB7mP3mLSladlejb15sTuwAlh YpjIC8oWvODQtYsM2CyU0oo8N1PARXz5n238EDFIRp7MbymrIeuweD/nafreCyjz201T +RhthmbNtpxBjthp3nKbU8wo0LBQp+KJoL8E1xbAbDF21D4NfEIdb7vRj0dtCAJunueZ 40yVQV/zbwyWwzeJRH8GLgFKfbdGeV+jnoP3H6kG8+qYO/1LSltyk2s40G+qNjSUE4pD xYP6qX+mfUInZOmD0reU5kJDfwJ+BvwJqn19uRpKlIU5AQiPZkWA03OBTUsunIi4qrCr eXJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=IKQfB7Xt/Vqr8Mh3bwr8GuowgIxvFIf+W7LTEVyhbGs=; fh=elIP08909sevQcyTkbdm8ZosgeQYQNhg3a6K0lby1kI=; b=GMLSRGujG4gvVDTisWWH3FvjksfKNVYVEJEcyW8g0aTt7fh9H2XrNcZ6FtgFgpya9/ WTaaGdh+Hes+84GK/rL5ZXdEb90WNgy/icQjirt3uV/1u2IeuTWKUy6ii968LlNQjYjk nCy4X6kKfV27L7WasPY5w/2eITGwz9meIJ5z6OFg3x82ny76+1PZhlb3W7NZrIcXzPv1 VGgJXe8YUpFPIX5rhRJHzbhLQ87C0+lv6VYYm5RtCCGAfxbvU3OjMGENE6TQbSRqxB/o 9A94OYjBn0KWMcixgZJ9nMI8s32xR6bqWGJsr+ieVGBx5Guhs2mvRGw6vSJAvCgyxUlL hHMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gi7e7brN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z19-20020a056214041300b0069153ee2472si8129530qvx.454.2024.03.18.04.09.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 04:09:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gi7e7brN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5B55B1C216A6 for ; Mon, 18 Mar 2024 11:09:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25C24381C8; Mon, 18 Mar 2024 11:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gi7e7brN" X-Original-To: linux-bluetooth@vger.kernel.org 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 6086B36114; Mon, 18 Mar 2024 11:08:59 +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=1710760139; cv=none; b=lPvXuQRmjA20J5j9QuJKvopDni8PE88KGISic82vc73M1ElJscwYfKC7JTdFjEf79BZt9v3G2lniF9BC7nkKh8t921fmev4FqhmlmYqrJ8+IM2xR5KkSdwC9OMzaUBSA1DeJxCR2hB8zwcyP3Z9C2fo8Dh6G/wDDw5CNVnW6UU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710760139; c=relaxed/simple; bh=mhjPnTXDAKyCh4F3clJIfOplQLZbUUDvGVo1tP8zjxM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PiV43lYB57KoBRkfwqCpv0dH6SC+zY+W+uxV6zINAdUMGEXclJOEv72lGPuJfHovpbDBDTCGUDAMM6PMk7zUX2aq1SBk3L7quTzGRXyM7g/xn55IJXuCm4YhUAIKeCDkZR5VMkJa6hd/Ioz6Gg5doubve14wnjdDcWAw7tCxX1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gi7e7brN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30265C43394; Mon, 18 Mar 2024 11:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710760139; bh=mhjPnTXDAKyCh4F3clJIfOplQLZbUUDvGVo1tP8zjxM=; h=From:To:Cc:Subject:Date:From; b=gi7e7brNpeEEiGqha31+CSP1NEQEc9QkpM03FLGL30p4CLY/jWtCpbp4zmN25K2ZO vJtMTj6pycCbkJqhK7bsS0OXjhaqH3E2GqBx5f2fbjLwKJ9S+lw+E+cPOrGqNswjV8 8B0jcTsJ3UHdq742LkN+2z+dh0xZwlNmctsFr7UQ8mUbkCf8DUyK0TGq2cX17+u1H2 2PC/hbjbF2uT4d5EzO1mggLZjoRmywPN3xhwen8Jfonrj3Rlh72i9iDqY/sM0Px5TZ VBNus7xmewN+a+aO20Pdlb8cZqZ6GLxLKZ+07HzwYW5akc08VrQn9WarniSS7kbN/5 SNAeCcZX8c3kA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rmArX-000000008Jj-3tpk; Mon, 18 Mar 2024 12:09:04 +0100 From: Johan Hovold To: Marcel Holtmann , Luiz Augusto von Dentz Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Johan Hedberg , Matthias Kaehlcke , Doug Anderson , Bjorn Andersson , Konrad Dybcio , linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 0/4] Bluetooth: qca: fix device-address endianness Date: Mon, 18 Mar 2024 12:08:51 +0100 Message-ID: <20240318110855.31954-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Qualcomm Bluetooth driver is configuring the device address in reverse order for none-ROME devices, which breaks user space tools like btmgmt and the 'local-bd-address' devicetree property. As these Qualcomm controllers lack persistent storage for the device address, boot firmware can use the 'local-bd-address' devicetree property to provide a valid address. The property should specify the address in little endian order, but instead some boot firmware has been reversing the address to match the buggy Qualcomm driver. This specifically affects some Chromebook devices for which we now need to maintain compatibility by deprecating the affected compatible string, marking the corresponding devicetree properties as broken, and reversing the addresses after parsing them. Fortunately, only 'qcom,wcn3991-bt' is impacted and needs to be deprecated this way according to the Chromium team [1]. Note that this series depends on the following revert: https://lore.kernel.org/lkml/20240314084412.1127-1-johan+linaro@kernel.org/ Johan [1] https://lore.kernel.org/lkml/ZcuWQkmYK4Ax9kam@google.com/ Changes in v2 - add quirk to handle deprecated devicetree compatibles that expect broken address properties - deprecate 'qcom,wcn3991-bt' and mark it as broken Johan Hovold (4): dt-bindings: bluetooth: add new wcn3991 compatible to fix bd_addr Bluetooth: add quirk for broken address properties Bluetooth: qca: fix device-address endianness Bluetooth: qca: fix wcn3991 'local-bd-address' endianness .../net/bluetooth/qualcomm-bluetooth.yaml | 29 +++++++++++-------- drivers/bluetooth/btqca.c | 8 +++-- drivers/bluetooth/hci_qca.c | 11 +++++++ include/net/bluetooth/hci.h | 10 +++++++ net/bluetooth/hci_sync.c | 5 +++- 5 files changed, 48 insertions(+), 15 deletions(-) -- 2.43.2