From patchwork Mon Jul 11 12:23:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangmin_phy@126.com X-Patchwork-Id: 1657808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=iQz/MPES; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ln87s1Vvcz9s09 for ; Tue, 19 Jul 2022 16:29:45 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Ln87s0JCnz3dsW for ; Tue, 19 Jul 2022 16:29:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=iQz/MPES; dkim-atps=neutral X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=126.com (client-ip=123.126.96.3; helo=mail-m963.mail.126.com; envelope-from=wangmin_phy@126.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=iQz/MPES; dkim-atps=neutral X-Greylist: delayed 1886 seconds by postgrey-1.36 at boromir; Mon, 11 Jul 2022 22:55:21 AEST Received: from mail-m963.mail.126.com (mail-m963.mail.126.com [123.126.96.3]) by lists.ozlabs.org (Postfix) with ESMTP id 4LhP4T63ysz3bw7; Mon, 11 Jul 2022 22:55:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=YED4X OFMfSQUREuGAuFmq6pq8tLgCjzUozBrrXGL4+A=; b=iQz/MPES+tTtCKWON0xWf qnBW78o8qvx/zZ3Hk02Z65fp2gTX+A+9quy9y/cDVIkMK9mRu4RfqL+qZHSCP1vu 58uo9lKxaNV+EsSde970818H3VjohrHVta7nudVNIlUuaXjJtE1CIO611WMN+o58 UCMZBEaU7R7wrA4xNkP8X0= Received: from localhost.localdomain (unknown [120.55.36.104]) by smtp8 (Coremail) with SMTP id NORpCgCHj3NFFsxifBzKHg--.10313S3; Mon, 11 Jul 2022 20:23:34 +0800 (CST) From: wangmin_phy@126.com To: openbmc@lists.ozlabs.org, linux-aspeed@lists.ozlabs.org, joel@jms.id.au Subject: [PATCH 1/1] ARM: dts: aspeed: Add device tree for Phytium's BMC Date: Mon, 11 Jul 2022 20:23:33 +0800 Message-Id: <20220711122333.385730-2-wangmin_phy@126.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220711122333.385730-1-wangmin_phy@126.com> References: <20220711122333.385730-1-wangmin_phy@126.com> MIME-Version: 1.0 X-CM-TRANSID: NORpCgCHj3NFFsxifBzKHg--.10313S3 X-Coremail-Antispam: 1Uf129KBjvJXoW3AFW7AF47tw47Aw1rZFW3GFg_yoW7Kr17pa y7uFWrGFWfXw4YgasxAFyvkF1rGw1rGFWIkrnFkFyUGrZI9as0v3y8KryxAr1DXFWUJw45 JFWrXr9rWFsrXw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jVdgAUUUUU= X-Originating-IP: [120.55.36.104] X-CM-SenderInfo: 5zdqwzhlqb1xb16rjloofrz/1tbiLQY7pVpD+0YdKwAAsn X-Mailman-Approved-At: Tue, 19 Jul 2022 16:26:55 +1000 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patrick@stwcx.xyz, liuyongpeng@phytium.com.cn, shuyiqi@phytium.com.cn, wangmin@phytium.com.cn Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" From: Min Wang The Phytium's BMC card is an ASPEED AST2500-based BMC for the hardware reference platform with Phytium's Processors Family. Signed-off-by: Min Wang --- arch/arm/boot/dts/Makefile | 3 +- .../boot/dts/aspeed-bmc-phytium-pomelo.dts | 302 ++++++++++++++++++ 2 files changed, 304 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 7e0934180724..e02cd800d45a 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1497,4 +1497,5 @@ dtb-$(CONFIG_ARCH_ASPEED) += \ aspeed-bmc-opp-zaius.dtb \ aspeed-bmc-portwell-neptune.dtb \ aspeed-bmc-quanta-q71l.dtb \ - aspeed-bmc-supermicro-x11spi.dtb + aspeed-bmc-supermicro-x11spi.dtb \ + aspeed-bmc-phytium-pomelo.dtb diff --git a/arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts b/arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts new file mode 100644 index 000000000000..a75017f22140 --- /dev/null +++ b/arch/arm/boot/dts/aspeed-bmc-phytium-pomelo.dts @@ -0,0 +1,302 @@ +// SPDX-License-Identifier: GPL-2.0+ +/dts-v1/; + +#include "aspeed-g5.dtsi" +#include + +/ { + model = "Phytium AST2500 BMC"; + compatible = "aspeed,ast2500"; + + aliases { + serial4 = &uart5; + }; + + chosen { + stdout-path = &uart5; + bootargs = "console=tty0 console=ttyS4,115200 earlyprintk"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x20000000>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + vga_memory: framebuffer@9c000000 { + no-map; + reg = <0x9c000000 0x04000000>; /* 64M */ + }; + + video_engine_memory: jpegbuffer { + size = <0x02000000>; /* 32M */ + alignment = <0x01000000>; + compatible = "shared-dma-pool"; + reusable; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + id-button { + label = "id-button"; + gpios = <&gpio ASPEED_GPIO(S, 2) GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + identify { + gpios = <&gpio ASPEED_GPIO(C, 6) GPIO_ACTIVE_LOW>; + }; + fault { + gpios = <&gpio ASPEED_GPIO(C, 7) GPIO_ACTIVE_LOW>; + }; + }; + + iio-hwmon { + compatible = "iio-hwmon"; + io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>, + <&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>, + <&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>; + }; +}; + +&adc { + status = "okay"; +}; + +&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + label = "bmc"; + spi-max-frequency = <50000000>; +#include "openbmc-flash-layout.dtsi" + }; +}; + +&spi1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi1_default>; + flash@0 { + status = "okay"; + m25p,fast-read; + label = "pnor"; + spi-max-frequency = <100000000>; + }; +}; + +&spi2 { + status = "okay"; +}; + +&uart5 { + status = "okay"; +}; + +&uart1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd1_default + &pinctrl_rxd1_default + &pinctrl_nrts1_default + &pinctrl_ndtr1_default + &pinctrl_ndsr1_default + &pinctrl_ncts1_default + &pinctrl_ndcd1_default + &pinctrl_nri1_default>; + +}; + +&lpc_snoop { + status = "okay"; + snoop-ports = <0x80>; +}; + +&kcs3 { + status = "okay"; + aspeed,lpc-io-reg = <0xCA2>; +}; + +&kcs2 { + status = "okay"; + aspeed,lpc-io-reg = <0xCA8>; +}; + +&mac0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rmii1_default>; + clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>, + <&syscon ASPEED_CLK_MAC1RCLK>; + clock-names = "MACCLK", "RCLK"; + use-ncsi; +}; + +&mac1 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>; +}; + +&i2c1 { + status = "okay"; + psu1@58 { + compatible = "pmbus"; + reg = <0x58>; + }; + psu2@59 { + compatible = "pmbus"; + reg = <0x59>; + }; +}; + +&i2c2 { + status = "okay"; +}; + +&i2c3 { + status = "okay"; + +}; + +&i2c4 { + status = "okay"; + rtc@68 { + compatible = "dallas,ds1339"; + reg = <0x68>; + }; +}; + +&i2c5 { + status = "okay"; +}; + + +&i2c6 { + status = "okay"; +}; + +&i2c7 { + status = "okay"; +}; + +&i2c8 { + status = "okay"; + lm75@48 { + compatible = "ti,tmp100"; + reg = <0x48>; + }; + lm75@49 { + compatible = "ti,tmp100"; + reg = <0x49>; + }; + lm75@4a { + compatible = "ti,tmp100"; + reg = <0x4a>; + }; + lm75@4c { + compatible = "ti,tmp100"; + reg = <0x4c>; + }; + lm75@4d { + compatible = "ti,tmp100"; + reg = <0x4d>; + }; + lm75@4e { + compatible = "ti,tmp100"; + reg = <0x4e>; + }; + +}; + +&i2c0 { + status = "okay"; +}; + + +/* + * Enable port A as device (via the virtual hub) and port B as + * host by default on the eval board. This can be easily changed + * by replacing the override below with &ehci0 { ... } to enable + * host on both ports. + */ +&vhub { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&uhci { + status = "okay"; +}; + +&pwm_tacho { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm0_default + &pinctrl_pwm1_default + &pinctrl_pwm2_default + &pinctrl_pwm3_default + &pinctrl_pwm4_default + &pinctrl_pwm5_default + &pinctrl_pwm6_default + &pinctrl_pwm7_default>; + + fan@0 { + reg = <0x00>; + aspeed,fan-tach-ch = /bits/ 8 <0x0>; + }; + + fan@1 { + reg = <0x01>; + aspeed,fan-tach-ch = /bits/ 8 <0x1>; + }; + + fan@2 { + reg = <0x02>; + aspeed,fan-tach-ch = /bits/ 8 <0x2>; + }; + + fan@3 { + reg = <0x03>; + aspeed,fan-tach-ch = /bits/ 8 <0x3>; + }; + + fan@4 { + reg = <0x04>; + aspeed,fan-tach-ch = /bits/ 8 <0x4>; + }; + + fan@5 { + reg = <0x05>; + aspeed,fan-tach-ch = /bits/ 8 <0x5>; + }; + + fan@6 { + reg = <0x06>; + aspeed,fan-tach-ch = /bits/ 8 <0x6>; + }; + + fan@7 { + reg = <0x07>; + aspeed,fan-tach-ch = /bits/ 8 <0x7>; + }; +}; + +&video { + status = "okay"; + memory-region = <&video_engine_memory>; +};