Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3385307rwb; Mon, 7 Aug 2023 12:38:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELC/5vNOM927NLYBPxNKZCFToxHiXGsQ9Kh4bNAY9wheShhirIBlFQiBxu+qTZLKXR6Jrn X-Received: by 2002:a17:90b:1e01:b0:263:5376:b952 with SMTP id pg1-20020a17090b1e0100b002635376b952mr9857008pjb.9.1691437118829; Mon, 07 Aug 2023 12:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691437118; cv=none; d=google.com; s=arc-20160816; b=lUU4bFC31Z14rdc3mIq9QpLAgDT6Q/X39c8btCpuOVxdRboABDOvEMGQ3Lv6g5vVr3 NdaXn/iUt6c8p+14ScKePhgo9Aa0QXVdjoZ+ho1nMCqQT03L1WY1ciLO0aEjbydh1c4x j7mMXoCWJoOAC/rPGXtDzBEDa+U7MGdyzrPr3MZxqyEiyjgjZWZli/yJIZDSyyG1laX7 Rv8XphNCJqy/xFeDHRB5G6buhwAmnbhf8alvNwdgknKc+AWukZADJ71NgNfwKyP5AkiY LoyYRKDCmClaNTZdzJZnNgy9Siv0nDz74wLq1obHX6OpRNC47W1lBE3BmuoBnIlwoGFG MBqg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3MO64bm8DFoP+FtMNEmWQlPXqTMO4IBSAv4wntQ0uL4=; fh=EPk8kcy/m82vFqqykNtlRjPyUxcy9VcgeTINTXWzaAc=; b=HTweY8tXtcNvxxFGGBxW/cjMC29PAX3BB4I/wG0aADEbw+o2g8O0d0z/NmWChkaNaa mzHlpQ/n70ChohLdccWMRpvd++/mKgKud1tndMN8AGhSTJJkcBbuRGdyYO7bMUtpf4QJ HO+O1JlFU4EmXJz3nYlvX1XE93RtjT3Rtp34S+IRtsHINPapbUKWYlzbRRNwkMQzP7J8 vkaxyQcszIGTohYDfjKrCxWGytsJfDK/pV+ZgpeU14XqnKfAFf82QQDkO42c6Hy7jrgv h4tbmIiIdW8epuGH+sEj+vNspgztP9GkfZ+vv26YZq5xeHhTsp5Q5PPnDZvR9LPRopFS NXZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jookia.org header.s=key1 header.b=vDj1Lhgz; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jookia.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gc22-20020a17090b311600b0025943bb2873si4300877pjb.136.2023.08.07.12.38.26; Mon, 07 Aug 2023 12:38:38 -0700 (PDT) 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=@jookia.org header.s=key1 header.b=vDj1Lhgz; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jookia.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229498AbjHGTUo (ORCPT + 99 others); Mon, 7 Aug 2023 15:20:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229883AbjHGTUm (ORCPT ); Mon, 7 Aug 2023 15:20:42 -0400 Received: from out-84.mta1.migadu.com (out-84.mta1.migadu.com [IPv6:2001:41d0:203:375::54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7707F10F3 for ; Mon, 7 Aug 2023 12:20:40 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jookia.org; s=key1; t=1691436036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3MO64bm8DFoP+FtMNEmWQlPXqTMO4IBSAv4wntQ0uL4=; b=vDj1LhgzTqUvdYIJ+GyYNE/S8OovxIjbJAVnxEAJfbetB2Bs8LgZrUgjIh5e9wb2/CSec/ T6ClYlSomL585prfZpsCyjU1Yf/RigIoIk+BSNJa2xVEEKj2i7zjsCd5wgKlFmVeLFL16c Pv6WpVr/YpPZFiTE4Am8W7lEnPOghWTv1sxC+jaamcOwz9wwpAdnRvdIvEPjV2woQ7R6y5 aJfWJlt+sUyrZhv1yYqMACRb618Kmg5tbsYnLkserZbGzBHulv4rkNDXMUvmX90psWhoEe ViGgRiWSf+46Dgz+GRls+3yOA/18n9rNoU36Av4tPtBbttJEViMFeW1B/VphVA== From: John Watts To: linux-sunxi@lists.linux.dev Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maksim Kiselev , Marc Kleine-Budde , John Watts , Cristian Ciocaltea , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] riscv: dts: allwinner: d1: Add CAN controller nodes Date: Tue, 8 Aug 2023 05:19:52 +1000 Message-ID: <20230807191952.2019208-1-contact@jookia.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 The Allwinner D1, T113 provide two CAN controllers that are variants of the R40 controller. I have tested support for these controllers on two boards: - A Lichee Panel RV 86 Panel running a D1 chip - A Mango Pi MQ Dual running a T113-s3 chip Both of these fully support both CAN controllers. Signed-off-by: John Watts --- Changes in v3: - Set default pinctrl for can controller - Moved can nodes to proper location - Moved can pins to proper location .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi index d59b4acf183a..24f2e70d5886 100644 --- a/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +++ b/arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi @@ -52,6 +52,18 @@ pio: pinctrl@2000000 { #gpio-cells = <3>; #interrupt-cells = <3>; + /omit-if-no-ref/ + can0_pins: can0-pins { + pins = "PB2", "PB3"; + function = "can0"; + }; + + /omit-if-no-ref/ + can1_pins: can1-pins { + pins = "PB4", "PB5"; + function = "can1"; + }; + /omit-if-no-ref/ clk_pg11_pin: clk-pg11-pin { pins = "PG11"; @@ -356,6 +368,28 @@ i2c3: i2c@2502c00 { #size-cells = <0>; }; + can0: can@2504000 { + pinctrl-names = "default"; + pinctrl-0 = <&can0_pins>; + compatible = "allwinner,sun20i-d1-can"; + reg = <0x02504000 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_CAN0>; + resets = <&ccu RST_BUS_CAN0>; + status = "disabled"; + }; + + can1: can@2504400 { + pinctrl-names = "default"; + pinctrl-0 = <&can1_pins>; + compatible = "allwinner,sun20i-d1-can"; + reg = <0x02504400 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_CAN1>; + resets = <&ccu RST_BUS_CAN1>; + status = "disabled"; + }; + syscon: syscon@3000000 { compatible = "allwinner,sun20i-d1-system-control"; reg = <0x3000000 0x1000>; -- 2.41.0