From patchwork Tue Mar 28 07:33:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13190631 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 436DEC76196 for ; Tue, 28 Mar 2023 07:34:51 +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=OsQ4ZVj+74kb75M+XVsXFTJYC1YtPMQiXcSg7hzhLgQ=; b=nNlC1sNWaYPrvV DPtIfssUTbaFSsZyV+bYKM01zhTEfFWZYnE73N7rNjDcev5kP4Wv9o01L4jmHETGTi9iONsHgKVh9 eSPzWK80bgMUUVtSuvx0lR786+ZXQAmoxJt2/DuXDmsJk7PhqI3hP+/GRXws5TWYqouGvVxQMt+L0 LRejZX0jXJ3KyOswEgJTYtr866Msu7NYSjUnfJVR50n8jrzMINbyak1RHcXbf9zWayfDqrzBGOxnb 5H5tKPntJ4DxwHhxsNf/Wv1eZH1QwZnaRAKTvh2xuIM385aN1MUS4tImCX47AxsXvBc8Zifqlt28D mDd5b4XWniWqWnZRXd6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph3qA-00DSYL-17; Tue, 28 Mar 2023 07:33:58 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph3py-00DSQ4-0h for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 07:33:49 +0000 Received: by mail-ed1-x530.google.com with SMTP id cn12so45824366edb.4 for ; Tue, 28 Mar 2023 00:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679988824; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XLJ+jDIrSZvakcXMeiXZPJ9OyuW2iT0qYiAHEyeO2Pk=; b=IuvzJdDPnOdoihfE8rpb6ML6DhTCgt5AqAoK0mzHTDNvm0mdLQ/AGkiYZa7Mo7hBdZ uEsaGbkhpR4ckAmk/okfbUSjZZKa5YXBFEkVDw+NThJPuQO6N2Md2KEZL2AfjJI2HPy+ 3aPWXZXXntS1Hm/Q35co8OlDBjYUJlSALPV2g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679988824; 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:message-id:reply-to; bh=XLJ+jDIrSZvakcXMeiXZPJ9OyuW2iT0qYiAHEyeO2Pk=; b=61CAKmkE2ZQppncb3+QU3CNlI/0iEfDR/szBxzdoWIsKxQ+y3r4B5tqv46TP7zGafT ZuH44jEpVEm7Hkl0Bbb/CqQbK+0GXFG5lH2cCBgJhG90/O8SfmzbzwAAAMzSS5tZeAOY Oa2KU6vUZkWMIB1aGRRZNnYxacQDRA1ZvPIqS+JuEr2bMVTW8gim0zcr+3uRX7CoD6Z8 BgrcHPPF5GjNfcRdqwErvph/rAwUu46zP+0LGSYi2Bo27YZuMg9fqvMtDAOxR/DqG3Xf iajs6fDkwVgKa54VkzGHoOQmg67UIPNASd6t1TwkDhK6IQBkKO9ZwVs6C7woQFcHX87S BrVA== X-Gm-Message-State: AAQBX9e0e3Tyuiyv1YTvCa9SdwpVqotI4GTsXcPCUemQEYZwlSf4zsxw RxVyoJ83FHWLYtxRM5y/TNliIQ== X-Google-Smtp-Source: AKy350aUGpDaVX4CRikG6yXjQagHkEfMr4HIcK5RDdByqX6CyW1EKgPOFrD20rNVzZiwL4lT4nEb5g== X-Received: by 2002:aa7:cac5:0:b0:500:4a5d:af3f with SMTP id l5-20020aa7cac5000000b005004a5daf3fmr15247146edt.34.1679988824575; Tue, 28 Mar 2023 00:33:44 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id 15-20020a508e4f000000b004fa99a22c3bsm15478850edx.61.2023.03.28.00.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 00:33:44 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , Alexandre Torgue , Krzysztof Kozlowski , Dario Binacchi , Christophe Roullier , Dmitry Torokhov , Krzysztof Kozlowski , Mark Brown , Maxime Coquelin , Rob Herring , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v10 1/5] dt-bindings: arm: stm32: add compatible for syscon gcan node Date: Tue, 28 Mar 2023 09:33:24 +0200 Message-Id: <20230328073328.3949796-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230328073328.3949796-1-dario.binacchi@amarulasolutions.com> References: <20230328073328.3949796-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-20230328_003346_285622_BA553EFD X-CRM114-Status: GOOD ( 12.05 ) 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 v9) Changes in v9: - Fix commit description formatting. No semantic changes have been made. Changes in v5: - Add Rob Herring's Acked-by tag. .../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 b2b156cc160a..ad8e51aa01b0 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 Tue Mar 28 07:33:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13190634 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 ACFA8C76195 for ; Tue, 28 Mar 2023 07:34:58 +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=4ERjB4uZsz5/HMNAMyl6+jQcP77UulFlLrypydc3Mg4=; b=tRsZOBfd7GNfKE EJdPztXiS95LGMD2zfRCZNzRG2PvKF6E+WbCY9BqsctHLbVJZA0yvxYS3jwPs+nSjboFnoTXUuEjn f7d93G8DzyhV/0ygplHP5Stt0IQc2hwdT6YS3+mcJxQ4TMfsk/EM7v4VJ5degClbGkh7qq+KmT2ON fHj+jw8v8MZu6XTNkunmIBtPJVnJLatpWuVcVqE/ND+8pF/hdcBox8bNIWHl3xBJppALA9ZrgkYPV SQgUm+rIXLTpgTClP7PA8sh2m2iD347hacjXDxHGpzSPBRvWjKyPZTVapVPa4zbI4GMEkUjDi0Me9 CLaquKntd796q4EhUGQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph3qB-00DSZQ-2C; Tue, 28 Mar 2023 07:33:59 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph3q0-00DSRd-0P for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 07:33:51 +0000 Received: by mail-ed1-x536.google.com with SMTP id i5so45992899eda.0 for ; Tue, 28 Mar 2023 00:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679988826; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=81V4WG2Py2oEHuOAf8mFt9n+MMzcYuintrA4k96hyCk=; b=fHuz3/JvHKFJl4aHOKVNqY0NVKXvM7/HcN8CMEL37x76Sg/gNZjWYcr8NzHQVIUyXv KH63ag8K8zkQrBFuY7R7nzt7zWFZv9TkG+dSrsYEXs/8x5EizacWfAX9BBM5Vgp76Igf wWewKdW6o6gmEOfftPj0hWrFVWypYG/ptgvZA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679988826; 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:message-id:reply-to; bh=81V4WG2Py2oEHuOAf8mFt9n+MMzcYuintrA4k96hyCk=; b=vQ3dtkbkev5EDoqlaimkFYBVEgIvwjHqSi92IIgkGdt32+Qo52hJBkaaiSdpTMBd+X 7DiuVY1PY1GbFt3t7fhPEq/445njiJkrfWEKj4PYf6m/h0LSV0DluqhrVKQzK9W36pan WKAZEg9ZY4sZRQPrPyBs6KvlaACUNxKOWhtwjb7Ex3QZVNGSPCfVsYkoKTc+NVpdGA9m K/uYDjZvPPy36aYDUoS9PXEJN45GZYmdSavg+KWQsaFveT4URGn0ssDFtKnFdghLoWDE 6z1xZBh6O8g5wuNvZiKDqWOH/jpGAIvwSUSkGyqOsITSuL+QLSxsM6EWyNDddNCkxlHd sl6g== X-Gm-Message-State: AAQBX9eXq/Ed1Pkzcc8In3kITdsGX+cJ0EBkZUW1m6aFkWB3tffFB6UD pY/N+43wOZNXzgYNHNs+gEsHMw== X-Google-Smtp-Source: AKy350YMHRUUI0sIzpaRdaU598Pj9B9QeJ9n+ysjS/JhiTsW+ZBhBX5+DEXzztk/si+Uj0rohAL2KA== X-Received: by 2002:a05:6402:712:b0:502:20f0:3ee1 with SMTP id w18-20020a056402071200b0050220f03ee1mr14140124edx.31.1679988826415; Tue, 28 Mar 2023 00:33:46 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id 15-20020a508e4f000000b004fa99a22c3bsm15478850edx.61.2023.03.28.00.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 00:33:46 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , Alexandre Torgue , Krzysztof Kozlowski , 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: [PATCH v10 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Tue, 28 Mar 2023 09:33:25 +0200 Message-Id: <20230328073328.3949796-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230328073328.3949796-1-dario.binacchi@amarulasolutions.com> References: <20230328073328.3949796-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-20230328_003348_206118_80802033 X-CRM114-Status: GOOD ( 18.49 ) 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 v10: - Fix errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'. Fix the "st,can-primary" description removing the "Note:" word that caused the failure. Changes in v9: - Replace master/slave terms with primary/secondary. Changes in v5: - Add Rob Herring's Reviewed-by tag. 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 | 85 +++++++++++++++++++ 1 file changed, 85 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..2bfac2089964 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/st,stm32-bxcan.yaml @@ -0,0 +1,85 @@ +# 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-primary: + description: + Primary and secondary 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. + To avoid misunderstandings, it should be noted that ST documentation + uses the terms master/slave instead of primary/secondary. + 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 primary and CAN2 + secondary) 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-primary; + st,gcan = <&gcan>; + }; From patchwork Tue Mar 28 07:33:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13190630 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 B5A54C761A6 for ; Tue, 28 Mar 2023 07:34:51 +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=oY8c6RtHKixOSGuZiqlFjLbIZCoGQFS99Xoke6/GJWc=; b=uozs8zOiAUnxo2 L+oGIrBOgd05Iq/g74ggKqqpxJPBk1KCVMz6j0l7OLZnZ1RbRd4kty3IR88SbczCeuiNpk/VbwIvD E4Z0g1vgCsNuFBw52z+WiMlKkqB9jXQbNqcGIsz/BEXEOgZXI37Y8VUwgO9Pb8z8uKAhoYe2Kvhv+ zcRyGyBKU2L1C+LM/xmyOjGE5klf/lvB8Xs1LxlaJjsji2kcVqHXw7SfqEhXRHnYTWZPlVU6CGqui M1X8uV1I0j1Y/k0WtQNVn8ibiVtjNQJIFxi0mqlkIbWa3iHdcs1glsXNpCmLuSrdSQNnGT3AfCckW uPH//htuTQent86hdhpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph3qD-00DSaf-1f; Tue, 28 Mar 2023 07:34:01 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph3q1-00DSSh-1q for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 07:33:53 +0000 Received: by mail-ed1-x534.google.com with SMTP id i5so45993136eda.0 for ; Tue, 28 Mar 2023 00:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679988828; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2+OmgATyAVN/2E72/iiXhgNbt/jehihFpqYxcu4ydlU=; b=Jkq1icJEBGpJzWE3a+ydM2EXTLlKYwWHnWFUygAagMjBSNS6rgEOOj/KGQyeQ+mRb1 1ZCA3bwF/hz9WpdoFQaK3MAQiwsnMuC/FFA28ORzEcKygJQtWVFg1gQ16jQRKybxd27Y Rjorhs+fyynAn9r36WF7etT+lSKs2V+/dnesI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679988828; 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:message-id:reply-to; bh=2+OmgATyAVN/2E72/iiXhgNbt/jehihFpqYxcu4ydlU=; b=D1FDl4VGSBpLn+IpE4Q8zLbT4mGWu59uUfGPLT5naPN8Ob0yedmVhGmxZ55PGD1a7o 39t0QXbF2qCD15bYgQSmRx5rUbLrWHuudH9IGo68XjieiTeIfQ/vyvzK6mvECxpPD0ji ThOFLGAKvolTcGTls8gf9YhqsLbgPqwOouaz42+vmv5WXTn6EXLbiUbWevBJ/pBD8K5I Rr86Luvves8RcXqAt3F+DEejncDlfCbrziqhFDG6pIlA3WnruvP0joKUmlthzYBA5naA iamTzBxqVQcfvrCUKy2lkHbuhxcqUfSVWNtbP4oYkAMKGhq1PiyQ7ha+N1uyx7DFuZB1 /m/w== X-Gm-Message-State: AAQBX9fme413UpXl6ddZCiQptRa+4HFBuD9yCkaPTamFLbhdyvLDIGqJ bDUG0EQjGYXAYEY7zhaoJ/OVgw== X-Google-Smtp-Source: AKy350b/J4ht0zqALGVEyDhlsi9kU5K82wFoT3CC1p9mmKbTwqqU3WrYl1fOHJnUUa9g1cEOkRcMAQ== X-Received: by 2002:a17:906:b351:b0:931:d36f:8965 with SMTP id cd17-20020a170906b35100b00931d36f8965mr16661879ejb.13.1679988828000; Tue, 28 Mar 2023 00:33:48 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id 15-20020a508e4f000000b004fa99a22c3bsm15478850edx.61.2023.03.28.00.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 00:33:47 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , Alexandre Torgue , Krzysztof Kozlowski , 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: [PATCH v10 3/5] ARM: dts: stm32: add CAN support on stm32f429 Date: Tue, 28 Mar 2023 09:33:26 +0200 Message-Id: <20230328073328.3949796-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230328073328.3949796-1-dario.binacchi@amarulasolutions.com> References: <20230328073328.3949796-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-20230328_003349_634238_15E240DA X-CRM114-Status: GOOD ( 13.66 ) 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 primary and CAN2 the secondary, that share some of the required logic like clock and filters. This means that the secondary CAN can't be used without the primary CAN. Signed-off-by: Dario Binacchi --- (no changes since v9) Changes in v9: - Replace master/slave terms with primary/secondary. Changes in v6: - move can1 node before gcan to keep ordering by address. 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..c9e05e3540d6 100644 --- a/arch/arm/boot/dts/stm32f429.dtsi +++ b/arch/arm/boot/dts/stm32f429.dtsi @@ -362,6 +362,35 @@ i2c3: i2c@40005c00 { status = "disabled"; }; + 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-primary; + st,gcan = <&gcan>; + status = "disabled"; + }; + + gcan: gcan@40006600 { + compatible = "st,stm32f4-gcan", "syscon"; + reg = <0x40006600 0x200>; + clocks = <&rcc 0 STM32F4_APB1_CLOCK(CAN1)>; + }; + + 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 Tue Mar 28 07:33:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13190632 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 AF55FC76195 for ; Tue, 28 Mar 2023 07:34:54 +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=yt8ZPmTnDr+rI73F/wVcHtWWW0AjihB/QZS/gch7c2s=; b=zcQ3fEcDM4t+Ie QmSSBIOvEA/0WS6Wz3xe8VCyCc2Ais3i7aspxFQM84KM/lvOKo91eBG9In+tVxZSip1wTnLLmCNBr ITrvzkIMccOpZM8N0w7Ul+h6QDyyJ6UrsIR3atQes95Mv5x/EXg11NqRulXjE+gQkSSFCF9BZZ0k7 +iV2pnJWiSiCfcbrkc/Zn+82ncs6KLYR7Zewwg3TWuCXxaWVWIffxdUaJVVtt7x1cmlvdH8E78JaF NAOeeZaIosUDQQ3zq+diA5GPZhEzUo+muHuM7ONBAbOZxBV4dNwM83bDMVLEbQPxoMWMzc8xINABd wATtfN1TAeMsnce1hlwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1ph3qF-00DSbm-0G; Tue, 28 Mar 2023 07:34:03 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1ph3q2-00DSQ4-04 for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 07:33:54 +0000 Received: by mail-ed1-x530.google.com with SMTP id cn12so45825109edb.4 for ; Tue, 28 Mar 2023 00:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679988829; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QV3iGa8KiUlr1LClhXl1D1BGw0maVF3hcUmABXx2qKM=; b=fInw/jj9PBtFRJxZSJU9mdDm8tBLrvz2djTwCMJCrmyHKb0pKW94UF4kdEPu6LAEUJ 9GNtSNMWzDhBA7Cj8ZfWzJT0WLyRYME9zHcvyOiIQlDDe3s8IqQw80toZOXrIN/t9lyn XfHj88tV6ORsmV+l+2hfshDFuk48ix4B4eP2g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679988829; 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:message-id:reply-to; bh=QV3iGa8KiUlr1LClhXl1D1BGw0maVF3hcUmABXx2qKM=; b=pkFuvGh7ofx+hYOM26zHFEEHjZHdPrqTEur4Gl8l5ElCVgyIVU2XAM0gcYnwyo1q3L nPuRMIhLiRytHHD3Ya8NUA7BjolWqmamHsdaP5VaexeCU+p+cV4BZPlntg6iX4bhfkLp syUVWghzHg3SLttJ5qwESvr2fAaTotE4uGFzZWj8VyCtLxPNXb7Z/Nk4OJhyw3NVbQLk LvQC2P2MgExXJijEn4tg8qNhIfZBVprIW5oMAt7+8QXzEoxOgwUxAfYGDbAFROBBx36z Vr8h06ZT5SxKXMl3I+CrJV4H6tpo6s0TrNlMdqWYS7QOMbFXLIO7DRCbdEac94BY1OP9 V2Rg== X-Gm-Message-State: AAQBX9dRZIRCkXHzkXqCAvQ1/+EsIh9WJ2ycIikQqfR9VGn6BeGSMxHj nJmncTjz5QT5dtv4CK5GXm4M0kHGnCjmZPAhAjhQOA== X-Google-Smtp-Source: AKy350bPRa7yMhn4B3RnlA9oejY2elg4CBVWazqAGzvA671dK/BBGa7yIOWMOmYCz6kh3jroqWAtKQ== X-Received: by 2002:aa7:db92:0:b0:4fd:2346:7225 with SMTP id u18-20020aa7db92000000b004fd23467225mr15202535edt.34.1679988829563; Tue, 28 Mar 2023 00:33:49 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id 15-20020a508e4f000000b004fa99a22c3bsm15478850edx.61.2023.03.28.00.33.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 00:33:49 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Vincent Mailhol , Rob Herring , Amarula patchwork , michael@amarulasolutions.com, Marc Kleine-Budde , Alexandre Torgue , Krzysztof Kozlowski , 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: [PATCH v10 4/5] ARM: dts: stm32: add pin map for CAN controller on stm32f4 Date: Tue, 28 Mar 2023 09:33:27 +0200 Message-Id: <20230328073328.3949796-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230328073328.3949796-1-dario.binacchi@amarulasolutions.com> References: <20230328073328.3949796-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-20230328_003350_092042_38ADAC8B X-CRM114-Status: GOOD ( 11.15 ) 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 4523c63475e4..3bb812d6399e 100644 --- a/arch/arm/boot/dts/stm32f4-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32f4-pinctrl.dtsi @@ -447,6 +447,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; + }; + }; }; }; };