From patchwork Tue Feb 7 11:29:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 53844 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2796340wrn; Tue, 7 Feb 2023 03:34:55 -0800 (PST) X-Google-Smtp-Source: AK7set9EZQhyaimakmOBwPsZKwyExTEbpbc3x/7ZM4mg8kZIleC3bY+ZJCHXtvjMYt2IGhXEkvAU X-Received: by 2002:a50:8e05:0:b0:46c:e558:ce60 with SMTP id 5-20020a508e05000000b0046ce558ce60mr2866071edw.22.1675769695416; Tue, 07 Feb 2023 03:34:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675769695; cv=none; d=google.com; s=arc-20160816; b=0m+9loTp07R3k6y92FzKr4WEGhppF8EtZ4oJzjRp36yesEUOtuy731hoEFA8pLCC2j iztlp/ts/IIC1enDqGajRCUnmUo8BwfHcLnGKYx8id5+VwJZfh5/52IejLpsecNt43P4 EbtK6QYBklynec2ZXw4BBbKS975x3E9hrIJy4eNV7Xp7KiOH3mrIoiW0WbJbfc31sQyw zg4cX/TlW7orseTHHd0YFEoBTa8c4ivbhB8IW8F8zMuk7J/F1ff79DEK5gE9snTPTlR7 XQzKygdg/jZbmw5XCvLDFw1SFEtM/tQYsIEwXEtWXiDNgA0dzcga5/kgX07Bd9L0zkqb AL+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=0ZqNuJ/yVCIW8YnEEBkBMYEhxSuNAoNNow8JwIfmmaxfivzmFsYjF6Pk0hn2PwY0a6 gawmBeV2fYX3qdMSkCKPCii3cvWGwYqynIHUP8gG01b8s/jQQ2jA2xp7HCk+b+ZSvJM6 HzCYfPc5GaE9xPfy9PS6rJkFFFf4zLXa0nqAyhbWhclQVP5yBB2jYUcoZO+Zoh2T6Tia loCF0/TQLfoxJEW4jABB8jVOHepr7uhuPMHSwCoDl+BBt8qg/jOvF70vEBova/FvvMT/ lrBxX6ESz+lB1rZNkwEz4ZX1DTwDmX4J6fofW1vMWmtMHcYrqN8lQifxJYUYZCXkXD4L iMoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gFoztI6P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y11-20020a056402270b00b004a19713f455si18826253edd.31.2023.02.07.03.34.31; Tue, 07 Feb 2023 03:34:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gFoztI6P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231382AbjBGLaX (ORCPT + 99 others); Tue, 7 Feb 2023 06:30:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbjBGLaR (ORCPT ); Tue, 7 Feb 2023 06:30:17 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F7F122798 for ; Tue, 7 Feb 2023 03:29:59 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id az4-20020a05600c600400b003dff767a1f1so5918048wmb.2 for ; Tue, 07 Feb 2023 03:29:59 -0800 (PST) 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 :message-id:reply-to; bh=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=gFoztI6P9zcmRJv+irYFVJrkeaSgfPSXOrLUUt53/8h/IZ5Jcj1A/5gyaWb43fohdh 55lBs9ImjGfg33jLpt66cVFRSHKjv1qoCoCJgT2ccA4wluRZ0jyfXMqNE50Fxox4iI72 v99xzI+dvonPzf+NIU0JCOsdCVUSQ+J43kpXg= 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:message-id:reply-to; bh=Kod5siM2bcM+dDVpz/GqL4BGUBIqfHoecSZkZ5xWujI=; b=O8NP6D8hrwSHqug9OJPbFIJMwcquScxo5QIz0mILEFSEQzitrIUAIS9hM+x10KbAnT +3ETyE1D13aOFAj/BuPqvBGJtoh+TkqUS+VvasmmOZrJaegy67tQBThfUIgx+Zj9sNWT 66tvKZ5IvhiQ6CIocsWRAXJR2yyXbvveH6icj6FD/9XR2eGzwbKabR/5kMPrXCvrHtBt XILiO2iKwDuU+axZp1qW0IApJ4I8vmbfnJTMZytJxCjaau4zfxuXFdSj2wYOSK2ucbsG 3blhfAEVo4r/qG3OC0dvrE8wXIF4hEh86V0rxY66ybJuqA6Mk5656AFiWmSGlEn8UmWK 6vTg== X-Gm-Message-State: AO0yUKVle/npvzfi5G02IXs7tKQ+DbaDRndS6dmlPIkQImUuMvGFgYNm hWNfn/h3vQ6YLMrWCLjP6MQJo+yX9lQnEI8IoNk= X-Received: by 2002:a05:600c:330f:b0:3df:ef18:b0a1 with SMTP id q15-20020a05600c330f00b003dfef18b0a1mr3464952wmp.12.1675769397555; Tue, 07 Feb 2023 03:29:57 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com (mob-5-90-193-20.net.vodafone.it. [5.90.193.20]) by smtp.gmail.com with ESMTPSA id bi5-20020a05600c3d8500b003db012d49b7sm2020827wmb.2.2023.02.07.03.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 03:29:57 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , michael@amarulasolutions.com, Krzysztof Kozlowski , Vincent Mailhol , Rob Herring , Amarula patchwork , 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: [RESEND PATCH v7 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Tue, 7 Feb 2023 12:29:23 +0100 Message-Id: <20230207112926.664773-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230207112926.664773-1-dario.binacchi@amarulasolutions.com> References: <20230207112926.664773-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757171884077083898?= X-GMAIL-MSGID: =?utf-8?q?1757171884077083898?= Add documentation of device tree bindings for the STM32 basic extended CAN (bxcan) controller. Signed-off-by: Dario Binacchi Reviewed-by: Rob Herring --- (no changes since v5) 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 | 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>; + };