From patchwork Fri Mar 15 18:49:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13593891 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 3DEFFC54E67 for ; Fri, 15 Mar 2024 18:51:06 +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=FfmDHTEkgNJzw1LwUItB3XBTul9a7m+LPcU4I529uSg=; b=UYskomBT8hfpxg ElPzO3QwErP8pT885AUlXiEwAHRsBsDINotUBbgEL0VDRNY6Q2nViqEjPkV4qnvL0sEPvoHWJfKfo pkQFrbgj5BmuZtfKSCT8T9ZivHILjtP4x8eBMZ9rUFGwQAAkvZKUqCG1rjWNl+bnzAkvA84Sln2FE n23cOcp1LE2NwFtp3p0WkcLd8b4x/aPXJOs+1AsDQtzOFuN8n/OacNmp70XsSW0Psf0K8ZZFyIWUa lLTBayXy7CN860EpSOlJ8LoW1T493NLKr5V3pQKSFJbA7JJoEIXrryL7p+uQVqCooekZIttLn8Wq1 lFx1N7TTXpXV1aabiQ/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlCdi-00000001Dqi-3yOk; Fri, 15 Mar 2024 18:50:46 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlCda-00000001DlF-3cYh for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 18:50:45 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6e6b5aa0b52so2216204b3a.3 for ; Fri, 15 Mar 2024 11:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710528636; x=1711133436; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kCkB7IphGBPGl1w/S0psqC8P5Um5bt65HZvq4RRR00Y=; b=l0QdDjmeG2fG+Eskz59EJfPkAdDFJwTuotTboJz6hdgSLdzl0kww8nY7gyjLhaFM8D 6w/CM07xabukwgnIlZbmTUTXQe9whwHZOMcdCwBaVSP7Vilj6J/W6FySrA6lTjLm73Hx 0mLPYJFM+DNBqqMzsIZ+zhbejX2lz2i0GFUXJ9RjrbxDqyLeNK3ohfPGdgzLqGOdHdHW kJ5VUeNJXZONOX02DbayaIE02GKtugIIfZZ1MNAJKdh+mMhHwXmXLckVc1KpHO15owmx tR6UcVdiKe/pv14bcVmWzIy8O8RhImj60CVSGwxXOB8OmkoE7aHQHDhJiNY9Za4kMyNu 0tmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710528636; x=1711133436; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kCkB7IphGBPGl1w/S0psqC8P5Um5bt65HZvq4RRR00Y=; b=MWszRPnNeV8CJxJxFA1SKUOj1zakSMFH13TGAB57jGVQ1RmBpi2Aq23gxwHndRAjD4 qskLWDVGasvUBjsczqrtMnYtnPB6fT/wzE9TWQ/YRiA5+/kMoh6hqfJlsloDOUQ4xhDV 2BuC31rO/ai3j71lkApBPc/qmcrnWfJAv6ae75NFLzjXclrkGkA2panD9dDEKX/Z7bJ9 oBfoyhjj0jxu9RuC40svNoUBQgDZvSYUxQ+fZwcOxNLU3sWYuhFFVqtA0iRDMGkfQVOw 9+C4Y2zUBXeqhcnpKR0koj9U3uEl5atXRsO7WH4ps2O6ae6fnzPX+51awCrN1UFC52L5 qWfw== X-Forwarded-Encrypted: i=1; AJvYcCVsAdURLDP07uEvY1LuDuL41vUh3l3HIj9js0IZ86UDRtNHEvrMs53Db/5vHhjwdPL9xVapbxePZFdJ1Ud0jefteSsF10cHZ2geQ7ppEh5d9m3Arlk= X-Gm-Message-State: AOJu0YwhgBKDYzzzDMgd8SJF+ptkhk58Id7ncuWTanS2zYmkbf1Vxj5+ N/HwhQjnXjnPDS6LrrLYwU6MWJlzhIed7Mu4vrTpCNRuALW6h9/v X-Google-Smtp-Source: AGHT+IFR9Rz9QYZm4Zrmj3QCj98EeqjLoIF4d8U8fx/cYS6Sv51WOwxOGnn90k4PIrka569oMmxqXw== X-Received: by 2002:a05:6a20:2585:b0:1a3:504d:c064 with SMTP id k5-20020a056a20258500b001a3504dc064mr2238027pzd.55.1710528636650; Fri, 15 Mar 2024 11:50:36 -0700 (PDT) Received: from toolbox.iitism.net ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id f17-20020a056a0022d100b006e6cc998be8sm3580784pfj.207.2024.03.15.11.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 11:50:36 -0700 (PDT) From: Ayush Singh To: linux-kernel@vger.kernel.org Cc: Ayush Singh , jkridner@beagleboard.org, robertcnelson@beagleboard.org, Vaishnav M A , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Liam Girdwood , Mark Brown , Jiri Slaby , Johan Hovold , Alex Elder , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-serial@vger.kernel.org, greybus-dev@lists.linaro.org Subject: [PATCH v3 8/8] dts: ti: k3-am625-beagleplay: Add mikroBUS Date: Sat, 16 Mar 2024 00:19:06 +0530 Message-ID: <20240315184908.500352-9-ayushdevel1325@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240315184908.500352-1-ayushdevel1325@gmail.com> References: <20240315184908.500352-1-ayushdevel1325@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_115039_255067_CD51FB95 X-CRM114-Status: GOOD ( 13.02 ) 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 Add mikroBUS connector support for Beagleplay. Signed-off-by: Ayush Singh --- .../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 76 +++++++++++++++++-- 1 file changed, 68 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts index a34e0df2ab86..886308f99d1a 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts @@ -29,6 +29,7 @@ aliases { i2c3 = &main_i2c3; i2c4 = &wkup_i2c0; i2c5 = &mcu_i2c0; + mikrobus0 = &mikrobus0; mmc0 = &sdhci0; mmc1 = &sdhci1; mmc2 = &sdhci2; @@ -230,6 +231,33 @@ simple-audio-card,codec { }; }; + mikrobus0: linux-mikrobus { + compatible = "mikrobus-connector"; + pinctrl-names = "default", "pwm_default", "pwm_gpio", + "uart_default", "uart_gpio", "i2c_default", + "i2c_gpio", "spi_default", "spi_gpio"; + pinctrl-0 = <&mikrobus_gpio_pins_default>; + pinctrl-1 = <&mikrobus_pwm_pins_default>; + pinctrl-2 = <&mikrobus_pwm_pins_gpio>; + pinctrl-3 = <&mikrobus_uart_pins_default>; + pinctrl-4 = <&mikrobus_uart_pins_gpio>; + pinctrl-5 = <&mikrobus_i2c_pins_default>; + pinctrl-6 = <&mikrobus_i2c_pins_gpio>; + pinctrl-7 = <&mikrobus_spi_pins_default>; + pinctrl-8 = <&mikrobus_spi_pins_gpio>; + i2c-adapter = <&main_i2c3>; + spi-controller = <&main_spi2>; + spi-cs = <0 1>; + uart = <&main_uart5>; + pwms = <&ecap2 0 500000 0>; + mikrobus-gpios = + <&main_gpio1 11 GPIO_ACTIVE_HIGH>, <&main_gpio1 9 GPIO_ACTIVE_HIGH>, + <&main_gpio1 24 GPIO_ACTIVE_HIGH>, <&main_gpio1 25 GPIO_ACTIVE_HIGH>, + <&main_gpio1 22 GPIO_ACTIVE_HIGH>, <&main_gpio1 23 GPIO_ACTIVE_HIGH>, + <&main_gpio1 7 GPIO_ACTIVE_HIGH>, <&main_gpio1 8 GPIO_ACTIVE_HIGH>, + <&main_gpio1 14 GPIO_ACTIVE_HIGH>, <&main_gpio1 13 GPIO_ACTIVE_HIGH>, + <&main_gpio1 12 GPIO_ACTIVE_HIGH>, <&main_gpio1 10 GPIO_ACTIVE_HIGH>; + }; }; &main_pmx0 { @@ -389,6 +417,18 @@ AM62X_IOPAD(0x01f0, PIN_OUTPUT, 5) /* (A18) EXT_REFCLK1.CLKOUT0 */ >; }; + mikrobus_pwm_pins_default: mikrobus-pwm-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01a4, PIN_INPUT, 2) /* (B20) MCASP0_ACLKX.ECAP2_IN_APWM_OUT */ + >; + }; + + mikrobus_pwm_pins_gpio: mikrobus-pwm-gpio-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01a4, PIN_INPUT, 7) /* (B20) MCASP0_ACLKX.GPIO1_11 */ + >; + }; + mikrobus_i2c_pins_default: mikrobus-i2c-default-pins { pinctrl-single,pins = < AM62X_IOPAD(0x01d0, PIN_INPUT_PULLUP, 2) /* (A15) UART0_CTSn.I2C3_SCL */ @@ -396,6 +436,13 @@ AM62X_IOPAD(0x01d4, PIN_INPUT_PULLUP, 2) /* (B15) UART0_RTSn.I2C3_SDA */ >; }; + mikrobus_i2c_pins_gpio: mikrobus-i2c-gpio-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01d0, PIN_INPUT, 7) /* (A15) UART0_CTSn.GPIO1_22 */ + AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ + >; + }; + mikrobus_uart_pins_default: mikrobus-uart-default-pins { pinctrl-single,pins = < AM62X_IOPAD(0x01d8, PIN_INPUT, 1) /* (C15) MCAN0_TX.UART5_RXD */ @@ -403,6 +450,13 @@ AM62X_IOPAD(0x01dc, PIN_OUTPUT, 1) /* (E15) MCAN0_RX.UART5_TXD */ >; }; + mikrobus_uart_pins_gpio: mikrobus-uart-gpio-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01d8, PIN_INPUT, 7) /* (C15) MCAN0_TX.GPIO1_24 */ + AM62X_IOPAD(0x01dc, PIN_INPUT, 7) /* (E15) MCAN0_RX.GPIO1_25 */ + >; + }; + mikrobus_spi_pins_default: mikrobus-spi-default-pins { pinctrl-single,pins = < AM62X_IOPAD(0x01b0, PIN_INPUT, 1) /* (A20) MCASP0_ACLKR.SPI2_CLK */ @@ -412,6 +466,15 @@ AM62X_IOPAD(0x0198, PIN_INPUT, 1) /* (A19) MCASP0_AXR2.SPI2_D1 */ >; }; + mikrobus_spi_pins_gpio: mikrobus-spi-gpio-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x0194, PIN_INPUT, 7) /* (B19) MCASP0_AXR3.GPIO1_7 */ + AM62X_IOPAD(0x0198, PIN_INPUT, 7) /* (A19) MCASP0_AXR2.GPIO1_8 */ + AM62X_IOPAD(0x01ac, PIN_INPUT, 7) /* (E19) MCASP0_AFSR.GPIO1_13 */ + AM62X_IOPAD(0x01b0, PIN_INPUT, 7) /* (A20) MCASP0_ACLKR.GPIO1_14 */ + >; + }; + mikrobus_gpio_pins_default: mikrobus-gpio-default-pins { bootph-all; pinctrl-single,pins = < @@ -629,8 +692,6 @@ &main_gpio0 { &main_gpio1 { bootph-all; - pinctrl-names = "default"; - pinctrl-0 = <&mikrobus_gpio_pins_default>; gpio-line-names = "", "", "", "", "", /* 0-4 */ "SPE_RSTN", "SPE_INTN", "MIKROBUS_GPIO1_7", /* 5-7 */ "MIKROBUS_GPIO1_8", "MIKROBUS_GPIO1_9", /* 8-9 */ @@ -803,15 +864,11 @@ it66121_out: endpoint { }; &main_i2c3 { - pinctrl-names = "default"; - pinctrl-0 = <&mikrobus_i2c_pins_default>; clock-frequency = <400000>; status = "okay"; }; &main_spi2 { - pinctrl-names = "default"; - pinctrl-0 = <&mikrobus_spi_pins_default>; status = "okay"; }; @@ -875,9 +932,8 @@ &main_uart1 { }; &main_uart5 { - pinctrl-names = "default"; - pinctrl-0 = <&mikrobus_uart_pins_default>; status = "okay"; + force-empty-serdev-controller; }; &main_uart6 { @@ -926,3 +982,7 @@ &mcasp1 { tx-num-evt = <32>; rx-num-evt = <32>; }; + +&ecap2 { + status = "okay"; +};