From 2b49cfe5a295aa733e99de79014835d518d1fd73 Mon Sep 17 00:00:00 2001 From: Keerthy <j-keerthy@ti.com> Date: Thu, 17 Jun 2021 09:17:29 +0530 Subject: [PATCH] ina226: Porting to 5.10 branch Signed-off-by: Keerthy <j-keerthy@ti.com> --- .../dts/ti/k3-j721e-common-proc-board.dts | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts index 77d6f18f86872..72f37f447f786 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts @@ -288,6 +288,13 @@ J721E_IOPAD(0x22c, PIN_INPUT_PULLUP, 0) /* (AA6) I2C1_SDA */ >; }; + main_i2c2_pins_default: main-i2c2-pins-default { + pinctrl-single,pins = < + J721E_IOPAD(0x1c8, PIN_INPUT_PULLUP, 2) /* (AB5) SPI0_CLK.I2C2_SCL */ + J721E_IOPAD(0x1cc, PIN_INPUT_PULLUP, 2) /* (AA1) SPI0_D0.I2C2_SDA */ + >; + }; + main_i2c3_pins_default: main-i2c3-pins-default { pinctrl-single,pins = < J721E_IOPAD(0x270, PIN_INPUT_PULLUP, 4) /* (T26) MMC2_CLK.I2C3_SCL */ @@ -606,6 +613,14 @@ exp2: gpio@22 { gpio-controller; #gpio-cells = <2>; + p08-hog { + /* P10 - PM_I2C_CTRL_OE */ + gpio-hog; + gpios = <8 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "CTRL_PM_I2C_OE"; + }; + p09-hog { /* P11 - MCASP/TRACE_MUX_S0 */ gpio-hog; @@ -643,6 +658,108 @@ exp4: gpio@20 { }; }; +&main_i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c2_pins_default>; + clock-frequency = <400000>; + + ina226@40 { + compatible = "ti,ina226"; + reg = <0x40>; + shunt-resistor = <10000>; + }; + + ina226@41 { + compatible = "ti,ina226"; + reg = <0x41>; + shunt-resistor = <10000>; + }; + + ina226@42 { + compatible = "ti,ina226"; + reg = <0x42>; + shunt-resistor = <10000>; + }; + + ina226@43 { + compatible = "ti,ina226"; + reg = <0x43>; + shunt-resistor = <10000>; + }; + + ina226@44 { + compatible = "ti,ina226"; + reg = <0x44>; + shunt-resistor = <10000>; + }; + + ina226@45 { + compatible = "ti,ina226"; + reg = <0x45>; + shunt-resistor = <5000>; + }; + + ina226@46 { + compatible = "ti,ina226"; + reg = <0x46>; + shunt-resistor = <10000>; + }; + + ina226@47 { + compatible = "ti,ina226"; + reg = <0x47>; + shunt-resistor = <10000>; + }; + + ina226@48 { + compatible = "ti,ina226"; + reg = <0x48>; + shunt-resistor = <10000>; + }; + + ina226@49 { + compatible = "ti,ina226"; + reg = <0x49>; + shunt-resistor = <10000>; + }; + + ina226@4a { + compatible = "ti,ina226"; + reg = <0x4a>; + shunt-resistor = <10000>; + }; + + ina226@4b { + compatible = "ti,ina226"; + reg = <0x4b>; + shunt-resistor = <10000>; + }; + + ina226@4c { + compatible = "ti,ina226"; + reg = <0x4c>; + shunt-resistor = <10000>; + }; + + ina226@4d { + compatible = "ti,ina226"; + reg = <0x4d>; + shunt-resistor = <10000>; + }; + + ina226@4e { + compatible = "ti,ina226"; + reg = <0x4e>; + shunt-resistor = <10000>; + }; + + ina226@4f { + compatible = "ti,ina226"; + reg = <0x4f>; + shunt-resistor = <10000>; + }; +}; + &k3_clks { /* Confiure AUDIO_EXT_REFCLK2 pin as output */ pinctrl-names = "default"; -- GitLab