From patchwork Tue Jan 11 15:57:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Boger X-Patchwork-Id: 12709988 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 3A815C433F5 for ; Tue, 11 Jan 2022 15:58:57 +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:References:In-Reply-To: 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: List-Owner; bh=nKV7RQZRwOpPUjm9TWCkLfKXNBGK5pozkaeb4cVqF1s=; b=OBRlifFXtH9X7E BE14O8/DdrvEPHCpKSAskpRSt5gHyYwWTZMie2FrX1b9sk1esA1VYHWOuR0qbVYOeOIYHjTDX3Hrl 28u4m14upOSvBX4QXQcFfxKFIYtr89RPn2ny8Rq5cCd8RsfcubEoVflKvgUUidgh2LtH41VGfqBwe /kmJ4ckVJP2kSywqJ8TAcQerxWws77AAFWQcU/FAYexBDq/l/+4fHVZfc6nKFPvnh3tteof/rkwrK OTB2Evh/v0S5ZHMRO3icQFmVGyLIfH/jFQ/Tdw3Cu7nZVoGu+168mu+WdZ6jm0j+KpNVwPBJzIaFE aPX51JgNqcBTF8Ht3zhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7JWv-00GosZ-G8; Tue, 11 Jan 2022 15:57:49 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7JWj-00GooN-UJ for linux-arm-kernel@lists.infradead.org; Tue, 11 Jan 2022 15:57:39 +0000 Received: by mail-lf1-x129.google.com with SMTP id x6so57922155lfa.5 for ; Tue, 11 Jan 2022 07:57:36 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=QNe6aTzR9gkb/+vCdyAp/Zw0YKIRP/v2w6mNVEQQPNA=; b=Sb/19RRQhexxPXEkK2R+CyPHogUGdOuD91tyq2+OtAsxTg2PBjEaHzNghcM/Vvvngv AuUSjXT8l49cPedjFw5f5oLFdBOzEdWih2udE2daJEVOa+/kOWtmZXnUYKTe5h9/U26w Pvit1XUTGmWpSkkDvfUq1ItJq9A1WB4MFGdGpCNRLiXeP8kIHqMGAhV2fQ9B5OkSbAbj kFEEs/WQLbOFtrnpejTUqVQTz9E8f1nGg5YW504HjtKo2FTm4lKOM0oh68mJD0s+CU58 DosBLfUpAwwAsh5UnEuia0TtZXT1nREPhmRlcN2BFYAHm5wxzKC/KYScEsbep2pJYJ2o H4WA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=QNe6aTzR9gkb/+vCdyAp/Zw0YKIRP/v2w6mNVEQQPNA=; b=bv2mYwQ6Wa9URKzfQM2e/ORdUfZxXLCPUTzznB4Uqd4dC2MxfXWATfieUFFm28T55y rNQJ8tQe90eUb0btnnAIMdGLc29pYGgelLFtwQaaMQl7dYpXBPVc4p9pLzYqyoKUjwpH B5Hr3+n8PfV6wTgJ74s9/tDEsm6Voeeo1u6Je+Bk+WSHaHzJOS7C7bD3GsP8GBgxTCiw xXfiH7o34idxhsorTzd66RYPu09zeKechrWHo37/0eq3cbezVPk/MJd8qWQMzKXkD2ih 1vY1fVqFlPQov5KPKhizYJKUXJoKS50rT/1temD7XS/o77wYg0xRxy2c6LtgBQuWnsYN sJGw== X-Gm-Message-State: AOAM53360AJ+LWxSW9/UXPC6UPijMIVO44XlTZBAwyKhrD/vafka/aWo X5b3T66tGxJdaqt2IsEPyDK1Iw== X-Google-Smtp-Source: ABdhPJyNSYENIMVpHSSHyxWqxJl6Udb1sNgi9hY5EUxIFgnHjlsRjgUnOWiZhRR53Ri1ZiafUZ8MWg== X-Received: by 2002:a05:6512:c13:: with SMTP id z19mr3756063lfu.640.1641916655051; Tue, 11 Jan 2022 07:57:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 07:57:34 -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 1/3] dt-bindings: net: can: add support for Allwinner R40 CAN controller Date: Tue, 11 Jan 2022 18:57:07 +0300 Message-Id: <20220111155709.56501-2-boger@wirenboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220111155709.56501-1-boger@wirenboard.com> References: <20220111155709.56501-1-boger@wirenboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220111_075737_998744_9EB8E957 X-CRM114-Status: GOOD ( 12.17 ) 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 Introduces new compatible for R40 CAN controller with required resets property. Signed-off-by: Evgeny Boger --- .../net/can/allwinner,sun4i-a10-can.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml b/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml index a95960ee3feb..c93fe9d3ea82 100644 --- a/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml +++ b/Documentation/devicetree/bindings/net/can/allwinner,sun4i-a10-can.yaml @@ -17,6 +17,7 @@ properties: - const: allwinner,sun7i-a20-can - const: allwinner,sun4i-a10-can - const: allwinner,sun4i-a10-can + - const: allwinner,sun8i-r40-can reg: maxItems: 1 @@ -27,6 +28,19 @@ properties: clocks: maxItems: 1 + resets: + maxItems: 1 + +if: + properties: + compatible: + contains: + const: allwinner,sun8i-r40-can + +then: + required: + - resets + required: - compatible - reg @@ -47,5 +61,15 @@ examples: interrupts = ; clocks = <&ccu CLK_APB1_CAN>; }; + - | + #define RST_BUS_CAN 68 + #define CLK_BUS_CAN 91 + can1: can@1c2bc00 { + compatible = "allwinner,sun8i-r40-can"; + reg = <0x01c2bc00 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_CAN>; + resets = <&ccu RST_BUS_CAN>; + }; ...