From: thesven73@gmail.com
To: svendev@arcx.com, lee.jones@linaro.org, robh+dt@kernel.org,
mark.rutland@arm.com, afaerber@suse.de, treding@nvidia.com,
david@lechnology.com, noralf@tronnes.org, johan@kernel.org,
monstr@monstr.eu, michal.vokac@ysoft.com, arnd@arndb.de,
gregkh@linuxfoundation.org, john.garry@huawei.com,
geert+renesas@glider.be, robin.murphy@arm.com,
paul.gortmaker@windriver.com,
sebastien.bourdelin@savoirfairelinux.com, icenowy@aosc.io,
yuanzhichang@hisilicon.com, stuyoder@gmail.com,
linus.walleij@linaro.org, maxime.ripard@bootlin.com,
bogdan.purcareata@nxp.com
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH anybus v1 2/4] dt-bindings: anybus-bridge: document devicetree binding.
Date: Thu, 25 Oct 2018 09:55:15 -0400 [thread overview]
Message-ID: <20181025135515.8397-1-TheSven73@googlemail.com> (raw)
Hi Linus, thank you for the patch review !!
>> + - pwms : the pwm connected to the bridge's 'pwm input'.
>
> That is really unintuitive and needs a detailed explanation. What
> is a bridge doing with a PWM? Is it 100% certain this is a PWM,
> it's not just a .... clock? A pwm is a pule WIDTH modulator and
> I can't for my life understand why a bus bridge needs a signal
> with variable pulse width, but surprise me! :D
You are 100% correct, this is a clock !
The hardware designers attached the bridge's clock input to an iMX pwm output,
and instructed us to provide a clock with 50% duty cycle and a certain freq.
The only way I know to activate a pwm is to connect it to a driver in the fdt,
then inside the driver enable the pwm, like so:
+ /* PWM */
+ pwm = devm_pwm_get(dev, NULL);
+ if (IS_ERR(pwm)) {
+ dev_err(dev, "pwm not found\n");
+ return -EINVAL;
+ }
+ pwm_get_args(pwm, &pargs);
+ period = pargs.period;
+ err = pwm_config(pwm, period/2, period);
+ if (err)
+ return err;
+ err = pwm_enable(pwm);
+ if (err)
+ return err;
This is why the bridge driver has a dependency on a pwm.
If the pwm could be enabled individually, I could drop this dependency.
Can you think of a way?
>> + fsl,weim-cs-timing = <0x024400b1 0x00001010 0x20081100
>> + 0x00000000 0xa0000240 0x00000000>;
>
> Is it just a copy/paste from
> Documentation/devicetree/bindings/bus/imx-weim.txt
> leftover?
No. We attach the bridge to the i.MX WEIM bus. Every fdt WEIM child node
requires a fsl,weim-cs-timing property, which provides the bus timing for
that particular chip select. It's the weim driver that requires this,
I'm only following its instructions.
Should I just leave this out in the example? In theory, the bridge can be
connected to any parallel bus, so fsl,weim-cs-timing is Too Much Information
for the example?
next reply other threads:[~2018-10-25 13:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 13:55 thesven73 [this message]
2018-10-25 15:30 ` [PATCH anybus v1 2/4] dt-bindings: anybus-bridge: document devicetree binding David Lechner
2018-10-26 11:28 ` Linus Walleij
-- strict thread matches above, loose matches on Subject: below --
2018-10-25 15:46 thesven73
2018-10-26 6:39 ` Lee Jones
2018-10-25 13:35 thesven73
2018-10-24 14:24 [PATCH anybus v1 0/4] Support HMS Profinet Card over Anybus Sven Van Asbroeck
2018-10-24 14:24 ` [PATCH anybus v1 2/4] dt-bindings: anybus-bridge: document devicetree binding Sven Van Asbroeck
2018-10-25 0:06 ` Rob Herring
2018-10-25 5:19 ` Lee Jones
2018-10-25 10:16 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181025135515.8397-1-TheSven73@googlemail.com \
--to=thesven73@gmail.com \
--cc=afaerber@suse.de \
--cc=arnd@arndb.de \
--cc=bogdan.purcareata@nxp.com \
--cc=david@lechnology.com \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=icenowy@aosc.io \
--cc=johan@kernel.org \
--cc=john.garry@huawei.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--cc=michal.vokac@ysoft.com \
--cc=monstr@monstr.eu \
--cc=noralf@tronnes.org \
--cc=paul.gortmaker@windriver.com \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sebastien.bourdelin@savoirfairelinux.com \
--cc=stuyoder@gmail.com \
--cc=svendev@arcx.com \
--cc=treding@nvidia.com \
--cc=yuanzhichang@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).