From patchwork Sun May 30 17:17:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450385 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS 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 32FFDC47092 for ; Sun, 30 May 2021 17:18:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 111C2611CE for ; Sun, 30 May 2021 17:18:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbhE3RUB (ORCPT ); Sun, 30 May 2021 13:20:01 -0400 Received: from aposti.net ([89.234.176.197]:37692 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbhE3RUB (ORCPT ); Sun, 30 May 2021 13:20:01 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 1/8] MIPS: mm: XBurst CPU requires sync after DMA Date: Sun, 30 May 2021 18:17:55 +0100 Message-Id: <20210530171802.23649-2-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org I am not sure why this is required, but if this is not enabled, reading from a buffer in which data has been DMA'd may read incorrect values. This used to happen for instance in mmc_app_send_scr() (drivers/mmc/core/sd_ops.c), where data is DMA'd to a buffer then copied by the CPU to a different location. Signed-off-by: Paul Cercueil --- arch/mips/Kconfig | 1 + arch/mips/mm/dma-noncoherent.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ed51970c08e7..310ce50ad285 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -112,6 +112,7 @@ config MACH_INGENIC select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_ZBOOT select DMA_NONCOHERENT + select ARCH_HAS_SYNC_DMA_FOR_CPU select IRQ_MIPS_CPU select PINCTRL select GPIOLIB diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c index 212f3ce75a6b..3c4fc97b9f39 100644 --- a/arch/mips/mm/dma-noncoherent.c +++ b/arch/mips/mm/dma-noncoherent.c @@ -32,6 +32,7 @@ static inline bool cpu_needs_post_dma_flush(void) case CPU_R12000: case CPU_BMIPS5000: case CPU_LOONGSON2EF: + case CPU_XBURST: return true; default: /* From patchwork Sun May 30 17:17:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450592 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 2DEBFC47092 for ; Sun, 30 May 2021 17:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 119A2611F0 for ; Sun, 30 May 2021 17:18:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbhE3RUJ (ORCPT ); Sun, 30 May 2021 13:20:09 -0400 Received: from aposti.net ([89.234.176.197]:37722 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbhE3RUI (ORCPT ); Sun, 30 May 2021 13:20:08 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 2/8] MIPS: boot: Support specifying UART port on Ingenic SoCs Date: Sun, 30 May 2021 18:17:56 +0100 Message-Id: <20210530171802.23649-3-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Allow specifying from the config the UART to use on Ingenic SoCs when compressed kernel debugging is enabled. Signed-off-by: Paul Cercueil --- arch/mips/Kconfig.debug | 8 ++++++++ arch/mips/boot/compressed/uart-16550.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index f5832a49a881..43dbf5930796 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug @@ -102,6 +102,14 @@ config DEBUG_ZBOOT to reduce the kernel image size and speed up the booting procedure a little. +config ZBOOT_INGENIC_UART + int "UART to use for compressed kernel debugging" + depends on DEBUG_ZBOOT && MACH_INGENIC_SOC + default 0 + range 0 4 + help + Specify the UART that should be used for compressed kernel debugging. + config SPINLOCK_TEST bool "Enable spinlock timing tests in debugfs" depends on DEBUG_FS diff --git a/arch/mips/boot/compressed/uart-16550.c b/arch/mips/boot/compressed/uart-16550.c index aee8d7b8f091..c18d7f72d9d9 100644 --- a/arch/mips/boot/compressed/uart-16550.c +++ b/arch/mips/boot/compressed/uart-16550.c @@ -19,8 +19,8 @@ #endif #ifdef CONFIG_MACH_INGENIC -#define INGENIC_UART0_BASE_ADDR 0x10030000 -#define PORT(offset) (CKSEG1ADDR(INGENIC_UART0_BASE_ADDR) + (4 * offset)) +#define INGENIC_UART_BASE_ADDR (0x10030000 + 0x1000 * CONFIG_ZBOOT_INGENIC_UART) +#define PORT(offset) (CKSEG1ADDR(INGENIC_UART_BASE_ADDR) + (4 * offset)) #endif #ifdef CONFIG_CPU_XLR From patchwork Sun May 30 17:17:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450384 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 D66C4C47091 for ; Sun, 30 May 2021 17:18:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDEC4611EE for ; Sun, 30 May 2021 17:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbhE3RUP (ORCPT ); Sun, 30 May 2021 13:20:15 -0400 Received: from aposti.net ([89.234.176.197]:37756 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbhE3RUO (ORCPT ); Sun, 30 May 2021 13:20:14 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 3/8] MIPS: cpu-probe: Fix FPU detection on Ingenic JZ4760(B) Date: Sun, 30 May 2021 18:17:57 +0100 Message-Id: <20210530171802.23649-4-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Ingenic JZ4760 and JZ4760B do have a FPU, but the config registers don't report it. Force the FPU detection in case the processor ID match the JZ4760(B) one. Signed-off-by: Paul Cercueil --- arch/mips/kernel/cpu-probe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 0ef240adefb5..630fcb4cb30e 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -1840,6 +1840,11 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu) */ case PRID_COMP_INGENIC_D0: c->isa_level &= ~MIPS_CPU_ISA_M32R2; + + /* FPU is not properly detected on JZ4760(B). */ + if (c->processor_id == 0x2ed0024f) + c->options |= MIPS_CPU_FPU; + fallthrough; /* From patchwork Sun May 30 17:17:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450591 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 3EFF4C47092 for ; Sun, 30 May 2021 17:18:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24316611EE for ; Sun, 30 May 2021 17:18:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbhE3RUW (ORCPT ); Sun, 30 May 2021 13:20:22 -0400 Received: from aposti.net ([89.234.176.197]:37782 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbhE3RUW (ORCPT ); Sun, 30 May 2021 13:20:22 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 4/8] MIPS: Kconfig: ingenic: Ensure MACH_INGENIC_GENERIC selects all SoCs Date: Sun, 30 May 2021 18:17:58 +0100 Message-Id: <20210530171802.23649-5-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The MACH_INGENIC_GENERIC config option must select all SoCs, in order for all the SoC-specific drivers to become available. Signed-off-by: Paul Cercueil --- arch/mips/ingenic/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/ingenic/Kconfig b/arch/mips/ingenic/Kconfig index 3238e16febd5..f595b339a4b8 100644 --- a/arch/mips/ingenic/Kconfig +++ b/arch/mips/ingenic/Kconfig @@ -4,9 +4,11 @@ config MACH_INGENIC_GENERIC bool select MACH_INGENIC select MACH_JZ4740 + select MACH_JZ4725B select MACH_JZ4770 select MACH_JZ4780 select MACH_X1000 + select MACH_X1830 choice prompt "Machine type" From patchwork Sun May 30 17:17:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450383 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 5044BC47091 for ; Sun, 30 May 2021 17:18:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3289E61108 for ; Sun, 30 May 2021 17:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbhE3RU2 (ORCPT ); Sun, 30 May 2021 13:20:28 -0400 Received: from aposti.net ([89.234.176.197]:37814 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229878AbhE3RU2 (ORCPT ); Sun, 30 May 2021 13:20:28 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 5/8] MIPS: ingenic: Select CPU_SUPPORTS_CPUFREQ && MIPS_EXTERNAL_TIMER Date: Sun, 30 May 2021 18:17:59 +0100 Message-Id: <20210530171802.23649-6-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The clock driving the XBurst CPUs in Ingenic SoCs is integer divided from the main PLL. As such, it is possible to control the frequency of the CPU, either by changing the divider, or by changing the rate of the main PLL. The XBurst CPUs also lack the CP0 timer; the TCU, a separate piece of hardware in the SoC, provides this functionality. Signed-off-by: Paul Cercueil --- arch/mips/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 310ce50ad285..80d7c3fde056 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -429,6 +429,8 @@ config MACH_INGENIC_SOC select MIPS_GENERIC select MACH_INGENIC select SYS_SUPPORTS_ZBOOT_UART16550 + select CPU_SUPPORTS_CPUFREQ + select MIPS_EXTERNAL_TIMER config LANTIQ bool "Lantiq based platforms" From patchwork Sun May 30 17:18:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450590 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 EC590C47092 for ; Sun, 30 May 2021 17:18:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D368F611EE for ; Sun, 30 May 2021 17:18:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229945AbhE3RUh (ORCPT ); Sun, 30 May 2021 13:20:37 -0400 Received: from aposti.net ([89.234.176.197]:37834 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbhE3RUf (ORCPT ); Sun, 30 May 2021 13:20:35 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 6/8] MIPS: ingenic: jz4780: Fix I2C nodes to match DT doc Date: Sun, 30 May 2021 18:18:00 +0100 Message-Id: <20210530171802.23649-7-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The "ingenic,jz4780-i2c" should have "ingenic,jz4770-i2c" as a fallback compatible, as per the Device Tree documentation found in Documentation/devicetree/bindings/i2c/ingenic,i2c.yaml. Signed-off-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/jz4780.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi index 8d01feef7ff5..9e34f433b9b5 100644 --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi @@ -339,7 +339,7 @@ uart4: serial@10034000 { }; i2c0: i2c@10050000 { - compatible = "ingenic,jz4780-i2c"; + compatible = "ingenic,jz4780-i2c", "ingenic,jz4770-i2c"; #address-cells = <1>; #size-cells = <0>; @@ -357,7 +357,7 @@ i2c0: i2c@10050000 { }; i2c1: i2c@10051000 { - compatible = "ingenic,jz4780-i2c"; + compatible = "ingenic,jz4780-i2c", "ingenic,jz4770-i2c"; #address-cells = <1>; #size-cells = <0>; reg = <0x10051000 0x1000>; @@ -374,7 +374,7 @@ i2c1: i2c@10051000 { }; i2c2: i2c@10052000 { - compatible = "ingenic,jz4780-i2c"; + compatible = "ingenic,jz4780-i2c", "ingenic,jz4770-i2c"; #address-cells = <1>; #size-cells = <0>; reg = <0x10052000 0x1000>; @@ -391,7 +391,7 @@ i2c2: i2c@10052000 { }; i2c3: i2c@10053000 { - compatible = "ingenic,jz4780-i2c"; + compatible = "ingenic,jz4780-i2c", "ingenic,jz4770-i2c"; #address-cells = <1>; #size-cells = <0>; reg = <0x10053000 0x1000>; @@ -408,7 +408,7 @@ i2c3: i2c@10053000 { }; i2c4: i2c@10054000 { - compatible = "ingenic,jz4780-i2c"; + compatible = "ingenic,jz4780-i2c", "ingenic,jz4770-i2c"; #address-cells = <1>; #size-cells = <0>; reg = <0x10054000 0x1000>; From patchwork Sun May 30 17:18:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450382 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 706CDC47092 for ; Sun, 30 May 2021 17:19:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59B7D60200 for ; Sun, 30 May 2021 17:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229878AbhE3RUo (ORCPT ); Sun, 30 May 2021 13:20:44 -0400 Received: from aposti.net ([89.234.176.197]:37872 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbhE3RUo (ORCPT ); Sun, 30 May 2021 13:20:44 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 7/8] MIPS: ingenic: gcw0: Set codec to cap-less mode for FM radio Date: Sun, 30 May 2021 18:18:01 +0100 Message-Id: <20210530171802.23649-8-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org When using the FM radio, we must not have capacitors on the headphones line, since it is used as the antenna. The "FM Radio" widget is removed so that the cap-less mode can be enabled dynamically through DAPM when the line input is used. This widget was useless anyway. Signed-off-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/gcw0.dts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/gcw0.dts b/arch/mips/boot/dts/ingenic/gcw0.dts index f4c04f2263ea..4abb0318416c 100644 --- a/arch/mips/boot/dts/ingenic/gcw0.dts +++ b/arch/mips/boot/dts/ingenic/gcw0.dts @@ -74,7 +74,6 @@ sound { simple-audio-card,widgets = "Speaker", "Speaker", "Headphone", "Headphones", - "Line", "FM Radio", "Microphone", "Built-in Mic"; simple-audio-card,routing = "Headphones Amp INL", "LHPOUT", @@ -85,8 +84,8 @@ sound { "Speaker Amp INR", "ROUT", "Speaker", "Speaker Amp OUTL", "Speaker", "Speaker Amp OUTR", - "LLINEIN", "FM Radio", - "RLINEIN", "FM Radio", + "LLINEIN", "Cap-less", + "RLINEIN", "Cap-less", "Built-in Mic", "MICBIAS", "MIC1P", "Built-in Mic", "MIC1N", "Built-in Mic"; From patchwork Sun May 30 17:18:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 450589 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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 BE50FC47091 for ; Sun, 30 May 2021 17:19:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A344361090 for ; Sun, 30 May 2021 17:19:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229867AbhE3RUv (ORCPT ); Sun, 30 May 2021 13:20:51 -0400 Received: from aposti.net ([89.234.176.197]:37896 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbhE3RUu (ORCPT ); Sun, 30 May 2021 13:20:50 -0400 From: Paul Cercueil To: Thomas Bogendoerfer Cc: Rob Herring , =?utf-8?b?5ZGo55Cw5p2w?= , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, list@opendingux.net, Paul Cercueil Subject: [PATCH 8/8] MIPS: ingenic: rs90: Add dedicated VRAM memory region Date: Sun, 30 May 2021 18:18:02 +0100 Message-Id: <20210530171802.23649-9-paul@crapouillou.net> In-Reply-To: <20210530171802.23649-1-paul@crapouillou.net> References: <20210530171802.23649-1-paul@crapouillou.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a 1 MiB memory area dedicated to the video driver. This area will be managed by Linux' CMA, so that the ingenic-drm driver can be sure to always be able to allocate contiguous buffers. Signed-off-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/rs90.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/mips/boot/dts/ingenic/rs90.dts b/arch/mips/boot/dts/ingenic/rs90.dts index 4eb1edbfc155..74fee7f01352 100644 --- a/arch/mips/boot/dts/ingenic/rs90.dts +++ b/arch/mips/boot/dts/ingenic/rs90.dts @@ -16,6 +16,18 @@ memory { reg = <0x0 0x2000000>; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + vmem: video-memory@1f00000 { + compatible = "shared-dma-pool"; + reg = <0x1f00000 0x100000>; + reusable; + }; + }; + vcc: regulator { compatible = "regulator-fixed"; @@ -300,6 +312,8 @@ &tcu { }; &lcd { + memory-region = <&vmem>; + pinctrl-names = "default"; pinctrl-0 = <&pins_lcd>; };