Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp192594pja; Fri, 22 Nov 2019 05:16:59 -0800 (PST) X-Google-Smtp-Source: APXvYqyKynkW46ehNr1SU/RNnr2YslGfOO3Tk/a9mD+ruKQzay3aAR2af2rptrLtCI33cUZMPHjB X-Received: by 2002:a17:906:134c:: with SMTP id x12mr22552147ejb.269.1574428619042; Fri, 22 Nov 2019 05:16:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574428619; cv=pass; d=google.com; s=arc-20160816; b=wCFxmLEgus4iywACuojlX3iPRtYz333yr6/fHTeM+Y2Qol2n27GRqnWEX/Ew3oqfhf 2zAWcmIBUhppUq3b7MAysx9mRFD5GvwwPbLWHJh79JWwlg5dOExWAgsrOH4T/1HshMe0 szRgemrCS5Bzix/WmW23Jj7dtXs3hnLERGZdWRwWtfna+qUYXMKj+QNutLfSKFxm7A8r eRW3ON/+3FknX4c8o0bbLuT3hMSXV/10j2OC+rtiyPgImDmE5LUJxfMtdxrOZOn//mGp kzTfPKJqOs6ep77vYzKsFijTtCRzdNgomxlFn/PuJ96dE7BO4QP3g/Nbu8SNXwf7R0nr qJtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:domainkey-signature; bh=Yk91gegkDiprCih4bQL3Hr91VfNtMPC59CFsak0Y0FY=; b=w5wHoghRJ+ZgwvA96YLSeTgfXaL+/+yMFJ/Q7FHtSLtEgTPA8/tBVOt1hySnXOMl66 4gRyx3w7Rn1HCGsYn1T3kKN0me2xObxCFnqcPybz8nuJ6MBHZXN/1OcfUnrEeYVin25N VO1PxJ0pR2in5lDHnshXbLaaGbXqwNDFYWAp5KtQYwIR6MxIW28pu9lDK3GEZ+Kd2RVr XUrTSclnm3xK1csjfLa3oCPzNjDAKPFXTfArIAMxWzaQduAZiJ70uJ8xTYOd9lQzXD3s 67Y7Vn7d3LLY7x9QnOy5hcIMG6hpYqnbhjQUoisrTR5a/JM32HulyW7s7+w2rT9pmr43 /qEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zoho.com header.s=zm2019 header.b=A1aFn6EC; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.com>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zoho.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si4587719edt.191.2019.11.22.05.16.34; Fri, 22 Nov 2019 05:16:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@zoho.com header.s=zm2019 header.b=A1aFn6EC; arc=pass (i=1 spf=pass spfdomain=zoho.com dkim=pass dkdomain=zoho.com dmarc=pass fromdomain=zoho.com>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=zoho.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727374AbfKVNNI (ORCPT + 99 others); Fri, 22 Nov 2019 08:13:08 -0500 Received: from sender4-pp-o98.zoho.com ([136.143.188.98]:25822 "EHLO sender4-pp-o98.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726568AbfKVNNI (ORCPT ); Fri, 22 Nov 2019 08:13:08 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1574428333; cv=none; d=zohomail.com; s=zohoarc; b=dwgH6AZ746RKEqOky+jmTkgvc6ZKmdqSXc2EMpKaoPVxeFDvTlOzIWMs9X37bxnQmf0kVlWa15zgXCfqK+Lp5x2cZPT1kVypo7J5cctjRYKHTYMcZZuZEhKKruYpQnHpzMsFa2wQug59eUKT8byscqL9BXJVNM0n59ilZDuJkkQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574428333; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To; bh=Yk91gegkDiprCih4bQL3Hr91VfNtMPC59CFsak0Y0FY=; b=Ve0oExFaT3rtQr+8RYgAscycD/LT22WM6aoRKw4qvPP92vaOjjvvmzc79/LW3xOgaGEM/G3XoD8mz3UpbNFyyauFvOYgK8OqrWrJ1sjwyw7CYbJf/zPgcims83RzUw4YOAHs1ZEBHPIykxqehUbY0HM4yyCAzK5qyNY4kVWNM7g= 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=nCHuv7rHGxq28oyvB02H0mqBjQt1aV8RucoceEA4ueqspd84kBPYQ0KrVOxRMem4QGWLt27DP6xM vwmmp7l6LCXAbsQRXl0/nYmiWGcbpSu2wLijr0/eBDeO91ffOZ91 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1574428333; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=Yk91gegkDiprCih4bQL3Hr91VfNtMPC59CFsak0Y0FY=; b=A1aFn6ECfOn26ZVQnY3yv28Kn0VY1tWBzFJpwIGEWXQNIw3GZQ5+6To/WrfBdV0C kKNDtEchNvaKqpYIHnI1bzOI6l8ajrtUVvgyuv5Vh0YNaF82GzZHlJmCVb1T14HvhMS hFAaS/YSWTiI/aHDDDIgy56SdIbueQdpcK76JYmQ= Received: from zhouyanjie-virtual-machine.localdomain (171.221.83.158 [171.221.83.158]) by mx.zohomail.com with SMTPS id 1574428332336117.71147169930214; Fri, 22 Nov 2019 05:12:12 -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 Subject: [PATCH 1/4] MIPS: Ingenic: initial X1000 support. Date: Fri, 22 Nov 2019 21:11:26 +0800 Message-Id: <1574428289-21764-2-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574428289-21764-1-git-send-email-zhouyanjie@zoho.com> References: <1574428289-21764-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- arch/mips/boot/dts/ingenic/x1000.dtsi | 161 ++++++++++++++++++++++++++++++++++ arch/mips/jz4740/Kconfig | 6 ++ arch/mips/jz4740/time.c | 4 +- 3 files changed, 170 insertions(+), 1 deletion(-) 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 0000000..b8658a6 --- /dev/null +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi @@ -0,0 +1,161 @@ +// 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>; + + clocks = <&exclk>, <&rtclk>; + clock-names = "ext", "rtc"; + + #clock-cells = <1>; + }; + + apb { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <>; + + 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 diff --git a/arch/mips/jz4740/time.c b/arch/mips/jz4740/time.c index cb768e5..3af6538 100644 --- a/arch/mips/jz4740/time.c +++ b/arch/mips/jz4740/time.c @@ -101,7 +101,9 @@ static struct clock_event_device jz4740_clockevent = { #ifdef CONFIG_MACH_JZ4740 .irq = JZ4740_IRQ_TCU0, #endif -#if defined(CONFIG_MACH_JZ4770) || defined(CONFIG_MACH_JZ4780) +#if defined(CONFIG_MACH_JZ4770) || \ + defined(CONFIG_MACH_JZ4780) || \ + defined(CONFIG_MACH_X1000) .irq = JZ4780_IRQ_TCU2, #endif }; -- 2.7.4