From patchwork Tue Jul 24 04:24:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 10541339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7061184F for ; Tue, 24 Jul 2018 04:25:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4262285F7 for ; Tue, 24 Jul 2018 04:25:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96BD628643; Tue, 24 Jul 2018 04:25:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2638D285F7 for ; Tue, 24 Jul 2018 04:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=VUqnzHXAtKqkglgluUnCqNQ9vEbHXG76MhUzP//L+Xw=; b=WX/JNRQu/+BRWUTDxYa5uTfQME v+FYCcJn5ETSBUJtt2I52gbNnve0iW35OMb2dEL0LPSNqjSWsnNedTMucIVeg4plCQ8/NPsSLurQn sQ6zeeyLaDzgEBv843WGWldtcYW+j8E6+q1ErbggiakD+G5uEzqUFTL+l7h8eDCV7XC85YHl9FcCy yjjrlJBev0T6nsrwKAeEdREJyCzZi+MPup74IiKB0ie19/xP3cHM2jiy+q5IrElhKKxekCF2dWYrH iMrYFRbgGdz15wsLa7ZAm9qA5/XkmJYMd9WiJN2quhCPmma/Rl/+uyNXO8sTQgvELNMD4ha/q88FQ TRvMIXPw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhotU-00038g-DV; Tue, 24 Jul 2018 04:25:52 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhosP-0001IZ-3O for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 04:24:47 +0000 Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w6O4O7pF026704; Mon, 23 Jul 2018 23:24:12 -0500 From: Benjamin Herrenschmidt To: Joel Stanley Subject: [PATCH 1/5] arm: dts: aspeed: Add coprocessor interrupt controller Date: Tue, 24 Jul 2018 14:24:02 +1000 Message-Id: <20180724042406.15374-2-benh@kernel.crashing.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724042406.15374-1-benh@kernel.crashing.org> References: <20180724042406.15374-1-benh@kernel.crashing.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180723_212445_398638_01413866 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Benjamin Herrenschmidt , linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add the missing node for the CVIC (the coprocessor interrupt controller) and add a label to the SRAM node so it can be referenced from the board device-tree file. OpenBMC-Staging-Count: 1 Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Joel Stanley --- arch/arm/boot/dts/aspeed-g4.dtsi | 8 +++++++- arch/arm/boot/dts/aspeed-g5.dtsi | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi index 75df1573380e..b1a19f99a4c9 100644 --- a/arch/arm/boot/dts/aspeed-g4.dtsi +++ b/arch/arm/boot/dts/aspeed-g4.dtsi @@ -92,6 +92,12 @@ reg = <0x1e6c0080 0x80>; }; + cvic: copro-interrupt-controller@1e6c2000 { + compatible = "aspeed,ast2400-cvic", "aspeed-cvic"; + valid-sources = <0x7fffffff>; + reg = <0x1e6c2000 0x80>; + }; + mac0: ethernet@1e660000 { compatible = "aspeed,ast2400-mac", "faraday,ftgmac100"; reg = <0x1e660000 0x180>; @@ -161,7 +167,7 @@ status = "disabled"; }; - sram@1e720000 { + sram: sram@1e720000 { compatible = "mmio-sram"; reg = <0x1e720000 0x8000>; // 32K }; diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi index 17f2714d18a7..21141ca1bfa4 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi @@ -127,6 +127,13 @@ reg = <0x1e6c0080 0x80>; }; + cvic: copro-interrupt-controller@1e6c2000 { + compatible = "aspeed,ast2500-cvic", "aspeed-cvic"; + valid-sources = <0xffffffff>; + copro-sw-interrupts = <1>; + reg = <0x1e6c2000 0x80>; + }; + mac0: ethernet@1e660000 { compatible = "aspeed,ast2500-mac", "faraday,ftgmac100"; reg = <0x1e660000 0x180>; @@ -211,7 +218,7 @@ status = "disabled"; }; - sram@1e720000 { + sram: sram@1e720000 { compatible = "mmio-sram"; reg = <0x1e720000 0x9000>; // 36K }; From patchwork Tue Jul 24 04:24:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 10541337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F37EB17FD for ; Tue, 24 Jul 2018 04:25:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1A0A285F7 for ; Tue, 24 Jul 2018 04:25:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5C9228639; Tue, 24 Jul 2018 04:25:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D872285F7 for ; Tue, 24 Jul 2018 04:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=+9dLj34Rr/TuEy7B5kOG2UHRMGxr3KIw8XBVdlKDQ+k=; b=PUV5t1pGam8Ob77+28E6i/gmUg FDmV4uKCgv8g1TnX5GtnY4yMj3aLpE1jul4OkMSRhAfPzHt6Xkc0+TLzfjVMlUh2uUiNbAbcRjYvv j6hN0hlg0uXokGgarFTLm7UbhF4q0VO4DEZxpaYd2TYrQ22sQ0w4vwbGiyvU/tEOIAP6TUWDTVPWY J2PBZ4haOSs8A8Vew2QY0MsK6Hb8YcXeWxXQ4tRBODEAEZP5zNbtMhusjNg/yZRQi5iH1c4FfwVDF E6t5xzSYsRYqSOZfIGzBTGwlpcYAmWJ6rSnjTdxTqAAmM40b2ttzhgLdYfOBK7NCGJITFvhyPI6aH mxVoEwKA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhotJ-0002qV-4b; Tue, 24 Jul 2018 04:25:41 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhosP-0001JG-3P for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 04:24:47 +0000 Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w6O4O7pG026704; Mon, 23 Jul 2018 23:24:14 -0500 From: Benjamin Herrenschmidt To: Joel Stanley Subject: [PATCH 2/5] arm: dts: OpenPower Romulus system can use coprocessor for FSI Date: Tue, 24 Jul 2018 14:24:03 +1000 Message-Id: <20180724042406.15374-3-benh@kernel.crashing.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724042406.15374-1-benh@kernel.crashing.org> References: <20180724042406.15374-1-benh@kernel.crashing.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180723_212445_528128_FE51F1F2 X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Benjamin Herrenschmidt , linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts index 0b9b37d4d6ef..852f264b9569 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts @@ -30,6 +30,11 @@ no-map; reg = <0x98000000 0x04000000>; /* 64M */ }; + + coldfire_memory: codefire_memory@9ef00000 { + reg = <0x9ef00000 0x00100000>; + no-map; + }; }; leds { @@ -49,10 +54,13 @@ }; fsi: gpio-fsi { - compatible = "fsi-master-gpio", "fsi-master"; + compatible = "aspeed,ast2500-cf-fsi-master", "fsi-master"; #address-cells = <2>; #size-cells = <0>; - no-gpio-delays; + + memory-region = <&coldfire_memory>; + aspeed,sram = <&sram>; + aspeed,cvic = <&cvic>; clock-gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>; data-gpios = <&gpio ASPEED_GPIO(AA, 2) GPIO_ACTIVE_HIGH>; From patchwork Tue Jul 24 04:24:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 10541333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A1B2112B for ; Tue, 24 Jul 2018 04:25:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4618A285F7 for ; Tue, 24 Jul 2018 04:25:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3607228639; Tue, 24 Jul 2018 04:25:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D431E285F7 for ; Tue, 24 Jul 2018 04:25:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=YxH2eDQykqp8dM8ki7IFUVFhaCFWLIXjIhQSW3z0HSQ=; b=bxf5LCxhJsGZbvc1Y0NmfqdH3u Sg9Lx9G2qxoBLLWtS3NlQaAkC8/vKzN4rgr9GnkiwovTfsEBQyv94lUBypd7gA/rhjEprG4h3arms xAGfrLm70WWIpshspuBp/fIp2Niq7OOwA2nKlR97FoK/5DEE2R3Zn5eI4W9OSUKxs65Q0ulkon76Y Amh5wFSAfiRwr3XRm0+Q3c0DkCkqwnlsnZDoTUgu0B551j2HUuXjAcNvx3nUpjuHFig5ovVs2mvKi Oj5397QV1XVw4LvBlaKMq8KyN1RI4zxfA7Ruq13l6IvM4vM+HmCBXAFQhrIn8aNfM9TZBQjr+pitz GbbS41JQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhosc-0001bc-V1; Tue, 24 Jul 2018 04:24:59 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhosP-0001JD-3M for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 04:24:46 +0000 Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w6O4O7pH026704; Mon, 23 Jul 2018 23:24:16 -0500 From: Benjamin Herrenschmidt To: Joel Stanley Subject: [PATCH 3/5] arm: dts: OpenPower Palmetto system can use coprocessor for FSI Date: Tue, 24 Jul 2018 14:24:04 +1000 Message-Id: <20180724042406.15374-4-benh@kernel.crashing.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724042406.15374-1-benh@kernel.crashing.org> References: <20180724042406.15374-1-benh@kernel.crashing.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180723_212445_366985_961E2F0D X-CRM114-Status: UNSURE ( 7.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Benjamin Herrenschmidt , linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This switches away from userspace bitbanging to kernel FSI using the coprocessor. Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts index c7084a819dc6..e6cfdf3c1a67 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts @@ -26,6 +26,11 @@ no-map; reg = <0x5f000000 0x01000000>; /* 16M */ }; + + coldfire_memory: codefire_memory@5ee00000 { + reg = <0x5ee00000 0x00200000>; + no-map; + }; }; leds { @@ -44,6 +49,22 @@ }; }; + fsi: gpio-fsi { + compatible = "aspeed,ast2400-cf-fsi-master", "fsi-master"; + #address-cells = <2>; + #size-cells = <0>; + + memory-region = <&coldfire_memory>; + aspeed,sram = <&sram>; + aspeed,cvic = <&cvic>; + + clock-gpios = <&gpio ASPEED_GPIO(A, 4) GPIO_ACTIVE_HIGH>; + data-gpios = <&gpio ASPEED_GPIO(A, 5) GPIO_ACTIVE_HIGH>; + mux-gpios = <&gpio ASPEED_GPIO(A, 6) GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>; + trans-gpios = <&gpio ASPEED_GPIO(H, 6) GPIO_ACTIVE_HIGH>; + }; + gpio-keys { compatible = "gpio-keys"; @@ -303,13 +324,6 @@ line-name = "SYS_PWROK_BMC"; }; - pin_gpio_h6 { - gpio-hog; - gpios = ; - output-high; - line-name = "SCM1_FSI0_DATA_EN"; - }; - pin_gpio_h7 { gpio-hog; gpios = ; From patchwork Tue Jul 24 04:24:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 10541335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D7EA112B for ; Tue, 24 Jul 2018 04:25:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C5D1285F7 for ; Tue, 24 Jul 2018 04:25:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10AE128639; Tue, 24 Jul 2018 04:25:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A6708285F7 for ; Tue, 24 Jul 2018 04:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=jasaMC/VYOhb/A2OsHEz5zQ1jIFBPjDjUNZ+bFZ5jSM=; b=B/I/rFg6gkNVBCT2s+3f56/Lf4 oz9uvZ+mwOmeLRr7D4jT1IW7xHEg2A3pEn0huo4tE5s2SBKG5CD2s6gDawLUdpFOGZXMUDboY8dYV ih6TgKGQX7IY79us14qCQPJEQMde7oZjavvjnSt1XRd2KzDrLkxbLhrhjno9VODaqQMth60fmu/i/ GzjPh/V7VcxHX8Qbzp4Sv71RE1TOgjdTVFMSVKmMFN4iLjn2q2RA7EhBz2a2R5tuVY9/bVex7JWoJ fUsDMh0fUWsLzsBWAyVkqxPnB2s/bq11TKDomRf+t7TbNTuaImt84adZaE5XpGJk/lmyrvYxCWLe7 rL8mI/Sg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhosp-0001yV-LT; Tue, 24 Jul 2018 04:25:11 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhosP-0001JW-3N for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 04:24:46 +0000 Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w6O4O7pI026704; Mon, 23 Jul 2018 23:24:19 -0500 From: Benjamin Herrenschmidt To: Joel Stanley Subject: [PATCH 4/5] arm: dts: Add power8 CFAM dtsi and use it on palmetto Date: Tue, 24 Jul 2018 14:24:05 +1000 Message-Id: <20180724042406.15374-5-benh@kernel.crashing.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724042406.15374-1-benh@kernel.crashing.org> References: <20180724042406.15374-1-benh@kernel.crashing.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180723_212445_375008_3D56AE2D X-CRM114-Status: UNSURE ( 9.24 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Benjamin Herrenschmidt , linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP So we get proper chip-id Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 10 ++++++ arch/arm/boot/dts/ibm-power8-cfam.dtsi | 31 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 arch/arm/boot/dts/ibm-power8-cfam.dtsi diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts index e6cfdf3c1a67..e264d817978c 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts @@ -331,3 +331,13 @@ line-name = "BMC_TPM_INT_N"; }; }; + +/* Instantiate chip 0 */ +#define CFAM_CHIP_ID 0 +&fsi { + cfam@0,0 { + reg = <0 0>; + #include "ibm-power8-cfam.dtsi" + }; +}; +#undef CFAM_CHIP_ID diff --git a/arch/arm/boot/dts/ibm-power8-cfam.dtsi b/arch/arm/boot/dts/ibm-power8-cfam.dtsi new file mode 100644 index 000000000000..a07e9509d9bd --- /dev/null +++ b/arch/arm/boot/dts/ibm-power8-cfam.dtsi @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright 2018 IBM Corp + +#define __MAKE_LABEL(p,i) p##i +#define _MAKE_LABEL(p,i) __MAKE_LABEL(p,i) +#define HUB_LABEL _MAKE_LABEL(fsi_hub,CFAM_CHIP_ID) +#define OCC_LABEL _MAKE_LABEL(fsi_occ,CFAM_CHIP_ID) +#define I2C_LABEL(n) _MAKE_LABEL(_MAKE_LABEL(cfam,CFAM_CHIP_ID),_i2c##n) + +#address-cells = <1>; +#size-cells = <1>; +chip-id = ; + +scom@1000 { + compatible = "ibm,fsi2pib"; + reg = <0x1000 0x400>; +}; + +HUB_LABEL: hub@3400 { + compatible = "ibm,fsi-master-hub"; + reg = <0x3400 0x400>; + #address-cells = <2>; + #size-cells = <0>; + no-scan-on-init; +}; + +#undef __MAKE_LABEL +#undef _MAKE_LABEL +#undef HUB_LABEL +#undef OCC_LABEL +#undef I2C_LABEL From patchwork Tue Jul 24 04:24:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 10541341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E33F17FD for ; Tue, 24 Jul 2018 04:26:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 790C628632 for ; Tue, 24 Jul 2018 04:26:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6912D28643; Tue, 24 Jul 2018 04:26:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DA31428696 for ; Tue, 24 Jul 2018 04:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tTMsTGVJedlA2qo1rp5A4rk2wU4oeEUD2oYIsYSgsvQ=; b=QTEr8pDHjPNuqc8iO5Ou5cLMYT /L+tH3ykLWagMEZlr84ZcZUCAjp6e6L4DPuyc3tkaR2HK6Ra4YwKjDsszzGq7Pu8JEDNpATwxlP9p w+FelSocVl6Yonov2dkgSDRTGKldznSDUEZONxa7x/rRQQDMsS4dMs43tFtMB2OwunDrjvkPXYqxn oXj07hezo50u+ZBZpZlLWR0XQvXvuwHdeXZxQZJLqVoBp3AaAKvli9TBP59MA91uXW+7LySeEVi3h DAeP+I4GyURpmZ8jks/FqXmsW9hmr6JFEQBwFroAAygFRk5KpZaR0P15f1XVW0KaplFxDhFY/JwCZ 894xB+gw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhotg-0003Uy-TV; Tue, 24 Jul 2018 04:26:04 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhosP-0001JV-3P for linux-arm-kernel@lists.infradead.org; Tue, 24 Jul 2018 04:24:48 +0000 Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w6O4O7pJ026704; Mon, 23 Jul 2018 23:24:21 -0500 From: Benjamin Herrenschmidt To: Joel Stanley Subject: [PATCH 5/5] arm: dts: aspeed: Add power9 CFAM dtsi and use it on OpenPower P9 machines Date: Tue, 24 Jul 2018 14:24:06 +1000 Message-Id: <20180724042406.15374-6-benh@kernel.crashing.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724042406.15374-1-benh@kernel.crashing.org> References: <20180724042406.15374-1-benh@kernel.crashing.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180723_212445_522893_9CB42E46 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , Benjamin Herrenschmidt , linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This provides proper chip IDs but also adds the various sub-devices necessary for the future OCC driver among other. All the added nodes comply with the existing upstream FSI bindings. Signed-off-by: Benjamin Herrenschmidt --- arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts | 1 + arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 2 + .../boot/dts/aspeed-bmc-opp-witherspoon.dts | 2 + arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts | 2 + arch/arm/boot/dts/ibm-power9-cfam.dtsi | 104 ++++++++++++++++++ arch/arm/boot/dts/ibm-power9-dual.dtsi | 58 ++++++++++ 6 files changed, 169 insertions(+) create mode 100644 arch/arm/boot/dts/ibm-power9-cfam.dtsi create mode 100644 arch/arm/boot/dts/ibm-power9-dual.dtsi diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts index d598b6391362..e744d6532cbb 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts @@ -323,3 +323,4 @@ status = "okay"; }; +#include "ibm-power9-dual.dtsi" diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts index 852f264b9569..ead2a84f16bd 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts @@ -282,3 +282,5 @@ &ibt { status = "okay"; }; + +#include "ibm-power9-dual.dtsi" diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts index 656036106001..33ea336f0c17 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts @@ -583,3 +583,5 @@ &ibt { status = "okay"; }; + +#include "ibm-power9-dual.dtsi" diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts index 2c5aa90a546d..05df11cacb21 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts @@ -435,3 +435,5 @@ &ibt { status = "okay"; }; + +#include "ibm-power9-dual.dtsi" diff --git a/arch/arm/boot/dts/ibm-power9-cfam.dtsi b/arch/arm/boot/dts/ibm-power9-cfam.dtsi new file mode 100644 index 000000000000..5bda517f93cc --- /dev/null +++ b/arch/arm/boot/dts/ibm-power9-cfam.dtsi @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright 2018 IBM Corp + +#define __MAKE_LABEL(p,i) p##i +#define _MAKE_LABEL(p,i) __MAKE_LABEL(p,i) +#define HUB_LABEL _MAKE_LABEL(fsi_hub,CFAM_CHIP_ID) +#define I2C_LABEL(n) _MAKE_LABEL(_MAKE_LABEL(cfam,CFAM_CHIP_ID),_i2c##n) + +#address-cells = <1>; +#size-cells = <1>; +chip-id = ; + +scom@1000 { + compatible = "ibm,fsi2pib"; + reg = <0x1000 0x400>; +}; + +i2c@1800 { + compatible = "ibm,fsi-i2c-master"; + reg = <0x1800 0x400>; + #address-cells = <1>; + #size-cells = <0>; + + I2C_LABEL(0): i2c-bus@0 { + reg = <0>; + }; + + I2C_LABEL(1): i2c-bus@1 { + reg = <1>; + }; + + I2C_LABEL(2): i2c-bus@2 { + reg = <2>; + }; + + I2C_LABEL(3): i2c-bus@3 { + reg = <3>; + }; + + I2C_LABEL(4): i2c-bus@4 { + reg = <4>; + }; + + I2C_LABEL(5): i2c-bus@5 { + reg = <5>; + }; + + I2C_LABEL(6): i2c-bus@6 { + reg = <6>; + }; + + I2C_LABEL(7): i2c-bus@7 { + reg = <7>; + }; + + I2C_LABEL(8): i2c-bus@8 { + reg = <8>; + }; + + I2C_LABEL(9): i2c-bus@9 { + reg = <9>; + }; + + I2C_LABEL(10): i2c-bus@10 { + reg = <10>; + }; + + I2C_LABEL(11): i2c-bus@11 { + reg = <11>; + }; + + I2C_LABEL(12): i2c-bus@12 { + reg = <12>; + }; + + I2C_LABEL(13): i2c-bus@13 { + reg = <13>; + }; + + I2C_LABEL(14): i2c-bus@14 { + reg = <14>; + }; +}; + +sbefifo@2400 { + compatible = "ibm,p9-sbefifo"; + reg = <0x2400 0x400>; + #address-cells = <1>; + #size-cells = <0>; +}; + +HUB_LABEL: hub@3400 { + compatible = "fsi-master-hub"; + reg = <0x3400 0x400>; + #address-cells = <2>; + #size-cells = <0>; + + no-scan-on-init; +}; + +#undef __MAKE_LABEL +#undef _MAKE_LABEL +#undef HUB_LABEL +#undef I2C_LABEL diff --git a/arch/arm/boot/dts/ibm-power9-dual.dtsi b/arch/arm/boot/dts/ibm-power9-dual.dtsi new file mode 100644 index 000000000000..f6a82ad43ff8 --- /dev/null +++ b/arch/arm/boot/dts/ibm-power9-dual.dtsi @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright 2018 IBM Corp + +/* Instantiate chip 0 */ +#define CFAM_CHIP_ID 0 +&fsi { + cfam@0,0 { + reg = <0 0>; + #include "ibm-power9-cfam.dtsi" + }; +}; +#undef CFAM_CHIP_ID + +/* Instantiate chip 1 */ +#define CFAM_CHIP_ID 1 +&fsi_hub0 { + cfam@1,0 { + reg = <1 0>; + #include "ibm-power9-cfam.dtsi" + }; +}; +#undef CFAM_CHIP_ID + +/ { + aliases { + i2c100 = &cfam0_i2c0; + i2c101 = &cfam0_i2c1; + i2c102 = &cfam0_i2c2; + i2c103 = &cfam0_i2c3; + i2c104 = &cfam0_i2c4; + i2c105 = &cfam0_i2c5; + i2c106 = &cfam0_i2c6; + i2c107 = &cfam0_i2c7; + i2c108 = &cfam0_i2c8; + i2c109 = &cfam0_i2c9; + i2c110 = &cfam0_i2c10; + i2c111 = &cfam0_i2c11; + i2c112 = &cfam0_i2c12; + i2c113 = &cfam0_i2c13; + i2c114 = &cfam0_i2c14; + i2c200 = &cfam1_i2c0; + i2c201 = &cfam1_i2c1; + i2c202 = &cfam1_i2c2; + i2c203 = &cfam1_i2c3; + i2c204 = &cfam1_i2c4; + i2c205 = &cfam1_i2c5; + i2c206 = &cfam1_i2c6; + i2c207 = &cfam1_i2c7; + i2c208 = &cfam1_i2c8; + i2c209 = &cfam1_i2c9; + i2c210 = &cfam1_i2c10; + i2c211 = &cfam1_i2c11; + i2c212 = &cfam1_i2c12; + i2c213 = &cfam1_i2c13; + i2c214 = &cfam1_i2c14; + }; +}; +