arm: AT91: device-tree fixes for AT91SAM9G45
Subsystems (2)
cover arm: AT91: device-tree fixes for AT91SAM9G45
Two simple fixes for AT91SAM9G45-based board.
Micha? Miros?aw (2):
arm: AT91: enable ac97 controller for at91sam9g45
arm: AT91: fix DT duplicate node name
arch/arm/boot/dts/at91sam9g45.dtsi | 21 ++++++++++++++ arch/arm/boot/dts/at91sam9m10g45ek.dts | 52 ++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 24 deletions(-)
Signature · 1 line
2.11.0
PATCH 1/2 arm: AT91: enable ac97 controller for at91sam9g45
Add AC97 controller node as present on AT91SAM9G45-EKES board.
--- arch/arm/boot/dts/at91sam9g45.dtsi | 21 +++++++++++++++++++++ arch/arm/boot/dts/at91sam9m10g45ek.dts | 4 ++++ 2 files changed, 25 insertions(+)
arch/arm/boot/dts/at91sam9g45.dtsi +21 -0
@@ -846,6 +846,16 @@ }; }; + ac97 { + pinctrl_ac97: ac97-0 { + atmel,pins = + <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 */ + AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD7 periph A AC97TX pin */ + AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD6 periph A AC97RX pin */ + }; + }; + pioA: gpio at fffff200 { compatible = "atmel,at91rm9200-gpio"; reg = <0xfffff200 0x200>;
@@ -965,6 +975,17 @@ status = "disabled"; }; + ac97: sound at fffac000 { + compatible = "atmel,at91sam9263-ac97c"; + reg = <0xfffac000 0x4000>; + interrupts = <24 IRQ_TYPE_LEVEL_HIGH 5>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ac97>; + clocks = <&ac97_clk>; + clock-names = "ac97_clk"; + status = "disabled"; + }; + macb0: ethernet at fffbc000 { compatible = "cdns,at91sam9260-macb", "cdns,macb"; reg = <0xfffbc000 0x100>;
arch/arm/boot/dts/at91sam9m10g45ek.dts +4 -0
@@ -47,6 +47,10 @@ status = "okay"; }; + ac97: sound at fffac000 { + status = "okay"; + }; + macb0: ethernet at fffbc000 { phy-mode = "rmii"; status = "okay";
Signature · 1 line
2.11.0
PATCH 1/2 arm: AT91: enable ac97 controller for at91sam9g45
Hi,
I have that in my tree which seems similar enough:
https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git/commit/?h=at91-dt&id=1a9f9af07e806dd4d5df109c61ac0d5c74fe9b32
Quoted 65 lines · Micha? Miros?aw
Add AC97 controller node as present on AT91SAM9G45-EKES board.
Signed-off-by Micha? Miros?aw <[email protected]>--- arch/arm/boot/dts/at91sam9g45.dtsi | 21 +++++++++++++++++++++ arch/arm/boot/dts/at91sam9m10g45ek.dts | 4 ++++ 2 files changed, 25 insertions(+)arch/arm/boot/dts/at91sam9g45.dtsi +21
-0@@ -846,6 +846,16 @@ }; }; + ac97 { + pinctrl_ac97: ac97-0 { + atmel,pins = + <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 */ + AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PD7 periph A AC97TX pin */ + AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* PD6 periph A AC97RX pin */ + }; + }; + pioA: gpio at fffff200 { compatible = "atmel,at91rm9200-gpio"; reg = <0xfffff200 0x200>;@@ -965,6 +975,17 @@ status = "disabled"; }; + ac97: sound at fffac000 { + compatible = "atmel,at91sam9263-ac97c"; + reg = <0xfffac000 0x4000>; + interrupts = <24 IRQ_TYPE_LEVEL_HIGH 5>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ac97>; + clocks = <&ac97_clk>; + clock-names = "ac97_clk"; + status = "disabled"; + }; + macb0: ethernet at fffbc000 { compatible = "cdns,at91sam9260-macb", "cdns,macb"; reg = <0xfffbc000 0x100>;arch/arm/boot/dts/at91sam9m10g45ek.dts +4
-0@@ -47,6 +47,10 @@ status = "okay"; }; + ac97: sound at fffac000 { + status = "okay"; + }; + macb0: ethernet at fffbc000 { phy-mode = "rmii"; status = "okay";Signature · 1 line
2.11.0
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 2/2 arm: AT91: fix DT duplicate node name
In reply to Michał MirosławFix following warning at bootup:
device-tree: Duplicate name in fb at 0x00500000, renamed to "display#1"
--- arch/arm/boot/dts/at91sam9m10g45ek.dts | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-)
arch/arm/boot/dts/at91sam9m10g45ek.dts +24 -24
@@ -223,30 +223,6 @@ fb0: fb at 0x00500000 { display = <&display0>; status = "okay"; - - display0: display { - bits-per-pixel = <32>; - atmel,lcdcon-backlight; - atmel,dmacon = <0x1>; - atmel,lcdcon2 = <0x80008002>; - atmel,guard-time = <9>; - atmel,lcd-wiring-mode = "RGB"; - - display-timings { - native-mode = <&timing0>; - timing0: timing0 { - clock-frequency = <9000000>; - hactive = <480>; - vactive = <272>; - hback-porch = <1>; - hfront-porch = <1>; - vback-porch = <40>; - vfront-porch = <1>; - hsync-len = <45>; - vsync-len = <1>; - }; - }; - }; }; nand0: nand at 40000000 {
@@ -293,6 +269,30 @@ }; }; + display0: display { + bits-per-pixel = <32>; + atmel,lcdcon-backlight; + atmel,dmacon = <0x1>; + atmel,lcdcon2 = <0x80008002>; + atmel,guard-time = <9>; + atmel,lcd-wiring-mode = "RGB"; + + display-timings { + native-mode = <&timing0>; + timing0: 480x272 { + clock-frequency = <9000000>; + hactive = <480>; + vactive = <272>; + hback-porch = <1>; + hfront-porch = <1>; + vback-porch = <40>; + vfront-porch = <1>; + hsync-len = <45>; + vsync-len = <1>; + }; + }; + }; + pwmleds { compatible = "pwm-leds";
Signature · 1 line
2.11.0
Nicolas Ferre
maintainerPATCH 2/2 arm: AT91: fix DT duplicate node name
Quoted 14 lines · Micha? Miros?aw
Fix following warning at bootup:
device-tree: Duplicate name in fb at
0x00500000, renamed to "display#1"Signed-off-by Micha? Miros?aw <[email protected]>--- arch/arm/boot/dts/at91sam9m10g45ek.dts | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-)arch/arm/boot/dts/at91sam9m10g45ek.dts +0
-0
arch/arm/boot/dts/at91sam9m10g45ek.dts line 227
Quoted 5 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +0
-2@@ -223,30 +223,6 @@ fb0: fb at 0x00500000 { display = <&display0>; status = "okay"; - - display0: display {
Micha?, thanks for your patch.
Actually the DT binding requires this:Documentation/devicetree/bindings/video/atmel,lcdc.txt
So it's somehow a bigger issue.
Moreover, several boards have exactly the same arrangement than the at91sam9m10g45ek, so you probably need to modify them all at the same time.
After a brief look at drivers/video/fbdev/atmel_lcdfb.c it seems that the name of the node is not so much important, so we can modify it (something like display0: lcd-display {}) .
I suggest that you modify the binding, the board files affected and re-submit a patch.
Best regards,
Quoted 57 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +24
-22- bits-per-pixel = <32>; - atmel,lcdcon-backlight; - atmel,dmacon = <0x1>; - atmel,lcdcon2 = <0x80008002>; - atmel,guard-time = <9>; - atmel,lcd-wiring-mode = "RGB"; - - display-timings { - native-mode = <&timing0>; - timing0: timing0 { - clock-frequency = <9000000>; - hactive = <480>; - vactive = <272>; - hback-porch = <1>; - hfront-porch = <1>; - vback-porch = <40>; - vfront-porch = <1>; - hsync-len = <45>; - vsync-len = <1>; - }; - }; - }; }; nand0: nand at 40000000 {@@ -293,6 +269,30 @@ }; }; + display0: display { + bits-per-pixel = <32>; + atmel,lcdcon-backlight; + atmel,dmacon = <0x1>; + atmel,lcdcon2 = <0x80008002>; + atmel,guard-time = <9>; + atmel,lcd-wiring-mode = "RGB"; + + display-timings { + native-mode = <&timing0>; + timing0: 480x272 { + clock-frequency = <9000000>; + hactive = <480>; + vactive = <272>; + hback-porch = <1>; + hfront-porch = <1>; + vback-porch = <40>; + vfront-porch = <1>; + hsync-len = <45>; + vsync-len = <1>; + }; + }; + }; + pwmleds { compatible = "pwm-leds";
Signature · 1 line
Nicolas Ferre
PATCH 2/2 arm: AT91: fix DT duplicate node name
Quoted 30 lines · Nicolas Ferre
Quoted 14 lines · Micha? Miros?aw
Fix following warning at bootup:
device-tree: Duplicate name in fb at
0x00500000, renamed to "display#1"Signed-off-by Micha? Miros?aw <[email protected]>--- arch/arm/boot/dts/at91sam9m10g45ek.dts | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-)arch/arm/boot/dts/at91sam9m10g45ek.dts +0
-0arch/arm/boot/dts/at91sam9m10g45ek.dts line 227
Quoted 5 lines
arch/arm/boot/dts/at91sam9m10g45ek.dts +0
-2@@ -223,30 +223,6 @@ fb0: fb at 0x00500000 { display = <&display0>; status = "okay"; - - display0: display {Micha?, thanks for your patch.
Actually the DT binding requires this:
Documentation/devicetree/bindings/video/atmel,lcdc.txtSo it's somehow a bigger issue.
Moreover, several boards have exactly the same arrangement than the at91sam9m10g45ek, so you probably need to modify them all at the same time.
Quoted 6 lines
After a brief look at
drivers/video/fbdev/atmel_lcdfb.cit seems that the name of the node is not so much important, so we can modify it (something like display0: lcd-display {}) .I suggest that you modify the binding, the board files affected and re-submit a patch.
It looks like the binding documentation is wrong. The driver code does
of_parse_phandle(np, "display", 0);
so it expects a phandle, not a node.
Best Regards,
Micha? Miros?aw