From d511f65261e4e9a9c5144265b3a14e4ed5ce4172 Mon Sep 17 00:00:00 2001 From: Arian Date: Sat, 29 Jan 2022 15:53:36 +0100 Subject: [PATCH] arm64: dts: Import renoir device tree Change-Id: I1714cab30cd0cb3160ca344af8cd69e0cd5546be --- arch/arm64/boot/dts/vendor/qcom/Makefile | 2 + .../camera/renoir-sm7350-camera-sensor.dtsi | 508 ++++++++++++++++++ .../dts/vendor/qcom/renoir-audio-overlay.dtsi | 110 ++++ .../boot/dts/vendor/qcom/renoir-pinctrl.dtsi | 244 +++++++++ .../dts/vendor/qcom/renoir-sm7350-overlay.dts | 12 + .../boot/dts/vendor/qcom/renoir-sm7350.dtsi | 163 ++++++ .../dts/vendor/qcom/xiaomi-sm7350-common.dtsi | 284 ++++++++++ 7 files changed, 1323 insertions(+) create mode 100755 arch/arm64/boot/dts/vendor/qcom/camera/renoir-sm7350-camera-sensor.dtsi create mode 100755 arch/arm64/boot/dts/vendor/qcom/renoir-audio-overlay.dtsi create mode 100755 arch/arm64/boot/dts/vendor/qcom/renoir-pinctrl.dtsi create mode 100755 arch/arm64/boot/dts/vendor/qcom/renoir-sm7350-overlay.dts create mode 100755 arch/arm64/boot/dts/vendor/qcom/renoir-sm7350.dtsi create mode 100644 arch/arm64/boot/dts/vendor/qcom/xiaomi-sm7350-common.dtsi diff --git a/arch/arm64/boot/dts/vendor/qcom/Makefile b/arch/arm64/boot/dts/vendor/qcom/Makefile index 351ebb49bafc7..dcb7cafcf489a 100644 --- a/arch/arm64/boot/dts/vendor/qcom/Makefile +++ b/arch/arm64/boot/dts/vendor/qcom/Makefile @@ -208,6 +208,7 @@ endif ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y) dtbo-$(CONFIG_ARCH_SHIMA) += \ + renoir-sm7350-overlay.dtbo \ shima-rumi-overlay.dtbo \ shima-idp-overlay.dtbo \ shima-idp-120fps-overlay.dtbo \ @@ -216,6 +217,7 @@ dtbo-$(CONFIG_ARCH_SHIMA) += \ shima-idps-digital-mics-overlay.dtbo \ shima-idps-digital-mics-120fps-overlay.dtbo +renoir-sm7350-overlay.dtbo-base := shima.dtb shima-rumi-overlay.dtbo-base := shima.dtb shima-idp-overlay.dtbo-base := shima.dtb shima-idp-120fps-overlay.dtbo-base := shima.dtb diff --git a/arch/arm64/boot/dts/vendor/qcom/camera/renoir-sm7350-camera-sensor.dtsi b/arch/arm64/boot/dts/vendor/qcom/camera/renoir-sm7350-camera-sensor.dtsi new file mode 100755 index 0000000000000..41491b60f6006 --- /dev/null +++ b/arch/arm64/boot/dts/vendor/qcom/camera/renoir-sm7350-camera-sensor.dtsi @@ -0,0 +1,508 @@ +#include + +&pm8008i_l2 { + regulator-min-microvolt = <264000>; + regulator-max-microvolt = <1200000>; +}; + +&pm8350c_switch0 { + qcom,led-mask = <1>; /* Channels 1*/ +}; + +&tlmm { + + cam_sensor_active_wide_rst: cam_sensor_active_wide_rst { + /* RESET WIDE */ + mux { + pins = "gpio117"; + function = "gpio"; + }; + + config { + pins = "gpio117"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + cam_sensor_suspend_wide_rst: cam_sensor_suspend_wide_rst { + /* RESET WIDE */ + mux { + pins = "gpio117"; + function = "gpio"; + }; + + config { + pins = "gpio117"; + bias-pull-down; /* PULL DOWN */ + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + renoir_cam_sensor_active_macro: renoir_cam_sensor_active_macro { + /* RESET MACRO */ + mux { + pins = "gpio116"; + function = "gpio"; + }; + + config { + pins = "gpio116"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + renoir_cam_sensor_suspend_macro: renoir_cam_sensor_suspend_macro { + /* RESET MACRO */ + mux { + pins = "gpio116"; + function = "gpio"; + }; + + config { + pins = "gpio116"; + bias-pull-down; /* PULL DOWN */ + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + renoir_cam_sensor_active_ultra: renoir_cam_sensor_active_ultra { + /* RESET ULTRA WIDE */ + mux { + pins = "gpio119"; + function = "gpio"; + }; + + config { + pins = "gpio119"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + renoir_cam_sensor_suspend_ultra: renoir_cam_sensor_suspend_ultra { + /* RESET ULTRA WIDE */ + mux { + pins = "gpio119"; + function = "gpio"; + }; + + config { + pins = "gpio119"; + bias-pull-down; /* PULL DOWN */ + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + // Front Camera + + renoir_camera_front_active_vana: renoir_camera_front_active_vana { + /* FRONT VANA LDO ENABLE */ + mux { + pins = "gpio176"; + function = "gpio"; + }; + + config { + pins = "gpio176"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + renoir_camera_front_suspend_vana: renoir_camera_front_suspend_vana { + /* FRONT VANA LDO DISABLE */ + mux { + pins = "gpio176"; + function = "gpio"; + }; + + config { + pins = "gpio176"; + bias-pull-down; /* PULL DOWN */ + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + renoir_camera_front_active_vdig: renoir_camera_front_active_vdig { + /* FRONT VDIG LDO ENABLE */ + mux { + pins = "gpio177"; + function = "gpio"; + }; + + config { + pins = "gpio177"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + renoir_camera_front_suspend_vdig: renoir_camera_front_suspend_vdig { + /* FRONT VDIG LDO DISABLE */ + mux { + pins = "gpio177"; + function = "gpio"; + }; + + config { + pins = "gpio177"; + bias-pull-down; /* PULL DOWN */ + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + cam_sensor_active_front_rst: cam_sensor_active_front_rst { + /* RESET FRONT ENABLE*/ + mux { + pins = "gpio126"; + function = "gpio"; + }; + + config { + pins = "gpio126"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; + }; + + cam_sensor_suspend_front_rst: cam_sensor_suspend_front_rst { + /* RESET WIDE ENABLE*/ + mux { + pins = "gpio126"; + function = "gpio"; + }; + + config { + pins = "gpio126"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; +}; + +&cam_sensor_mclk0_active { + /* MCLK0 */ + config { + pins = "gpio100"; + bias-disable; /* No PULL */ + drive-strength = <2>; /* 2 MA */ + }; +}; + +&soc { + led_flash_wide: qcom,camera-flash@0 { + cell-index = <0>; + compatible = "qcom,camera-flash"; + flash-source = <&pm8350c_flash0>; + torch-source = <&pm8350c_torch0>; + switch-source = <&pm8350c_switch0>; + status = "ok"; + }; + + led_flash_ultra: qcom,camera-flash@1 { + cell-index = <1>; + compatible = "qcom,camera-flash"; + flash-source = <&pm8350c_flash0>; + torch-source = <&pm8350c_torch0>; + switch-source = <&pm8350c_switch0>; + status = "ok"; + }; + + led_flash_macro: qcom,camera-flash@2 { + cell-index = <2>; + compatible = "qcom,camera-flash"; + flash-source = <&pm8350c_flash0>; + torch-source = <&pm8350c_torch0>; + switch-source = <&pm8350c_switch0>; + status = "ok"; + }; + + camera_front_vana_ldo: gpio-regulator@0 { + compatible = "regulator-fixed"; + reg = <0x00 0x00>; + regulator-name = "camera_front_vana_ldo"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-enable-ramp-delay = <135>; + enable-active-high; + gpio = <&tlmm 176 0>; + //pinctrl-names = "default", "suspend"; + //pinctrl-0 = <&renoir_camera_front_active_vana>; + //pinctrl-1 = <&renoir_camera_front_suspend_vana>; + }; + + camera_front_vdig_ldo: gpio-regulator@1 { + compatible = "regulator-fixed"; + reg = <0x01 0x00>; + regulator-name = "camera_front_vdig_ldo"; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + regulator-enable-ramp-delay = <135>; + enable-active-high; + gpio = <&tlmm 177 0>; + //pinctrl-names = "default", "suspend"; + //pinctrl-0 = <&renoir_camera_front_active_vdig>; + //pinctrl-1 = <&renoir_camera_front_suspend_vdig>; + //vin-supply = <&S12B>; + }; + + qcom,cam-res-mgr { + compatible = "qcom,cam-res-mgr"; + status = "ok"; + }; +}; + +&cam_cci0 { + + + actuator_wide: qcom,actuator0 { + cell-index = <0>; + compatible = "qcom,actuator"; + cci-master = <1>; + cam_vaf-supply = <&L3I>; + regulator-names = "cam_vaf"; + rgltr-cntrl-support; + rgltr-min-voltage = <2800000>; + rgltr-max-voltage = <2800000>; + rgltr-load-current = <300000>; + status = "ok"; + }; + + eeprom_wide: qcom,eeprom0 { + cell-index = <0>; + compatible = "qcom,eeprom"; + cci-master = <1>; + cam_vio-supply = <&L5I>; + regulator-names = "cam_vio"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000>; + rgltr-max-voltage = <1800000>; + rgltr-load-current = <5000>; + }; + + // wide camera + qcom,cam-sensor0 { + cell-index = <0>; + compatible = "qcom,cam-sensor"; + csiphy-sd-index = <1>; + sensor-position-roll = <90>; + sensor-position-pitch = <0>; + sensor-position-yaw = <180>; + eeprom-src = <&eeprom_wide>; + actuator-src = <&actuator_wide>; + led-flash-src = <&led_flash_wide>; + cam_vio-supply = <&L5I>; + cam_vdig-supply = <&L1I>; + cam_vana-supply = <&L6I>; + cam_vaf-supply = <&L3I>; + cam_clk-supply = <&cam_cc_titan_top_gdsc>; + regulator-names = "cam_vio", "cam_vdig", "cam_vana", "cam_vaf", + "cam_clk"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000 1056000 2800000 2800000 0>; + rgltr-max-voltage = <1800000 1056000 2800000 2800000 0>; + rgltr-load-current = <10000 140000 280000 280000 0>; + gpio-no-mux = <0>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk1_active + &cam_sensor_active_wide_rst>; + pinctrl-1 = <&cam_sensor_mclk1_suspend + &cam_sensor_suspend_wide_rst>; + gpios = <&tlmm 101 0>, + <&tlmm 117 0>; + gpio-reset = <1>; + gpio-req-tbl-num = <0 1>; + gpio-req-tbl-flags = <1 0>; + gpio-req-tbl-label = "CAMIF_MCLK1", + "CAM_RESET1"; + cci-master = <1>; + clocks = <&camcc CAM_CC_MCLK1_CLK>; + clock-names = "cam_clk"; + clock-cntl-level = "nominal"; + clock-rates = <19200000>; + status = "ok"; + }; + + // front camera + eeprom_front: qcom,eeprom1 { + cell-index = <1>; + compatible = "qcom,eeprom"; + cci-master = <0>; + cam_vio-supply = <&L5I>; + regulator-names = "cam_vio"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000>; + rgltr-max-voltage = <1800000>; + rgltr-load-current = <5000>; + }; + + qcom,cam-sensor1 { + cell-index = <1>; + compatible = "qcom,cam-sensor"; + csiphy-sd-index = <5>; + sensor-position-roll = <270>; + sensor-position-pitch = <0>; + sensor-position-yaw = <0>; + eeprom-src = <&eeprom_front>; + cam_vio-supply = <&L5I>; + cam_vdig-supply = <&camera_front_vdig_ldo>; + cam_vana-supply = <&camera_front_vana_ldo>; + cam_clk-supply = <&cam_cc_titan_top_gdsc>; + regulator-names = "cam_vio", "cam_vdig", "cam_vana", + "cam_clk"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000 1050000 2800000 0>; + rgltr-max-voltage = <1800000 1050000 2800000 0>; + rgltr-load-current = <10000 140000 280000 0>; + gpio-no-mux = <0>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk0_active + &cam_sensor_active_front_rst>; + pinctrl-1 = <&cam_sensor_mclk0_suspend + &cam_sensor_suspend_front_rst>; + gpios = <&tlmm 100 0>, + <&tlmm 126 0>; + gpio-reset = <1>; + gpio-req-tbl-num = <0 1>; + gpio-req-tbl-flags = <1 0>; + gpio-req-tbl-label = "CAMIF_MCLK0", + "CAM_RESET0"; + cci-master = <0>; + clocks = <&camcc CAM_CC_MCLK0_CLK>; + clock-names = "cam_clk"; + clock-cntl-level = "nominal"; + clock-rates = <19200000>; + status = "ok"; + }; + +}; + +&cam_cci1 { + /* 5M macro actuator */ + actuator_macro: qcom,actuator2 { + cell-index = <2>; + compatible = "qcom,actuator"; + cci-master = <0>; + cam_vaf-supply = <&L3I>; + regulator-names = "cam_vaf"; + rgltr-cntrl-support; + rgltr-min-voltage = <2800000>; + rgltr-max-voltage = <2800000>; + rgltr-load-current = <10000>; + }; + + /* 5M macro eeprom */ + eeprom_macro: qcom,eeprom2 { + cell-index = <2>; + compatible = "qcom,eeprom"; + cci-master = <0>; + cam_vio-supply = <&L5I>; + regulator-names = "cam_vio"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000>; + rgltr-max-voltage = <1800000>; + rgltr-load-current = <5000>; + }; + + /* 8M ultra wide eeprom */ + eeprom_ultra_wide: qcom,eeprom3 { + cell-index = <3>; + compatible = "qcom,eeprom"; + cci-master = <1>; + cam_vio-supply = <&L5I>; + regulator-names = "cam_vio"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000>; + rgltr-max-voltage = <1800000>; + rgltr-load-current = <5000>; + }; + + /* 5M macro sensor */ + qcom,cam-sensor2 { + cell-index = <2>; + compatible = "qcom,cam-sensor"; + csiphy-sd-index = <0>; + sensor-position-roll = <90>; + sensor-position-pitch = <0>; + sensor-position-yaw = <180>; + eeprom-src = <&eeprom_macro>; + actuator-src = <&actuator_macro>; + led-flash-src = <&led_flash_macro>; + cam_vio-supply = <&L5I>; + cam_vana-supply = <&L4I>; + cam_vdig-supply = <&L2I>; + cam_clk-supply = <&cam_cc_titan_top_gdsc>; + regulator-names = "cam_vio", "cam_vana", "cam_vdig","cam_clk"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000 2800000 1200000 0>; + rgltr-max-voltage = <1800000 2800000 1200000 0>; + rgltr-load-current = <5000 68000 805000 0>; + gpio-no-mux = <0>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk4_active + &renoir_cam_sensor_active_macro>; + pinctrl-1 = <&cam_sensor_mclk4_suspend + &renoir_cam_sensor_suspend_macro>; + gpios = <&tlmm 104 0>, + <&tlmm 116 0>; + gpio-reset = <1>; + gpio-req-tbl-num = <0 1>; + gpio-req-tbl-flags = <1 0>; + gpio-req-tbl-label = "CAMIF_MCLK4", + "CAM_RESET4"; + cci-master = <0>; + status = "ok"; + clocks = <&camcc CAM_CC_MCLK4_CLK>; + clock-names = "cam_clk"; + clock-cntl-level = "nominal"; + clock-rates = <19200000>; + }; + + /* 8M ultra wide sensor */ + qcom,cam-sensor3 { + cell-index = <3>; + compatible = "qcom,cam-sensor"; + csiphy-sd-index = <3>; + sensor-position-roll = <90>; + sensor-position-pitch = <0>; + sensor-position-yaw = <180>; + eeprom-src = <&eeprom_ultra_wide>; + led-flash-src = <&led_flash_ultra>; + cam_vio-supply = <&L5I>; + cam_vana-supply = <&L7I>; + cam_vdig-supply = <&L2I>; + cam_clk-supply = <&cam_cc_titan_top_gdsc>; + regulator-names = "cam_vio", "cam_vana", "cam_vdig","cam_clk"; + rgltr-cntrl-support; + rgltr-min-voltage = <1800000 2704000 1200000 0>; + rgltr-max-voltage = <1800000 2704000 1200000 0>; + rgltr-load-current = <5000 68000 805000 0>; + gpio-no-mux = <0>; + pinctrl-names = "cam_default", "cam_suspend"; + pinctrl-0 = <&cam_sensor_mclk2_active + &renoir_cam_sensor_active_ultra>; + pinctrl-1 = <&cam_sensor_mclk2_suspend + &renoir_cam_sensor_suspend_ultra>; + gpios = <&tlmm 102 0>, + <&tlmm 119 0>; + gpio-reset = <1>; + gpio-req-tbl-num = <0 1>; + gpio-req-tbl-flags = <1 0>; + gpio-req-tbl-label = "CAMIF_MCLK2", + "CAM_RESET2"; + cci-master = <1>; + status = "ok"; + clocks = <&camcc CAM_CC_MCLK2_CLK>; + clock-names = "cam_clk"; + clock-cntl-level = "nominal"; + clock-rates = <19200000>; + }; +}; diff --git a/arch/arm64/boot/dts/vendor/qcom/renoir-audio-overlay.dtsi b/arch/arm64/boot/dts/vendor/qcom/renoir-audio-overlay.dtsi new file mode 100755 index 0000000000000..61237d3a9053f --- /dev/null +++ b/arch/arm64/boot/dts/vendor/qcom/renoir-audio-overlay.dtsi @@ -0,0 +1,110 @@ +#include "shima-audio-overlay.dtsi" + +&dai_mi2s2 { + qcom,msm-mi2s-rx-lines = <2>; + qcom,msm-mi2s-tx-lines = <1>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&tert_mi2s_sck_active &tert_mi2s_ws_active + &tert_mi2s_sd0_active &tert_mi2s_sd1_active>; + pinctrl-1 = <&tert_mi2s_sck_sleep &tert_mi2s_ws_sleep + &tert_mi2s_sd0_sleep &tert_mi2s_sd1_sleep>; +}; + +&shima_snd { + qcom,model = "lahaina-shimaidp-snd-card"; + qcom,msm-mi2s-master = <1>, <1>, <1>, <1>, <1>, <1>; + qcom,wcn-bt = <1>; + qcom,mi2s-audio-intf = <1>; + qcom,auxpcm-audio-intf = <1>; + qcom,ext-disp-audio-rx = <0>; + qcom,afe-rxtx-lb = <0>; + qcom,audio-routing = + "AMIC1", "Analog Mic1", + "Analog Mic1", "MIC BIAS1", + "AMIC2", "Analog Mic2", + "Analog Mic2", "MIC BIAS2", + "AMIC3", "Analog Mic3", + "Analog Mic3", "MIC BIAS3", + "AMIC4", "Analog Mic4", + "Analog Mic4", "MIC BIAS3", + "AMIC5", "Analog Mic5", + "Analog Mic5", "MIC BIAS3", + "TX DMIC0", "Digital Mic0", + "Digital Mic0", "MIC BIAS3", + "TX DMIC1", "Digital Mic1", + "Digital Mic1", "MIC BIAS3", + "TX DMIC2", "Digital Mic2", + "Digital Mic2", "MIC BIAS1", + "TX DMIC3", "Digital Mic3", + "Digital Mic3", "MIC BIAS1", + "TX DMIC4", "Digital Mic4", + "Digital Mic4", "MIC BIAS4", + "TX DMIC5", "Digital Mic5", + "Digital Mic5", "MIC BIAS4", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "IN3_AUX", "AUX_OUT", + "RX_TX DEC0_INP", "TX DEC0 MUX", + "RX_TX DEC1_INP", "TX DEC1 MUX", + "RX_TX DEC2_INP", "TX DEC2 MUX", + "RX_TX DEC3_INP", "TX DEC3 MUX", + "TX SWR_INPUT", "WCD_TX_OUTPUT", + "VA SWR_INPUT", "VA_SWR_CLK", + "VA SWR_INPUT", "WCD_TX_OUTPUT", + "VA_AIF1 CAP", "VA_SWR_CLK", + "VA_AIF2 CAP", "VA_SWR_CLK", + "VA_AIF3 CAP", "VA_SWR_CLK"; + + qcom,msm-mbhc-hphl-swh = <0>; + qcom,msm-mbhc-gnd-swh = <0>; + qcom,wsa-max-devs = <0>; + qcom,swr-dmic-max-devs = <0>; + qcom,msm-mbhc-usbc-audio-supported = <1>; + qcom,uart-audio-sw-gpio = <&sbu_uart_en>; +}; + +&wcd938x_rst_gpio { + compatible = "qcom,msm-cdc-pinctrl"; + pinctrl-names = "aud_active", "aud_sleep"; + pinctrl-0 = <&wcd938x_reset_pin_active>; + pinctrl-1 = <&wcd938x_reset_pin_sleep>; +}; + +&wsa_swr_gpios { + status = "disabled"; +}; + +&wsa_spkr_en1 { + status = "disabled"; +}; + +&wsa_spkr_en2 { + status = "disabled"; +}; + +&bolero { + qcom,num-macros = <3>; +}; + +&wsa_macro { + compatible = "qcom,wsa-macro"; + status = "disabled"; +}; + +&soc { + sbu_uart_en: msm_cdc_pinctrl@6 { + compatible = "qcom,msm-cdc-pinctrl"; + pinctrl-names = "aud_active", "aud_sleep"; + pinctrl-0 = <&sbu_uart_en_active>; + pinctrl-1 = <&sbu_uart_en_idle>; + #gpio-cells = <0>; + }; +}; + +&wcd938x_codec { + qcom,cdc-micbias1-mv = <2750>; + qcom,cdc-micbias2-mv = <2750>; + qcom,cdc-micbias3-mv = <2750>; + qcom,cdc-micbias4-mv = <2750>; +}; + diff --git a/arch/arm64/boot/dts/vendor/qcom/renoir-pinctrl.dtsi b/arch/arm64/boot/dts/vendor/qcom/renoir-pinctrl.dtsi new file mode 100755 index 0000000000000..97a635290b6fc --- /dev/null +++ b/arch/arm64/boot/dts/vendor/qcom/renoir-pinctrl.dtsi @@ -0,0 +1,244 @@ +/*for renoir pinctrl */ + +&sde_dsi_active { + mux { + pins = "gpio16"; + function = "gpio"; + }; + + config { + pins = "gpio16"; + drive-strength = <8>; /* 8 mA */ + bias-disable = <0>; /* no pull */ + }; +}; + +&sde_dsi_suspend { + mux { + pins = "gpio16"; + function = "gpio"; + }; + + config { + pins = "gpio16"; + drive-strength = <2>; /* 2 mA */ + bias-pull-down; /* PULL DOWN */ + }; +}; + +&tlmm { + sbu_uart_en_ctrl { + sbu_uart_en_idle: uart_audio_en_idle { + mux { + pins = "gpio6"; + function = "gpio"; + }; + config { + pins = "gpio6"; + drive-strength = <2>; + bias-pull-down; + output-low; + }; + }; + + sbu_uart_en_active: uart_audio_en_active { + mux { + pins = "gpio6"; + function = "gpio"; + }; + config { + pins = "gpio6"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + }; + + /* WCD reset pin */ + wcd938x_reset_pin_active: wcd938x_reset_active { + mux { + pins = "gpio132"; + function = "gpio"; + }; + + config { + pins = "gpio132"; + drive-strength = <16>; + output-high; + }; + }; + + wcd938x_reset_pin_sleep: wcd938x_reset_sleep { + mux { + pins = "gpio132"; + function = "gpio"; + }; + + config { + pins = "gpio132"; + drive-strength = <16>; + bias-disable; + output-low; + }; + }; + + smartpa_enable_active: smartpa_enable_active { + /* active state */ + mux { + /* GPIO 15 rst pin */ + pins = "gpio15"; + function = "gpio"; + }; + + config { + pins = "gpio15"; + drive-strength = <2>; + bias-disable; + bias-pull-down; + output-low; + }; + }; + + smartpa_enable_suspend: smartpa_enable_suspend { + /* sleep state */ + mux { + /* GPIO 15 rst pin */ + pins = "gpio15"; + function = "gpio"; + }; + + config { + pins = "gpio15"; + drive-strength = <2>; + bias-disable; + bias-pull-down; + output-low; + }; + }; + + smartpa_top_int_active: smartpa_top_int_active { + /* active state */ + mux { + /* GPIO 47 Interrupt */ + pins = "gpio47"; + function = "gpio"; + }; + + config { + pins = "gpio47"; + drive-strength = <2>; /* 2 MA */ + bias-pull-up; + input-enable; + }; + }; + + smartpa_top_int_suspend: smartpa_top_int_suspend { + /* sleep state */ + mux { + /* GPIO 47 Interrupt */ + pins = "gpio47"; + function = "gpio"; + }; + + config { + pins = "gpio47"; + drive-strength = <2>; /* 2 MA */ + bias-pull-up; + input-enable; + }; + }; + + smartpa_bot_int_active: smartpa_bot_int_active { + /* active state */ + mux { + /* GPIO 84 Interrupt */ + pins = "gpio84"; + function = "gpio"; + }; + + config { + pins = "gpio84"; + drive-strength = <2>; /* 2 MA */ + bias-pull-up; + input-enable; + }; + }; + + smartpa_bot_int_suspend: smartpa_bot_int_suspend { + /* sleep state */ + mux { + /* GPIO 84 Interrupt */ + pins = "gpio84"; + function = "gpio"; + }; + + config { + pins = "gpio84"; + drive-strength = <2>; /* 2 MA */ + bias-pull-up; + input-enable; + }; + }; + + /* speaker switch */ + spk_sw_active: spk_sw_active { + mux { + pins = "gpio24"; + function = "gpio"; + }; + + config { + pins = "gpio24"; + drive-strength = <2>; + bias-disable; + bias-pull-down; + output-low; + }; + }; + + spk_sw_inactive: spk_sw_inactive { + mux { + pins = "gpio24"; + function = "gpio"; + }; + + config { + pins = "gpio24"; + drive-strength = <2>; + bias-disable; + bias-pull-down; + output-low; + }; + }; + + md_mode_ctrl_irq { + ant2_ctrl_irq: ant2_ctrl_irq { + mux { + pins = "gpio11"; + function = "gpio"; + }; + + config { + pins = "gpio11"; + drive-strength = <2>; + bias-disable; + input-enable; + }; + }; + + ant5_ctrl_irq: ant5_ctrl_irq { + mux { + pins = "gpio14"; + function = "gpio"; + }; + + config { + pins = "gpio14"; + drive-strength = <2>; + bias-disable; + input-enable; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/vendor/qcom/renoir-sm7350-overlay.dts b/arch/arm64/boot/dts/vendor/qcom/renoir-sm7350-overlay.dts new file mode 100755 index 0000000000000..67c53234a2a18 --- /dev/null +++ b/arch/arm64/boot/dts/vendor/qcom/renoir-sm7350-overlay.dts @@ -0,0 +1,12 @@ +/dts-v1/; +/plugin/; + +#include "renoir-sm7350.dtsi" + +/ { + model = "Renoir based on Qualcomm Technologies, Inc SM7350"; + compatible = "qcom,shima-idp", "qcom,shima", "qcom,idp"; + qcom,msm-id = <450 0x10000>; + qcom,board-id = <34 0>; + xiaomi,board-id = <6 0>; +}; diff --git a/arch/arm64/boot/dts/vendor/qcom/renoir-sm7350.dtsi b/arch/arm64/boot/dts/vendor/qcom/renoir-sm7350.dtsi new file mode 100755 index 0000000000000..5987213fe24af --- /dev/null +++ b/arch/arm64/boot/dts/vendor/qcom/renoir-sm7350.dtsi @@ -0,0 +1,163 @@ +/* +this file is for attribution only of renoir +And public attribution of xiaomi platforms(like K9 and so and) +*/ + +#include "renoir-pinctrl.dtsi" +#include "xiaomi-sm7350-common.dtsi" +#include "renoir-audio-overlay.dtsi" +#include "camera/renoir-sm7350-camera-sensor.dtsi" + +&qupv3_se1_i2c { + status = "ok"; + tfa98xx_1@34 { + compatible = "tfa,tfa98xx"; + reset-gpio = <&tlmm 15 0>; + irq-gpio = <&tlmm 47 0>; + spk-sw-gpio = <&tlmm 24 0>; + interrupt-parent = <&tlmm>; + interrupts = <47 0>; + interrupt-names = "smartpa_irq"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&smartpa_top_int_active &smartpa_enable_active &spk_sw_active>; + pinctrl-1 = <&smartpa_top_int_suspend &smartpa_enable_suspend &spk_sw_inactive>; + reg = <0x34>; + status = "ok"; + }; + tfa98xx_2@35 { + compatible = "tfa,tfa98xx"; + irq-gpio = <&tlmm 84 0>; + interrupt-parent = <&tlmm>; + interrupts = <84 0>; + interrupt-names = "smartpa_irq"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&smartpa_bot_int_active>; + pinctrl-1 = <&smartpa_bot_int_suspend>; + reg = <0x35>; + status = "ok"; + }; +}; + +&qupv3_se10_spi { + status = "ok"; + qcom,rt; + xiaomi_k9_touch@0{ + compatible = "xiaomi,k9-spi"; + reg = <0>; + spi-max-frequency = <6000000>; + interrupt-parent = <&tlmm>; + interrupts = <31 0x2008>; + + goodix,avdd-name = "avdd"; + goodix,iovdd-name = "iovdd"; + focaltech,avdd-name = "avdd"; + focaltech,iovdd-name = "iovdd"; + avdd-supply = <&L7C>; + iovdd-supply = <&L2C>; + + goodix,reset-gpio = <&tlmm 30 0x00>; + goodix,irq-gpio = <&tlmm 31 0x2800>; + goodix,irq-flags = <2>; + goodix,panel-max-x = <1080>; + goodix,panel-max-y = <2400>; + goodix,panel-max-w = <255>; + goodix,panel-max-p = <4096>; + + /*pinctrl-names = "pmx_ts_active", "pmx_ts_suspend", "pmx_ts_release";*/ + /*pinctrl-0 = <&mi_ts_active>;*/ + /*pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;*/ + /*pinctrl-2 = <&ts_release>;*/ + /*vdd-supply = <&touch_avdd_vreg>;*/ + /*vcc_i2c-supply = <&L2C>;*/ + focaltech,reset-gpio = <&tlmm 30 0x00>; + focaltech,irq-gpio = <&tlmm 31 0x2008>; + focaltech,max-touch-number = <10>; + focaltech,display-coords = <0 0 1080 2400>; + focaltech,open-min = <3000>; + }; +}; + +&pm8350c_rgb { + status = "disabled"; +}; + +&L3C { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + qcom,init-voltage = <3300000>; +}; + +&soc { + fingerprint_fpc { + status = "ok"; + compatible = "fpc,fpc1020"; + interrupt-parent = <&tlmm>; + interrupts = <38 0x0>; + fpc,gpio_rst = <&tlmm 39 0x0>; + fpc,gpio_irq = <&tlmm 38 0x0>; + fp_vdd_vreg-supply = <&L3C>; + pinctrl-names = "fpc1020_reset_reset", + "fpc1020_reset_active", + "fpc1020_irq_active"; + pinctrl-0 = <&msm_gpio_reset>; + pinctrl-1 = <&msm_gpio_reset_output_high>; + pinctrl-2 = <&msm_gpio_irq>; + }; + + md_testing_mode { + compatible = "modem,md-testing-mode"; + status-gpio = <&tlmm 11 0x00>, + <&tlmm 14 0x00>; + debounce-time = <30>; + pinctrl-names = "default"; + pinctrl-0 = <&ant2_ctrl_irq &ant5_ctrl_irq>; + }; +}; + +&usb2_phy0 { + qcom,param-override-seq = + <0xe7 0x6c /* override_x0 */ + 0x07 0x70 /* override_x1 */ + 0x17 0x74>; /* override x2 */ +}; + +&tlmm { + /* FP_RESET_N */ + msm_gpio_reset: msm_gpio_reset { + mux { + pins = "gpio39"; + function = "gpio"; + }; + config { + pins = "gpio39"; + drive-strength = <2>; + bias-disable; + output-low; + }; + }; + /* FP_RESET_N, state device active*/ + msm_gpio_reset_output_high: msm_gpio_reset_output_high { + mux { + pins = "gpio39"; + function = "gpio"; + }; + config { + pins = "gpio39"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + /* FP_INT_N */ + msm_gpio_irq: msm_gpio_irq { + mux { + pins = "gpio38"; + function = "gpio"; + }; + config { + pins = "gpio38"; + drive-strength = <2>; + bias-pull-down; + }; + }; +}; diff --git a/arch/arm64/boot/dts/vendor/qcom/xiaomi-sm7350-common.dtsi b/arch/arm64/boot/dts/vendor/qcom/xiaomi-sm7350-common.dtsi new file mode 100644 index 0000000000000..2452d9f030f99 --- /dev/null +++ b/arch/arm64/boot/dts/vendor/qcom/xiaomi-sm7350-common.dtsi @@ -0,0 +1,284 @@ +#include +#include +#include "shima-pmic-overlay.dtsi" +#include "display/shima-sde-display-idp.dtsi" +#include "shima-thermal-overlay.dtsi" + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; + + xiaomi_touch { + compatible = "xiaomi-touch"; + status = "ok"; + touch,name = "xiaomi-touch"; + }; + + thermal_message: thermal-message { + board-sensor = "VIRTUAL-SENSOR"; + }; +}; + +&qupv3_se9_i2c { + status = "ok"; + qcom,clk-freq-out = <1000000>; + #address-cells = <1>; + #size-cells = <0>; + nq@28 { + compatible = "qcom,sn-nci"; + reg = <0x28>; + qcom,sn-irq = <&tlmm 87 0x00>; + qcom,sn-ven = <&tlmm 62 0x00>; + qcom,sn-firm = <&tlmm 86 0x00>; + qcom,sn-clkreq = <&tlmm 63 0x00>; + interrupt-parent = <&tlmm>; + interrupts = <87 0>; + interrupt-names = "nfc_irq"; + pinctrl-names = "nfc_active", "nfc_suspend"; + pinctrl-0 = <&nfc_int_active &nfc_enable_active>; + pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; + }; +}; + +&qupv3_se14_spi { + status = "ok"; + ir-spi@0 { + compatible = "ir-spi"; + reg = <0>; + spi-max-frequency = <19200000>; + status = "ok"; + }; +}; + +&sdhc_1 { + status = "ok"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc1_on>; + pinctrl-1 = <&sdc1_off>; + + vdd-supply = <&L7B>; + qcom,vdd-voltage-level = <2960000 2960000>; + qcom,vdd-current-level = <0 570000>; + + vdd-io-supply = <&S10B>; + qcom,vdd-io-always-on; + qcom,vdd-io-lpm-sup; + qcom,vdd-io-voltage-level = <1800000 1800000>; + qcom,vdd-io-current-level = <0 325000>; +}; + +&sdhc_2 { + status = "ok"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_on>; + pinctrl-1 = <&sdc2_off>; + + vdd-supply = <&L9C>; + qcom,vdd-voltage-level = <2960000 2960000>; + qcom,vdd-current-level = <0 800000>; + + vdd-io-supply = <&L6C>; + qcom,vdd-io-voltage-level = <1800000 2960000>; + qcom,vdd-io-current-level = <0 30000>; + + cd-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; +}; + +&ufsphy_mem { + compatible = "qcom,ufs-phy-qmp-v4-lahaina"; + + vdda-phy-supply = <&L10C>; + vdda-pll-supply = <&L6B>; + vdda-phy-max-microamp = <97100>; + vdda-pll-max-microamp = <19600>; + + status = "ok"; +}; + +&ufshc_mem { + vdd-hba-supply = <&gcc_ufs_phy_gdsc>; + vdd-hba-fixed-regulator; + + vcc-supply = <&L7B>; + vcc-voltage-level = <2504000 2960000>; + vcc-low-voltage-sup; + vcc-max-microamp = <800000>; + + vccq-supply = <&L9B>; + vccq-max-microamp = <900000>; + vccq-min-microamp = <10000>; + + vccq2-supply = <&S10B>; + vccq2-voltage-level = <1800000 1800000>; + vccq2-max-microamp = <800000>; + + qcom,vddp-ref-clk-supply = <&L9B>; + qcom,vddp-ref-clk-max-microamp = <10000>; + + status = "ok"; +}; + +&spmi_debug_bus { + status = "ok"; +}; + +&spmi_glink_debug { + status = "ok"; +}; + +&pm8350b_haptics { + status = "ok"; +}; + +&pm8350c_switch0 { + qcom,led-mask = <9>; /* Channels 1 & 4 */ + qcom,symmetry-en; +}; + +&pm8350c_switch1 { + qcom,led-mask = <6>; /* Channels 2 & 3 */ + qcom,symmetry-en; +}; + +&pm8350c_switch2 { + qcom,led-mask = <15>; /* All Channels */ + qcom,symmetry-en; +}; + +&pm8350c_flash { + status = "ok"; +}; + +&pm8350b_amoled_ecm { + display-panels = <&dsi_r66451_amoled_cmd + &dsi_r66451_amoled_video + &dsi_r66451_amoled_60hz_video + &dsi_r66451_amoled_60hz_cmd + &dsi_r66451_amoled_144hz_cmd>; +}; + +&usb0 { + dwc3@a600000 { + usb-phy = <&usb2_phy0>, <&usb_nop_phy>; + maximum-speed = "high-speed"; + }; +}; + +&usb_qmp_dp_phy { + status = "disabled"; +}; + +&battery_charger { + qcom,thermal-mitigation = <3000000 1500000 1000000 500000>; + qcom,wireless-fw-name = "idt9412.bin"; +}; + +&qupv3_se10_i2c { + #address-cells = <1>; + #size-cells = <0>; + + status = "disabled"; + qcom,i2c-touch-active = "focaltech,fts_ts"; + + focaltech@38 { + compatible = "focaltech,fts_ts"; + reg = <0x38>; + interrupt-parent = <&tlmm>; + interrupts = <23 0x2008>; + focaltech,reset-gpio = <&tlmm 22 0x00>; + focaltech,irq-gpio = <&tlmm 23 0x2008>; + focaltech,max-touch-number = <5>; + focaltech,display-coords = <0 0 1080 2340>; + + vdd-supply = <&L3C>; + + pinctrl-names = "pmx_ts_active", "pmx_ts_suspend","pmx_ts_release"; + pinctrl-0 = <&ts_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + pinctrl-2 = <&ts_release>; + + panel = <&dsi_r66451_amoled_cmd + &dsi_r66451_amoled_video + &dsi_r66451_amoled_60hz_video + &dsi_r66451_amoled_60hz_cmd + &dsi_r66451_amoled_144hz_cmd + &dsi_r66451_amoled_video_cphy + &dsi_r66451_amoled_cmd_cphy>; + + focaltech,trusted-touch-mode = "vm_mode"; + focaltech,touch-environment = "pvm"; + focaltech,trusted-touch-spi-irq = <566>; + focaltech,trusted-touch-io-bases = <0xF114000 0xF115000 0xF116000 0xF117000 0x988000 0x00910000>; + focaltech,trusted-touch-io-sizes = <0x1000 0x1000 0x1000 0x1000 0x1000 0x4000>; + }; + + atmel_mxt_ts@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + interrupt-parent = <&tlmm>; + interrupts = <23 0x2008>; + avdd-supply = <&L3C>; + vdd-supply = <&L8C>; + pinctrl-names = "pmx_ts_active", "pmx_ts_suspend"; + pinctrl-0 = <&ts_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + + atmel,xy_switch; + atmel,inverty; + atmel,invertx; + reset-gpios = <&tlmm 22 0x00>; + irq-gpios = <&tlmm 23 0x2008>; + atmel,panel-coords = <0 0 479 799>; + atmel,display-coords = <0 0 339 729>; + panel = <&dsi_sharp_qhd_plus_dsc_cmd + &dsi_sharp_qhd_plus_dsc_video>; + status = "disabled"; + }; +}; + +&dai_mi2s2 { + qcom,msm-mi2s-tx-lines = <1>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&tert_mi2s_sck_active &tert_mi2s_ws_active + &tert_mi2s_sd0_active>; + pinctrl-1 = <&tert_mi2s_sck_sleep &tert_mi2s_ws_sleep + &tert_mi2s_sd0_sleep>; +}; + +&pmk8350 { + pon_hlos@1300 { + interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 0x0 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 0x2 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "kpdpwr", "resin", "kpdpwr-bark", + "kpdpwr-resin-bark"; + qcom,pon_1 { + qcom,pon-type = ; + qcom,pull-up; + qcom,use-bark = <1>; + qcom,support-reset = <1>; + linux,code = ; + qcom,s1-timer = <6720>; + qcom,s2-timer = <2000>; + qcom,s2-type = ; + }; + }; +};