* [PATCH u-boot v2019.04-aspeed-openbmc v2] ARM: dts: aspeed: add Delta AHE-50DC BMC
@ 2022-05-11 22:05 Zev Weiss
2022-05-12 4:40 ` Joel Stanley
0 siblings, 1 reply; 4+ messages in thread
From: Zev Weiss @ 2022-05-11 22:05 UTC (permalink / raw)
To: Joel Stanley, openbmc; +Cc: Andrew Jeffery, Ryan Chen, Zev Weiss
The Delta AHE-50DC Open19 power shelf uses a pair of AST1250 BMCs that
are mostly compatible with the existing ast2400-evb device tree, with
a couple small tweaks for the serial console UART and ethernet MACs.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
Changes since v1 [0]:
- Disabled spi1, which this system doesn't use [Joel]
[0] https://lore.kernel.org/openbmc/20220414210045.26480-1-zev@bewilderbeest.net/
arch/arm/dts/Makefile | 1 +
arch/arm/dts/ast2400-ahe-50dc.dts | 38 +++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+)
create mode 100644 arch/arm/dts/ast2400-ahe-50dc.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index a79f885f54fb..3515100c65ce 100755
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -676,6 +676,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \
dtb-$(CONFIG_ARCH_ASPEED) += \
ast2400-evb.dtb \
+ ast2400-ahe-50dc.dtb \
ast2500-evb.dtb \
ast2600a0-evb.dtb \
ast2600a1-evb.dtb \
diff --git a/arch/arm/dts/ast2400-ahe-50dc.dts b/arch/arm/dts/ast2400-ahe-50dc.dts
new file mode 100644
index 000000000000..d5e6f1989586
--- /dev/null
+++ b/arch/arm/dts/ast2400-ahe-50dc.dts
@@ -0,0 +1,38 @@
+/dts-v1/;
+
+#include "ast2400-evb.dts"
+
+/ {
+ model = "Delta AHE-50DC BMC";
+ compatible = "delta,ahe-50dc-bmc", "aspeed,ast2400-evb", "aspeed,ast2400";
+
+ chosen {
+ stdout-path = &uart3;
+ };
+};
+
+&uart5 {
+ status = "disabled";
+};
+
+&uart3 {
+ u-boot,dm-pre-reloc;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_txd3_default &pinctrl_rxd3_default>;
+};
+
+&mac0 {
+ status = "disabled";
+};
+
+&mac1 {
+ status = "okay";
+ phy-mode = "rgmii";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
+};
+
+&spi1 {
+ status = "disabled";
+};
--
2.35.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH u-boot v2019.04-aspeed-openbmc v2] ARM: dts: aspeed: add Delta AHE-50DC BMC
2022-05-11 22:05 [PATCH u-boot v2019.04-aspeed-openbmc v2] ARM: dts: aspeed: add Delta AHE-50DC BMC Zev Weiss
@ 2022-05-12 4:40 ` Joel Stanley
2022-05-12 4:54 ` Joel Stanley
0 siblings, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2022-05-12 4:40 UTC (permalink / raw)
To: Zev Weiss; +Cc: Andrew Jeffery, OpenBMC Maillist, Ryan Chen
On Wed, 11 May 2022 at 22:05, Zev Weiss <zev@bewilderbeest.net> wrote:
>
> The Delta AHE-50DC Open19 power shelf uses a pair of AST1250 BMCs that
> are mostly compatible with the existing ast2400-evb device tree, with
> a couple small tweaks for the serial console UART and ethernet MACs.
>
> Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
> ---
>
> Changes since v1 [0]:
> - Disabled spi1, which this system doesn't use [Joel]
Thanks, applied.
>
> [0] https://lore.kernel.org/openbmc/20220414210045.26480-1-zev@bewilderbeest.net/
>
> arch/arm/dts/Makefile | 1 +
> arch/arm/dts/ast2400-ahe-50dc.dts | 38 +++++++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+)
> create mode 100644 arch/arm/dts/ast2400-ahe-50dc.dts
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index a79f885f54fb..3515100c65ce 100755
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -676,6 +676,7 @@ dtb-$(CONFIG_ARCH_BCM6858) += \
>
> dtb-$(CONFIG_ARCH_ASPEED) += \
> ast2400-evb.dtb \
> + ast2400-ahe-50dc.dtb \
> ast2500-evb.dtb \
> ast2600a0-evb.dtb \
> ast2600a1-evb.dtb \
> diff --git a/arch/arm/dts/ast2400-ahe-50dc.dts b/arch/arm/dts/ast2400-ahe-50dc.dts
> new file mode 100644
> index 000000000000..d5e6f1989586
> --- /dev/null
> +++ b/arch/arm/dts/ast2400-ahe-50dc.dts
> @@ -0,0 +1,38 @@
> +/dts-v1/;
> +
> +#include "ast2400-evb.dts"
> +
> +/ {
> + model = "Delta AHE-50DC BMC";
> + compatible = "delta,ahe-50dc-bmc", "aspeed,ast2400-evb", "aspeed,ast2400";
> +
> + chosen {
> + stdout-path = &uart3;
> + };
> +};
> +
> +&uart5 {
> + status = "disabled";
> +};
> +
> +&uart3 {
> + u-boot,dm-pre-reloc;
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_txd3_default &pinctrl_rxd3_default>;
> +};
> +
> +&mac0 {
> + status = "disabled";
> +};
> +
> +&mac1 {
> + status = "okay";
> + phy-mode = "rgmii";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
> +};
> +
> +&spi1 {
> + status = "disabled";
> +};
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH u-boot v2019.04-aspeed-openbmc v2] ARM: dts: aspeed: add Delta AHE-50DC BMC
2022-05-12 4:40 ` Joel Stanley
@ 2022-05-12 4:54 ` Joel Stanley
2022-05-12 8:34 ` Zev Weiss
0 siblings, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2022-05-12 4:54 UTC (permalink / raw)
To: Zev Weiss; +Cc: Andrew Jeffery, OpenBMC Maillist, Ryan Chen
On Thu, 12 May 2022 at 04:40, Joel Stanley <joel@jms.id.au> wrote:
>
> On Wed, 11 May 2022 at 22:05, Zev Weiss <zev@bewilderbeest.net> wrote:
> >
> > The Delta AHE-50DC Open19 power shelf uses a pair of AST1250 BMCs that
> > are mostly compatible with the existing ast2400-evb device tree, with
> > a couple small tweaks for the serial console UART and ethernet MACs.
> >
> > Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
> > ---
> >
> > Changes since v1 [0]:
> > - Disabled spi1, which this system doesn't use [Joel]
>
> Thanks, applied.
I have a script I use for testing:
```
#!/bin/bash
set -e
OBJ=ast2400-obj
CONFIG=evb-ast2400_defconfig
: ${DTB:=ast2400-evb}
IMG="$OBJ/test.img"
make -j8 O="$OBJ" -s clean
make -j8 O="$OBJ" -j8 -s $CONFIG
CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make -j8 O="$OBJ" -j8
DEVICE_TREE="$DTB" -s
size "$OBJ/u-boot"
cp "$OBJ/u-boot.bin" "$OBJ/test.img"
truncate -s 32M "$OBJ/test.img"
echo "$CONFIG build complete"
echo "qemu-system-arm -M palmetto-bmc -nographic -drive
file=$IMG,if=mtd,format=raw"
```
DTB=ast2400-ahe-50dc ./build-ast2400.sh
When I boot it in qemu, there's no output:
qemu-system-arm -M palmetto-bmc -nographic -drive
file=ast2400-obj/test.img,if=mtd,format=raw
Have I missed something?
ah, when I boot with -d guest_errors,unimp I see an infinite number of:
aspeed_soc.io: unimplemented device read (size 1, offset 0x18e014)
That's UART3, which is your stdout for this board. I guess we can't
boot test in qemu without some changes.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH u-boot v2019.04-aspeed-openbmc v2] ARM: dts: aspeed: add Delta AHE-50DC BMC
2022-05-12 4:54 ` Joel Stanley
@ 2022-05-12 8:34 ` Zev Weiss
0 siblings, 0 replies; 4+ messages in thread
From: Zev Weiss @ 2022-05-12 8:34 UTC (permalink / raw)
To: Joel Stanley; +Cc: Andrew Jeffery, OpenBMC Maillist, Ryan Chen
On Wed, May 11, 2022 at 09:54:40PM PDT, Joel Stanley wrote:
> On Thu, 12 May 2022 at 04:40, Joel Stanley <joel@jms.id.au> wrote:
> >
> > On Wed, 11 May 2022 at 22:05, Zev Weiss <zev@bewilderbeest.net> wrote:
> > >
> > > The Delta AHE-50DC Open19 power shelf uses a pair of AST1250 BMCs that
> > > are mostly compatible with the existing ast2400-evb device tree, with
> > > a couple small tweaks for the serial console UART and ethernet MACs.
> > >
> > > Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
> > > ---
> > >
> > > Changes since v1 [0]:
> > > - Disabled spi1, which this system doesn't use [Joel]
> >
> > Thanks, applied.
>
> I have a script I use for testing:
> ```
> #!/bin/bash
>
> set -e
>
> OBJ=ast2400-obj
> CONFIG=evb-ast2400_defconfig
> : ${DTB:=ast2400-evb}
> IMG="$OBJ/test.img"
>
> make -j8 O="$OBJ" -s clean
> make -j8 O="$OBJ" -j8 -s $CONFIG
> CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make -j8 O="$OBJ" -j8
> DEVICE_TREE="$DTB" -s
> size "$OBJ/u-boot"
>
> cp "$OBJ/u-boot.bin" "$OBJ/test.img"
> truncate -s 32M "$OBJ/test.img"
>
> echo "$CONFIG build complete"
> echo "qemu-system-arm -M palmetto-bmc -nographic -drive
> file=$IMG,if=mtd,format=raw"
> ```
>
> DTB=ast2400-ahe-50dc ./build-ast2400.sh
>
> When I boot it in qemu, there's no output:
> qemu-system-arm -M palmetto-bmc -nographic -drive
> file=ast2400-obj/test.img,if=mtd,format=raw
>
> Have I missed something?
>
> ah, when I boot with -d guest_errors,unimp I see an infinite number of:
>
> aspeed_soc.io: unimplemented device read (size 1, offset 0x18e014)
>
> That's UART3, which is your stdout for this board. I guess we can't
> boot test in qemu without some changes.
Ah -- I'd never actually tried booting this one with qemu, but yeah,
that makes sense.
After a little experimentation, with the below hacks to qemu it produces
the expected output -- I expect there's some better way to override the
default uart setting, but a qom-set (even with -S) was too late to take
effect (and apparently too early with --preconfig), and after spending a
few fruitless minutes trying to figure out a way to do it via a
command-line argument I gave up and hard-coded it, just for the sake of
an expedient proof of concept.
Zev
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index babf405777df..4bad40400007 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -1106,6 +1106,7 @@ static void aspeed_machine_palmetto_class_init(ObjectClass *oc, void *data)
amc->spi_model = "mx25l25635f";
amc->num_cs = 1;
amc->i2c_init = palmetto_bmc_i2c_init;
+ amc->uart_default = ASPEED_DEV_UART3;
mc->default_ram_size = 256 * MiB;
mc->default_cpus = mc->min_cpus = mc->max_cpus =
aspeed_soc_num_cpus(amc->soc_name);
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
index 198b6b7effed..6c1f18f7b42c 100644
--- a/hw/arm/aspeed_soc.c
+++ b/hw/arm/aspeed_soc.c
@@ -48,6 +48,7 @@ static const hwaddr aspeed_soc_ast2400_memmap[] = {
[ASPEED_DEV_ETH1] = 0x1E660000,
[ASPEED_DEV_ETH2] = 0x1E680000,
[ASPEED_DEV_UART1] = 0x1E783000,
+ [ASPEED_DEV_UART3] = 0x1E78e000,
[ASPEED_DEV_UART5] = 0x1E784000,
[ASPEED_DEV_VUART] = 0x1E787000,
[ASPEED_DEV_SDRAM] = 0x40000000,
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-12 8:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 22:05 [PATCH u-boot v2019.04-aspeed-openbmc v2] ARM: dts: aspeed: add Delta AHE-50DC BMC Zev Weiss
2022-05-12 4:40 ` Joel Stanley
2022-05-12 4:54 ` Joel Stanley
2022-05-12 8:34 ` Zev Weiss
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.