Skip to content

Commit

Permalink
Initial support for Garrison system.
Browse files Browse the repository at this point in the history
Garrison is an IBM branded OpenPOWER system.

devtree stub.
SCU setup.

Signed-off-by: Joel Stanley <joel@jms.id.au>
  • Loading branch information
Brad Bishop authored and Joel Stanley committed May 11, 2016
1 parent 4a45cba commit 1d0df28
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,8 @@ dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
dtb-$(CONFIG_MACH_OPP_PALMETTO_BMC) += \
aspeed-bmc-opp-palmetto.dtb \
aspeed-bmc-opp-barreleye.dtb \
aspeed-bmc-opp-firestone.dtb
aspeed-bmc-opp-firestone.dtb \
aspeed-bmc-opp-garrison.dtb
endif

dtstree := $(srctree)/$(src)
Expand Down
85 changes: 85 additions & 0 deletions arch/arm/boot/dts/aspeed-bmc-opp-garrison.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/dts-v1/;

#include "ast2400.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
model = "Garrison BMC";
compatible = "ibm,garrison-bmc", "aspeed,ast2400";

ahb {
mac0: ethernet@1e660000 {
use-nc-si;
no-hw-checksum;
};

fmc@1e620000 {
reg = < 0x1e620000 0x94
0x20000000 0x02000000 >;
#address-cells = <1>;
#size-cells = <0>;
compatible = "aspeed,fmc";
flash@0 {
reg = < 0 >;
compatible = "jedec,spi-nor" ;
/*
* Possibly required props:
* spi-max-frequency = <>
* spi-tx-bus-width = <>
* spi-rx-bus-width = <>
* m25p,fast-read
* spi-cpol if inverse clock polarity (CPOL)
* spi-cpha if shifted clock phase (CPHA)
*/
#include "aspeed-bmc-opp-flash-layout.dtsi"
};
};
spi@1e630000 {
reg = < 0x1e630000 0x18
0x30000000 0x02000000 >;
#address-cells = <1>;
#size-cells = <0>;
compatible = "aspeed,smc";
flash {
reg = < 0 >;
compatible = "jedec,spi-nor" ;
label = "pnor";
/* spi-max-frequency = <>; */
/* m25p,fast-read; */
};
};
apb {
i2c: i2c@1e78a040 {
i2c4: i2c-bus@140 {
occ@50 {
compatible = "ibm,occ-i2c";
reg = <0x50>;
};
};
i2c5: i2c-bus@180 {
occ@50 {
compatible = "ibm,occ-i2c";
reg = <0x50>;
};
};
i2c10: i2c-bus@3c0 {
status = "okay";
};
i2c11: i2c-bus@400 {
status = "okay";

rtc@68 {
compatible = "dallas,ds3231";
reg = <0x68>;
};
};
i2c12: i2c-bus@440 {
status = "okay";
};
i2c13: i2c-bus@480 {
status = "okay";
};
};
};
};
};
15 changes: 15 additions & 0 deletions arch/arm/mach-aspeed/aspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,18 @@ static void __init do_palmetto_setup(void)
writel(0x01C0007F, AST_IO(AST_BASE_SCU | 0x88));
}

static void __init do_garrison_setup(void)
{
do_common_setup();

/* Setup PNOR address mapping for 64M flash */
writel(0x30000C00, AST_IO(AST_BASE_LPC | 0x88));
writel(0xFC0003FF, AST_IO(AST_BASE_LPC | 0x8C));

/* SCU setup */
writel(0xd7000000, AST_IO(AST_BASE_SCU | 0x88));
}

#define SCU_PASSWORD 0x1688A8A8

static void __init aspeed_init_early(void)
Expand Down Expand Up @@ -207,6 +219,9 @@ static void __init aspeed_init_early(void)
do_barreleye_setup();
if (of_machine_is_compatible("tyan,palmetto-bmc"))
do_palmetto_setup();
if (of_machine_is_compatible("ibm,garrison-bmc"))
do_garrison_setup();

}

static void __init aspeed_map_io(void)
Expand Down

0 comments on commit 1d0df28

Please sign in to comment.