* [PATCH 1/5] ARM: dts: at91: sam9x60ek: Use quad mode in the spi-nor flash
@ 2020-04-03 6:12 Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 2/5] ARM: dts: at91: sama5d27_som1: Add SPI NOR flash mapping Tudor.Ambarus
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2020-04-03 6:12 UTC (permalink / raw)
To: Nicolas.Ferre, alexandre.belloni, Ludovic.Desroches
Cc: mark.rutland, devicetree, robh+dt, linux-arm-kernel, Tudor.Ambarus
From: Tudor Ambarus <tudor.ambarus@microchip.com>
Both the QSPI controller and the sst26vf064b flash support
quad mode, enable it.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
arch/arm/boot/dts/at91-sam9x60ek.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
index b484745bf2d4..8c3f621efc4b 100644
--- a/arch/arm/boot/dts/at91-sam9x60ek.dts
+++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
@@ -579,6 +579,8 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
m25p,fast-read;
at91bootstrap@0 {
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/5] ARM: dts: at91: sama5d27_som1: Add SPI NOR flash mapping
2020-04-03 6:12 [PATCH 1/5] ARM: dts: at91: sam9x60ek: Use quad mode in the spi-nor flash Tudor.Ambarus
@ 2020-04-03 6:12 ` Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 3/5] ARM: dts: at91: sama5d2_xplained: Add QSPI0 + SPI NOR memory nodes Tudor.Ambarus
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2020-04-03 6:12 UTC (permalink / raw)
To: Nicolas.Ferre, alexandre.belloni, Ludovic.Desroches
Cc: mark.rutland, devicetree, Tudor.Ambarus, robh+dt, Claudiu.Beznea,
linux-arm-kernel
From: Claudiu Beznea <claudiu.beznea@microchip.com>
Add SoM1 flash mapping, identical with the other SPI NOR flash
mappings found on the other at91 boards.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Tested-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 32 +++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
index 6281590150c8..919000f467e6 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
@@ -34,12 +34,44 @@
pinctrl-0 = <&pinctrl_qspi1_default>;
flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <80000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
m25p,fast-read;
+
+ at91bootstrap@00000000 {
+ label = "at91bootstrap";
+ reg = <0x00000000 0x00040000>;
+ };
+
+ bootloader@00040000 {
+ label = "bootloader";
+ reg = <0x00040000 0x000c0000>;
+ };
+
+ bootloaderenvred@00100000 {
+ label = "bootloader env redundant";
+ reg = <0x00100000 0x00040000>;
+ };
+
+ bootloaderenv@00140000 {
+ label = "bootloader env";
+ reg = <0x00140000 0x00040000>;
+ };
+
+ dtb@00180000 {
+ label = "device tree";
+ reg = <0x00180000 0x00080000>;
+ };
+
+ kernel@00200000 {
+ label = "kernel";
+ reg = <0x00200000 0x00600000>;
+ };
};
};
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/5] ARM: dts: at91: sam9x60ek: Add sdmmc1 node
2020-04-03 6:12 [PATCH 1/5] ARM: dts: at91: sam9x60ek: Use quad mode in the spi-nor flash Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 2/5] ARM: dts: at91: sama5d27_som1: Add SPI NOR flash mapping Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 3/5] ARM: dts: at91: sama5d2_xplained: Add QSPI0 + SPI NOR memory nodes Tudor.Ambarus
@ 2020-04-03 6:12 ` Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 5/5] ARM: dts: at91: at91-sama5d27_som1: Enable eeprom device Tudor.Ambarus
3 siblings, 0 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2020-04-03 6:12 UTC (permalink / raw)
To: Nicolas.Ferre, alexandre.belloni, Ludovic.Desroches
Cc: mark.rutland, devicetree, robh+dt, linux-arm-kernel, Tudor.Ambarus
From: Tudor Ambarus <tudor.ambarus@microchip.com>
sdmmc1 is not populated by default on sam9x60ek, but there are cases
where it is populated with wilc3000. Add the node, but keep it disabled.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
arch/arm/boot/dts/at91-sam9x60ek.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm/boot/dts/at91-sam9x60ek.dts b/arch/arm/boot/dts/at91-sam9x60ek.dts
index 8c3f621efc4b..a5f5718c711a 100644
--- a/arch/arm/boot/dts/at91-sam9x60ek.dts
+++ b/arch/arm/boot/dts/at91-sam9x60ek.dts
@@ -542,6 +542,18 @@
};
};
+ sdmmc1 {
+ pinctrl_sdmmc1_default: sdmmc1 {
+ atmel,pins =
+ <AT91_PIOA 13 AT91_PERIPH_B (AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA13 CK periph B */
+ AT91_PIOA 12 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA12 CMD periph B with pullup */
+ AT91_PIOA 11 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA11 DAT0 periph B with pullup */
+ AT91_PIOA 2 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA2 DAT1 periph B with pullup */
+ AT91_PIOA 3 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA3 DAT2 periph B with pullup */
+ AT91_PIOA 4 AT91_PERIPH_B (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>; /* PA4 DAT3 periph B with pullup */
+ };
+ };
+
gpio_keys {
pinctrl_key_gpio_default: pinctrl_key_gpio {
atmel,pins = <AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
@@ -568,6 +580,15 @@
disable-wp;
};
+&sdmmc1 {
+ bus-width = <4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sdmmc1_default>;
+ no-1-8-v;
+ non-removable;
+ status = "disabled"; /* Conflict with flx4. */
+};
+
&qspi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_qspi>;
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/5] ARM: dts: at91: sama5d2_xplained: Add QSPI0 + SPI NOR memory nodes
2020-04-03 6:12 [PATCH 1/5] ARM: dts: at91: sam9x60ek: Use quad mode in the spi-nor flash Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 2/5] ARM: dts: at91: sama5d27_som1: Add SPI NOR flash mapping Tudor.Ambarus
@ 2020-04-03 6:12 ` Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 4/5] ARM: dts: at91: sam9x60ek: Add sdmmc1 node Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 5/5] ARM: dts: at91: at91-sama5d27_som1: Enable eeprom device Tudor.Ambarus
3 siblings, 0 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2020-04-03 6:12 UTC (permalink / raw)
To: Nicolas.Ferre, alexandre.belloni, Ludovic.Desroches
Cc: mark.rutland, devicetree, Tudor.Ambarus, Cyrille.Pitchen,
robh+dt, linux-arm-kernel
From: Cyrille Pitchen <cyrille.pitchen@microchip.com>
This patch enables the QSPI0 controller, configures its pin muxing and
declares a jedec,spi-nor memory.
sama5d2 Xplained RevB and RevC use the Macronix MX25L25673G flash
memory which advertises a maximum frequency of 80MHz for Quad IO
Fast Read. Set the spi-max-frequency to 80MHz knowing that actually
the QSPI drver will set the SPI bus clock to 166MHz / 3 = 55.3MHz.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@microchip.com>
Tested-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
arch/arm/boot/dts/at91-sama5d2_xplained.dts | 68 +++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index 055ee53e4773..e0c6cff1a312 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -72,6 +72,58 @@
};
apb {
+ qspi0: spi@f0020000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_qspi0_default>;
+ status = "disabled"; /* conflict with sdmmc1 */
+
+ flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <80000000>;
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ m25p,fast-read;
+
+ at91bootstrap@00000000 {
+ label = "at91bootstrap";
+ reg = <0x00000000 0x00040000>;
+ };
+
+ bootloader@00040000 {
+ label = "bootloader";
+ reg = <0x00040000 0x000c0000>;
+ };
+
+ bootloaderenvred@00100000 {
+ label = "bootloader env redundant";
+ reg = <0x00100000 0x00040000>;
+ };
+
+ bootloaderenv@00140000 {
+ label = "bootloader env";
+ reg = <0x00140000 0x00040000>;
+ };
+
+ dtb@00180000 {
+ label = "device tree";
+ reg = <0x00180000 0x00080000>;
+ };
+
+ kernel@00200000 {
+ label = "kernel";
+ reg = <0x00200000 0x00600000>;
+ };
+
+ misc@00800000 {
+ label = "misc";
+ reg = <0x00800000 0x00000000>;
+ };
+ };
+ };
+
spi0: spi@f8000000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi0_default>;
@@ -535,6 +587,22 @@
bias-disable;
};
+ pinctrl_qspi0_default: qspi0_default {
+ sck_cs {
+ pinmux = <PIN_PA22__QSPI0_SCK>,
+ <PIN_PA23__QSPI0_CS>;
+ bias-disable;
+ };
+
+ data {
+ pinmux = <PIN_PA24__QSPI0_IO0>,
+ <PIN_PA25__QSPI0_IO1>,
+ <PIN_PA26__QSPI0_IO2>,
+ <PIN_PA27__QSPI0_IO3>;
+ bias-pull-up;
+ };
+ };
+
pinctrl_sdmmc0_default: sdmmc0_default {
cmd_data {
pinmux = <PIN_PA1__SDMMC0_CMD>,
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 5/5] ARM: dts: at91: at91-sama5d27_som1: Enable eeprom device
2020-04-03 6:12 [PATCH 1/5] ARM: dts: at91: sam9x60ek: Use quad mode in the spi-nor flash Tudor.Ambarus
` (2 preceding siblings ...)
2020-04-03 6:12 ` [PATCH 4/5] ARM: dts: at91: sam9x60ek: Add sdmmc1 node Tudor.Ambarus
@ 2020-04-03 6:12 ` Tudor.Ambarus
3 siblings, 0 replies; 5+ messages in thread
From: Tudor.Ambarus @ 2020-04-03 6:12 UTC (permalink / raw)
To: Nicolas.Ferre, alexandre.belloni, Ludovic.Desroches
Cc: mark.rutland, devicetree, robh+dt, linux-arm-kernel, Tudor.Ambarus
From: Ludovic Desroches <ludovic.desroches@microchip.com>
There is an EEPROM on at91-sama5d27_som1 connected to i2c0. i2c0 node
has to be moved from at91-sama5d27_som1_ek to at91-sama5d27_som1.
Enable the i2c EEPROM found on at91-sama5d27_som1. Add an alias for the
i2c node.
Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Tested-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 22 +++++++++++++++++++++
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 14 -------------
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
index 919000f467e6..b1f994c0ae79 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
@@ -13,6 +13,10 @@
model = "Atmel SAMA5D27 SoM1";
compatible = "atmel,sama5d27-som1", "atmel,sama5d27", "atmel,sama5d2", "atmel,sama5";
+ aliases {
+ i2c0 = &i2c0;
+ };
+
clocks {
slow_xtal {
clock-frequency = <32768>;
@@ -89,7 +93,25 @@
};
};
+ i2c0: i2c@f8028000 {
+ dmas = <0>, <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c0_default>;
+ status = "okay";
+
+ at24@50 {
+ compatible = "24c02";
+ reg = <0x50>;
+ pagesize = <8>;
+ };
+ };
+
pinctrl@fc038000 {
+ pinctrl_i2c0_default: i2c0_default {
+ pinmux = <PIN_PD21__TWD0>,
+ <PIN_PD22__TWCK0>;
+ bias-disable;
+ };
pinctrl_qspi1_default: qspi1_default {
sck_cs {
diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
index 535627c6045b..b0853bf7901c 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
@@ -20,7 +20,6 @@
serial0 = &uart1; /* DBGU */
serial1 = &uart4; /* mikro BUS 1 */
serial2 = &uart2; /* mikro BUS 2 */
- i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
};
@@ -116,13 +115,6 @@
status = "okay";
};
- i2c0: i2c@f8028000 {
- dmas = <0>, <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_i2c0_default>;
- status = "okay";
- };
-
pwm0: pwm@f802c000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mikrobus1_pwm &pinctrl_mikrobus2_pwm>;
@@ -289,12 +281,6 @@
bias-disable;
};
- pinctrl_i2c0_default: i2c0_default {
- pinmux = <PIN_PD21__TWD0>,
- <PIN_PD22__TWCK0>;
- bias-disable;
- };
-
pinctrl_i2c1_default: i2c1_default {
pinmux = <PIN_PD4__TWD1>,
<PIN_PD5__TWCK1>;
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-03 6:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 6:12 [PATCH 1/5] ARM: dts: at91: sam9x60ek: Use quad mode in the spi-nor flash Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 2/5] ARM: dts: at91: sama5d27_som1: Add SPI NOR flash mapping Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 3/5] ARM: dts: at91: sama5d2_xplained: Add QSPI0 + SPI NOR memory nodes Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 4/5] ARM: dts: at91: sam9x60ek: Add sdmmc1 node Tudor.Ambarus
2020-04-03 6:12 ` [PATCH 5/5] ARM: dts: at91: at91-sama5d27_som1: Enable eeprom device Tudor.Ambarus
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).