From owner-freebsd-arm@freebsd.org Thu Jun 6 22:06:58 2019 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 3C4C915C1A61 for ; Thu, 6 Jun 2019 22:06:58 +0000 (UTC) (envelope-from sm@ara-ler.com) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7A318A221 for ; Thu, 6 Jun 2019 22:06:56 +0000 (UTC) (envelope-from sm@ara-ler.com) Received: from mxback8j.mail.yandex.net (mxback8j.mail.yandex.net [IPv6:2a02:6b8:0:1619::111]) by forward102p.mail.yandex.net (Yandex) with ESMTP id ADA1F1D40019; Fri, 7 Jun 2019 01:06:44 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback8j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id jG0Yoxfcko-6ik0jfs2; Fri, 07 Jun 2019 01:06:44 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ara-ler.com; s=mail; t=1559858804; bh=L1P+mCMF0l6Am6H118of8b+BzRdP9P2Hw5WkquvAF1Y=; h=In-Reply-To:Subject:Cc:To:From:References:Date:Message-ID; b=tWQhULNSvqug9s4hAHou41aPUh3PeplxCJwBkZhUSaqCsFFDgPCPmhSquqfwfpXdc aDPf11R9bhN8NpF13aeBDBPOIrtLCWIRbxJ25J047yn35yKlbHHObBScQ0TxSIubNS QjZgtqcoLNwalvcSRiP5mZpewa3kSa6MTJUIQS1g= Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id YbgJy6EzAr-6gLmiNvM; Fri, 07 Jun 2019 01:06:43 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Date: Thu, 6 Jun 2019 16:06:39 -0600 From: Sergey Manucharian To: Nicola Mingotti Cc: freebsd-arm@freebsd.org, nmingott@gmail.com Subject: Re: How to set PWM tunable name to ehrpwm.1 ? Message-ID: <20190606220639.GE13546@eldorado> References: <68790975-a5a5-2138-ca89-117878d6cf2d@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68790975-a5a5-2138-ca89-117878d6cf2d@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: B7A318A221 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ara-ler.com header.s=mail header.b=tWQhULNS; spf=pass (mx1.freebsd.org: domain of sm@ara-ler.com designates 2a02:6b8:0:1472:2741:0:8b7:102 as permitted sender) smtp.mailfrom=sm@ara-ler.com X-Spamd-Result: default: False [-5.70 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[ara-ler.com:s=mail]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0:1000::/52]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[ara-ler.com]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[ara-ler.com:+]; MX_GOOD(-0.01)[mx.yandex.net,mx.yandex.net,mx.yandex.net,mx.yandex.net,mx.yandex.net]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; IP_SCORE(-3.59)[ip: (-9.45), ipnet: 2a02:6b8::/32(-4.74), asn: 13238(-3.79), country: RU(0.01)]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[2.0.1.0.7.b.8.0.0.0.0.0.1.4.7.2.2.7.4.1.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.1]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:13238, ipnet:2a02:6b8::/32, country:RU]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jun 2019 22:06:58 -0000 Excerpts from Nicola Mingotti's message from Thu 06-Jun-19 12:33: > > In my BeagleBone Black, FreeBSD-12 RELEASE, i created two overlays, > pwm.dtso and pwm1.dtso. They enable the PWM pins p9.21, p9.22 and > respectively p9.14, p9.16. DTSO files are below. > > If I load both the DTBO at boot I see correctly|ehrpwm.0|and|ehrpwm.1|, > associated to the correct pins. But, if i remove the > overlay|pwm.dtbo|then i seen only|ehrpwm.0|in|sysctl -a|, which is not > what i want, i would like to see the name|ehrpwm.1|. > > This is important because i must be 100% sure a certain pin corresponds > the a certain tunable.This must be true even if i remove non relevant > overlays in the future. I guess there must be some parameter in the DTSO > which i don't know, i hope you can give me some directions about that. It is not related to your DTBO's. That's how everything works (at least by default). You will see the same naming issue with serial ports, for example. And not just in BBB. E.g. when I have enabled uart0 and uart2 they are named ttyu0 and ttyu1, if I have only uart2, it becomes ttyu0. It's easier if there is a device node in /dev, so you can create a symlink with a fixed name (I have a script called by devd for my multiple serial ports). However, that's not the case with PWM... Maybe there is an option to use persistent names for devices that somebody can point to. S. > /dts-v1/; > /plugin/; > > / { > compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; > exclusive-use = > "P9.21","P9.22","ehrpwm0_AB"; > }; > > &am33xx_pinmux { > ehrpwm0_AB_pins: pinmux_ehrpwm0_AB_pins { > pinctrl-single,pins = < > 0x154 0x03 /* P9.21 */ > 0x150 0x03 /* P9.22 */ > >; > }; > }; > > &ehrpwm0 { > status = "okay"; > pinctrl-names = "default"; > pinctrl-0 = <&ehrpwm0_AB_pins>; }; > &epwmss0 { > status = "okay"; > }; > &ecap0 { > status = "okay"; > }; > > /dts-v1/; > /plugin/; > / { > compatible = "ti,am335x-bone-black","ti,am335x-bone", "ti,am33xx"; > exclusive-use = > "P9.14","P9.16","ehrpwm1_AB"; > }; > > &am33xx_pinmux { > ehrpwm1_AB_pins: pinmux_ehrpwm1_AB_pins { > pinctrl-single,pins = < > 0x048 0x06 /* P9.14 */ > 0x04C 0x06 /* P9.16 */ > >; > }; > }; > > &ehrpwm1 { > status = "okay"; > pinctrl-names = "default"; > pinctrl-0 = <&ehrpwm1_AB_pins>; > }; > > &epwmss1 { > status = "okay"; > }; > > &ecap1 { > status = "okay"; > };