From patchwork Mon May 25 17:41:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 11569141 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 C3F2B14F6 for ; Mon, 25 May 2020 17:42:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD64B207DA for ; Mon, 25 May 2020 17:42:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="uGztXLgG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389539AbgEYRmR (ORCPT ); Mon, 25 May 2020 13:42:17 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:48862 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389348AbgEYRmR (ORCPT ); Mon, 25 May 2020 13:42:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1590428533; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=7pGoTltF4vbYs/4AgdTEYADlgf+GoP3BBu4X9qCt46A=; b=uGztXLgGX6XMUBxLQUUTtmjfB1jF1T/eLtSCAk0NmpBsAp6xcjRasLXmF4/+wVuVW/A3gy P3Y9Bl+sBCwV9yGB+0CoHVtblVBoogDrOrXSxA2N9lN/Q6aNVk/yJoU7FV9MnEfDZKKvFo dGDuLr3O1NHUHqlKm7OaES93ykSUDVY= From: Paul Cercueil To: Thomas Bogendoerfer Cc: od@zcrc.me, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH 1/3] MIPS: ingenic: DTS: Add memory info of GCW Zero Date: Mon, 25 May 2020 19:41:53 +0200 Message-Id: <20200525174155.457491-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add memory info of the GCW Zero in its devicetree. The bootloader generally provides this information, but since it is fixed to 512 MiB, it doesn't hurt to have it in devicetree. It allows the kernel to boot without any parameter passed as argument. Signed-off-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/gcw0.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/boot/dts/ingenic/gcw0.dts b/arch/mips/boot/dts/ingenic/gcw0.dts index c2396b5ca175..8d22828787d8 100644 --- a/arch/mips/boot/dts/ingenic/gcw0.dts +++ b/arch/mips/boot/dts/ingenic/gcw0.dts @@ -19,6 +19,12 @@ aliases { serial3 = &uart3; }; + memory: memory { + device_type = "memory"; + reg = <0x0 0x10000000>, + <0x30000000 0x10000000>; + }; + chosen { stdout-path = "serial2:57600n8"; }; From patchwork Mon May 25 17:41:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 11569143 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 0AACD739 for ; Mon, 25 May 2020 17:42:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E874B207DA for ; Mon, 25 May 2020 17:42:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="EgEo1mMX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389620AbgEYRmY (ORCPT ); Mon, 25 May 2020 13:42:24 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:48890 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389348AbgEYRmY (ORCPT ); Mon, 25 May 2020 13:42:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1590428534; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WUGaynRLAt4hNNQ3ZwtjFrnVP7l8OxM7M2JwLPdQUmc=; b=EgEo1mMXSMR5o+eLiHSLfzqVtBtdpZBTttvYcgE/2Us0mjfG44zqnath4veZhrgLq2xiCu uw4b6Glw8aLvLSnZzC6OcQMI8BKsin9nA1YFleOWC4kyOORXQjFr32/bwzzEiJRwkXDXJT pMoBLVCEqAhCRuaZ0ywEQ11Tsnho5JQ= From: Paul Cercueil To: Thomas Bogendoerfer Cc: od@zcrc.me, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH 2/3] MIPS: ingenic: Add support for GCW Zero prototype Date: Mon, 25 May 2020 19:41:54 +0200 Message-Id: <20200525174155.457491-2-paul@crapouillou.net> In-Reply-To: <20200525174155.457491-1-paul@crapouillou.net> References: <20200525174155.457491-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Add support for the GCW Zero prototype. The only (?) difference is that it only has 256 MiB of RAM, compared to the 512 MiB of RAM of the retail device. Signed-off-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/gcw0_proto.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 arch/mips/boot/dts/ingenic/gcw0_proto.dts diff --git a/arch/mips/boot/dts/ingenic/gcw0_proto.dts b/arch/mips/boot/dts/ingenic/gcw0_proto.dts new file mode 100644 index 000000000000..02df22f8ae0f --- /dev/null +++ b/arch/mips/boot/dts/ingenic/gcw0_proto.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "gcw0.dts" + +/ { + model = "GCW Zero Prototype"; +}; + +&memory { + /* Prototype has only 256 MiB of RAM */ + reg = <0x0 0x10000000>; +}; From patchwork Mon May 25 17:41:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 11569145 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 EC15F14F6 for ; Mon, 25 May 2020 17:42:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3E0720870 for ; Mon, 25 May 2020 17:42:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="esxmnJ85" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390514AbgEYRmb (ORCPT ); Mon, 25 May 2020 13:42:31 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:48922 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389348AbgEYRmb (ORCPT ); Mon, 25 May 2020 13:42:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1590428535; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hPflBaHsPOYHwSyPSQMst63oUT7yG5ljn2n34MW5nkk=; b=esxmnJ85ycbnuPSjCLt4plZ0YSPQEtomE9/hZZVKsmU0OLqT5BPAx73PotDATivxLKIfbp X6SVeXIXyruQzR91ak4WsZHyri3vkYzZDaiYnz413ifx/vigCkaEX9LfQB3K1w24ThhXtw O+KmAJqbXnX1xzNIWHV7FxBT3/JzZF0= From: Paul Cercueil To: Thomas Bogendoerfer Cc: od@zcrc.me, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH 3/3] MIPS: ingenic: Default to a generic board Date: Mon, 25 May 2020 19:41:55 +0200 Message-Id: <20200525174155.457491-3-paul@crapouillou.net> In-Reply-To: <20200525174155.457491-1-paul@crapouillou.net> References: <20200525174155.457491-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Having a generic board option makes it possible to create a kernel that will run on various Ingenic SoCs, as long as the right devicetree is provided. Signed-off-by: Paul Cercueil --- arch/mips/jz4740/Kconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/mips/jz4740/Kconfig b/arch/mips/jz4740/Kconfig index 412d2faa3cdf..9c2e8c15bb97 100644 --- a/arch/mips/jz4740/Kconfig +++ b/arch/mips/jz4740/Kconfig @@ -2,7 +2,14 @@ choice prompt "Machine type" depends on MACH_INGENIC - default JZ4740_QI_LB60 + default INGENIC_GENERIC_BOARD + +config INGENIC_GENERIC_BOARD + bool "Generic board" + select MACH_JZ4740 + select MACH_JZ4770 + select MACH_JZ4780 + select MACH_X1000 config JZ4740_QI_LB60 bool "Qi Hardware Ben NanoNote"