mirror of
https://github.com/physwizz/a155-U-u1.git
synced 2025-08-25 21:42:22 +00:00
586 lines
15 KiB
Plaintext
586 lines
15 KiB
Plaintext
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
|
/*
|
|
* Copyright (c) 2021 MediaTek Inc.
|
|
*/
|
|
#include <dt-bindings/iio/mt635x-auxadc.h>
|
|
|
|
&pwrap {
|
|
pmic: mt6366 {
|
|
compatible = "mediatek,mt6366";
|
|
interrupt-controller;
|
|
#interrupt-cells = <2>;
|
|
|
|
|
|
mt63xx_debug {
|
|
compatible = "mediatek,mt63xx-debug";
|
|
};
|
|
|
|
mt63xx-oc-debug {
|
|
compatible = "mediatek,mt63xx-oc-debug";
|
|
};
|
|
|
|
pmic_efuse: mt6358-efuse {
|
|
compatible = "mediatek,mt6358-efuse";
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
mt6366_thermal_efuse: mt6366_e_data {
|
|
reg = <0x40 12>;
|
|
};
|
|
};
|
|
|
|
accdet: accdet {
|
|
compatible = "mediatek,mt6358-accdet";
|
|
accdet-name = "mt6358-accdet";
|
|
/* accdet micbias voltage: 0x07,2.7v;0x05,2.5v;0x02,1.9v */
|
|
accdet-mic-vol = <6>;
|
|
headset-mode-setting = <0x500 0x500 1 0x1f0 0x800 0x800 0x20 0x44>;
|
|
accdet-plugout-debounce = <1>;
|
|
/*1:ACC mode, 2:low cost without in bias, 6:low cost with in bias*/
|
|
accdet-mic-mode = <1>;
|
|
/* eint_level_trigger: 8,LEVEL_LOW(DEF) ;4,LV_HIGH;others,LV_LOW */
|
|
headset-eint-level-pol = <8>;
|
|
/*0--MD_MAX--UP_MAX--DW_MAX*/
|
|
headset-three-key-threshold = <0 80 220 400>;
|
|
headset-three-key-threshold-CDD = <0 121 192 600>;
|
|
/*0--MD_MAX--VOICE_MAX--UP_MAX--DW_MAX*/
|
|
headset-four-key-threshold = <0 58 121 192 400>;
|
|
io-channels = <&pmic_auxadc AUXADC_ACCDET>;
|
|
io-channel-names = "pmic_accdet";
|
|
nvmem = <&pmic_efuse>;
|
|
nvmem-names = "mt63xx-accdet-efuse";
|
|
mediatek,accdet-pmic = <0x66>;
|
|
status = "okay";
|
|
};
|
|
|
|
pmic_auxadc: mt635x-auxadc {
|
|
compatible = "mediatek,pmic-auxadc",
|
|
"mediatek,mt6358-auxadc";
|
|
#io-channel-cells = <1>;
|
|
/* efuse offset from mt6358 */
|
|
cali-efuse-offset = <1>;
|
|
nvmem = <&pmic_efuse>;
|
|
nvmem-names = "auxadc_efuse_dev";
|
|
|
|
batadc {
|
|
channel = <AUXADC_BATADC>;
|
|
resistance-ratio = <3 1>;
|
|
avg-num = <128>;
|
|
};
|
|
vcdt {
|
|
channel = <AUXADC_VCDT>;
|
|
};
|
|
bat_temp {
|
|
channel = <AUXADC_BAT_TEMP>;
|
|
resistance-ratio = <2 1>;
|
|
};
|
|
chip_temp {
|
|
channel = <AUXADC_CHIP_TEMP>;
|
|
};
|
|
vcore_temp {
|
|
channel = <AUXADC_VCORE_TEMP>;
|
|
};
|
|
vproc_temp {
|
|
channel = <AUXADC_VPROC_TEMP>;
|
|
};
|
|
vgpu_temp {
|
|
channel = <AUXADC_VGPU_TEMP>;
|
|
};
|
|
accdet {
|
|
channel = <AUXADC_ACCDET>;
|
|
};
|
|
dcxo_volt {
|
|
channel = <AUXADC_VDCXO>;
|
|
resistance-ratio = <3 2>;
|
|
};
|
|
tsx_temp {
|
|
channel = <AUXADC_TSX_TEMP>;
|
|
avg-num = <128>;
|
|
};
|
|
hpofs_cal {
|
|
channel = <AUXADC_HPOFS_CAL>;
|
|
avg-num = <256>;
|
|
};
|
|
dcxo_temp {
|
|
channel = <AUXADC_DCXO_TEMP>;
|
|
avg-num = <16>;
|
|
};
|
|
vbif {
|
|
channel = <AUXADC_VBIF>;
|
|
resistance-ratio = <2 1>;
|
|
};
|
|
imp {
|
|
channel = <AUXADC_IMP>;
|
|
resistance-ratio = <3 1>;
|
|
avg-num = <128>;
|
|
};
|
|
imix_r {
|
|
channel = <AUXADC_IMIX_R>;
|
|
val = <90>;
|
|
};
|
|
};
|
|
|
|
mt6366keys: mt6366keys {
|
|
compatible = "mediatek,mt6366-keys";
|
|
mediatek,long-press-mode = <2>;
|
|
power-off-time-sec = <0>;
|
|
power {
|
|
linux,keycodes = <116>;
|
|
wakeup-source;
|
|
};
|
|
home {
|
|
linux,keycodes = <115>;
|
|
};
|
|
};
|
|
|
|
mt6358regulator: mt6358regulator {
|
|
compatible = "mediatek,mt6358-regulator";
|
|
|
|
mt6358_vdram1_reg: buck_vdram1 {
|
|
regulator-name = "vdram1";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <2087500>;
|
|
regulator-enable-ramp-delay = <0>;
|
|
regulator-allowed-modes = <0 1>;
|
|
};
|
|
|
|
mt6358_vcore_reg: buck_vcore {
|
|
regulator-name = "vcore";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <200>;
|
|
regulator-always-on;
|
|
regulator-allowed-modes = <0 1>;
|
|
};
|
|
|
|
mt6358_vpa_reg: buck_vpa {
|
|
regulator-name = "vpa";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <3650000>;
|
|
regulator-enable-ramp-delay = <250>;
|
|
regulator-allowed-modes = <0 1>;
|
|
};
|
|
|
|
mt6358_vproc11_reg: buck_vproc11 {
|
|
regulator-name = "vproc11";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <200>;
|
|
regulator-always-on;
|
|
regulator-allowed-modes = <0 1>;
|
|
};
|
|
|
|
mt6358_vproc12_reg: buck_vproc12 {
|
|
regulator-name = "vproc12";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <200>;
|
|
regulator-always-on;
|
|
regulator-allowed-modes = <0 1>;
|
|
};
|
|
|
|
mt6358_vgpu_reg: buck_vgpu {
|
|
regulator-name = "vgpu";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <200>;
|
|
regulator-allowed-modes = <0 1>;
|
|
};
|
|
|
|
mt6358_vs2_reg: buck_vs2 {
|
|
regulator-name = "vs2";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <2087500>;
|
|
regulator-enable-ramp-delay = <0>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vmodem_reg: buck_vmodem {
|
|
regulator-name = "vmodem";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <900>;
|
|
regulator-always-on;
|
|
regulator-allowed-modes = <0 1>;
|
|
};
|
|
|
|
mt6358_vs1_reg: buck_vs1 {
|
|
regulator-name = "vs1";
|
|
regulator-min-microvolt = <1000000>;
|
|
regulator-max-microvolt = <2587500>;
|
|
regulator-enable-ramp-delay = <0>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vdram2_reg: ldo_vdram2 {
|
|
regulator-name = "vdram2";
|
|
regulator-min-microvolt = <600000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-enable-ramp-delay = <3300>;
|
|
};
|
|
|
|
mt6358_vsim1_reg: ldo_vsim1 {
|
|
regulator-name = "vsim1";
|
|
regulator-min-microvolt = <1700000>;
|
|
regulator-max-microvolt = <3100000>;
|
|
regulator-enable-ramp-delay = <540>;
|
|
};
|
|
|
|
mt6358_vibr_reg: ldo_vibr {
|
|
regulator-name = "vibr";
|
|
regulator-min-microvolt = <1200000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-enable-ramp-delay = <60>;
|
|
};
|
|
|
|
mt6358_vrf12_reg: ldo_vrf12 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vrf12";
|
|
regulator-min-microvolt = <1200000>;
|
|
regulator-max-microvolt = <1200000>;
|
|
regulator-enable-ramp-delay = <120>;
|
|
};
|
|
|
|
mt6358_vio18_reg: ldo_vio18 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vio18";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-enable-ramp-delay = <2700>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vusb_reg: ldo_vusb {
|
|
regulator-name = "vusb";
|
|
regulator-min-microvolt = <3000000>;
|
|
regulator-max-microvolt = <3100000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vcamio_reg: ldo_vcamio {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcamio";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-enable-ramp-delay = <325>;
|
|
};
|
|
|
|
mt6358_vcamd_reg: ldo_vcamd {
|
|
regulator-name = "vcamd";
|
|
regulator-min-microvolt = <900000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-enable-ramp-delay = <325>;
|
|
};
|
|
|
|
mt6358_vcn18_reg: ldo_vcn18 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcn18";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vfe28_reg: ldo_vfe28 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vfe28";
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <2800000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vsram_proc11_reg: ldo_vsram_proc11 {
|
|
regulator-name = "vsram_proc11";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <240>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vcn28_reg: ldo_vcn28 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcn28";
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <2800000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vsram_others_reg: ldo_vsram_others {
|
|
regulator-name = "vsram_others";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <240>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vsram_core_reg: ldo_vsram_core {
|
|
regulator-name = "vsram_core";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <240>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vsram_gpu_reg: ldo_vsram_gpu {
|
|
regulator-name = "vsram_gpu";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <240>;
|
|
};
|
|
|
|
mt6358_vxo22_reg: ldo_vxo22 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vxo22";
|
|
regulator-min-microvolt = <2200000>;
|
|
regulator-max-microvolt = <2200000>;
|
|
regulator-enable-ramp-delay = <120>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vefuse_reg: ldo_vefuse {
|
|
regulator-name = "vefuse";
|
|
regulator-min-microvolt = <1700000>;
|
|
regulator-max-microvolt = <1900000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vaux18_reg: ldo_vaux18 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vaux18";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vmch_reg: ldo_vmch {
|
|
regulator-name = "vmch";
|
|
regulator-min-microvolt = <2900000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-enable-ramp-delay = <60>;
|
|
};
|
|
|
|
mt6358_vbif28_reg: ldo_vbif28 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vbif28";
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <2800000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vsram_proc12_reg: ldo_vsram_proc12 {
|
|
regulator-name = "vsram_proc12";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
regulator-enable-ramp-delay = <240>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vcama1_reg: ldo_vcama1 {
|
|
regulator-name = "vcama1";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <3000000>;
|
|
regulator-enable-ramp-delay = <325>;
|
|
};
|
|
|
|
mt6358_vemc_reg: ldo_vemc {
|
|
regulator-name = "vemc";
|
|
regulator-min-microvolt = <2900000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-enable-ramp-delay = <60>;
|
|
};
|
|
|
|
mt6358_vio28_reg: ldo_vio28 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vio28";
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <2800000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_va12_reg: ldo_va12 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "va12";
|
|
regulator-min-microvolt = <1200000>;
|
|
regulator-max-microvolt = <1200000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vrf18_reg: ldo_vrf18 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vrf18";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-enable-ramp-delay = <120>;
|
|
};
|
|
|
|
mt6358_vcn33_bt_reg: ldo_vcn33_bt {
|
|
regulator-name = "vcn33_bt";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3500000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vcn33_wifi_reg: ldo_vcn33_wifi {
|
|
regulator-name = "vcn33_wifi";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3500000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vcama2_reg: ldo_vcama2 {
|
|
regulator-name = "vcama2";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <3000000>;
|
|
regulator-enable-ramp-delay = <325>;
|
|
};
|
|
|
|
mt6358_vmc_reg: ldo_vmc {
|
|
regulator-name = "vmc";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-enable-ramp-delay = <60>;
|
|
};
|
|
|
|
mt6358_vldo28_reg: ldo_vldo28 {
|
|
regulator-name = "vldo28";
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <3000000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
};
|
|
|
|
mt6358_vaud28_reg: ldo_vaud28 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vaud28";
|
|
regulator-min-microvolt = <2800000>;
|
|
regulator-max-microvolt = <2800000>;
|
|
regulator-enable-ramp-delay = <270>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
mt6358_vsim2_reg: ldo_vsim2 {
|
|
regulator-name = "vsim2";
|
|
regulator-min-microvolt = <1700000>;
|
|
regulator-max-microvolt = <3100000>;
|
|
regulator-enable-ramp-delay = <540>;
|
|
};
|
|
|
|
mt6358_vcore_sshub_reg: buck_vcore_sshub {
|
|
regulator-name = "vcore_sshub";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
};
|
|
|
|
mt6358_vsram_others_sshub_reg: ldo_vsram_others_sshub {
|
|
regulator-name = "vsram_others_sshub";
|
|
regulator-min-microvolt = <500000>;
|
|
regulator-max-microvolt = <1293750>;
|
|
};
|
|
|
|
mt6358_va09_reg: ldo_va09 {
|
|
regulator-name = "va09";
|
|
compatible = "regulator-fixed";
|
|
regulator-min-microvolt = <900000>;
|
|
regulator-max-microvolt = <900000>;
|
|
regulator-enable-ramp-delay = <264>;
|
|
/*by platform setting: regulator-boot-on;*/
|
|
};
|
|
|
|
mt6358_vmch_eint_high: VMCH_EINT_HIGH {
|
|
regulator-name = "mt6358_vmch_eint_high";
|
|
regulator-min-microvolt = <2900000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-enable-ramp-delay = <60>;
|
|
};
|
|
|
|
mt6358_vmch_eint_low: VMCH_EINT_LOW {
|
|
regulator-name = "mt6358_vmch_eint_low";
|
|
regulator-min-microvolt = <2900000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-enable-ramp-delay = <60>;
|
|
};
|
|
};
|
|
|
|
mt6366_clock_buffer: mt6366_clock_buffer {
|
|
compatible = "mediatek,clock_buffer";
|
|
mediatek,xo-mode-num = <4>;
|
|
mediatek,xo-buf-support = <1 1 1 1 0 0 1>;
|
|
mediatek,xo-buf-allow-control = <0 1 1 1 0 0 1>;
|
|
mediatek,xo-buf-name = "XO_SOC", "XO_WCN", "XO_NFC",
|
|
"XO_CEL", "RSV1", "RSV2",
|
|
"XO_EXT";
|
|
mediatek,dcxo-drv-curr-support;
|
|
mediatek,clkbuf-pmic-central-base;
|
|
|
|
mediatek,enable;
|
|
|
|
clkbuf_ctl = <&clock_buffer_ctrl>;
|
|
};
|
|
|
|
mt6358_dynamic_loading_throttling: mtk_dynamic_loading_throttling {
|
|
compatible = "mediatek,mt6358-dynamic_loading_throttling";
|
|
/*charger: mtk_charger_thread*/
|
|
/*mediatek,charger = <&charger>;*/
|
|
/*2600~2900mv ,one gear per 50mv*/
|
|
uvlo-level = <2600>;
|
|
io-channels = <&pmic_auxadc AUXADC_IMP>,
|
|
<&pmic_auxadc AUXADC_IMIX_R>,
|
|
<&pmic_auxadc AUXADC_BATADC>;
|
|
io-channel-names = "pmic_ptim",
|
|
"pmic_imix_r",
|
|
"pmic_batadc";
|
|
};
|
|
|
|
mt6358_lbat: pmic_lbat_service {
|
|
compatible = "mediatek,mt6358-lbat_service";
|
|
status = "disabled";
|
|
};
|
|
|
|
mt6358codec: mt6358codec {
|
|
compatible = "mediatek,mt6366-sound";
|
|
mediatek,dmic-mode = <0>;
|
|
mediatek,mic-type = <1>;
|
|
io-channels = <&pmic_auxadc AUXADC_HPOFS_CAL>;
|
|
io-channel-names = "pmic_hpofs_cal";
|
|
nvmem = <&pmic_efuse>;
|
|
nvmem-names = "pmic-hp-efuse";
|
|
reg_vaud28-supply = <&mt6358_vaud28_reg>;
|
|
};
|
|
|
|
mt6358rtc: mt6358rtc {
|
|
compatible = "mediatek,mt6358-rtc";
|
|
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
fg_init: fg_init {
|
|
reg = <0 0x1>;
|
|
};
|
|
fg_soc: fg_soc {
|
|
reg = <1 0x1>;
|
|
};
|
|
ext_32k: ext_32k {
|
|
reg = <2 0x1>;
|
|
bits = <6 1>;
|
|
};
|
|
};
|
|
|
|
mtk_gauge: mtk_gauge {
|
|
compatible = "mediatek,mt6358-gauge";
|
|
bootmode = <&chosen>;
|
|
io-channels = <&pmic_auxadc AUXADC_BAT_TEMP>,
|
|
<&pmic_auxadc AUXADC_BATADC>,
|
|
<&pmic_auxadc AUXADC_VBIF>,
|
|
<&pmic_auxadc AUXADC_IMP>,
|
|
<&pmic_auxadc AUXADC_IMIX_R>;
|
|
io-channel-names = "pmic_battery_temp",
|
|
"pmic_battery_voltage",
|
|
"pmic_bif_voltage",
|
|
"pmic_ptim_voltage",
|
|
"pmic_ptim_r";
|
|
nvmem-cells = <&fg_init>, <&fg_soc>;
|
|
nvmem-cell-names = "initialization", "state-of-charge";
|
|
};
|
|
|
|
};
|
|
};
|