From 681cf47b6bc76af244934a5e4dc6e1aa26298903 Mon Sep 17 00:00:00 2001 From: Viken Dadhaniya Date: Mon, 5 Sep 2022 11:18:44 +0530 Subject: [PATCH] ARM: dts: msm: Add i2c slave dtsi node Add dtsi properties and pinctrl configuration for I2C slave for cinder soc. Change-Id: I9a628f61c999c06c3d0d0db15000003bcf16311e --- qcom/cinder-pinctrl.dtsi | 41 ++++++++++++++++++++++++++++++++++++++++ qcom/cinder.dtsi | 13 +++++++++++++ 2 files changed, 54 insertions(+) diff --git a/qcom/cinder-pinctrl.dtsi b/qcom/cinder-pinctrl.dtsi index e8beb101..2ac9ab1c 100644 --- a/qcom/cinder-pinctrl.dtsi +++ b/qcom/cinder-pinctrl.dtsi @@ -1976,4 +1976,45 @@ }; }; }; + + i2c_slave_pins: i2c_slave_pins { + i2c_slave_sda_active: i2c_slave_sda_active { + mux { + pins = "gpio132"; + function = "smb_dat"; + }; + + config { + pins = "gpio132"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + i2c_slave_scl_active: i2c_slave_scl_active { + mux { + pins = "gpio133"; + function = "smb_clk"; + }; + + config { + pins = "gpio133"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + i2c_slave_sleep: i2c_slave_sleep { + mux { + pins = "gpio132", "gpio133"; + function = "gpio"; + }; + + config { + pins = "gpio132", "gpio133"; + drive-strength = <2>; + bias-disable; + }; + }; + }; }; diff --git a/qcom/cinder.dtsi b/qcom/cinder.dtsi index 9c556c92..42526edb 100644 --- a/qcom/cinder.dtsi +++ b/qcom/cinder.dtsi @@ -1526,6 +1526,19 @@ clock-names = "xo", "alternate"; clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_GPLL0>; }; + + i2c_slave: i2c_slave@88ca000 { + compatible = "qcom,i2c-slave"; + reg = <0x088ca000 0x64>; + interrupt-names = "i2c_s_irq"; + interrupts = ; + clock-names = "sm_bus_xo_clk", "sm_bus_ahb_clk"; + clocks = <&gcc GCC_SM_BUS_XO_CLK>, <&gcc GCC_SM_BUS_AHB_CLK>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c_slave_sda_active>, <&i2c_slave_scl_active>; + pinctrl-1 = <&i2c_slave_sleep>; + status = "disabled"; + }; }; &firmware {