From patchwork Fri Mar 6 17:29:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 11424503 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 60075139A for ; Fri, 6 Mar 2020 17:29:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36E2320658 for ; Fri, 6 Mar 2020 17:29:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=goldelico.com header.i=@goldelico.com header.b="gej49vhs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726905AbgCFR3y (ORCPT ); Fri, 6 Mar 2020 12:29:54 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.83]:20002 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgCFR3o (ORCPT ); Fri, 6 Mar 2020 12:29:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1583515781; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=lEE++eKlyuzECuicW9tbfiPKM1IUQEvd+ZMWJoo7aec=; b=gej49vhsuQqRpCdwO2O7p1wOynthv85FgmKmRoPt3Rfkn9m5T4n0rZcgpTcc0+M7tG WalhozaA5U4f1G5qauMhUWAXIHQZjIUSM3bGGnsceT2u1PDePmqiVp7KHm04cnltzSwh LQ1N/MsUkCFK7y+YG94SHp6XZBpq6VJoDcgg9jNHSG95v7js2J0UgBwD8MFjM4QxFkKP JqrCY56gAiDWE5rTWpYAwJ/uWB37JH6um5bO9DLwKVK943OpJ/ooKBuzHPiz9d3N5Dlz uwF+nCimfnAAyHsUwnrdfzd8Y8OVTNENmqu3yMViDE13U0BejIUaXhZTeLBuypFRlGCG BykQ== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1mfYzBGHXH6GQjzrz4=" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 46.2.0 DYNA|AUTH) with ESMTPSA id y0a02cw26HTXZtb (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 6 Mar 2020 18:29:33 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Mark Rutland , Thomas Bogendoerfer , "H. Nikolaus Schaller" , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Alex Smith Subject: [PATCH v6 1/3] MIPS: DTS: CI20: add DT node for IR sensor Date: Fri, 6 Mar 2020 18:29:30 +0100 Message-Id: <0cc9510007f85a8d38d176d835d82c9baef132e4.1583515771.git.hns@goldelico.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org From: Alex Smith The infrared sensor on the CI20 board is connected to a GPIO and can be operated by using the gpio-ir-recv driver. Add a DT node for the sensor to allow that driver to be used. Signed-off-by: Alex Smith Signed-off-by: H. Nikolaus Schaller --- arch/mips/boot/dts/ingenic/ci20.dts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts index c340f947baa0..e6ae08c979ea 100644 --- a/arch/mips/boot/dts/ingenic/ci20.dts +++ b/arch/mips/boot/dts/ingenic/ci20.dts @@ -62,6 +62,11 @@ enable-active-high; }; + ir: ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpe 3 GPIO_ACTIVE_LOW>; + }; + wlan0_power: fixedregulator@1 { compatible = "regulator-fixed"; regulator-name = "wlan0_power"; From patchwork Fri Mar 6 17:29:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 11424501 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 340B314E3 for ; Fri, 6 Mar 2020 17:29:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 144232072A for ; Fri, 6 Mar 2020 17:29:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=goldelico.com header.i=@goldelico.com header.b="O/w1lI9P" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726704AbgCFR3p (ORCPT ); Fri, 6 Mar 2020 12:29:45 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([81.169.146.168]:27607 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726307AbgCFR3o (ORCPT ); Fri, 6 Mar 2020 12:29:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1583515781; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=HnNPqD5yo9W35H/FixWc+0XP7wAdWZANIC6iGgREJ7k=; b=O/w1lI9PNX7RvSTvBJ5DZAgRYvFjvluFcNTLKiAmPI+KsJPHg1IMvVGI5S9wGX8gHz GZL4Yb+gY3bOn+PBj8oP2k8h2RFvl/UjRLnKe0rRRLTRkzrkDLIqd6cNtMZvSxq+SCoU J6+oWh2octsXWuZDrnsCY15qJdAI9J4mUMN7WbPS4Zglxy2eszNtu6dMdA0+D2TE2YCF 9q2s0+3liB5yfEDU3BoXp0y3TdZaekRBqk6VP+WaCsxm+KfhB7QtcBzZWGEntJa7w1CT ZXj3N3pgjhX2D8zPytJnq9r446BnAHIjKbwCf6Q81Nk3gOQf0/z/nrgdD9plSmhxy7Fq Maaw== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1mfYzBGHXH6GQjzrz4=" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 46.2.0 DYNA|AUTH) with ESMTPSA id y0a02cw26HTYZtc (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 6 Mar 2020 18:29:34 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Mark Rutland , Thomas Bogendoerfer , "H. Nikolaus Schaller" , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org Subject: [PATCH v6 2/3] MIPS: DTS: CI20: multiple DTS improvements Date: Fri, 6 Mar 2020 18:29:31 +0100 Message-Id: <9c5ab093f6e94741db1aed591687df08426c3266.1583515771.git.hns@goldelico.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org a) add DT node for SW1 as Enter button The SW1 button can be used as a simple one-button keyboard and is connected to PD17. Note: SW1 has a second meaning to change the boot sequence when pressed while powering on. b) give eth0_power a defined voltage. This is a 3.3V power switch (DVNET3.3V). Signed-off-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/ci20.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts index e6ae08c979ea..a18c7650c489 100644 --- a/arch/mips/boot/dts/ingenic/ci20.dts +++ b/arch/mips/boot/dts/ingenic/ci20.dts @@ -4,6 +4,7 @@ #include "jz4780.dtsi" #include #include +#include #include #include @@ -27,6 +28,17 @@ 0x30000000 0x30000000>; }; + gpio-keys { + compatible = "gpio-keys"; + + sw1 { + label = "ci20:sw1"; + linux,code = ; + gpios = <&gpd 17 GPIO_ACTIVE_HIGH>; + wakeup-source; + }; + }; + leds { compatible = "gpio-leds"; @@ -58,6 +70,8 @@ eth0_power: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "eth0_power"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; gpio = <&gpb 25 GPIO_ACTIVE_LOW>; enable-active-high; }; From patchwork Fri Mar 6 17:29:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 11424497 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 DED9114E3 for ; Fri, 6 Mar 2020 17:29:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF4A020658 for ; Fri, 6 Mar 2020 17:29:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=goldelico.com header.i=@goldelico.com header.b="DYq1VZ10" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726382AbgCFR3o (ORCPT ); Fri, 6 Mar 2020 12:29:44 -0500 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.80]:25622 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726237AbgCFR3o (ORCPT ); Fri, 6 Mar 2020 12:29:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1583515781; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=F7Q7dzKizkE8VkIH23/riTwDlFWCGM9XLFl0TNbD9Eo=; b=DYq1VZ10FQOymgNarr/J4s02+7mP0sHY23mRhrWlvm/tFAMnOb2YOhVh4bBsde+ZZ6 sI56AtmCM1IpZEKF8Oz7fDOMDFWl9gaD2QrfBCamCwDipiwHmelvYbuJgcjm2Y+IN/Ba bCXv9DfeFAEI3lt/tAIrIma4Ik+VWBMrxi6XuiBurPNjKUS8rZuVMpyY2MEloRz9Q3B6 Yvm2kMbO9TFLRILnwrUj55NtccN3fej23n7iLKaOaglue8imodUR3cNv0+WTzL2msa7m JHygOKSZs4cn2K0vq3mU63ZIogFqFNAYc1VkLNyh762grElSD4Cic35iKId4zyumb/Tj lEBQ== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1mfYzBGHXH6GQjzrz4=" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 46.2.0 DYNA|AUTH) with ESMTPSA id y0a02cw26HTYZte (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 6 Mar 2020 18:29:34 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Mark Rutland , Thomas Bogendoerfer , "H. Nikolaus Schaller" , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal Cc: devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org Subject: [PATCH v6 3/3] MIPS: CI20: defconfig: multiple improvements Date: Fri, 6 Mar 2020 18:29:32 +0100 Message-Id: <3423a1167a36aac94dc5b38830d319af694c6422.1583515771.git.hns@goldelico.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org a) configure for supporting modules Not all drivers need to be compiled into the kernel. Support building and loading of kernel modules. b) compile leds-gpio driver into the kernel and configure for LED triggers DTS has been augmented to add some gpio-leds. We need the leds-gpio driver and enable the triggers. c) configure CONFIG_REGULATOR_ACT8865 for PMU The PMU on the CI20 board is an ACT8600 using the ACT8865 driver. Since it is not compiled, the PMU and the CI20 board is running in power-on reset state of the PMU. d) compile gpio-ir driver The CI20 board has a gpio based IR receiver. e) configure for CONFIG_KEYBOARD_GPIO=m The SW1 button is hooked up to send input events. Signed-off-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil --- arch/mips/configs/ci20_defconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig index be41df2a81fb..0db0088bbc1c 100644 --- a/arch/mips/configs/ci20_defconfig +++ b/arch/mips/configs/ci20_defconfig @@ -1,4 +1,5 @@ # CONFIG_LOCALVERSION_AUTO is not set +CONFIG_MODULES=y CONFIG_KERNEL_XZ=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y @@ -88,12 +89,14 @@ CONFIG_I2C_JZ4780=y CONFIG_SPI=y CONFIG_SPI_GPIO=y CONFIG_GPIO_SYSFS=y +CONFIG_KEYBOARD_GPIO=m # CONFIG_HWMON is not set CONFIG_WATCHDOG=y CONFIG_JZ4740_WDT=y CONFIG_REGULATOR=y CONFIG_REGULATOR_DEBUG=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ACT8865=y # CONFIG_VGA_CONSOLE is not set # CONFIG_HID is not set # CONFIG_USB_SUPPORT is not set @@ -166,3 +169,21 @@ CONFIG_STACKTRACE=y # CONFIG_FTRACE is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="earlycon console=ttyS4,115200 clk_ignore_unused" +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_MTD=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=y +CONFIG_LEDS_TRIGGER_CAMERA=m +CONFIG_LIRC=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_RC_DEVICES=y +CONFIG_IR_GPIO_CIR=m +CONFIG_IR_GPIO_TX=m