arm/dts: init dts for Fogo5G

init devicetree for Fogo5G
based on bangkk

Change-Id: Ic753af1479497ee853667425454e18276aae335d
Reviewed-on: https://gerrit.mot.com/2627351
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
liyun zhang 2023-06-01 13:41:22 +08:00 • committed by panyq6
commit 758e310e3c
14 changed files with 2159 additions and 0 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
qcom/camera
qcom/display
bindings/display/qcom
qcom/camera-legacy

View file

@ -105,6 +105,12 @@ dtbo-$(CONFIG_BANGKK_DTB) += \
blair-bangkk-evb1-overlay.dtbo-base := blair-moto-bangkk-base.dtb
dtbo-$(CONFIG_FOGOR_DTB) += \
blair-fogor-evb1-overlay.dtbo
blair-fogor-evb1-overlay.dtbo-base := blair-moto-fogor-base.dtb
dtbo-$(CONFIG_PENANG_DTB) += \
holi-penang-dvt2-jp-overlay.dtbo \
holi-penang-dvt2-sb-overlay.dtbo \

View file

@ -0,0 +1,524 @@
/* Copyright (c) 2023, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "holi-audio-fogor-overlay.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/linux-event-codes.h>
#include "holi-pmic-overlay-pm6125.dtsi"
#include "holi-thermal-overlay-pm6125.dtsi"
#include "display/holi-sde-display-mtp-pm6125.dtsi"
#include "display/blair-sde-display-mtp.dtsi"
#include "fogor-fps-overlay.dtsi"
#include "fogor-display.dtsi"
#include "fogor-touchscreen.dtsi"
#include "fogor-sensors.dtsi"
#include "fogor-wl286xx.dtsi"
#include "moto_therm_sys_temp.dtsi"
#include "blair-fogor-fmr-overlay.dtsi"
&wcd937x_codec {
cdc-vdd-rxtx-supply = <&L9A>;
cdc-vddpx-supply = <&L9A>;
qcom,cdc-static-supplies = "cdc-vdd-rxtx",
"cdc-vddpx";
/*
* Overriding cdc-vdd-mic-bias-supply to dummy value
* to avoid compilation errors as BOB is not definied
* for pm6125
*/
cdc-vdd-mic-bias-supply = <>;
};
&pm7250b_vib {
qcom,vib-ldo-volt-uv = <3000000>;
qcom,vib-dis-short-long;
qcom,vib-dis-short-long-val = <70>;
qcom,vib-ldo-volt-uv-long = <2600000>;
};
&tlmm {
nfc {
nfc_int_active: nfc_int_active {
/* active state */
mux {
/* GPIO 9: NFC Read Interrupt */
pins = "gpio9";
function = "gpio";
};
config {
pins = "gpio9";
drive-strength = <2>; /* 2 MA */
bias-disable;
};
};
nfc_int_suspend: nfc_int_suspend {
/* sleep state */
mux {
/* GPIO 9: NFC Read Interrupt */
pins = "gpio9";
function = "gpio";
};
config {
pins = "gpio9";
drive-strength = <2>; /* 2 MA */
bias-disable;
};
};
nfc_enable_active: nfc_enable_active {
mux {
pins = "gpio48";
function = "gpio";
};
config {
pins = "gpio48";
drive-strength = <2>; /* 2 MA */
bias-disable;
};
};
nfc_enable_suspend: nfc_enable_suspend {
mux {
pins = "gpio48";
function = "gpio";
};
config {
pins = "gpio48";
drive-strength = <2>; /* 2 MA */
bias-disable;
};
};
nfc_clk_req_active: nfc_clk_req_active {
/* active state */
mux {
/* GPIO 7: NFC CLK Req*/
pins = "gpio7";
function = "gpio";
};
config {
pins = "gpio7";
drive-strength = <2>; /* 2 MA */
bias-disable;
input-enable;
};
};
nfc_clk_req_suspend: nfc_clk_req_suspend {
/* sleep state */
mux {
/* GPIO 7: NFC CLK Req */
pins = "gpio7";
function = "gpio";
};
config {
pins = "gpio7";
drive-strength = <2>; /* 2 MA */
bias-disable;
input-enable;
};
};
};
};
/* Dummy LDO reference */
&sdhc_1 {
status = "ok"
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sdc1_on>;
pinctrl-1 = <&sdc1_off>;
vdd-supply = <&L24A>;
qcom,vdd-voltage-level = <2960000 2960000>;
qcom,vdd-current-level = <0 570000>;
vdd-io-supply = <&L11A>;
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 = <&L22A>;
qcom,vdd-voltage-level = <2960000 2960000>;
qcom,vdd-current-level = <0 800000>;
vdd-io-supply = <&L5A>;
qcom,vdd-io-voltage-level = <1800000 2960000>;
qcom,vdd-io-current-level = <0 22000>;
cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
};
&ufsphy_mem {
compatible = "qcom,ufs-phy-qmp-v4-yupik";
vdda-phy-supply = <&L7A>;
vdda-pll-supply = <&L4A>;
vdda-phy-max-microamp = <85700>;
vdda-pll-max-microamp = <18300>;
status = "ok"
};
&ufshc_mem {
vdd-hba-supply = <&gcc_ufs_phy_gdsc>;
vdd-hba-fixed-regulator;
vcc-supply = <&L24A>;
vcc-voltage-level = <2950000 2960000>;
vcc-max-microamp = <800000>;
vccq2-supply = <&L11A>;
vccq2-max-microamp = <800000>;
vccq2-voltage-level = <1800000 1800000>;
qcom,vddp-ref-clk-supply = <&L4A>;
qcom,vddp-ref-clk-max-microamp = <100>;
status = "ok"
};
&pmk8350_vadc {
pmk8350_qtm_n_therm {
reg = <PMK8350_ADC7_AMUX_THM2_100K_PU>;
label = "pmk8350_qtm_n_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pmk8350_qtm_e_therm {
reg = <PMK8350_ADC7_AMUX_THM4_100K_PU>;
label = "pmk8350_qtm_e_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};
&pmk8350_adc_tm {
io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>,
<&pmk8350_vadc PMK8350_ADC7_AMUX_THM2_100K_PU>,
<&pmk8350_vadc PMK8350_ADC7_AMUX_THM4_100K_PU>;
qtm_n__therm {
reg = <PMK8350_ADC7_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
qtm_e_therm {
reg = <PMK8350_ADC7_AMUX_THM4_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
&pmr735a_gpios {
camera_therm {
camera_therm_default:camera_therm_default {
pins = "gpio3";
bias-high-impedance;
};
};
};
&pmr735a_vadc {
status = "ok"
pinctrl-names = "default";
pinctrl-0 = <&camera_therm_default>;
pmr735a_camera_therm {
reg = <ADC7_GPIO3_100K_PU>;
label = "pmr735a_camera_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};
&pmr735a_4{
pmr735a_adc_tm_iio: adc_tm@3400 {
compatible = "qcom,adc-tm5-iio";
reg = <0x3400>;
#thermal-sensor-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
io-channels = <&pmr735a_vadc ADC7_GPIO3_100K_PU>;
pmr735a_camera_therm {
reg = <ADC7_GPIO3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
};
&qupv3_se7_i2c {
status = "ok"
#address-cells = <1>;
#size-cells = <0>;
sec-nfc@27 {
compatible = "sec-nfc";
reg = <0x27>;
sec-nfc,ven-gpio = <&tlmm 48 0x00>;
sec-nfc,firm-gpio = <&tlmm 135 0x00>;
sec-nfc,irq-gpio = <&tlmm 9 0x00>;
sec-nfc,clk_req-gpio = <&tlmm 7 0x00>;
interrupt-parent = <&tlmm>;
interrupts = <9 0>;
interrupt-names = "nfc_irq";
pinctrl-names = "nfc_active", "nfc_suspend";
pinctrl-0 = <&nfc_int_active &nfc_enable_active
&nfc_clk_req_active>;
pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend
&nfc_clk_req_suspend>;
clock-names = "OSC_NFC";
};
};
&thermal_zones {
sdm-skin-therm-usr {
status = "disabled";
};
rear-cam-therm-usr {
status = "disabled";
};
camera-therm-usr {
status = "disabled";
};
quiet-therm-usr {
status = "disabled";
};
pa-therm0-usr {
status = "disabled";
};
pa-therm1-usr {
status = "disabled";
};
xo-therm-usr {
status = "disabled";
};
chg-skin-therm-usr {
status = "disabled";
};
msm_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm6125_adc_tm_iio ADC5_GPIO1_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
chg_therm {
polling-delay-passive = <5000>;
polling-delay = <20000>;
thermal-governor = "user_space";
thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM1_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
cam_flash_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm6125_adc_tm ADC5_GPIO3_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
pa_therm2 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm6125_adc_tm ADC5_GPIO4_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
pa_therm1 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM1_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
quiet_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM2_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
xo_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM1_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
qtm_n_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM2_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
qtm_e_therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM4_100K_PU>;
wake-capable-sensor;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
soc_usr {
polling-delay-passive = <1000>;
polling-delay = <0>;
thermal-governor = "user_space";
thermal-sensors = <&bcl_soc>;
};
};
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;
vol_up {
label = "volume_up";
gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
ldo_vib {
compatible = "moto,vibrator-ldo";
moto,vib-ldo-gpio = <&tlmm 100 0x0>;
status = "disabled";
};
qcom,tz_gpio {
compatible = "qcom,tz_gpio";
tlmm-tz = <0>,
<13>,
<14>,
<15>,
<16>;
};
};
/* Primary USB port related QUSB2 PHY */
&usb2_phy0 {
qcom,param-override-seq =
<0xa6 0x6c /* override_x0 */
0x25 0x70 /* override_x1 */
0x16 0x74>; /* override x2 */
};

View file

@ -0,0 +1,24 @@
/* Copyright (c) 2023, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/dts-v1/;
/plugin/;
#include "blair-pm6125-fogor-common-overlay.dtsi"
/ {
model = "fogor";
compatible = "qcom,blair-fogor", "qcom,blair-moto", "qcom,blair";
qcom,msm-id = <507 0x10000>;
qcom,board-id = <0x49 0xA100>;
};

View file

@ -0,0 +1,48 @@
&tlmm {
fm_elna_default: fm_elna_default {
mux {
pins = "gpio47";
function = "gpio";
};
config {
pins = "gpio47";
drive_strength = <16>;
output-low;
};
};
fm_elna_active: fm_elna_active {
mux {
pins = "gpio47";
function = "gpio";
};
config {
pins = "gpio47";
drive_strength = <16>;
output-high;
};
};
fm_elna_suspend: fm_elna_suspend {
mux {
pins = "gpio47";
function = "gpio";
};
config {
pins = "gpio47";
drive_strength = <16>;
output-low;
};
};
};
&soc {
fmradio: fm_wcn39x0 {
status = "ok"
compatible = "moto,fmctrl";
pinctrl-names = "default", "elna_active", "elna_suspend";
pinctrl-0 = <&fm_elna_default>;
pinctrl-1 = <&fm_elna_active>;
pinctrl-2 = <&fm_elna_suspend>;
};
};

View file

@ -0,0 +1,45 @@
/* Copyright (c) 2023, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/dts-v1/;
#include "blair.dtsi"
/ {
qcom,board-id = <0 0>;
channel-id-map = "";
/*
* Some nodes need labels assigned to appear in __symbols__
*/
chosen: chosen { };
aliases: aliases { };
reserved_memory: reserved-memory { };
mot_batterydata: qcom,battery-data { };
utags: utags { };
hw: hw { };
};
&reserved_memory {
/delete-node/ ramoops;
};
&tlmm {
/delete-node/ nfc;
};
&firmware {
/delete-node/ android;
};
&mdss_dsi_phy0 {
/delete-property/ qcom,dsi-pll-ssc-en;
};

View file

@ -0,0 +1,22 @@
/* Copyright (c) 2023, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "blair-fogor-common-overlay.dtsi"
#include "blair-pm6125-moto-common-overlay.dtsi"
#include "fogor-charger.dtsi"
&pm7250b_charger {
dpdm-supply = <&usb2_phy0>;
};
&smb1394 {
status = "disabled";
};

217
qcom/fogor-charger.dtsi Normal file
View file

@ -0,0 +1,217 @@
#include <dt-bindings/iio/qti_power_supply_iio.h>
&mot_batterydata {
df-serialnum = "SB18D87863";
qcom,batt-id-range-pct = <15>;
#include "qg-batterydata-qb50-swd-5000mah.dtsi"
};
&pm7250b_charger {
#io-channel-cells = <1>;
io-channels = <&pm7250b_vadc ADC5_USB_IN_V_16>,
<&pm7250b_vadc ADC5_USB_IN_I>,
<&pm7250b_vadc ADC5_CHG_TEMP>,
<&pm7250b_vadc ADC5_DIE_TEMP>,
<&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>,
<&pm7250b_vadc ADC5_SBUx>,
<&pm7250b_vadc ADC5_VPH_PWR>,
<&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>,
<&pm7250b_qg PSY_IIO_RESISTANCE_ID>,
<&pm7250b_qg PSY_IIO_VOLTAGE_NOW>,
<&pm7250b_qg PSY_IIO_TEMP>,
<&pm7250b_qg PSY_IIO_CAPACITY>,
<&pm7250b_qg PSY_IIO_VOLTAGE_OCV>,
<&pm7250b_qg PSY_IIO_VOLTAGE_AVG>,
<&pm7250b_qg PSY_IIO_DEBUG_BATTERY>,
<&pm7250b_qg PSY_IIO_REAL_CAPACITY>,
<&pm7250b_qg PSY_IIO_CC_SOC>,
<&pm7250b_qg PSY_IIO_CURRENT_NOW>,
<&pm7250b_qg PSY_IIO_VOLTAGE_MAX>,
<&pm7250b_qg PSY_IIO_CHARGE_FULL>,
<&pm7250b_qg PSY_IIO_CHARGE_COUNTER>,
<&pm7250b_qg PSY_IIO_CYCLE_COUNT>,
<&pm7250b_qg PSY_IIO_CHARGE_FULL_DESIGN>,
<&pm7250b_qg PSY_IIO_TIME_TO_FULL_NOW>,
<&bq25960_standalone PSY_IIO_MMI_CP_INPUT_VOLTAGE_NOW>;
io-channel-names = "usb_in_voltage",
"usb_in_current",
"chg_temp",
"die_temp",
"conn_temp",
"sbux_res",
"vph_voltage",
"skin_temp",
"resistance_id",
"voltage_now",
"temp",
"capacity",
"voltage_ocv",
"voltage_avg",
"debug_battery",
"real_capacity",
"cc_soc",
"current_now",
"voltage_max",
"charge_full",
"charge_counter",
"cycle_count",
"charge_full_design",
"time_to_full_now",
"cp_input_voltage_now";
qcom,fcc-max-ua = <4000000>;
qcom,fv-max-uv = <4520000>;
qcom,dcp-curr-max = <1500000>;
qcom,otg-cl-ua = <1000000>;
qcom,thermal-mitigation = <3000000 2500000
2000000 1500000
1200000 900000
600000>;
mmi,qc3p-support;
/delete-property/ qcom,fcc-stepping-enable;
};
&pm7250b_mmi {
qcom,mmi-temp-zones = <0 4200 1000 0>,
<10 4250 3000 1000>,
<15 0 3000 3000>,
<25 0 4000 4000>,
<35 0 4000 4000>,
<45 0 4000 4000>,
<60 4200 4000 0>;
qcom,mmi-ffc-zones = <4200 260 534>,
<4500 260 534>,
<4500 260 534>,
<4520 550 960>,
<4520 600 1010>,
<4520 750 1160>,
<4200 260 575>;
qcom,iterm-ma = <260>;
mmi,enable-factory-mode-aicl;
qcom,noffc-chg-iterm = <260>;
qcom,noffc-chg-iterm-45c = <390>;
qcom,noffc-qg-iterm = <500>;
qcom,noffc-max-fv = <4500>;
};
&pm7250b_qg {
#io-channel-cells = <1>;
io-channels = <&pm7250b_vadc ADC5_BAT_THERM_100K_PU>,
<&pm7250b_vadc ADC5_BAT_ID_100K_PU>,
<&pm7250b_charger PSY_IIO_INPUT_CURRENT_LIMITED>,
<&pm7250b_charger PSY_IIO_RECHARGE_SOC>,
<&pm7250b_charger PSY_IIO_FORCE_RECHARGE>,
<&pm7250b_charger PSY_IIO_CHARGE_DONE>,
<&mmi_chrg PSY_IIO_CP_ENABLE>;
io-channel-names = "batt-therm",
"batt-id",
"input_current_limited",
"recharge_soc",
"force_recharge",
"charge_done",
"cp_charging_enabled";
mmi,cp-use-internal-qg;
qcom,qg-iterm-ma = <500>;
};
&qupv3_se10_i2c {
status = "okay";
bq25960_standalone:bq25960-standalone@6A {
status = "okay";
compatible = "ti,bq25960-standalone";
reg = <0x6A>;
sc8541-addr = <0x6A>;
sc8541-name = "sc8541-master";
#io-channel-cells = <1>;
interrupt-parent = <&tlmm>;
interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
irq-gpio = <&tlmm 12 0>;
};
};
&soc {
mmi_chrg: mmi_chrg_manager {
compatible = "mmi,chrg-manager";
#io-channel-cells = <1>;
io-channels = <&pm7250b_charger PSY_IIO_HW_CURRENT_MAX>,
<&pm7250b_charger PSY_IIO_CHARGING_ENABLED>,
<&pm7250b_charger PSY_IIO_TYPEC_MODE>,
<&pm7250b_charger PSY_IIO_USB_INPUT_CURRENT_SETTLED>,
<&pm7250b_charger PSY_IIO_PD_ACTIVE>,
/*qc3p start*/
<&pm7250b_charger PSY_IIO_USB_REAL_TYPE>,
<&pm7250b_charger PSY_IIO_DP_DM>,
<&pm7250b_charger PSY_IIO_MMI_QC3P_POWER>,
/*qc3p end*/
<&bq25960_standalone PSY_IIO_CP_ENABLE>,
<&bq25960_standalone PSY_IIO_MMI_CP_INPUT_CURRENT_NOW>,
<&bq25960_standalone PSY_IIO_MMI_CP_INPUT_VOLTAGE_NOW>,
<&bq25960_standalone PSY_IIO_CP_STATUS1>,
<&bq25960_standalone PSY_IIO_CP_CLEAR_ERROR>,
<&pm7250b_mmi PSY_IIO_CP_ENABLE>;
io-channel-names = "usb_hw_current_max",
"charging_enabled",
"usb_typec_mode",
"usb_input_current_settled",
"usb_pd_active",
/*qc3p start*/
"usb_real_type",
"battery_dp_dm",
"usb_qc3p_power",
/*qc3p end*/
"cp_enable",
"cp_input_current_now",
"cp_input_voltage_now",
"cp_status1",
"cp_clear_error",
"mmi_cp_enabled_status";
qcom,usbpd-phandle = <&pm7250b_pdphy>;
mmi,pps-volt-steps = <20000>;
mmi,pps-curr-steps = <100000>;
mmi,pd-volt-max = <10000000>;
mmi,pd-curr-max = <3000000>;
mmi,batt-curr-boost = <300000>;
mmi,batt-ovp-lmt = <4580000>;
mmi,pl-chrg-vbatt-min = <3000000>;
mmi,typec-middle-current = <2000000>;
mmi,pd-allow-min-current = <1000000>;
mmi,step-first-current-comp = <0>;
mmi,dont-rerun-aicl;
/*qc3p start*/
mmi,qc3p-max-ibus-ma = <3000>;
mmi,qc3p-volt-steps = <20000>;
mmi,qc3p-volt-max = <10000000>;
/*qc3p end*/
mmi,chrg-temp-zones-num = <5>;
mmi,mmi-chrg-temp-zones =
<0 4200 1000 0 0 0 0>,
<10 4250 3000 4500 1000 0 0>,
<15 4500 3000 0 0 0 0>,
<45 4300 5800 4400 5200 4520 4000>,
<60 4200 4000 0 0 0 0>;
mmi,thermal-mitigation =
<5800000>,
<5000000>,
<4000000>,
<3500000>,
<3000000>,
<2000000>,
<1000000>;
charger_device_0 {
chrg-name = "pmic-sw";
psy-name = "battery";
charging-curr-limited = <500000>;
};
charger_device_1 {
chrg-name = "cp-master";
psy-name = "bq25960-standalone";
charging-curr-min = <2000000>;
};
};
};

395
qcom/fogor-display.dtsi Normal file
View file

@ -0,0 +1,395 @@
#include "dsi-panel-mot-dummy-qhd-video.dtsi"
#include "dsi-panel-mot-csot-vtdr6115-655-1080x2400-video.dtsi"
#include "dsi-panel-mot-tm-nt37703-655-1080x2400-video.dtsi"
#include "dsi-panel-mot-tm-u8-nt37703-655-1080x2400-video.dtsi"
&display_panel_avdd {
/delete-property/ gpio;
/delete-property/ pinctrl-0;
};
&tlmm {
display_panel_vddio_default: display_panel_vddio_default {
mux {
pins = "gpio102";
function = "gpio";
};
config {
pins = "gpio102";
drive-strength = <8>;
bias-disable = <0>;
output-high;
};
};
display_panel_vci_default: display_panel_vci_default {
mux {
pins = "gpio84";
function = "gpio";
};
config {
pins = "gpio84";
drive-strength = <8>;
bias-disable = <0>;
output-high;
};
};
display_panel_dvdd_default: display_panel_dvdd_default {
mux {
pins = "gpio85";
function = "gpio";
};
config {
pins = "gpio85";
drive-strength = <8>;
bias-disable = <0>;
output-high;
};
};
};
&soc {
display_panel_vddio: display_gpio_regulator@1 {
compatible = "qti-regulator-fixed";
regulator-name = "display_panel_vddio";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-enable-ramp-delay = <233>;
gpio = <&tlmm 102 0>;
enable-active-high;
regulator-boot-on;
proxy-supply = <&display_panel_vddio>;
qcom,proxy-consumer-enable;
pinctrl-names = "default";
pinctrl-0 = <&display_panel_vddio_default>;
};
display_panel_vci: display_gpio_regulator@2 {
compatible = "qti-regulator-fixed";
regulator-name = "display_panel_vci";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-enable-ramp-delay = <233>;
gpio = <&tlmm 84 0>;
enable-active-high;
regulator-boot-on;
proxy-supply = <&display_panel_vci>;
qcom,proxy-consumer-enable;
pinctrl-names = "default";
pinctrl-0 = <&display_panel_vci_default>;
};
display_panel_dvdd: display_gpio_regulator@3 {
compatible = "qti-regulator-fixed";
regulator-name = "display_panel_dvdd";
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <1250000>;
regulator-enable-ramp-delay = <233>;
gpio = <&tlmm 85 0>;
enable-active-high;
regulator-boot-on;
proxy-supply = <&display_panel_dvdd>;
qcom,proxy-consumer-enable;
pinctrl-names = "default";
pinctrl-0 = <&display_panel_dvdd_default>;
};
dsi_panel_pwr_supply_ext_bias: dsi_panel_pwr_supply_ext_bias {
#address-cells = <1>;
#size-cells = <0>;
qcom,panel-supply-entry@0 {
reg = <0>;
qcom,supply-name = "vddio";
qcom,supply-min-voltage = <1800000>;
qcom,supply-max-voltage = <1800000>;
qcom,supply-enable-load = <300000>;
qcom,supply-disable-load = <0>;
qcom,supply-pre-on-sleep = <0>;
qcom,supply-post-on-sleep = <2>;
qcom,supply-pre-off-sleep = <3>;
qcom,supply-post-off-sleep = <1>;
};
qcom,panel-supply-entry@1 {
reg = <1>;
qcom,supply-name = "vci";
qcom,supply-min-voltage = <3000000>;
qcom,supply-max-voltage = <3000000>;
qcom,supply-enable-load = <300000>;
qcom,supply-disable-load = <0>;
qcom,supply-pre-on-sleep = <0>;
qcom,supply-post-on-sleep = <2>;
qcom,supply-pre-off-sleep = <2>;
qcom,supply-post-off-sleep = <2>;
};
qcom,panel-supply-entry@2 {
reg = <2>;
qcom,supply-name = "dvdd";
qcom,supply-min-voltage = <1250000>;
qcom,supply-max-voltage = <1250000>;
qcom,supply-enable-load = <300000>;
qcom,supply-disable-load = <0>;
qcom,supply-pre-on-sleep = <1>;
qcom,supply-post-on-sleep = <2>;
qcom,supply-pre-off-sleep = <2>;
qcom,supply-post-off-sleep = <2>;
};
};
dsi_panel_pwr_supply_ext_bias_nt: dsi_panel_pwr_supply_ext_bias_nt {
#address-cells = <1>;
#size-cells = <0>;
qcom,panel-supply-entry@0 {
reg = <0>;
qcom,supply-name = "vddio";
qcom,supply-min-voltage = <1800000>;
qcom,supply-max-voltage = <1800000>;
qcom,supply-enable-load = <300000>;
qcom,supply-disable-load = <0>;
qcom,supply-pre-on-sleep = <0>;
qcom,supply-post-on-sleep = <2>;
qcom,supply-pre-off-sleep = <3>;
qcom,supply-post-off-sleep = <1>;
};
qcom,panel-supply-entry@1 {
reg = <1>;
qcom,supply-name = "dvdd";
qcom,supply-min-voltage = <1250000>;
qcom,supply-max-voltage = <1250000>;
qcom,supply-enable-load = <300000>;
qcom,supply-disable-load = <0>;
qcom,supply-pre-on-sleep = <1>;
qcom,supply-post-on-sleep = <2>;
qcom,supply-pre-off-sleep = <2>;
qcom,supply-post-off-sleep = <2>;
};
qcom,panel-supply-entry@2 {
reg = <2>;
qcom,supply-name = "vci";
qcom,supply-min-voltage = <3000000>;
qcom,supply-max-voltage = <3000000>;
qcom,supply-enable-load = <300000>;
qcom,supply-disable-load = <0>;
qcom,supply-pre-on-sleep = <0>;
qcom,supply-post-on-sleep = <10>;
qcom,supply-pre-off-sleep = <2>;
qcom,supply-post-off-sleep = <2>;
};
};
};
&sde_dsi {
/delete-property/ lab-supply;
/delete-property/ ibb-supply;
/delete-property/ vddio-supply;
/delete-property/ qcom,dsi-default-panel;
/delete-property/ avdd-supply;
vddio-supply = <&display_panel_vddio>;
vci-supply = <&display_panel_vci>;
dvdd-supply = <&display_panel_dvdd>;
qcom,dsi-default-panel = <&mot_csot_vtdr6115_655_1080x2400_dsc_vid>;
};
&mot_csot_vtdr6115_655_1080x2400_dsc_vid{
qcom,platform-te-gpio = <&tlmm 23 0>;
qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>;
qcom,dsi-supported-dfps-list = <120 90 60>;
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode_vfp";
qcom,mdss-dsi-pan-dfps-send-command;
qcom,mdss-dsi-pan-dfps-send-command-with-te-async;
qcom,mdss-dsi-pan-on-fps = <60>;
qcom,panel-supply-entries = <&dsi_panel_pwr_supply_ext_bias>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <3929>;
qcom,mdss-brightness-max-level = <3929>;
qcom,mdss-dsi-bl-default-level = <1757>;
qcom,mdss-dsi-bl-inverted-dbv;
qcom,mdss-dsi-no-panel-on-read-support;
qcom,mdss-dsi-bl-is-exponent;
qcom,mdss-dsi-panel-hdr-enable;
qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000
16000 13000 35500 7000 2500>;
qcom,mdss-dsi-panel-peak-brightness = <5000000>;
qcom,mdss-dsi-panel-blackness-level = <100>;
qcom,esd-check-enabled;
qcom,mdss-dsi-panel-status-check-mode = "reg_read";
qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 66];
qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
qcom,mdss-dsi-panel-status-value = <0 0 0>;
qcom,mdss-dsi-panel-status-read-length = <3>;
qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0";
qcom,mdss-dsi-display-timings {
timing@0 {
qcom,mdss-dsi-panel-clockrate = <890000000>;
qcom,mdss-dsi-panel-phy-timings = [00 1E 08 07 18 22 08
08 08 02 04 00 1A 0D];
qcom,display-topology = <1 1 1>;
qcom,default-topology-index = <0>;
};
};
};
&mot_tm_nt37703_655_1080x2400_dsc_vid{
qcom,platform-te-gpio = <&tlmm 23 0>;
qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>;
qcom,dsi-supported-dfps-list = <120 90 60>;
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode_vfp";
qcom,mdss-dsi-pan-dfps-send-command;
qcom,mdss-dsi-pan-on-fps = <60>;
qcom,panel-supply-entries = <&dsi_panel_pwr_supply_ext_bias_nt>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <3929>;
qcom,mdss-brightness-max-level = <3929>;
qcom,mdss-dsi-bl-default-level = <1757>;
qcom,mdss-dsi-no-panel-on-read-support;
qcom,mdss-dsi-bl-is-exponent;
qcom,mdss-dsi-panel-hdr-enable;
qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000
16000 13000 35500 7000 2500>;
qcom,mdss-dsi-panel-peak-brightness = <5000000>;
qcom,mdss-dsi-panel-blackness-level = <100>;
qcom,esd-check-enabled;
qcom,mdss-dsi-panel-status-check-mode = "reg_read";
qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a];
qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
qcom,mdss-dsi-panel-status-value = <0x9c>;
qcom,mdss-dsi-panel-status-read-length = <1>;
qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0";
qcom,mdss-dsi-display-timings {
timing@0 {
qcom,mdss-dsi-panel-phy-timings = [00 1D 07 07 17 22 07
07 08 02 04 00 19 0C];
qcom,display-topology = <1 1 1>;
qcom,default-topology-index = <0>;
};
};
};
&mot_tm_u8_nt37703_655_1080x2400_dsc_vid{
qcom,platform-te-gpio = <&tlmm 23 0>;
qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>;
qcom,dsi-supported-dfps-list = <120 90 60>;
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode_vfp";
qcom,mdss-dsi-pan-dfps-send-command;
qcom,mdss-dsi-pan-on-fps = <60>;
qcom,panel-supply-entries = <&dsi_panel_pwr_supply_ext_bias_nt>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <3929>;
qcom,mdss-brightness-max-level = <3929>;
qcom,mdss-dsi-bl-default-level = <1757>;
qcom,mdss-dsi-no-panel-on-read-support;
qcom,mdss-dsi-bl-is-exponent;
qcom,mdss-dsi-panel-hdr-enable;
qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000
16000 13000 35500 7000 2500>;
qcom,mdss-dsi-panel-peak-brightness = <5000000>;
qcom,mdss-dsi-panel-blackness-level = <100>;
qcom,esd-check-enabled;
qcom,mdss-dsi-panel-status-check-mode = "reg_read";
qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a];
qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
qcom,mdss-dsi-panel-status-value = <0x9c>;
qcom,mdss-dsi-panel-status-read-length = <1>;
qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0";
qcom,mdss-dsi-display-timings {
timing@0 {
qcom,mdss-dsi-panel-phy-timings = [00 1D 07 07 17 22 07
07 08 02 04 00 19 0C];
qcom,display-topology = <1 1 1>;
qcom,default-topology-index = <0>;
};
};
};
&mot_dummy_vid_qhd {
qcom,platform-te-gpio = <&tlmm 23 0>;
qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dummy";
qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0";
qcom,mdss-dsi-display-timings {
timing@0 {
qcom,mdss-dsi-panel-phy-timings = [00 0B 02 02 1C 1C 03
02 01 02 04 00 0C 12];
qcom,display-topology = <1 0 1>;
qcom,default-topology-index = <0>;
};
};
};
&qupv3_se10_i2c {
status = "ok"
lcd_backlight@36 {
compatible = "awinic,aw99703-bl";
reg = <0x36>;
/* Awinic, aw99703 */
aw99703,hwen-gpio = <&tlmm 60 0>;
aw99703,bl-map = <3>; /* brightness map level 1:256,2:1024,3:2048 */
aw99703,using-lsb;
aw99703,ovp-level = <2>; /* 0:17.5V, 1:24V, 2:31V, 3:38V, 4:41.5V */
aw99703,ocp-level = <1>; /* 0:0.9A, 1:1.8A, 2:2.7A, 3:3.4A */
aw99703,switch-freq = <1>; /* 1000kHz(default) */
aw99703,auto-freq-high = <0x10>;
aw99703,auto-freq-low = <0x05>;
aw99703,bl-fscal-led = <0x19>; /* 24.8mA */
aw99703,bl-channel = <3>;
aw99703,turn-on-ramp = <0x00>; /* 512us */
aw99703,turn-off-ramp = <0x04>; /* 8ms */
aw99703,pwm-trans-dim = <0>; /* 2ms */
aw99703,i2c-trans-dim = <1>; /* 128ms */
aw99703,pwm-mode = <1>; /* 1 pwm enable,0 PWM disable */
aw99703,map-type = <0>; /* 0 exponential, 4 linear */
aw99703,work-mode = <1>; /* backlight */
aw99703,default-brightness = <1810>;
};
};
&qupv3_se10_i2c_sleep {
config {
/delete-property/ bias-disable;
bias-pull-up;
input-enable;
};
};

102
qcom/fogor-fps-overlay.dtsi Normal file
View file

@ -0,0 +1,102 @@
&tlmm {
ets_irq_active: egis_irq_active {
/* INTERRUPT */
mux {
pins = "gpio17";
function = "gpio";
};
config {
pins = "gpio17";
drive-strength = <2>; /* 2 MA */
input-enable;
};
};
ets_rst_high: ets_rst_high {
/* INTERRUPT */
mux {
pins = "gpio18";
function = "gpio";
};
config {
pins = "gpio18";
drive-strength = <2>; /* 2 MA */
output-high;
};
};
ets_rst_low: ets_rst_low {
/* INTERRUPT */
mux {
pins = "gpio18";
function = "gpio";
};
config {
pins = "gpio18";
drive-strength = <2>; /* 2 MA */
output-low;
};
};
ets_vcc_high: ets_vcc_high {
/* INTERRUPT */
mux {
pins = "gpio100";
function = "gpio";
};
config {
pins = "gpio100";
drive-strength = <2>; /* 2 MA */
output-high;
};
};
ets_vcc_low: ets_vcc_low {
/* INTERRUPT */
mux {
pins = "gpio100";
function = "gpio";
};
config {
pins = "gpio100";
drive-strength = <2>; /* 2 MA */
output-low;
};
};
};
&soc {
EL721: EL721 {
compatible = "fp-egistec";
status = "ok"
reg = <0>;
interrupt-parent = <&tlmm>;
interrupts = <17 0x0>;
fp-ctrl-power;
fp-gpio-vcc-enable;
egistec,gpio_vcc_en = <&tlmm 100 0x0>;
egistec,gpio_irq = <&tlmm 17 0x0>;
egistec,gpio_reset = <&tlmm 18 0x0>;
pinctrl-names = "egis_rst_high", "egis_rst_low", "egis_irq_active",
"egis_vcc_high", "egis_vcc_low";
pinctrl-0 = <&ets_rst_high>;
pinctrl-1 = <&ets_rst_low>;
pinctrl-2 = <&ets_irq_active>;
pinctrl-3 = <&ets_vcc_high>;
pinctrl-4 = <&ets_vcc_low>;
};
};

188
qcom/fogor-sensors.dtsi Executable file
View file

@ -0,0 +1,188 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
&tlmm {
pen_int_default: pen_int_default {
mux {
pins = "gpio84";
function = "gpio";
};
config {
pins = "gpio84";
num-grp-pins = <1>;
drive-strength = <2>;
bias-no-pull;
};
};
pen_int_sleep: pen_int_sleep {
mux {
pins = "gpio84";
function = "gpio";
};
config {
pins = "gpio84";
num-grp-pins = <1>;
drive-strength = <2>;
bias-no-pull;
};
};
sar_int_fogor_default: sar_int_fogor_default {
mux {
pins = "gpio58";
function = "gpio";
};
config {
pins = "gpio58";
num-grp-pins = <1>;
drive-strength = <2>;
bias-pull-up;
};
};
sar_int_fogor_sleep: sar_int_fogor_sleep {
mux {
pins = "gpio58";
function = "gpio";
};
config {
pins = "gpio58";
num-grp-pins = <1>;
drive-strength = <2>;
bias-pull-up;
};
};
};
&soc {
pen_detect{
compatible = "rohm,bu520xx_pen_detect";
pinctrl-names = "default","sleep";
pinctrl-0 = <&pen_int_default>;
pinctrl-1 = <&pen_int_sleep>;
rohm,nirq-gpio=<&tlmm 84 0x02>;
};
};
&qupv3_se8_i2c {
status = "okay";
Semtech_sx937x@2c {
compatible = "Semtech,sx937x";
reg = <0x2c>;
Semtech,power-supply-type = <1>;
cap_vdd-supply = <&L12A>;
pinctrl-names = "default","sleep";
pinctrl-0 = <&sar_int_fogor_default>;
pinctrl-1 = <&sar_int_fogor_sleep>;
interrupt-parent = <&tlmm>;
interrupts = <58 0x02>;
interrupt-names = "sx937x_irq";
Semtech,nirq-gpio = <&tlmm 58 0x02>;
/*use PH5/6 as the reference sensor
set it to 0xff if the ref-phases-x is not used*/
Semtech,ref-phases-a = <5>;
Semtech,ref-phases-b = <6>;
Semtech,ref-phases-c = <0xff>;
Semtech,button-flag = <0x1f>;
reinit-on-i2c-failure = <1>;
Semtech,reg-num = <66>;
Semtech,reg-init = <
0x4004 0x78
0x4008 0x8
0x8020 0x32
0x8028 0x45F
0x8034 0x45F
0x8040 0x45F
0x804C 0x45F
0x8058 0x45F
0x8064 0x45E
0x8070 0x45E
0x807C 0x45E
0x8030 0x924925
0x803C 0xB24924
0x8048 0x924964
0x8054 0x925924
0x8060 0x964924
0x806C 0x92492C
0x8078 0x92C924
0x8084 0x924924
0x8098 0x685A
0x80B8 0x2D23
0x80D8 0x4D40
0x80F8 0x5A47
0x8118 0x4637
0x8138 0xFF
0x8158 0xFF
0x8178 0xFF
0x80A0 0x20200001
0x80C0 0x1A1A0002
0x80E0 0x20200001
0x8100 0x0
0x8120 0x20200002
0x8140 0x0
0x8160 0x0
0x8180 0x0
0x8188 0x8000015
0x818C 0x8000016
0x8190 0x0
0x8194 0x0
0x8090 0x7C845200
0x80B0 0x7C845102
0x80D0 0x7C845200
0x80F0 0x7C845100
0x8110 0x7C845100
0x8130 0x54AC5300
0x8150 0x54AC5300
0x8170 0x54AC5300
0x8088 0x300000
0x80A8 0x300000
0x80C8 0x300000
0x80E8 0x300000
0x8108 0x300000
0x8128 0x300000
0x8148 0x300000
0x8168 0x300000
0x808C 0x60200020
0x80AC 0x60200010
0x80CC 0x60200020
0x80EC 0x60200010
0x810C 0x60200010
0x812C 0x60200031
0x814C 0x60200031
0x816C 0x60200031
0x8024 0x7F7F
0x8274 0x2E040000
0x4280 0x0E
>;
};
awinic_sar@12 {
/* common node */
compatible = "awinic,aw_sar";
reg = < 0x12 >;
//aw_sar,regulator-power-supply = <1>;
sar-num = < 0 >;
interrupt-parent = < &tlmm >;
interrupts = <58 0x02>;
interrupt-names = "awinic_irq";
irq-gpio = <&tlmm 58 0x02>;
//vcc0-supply = <&L12A>;
channel_use_flag = <0x1f>;
aw_sar,use_plug_cail;
aw_sar,update_fw;
/* private node belongs to aw963xx */
start-mode = < 1 >; // 0: start in rom 1: start in ram
irq-mux = < 2 >; // set csx as irq pin. config this field when connect to aw96308/aw96310
status = "okay";
};
};

146
qcom/fogor-touchscreen.dtsi Executable file
View file

@ -0,0 +1,146 @@
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
&qupv3_se0_i2c {
status = "disabled";
};
&L13A {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
qcom,init-voltage = <1800000>;
status = "okay";
};
&qupv3_se0_spi_pins {
qupv3_se0_spi_active: qupv3_se0_spi_active {
mux {
pins = "gpio0", "gpio1", "gpio2";
function = "qup00";
};
config {
pins = "gpio0", "gpio1", "gpio2";
drive-strength = <6>;
bias-disable;
};
};
qupv3_se0_spi_sleep: qupv3_se0_spi_sleep {
mux {
pins = "gpio0", "gpio1", "gpio2";
function = "gpio";
};
config {
pins = "gpio0", "gpio1", "gpio2";
drive-strength = <6>;
bias-disable;
};
};
qupv3_se0_spi_cs_active: qupv3_se0_spi_cs_active {
mux {
pins = "gpio3";
function = "qup00";
};
config {
pins = "gpio3";
drive-strength = <6>;
bias-disable;
};
};
qupv3_se0_spi_cs_sleep: qupv3_se0_spi_cs_sleep {
mux {
pins = "gpio3";
function = "gpio";
};
config {
pins = "gpio3";
drive-strength = <6>;
bias-pull-up;
};
};
};
&qupv3_se0_spi {
status = "ok"
pinctrl-0 = <&qupv3_se0_spi_active &qupv3_se0_spi_cs_active>;
pinctrl-1 = <&qupv3_se0_spi_sleep &qupv3_se0_spi_cs_sleep>;
goodix-berlin@0 {
compatible = "goodix,gt9916S";
reg = <0x0>;
spi-max-frequency = <9600000>;
mmi,status = "/chosen","mmi,panel_name","contains","nt37703"
//goodix,avdd-name = "avdd";
goodix,iovdd-name = "iovdd";
goodix,avdd-gpio = <&tlmm 11 0x0>;
iovdd-supply = <&L13A>;
panel = <&mot_tm_nt37703_655_1080x2400_dsc_vid>;
goodix,reset-gpio = <&tlmm 21 0x0>;
goodix,irq-gpio = <&tlmm 22 0x0>;
goodix,irq-flags = <2>;
goodix,panel-max-x = <17280>;
goodix,panel-max-y = <38400>;
goodix,panel-max-w = <255>;
goodix,panel-max-p = <4096>;
goodix,firmware-name = "goodix_firmware.bin";
goodix,config-name = "goodix_cfg_group.bin";
goodix,edge-ctrl;
goodix,interpolation-ctrl;
mmi,power-off-suspend;
mmi,usb-charger-detection;
mmi,enable-gestures;
mmi,supported_gesture_type = <0x07>;
status = "ok"
};
focaltech@1{
compatible = "focaltech,fts";
reg = <0x1>;
//mmi,status = "/chosen","vtdr6115"
mmi,status = "/chosen","mmi,panel_name","contains","vtdr6115"
spi-max-frequency = <9600000>;
interrupt-parent = <&tlmm>;
interrupts = <22 0x2008>;
focaltech,vdd-gpio = <&tlmm 11 0x00>;
focaltech,reset-gpio = <&tlmm 21 0x00>;
focaltech,irq-gpio = <&tlmm 22 0x02008>;
vcc_i2c-supply = <&L13A>;
focaltech,max-touch-number = <10>;
focaltech,display-coords = <0 0 17280 38400>;
focaltech,edge-ctrl;
focaltech,interpolation-ctrl;
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 = <&pmx_ts_release>;
panel = <&mot_csot_vtdr6115_655_1080x2400_dsc_vid>;
mmi,usb-charger-detection;
mmi,enable-gestures;
mmi,supported_gesture_type = <0x07>;
status = "ok"
};
};

74
qcom/fogor-wl286xx.dtsi Normal file
View file

@ -0,0 +1,74 @@
&tlmm{
pmic1_en_default: pmic1_en_default {
mux {
pins = "gpio33";
function = "gpio";
};
config {
pins = "gpio33";
drive-strength = <2>;
bias-pull-down;
};
};
};
&gcc {
qcom,critical-devices = <&qupv3_se10_i2c>;
};
&qupv3_se10_i2c {
status = "ok"
cam_pmic1: wl2864c@29{
compatible = "semi,wl2864c";
reg = <0x29>;
semi,cs-gpios = <&tlmm 33 0>;
pinctrl-names = "default";
pinctrl-0 = <&pmic1_en_default>;
vin1-supply = <&S6A>;
regulators {
cam_pmic1_ldo1_dvdd1: ldo1 {
regulator-name = "ldo1";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1800000>;
};
cam_pmic1_ldo2_dvdd2: ldo2 {
regulator-name = "ldo2";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1800000>;
};
cam_pmic1_ldo3_avdd1: ldo3 {
regulator-name = "ldo3";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <4300000>;
};
cam_pmic1_ldo4_avdd2: ldo4 {
regulator-name = "ldo4";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <4300000>;
};
cam_pmic1_ldo5_vddaf: ldo5 {
regulator-name = "ldo5";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <4300000>;
};
cam_pmic1_ldo6_vddois: ldo6 {
regulator-name = "ldo6";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <4300000>;
};
cam_pmic1_ldo7_vddio: ldo7 {
regulator-name = "ldo7";
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <4300000>;
};
};
};
};

View file

@ -0,0 +1,367 @@
#include <dt-bindings/clock/qcom,audio-ext-clk.h>
#include <dt-bindings/sound/qcom,bolero-clk-rsc.h>
#include <dt-bindings/sound/audio-codec-port-types.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/gpio/gpio.h>
&cdc_dmic01_gpios {
status = "disabled";
};
&cdc_dmic23_gpios {
status = "disabled";
};
&rx_swr_gpios {
status = "okay";
};
&dai_mi2s0_rx {
status = "okay";
qcom,msm-mi2s-lines = <1>;
};
&dai_mi2s0_tx {
status = "okay";
qcom,msm-mi2s-lines = <0>;
};
&dai_mi2s1_rx {
status = "okay";
qcom,msm-mi2s-lines = <1>;
};
&dai_mi2s1_tx {
status = "okay";
qcom,msm-mi2s-lines = <2>;
};
&dai_mi2s2_rx {
status = "okay";
qcom,msm-mi2s-lines = <1>;
};
&dai_mi2s2_tx {
status = "okay";
qcom,msm-mi2s-lines = <0>;
};
&dai_mi2s3_rx {
status = "okay";
qcom,msm-mi2s-lines = <1>;
};
&dai_mi2s3_tx {
status = "okay";
qcom,msm-mi2s-lines = <0>;
};
&bolero {
qcom,num-macros = <3>;
qcom,bolero-version = <5>;
#address-cells = <1>;
#size-cells = <1>;
bolero-clk-rsc-mngr {
compatible = "qcom,bolero-clk-rsc-mngr";
qcom,fs-gen-sequence = <0x3000 0x1 0x1>, <0x3004 0x3 0x3>,
<0x3004 0x3 0x1>, <0x3080 0x2 0x2>;
qcom,rx_mclk_mode_muxsel = <0x0A5640D8>;
qcom,va_mclk_mode_muxsel = <0x0A7A0000>;
clock-names = "tx_core_clk", "tx_npl_clk", "rx_core_clk", "rx_npl_clk",
"va_core_clk", "va_npl_clk";
clocks = <&clock_audio_tx_1 0>, <&clock_audio_tx_2 0>,
<&clock_audio_rx_1 0>, <&clock_audio_rx_2 0>,
<&clock_audio_va_1 0>, <&clock_audio_va_2 0>;
};
va_macro: va-macro@A730000 {
compatible = "qcom,va-macro";
reg = <0xA730000 0x0>;
clock-names = "lpass_audio_hw_vote";
clocks = <&lpass_audio_hw_vote 0>;
qcom,va-dmic-sample-rate = <600000>;
qcom,default-clk-id = <TX_CORE_CLK>;
qcom,is-used-swr-gpio = <1>;
qcom,va-swr-gpios = <&va_swr_gpios>;
swr0: va_swr_master {
compatible = "qcom,swr-mstr";
qcom,is_wcd937x = <1>;
#address-cells = <2>;
#size-cells = <0>;
clock-names = "lpass_audio_hw_vote";
clocks = <&lpass_audio_hw_vote 0>;
qcom,swr_master_id = <3>;
qcom,swrm-hctl-reg = <0x0A7EC100>;
qcom,mipi-sdw-block-packing-mode = <1>;
swrm-io-base = <0xA740000 0x0>;
interrupts-extended =
<&wakegic 5 IRQ_TYPE_LEVEL_HIGH>,
<&tlmm 128 GPIO_ACTIVE_HIGH>;
interrupt-names = "swr_master_irq", "swr_wake_irq";
qcom,swr-num-ports = <3>;
qcom,swr-port-mapping = <1 SWRM_TX1_CH1 0x1>,
<1 SWRM_TX1_CH2 0x2>,
<1 SWRM_TX1_CH3 0x4>, <1 SWRM_TX1_CH4 0x8>,
<2 SWRM_TX2_CH1 0x1>, <2 SWRM_TX2_CH2 0x2>,
<2 SWRM_TX2_CH3 0x4>, <2 SWRM_TX2_CH4 0x8>,
<3 SWRM_TX3_CH1 0x1>, <3 SWRM_TX3_CH2 0x2>,
<3 SWRM_TX3_CH3 0x4>, <3 SWRM_TX3_CH4 0x8>;
qcom,swr-num-dev = <1>;
qcom,swr-phy-dev-addr = <0x0A 0x01170223>,
<0x08 0x58350223>,
<0x08 0x58350222>,
<0x08 0x58350221>,
<0x08 0x58350220>;
qcom,swr-clock-stop-mode0 = <1>;
qcom,swr-mstr-irq-wakeup-capable = <1>;
qcom,is-always-on = <1>;
wcd937x_tx_slave: wcd937x-tx-slave {
compatible = "qcom,wcd937x-slave";
reg = <0x0A 0x01170223>;
};
};
};
tx_macro: tx-macro@A620000 {
compatible = "qcom,tx-macro";
reg = <0xA620000 0x0>;
clock-names = "tx_core_clk", "tx_npl_clk";
clocks = <&clock_audio_tx_1 0>,
<&clock_audio_tx_2 0>;
qcom,tx-dmic-sample-rate = <2400000>;
qcom,is-used-swr-gpio = <0>;
};
rx_macro: rx-macro@A600000 {
compatible = "qcom,rx-macro";
reg = <0xA600000 0x0>;
clock-names = "rx_core_clk", "rx_npl_clk";
clocks = <&clock_audio_rx_1 0>,
<&clock_audio_rx_2 0>;
qcom,rx-swr-gpios = <&rx_swr_gpios>;
qcom,rx_mclk_mode_muxsel = <0xA5640D8>;
qcom,rx-bcl-pmic-params = /bits/ 8 <0x00 0x03 0x48>;
qcom,default-clk-id = <TX_CORE_CLK>;
swr1: rx_swr_master {
compatible = "qcom,swr-mstr";
#address-cells = <2>;
#size-cells = <0>;
clock-names = "lpass_audio_hw_vote";
clocks = <&lpass_audio_hw_vote 0>;
qcom,swr_master_id = <2>;
qcom,swrm-hctl-reg = <0x0A6A9098>;
qcom,mipi-sdw-block-packing-mode = <1>;
swrm-io-base = <0xA610000 0x0>;
interrupts = <GIC_SPI 297 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "swr_master_irq";
qcom,swr-num-ports = <6>;
qcom,swr-port-mapping = <1 HPH_L 0x1>,
<1 HPH_R 0x2>, <2 CLSH 0x1>,
<3 COMP_L 0x1>, <3 COMP_R 0x2>,
<4 LO 0x1>, <5 DSD_L 0x1>,
<5 DSD_R 0x2>, <6 PCM_OUT1 0x01>;
qcom,swr-num-dev = <1>;
qcom,swr-clock-stop-mode0 = <1>;
wcd937x_rx_slave: wcd937x-rx-slave {
compatible = "qcom,wcd937x-slave";
reg = <0x0A 0x01170224>;
};
};
};
wcd937x_codec: wcd937x-codec {
compatible = "qcom,wcd937x-codec";
qcom,split-codec = <1>;
qcom,rx_swr_ch_map = <0 HPH_L 0x1 0 HPH_L>,
<0 HPH_R 0x2 0 HPH_R>, <1 CLSH 0x1 0 CLSH>,
<2 COMP_L 0x1 0 COMP_L>, <2 COMP_R 0x2 0 COMP_R>,
<3 LO 0x1 0 LO>, <4 DSD_L 0x1 0 DSD_L>,
<4 DSD_R 0x2 0 DSD_R>;
qcom,tx_swr_ch_map = <0 ADC1 0x1 0 SWRM_TX1_CH1>,
<1 ADC2 0x1 0 SWRM_TX2_CH1>,
<1 ADC3 0x2 0 SWRM_TX2_CH2>,
<2 DMIC0 0x1 0 SWRM_TX1_CH4>,
<2 DMIC1 0x2 0 SWRM_TX2_CH1>,
<2 MBHC 0x4 0 SWRM_TX2_CH2>,
<3 DMIC2 0x1 0 SWRM_TX2_CH3>,
<3 DMIC3 0x2 0 SWRM_TX2_CH4>,
<3 DMIC4 0x4 0 SWRM_TX3_CH1>,
<3 DMIC5 0x8 0 SWRM_TX3_CH2>;
qcom,wcd-rst-gpio-node = <&wcd937x_rst_gpio>;
qcom,rx-slave = <&wcd937x_rx_slave>;
qcom,tx-slave = <&wcd937x_tx_slave>;
cdc-vdd-rxtx-supply = <&L11A>;
qcom,cdc-vdd-rxtx-voltage = <1800000 1800000>;
qcom,cdc-vdd-rxtx-current = <30000>;
cdc-vddpx-supply = <&L11A>;
qcom,cdc-vddpx-voltage = <1800000 1800000>;
qcom,cdc-vddpx-current = <30000>;
cdc-vdd-buck-supply = <&L14A>;
qcom,cdc-vdd-buck-voltage = <1800000 1800000>;
qcom,cdc-vdd-buck-current = <650000>;
cdc-vdd-mic-bias-supply = <&BOB>;
qcom,cdc-vdd-mic-bias-voltage = <3296000 3296000>;
qcom,cdc-vdd-mic-bias-current = <45000>;
qcom,cdc-micbias1-mv = <2800>;
qcom,cdc-micbias2-mv = <2800>;
qcom,cdc-micbias3-mv = <2800>;
qcom,cdc-static-supplies = "cdc-vdd-rxtx",
"cdc-vddpx",
"cdc-vdd-mic-bias";
qcom,cdc-on-demand-supplies = "cdc-vdd-buck";
};
};
&holi_snd {
qcom,model = "holi-9370_aw87xxx-snd-card";
qcom,wcn-btfm = <1>;
qcom,tdm-max-slots = <4>;
qcom,mi2s-audio-intf = <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",
"Analog Mic4", "MIC BIAS3",
"TX DMIC0", "Digital Mic0",
"TX DMIC0", "MIC BIAS1",
"TX DMIC1", "Digital Mic1",
"TX DMIC1", "MIC BIAS1",
"TX DMIC2", "Digital Mic2",
"TX DMIC2", "MIC BIAS3",
"TX DMIC3", "Digital Mic3",
"TX DMIC3", "MIC BIAS3",
"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",
"VA DMIC0", "Digital Mic0",
"VA DMIC1", "Digital Mic1",
"VA DMIC2", "Digital Mic2",
"VA DMIC3", "Digital Mic3",
"VA DMIC4", "Digital Mic4",
"VA DMIC5", "Digital Mic5",
"VA DMIC0", "VA MIC BIAS1",
"VA DMIC1", "VA MIC BIAS1",
"VA DMIC2", "VA MIC BIAS3",
"VA DMIC3", "VA MIC BIAS3";
qcom,msm-mbhc-hphl-swh = <1>;
qcom,msm-mbhc-gnd-swh = <1>;
asoc-codec = <&stub_codec>, <&bolero>,
<&wcd937x_codec>;
asoc-codec-names = "msm-stub-codec.1", "bolero_codec",
"wcd937x_codec";
qcom,msm_audio_ssr_devs = <&audio_apr>, <&q6core>, <&lpi_tlmm>,
<&bolero>;
qcom,msm-mbhc-hs-mic-max-threshold-mv = <2700>;
qcom,msm-mbhc-hs-mic-min-threshold-mv = <116>;
};
&qupv3_se8_i2c {
status = "ok"
aw887xx_smartpa_0: aw87xxx_pa@58 {
compatible = "awinic,aw87xxx_pa";
reg = <0x58>;
dev_index = < 0 >;
esd-enable = "true";
aw-rx-topo-id = <0x1000ff00>;
aw-rx-port-id = <0xB030>;
status = "okay";
};
aw887xx_smartpa_1: aw87xxx_pa@59 {
compatible = "awinic,aw87xxx_pa";
reg = <0x59>;
dev_index = < 1 >;
esd-enable = "true";
aw-rx-topo-id = <0x1000ff00>;
aw-rx-port-id = <0xB030>;
status = "okay";
};
};
&va_cdc_dma_0_tx {
qcom,msm-dai-is-island-supported = <1>;
};
&soc {
wcd937x_rst_gpio: msm_cdc_pinctrl@32 {
compatible = "qcom,msm-cdc-pinctrl";
pinctrl-names = "aud_active", "aud_sleep";
pinctrl-0 = <&wcd937x_reset_active>;
pinctrl-1 = <&wcd937x_reset_sleep>;
};
clock_audio_rx_1: rx_core_clk {
compatible = "qcom,audio-ref-clk";
qcom,codec-ext-clk-src = <AUDIO_LPASS_MCLK_4>;
qcom,codec-lpass-ext-clk-freq = <22579200>;
qcom,codec-lpass-clk-id = <0x30E>;
#clock-cells = <1>;
};
clock_audio_rx_2: rx_npl_clk {
compatible = "qcom,audio-ref-clk";
qcom,codec-ext-clk-src = <AUDIO_LPASS_MCLK_5>;
qcom,codec-lpass-ext-clk-freq = <22579200>;
qcom,codec-lpass-clk-id = <0x30F>;
#clock-cells = <1>;
};
clock_audio_tx_1: tx_core_clk {
compatible = "qcom,audio-ref-clk";
qcom,codec-ext-clk-src = <AUDIO_LPASS_MCLK_6>;
qcom,codec-lpass-ext-clk-freq = <19200000>;
qcom,codec-lpass-clk-id = <0x30C>;
#clock-cells = <1>;
};
clock_audio_tx_2: tx_npl_clk {
compatible = "qcom,audio-ref-clk";
qcom,codec-ext-clk-src = <AUDIO_LPASS_MCLK_7>;
qcom,codec-lpass-ext-clk-freq = <19200000>;
qcom,codec-lpass-clk-id = <0x30D>;
#clock-cells = <1>;
};
clock_audio_va_1: va_core_clk {
compatible = "qcom,audio-ref-clk";
qcom,codec-ext-clk-src = <AUDIO_LPASS_MCLK>;
qcom,codec-lpass-ext-clk-freq = <19200000>;
qcom,codec-lpass-clk-id = <0x30B>;
#clock-cells = <1>;
};
clock_audio_va_2: va_npl_clk {
compatible = "qcom,audio-ref-clk";
qcom,codec-ext-clk-src = <AUDIO_LPASS_MCLK_8>;
qcom,codec-lpass-ext-clk-freq = <19200000>;
qcom,codec-lpass-clk-id = <0x310>;
#clock-cells = <1>;
};
};
&adsp_loader {
nvmem-cells = <&adsp_variant>;
nvmem-cell-names = "adsp_variant";
adsp-fw-names = "adsp2";
adsp-fw-bit-values = <0x1>;
};