From patchwork Sun Mar 17 19:37:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13594830 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 DE30CC54E67 for ; Sun, 17 Mar 2024 19:39:13 +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=hSPTt19xaKsJcgzk1hYPNaVFYhIDbiAaZDvCKtLssK4=; b=f63RDCrn+03g66 QDn81dYEQN+Y3vOl/YcVUOqwMtPV7BbAZVrUFAwfgeuSPIX35pV3WL/Mww4ZL95JoDuuUgtQYN7W2 bhuygIU9Ho/egiNjCW3zcR7QPgQPFjEpW1HOX95EDoO+tcOEFZLTLA/AwsYnqnicIqi9mVIx0/TMi q1hFKV4KVDZtssLE2uPNnt4QskwBAlQiQvn3cdMBKb//Wx6PbhzBy9eFfEaWQLEdYft2MSjnFdFGf QASiy2oxSeSmq7JNGRN1MPPyfvSWVIneqChzUg+rPF6s8aYS/xujpR862uLKMOQleDINu2D2qPY/t SrT3FuSAiBeikuHY4hRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlwLU-00000006EOJ-2tsF; Sun, 17 Mar 2024 19:39:00 +0000 Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlwLF-00000006EEk-2qNZ for linux-arm-kernel@lists.infradead.org; Sun, 17 Mar 2024 19:38:48 +0000 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-5a4b35ff84eso256955eaf.2 for ; Sun, 17 Mar 2024 12:38:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710704324; x=1711309124; 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=OT6hmngmg7LhsdhWQVbZrDuHFIRfbTgzLQihr9TF8as=; b=Ywi/doLoxZ8dGsowbrRPwzM5xeIHgbCkaRsxDmMQ7i+xy5TdhgGMckLgBP3kd8PNVk CHsHnLlnpYtpudrCUxH4Ju6C8I3J3wRqjFevxMM5tL1ZvPWyG0yGYIBP3qgzHZzPU4Bd QpOoKBiUXzANdZf5BopFv9h6azuIBKoYU+C3Hf6t8pUi5M2bu+jaswCrar1DcJj/Q6PK ZGb2QYBfQl2hAvWAYGF0GoT8SPNPJgSfUljXIv1/qSTfF/EmtE361ospKHTzzAw9x7iO 05UoGgNcE8C7oH1gLfpLkyVz9/cmx3kNGkrwASDABXTD6x/aBUwW+33BSMKp9E+/dI0b uQGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710704324; x=1711309124; 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=OT6hmngmg7LhsdhWQVbZrDuHFIRfbTgzLQihr9TF8as=; b=nW45yn3o3gfgJgKwAQfrRtIgmubJl54rZRr2V7IL+sHPmtY4GcYjZ2eyDDg+uJBJF5 CXpNUbywo9cNpMdfhDJiMCpqztJW65r2q9Q181vl2kL8FDviAKlcBWClcKJdZf5HI2Y9 mDE1/x0fT2KydJXOjLvE0aXcICgKpzZQhFgMbYlU+gIWqM/1ipn163VihsV6clCTTY6c H2h2goJrV5Cv5zr0Q3VeqgzQpojieUTavokgASvvg8S9r3k2co59iOrpDS8me9D911L/ HN7l+JofKs0/oQUmuuM0OOQFCXMG/GmSwGMk+n3e8n5lIUxqEaqb4zOeVIPKQAEB8Y7a HAAg== X-Forwarded-Encrypted: i=1; AJvYcCXHqGqq60QRZo2TUGgXOs8vxFtjwe+Ckm0NfM0uXj0FbLLLCVX7JrsBBVSwAlbtnPuJ3Uw3VB4m9+GtY/7YIQOsElT8POYTuj9bPg2LtQ34kcRTCSQ= X-Gm-Message-State: AOJu0Yw2zZM82FXI3eBht3TfI9UqmZz+I7qIS31xjGZFtbNEaqnwrcQu R12Tjh+Sr1ADviLWOZr58wGnOrMpva/jGAEqwk967Em47MeUp4bz X-Google-Smtp-Source: AGHT+IFUpPTaU6PvOX+AKPaPFj4Fu6IdLBC3LDsxuIWxs0yZJKnWwhoTrKzOxe3YGH55CzjEL+bang== X-Received: by 2002:a05:6358:7e92:b0:17c:1e63:d02e with SMTP id o18-20020a0563587e9200b0017c1e63d02emr13107142rwn.2.1710704323604; Sun, 17 Mar 2024 12:38:43 -0700 (PDT) Received: from toolbox.iitism.net ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id st6-20020a17090b1fc600b0029bbdc920besm6125995pjb.44.2024.03.17.12.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 12:38:43 -0700 (PDT) From: Ayush Singh To: linux-kernel@vger.kernel.org (open list) Cc: Ayush Singh , jkridner@beagleboard.org, robertcnelson@beagleboard.org, lorforlinux@beagleboard.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Vaishnav M A , Mark Brown , Johan Hovold , Alex Elder , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/TEXAS INSTRUMENTS K3 ARCHITECTURE), linux-spi@vger.kernel.org (open list:SPI SUBSYSTEM), greybus-dev@lists.linaro.org (moderated list:GREYBUS SUBSYSTEM), Vaishnav M A Subject: [PATCH v4 5/5] dts: ti: k3-am625-beagleplay: Add mikroBUS Date: Mon, 18 Mar 2024 01:07:13 +0530 Message-ID: <20240317193714.403132-6-ayushdevel1325@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240317193714.403132-1-ayushdevel1325@gmail.com> References: <20240317193714.403132-1-ayushdevel1325@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240317_123845_973616_BEB85006 X-CRM114-Status: GOOD ( 12.25 ) 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 DONOTMERGE this patch depends on patch 1 Add mikroBUS connector support for Beagleplay. Co-developed-by: Vaishnav M A Signed-off-by: Vaishnav M A Signed-off-by: Ayush Singh --- .../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 80 +++++++++++++++++-- 1 file changed, 72 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..e1dce1b80153 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,38 @@ simple-audio-card,codec { }; }; + mikrobus0: mikrobus-connector { + 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>; + pwms = <&ecap2 0 500000 0>; + i2c-adapter = <&main_i2c3>; + spi-controller = <&main_spi2>; + uart = <&main_uart5>; + spi-cs = <0 1>; + 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 +422,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 +441,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 +455,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 +471,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 +697,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 +869,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,8 +937,6 @@ &main_uart1 { }; &main_uart5 { - pinctrl-names = "default"; - pinctrl-0 = <&mikrobus_uart_pins_default>; status = "okay"; }; @@ -926,3 +986,7 @@ &mcasp1 { tx-num-evt = <32>; rx-num-evt = <32>; }; + +&ecap2 { + status = "okay"; +};