diff mbox

ARM: at91: dts: add AC97 support for AT91SAM9G45

Message ID 20170618124049.6663-1-dmitry.rezvanov@yandex.ru (mailing list archive)
State New, archived
Headers show

Commit Message

Dmitry Rezvanov June 18, 2017, 12:40 p.m. UTC
Hi, Thanks for the comments, I'm still a newbie and this is my first patch.
I have made corrections in accordance with your recommendations.

P.S. Regarding compatible string - since there are no other changes in
the driver, I changed it to "atmel, at91sam9263-ac97c".
But in my opinion, it's a bit ... weird.
---

AT91SAM9G45 has an AC97 controller, but it is not described in the dts file.
This patch adds AC97 node in device tree.

Signed-off-by: Dmitry Rezvanov <dmitry.rezvanov@yandex.ru>
---
 arch/arm/boot/dts/at91sam9g45.dtsi     | 21 +++++++++++++++++++++
 arch/arm/boot/dts/at91sam9m10g45ek.dts |  4 ++++
 2 files changed, 25 insertions(+)

Comments

Alexandre Belloni July 29, 2017, 10:47 p.m. UTC | #1
On 18/06/2017 at 21:40:49 +0900, Dmitry Rezvanov wrote:
> Hi, Thanks for the comments, I'm still a newbie and this is my first patch.
> I have made corrections in accordance with your recommendations.
> 
> P.S. Regarding compatible string - since there are no other changes in
> the driver, I changed it to "atmel, at91sam9263-ac97c".
> But in my opinion, it's a bit ... weird.

Well, that is how it is done. Have a look at all hte rm9200 compatibles
in at91sam9g45.dtsi

> ---
> 
> AT91SAM9G45 has an AC97 controller, but it is not described in the dts file.
> This patch adds AC97 node in device tree.
> 
> Signed-off-by: Dmitry Rezvanov <dmitry.rezvanov@yandex.ru>
> ---
>  arch/arm/boot/dts/at91sam9g45.dtsi     | 21 +++++++++++++++++++++
>  arch/arm/boot/dts/at91sam9m10g45ek.dts |  4 ++++
>  2 files changed, 25 insertions(+)
> 

Applied, thanks.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index e567d5fd3f9d..b14fd3a43027 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -445,6 +445,16 @@ 
 				      >;
 
 				/* shared pinctrl settings */
+				ac97 {
+					pinctrl_ac97: ac97-0 {
+						atmel,pins =
+							<AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PD6 periph A AC97RX pin */
+							 AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PD7 periph A AC97TX pin */
+							 AT91_PIOD 8 AT91_PERIPH_A AT91_PINCTRL_NONE	/* PD8 periph A AC97FS pin */
+							 AT91_PIOD 9 AT91_PERIPH_A AT91_PINCTRL_NONE>;	/* PD9 periph A AC97CK pin */
+					};
+				};
+
 				adc0 {
 					pinctrl_adc0_adtrg: adc0_adtrg {
 						atmel,pins = <AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
@@ -1029,6 +1039,17 @@ 
 				status = "disabled";
 			};
 
+			ac97: sound@fffac000 {
+				compatible = "atmel,at91sam9263-ac97c";
+				reg = <0xfffac000 0x4000>;
+				interrupts = <24 IRQ_TYPE_LEVEL_HIGH 4>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_ac97>;
+				clocks = <&ac97_clk>;
+				clock-names = "ac97_clk";
+				status = "disabled";
+			};
+
 			adc0: adc@fffb0000 {
 				#address-cells = <1>;
 				#size-cells = <0>;
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 2400c99134f7..7ea6225c63ad 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -166,6 +166,10 @@ 
 				status = "okay";
 			};
 
+			ac97: sound@fffac000 {
+				status = "okay";
+			};
+
 			adc0: adc@fffb0000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <