From 628582a98166e37a3ecaa3f8f91e6fcf2bfee725 Mon Sep 17 00:00:00 2001 From: Florian Agbuya Date: Fri, 15 Mar 2024 11:46:51 +0800 Subject: [PATCH] add spidev on device tree --- fast-servo/fast-servo.dts | 55 ++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/fast-servo/fast-servo.dts b/fast-servo/fast-servo.dts index 8727b71..87b4644 100644 --- a/fast-servo/fast-servo.dts +++ b/fast-servo/fast-servo.dts @@ -1,7 +1,7 @@ -# 0 "my_dts/system-top.dts" +# 0 "system-top.dts" # 0 "" # 0 "" -# 1 "my_dts/system-top.dts" +# 1 "system-top.dts" @@ -10,8 +10,8 @@ /dts-v1/; -# 1 "my_dts/zynq-7000.dtsi" 1 -# 15 "my_dts/zynq-7000.dtsi" +# 1 "zynq-7000.dtsi" 1 +# 15 "zynq-7000.dtsi" / { #address-cells = <1>; #size-cells = <1>; @@ -564,8 +564,8 @@ }; }; }; -# 10 "my_dts/system-top.dts" 2 -# 1 "my_dts/pcw.dtsi" 1 +# 10 "system-top.dts" 2 +# 1 "pcw.dtsi" 1 @@ -641,7 +641,48 @@ fclk-enable = <0x0>; ps-clk-frequency = <33333333>; }; -# 11 "my_dts/system-top.dts" 2 +# 11 "system-top.dts" 2 +# 1 "system-user.dtsi" 1 + + +&spi0 { + is-decoded-cs = <1>; + num-cs = <4>; + + spidev@1 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <50000000>; + reg = <1>; + }; + + spidev@2 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <50000000>; + reg = <2>; + }; + + spidev@3 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <50000000>; + reg = <3>; + }; + + spidev@4 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <50000000>; + reg = <4>; + }; +}; + +&spi1 { + + spidev@0 { + compatible = "rohm,dh2228fv"; + spi-max-frequency = <50000000>; + reg = <0>; + }; +}; +# 12 "system-top.dts" 2 / { model = "Sinara Fast Servo board"; chosen {