[RFC,5/8] ARM: socfpga: dts: Add Devkit A10-SR fields for Arria10
diff mbox

Message ID 1459278791-3646-6-git-send-email-tthayer@opensource.altera.com
State New
Headers show

Commit Message

tthayer@opensource.altera.com March 29, 2016, 7:13 p.m. UTC
From: Thor Thayer <tthayer@opensource.altera.com>

Add the Altera Arria10 System Resource node. This is a Multi-Function
device with GPIO and HWMON support.

Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
---
 arch/arm/boot/dts/socfpga_arria10.dtsi       |   15 +++++++++++++++
 arch/arm/boot/dts/socfpga_arria10_socdk.dtsi |   17 +++++++++++++++++
 2 files changed, 32 insertions(+)

Comments

Dinh Nguyen March 30, 2016, 5:42 p.m. UTC | #1
On Tue, 29 Mar 2016, tthayer@opensource.altera.com wrote:

> From: Thor Thayer <tthayer@opensource.altera.com>
> 
> Add the Altera Arria10 System Resource node. This is a Multi-Function
> device with GPIO and HWMON support.
> 
> Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
> 
> +		spi1: spi@ffda5000 {
> +			compatible = "snps,dw-apb-ssi";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0xffda5000 0x100>;
> +			interrupts = <0 102 4>;
> +			num-chipselect = <4>;
> +			bus-num = <0>;
> +			/*32bit_access;*/
> +			tx-dma-channel = <&pdma 16>;
> +			rx-dma-channel = <&pdma 17>;
> +			clocks = <&spi_m_clk>;
> +			status = "disabled";
> +		};
> +

I think you need to split this into 2 patches, 1 for adding the SPI nodes, and
the 2nd for adding the slave device.

BR,
Dinh
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
tthayer@opensource.altera.com March 31, 2016, 6:28 p.m. UTC | #2
On 03/30/2016 12:42 PM, Dinh Nguyen wrote:
> On Tue, 29 Mar 2016, tthayer@opensource.altera.com wrote:
>
>> From: Thor Thayer <tthayer@opensource.altera.com>
>>
>> Add the Altera Arria10 System Resource node. This is a Multi-Function
>> device with GPIO and HWMON support.
>>
>> Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
>>
>> +		spi1: spi@ffda5000 {
>> +			compatible = "snps,dw-apb-ssi";
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			reg = <0xffda5000 0x100>;
>> +			interrupts = <0 102 4>;
>> +			num-chipselect = <4>;
>> +			bus-num = <0>;
>> +			/*32bit_access;*/
>> +			tx-dma-channel = <&pdma 16>;
>> +			rx-dma-channel = <&pdma 17>;
>> +			clocks = <&spi_m_clk>;
>> +			status = "disabled";
>> +		};
>> +
>
> I think you need to split this into 2 patches, 1 for adding the SPI nodes, and
> the 2nd for adding the slave device.
>
> BR,
> Dinh
>

OK. Thanks for reviewing.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/arch/arm/boot/dts/socfpga_arria10.dtsi b/arch/arm/boot/dts/socfpga_arria10.dtsi
index 1c5e139..069b0a0 100644
--- a/arch/arm/boot/dts/socfpga_arria10.dtsi
+++ b/arch/arm/boot/dts/socfpga_arria10.dtsi
@@ -563,6 +563,21 @@ 
 			status = "disabled";
 		};
 
+		spi1: spi@ffda5000 {
+			compatible = "snps,dw-apb-ssi";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0xffda5000 0x100>;
+			interrupts = <0 102 4>;
+			num-chipselect = <4>;
+			bus-num = <0>;
+			/*32bit_access;*/
+			tx-dma-channel = <&pdma 16>;
+			rx-dma-channel = <&pdma 17>;
+			clocks = <&spi_m_clk>;
+			status = "disabled";
+		};
+
 		sdr: sdr@ffc25000 {
 			compatible = "syscon";
 			reg = <0xffcfb100 0x80>;
diff --git a/arch/arm/boot/dts/socfpga_arria10_socdk.dtsi b/arch/arm/boot/dts/socfpga_arria10_socdk.dtsi
index 567df98..095fd72 100644
--- a/arch/arm/boot/dts/socfpga_arria10_socdk.dtsi
+++ b/arch/arm/boot/dts/socfpga_arria10_socdk.dtsi
@@ -70,6 +70,23 @@ 
 	status = "okay";
 };
 
+&spi1 {
+	status = "okay";
+
+	a10_sysres: a10_sysres@0 {
+		compatible = "altr,altr-a10sr";
+		reg = <0>;
+		spi-max-frequency = <1000000>;
+
+		a10sr_gpio: a10sr_gpio {
+			compatible = "altr,a10sr-gpio";
+			gpio-controller;
+			#gpio-cells = <2>;
+			ngpios = <16>;
+		};
+	};
+};
+
 &i2c1 {
 	speed-mode = <0>;
 	status = "okay";