From patchwork Tue Apr 19 04:33:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 564090 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 97E02C433EF for ; Tue, 19 Apr 2022 04:34:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347707AbiDSEgv (ORCPT ); Tue, 19 Apr 2022 00:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348380AbiDSEgr (ORCPT ); Tue, 19 Apr 2022 00:36:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 825402FE75; Mon, 18 Apr 2022 21:33:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B75C2611F9; Tue, 19 Apr 2022 04:33:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2E68C385AA; Tue, 19 Apr 2022 04:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650342838; bh=fkvuDq2Bso3cdL/9iihXfEdOfFkWrTLOzW5BCQj/Fsw=; h=From:To:Cc:Subject:Date:From; b=Ivh84uhNobyb19JWAX2/jbMJRX/q9gqR0mpBib34AL7bnh/QsjuZ8ACJ9/Np5vV8E pDhDib39epcc6ucLADSnV+iYe5shsC1HkykIiB7gYojF9CBKA7yUz1EiEZiPCLsn7E ajxgoNnuK5q0TS+0fVYfKcMIN94b1Yb4/PtoEaKXhse/4JjY8F0jlTtWNCNTmNC4ty Xa2TyvJuHS0LRI/eRf25NaPglaCiBzEpE+MOwz0VNJKtg+0BZHlsKQ6Lga0aam1TeP P+IHFi/poof5le/0woigrPTXmyZZQpGyBk71PRL9BdHkeRZioF+lRJZmGO1fBpithV SosNn650OjOQA== From: Vinod Koul To: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, Vinod Koul , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH v2] arm64: dts: qcom: db845c: Add support for MCP2517FD Date: Tue, 19 Apr 2022 10:03:48 +0530 Message-Id: <20220419043348.1483625-1-vkoul@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for onboard MCP2517FD SPI CAN transceiver attached to SPI0 of RB3. Signed-off-by: Vinod Koul --- Changes in v2: - add cs and pinctrl config - remove misleading comment arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index 28fe45c5d516..4f4d45be93e3 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -28,6 +28,13 @@ chosen { stdout-path = "serial0:115200n8"; }; + /* Fixed crystal oscillator dedicated to MCP2517FD */ + clk40M: can_clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <40000000>; + }; + dc12v: dc12v-regulator { compatible = "regulator-fixed"; regulator-name = "DC12V"; @@ -746,6 +753,24 @@ codec { }; }; +&spi0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&qup_spi0_default>; + cs-gpios = <&tlmm 3 GPIO_ACTIVE_LOW>; + + can@0 { + compatible = "microchip,mcp2517fd"; + reg = <0>; + clocks = <&clk40M>; + interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>; + spi-max-frequency = <10000000>; + vdd-supply = <&vdc_5v>; + xceiver-supply = <&vdc_5v>; + status = "okay"; + }; +}; + &spi2 { /* On Low speed expansion */ label = "LS-SPI0"; @@ -1219,3 +1244,11 @@ ov7251_ep: endpoint { }; }; }; + +/* PINCTRL - additions to nodes defined in sdm845.dtsi */ +&qup_spi0_default { + config { + drive-strength = <6>; + bias-disable; + }; +};