From patchwork Wed Sep 11 14:27:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800690 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 C7900EE49B8 for ; Wed, 11 Sep 2024 14:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YOaH7wUDUVg3jrdLcJDpY4x/GyOxkGNywptNXtNYkIM=; b=IJxOX0ZCzZBKOLzOVgYIdNQMcY NTF9OcUTsujNWkAotP9kZifJbHAlyez+1Bl0+lZh/rWaYsiNvl6c1i+VSiLKlIvo4+De58XL5lQ/Z A/4wouJaqt03qMSlFo0c96/nTiT6si3JvmSG/Ca4oftEs+oVFeA57HoBSGK0rtsZEGzEI9bt31DbV vdPh0ke0xZAE29V3+ShJuNamfYZRJ10zglXIXUevQL/qLoZw321QT7FJS2eC9m/T9jBCDB/p316Mf sVGykvSFy1tudSXElArCBBS1t+l0saodpAR4uL0MLOUQUYkI0OsTLaHTLdCLZA4Pw0htwCtem4uqA S9YqM8uQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOPl-00000009vdq-0zoj; Wed, 11 Sep 2024 14:33:49 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOK3-00000009tr8-3D0O for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:27:57 +0000 Received: by mail-pj1-x1041.google.com with SMTP id 98e67ed59e1d1-2d88c0f8e79so5376085a91.3 for ; Wed, 11 Sep 2024 07:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064875; x=1726669675; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YOaH7wUDUVg3jrdLcJDpY4x/GyOxkGNywptNXtNYkIM=; b=oKP1zEL5NAapy2a2deOLhTiCP4ReUw0u1FFfj8qqp0JLdgZXQQePc36A9SeDM42fT2 OULBiFNsiGiffPr30yRH5shelmQESsLPJwm67sd+klx/6aZpL9LlndjTpm7ArvMfLutP CsoZ+LudUEhU9N2tGsSRpjCcAZnDulH+kbMmI8pRO/JnWM+LjXvafTDksoX46elPL5dP 7f7blPV9BQtqpM6LFjulKhw/Y4t3IdKHxYCop9IdDbUWjyfrxzVGcIDhFOi5rm8MzaRx ruyDD4DLlelgWTOk2WZxsjkjCn+tK5Cp3cpsQ0GPQIV0Wbd3FvdOxdcixrASGw9+++Kj qhQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064875; x=1726669675; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YOaH7wUDUVg3jrdLcJDpY4x/GyOxkGNywptNXtNYkIM=; b=j1FogGxXXtnTYeUN2RYvH0o3ZuTeaapHKeKwvBclhtEqa1VyA0hRFKd0t9mwiymY/T mAwznhmuYDRZKVOhfSDfhQvC5c/sQ6P7eL5u+RRN5SEfCiK8NNH3UhReOMI+xPy+MkkW R8EUvysKoV2s+TKCFSiy6Ex96Ee2AEWJmQVXcs5BDSPXdS8Tpos/CPk2V/bWZwcEm3J0 K/sv/tn9ucAT1oHh8cvjWfW0Y4mwi/Kp+zZeyjWTCBtm0cypbP/I2Rdc03aQNwuzfZ2a nxt7P4IrdK+/6F5o5ysTcoNGlFq9ms424YETMR+ij59JEHvbOtF59zA83Q/P3hAl3PA1 qZfg== X-Forwarded-Encrypted: i=1; AJvYcCXUj6dUpIn288J2TDAjfSb9hTDxOUvBqRs5QgmZ/foPZ71I9eakqAHQobMdAK1HoYf5zITggEOLOGc25WfEhy7I@lists.infradead.org X-Gm-Message-State: AOJu0YypQpSxaQaG6GkC4WbsI+pLzFo8+V1hafm0wP2oGDYx7yz9nr5f PEnvAufgFztbjvJMRHvJOESlFDW+H0FmZq9NvP/r6m7ZEMgJ2D4TCGu1ATpaJg== X-Google-Smtp-Source: AGHT+IETD8NcWXEwrzRI7PfUQkX1aQcbeJI3Z+n8OukCsjjngyEPaWbX125rUDAAT6JvWnPjmRzDnw== X-Received: by 2002:a17:90a:8a15:b0:2d8:99c4:3cd9 with SMTP id 98e67ed59e1d1-2dad4de1392mr20248004a91.3.1726064874446; Wed, 11 Sep 2024 07:27:54 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:27:54 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:18 +0530 Subject: [PATCH 1/8] rust: kernel: Add Platform device and driver abstractions MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-1-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=14880; i=ayush@beagleboard.org; h=from:subject:message-id; bh=zkzVPkQfS9LodBPXtJMr2bHYTVhX/BFEg3r5ta8DpxE=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajV037slacrW67oDDENCopdqoaSn9E7y3hl3 pM9wPh0T8KJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1QAKCRAFzvXHieVa dOYHD/wN0sTYbOCHvDxME4ZMoLGPRMqCTb20jASqA7kv2/98kyksK6fRt57d8xDjMebjJEMTP2o zSUbg2hJ+S1vJVaMOMR23MciQnzUZ46EBrYvobIUEsjnmXp2luajua1SbR99DuYEI7Gh99byLhX CUE4z6eqjEVsjp9LPaJjFlRKPm1dG77PJQMGBWh1RRUT6xEwDN5kcPjjfPQCVV2mo+KAMPXeLDp bHYVYpcmt+Vk89jH0Qq9hD4/knDp9Eoid/hmz6/0lsP1Ia6IVScDsJP1CQNb9x9yPHG7BNkxef6 0tdPDnETf636G4efv0UuuoFpfq4lm7txZBWJgnqdvmQmYLQjmVrdr0TRA22sNX6htvIB2jhPLn1 niVYpkJjvpRlHw1F8oWzrVExalYu5tbVwlQdo4JVjnQO7Lywl2pDrL3CDxr06C2Sw4ZOXMnscdc SP9jBNLq2fHQUxGSuK6lXEdNfuHQ3nWc3T6/MYIL6NOviYOMZjPc+kHRl8nv48DpYha/Uy/ISBx A2Y92b5KeXXXtOcU4ElbvLOTLxWU7PoKRka6xzF/0OVmIj2sNPZSkIIajHjEAcYmel6/XjDW3PR ovh7Qj2JLU05teSMqCNe8yb2W7H4zmlTf31BvjMfjJ4mwcNX8zfRf3XQ86XGNbM+wdP3eEhIWww re7PSfNtMph7Esw== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072755_867791_17B47771 X-CRM114-Status: GOOD ( 25.39 ) 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 From: Fabien Parent Ports Platform device and driver abstractions from Fabien's tree [0]. These abstractions do not depend on any generic driver registration and id table. Instead, the minimal abstractions have been implemented specifically for platform subsystem taking heavy inspiration from the existing phy device and driver abstractions. [0]: https://github.com/Fabo/linux/commits/fparent/rust-platform Signed-off-by: Fabien Parent Signed-off-by: Ayush Singh --- rust/bindings/bindings_helper.h | 1 + rust/kernel/lib.rs | 1 + rust/kernel/platform.rs | 380 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 382 insertions(+) diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index ae82e9c941af..10cbcdd74089 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index b5f4b3ce6b48..b3a318fde46c 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -42,6 +42,7 @@ #[cfg(CONFIG_NET)] pub mod net; pub mod page; +pub mod platform; pub mod prelude; pub mod print; pub mod rbtree; diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs new file mode 100644 index 000000000000..de28429f5551 --- /dev/null +++ b/rust/kernel/platform.rs @@ -0,0 +1,380 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! Platform devices and drivers. +//! +//! Also called `platformdev`, `pdev`. +//! +//! C header: [`include/linux/platform_device.h`](../../../../include/linux/platform_device.h) + +use core::{marker::PhantomData, pin::Pin, ptr::addr_of_mut}; + +use macros::vtable; + +use crate::{ + bindings, device, + error::{from_result, Result}, + str::CStr, + types::Opaque, +}; + +/// A platform device. +/// +/// # Invariants +/// +/// The field `ptr` is non-null and valid for the lifetime of the object. +#[repr(transparent)] +pub struct Device(Opaque); + +impl Device { + /// Creates a new [`Device`] instance from a raw pointer. + /// + /// # Safety + /// + /// For the duration of `'a`, + /// - the pointer must point at a valid `platform_device`, and the caller + /// must be in a context where all methods defined on this struct + /// are safe to call. + unsafe fn from_raw<'a>(ptr: *mut bindings::platform_device) -> &'a mut Self { + // CAST: `Self` is a `repr(transparent)` wrapper around `bindings::platform_device`. + let ptr = ptr.cast::(); + // SAFETY: by the function requirements the pointer is valid and we have unique access for + // the duration of `'a`. + unsafe { &mut *ptr } + } + + /// Returns id of the platform device. + pub fn id(&self) -> i32 { + let platformdev = self.0.get(); + // SAFETY: By the type invariants, we know that `self.ptr` is non-null and valid. + unsafe { (*platformdev).id } + } +} + +impl AsRef for Device { + fn as_ref(&self) -> &device::Device { + let platformdev = self.0.get(); + // SAFETY: By the type invariants, we know that `self.ptr` is non-null and valid. + unsafe { device::Device::as_ref(addr_of_mut!((*platformdev).dev)) } + } +} + +/// An adapter for the registration of a Platform driver. +struct Adapter { + _p: PhantomData, +} + +impl Adapter { + /// # Safety + /// + /// `pdev` must be passed by the corresponding callback in `platform_driver`. + unsafe extern "C" fn probe_callback(pdev: *mut bindings::platform_device) -> core::ffi::c_int { + from_result(|| { + // SAFETY: This callback is called only in contexts + // where we can exclusively access `platform_device` because + // it's not published yet, so the accessors on `Device` are okay + // to call. + let dev = unsafe { Device::from_raw(pdev) }; + T::probe(dev)?; + Ok(0) + }) + } + + /// # Safety + /// + /// `pdev` must be passed by the corresponding callback in `platform_driver`. + unsafe extern "C" fn remove_callback(pdev: *mut bindings::platform_device) { + // SAFETY: This callback is called only in contexts + // where we can exclusively access `platform_device` because + // it's not published yet, so the accessors on `Device` are okay + // to call. + let dev = unsafe { Device::from_raw(pdev) }; + T::remove(dev); + } +} + +/// Driver structure for a particular Platform driver. +/// +/// Wraps the kernel's [`struct platform_driver`]. +/// This is used to register a driver for a particular PHY type with the kernel. +/// +/// # Invariants +/// +/// `self.0` is always in a valid state. +/// +/// [`struct platform_driver`]: srctree/include/linux/platform.h +#[repr(transparent)] +pub struct DriverVTable(Opaque); + +// SAFETY: `DriverVTable` doesn't expose any &self method to access internal data, so it's safe to +// share `&DriverVTable` across execution context boundaries. +unsafe impl Sync for DriverVTable {} + +impl DriverVTable { + /// Creates a [`DriverVTable`] instance from [`Driver`]. + /// + /// This is used by [`module_platform_driver`] macro to create a static array of `phy_driver`. + /// + /// [`module_platform_driver`]: crate::module_platform_driver + pub const fn new(match_tbl: &'static DeviceIdTable) -> Self { + let drv = Opaque::new(bindings::platform_driver { + probe: if T::HAS_PROBE { + Some(Adapter::::probe_callback) + } else { + None + }, + __bindgen_anon_1: bindings::platform_driver__bindgen_ty_1 { + remove: if T::HAS_REMOVE { + Some(Adapter::::remove_callback) + } else { + None + }, + }, + driver: create_device_driver::(match_tbl), + // SAFETY: The rest is zeroed out to initialize `struct platform_driver`. + ..unsafe { core::mem::MaybeUninit::::zeroed().assume_init() } + }); + + DriverVTable(drv) + } +} + +const fn create_device_driver( + match_tbl: &'static DeviceIdTable, +) -> bindings::device_driver { + bindings::device_driver { + name: T::NAME.as_char_ptr(), + of_match_table: match_tbl.get(), + // SAFETY: The rest is zeroed out to initialize `struct device_driver`. + ..unsafe { core::mem::MaybeUninit::::zeroed().assume_init() } + } +} + +/// A platform driver. +#[vtable] +pub trait Driver { + /// The friendly name + const NAME: &'static CStr; + + /// Sets up device-specific structures during discovery. + fn probe(_dev: &mut Device) -> Result; + + /// Clean up device-specific structures during removal. + fn remove(_dev: &mut Device); +} + +/// Registration structure for Platform driver. +/// +/// Registers [`DriverVTable`] instance with the kernel. It will be unregistered when dropped. +/// +/// # Invariants +/// +/// The `driver` is currently registered to the kernel via `__platform_driver_register`. +pub struct Registration(Pin<&'static DriverVTable>); + +// SAFETY: The only action allowed in a `Registration` instance is dropping it, which is safe to do +// from any thread because `platform_drivers_unregister` can be called from any thread context. +unsafe impl Send for Registration {} + +impl Registration { + /// Registers a Platform driver. + pub fn new(drv: Pin<&'static DriverVTable>, m: &'static crate::ThisModule) -> Registration { + unsafe { + bindings::__platform_driver_register(drv.0.get(), m.0); + } + + Self(drv) + } +} + +impl Drop for Registration { + fn drop(&mut self) { + unsafe { bindings::platform_driver_unregister(self.0 .0.get()) } + } +} + +/// An identifier for Platform devices. +/// +/// Represents the kernel's [`struct of_device_id`]. This is used to find an appropriate +/// Platform driver. +/// +/// [`struct of_device_id`]: srctree/include/linux/mod_devicetable.h +pub struct DeviceId(&'static CStr); + +impl DeviceId { + /// A zeroed [`struct of_device_id`] used to signify end of of_device_id array. + /// + /// [`struct of_device_id`]: srctree/include/linux/mod_devicetable.h + pub const ZERO: bindings::of_device_id = bindings::of_device_id { + // SAFETY: The rest is zeroed out to initialize `struct of_device_id`. + ..unsafe { core::mem::MaybeUninit::::zeroed().assume_init() } + }; + + /// Create new instance + pub const fn new(s: &'static CStr) -> Self { + Self(s) + } + + const fn compatible(&self) -> [i8; 128] { + let compatible = self.0.as_bytes_with_nul(); + let mut comp = [0i8; 128]; + let mut i = 0; + + while i < compatible.len() { + comp[i] = compatible[i] as _; + i += 1; + } + + comp + } + + // macro use only + #[doc(hidden)] + pub const fn to_rawid(&self) -> bindings::of_device_id { + let comp = self.compatible(); + + bindings::of_device_id { + compatible: comp, + // SAFETY: The rest is zeroed out to initialize `struct of_device_id`. + ..unsafe { core::mem::MaybeUninit::::zeroed().assume_init() } + } + } +} + +/// An array of identifiers for platform driver +#[repr(transparent)] +pub struct DeviceIdTable([bindings::of_device_id; C]); + +impl DeviceIdTable { + /// Create a new instance + pub const fn new(ids: [bindings::of_device_id; C]) -> Self { + Self(ids) + } + + /// Returns a raw pointer to static table. + pub const fn get(&'static self) -> *const bindings::of_device_id { + self.0.as_ptr() + } +} + +// SAFETY: `DeviceIdTable` is only used in C side behind a *const pointer, and thus remains +// immutable and thus can be shared across execution context boundaries. +unsafe impl Sync for DeviceIdTable {} + +/// Declares a kernel module for Platform drivers. +/// +/// This creates a static [`struct platform_driver`] and registers it. It also creates an array of +/// [`struct of_device_id`] for matching the driver to devicetree device. +/// +/// [`struct platform_driver`]: srctree/include/linux/platform.h +/// [`struct of_device_id`]: srctree/include/linux/mod_devicetable.h +/// +/// # Examples +/// +/// ``` +/// # mod module_platform_driver_sample { +/// use kernel::c_str; +/// use kernel::platform::{self, DeviceId}; +/// use kernel::prelude::*; +/// +/// kernel::module_platform_driver! { +/// driver: PlatformSimple, +/// of_table: [DeviceId::new(c_str!("platform-simple"))], +/// name: "rust_sample_platform", +/// author: "Rust for Linux Contributors", +/// description: "Rust sample Platform driver", +/// license: "GPL", +/// } +/// +/// struct PlatformSimple; +/// +/// #[vtable] +/// impl platform::Driver for PlatformSimple { +/// const NAME: &'static CStr = c_str!("PlatformSimple"); +/// } +/// # } +/// ``` +/// +/// This expands to the following code: +/// +/// ```ignore +/// use kernel::c_str; +/// use kernel::platform::{self, DeviceId}; +/// use kernel::prelude::*; +/// +/// +/// struct Module { +/// _reg: $crate::platform::Registration, +/// } +/// +/// module! { +/// type: Module, +/// name: "rust_sample_platform", +/// author: "Rust for Linux Contributors", +/// description: "Rust sample Platform driver", +/// license: "GPL", +/// } +/// +/// const _: () = { +/// static OF_TABLE: $crate::platform::DeviceIdTable = $crate::platform::DeviceIdTable<2>([ +/// (DeviceId::new(c_str!("platform-simple"))).to_rawid(), +/// $crate::platform::DeviceId::ZERO, +/// ]); +/// static DRIVER: $crate::platform::DriverVTable = +/// $crate::platform::DriverVTable::new::(&OF_TABLE); +/// impl $crate::Module for Module { +/// fn init(module: &'static ThisModule) -> Result { +/// let reg = +/// $crate::platform::Registration::new( +/// ::core::pin::Pin::static_ref(&DRIVER), module); +/// Ok(Module { _reg: reg }) +/// } +/// } +/// } +/// +/// struct PlatformSimple; +/// +/// #[vtable] +/// impl platform::Driver for PlatformSimple { +/// const NAME: &'static CStr = c_str!("PlatformSimple"); +/// } +/// ``` +#[macro_export] +macro_rules! module_platform_driver { + (@replace_expr $_t:tt $sub:expr) => {$sub}; + + (@count_devices $($x:expr),*) => { + 0usize $(+ $crate::module_platform_driver!(@replace_expr $x 1usize))* + }; + + (driver: $driver:ident, of_table: [$($of_id:expr),+ $(,)?], $($f:tt)*) => { + struct Module { + _reg: $crate::platform::Registration, + } + + $crate::prelude::module! { + type: Module, + $($f)* + } + + const _: () = { + // SAFETY: C will not read off the end of this constant since the last element is zero. + static OF_TABLE: $crate::platform::DeviceIdTable< + {$crate::module_platform_driver!(@count_devices $($of_id),+) + 1} > = + $crate::platform::DeviceIdTable::new( + [$($of_id.to_rawid()),*, $crate::platform::DeviceId::ZERO]); + + static DRIVER: $crate::platform::DriverVTable = + $crate::platform::DriverVTable::new::< + $driver, {$crate::module_platform_driver!(@count_devices $($of_id),+) + 1} + >(&OF_TABLE); + + impl $crate::Module for Module { + fn init(module: &'static ThisModule) -> Result { + let reg = $crate::platform::Registration::new( + ::core::pin::Pin::static_ref(&DRIVER), module); + Ok(Module { _reg: reg }) + } + } + }; + }; +} From patchwork Wed Sep 11 14:27:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800691 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 7A7C6EE49B8 for ; Wed, 11 Sep 2024 14:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pHzBg2St8KC9MTBvt8ke8cxG8WKshDc3eLooksnIRmE=; b=rUU/dV8PxjGVZl3XtoVwKuVQHD ay2Flz3PJyn++D6K23tW4nGoqzV/jNlfsYBMPat3KZBpOVKWiTrSuitY8FEANp9BgBDc/8TyH0l1i BlfR32YjxOwgfjcA9ItvbediPeFzBj/Rk/CjqBMcY2OzRZNSm/jyE12S8aPTZ2idqw2rGTzmmRsOU Moz9VfKX/5h1WRtmNczWjP3ZoVqemM3Zu6RUWo9iJdnGA2v3r+8f8ULoG0f3R3upBwbtkdlpWhIFZ I7PMCdx4ig5aNsoXrscEGj+kRU94rxDr+Ib5n+p993ImZesFwLsURJDM/wcNujpxVPAgCOHTWifr/ hadm1Xhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOQn-00000009vwp-3506; Wed, 11 Sep 2024 14:34:53 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOKD-00000009tub-1ez4 for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:28:07 +0000 Received: by mail-pg1-x543.google.com with SMTP id 41be03b00d2f7-6bce380eb96so4178305a12.0 for ; Wed, 11 Sep 2024 07:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064884; x=1726669684; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pHzBg2St8KC9MTBvt8ke8cxG8WKshDc3eLooksnIRmE=; b=cGXTxVaEGe3cy3pqvelgRCcJEs1AMh/payGkWwxGq8JuQEMW7CyFmKG1YTbfxsMK3A U0U4euVgXYC7kpfZXRyO86VU5oWlYM46Y02Bj1+7ocovhmzDKEdWYu1Bg70fRxU/Q6Es azxkAXZ0LKgspAThQEDC3eU53vxGwTx+UmKieds2unc5oC+L7l5Xpv/hQcJE/K6vQ/Tj HgKq6SlrdAgLwGsTY5eB2aoClauyhZUt/md3NrlZfooI1Lpc7+jAf6g1zZBWq70WzJK1 9ecUtslTdnAxbRG9PrsSPNIh2IuO2WWt+I8szp01p41Xbe2uj48O4tUTdqh0C75pr0tz veqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064884; x=1726669684; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pHzBg2St8KC9MTBvt8ke8cxG8WKshDc3eLooksnIRmE=; b=eP15SCGMO1ZzWQosGnAiUPt3mYaVxyjJE0itd99h4oT/0bn/qZAdkMSxJjjSkgiuOr wSUrmgbOgjOlT9+FNISLvLPUbTOuLJjh6wx89DydS5qeAaZfHY/YYFQKlOLWIYhyMRKe 7z/SIP5H5yi/3UUtfDixhsKzxNjmDZ1uJMsVfHPawuKQOAX1tqGHs5a36qC2V+4q9zFo rFD90GuKqP6F1Ootg9forEIeSlug/sZWYcUhXHmeCa/pRG+TPhGWrM4qevEKUaPJrHWs SU3vA4awhRmCpkRDVoZTwU19bNs/Lgy5ntYkwqC/hqs0CQbhwu14BrmyL95V4Sp4LEb7 tnEw== X-Forwarded-Encrypted: i=1; AJvYcCV0TxtFrbVvz7oR6DsnMaazsDIL+tNS86ad1pS/xXxnRLMBx8G1R/AP/wnGIOQGVo3YAOFqLBnXOEODzoHhfrR3@lists.infradead.org X-Gm-Message-State: AOJu0Yw+tDKgmA/wFAqiNegwwLzZu8mLBYCtqkeqf8roqi2YVCrAM3+M dCE+SdbEe1qZiJZ1dfowJVGsOwk8eEitZDp2iQX8Dwf6Khcu8TJyK32OD0cLcBJS9FT+zzS0HU1 klvWu X-Google-Smtp-Source: AGHT+IHrUIfQbv5AN7Xe8j4SPuyNBG/fmpYAyLy0qzTADvtIG9r/hxpLBd4G7kq++lMyZOfVqXoYCw== X-Received: by 2002:a05:6a21:a24c:b0:1c6:a65f:299 with SMTP id adf61e73a8af0-1cf5e0b0f15mr6316863637.21.1726064884284; Wed, 11 Sep 2024 07:28:04 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:28:04 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:19 +0530 Subject: [PATCH 2/8] dt-bindings: connector: Add MikorBUS connector MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-2-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2947; i=ayush@beagleboard.org; h=from:subject:message-id; bh=bvB7UmeHkRb7yfH1nDvmOVlGFumWUUvfkn5d5HzsWdc=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajVf1aUzhSg3g8lMTcWQQvps+sHJjBBiD7Xs SrIX/+QkiiJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1QAKCRAFzvXHieVa dHEkD/kBcosApl+NDTha5IyXyoMZ2/VMJYYb9jHEMuIeh0sCz4/R99nJGGDh1QqObyzxtd5TjNZ sg7kEiloFxGZillTwOFtnKYZ0M+6+lMmKerv0eM0efboEmZ8AgGzlmRfsGQ3tWN80BWa1Lk35BI aS8JZ4PU2OG6/eSuWgP4Ma1Jc6YjWaGM++dXij1XvDv+WEQdBVrKW000lbVH0gWzzvdlZyzVV+I l9BbIpHSr+AThn5Ct78dRkKpqjpzMGfFI5JVfz17yhHQKv0JnTq7XkyC/Sdd1X9GIv3Ultsom9Q l3ESMf3rJl2Ys6f7xGy7VCXJbcZdjP1xKnwLNPCz7DrcuGZt76AzJra2Ji9JD8HCMzwcdL7Izsg vXKagN2tnyHM54Mjs815DpfzHGnQqRJ5c1+oU2kEbDbyH4mF9tAWoFYaTkUTU/hgOap8g1Rb2Uk i0H0HztxWVxUvpbEofXHGeee14TxETeS4fsJSgRV0P8GmsoLnAFmWI8KrDvIfMH7hnMlfdNv0pB yoM7SbVpDpbvkkC7Q3HaWThv9HSZX4klCgPk6RDanF+w/gFh6x9GrpKtBhascCz6Wcz6NbB8kAb KEKPAO77QpY6/XEQKCd3TK0S4jSDxsfrpgm/J2SnLebG3ASfy+pGcrb7CMVK6NNkjMTZDbrTp8P rEL5KP6r4Dc3g0g== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072805_491926_7B8868A2 X-CRM114-Status: GOOD ( 15.51 ) 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 DT bindings for mikroBUS interface. MikroBUS [0] is an open standard developed by MikroElektronika for connecting add-on boards to microcontrollers or microprocessors. MikroBUS connector node will optionally act as nexus nodes for routing GPIOs and PWM. For GPIOs, the following pin numbering should be followed: 0: PWM 1: INT 2: RX 3: TX 4: SCL 5: SDA 6: MOSI 7: MISO 8: SCK 9: CS 10: RST 11: AN For PWM, the PWM pin should be on channel 0. I am not quite sure how to deal with the nexus node properties (#gpio-cells, gpio-map, gpio-map-mask, gpio-map-pass-thru) since they seem to conflict with upstream gpio schema (gpio-controller is a dependency of #gpio-cells). [0]: https://www.mikroe.com/ Signed-off-by: Ayush Singh --- .../bindings/connector/mikrobus-connector.yaml | 40 ++++++++++++++++++++++ MAINTAINERS | 5 +++ 2 files changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/connector/mikrobus-connector.yaml b/Documentation/devicetree/bindings/connector/mikrobus-connector.yaml new file mode 100644 index 000000000000..603e4627076c --- /dev/null +++ b/Documentation/devicetree/bindings/connector/mikrobus-connector.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +# +# Copyright (c) Ayush Singh +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/connector/mikrobus-connector.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: mikroBUS add-on board socket + +maintainers: + - Ayush Singh + +properties: + compatible: + const: mikrobus-connector + +required: + - compatible + +additionalProperties: true + +examples: + - | + mikrobus_connector0: mikrobus-connector0 { + status = "okay"; + compatible = "mikrobus-connector"; + + #gpio-cells = <2>; + gpio-map = + <0 0 &main_gpio1 11 0>, <1 0 &main_gpio1 9 0>, + <2 0 &main_gpio1 24 0>, <3 0 &main_gpio1 25 0>, + <4 0 &main_gpio1 22 0>, <5 0 &main_gpio1 23 0>, + <6 0 &main_gpio1 7 0>, <7 0 &main_gpio1 8 0>, + <8 0 &main_gpio1 14 0>, <9 0 &main_gpio1 13 0>, + <10 0 &main_gpio1 12 0>, <11 0 &main_gpio1 10 0>; + gpio-map-mask = <0xf 0x0>; + gpio-map-pass-thru = <0x0 0x1>; + }; + diff --git a/MAINTAINERS b/MAINTAINERS index 0a3d9e17295a..0cc27446b18a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15429,6 +15429,11 @@ M: Oliver Neukum S: Maintained F: drivers/usb/image/microtek.* +MIKROBUS CONNECTOR +M: Ayush Singh +S: Maintained +F: Documentation/devicetree/bindings/connector/mikrobus-connector.yaml + MIKROTIK CRS3XX 98DX3236 BOARD SUPPORT M: Luka Kovacic M: Luka Perkov From patchwork Wed Sep 11 14:27:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800700 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 18BCDEE49BC for ; Wed, 11 Sep 2024 14:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oJxb1Dd/nqjN3jOGEzjCvMjgouASIZ/qDf2nqdmTCpQ=; b=as3SUGLNuqEDyZZNvPXEhXo7uO AV8nC+iMTl/7toKo6ZfAztT/G/6/09kFpre57qzH8CyieMHwmX5BeyADUmgMokPymu9abChjT+S3s O+LQv1vQhpx5UMv5v7vCsIw/K3/PinajRThMZ3aH1FKIdxh8LvXsknoUEtcML/EdjGIh7COyd7UpL n4+4TdkyiZ1/hOSJ10/UpXNEBl9hj3plo1RmxQqsOX20f/QlYpSGHm7pgXHLrPNgPETX4dLQqr5GB 4DvpNa4+ljrAoYq/BI5HhUKX+6gUQY7vbkc8iedmrqA+Cyk4hMpbN5KhnzG192i9kLJ2iVibJvg0G f2raCIHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOSu-00000009wmg-3ZM4; Wed, 11 Sep 2024 14:37:04 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOKN-00000009tyX-0aGo for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:28:16 +0000 Received: by mail-pg1-x543.google.com with SMTP id 41be03b00d2f7-7163489149eso5646591a12.1 for ; Wed, 11 Sep 2024 07:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064894; x=1726669694; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=oJxb1Dd/nqjN3jOGEzjCvMjgouASIZ/qDf2nqdmTCpQ=; b=zpI4zwdr0mqfrWG9I8craWijL0VPn6zY8vYKxFzFalsnklIuCTM2ReOTeqUHL4jb8g t8bnMw/RSH0pFamoz1zrFj2+zOteB7CS64GJnBjplqYJd4jzyMkhK12fWJcx8+6WvA6d IBAeAy1i0imXTU1d0WYlxyi9DXnZMbWmSyg5nn2xngyCReHiMwDoCT+agF6vKjEVwTf/ p9rg9aVo/cL9KjN81gxFxksb6bGQZZ3NgyiUinSvs5Lxx9lqObIESPT+45s+dVSzAde7 Aj/JYHpdf7wJLV3gVYDarq6/u2cxojzk/zQtKlda+n08XXfRYZcDUtGVlYQ+XKUyxp1p XWJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064894; x=1726669694; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oJxb1Dd/nqjN3jOGEzjCvMjgouASIZ/qDf2nqdmTCpQ=; b=IsMe1igJ4NF27JfTep008ucjIvaYYA+G9Jzb7Tg8g+O3TnW5sAgXEO7keNJRINWc/I yQKw1HABYF2IBjLJfj2tiIA31JiuWga4sCW74CPm+fgZt+QfkN6imHLWV7qsBeGCxrSe ODtgsNd1c902CYeokmpcmdu1v8xzOzxSCQedsUujqvKM+GT0Dx8hYt1lCxJOq4cIOvk8 zs3NizsECONKCdrX261hq0r0T3p4mamh1XhMTBabc8dD12kyiyc8/Sw6ZcdfuAvvFfeo BR7TaepfGRWmp69WYzQHHkIWghRXTQGZNs3w27yoQYbpqHwLKIIsKOeEVaHBMEj06f8F e98g== X-Forwarded-Encrypted: i=1; AJvYcCX8XI4jOTIHLyyCjOdQYTTE56LM4ekheL0p6o7jSg8B7GG2OFGDaRc+UMlAjqI5HnbLuMJQXjOfttMAkAZZPdRn@lists.infradead.org X-Gm-Message-State: AOJu0YzWtnD3ebAz8xEuBpmuxKYAxTbIAi+6rOLALfmp+9R/vb58HCV3 U7eKv+akG+NichkDM++ZBgKiT/nl+t88j2KovmbJ3tfiY6z5G2bxKDqD8NckCA== X-Google-Smtp-Source: AGHT+IHE/LplC/CkwydHVCAYEN6XSx/BzJK9oOj9hYZByiPJ0HRu5OTmb9W9Vhmyyzp/B1ZaF4eEjQ== X-Received: by 2002:a05:6a21:2d84:b0:1cf:506f:9d3a with SMTP id adf61e73a8af0-1cf5e1d0c8fmr6113767637.46.1726064893948; Wed, 11 Sep 2024 07:28:13 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:28:13 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:20 +0530 Subject: [PATCH 3/8] mikrobus: Add mikrobus driver MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-3-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3469; i=ayush@beagleboard.org; h=from:subject:message-id; bh=aIC1K2aHkAKySeXczfO9TX+qUogWDRqxMHBmhbZrBWs=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajWa7wjGCZ2pwHW97n8mcSyzAy8uGIDEWwCe PlMnb28cjuJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1gAKCRAFzvXHieVa dGtwD/wK0GDxUstHZk9/X3B2dO3mcSFAHK2I87pzLlM/z9OLe1Oh9Bvxa7pIm/b34irjEaCKPZB 0weGY8nzbMXoshz0VVrhsDP2cgDhQ2+jnn5bhrLdW5fSpjwmncQCiE6SY9UhC7+YSPotD0/Wgvu oe91TYvLZ7hBpbJceOOXCCnQI5bLGsuO1wVGXUmnXLdhfA/7/+Uaa7LG2uiHpziq2blWQLxgWpe NfNfzXIBZ6WxeyIG7es4PMSHV7cNxOeAqvI+N451kdxz4/0lXFQeTP6tuSxiL0GbFC/TUSFchas 3w7XuaEgSQebABxomUtx67jw9V3TRhg31f2Vwp2yr9SaGyL7dzhFQnpy78D0KNitbhicVlpCvxP 4OpAqS+KDs1+6McuHpMavxF1XIoctnOuBgUi4Vd0oIwhxMQkS6EOnbHuhNVo6Mul2A5LW47SVIt 3BC/4tbB/+pglWxsY9H5XkYmU4cAsFp3f5Wk7XbgQLUj0RrkOParX2gY3Yd8Bi/QlsH9lgKE9jr 7Iun31RsKGi/Fv6/yrUUZpIeGjUvzRVXkG0qqCEYpW3wqT5+VkVb6lF6XEhP3zyFxg/VGA995sP +byFalejshGQE4aYErw2Owqwah7UzhA0cTC0TOq9Pk5yK+uve4o2yqDNAdK9Eo30G60g968rdY4 sniJ3PiTe5qhtUg== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072815_227345_093ABAE9 X-CRM114-Status: GOOD ( 18.62 ) 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 A simple platform driver for now that does nothing. This is required because without a platform driver, the mikrobus_gpio0 nexus node cannot be used. In future, this driver will also allow for dynamic board detection using 1-wire eeprom in new mikrobus boards. Signed-off-by: Ayush Singh --- MAINTAINERS | 1 + drivers/misc/Kconfig | 17 +++++++++++++++++ drivers/misc/Makefile | 1 + drivers/misc/mikrobus.rs | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0cc27446b18a..d0c18bd7b558 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15433,6 +15433,7 @@ MIKROBUS CONNECTOR M: Ayush Singh S: Maintained F: Documentation/devicetree/bindings/connector/mikrobus-connector.yaml +F: drivers/misc/mikrobus.rs MIKROTIK CRS3XX 98DX3236 BOARD SUPPORT M: Luka Kovacic diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 3fe7e2a9bd29..30defb522e98 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -610,6 +610,23 @@ config MARVELL_CN10K_DPI To compile this driver as a module, choose M here: the module will be called mrvl_cn10k_dpi. +menuconfig MIKROBUS + tristate "Module for instantiating devices on mikroBUS ports" + help + This option enables the mikroBUS driver. mikroBUS is an add-on + board socket standard that offers maximum expandability with + the smallest number of pins. The mikroBUS driver instantiates + devices on a mikroBUS port described by identifying data present + in an add-on board resident EEPROM, more details on the mikroBUS + driver support and discussion can be found in this eLinux wiki : + elinux.org/Mikrobus + + + Say Y here to enable support for this driver. + + To compile this code as a module, chose M here: the module + will be called mikrobus.ko + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index a9f94525e181..86ea188e3cf9 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -72,3 +72,4 @@ obj-$(CONFIG_TPS6594_PFSM) += tps6594-pfsm.o obj-$(CONFIG_NSM) += nsm.o obj-$(CONFIG_MARVELL_CN10K_DPI) += mrvl_cn10k_dpi.o obj-y += keba/ +obj-$(CONFIG_MIKROBUS) += mikrobus.o diff --git a/drivers/misc/mikrobus.rs b/drivers/misc/mikrobus.rs new file mode 100644 index 000000000000..a52268efd71b --- /dev/null +++ b/drivers/misc/mikrobus.rs @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! MikroBUS driver + +use kernel::c_str; +use kernel::platform::{self, DeviceId}; +use kernel::prelude::*; + +kernel::module_platform_driver! { + driver: MikrobusDriver, + of_table: [DeviceId::new(c_str!("mikrobus-connector"))], + name: "mikrobus", + author: "Ayush Singh ", + description: "MikroBUS connector Driver", + license: "GPL", +} + +struct MikrobusDriver; + +#[vtable] +impl platform::Driver for MikrobusDriver { + const NAME: &'static CStr = c_str!("MikroBUS"); + + fn probe(_dev: &mut platform::Device) -> Result { + pr_debug!("Mikrobus Driver (probe)\n"); + Ok(()) + } + + fn remove(_dev: &mut platform::Device) { + pr_debug!("Mikrobus Driver (remove)\n"); + } +} From patchwork Wed Sep 11 14:27:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800701 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 E4BDBEE49BD for ; Wed, 11 Sep 2024 14:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A/s/yZ/fu2RctQDsUCSBTBJSbx0ktmemPNhPcRZ3o84=; b=3Yc90CcvvGaaSXcjXip8qwErZM Yb858jtG+03frzBTipqE9agmMoz0Sg0K4y7aNU3cgqoodt3/6S5/SZJNO0vem+3U5Lf7jhUNWIDYB +00asVu9XKxPeaJtUYXgdwd33EcvZiPLHEhEQ8HYwqQXLToVVF39GZDkTLpruqzG/lvNBWi/qZLEX 4IBgnMcXH5n1lz8zSgGzTtEu/bru1dRLkMCUKsHAyxkf9t30Zf5gr5J6oFYfAoim/p5IOgvDmdsR/ yjwPuZE777Jtt0CtREmqmvI3JTut8yEMmtAesnLhgXFQOZvILsJ7XoZbgEVx9/sc7mTrjnxHighfm yR7fR4wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOTy-00000009xm8-0joC; Wed, 11 Sep 2024 14:38:10 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOKW-00000009u2w-4B2b for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:28:27 +0000 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-7d4fa972cbeso5570023a12.2 for ; Wed, 11 Sep 2024 07:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064904; x=1726669704; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=A/s/yZ/fu2RctQDsUCSBTBJSbx0ktmemPNhPcRZ3o84=; b=WpZ7vUbkA1/hwXeKA5IFt3QOpoxqLJNDvGsahkQoSL2bUUcVTpLFIJ66VsEbwh4KvO jlyyx3C8geurVwBVFZSJGHis5+UD7AgVOhaJq9NTDBv/aswoRcq7yB/yzWz52xJjAbGz TGSAet3DhPxUk1/p/jcaWFH3HKxVOHmmdoCmt2kqBxU0J7ZC1skFZdSpN5+N0VFmvNIk kImRkh4jhPrc22rHvuOv9P5REmVBdzbsIZYJbXlIjnKTC5jvhfVqFIgpeRmgz3Y47sue JWlTRniS4N5h+zpshZc2KdMv5DyKn3rm4UiWO0bHcz2nyyyh+K0uifuTxWgNBePa4ZUX sj7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064904; x=1726669704; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A/s/yZ/fu2RctQDsUCSBTBJSbx0ktmemPNhPcRZ3o84=; b=NYrWZDDQRo/1AwIUIKj17JHF4R5Vgw17AD6pcoifmsKVSCiZOaRq5NUJP8i8OI/Bap 5xr/Zg/1Egw90zgRFsfSLPioXoWwcpkH7+qsaCpx+exAe+0It0cR92OopeeOOXLkFAp4 ZO4y5cHgkJLlF4zBToIOqa3tSRZhz8EoMVVH6sO9tLPKlH19SQaAPuOf1Cs/z5/Rf2jA bhLpzXe1sA+aySAZfcusYTaqrEkZywQmzwQH2UINQHJpRi1Zh8JOa/jowHGvhZCfgaGg r7+hZzb1Pate1UtVzWN8FBOQ69SdchVj4DXTDjtDHwMadTmBYaGVVaeuGO5I44AasSuo IDHQ== X-Forwarded-Encrypted: i=1; AJvYcCW8pdvTPNKXxac2YNSSz+LlEgWPHBZ1PwtuPVmoG24fkc1Z2cdLHIHPDCh+SRZ429iA/jNv1BXj4cnilzYP5h0h@lists.infradead.org X-Gm-Message-State: AOJu0Yy05vB/IgPv9lwx11hoid+oQZ2yhdc/NFLdj6WeEojOnYJZJbMq 0dJWxdvsII9vfSrugxCtG7Rz7dSXsgxCcTVc6v5uIqFZQynatmDr5ZCmH/+MEw== X-Google-Smtp-Source: AGHT+IHqbcVmiVTlA06ObWdR+F5XvbTWf7muQ3N8Ww5HkEnHAHU/xiG/nzHYw5l3NU9MDeCyRLMFog== X-Received: by 2002:a05:6a21:392:b0:1cf:5b31:313a with SMTP id adf61e73a8af0-1cf5e0307abmr6964576637.1.1726064903886; Wed, 11 Sep 2024 07:28:23 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:28:23 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:21 +0530 Subject: [PATCH 4/8] dts: ti: k3-am625-beagleplay: Enable mikroBUS connector MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-4-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3276; i=ayush@beagleboard.org; h=from:subject:message-id; bh=HWiHF2WJQe2aKVEi4bYz2zUblPTZngMcMUJTSZsaE0Q=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajWkpgjyK7LlSpg2LopLy7iLx8obVKJNlLKZ dqK5lpf5bCJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1gAKCRAFzvXHieVa dArQD/0cse1NKul+tL5kOruOFAWZtNGBnbuu+u6HIMhf3idPcHz4n+624u4dth5lMwH+LVbonM9 MKxD0IofozpkpcwyrQc4DZmNfBChTUC+jZnLLX/x2o7exEzKztzjdRQjsgZ4IyRcQWjQgPs2NSY zCKDpadPvWuglY0yebGCXcbnKOw7K8wA2wdYRkCW+NpD9CVakgLJM/NUg05GEpf7or5Ib7iUyf5 KCO+F68jDmUydpfuHgBV1+KfQFWITIHGIXjZcFTGvbA9jUDZ5A7m+kGian3NjLe26nydRlEVz1t pRwNNiS2ntjL5KkUsEYixV0njFr+Fw//KUifbsahi+pqTd4lekZUgJd9P9zep1oWJuDJwERr+zJ 5iSMCIPd0JE/eW95LMlv3FFxuKae+ve4E2yvNQnV9i0MJNWCzrZ8fmXjRxDyImBN8xPo2SvUNzi bIEhmNg45+aepELQJlpPFV91NebGxPhRDmJLyYL/OqtqHySSIC7RWuToNfwQgr51YtwIyooPi8e 4ZLXaoTyc6OLH0qExlcQtKV4i7CdchkszcBpe2vLSHksT80h+kqYQFNoEvbMFzL1WMcK5Q52XQs uM/dUEsgIojcEUmRYvxV2xDd43+qrG3coLEITTl8zM3Xrcx5lMqijI5WU/God4DqY4Oy6t7mfkw fZS+H0hdlS2SjJg== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072825_313992_05C7C8FD X-CRM114-Status: GOOD ( 13.22 ) 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. Acts as a nexus node for gpios. Allows defining GPIOS relative to the connector. The pin numbering is as follows: 0: PWM 1: INT 2: RX 3: TX 4: SCL 5: SDA 6: MOSI 7: MISO 8: SCK 9: CS 10: RST 11: AN Signed-off-by: Ayush Singh --- arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 53 +++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts index 70de288d728e..628bcfcc4651 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts @@ -227,6 +227,21 @@ simple-audio-card,codec { }; }; + mikrobus_connector0: mikrobus-connector0 { + status = "disabled"; + compatible = "mikrobus-connector"; + + #gpio-cells = <2>; + gpio-map = + <0 0 &main_gpio1 11 0>, <1 0 &main_gpio1 9 0>, + <2 0 &main_gpio1 24 0>, <3 0 &main_gpio1 25 0>, + <4 0 &main_gpio1 22 0>, <5 0 &main_gpio1 23 0>, + <6 0 &main_gpio1 7 0>, <7 0 &main_gpio1 8 0>, + <8 0 &main_gpio1 14 0>, <9 0 &main_gpio1 13 0>, + <10 0 &main_gpio1 12 0>, <11 0 &main_gpio1 10 0>; + gpio-map-mask = <0xf 0x0>; + gpio-map-pass-thru = <0x0 0x1>; + }; }; &main_pmx0 { @@ -394,6 +409,25 @@ 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_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_uart_pins_default: mikrobus-uart-default-pins { pinctrl-single,pins = < AM62X_IOPAD(0x01d8, PIN_INPUT, 1) /* (C15) MCAN0_TX.UART5_RXD */ @@ -401,6 +435,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 */ @@ -804,10 +845,8 @@ it66121_out: endpoint { }; &main_i2c3 { - pinctrl-names = "default"; - pinctrl-0 = <&mikrobus_i2c_pins_default>; clock-frequency = <400000>; - status = "okay"; + status = "disabled"; }; &main_spi2 { @@ -876,9 +915,7 @@ &main_uart1 { }; &main_uart5 { - pinctrl-names = "default"; - pinctrl-0 = <&mikrobus_uart_pins_default>; - status = "okay"; + status = "disabled"; }; &main_uart6 { @@ -925,3 +962,7 @@ &mcasp1 { 0 0 0 0 >; }; + +&ecap2 { + status = "okay"; +}; From patchwork Wed Sep 11 14:27:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800702 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 46D17EE49BD for ; Wed, 11 Sep 2024 14:39:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JlMR806TYOVdOaLq5xGwhlKGdGKzP0R1k8RJuGsmWvQ=; b=jUEzYTIkALQLRYrxPxDjVlk017 PIAaDDw8TCLeF0vIEYg63Njd5uxVn7fW6Qj3bSN0odhV4Nq7+K9JpNG/wMQIru1D/ay0HTseumw25 OoU/iL5lBBsSyan02F70tEnRZi1nbxalXgwlcSks2Nosz1CiSJ9Og3swPCkZFPdOQYN8wTYJEASjK J6E1ooiTfe/paDSsguMW5reOFcGK0Hhcc0nGc+B2bJNJYEpCiyppNHUfHhKzqq8iQb0pXggKtI3rZ tRCRJGLRvPvqCJUni3HU8w8t9zgo7d+1kgo3yPKaKcH7WyEcdTooceYJA8TQKPloCuras7nQgndUX TvhSl8ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOUz-00000009y84-3YLd; Wed, 11 Sep 2024 14:39:13 +0000 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOKg-00000009u5x-0Yxu for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:28:35 +0000 Received: by mail-pj1-x1042.google.com with SMTP id 98e67ed59e1d1-2d8b96c18f0so5377957a91.2 for ; Wed, 11 Sep 2024 07:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064913; x=1726669713; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JlMR806TYOVdOaLq5xGwhlKGdGKzP0R1k8RJuGsmWvQ=; b=VRwxJjYQWgFjcYiCm89KX1bcyQTsc5N4dFiqfeymefTxGM8aSUUfJLYVaxmCtObnif UKBa5QNiTY65N8z/EV9Lhb9mGosJDHEroT6+z7T89OssqdjXZi+Z1EI5I2JJxdGGMWvR ySAWgSvj7vLfSLBbmOeTv+W9ORqqd5SLWg9Gc4tlj3ZtFeUE9zMbN0uXZUAWQcUB6rGX qgfFyrAYqFhufGfCts5zPwfIGnai/stCtQue9W2EPPFgZ6IVeroQtBu6srmxMIMks10G dbCxtxCHZ7lkyZ1Q9b/JWvwa+2LsaKcjgJdHc4+q44ctAw2o28RQCgzNdu6QgOVBiqx+ BSpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064913; x=1726669713; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JlMR806TYOVdOaLq5xGwhlKGdGKzP0R1k8RJuGsmWvQ=; b=qPMJcro6VDjIy4rdxonh1QpEn7gdJyfLkMoxypbrrPt8ZWV6QOmyVF2pChKHaM1lR5 I5Ls60Z8En/PY0vgVZB8n74B2rP+wao7GO6Ubff0hBJB1QzuuyRsJzETEaVm/KoG+wWF HzhsxsF/vXMz8WpalIAVc9eYfmQQtRuqBcbMQaUDieNAYOuHf23uaQefd8Vl06MPFLD7 EN7cTfSCVy/QwzSl8fwq0QXvEbLg5c+AfhKJ8qEOJyJGuisM9vr1mx+ToODnlMpnNNEk Ia14kYSvN5u36Fo4sohquOyhJl+J3SOG9pgf4qlatlkFdDVZK2TiOEPnFHWExjLT9d53 A6Tw== X-Forwarded-Encrypted: i=1; AJvYcCV8Ys4+jiuBX06oq3nT8tjWPUGkxCx4SvO6o6woZJ2vmpGTJDxZN7PRdUH6cmOnrGY6Ggum7KPwybkBRNUbZeY+@lists.infradead.org X-Gm-Message-State: AOJu0Yw965VyOcSyKlw7agmewpPLSn3314wVYlYgDkHJaxUex0lee5ah Seletyji12cIjNZpvZ8AFgn7pYLK38iu6vgaWx+myJUqA4tDdhXDuO+vBuoqjg== X-Google-Smtp-Source: AGHT+IHRrdqyQFRaRmsKjM6oktmwEYz8v7brNVgKFqMiIsYA0fFkZWGIxkp8KhBcAVk9BeIUsCTqIw== X-Received: by 2002:a17:90a:8a15:b0:2d8:99c4:3cd9 with SMTP id 98e67ed59e1d1-2dad4de1392mr20249725a91.3.1726064913104; Wed, 11 Sep 2024 07:28:33 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:28:32 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:22 +0530 Subject: [PATCH 5/8] dts: ti: beagleplay: Add mikrobus connector symbols MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-5-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3949; i=ayush@beagleboard.org; h=from:subject:message-id; bh=IcBXeYkgbGJ84tFNH0R4kvTUzdaSViwAKRjIOvyTAgE=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajWghgpKd00BK2WrYHEfO2v34WYsJS/sPbi3 Ri3U7ObHMGJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1gAKCRAFzvXHieVa dIdcD/4stLzHpCelSOc5jWiixqKiBrSIgY7aRw86NzyMO2AxyJUyY00HFjV8qPobGSydzuu24lW kUYGiYHiTLliPqp4yWG2+OrxVOA4NshkkMDZ3spo65xWAkzisKaD4PlGK/AsyFiBVF68VwKbCHt B9DukvzmiV5v5iGrZfrWgNLWuUFfexKp4m2PoBVxZLp2KTEF8xSbkyih/X5hNFkgHMritjVHpjo CDP12rRdn7Qu0JcRNRAxQtywDTQSbUU0TrHllh/C00M9Pxc8tCNRsHGpu7uTfwWkOYpAie/kQMX TqUVTk9Cbcp52BqzNGKZFZeU5l9FLTM3bf0PAqGtq6XzA/rnPbyGorUfUX92bagqz81TnilSLil zh8f04hJlO755Nm1H5OyJd5DEfVv+M5Y3hqDz7DzC27WD3GWHWd+JoPqOz8/fM6goS/b/GqLEV1 euVT7nF5iQqmd8hc8fFxWTjfRCpwPOp3W6zaryE67FMESzrOBOTRMYMVWLMdD7rneobzFOcJ90I 3v+Mk7cdxbDbfokJ5VEfiH/9HjL8cOSQgWDeBC1fdlKKPftFR2q4QWNPhMXLq5KkKJEJW4XC0q8 G895xHNXsA3yI7mGnLAD7uesXYMrQJlA3KStcRO3KhTfFXXgSH5J6IskouY7ncg8mtPN30rxPzG AYsAQ2R/6InpZ7A== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072834_214331_33655BCC X-CRM114-Status: GOOD ( 14.91 ) 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 - I2C, UART, PWM symbols - MIKROBUS_GPIO defines a gpio-controller that defines the pins in the following order: 0: PWM 1: INT 2: RX 3: TX 4: SCL 5: SDA 6: MOSI 7: MISO 8: SCK 9: CS 10: RST 11: AN - PWM should always use channel 0. Use nexus node for routing Signed-off-by: Ayush Singh --- MAINTAINERS | 1 + arch/arm64/boot/dts/ti/Makefile | 1 + .../k3-am625-beagleplay-mikrobus-connector0.dtso | 49 ++++++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d0c18bd7b558..95f228c85a40 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15432,6 +15432,7 @@ F: drivers/usb/image/microtek.* MIKROBUS CONNECTOR M: Ayush Singh S: Maintained +F: arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso F: Documentation/devicetree/bindings/connector/mikrobus-connector.yaml F: drivers/misc/mikrobus.rs diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index bcd392c3206e..c628954a357b 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-ov5640.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-tevi-ov5640.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-mikrobus-connector0.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am625-phyboard-lyra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-dahlia.dtb diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso new file mode 100644 index 000000000000..81d370249f64 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/** + * MikroBUS Overlay for BeaglePlay MikroBUS Connector 0 + * + * Copyright (C) 2024 Ayush Singh + */ + +/dts-v1/; +/plugin/; + +&{/} { + __symbols__ { + MIKROBUS_CONNECTOR = "/mikrobus-connector0"; + + /* GPIO controller for all pins */ + MIKROBUS_ALL_GPIO = "/mikrobus-connector0"; + + /* MikroBUS connector 0 SCL Pin options */ + MIKROBUS_SCL_MUX_I2C_SCL = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-default-pins"; + MIKROBUS_SCL_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-gpio-pins"; + + /* MikroBUS connector 0 SDA Pin options */ + MIKROBUS_SDA_MUX_I2C_SDA = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-default-pins"; + MIKROBUS_SDA_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-gpio-pins"; + + /* MikroBUS connector 0 UART_TX Pin options */ + MIKROBUS_TX_MUX_UART_TX = "/bus@f0000/pinctrl@f4000/mikrobus-uart-default-pins"; + MIKROBUS_TX_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-uart-gpio-pins"; + + /* MikroBUS connector 0 UART_RX Pin options */ + MIKROBUS_RX_MUX_UART_RX = "/bus@f0000/pinctrl@f4000/mikrobus-uart-default-pins"; + MIKROBUS_RX_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-uart-gpio-pins"; + + /* MikroBUS connector 0 PWM Pin options */ + MIKROBUS_PWM_MUX_PWM = "/bus@f0000/pinctrl@f4000/mikrobus-pwm-default-pins"; + MIKROBUS_PWM_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-pwm-gpio-pins"; + + /* MikroBUS connector 0 uses main_i2c3 for I2C on BeaglePlay */ + MIKROBUS_SCL_I2C = "/bus@f0000/i2c@20030000"; + MIKROBUS_SDA_I2C = "/bus@f0000/i2c@20030000"; + + /* MikroBUS connector 0 uses main_uart5 for UART on BeaglePlay */ + MIKROBUS_TX_UART = "/bus@f0000/serial@2850000"; + MIKROBUS_RX_UART = "/bus@f0000/serial@2850000"; + + /* MikroBUS connector 0 uses ecap2 for PWM on BeaglePlay */ + MIKROBUS_PWM_PWM = "/bus@f0000/pwm@23120000"; + }; +}; From patchwork Wed Sep 11 14:27:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800703 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 BAD20EE49BD for ; Wed, 11 Sep 2024 14:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OTZXIs4uk1Xc7bmq3sRcTypL0+dX/QazKSXr67dxE0M=; b=r9JhHVCkMrzfotohlievhCDooF Ne5hliQICCsmP6almvGRi7/5y/n67eMX6pei4atVGKTRXye0+CwB341QjDpQT70ll2wextXFZ28gk KVuiLd8Nm+K0lrrEJY4C7QvBaVvJCQinYXtGGQ5QaTBnT+qqw6ST0wH21vZI8lY6TvCXBH0BdVZkG WQFqo0x7C7y8MhGIezTBpolNp/XW3fj2Qx9oRtiU5aRnLleGYQrUSnBzsidMZc3rLVLsnNZ/sPZsi BiQ6+VmTJcodkXK5iExdJ1rdUMOO5y1wh6b/tX7EhBAMI+0MnCULb5N70M1Ki1aGJPP40WLqXN09c 3/6ffzAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOW1-00000009yQv-2jmw; Wed, 11 Sep 2024 14:40:17 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOKp-00000009u90-2iiv for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:28:44 +0000 Received: by mail-pj1-x1041.google.com with SMTP id 98e67ed59e1d1-2da4ea973bdso1550445a91.1 for ; Wed, 11 Sep 2024 07:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064923; x=1726669723; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=OTZXIs4uk1Xc7bmq3sRcTypL0+dX/QazKSXr67dxE0M=; b=JHppsCF/NNLJdtJJoSjDKBg8AspE8v71SO09L6Doce+6Mj7K1kE+5aQAsBq4EBeuav YNmRBALOvNKtzV2NPGLNLvTgJfYddRx5cmUcpsHT69Gat5a9wBKPmsERTwmn51J+QGEN uQhSBROFVQKrL8bW5RjqV/VPyMNBjo9cgGcZfCGQG0kUmDhq3qdchBeX+pRDl3XivgQW Ylw8KhYzJvVDkqLJ61Qu0+bgQxuWYdd6ykBDlputvBHF/5kssn5mrWmbiEXngi1h/PFU r+yufwWQGHzIt8ZPsYNzCXl/bDzrG4Ie2Eo/bnBYhBkxnOmiZp7UfkyFrKHXanCD9UBI A78Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064923; x=1726669723; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OTZXIs4uk1Xc7bmq3sRcTypL0+dX/QazKSXr67dxE0M=; b=ltP9Nyl1z5JYC1kbGfwCU6XLIBmDxnYlSYVr4sh+qpG+7u+iQZ7tkJd7lSzgR5jrM0 h5mzEUT2r1ylG1KvUmBEDdQVR/nBThN8+KCeLNsm1ewWPRzSHGmSY4FuFTl+h/PKiWvq f9W5mCJ9vcvLGOyGO50YKmFVdgxn9SskcMzNL4C01SDbwbjXUFoBQV9z0+PzoZT78sMA 4c79C78jqi8vyiGwT55c5NTmEbMov83PBGV7RnHqIZ6dIVODCiSjAzdyhmGBiZCVNX/0 VD+RbnodaVefm3EO/PbKIzlXe6SL8ywVuHtch9iTu2Wy06rll0iJAPd7QOkq7UKrsp/E 7ZiA== X-Forwarded-Encrypted: i=1; AJvYcCXEm3SnFU6CiYn2wHL3xFqhIQLXWHaB5UMwwMVrhK19BxMSWJKj60djYT7Fj/F/uGT+wjh6N0gZLJyK/3d6+UKs@lists.infradead.org X-Gm-Message-State: AOJu0YysWLdItnrYDzdtIXcHYbZGiVJbSLIHNwCpoVbouYAYRr5iHAyD GbbGKDU1LdHQdwPpGcn9EfDFaQRHMAdnT/rkb4o7962+/bcLR9MdGk8M/kxy3Q== X-Google-Smtp-Source: AGHT+IF++BogjcP4oyy+DBrKCYr5bb8gz+HUGRerT0bhZx+7Lc/6JJaHgIpOtNWMJNsPpzmw/R8LWA== X-Received: by 2002:a17:90b:1e4c:b0:2d8:d098:4f31 with SMTP id 98e67ed59e1d1-2db82fe9fd4mr3821301a91.17.1726064922953; Wed, 11 Sep 2024 07:28:42 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:28:42 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:23 +0530 Subject: [PATCH 6/8] addon_boards: Add addon_boards plumbing MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-6-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2645; i=ayush@beagleboard.org; h=from:subject:message-id; bh=fvn5dpE2XyvTj0U03uUcIoDMSvkgRzCWJgdVKHBGt+M=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajW3lj4TagmQ2l11Yz9eXm8I+My2lBntIytD qsFIZFBHp+JAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1gAKCRAFzvXHieVa dD7hD/9Dh5cX/zgWb0ImhB3R//a2DVBC9/xamAtVS4AbOSg5czQb4pQ71uEpoYwkMLI/76nQAwo IznhuYiB1NivpVD/r6xayr9afiar7AoVfMGwXxOL4qdxx1UvWeuhMu7RE1rW8su3VtxVqN162fS c0em/ySb2wnxpKh0Ku7yyDfZwk7tuQ0XIBA0ysPbyEuKZxXxcCmdVdITr5WPXhsuUmY88ISzjkX CZejxuAMldlcHCYX2MBKgHPJhsjMX5CCAYKjANMIhsRyYCC1FQRva3ZkzKJmt7Eo050MW7DEfgP 21m/nGriy3Ps0ru8+AQlcx+zcfytxjVyPRcS5Fn4Tk+6h94CdDEHG4ug6+enMWWYe4t7fCuZeqA 2NodmWtzcivV1QShnpfXjXUL8YgEvUjiDEm9qHRwar0hno3NQp2GjTZYha96Q2uFJPeRbOwnLv7 ze5KWxyoWD6kN9+kKnNWbrIQusdm1f8moFEEt7NGLd6VjqytwYf4yQgCuEcMiQqX33zxgfB54Ve YX4UelJTyCRCLp2C5uNWDyermCLf4HN0GgJgZayTIedZjWsqEBfYd8qg4SynbR+G8JkKasqS0N7 Cuf09oC6oJNSL/HoG0XHANtLJfpu24X2RxKwgIccIhYtel+ME1FZO1/mB5L3iKh/W32xgVXm96V I1eRlTEYdHwR6RA== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072843_727404_971A5C84 X-CRM114-Status: GOOD ( 15.56 ) 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 A directory to store and build addon_board overlays like mikroBUS, Groove, etc. The overlays present here should be completely independent of the underlying connector. Signed-off-by: Ayush Singh --- Kbuild | 1 + Kconfig | 2 ++ MAINTAINERS | 1 + addon_boards/Kconfig | 16 ++++++++++++++++ addon_boards/Makefile | 3 +++ addon_boards/mikrobus/Makefile | 1 + 6 files changed, 24 insertions(+) diff --git a/Kbuild b/Kbuild index 464b34a08f51..9c897397f55f 100644 --- a/Kbuild +++ b/Kbuild @@ -97,3 +97,4 @@ obj-$(CONFIG_SAMPLES) += samples/ obj-$(CONFIG_NET) += net/ obj-y += virt/ obj-y += $(ARCH_DRIVERS) +obj-y += addon_boards/ diff --git a/Kconfig b/Kconfig index 745bc773f567..49880d4e91e9 100644 --- a/Kconfig +++ b/Kconfig @@ -30,3 +30,5 @@ source "lib/Kconfig" source "lib/Kconfig.debug" source "Documentation/Kconfig" + +source "addon_boards/Kconfig" diff --git a/MAINTAINERS b/MAINTAINERS index 95f228c85a40..8e2e0f8d16be 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15432,6 +15432,7 @@ F: drivers/usb/image/microtek.* MIKROBUS CONNECTOR M: Ayush Singh S: Maintained +F: addon_boards/mikrobus/*.dtso F: arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso F: Documentation/devicetree/bindings/connector/mikrobus-connector.yaml F: drivers/misc/mikrobus.rs diff --git a/addon_boards/Kconfig b/addon_boards/Kconfig new file mode 100644 index 000000000000..01766ab28848 --- /dev/null +++ b/addon_boards/Kconfig @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0 + +menu "Addon Board Overlays" + +config MIKROBUS_BOARD_OVERLAYS + bool "mikroBUS board overlays" + depends on OF_OVERLAY + depends on MIKROBUS + help + This option enables the mikroBUS addon board overlays. mikroBUS is an + add-on board socket standard that offers maximum expandability with + the smallest number of pins. + + Say Y here to enable overlays for MikroBUS addon boards. + +endmenu diff --git a/addon_boards/Makefile b/addon_boards/Makefile new file mode 100644 index 000000000000..38275c3ff4c1 --- /dev/null +++ b/addon_boards/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +subdir-$(CONFIG_MIKROBUS_BOARD_OVERLAYS) += mikrobus diff --git a/addon_boards/mikrobus/Makefile b/addon_boards/mikrobus/Makefile new file mode 100644 index 000000000000..f66554cd5c45 --- /dev/null +++ b/addon_boards/mikrobus/Makefile @@ -0,0 +1 @@ +# SPDX-License-Identifier: GPL-2.0 From patchwork Wed Sep 11 14:27:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800704 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 D6360EE49BD for ; Wed, 11 Sep 2024 14:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bUJux209baesVSAFFfQq0X1RKUEyIgNPRXttfQkrVp4=; b=c/vEDzXs7AovBCCDhDaeBnbmk5 739SJUTSVA+SFT2T0Z2VIg8QVkDoslhzFd1suTAzQOgtaVkz2CyWh1IAHvPaEjoJsgOAFDo5iZmCW 8IECLWgXsoErb/KijHb1WkY8PZiEchuXxh6Kd+OWRZChvZ3I70EgYQgxtajLtxHi5Nzb0DIoeRTTr ocPQRVuIUHhMzg8BxJ5TbLkcHB9RzMoLu/SNFYdY1fJdmyYtgAF13DEI/SEf8G1y5j+Zgqq4STP+w OoRp4NDGsbBPFERIN7qOEXUUK7om/0Yman1N1jYBv1mLb3wa7GISN3MsxJO3btPTT+JStZLI6BORe uo1maOgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOX3-00000009yfe-0m4D; Wed, 11 Sep 2024 14:41:21 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOKz-00000009uD6-1BRm for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:28:54 +0000 Received: by mail-pj1-x1044.google.com with SMTP id 98e67ed59e1d1-2d8b68bddeaso5002098a91.1 for ; Wed, 11 Sep 2024 07:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064932; x=1726669732; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=bUJux209baesVSAFFfQq0X1RKUEyIgNPRXttfQkrVp4=; b=mgHCTuH1jcapA43pKX455bRnXtGgKxi/cASSqKChRH3AQmcon3cgg1+Tg3y7sQLyWt fOmo2BZIczQZerFItJWf58EMSk230DSiINrcBDsRQDSI+Ljb5+wtyuhgIYoMj8zgzDgI rD5TPWACzhv4a5b35lg1T53KNExQZoBGs5UM7uFdy5chVTaSb7fhgBuwZMrLfPOPWkIL eiNJkYngfIXPOsNWqALNcEMxer0ljE+elcvjUKd3BDp7T0O+/PfXKkgiFDylqtN7g0cN SuT5v3C5688mkPhslD6WwXzTpv7W+3VEJvPcRVr1IBu/02AC7IsxnZz8lb7lOo3fqqh0 LzWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064932; x=1726669732; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bUJux209baesVSAFFfQq0X1RKUEyIgNPRXttfQkrVp4=; b=r1rCnRuQK7H4XeHIQYbyWIQJx7oZiwPHp/wzhkivBkcrLrVbfcF7CKNlLvoG7XfzQe h/f2EbpZcCEbfitx7W7+iu2Z2MePtaRe8osIDHn4XuFgdM43SPlol3cW8AyRgVilG+Fm K8Av0t4BG39bWSErVsFbS68AGhP77OWt0yeHZduOZa7W6Ncm8vFGURAnAR61sLVL0SJi 3qT37oejl1Qt/fGoN8uy+klXjOX+3zMH9heySTe3HNOLUuH/gd6DGHCpEV+Snpty6vXs 7omEpNzLF/ystHLKCZ/iffKzeK1pKl7uLioDfvZerUN3K8JJ1I3dXZewrmE0xiHfLCjq AM5w== X-Forwarded-Encrypted: i=1; AJvYcCV3p5Qw2QhQxRKWt/FeDCVGNg5EVhzphOzhrG8vCu3LIzBMlNI2NRgz0L1X0/5qIniQmc/RcqY+1uR/9P23e+5W@lists.infradead.org X-Gm-Message-State: AOJu0YyWMfcQ5LKA6HahH06jYxUIBKkwO/WBYfntw43RDYsgsSltIu30 phax5AwB5DUPNC44u2ZMhNzBjO8fSiLmp9BN3/SZg0+WYANDPOU3/4LWtDer9Q== X-Google-Smtp-Source: AGHT+IFVqR77ZETMOL3Ycph5fasQwi8N19Yt6tsRUByhDMgLOhcuLftvCvaT9AZPOu3f6sAF/CSzHQ== X-Received: by 2002:a17:90a:ee91:b0:2d8:7182:8704 with SMTP id 98e67ed59e1d1-2dad50cb7e9mr19402868a91.31.1726064932543; Wed, 11 Sep 2024 07:28:52 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:28:52 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:24 +0530 Subject: [PATCH 7/8] addon_boards: mikrobus: Add Weather Click MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-7-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1489; i=ayush@beagleboard.org; h=from:subject:message-id; bh=6ykOJfpeTHedYDARjIqLwnX8MngyM5nQD4/lHx8a04o=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajWFp0VSRIR7zV/zdAtrA/0zb8cZC/VMz1D0 h+qmzLqTbSJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1gAKCRAFzvXHieVa dHc+EADEx6fwsxyM8cZ/VtliN6O/gG4ACga6aqpNaebLkblrTWKjIQogsAXkI6nxDlnn7AjYw4R cSTPGP+e2cK+Lv7lkIEK43rZVjkUOlk5UM4cBNm6bX7MtX2JurOi8piKbuu0Nw84H85RwheosaU OS+PP1wSvk4idx7eFwY8Jot5gBEhpdJTNbpnrtQpRUb2z/j7MDa6Z7sVv5uiCPjvZolD9BUXhp/ mnWagHJGD1nYN9pQRARaZ2orDnEJmuXKgMahZLZec64kSfir9cVj2WbkEMdhgChs4Ii6syY3XdX KYcGu8jIhmeKtURXqIt8iI0sPggjGpwRdmXLAfW1O95wNYwITRmwZBA5oTMgrobnaJ1GXiNFg16 9SHsQEEqerVxJ1z2A7mvVDbBR/F6ewD37goj/kqn90Rx0tSF75nGzYY+9X9TBue6nn/O/GnYRQw xb4Iaat/s4YFTcEKSAkvN2o5bdy/AZkHnkF2AfvVFfpVbJPV0hKRmzPtms4J+I/F08c/yoVdxP1 besqOz7JBuWVAhwxEBZKi9iy2RgJSuSGwntPKsd7Ve1t/VI3cQ07DEMMFi8FbL8GTLvVmlggbXP wKXrDc8Xm9L8fq7EuABI7Ddk39zEowS9RBeKzUJvERkw3E49oUo5eGksxwXmh7SFOy26WvTHeqS QJ7SBrMKwv1vQjw== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072853_371288_E1A9C0C8 X-CRM114-Status: GOOD ( 12.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 An I2C MikroBUS addon board containing BME280 sensor. The same board also optionally supports SPI. Hence the i2c suffix. Link: https://www.mikroe.com/weather-click Weather Click Signed-off-by: Ayush Singh --- addon_boards/mikrobus/Makefile | 2 ++ addon_boards/mikrobus/mikroe-5761-i2c.dtso | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/addon_boards/mikrobus/Makefile b/addon_boards/mikrobus/Makefile index f66554cd5c45..4c7a68ea9504 100644 --- a/addon_boards/mikrobus/Makefile +++ b/addon_boards/mikrobus/Makefile @@ -1 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 + +dtb-y += mikroe-5761-i2c.dtbo diff --git a/addon_boards/mikrobus/mikroe-5761-i2c.dtso b/addon_boards/mikrobus/mikroe-5761-i2c.dtso new file mode 100644 index 000000000000..1111d3f7147f --- /dev/null +++ b/addon_boards/mikrobus/mikroe-5761-i2c.dtso @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/** + * MikroBUS - Weather Click I2C + * + * https://www.mikroe.com/weather-click + * + * Copyright (C) 2024 Ayush Singh + */ + +/dts-v1/; +/plugin/; + +&MIKROBUS_CONNECTOR { + status = "okay"; +}; + +&MIKROBUS_SCL_I2C { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&MIKROBUS_SDA_MUX_I2C_SDA>; + #address-cells = <1>; + #size-cells = <0>; + + bme280@76 { + compatible = "bosch,bme280"; + reg = <0x76>; + }; +}; From patchwork Wed Sep 11 14:27:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800730 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 3B803EE49BC for ; Wed, 11 Sep 2024 14:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=P5J0U9Nr2VJWT4UwLDZSs/klCxJAz9CderPyv0geGrk=; b=PVElUXeLEBYWhUYscOQvaLrq2s zmiIK9JmQi7gB60nkNc9i7UtgkslJlaiQtSESA37IIKnFrbb3mb6T9ZvMb/i8sBIMipqo0iwQ37t1 X2+8ay6ryyTzY79x6ocmymrMUkXKUaTxed6t4RacdFnpqPGI5lF6QYS00GWF5V2DCiAQ6OtuQmDzN gO4mlq5Ims4dRNspgbc4dPTY90yYekIVIIhLCsU6cii6KrZJlkDRm8GXpwNqlfUO60uhwbpqBwHs+ rI3oTqxPcw9a3gxg2nyoSRQ7KaspYvf9EU4fc8kf+wexRpl2FgnyGoCnou9O55b/Oy2QDyJDLrWNT QhSGbijA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOZ4-00000009z6q-0hfB; Wed, 11 Sep 2024 14:43:26 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOL9-00000009uFn-1yii for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:29:05 +0000 Received: by mail-pj1-x1043.google.com with SMTP id 98e67ed59e1d1-2da4e84c198so4605518a91.0 for ; Wed, 11 Sep 2024 07:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064942; x=1726669742; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=P5J0U9Nr2VJWT4UwLDZSs/klCxJAz9CderPyv0geGrk=; b=l6bjrHQueTJuym7gx6a1Y0simanZ/7vjQYGrJTRUa/CbB5TzFU/Gr/VnNHcqgSV772 wW3k4BRtteFaZAHBMF8zQsPMmPh+4/I9DrLv7d3BzkVv/UNoXaIQzHOem/FZjEi4ewN1 XmoaSRmpvwU46ajReHtgfDCNaA5AKpi6szbKHK5HoqH3kxhjUYpEH6o5ih2dLdZT0uVt HQVP2PHEKahjxU1304n666GuGIdSGK5SJfLe4dEcCKabB1Jg29J+g8ru0PFOkl8THbyH eydNZ4RG1OF/MzCauErxt9iByv37hTF/Z3j00V8XJP/y8rgtD15ZH5w86CXkYlBzrK/R mArQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064942; x=1726669742; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P5J0U9Nr2VJWT4UwLDZSs/klCxJAz9CderPyv0geGrk=; b=lWWKysawFed15uI8QxohLAa7eBcxdaMohrkpU4p2MvdXLjoAfNTZbJIXa5kI8hSq9V VRuZqMjGbJryaAf95rfUyVJ0LDxu7Mhn8RvIyG8IdlVo68JvfFlVhSY2YqyfG/4aIqMi VzpwNwsw/h2v4e0Bw+iJPSaiu22XEwV0Z3Apew1LAyRYHSFLfmbvtkDDmOgrg6mouzy7 YPs789NRcoyCisEzFmXIfJ6VZEC67TCnsWWDboPAVscFT2DbCqKoUGcgzq/lG7/XYAU0 X0t/FUOyhqujEkjbbBlTRssAxAdmQZzf/0N6rSGBJr7/qu/vma3/bybUk4XEoDW/mwMU oFzg== X-Forwarded-Encrypted: i=1; AJvYcCXUEUY8JfO7iWrIkvDz8J1d+4ODQNNiQCgb6CgrOdPdWo85q+qsGPhRz66FEIoFlWFmTNTWm3ke8JGZNxFsE69M@lists.infradead.org X-Gm-Message-State: AOJu0YzkZpBPB10sbdBvT28FPrRROsn6pQuHxY56PV1QHWSJVffD4NUa hXfyFPTTeDIhJAWN5AI/C+JZp+1Q0n42++jvWPyf3GMVcczNuEuXCmObguHOsg== X-Google-Smtp-Source: AGHT+IFGDayOTdMe5/yDVHYyC7ZbsU8VPfRxdyEq2dpfA1fEpxwlc2wdxNYQ01Lri1PLU0mE/Fh6Jw== X-Received: by 2002:a17:90b:1187:b0:2c9:5ecd:e3c5 with SMTP id 98e67ed59e1d1-2daffd0bf4dmr18926938a91.33.1726064942586; Wed, 11 Sep 2024 07:29:02 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:29:02 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:25 +0530 Subject: [PATCH 8/8] addon_boards: mikrobus: Add GPS3 Click MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-8-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1426; i=ayush@beagleboard.org; h=from:subject:message-id; bh=8QEuGIvQLbpjRaTFhH2ZFgvXVrDeGK7gSc8y+imv6Tg=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajWfF8HnWfBpRhubrg4fXSooUmChhIDDWBYX YkeSu2grEuJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1gAKCRAFzvXHieVa dPDnD/9VKgXwMYmbYiNZDn0qIW01JVcxnkYswlcqt3J9IFXKxgf95CvBhUm2GOHf3upxhxWOrof PucLmzSRCO5K5GN/kNAKGNR2WUMe0p+fmhzC4tzgUZYfANMK9yVrwJSX0ot4UoqzPQGUFTSVeUy DFot/tuROMVehuPsXnJ6Ku/R/FYuVD8fpHuj3c2QLVnr852mqmt2eOrLNxiqsYFlYly4iAulXS0 AiyJXCLB/g6hPa/na+7Ko3HmDG7Bkkp8Uw0KMC2sQ/goQM0evweTnBoRl5ulz9ADgGJXfJxsaxW XidaFPyzj6z3HD4XKlxYGd2YbM6AJJSVVvbxiyvyoK+1O5/Im41irPY0tWtzaCqS3JPirTIN/ew ADTPsLbnFTYajl5eB+kfEEoQ151Gy0Ug6AcmsfPwpP9LzvrqSGoCnWUxFpGu1LwyRddrTD/d0iH ySln21m+xMwlWNt5EpvYk9Ds2ZBy5MfnGb7qCNaEZPQ1lpsNKU8U2PZimGlQOJqjHzWcg82t/i4 1LvwZh1Xj0KuSTfsVIbM00G1zmnZbFFuceiWNQ4sBtanORq+CAwQdZV/nKLgo+g97gEvmyQjfC3 s/5KC/kK6UecXIphGeKG8z9NYVLJM5CFhQhLQD5jo4i2PtNfwe6ixQbInLrIPEfdnxLKLxkavTg H6stu8WIX4LLbGA== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072903_547710_F9CB671F X-CRM114-Status: GOOD ( 12.84 ) 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 - GPS3 Click is a UART MikroBUS addon Board Link: https://www.mikroe.com/gps-3-click Signed-off-by: Ayush Singh --- addon_boards/mikrobus/Makefile | 1 + addon_boards/mikrobus/mikroe-1714.dtso | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/addon_boards/mikrobus/Makefile b/addon_boards/mikrobus/Makefile index 4c7a68ea9504..e4b3d1aa7001 100644 --- a/addon_boards/mikrobus/Makefile +++ b/addon_boards/mikrobus/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 dtb-y += mikroe-5761-i2c.dtbo +dtb-y += mikroe-1714.dtbo diff --git a/addon_boards/mikrobus/mikroe-1714.dtso b/addon_boards/mikrobus/mikroe-1714.dtso new file mode 100644 index 000000000000..c8a0872ba954 --- /dev/null +++ b/addon_boards/mikrobus/mikroe-1714.dtso @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/** + * MikroBUS - Weather Click + * + * https://www.mikroe.com/weather-click + * + * Copyright (C) 2024 Ayush Singh + */ + +/dts-v1/; +/plugin/; + +#include + +&MIKROBUS_CONNECTOR { + status = "okay"; +}; + +&MIKROBUS_TX_UART { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&MIKROBUS_TX_MUX_UART_TX>; + + gnss { + compatible = "u-blox,neo-8"; + reset-gpios = <&MIKROBUS_ALL_GPIO 10 GPIO_ACTIVE_LOW>; + }; +};