From owner-freebsd-arm@freebsd.org Wed Aug 29 16:26:49 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85464108E70F for ; Wed, 29 Aug 2018 16:26:49 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1309373818 for ; Wed, 29 Aug 2018 16:26:49 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-io0-x22b.google.com with SMTP id l7-v6so5002764iok.6 for ; Wed, 29 Aug 2018 09:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k4HoiztHiH5S1lCQfztBB9xtO50WS1cNcyy+kJ5MG+g=; b=T/00KbLgRJ5wQCY1uOHGyaQHJEItwa2AiOD/MkLl+rj4T6dBJS3fipaqXrZoaKT/xo HKSAYNrO+z0qAt9OiyU+3c9zKz1VHMXenOXeZLrsGCleNjUHe8hydMf65deSip7g1zcC ztOQzaA3s3lDnqIx2CPW/TN6C+q2+MuF1azhDfivTsKTK4mP19KdIgrVLhYV/uIolsJe yeBYf9J6wIGAG9BUQtWN386cVcNRV5KuGGXRryLqVgMXB0tqFPx0bQ6x/0cYIlxdqrbB kOqLM5Zm7dN6BHu6RRAt15giSAxc6y6my864rv7pPJgzYzrWbY7QSN9RvUvt8nL/NESo AqUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k4HoiztHiH5S1lCQfztBB9xtO50WS1cNcyy+kJ5MG+g=; b=tnOSKsPQ+oIhQNsU2jtE2/xprrDGrDqzPZOJufePOEIbSYZbg/S8qlCdfPVnTwMims zFHk8dMg/5ECrf+RZZYxarG87hIzZQKU68S4lbTF2vd8wXhzNyng2vDAhZ+pDKJWoG6B oTK22jwP1x/3JCLAPZQ3jaLIy0A9uJ/DN43tvhBiLsPIpqgVjH4dOVrETKTltojyBEzi iZcnMndBep/ZZft9rL9vV+PcwvdhBeStV2pf0HUPJ5FzFiI2MKbSEn3frCGip1lb9Z1a aPKypHcsKrOYOVhh2EiwDTbf6p+aXD1CpTogcW2vwUwPqjJfB0zCrVLLXjVyyi97EgO9 AsSQ== X-Gm-Message-State: APzg51D7qXT9y/sL7BQd7jZFEuuzjGrn+Xe78+95WZnsaPB7Ax52dETj qSWYDq8ruAnfSPm0A9EF/nI2V0nyEmcpld75Mnue0Uwx X-Google-Smtp-Source: ANB0VdZgBDnv5wS+rJ1PCccTgSytW9I6KSPtqXJEYmuDcJyoJZTtlmG4iIKCrzfV+nU71OgltFrjUIHNaU4C/ZgNhGU= X-Received: by 2002:a5e:8347:: with SMTP id y7-v6mr6091005iom.254.1535560008546; Wed, 29 Aug 2018 09:26:48 -0700 (PDT) MIME-Version: 1.0 References: <4661fc41-935a-56d5-2cc2-125085daf30a@gmail.com> In-Reply-To: <4661fc41-935a-56d5-2cc2-125085daf30a@gmail.com> From: Russell Haley Date: Wed, 29 Aug 2018 09:26:37 -0700 Message-ID: Subject: Re: utility for pin in BBB: PX.Y --> pin_mode, pin_name To: nmingotti@gmail.com Cc: freebsd-arm Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 16:26:49 -0000 Does this help? https://www.freebsd.org/cgi/man.cgi?gpio Russ On Wed, Aug 29, 2018 at 6:13 AM Nicola Mingotti wrote: > > Hi, > > I would like to know if such utility already exists, if not I > can start to program it. > > The script should work like the example below, that is, > it gives the list of all pins (starting from their physical position on > the board), > their mode, and so their associated name/function. > > #> pinfunc > ---------------------------- > P9.1 -- > P9.2 -- > ........ > P9.21 MODE-3 ehrpwm0B > P9.22 MODE-3 ehrpwm0A > P9.23 MODE-7 gpio.1.17 > ..... > --------------------------- > > The only way i know to read the pin mode is by direct memory > access, as done in "devmem2". If you know other ways let me know. > > I saw there is "man 9 fdt_pinctrl" but it seems more for writing pin > configuration than to read it. > > bye > Nicola > > > > > > > > > > > > > > > > > -- > -------------------------- > Dr. Nicola Mingotti > R&D - Borghi Srl > CTO - BondInsider > -------------------------- > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >