From patchwork Sun Sep 25 17:52:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12988074 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FB3BC04A95 for ; Sun, 25 Sep 2022 17:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+EVseJVv5zU2F8OPeoBMu+BLthCoTExii2zstFs63/c=; b=SneAcxb3YPuOe8 INFB5Uasff6a6/Um1hDqYKjikgKZTSiix/G96ba+vt/ODPgHvqGecBegePVQ8hIzIeKlcud/tHhvQ zDdXw3chQnoG28cFl4I1ObjeT1ul73aC9p8/P6+GVjDYJU06SVAWTsOQhoWBMQsyhp3E0+zc80ycG ychCe6YPIGSvZVMLlLvl1rrXE4vo0Am2Q7KSDP43wCTNR1cfxbzukpAXH6rgO6FoqCoizzaIfWwgi isqXH3WyrjA8/z2uQF7nhmOKT+Ase5+dzsnOgl6xvby6Wibly2GV4vi18265fEEnNgAlFaAxFY6XA JXmAaG5dPac4AilQ/0xA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVnw-00FS3L-Kc; Sun, 25 Sep 2022 17:52:36 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVnf-00FRs2-Oc for linux-arm-kernel@lists.infradead.org; Sun, 25 Sep 2022 17:52:22 +0000 Received: by mail-ed1-x529.google.com with SMTP id z97so6257397ede.8 for ; Sun, 25 Sep 2022 10:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=J2VF+CVrD0zwhwpgo2IClFZHFW9id6lzY2L2M6stUmY=; b=IsEpv7BgRFwftZUui15I0mMWTntFwLZkJSM+RARbYH7mZGdi13p/E+p1fU9pkBBHth XL+J79BxWf4L1jEQVEVSHJo8tvUxQ/vvQ/D6wlOF15Y8UGfOr89A9F0exomuZEr++WJB 8F7nNNpVBvnIvRRvAM8o1pnahIOIohEu5tgXw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=J2VF+CVrD0zwhwpgo2IClFZHFW9id6lzY2L2M6stUmY=; b=cRcFRUvob6Di3GfkYyRzcg38xCSPPjW52Z1kYyeRlrQ2Zgh3WZCZUDIMjH0K4AhoXl JhdGtdsNA8By7TTzvLlkIFtG7iTvNg+Y0629vUrpY9feerJR9RrpCMz8Zz600bR9xzLT CdSQrdN3smIWDGCr+MzT3bWTcY0dlQwMhHsrSu/F5v1TcRckDU2jgJzx1sbJZJHdJkfJ /8HBFsr5TThZk15ISJRp7M9pTm8KMuOmYJzVZ0ojG2WVjG1d0UHyZFJPuPkzXBNxCqvN esYeUaSdQtC1m5eEPM4BtTD4s5ifswWklJCwNv2pUpqY2xaPrlWfW5Z7GMkYLVnbq6l8 mCEQ== X-Gm-Message-State: ACrzQf0cBBVZRUjEwv3WbAlJiCI+5mUu8zs/olmm8hvXIZwoUzLuvjrZ Q44ke02kvCf7rH7mMFBHEclD4A== X-Google-Smtp-Source: AMsMyM5s6+LACyNZPTjH1y8ENlpRtfJB3mfaurWNLgjZLo8JJvwWdIRNeyv5qlC9mGhl6V9pwajALg== X-Received: by 2002:aa7:d5cc:0:b0:456:f5f1:540 with SMTP id d12-20020aa7d5cc000000b00456f5f10540mr8364812eds.95.1664128337888; Sun, 25 Sep 2022 10:52:17 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id f23-20020a056402161700b0045703d699b9sm3252594edv.78.2022.09.25.10.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 10:52:17 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , Vincent Mailhol , michael@amarulasolutions.com, Amarula patchwork , Alexandre Torgue , Dario Binacchi , Christophe Roullier , Krzysztof Kozlowski , Lee Jones , Mathieu Poirier , Maxime Coquelin , Patrice Chotard , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [RFC PATCH v4 1/5] dt-bindings: arm: stm32: add compatible for syscon gcan node Date: Sun, 25 Sep 2022 19:52:05 +0200 Message-Id: <20220925175209.1528960-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> References: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220925_105219_849237_6D744657 X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since commit ad440432d1f9 ("dt-bindings: mfd: Ensure 'syscon' has a more specific compatible") It is required to provide at least 2 compatibles string for syscon node. This patch documents the new compatible for stm32f4 SoC to support global/shared CAN registers access for bxCAN controllers. Signed-off-by: Dario Binacchi Acked-by: Rob Herring --- (no changes since v1) .../devicetree/bindings/arm/stm32/st,stm32-syscon.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml index 6f846d69c5e1..8646350dac44 100644 --- a/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml +++ b/Documentation/devicetree/bindings/arm/stm32/st,stm32-syscon.yaml @@ -20,6 +20,7 @@ properties: - st,stm32-syscfg - st,stm32-power-config - st,stm32-tamp + - st,stm32f4-gcan - const: syscon - items: - const: st,stm32-tamp @@ -42,6 +43,7 @@ if: contains: enum: - st,stm32mp157-syscfg + - st,stm32f4-gcan then: required: - clocks From patchwork Sun Sep 25 17:52:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12988075 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C06D3C04A95 for ; Sun, 25 Sep 2022 17:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=szMELFtF8zdC82f/mbr4Z9PWGktx6F3qaiZAMlBCta8=; b=JBFkr8KamhdHb5 Mez7z8yGDNnyFNBLQKZ6bpn1DY6Mx6il0lizn5LvKQwiPhM7MxsPQSlyKWZUOCXeqzDyyK2yBV1lz rmtf6StHEwrEVTHylS1RhovD7+3FPUxE+yfu85tfNyrkC6wQkwvtV2eKzUz2bWHepzZ0e3sSZ0ChK XSUGyhZngMwzUwyVuBADBXLp/KRAY1GrVtnzc3izZfQMUWhcZR3vQ9k3rTlQc1Zd8sQDJwaIqwDEW JyoojzsBZiR0lb0gyuYQ5IAK9W0KHYdgZBR6VbdIcG8VhV4mNqVJ9ieF1DL85ApOi6WmxJFcXIo9B XyA3OWCmML6iGUtr5SRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVo8-00FSA1-Us; Sun, 25 Sep 2022 17:52:49 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVnh-00FRtO-Ee for linux-arm-kernel@lists.infradead.org; Sun, 25 Sep 2022 17:52:23 +0000 Received: by mail-ed1-x532.google.com with SMTP id z13so6224097edb.13 for ; Sun, 25 Sep 2022 10:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=5r8NMkE9LIMyGMHe+fW9/TCXkKWGgaySDbokWa2bTfs=; b=rE09vLhfcm+sMnfs8ULMTr6/bK3MwQf8oC8Fq7LT7nP+wuqLg7j0ntTZbTZ49cTkxX EI/g2BAl5hK8sX2efLmfukXezr4h99verFq/YuK85FS98GuvmXF4Hnoh1FaXza4v6ebJ LGcX0Bcq2Os/oAegAaORzrQLhTy+cW8Y5RbRw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=5r8NMkE9LIMyGMHe+fW9/TCXkKWGgaySDbokWa2bTfs=; b=mWzzJ0wOiropo/Xg1pJ/Z0dMKSig3kYKg39OczqeWjJ2FvfTpXmVxVkC4Ns5LbIPIk KSfIZmUxv1EH7Vli41vsVb1SBX29bztR/5IicnOLSbNj5YLP2tI4YgtFivwoXpZ0nghi EL2DI5eUeSlkXqR8lexTfYNTXRFDvO8YpSC9ShoVE3khZpy5pZ+I2db9EGvY2k1c8gQG fzUQxI4YV6xAJl9L1IfAfncD75a6dW/u/s2UTCcLZUfvlsxkKqoTGOpAXSXvZ8c7z38N /efp4GfotHT8ClmaEbL1Rf93/8905CV/uuMBvqQSgzGspoQs5zFTZmXlPGdLvP/aMfb1 S6Ow== X-Gm-Message-State: ACrzQf2NAAr0NIeGJIT3qKoXXtd0jeOonfdqSq3glo+lABtKZeHUa1hA rfHYKPqa3TRlI62rAlEKh0+qjw== X-Google-Smtp-Source: AMsMyM7M8IOm9TRe2kiiUfrClOrR7IxylHsjWCiilZF9WlzBJ34pM/8zM/KudiMcTLPbSPXiwk1Mjg== X-Received: by 2002:a05:6402:2994:b0:453:4c5c:d31c with SMTP id eq20-20020a056402299400b004534c5cd31cmr18498376edb.412.1664128339645; Sun, 25 Sep 2022 10:52:19 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id f23-20020a056402161700b0045703d699b9sm3252594edv.78.2022.09.25.10.52.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 10:52:19 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , Vincent Mailhol , michael@amarulasolutions.com, Amarula patchwork , Alexandre Torgue , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Krzysztof Kozlowski , Maxime Coquelin , Paolo Abeni , Rob Herring , Wolfgang Grandegger , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org Subject: [RFC PATCH v4 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Sun, 25 Sep 2022 19:52:06 +0200 Message-Id: <20220925175209.1528960-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> References: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220925_105221_515060_B1E6D716 X-CRM114-Status: GOOD ( 17.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add documentation of device tree bindings for the STM32 basic extended CAN (bxcan) controller. Signed-off-by: Dario Binacchi Reviewed-by: Rob Herring --- Changes in v4: - Remove "st,stm32f4-bxcan-core" compatible. In this way the can nodes (compatible "st,stm32f4-bxcan") are no longer children of a parent node with compatible "st,stm32f4-bxcan-core". - Add the "st,gcan" property (global can memory) to can nodes which references a "syscon" node containing the shared clock and memory addresses. Changes in v3: - Remove 'Dario Binacchi ' SOB. - Add description to the parent of the two child nodes. - Move "patterProperties:" after "properties: in top level before "required". - Add "clocks" to the "required:" list of the child nodes. Changes in v2: - Change the file name into 'st,stm32-bxcan-core.yaml'. - Rename compatibles: - st,stm32-bxcan-core -> st,stm32f4-bxcan-core - st,stm32-bxcan -> st,stm32f4-bxcan - Rename master property to st,can-master. - Remove the status property from the example. - Put the node child properties as required. .../bindings/net/can/st,stm32-bxcan.yaml | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml diff --git a/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml new file mode 100644 index 000000000000..c9194345d202 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/can/st,stm32-bxcan.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics bxCAN controller + +description: STMicroelectronics BxCAN controller for CAN bus + +maintainers: + - Dario Binacchi + +allOf: + - $ref: can-controller.yaml# + +properties: + compatible: + enum: + - st,stm32f4-bxcan + + st,can-master: + description: + Master and slave mode of the bxCAN peripheral is only relevant + if the chip has two CAN peripherals. In that case they share + some of the required logic. + type: boolean + + reg: + maxItems: 1 + + interrupts: + items: + - description: transmit interrupt + - description: FIFO 0 receive interrupt + - description: FIFO 1 receive interrupt + - description: status change error interrupt + + interrupt-names: + items: + - const: tx + - const: rx0 + - const: rx1 + - const: sce + + resets: + maxItems: 1 + + clocks: + maxItems: 1 + + st,gcan: + $ref: "/schemas/types.yaml#/definitions/phandle-array" + description: + The phandle to the gcan node which allows to access the 512-bytes + SRAM memory shared by the two bxCAN cells (CAN1 master and CAN2 + slave) in dual CAN peripheral configuration. + +required: + - compatible + - reg + - interrupts + - resets + - clocks + - st,gcan + +additionalProperties: false + +examples: + - | + #include + #include + + can1: can@40006400 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40006400 0x200>; + interrupts = <19>, <20>, <21>, <22>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + st,can-master; + st,gcan = <&gcan>; + }; From patchwork Sun Sep 25 17:52:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12988076 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FC6BC04A95 for ; Sun, 25 Sep 2022 17:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4m2ZviSPu0tCF6JtDSdvFcn1vCkYK86uws186rHb4lY=; b=TyjixlCRDpZySc 487XFv70qCnLvlKe4m6UcgVh1Pp7Bf7WreZby8DoUJh8UrYlMmtA7+iyEHzoNzhEyPAbbE3LSaJvD Sr0CveKsfw4FFjp1JED8O9D4jKE7jB5btVt4Q5fL/8Yw0K5k9A1nfsFkRCuuzcpKjDfQ8DRPE5PLJ vvQf/jmL01whWG+7elj13MRysbf+1mJG10pGToSbe2octsBwDJNHWg3yv0Pm16B7BaWvZb5riZCyk rB49XH0DCD/Yq75PAIpIjcolxJPaZScF85ESZASUOE8kHHjtLeEOgC9N7SVk7lrkATWmWsrRrxFNd AuiLREIqJOaaPoqLSpQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVoR-00FSJu-Eg; Sun, 25 Sep 2022 17:53:07 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVnj-00FRuZ-Cj for linux-arm-kernel@lists.infradead.org; Sun, 25 Sep 2022 17:52:24 +0000 Received: by mail-ej1-x629.google.com with SMTP id sd10so9903420ejc.2 for ; Sun, 25 Sep 2022 10:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=dOPE1L7q5E7QdZRAYhm0K2Z1Q5vapQyABM0Y6Kwo/zE=; b=rpXllgi1ui0C+7mDAPG3UTMJMKX3GqJkXwVqkF+rT3uGpiGSLf62ihJPuG3CrAO29p cRw4A0eLtVJGfsdxFTl89+sNm9OMd/yJTYiqKk2U84orUKiBk2K4xlK7gzMbcEOTARY/ 56WOCSemX4jGl5BmH2khUUmFEpCsQmBUAM/ww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=dOPE1L7q5E7QdZRAYhm0K2Z1Q5vapQyABM0Y6Kwo/zE=; b=1aGsfxVU6ov8B5xKuWf5tStOHU4ULNNmZFl6KcOcLTGe/emr4g6ldL143uTKzQ1fLe JoJAKBeRK6cwb0vcYqDz4DDgjjtStGuZRK+HjyBrp+W+Nn1pbKjdCdQfnsmLMGensbFi 1SVZ9fK6RJWglFb6msiWBenwYaPXO9QSI/fPhGZcYbxCAJlgEloRKLvEoWyswlpWUeYV eGaKa2yYKVKtSAODeAvTyx4AFwrB3VUeBwQn90pZChnhSYBXhR0e4+DdGtSMkiLdfe8/ Am7t/Bn0f/TmLJqfWIbJiwd9/dP6iJp4CaYDtdygn92PK3Oj4WZY63MpVKSoo5Cocd9B se/w== X-Gm-Message-State: ACrzQf1SHdwzn9Vp90ZoacPXKO3b3axWPizFeIA1/B0PRloWeshucnHB miQI8xzXQylrphGde5F5bgMmPQ== X-Google-Smtp-Source: AMsMyM7aJJDiFqfcUqHoW3X3EVzo65dZxU25xJIKTVawhR1ThjMIQqAHd5wMOFH5AhT+XV1BFlOEPw== X-Received: by 2002:a17:907:6e17:b0:783:7839:ff3f with SMTP id sd23-20020a1709076e1700b007837839ff3fmr1778971ejc.300.1664128341028; Sun, 25 Sep 2022 10:52:21 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id f23-20020a056402161700b0045703d699b9sm3252594edv.78.2022.09.25.10.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 10:52:20 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , Vincent Mailhol , michael@amarulasolutions.com, Amarula patchwork , Alexandre Torgue , Dario Binacchi , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [RFC PATCH v4 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Sun, 25 Sep 2022 19:52:07 +0200 Message-Id: <20220925175209.1528960-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> References: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220925_105223_487505_101C095A X-CRM114-Status: GOOD ( 13.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for bxcan (Basic eXtended CAN controller) to STM32F429. The chip contains two CAN peripherals, CAN1 the master and CAN2 the slave, that share some of the required logic like clock and filters. This means that the slave CAN can't be used without the master CAN. Signed-off-by: Dario Binacchi --- Changes in v4: - Replace the node can@40006400 (compatible "st,stm32f4-bxcan-core") with the gcan@40006600 node ("sysnode" compatible). The gcan node contains clocks and memory addresses shared by the two can nodes of which it's no longer the parent. - Add to can nodes the "st,gcan" property (global can memory) which references the gcan@40006600 node ("sysnode compatibble). Changes in v3: - Remove 'Dario Binacchi ' SOB. - Add "clocks" to can@0 node. arch/arm/boot/dts/stm32f429.dtsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index c31ceb821231..ce08872109b8 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,35 @@ i2c3: i2c@40005c00 { status = "disabled"; }; + gcan: gcan@40006600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40006600 0x200>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + }; + + can1: can@40006400 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40006400 0x200>; + interrupts = <19>, <20>, <21>, <22>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN1)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + st,can-master; + st,gcan = <&gcan>; + status = "disabled"; + }; + + can2: can@40006800 { + compatible = "st,stm32f4-bxcan"; + reg = <0x40006800 0x200>; + interrupts = <63>, <64>, <65>, <66>; + interrupt-names = "tx", "rx0", "rx1", "sce"; + resets = <&rcc STM32F4_APB1_RESET(CAN2)>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN2)>; + st,gcan = <&gcan>; + status = "disabled"; + }; + dac: dac@40007400 { compatible = "st,stm32f4-dac-core"; reg = <0x40007400 0x400>; From patchwork Sun Sep 25 17:52:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12988077 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC763C54EE9 for ; Sun, 25 Sep 2022 17:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ir3DYatowPjTtzMduEgskHtLX/QkmeuYSWm6gXEcHok=; b=umJkN2JSlxzP/C auUEtv4TJSaX+5C6leqP1YEz5nvlrytazbjsFpawBMVHUomc9qFii/EqxwLik/KkyHq1Z2NFiJv9Y bagOp3ypRGIdBuJqPC35JtlW3qXcqUKSL1G8qRPbYHmIZDR3BOkwHStDZgpUmH81k2QExnQ8Rwu7o 52r6KWxTcdVYN7mxx8Urq6xjuznCth5pucY8YbihK8j68KthRyqgtT/6PPrkXMuSKZR+O5maHWfhL aNiRU0iHrNYFPdO/0cWdpFL7KWk4r8OoarpnAdoHn/0fkBCqE7+1tFwFGb4ORp20GUQOdu2NiY1Dp jxH4GgIsEKUyLs8STu8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVok-00FSVO-2W; Sun, 25 Sep 2022 17:53:26 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocVnk-00FRvk-Tm for linux-arm-kernel@lists.infradead.org; Sun, 25 Sep 2022 17:52:26 +0000 Received: by mail-ej1-x62f.google.com with SMTP id lh5so9819411ejb.10 for ; Sun, 25 Sep 2022 10:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=jfErmyZAWFClEhl0ayKENaiIcOOkglWFws7K0nbLI8s=; b=HnihT0YSNz6xIyoJu2aFjZSjBQ0FEbSxs59ATuv5Ra1/tL44+b8p5ztPFWXSqLXReZ NE8XVJ6hsvCY5AP8ZJEl5/kOeAnitpitF0bAh63bDRpabZAzfutAiyYKnt3d0ZVj0vAh jZO0QooNBqd11esq0FCm9sXbvEAuERve5hxcs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=jfErmyZAWFClEhl0ayKENaiIcOOkglWFws7K0nbLI8s=; b=6H3nyjCinJ9K9jC4HelnqrUH7tBSdMUNFW3sLc2Ez32VOW5FSerqFi3VXPSvZegLsd X4K7JWuVsLpkkWLr+KlKuGG6qyjm3e6Ol0o6xUdJc3j5hqy9wIeWZig0QKIkPWIWdb91 5xjFCxkMuDJRvd0nipjOu2eKl2zTBItcCRZWcChPG/Ll2Iy+bJdMibrWReOb6OqNqVs7 E9zanPqDBlbayLVoDZFTsNZ0drsaw++E0MHFE7DZGgl0RGRzAVmh2HcR62CbhYHrsdsg vktRi/y2rwAZW01QHvOjajqrM11h6sLz39lDxfeABrop+2f5G8YRX3qFVOVlZVcn+pFE psVg== X-Gm-Message-State: ACrzQf1WM1HmDbXsHFjhoYwhAhsEuvvYKL0iupaxYjQXSUL1XeZjCEJw 5Pr3qVtREuergGknzbXBEntglw== X-Google-Smtp-Source: AMsMyM5acRXX+ssw3njDDsVVdiOmCWOdz34aX9SwVevoL6aHYNwmlHMLUX4UDcyl1CRcECbsv/GM3w== X-Received: by 2002:a17:907:2d09:b0:781:d793:f51e with SMTP id gs9-20020a1709072d0900b00781d793f51emr15050921ejc.628.1664128342518; Sun, 25 Sep 2022 10:52:22 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-95-232-92-192.retail.telecomitalia.it. [95.232.92.192]) by smtp.gmail.com with ESMTPSA id f23-20020a056402161700b0045703d699b9sm3252594edv.78.2022.09.25.10.52.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 10:52:22 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Marc Kleine-Budde , Vincent Mailhol , michael@amarulasolutions.com, Amarula patchwork , Alexandre Torgue , Dario Binacchi , Krzysztof Kozlowski , Maxime Coquelin , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [RFC PATCH v4 4/5] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Date: Sun, 25 Sep 2022 19:52:08 +0200 Message-Id: <20220925175209.1528960-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> References: <20220925175209.1528960-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220925_105225_002624_54F09759 X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add pin configurations for using CAN controller on stm32f469-disco board. They are located on the Arduino compatible connector CN5 (CAN1) and on the extension connector CN12 (CAN2). Signed-off-by: Dario Binacchi --- (no changes since v3) Changes in v3: - Remove 'Dario Binacchi ' SOB. - Remove a blank line. Changes in v2: - Remove a blank line. arch/arm/boot/dts/stm32f4-pinctrl.dtsi | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi index 500bcc302d42..8a4d51f97248 100644 --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi @@ -448,6 +448,36 @@ pins2 { slew-rate = <2>; }; }; + + can1_pins_a: can1-0 { + pins1 { + pinmux = ; /* CAN1_TX */ + }; + pins2 { + pinmux = ; /* CAN1_RX */ + bias-pull-up; + }; + }; + + can2_pins_a: can2-0 { + pins1 { + pinmux = ; /* CAN2_TX */ + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-pull-up; + }; + }; + + can2_pins_b: can2-1 { + pins1 { + pinmux = ; /* CAN2_TX */ + }; + pins2 { + pinmux = ; /* CAN2_RX */ + bias-pull-up; + }; + }; }; }; };