From patchwork Mon May 16 11:58:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB738C433EF for ; Mon, 16 May 2022 11:59:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240733AbiEPL7X (ORCPT ); Mon, 16 May 2022 07:59:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbiEPL7W (ORCPT ); Mon, 16 May 2022 07:59:22 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AC1A15A0B; Mon, 16 May 2022 04:59:21 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id p26so1751259eds.5; Mon, 16 May 2022 04:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O1BYS9UgVZFFyEZ8wlaCzvbMmLIqMqA+LjVcM1kOh4o=; b=cNQJV+Bs81tLUSH7A4R/Nso8Qnlmlps7sPTj/74fJT7Ex2wxjlHjoZ4ycHtI5X9OKk VSdQj/HodJ66vn35VzMA9/mTsHAWG10IhOipRamiGrGuFRMU9QiJf/o9CmZsu1vKKQXb 5uaB0xmGAwaB9a89o/dT7NYlVeszWou/egVivAlFc8/Qryf2MRx1V2GJQoU8uNMYvNFU pPoGkXS5XUqrYkiuVIr0zTqrNyQKFyiGCgCtOpecAa9H0nS+rIpYJMcG5PpLDoKBe1eE oWblulcouHJ2VpKn32llYcGibqENOHoILKmrYZShFtpsJD1QK/75rFipZQiExBbXZuvs gViA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O1BYS9UgVZFFyEZ8wlaCzvbMmLIqMqA+LjVcM1kOh4o=; b=zpdpHfDkr/VEh1JbBAtjTGFbaHK0rzF0q+IdsmlFhtix0+pjp+IDaYoc85eVQ8h/tH C8u8/UC++WtGMBkSbjInHcvAyzUtKXWJlII3XNV4i/h9+l221Rq92e7hmKkX80BxHp6j 5Cpb0H0pHKNJbVpQ29Lxj6gXITB6/knwAUSKnGqymPhODPvcGJFF+88Dy9r9IAlaJrQq Od9T+7Dpt1kfcVOo/BK1v+H3stI514neyYTpvU+b5qg428CSP+xdddBZ1bHXDC4c4X77 13DB8U6n5gMvDdluLsjv+ahsFj9jgIEldba7tF2BNy1/SnFi8AI8cuL3Tql2Lj3tl3np yvHQ== X-Gm-Message-State: AOAM531ihDM9CFhPlnsoFmMrvDAQqPZ4AdRDjSzcSfQZgQUrd+FjEGOp OyyGLcVgq5Q5V1dHaL+b9Nc= X-Google-Smtp-Source: ABdhPJzg5eVFZfUYNcIyON++UrT9fMivCPU5hqFmSyaJ/kDkchFAcT6BpW1+45v57xquAfSHt6eVKA== X-Received: by 2002:a05:6402:42d4:b0:416:5cac:a9a0 with SMTP id i20-20020a05640242d400b004165caca9a0mr12857396edc.86.1652702359489; Mon, 16 May 2022 04:59:19 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:19 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Alexander Stein , Christoph Niedermaier , Krzysztof Kozlowski , Li Yang , Lucas Stach , Marcel Ziswiler , Matthias Schiffer , Oleksij Rempel , Rob Herring , Sebastian Reichel , Shawn Guo , Tim Harvey , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 01/17] dt-bindings: arm: fsl: Add carrier for toradex,apalis-imx6q Date: Mon, 16 May 2022 13:58:29 +0200 Message-Id: <20220516115846.58328-2-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher Add binding for the Ixora V1.2 carrier board our Apalis iMX6D/Q may be mated with. Signed-off-by: Max Krummenacher --- Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml index 08bdd30e511c..eb090372dd23 100644 --- a/Documentation/devicetree/bindings/arm/fsl.yaml +++ b/Documentation/devicetree/bindings/arm/fsl.yaml @@ -320,6 +320,7 @@ properties: - enum: - toradex,apalis_imx6q-ixora # Apalis iMX6Q/D Module on Ixora Carrier Board - toradex,apalis_imx6q-ixora-v1.1 # Apalis iMX6Q/D Module on Ixora V1.1 Carrier Board + - toradex,apalis_imx6q-ixora-v1.2 # Apalis iMX6Q/D Module on Ixora V1.2 Carrier Board - toradex,apalis_imx6q-eval # Apalis iMX6Q/D Module on Apalis Evaluation Board - const: toradex,apalis_imx6q - const: fsl,imx6q From patchwork Mon May 16 11:58:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90864C433EF for ; Mon, 16 May 2022 11:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243305AbiEPL7b (ORCPT ); Mon, 16 May 2022 07:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243282AbiEPL7Z (ORCPT ); Mon, 16 May 2022 07:59:25 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13DF615A2D; Mon, 16 May 2022 04:59:24 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id fd25so5367440edb.3; Mon, 16 May 2022 04:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y6JdWBOFeyMMw2iBqLTjLOG7raGk0JckwGY/WzDd5go=; b=U1gO0n8iTonrVb7p6x+lN4NDxpjrm7HbjBINUn9bMCEotMjj6Nod0nH3R8IHT35io9 4xj5JJt2VNTcCAX6kLTotF7PFk/55xGnWxTsgLa9+vGllxGJ22MW5esjuJYWwkd5VGKY vSC+0wegwUd4BuQOXLKGi1KZrPzx16GlBm9gmybNz7lm6Dy5KJdA1bqIYNQdSRWbl1Qx YVkdOQRL04r8GRsRbG0aFrta56kVllaj839/ManUpGgWK2flp0DOGT3VgJkV0nRLzmqk AMAT/sHoTyepTiW1b3z9zPGt3k4wQ1E8UGdIDMYK7H+Mck7ZH344/7RoUzQ4fUPzAI7J lagw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y6JdWBOFeyMMw2iBqLTjLOG7raGk0JckwGY/WzDd5go=; b=7ZMBzGE9PDTO4neRhqRu4ChHBInec3SVS1nrtMmTcpSuJxE3qdGZxrsQRbd8puw1WE tcnnvK3oCbytVPcR5M3OEa1R7x7Y/Q3diZTRmpkkZARQyTLw3OE7d/XvxayzhKOIpJUe Az0S8Y9iMdxVdZYySUXLqJNxEkCTuUooWWQFWMEepfXt2tuGJHka2ogDrCUfc3axPVh2 s+v5WqUqUSu+O3zCGYVtFwOZjk2yP0LEtANQI98cQOpNuSSJ6hn9P4eLJQVlvibPBIL9 75TS9U0r+dwDPLAvDDdepJDdstwggdhpfz1GABADK0gDfFAD4FCTEAbraJ7iqcI7Mld9 kG1A== X-Gm-Message-State: AOAM5313j3zWqfPecrthYcvVJ7GznKImt78vFQ0wqzh6a9TI41WyzvSn IxndyDyvENWQX4ay0lMMg2A= X-Google-Smtp-Source: ABdhPJzm1oBNCNN5MgwfKo3BaHvqMFSf/kni3zzK323H2ANh2ioEuNI0P3DTutn+5O/rQ6DqMydRig== X-Received: by 2002:aa7:d659:0:b0:42a:b0d5:a64e with SMTP id v25-20020aa7d659000000b0042ab0d5a64emr5133125edr.157.1652702362702; Mon, 16 May 2022 04:59:22 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:22 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 03/17] ARM: dts: imx6q-apalis: Add gpio-line-names Date: Mon, 16 May 2022 13:58:31 +0200 Message-Id: <20220516115846.58328-4-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher Add GPIO line names on module level. Those are all GPIOs which a user might use on his custom carrier board. If more meaningful names are available on the carrier board, the user can overwrite the line names in the carrier board level device tree. Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 193 ++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index da919d0544a8..e56451651a6d 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -141,6 +141,199 @@ status = "disabled"; }; +&gpio1 { + gpio-line-names = "MXM3_84", + "MXM3_4", + "MXM3_15/GPIO7", + "MXM3_96", + "MXM3_37", + "", + "MXM3_17/GPIO8", + "MXM3_14", + "MXM3_12", + "MXM3_2", + "MXM3_184", + "MXM3_180", + "MXM3_178", + "MXM3_176", + "MXM3_188", + "MXM3_186", + "MXM3_160", + "MXM3_162", + "MXM3_150", + "MXM3_144", + "MXM3_154", + "MXM3_146", + "", + "", + "MXM3_72"; +}; + +&gpio2 { + gpio-line-names = "MXM3_148", + "MXM3_152", + "MXM3_156", + "MXM3_158", + "MXM3_1/GPIO1", + "MXM3_3/GPIO2", + "MXM3_5/GPIO3", + "MXM3_7/GPIO4", + "MXM3_95", + "MXM3_6", + "MXM3_8", + "MXM3_123", + "MXM3_126", + "MXM3_128", + "MXM3_130", + "MXM3_132", + "MXM3_253", + "MXM3_251", + "MXM3_283", + "MXM3_281", + "MXM3_279", + "MXM3_277", + "MXM3_243", + "MXM3_235", + "MXM3_231", + "MXM3_229", + "MXM3_233", + "MXM3_198", + "MXM3_275", + "MXM3_273", + "MXM3_207", + "MXM3_122"; +}; + +&gpio3 { + gpio-line-names = "MXM3_271", + "MXM3_269", + "MXM3_301", + "MXM3_299", + "MXM3_297", + "MXM3_295", + "MXM3_293", + "MXM3_291", + "MXM3_289", + "MXM3_287", + "MXM3_249", + "MXM3_247", + "MXM3_245", + "MXM3_286", + "MXM3_239", + "MXM3_35", + "MXM3_205", + "MXM3_203", + "MXM3_201", + "MXM3_116", + "MXM3_114", + "MXM3_262", + "MXM3_274", + "MXM3_124", + "MXM3_110", + "MXM3_120", + "MXM3_263", + "MXM3_265", + "", + "MXM3_135", + "MXM3_261", + "MXM3_259"; +}; + +&gpio4 { + gpio-line-names = "", + "", + "", + "", + "", + "MXM3_194", + "MXM3_136", + "MXM3_134", + "MXM3_140", + "MXM3_138", + "", + "MXM3_220", + "", + "", + "MXM3_18", + "MXM3_16", + "", + "", + "MXM3_214", + "MXM3_216", + "MXM3_164"; +}; + +&gpio5 { + gpio-line-names = "MXM3_159", + "", + "", + "", + "MXM3_257", + "", + "", + "", + "", + "", + "MXM3_200", + "MXM3_196", + "MXM3_204", + "MXM3_202", + "", + "", + "", + "", + "MXM3_191", + "MXM3_197", + "MXM3_77", + "MXM3_195", + "MXM3_221", + "MXM3_225", + "MXM3_223", + "MXM3_227", + "MXM3_209", + "MXM3_211", + "MXM3_118", + "MXM3_112", + "MXM3_187", + "MXM3_185"; +}; + +&gpio6 { + gpio-line-names = "MXM3_183", + "MXM3_181", + "MXM3_179", + "MXM3_177", + "MXM3_175", + "MXM3_173", + "MXM3_255", + "MXM3_83", + "MXM3_91", + "MXM3_13/GPIO6", + "MXM3_11/GPIO5", + "MXM3_79", + "", + "", + "MXM3_190", + "MXM3_193", + "MXM3_89"; +}; + +&gpio7 { + gpio-line-names = "", + "", + "", + "", + "", + "", + "", + "", + "", + "MXM3_99", + "MXM3_85", + "MXM3_217", + "MXM3_215"; +}; + &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; From patchwork Mon May 16 11:58:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0246FC433EF for ; Mon, 16 May 2022 11:59:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243286AbiEPL7m (ORCPT ); Mon, 16 May 2022 07:59:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243300AbiEPL7b (ORCPT ); Mon, 16 May 2022 07:59:31 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DF7A15FC2; Mon, 16 May 2022 04:59:25 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id z2so28179109ejj.3; Mon, 16 May 2022 04:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gThDHWbqFCP9qbssdWR/8tkQmg9lvSi8P3DDStpWpd0=; b=TEt+cednHQf4XGucaHpUbUP6tpT44YDZvznSBa2Or8dRdQ+cKl4YLuIlXmnmCSJiNK ypcnB40JSfXoioah4RU3H2Mzdi0z2Fr50pshMwmSdFL/OgXiyM4BN1GXfQb82eJg5VRN 6Tpe/AmWatHltSCB4iaQjLSqGvuwTnfYnPysTYQS0oTIEx6fv/xhU9siTFInUXSBMbSn aNXROk9MAESZvRzgaMcwZfuLFBUEym/gU5DZX/EVRhLgKDbX4V+Piisrx14VaRzhZYFM 5saA2ujhsb8GHsfl8HarkZHO8aLR0Q02FHE9r/opPzJ9J4ShlFN7eiNmS+pqR2aIsNAO oZgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gThDHWbqFCP9qbssdWR/8tkQmg9lvSi8P3DDStpWpd0=; b=4Ho7N4+jvCM/II7wvJOHtJzoj9wkAOugJ1XU+urrUse9/SfapO08EsRh3Ke5NKXhBD gcy2yfRE6QtIY5EWhDA69iWL3BlFuin5VkoLj0Mjq3pkaGjblum8BGl8Psz7kznAEzMP cKjOB3p9bkKl+IGBcaWdgatA9ZbjM+3CY6HgTTDQdBhBpc/DXBe+5tV5BTHycuif2ABA 41jtFdjtC0U+CY3UexnPLZadoXIJd2QOwaiM4H3mrefoGJ9IwpD5pj+VMMxXaacQMHWK YfHsU6EwehcFeQYtXfp5B8t9SfvlPYwleTNAVAJzHab5s91jdCPqKHj3i2zFJkRnmB28 /IQw== X-Gm-Message-State: AOAM530iwnJqnLWx4uPkk9VGaUgNQezmQs6JlffrlvZsav4QPAqYvDOz 8r3gbQa0T3YeSa7Pd2XV7CM= X-Google-Smtp-Source: ABdhPJzBfuv2XyXGJugCPvYCLipwLx8XOgyffkIKDcO9mO6hrNSqRypVFjxhgkTh1s6TdZgYxEJlxg== X-Received: by 2002:a17:907:a429:b0:6fd:da12:eec4 with SMTP id sg41-20020a170907a42900b006fdda12eec4mr14255039ejc.707.1652702364111; Mon, 16 May 2022 04:59:24 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:23 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 04/17] ARM: dts: imx6q-apalis: Command pmic to standby for poweroff Date: Mon, 16 May 2022 13:58:32 +0200 Message-Id: <20220516115846.58328-5-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher The Apalis iMX6 HW doesn't allow to use the PWR_ON_REQ signal for poweroff. Use the fsl,pmic-stby-poweroff property to command the PMIC into a low power mode in poweroff. Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index e56451651a6d..668793356b46 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -125,6 +125,10 @@ status = "disabled"; }; +&clks { + fsl,pmic-stby-poweroff; +}; + /* Apalis SPI1 */ &ecspi1 { cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; @@ -387,6 +391,7 @@ pmic: pfuze100@8 { compatible = "fsl,pfuze100"; + fsl,pmic-stby-poweroff; reg = <0x08>; regulators { From patchwork Mon May 16 11:58:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03FEEC433F5 for ; Mon, 16 May 2022 11:59:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243283AbiEPL7w (ORCPT ); Mon, 16 May 2022 07:59:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243319AbiEPL7j (ORCPT ); Mon, 16 May 2022 07:59:39 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1964715FCE; Mon, 16 May 2022 04:59:30 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id tk15so4685667ejc.6; Mon, 16 May 2022 04:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gk+Al3GhpVx5YnHdlxIQSiRQjppttTaoPkIXQqKosHE=; b=MwShmOxoYa0ud8MhJ0NOSqRZ0X6ErVSIQhCK4u/i0r1M1PWmYQYxw3bb9scmXjtLOn QpUoAnvoNsA7XDVffaXiR5y6SnzhxiCh5n/bCT8CGkCqiQEDJzzMyE4F1FGzfoH541Dj anpBu3nzp/hOJ0rugwRES6jYaINHfj5CSF0GpWyNAyqQrVa54xJgyaggPjVvO0Cc/qiT aXU9oXiYR1YV7VqvDH5vfWkp5EA7F5vw44Ots1Y1/DT4TkpWhSZ7hjrMF0ASMKFshlBD Oz+2kk5vcjjJC+t+19KqfAFXoeetpLYvPH2X3aG+Zcos0XT+3sdmu34kirMMxzlUg10U oqlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gk+Al3GhpVx5YnHdlxIQSiRQjppttTaoPkIXQqKosHE=; b=1phZgIj+mfMJ+uZI0NYMJFGmOLeB+4BQqBDwiAPlIPNRWWxBi08TSMOx+OWiNy029I 7mKzprufgz/xgm5q+gQK7nkyhmuFVFzwQ0w+er3neXG4z96XImO9zjE0t+DmsFLzfv4S 29jDbPXD3PuQg6JBh0H5j3HfOBQbQjN9wYFAPCTnjuRDeFyCoCP6E0bBfxMkU9y0jGn4 TjJs7xE3UNjZGo9YsSgwKXwlCu9ZWs7EGMtRduTMrQ6MxxGkL4JELw9dp/9QsNkwLm/E 2Sa5ql9Cb63XWMrHUlzgKFdgfH8dU6IrmG7EQPDVPDt86a7BobY37QyPsIo/nKMAyuMi FMgw== X-Gm-Message-State: AOAM531VRuJYCRhOjMHVPX82HzTN0hJaMtp9DULj0jpMtlMnbQu5GFjQ 5Y92zdqn4yw6SO8YXflHowPn0rWCNpo= X-Google-Smtp-Source: ABdhPJzpRcXV4iJUcMwBSRRFb2kS/v+knGeN0ueBE0f3EzuoxkNiKtYs5eBBHfhqMIFojNbojaAgIQ== X-Received: by 2002:a17:907:3f16:b0:6f4:c54:2700 with SMTP id hq22-20020a1709073f1600b006f40c542700mr14812849ejc.615.1652702368590; Mon, 16 May 2022 04:59:28 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:28 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 07/17] ARM: dts: imx6q-apalis: Move Atmel MXT touch ctrl to SoM dtsi Date: Mon, 16 May 2022 13:58:35 +0200 Message-Id: <20220516115846.58328-8-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher Reduces code duplication. While at it drop the comments which do not apply on Apalis iMX6 but add the correct SoM pin names. Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6q-apalis-eval.dts | 13 ------------- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 13 ------------- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 13 ------------- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 11 +++++++++++ 4 files changed, 11 insertions(+), 39 deletions(-) diff --git a/arch/arm/boot/dts/imx6q-apalis-eval.dts b/arch/arm/boot/dts/imx6q-apalis-eval.dts index fe5d491e1399..5985d1169be1 100644 --- a/arch/arm/boot/dts/imx6q-apalis-eval.dts +++ b/arch/arm/boot/dts/imx6q-apalis-eval.dts @@ -82,19 +82,6 @@ &i2c1 { status = "okay"; - /* - * Touchscreen is using SODIMM 28/30, also used for PWM, PWM, - * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms - */ - touchscreen@4a { - compatible = "atmel,maxtouch"; - reg = <0x4a>; - interrupt-parent = <&gpio6>; - interrupts = <10 IRQ_TYPE_EDGE_FALLING>; - reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* SODIMM 13 */ - status = "disabled"; - }; - pcie-switch@58 { compatible = "plx,pex8605"; reg = <0x58>; diff --git a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts index 8febfc0aea93..21f88e19e87d 100644 --- a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts +++ b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts @@ -89,19 +89,6 @@ &i2c1 { status = "okay"; - /* - * Touchscreen is using SODIMM 28/30, also used for PWM, PWM, - * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms - */ - touchscreen@4a { - compatible = "atmel,maxtouch"; - reg = <0x4a>; - interrupt-parent = <&gpio6>; - interrupts = <10 IRQ_TYPE_EDGE_FALLING>; - reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* SODIMM 13 */ - status = "disabled"; - }; - /* M41T0M6 real time clock on carrier board */ rtc_i2c: rtc@68 { compatible = "st,m41t0"; diff --git a/arch/arm/boot/dts/imx6q-apalis-ixora.dts b/arch/arm/boot/dts/imx6q-apalis-ixora.dts index 78cf1d9583c1..6743617ad1c1 100644 --- a/arch/arm/boot/dts/imx6q-apalis-ixora.dts +++ b/arch/arm/boot/dts/imx6q-apalis-ixora.dts @@ -88,19 +88,6 @@ &i2c1 { status = "okay"; - /* - * Touchscreen is using SODIMM 28/30, also used for PWM, PWM, - * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms - */ - touchscreen@4a { - compatible = "atmel,maxtouch"; - reg = <0x4a>; - interrupt-parent = <&gpio6>; - interrupts = <10 IRQ_TYPE_EDGE_FALLING>; - reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* SODIMM 13 */ - status = "disabled"; - }; - eeprom@50 { compatible = "atmel,24c02"; reg = <0x50>; diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 9413c14ce5f6..3aa66b6d0c88 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -416,6 +416,17 @@ scl-gpios = <&gpio5 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; sda-gpios = <&gpio5 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "disabled"; + + atmel_mxt_ts: touchscreen@4a { + compatible = "atmel,maxtouch"; + /* These GPIOs are muxed with the iomuxc node */ + interrupt-parent = <&gpio6>; + interrupts = <10 IRQ_TYPE_EDGE_FALLING>; /* MXM3_11 */ + reg = <0x4a>; + reset-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>; /* MXM3_13 */ + status = "disabled"; + }; + }; /* From patchwork Mon May 16 11:58:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09F20C433FE for ; Mon, 16 May 2022 12:00:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231718AbiEPMAB (ORCPT ); Mon, 16 May 2022 08:00:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243331AbiEPL7k (ORCPT ); Mon, 16 May 2022 07:59:40 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA13F16584; Mon, 16 May 2022 04:59:31 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id dk23so28149832ejb.8; Mon, 16 May 2022 04:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t6QnOlaEmPk5w0CUbgkiElPmdAVeupgyOfiVgHTVYrs=; b=poefYTAJysRL8JajKHfgAq/lICxCmMyF+rhh0w43DuY6aRO8dzAW0s4xWZ3AxcN1n7 +Qv4CUjgVmaQ8cSg7Jg+3yGpN3EN/8Fhtlpl9piAUXSk714XXKzGwXOCrmazlOzm/9QX kSdJFE0379pD9qH85ORs2ojBZibpxusIVI/20KqVZTJhgg+XEOXNNM/mKewxJP78kxmw f3QsOCabKNhfGB/DrBTOhj8A22j3ls9EqztCyOjB0CnbqHprT0GuRDBOvDSr6NVgA/hh z/zcmbAJ2x0Bzpnn+YfK0e2TaZbSRwlFcMfANmdGZsBZkJjH3PaKkejGg6OyETR+ys/s DAUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t6QnOlaEmPk5w0CUbgkiElPmdAVeupgyOfiVgHTVYrs=; b=WG9vILC4SPlfRBD5i03GRC7WvKtlYgEE/tUF8LijrbNUeLHX4M2DcmhUWKz5cqnPIQ wSe8eQ0zCf8lnb++3F0S+8UI2bji7+/VIVVFwVWe4PB7nEU7B3XAP+uEPq0x8h5Wr8Z3 NPT633A48vXKNuyrTuSitXPwbHuqkcqLJ+VAz/v00n0Aiveh4ZkQn9QxyDijq4asQKDu qrDpKOon5LJ1Zg2ne5+1HrRHz3L7IcrD8J/hi416jK8DM5W4auT9PrIRflMk/cLUvalv LjBlQeH80Elpn8sHM8oRQJgMzZPQKjjnSlooRpprTNO7LMoRBYn+lFt0LH7BJ0F1Jhxx rR1g== X-Gm-Message-State: AOAM533H5E7Xy9rpQYQ6m5wBvgFWoNNn09r9+4tSc8/UVtxQiiOLHCL6 UvnmKhhXAslP5H44fhgNAas= X-Google-Smtp-Source: ABdhPJxwm87KMgQCehgWjFdS+7fr1G8eU83fjJqZBMEpJZZWwL64J1D4qLUTjnVUDevA3y+Pc27FSQ== X-Received: by 2002:a17:907:3e03:b0:6da:8c5a:6d4a with SMTP id hp3-20020a1709073e0300b006da8c5a6d4amr15173944ejc.585.1652702370206; Mon, 16 May 2022 04:59:30 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:29 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Oleksandr Suvorov , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 08/17] ARM: dts: imx6q-apalis: Add LVDS panel support Date: Mon, 16 May 2022 13:58:36 +0200 Message-Id: <20220516115846.58328-9-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Oleksandr Suvorov Add LVDS panel and endpoint linkage support but keep the inherited disabled state. This allows to enable it in an overlay per the current system configuration. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6q-apalis-eval.dts | 4 --- arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 4 --- arch/arm/boot/dts/imx6q-apalis-ixora.dts | 4 --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 36 +++++++++++++++++++ 4 files changed, 36 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/imx6q-apalis-eval.dts b/arch/arm/boot/dts/imx6q-apalis-eval.dts index 5985d1169be1..948bbece3ab5 100644 --- a/arch/arm/boot/dts/imx6q-apalis-eval.dts +++ b/arch/arm/boot/dts/imx6q-apalis-eval.dts @@ -102,10 +102,6 @@ status = "okay"; }; -&ldb { - status = "okay"; -}; - &pcie { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_reset_moci>; diff --git a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts index 21f88e19e87d..beb1981fc775 100644 --- a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts +++ b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts @@ -104,10 +104,6 @@ status = "okay"; }; -&ldb { - status = "okay"; -}; - &pcie { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_reset_moci>; diff --git a/arch/arm/boot/dts/imx6q-apalis-ixora.dts b/arch/arm/boot/dts/imx6q-apalis-ixora.dts index 6743617ad1c1..28e5d6b68530 100644 --- a/arch/arm/boot/dts/imx6q-apalis-ixora.dts +++ b/arch/arm/boot/dts/imx6q-apalis-ixora.dts @@ -108,10 +108,6 @@ status = "okay"; }; -&ldb { - status = "okay"; -}; - &pcie { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_reset_moci>; diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 3aa66b6d0c88..428841cdaac2 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -68,6 +68,18 @@ }; }; + panel_lvds: panel-lvds { + compatible = "panel-lvds"; + backlight = <&backlight>; + status = "disabled"; + + port { + lvds_panel_in: endpoint { + remote-endpoint = <&lvds0_out>; + }; + }; + }; + reg_module_3v3: regulator-module-3v3 { compatible = "regulator-fixed"; regulator-name = "+V3.3"; @@ -610,6 +622,30 @@ remote-endpoint = <&lcd_display_in>; }; +&ldb { + lvds-channel@0 { + port@4 { + reg = <4>; + + lvds0_out: endpoint { + remote-endpoint = <&lvds_panel_in>; + }; + }; + }; + + lvds-channel@1 { + fsl,data-mapping = "spwg"; + fsl,data-width = <18>; + + port@4 { + reg = <4>; + + lvds1_out: endpoint { + }; + }; + }; +}; + &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm1>; From patchwork Mon May 16 11:58:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573105 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C86EC433EF for ; Mon, 16 May 2022 12:00:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243327AbiEPMAW (ORCPT ); Mon, 16 May 2022 08:00:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243395AbiEPL75 (ORCPT ); Mon, 16 May 2022 07:59:57 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C840C167DA; Mon, 16 May 2022 04:59:37 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id g6so28205336ejw.1; Mon, 16 May 2022 04:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7EhdZnBGNhKoELha1acB7pKc8koKdRuYwtp3Avxy8oI=; b=i9EsMC2lv00nRAFVxDcRyY0hG5V121w+/Ew8fuvpkalFFHov7+KQLqJixu1dyt9ub5 CvhrkqszEq6MeCRmKh+W2EojH+PIczySWDRfQTh8Z98to/OUjTgM7c8urokFEdQnoMup YAoVjMa9HSdxLH4Ev77e/oRBGL4AdbnidwWUenTCaUo0CWqBNdF4yntuMDFu/qGnGRb8 epYgqvTIiSJ/B04hsK03uszCiIU0J8YFoBrwnoCltN9lqvcAYFRQ+ltQ3Epe7c03t12B vDmPGT7JLZYjr5ZXLrKYS/hOgUpKM5hn8Dcz+nKdCQejZJyk0uva+/u8qufqMCh7Qm3r 8OTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7EhdZnBGNhKoELha1acB7pKc8koKdRuYwtp3Avxy8oI=; b=sXkgOVqvJeHMFTof6E4F/n7Pfy65g2yNi5NAFss8t5GRPTG25PJIBi9eoZWaREW2JF bLseU3I5WTLzoo8np4A/wt0m1fyWfvBkr+PbmsnvoQ8OpcgLmOJA4SBVUcv0GJ6br+Nq ETjGH/ayQHS+ybwmNFbkjVh5y80iyLG6J04EHlAqNu5MS7EIZlcKJQyD8fuS3JFpDOO+ if5rK89VvUDoUQ6DUspIBQ/okX1BJPBJn9jHVtZtNZUlZ29OVQO61XhE5Y54hMfDmqld HRSl1/ip9KtBaoYSC2IEkmSHavKIX3JHMCtaYGsaGWIUOptOShuOlc8HqDjYJD5Xssvk Vk7w== X-Gm-Message-State: AOAM531KCTPzKEw1Y5YbNAPhijyEqjs0tbZH55ma88yPBmQhxbYxuMUo 7RY9X0hEB64frVQ5qgy8yko= X-Google-Smtp-Source: ABdhPJwTw63vxQa3VD8DO5ZvJ99y9QxISsFfkeOmu1ogAKWEmcsFNlFpjXUGTibWIw+Ggb9a/Sti+Q== X-Received: by 2002:a17:907:6090:b0:6fa:14ca:fba2 with SMTP id ht16-20020a170907609000b006fa14cafba2mr15158725ejc.564.1652702376316; Mon, 16 May 2022 04:59:36 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:35 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Oleksandr Suvorov , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 12/17] ARM: dts: imx6q-apalis: Add adv7280 video input Date: Mon, 16 May 2022 13:58:40 +0200 Message-Id: <20220516115846.58328-13-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Oleksandr Suvorov The Apalis iMX6 modules allow connecting a parallel video input. Add support for our ADV7280 video input module but have it disabled. This allows to enable it in an overlay per the current system configuration. Signed-off-by: Oleksandr Suvorov Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 0d1004eede62..f33dfaa907d7 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -418,6 +418,21 @@ "MXM3_215"; }; +&gpr { + ipu1_csi0_mux { + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + port@1 { + reg = <1>; + ipu1_csi0_mux_from_parallel_sensor: endpoint { + remote-endpoint = <&adv7280_to_ipu1_csi0_mux>; + }; + }; + }; +}; + &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; @@ -643,6 +658,21 @@ sda-gpios = <&gpio3 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "disabled"; + adv_7280: adv7280@21 { + compatible = "adi,adv7280"; + reg = <0x21>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ipu1_csi0>; + status = "disabled"; + + port { + adv7280_to_ipu1_csi0_mux: endpoint { + bus-width = <8>; + remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>; + }; + }; + }; + ov5640_csi_cam: ov5640_mipi@3c { compatible = "ovti,ov5640"; AVDD-supply = <®_ov5640_2v8_a_vdd>; From patchwork Mon May 16 11:58:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573106 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB2C4C433F5 for ; Mon, 16 May 2022 12:00:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238276AbiEPMAT (ORCPT ); Mon, 16 May 2022 08:00:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243423AbiEPMAN (ORCPT ); Mon, 16 May 2022 08:00:13 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25A9217049; Mon, 16 May 2022 04:59:41 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id j28so3928398eda.13; Mon, 16 May 2022 04:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sAIC5XO8Gpb1Psqm27VnVBwo9ZckV1Uf+O9pRsgrc5w=; b=OIvDXjnaMI0BsLHjcaWoVSJs5Viu/U5uHaGQReMYDOP7UJaZ6MXnPLv/AAzsyBqy2n mkV3NDKqXkhrPcDAwbbGY3GUVr7wfpxHT69hWEQlZqg0jZ130gMEdw+H0GddlPUNrFHX PKWDmpqSPLrHjAbaOI/uXr+v/KSnsPuTkCfEZ88MUsIiQoXQsF2oibwDM8hQYbkvoIT6 UX72PTPxnXpUreeBX5dNRGBkwn3Vd/Bv9ssl9hgMKSYM127EohSvTLcc4QfvsUW9f+rA BWGybNqbuKf/z5VAZ+5TVPNIyYovWS+cCpidSs9qkY5kfeHPHm7ZXHwnE0QJE8wpwMZl UxDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sAIC5XO8Gpb1Psqm27VnVBwo9ZckV1Uf+O9pRsgrc5w=; b=yLaq4hjgdvXi5K6PFpsg4ucdZfLiYvWaI9tcFAD20vMML04muuCo5GGEKltNmFmHB8 LhO8BjoLOX70LntXXEtOWOxlgZTAQLYCqTMDUILB4AIanKKchcwXlJc7rdjbnqlTCvCx z/gsk4SZ/pFALzLqN8pA6oOCdrHl9HWc5nuQ2HaoiySckRAGqko39k/zn4jhfW4FGnBH spE3OOlzqCNMaLuAMxyvJpO3u+cNsoXz0XgGCEhHw1AbqXF3iGU4yTWjpXejdCcGBCxq rcGU7guu1bZDZZpPyJ1GaT/5jMbtOehsvEOqF0526uDEN+K0zC2wxBrHiGlcqs2z8RXa dIRg== X-Gm-Message-State: AOAM532z2K/Rca+AqDKd13Jup1OMNfwET9xzzLgdzrCPuF2yeRd235aR N2KY+QtjnGrxOF0ibpP2BkQ= X-Google-Smtp-Source: ABdhPJzK3rkJ3N/5/Nwzqwf7yEjeiEjJlq6CVlniW4meeZ/cWtoYSjGiYM/l7xsYzrzhuYwLYi8nwQ== X-Received: by 2002:a05:6402:3552:b0:427:e36a:e839 with SMTP id f18-20020a056402355200b00427e36ae839mr12724834edd.351.1652702379491; Mon, 16 May 2022 04:59:39 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:39 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Arnd Bergmann , Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Olof Johansson , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, soc@kernel.org Subject: [PATCH v1 14/17] ARM: dts: imx6q-apalis: Add support for Toradex Ixora V1.2 carrier boards Date: Mon, 16 May 2022 13:58:42 +0200 Message-Id: <20220516115846.58328-15-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher The Ixora V1.2 carrier board adds SW relevant new features compared to the V1.1 version. - An I2C EEPROM is added. - The SD card slot got a switchable 3.3V supply. - Pull ups on the SD card signals are not assembled to faciliate 1.8V speed modes. - The CAN transceivers got a switchable 3.3V supply. Add a new device tree and, as the differences are so small rework the device tree for V1.1 to include the V1.2 device tree and adjust as needed. Drop adding the toradex,apalis_imx6q-ixora to the dtb compatible to adhere to the binding yaml document. Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 178 +---------- arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts | 290 ++++++++++++++++++ 3 files changed, 303 insertions(+), 166 deletions(-) create mode 100644 arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 0ad8339e07d8..55fbe4f8c598 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -544,6 +544,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \ imx6q-apalis-eval.dtb \ imx6q-apalis-ixora.dtb \ imx6q-apalis-ixora-v1.1.dtb \ + imx6q-apalis-ixora-v1.2.dtb \ imx6q-apf6dev.dtb \ imx6q-arm2.dtb \ imx6q-b450v3.dtb \ diff --git a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts index 2d0324103804..44637d606e61 100644 --- a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts +++ b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts @@ -5,187 +5,33 @@ * Copyright 2011 Linaro Ltd. */ -/dts-v1/; - -#include -#include -#include -#include "imx6q.dtsi" -#include "imx6qdl-apalis.dtsi" +#include "imx6q-apalis-ixora-v1.2.dts" / { model = "Toradex Apalis iMX6Q/D Module on Ixora Carrier Board V1.1"; - compatible = "toradex,apalis_imx6q-ixora-v1.1", - "toradex,apalis_imx6q-ixora", "toradex,apalis_imx6q", + compatible = "toradex,apalis_imx6q-ixora-v1.1", "toradex,apalis_imx6q", "fsl,imx6q"; - aliases { - i2c0 = &i2c1; - i2c1 = &i2c3; - i2c2 = &i2c2; - rtc0 = &rtc_i2c; - rtc1 = &snvs_rtc; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - - gpio-keys { - compatible = "gpio-keys"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gpio_keys>; - - wakeup { - label = "Wake-Up"; - gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; - linux,code = ; - debounce-interval = <10>; - wakeup-source; - }; - }; - - leds { - compatible = "gpio-leds"; - - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_leds_ixora>; - - led4-green { - label = "LED_4_GREEN"; - gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; - }; - led4-red { - label = "LED_4_RED"; - gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; - }; - - led5-green { - label = "LED_5_GREEN"; - gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; - }; - - led5-red { - label = "LED_5_RED"; - gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; - }; - }; }; +/delete-node/ &eeprom; +/delete-node/ ®_3v3_vmmc; +/delete-node/ ®_can1_supply; +/delete-node/ ®_can2_supply; + &can1 { - status = "okay"; + /delete-property/ xceiver-supply; }; &can2 { - status = "okay"; -}; - -/* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */ -&i2c1 { - status = "okay"; - - /* M41T0M6 real time clock on carrier board */ - rtc_i2c: rtc@68 { - compatible = "st,m41t0"; - reg = <0x68>; - }; -}; - -/* - * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier - * board) - */ -&i2c3 { - status = "okay"; -}; - -&pcie { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_reset_moci>; - /* active-high meaning opposite of regular PERST# active-low polarity */ - reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; - reset-gpio-active-high; - status = "okay"; -}; - -&pwm1 { - status = "okay"; -}; - -&pwm2 { - status = "okay"; -}; - -&pwm3 { - status = "okay"; -}; - -&pwm4 { - status = "okay"; -}; - -®_usb_otg_vbus { - status = "okay"; -}; - -®_usb_host_vbus { - status = "okay"; -}; - -&sata { - status = "okay"; -}; - -&sound_spdif { - status = "okay"; -}; - -&spdif { - status = "okay"; -}; - -&uart1 { - status = "okay"; -}; - -&uart2 { - status = "okay"; -}; - -&uart4 { - status = "okay"; -}; - -&uart5 { - status = "okay"; -}; - -&usbh1 { - vbus-supply = <®_usb_host_vbus>; - status = "okay"; -}; - -&usbotg { - vbus-supply = <®_usb_otg_vbus>; - status = "okay"; + /delete-property/ xceiver-supply; }; /* MMC1 */ &usdhc1 { + /delete-property/ cap-power-off-card; + /delete-property/ pinctrl-1; + /delete-property/ vmmc-supply; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_mmc_cd>; - bus-width = <4>; - status = "okay"; -}; - -&iomuxc { - pinctrl_leds_ixora: ledsixoragrp { - fsl,pins = < - MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0 - MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x1b0b0 - MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 - MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 - >; - }; }; diff --git a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts new file mode 100644 index 000000000000..7770697fde5e --- /dev/null +++ b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts @@ -0,0 +1,290 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2014-2022 Toradex + * Copyright 2012 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + */ + +/dts-v1/; + +#include +#include +#include +#include "imx6q.dtsi" +#include "imx6qdl-apalis.dtsi" + +/ { + model = "Toradex Apalis iMX6Q/D Module on Ixora Carrier Board V1.2"; + compatible = "toradex,apalis_imx6q-ixora-v1.2", "toradex,apalis_imx6q", + "fsl,imx6q"; + + aliases { + i2c0 = &i2c1; + i2c1 = &i2c3; + i2c2 = &i2c2; + rtc0 = &rtc_i2c; + rtc1 = &snvs_rtc; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_keys>; + + wakeup { + debounce-interval = <10>; + gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; + label = "Wake-Up"; + linux,code = ; + wakeup-source; + }; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds_ixora>; + + led4-green { + gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; + label = "LED_4_GREEN"; + }; + + led4-red { + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + label = "LED_4_RED"; + }; + + led5-green { + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + label = "LED_5_GREEN"; + }; + + led5-red { + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; + label = "LED_5_RED"; + }; + }; + + reg_3v3_vmmc: regulator-3v3-vmmc { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enable_3v3_vmmc>; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "3v3_vmmc"; + startup-delay-us = <100>; + }; + + reg_can1_supply: regulator-can1-supply { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio2 3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enable_can1_power>; + regulator-name = "can1_supply"; + }; + + reg_can2_supply: regulator-can2-supply { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enable_can2_power>; + regulator-name = "can2_supply"; + }; +}; + +&can1 { + xceiver-supply = <®_can1_supply>; + status = "okay"; +}; + +&can2 { + xceiver-supply = <®_can2_supply>; + status = "okay"; +}; + +&gpio1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart24_forceoff>; + + /* + * uart-2-4-on-x21-enable-hog enables the UART transceiver for Apalis + * UART2 and UART3. If one wants to disable the transceiver force + * the GPIO to output-low, if one wants to control the transceiver + * from user space delete the hog node. + */ + uart-2-4-on-x21-enable-hog { + gpio-hog; + gpios = <11 GPIO_ACTIVE_HIGH>; /* MXM3 180 */ + output-high; + }; +}; + +/* I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier board) */ +&i2c1 { + status = "okay"; + + /* M41T0M6 real time clock on carrier board */ + rtc_i2c: rtc@68 { + compatible = "st,m41t0"; + reg = <0x68>; + }; + + eeprom: eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + pagesize = <16>; + }; +}; + +/* + * I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor on carrier + * board) + */ +&i2c3 { + status = "okay"; +}; + +&pcie { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_reset_moci>; + /* active-high meaning opposite of regular PERST# active-low polarity */ + reset-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; + reset-gpio-active-high; + status = "okay"; +}; + +&pwm1 { + status = "okay"; +}; + +&pwm2 { + status = "okay"; +}; + +&pwm3 { + status = "okay"; +}; + +&pwm4 { + status = "okay"; +}; + +®_usb_host_vbus { + status = "okay"; +}; + +®_usb_otg_vbus { + status = "okay"; +}; + +&sata { + status = "okay"; +}; + +&sound_spdif { + status = "okay"; +}; + +&spdif { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&uart4 { + status = "okay"; +}; + +&uart5 { + status = "okay"; +}; + +&usbh1 { + vbus-supply = <®_usb_host_vbus>; + status = "okay"; +}; + +&usbotg { + vbus-supply = <®_usb_otg_vbus>; + status = "okay"; +}; + +/* MMC1 */ +&usdhc1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_mmc_cd>; + pinctrl-1 = <&pinctrl_usdhc1_4bit_sleep &pinctrl_mmc_cd_sleep>; + bus-width = <4>; + cap-power-off-card; + vmmc-supply = <®_3v3_vmmc>; + status = "okay"; +}; + +&iomuxc { + pinctrl_enable_3v3_vmmc: enable3v3vmmcgrp { + fsl,pins = < + MX6QDL_PAD_NANDF_D0__GPIO2_IO00 0x1b0b0 + >; + }; + + pinctrl_enable_can1_power: enablecan1powergrp { + fsl,pins = < + MX6QDL_PAD_NANDF_D3__GPIO2_IO03 0x1b0b0 + >; + }; + + pinctrl_enable_can2_power: enablecan2powergrp { + fsl,pins = < + MX6QDL_PAD_EIM_DA15__GPIO3_IO15 0x1b0b0 + >; + }; + + pinctrl_uart24_forceoff: uart24forceoffgrp { + fsl,pins = < + MX6QDL_PAD_SD2_CMD__GPIO1_IO11 0x1b0b0 + >; + }; + + pinctrl_leds_ixora: ledsixoragrp { + fsl,pins = < + MX6QDL_PAD_SD2_DAT1__GPIO1_IO14 0x1b0b0 + MX6QDL_PAD_SD2_DAT3__GPIO1_IO12 0x1b0b0 + MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 + MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 + >; + }; + + pinctrl_mmc_cd_sleep: mmccdslpgrp { + fsl,pins = < + /* MMC1 CD */ + MX6QDL_PAD_DI0_PIN4__GPIO4_IO20 0x0 + >; + }; + + pinctrl_usdhc1_4bit_sleep: usdhc1-4bitslpgrp { + fsl,pins = < + MX6QDL_PAD_SD1_CMD__SD1_CMD 0x3000 + MX6QDL_PAD_SD1_CLK__SD1_CLK 0x3000 + MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x3000 + MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x3000 + MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x3000 + MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x3000 + >; + }; +}; From patchwork Mon May 16 11:58:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573104 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77DEDC433EF for ; Mon, 16 May 2022 12:00:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235263AbiEPMA1 (ORCPT ); Mon, 16 May 2022 08:00:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243440AbiEPMAO (ORCPT ); Mon, 16 May 2022 08:00:14 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C3971705D; Mon, 16 May 2022 04:59:42 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id ks9so28180673ejb.2; Mon, 16 May 2022 04:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HQ+/zAYDYzlIVwhBZOjr+9YmcuxLFRWGYnq8noCNm6Q=; b=Ul2ALb+PwrpKLFgrqQ2ddPMSS6EGneglWSb29zDFP9QO3F6HpYV3GsIJX/TX4FeKaS sh3REtOmRVVysBbyRKetx2mvKsIXfVdAj7wliiqyzPCYjKNE+kI5wQAluPX5QlHNqEkY m5teKtGq2++zpS5nHhe9BuoCXPbXOEyeraV/OdrT3su3IgHf5qG/TzhXiWOrmKpyuisG hFX9vCQx2Ic27oP2qY96k4SKtI92Mp3CHaF1nmJ9u1/Ml+wRe0Dwp1qFj6CA4ET+gbG1 U/UjXG3quk5naFPEEDv/8bTVNrnEgc7ra7Q4y7iMoRfHsScr+UCuszL82TontIj8x74f 8DqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HQ+/zAYDYzlIVwhBZOjr+9YmcuxLFRWGYnq8noCNm6Q=; b=nRy/oh3VdY4yePJ3OpH7vR+wckGKmztLOtClQuBZ0fZwLnfgWjK2Sz+olBOC6HO85F SxcERnn2QOXQFIxvMlSGCsoTKI1kXmGqJfLHxeyYJwa9WySX2E/yWCNtJw3hlqBmia8d iSLfSTPIWrU/yAU5kb/+zWK+PLcbsxx2cOgwdot4fujRMdcLC/k0d1SJBxMrBq5nl7MB 7rzILK52w3MnaturHJzY9fJM9+HoVnx5kW/0SMmj4a+3jMidgouX1g3ShF8zV6a/vVQu orPuGeYVeQwlCAx4H/dcPaAVCAh1BiqboktI5ha9D6GzExv0Lx6mTVVf/rTxtxNIrEn7 5ZUA== X-Gm-Message-State: AOAM532SLWUb86jTr31ovcUlPJb91mpknJCJq9O3DvyP+lvm+SFFktqU FstkclZgQbsyWvoQcv62J/A= X-Google-Smtp-Source: ABdhPJzGegeYVw0NU99xQNbBARJB4zkYwREXhG0v+IXsvWmsBLwKH/JJ1PRgnOJT6uwK5uUAGF+YGQ== X-Received: by 2002:a17:906:7952:b0:6fe:1e0b:6343 with SMTP id l18-20020a170906795200b006fe1e0b6343mr9096414ejo.337.1652702380993; Mon, 16 May 2022 04:59:40 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:40 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 15/17] ARM: dts: imx6q-apalis: backlight pwm: Simplify inverted backlight Date: Mon, 16 May 2022 13:58:43 +0200 Message-Id: <20220516115846.58328-16-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher Set #pwm-cells to the default 3 to gain access to the parameter which allows inverting the PWM signal. This is useful to specify a backlight which has its highest brightness at 0. With the change to use the PWM with inverted polarity the PWM signal is inverted to how it was before this patch. This changes the meaning of the values in the brightness-levels property. I.e. the duty-cycle changes from x/255 to (255-x)/255. Keeping the brightness-levels will then have a big brightness jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticeable. Change the brightness-levels to provide the same brightness-levels as before. Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 57642aefe349..49669caac8b7 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -6,6 +6,7 @@ */ #include +#include / { model = "Toradex Apalis iMX6Q/D Module"; @@ -19,13 +20,13 @@ backlight: backlight { compatible = "pwm-backlight"; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>; - brightness-levels = <0 127 191 223 239 247 251 255>; - default-brightness-level = <1>; - enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; power-supply = <®_module_3v3>; - pwms = <&pwm4 0 5000000>; + pwms = <&pwm4 0 5000000 PWM_POLARITY_INVERTED>; status = "disabled"; }; @@ -761,7 +762,6 @@ }; &pwm4 { - #pwm-cells = <2>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm4>; status = "disabled"; From patchwork Mon May 16 11:58:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Krummenacher X-Patchwork-Id: 573103 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84A5CC433F5 for ; Mon, 16 May 2022 12:01:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243311AbiEPMBN (ORCPT ); Mon, 16 May 2022 08:01:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243459AbiEPMAO (ORCPT ); Mon, 16 May 2022 08:00:14 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B66B1707C; Mon, 16 May 2022 04:59:44 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id i40so2959573eda.7; Mon, 16 May 2022 04:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U5klBQd+5VVDxjdh+quG2QVbCvgSx+FMLRBxcvrncEk=; b=CIjZSaFko+8bhEs+vM+NHZRLIWaxag02GeoxPgnAnBPYuHptRPYOxjhBh4yiPk3KWi lImIw6IM6aXA893VEOO5ACf6D0mIsHIaHMEqAhmJsTNy/mUTCpuRnmZzxtJcDrmX21Mc c2uP4QbHlnJ9tlYnI5K6rRzIYXUU6UCbI3p2x2UStYk8HT2lEkHRAjSylYg+dq/pEiK+ 4SrDV5LWLog34KJLk2Ef9uAe1T37AG+KCE2BxDMW2LZQayXcrk6uJx6n7enSwnmGq913 U9V8so1/AHdkDzGBXyiwYPxYaEpgZCOwgKS+ooKUxcZOpxlOZmm0Ew8l3C5p757jKtdw xgvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U5klBQd+5VVDxjdh+quG2QVbCvgSx+FMLRBxcvrncEk=; b=DqRqK6KqLmZPKYYTGmK7K03mQ/i/pUmYy+SeF7sKpnPJNtKNIgg324KKEI5iHNwlAP DKWiA/5q74pmu94SMg125GjmqLDPYeb8jtxjo3OSi5oniQMYbUV0gagUo4ts2J0Juzdu kTFFPUpCOdI5acCkk55AC3sMG41tu8pbkfx2daQMHevWXPQu++RMj88xCDhN1R7yRxPs JQw/m29dIDZ4el5qzNrx5R3nSAZ4DRhtdTRfgnwVDMJz1djXXDYZsty7xdrYitMKdnF6 E55Yz28k3flqFdFWTDnEBmWyNlj8q2ASD6ldAl69UZ7v65BEBDEU+OGoqxycIvbZzzZ2 B2xA== X-Gm-Message-State: AOAM5309CWJe7+gMlFIt+28iKcXs2mlPBw4ynGrjP3DJgh4X0XuCHS+C coSsIEtWJqM95SSeGhhO764= X-Google-Smtp-Source: ABdhPJx1JBFiuRd9VuE61SGGK9mBPT3srwZOBVe7F0qmyVKKeBVfcHi5qM+43lnihoMWKUkZKugJ8A== X-Received: by 2002:a05:6402:354a:b0:427:d0e1:8ef3 with SMTP id f10-20020a056402354a00b00427d0e18ef3mr12799717edd.66.1652702382458; Mon, 16 May 2022 04:59:42 -0700 (PDT) Received: from linuxdev2.toradex.int (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id s18-20020a170906779200b006f3ef214dacsm3711008ejm.18.2022.05.16.04.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:59:42 -0700 (PDT) From: Max Krummenacher To: max.krummenacher@toradex.com Cc: Fabio Estevam , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 16/17] ARM: dts: imx6q-apalis: backlight pwm: Adapt brightness steps Date: Mon, 16 May 2022 13:58:44 +0200 Message-Id: <20220516115846.58328-17-max.oss.09@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220516115846.58328-1-max.oss.09@gmail.com> References: <20220516115846.58328-1-max.oss.09@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Max Krummenacher Adapt the brightness steps as the backlight doesn't light up for very low duty cycles. Signed-off-by: Max Krummenacher --- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 49669caac8b7..62d9d907432c 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -20,8 +20,8 @@ backlight: backlight { compatible = "pwm-backlight"; - brightness-levels = <0 4 8 16 32 64 128 255>; - default-brightness-level = <6>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>;