From patchwork Tue Jan 11 15:57:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Boger X-Patchwork-Id: 12709987 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 47371C433EF for ; Tue, 11 Jan 2022 15:58:49 +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=RuY/4O96m5VE8PHbSVUTArjcSi9gEkefvIW+VXmPnac=; b=V9hw92AfasNblk /SXj9AgPRLjbTmxtscde8KCVKbkUIN0bPP2KXdTgPUwOdhnyFX8aeadvyNiwrAhX8ZchVBkZgGz/P 8Zv6oNXmUA/vUoBmW4Bi8qB+z0jUE/5EMPvq/rnY0b1CT74J1YWsMd2p2/M05dnrjzFK6ajhFDBX/ Si2yVSw1VSzLT0rG1GrcPqCPJPGqGdi4Egep8DNZbIh0ynwWUcTsK5T6OQJW4CyeBgYt95M8qSf7n IvwVRxDg6H0YwISfBsh08YTcrbSAtCtv8J1feyMjIOfunYwbGRnmiZo73RzbswBziAfOssNO1yAuM cCaUpPA+jwABYCvID7jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7JWl-00Gop9-Om; Tue, 11 Jan 2022 15:57:39 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7JWi-00GooK-4X for linux-arm-kernel@lists.infradead.org; Tue, 11 Jan 2022 15:57:37 +0000 Received: by mail-lf1-x12e.google.com with SMTP id h2so57918021lfv.9 for ; Tue, 11 Jan 2022 07:57:35 -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=0nTUgBUzWqYITQnAEDWeHOtQPiYS2wv61d5KwBi3uYs=; b=t84dYxCCv052E4gw3UFG/bbNlvC8YH8gRdSgmtYiwENmKguYf09md0nJys7744EKcC Gb18/zBvF7TLIj8+vZBwHGt+hft0CIAnff82KzRuskCyFc8yQOJw6Nu6hcXE99ke0sAm 1tAe+v9OsXmA80J5pSeGvWogw5cMcB/vs5exZWVIINMYL8DeWujfwdVFf+RIm+suxIoS 6knSFycPXx9hDxLxMhOv0ymGkjJ7nd3loxPGiSTqrx6JuowFH4HxehN5hG3v84ncX3+b 6zqraG1VyL0SdOUHNRAtcoEqagW5t7uEvEQsqRz3VpCoWQLqQqc8XIBNZoyYoCgRAsd7 DQCA== 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=0nTUgBUzWqYITQnAEDWeHOtQPiYS2wv61d5KwBi3uYs=; b=lkALmGAJtJFY15a9K2nIIUfI6XJPmOZz9LB9AAGc3CSMMyOB2K6EFNtW+t5YbV+7S4 js58ljdc8kC9sHwv/Ba0EEGa9wvlSlITCWFaStoSLeW51SyzT7H86WIZLnUKb6fLT7DM ARZNxZB9f+FUpoYAy3W1M/2tSTcqaWK4jQYkkWLFsGbO4SlGFUB1KOnfbqfqzWlr17yZ VbfhDF2QL+B8all7BO8iJ/zXgxhvsrKU4TTjowIUsUB1L6hWSAuMTVXD9gscW/RX7BzV Utm7tc22xi4RFnUEeKYxxenlWU1WjDZh/sSHHAdXIogWdHhPn2abwAe9UrRvtdmeacsD u+uQ== X-Gm-Message-State: AOAM532b6yVsv/BshiLO2biQ6VCyDWzG+ZrxY81TP2E97axJTRRhhknB 4bDWKjS4yXLdBuwalpw7C1Clcw== X-Google-Smtp-Source: ABdhPJxDkpX6B9o6w77LG43w7VqtyI0FEwgWWHHETUr5EU+pxPzv92RWWzfNd7pnF/3igejqxXgdoQ== X-Received: by 2002:a05:651c:160c:: with SMTP id f12mr913606ljq.462.1641916654069; Tue, 11 Jan 2022 07:57:34 -0800 (PST) Received: from boger-laptop.lan (81.5.110.253.dhcp.mipt-telecom.ru. [81.5.110.253]) by smtp.gmail.com with ESMTPSA id y7sm1370706lfa.92.2022.01.11.07.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 07:57:33 -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 v2 0/3] add support for Allwinner R40 CAN controller Date: Tue, 11 Jan 2022 18:57:06 +0300 Message-Id: <20220111155709.56501-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-20220111_075736_272738_61E2B5DC X-CRM114-Status: GOOD ( 12.98 ) 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/ Changes in v2: - sort pinmux nodes alphabetically and mark them with omit-if-no-ref 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 | 21 +++++++ drivers/net/can/sun4i_can.c | 61 ++++++++++++++++++- 3 files changed, 105 insertions(+), 1 deletion(-)