Import bt-devicetree from ASUS_AI2205-33.0820.0810.121

This commit is contained in:
Bruno Martins
2023-07-16 12:05:39 +01:00
parent 80b8f450f6
commit 9da524a558
13 changed files with 388 additions and 0 deletions

16
qcom/bt/Kbuild Normal file
View File

@@ -0,0 +1,16 @@
ifeq ($(CONFIG_ARCH_KALAMA),y)
dtbo-y += kalama-bt.dtbo
endif
ifeq ($(CONFIG_ARCH_WAIPIO),y)
dtbo-y += waipio-bt.dtbo
dtbo-y += waipio-kiwi-bt.dtbo
endif
ifeq ($(CONFIG_ARCH_KHAJE),y)
dtbo-y += khaje-bt.dtbo
endif
always-y := $(dtb-y) $(dtbo-y)
subdir-y := $(dts-dirs)
clean-files := *.dtb *.dtbo

9
qcom/bt/Makefile Normal file
View File

@@ -0,0 +1,9 @@
KBUILD_OPTIONS += KBUILD_EXTMOD_DTS=.
all: dtbs
clean:
$(MAKE) -C $(KERNEL_SRC) M=$(M) clean
%:
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)

View File

@@ -0,0 +1,16 @@
* BTFM Slimbus Slave Driver
BTFM Slimbus Slave driver configure and initialize slimbus slave device.
Bluetooth A2DP, SCO and FM Audio data is transferred over slimbus interface.
Required properties:
- compatible: Should be set to the following where 217 is manufacture id and 221 is prod id:
ex. HSP elmental address is 0x000120021702
compatible = "slim217,221"
- reg should be filled as per specs
reg = <1 0>;
Example:
slimbus: btfmslim-driver {
compatible = "slim217,221";
reg = <1 0>;
};

View File

@@ -0,0 +1,60 @@
* Bluetooth Controller
Bluetooth controller communicates with the Bluetooth Host using HCI Transport
layer. HCI Transport layer can be based on UART or USB serial communication
protocol.
Required properties:
- compatible: "qcom,<chip>"
chip: Should be set to one of the following:
qcom,qca6174
qcom,wcn3990
qcom,qca6390
qcom,qca6490
qcom,kiwi
- qcom,bt-reset-gpio: GPIO pin to bring BT Controller out of reset
Optional properties:
- qcom,xo-clk-gpio: GPIO for enabling clock at bootstrap
- qcom,bt-vdd-pa-supply: Bluetooth VDD PA regulator handle
- qcom,bt-vdd-io-supply: Bluetooth VDD IO regulator handle
- qcom,bt-vdd-ldo-supply: Bluetooth VDD LDO regulator handle. Kept under
optional parameters as some of the chipsets doesn't require ldo
or it may use from same vddio.
- qcom,bt-vdd-xtal-supply: Bluetooth VDD XTAL regulator handle
- qcom,bt-vdd-core-supply: Bluetooth VDD CORE regulator handle
- qcom,bt-vdd-asd-supply: Bluetooth VDD regulator handle for antenna switch
- reg: Memory regions defined as starting address and size
- reg-names: Names of the memory regions defined in reg entry
diversity.
- qcom,bt-chip-pwd-supply: Chip power down gpio is required when bluetooth
module and other modules like wifi co-exist in a singe chip and
shares a common gpio to bring chip out of reset.
- qcom,<supply>-config: Specifies voltage/current levels for supply. Should specified
in pairs (min, max), units uV. There can be optional
load in curr, unit uA. Last entry specifies if the retention
mode is supported for the regulator.
- mboxes: Specifies mbox channel data for AOP messaging
- qcom,vreg_ipa: Specifies Voltage regulator used for QCA6490 Internal Power
Amp config
Example:
bluetooth: bt_qca6490 {
compatible = "qcom,qca6390", "qcom,qca6490";
pinctrl-names = "default";
pinctrl-0 = <&bt_en_sleep>;
qcom,bt-reset-gpio = <&tlmm 81 0>; /* BT_EN */
qcom,wl-reset-gpio = <&tlmm 80 0>; /* WL_EN */
qcom,bt-sw-ctrl-gpio = <&tlmm 82 0>; /* SW_CTRL */
qcom,bt-xo-clk-gpio = <&tlmm 204 0>; /* XO */
qcom,bt-vdd-aon-supply = <&S11B>;
qcom,bt-vdd-dig-supply = <&S11B>;
qcom,bt-vdd-rfa1-supply = <&S1C>;
qcom,bt-vdd-rfa2-supply = <&S12B>;
qcom,bt-vdd-asd-supply = <&L7E>;
qcom,bt-vdd-aon-config = <966000 966000 0 1>;
qcom,bt-vdd-dig-config = <966000 966000 0 1>;
qcom,bt-vdd-rfa1-config = <1880000 1880000 0 1>;
qcom,bt-vdd-rfa2-config = <1350000 1350000 0 1>;
qcom,bt-vdd-asd-config = <2800000 2800000 0 1>;
};

View File

@@ -0,0 +1,13 @@
Richwave FM radio device
-FM RX playback with RDS
FM signal is demodulated then audio L/R samples are sent to external audio codec.
FM Rx RDS data received sent to host processor on I2C.
Required Properties:
- compatible: "rtc6226"
Example:
rtc6226 {
compatible = "rtc6226";
};

11
qcom/bt/kalama-bt.dts Normal file
View File

@@ -0,0 +1,11 @@
/dts-v1/;
/plugin/;
#include "kalama-bt.dtsi"
/ {
model = "Qualcomm Technologies, Inc. Kalama SoCs";
compatible = "qcom,kalama", "qcom,kalamap";
qcom,msm-id = <519 0x10000>, <536 0x10000>, <519 0x20000>, <536 0x20000>, <600 0x20000>, <601 0x20000>;
qcom,board-id = <0 0>;
};

120
qcom/bt/kalama-bt.dtsi Normal file
View File

@@ -0,0 +1,120 @@
#include <dt-bindings/interconnect/qcom,kalama.h>
&tlmm {
bt_en_sleep: bt_en_sleep {
mux {
pins = "gpio81";
function = "gpio";
};
config {
pins = "gpio81";
drive-strength = <2>;
output-low;
bias-pull-down;
};
};
};
&soc {
bluetooth: bt-qca-converged {
compatible = "qcom,bt-qca-converged";
qcom,converged-dt;
qcom,wlan-sw-ctrl-gpio = <&tlmm 83 0>; /* WLAN_SW_CNTRL_GPIO*/
bt_kiwi {
compatible = "qcom,kiwi";
pinctrl-names = "default";
pinctrl-0 = <&bt_en_sleep>;
qcom,bt-reset-gpio = <&tlmm 81 0>; /* BT_EN */
qcom,wl-reset-gpio = <&tlmm 80 0>; /* WL_EN */
qcom,bt-sw-ctrl-gpio = <&tlmm 82 0>; /* SW_CTRL */
mboxes = <&qmp_aop 0>;
qcom,bt-vdd18-aon-supply = <&L15B>; /* BT VDD1.8 AON */
qcom,bt-vdd-dig-supply = <&S4E>; /* BT LDO*/
qcom,bt-vdd-aon-supply = <&S4E>; /* BT AON LDO*/
qcom,bt-vdd-rfaOp8-supply = <&S4E>; /* BT RFAOp8 CMN LDO*/
qcom,bt-vdd-rfa1-supply = <&S4G>; /* BT RFA1.2 LDO */
qcom,bt-vdd-rfa2-supply = <&S6G>; /* BT RFA1.8 LDO */
qcom,bt-vdd18-aon-config = <1800000 1800000 0 1>;
qcom,bt-vdd-aon-config = <950000 950000 0 1>;
qcom,bt-vdd-dig-config = <950000 950000 0 1>;
qcom,bt-vdd-rfaOp8-config = <950000 950000 0 1>;
qcom,bt-vdd-rfa1-config = <1350000 1350000 0 1>;
qcom,bt-vdd-rfa2-config = <1900000 1900000 0 1>;
qcom,pdc_init_table=
"{class: wlan_pdc, ss: rf, res: s4e.v, upval: 916}",
"{class: wlan_pdc, ss: rf, res: s4e.v, dwnval: 612}",
"{class: wlan_pdc, ss: rf, res: s4g.v, upval: 1316}",
"{class: wlan_pdc, ss: rf, res: s4g.v, dwnval: 944}",
"{class: wlan_pdc, ss: rf, res: s6g.v, upval: 1864}",
"{class: wlan_pdc, ss: rf, res: s6g.v, dwnval: 1820}";
};
bt_qca6490 {
compatible = "qcom,qca6490";
pinctrl-names = "default";
pinctrl-0 = <&bt_en_sleep>;
qcom,bt-reset-gpio = <&tlmm 81 0>; /* BT_EN */
qcom,wl-reset-gpio = <&tlmm 80 0>; /* WL_EN */
qcom,bt-sw-ctrl-gpio = <&tlmm 82 0>; /* SW_CTRL */
mboxes = <&qmp_aop 0>;
qcom,bt-vdd-io-supply = <&L15B>; /* BT VDD1.8 AON */
qcom,bt-vdd-aon-supply = <&S4E>;
qcom,bt-vdd-dig-supply = <&S4E>;
qcom,bt-vdd-rfaOp8-supply = <&S4E>; /* BT RFAOp8 CMN LDO*/
qcom,bt-vdd-rfa1-supply = <&S6G>;
qcom,bt-vdd-rfa2-supply = <&S4G>;
qcom,bt-vdd-io-config = <1800000 1800000 0 1>;
qcom,bt-vdd-aon-config = <966000 966000 0 1>;
qcom,bt-vdd-dig-config = <966000 966000 0 1>;
qcom,bt-vdd-rfaOp8-config = <966000 966000 0 1>;
qcom,bt-vdd-rfa1-config = <1900000 1900000 0 1>;
qcom,bt-vdd-rfa2-config = <1350000 1350000 0 1>;
qcom,pdc_init_table =
"{class: wlan_pdc, ss: rf, res: s4e.v, upval: 966}",
"{class: wlan_pdc, ss: rf, res: s4e.v, dwnval: 615}",
"{class: wlan_pdc, ss: rf, res: s4g.v, upval: 1350}",
"{class: wlan_pdc, ss: rf, res: s4g.v, dwnval: 945}",
"{class: wlan_pdc, ss: rf, res: s6g.v, upval: 1900}",
"{class: wlan_pdc, ss: rf, res: s6g.v, dwnval: 1825}",
"{class: wlan_pdc, ss: rf, res: s2g.m, enable: 1}",
"{class: wlan_pdc, ss: rf, res: s2g.v, enable: 1}",
"{class: wlan_pdc, ss: rf, res: s2g.v, upval: 1012}",
"{class: wlan_pdc, ss: rf, res: s2g.v, dwnval: 515}";
};
};
slim_msm: slim@6C40000 {
status = "ok";
ngd@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <1>;
//slimbus child nodes
slimbus: btfmslim-driver {
compatible = "slim217,221";
reg = <1 0>;
};
};
};
};
// FM changes
&qupv3_hub_i2c2 {
status = "ok";
nq@64 {
compatible = "rtc6226";
reg = <0x64>;
fmint-gpio = <&tlmm 15 0>;
vdd-supply = <&L16B>;
rtc6226,vdd-supply-voltage = <2800000 2800000>;
rtc6226,vdd-load = <15000>;
vio-supply = <&L15B>;
rtc6226,vio-supply-voltage = <1800000 1800000>;
};
};
//uart instance
&qupv3_se14_4uart{
status = "ok";
};

11
qcom/bt/khaje-bt.dts Normal file
View File

@@ -0,0 +1,11 @@
/dts-v1/;
/plugin/;
#include "khaje-bt.dtsi"
/ {
model = "Qualcomm Technologies, Inc. Khaje SoC";
compatible = "qcom,khaje";
qcom,msm-id = <518 0x10000>, <585 0x10000>;
qcom,board-id = <0 0>;
};

34
qcom/bt/khaje-bt.dtsi Normal file
View File

@@ -0,0 +1,34 @@
&soc {
bluetooth: bt_wcn3990 {
compatible = "qcom,wcn3990";
qcom,bt-sw-ctrl-gpio = <&tlmm 87 0>; /* SW_CTRL */
qcom,bt-vdd-io-supply = <&L9A>; /* IO */
qcom,bt-vdd-core-supply = <&L17A>; /* RFA */
qcom,bt-vdd-pa-supply = <&L23A>; /* CH0 */
qcom,bt-vdd-xtal-supply = <&L16A>; /* XO */
qcom,bt-vdd-io-config = <1700000 1900000 1 0>;
qcom,bt-vdd-core-config = <1304000 1304000 1 0>;
qcom,bt-vdd-pa-config = <3000000 3312000 1 0>;
qcom,bt-vdd-xtal-config = <1700000 1900000 1 0>;
};
slim_msm: slim@a5c0000 {
status = "ok";
ngd@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <1>;
//slimbus child nodes
slimbus: btfmslim-driver {
compatible = "slim217,221";
reg = <1 0>;
};
};
};
};
&qupv3_se3_4uart {
status = "ok";
};

12
qcom/bt/waipio-bt.dts Normal file
View File

@@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
#include "waipio-bt.dtsi"
/ {
model = "Qualcomm Technologies, Inc. Waipio SoCs";
compatible = "qcom,waipio", "qcom,waipiop";
qcom,msm-id = <457 0x10000>, <482 0x10000>,
<457 0x20000>, <482 0x20000>;
qcom,board-id = <0 0>;
};

48
qcom/bt/waipio-bt.dtsi Normal file
View File

@@ -0,0 +1,48 @@
#include <dt-bindings/interconnect/qcom,waipio.h>
&tlmm {
bt_en_sleep: bt_en_sleep {
mux {
pins = "gpio81";
function = "gpio";
};
config {
pins = "gpio81";
drive-strength = <2>;
output-low;
bias-pull-down;
};
};
};
&soc {
bluetooth: bt_qca6490 {
compatible = "qcom,qca6490";
pinctrl-names = "default";
pinctrl-0 = <&bt_en_sleep>;
qcom,bt-reset-gpio = <&tlmm 81 0>; /* BT_EN */
qcom,wl-reset-gpio = <&tlmm 80 0>; /* WL_EN */
qcom,bt-sw-ctrl-gpio = <&tlmm 82 0>; /* SW_CTRL */
qcom,xo-clk-gpio = <&tlmm 204 0>; /* XO */
mboxes = <&qmp_aop 0>;
qcom,vreg_ipa="s3e";
qcom,bt-vdd-aon-supply = <&S11B>;
qcom,bt-vdd-dig-supply = <&S11B>;
qcom,bt-vdd-rfa1-supply = <&S1C>;
qcom,bt-vdd-rfa2-supply = <&S12B>;
qcom,bt-vdd-asd-supply = <&L7E>;
qcom,bt-vdd-aon-config = <966000 966000 0 1>;
qcom,bt-vdd-dig-config = <966000 966000 0 1>;
qcom,bt-vdd-rfa1-config = <1900000 2100000 0 1>;
qcom,bt-vdd-rfa2-config = <1350000 1350000 0 1>;
qcom,bt-vdd-asd-config = <2800000 2800000 0 1>;
};
};
&qupv3_se7_2uart {
status = "ok";
};

View File

@@ -0,0 +1,12 @@
/dts-v1/;
/plugin/;
#include "waipio-bt.dtsi"
/ {
model = "Qualcomm Technologies, Inc. Waipio SoCs";
compatible = "qcom,waipio", "qcom,waipiop";
qcom,msm-id = <457 0x10000>, <482 0x10000>,
<457 0x20000>, <482 0x20000>;
qcom,board-id = <0x02010008 0>;
};

View File

@@ -0,0 +1,26 @@
#include <dt-bindings/interconnect/qcom,waipio.h>
&bluetooth {
status = "disabled";
};
&soc {
bt_hmt: bt_wcn7850 {
compatible = "qcom,wcn7850";
pinctrl-names = "default";
pinctrl-0 = <&bt_en_sleep>;
qcom,bt-reset-gpio = <&tlmm 81 0>; /* BT_EN */
qcom,wl-reset-gpio = <&tlmm 80 0>; /* WL_EN */
qcom,bt-sw-ctrl-gpio = <&tlmm 82 0>; /* SW_CTRL */
qcom,bt-vdd-aon-supply = <&S11B>;
qcom,bt-vdd-dig-supply = <&S11B>;
qcom,bt-vdd-rfa1-supply = <&S1C>;
qcom,bt-vdd-rfa2-supply = <&S12B>;
qcom,bt-vdd-aon-config = <950000 950000 0 1>;
qcom,bt-vdd-dig-config = <950000 950000 0 1>;
qcom,bt-vdd-rfa1-config = <1900000 1900000 0 1>;
qcom,bt-vdd-rfa2-config = <1350000 1350000 0 1>;
};
};