Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3064530pxa; Tue, 18 Aug 2020 05:52:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/OMqpNh988GEVv+/ECBUwkl5XEVXspas4XDpc8cKTavumpCtJQHssZTgW0QiOX+k2iKdA X-Received: by 2002:a17:906:e218:: with SMTP id gf24mr20861044ejb.469.1597755134370; Tue, 18 Aug 2020 05:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597755134; cv=none; d=google.com; s=arc-20160816; b=ysocVeEB2e1pu2EyH8i4Wn9HeyGtv22EvRuVk4tCQj40+FdeqFiphAR6sd9/w5qAyu I3IVedbkGBTzTR/FLY4L4QLzl4yDG3kcsMpsLWts42J4GQoDQve//bg92xEU+wb9WIdZ tL8cEQppHMBv23CBI0D1D67lhkickrrw4WBVFa+wMJp44p8+yv1JmMbOWlkfR90+lUUt nf0wPQrxrDKhSzKh6OIL5knVSw5TTWeKixMBfOJk4N0/lOw/j7FX9LtavfSkXEtDPG8u BNk2M4mpC+gdx7/5CPACcrnnWwj4ZAmqTopdEdtqN6EfZKLGl4708qhB95ibNpKX98kC dctw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KWn2a6wUAxzQeIq4NFtMTmknoSynjzag0OTUIJgkTrQ=; b=uVIh4Ahj0KXkUQpT6IDpB5Ul34nRhLJ0QGnIPIQu6O2Mriw27PGz8DnCzoqt1qAsVb 7AfWpE4JgIbeY3kboyUvHnL1lvwpH/2+CnJCuHFUtXVdVBeI+EmDTh11+OOXI3I472Hc F8jPGzu0fF/F2I3wE9ycwfjxUmy41Eagm+TBbJdE+rrOTdZHZ3+ioGuCnOYcdFnDveeK UfZQrj+Kw/6GlNE2NZ1XxIlL/gTOrdKY2S3lozV3pdsnzSJkrLOkCllRSBjMj1Vesap/ GRdcN/+NBVi0l4zeq22ucM3ccFRosI9dJ3k3wpMvHBY8BSsoKvrZhzEBkjF+qO/s8y+B eIkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=otsFRC0A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a16si13030447ejx.411.2020.08.18.05.51.50; Tue, 18 Aug 2020 05:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@beagleboard-org.20150623.gappssmtp.com header.s=20150623 header.b=otsFRC0A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726956AbgHRMsw (ORCPT + 99 others); Tue, 18 Aug 2020 08:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726945AbgHRMsn (ORCPT ); Tue, 18 Aug 2020 08:48:43 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9C8DC061389 for ; Tue, 18 Aug 2020 05:48:43 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id u10so9162698plr.7 for ; Tue, 18 Aug 2020 05:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KWn2a6wUAxzQeIq4NFtMTmknoSynjzag0OTUIJgkTrQ=; b=otsFRC0ABvWrlCGVgbkn9AaB6eQqJdQr0Dv4EK9tpT01AHWE46YGh7x1KddBxFs0f6 SK2nqnnWcoMWb7zkwAfsdLcVpSG6nSWyk3vs944Z8F77eUlVXE9rMXXv5aSg6P4Lvz1F dFN/Iw4Vkuccl9lSTMRKINovJlpF/F+Sww9sGbioCTtv58gR+215IfZfoG8O3dS8GRhe va7+Xz3pjCkKlIKeDr8t8nGTqb7L4iHdCBDsLXxDiG6VeU9nt+ZQ3xS1tOHJ6azWP89I bLFvELJHx1p2MyT38nE/2cL9SwJJEFT5A6S/PvJMq5Ad1I4awyvIRtQ1I6ZNCZwa0lVB Fspw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KWn2a6wUAxzQeIq4NFtMTmknoSynjzag0OTUIJgkTrQ=; b=moFu7s7tFufHuXFj5CU2ZovX6NuKAvhlhrVDkC+7FztXjk9eDUWkcj/So5ipd+ct4j OUvwAAuJ8IlvML6zOq+/sFy26Vssem1bRD3bsPLKfM+odj9lwPlOBEGj7EJOU5ZrMl/9 VKUnDCV3V0tssy9v1doHmKQ4JZMJTp1yUQbdv2ZI3DbdK520YuoNeZ2wASlmelsahuVQ 5uaEhWRqBot8cUZ1DdEPXLDIV8JzrqkzVuiBMkxB17ikELcA0O32+xUbhB7gKg2sjGpV 6G92d/hy1U3dl9Pg0fCoL1okQPde/MMo2pVKVqGkLE82/dSnaNy/s+mEleivn+QR+lM/ q0Fw== X-Gm-Message-State: AOAM530PSEEPFiZXKMRQ/bHmvk4bimvlD++2FTi6WC03S8MVGrqpsFJ5 /UeGmBMEni6aYXN0VZ74LCxU X-Received: by 2002:a17:902:264:: with SMTP id 91mr15477464plc.88.1597754923210; Tue, 18 Aug 2020 05:48:43 -0700 (PDT) Received: from localhost.localdomain ([116.68.79.111]) by smtp.gmail.com with ESMTPSA id e4sm24264221pfd.204.2020.08.18.05.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 05:48:42 -0700 (PDT) From: Vaishnav M A To: greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, arnd@arndb.de, johan@kernel.org, elder@kernel.org Cc: Vaishnav M A , robh@kernel.org, mchehab+huawei@kernel.org, davem@davemloft.net, jkridner@beagleboard.org, drew@beagleboard.org, robertcnelson@beagleboard.org, rajkovic@mikroe.com, chrisfriedt@gmail.com, zoran.stojsavljevic@gmail.com Subject: [RFC PATCH v2 1/3] add mikrobus descriptors to greybus_manifest Date: Tue, 18 Aug 2020 18:18:13 +0530 Message-Id: <20200818124815.11029-2-vaishnav@beagleboard.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200818124815.11029-1-vaishnav@beagleboard.org> References: <20200818124815.11029-1-vaishnav@beagleboard.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds new descriptors used in the manifest parsing inside the mikrobus driver, the device descriptor help to describe the devices on a mikroBUS port, mikrobus descriptor is used to set up the mikrobus port pinmux and GPIO states and property descriptor to pass named properties to device drivers through the Unified Properties API under linux/property.h The corresponding pull request for manifesto is updated at : https://github.com/projectara/manifesto/pull/2 Signed-off-by: Vaishnav M A --- include/linux/greybus/greybus_manifest.h | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/include/linux/greybus/greybus_manifest.h b/include/linux/greybus/greybus_manifest.h index 6e62fe478712..821661ea7f01 100644 --- a/include/linux/greybus/greybus_manifest.h +++ b/include/linux/greybus/greybus_manifest.h @@ -23,6 +23,9 @@ enum greybus_descriptor_type { GREYBUS_TYPE_STRING = 0x02, GREYBUS_TYPE_BUNDLE = 0x03, GREYBUS_TYPE_CPORT = 0x04, + GREYBUS_TYPE_MIKROBUS = 0x05, + GREYBUS_TYPE_PROPERTY = 0x06, + GREYBUS_TYPE_DEVICE = 0x07, }; enum greybus_protocol { @@ -151,6 +154,47 @@ struct greybus_descriptor_cport { __u8 protocol_id; /* enum greybus_protocol */ } __packed; +/* + * A mikrobus descriptor is used to describe the details + * about the bus ocnfiguration for the add-on board + * connected to the mikrobus port. + */ +struct greybus_descriptor_mikrobus { + __u8 pin_state[12]; +} __packed; + +/* + * A property descriptor is used to pass named properties + * to device drivers through the unified device properties + * interface under linux/property.h + */ +struct greybus_descriptor_property { + __u8 length; + __u8 id; + __u8 propname_stringid; + __u8 type; + __u8 value[0]; +} __packed; + +/* + * A device descriptor is used to describe the + * details required by a add-on board device + * driver. + */ +struct greybus_descriptor_device { + __u8 id; + __u8 driver_stringid; + __u8 protocol; + __u8 reg; + __le32 max_speed_hz; + __u8 irq; + __u8 irq_type; + __u8 mode; + __u8 prop_link; + __u8 gpio_link; + __u8 pad[3]; +} __packed; + struct greybus_descriptor_header { __le16 size; __u8 type; /* enum greybus_descriptor_type */ @@ -164,6 +208,9 @@ struct greybus_descriptor { struct greybus_descriptor_interface interface; struct greybus_descriptor_bundle bundle; struct greybus_descriptor_cport cport; + struct greybus_descriptor_mikrobus mikrobus; + struct greybus_descriptor_property property; + struct greybus_descriptor_device device; }; } __packed; -- 2.25.1