Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
134 lines
3.5 KiB
Devicetree
134 lines
3.5 KiB
Devicetree
/*
|
||
* Copyright (C) 2018 MediaTek Inc.
|
||
*
|
||
* This program is free software; you can redistribute it and/or modify
|
||
* it under the terms of the GNU General Public License 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 http://www.gnu.org/licenses/gpl-2.0.html for more details.
|
||
*/
|
||
|
||
/ {
|
||
mt6360_typec: type_c_port0 {
|
||
mt-tcpc,name = "type_c_port0"; /* tcpc_device's name */
|
||
/* 0: Unknown, 1: SNK, 2: SRC, 3: DRP, 4: Try.SRC, 5: Try.SNK */
|
||
mt-tcpc,role_def = <5>;
|
||
mt-tcpc,rp_level = <1>; /* 0: Default, 1: 1.5, 2: 3.0 */
|
||
/* 0: Never, 1: Always, 2: EMarkOnly, 3: StartOnly */
|
||
mt-tcpc,vconn_supply = <1>;
|
||
#if (CONFIG_MTK_GAUGE_VERSION == 30)
|
||
/* the number of notifier supply */
|
||
mt-tcpc,notifier_supply_num = <3>;
|
||
#else
|
||
/* the number of notifier supply */
|
||
mt-tcpc,notifier_supply_num = <2>;
|
||
#endif
|
||
mt6360pd,intr_gpio = <&pio 24 0x0>;
|
||
mt6360pd,intr_gpio_num = <24>;
|
||
mt6360pd,pcb_gpio = <&pio 16 0x0>;
|
||
mt6360pd,pcb_gpio_num = <16>;
|
||
/* 0: gpio low as phone, 1: gpio high as phone */
|
||
mt6360pd,pcb_gpio_polarity = <0>;
|
||
interrupt-parent = <&mt6360_pmu>;
|
||
interrupts = <64 0>;
|
||
interrupt-names = "usbid_evt";
|
||
pd-data {
|
||
pd,vid = <0x29cf>;
|
||
pd,pid = <0x6360>;
|
||
pd,source-cap-ext = <0x636029cf 0x00000000 0x00000000
|
||
0x00000000 0x00000000 0x07000000>;
|
||
pd,mfrs = "RichtekTCPC";
|
||
|
||
/*
|
||
* VSAFE5V = 0, MAX_POWER = 1, CUSTOM = 2,
|
||
* MAX_POWER_LV = 0x21, MAX_POWER_LVIC = 0x31
|
||
* MAX_POWER_HV = 0x41, MAX_POWER_HVIC = 0x51
|
||
*/
|
||
pd,charging_policy= <0x31>;
|
||
|
||
pd,source-pdo-size = <1>;
|
||
pd,source-pdo-data = <0x00019096>; /* 5V, 1500 mA */
|
||
pd,sink-pdo-size = <1>;
|
||
pd,sink-pdo-data = <0x000190c8>;
|
||
|
||
/*
|
||
* No DP, host + device
|
||
* pd,id-vdo-size = <6>;
|
||
* pd,id-vdo-data = <0xd14029cf 0x0 0x63600000
|
||
0x41800000 0x0 0x21800000>;
|
||
* With DP
|
||
* pd,id-vdo-size = <6>;
|
||
* pd,id-vdo-data = <0xd54029cf 0x0 0x63600000
|
||
0x41800000 0x0 0x21800000>;
|
||
*/
|
||
|
||
pd,id-vdo-size = <6>;
|
||
pd,id-vdo-data = <0xd54029cf 0x0 0x63600000
|
||
0x41800000 0x0 0x21800000>;
|
||
|
||
bat,nr = <1>;
|
||
bat-info0 {
|
||
bat,vid = <0x29cf>;
|
||
bat,pid = <0x6360>;
|
||
bat,mfrs = "bat1";
|
||
bat,design_cap = <3000>;
|
||
};
|
||
};
|
||
dpm_caps {
|
||
local_dr_power;
|
||
local_dr_data;
|
||
// local_ext_power;
|
||
local_usb_comm;
|
||
// local_usb_suspend;
|
||
// local_high_cap;
|
||
// local_give_back;
|
||
local_no_suspend;
|
||
local_vconn_supply;
|
||
|
||
// attemp_discover_cable_dfp;
|
||
attemp_enter_dp_mode;
|
||
attemp_discover_cable;
|
||
attemp_discover_id;
|
||
|
||
/* 0: disable, 1: prefer_snk, 2: prefer_src */
|
||
pr_check = <0>;
|
||
// pr_reject_as_source;
|
||
// pr_reject_as_sink;
|
||
// pr_check_gp_source;
|
||
// pr_check_gp_sink;
|
||
|
||
/* 0: disable, 1: prefer_ufp, 2: prefer_dfp */
|
||
dr_check = <0>;
|
||
// dr_reject_as_dfp;
|
||
// dr_reject_as_ufp;
|
||
};
|
||
displayport {
|
||
/* connection type = "both", "ufp_d", "dfp_d" */
|
||
1st_connection = "dfp_d";
|
||
2nd_connection = "dfp_d";
|
||
signal,dp_v13;
|
||
//signal,dp_gen2;
|
||
//usbr20_not_used;
|
||
typec,receptacle;
|
||
ufp_d {
|
||
//pin_assignment,mode_a;
|
||
//pin_assignment,mode_b;
|
||
//pin_assignment,mode_c;
|
||
//pin_assignment,mode_d;
|
||
//pin_assignment,mode_e;
|
||
};
|
||
dfp_d {
|
||
//pin_assignment,mode_a;
|
||
//pin_assignment,mode_b;
|
||
pin_assignment,mode_c;
|
||
pin_assignment,mode_d;
|
||
pin_assignment,mode_e;
|
||
//pin_assignment,mode_f;
|
||
};
|
||
};
|
||
};
|
||
};
|