lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140725111033.49a0e7e8@bbrezillon>
Date:	Fri, 25 Jul 2014 11:10:33 +0200
From:	Boris BREZILLON <boris.brezillon@...e-electrons.com>
To:	jiri.prchal@...ignal.cz
Cc:	Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
	devicetree@...r.kernel.org, nicolas.ferre@...el.com,
	linux-arm-kernel@...ts.infradead.org,
	Bo Shen <voice.shen@...el.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ARM: at91: at91sam9x5: sets NPCS0 (PA14) back to GPIO

On Fri, 25 Jul 2014 10:59:03 +0200
Jiří Prchal <jiri.prchal@...ignal.cz> wrote:

> 
> 
> Dne 25.7.2014 v 10:54 Alexandre Belloni napsal(a):
> > On 25/07/2014 at 10:37:31 +0200, Jiří Prchal wrote :
> >>
> >>
> >> Dne 25.7.2014 v 10:30 Alexandre Belloni napsal(a):
> >>> Hi,
> >>>
> >>> On 25/07/2014 at 08:14:40 +0200, Jiří Prchal wrote :
> >>>> I'm using custom board. My spi node:
> >>>> 			spi0: spi@...00000 {
> >>>
> >>> You should override the pinctrl here as you are using gpios for the cs.
> >>> 				pinctrl-0 = <&pinctrl_spi0_custom>;
> >>>
> >>>> 				status = "okay";
> >>>> 				cs-gpios = <&pioA 23 0
> >>>> 					    &pioA 22 0
> >>>> 					    &pioC 29 0
> >>>> 					    &pioA 14 0>;
> >>>>
> >>>
> >>> 		pinctrl@...ff400 {
> >>> 				spi0 {
> >>> 					 pinctrl_spi0_custom: spi0-custom {
> >>> 							 atmel,pins =
> >>> 									 <AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>,
> >>> 									 <AT91_PIOA 22 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>,
> >>> 									 <AT91_PIOC 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>,
> >>> 									 <AT91_PIOA 14 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
> >>> 					 };
> >>> 				};
> >>> 		};
> >>>
> >> Of course, it's the way, but in all other drivers, for example LEDS,
> >> it's not needed. And in other way, if I will not use PA14 at all,
> >> the pin will goes down every spi transfer.
> >
> > You must not assumed that the pins are muxed to their default state
> > which is gpio and you should set the pinctrl accordingly for each
> > device.
> >
> > If you don't use PA14 at all, then you don't really care about its
> > state...
> Yes and no, what about on board is populated some chip on PA14, but for some reason at this time I don't need it and not 
> defined in DT?

As long as it's populated you should define it in the DT (the DT should
represent your hardware) and if you don't want to use the populated
device, just set the status property to "disabled" (I'm not sure it
works for spi subdevices though).




-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ