Skip to contentSkip to conversation

M25P80 Regulator Question

DISCUSSION Rhyland Klein 2 participants 5 messages Nov 1, 2013 4 messages not in the archive SPI

lore
Share & tools
lore
#0 lore raw

I am looking at enabling support for W25Q32DW SPI chip on a Tegra platform. I found that the m25p80 driver already supports the chip, so enabling it through devicetree is simple:

+ spi@7000da00 {
+ status = "okay";
+ spi-flash@0 {

+                       compatible = "winbond,w25q32dw";
+                       reg = <0>;
+                       spi-max-frequency = <20000000>;

+ };
+ };

However, it seems on our platform, we need to ensure a regulator is on to be able to access the SPI chip. I was wondering if there is already some binding defined for such a supply. I looked at the binding doc for m25p80 and didn't see anything obvious, nor did I find anything else obvious while looking.

Is there some mechanism for defining this dependency?

Thanks,
Rhyland

Signature · 5 lines
nvpublic
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to a message not in the archive
Quoted 4 lines · Mark Brown

* PGP Signed by an unknown key

On Fri, Nov 01, 2013 at 01:44:33PM -0400, Rhyland Klein wrote:

Quoted 8 lines
Quoted 1 line

Is there some mechanism for defining this dependency?

Same as any other device, add the regulator to the binding for the flash chip and add the appropriate code to the chip.

* Unknown Key
* 0x7EA229BD

Thanks,

I just wanted to make sure I wasn't missing anything. I'll come up with some patches. I believe there are patches in for optional regulator support right, so I assume that would be the most logical path to take?

-rhyland

Signature · 5 lines
nvpublic
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw
In reply to a message not in the archive
Quoted 3 lines · Rhyland Klein

I just wanted to make sure I wasn't missing anything. I'll come up with some patches. I believe there are patches in for optional regulator support right, so I assume that would be the most logical path to take?

No, you should not be using regulator_get_optional() - it is unlikely that the flash device will work without power.

#8 lore raw
In reply to a message not in the archive
Quoted 8 lines · Mark Brown

* PGP Signed by an unknown key

Quoted 3 lines · Rhyland Klein

I just wanted to make sure I wasn't missing anything. I'll come up with some patches. I believe there are patches in for optional regulator support right, so I assume that would be the most logical path to take?

Quoted 6 lines

No, you should not be using regulator_get_optional() - it is unlikely that the flash device will work without power.

* Unknown Key
* 0x7EA229BD

Alright, thanks!!

Signature · 5 lines
nvpublic
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html