From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9C19C004D2 for ; Sun, 30 Sep 2018 14:15:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 802E4208AE for ; Sun, 30 Sep 2018 14:15:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JFkuMs9z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 802E4208AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbeI3Usm (ORCPT ); Sun, 30 Sep 2018 16:48:42 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:36345 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbeI3Usm (ORCPT ); Sun, 30 Sep 2018 16:48:42 -0400 Received: by mail-wr1-f67.google.com with SMTP id y16so2741699wrw.3; Sun, 30 Sep 2018 07:15:28 -0700 (PDT) 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=/6+x3YShPyc6fiL5GbQhe5v9q1PG82Fg3nttEyWOhP8=; b=JFkuMs9zxFpcIF3yNEvR5ANYnhgH3fXfbxFqyCoI3ZxCaIGPlF8NIPCfjAvNSaxjQX PgojS/IXoE5f7j5fMCi1ZOFTDvMYACYhd5X0oDhwvVTmBCHVhlv0zd6skvdRzGRKr1NO GmLKVLUxFlgXpkKIZ/0Wpc1vU6H0+5ljgPuWqla5QSRF2xh1tyzuaWHLna84afZKlhW9 kxZHJ17ML7TdaMcs+FWY9b6IMEv6MfrY3LILI3o19NkrkdDr7ZhPBXBVM476gVset0wQ MC88UYTfH3qPbXyslH6N5NS+GruZLwBw5zSpts8FJ7U3o6u4XxJjDjPAAmzmBC+wHCJ2 qCXg== 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=/6+x3YShPyc6fiL5GbQhe5v9q1PG82Fg3nttEyWOhP8=; b=IGS5D0NcVtGIJHS9b3zB0yhPMK7FiZpTvsCPUrg5wqJgp3lWLy804f1XrEYAYKusfq UWbTZlbm8lQuogzTrSs3bZNzLP8MaLpqegohQo8s4XoObxVn8I2r4TT/EV5f8Rdep34g sczwMf5uJOClmi9m/KH931pOKuZ7X03xwKGVxTDtqZsdZ5yV1xMWKV3/Co/UfeqnkGj7 YYB9eLO9taGed8+qOXcEnELb9lKY8I2twcbLIqAlakg3AtWElnL9xk0XAjmN636EOM3y Q6I63LrYEA9SKV8iW0zbIR3uUDwtbyQmIX3tcQ3Bm00zaM+yesktI20eOOpmrkwpGLa2 hZGg== X-Gm-Message-State: ABuFfojt/7GUX0GnEbd8ijqYBid+TbcL7itf7EdQsNnIPT5gtF5FC2jC /1BRDiJavKbvgmr+Vnqha58= X-Google-Smtp-Source: ACcGV61fxaoJrgNv3ZHiIrQMCRYu+4+gBEnMLlLAl12dI9abbu40yo4Pw9S9dopJ0m/DVn0YJbu5Sw== X-Received: by 2002:adf:bbc3:: with SMTP id z3-v6mr4321246wrg.183.1538316927300; Sun, 30 Sep 2018 07:15:27 -0700 (PDT) Received: from laptop.localdomain ([37.122.159.87]) by smtp.gmail.com with ESMTPSA id v21-v6sm19415738wrd.4.2018.09.30.07.15.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Sep 2018 07:15:26 -0700 (PDT) From: Yasha Cherikovsky To: Ralf Baechle , Paul Burton , James Hogan , linux-mips@linux-mips.org Cc: Yasha Cherikovsky , Thomas Gleixner , Jason Cooper , Marc Zyngier , Daniel Lezcano , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC 0/5] MIPS: Lexra LX5280 CPU + Realtek RTL8186 SoC support Date: Sun, 30 Sep 2018 17:15:05 +0300 Message-Id: <20180930141510.2690-1-yasha.che3@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This RFC patch series adds all the necessary code to successfully boot Linux on the Realtek RTL8186 SoC. Boot log with this series applied (+one DT patch that adds partitions) is available here: https://gist.github.com/yashac3/483decfa8db014edfb055ba5a1f9996e Network drivers and other misc drivers are not included in this patch set (they will be sent in the future). This patch series includes: - Patch 1: Lexra LX5280 CPU support (MIPS) - Patches 2-4: DT bindings for hardware supported in patch 5 - Patch 5: RTL8186 SoC support (MIPS code, timer driver, irqchip, device tree) What's still missing: 1) Upstream toolchain support for the Lexra LX5280 CPU. (Still WIP) GCC and binutils patches are available at [1][2]. Buildroot with these patches applied is available at [3]. The toolchain work is still WIP and I'm planning to send it for review when it will be ready. Still, feel free to comment on this work too. 2) Reading the TLB size from device tree: (The reason there's no DT bindings for the LX5280 in this series) As there's no way to get the TLB size from the hardware, is must be passed in the DT. Currently in arch/mips, the FDT is not available in the cpu_probe() stage, where the 'tlbsize' field of the cpu data is set. Any ideas/suggestions on how to solve that? This patch series is on top of v4.18 + 5 prerequisite patches that are in mips-next for 4.20. [4][5]. This patch series is also available at: https://github.com/yashac3/linux-rtl8186/commits/rtl8186-porting-for-upstream-4.18 Please review. Thanks, Yasha [1] https://github.com/yashac3/gcc/commits/lx5280-gcc-8_2_0 [2] https://github.com/yashac3/binutils-gdb/commits/lx5280-porting-master [3] https://github.com/yashac3/buildroot/commits/lx5280_master [4] https://www.linux-mips.org/archives/linux-mips/2018-09/msg00769.html [5] https://www.linux-mips.org/archives/linux-mips/2018-09/msg00775.html Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Daniel Lezcano Cc: Rob Herring Cc: Mark Rutland Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Yasha Cherikovsky (5): MIPS: Add support for the Lexra LX5280 CPU dt-binding: timer: Document RTL8186 SoC DT bindings dt-binding: interrupt-controller: Document RTL8186 SoC DT bindings dt-binding: mips: Document Realtek SoC DT bindings MIPS: Add Realtek RTL8186 SoC support .../interrupt-controller/realtek,rtl8186-intc | 18 ++ .../devicetree/bindings/mips/realtek.txt | 9 + .../bindings/timer/realtek,rtl8186-timer.txt | 17 ++ arch/mips/Kbuild.platforms | 1 + arch/mips/Kconfig | 47 +++- arch/mips/Makefile | 1 + arch/mips/boot/compressed/uart-16550.c | 5 + arch/mips/boot/dts/Makefile | 1 + arch/mips/boot/dts/realtek/Makefile | 4 + arch/mips/boot/dts/realtek/rtl8186.dtsi | 86 ++++++ .../dts/realtek/rtl8186_edimax_br_6204wg.dts | 45 ++++ arch/mips/configs/rtl8186_defconfig | 112 ++++++++ arch/mips/include/asm/cpu-features.h | 3 + arch/mips/include/asm/cpu-type.h | 4 + arch/mips/include/asm/cpu.h | 9 + arch/mips/include/asm/isadep.h | 3 +- arch/mips/include/asm/mach-rtl8186/rtl8186.h | 37 +++ arch/mips/include/asm/mipsregs.h | 10 + arch/mips/include/asm/module.h | 2 + arch/mips/include/asm/pgtable-32.h | 7 +- arch/mips/include/asm/pgtable-bits.h | 9 +- arch/mips/include/asm/pgtable.h | 6 +- arch/mips/include/asm/stackframe.h | 9 +- arch/mips/include/asm/traps.h | 2 + arch/mips/kernel/Makefile | 2 + arch/mips/kernel/cpu-probe.c | 6 + arch/mips/kernel/entry.S | 3 +- arch/mips/kernel/genex.S | 6 +- arch/mips/kernel/idle.c | 10 + arch/mips/kernel/process.c | 3 +- arch/mips/kernel/traps.c | 42 +++ arch/mips/lib/Makefile | 1 + arch/mips/mm/Makefile | 1 + arch/mips/mm/c-lx5280.c | 251 ++++++++++++++++++ arch/mips/mm/cache.c | 6 + arch/mips/mm/fault.c | 4 + arch/mips/mm/tlbex.c | 1 + arch/mips/rtl8186/Makefile | 2 + arch/mips/rtl8186/Platform | 7 + arch/mips/rtl8186/irq.c | 8 + arch/mips/rtl8186/prom.c | 15 ++ arch/mips/rtl8186/setup.c | 80 ++++++ arch/mips/rtl8186/time.c | 10 + drivers/clocksource/Kconfig | 9 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-rtl8186.c | 220 +++++++++++++++ drivers/irqchip/Kconfig | 5 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-rtl8186.c | 107 ++++++++ 49 files changed, 1225 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,rtl8186-intc create mode 100644 Documentation/devicetree/bindings/mips/realtek.txt create mode 100644 Documentation/devicetree/bindings/timer/realtek,rtl8186-timer.txt create mode 100644 arch/mips/boot/dts/realtek/Makefile create mode 100644 arch/mips/boot/dts/realtek/rtl8186.dtsi create mode 100644 arch/mips/boot/dts/realtek/rtl8186_edimax_br_6204wg.dts create mode 100644 arch/mips/configs/rtl8186_defconfig create mode 100644 arch/mips/include/asm/mach-rtl8186/rtl8186.h create mode 100644 arch/mips/mm/c-lx5280.c create mode 100644 arch/mips/rtl8186/Makefile create mode 100644 arch/mips/rtl8186/Platform create mode 100644 arch/mips/rtl8186/irq.c create mode 100644 arch/mips/rtl8186/prom.c create mode 100644 arch/mips/rtl8186/setup.c create mode 100644 arch/mips/rtl8186/time.c create mode 100644 drivers/clocksource/timer-rtl8186.c create mode 100644 drivers/irqchip/irq-rtl8186.c -- 2.19.0