ARM: dts: aspeed: Modify Laanyang BMC device tree
PATCH v4 1/1 ARM: dts: aspeed: Modify Laanyang BMC device tree
Modify Lanyang dts and add lanyang initial in aspeed.c
--- arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts | 13 ++++++------- arch/arm/mach-aspeed/aspeed.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +6 -7
@@ -1,4 +1,4 @@ -/dts-v1/; +/dts-v3/; #include "aspeed-g5.dtsi" #include <dt-bindings/gpio/aspeed-gpio.h>
@@ -302,18 +302,17 @@ }; &gpio { - line_apss_reset { - gpio-hog; - gpios = <ASPEED_GPIO(E, 4) GPIO_ACTIVE_HIGH>; - output-high; - line-name = "BMC_APSS_RESET_N"; - }; + }; &vuart { status = "okay"; }; +&gfx { + status = "okay"; +}; + &pinctrl { aspeed,external-nodes = <&gfx &lhc>; };
arch/arm/mach-aspeed/aspeed.c +17 -0
@@ -238,6 +238,21 @@ static void __init do_romulus_setup(void)writel (reg & ~BIT (4 ),AST_IO (AST_BASE_LPC |0x98 )); } +static void __init do_lanyang_setup (void ) +{ +unsigned long reg; + +do_common_setup (); + +/* Disable default behavior of UART1 being held in reset by LPCRST#. +* By releasing UART1 from being controlled by LPC reset, it becomes +* immediately available regardless of the host being up. +*/ + reg =readl (AST_IO (AST_BASE_LPC |0x98 )); +/* Clear "Enable UART1 reset source from LPC" */ +writel (reg & ~BIT (4 ),AST_IO (AST_BASE_LPC |0x98 )); +} +#define SCU_PASSWORD 0x1688A8A8static void __init aspeed_init_early (void )
@@ -275,6 +290,8 @@ static void __init aspeed_init_early(void)do_witherspoon_setup ();if (of_machine_is_compatible ("ibm,romulus-bmc" ))do_romulus_setup (); +if (of_machine_is_compatible ("inventec,lanyang-bmc" )) +do_lanyang_setup (); }static void __init aspeed_map_io (void )
Signature · 1 line
2.9.3
Quoted 3 lines · Ken Chen
Modify Lanyang dts and add lanyang initial in
aspeed.cSigned-off-by Ken Chen <[email protected]>
Quoted 12 lines
---
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts | 13 ++++++------- arch/arm/mach-aspeed/aspeed.c | 17 +++++++++++++++++2 files changed, 23 insertions(+), 7 deletions(-)arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +1
-1@@ -1,4 +1,4 @@ -/dts-v1/; +/dts-v3/;
Quoted 1 line
Was this necessary? What do we get from the change?
Cheers,
Andrew
Quoted 61 lines
#include "
aspeed-g5.dtsi"
#include <dt-bindings/gpio/aspeed-gpio.h>arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +0
-0@@ -302,18 +302,17 @@ };
&gpio {arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts line 310
Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +0
-6- line_apss_reset { - gpio-hog; - gpios = <ASPEED_GPIO(E, 4) GPIO_ACTIVE_HIGH>; - output-high; - line-name = "BMC_APSS_RESET_N"; - };+
};
&vuart {Quoted 1 line
status = "okay";
};
+&gfx {
+ status = "okay";arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +2
-0+}; +&pinctrl {
Quoted 1 line
aspeed,external-nodes = <&gfx &lhc>;
};
arch/arm/mach-aspeed/aspeed.c +0
-0@@ -238,6 +238,21 @@ static void __init do_romulus_setup(void) writel(reg & ~BIT(4), AST_IO(AST_BASE_LPC | 0x98)); }arch/arm/mach-aspeed/aspeed.c +15
-0+static void __init do_lanyang_setup (void ) +{ + unsigned long reg; + + do_common_setup(); + + /* Disable default behavior of UART1 being held in reset by LPCRST#. + * By releasing UART1 from being controlled by LPC reset, it becomes + * immediately available regardless of the host being up. + */ + reg = readl(AST_IO(AST_BASE_LPC | 0x98)); + /* Clear "Enable UART1 reset source from LPC" */ + writel(reg & ~BIT(4), AST_IO(AST_BASE_LPC | 0x98)); +} +Quoted 1 line
#define
SCU_PASSWORD0x1688A8A8
static void__initaspeed_init_early(void)arch/arm/mach-aspeed/aspeed.c +2
-0@@ -275,6 +290,8 @@ static void __init aspeed_init_early(void) > do_witherspoon_setup(); > if (of_machine_is_compatible("ibm,romulus-bmc")) > do_romulus_setup(); + if (of_machine_is_compatible("inventec,lanyang-bmc")) + do_lanyang_setup(); }
static void__initaspeed_map_io(void)
Joel Stanley
maintainerQuoted 12 lines · Andrew Jeffery
Quoted 3 lines · Ken Chen
Modify Lanyang dts and add lanyang initial in
aspeed.cSigned-off-by Ken Chen <[email protected]>Acked-by Andrew Jeffery <[email protected]>Quoted 5 lines
--- arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts | 13 ++++++------- arch/arm/mach-aspeed/aspeed.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-)
Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts line 2
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +1
-1@@ -1,4 +1,4 @@ -/dts-v1/; +/dts-v3/;Was this necessary? What do we get from the change?
This string should be left alone. I will fix that when applying.
Quoted 7 lines
Quoted 7 lines
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +0
-0#include "aspeed-g5.dtsi" #include <dt-bindings/gpio/aspeed-gpio.h>@@ -302,18 +302,17 @@ }; &gpio {
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts line 312
Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +1
-0> - line_apss_reset { > - gpio-hog; > - gpios = <ASPEED_GPIO(E, 4) GPIO_ACTIVE_HIGH>; > - output-high; > - line-name = "BMC_APSS_RESET_N"; > - }; + };
You can remove this node now that is it empty. I will fix that when applying.
Thanks for the patch! I have applied this to dev-4.7.
Cheers,
Joel
Quoted 47 lines
Quoted 47 lines
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +4
-0&vuart { > status = "okay"; }; +&gfx { + status = "okay"; +}; + &pinctrl {Quoted 1 line
aspeed,external-nodes = <&gfx &lhc>;};
arch/arm/mach-aspeed/aspeed.c +15
-0@@ -238,6 +238,21 @@ static void __init do_romulus_setup(void)writel (reg & ~BIT (4 ),AST_IO (AST_BASE_LPC |0x98 )); } +static void __init do_lanyang_setup (void ) +{ +unsigned long reg; + +do_common_setup (); + +/* Disable default behavior of UART1 being held in reset by LPCRST#. +* By releasing UART1 from being controlled by LPC reset, it becomes +* immediately available regardless of the host being up. +*/ + reg =readl (AST_IO (AST_BASE_LPC |0x98 )); +/* Clear "Enable UART1 reset source from LPC" */ +writel (reg & ~BIT (4 ),AST_IO (AST_BASE_LPC |0x98 )); +} +Quoted 1 line
#define
SCU_PASSWORD0x1688A8A8static void
__initaspeed_init_early(void)arch/arm/mach-aspeed/aspeed.c +2
-0@@ -275,6 +290,8 @@ static void __init aspeed_init_early(void) > do_witherspoon_setup(); > if (of_machine_is_compatible("ibm,romulus-bmc")) >do_romulus_setup (); +if (of_machine_is_compatible ("inventec,lanyang-bmc" )) +do_lanyang_setup (); }static void __init aspeed_map_io (void )