Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp686342pxb; Wed, 11 Nov 2020 13:42:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfyAKM4CkDq22EJqBRTeU7BMTyIQQjfehz6koRWQ647JWS+hUDhZYIqL3vA0XgkLuzF0gS X-Received: by 2002:a05:6402:b6e:: with SMTP id cb14mr1762899edb.308.1605130930508; Wed, 11 Nov 2020 13:42:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605130930; cv=none; d=google.com; s=arc-20160816; b=HNSRUfsKb3pXf8MFjkdYoHhbLwmRnJ7d/X1qP4uHzAjjwrbZ0hyu0wygncwwtduJ7p 7t7pM8XRC9N+y1l7a/aFeR24CfnwWkbqFz1IaJn6Q07UPbHLHiC1ZoxN5OwGfz9Y9BEv E9XiHR4HW+LW6M79FhkMcDRJez7e7fpFXiSlAP3U6NB4I8bNIabVYATT6F4OxN6NAy/k udQJK1zin50Hw0o5C9K/GqropD6VzLki0qcRRSDoqQwGSYPm0UUpoQKIuSjK2ETWi+Q6 UdAGFln8WZdadFNFo6dBOi+zFpkgezbCynb/tyAGLUzuQbBMm/RhL6xpYTOR99n0D4xU N3JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+fzlfnA2TEDDFFxjWmlVuY8W0FfkEiYNB2C9rSQv2Nw=; b=Ycj62jr8iOs+F831vRe7MvXjxftzTJgaV+C6HVted1NojjfTVrOxRXwLwi1h8zxlm1 Kz283V2S6nZtUZer+UwxZ2Ge8eO7G99HhV+ornWXcwLgyN0rd+1mIivWs/KPVEXWIscy EePCRCm0W1pepslFobC+WJiy23O5HSlVqfmkPw+F6Esv7BUqqX+zNPHBMYsh3WcaaPHo tkh5s9EjdUSkLDm4nVdWP63FbP0AkgGW57E1R9DM5+LRiuzxHwdbbuKn3OPzmWUYxw8o DWajTrteXy/NEgcNpdFGXFpcsDfWhNza7buCxaS7XPUtbdlrs4HDz8iQoETIXw4nVShg +2kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tGbRKnfE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v10si2379030ede.131.2020.11.11.13.41.46; Wed, 11 Nov 2020 13:42:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tGbRKnfE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726177AbgKKVkX (ORCPT + 99 others); Wed, 11 Nov 2020 16:40:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725949AbgKKVkW (ORCPT ); Wed, 11 Nov 2020 16:40:22 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CEA5C0613D1; Wed, 11 Nov 2020 13:40:22 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id q5so2512893pfk.6; Wed, 11 Nov 2020 13:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+fzlfnA2TEDDFFxjWmlVuY8W0FfkEiYNB2C9rSQv2Nw=; b=tGbRKnfEbiFdiYH22xCoHpmARpVopCQnFSWi+fbgjBIRTEZqkv26kgFRi+e+NEYG45 x5jKQvvsKn7rvdRUSGKR2UkF57rw7akl7AZTiO79wtdtN4Y1yQkN8DIiK7evq8wR1k5H KvvyIaPcELxpO7Kv6t3OMKZ0vsuVNs++eO2lZ6O9wCbzqKQImq81kkZn4ht82+w8P0mx T0RTRqep7HTrig/hfSXmqlEkNW7oA8vDpPGtE2nz0fWPnuhsI2RIhqKGJb0TytXF8nVX GEyKZI+5ThdqLnNr7p6ObxR0UIlh75bnnx5UJwATfw7lHmSpTcQzyQHDSAZ4hzAU79L/ gkVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+fzlfnA2TEDDFFxjWmlVuY8W0FfkEiYNB2C9rSQv2Nw=; b=nWvYnfIrTVFxIsV4vEt3YxsiPUxYekQMwmDV7U8/XudQlrarX7X55ZZUWOwlMszbep 9L8O5F74mi8ETQpYhfKdUJJBiKkjD/nFVsgrCBUU/c2ervIUbZ06TADqOqZBQcnITvvs Osco8rBESoWb8hPCAi206XbNWqeG1Pms8BaBiC3PV4oolLOUJtydVGlAGv3dE7IRgE3I R60eFBsjYYNDhdk4rkTGpjmpJdvbsG8D14KSMMQiZRGdbXpOLwnvePDjkQiB/49jUfZP jXIp4h68cyWuc0Jv5Uu5MW/vDN2zEfeJXbXQ2W4zlWQ/rC9tsu2mb9GntkbFw9IZFt6l Ed5g== X-Gm-Message-State: AOAM530YAzjHgn/Rbtr8maWW14O3dyh3bw9UXAp334WDTCsHpgF6MohB 64rsqbi7HXqLxJbBrEBfVYcuWI7JGBtsDQ== X-Received: by 2002:a63:fb50:: with SMTP id w16mr22695107pgj.202.1605130821725; Wed, 11 Nov 2020 13:40:21 -0800 (PST) Received: from localhost (g133.220-213-56.ppp.wakwak.ne.jp. [220.213.56.133]) by smtp.gmail.com with ESMTPSA id a11sm3683616pfn.125.2020.11.11.13.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 13:40:20 -0800 (PST) From: Stafford Horne To: LKML Cc: Filip Kokosinski , Mateusz Holenko , Stafford Horne , Karol Gugala , Rob Herring , Jonas Bonn , Stefan Kristiansson , devicetree@vger.kernel.org, openrisc@lists.librecores.org Subject: [PATCH] openrisc: add support for LiteX Date: Thu, 12 Nov 2020 06:39:59 +0900 Message-Id: <20201111214003.1506246-1-shorne@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Filip Kokosinski This adds support for a basic LiteX-based SoC with a mor1kx soft CPU. Signed-off-by: Filip Kokosinski Signed-off-by: Mateusz Holenko [shorne: Merged in soc-cntl patch, removed CROSS_COMPILE, sort MAINT.] Signed-off-by: Stafford Horne --- MAINTAINERS | 1 + arch/openrisc/boot/dts/or1klitex.dts | 55 +++++++++++++++++++++++ arch/openrisc/configs/or1klitex_defconfig | 18 ++++++++ 3 files changed, 74 insertions(+) create mode 100644 arch/openrisc/boot/dts/or1klitex.dts create mode 100644 arch/openrisc/configs/or1klitex_defconfig diff --git a/MAINTAINERS b/MAINTAINERS index 0b1f39b3938d..9c55a54c9673 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10177,6 +10177,7 @@ M: Karol Gugala M: Mateusz Holenko S: Maintained F: Documentation/devicetree/bindings/*/litex,*.yaml +F: arch/openrisc/boot/dts/or1klitex.dts F: drivers/soc/litex/litex_soc_ctrl.c F: drivers/tty/serial/liteuart.c F: include/linux/litex.h diff --git a/arch/openrisc/boot/dts/or1klitex.dts b/arch/openrisc/boot/dts/or1klitex.dts new file mode 100644 index 000000000000..3f9867aa3844 --- /dev/null +++ b/arch/openrisc/boot/dts/or1klitex.dts @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * LiteX-based System on Chip + * + * Copyright (C) 2019 Antmicro + */ + +/dts-v1/; +/ { + compatible = "opencores,or1ksim"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&pic>; + + aliases { + serial0 = &serial0; + }; + + chosen { + bootargs = "console=liteuart"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x00000000 0x10000000>; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + cpu@0 { + compatible = "opencores,or1200-rtlsvn481"; + reg = <0>; + clock-frequency = <100000000>; + }; + }; + + pic: pic { + compatible = "opencores,or1k-pic"; + #interrupt-cells = <1>; + interrupt-controller; + }; + + serial0: serial@e0002000 { + device_type = "serial"; + compatible = "litex,liteuart"; + reg = <0xe0002000 0x100>; + }; + + soc_ctrl0: soc_controller@e0000000 { + compatible = "litex,soc-controller"; + reg = <0xe0000000 0xc>; + status = "okay"; + }; +}; diff --git a/arch/openrisc/configs/or1klitex_defconfig b/arch/openrisc/configs/or1klitex_defconfig new file mode 100644 index 000000000000..3c2c70d3d740 --- /dev/null +++ b/arch/openrisc/configs/or1klitex_defconfig @@ -0,0 +1,18 @@ +CONFIG_BLK_DEV_INITRD=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BUG_ON_DATA_CORRUPTION=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_EMBEDDED=y +CONFIG_HZ_100=y +CONFIG_INITRAMFS_SOURCE="openrisc-rootfs.cpio.gz" +CONFIG_OF_OVERLAY=y +CONFIG_OPENRISC_BUILTIN_DTB="or1klitex" +CONFIG_PANIC_ON_OOPS=y +CONFIG_PRINTK_TIME=y +CONFIG_LITEX_SOC_CONTROLLER=y +CONFIG_SERIAL_LITEUART=y +CONFIG_SERIAL_LITEUART_CONSOLE=y +CONFIG_SOFTLOCKUP_DETECTOR=y +CONFIG_TTY_PRINTK=y -- 2.26.2