arm/dts: Add sgm7220 configure

typec/sgm7220
Add sgm7220 driver configure

Change-Id: I4c5c7816Montana86680007e844d25b31ef3d3404c81
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2055215
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
chailu1 2021-08-31 14:00:34 +08:00 • committed by panyq6
commit b6189b30bf
2 changed files with 51 additions and 0 deletions

View file

@ -12,6 +12,7 @@
#include "blair-milanf-common-overlay.dtsi"
#include "blair-nopmi-moto-common-overlay.dtsi"
#include "tcpc_config.dtsi"
#include "sgm7220.dtsi"
#include "rt9426a.dtsi"
&usb0 {

50
qcom/sgm7220.dtsi Normal file
View file

@ -0,0 +1,50 @@
/*
* Copyright (c) 2021 motorola 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 tcpcA PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
&qupv3_se8_i2c {
status = "okay";
sgm7220@47 {
compatible = "sgm,usb_type_c_sgm7220";
reg = <0x47>;
status = "okay";
tcpc-dual,supported_modes = <0>; /* 0: dfp/ufp, */
/* 1: dfp, 2: ufp */
sgm7220-tcpc,name = "type_c_port0"; /* tcpc_device's name */
sgm7220-tcpc,role_def = <4>; /* 0: SNK Only, 1: SRC Only, 2: DRP, */
/* 3: Try.SRC, 4: Try.SNK */
sgm7220-tcpc,rp_level = <0>; /* 0: Default, 1: 1.5, 2: 3.0 */
sgm7220-tcpc,vconn_supply = <0>; /* 0: Never, 1: Always, */
/* 2: EMarkOnly, 3: StartOnly */
sgm7220,intr_gpio = <&tlmm 11 0x0>;
sgm7220,intr_gpio_num = <11>;
pinctrl-names = "default";
pinctrl-0 = <&sgm7220_int_n>;
};
};
&tlmm {
sgm7220_int_n: sgm7220_int_n {
mux {
pins = "gpio11";
function = "gpio";
};
config {
pins = "gpio11";
drive-strength = <2>;
bias-pull-up;
};
};
};