Linux SOC development
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Gregory CLEMENT <gregory.clement@bootlin.com>,
	Arnd Bergmann  <arnd@arndb.de>,
	soc@kernel.org, arm@kernel.org, Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: arm: add cznic,turris-omnia-mcu binding
Date: Thu, 24 Aug 2023 13:17:36 +0200	[thread overview]
Message-ID: <20230824131736.067c40e2@dellmb> (raw)
In-Reply-To: <5dfbdffa-7460-d1df-b821-63231fb7af66@kernel.org>

On Thu, 24 Aug 2023 10:23:27 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> You replied only to me. Instead please reply-to-all to keep discussions
> public.

Sorry about that, I've redirected the messages to the other people.

> >>> +++ b/Documentation/devicetree/bindings/arm/cznic,turris-omnia-mcu.yaml    
> >>
> >> ARM directory is only for top-level bindings, so this should go to soc.  
> > 
> > Hmm. The board uses a marvell SoC, but the board is from CZ.NIC (who
> > does not create its own SoCs). So should this go into soc/marvell or
> > soc/cznic?  
> 
> Indeed and it is a dedicated MCU (some Cortex-M or similar, right?), so
> maybe arm is suitable at the end.

There are three Cortex-M options (M0, M0+ or M3, from STM, NXP or
GigaDevice), depending on the board revision.

The bindings/arm already contain for example amazon,al.yaml, which is
platform binding (not SoC).

So I guess I will stick with bindings/arm, unless someone suggests
something else.

> >>> +examples:
> >>> +  - |
> >>> +    #include <dt-bindings/interrupt-controller/irq.h>
> >>> +
> >>> +    ic: interrupt-controller {
> >>> +        interrupt-controller;
> >>> +        #interrupt-cells = <2>;
> >>> +    };    
> >>
> >> Drop this node, not relevant.  
> > 
> > Will the binding example compile without the ic node if the
> > system-controller below uses it?  
> 
> Yes.

OK

> >>> +            interrupt-parent = <&ic>;
> >>> +            interrupts = <11 IRQ_TYPE_NONE>;    
> >>
> >> Are you sure interrupt is type none?  
> > 
> > The interrupt type is either LEVEL_LOW or EDGE_FALLING, depending on
> > the version of the MCU firmware, so this has to be selected by the
> > driver.
> > 
> > I tried setting LEVEL_LOW, since that is the one that is used by the
> > newest MCU firmware. But then if the firmware is old and I want to
> > select EDGE_FALLING in the driver when requesting the IRQ, it fails
> > with message
> >   type mismatch, failed to map hwirq-%lu for %s!
> > from
> >   kernel/irq/irqdomain.c function irq_create_fwspec_mapping
> > 
> > I guess I can use irqd_set_trigger_type() before requesting the IRQ to
> > avoid this error.
> > 
> > Should I use use LEVEL_LOW in the binding example and device-tree?  
> 
> I guess in such case this NONE is okay

Thx.

  parent reply	other threads:[~2023-08-24 11:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 16:10 [PATCH 0/4] Turris Omnia MCU driver Marek Behún
2023-08-23 16:10 ` [PATCH 1/4] dt-bindings: arm: add cznic,turris-omnia-mcu binding Marek Behún
2023-08-24  7:37   ` Krzysztof Kozlowski
     [not found]     ` <20230824100349.2d0080d8@dellmb>
     [not found]       ` <5dfbdffa-7460-d1df-b821-63231fb7af66@kernel.org>
2023-08-24 11:17         ` Marek Behún [this message]
2023-08-23 16:10 ` [PATCH 2/4] platform/cznic: Add support for Turris Omnia MCU Marek Behún
2023-08-23 16:10 ` [PATCH 3/4] ARM: dts: turris-omnia: Add MCU system-controller node Marek Behún
2023-08-24  7:37   ` Krzysztof Kozlowski
2023-08-23 16:10 ` [PATCH 4/4] ARM: dts: turris-omnia: Add GPIO key node for front button Marek Behún

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=20230824131736.067c40e2@dellmb \
    --to=kabel@kernel.org \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzk@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=soc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox