From: Tony Lindgren <tony@atomide.com>
To: Faiz Abbas <faiz_abbas@ti.com>
Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
devicetree@vger.kernel.org, bcousson@baylibre.com,
robh+dt@kernel.org, mark.rutland@arm.com, paul@pwsan.com,
lokeshvutla@ti.com, linux@armlinux.org.uk
Subject: Re: [PATCH 1/3] ARM: dra762: hwmod: Add MCAN support
Date: Thu, 17 May 2018 14:04:50 -0700 [thread overview]
Message-ID: <20180517210450.GP98604@atomide.com> (raw)
In-Reply-To: <b3456763-2f82-9a0b-d166-ddf7965fc162@ti.com>
* Faiz Abbas <faiz_abbas@ti.com> [180517 08:14]:
> On Tuesday 15 May 2018 10:53 PM, Tony Lindgren wrote:
> > And I'm guessing the top level module with sysconfig related
> > registers is named "adc" :)
> >
>
> Yes. The MCAN clocks are controlled by the ADC_CLKCTRL register.
> Please see TRM:
> http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=spruie9&fileType=pdf
> page: 1530
Thanks that helps :) Looks like we have:
MCANSS_PID rev 0
MCANSS_CTRL sysconfig 0x4
MCANSS_STAT sysstatus 0x8
With current Linux next, this should work with just ti-sysc if
we added yet another sysconfig layout.. See
Documentation/devicetree/bindings/bus/ti-sysc.txt
Looks like this is not quite "ti,sysc-omap4" as there are no
ti,sysc-midle or ti,sysc-sidle, and sysstatus reset bit is
inverted..
Anyways, I think the dts part should be similar to this with
the new sysconfig added (untested):
target-module@42c00000 {
compatible ="ti,sysc-yet-to-be-determined";
ti,hwmods = "mcan";
reg = <0x42c00000 4>,
<0x42c00004 4>,
<0x42c00008 4>;
reg-names = "rev", "sysc", "syss";
clocks = <&wkupaon_clkctrl CM_WKUPAON_ADC_CLKCTRL>;
clock-names = "fck";
ti,sysc-mask = <(SYSC_OMAP4_SOFTRESET | SYSC_DRA7_ENAWAKEUP)>;
ti,syss-mask = <1>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x42c00000 0x2000>;
mcan@0 {
compatible = "bosch,m_can";
reg = <0x1a00 0x4000>,
<0 0x18fc>;
reg-names = "m_can", "message_ram";
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&mcan_clk>, <&l3_iclk_div>;
clock-names = "cclk", "hclk";
bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
};
};
You'd have to add a new struct sysc_regbits to ti-sysc.c similar
to sysc_regbits_omap4 for the .srst_shift = 0. Not sure if the same
register layout is used for other modules, but might be worth checking
the TRM. Also the clock node is missing for wkupaon_clkctrl from
include/dt-bindings/clock/dra7.h.
If the "message_ram" can operate independent of the driver,
it could be a separate child node under the target-module.
In the hwmod you still need the struct omap_hwmod for now,
but clocks should no longer be needed there.
Regards,
Tony
next prev parent reply other threads:[~2018-05-17 21:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-08 9:58 [PATCH 0/3] Add MCAN Support for dra76x Faiz Abbas
2018-04-08 9:58 ` Faiz Abbas
2018-04-08 9:59 ` [PATCH 1/3] ARM: dra762: hwmod: Add MCAN support Faiz Abbas
2018-04-08 9:59 ` Faiz Abbas
2018-05-01 15:26 ` Tony Lindgren
2018-05-15 6:04 ` Faiz Abbas
2018-05-15 6:04 ` Faiz Abbas
2018-05-15 17:14 ` Tony Lindgren
2018-05-15 17:18 ` Tony Lindgren
2018-05-15 17:23 ` Tony Lindgren
2018-05-17 8:13 ` Faiz Abbas
2018-05-17 8:13 ` Faiz Abbas
2018-05-17 21:04 ` Tony Lindgren [this message]
2018-05-17 21:09 ` Tony Lindgren
2018-05-18 11:54 ` Faiz Abbas
2018-05-18 11:54 ` Faiz Abbas
2018-04-08 9:59 ` [PATCH 2/3] ARM: dts: dra762: Add MCAN clock support Faiz Abbas
2018-04-08 9:59 ` Faiz Abbas
2018-05-15 17:16 ` Tony Lindgren
2018-04-08 9:59 ` [PATCH 3/3] ARM: dts: dra76x: Add MCAN node Faiz Abbas
2018-04-08 9:59 ` Faiz Abbas
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=20180517210450.GP98604@atomide.com \
--to=tony@atomide.com \
--cc=bcousson@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=faiz_abbas@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lokeshvutla@ti.com \
--cc=mark.rutland@arm.com \
--cc=paul@pwsan.com \
--cc=robh+dt@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.