From 475fc0bd748f881a0f93ffec476ff2cb7d0022be Mon Sep 17 00:00:00 2001
From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Thu, 11 Mar 2021 15:28:21 +0100
Subject: [PATCH] WIP: arm64: dts: ti: iot2050: Add node for generic spidev

This allows to use mcu_spi0 via userspace spidev.

TODO: Clarify official binding for rohm,dh2228fv. So far it is only a
de-facto binding, done by some in-tree DTs and the driver. Maybe model
as overlay instead?

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
index 51e82e08550a..fcf877d3d504 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi
@@ -682,6 +682,12 @@ &mcu_spi0 {
 	#address-cells = <1>;
 	#size-cells= <0>;
 	ti,pindir-d0-out-d1-in;
+
+	spidev@0 {
+		compatible = "rohm,dh2228fv";
+		spi-max-frequency = <20000000>;
+		reg = <0>;
+	};
 };
 
 &tscadc0 {
