diff mbox

[09/10] ARM: sun4i: cubieboard: add an SPIdev device for testing

Message ID 1402890635-12342-10-git-send-email-emilio@elopez.com.ar (mailing list archive)
State Not Applicable
Headers show

Commit Message

Emilio López June 16, 2014, 3:50 a.m. UTC
---
 arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 12 ++++++++++++
 arch/arm/boot/dts/sun4i-a10.dtsi           |  7 +++++++
 2 files changed, 19 insertions(+)

Comments

Maxime Ripard June 25, 2014, 9:22 p.m. UTC | #1
On Mon, Jun 16, 2014 at 12:50:34AM -0300, Emilio López wrote:
> ---
>  arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 12 ++++++++++++
>  arch/arm/boot/dts/sun4i-a10.dtsi           |  7 +++++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> index 4684cbe..9b8d6b0 100644
> --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
> @@ -61,6 +61,18 @@
>  			status = "okay";
>  		};
>  
> +		spi0: spi@01c05000 {
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&spi0_pins_a>;
> +			status = "okay";
> +
> +			dac0: dh2228@2 {
> +				compatible = "rohm,dh2228fv";

Nope, this is not going to happen.

It's not even what's connected on this bus.

spidev isn't supposed to be described in DT, because it's just not
hardware related at all.

Maxime
Emilio López June 25, 2014, 9:33 p.m. UTC | #2
Hi Maxime,

El 25/06/14 18:22, Maxime Ripard escribió:
> On Mon, Jun 16, 2014 at 12:50:34AM -0300, Emilio López wrote:
>> ---
>>   arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 12 ++++++++++++
>>   arch/arm/boot/dts/sun4i-a10.dtsi           |  7 +++++++
>>   2 files changed, 19 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> index 4684cbe..9b8d6b0 100644
>> --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
>> @@ -61,6 +61,18 @@
>>   			status = "okay";
>>   		};
>>
>> +		spi0: spi@01c05000 {
>> +			pinctrl-names = "default";
>> +			pinctrl-0 = <&spi0_pins_a>;
>> +			status = "okay";
>> +
>> +			dac0: dh2228@2 {
>> +				compatible = "rohm,dh2228fv";
>
> Nope, this is not going to happen.
>
> It's not even what's connected on this bus.
>
> spidev isn't supposed to be described in DT, because it's just not
> hardware related at all.

Patches 9 and 10 are not intended to be merged, I am just sending them 
to facilitate testing. I suppose I could've been clearer on the cover 
letter, sorry.

Cheers,

Emilio
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
index 4684cbe..9b8d6b0 100644
--- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
+++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
@@ -61,6 +61,18 @@ 
 			status = "okay";
 		};
 
+		spi0: spi@01c05000 {
+			pinctrl-names = "default";
+			pinctrl-0 = <&spi0_pins_a>;
+			status = "okay";
+
+			dac0: dh2228@2 {
+				compatible = "rohm,dh2228fv";
+				reg = <2>;
+				spi-max-frequency = <100000>;
+			};
+		};
+
 		pinctrl@01c20800 {
 			led_pins_cubieboard: led_pins@0 {
 				allwinner,pins = "PH20", "PH21";
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index c66c39e..aefde20 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -535,6 +535,13 @@ 
 				allwinner,pull = <0>;
 			};
 
+			spi0_pins_a: spi0@0 {
+				allwinner,pins = "PI10", "PI11", "PI12", "PI13";
+				allwinner,function = "spi0";
+				allwinner,drive = <0>;
+				allwinner,pull = <0>;
+			};
+
 			emac_pins_a: emac0@0 {
 				allwinner,pins = "PA0", "PA1", "PA2",
 						"PA3", "PA4", "PA5", "PA6",