From nobody Sun Feb 8 09:27:27 2026 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 D90A4C001DE for ; Mon, 7 Aug 2023 19:21:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230449AbjHGTUp (ORCPT ); Mon, 7 Aug 2023 15:20:45 -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: quoted-printable X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D <3>; #interrupt-cells =3D <3>; =20 + /omit-if-no-ref/ + can0_pins: can0-pins { + pins =3D "PB2", "PB3"; + function =3D "can0"; + }; + + /omit-if-no-ref/ + can1_pins: can1-pins { + pins =3D "PB4", "PB5"; + function =3D "can1"; + }; + /omit-if-no-ref/ clk_pg11_pin: clk-pg11-pin { pins =3D "PG11"; @@ -356,6 +368,28 @@ i2c3: i2c@2502c00 { #size-cells =3D <0>; }; =20 + can0: can@2504000 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&can0_pins>; + compatible =3D "allwinner,sun20i-d1-can"; + reg =3D <0x02504000 0x400>; + interrupts =3D ; + clocks =3D <&ccu CLK_BUS_CAN0>; + resets =3D <&ccu RST_BUS_CAN0>; + status =3D "disabled"; + }; + + can1: can@2504400 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&can1_pins>; + compatible =3D "allwinner,sun20i-d1-can"; + reg =3D <0x02504400 0x400>; + interrupts =3D ; + clocks =3D <&ccu CLK_BUS_CAN1>; + resets =3D <&ccu RST_BUS_CAN1>; + status =3D "disabled"; + }; + syscon: syscon@3000000 { compatible =3D "allwinner,sun20i-d1-system-control"; reg =3D <0x3000000 0x1000>; --=20 2.41.0