Message ID | 20230126165529.1452252-1-macroalpha82@gmail.com |
---|---|
Headers | show |
Series | Bluetooth: Add support for RTL8821CS | expand |
On 26/01/2023 17:55, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > Add compatible string for RTL8821CS for existing Realtek Bluetooth > driver. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > --- > Documentation/devicetree/bindings/net/realtek-bluetooth.yaml | 1 + > 1 file changed, 1 insertion(+) > Based on your driver it is compatible with rtl8822cs, so you can indicate it in the binding and use just one of_device_id entry. Best regards, Krzysztof
On Fri, Jan 27, 2023 at 11:24:03AM +0100, Krzysztof Kozlowski wrote: > On 26/01/2023 17:55, Chris Morgan wrote: > > From: Chris Morgan <macromorgan@hotmail.com> > > > > Add compatible string for RTL8821CS for existing Realtek Bluetooth > > driver. > > > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > > --- > > Documentation/devicetree/bindings/net/realtek-bluetooth.yaml | 1 + > > 1 file changed, 1 insertion(+) > > > > Based on your driver it is compatible with rtl8822cs, so you can > indicate it in the binding and use just one of_device_id entry. It's very similar, and uses some of the same constants, but has a different firmware. I assumed the firmware difference is enough to require it to be differentiated, but I wasn't sure. You are saying it does not? I just want to be clear. As always, thank you. > > Best regards, > Krzysztof >
On 27/01/2023 17:46, Chris Morgan wrote: > On Fri, Jan 27, 2023 at 11:24:03AM +0100, Krzysztof Kozlowski wrote: >> On 26/01/2023 17:55, Chris Morgan wrote: >>> From: Chris Morgan <macromorgan@hotmail.com> >>> >>> Add compatible string for RTL8821CS for existing Realtek Bluetooth >>> driver. >>> >>> Signed-off-by: Chris Morgan <macromorgan@hotmail.com> >>> --- >>> Documentation/devicetree/bindings/net/realtek-bluetooth.yaml | 1 + >>> 1 file changed, 1 insertion(+) >>> >> >> Based on your driver it is compatible with rtl8822cs, so you can >> indicate it in the binding and use just one of_device_id entry. > > It's very similar, and uses some of the same constants, but has a > different firmware. I assumed the firmware difference is enough to > require it to be differentiated, but I wasn't sure. You are saying > it does not? I just want to be clear. If by "differentiated" you mean "incompatible", then depends: 1. You have firmware-name property to indicate the firmware to load and then you can use one compatible to bind and just load different firmware, 2. If device variant is autodectable, it's compatible. realtek,rtl8723ds-bt also was added to the driver uselessly... Best regards, Krzysztof
On Fri, Jan 27, 2023 at 05:53:49PM +0100, Krzysztof Kozlowski wrote: > On 27/01/2023 17:46, Chris Morgan wrote: > > On Fri, Jan 27, 2023 at 11:24:03AM +0100, Krzysztof Kozlowski wrote: > >> On 26/01/2023 17:55, Chris Morgan wrote: > >>> From: Chris Morgan <macromorgan@hotmail.com> > >>> > >>> Add compatible string for RTL8821CS for existing Realtek Bluetooth > >>> driver. > >>> > >>> Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > >>> --- > >>> Documentation/devicetree/bindings/net/realtek-bluetooth.yaml | 1 + > >>> 1 file changed, 1 insertion(+) > >>> > >> > >> Based on your driver it is compatible with rtl8822cs, so you can > >> indicate it in the binding and use just one of_device_id entry. > > > > It's very similar, and uses some of the same constants, but has a > > different firmware. I assumed the firmware difference is enough to > > require it to be differentiated, but I wasn't sure. You are saying > > it does not? I just want to be clear. > > If by "differentiated" you mean "incompatible", then depends: > 1. You have firmware-name property to indicate the firmware to load and > then you can use one compatible to bind and just load different firmware, > 2. If device variant is autodectable, it's compatible. > > realtek,rtl8723ds-bt also was added to the driver uselessly... Gotcha. They are incompatible, but the driver should be able to autodetect each device as best I can tell. In fact all of the devices listed in the bindings should be autodetectable by the driver (again, as best I can tell). Honestly though that's assuming I'm using the correct firmware, which is why I have this tagged as an RFC. I'm really hoping to get Realtek's attention for them to chime in to confirm I'm using the most recent firmware and under what license/terms the firmware can be redistributed so that the firmware may be added to linux-firmware. Assuming everything is good though, I can resubmit V2 and instead of adding a new compatible just noting that the 8822CS and 8821CS use the same bindings. Thank you. > > Best regards, > Krzysztof >
On 27/01/2023 18:00, Chris Morgan wrote: > On Fri, Jan 27, 2023 at 05:53:49PM +0100, Krzysztof Kozlowski wrote: >> On 27/01/2023 17:46, Chris Morgan wrote: >>> On Fri, Jan 27, 2023 at 11:24:03AM +0100, Krzysztof Kozlowski wrote: >>>> On 26/01/2023 17:55, Chris Morgan wrote: >>>>> From: Chris Morgan <macromorgan@hotmail.com> >>>>> >>>>> Add compatible string for RTL8821CS for existing Realtek Bluetooth >>>>> driver. >>>>> >>>>> Signed-off-by: Chris Morgan <macromorgan@hotmail.com> >>>>> --- >>>>> Documentation/devicetree/bindings/net/realtek-bluetooth.yaml | 1 + >>>>> 1 file changed, 1 insertion(+) >>>>> >>>> >>>> Based on your driver it is compatible with rtl8822cs, so you can >>>> indicate it in the binding and use just one of_device_id entry. >>> >>> It's very similar, and uses some of the same constants, but has a >>> different firmware. I assumed the firmware difference is enough to >>> require it to be differentiated, but I wasn't sure. You are saying >>> it does not? I just want to be clear. >> >> If by "differentiated" you mean "incompatible", then depends: >> 1. You have firmware-name property to indicate the firmware to load and >> then you can use one compatible to bind and just load different firmware, >> 2. If device variant is autodectable, it's compatible. >> >> realtek,rtl8723ds-bt also was added to the driver uselessly... > > Gotcha. > > They are incompatible, but the driver should be able to autodetect each > device as best I can tell. In fact all of the devices listed in the > bindings should be autodetectable by the driver (again, as best I can > tell). Honestly though that's assuming I'm using the correct firmware, > which is why I have this tagged as an RFC. I'm really hoping to get > Realtek's attention for them to chime in to confirm I'm using the > most recent firmware and under what license/terms the firmware can > be redistributed so that the firmware may be added to linux-firmware. > > Assuming everything is good though, I can resubmit V2 and instead of > adding a new compatible just noting that the 8822CS and 8821CS use > the same bindings. They cannot use the same bindings. You always need specific compatible and this was not discussed here. What's discussed is to drop the driver change in of_device_id. Best regards, Krzysztof
From: Chris Morgan <macromorgan@hotmail.com> This patch series is to add support for the RTL8821CS Bluetooth controller found on the RTL8821CS WiFi/Bluetooth combo chip. This has been tested with firmware version 0xaa9a4e68. I am submitting as an RFC to hopefully get guidance from Realtek on submission of this firmware (or a later version) to the linux-firmware repository. Chris Morgan (2): dt-bindings: net: realtek-bluetooth: Add RTL8821CS Bluetooth: hci_h5: btrtl: Add support for RTL8821CS .../devicetree/bindings/net/realtek-bluetooth.yaml | 1 + drivers/bluetooth/btrtl.c | 8 ++++++++ drivers/bluetooth/hci_h5.c | 2 ++ 3 files changed, 11 insertions(+)