From patchwork Sun Nov 24 14:58:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 11259215 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0C3761390 for ; Sun, 24 Nov 2019 15:00:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6AB22073F for ; Sun, 24 Nov 2019 15:00:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zoho.com header.i=zhouyanjie@zoho.com header.b="Xs5Nn7iO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727028AbfKXPA1 (ORCPT ); Sun, 24 Nov 2019 10:00:27 -0500 Received: from sender4-pp-o98.zoho.com ([136.143.188.98]:25808 "EHLO sender4-pp-o98.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726836AbfKXPA1 (ORCPT ); Sun, 24 Nov 2019 10:00:27 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1574607571; cv=none; d=zohomail.com; s=zohoarc; b=VceJpRhstelHu3VWQn01O21dakJxQL/CXgcnjtPDY+vnsuvTaHREKfS7ZFlVP8qTHvcmds2nP05TqHFP1j1UXZBMr6UCfJIVCPAmtxeC3HirMBFr8QuxwkLr2JmbDZ5EKvR3+8ZbZPR4Gf2y5VOEdt4NAFCmClOMSGeKeuBk7nY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574607571; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To; bh=LCZt5IxSWATyaIuK7r49Oad7XHEi/Y3U6SA+F1US1Pw=; b=OguMMyi8ZgamqzMzZxOOP/JxwE6xl3ZoAEuMTicJ+dEZwsdODCjO85LiDbWTe5fgucQ2sfSL7m3I2Le2rjjS6R6MF8jy/kjB4YZrFN3fMgpTvztIpnPkuGq3CqW6s+XUdZgiUEOGvKPGc75edgTlzwZLb/765E2vQBMLZyzjNuk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=YaQRHeEYQG8+zKLoah/9lYCoU85ruQTAEuC4KCYENZjT+S98fO0U42upf2xfEz+DyvM+32A9kLtd gSUCG1y8BUu9MxqvZx/ktpHQugarvh9AdY1T1jdKzQ5JJl3rBwPm DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1574607571; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=LCZt5IxSWATyaIuK7r49Oad7XHEi/Y3U6SA+F1US1Pw=; b=Xs5Nn7iOYip0okvK93g97BP7Fbd0khzI0SUefYj/pAS8rADKtGbdgI3JaIMzmpm5 gcr+du/p7PWkWlI0etZ41H6LH9fCnu9Vr3l40f0ypkbEyjawPNh42QBPiFcSBw+8po/ qbxFnk52O+WZvTCDJ9T62OfxPhKKM1ySy1MVgk3U= Received: from zhouyanjie-virtual-machine.localdomain (171.221.112.247 [171.221.112.247]) by mx.zohomail.com with SMTPS id 1574607569247294.10331768583853; Sun, 24 Nov 2019 06:59:29 -0800 (PST) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, paul.burton@mips.com, paulburton@kernel.org, jhogan@kernel.org, mripard@kernel.org, shawnguo@kernel.org, mark.rutland@arm.com, syq@debian.org, ralf@linux-mips.org, heiko@sntech.de, icenowy@aosc.io, laurent.pinchart@ideasonboard.com, krzk@kernel.org, geert+renesas@glider.be, paul@crapouillou.net, prasannatsmkumar@gmail.com, sernia.zhou@foxmail.com, zhenwenjin@gmail.com, 772753199@qq.com Subject: [PATCH v3 1/4] MIPS: Ingenic: Initial X1000 support. Date: Sun, 24 Nov 2019 22:58:59 +0800 Message-Id: <1574607542-25670-2-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> References: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Support the Ingenic X1000 SoC using the code under arch/mips/jz4740. This is left unselectable in Kconfig until a X1000 based board is added in a later commit. Signed-off-by: Zhou Yanjie --- Notes: v1->v2: Rebase on top of mips-next, use ingenic-timer driver for system timer and clocksource. v2->v3: Drop the 'apb' node. arch/mips/boot/dts/ingenic/x1000.dtsi | 176 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 6 ++ 2 files changed, 182 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/x1000.dtsi diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi b/arch/mips/boot/dts/ingenic/x1000.dtsi new file mode 100644 index 00000000..a4c6787 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi @@ -0,0 +1,176 @@ +// SPDX-License-Identifier: GPL-2.0 +#include + +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "ingenic,x1000", "ingenic,x1000e"; + + cpuintc: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + compatible = "mti,cpu-interrupt-controller"; + }; + + intc: interrupt-controller@10001000 { + compatible = "ingenic,x1000-intc", "ingenic,jz4780-intc"; + reg = <0x10001000 0x50>; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-parent = <&cpuintc>; + interrupts = <2>; + }; + + exclk: ext { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + + rtclk: rtc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + + cgu: x1000-cgu@10000000 { + compatible = "ingenic,x1000-cgu"; + reg = <0x10000000 0x100>; + + #clock-cells = <1>; + + clocks = <&exclk>, <&rtclk>; + clock-names = "ext", "rtc"; + }; + + tcu: timer@10002000 { + compatible = "ingenic,x1000-tcu", + "ingenic,jz4770-tcu", + "simple-mfd"; + reg = <0x10002000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x10002000 0x1000>; + + #clock-cells = <1>; + + clocks = <&cgu X1000_CLK_RTCLK + &cgu X1000_CLK_EXCLK + &cgu X1000_CLK_PCLK>; + clock-names = "rtc", "ext", "pclk"; + + interrupt-controller; + #interrupt-cells = <1>; + + interrupt-parent = <&intc>; + interrupts = <27 26 25>; + }; + + uart0: serial@10030000 { + compatible = "ingenic,x1000-uart"; + reg = <0x10030000 0x100>; + + interrupt-parent = <&intc>; + interrupts = <51>; + + clocks = <&exclk>, <&cgu X1000_CLK_UART0>; + clock-names = "baud", "module"; + + status = "disabled"; + }; + + uart1: serial@10031000 { + compatible = "ingenic,x1000-uart"; + reg = <0x10031000 0x100>; + + interrupt-parent = <&intc>; + interrupts = <50>; + + clocks = <&exclk>, <&cgu X1000_CLK_UART1>; + clock-names = "baud", "module"; + + status = "disabled"; + }; + + uart2: serial@10032000 { + compatible = "ingenic,x1000-uart"; + reg = <0x10032000 0x100>; + + interrupt-parent = <&intc>; + interrupts = <49>; + + clocks = <&exclk>, <&cgu X1000_CLK_UART2>; + clock-names = "baud", "module"; + + status = "disabled"; + }; + + pinctrl: pin-controller@10010000 { + compatible = "ingenic,x1000-pinctrl"; + reg = <0x10010000 0x800>; + #address-cells = <1>; + #size-cells = <0>; + + gpa: gpio@0 { + compatible = "ingenic,x1000-gpio"; + reg = <0>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <17>; + }; + + gpb: gpio@1 { + compatible = "ingenic,x1000-gpio"; + reg = <1>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 32 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <16>; + }; + + gpc: gpio@2 { + compatible = "ingenic,x1000-gpio"; + reg = <2>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 64 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <15>; + }; + + gpd: gpio@3 { + compatible = "ingenic,x1000-gpio"; + reg = <3>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 96 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <14>; + }; + }; +}; diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig index 4dd0c44..6b96844 100644 --- a/arch/mips/jz4740/Kconfig +++ b/arch/mips/jz4740/Kconfig @@ -33,3 +33,9 @@ config MACH_JZ4780 select MIPS_CPU_SCACHE select SYS_HAS_CPU_MIPS32_R2 select SYS_SUPPORTS_HIGHMEM + +config MACH_X1000 + bool + select MIPS_CPU_SCACHE + select SYS_HAS_CPU_MIPS32_R2 + select SYS_SUPPORTS_HIGHMEM From patchwork Sun Nov 24 14:59:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 11259217 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EFF78109A for ; Sun, 24 Nov 2019 15:00:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFE0B2073F for ; Sun, 24 Nov 2019 15:00:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zoho.com header.i=zhouyanjie@zoho.com header.b="HmLpHO4S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727004AbfKXPA6 (ORCPT ); Sun, 24 Nov 2019 10:00:58 -0500 Received: from sender4-pp-o98.zoho.com ([136.143.188.98]:25823 "EHLO sender4-pp-o98.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726836AbfKXPA6 (ORCPT ); Sun, 24 Nov 2019 10:00:58 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1574607579; cv=none; d=zohomail.com; s=zohoarc; b=Q7zL//9mmnErEUbUr9capCSHc4V62WzVZj3PK3NuM/08x1Uqg1wff03gkAfONPwuSE4DhgDvkbUfuRiLBFgvnysWeb8PeDeK55KD1syeVoaatwDQY567OFThnVRod8haGA+ciD9aWT4XSLsrnkQpctD7eo1oF1+0ahJN86YyA5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574607579; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To; bh=1diHSW+QAWIjUcqo1ZVEUtcx+fphCSjBhDZABprx0Hw=; b=AFx2RbGFt+EXrLW/I0BJPiwyD5kHIbvrT1xI4KG94nPBV3FRlgu/QX1X8OBe4+F0a6iGCMkQWGMJjA9hOUq1oE5yE0moW+cBLJQwg67UuXXeXw2ZlXnLSXaDxhwqxo2L7sp8MCIvi66cN02hKIvChQsdYdhn9TkI0jOiPiW6lbY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=MvrF6j1JkQBPauAYFtpujoTucglkdDVjSdSLkzOJHF/4G/TGJM4MLsj2qJA32e6kTLR38ayTnmiS Gu9C0rcihXnNXTv6HTlwVOJZUHB82/eNL3mP7LV71GTKd978+8La DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1574607579; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=1diHSW+QAWIjUcqo1ZVEUtcx+fphCSjBhDZABprx0Hw=; b=HmLpHO4Spd8N2+LSm9cYphhSxWsimGscRhmXA3qcpvhso59ZGVdjljg8HSF33JhG YpI6JTWQVIUSiONTPrLi6znCOxs2gsZMSX2WL8+4S1xtd1xxVUfs/XfboF/dzogRvFW vPB37kxEhAGOsloJNawXQt+BV4MshThuURY0tlM0= Received: from zhouyanjie-virtual-machine.localdomain (171.221.112.247 [171.221.112.247]) by mx.zohomail.com with SMTPS id 1574607577570284.0005795893636; Sun, 24 Nov 2019 06:59:37 -0800 (PST) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, paul.burton@mips.com, paulburton@kernel.org, jhogan@kernel.org, mripard@kernel.org, shawnguo@kernel.org, mark.rutland@arm.com, syq@debian.org, ralf@linux-mips.org, heiko@sntech.de, icenowy@aosc.io, laurent.pinchart@ideasonboard.com, krzk@kernel.org, geert+renesas@glider.be, paul@crapouillou.net, prasannatsmkumar@gmail.com, sernia.zhou@foxmail.com, zhenwenjin@gmail.com, 772753199@qq.com Subject: [PATCH v3 2/4] dt-bindings: Document yna vendor-prefix. Date: Sun, 24 Nov 2019 22:59:00 +0800 Message-Id: <1574607542-25670-3-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> References: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The "yna" is an acronym of the "YSH & ATIL". Signed-off-by: Zhou Yanjie --- Notes: v1->v2: No change. v2->v3: No change. Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 967e78c..47ddd88 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1054,6 +1054,8 @@ patternProperties: description: Xilinx "^xunlong,.*": description: Shenzhen Xunlong Software CO.,Limited + "^yna,.*": + description: YSH & ATIL "^yones-toptech,.*": description: Yones Toptech Co., Ltd. "^ysoft,.*": From patchwork Sun Nov 24 14:59:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 11259219 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 562DA1390 for ; Sun, 24 Nov 2019 15:01:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3676E207DD for ; Sun, 24 Nov 2019 15:01:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zoho.com header.i=zhouyanjie@zoho.com header.b="OvNUPZ4a" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727107AbfKXPBb (ORCPT ); Sun, 24 Nov 2019 10:01:31 -0500 Received: from sender4-pp-o98.zoho.com ([136.143.188.98]:25838 "EHLO sender4-pp-o98.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726836AbfKXPBb (ORCPT ); Sun, 24 Nov 2019 10:01:31 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1574607587; cv=none; d=zohomail.com; s=zohoarc; b=jZcJDbA+Np7SCO+O1XnA9KYFsX5/J/vw34YPQbm2uuINOtWvvipu459H35pvRYOmft4EGTr6gGiOfC0zJtk28pyf2ke9vttXdrl9gANB3Bn2G6LIu4KwfJeeObsqTTfLIRba6vaNyhfwOOM2k7gQRr7jckAdRBp+E3zck03Culk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574607587; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To; bh=NtUgVYhoUaOU2Z2PLcXaTI3wuWVXwpgP6vT5SGfsNtc=; b=gl7lhUdofiBZkAMJ/p4iVudEIGOeyWIqBaKOHhYlrfGtLeGVEuTw8XWR8GsD9LCCNjk49cy2N/8xjEFvPf9TUyLhGZCSUqxyQG186dzcEIsv1AJDtkjl11GGNb2D281WhJEsTnijvbgV08WWUvMmnohEeasl5tsBowklZ5VAlt4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=C4lf+dmHO1i4jjz1MagL9KffYnaP84Pn5y+JI1sbRICSyKwaK/+zirWpOMavBRIclyrUQRkK4dB2 rQ1JgtbnnemrTh+Sbd9XWB+wzxe00LsKeQ4IZSahxlPZRRb98Gwh DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1574607587; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=NtUgVYhoUaOU2Z2PLcXaTI3wuWVXwpgP6vT5SGfsNtc=; b=OvNUPZ4aQzQ5xb3h1BZ/QmymdiG6r633R0VuJRhvxoarE8xSRzUqXRocaNhcPAOE agdTkAyA+dQsZs1gwmkSKfwxbdLn8bVUN+gttGoxyA/QoY9cwX+6xYGCmBbt39TJAPq TdpLuHrBca5yD7qF9CdEX4x11ACB1J97H6nWmKs8= Received: from zhouyanjie-virtual-machine.localdomain (171.221.112.247 [171.221.112.247]) by mx.zohomail.com with SMTPS id 1574607585895214.1092473927324; Sun, 24 Nov 2019 06:59:45 -0800 (PST) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, paul.burton@mips.com, paulburton@kernel.org, jhogan@kernel.org, mripard@kernel.org, shawnguo@kernel.org, mark.rutland@arm.com, syq@debian.org, ralf@linux-mips.org, heiko@sntech.de, icenowy@aosc.io, laurent.pinchart@ideasonboard.com, krzk@kernel.org, geert+renesas@glider.be, paul@crapouillou.net, prasannatsmkumar@gmail.com, sernia.zhou@foxmail.com, zhenwenjin@gmail.com, 772753199@qq.com Subject: [PATCH v3 3/4] dt-bindings: MIPS: Add Ingenic XBurst based boards. Date: Sun, 24 Nov 2019 22:59:01 +0800 Message-Id: <1574607542-25670-4-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> References: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add Ingenic XBurst based boards, prepare for later dts. Signed-off-by: Zhou Yanjie --- Notes: v1->v2: No change. v2->v3: No change. .../devicetree/bindings/mips/ingenic/devices.yaml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/mips/ingenic/devices.yaml diff --git a/Documentation/devicetree/bindings/mips/ingenic/devices.yaml b/Documentation/devicetree/bindings/mips/ingenic/devices.yaml new file mode 100644 index 00000000..8bb4b5d --- /dev/null +++ b/Documentation/devicetree/bindings/mips/ingenic/devices.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mips/ingenic/devices.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ingenic XBurst based Platforms Device Tree Bindings + +maintainers: + - Zhou Yanjie +description: | + Devices with a Ingenic XBurst CPU shall have the following properties. + +properties: + $nodename: + const: '/' + compatible: + oneOf: + + - description: Qi Hardware Ben NanoNote + items: + - const: qi,lb60 + + - description: Game Consoles Worldwide GCW Zero + items: + - const: gcw,zero + + - description: MIPS Creator CI20 + items: + - const: img,ci20 + + - description: YSH & ATIL General Module CU Neo + items: + - const: yna,cu1000 +... From patchwork Sun Nov 24 14:59:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 11259221 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8896C109A for ; Sun, 24 Nov 2019 15:02:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F77B2073F for ; Sun, 24 Nov 2019 15:02:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zoho.com header.i=zhouyanjie@zoho.com header.b="jmjEwC75" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbfKXPCE (ORCPT ); Sun, 24 Nov 2019 10:02:04 -0500 Received: from sender4-pp-o98.zoho.com ([136.143.188.98]:25853 "EHLO sender4-pp-o98.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726836AbfKXPCD (ORCPT ); Sun, 24 Nov 2019 10:02:03 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1574607595; cv=none; d=zohomail.com; s=zohoarc; b=IlbmYNuZ7f7+y3kik9/UghNHytbaWQ9y8KuBWosC2PZiyvQ5TNv2/ZlFOvTgxqz+B51MKpu/pVj3CcXoGW4ueDRZu65cATlI6pK7azOXZxAyn6ncZx075xUhSz0rsjT2AbkKiSazr6z1VtfywYS3DiRcDU8f1Gj7WdzFVkldnPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574607595; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To; bh=DqorXNGEJqhbDzTzZWCV8pXPtljYCp/0iOX2trVLWXA=; b=Y+wuloRcft95BYiW/q3yT5lDLfbCM71y5CXVwA+Lohrz638WC1y/TNXOTvDKYi1QyNSHFsFnhC5q3pgq6ziT9zb4P8DnIzpY0qHJoM137Rb4TnZSTnDzmFcoBuYd58DPX3+ZytNMIAHWWOw7Y2fnmX/gjE16fEBA++4okFL/PDQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=fkCnHw6BQe1sXu2IVM84IhydZgkCbUv/peertoMzImN0u+tGkAlovqoTF/xny84evG6BKBeEh+rY L+9T1krNpC7yPNebbiWQDVEp7YhnIijZD0bQkhkN14p2bTcqzWGs DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1574607595; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=DqorXNGEJqhbDzTzZWCV8pXPtljYCp/0iOX2trVLWXA=; b=jmjEwC75KPxXJWPQeef+PjkG7CM6IDhuzIJl9qNRgkcQ80CfocZKz+OZoeB4NkCB ePzmek2Rkxob1zHKKG1Bv40vJPrqsCm7dVMEAAhzJwMKY6Ti2MhtkCHwnaLh0XT9Cd3 aQPjUs7Lfra3DwHY3AhS5AUC/v7mLmWYfzkk7I/U= Received: from zhouyanjie-virtual-machine.localdomain (171.221.112.247 [171.221.112.247]) by mx.zohomail.com with SMTPS id 157460759435085.6375625816496; Sun, 24 Nov 2019 06:59:54 -0800 (PST) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, paul.burton@mips.com, paulburton@kernel.org, jhogan@kernel.org, mripard@kernel.org, shawnguo@kernel.org, mark.rutland@arm.com, syq@debian.org, ralf@linux-mips.org, heiko@sntech.de, icenowy@aosc.io, laurent.pinchart@ideasonboard.com, krzk@kernel.org, geert+renesas@glider.be, paul@crapouillou.net, prasannatsmkumar@gmail.com, sernia.zhou@foxmail.com, zhenwenjin@gmail.com, 772753199@qq.com Subject: [PATCH v3 4/4] MIPS: Ingenic: Initial YSH & ATIL CU Neo board. support. Date: Sun, 24 Nov 2019 22:59:02 +0800 Message-Id: <1574607542-25670-5-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> References: <1574607542-25670-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add a device tree for the Ingenic X1000 based YSH & ATIL CU Neo board. Note that this is unselectable via Kconfig until the X1000 SoC is made selectable in a later commit. Signed-off-by: Zhou Yanjie --- Notes: v1->v2: Rebase on top of mips-next, use TCU for system timer and clocksource. v2->v3: No change. arch/mips/boot/dts/ingenic/Makefile | 1 + arch/mips/boot/dts/ingenic/cu1000.dts | 52 ++++++++++++++++++ arch/mips/configs/cu1000_defconfig | 100 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 4 ++ 4 files changed, 157 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/cu1000.dts create mode 100644 arch/mips/configs/cu1000_defconfig diff --git a/arch/mips/boot/dts/ingenic/Makefile b/arch/mips/boot/dts/ingenic/Makefile index 9cc4844..f6db7bb 100644 --- a/arch/mips/boot/dts/ingenic/Makefile +++ b/arch/mips/boot/dts/ingenic/Makefile @@ -2,5 +2,6 @@ dtb-$(CONFIG_JZ4740_QI_LB60) += qi_lb60.dtb dtb-$(CONFIG_JZ4770_GCW0) += gcw0.dtb dtb-$(CONFIG_JZ4780_CI20) += ci20.dtb +dtb-$(CONFIG_X1000_CU1000) += cu1000.dtb obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y)) diff --git a/arch/mips/boot/dts/ingenic/cu1000.dts b/arch/mips/boot/dts/ingenic/cu1000.dts new file mode 100644 index 00000000..b19872d --- /dev/null +++ b/arch/mips/boot/dts/ingenic/cu1000.dts @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "x1000.dtsi" +#include +#include + +/ { + compatible = "yna,cu1000", "ingenic,x1000"; + model = "YSH & ATIL General Module CU Neo"; + + aliases { + serial2 = &uart2; + }; + + chosen { + stdout-path = &uart2; + }; + + memory { + device_type = "memory"; + reg = <0x0 0x04000000>; + }; +}; + +&exclk { + clock-frequency = <24000000>; +}; + +&tcu { + /* 1500 kHz for the system timer and clocksource */ + assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>; + assigned-clock-rates = <1500000>, <1500000>; + + /* Use channel #1 for the system timer channel #2 for the clocksource */ + ingenic,pwm-channels-mask = <0xfa>; +}; + +&uart2 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_uart2>; +}; + +&pinctrl { + pins_uart2: uart2 { + function = "uart2"; + groups = "uart2-data-d"; + bias-disable; + }; +}; diff --git a/arch/mips/configs/cu1000_defconfig b/arch/mips/configs/cu1000_defconfig new file mode 100644 index 00000000..88729ee --- /dev/null +++ b/arch/mips/configs/cu1000_defconfig @@ -0,0 +1,100 @@ +CONFIG_LOCALVERSION_AUTO=y +CONFIG_KERNEL_GZIP=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_SCHED=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="arch/mips/boot/ramdisk.cpio.gz" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS_ALL=y +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +CONFIG_MACH_INGENIC=y +CONFIG_X1000_CU1000=y +CONFIG_HIGHMEM=y +CONFIG_HZ_100=y +CONFIG_HZ=100 +# CONFIG_SECCOMP is not set +# CONFIG_SUSPEND is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_COMPACTION is not set +CONFIG_CMA=y +CONFIG_CMA_AREAS=7 +CONFIG_UEVENT_HELPER=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +# CONFIG_FW_LOADER is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_SERIO is not set +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_LEGACY_PTY_COUNT=2 +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=3 +CONFIG_SERIAL_8250_RUNTIME_UARTS=3 +CONFIG_SERIAL_8250_INGENIC=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_GPIO_SYSFS=y +# CONFIG_HWMON is not set +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +# CONFIG_VGA_CONSOLE is not set +# CONFIG_HID is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_NVMEM=y +CONFIG_NVMEM_SYSFS=y +CONFIG_EXT4_FS=y +# CONFIG_DNOTIFY is not set +CONFIG_PROC_KCORE=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_TMPFS=y +CONFIG_CONFIGFS_FS=y +CONFIG_NLS=y +CONFIG_NLS_CODEPAGE_936=y +CONFIG_NLS_CODEPAGE_950=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_UTF8=y +CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 +CONFIG_CONSOLE_LOGLEVEL_QUIET=15 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +CONFIG_DEBUG_INFO=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_PANIC_ON_OOPS=y +CONFIG_PANIC_TIMEOUT=10 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_DEBUG_PREEMPT is not set +CONFIG_STACKTRACE=y +# CONFIG_FTRACE is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="console=ttyS2,115200n8 mem=32M@0x0 earlycon clk_ignore_unused" +CONFIG_CMDLINE_OVERRIDE=y diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig index 6b96844..b4cee0a 100644 --- a/arch/mips/jz4740/Kconfig +++ b/arch/mips/jz4740/Kconfig @@ -16,6 +16,10 @@ config JZ4780_CI20 bool "MIPS Creator CI20" select MACH_JZ4780 +config X1000_CU1000 + bool "YSH & ATIL General Module CU Neo" + select MACH_X1000 + endchoice config MACH_JZ4740