From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E01713AA2F for ; Tue, 14 Jan 2025 14:09:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736863778; cv=none; b=RmKJJEAlHgyvjk9h1lfkxYOlPmsStPyAVkZt4tEqJ1RtFhRxrPUnE54/fxhQ1BkQm/QSAeUGCimFcNtopbYqiDgJIy4uhg0jyg+XoL8LBuxRaHe0wdJraoG25I04M3nZLolm73C5JfTzEMBXBcdhEbC0hRPo/K0OmZr6cRzENqQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736863778; c=relaxed/simple; bh=Rw0YwheHGkjgBmtJ3XrHVYkwWRiQHC6U1g7GiN7Nu8Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=F/Rk/7y6O8XF01DMWuieD6aT3bJLMiHgybFpt//th7lkVCtrskewogYb66NWtkz4T1BAWv3VFNEcuRhQUhdE9Ch0kBQhTLHSdZEBJDDZQ5Mou2NUIOtFGw24W2Ezuby6VhlPllhF72wHNONVf/BypIjtN3A1Cq8vp5mzV2wj3hI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=remarkable.no; spf=pass smtp.mailfrom=remarkable.no; dkim=pass (2048-bit key) header.d=remarkable.no header.i=@remarkable.no header.b=cgZ3Xh1y; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=remarkable.no Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=remarkable.no Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=remarkable.no header.i=@remarkable.no header.b="cgZ3Xh1y" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-5401c68b89eso5981759e87.0 for ; Tue, 14 Jan 2025 06:09:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=remarkable.no; s=google; t=1736863774; x=1737468574; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=91GZIzgjXBcFI31iM5fj3Hf8Rb+AoJ8tIZRBGy0zkpw=; b=cgZ3Xh1yd4WUFzHL4mi7PFoIxQv79JiX1BcXqx6H4FA8VWs9gEYx+G16/4HQx31A28 LNyN7SaR1mn63ksfnmHfDnsIv7g7zwaYqXjfuSJAtjjg12UMEN8jdwHh3l9s3m4iRNhc 4VFcu4+RaF9DGbfrZJsFm4K2njY/5rxDxVLFtfLhD1T/COAkhplwVb092a0bmF6q879C 3V9V6lm7ah2TLrC47NNOCFlEltc1UvA3AGFo+0PvvL3gfdW6sopAJOH2wN3zEd6T/XW5 bnN+5RUIEn5OhsCMQgkGEyJMwfPjG6904l6/UPlaiMw4nWRnYTIjtBJAJWn3HItV0RE1 XLaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736863774; x=1737468574; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=91GZIzgjXBcFI31iM5fj3Hf8Rb+AoJ8tIZRBGy0zkpw=; b=DEvyUSgrx5DVmFbifFdwl+2w5WpwWxBYjz07ZWlCv0T34qEME28582dYlX/w65g/ES nQB0lNua0mAg/LkXXUGj+Mg2OJpa+WIW8/ukaF/ksvsUb+B1laaI7W74WilHQ4b0+Lln 2kW7aKnQ/8IKxe6oeW6fkehNmMAF0vKioeIa9L6gxkRX3l4EUC+iE8IdOjxmP3nMUZ4m ciKti0KFDSCluLFHrJxDqeeABdoIG0lk6Jtvl7CNIYeukyJiAQCIxznw4+1xIoWNAP9m 9XJF23FxhpVjZ4rBH+P/NzVBT+rZAccTZM6NUyOD1rMwZ9Dif9d9qgP4N8cUfig1krRj +bWQ== X-Forwarded-Encrypted: i=1; AJvYcCUdORSiJtuk1gjTza2JDMl87oBWVeXuM60u/C2DaaDfovSrPyRulblYnECoF8Fz/wrRjcgDHa+ZkWG8dTI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3SQWvs5q4WSX7LBI3EnKqvkdNijvmcyrB1x2Ug3AmY4YWLWVI UoNSXorFlU+YTMJIKHC0ELVzmQDcFDAjxIBF19P2YgPWWz+Kdo/jpavUFkrkVjmbYnc9wZOdFEz 1vQ== X-Gm-Gg: ASbGncvUbxRKzXbAmdDc5xYlxtHGlU5980pjRh/lChC4jNvyj14L9ubJnyuzvqI5Zvv vY54eYliqYIsqEmZm4VZQDmkUKz3Q89qgJjBag+qH0nP2pdHEP/LPi3Z0hX1mU/Cqiahi2JnTzt RHNqZQtHCdWdCSOcZuqBdmB9MrZlD2yODCCSpe2MkM8YVNU1zvEcV2TmXhE7AIvRClxR5QjK7ru q7twlZUyqQWT2mrpeV7J4/C76yRcSC8rzHFXuzxoiHLy2vmxwoIR7EN8Z16zlHSdg9FoQprft6z AFZCzmCGkt5r/6IHr+qj2eT+1BTbPGw= X-Google-Smtp-Source: AGHT+IFoRDuCSh+PCWGYFtIoF6NIctlAFX3rohBL5ZQstpfFeSZSElly5OSQJQFTSaC7IKBKDWvYhg== X-Received: by 2002:a19:6a0f:0:b0:542:8a7c:509f with SMTP id 2adb3069b0e04-5428a7c5293mr5001343e87.2.1736863774384; Tue, 14 Jan 2025 06:09:34 -0800 (PST) Received: from ?IPV6:2001:4643:2b9c:0:742e:f778:f9f1:b089? ([2001:4643:2b9c:0:742e:f778:f9f1:b089]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5428be4999bsm1687773e87.14.2025.01.14.06.09.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jan 2025 06:09:33 -0800 (PST) Message-ID: <30b09e71-6790-4ab2-8945-e011996ee85f@remarkable.no> Date: Tue, 14 Jan 2025 15:09:32 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] Bluetooth: btnxpuart: Add support for set BD address To: Neeraj Sanjay Kale , "marcel@holtmann.org" , "luiz.dentz@gmail.com" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" Cc: "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Amitkumar Karwar , Sherry Sun , Luke Wang , "kristian.krohn@remarkable.no" , Manjeet Gupta References: <20250114133548.2362038-1-neeraj.sanjaykale@nxp.com> <20250114133548.2362038-2-neeraj.sanjaykale@nxp.com> <43beb3f3-071d-4f58-b356-6dc6b9de947a@remarkable.no> Content-Language: en-US From: Johan Korsnes In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/14/25 3:07 PM, Neeraj Sanjay Kale wrote: > > Hi Johan, > >> >> On 1/14/25 2:35 PM, Neeraj Sanjay Kale wrote: >>> This adds support for setting BD address during hci registration. NXP >>> FW does not allow vendor commands unless it receives a reset command >>> after FW download and initialization done. >>> As a workaround, the .set_bdaddr callback function will first send the >>> HCI reset command, followed by the actual vendor command to set BD >>> address. >>> >> >> Hi Neeraj, >> >> If NXP firmware does not allow vendor commands prior to this reset, would it >> not be better to perform this reset during probe/init? >> > HCI reset is already part of kernel init sequence hci_init0_sync(). > However, .set_bdaddr() is called immediately after FW download is complete, but before this init sequence. > > Also, if local-bd-address property is not defined in the DTB, sending HCI reset command in probe does not add any value. > > With current implementation, if local-bd-address is defined, driver sends HCI reset, followed by set BD address vendor command, and kernel continues with the HCI init sequence. > Thanks for clarifying, that makes sense :-) Kind regards, Johan > Thanks, > Neeraj