From: Lokesh Vutla Date: Thu, 6 May 2021 11:14:58 +0000 (+0530) Subject: arm: dts: am642-evm: Add I2C nodes X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=45b7a9fc08778b7063ce50301d3ccdd8a7c2a9b5;p=u-boot.git arm: dts: am642-evm: Add I2C nodes Add I2C nodes for AM64 and enable pinmux for i2c0 for reading eeprom data. Signed-off-by: Lokesh Vutla --- diff --git a/arch/arm/dts/k3-am64-main.dtsi b/arch/arm/dts/k3-am64-main.dtsi index ff65857d1e..4b6cd6cc90 100644 --- a/arch/arm/dts/k3-am64-main.dtsi +++ b/arch/arm/dts/k3-am64-main.dtsi @@ -446,4 +446,48 @@ clocks = <&k3_clks 78 0>; clock-names = "gpio"; }; + + main_i2c0: i2c@20000000 { + compatible = "ti,am64-i2c", "ti,omap4-i2c"; + reg = <0x0 0x20000000 0x0 0x100>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clock-names = "fck"; + clocks = <&k3_clks 102 2>; + power-domains = <&k3_pds 102 TI_SCI_PD_EXCLUSIVE>; + }; + + main_i2c1: i2c@20010000 { + compatible = "ti,am64-i2c", "ti,omap4-i2c"; + reg = <0x0 0x20010000 0x0 0x100>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clock-names = "fck"; + clocks = <&k3_clks 103 2>; + power-domains = <&k3_pds 103 TI_SCI_PD_EXCLUSIVE>; + }; + + main_i2c2: i2c@20020000 { + compatible = "ti,am64-i2c", "ti,omap4-i2c"; + reg = <0x00 0x20020000 0x0 0x100>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clock-names = "fck"; + clocks = <&k3_clks 104 2>; + power-domains = <&k3_pds 104 TI_SCI_PD_EXCLUSIVE>; + }; + + main_i2c3: i2c@20030000 { + compatible = "ti,am64-i2c", "ti,omap4-i2c"; + reg = <0x00 0x20030000 0x0 0x100>; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + clock-names = "fck"; + clocks = <&k3_clks 105 2>; + power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>; + }; }; diff --git a/arch/arm/dts/k3-am64.dtsi b/arch/arm/dts/k3-am64.dtsi index 0ae8c844c4..fde63463ca 100644 --- a/arch/arm/dts/k3-am64.dtsi +++ b/arch/arm/dts/k3-am64.dtsi @@ -28,6 +28,8 @@ serial6 = &main_uart4; serial7 = &main_uart5; serial8 = &main_uart6; + i2c0 = &main_i2c0; + i2c1 = &main_i2c1; }; chosen { }; diff --git a/arch/arm/dts/k3-am642-evm-u-boot.dtsi b/arch/arm/dts/k3-am642-evm-u-boot.dtsi index 34e75ded13..6b0117a58a 100644 --- a/arch/arm/dts/k3-am642-evm-u-boot.dtsi +++ b/arch/arm/dts/k3-am642-evm-u-boot.dtsi @@ -28,6 +28,24 @@ }; }; +&main_pmx0 { + u-boot,dm-spl; + main_i2c0_pins_default: main-i2c0-pins-default { + u-boot,dm-spl; + pinctrl-single,pins = < + AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */ + AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */ + >; + }; +}; + +&main_i2c0 { + u-boot,dm-spl; + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c0_pins_default>; + clock-frequency = <400000>; +}; + &main_uart0 { u-boot,dm-spl; };