diff --git a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml index eba2f3026ab0..7d55b48579a2 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml +++ b/Documentation/devicetree/bindings/net/bluetooth/qualcomm-bluetooth.yaml @@ -18,6 +18,7 @@ properties: enum: - qcom,qca2066-bt - qcom,qca6174-bt + - qcom,qca6490-bt - qcom,qca9377-bt - qcom,wcn3988-bt - qcom,wcn3990-bt @@ -37,6 +38,15 @@ properties: description: gpio specifier is used to find status of clock supply to SoC + wlan-gpios: + maxItems: 1 + description: gpio specifier used to enable the WLAN + chip, on QCA6490 only + + power-domains: + maxItems: 1 + description: power domain associated with the chip + clocks: maxItems: 1 description: clock provided to the controller (SUSCLK_32KHZ) @@ -114,6 +124,17 @@ allOf: - enable-gpios - clocks + - if: + properties: + compatible: + contains: + enum: + - qcom,qca6490-bt + then: + required: + - enable-gpios + - wlan-gpios + - if: properties: compatible: diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index eb17c197e594..97a61d410896 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -227,6 +227,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8350-oneplus-lemonade.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-oneplus-lemonadep.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-sony-xperia-sagami-pdx214.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8350-sony-xperia-sagami-pdx215.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm8350-samsung-r9q2.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8450-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8450-qrd.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8450-sony-xperia-nagara-pdx223.dtb diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi index 3dc0a98409c4..a9227d6764fb 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-common.dtsi @@ -24,6 +24,12 @@ chassis-type = "handset"; interrupt-parent = <&intc>; + aliases { + bluetooth = &bluetooth; + serial0 = &uart2; + serial1 = &uart18; + }; + bat: battery { compatible = "simple-battery"; device-chemistry = "lithium-ion"; @@ -54,6 +60,33 @@ }; }; + cnss_supply: cnss-supply { + compatible = "regulator-fixed"; + regulator-name = "wcnss_regulator"; + regulator-min-microvolt = <1900000>; + regulator-max-microvolt = <1900000>; + + enable-active-high; + + pinctrl-0 = <&cnss_regulator_active>; + pinctrl-names = "default"; + + gpio = <&tlmm 201 GPIO_ACTIVE_HIGH>; + }; + + /* + gpio_i2c4: gpio-i2c { + compatible = "i2c-gpio"; + sda-gpios = <&tlmm 20 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&tlmm 21 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + //#address-cells = <1>; + //#size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&qup_i2c4_default>, <&tp_enable_2v8>; + }; + */ + gpio-keys { compatible = "gpio-keys"; @@ -106,6 +139,27 @@ }; }; + qca6490_pd: qca6490 { + compatible = "qcom,qca6490"; + #power-domain-cells = <0>; + + vddaonbt-supply = <&pm8350_s11>; + vddaonwl-supply = <&pmr735a_s2>; + vddasd-supply = <&pmr735a_l7>; + vddrfa1-supply = <&pm8350c_s1>; + vddrfa2-supply = <&pm8350_s12>; + vddrfa3-supply = <&pm8350c_s1>; + vddpcie1-supply = <&cnss_supply>; + vddpcie2-supply = <&pm8350c_s1>; + vddio-supply = <&pm8350_s10>; + + pinctrl-0 = <&cnss_wlan_sleep>; + pinctrl-1 = <&cnss_wlan_active>; + pinctrl-names = "default", "active"; + + status = "disabled"; + }; + display_panel_avdd: regulator-display { compatible = "regulator-fixed"; regulator-name = "display_panel_avdd"; @@ -403,9 +457,23 @@ }; }; - /* pm8350b has one regulator here; unused for now */ - regulators-2 { + compatible = "qcom,pm8350b-rpmh-regulators"; + qcom,pmic-id = "d"; + + vdd-l1-supply = <&pm8350_s12>; + + pm8350b_l1: ldo1 { + regulator-name = "pm8350b_l1"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allowed-modes = ; + }; + }; + + regulators-3 { compatible = "qcom,pmr735a-rpmh-regulators"; qcom,pmic-id = "e"; @@ -486,6 +554,24 @@ status = "okay"; }; +&dispcc { + //status = "okay"; +}; + +&gmu { + /* FIXME: check_dtbs complains */ + //firmware-name = "qcom/sm8350/lemonade/a660_gmu.bin"; +}; + +&gpu { + //status = "okay"; + + zap-shader { + memory-region = <&pil_gpu_mem>; + firmware-name = "qcom/sm8350/lemonade/a660_zap.mbn"; + }; +}; + &i2c2 { clock-frequency = <100000>; status = "okay"; @@ -497,6 +583,7 @@ }; }; + &i2c4 { clock-frequency = <400000>; status = "okay"; @@ -554,14 +641,74 @@ status = "okay"; }; +&mdss { + //status = "okay"; +}; + +&mdss_dp { + //status = "okay"; + + ports { + port@1 { + reg = <1>; + + endpoint { + }; + }; + }; +}; + +&mdss_dsi0 { + vdda-supply = <&pm8350_l6>; + + //status = "okay"; + + /* Common properties for OnePlus 9 and 9 Pro */ + display_panel: panel-1@0 { + reg = <0>; + + pinctrl-0 = <&sde_dsi_active &sde_te_active>; + pinctrl-1 = <&sde_dsi_suspend &sde_te_suspend>; + pinctrl-names = "default", "sleep"; + + reset-gpios = <&tlmm 24 GPIO_ACTIVE_LOW>; + + vdd-supply = <&pm8350c_l13>; + vddio-supply = <&pm8350c_l12>; + avdd-supply = <&display_panel_avdd>; + //clocks = <&rpmhcc RPMH_DIV_CLK1>; + //clock-names = "div_clk"; + //clocks = <&mdss_dsi0_phy DISP_CC_MDSS_> + + status = "disabled"; + + port { + panel_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; +}; + +&mdss_dsi0_out { + remote-endpoint = <&panel_in>; + data-lanes = <0 1 2 3>; +}; + +&mdss_dsi0_phy { + vdds-supply = <&pm8350_l5>; + //status = "okay"; +}; + &mpss { firmware-name = "qcom/sm8350/OnePlus/lemonade/modem.mbn"; - status = "okay"; }; &pcie0 { - pinctrl-0 = <&pcie0_default_state>; - pinctrl-names = "default"; + pinctrl-0 = <&pcie0_default_state>;//, <&pcie0_sleep_state>; + pinctrl-names = "default";//, "sleep"; + + //power-domains = <&qca6490_pd>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>; wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; @@ -573,6 +720,8 @@ vdda-phy-supply = <&pm8350_l5>; vdda-pll-supply = <&pm8350_l6>; + power-domains = <&qca6490_pd>; + status = "okay"; }; @@ -865,10 +1014,15 @@ }; &pon_resin { - linux,code = ; + linux,code = ; status = "okay"; }; - +/* +&qup_i2c4_default { + function = "gpio"; + bias-disable; +}; +*/ &qupv3_id_0 { status = "okay"; }; @@ -919,6 +1073,74 @@ /* Fingerprint sensor and NFC-related pins shouldn't be touched by us */ gpio-reserved-ranges = <52 8>; + bt_active: bt-active-state { + pins = "gpio65"; + function = "gpio"; + drive-strength = <16>; + output-high; + bias-pull-up; + }; + + bt_sleep: bt-sleep-state { + pins = "gpio65"; + function = "gpio"; + drive-strength = <2>; + output-low; + bias-pull-down; + }; + + cnss_regulator_active: cnss-regulator-active-state { + pins = "gpio201"; + function = "gpio"; + drive-strength = <16>; + bias-pull-down; + output-low; + }; + + cnss_wlan_active: cnss-wlan-active-state { + pins = "gpio64"; + function = "gpio"; + drive-strength = <16>; + output-high; + bias-pull-up; + }; + + cnss_wlan_sleep: cnss-wlan-sleep-state { + pins = "gpio64"; + function = "gpio"; + drive-strength = <2>; + output-low; + bias-pull-down; + }; + + sde_dsi_active: sde-dsi-active-state { + pins = "gpio24"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + sde_dsi_suspend: sde-dsi-sleep-state { + pins = "gpio24"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + sde_te_active: sde-te-active-state { + pins = "gpio82"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + sde_te_suspend: sde-te-sleep-state { + pins = "gpio82"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + pcie0_default_state: pcie0-default-state { perst-pins { pins = "gpio94"; @@ -940,13 +1162,13 @@ drive-strength = <2>; bias-pull-up; }; + }; - sleep-pins { - pins = "gpio95"; - function = "gpio"; - drive-strength = <2>; - bias-pull-up; - }; + pcie0_sleep_state: pcie0-sleep-state { + pins = "gpio95"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; }; pcie1_default_state: pcie1-default-state { @@ -969,10 +1191,17 @@ function = "gpio"; drive-strength = <2>; bias-pull-up; - /* wil6210_refclk_en_pin lives here also */ }; }; + /* XXX: Is this correct? */ + pcie1_sleep_state: pcie1-sleep-state { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + /* Modem-related pin common on both devices */ rf_cable_ant0_active: rf-cable-ant0-active-state { pins = "gpio165"; @@ -1005,6 +1234,43 @@ }; }; +&uart2 { + status = "okay"; +}; + +&uart18 { + pinctrl-0 = <&qup_uart18_4pin>; + status = "okay"; + + bluetooth: bluetooth { + compatible = "qcom,qca6490-bt"; + + pinctrl-0 = <&bt_active>; + pinctrl-1 = <&bt_sleep>; + pinctrl-names = "default", "sleep"; + + /* QCA6490 requires wlan and bluetooth be enabled simultaneously */ + enable-gpios = <&tlmm 65 GPIO_ACTIVE_HIGH>; + wlan-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>; + swctrl-gpios = <&tlmm 153 GPIO_ACTIVE_HIGH>; + + power-domains = <&qca6490_pd>; + + //vddio-supply = <&pm8350_s10>; + //vddaon-supply = <&pm8350_s11>; + //vddasd-supply = <&pmr735a_l7>; + //vdddig-supply = <&pm8350_s11>; + //vddrfa1-supply = <&pm8350c_s1>; + //vddrfa2-supply = <&pm8350_s12>; + //vddpcie1-supply = <&pm8350_s12>; + //vddpcie2-supply = <&pm8350c_s1>; + + max-speed = <3200000>; + + //status = "disabled"; + }; +}; + &ufs_mem_hc { reset-gpios = <&tlmm 203 GPIO_ACTIVE_LOW>; diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts index da2dc7e55c4f..a22ea07b6fb7 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts +++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonade.dts @@ -36,6 +36,16 @@ <&rf_cable_ant3_active>, <&rf_cable_ant7_active>; pinctrl-names = "default"; + status = "okay"; +}; + +&qca6490_pd { + rf-gpios = <&tlmm 165 0>, + <&tlmm 27 0>, + <&tlmm 92 0>, + <&tlmm 44 0>, + <&tlmm 155 0>; + status = "okay"; }; &tlmm { @@ -68,18 +78,18 @@ bias-pull-up; }; - tp_rst_suspend: tp-rst-suspend-state { - pins = "gpio22"; - function = "gpio"; - drive-strength = <2>; - bias-pull-down; - }; - - tp_enable_2v8: tp-enable-2v8-state { + tp_enable_2v8: tp-2v8-enable-state { pins = "gpio74"; function = "gpio"; drive-strength = <8>; bias-pull-up; output-high; }; + + tp_rst_suspend: tp-rst-suspend-state { + pins = "gpio22"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; }; diff --git a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts index 713dc08e696c..244611cbb69b 100644 --- a/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts +++ b/arch/arm64/boot/dts/qcom/sm8350-oneplus-lemonadep.dts @@ -14,7 +14,35 @@ model = "OnePlus 9 Pro"; }; +&display_panel { + compatible = "samsung,amb670yf01"; + status = "fail"; +}; + &mpss { pinctrl-0 = <&rf_cable_ant0_active>; pinctrl-names = "default"; + status = "okay"; +}; + +&qca6490_pd { + rf-gpios = <&tlmm 165 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&tlmm { + tp_enable_2v8: tp-2v8-enable-state { + pins = "gpio31", "gpio197"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + output-high; + }; + + tp_rst_suspend: tp-rst-suspend-state { + pins = "gpio22"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; }; diff --git a/arch/arm64/boot/dts/qcom/sm8350-samsung-r9q2.dts b/arch/arm64/boot/dts/qcom/sm8350-samsung-r9q2.dts new file mode 100644 index 000000000000..de62ea16fde6 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sm8350-samsung-r9q2.dts @@ -0,0 +1,1162 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "sm8350.dtsi" +#include "pm8350.dtsi" +#include "pm8350c.dtsi" +#include "pmr735a.dtsi" +#include "pmk8350.dtsi" + +/delete-node/ &cdsp_secure_heap; +/delete-node/ &pil_adsp_mem; +/delete-node/ &pil_spss_mem; +/delete-node/ &pil_modem_mem; +/delete-node/ &removed_mem; +/delete-node/ &pil_video_mem; +/delete-node/ &pil_camera_mem; +/delete-node/ &pil_cdsp_mem; +/delete-node/ &pil_cvp_mem; +/delete-node/ &pil_slpi_mem; + +/ { + model = "Samsung R9Q PROJECT (board-id,08)"; + qcom,board-id = <0x10008 0x08>; + qcom,msm-id = <0x19f 0x20001 0x1c8 0x20001 0x1f5 0x20001>; + compatible = "samsung,r9q", "qcom,sm8350"; + chassis-type = "handset"; + + aliases { + bluetooth = &bluetooth; + display0 = &panel0; + serial0 = &uart2; + serial1 = &uart18; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x00 0x80000000 0x00 0x3a800000 0x00 0xc0000000 0x01 0x40000000 0x00 + 0xbae00000 0x00 0x1e00000>; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + // drm_kms_helper.fbdev_emulation=0 + // fw_devlink=permissive + bootargs = "PMOS_NOSPLASH console=tty0 initcall_debug ignore_loglevel clk_ignore_unused pd_ignore_unused regulator_ignore_unused panic=10 loglevel=7"; + stdout-path = "display0"; + + framebuffer: framebuffer@e4000000 { + compatible = "simple-framebuffer"; + reg = <0x00 0xe4000000 0x00 0x2300000>; + width = <1080>; + height = <2340>; + stride = <(1080 * 4)>; + format = "a8r8g8b8"; + + clocks = <&gcc GCC_DISP_HF_AXI_CLK>, + <&gcc GCC_DISP_SF_AXI_CLK>; + }; + }; + + reserved-memory { + splash_region { + reg = <0x00 0xe4000000 0x00 0x2300000>; + label = "cont_splash_region"; + no-map; + }; + + ramoops@f0b00000 { + compatible = "ramoops"; + reg = <0x00 0xf0b00000 0x00 0x100000>; + record-size = <0x40000>; + console-size = <0x40000>; + ftrace-size = <0x40000>; + pmsg-size = <0x40000>; + no-map; + }; + + cdsp_secure_heap: memory@80c00000 { + no-map; + reg = <0x00 0x80c00000 0x00 0x600000>; + }; + + pil_camera_mem: memory@9b800000 { + no-map; + reg = <0x00 0x9b800000 0x00 0x500000>; + }; + + pil_video_mem: memory@9bd00000 { + no-map; + reg = <0x00 0x9bd00000 0x00 0x500000>; + }; + + pil_cvp_mem: memory@9c200000 { + no-map; + reg = <0x00 0x9c200000 0x00 0x500000>; + }; + + pil_adsp_mem: memory@85200000 { + no-map; + reg = <0x00 0x85200000 0x00 0x3000000>; + }; + + pil_slpi_mem: memory@9c700000 { + no-map; + reg = <0x00 0x9c700000 0x00 0x1600000>; + }; + + pil_spss_mem: memory@8b51c000 { + no-map; + reg = <0x00 0x8b51c000 0x00 0x100000>; + }; + + pil_modem_mem: memory@8b800000 { + no-map; + reg = <0x00 0x8b800000 0x00 0xf600000>; + }; + + removed_mem: memory@d8800000 { + no-map; + reg = <0x00 0xd8800000 0x00 0x7d00000>; + }; + + sec_debug_region: memory@f0000000 { + compatible = "removed-dma-pool"; + no-map; + reg = <0x00 0xf0000000 0x00 0x900000>; + }; + + ss_plog: memory@f0900000 { + compatible = "ss_plog"; + no-map; + reg = <0x00 0xf0900000 0x00 0x200000>; + }; + + tima_region: memory@b0100000 { + compatible = "removed-dma-pool"; + no-map; + reg = <0x00 0xb0100000 0x00 0x100000>; + }; + + pil_cdsp_mem: memory@89700000 { + no-map; + reg = <0x00 0x89700000 0x00 0x1e00000>; + }; + }; + + vph_pwr: regulator-vph-pwr { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + + regulator-always-on; + regulator-boot-on; + }; + + panel_supply_vddr: panel-gpio-regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "panel_supply_vddr"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&tlmm 163 0x0>; + enable-active-high; + regulator-boot-on; + regulator-always-on; + pinctrl-names = "default"; + pinctrl-0 = <&panel_vddr_default>; + }; + + panel_supply_vddio: panel-supply-regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "panel_supply_vddio"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-enable-load = <182000>; + regulator-disable-load = <80>; + regulator-post-on-sleep = <20>; + }; + + panel_supply_vdd: panel-supply-regulator@2 { + compatible = "regulator-fixed"; + regulator-name = "panel_supply_vdd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-enable-load = <10000>; + regulator-disable-load = <0>; + regulator-post-on-sleep = <0>; + }; + + panel_supply_vddi: panel-supply-regulator@3 { + compatible = "regulator-fixed"; + regulator-name = "panel_supply_vddi"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-boot-on; + }; + + display_panel_avdd: regulator-display { + compatible = "regulator-fixed"; + regulator-name = "display_panel_avdd"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + regulator-enable-ramp-delay = <233>; + + enable-active-high; + regulator-boot-on; + }; + + ts_vcc: touchscreen-supply-regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "ts_vcc"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + qca6490_pd: qca6490 { + compatible = "qcom,qca6490"; + #power-domain-cells = <0>; + + vddaonbt-supply = <&pm8350_s11>; + vddaonwl-supply = <&pmr735a_s2>; + vddio-supply = <&pm8350_s10>; + vddaon-supply = <&pm8350_s11>; + vddasd-supply = <&pmr735a_l7>; + vdddig-supply = <&pm8350_s11>; + vddrfa1-supply = <&pm8350c_s1>; + vddrfa2-supply = <&pm8350_s12>; + vddpcie1-supply = <&pm8350_s12>; + vddpcie2-supply = <&pm8350c_s1>; + vddpmu-supply = <&pm8350_s11>; + vddrfa3-supply = <&pm8350c_s1>; + + pinctrl-0 = <&cnss_wlan_sleep>; + pinctrl-1 = <&cnss_wlan_active>; + pinctrl-names = "default", "active"; + + rf-gpios = <&tlmm 165 GPIO_ACTIVE_HIGH>; + wlan-en-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>; + + status = "okay"; + }; + + pmic-glink { + compatible = "qcom,sm8350-pmic-glink", "qcom,pmic-glink"; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&usb3phy_portselect_gpio>; + + orientation-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>; + + connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pmic_glink_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_ss_in: endpoint { + remote-endpoint = <&usb_1_qmpphy_out>; + }; + }; + }; + }; + }; +}; + +&i2c4 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c4_touch_pins>; + status = "okay"; + + touchscreen@4b { + status = "disabled"; + + compatible = "syna,s3908"; + reg = <0x4b>; + + interrupts-extended = <&tlmm 23 IRQ_TYPE_LEVEL_LOW>; + + reset-gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&ts_irq &ts_rst>; + pinctrl-names = "default"; + + vdd-supply = <&pm8350c_l11>; + vcc-supply = <&ts_vcc>; + }; +}; + +&dispcc { + status = "okay"; +}; + +&gpi_dma0 { + status = "okay"; +}; + +&gpi_dma1 { + status = "okay"; +}; + +&gpi_dma2 { + status = "okay"; +}; + +&slpi { + firmware-name = "qcom/sm8350/Samsung/r9q2/slpi.mbn"; + status = "disabled"; +}; + +&mpss { + memory-region = <&pil_modem_mem>; + firmware-name = "qcom/sm8350/Samsung/r9q2/modem.mbn"; + status = "okay"; +}; + +&adsp { + firmware-name = "qcom/sm8350/Samsung/r9q2/adsp.mbn"; + status = "okay"; +}; + +&cdsp { + firmware-name = "qcom/sm8350/Samsung/r9q2/cdsp.mbn"; + status = "okay"; +}; + +&ipa { + qcom,gsi-loader = "self"; + memory-region = <&pil_ipa_fw_mem>; + firmware-name = "qcom/sm8350/Samsung/r9q2/ipa_fws.mbn"; + status = "okay"; +}; + +&usb_1 { + status = "okay"; +}; + +&usb_1_dwc3 { + dr_mode = "otg"; + usb-role-switch; +}; + +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + +&usb_1_qmpphy_out { + remote-endpoint = <&pmic_glink_ss_in>; + status = "okay"; +}; + +&usb_1_hsphy { + status = "okay"; + + vdda-pll-supply = <&pm8350_l5>; + vdda18-supply = <&pm8350c_l1>; + vdda33-supply = <&pm8350_l2>; +}; + +&usb_1_qmpphy { + status = "okay"; + + vdda-phy-supply = <&pm8350_l6>; + vdda-pll-supply = <&pm8350_l1>; +}; + +&ufs_mem_hc { + reset-gpios = <&tlmm 203 GPIO_ACTIVE_LOW>; + + vcc-supply = <&pm8350_l7>; + vcc-max-microamp = <800000>; + vccq-supply = <&pm8350_l9>; + vccq-max-microamp = <900000>; + + status = "okay"; +}; + +&ufs_mem_phy { + vdda-phy-supply = <&pm8350_l5>; + vdda-pll-supply = <&pm8350_l6>; + + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <52 8>; + + usb3phy_portselect: usb3phy-portselect-state { + pins = "gpio81"; + function = "usb_phy"; + bias-disable; + drive-strength = <2>; + }; + + usb3phy_portselect_gpio: usb3phy-portselect-gpio-state { + pins = "gpio81"; + function = "gpio"; + bias-disable; + input-enable; + drive-strength = <2>; + }; + + bt_active: bt-active-state { + pins = "gpio196"; + function = "gpio"; + drive-strength = <16>; + output-high; + bias-pull-up; + }; + + bt_sleep: bt-sleep-state { + pins = "gpio65"; + function = "gpio"; + drive-strength = <2>; + output-low; + bias-pull-down; + }; + + rf_cable_ant0_active: rf-cable-ant0-active-state { + pins = "gpio165"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + panel_vddr_default: panel-vddr-default-state { + pins = "gpio12"; + function = "gpio"; + drive-strength = <8>; + bias-disable = <0>; + output-high; + }; + + sde_dsi_active: sde-dsi-active-state { + pins = "gpio7"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + sde_dsi_suspend: sde-dsi-suspend-state { + pins = "gpio7"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + sde_te_active: sde-te-active-state { + pins = "gpio82"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + sde_te_suspend: sde-te-suspend-state { + pins = "gpio82"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + panel_reset_active: panel-reset-active-state { + pins = "gpio22"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + panel_reset_suspend: panel-reset-suspend-state { + pins = "gpio22"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + ts_irq: ts-irq-state { + pins = "gpio23"; + function = "gpio"; + input-enable; + bias-disable; + }; + + ts_rst: ts-rst-state { + pins = "gpio22"; + function = "gpio"; + bias-disable; + }; + + i2c4_touch_pins: i2c4-touch-pins-state { + pins-mux { + pins = "gpio20", "gpio21"; + function = "qup4"; + }; + + pins-cfg { + pins = "gpio20", "gpio21"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + cnss_regulator_active: cnss-regulator-active-state { + pins = "gpio30"; + function = "gpio"; + drive-strength = <16>; + bias-pull-down; + output-low; + }; + + cnss_wlan_active: cnss-wlan-active-state { + pins = "gpio64"; + function = "gpio"; + drive-strength = <16>; + output-high; + bias-pull-up; + }; + + cnss_wlan_sleep: cnss-wlan-sleep-state { + pins = "gpio201"; + function = "gpio"; + drive-strength = <2>; + output-low; + bias-pull-down; + }; + + pcie0_default_state: pcie0-default-state { + perst-pins { + pins = "gpio94"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + clkreq-pins { + pins = "gpio95"; + function = "pcie0_clkreqn"; + drive-strength = <2>; + bias-pull-up; + }; + + wake-pins { + pins = "gpio96"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + pcie0_sleep_state: pcie0-sleep-state { + pins = "gpio95"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + pcie1_default_state: pcie1-default-state { + perst-pins { + pins = "gpio97"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + clkreq-pins { + pins = "gpio98"; + function = "pcie1_clkreqn"; + drive-strength = <2>; + bias-pull-up; + }; + + wake-pins { + pins = "gpio99"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + pcie1_sleep_state: pcie1-sleep-state { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; +}; + +&apps_rsc { + regulators-0 { + compatible = "qcom,pm8350-rpmh-regulators"; + qcom,pmic-id = "b"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + vdd-s11-supply = <&vph_pwr>; + vdd-s12-supply = <&vph_pwr>; + + vdd-l1-l4-supply = <&pm8350_s11>; + vdd-l2-l7-supply = <&vreg_bob>; + vdd-l3-l5-supply = <&vreg_bob>; + vdd-l6-l9-l10-supply = <&pm8350_s11>; + vdd-l6-l9-supply = <&pm8350_s11>; + + pm8350_s10: smps10 { + regulator-name = "pm8350_s10"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8350_s11: smps11 { + regulator-name = "pm8350_s11"; + regulator-min-microvolt = <952000>; + regulator-max-microvolt = <1012000>; + }; + + pm8350_s12: smps12 { + regulator-name = "pm8350_s12"; + regulator-min-microvolt = <1256000>; + regulator-max-microvolt = <1360000>; + regulator-initial-mode = ; + regulator-allowed-modes = ; + }; + + pm8350_l1: ldo1 { + regulator-name = "pm8350_l1"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <920000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l2: ldo2 { + regulator-name = "pm8350_l2"; + regulator-min-microvolt = <3072000>; + regulator-max-microvolt = <3072000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l3: ldo3 { + regulator-name = "pm8350_l3"; + regulator-min-microvolt = <904000>; + regulator-max-microvolt = <904000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l5: ldo5 { + regulator-name = "pm8350_l5"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <888000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l6: ldo6 { + regulator-name = "pm8350_l6"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1208000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l7: ldo7 { + regulator-name = "pm8350_l7"; + regulator-min-microvolt = <2504000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350_l9: ldo9 { + regulator-name = "pm8350_l9"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-1 { + compatible = "qcom,pm8350c-rpmh-regulators"; + qcom,pmic-id = "c"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + + vdd-l1-l12-supply = <&pm8350c_s1>; + vdd-l2-l8-supply = <&pm8350c_s1>; + vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>; + vdd-l6-l9-l11-supply = <&vreg_bob>; + vdd-l10-supply = <&pm8350_s12>; + + vdd-bob-supply = <&vph_pwr>; + + pm8350c_s1: smps1 { + regulator-name = "pm8350c_s1"; + regulator-min-microvolt = <1984000>; + regulator-max-microvolt = <1984000>; + regulator-initial-mode = ; + regulator-allowed-modes = ; + }; + + pm8350c_s3: smps3 { + regulator-name = "pm8350c_s3"; + regulator-min-microvolt = <496000>; + regulator-max-microvolt = <704000>; + }; + + pm8350c_s10: smps10 { + regulator-name = "pm8350c_s10"; + regulator-min-microvolt = <1048000>; + regulator-max-microvolt = <1128000>; + }; + + vreg_bob: bob { + regulator-name = "vreg_bob"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3960000>; + regulator-initial-mode = ; + }; + + pm8350c_l1: ldo1 { + regulator-name = "pm8350c_l1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l2: ldo2 { + regulator-name = "pm8350c_l2"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l3: ldo3 { + regulator-name = "pm8350c_l3"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l4: ldo4 { + regulator-name = "pm8350c_l4"; + regulator-min-microvolt = <1808000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l5: ldo5 { + regulator-name = "pm8350c_l5"; + regulator-min-microvolt = <1808000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l6: ldo6 { + regulator-name = "pm8350c_l6"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l7: ldo7 { + regulator-name = "pm8350c_l7"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-always-on; + regulator-allowed-modes = ; + }; + + pm8350c_l8: ldo8 { + regulator-name = "pm8350c_l8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-always-on; + regulator-boot-on; + regulator-allowed-modes = ; + }; + + pm8350c_l9: ldo9 { + regulator-name = "pm8350c_l9"; + regulator-min-microvolt = <2960000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + regulator-always-on; + }; + + pm8350c_l10: ldo10 { + regulator-name = "pm8350c_l10"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l11: ldo11 { + regulator-name = "pm8350c_l11"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2504000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-always-on; + regulator-boot-on; + regulator-allowed-modes = ; + }; + + pm8350c_l12: ldo12 { + regulator-name = "pm8350c_l12"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pm8350c_l13: ldo13 { + regulator-name = "pm8350c_l13"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; + + regulators-2 { + compatible = "qcom,pmr735a-rpmh-regulators"; + qcom,pmic-id = "e"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + + vdd-l1-l2-supply = <&pmr735a_s2>; + vdd-l3-supply = <&pmr735a_s1>; + vdd-l4-supply = <&pm8350c_s1>; + vdd-l5-l6-supply = <&pm8350c_s1>; + vdd-l7-bob-supply = <&vreg_bob>; + + pmr735a_s1: smps1 { + regulator-name = "pmr735a_s1"; + regulator-min-microvolt = <1256000>; + regulator-max-microvolt = <1280000>; + }; + + pmr735a_s2: smps2 { + regulator-name = "pmr735a_s2"; + regulator-min-microvolt = <852000>; + regulator-max-microvolt = <1020000>; + }; + + pmr735a_s3: smps3 { + regulator-name = "pmr735a_s3"; + regulator-min-microvolt = <2200000>; + regulator-max-microvolt = <2352000>; + }; + + pmr735a_l1: ldo1 { + regulator-name = "pmr735a_l1"; + regulator-min-microvolt = <912000>; + regulator-max-microvolt = <912000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pmr735a_l2: ldo2 { + regulator-name = "pmr735a_l2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pmr735a_l3: ldo3 { + regulator-name = "pmr735a_l3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pmr735a_l4: ldo4 { + regulator-name = "pmr735a_l4"; + regulator-min-microvolt = <1776000>; + regulator-max-microvolt = <1872000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pmr735a_l5: ldo5 { + regulator-name = "pmr735a_l5"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pmr735a_l6: ldo6 { + regulator-name = "pmr735a_l6"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <904000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + + pmr735a_l7: ldo7 { + regulator-name = "pmr735a_l7"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-initial-mode = ; + regulator-allow-set-load; + regulator-allowed-modes = ; + }; + }; +}; + +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qupv3_id_2 { + status = "okay"; +}; + +&gmu { + status = "okay"; + firmware-name = "qcom/a660_gmu.bin"; +}; + +&gpu { + status = "okay"; + + zap-shader { + memory-region = <&pil_gpu_mem>; + firmware-name = "qcom/sm8350/Samsung/r9q2/a660_zap.mbn"; + }; +}; + +&mdss { + status = "okay"; +}; + +&mdss_mdp { + status = "okay"; +}; + +&mdss_dp { + status = "disabled"; +}; + +&mdss_dsi0 { + status = "okay"; + vdda-supply = <&pm8350_l6>; + + panel0: panel@0 { + compatible = "samsung,amb641zr01"; + reg = <0>; + vddio-supply = <&panel_supply_vddio>; + vddr-supply = <&panel_supply_vddr>; + vddi-supply = <&panel_supply_vddi>; + vdd-supply = <&panel_supply_vdd>; + avdd-supply = <&display_panel_avdd>; + reset-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sde_dsi_active>; + status = "okay"; + + port { + panel_in: endpoint { + remote-endpoint = <&mdss_dsi0_out>; + }; + }; + }; +}; + +&mdss_dsi0_out { + data-lanes = <0 1 2 3>; + remote-endpoint = <&panel_in>; +}; + +&mdss_dsi0_phy { + status = "okay"; + vdds-supply = <&pm8350_l5>; +}; + +&pcie0 { + pinctrl-0 = <&pcie0_default_state>; + pinctrl-names = "default"; + + perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; + wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + + status = "okay"; +}; + +&pcie0_phy { + vdda-phy-supply = <&pm8350_l5>; + vdda-pll-supply = <&pm8350_l6>; + + power-domains = <&qca6490_pd>; + + status = "okay"; +}; + +&lpass_tlmm { + status = "disabled"; +}; + +&uart18 { + pinctrl-0 = <&qup_uart18_4pin>; + status = "okay"; + + bluetooth: bluetooth { + compatible = "qcom,qca6490-bt"; + + pinctrl-0 = <&bt_active>; + pinctrl-names = "default"; + + /* QCA6490 requires wlan and bluetooth be enabled simultaneously */ + enable-gpios = <&tlmm 196 GPIO_ACTIVE_HIGH>; + wlan-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>; + swctrl-gpios = <&tlmm 153 GPIO_ACTIVE_HIGH>; + + power-domains = <&qca6490_pd>; + + vddio-supply = <&pm8350_s10>; + vddaon-supply = <&pm8350_s11>; + vddasd-supply = <&pmr735a_l7>; + vdddig-supply = <&pm8350_s11>; + vddrfa1-supply = <&pm8350c_s1>; + vddrfa2-supply = <&pm8350_s12>; + vddpcie1-supply = <&pm8350_s12>; + vddpcie2-supply = <&pm8350c_s1>; + vddpmu-supply = <&pm8350_s11>; + vddrfa3-supply = <&pm8350c_s1>; + + vddbtcxmx-supply = <&pm8350_l1>; + vddrfacmn-supply = <&pm8350_l1>; + vddrfa0p8-supply = <&pmr735a_l5>; + vddrfa1p2-supply = <&pmr735a_l2>; + vddrfa1p7-supply = <&pmr735a_l4>; + + max-speed = <3200000>; + + status = "okay"; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index a72f3c470089..1f686f63d4f2 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -2971,6 +2971,38 @@ bias-disable; }; + qup_uart18_4pin: qup-uart18-4pin-state { + cts-pins { + pins = "gpio68"; + function = "qup18"; + drive-strength = <2>; + bias-bus-hold; + }; + + rts-pins { + pins = "gpio69"; + function = "qup18"; + drive-strength = <2>; + bias-disable; + }; + + tx-pins { + pins = "gpio70"; + function = "qup18"; + drive-strength = <2>; + bias-disable; + output-enable; + }; + + rx-pins { + pins = "gpio71"; + function = "qup18"; + drive-strength = <2>; + bias-disable; + output-disable; + }; + }; + qup_i2c0_default: qup-i2c0-default-state { pins = "gpio4", "gpio5"; function = "qup0"; diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index fdb0fae88d1c..b89060a315f0 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -687,6 +687,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, snprintf(config.fwname, sizeof(config.fwname), "qca/msbtfw%02x.mbn", rom_ver); break; + case QCA_QCA6490: case QCA_WCN6855: snprintf(config.fwname, sizeof(config.fwname), "qca/hpbtfw%02x.tlv", rom_ver); @@ -746,6 +747,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, snprintf(config.fwname, sizeof(config.fwname), "qca/msnv%02x.bin", rom_ver); break; + case QCA_QCA6490: case QCA_WCN6855: snprintf(config.fwname, sizeof(config.fwname), "qca/hpnv%02x.bin", rom_ver); @@ -771,6 +773,7 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, case QCA_WCN3991: case QCA_QCA2066: case QCA_QCA6390: + case QCA_QCA6490: case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h index dc31984f71dc..107fe8785316 100644 --- a/drivers/bluetooth/btqca.h +++ b/drivers/bluetooth/btqca.h @@ -150,6 +150,7 @@ enum qca_btsoc_type { QCA_WCN3991, QCA_QCA2066, QCA_QCA6390, + QCA_QCA6490, QCA_WCN6750, QCA_WCN6855, QCA_WCN7850, diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 067e248e3599..b6b98a29a415 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -219,6 +219,7 @@ struct qca_power { struct qca_serdev { struct hci_uart serdev_hu; struct gpio_desc *bt_en; + struct gpio_desc *wl_en; struct gpio_desc *sw_ctrl; struct clk *susclk; enum qca_btsoc_type btsoc_type; @@ -1112,13 +1113,14 @@ static void qca_controller_memdump(struct work_struct *work) * the controller. In such cases let us store the dummy * packets in the buffer. */ - /* For QCA6390, controller does not lost packets but + /* For QCA6(3,4)90, controller does not lost packets but * sequence number field of packet sometimes has error * bits, so skip this checking for missing packet. */ while ((seq_no > qca_memdump->current_seq_no + 1) && - (soc_type != QCA_QCA6390) && - seq_no != QCA_LAST_SEQUENCE_NUM) { + (soc_type != QCA_QCA6390) && + (soc_type != QCA_QCA6490) && + seq_no != QCA_LAST_SEQUENCE_NUM) { bt_dev_err(hu->hdev, "QCA controller missed packet:%d", qca_memdump->current_seq_no); rx_size = qca_memdump->received_dump; @@ -1692,6 +1694,12 @@ static int qca_regulator_init(struct hci_uart *hu) * off the voltage regulator. */ qcadev = serdev_device_get_drvdata(hu->serdev); + + if (!qcadev || !qcadev->bt_power) { + bt_dev_err(hu->hdev, "qcadev or bt_power is NULL"); + return -ENODEV; + } + if (!qcadev->bt_power->vregs_on) { serdev_device_close(hu->serdev); ret = qca_regulator_enable(qcadev); @@ -1725,8 +1733,13 @@ static int qca_regulator_init(struct hci_uart *hu) if (qcadev->bt_en) { gpiod_set_value_cansleep(qcadev->bt_en, 0); msleep(50); + /* For qca6490 also need to enable wlan gpio */ + if (qcadev->wl_en) + gpiod_set_value_cansleep(qcadev->wl_en, 0); gpiod_set_value_cansleep(qcadev->bt_en, 1); msleep(50); + if (qcadev->wl_en) + gpiod_set_value_cansleep(qcadev->wl_en, 1); if (qcadev->sw_ctrl) { sw_ctrl_state = gpiod_get_value_cansleep(qcadev->sw_ctrl); bt_dev_dbg(hu->hdev, "SW_CTRL is %d", sw_ctrl_state); @@ -1788,6 +1801,7 @@ static int qca_power_on(struct hci_dev *hdev) case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6490: ret = qca_regulator_init(hu); break; @@ -1864,6 +1878,10 @@ static int qca_setup(struct hci_uart *hu) soc_name = "wcn7850"; break; + case QCA_QCA6490: + soc_name = "qca6490"; + break; + default: soc_name = "ROME/QCA6390"; } @@ -1886,6 +1904,7 @@ retry: case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6490: // XXX: Is this needed? set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); hci_set_aosp_capable(hdev); @@ -1916,6 +1935,7 @@ retry: case QCA_WCN6750: case QCA_WCN6855: case QCA_WCN7850: + case QCA_QCA6490: // XXX: TEMPORARY break; default: @@ -1965,7 +1985,7 @@ out: } /* Setup bdaddr */ - if (soc_type == QCA_ROME) + if (soc_type == QCA_ROME) // XXX: Test here? hu->hdev->set_bdaddr = qca_set_bdaddr_rome; else hu->hdev->set_bdaddr = qca_set_bdaddr; @@ -2046,6 +2066,20 @@ static const struct qca_device_data qca_soc_data_qca6390 __maybe_unused = { .num_vregs = 0, }; +static const struct qca_device_data qca_soc_data_qca6490 __maybe_unused = { + .soc_type = QCA_QCA6490, // QCA_WCN6855 + /*.vregs = (struct qca_vreg []) { + { "vddio", 1800000 }, + { "vddaon", 950000 }, + { "vdddig", 950000 }, + { "vddrfa1", 1880000 }, + { "vddrfa2", 1350000 }, + { "vddasd", 2800000 }, + },*/ + .num_vregs = 0, + //.capabilities = QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES, +}; + static const struct qca_device_data qca_soc_data_wcn6750 __maybe_unused = { .soc_type = QCA_WCN6750, .vregs = (struct qca_vreg []) { @@ -2300,6 +2334,15 @@ static int qca_serdev_probe(struct serdev_device *serdev) power_ctrl_enabled = false; } + /* QCA6490 needs wlan and bluetooth enabled together */ + qcadev->wl_en = devm_gpiod_get_optional(&serdev->dev, "wlan", + GPIOD_OUT_LOW); + if (IS_ERR_OR_NULL(qcadev->wl_en) && + data->soc_type == QCA_QCA6490) { + dev_err(&serdev->dev, "failed to acquire WL_EN gpio\n"); + power_ctrl_enabled = false; + } + qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl", GPIOD_IN); if (IS_ERR_OR_NULL(qcadev->sw_ctrl) && @@ -2411,7 +2454,8 @@ static void qca_serdev_shutdown(struct device *dev) const u8 ibs_wake_cmd[] = { 0xFD }; const u8 edl_reset_soc_cmd[] = { 0x01, 0x00, 0xFC, 0x01, 0x05 }; - if (qcadev->btsoc_type == QCA_QCA6390) { + if ((qcadev->btsoc_type == QCA_QCA6390) || + (qcadev->btsoc_type == QCA_QCA6490)) { if (test_bit(QCA_BT_OFF, &qca->flags) || !test_bit(HCI_RUNNING, &hdev->flags)) return; @@ -2571,6 +2615,7 @@ static const struct of_device_id qca_bluetooth_of_match[] = { { .compatible = "qcom,qca2066-bt", .data = &qca_soc_data_qca2066}, { .compatible = "qcom,qca6174-bt" }, { .compatible = "qcom,qca6390-bt", .data = &qca_soc_data_qca6390}, + { .compatible = "qcom,qca6490-bt", .data = &qca_soc_data_qca6490}, { .compatible = "qcom,qca9377-bt" }, { .compatible = "qcom,wcn3988-bt", .data = &qca_soc_data_wcn3988}, { .compatible = "qcom,wcn3990-bt", .data = &qca_soc_data_wcn3990}, @@ -2591,6 +2636,7 @@ static const struct acpi_device_id qca_bluetooth_acpi_match[] = { { "DLA16390", (kernel_ulong_t)&qca_soc_data_qca6390 }, { "DLB16390", (kernel_ulong_t)&qca_soc_data_qca6390 }, { "DLB26390", (kernel_ulong_t)&qca_soc_data_qca6390 }, + { "QCOM6490", (kernel_ulong_t)&qca_soc_data_qca6490 }, { }, }; MODULE_DEVICE_TABLE(acpi, qca_bluetooth_acpi_match); diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 4a98a859d44d..8c16b458a562 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -220,6 +220,15 @@ config SYSFB_SIMPLEFB If unsure, say Y. +config SYNA_TCM_FW + tristate "Synaptics TCM Firmware Loader" + depends on RMI4_I2C + help + Say yes here to add support for loading firmware images on Synaptics + TCM on-cell touch controllers. + + If unsure, say N. + config TI_SCI_PROTOCOL tristate "TI System Control Interface (TISCI) Message Protocol" depends on TI_MESSAGE_MANAGER diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile index 5f9dab82e1a0..3b458a198863 100644 --- a/drivers/firmware/Makefile +++ b/drivers/firmware/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_ISCSI_IBFT_FIND) += iscsi_ibft_find.o obj-$(CONFIG_ISCSI_IBFT) += iscsi_ibft.o obj-$(CONFIG_FIRMWARE_MEMMAP) += memmap.o obj-$(CONFIG_MTK_ADSP_IPC) += mtk-adsp-ipc.o +obj-$(CONFIG_SYNA_TCM_FW) += syna_tcm_loader.o obj-$(CONFIG_RASPBERRYPI_FIRMWARE) += raspberrypi.o obj-$(CONFIG_FW_CFG_SYSFS) += qemu_fw_cfg.o obj-$(CONFIG_SYSFB) += sysfb.o diff --git a/drivers/firmware/syna_tcm_loader.c b/drivers/firmware/syna_tcm_loader.c new file mode 100644 index 000000000000..4b36ad5be85d --- /dev/null +++ b/drivers/firmware/syna_tcm_loader.c @@ -0,0 +1,80 @@ +#include +#include +#include +#include + +struct fw_block { + unsigned char *data; + unsigned int size; + unsigned int addr; +}; + +struct tcm_firmware { + struct fw_block boot_cfg; + struct fw_block app_fw; + struct fw_block app_cfg; + struct fw_block disp_cfg; +}; + +enum tcm_mode { + MODE_BL, + MODE_APP, +}; + +static int rmi_is_tcm(struct rmi_device *rmi) { + /* TODO */ + return 0; +} + +static int syna_tcm_switch_mode(struct rmi_device *rmi, enum tcm_mode mode) +{ + unsigned char *response; + unsigned int + int ret; + + mutex_lock(rmi->dev->mutex); + /* TODO */ + mutex_unlock(rmi->dev->mutex); + +} + +static int syna_tcm_fw_load(struct rmi_device *rmi, + const struct tcm_firmware *fw) +{ + int ret; + + ret = syna_tcm_switch_mode(struct rmi_device *rmi, MODE_BL); + if (!ret) { + dev_err(dev, "Failed to switch into bootloader mode: %d\n", ret); + return ret; + } + + /* XXX: Write the 4 fw imgs */ +} + +static int syna_tcm_fw_init(struct rmi_device *rmi) +{ + struct tcm_firmware *fw; + struct device *dev = rmi->dev; + int ret; + + ret = rmi_is_tcm(rmi); + if (ret) { + dev_err(dev, "RMI device is not TCM; aborting fw load: %d\n", ret); + return -ENODEV; + } + + fw = devm_kzalloc(dev, sizeof(*fw), GFP_KERNEL); + if (!fw) + return -ENOMEM; + + ret = syna_tcm_fw_load(rmi, const struct tcm_firmware *fw) +} + +static const struct of_device_id syna_tcm_fw_match { + /* XXX: See if this is actually generic before upstreaming */ + { + .compatible = "syna,tcm-fw-loader", + }, + {}, +}; diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 07e51b16fa41..60455f88274d 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -551,6 +551,14 @@ config DRM_PANEL_SAMSUNG_AMB670YF01 Say Y here if you want to enable support for the Samsung AMB670YF01 DPI 1440x3216 panel found in OnePlus 9 Pro smartphones. +config DRM_PANEL_SAMSUNG_AMB641ZR01 + tristate "Samsung AMB641ZR01 DSI command mode panel" + depends on OF && DRM_MIPI_DSI && BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + help + Say Y here if you want to enable support for the Samsung AMB641ZR01 DPI + 1080x2340 panel found in Samsung Galaxy S21 FE smartphones. + config DRM_PANEL_SAMSUNG_ATNA33XC20 tristate "Samsung ATNA33XC20 eDP panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index c3e206014cdf..f7bbe11ea704 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -53,6 +53,7 @@ obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM692E5) += panel-raydium-rm692e5.o obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMB670YF01) += panel-samsung-amb670yf01.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMB641ZR01) += panel-samsung-amb641zr01.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o diff --git a/drivers/gpu/drm/panel/panel-samsung-amb641zr01.c b/drivers/gpu/drm/panel/panel-samsung-amb641zr01.c new file mode 100644 index 000000000000..58f38f9d757d --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-amb641zr01.c @@ -0,0 +1,478 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Panel driver for the Samsung AMB641ZR01. + * Found in the Samsung Galaxy S21 FE phone. + * + * Copyright (c) 2026 <> + */ + +#include +#include +#include +#include +#include +#include +#include + +#include