From patchwork Mon Nov 22 10:46:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Boger X-Patchwork-Id: 12693305 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 99067C433F5 for ; Mon, 22 Nov 2021 11:50:48 +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: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:In-Reply-To:References: List-Owner; bh=Hfw0LEoZeYeqwkSepgcQuC6x+1Vabyx/72a5v5CWvh8=; b=Y/y//AWMR0qpPo 2/6ikyRIZMxEMaZ5hGz2iEvIt3Lv++xwdEn/q5jeUnYDXUJIG0kWkNkuz4PdNj5sFHG13MzifWUTn +h1vh0ephbxbNpoe7BGmpdyGWFDOpJY1mW5/dTYicGN5BMCDgI5awZQaCDXNvNBZo3oOva+4go/DM 4UheTKmS8gOnOwiIgrNdu6tillgcO4UtuhGviMKe+Qm1+QvnTJ2P24xEYfyzRGLN62q/UXrIJktoq TMbHYzxr6Bdsrz6v646WMKoO1voJWLYJCisdpwLEoYXIUEA5C20Ir80WtoRHmg2UrssrTQ6h2QUMC PFEk+4ch+P8NzFZj9+KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mp7oY-00G9Pe-9q; Mon, 22 Nov 2021 11:48:51 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mp6qQ-00FuM5-1j for linux-arm-kernel@lists.infradead.org; Mon, 22 Nov 2021 10:46:44 +0000 Received: by mail-lf1-x12c.google.com with SMTP id m27so78321744lfj.12 for ; Mon, 22 Nov 2021 02:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wirenboard-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wuprcCzJz0EmXc1SE/2ky8W7hZ6gSGjF0nw9cYB1gCQ=; b=r9YtxbybrGBr+auu4rx2uoR9H9Jm9ecmh+VeP61E/AeSjxTWySxphi9EL/9NSpP4lT 5frCpTbwRMB/MCsiYk//Vf1AgpariinQC+8qCZ6GFtZcN6bUPPXoGTH3u4j46VFg2GaT fFwrRacO3k1xIVtwOLFyKQR3lRHnwXwXidaLZAqxz0mgliWUWhkMYpc5tiv7Dkn2wfPq JWKqixe0voxrsnTOf5M1pGfvkN8USXnCoFOTwq7VuazQEXza9DzkoiA7+pSloin2Osmj rHi1Tpzb4JJkuVOPlTfd6HaXJ6MRpAs4kMkz04ZetizYmd1V1n7pkvtSwRhuwHG2vdpn ZGvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wuprcCzJz0EmXc1SE/2ky8W7hZ6gSGjF0nw9cYB1gCQ=; b=IRaUvcsHYTueIqcLAXKQYTbdzGshjlMJnsgb+QKGS5xTQHRif/EM6OQ+R/vD9hmMq9 2q8oAtiWI93L4BsJd8z7NswGiIFzqt2kleFN0taImE+JTL81iS06f7qdi0/dyTYuEKYw foZjDn8J4A++bvtHfU2az5o7tdjST4jOSj/Lu/0JjyxxPQuIN6p6zqYJmPqwqZ+bBxzl rLu8alnR9t/jdoz3gJGRsnJ0XXlsq7gK2GaQ44kymT+BDkgQQCm3js0I40ateEenRg+v x8EAK5Y5/I+FggqRo6IJ3CY6//Jis4qSiaBe+J/0Cz8g0nfFZxrk3Frzprr97W523JGC nasA== X-Gm-Message-State: AOAM532NiNyvYcPEss3R4X7hSaCv74vvhygZQGSP8lUeXLc8sQbdRhrB q4VYWaNwbWhAxkQOTlKHqC3SsKRC8xuQSw== X-Google-Smtp-Source: ABdhPJwOABsSxGBKDPfr0l0ADAVn8o4ZcYF24gt2lFlOuUOEAgoIPViPmZf4oCO480Cq02iyZm4hNw== X-Received: by 2002:ac2:4564:: with SMTP id k4mr55435628lfm.380.1637577997883; Mon, 22 Nov 2021 02:46:37 -0800 (PST) Received: from boger-laptop.lan (81.5.99.121.dhcp.mipt-telecom.ru. [81.5.99.121]) by smtp.gmail.com with ESMTPSA id bi24sm923538lfb.49.2021.11.22.02.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Nov 2021 02:46:37 -0800 (PST) From: Evgeny Boger To: Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Cc: Evgeny Boger , devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-can@vger.kernel.org, Wolfgang Grandegger , Marc Kleine-Budde , "David S . Miller" , Jeroen Hofstee , Gerhard Bertelsmann Subject: [PATCH 0/3] add support for Allwinner R40 CAN controller Date: Mon, 22 Nov 2021 13:46:13 +0300 Message-Id: <20211122104616.537156-1-boger@wirenboard.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211122_024642_142392_F3DF4D62 X-CRM114-Status: GOOD ( 12.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 Allwinner R40 (also known as A40i, T3, V40) has a CAN controller. The controller is the same as in earlier A10 and A20 SoCs, but needs reset line to be deasserted before use. This patch series introduce new compatible for R40 CAN controller, add support for reset line in driver and add the corresponding nodes to the SoC .dtsi file. The CAN IP was documented in early V40 datasheet [1]. It also fully supported in vendor BSP. However, CAN description was removed from more recent A40i, T3 and R40 user manuals and datasheets. Anyway, we verified that the CAN controller is indeed there and tested it extensively on A40i-based custom hardware [2]. [1] https://linux-sunxi.org/File:Allwinner_V40_Datasheet_V1.0.pdf [2] https://wirenboard.com/en/product/wiren-board-7/ Evgeny Boger (3): dt-bindings: net: can: add support for Allwinner R40 CAN controller can: sun4i_can: add support for R40 CAN controller ARM: dts: sun8i: r40: add node for CAN controller .../net/can/allwinner,sun4i-a10-can.yaml | 24 ++++++++ arch/arm/boot/dts/sun8i-r40.dtsi | 19 ++++++ drivers/net/can/sun4i_can.c | 61 ++++++++++++++++++- 3 files changed, 103 insertions(+), 1 deletion(-)