From patchwork Wed Oct 16 03:55:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177565 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJPl2XQwz9sP6 for ; Wed, 16 Oct 2019 14:56:27 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 13F5AC21DA6; Wed, 16 Oct 2019 03:56:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 50099C21DB3; Wed, 16 Oct 2019 03:56:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A3BC2C21D74; Wed, 16 Oct 2019 03:56:09 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id BDB7EC21CB6 for ; Wed, 16 Oct 2019 03:56:06 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPL49xkz1rGSH; Wed, 16 Oct 2019 05:56:06 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPL42fLz1qtT4; Wed, 16 Oct 2019 05:56:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id OMdFEjHeL3ke; Wed, 16 Oct 2019 05:56:05 +0200 (CEST) X-Auth-Info: ystleLgNswzeB2qH05KX2o/5BHqnVaxz1DWo+peuB6I= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:05 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id A713B18318C; Wed, 16 Oct 2019 05:56:00 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id A03101A8B95; Wed, 16 Oct 2019 05:56:00 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:46 +0200 Message-Id: <20191016035554.3912054-2-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 1/9] mpc85xx, socrates: suppress unknown flash warning X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" suppress warning: Flash: ## Unknown flash on Bank 1 - Size = 0x00000000 = 0 MB Signed-off-by: Heiko Schocher --- Changes in v2: None include/configs/socrates.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/socrates.h b/include/configs/socrates.h index c7c30d367a..4192148b52 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -96,6 +96,7 @@ */ #define CONFIG_SYS_LBC_CACHE_BASE 0xf0000000 /* Localbus cacheable */ +#define CONFIG_SYS_FLASH_QUIET_TEST #define CONFIG_SYS_FLASH0 0xFE000000 #define CONFIG_SYS_FLASH1 0xFC000000 #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH1, CONFIG_SYS_FLASH0 } From patchwork Wed Oct 16 03:55:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177567 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJR467lmz9sP6 for ; Wed, 16 Oct 2019 14:57:36 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6A5C7C21C51; Wed, 16 Oct 2019 03:56:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 25DE1C21DF9; Wed, 16 Oct 2019 03:56:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7CB0FC21DED; Wed, 16 Oct 2019 03:56:13 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id C8A44C21C29 for ; Wed, 16 Oct 2019 03:56:09 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPP4gQvz1qql2; Wed, 16 Oct 2019 05:56:09 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPP4TBgz1qtT4; Wed, 16 Oct 2019 05:56:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Uwv06wkMN0lE; Wed, 16 Oct 2019 05:56:08 +0200 (CEST) X-Auth-Info: fvdUYYeMd8DrWKa2ULYr2MI6KZkOOeh14r1Hg/XZC0c= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:08 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id A8A2E1807CE; Wed, 16 Oct 2019 05:56:02 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id B5CB51A00A0; Wed, 16 Oct 2019 05:56:00 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:47 +0200 Message-Id: <20191016035554.3912054-3-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 2/9] mpc85xx: add socrates dts from linux X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" add socrates device tree from linux: commit 71ae5fc87c34 ("Merge tag 'linux-kselftest-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest") and added SPDX license identifier. Did not fix checkpatch warnings: arch/powerpc/dts/socrates.dts:235: check: Please don't use multiple blank lines arch/powerpc/dts/socrates.dts:238: error: code indent should use tabs where possible Also, add me as board maintainer. Signed-off-by: Heiko Schocher --- Changes in v2: None arch/powerpc/dts/Makefile | 1 + arch/powerpc/dts/socrates.dts | 349 ++++++++++++++++++++++++++++++++++ board/socrates/MAINTAINERS | 3 +- 3 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/dts/socrates.dts diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile index 021c85f00f..3195351c9c 100644 --- a/arch/powerpc/dts/Makefile +++ b/arch/powerpc/dts/Makefile @@ -8,6 +8,7 @@ dtb-$(CONFIG_TARGET_P2041RDB) += p2041rdb.dtb dtb-$(CONFIG_TARGET_P3041DS) += p3041ds.dtb dtb-$(CONFIG_TARGET_P4080DS) += p4080ds.dtb dtb-$(CONFIG_TARGET_P5040DS) += p5040ds.dtb +dtb-$(CONFIG_TARGET_SOCRATES) += socrates.dtb dtb-$(CONFIG_TARGET_T1024RDB) += t1024rdb.dtb dtb-$(CONFIG_TARGET_T1042D4RDB) += t1042d4rdb.dtb dtb-$(CONFIG_TARGET_T2080QDS) += t2080qds.dtb diff --git a/arch/powerpc/dts/socrates.dts b/arch/powerpc/dts/socrates.dts new file mode 100644 index 0000000000..452cf58b5e --- /dev/null +++ b/arch/powerpc/dts/socrates.dts @@ -0,0 +1,349 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Device Tree Source for the Socrates board (MPC8544). + * + * Copyright (c) 2008 Emcraft Systems. + * Sergei Poselenov, + * + */ + +/dts-v1/; + +/ { + model = "abb,socrates"; + compatible = "abb,socrates"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + serial0 = &serial0; + serial1 = &serial1; + pci0 = &pci0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,8544@0 { + device_type = "cpu"; + reg = <0>; + d-cache-line-size = <32>; + i-cache-line-size = <32>; + d-cache-size = <0x8000>; // L1, 32K + i-cache-size = <0x8000>; // L1, 32K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + next-level-cache = <&L2>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x00000000>; // Filled in by U-Boot + }; + + soc8544@e0000000 { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + + ranges = <0x00000000 0xe0000000 0x00100000>; + bus-frequency = <0>; // Filled in by U-Boot + compatible = "fsl,mpc8544-immr", "simple-bus"; + + ecm-law@0 { + compatible = "fsl,ecm-law"; + reg = <0x0 0x1000>; + fsl,num-laws = <10>; + }; + + ecm@1000 { + compatible = "fsl,mpc8544-ecm", "fsl,ecm"; + reg = <0x1000 0x1000>; + interrupts = <17 2>; + interrupt-parent = <&mpic>; + }; + + memory-controller@2000 { + compatible = "fsl,mpc8544-memory-controller"; + reg = <0x2000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <18 2>; + }; + + L2: l2-cache-controller@20000 { + compatible = "fsl,mpc8544-l2-cache-controller"; + reg = <0x20000 0x1000>; + cache-line-size = <32>; + cache-size = <0x40000>; // L2, 256K + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + + i2c@3000 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + compatible = "fsl,mpc8544-i2c", "fsl-i2c"; + reg = <0x3000 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + fsl,preserve-clocking; + + dtt@28 { + compatible = "winbond,w83782d"; + reg = <0x28>; + }; + rtc@32 { + compatible = "epson,rx8025"; + reg = <0x32>; + interrupts = <7 1>; + interrupt-parent = <&mpic>; + }; + dtt@4c { + compatible = "dallas,ds75"; + reg = <0x4c>; + }; + ts@4a { + compatible = "ti,tsc2003"; + reg = <0x4a>; + interrupt-parent = <&mpic>; + interrupts = <8 1>; + }; + }; + + i2c@3100 { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <1>; + compatible = "fsl,mpc8544-i2c", "fsl-i2c"; + reg = <0x3100 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + fsl,preserve-clocking; + }; + + enet0: ethernet@24000 { + #address-cells = <1>; + #size-cells = <1>; + cell-index = <0>; + device_type = "network"; + model = "eTSEC"; + compatible = "gianfar"; + reg = <0x24000 0x1000>; + ranges = <0x0 0x24000 0x1000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <29 2 30 2 34 2>; + interrupt-parent = <&mpic>; + phy-handle = <&phy0>; + tbi-handle = <&tbi0>; + phy-connection-type = "rgmii-id"; + + mdio@520 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,gianfar-mdio"; + reg = <0x520 0x20>; + + phy0: ethernet-phy@0 { + interrupt-parent = <&mpic>; + interrupts = <0 1>; + reg = <0>; + }; + phy1: ethernet-phy@1 { + interrupt-parent = <&mpic>; + interrupts = <0 1>; + reg = <1>; + }; + tbi0: tbi-phy@11 { + reg = <0x11>; + }; + }; + }; + + enet1: ethernet@26000 { + #address-cells = <1>; + #size-cells = <1>; + cell-index = <1>; + device_type = "network"; + model = "eTSEC"; + compatible = "gianfar"; + reg = <0x26000 0x1000>; + ranges = <0x0 0x26000 0x1000>; + local-mac-address = [ 00 00 00 00 00 00 ]; + interrupts = <31 2 32 2 33 2>; + interrupt-parent = <&mpic>; + phy-handle = <&phy1>; + tbi-handle = <&tbi1>; + phy-connection-type = "rgmii-id"; + + mdio@520 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,gianfar-tbi"; + reg = <0x520 0x20>; + + tbi1: tbi-phy@11 { + reg = <0x11>; + }; + }; + }; + + serial0: serial@4500 { + cell-index = <0>; + device_type = "serial"; + compatible = "fsl,ns16550", "ns16550"; + reg = <0x4500 0x100>; + clock-frequency = <0>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + serial1: serial@4600 { + cell-index = <1>; + device_type = "serial"; + compatible = "fsl,ns16550", "ns16550"; + reg = <0x4600 0x100>; + clock-frequency = <0>; + interrupts = <42 2>; + interrupt-parent = <&mpic>; + }; + + global-utilities@e0000 { //global utilities block + compatible = "fsl,mpc8548-guts"; + reg = <0xe0000 0x1000>; + fsl,has-rstcr; + }; + + mpic: pic@40000 { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <2>; + reg = <0x40000 0x40000>; + compatible = "chrp,open-pic"; + device_type = "open-pic"; + }; + }; + + + localbus { + compatible = "fsl,mpc8544-localbus", + "fsl,pq3-localbus", + "simple-bus"; + #address-cells = <2>; + #size-cells = <1>; + reg = <0xe0005000 0x40>; + interrupt-parent = <&mpic>; + interrupts = <19 2>; + + ranges = <0 0 0xfc000000 0x04000000 + 2 0 0xc8000000 0x04000000 + 3 0 0xc0000000 0x00100000 + >; /* Overwritten by U-Boot */ + + nor_flash@0,0 { + compatible = "amd,s29gl256n", "cfi-flash"; + bank-width = <2>; + reg = <0x0 0x000000 0x4000000>; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "kernel"; + reg = <0x0 0x1e0000>; + read-only; + }; + partition@1e0000 { + label = "dtb"; + reg = <0x1e0000 0x20000>; + }; + partition@200000 { + label = "root"; + reg = <0x200000 0x200000>; + }; + partition@400000 { + label = "user"; + reg = <0x400000 0x3b80000>; + }; + partition@3f80000 { + label = "env"; + reg = <0x3f80000 0x40000>; + read-only; + }; + partition@3fc0000 { + label = "u-boot"; + reg = <0x3fc0000 0x40000>; + read-only; + }; + }; + + display@2,0 { + compatible = "fujitsu,lime"; + reg = <2 0x0 0x4000000>; + interrupt-parent = <&mpic>; + interrupts = <6 1>; + }; + + fpga_pic: fpga-pic@3,10 { + compatible = "abb,socrates-fpga-pic"; + reg = <3 0x10 0x10>; + interrupt-controller; + /* IRQs 2, 10, 11, active low, level-sensitive */ + interrupts = <2 1 10 1 11 1>; + interrupt-parent = <&mpic>; + #interrupt-cells = <3>; + }; + + spi@3,60 { + compatible = "abb,socrates-spi"; + reg = <3 0x60 0x10>; + interrupts = <8 4 0>; // number, type, routing + interrupt-parent = <&fpga_pic>; + }; + + nand@3,70 { + compatible = "abb,socrates-nand"; + reg = <3 0x70 0x04>; + bank-width = <1>; + #address-cells = <1>; + #size-cells = <1>; + data@0 { + label = "data"; + reg = <0x0 0x40000000>; + }; + }; + + can@3,100 { + compatible = "philips,sja1000"; + reg = <3 0x100 0x80>; + interrupts = <2 8 1>; // number, type, routing + interrupt-parent = <&fpga_pic>; + }; + }; + + pci0: pci@e0008000 { + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + compatible = "fsl,mpc8540-pci"; + device_type = "pci"; + reg = <0xe0008000 0x1000>; + clock-frequency = <66666666>; + + interrupt-map-mask = <0xf800 0x0 0x0 0x7>; + interrupt-map = < + /* IDSEL 0x11 */ + 0x8800 0x0 0x0 1 &mpic 5 1 + /* IDSEL 0x12 */ + 0x9000 0x0 0x0 1 &mpic 4 1>; + interrupt-parent = <&mpic>; + interrupts = <24 2>; + bus-range = <0x0 0x0>; + ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x20000000 + 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x01000000>; + }; + +}; diff --git a/board/socrates/MAINTAINERS b/board/socrates/MAINTAINERS index 293b8e6d01..c5607fc342 100644 --- a/board/socrates/MAINTAINERS +++ b/board/socrates/MAINTAINERS @@ -1,6 +1,7 @@ SOCRATES BOARD -#M: - +M: Heiko Schocher S: Maintained F: board/socrates/ F: include/configs/socrates.h F: configs/socrates_defconfig +F: arch/powerpc/dts/socrates.dts From patchwork Wed Oct 16 03:55:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177569 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJS53187z9sP6 for ; Wed, 16 Oct 2019 14:58:29 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 1A722C21DD7; Wed, 16 Oct 2019 03:57:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 634AFC21DA6; Wed, 16 Oct 2019 03:56:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 428C5C21DF3; Wed, 16 Oct 2019 03:56:15 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id C17EBC21D74 for ; Wed, 16 Oct 2019 03:56:12 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPS4SHNz1qql2; Wed, 16 Oct 2019 05:56:12 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPS4Mxzz1qtT4; Wed, 16 Oct 2019 05:56:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id z1P2mZXz6Xqb; Wed, 16 Oct 2019 05:56:11 +0200 (CEST) X-Auth-Info: Nhpi+MUKQvQvY9y6D+HcMEieGbvBiBV5Kr30a0tGEDg= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:11 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id A97DB184CF9; Wed, 16 Oct 2019 05:56:02 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id CB5401A8B95; Wed, 16 Oct 2019 05:56:00 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:48 +0200 Message-Id: <20191016035554.3912054-4-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 3/9] mpc85xx, dts, socrates: add u-boot specific dtsi X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" add u-boot specific dtsi file for socrates board. Signed-off-by: Heiko Schocher --- Changes in v2: None arch/powerpc/dts/socrates-u-boot.dtsi | 40 +++++++++++++++++++++++++++ board/socrates/MAINTAINERS | 1 + 2 files changed, 41 insertions(+) create mode 100644 arch/powerpc/dts/socrates-u-boot.dtsi diff --git a/arch/powerpc/dts/socrates-u-boot.dtsi b/arch/powerpc/dts/socrates-u-boot.dtsi new file mode 100644 index 0000000000..14a7c245dc --- /dev/null +++ b/arch/powerpc/dts/socrates-u-boot.dtsi @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 + * Heiko Schocher, DENX Software Engineering, hs@denx.de + */ +/ { + binman { + filename = "u-boot-socrates.bin"; + pad-byte = <0xff>; + // Place dtb one sector before u-boot-nodtb.bin + blob { + filename = "dts/dt.dtb"; + }; + u-boot-nodtb { + filename = "u-boot-nodtb.bin"; + offset = <0x20000>; + }; + }; + + chosen { + stdout-path = &serial0; + }; + + soc8544@e0000000 { + i2c@3000 { + u-boot,dm-pre-reloc; + }; + }; +}; + +&pci0 { + clock-frequency = <33000000>; + ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x20000000 + 0x01000000 0x0 0xe2000000 0xe2000000 0x0 0x01000000>; +}; + +&serial0 { + u-boot,dm-pre-reloc; + clock-frequency = <333333330>; +}; diff --git a/board/socrates/MAINTAINERS b/board/socrates/MAINTAINERS index c5607fc342..2b27a73c18 100644 --- a/board/socrates/MAINTAINERS +++ b/board/socrates/MAINTAINERS @@ -5,3 +5,4 @@ F: board/socrates/ F: include/configs/socrates.h F: configs/socrates_defconfig F: arch/powerpc/dts/socrates.dts +F: arch/powerpc/dts/socrates-u-boot.dtsi From patchwork Wed Oct 16 03:55:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177568 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJS147QWz9sP6 for ; Wed, 16 Oct 2019 14:58:25 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2B225C21D9A; Wed, 16 Oct 2019 03:58:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5167BC21C50; Wed, 16 Oct 2019 03:57:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 364EBC21D83; Wed, 16 Oct 2019 03:56:27 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 83F41C21D65 for ; Wed, 16 Oct 2019 03:56:25 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPj2g7bz1qql2; Wed, 16 Oct 2019 05:56:25 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPj2YJ8z1qtT4; Wed, 16 Oct 2019 05:56:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id sk2m0tI75jg1; Wed, 16 Oct 2019 05:56:24 +0200 (CEST) X-Auth-Info: 9TxGWdktAHDEZmdriJg1UoUT6IYTr3rO74hUliPz4tI= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:24 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id AE4C518318C; Wed, 16 Oct 2019 05:56:06 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id E15421A8B96; Wed, 16 Oct 2019 05:56:00 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:49 +0200 Message-Id: <20191016035554.3912054-5-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 4/9] mpc85xx, socrates: add DM support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" enable CONFIG_DM for the socrates board. Signed-off-by: Heiko Schocher --- Changes in v2: None board/socrates/socrates.c | 15 +++++++++++++++ configs/socrates_defconfig | 6 +++++- include/configs/socrates.h | 13 +++++++------ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index da9ae5bebb..8f9583360b 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -432,3 +432,18 @@ void video_get_info_str (int line_number, char *info) } } #endif + +#if defined(CONFIG_OF_SEPARATE) +void *board_fdt_blob_setup(void) +{ + void *fw_dtb; + + fw_dtb = (void *)(CONFIG_SYS_TEXT_BASE - CONFIG_ENV_SECT_SIZE); + if (fdt_magic(fw_dtb) != FDT_MAGIC) { + printf("DTB is not passed via %x\n", (u32)fw_dtb); + return NULL; + } + + return fw_dtb; +} +#endif diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig index 58d135b907..1730d5793b 100644 --- a/configs/socrates_defconfig +++ b/configs/socrates_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_TEXT_BASE=0xfff80000 CONFIG_MPC85xx=y # CONFIG_CMD_ERRATA is not set CONFIG_TARGET_SOCRATES=y +# CONFIG_SYS_MALLOC_F is not set CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y @@ -15,6 +16,7 @@ CONFIG_BOARD_EARLY_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_CMD_REGINFO=y CONFIG_CMD_IMLS=y +CONFIG_CMD_DM=y CONFIG_CMD_I2C=y CONFIG_CMD_NAND=y CONFIG_CMD_PCI=y @@ -31,7 +33,10 @@ CONFIG_CMD_DATE=y # CONFIG_CMD_HASH is not set CONFIG_CMD_EXT2=y # CONFIG_CMD_IRQ is not set +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="socrates" CONFIG_ENV_IS_IN_FLASH=y +CONFIG_DM=y # CONFIG_MMC is not set CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y @@ -46,4 +51,3 @@ CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_VIDEO=y CONFIG_CONSOLE_EXTRA_INFO=y -CONFIG_OF_LIBFDT=y diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 4192148b52..4e10786ed8 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -238,9 +238,10 @@ * Environment */ #define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ -#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - \ + CONFIG_ENV_SECT_SIZE - CONFIG_ENV_SECT_SIZE) #define CONFIG_ENV_SIZE 0x4000 -#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE) #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ @@ -280,7 +281,7 @@ "bootfile=/home/tftp/syscon3/uImage\0" \ "fdt_file=/home/tftp/syscon3/socrates.dtb\0" \ "initrd_file=/home/tftp/syscon3/uinitrd.gz\0" \ - "uboot_addr=FFFA0000\0" \ + "uboot_addr=FFF60000\0" \ "kernel_addr=FE000000\0" \ "fdt_addr=FE1E0000\0" \ "ramdisk_addr=FE200000\0" \ @@ -303,9 +304,9 @@ "run nfsargs addip addcons;" \ "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ "update_uboot=tftp 100000 ${uboot_file};" \ - "protect off fffa0000 ffffffff;" \ - "era fffa0000 ffffffff;" \ - "cp.b 100000 fffa0000 ${filesize};" \ + "protect off fff60000 ffffffff;" \ + "era fff60000 ffffffff;" \ + "cp.b 100000 fff60000 ${filesize};" \ "setenv filesize;saveenv\0" \ "update_kernel=tftp 100000 ${bootfile};" \ "era fe000000 fe1dffff;" \ From patchwork Wed Oct 16 03:55:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177570 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJSr26mkz9sP6 for ; Wed, 16 Oct 2019 14:59:08 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 00FC2C21DD3; Wed, 16 Oct 2019 03:57:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8CD2AC21D74; Wed, 16 Oct 2019 03:57:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 38001C21CB1; Wed, 16 Oct 2019 03:56:28 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 6C705C21DB6 for ; Wed, 16 Oct 2019 03:56:28 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPm1xgCz1rGSH; Wed, 16 Oct 2019 05:56:28 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPm1kG4z1qtT4; Wed, 16 Oct 2019 05:56:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id gHyvZg6ijlor; Wed, 16 Oct 2019 05:56:27 +0200 (CEST) X-Auth-Info: 9cg4AM8qga+IpBWOwv9WVPtm8rVIXlgg1DxlrDZGsM4= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:27 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id 1DC9C183632; Wed, 16 Oct 2019 05:56:08 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 01E1A1A8B97; Wed, 16 Oct 2019 05:56:01 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:50 +0200 Message-Id: <20191016035554.3912054-6-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 5/9] mpc85xx, socrates: get rid of DM_USB warning X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" add some defines and get rid of USB warning. Signed-off-by: Heiko Schocher --- Changes in v2: None configs/socrates_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig index 1730d5793b..2c87ec5134 100644 --- a/configs/socrates_defconfig +++ b/configs/socrates_defconfig @@ -3,7 +3,6 @@ CONFIG_SYS_TEXT_BASE=0xfff80000 CONFIG_MPC85xx=y # CONFIG_CMD_ERRATA is not set CONFIG_TARGET_SOCRATES=y -# CONFIG_SYS_MALLOC_F is not set CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_OF_BOARD_SETUP=y @@ -37,6 +36,7 @@ CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="socrates" CONFIG_ENV_IS_IN_FLASH=y CONFIG_DM=y +CONFIG_BLK=y # CONFIG_MMC is not set CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y @@ -47,6 +47,7 @@ CONFIG_TSEC_ENET=y CONFIG_RTC_RX8025=y CONFIG_SYS_NS16550=y CONFIG_USB=y +CONFIG_DM_USB=y # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_STORAGE=y CONFIG_VIDEO=y From patchwork Wed Oct 16 03:55:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177572 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJTL3lxdz9sP6 for ; Wed, 16 Oct 2019 14:59:34 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 1BCCBC21D74; Wed, 16 Oct 2019 03:58:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id F1AF7C21CB1; Wed, 16 Oct 2019 03:58:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AFDC2C21BE5; Wed, 16 Oct 2019 03:56:31 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 9649AC21BE5 for ; Wed, 16 Oct 2019 03:56:31 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPq3Bhmz1qql2; Wed, 16 Oct 2019 05:56:31 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPq35NHz1qtT4; Wed, 16 Oct 2019 05:56:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 2_EA7CGqFr7x; Wed, 16 Oct 2019 05:56:30 +0200 (CEST) X-Auth-Info: Y2iviiFYIIR38rTDXE3kYWwdpZJH7yg3GFzs0bi9csk= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:30 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id 3C94B185866; Wed, 16 Oct 2019 05:56:08 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 17CAF1A8B98; Wed, 16 Oct 2019 05:56:01 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:51 +0200 Message-Id: <20191016035554.3912054-7-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 6/9] mpc85xx, socrates: disable VIDEO X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" disable video, as not really needed longer. Signed-off-by: Heiko Schocher --- Changes in v2: None board/socrates/socrates.c | 180 +------------------------------------ configs/socrates_defconfig | 3 - include/configs/socrates.h | 15 ---- 3 files changed, 2 insertions(+), 196 deletions(-) diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 8f9583360b..f51b0203f7 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -231,6 +231,7 @@ int ft_board_setup(void *blob, bd_t *bd) val[i++] = gd->bd->bi_flashstart; val[i++] = gd->bd->bi_flashsize; +#if defined(CONFIG_VIDEO_MB862xx) if (mb862xx.frameAdrs == CONFIG_SYS_LIME_BASE) { /* Fixup LIME mapping */ val[i++] = 2; /* chip select number */ @@ -238,6 +239,7 @@ int ft_board_setup(void *blob, bd_t *bd) val[i++] = CONFIG_SYS_LIME_BASE; val[i++] = CONFIG_SYS_LIME_SIZE; } +#endif /* Fixup FPGA mapping */ val[i++] = 3; /* chip select number */ @@ -255,184 +257,6 @@ int ft_board_setup(void *blob, bd_t *bd) } #endif /* CONFIG_OF_BOARD_SETUP */ -#define DEFAULT_BRIGHTNESS 25 -#define BACKLIGHT_ENABLE (1 << 31) - -static const gdc_regs init_regs [] = -{ - {0x0100, 0x00010f00}, - {0x0020, 0x801901df}, - {0x0024, 0x00000000}, - {0x0028, 0x00000000}, - {0x002c, 0x00000000}, - {0x0110, 0x00000000}, - {0x0114, 0x00000000}, - {0x0118, 0x01df0320}, - {0x0004, 0x041f0000}, - {0x0008, 0x031f031f}, - {0x000c, 0x017f0349}, - {0x0010, 0x020c0000}, - {0x0014, 0x01df01e9}, - {0x0018, 0x00000000}, - {0x001c, 0x01e00320}, - {0x0100, 0x80010f00}, - {0x0, 0x0} -}; - -const gdc_regs *board_get_regs (void) -{ - return init_regs; -} - -int lime_probe(void) -{ - uint cfg_br2; - uint cfg_or2; - int type; - - cfg_br2 = get_lbc_br(2); - cfg_or2 = get_lbc_or(2); - - /* Configure GPCM for CS2 */ - set_lbc_br(2, 0); - set_lbc_or(2, 0xfc000410); - set_lbc_br(2, (CONFIG_SYS_LIME_BASE) | 0x00001901); - - /* Get controller type */ - type = mb862xx_probe(CONFIG_SYS_LIME_BASE); - - /* Restore previous CS2 configuration */ - set_lbc_br(2, 0); - set_lbc_or(2, cfg_or2); - set_lbc_br(2, cfg_br2); - - return (type == MB862XX_TYPE_LIME) ? 1 : 0; -} - -/* Returns Lime base address */ -unsigned int board_video_init (void) -{ - if (!lime_probe()) - return 0; - - mb862xx.winSizeX = 800; - mb862xx.winSizeY = 480; - mb862xx.gdfIndex = GDF_15BIT_555RGB; - mb862xx.gdfBytesPP = 2; - - return CONFIG_SYS_LIME_BASE; -} - -#define W83782D_REG_CFG 0x40 -#define W83782D_REG_BANK_SEL 0x4e -#define W83782D_REG_ADCCLK 0x4b -#define W83782D_REG_BEEP_CTRL 0x4d -#define W83782D_REG_BEEP_CTRL2 0x57 -#define W83782D_REG_PWMOUT1 0x5b -#define W83782D_REG_VBAT 0x5d - -static int w83782d_hwmon_init(void) -{ - u8 buf; - - if (i2c_read(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_CFG, 1, &buf, 1)) - return -1; - - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_CFG, 0x80); - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_BANK_SEL, 0); - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_ADCCLK, 0x40); - - buf = i2c_reg_read(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_BEEP_CTRL); - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_BEEP_CTRL, - buf | 0x80); - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_BEEP_CTRL2, 0); - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_PWMOUT1, 0x47); - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_VBAT, 0x01); - - buf = i2c_reg_read(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_CFG); - i2c_reg_write(CONFIG_SYS_I2C_W83782G_ADDR, W83782D_REG_CFG, - (buf & 0xf4) | 0x01); - return 0; -} - -static void board_backlight_brightness(int br) -{ - u32 reg; - u8 buf; - u8 old_buf; - - /* Select bank 0 */ - if (i2c_read(CONFIG_SYS_I2C_W83782G_ADDR, 0x4e, 1, &old_buf, 1)) - goto err; - else - buf = old_buf & 0xf8; - - if (i2c_write(CONFIG_SYS_I2C_W83782G_ADDR, 0x4e, 1, &buf, 1)) - goto err; - - if (br > 0) { - /* PWMOUT1 duty cycle ctrl */ - buf = 255 / (100 / br); - if (i2c_write(CONFIG_SYS_I2C_W83782G_ADDR, 0x5b, 1, &buf, 1)) - goto err; - - /* LEDs on */ - reg = in_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c)); - if (!(reg & BACKLIGHT_ENABLE)) - out_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c), - reg | BACKLIGHT_ENABLE); - } else { - buf = 0; - if (i2c_write(CONFIG_SYS_I2C_W83782G_ADDR, 0x5b, 1, &buf, 1)) - goto err; - - /* LEDs off */ - reg = in_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c)); - reg &= ~BACKLIGHT_ENABLE; - out_be32((void *)(CONFIG_SYS_FPGA_BASE + 0x0c), reg); - } - /* Restore previous bank setting */ - if (i2c_write(CONFIG_SYS_I2C_W83782G_ADDR, 0x4e, 1, &old_buf, 1)) - goto err; - - return; -err: - printf("W83782G I2C access failed\n"); -} - -void board_backlight_switch (int flag) -{ - char * param; - int rc; - - if (w83782d_hwmon_init()) - printf ("hwmon IC init failed\n"); - - if (flag) { - param = env_get("brightness"); - rc = param ? simple_strtol(param, NULL, 10) : -1; - if (rc < 0) - rc = DEFAULT_BRIGHTNESS; - } else { - rc = 0; - } - board_backlight_brightness(rc); -} - -#if defined(CONFIG_CONSOLE_EXTRA_INFO) -/* - * Return text to be printed besides the logo. - */ -void video_get_info_str (int line_number, char *info) -{ - if (line_number == 1) { - strcpy (info, " Board: Socrates"); - } else { - info [0] = '\0'; - } -} -#endif - #if defined(CONFIG_OF_SEPARATE) void *board_fdt_blob_setup(void) { diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig index 2c87ec5134..be88cefe3e 100644 --- a/configs/socrates_defconfig +++ b/configs/socrates_defconfig @@ -27,7 +27,6 @@ CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y -CONFIG_CMD_BMP=y CONFIG_CMD_DATE=y # CONFIG_CMD_HASH is not set CONFIG_CMD_EXT2=y @@ -50,5 +49,3 @@ CONFIG_USB=y CONFIG_DM_USB=y # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_STORAGE=y -CONFIG_VIDEO=y -CONFIG_CONSOLE_EXTRA_INFO=y diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 4e10786ed8..c35e8aed77 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -148,21 +148,6 @@ #define CONFIG_SYS_BR2_PRELIM 0xc80018a1 /* UPMB, 32-bit */ #define CONFIG_SYS_OR2_PRELIM 0xfc000000 /* 64 MB */ -#define CONFIG_VIDEO_MB862xx -#define CONFIG_VIDEO_MB862xx_ACCEL -#define CONFIG_VIDEO_LOGO -#define CONFIG_VIDEO_BMP_LOGO -#define VIDEO_FB_16BPP_PIXEL_SWAP -#define VIDEO_FB_16BPP_WORD_SWAP -#define CONFIG_SPLASH_SCREEN -#define CONFIG_VIDEO_BMP_GZIP -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20) /* decompressed img */ - -/* SDRAM Clock frequency, 100MHz (0x0000) or 133MHz (0x10000) */ -#define CONFIG_SYS_MB862xx_CCF 0x10000 -/* SDRAM parameter */ -#define CONFIG_SYS_MB862xx_MMR 0x4157BA63 - /* Serial Port */ #define CONFIG_SYS_NS16550_SERIAL From patchwork Wed Oct 16 03:55:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177571 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJT13YR9z9sP6 for ; Wed, 16 Oct 2019 14:59:17 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 3B02EC21D9A; Wed, 16 Oct 2019 03:57:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E4844C21DEC; Wed, 16 Oct 2019 03:56:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D8CE0C21DEC; Wed, 16 Oct 2019 03:56:17 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id BB17CC21DA2 for ; Wed, 16 Oct 2019 03:56:15 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPW4Ccnz1rGSH; Wed, 16 Oct 2019 05:56:15 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPW43pCz1qtT4; Wed, 16 Oct 2019 05:56:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id sRUO2xIcPUwm; Wed, 16 Oct 2019 05:56:14 +0200 (CEST) X-Auth-Info: xIDDlIYiIdqWNCeOmwhR9nouWJ0yE9HZrvEKHKXBGwQ= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:14 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id AA3DB18531E; Wed, 16 Oct 2019 05:56:02 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 2D7961A006D; Wed, 16 Oct 2019 05:56:01 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:52 +0200 Message-Id: <20191016035554.3912054-8-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 7/9] mpc85xx, socrates: enable DM I2C X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" enable DM I2C support for the socrates board. Signed-off-by: Heiko Schocher --- Changes in v2: None configs/socrates_defconfig | 4 +++- include/configs/socrates.h | 18 +----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig index be88cefe3e..80b5631d07 100644 --- a/configs/socrates_defconfig +++ b/configs/socrates_defconfig @@ -27,7 +27,6 @@ CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y -CONFIG_CMD_DATE=y # CONFIG_CMD_HASH is not set CONFIG_CMD_EXT2=y # CONFIG_CMD_IRQ is not set @@ -36,6 +35,8 @@ CONFIG_DEFAULT_DEVICE_TREE="socrates" CONFIG_ENV_IS_IN_FLASH=y CONFIG_DM=y CONFIG_BLK=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_FSL=y # CONFIG_MMC is not set CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y @@ -43,6 +44,7 @@ CONFIG_SYS_FLASH_CFI=y CONFIG_PHY_MARVELL=y CONFIG_MII=y CONFIG_TSEC_ENET=y +CONFIG_DM_RTC=y CONFIG_RTC_RX8025=y CONFIG_SYS_NS16550=y CONFIG_USB=y diff --git a/include/configs/socrates.h b/include/configs/socrates.h index c35e8aed77..425d758e1d 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -160,23 +160,7 @@ #define CONFIG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} -/* - * I2C - */ -#define CONFIG_SYS_I2C -#define CONFIG_SYS_I2C_FSL -#define CONFIG_SYS_FSL_I2C_SPEED 102124 -#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F -#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000 -#define CONFIG_SYS_FSL_I2C2_SPEED 102124 -#define CONFIG_SYS_FSL_I2C2_SLAVE 0x7F -#define CONFIG_SYS_FSL_I2C2_OFFSET 0x3100 - -/* I2C RTC */ -#define CONFIG_SYS_I2C_RTC_ADDR 0x32 /* at address 0x32 */ - -/* I2C W83782G HW-Monitoring IC */ -#define CONFIG_SYS_I2C_W83782G_ADDR 0x28 /* W83782G address */ +#define CONFIG_SYS_SPD_BUS_NUM 0 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 From patchwork Wed Oct 16 03:55:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177573 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJTW6nwKz9sP6 for ; Wed, 16 Oct 2019 14:59:43 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id A18D6C21DAF; Wed, 16 Oct 2019 03:57:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8436EC21D8A; Wed, 16 Oct 2019 03:57:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9D6E8C21C51; Wed, 16 Oct 2019 03:56:24 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 80266C21CB1 for ; Wed, 16 Oct 2019 03:56:22 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPf2XKpz1rGSH; Wed, 16 Oct 2019 05:56:22 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPf2Jthz1qtT4; Wed, 16 Oct 2019 05:56:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id djfx8j0bPLhE; Wed, 16 Oct 2019 05:56:21 +0200 (CEST) X-Auth-Info: Ct0DAX1A3N9SuuWpEpb7Z+tDqV3qZDPYU9/93poWdMU= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:21 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id ACBEC180C93; Wed, 16 Oct 2019 05:56:04 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 43F5F1A8B9A; Wed, 16 Oct 2019 05:56:01 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:53 +0200 Message-Id: <20191016035554.3912054-9-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 8/9] mpc85xx, socrates: enable DM serial X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" switch to DM_SERIAL support. Signed-off-by: Heiko Schocher --- Changes in v2: None board/socrates/socrates.c | 5 +++++ configs/socrates_defconfig | 3 +++ include/configs/socrates.h | 12 ------------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index f51b0203f7..8549883508 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -271,3 +271,8 @@ void *board_fdt_blob_setup(void) return fw_dtb; } #endif + +int get_serial_clock(void) +{ + return 333333330; +} diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig index 80b5631d07..5bd60e0886 100644 --- a/configs/socrates_defconfig +++ b/configs/socrates_defconfig @@ -46,6 +46,9 @@ CONFIG_MII=y CONFIG_TSEC_ENET=y CONFIG_DM_RTC=y CONFIG_RTC_RX8025=y +CONFIG_SPECIFY_CONSOLE_INDEX=y +CONFIG_DM_SERIAL=y +CONFIG_SERIAL_SEARCH_ALL=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_DM_USB=y diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 425d758e1d..7adaa344bc 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -148,18 +148,6 @@ #define CONFIG_SYS_BR2_PRELIM 0xc80018a1 /* UPMB, 32-bit */ #define CONFIG_SYS_OR2_PRELIM 0xfc000000 /* 64 MB */ -/* Serial Port */ - -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE 1 -#define CONFIG_SYS_NS16550_CLK get_bus_freq(0) - -#define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x4500) -#define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x4600) - -#define CONFIG_SYS_BAUDRATE_TABLE \ - {300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200} - #define CONFIG_SYS_SPD_BUS_NUM 0 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4 From patchwork Wed Oct 16 03:55:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1177566 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46tJQT6Z9yz9sP6 for ; Wed, 16 Oct 2019 14:57:05 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 99655C21DFA; Wed, 16 Oct 2019 03:56:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9F82EC21C93; Wed, 16 Oct 2019 03:56:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 40765C21D9A; Wed, 16 Oct 2019 03:56:20 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 83053C21DFB for ; Wed, 16 Oct 2019 03:56:19 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46tJPb2S0tz1rGSH; Wed, 16 Oct 2019 05:56:19 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46tJPb2FYzz1qtT4; Wed, 16 Oct 2019 05:56:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id vJI_3FVo_FPW; Wed, 16 Oct 2019 05:56:17 +0200 (CEST) X-Auth-Info: hr7K03lybWkEpj0PbV5vNFx/gcMxLOYOBL4s33y9Yvw= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Oct 2019 05:56:17 +0200 (CEST) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id AB34E18585D; Wed, 16 Oct 2019 05:56:02 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 515) id 5AD7E1A8B9B; Wed, 16 Oct 2019 05:56:01 +0200 (CEST) From: Heiko Schocher To: U-Boot Mailing List Date: Wed, 16 Oct 2019 05:55:54 +0200 Message-Id: <20191016035554.3912054-10-hs@denx.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191016035554.3912054-1-hs@denx.de> References: <20191016035554.3912054-1-hs@denx.de> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v2 9/9] mpc85xx, socrates: add DM PCI support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" add DM PCI support on the socrates board. use PCIE_FSL now. Signed-off-by: Heiko Schocher --- Changes in v2: - use separate PCI driver for mpc85xx as Z.q. Hou mentioned: and drop the patchseries: pci: pcie_fsl: add support for none PCIe devices http://patchwork.ozlabs.org/project/uboot/list/?series=134976 END board/socrates/law.c | 2 -- board/socrates/socrates.c | 40 +++++--------------------------------- configs/socrates_defconfig | 7 +++++++ include/configs/socrates.h | 9 --------- 4 files changed, 12 insertions(+), 46 deletions(-) diff --git a/board/socrates/law.c b/board/socrates/law.c index 44703e8aca..840941b63e 100644 --- a/board/socrates/law.c +++ b/board/socrates/law.c @@ -31,9 +31,7 @@ struct law_entry law_table[] = { SET_LAW(CONFIG_SYS_DDR_SDRAM_BASE, LAW_SIZE_512M, LAW_TRGT_IF_DDR), - SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCI), SET_LAW(CONFIG_SYS_LBC_FLASH_BASE, LAW_SIZE_64M, LAW_TRGT_IF_LBC), - SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI), #if defined(CONFIG_SYS_FPGA_BASE) SET_LAW(CONFIG_SYS_FPGA_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC), #endif diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c index 8549883508..5f58b4c21b 100644 --- a/board/socrates/socrates.c +++ b/board/socrates/socrates.c @@ -50,7 +50,7 @@ int checkboard (void) } putc('\n'); -#ifdef CONFIG_PCI +#if defined(CONFIG_PCI) || defined(CONFIG_DM_PCI) /* Check the PCI_clk sel bit */ if (in_be32(&gur->porpllsr) & (1<<15)) { src = "SYSCLK"; @@ -126,6 +126,10 @@ int misc_init_r (void) &flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]); } +#if defined(CONFIG_DM_PCI) + pci_init(); +#endif + return 0; } @@ -168,40 +172,6 @@ void local_bus_init (void) upmconfig (UPMB, (uint *)UPMTableB, sizeof(UPMTableB)/sizeof(int)); } -#if defined(CONFIG_PCI) -/* - * Initialize PCI Devices, report devices found. - */ - -#ifndef CONFIG_PCI_PNP -static struct pci_config_table pci_mpc85xxads_config_table[] = { - {PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, - PCI_IDSEL_NUMBER, PCI_ANY_ID, - pci_cfgfunc_config_device, {PCI_ENET0_IOADDR, - PCI_ENET0_MEMADDR, - PCI_COMMAND_MEMORY | - PCI_COMMAND_MASTER}}, - {} -}; -#endif - - -static struct pci_controller hose = { -#ifndef CONFIG_PCI_PNP - config_table:pci_mpc85xxads_config_table, -#endif -}; - -#endif /* CONFIG_PCI */ - - -void pci_init_board (void) -{ -#ifdef CONFIG_PCI - pci_mpc85xx_init (&hose); -#endif /* CONFIG_PCI */ -} - #ifdef CONFIG_BOARD_EARLY_INIT_R int board_early_init_r (void) { diff --git a/configs/socrates_defconfig b/configs/socrates_defconfig index 5bd60e0886..1f4330d86b 100644 --- a/configs/socrates_defconfig +++ b/configs/socrates_defconfig @@ -14,6 +14,10 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_BOARD_EARLY_INIT_R=y CONFIG_HUSH_PARSER=y CONFIG_CMD_REGINFO=y +# CONFIG_BOOTM_NETBSD is not set +# CONFIG_BOOTM_PLAN9 is not set +# CONFIG_BOOTM_RTEMS is not set +# CONFIG_BOOTM_VXWORKS is not set CONFIG_CMD_IMLS=y CONFIG_CMD_DM=y CONFIG_CMD_I2C=y @@ -44,6 +48,8 @@ CONFIG_SYS_FLASH_CFI=y CONFIG_PHY_MARVELL=y CONFIG_MII=y CONFIG_TSEC_ENET=y +CONFIG_DM_PCI=y +CONFIG_PCI_MPC85XX=y CONFIG_DM_RTC=y CONFIG_RTC_RX8025=y CONFIG_SPECIFY_CONSOLE_INDEX=y @@ -53,4 +59,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_DM_USB=y # CONFIG_USB_EHCI_HCD is not set +CONFIG_USB_OHCI_PCI=y CONFIG_USB_STORAGE=y diff --git a/include/configs/socrates.h b/include/configs/socrates.h index 7adaa344bc..a03005902f 100644 --- a/include/configs/socrates.h +++ b/include/configs/socrates.h @@ -19,8 +19,6 @@ /* High Level Configuration Options */ #define CONFIG_SOCRATES 1 -#define CONFIG_PCI_INDIRECT_BRIDGE - /* * Only possible on E500 Version 2 or newer cores. */ @@ -156,7 +154,6 @@ * General PCI * Memory space is mapped 1-1. */ -#define CONFIG_SYS_PCI_PHYS 0x80000000 /* 1G PCI TLB */ /* PCI is clocked by the external source at 33 MHz */ #define CONFIG_PCI_CLK_FREQ 33000000 @@ -167,10 +164,6 @@ #define CONFIG_SYS_PCI1_IO_PHYS CONFIG_SYS_PCI1_IO_BASE #define CONFIG_SYS_PCI1_IO_SIZE 0x01000000 /* 16M */ -#if defined(CONFIG_PCI) -#undef CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ -#endif /* CONFIG_PCI */ - #define CONFIG_TSEC1 1 #define CONFIG_TSEC1_NAME "TSEC0" #define CONFIG_TSEC3 1 @@ -292,8 +285,6 @@ /* USB support */ #define CONFIG_USB_OHCI_NEW 1 #define CONFIG_PCI_OHCI 1 -#define CONFIG_PCI_OHCI_DEVNO 3 /* Number in PCI list */ -#define CONFIG_PCI_EHCI_DEVNO (CONFIG_PCI_OHCI_DEVNO / 2) #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci" #define CONFIG_SYS_OHCI_SWAP_REG_ACCESS 1