From patchwork Mon Mar 27 20:16: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: 2811 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C722A4147B for ; Mon, 27 Mar 2023 22:16:54 +0200 (CEST) Received: by mail-il1-f197.google.com with SMTP id d3-20020a056e02050300b00317999dcfb1sf6656509ils.4 for ; Mon, 27 Mar 2023 13:16:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679948213; cv=pass; d=google.com; s=arc-20160816; b=Q0reX9Q0C7fvAPp49r7qjZb0KSLdOzrGpsiPstZqJwZIzORGPPcgW7m5lh7Y9WV8gs 7BEf3p1ViBiBvcIywgaJlULso8wO9rgdpZ7MnzcR2XHMUY4ihmybWPMsih0OgYx7GqIj wHplBEvjclZu6j4kbi+QXY/3IevHEBZNfMjP/EVdAcylO9xIK+Leey+89C//YW36fzwV /dyzwqnWotr51S6NsZw5oc1kttl7g26bz14YMGKQOz/wP/MG0cS3a7aqpyjSw1I8ZCyC Tf535z94MWTLRDk29q5azlLvpqdMRIO9nTs2tE2qN6n/8Ome3tCqgOV4/ol6qtJckr1k StIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=9reRBhsAv2aCm0W5uieHO8UkPzT/QYPVOAlQ9eBoeRE=; b=nGixTEG4WH9o0wkor2ewwyaJoJfV6N1+4/A2HH7H+TPeLy91XgbcH1hsZn0MMQHubI 0a6YCtGMTqrDprfqQ4+tVtYSfnYydnIrQlP3kh6tez3OAr62+NmWB1bPVE+bNl4dbjXx PsRFV/d/V6GFC417SDCj6oyDQrGHoAZaVYkdMThYYajmfNHPMxJ5Z0p1K/GgRb6lN2/E E67gML022jj4diQjxZkBpWR3EiV8CVzbV6ytseJfasLWIsH9/V63okQf3e6CgNny/ZiM Vak/zCknLYYXKq7xWPzGQ/R5aNoVBCu4fyamQSRFbVx4JDUOqkjv26rM1s1H8B2w7KHN xlhg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VwgC/3Jb"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1679948213; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=9reRBhsAv2aCm0W5uieHO8UkPzT/QYPVOAlQ9eBoeRE=; b=UrtGcurF9+0eVp3HWAlDMMrRYibsh6nf4B2xlXqecVqvRBbcgE+NW4r5KT0bWFLv6p gL+hziRxTrHoqSDmwZyuKJJjPUFEPsHh1gl0BzP9U7ud7UgedPwLMrqlLfJhzNZdrkHt Yy5IYas6b04R6G2Hz1pLSeKiNAY8g4nOzAPiI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679948213; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender: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=9reRBhsAv2aCm0W5uieHO8UkPzT/QYPVOAlQ9eBoeRE=; b=vhmhD5uxNwYwKEToHuLUi/W8fj0vQXv7oNVh2VyxBFcqOaaPeRGw+bKiHuUNMixxSh c3Rlb3f//KW2UTan65spSEK6dekejsA0RzAZxr9xz75KxTxIeu0YllZSATRQuZT54ana Wuwrp/2pD2jGAlYfuaYcGzVqO0IiI6I2tB/6/SdIpZasjGBM2D/wEacTDqWfErLxZIa6 Y5RL1CKEFaaXL1oc0TGV+FKdfSpG1XR4w+ltGMOrguWD9pxT08LSuA2QSPqomQ7a981Q lerxAq61ahYL6wYdavwDY2fmVZiideNCIuceIi5dcGrnxzUiLkoy5hPHwKvYUvEJKLST i8Ng== X-Gm-Message-State: AO0yUKUFlLm6KO7NUtZuV4DuhM/KuFbFL0Qli6FOhgIL/r9+ksNvJz3S BpnIvJ5X5uelF6RPFcY3Trn6Vzbk X-Google-Smtp-Source: AK7set9wSpIGs4HiaLHj09u/11U9PxADECzC+qFu0mbUbFzcBGohARgKTDdrfX7WE20Ctv4YlQhkhQ== X-Received: by 2002:a05:6638:1603:b0:3ec:46d4:e15 with SMTP id x3-20020a056638160300b003ec46d40e15mr11932850jas.3.1679948213794; Mon, 27 Mar 2023 13:16:53 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6e02:1b09:b0:326:4b:d61a with SMTP id i9-20020a056e021b0900b00326004bd61als1361753ilv.1.-pod-prod-gmail; Mon, 27 Mar 2023 13:16:53 -0700 (PDT) X-Received: by 2002:a92:c00f:0:b0:325:b816:ae56 with SMTP id q15-20020a92c00f000000b00325b816ae56mr10214116ild.20.1679948213182; Mon, 27 Mar 2023 13:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679948213; cv=none; d=google.com; s=arc-20160816; b=ALDyrUFsU6+bbQ/h8XdQ+4VRIjL3fivMNRUVg19WWPtleKhNhVXz8LvYamWYkBzA4C JkN0wLgfOlNyVVZl+b8DksiM6mRtu5RmMD+rIZRkfSdL6WVyN9TuY4dDBi8wwJC3UlWb s1C+GsW2RsYiACG5/oUsIQr21nONxvPHMbpb2LNhsDW/INGX6bFGuT8+rU7HzCoEnq44 ZjNUg9E9j7om9ixBMNS3OX7/qmLw69fX9XX87yOsA9sOPCJ8ATzFh/mQdEOMxTB5DT0G 8ic2wd1YrOExekXfNivm63Tg5+BUcMbWymP9LGB2Lg3IrWqMPVkbJ6ft4V+Zw8Brl+ro Z9CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=kfP3t3lS3idk7NC8xKbJ1ZUbNQe0L9Qw+EDLBJRD4xA=; b=vjFJHOYQnL5dxI93wxfKTDgiqvKoH8sZYkrf5Z3Kmatv4pY2M67b0cqi8AqxY9yXh4 LGmcO+d55PVe14H0tgEeQXtc5cuP58Ce97by5DIz9SuKqO6JL5FTn94YmptuYz6ZqxXn XUYsMP+LWGbB9i5urSO771TEV88EY3memhRMH9fuMmoXMkrXcIZJFjSlEnPmYjnw/0Tl eqh4KEkfKo1vEQTKrIflcaPRmvJEYQKcLqP47/+bpbToa33DcIaI93ZFcYbJfb2v/YfM iWaviQzHxtMT9cYMfLK0q5/1Cz6Z3fGEKKY/qgMKWuqcBzONQ8XOSzAtHRo4uJf+XfKb N0+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VwgC/3Jb"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id c19-20020a928e13000000b00310e10a61e3sor8311577ild.100.2023.03.27.13.16.53 for (Google Transport Security); Mon, 27 Mar 2023 13:16:53 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a92:d242:0:b0:318:ae1e:ccd5 with SMTP id v2-20020a92d242000000b00318ae1eccd5mr11543956ilg.28.1679948212885; Mon, 27 Mar 2023 13:16:52 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-87-0-102-254.retail.telecomitalia.it. [87.0.102.254]) by smtp.gmail.com with ESMTPSA id u26-20020a02b1da000000b003a958f51423sm5594759jah.167.2023.03.27.13.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 13:16:52 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Alexandre Torgue , Rob Herring , Amarula patchwork , Vincent Mailhol , michael@amarulasolutions.com, 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 v9 2/5] dt-bindings: net: can: add STM32 bxcan DT bindings Date: Mon, 27 Mar 2023 22:16:27 +0200 Message-Id: <20230327201630.3874028-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20230327201630.3874028-1-dario.binacchi@amarulasolutions.com> References: <20230327201630.3874028-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="VwgC/3Jb"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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..ca97ba3c2b05 --- /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. + Note: The ST documentation uses master/slave terms 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>; + };