From patchwork Wed Nov 9 10:09:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Yadav X-Patchwork-Id: 623574 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 97C26C433FE for ; Wed, 9 Nov 2022 10:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231261AbiKIKyE (ORCPT ); Wed, 9 Nov 2022 05:54:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbiKIKxX (ORCPT ); Wed, 9 Nov 2022 05:53:23 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C71F428E03 for ; Wed, 9 Nov 2022 02:53:02 -0800 (PST) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20221109105301epoutp025f610f390a7e1634a8e7810dab507978~l5SRe_aTx1943319433epoutp02G for ; Wed, 9 Nov 2022 10:53:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20221109105301epoutp025f610f390a7e1634a8e7810dab507978~l5SRe_aTx1943319433epoutp02G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1667991181; bh=8tJbVmcalInqjr8002K5YdNiHoVQ5bDHN1OlG4dZ7VI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RRW7xcU44/JeDzX96KgulpOCsqqZ7jcaqm9PLoI2IJ+ZqjC+erVy2cPh4O5I5dF9C MheGYW7sWxVpGopJRk8UI1Hw34GdPgtjEr0Ospch3yJQTR97DNJszCQ00gX6YtbU43 /Pfp4LFaOBNrXgH6IYGHIDvUfp5Kx/XY/bNhgolw= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20221109105300epcas5p3dc38c1dce7325d8eaa97f320febd5d5b~l5SQ5vusB0093000930epcas5p3X; Wed, 9 Nov 2022 10:53:00 +0000 (GMT) Received: from epsmges5p2new.samsung.com (unknown [182.195.38.181]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4N6hdQ4ZVfz4x9Q1; Wed, 9 Nov 2022 10:52:58 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id DC.37.39477.A868B636; Wed, 9 Nov 2022 19:52:58 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20221109100249epcas5p142a0a9f7e822c466f7ca778cd341e6d9~l4mc1Pwen0651406514epcas5p10; Wed, 9 Nov 2022 10:02:49 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20221109100249epsmtrp20d91aa3791ac1d0547d711acfc0def13~l4mc0PmRO1459514595epsmtrp2f; Wed, 9 Nov 2022 10:02:49 +0000 (GMT) X-AuditID: b6c32a4a-007ff70000019a35-df-636b868a50c7 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F5.E0.14392.9CA7B636; Wed, 9 Nov 2022 19:02:49 +0900 (KST) Received: from cheetah.sa.corp.samsungelectronics.net (unknown [107.109.115.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20221109100246epsmtip275237e780508fbf6ad5796f05eaae93c~l4mZ_LXyt1466814668epsmtip2a; Wed, 9 Nov 2022 10:02:46 +0000 (GMT) From: Vivek Yadav To: rcsekar@samsung.com, krzysztof.kozlowski+dt@linaro.org, wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, pankaj.dubey@samsung.com, ravi.patel@samsung.com, alim.akhtar@samsung.com, linux-fsd@tesla.com, robh+dt@kernel.org Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, aswani.reddy@samsung.com, sriranjani.p@samsung.com, Vivek Yadav Subject: [PATCH v2 2/6] dt-bindings: can: mcan: Add ECC functionality to message ram Date: Wed, 9 Nov 2022 15:39:24 +0530 Message-Id: <20221109100928.109478-3-vivek.2311@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221109100928.109478-1-vivek.2311@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VTe0xTVxjPubcvanBXcHggzJGmC9hZaLF0B0aHyXTeDTabGHRxRryWS0v6 XG/RMZeJTNzAycOMABXlIZuIG2Ip74e8AmFMYIrEzQ0oMDWkG0gdRDfcWgrbf7/v9/1+3/ed 75zDw/26OUG8VIOFNhsonYDDZzX2bgsT55zRqiQrthA0damRg3rqG7iodOQ0C5X1DbPRb/3T XJT7yIGj0cZcNrLNjLNRzXIhjhxzB9Cd1lIOKh7pxND1yq9YqL88AC0NOQGqbHjCRY6Fdi6y jjazUVZHHxfdd9ay0bOKXhb6eqKFvTOAtF/9CSPLbWnk49v3AWmryeaQv4y3c8j6qpNk3oqE nO+8yyFz7TWAfJ55kUu6bFuVGw5qYzU0lUybQ2iDypicalArBPH7kt5MipJLpGJpNHpNEGKg 9LRCsCtBKX4rVec+qiDkGKVLc1NKimEEEW/Emo1pFjpEY2QsCgFtStaZZKZwhtIzaQZ1uIG2 xEglksgot/CIVrM4KjI5/T+aWzqeASpeyAE+PEjIYMkpB8eD/Yg2AIebA3IA340XASxbzMC9 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u/R/9fA4/2+q2wefVtWMXr8a5rL7vF5k1wA dxSXTUpqTmZZapG+XQJXxqcLWgVvhCtefStvYFzI38XIySEhYCJx9vM6li5GLg4hgd2MEoe2 P2aBSEhJTDnzEsoWllj57zk7RFEzk8TMY6vYQBJsAloSjzsXgHWLCOxmknjbPResillgEZPE yyu9zCBVwgIhEq/uHQCzWQRUJZ6dXgc2llfARmLf+Q1sECvkJVZvAKnh4OAUsJV4uNAAJCwE VPL89iLGCYx8CxgZVjFKphYU56bnFhsWGOallusVJ+YWl+al6yXn525iBEePluYOxu2rPugd YmTiYDzEKMHBrCTCy62RnSzEm5JYWZValB9fVJqTWnyIUZqDRUmc90LXyXghgfTEktTs1NSC 1CKYLBMHp1QD0zneHJbI2p/R+wRkm4NMHt0Tqf5x8M0T7g0OcUvTvuxMSzvktlydYc+XTIe+ F16MczUebXQ/rDT7wU2hKpvXPyaK6UzQ3cS20GUt4/zJO4xYDsades3D5WUxQWzf48dvv3N3 LH476U1PxpvYU1ZF90rvmC2qqLld+XJ5r129e9rPtQ/kDk/dy+9fZVOwi7vgHMNO40B+ke9F rVyyUWbXdgQuSNhcftZZKOIl/4S13AfuXRAu3HrkTsG2A/XxMTdush1x35mtNEtO191d7sa3 ynWit4zl7qc9Ptan9K5sc8vZpfaOmcVqQb+tePek3TmlzzTft00og92Z/xSrWqG77+lw9c06 93c5aujp2N0oVGIpzkg01GIuKk4EAIgOjpcNAwAA X-CMS-MailID: 20221109100249epcas5p142a0a9f7e822c466f7ca778cd341e6d9 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221109100249epcas5p142a0a9f7e822c466f7ca778cd341e6d9 References: <20221109100928.109478-1-vivek.2311@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Whenever the data is transferred or stored on message ram, there are inherent risks of it being lost or corruption known as single-bit errors. ECC constantly scans data as it is processed to the message ram, using a method known as parity checking and raise the error signals for corruption. Add error correction code config property to enable/disable the error correction code (ECC) functionality for Message RAM used to create valid ECC checksums. Signed-off-by: Chandrasekar R Cc: devicetree@vger.kernel.org Cc: Krzysztof Kozlowski Cc: Rob Herring Signed-off-by: Vivek Yadav --- .../bindings/net/can/bosch,m_can.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml index 26aa0830eea1..91dc458ec33f 100644 --- a/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +++ b/Documentation/devicetree/bindings/net/can/bosch,m_can.yaml @@ -50,6 +50,12 @@ properties: - const: hclk - const: cclk + tesla,mram-ecc-cfg: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + Handle to system control region that contains the ECC INIT register + and register offset to the ECC INIT register. + bosch,mram-cfg: description: | Message RAM configuration data. @@ -149,4 +155,29 @@ examples: }; }; + # Example 2: m_can on the FSD SoC + - | + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + can@14088000 { + compatible = "bosch,m_can"; + reg = <0x0 0x14088000 0x0 0x0200>, + <0x0 0x14080000 0x0 0x8000>; + reg-names = "m_can", "message_ram"; + interrupts = , + ; + interrupt-names = "int0", "int1"; + pinctrl-names = "default"; + pinctrl-0 = <&m_can0_bus>; + clocks = <&clock_peric PERIC_MCAN0_IPCLKPORT_PCLK>, + <&clock_peric PERIC_MCAN0_IPCLKPORT_CCLK>; + clock-names = "hclk", "cclk"; + tesla,mram-ecc-cfg = <&sysreg_peric 0x708>; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + }; + }; ...