diff mbox series

[2/2] arm64: dts: hisilicon: Add reset properties for HI6220 I2C and SPI

Message ID 20190309015635.5401-3-manivannan.sadhasivam@linaro.org
State New
Headers show
Series Handle I2C and SPI reset on HI6220 SoC | expand

Commit Message

Manivannan Sadhasivam March 9, 2019, 1:56 a.m. UTC
Both I2C and SPI needs to be taken out of reset before being used. Earlier,
we relied on the bootloader to do the job but a more cleaner approach would
be to handle the reset in kernel. Hence, add the reset properties to
the nodes to let the corresponding drivers take the peripherals out of
reset.

Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

---
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.17.1
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 108e2a4227f6..b071dc466374 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -730,6 +730,8 @@ 
 			pinctrl-0 = <&spi0_pmx_func &spi0_cfg_func>;
 			num-cs = <1>;
 			cs-gpios = <&gpio6 2 0>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_SSP>;
+			reset-names = "reset";
 			status = "disabled";
 		};
 
@@ -741,6 +743,8 @@ 
 			i2c-sda-hold-time-ns = <300>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_I2C0>;
+			reset-names = "reset";
 			status = "disabled";
 		};
 
@@ -752,6 +756,8 @@ 
 			i2c-sda-hold-time-ns = <300>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c1_pmx_func &i2c1_cfg_func>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_I2C1>;
+			reset-names = "reset";
 			status = "disabled";
 		};
 
@@ -763,6 +769,8 @@ 
 			i2c-sda-hold-time-ns = <300>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c2_pmx_func &i2c2_cfg_func>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_I2C2>;
+			reset-names = "reset";
 			status = "disabled";
 		};