linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Yash Shah <yash.shah@sifive.com>
To: Andreas Schwab <schwab@suse.de>
Cc: mark.rutland@arm.com, linux-pwm@vger.kernel.org,
	devicetree@vger.kernel.org, Palmer Dabbelt <palmer@sifive.com>,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	Sachin Ghadi <sachin.ghadi@sifive.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH v9 0/2] PWM support for HiFive Unleashed
Date: Tue, 19 Mar 2019 11:56:35 +0530	[thread overview]
Message-ID: <CAJ2_jOHoNnBF2UwU6G1vdvNrJAUJdGL_RncRAOaXMWoS03cagA@mail.gmail.com> (raw)
In-Reply-To: <mvm5zsgp00d.fsf@suse.de>

On Mon, Mar 18, 2019 at 10:56 PM Andreas Schwab <schwab@suse.de> wrote:
>
> On Mär 15 2019, Yash Shah <yash.shah@sifive.com> wrote:
>
> > You need to make sure the period setting is passed via the
> > conventional way in DT file.
> > Example:
> > pwmleds {
> >     compatible = "pwm-leds";
> >     heartbeat {
> >         pwms = <&L45 0 10000000 0>;
> >         max-brightness = <255>;
> >         linux,default-trigger = "heartbeat";
> >     };
> > };
>
> I've now managed to build a working FSBL with that change, but that
> didn't change anything.  There is not even a heartbeat option in
> /sys/class/leds/heartbeat/trigger any more.

Below is the copy of the pwm nodes in my DTS file:

L45: pwm@10020000 {
        compatible = "sifive,pwm0";
        interrupt-parent = <&plic0>;
        interrupts = <42 43 44 45>;
        reg = <0x0 0x10020000 0x0 0x1000>;
        reg-names = "control";
        clocks = <&prci 3>;
        #pwm-cells = <2>;
};
L46: pwm@10021000 {
        compatible = "sifive,pwm0";
        interrupt-parent = <&plic0>;
        interrupts = <46 47 48 49>;
        reg = <0x0 0x10021000 0x0 0x1000>;
        reg-names = "control";
        clocks = <&prci 3>;
        #pwm-cells = <2>;
};
pwmleds {
        compatible = "pwm-leds";
        heartbeat {
                pwms = <&L45 0 10000000 0>;
                max-brightness = <255>;
                linux,default-trigger = "heartbeat";
        };
};

The above works for me.
I just noticed that I have been using pwm-cells = 2, instead of 3.
Maybe that is the problem here.
I will suggest you test it on v11 patch in which I will fix this
pwm-cells issue.

Thanks for pointing it out.

>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-03-19  6:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  8:11 [PATCH v9 0/2] PWM support for HiFive Unleashed Yash Shah
2019-03-12  8:11 ` [PATCH v9 1/2] pwm: sifive: Add DT documentation for SiFive PWM Controller Yash Shah
2019-03-12  8:11 ` [PATCH v9 2/2] pwm: sifive: Add a driver for SiFive SoC PWM Yash Shah
2019-03-12  9:17   ` Uwe Kleine-König
2019-03-12 12:12     ` Thierry Reding
2019-03-12 13:17       ` Uwe Kleine-König
2019-03-18  9:51         ` Thierry Reding
2019-03-12 10:14 ` [PATCH v9 0/2] PWM support for HiFive Unleashed Andreas Schwab
2019-03-15 11:49   ` Yash Shah
2019-03-18  9:24     ` Andreas Schwab
2019-03-18 17:26     ` Andreas Schwab
2019-03-19  6:26       ` Yash Shah [this message]
2019-03-25 11:43         ` Yash Shah
2019-03-25 11:58           ` Andreas Schwab
2019-03-25 12:09             ` Yash Shah

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=CAJ2_jOHoNnBF2UwU6G1vdvNrJAUJdGL_RncRAOaXMWoS03cagA@mail.gmail.com \
    --to=yash.shah@sifive.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=sachin.ghadi@sifive.com \
    --cc=schwab@suse.de \
    --cc=thierry.reding@gmail.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).