From patchwork Fri Mar 15 18:48:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13593884 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 4A520C54E58 for ; Fri, 15 Mar 2024 18:49:53 +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: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:In-Reply-To:References: List-Owner; bh=ss1qOB1xPpxQg/n61akEGFa+Ut+OKsQmbU21QZIahXo=; b=1UfAcn1Ml1N5X4 hhZ7VPKBLFy60vd82Ef00++XnPZIDGCCy9MnZkUE1p95y/rvKZe8H60ymYmmKiL8lVoNNZFZxAvT6 v+hGA8jx+Fs1zMfbT81OXCGDIY5cx/RpbDGK0UIpDnmsUReuWyPQUPpXFRi4/55tN6tSRskiG1Hfn jDUYM+Fyh/nBOVgO+5E30ME4Ah+UsSkWqpZob1wRTv2dCETunvEMEATPDHp3nRfFvpLIK4/1jE4hW nK1EW+NKBRFbI2RsdyMcSj7dfNZxt4O8KcBRW9smmT9nWEqixylnNCFWnwd1qaw3dkF8UBNuT2GAD bWePVNO5oC0/dEQLsMew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlCcc-00000001DF6-0mi3; Fri, 15 Mar 2024 18:49:38 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rlCcW-00000001DDe-3oQ1 for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2024 18:49:37 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6e6b6e000a4so1826305b3a.0 for ; Fri, 15 Mar 2024 11:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710528569; x=1711133369; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Vkr1Nn4aLr68egb6cv/rvXMAargek6kpQuKuYfi/gnw=; b=agCRXg5i0Hqb5mGR2MjCW9Qocdkckej4ijPg0TPltC/fqiXtdqChDqMcgjvoN1nr7p TLrzm25evZztz37szuuiyruypj/dp51fg+nToWhHDMJ6rBkSPWIb6wMSF+hYvYysez5O lji5emm1P1yLbZBGhwH1Q45Cx4ZPag1y4qUkai8MzTVQx0yIkzzKKD9iVHQMKpr39aKL nwud2zZ7FzAGSfTL0WIkfzE2oEntHRYB6r7aEoElwNoSVwLPAfXDxGgvj5XRuvkITKXo tGjecsBCCUT6FeDxHlqByUds6FoztYZj5TN4uN/OGGqcTVnUrS2RPEBs/dDBtrX0/CxZ XT2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710528569; x=1711133369; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Vkr1Nn4aLr68egb6cv/rvXMAargek6kpQuKuYfi/gnw=; b=QSwJ7Lxhth2c1Fe+kJBKmzPa8MAhEZSnyBk0ngvW9yw8eT+BZkGVsuI/WiPJ8vWeRk Aq/jLGqieA+43MM8TXyiNMPUe1K5x6d0tvkW5ldg5e2VG3OuYqKcM7r1GRPHAecyFgOg ybNCuUmHMBYv+tSFSIp9M0z/g1KOGpIE8ynZgI13k/ZmzYlPbgo1lFvpNdKGURW0yMWN yW/UyOHuhyvzzRgtydxV4rGc0lOARXMQKyDDh12QvE8BGwCV3kjUX4ovRUuAZobNVMuM PMKfxqXf9uHhDwBKejWv3bUbe/uqgKrJnv6krGH17Vw2uSblR0xTFEvPuMwEmgebsGyp ms+Q== X-Forwarded-Encrypted: i=1; AJvYcCV15L06UCJlWO8cu1dcnpGj3DKkb687SxasB0EDEwZ1+FJGTWDncvsk3JvjjvFSv7Q3P+/M84uFVJiPCZr6t/qkcwM0kvUXPk5VrAC7Pk9Vl+wx520= X-Gm-Message-State: AOJu0Yywad81BzxfWAx/WU1+zs+hS60EFuWCJG6Eby0IvXn5X3Rh9bbw 5HYmOcfkcjtS0TonBM7rwsNk1cZmRo2yHoSZJydG0i55XXQ6y7PL+4aAn61v8on7dg== X-Google-Smtp-Source: AGHT+IHsm+HO3GDXSv/GZ4EFy5jwTiMdLS+yIDpRIDjfiLH/zmrN5f9qf6zHblX1mbdu531OocugkQ== X-Received: by 2002:a05:6a00:a18:b0:6e5:1196:6cf5 with SMTP id p24-20020a056a000a1800b006e511966cf5mr14112902pfh.3.1710528568856; Fri, 15 Mar 2024 11:49:28 -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.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 11:49:28 -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 0/8] misc: Add mikroBUS driver Date: Sat, 16 Mar 2024 00:18:58 +0530 Message-ID: <20240315184908.500352-1-ayushdevel1325@gmail.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240315_114932_968380_72526609 X-CRM114-Status: GOOD ( 15.73 ) 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 MikroBUS is an open standard developed by MikroElektronika for connecting add-on boards to microcontrollers or microprocessors. It essentially allows you to easily expand the functionality of your main boards using these add-on boards. This patchset adds mikroBUS as a Linux bus type and provides a driver to parse, and flash mikroBUS manifest and register the mikroBUS board. The v1 and v2 of this patchset was submitted by Vaishnav M A back in 2020. This patchset also includes changes made over the years as part of BeagleBoards kernel. Link: https://www.mikroe.com/mikrobus Link: https://docs.beagleboard.org/latest/boards/beagleplay/ Link: https://lore.kernel.org/lkml/20200818124815.11029-1-vaishnav@beagleboard.org/ Patch v2 Changes in v3: - Use phandle instead of busname for spi - Use spi board info for registering new device - Convert dt bindings to yaml - Add support for clickID - Code cleanup and style changes - Additions required to spi, serdev, w1 and regulator subsystems Changes in v2: - support for adding mikroBUS ports from DT overlays, - remove debug sysFS interface for adding mikrobus ports, - consider extended pin usage/deviations from mikrobus standard specifications - use greybus CPort protocol enum instead of new protocol enums - Fix cases of wrong indentation, ignoring return values, freeing allocated resources in case of errors and other style suggestions in v1 review. Ayush Singh (7): dt-bindings: misc: Add mikrobus-connector w1: Add w1_find_master_device spi: Make of_find_spi_controller_by_node() available regulator: fixed-helper: export regulator_register_always_on greybus: Add mikroBUS manifest types mikrobus: Add mikrobus driver dts: ti: k3-am625-beagleplay: Add mikroBUS Vaishnav M A (1): serdev: add of_ helper to get serdev controller .../bindings/misc/mikrobus-connector.yaml | 110 ++ MAINTAINERS | 7 + .../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 76 +- drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/mikrobus/Kconfig | 19 + drivers/misc/mikrobus/Makefile | 6 + drivers/misc/mikrobus/mikrobus_core.c | 942 ++++++++++++++++++ drivers/misc/mikrobus/mikrobus_core.h | 201 ++++ drivers/misc/mikrobus/mikrobus_id.c | 229 +++++ drivers/misc/mikrobus/mikrobus_manifest.c | 502 ++++++++++ drivers/misc/mikrobus/mikrobus_manifest.h | 20 + drivers/regulator/fixed-helper.c | 1 + drivers/spi/spi.c | 206 ++-- drivers/tty/serdev/core.c | 19 + drivers/w1/w1.c | 6 +- drivers/w1/w1_int.c | 27 + include/linux/greybus/greybus_manifest.h | 49 + include/linux/serdev.h | 4 + include/linux/spi/spi.h | 4 + include/linux/w1.h | 1 + 21 files changed, 2318 insertions(+), 113 deletions(-) create mode 100644 Documentation/devicetree/bindings/misc/mikrobus-connector.yaml create mode 100644 drivers/misc/mikrobus/Kconfig create mode 100644 drivers/misc/mikrobus/Makefile create mode 100644 drivers/misc/mikrobus/mikrobus_core.c create mode 100644 drivers/misc/mikrobus/mikrobus_core.h create mode 100644 drivers/misc/mikrobus/mikrobus_id.c create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.c create mode 100644 drivers/misc/mikrobus/mikrobus_manifest.h base-commit: 61996c073c9b070922ad3a36c981ca6ddbea19a5