Skip to contentSkip to conversation

ARM: mvebu: minor improvements to Armada 388 GP support

PATCH New Thomas Petazzoni 2 participants 10 messages Jun 18, 2015 – Jul 9, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: mvebu: minor improvements to Armada 388 GP support

Hello,

This small set of three commits makes some minor improvements to the Armada 388 GP board support.

Thomas

Thomas Petazzoni (3):
ARM: mvebu: fix description of pwr-sata0 regulator on Armada 388 GP
ARM: mvebu: update EEPROM description of Armada 388 GP
ARM: mvebu: update mvebu_v7_defconfig with features needed for Armada

    388 GP
 arch/arm/boot/dts/armada-388-gp.dts | 12 +++++++-----
 arch/arm/configs/mvebu_v7_defconfig |  4 ++++
 2 files changed, 11 insertions(+), 5 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/3 ARM: mvebu: fix description of pwr-sata0 regulator on Armada 388 GP

This regulator was lacking the reference to the GPIO that controls it, and the regulator-min-microvolt and regulator-max-microvolt properties. Thanks to this commit, the pwr-sata0 regulator now looks more like the other pwr-sata{1,2,3} regulators in the same Device Tree, with of course the exception of a different GPIO reference.

---
 arch/arm/boot/dts/armada-388-gp.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/armada-388-gp.dts +3 -1
index 78514ab..5164b9a 100644
@@ -301,9 +301,11 @@
 	reg_sata0: pwr-sata0 {
 		compatible = "regulator-fixed";
 		regulator-name = "pwr_en_sata0";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
 		enable-active-high;
 		regulator-always-on;
-
+		gpio = <&expander0 2 GPIO_ACTIVE_HIGH>;
 	};
 
 	reg_5v_sata0: v5-sata0 {
Signature · 1 line
2.1.0
#2 lore raw

PATCH 1/3 ARM: mvebu: fix description of pwr-sata0 regulator on Armada 388 GP

Hi Thomas,

Quoted 7 lines · Thomas Petazzoni

This regulator was lacking the reference to the GPIO that controls it, and the regulator-min-microvolt and regulator-max-microvolt properties. Thanks to this commit, the pwr-sata0 regulator now looks more like the other pwr-sata{1,2,3} regulators in the same Device Tree, with of course the exception of a different GPIO reference.

Thanks,

Gregory

Quoted 22 lines
---
 arch/arm/boot/dts/armada-388-gp.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/armada-388-gp.dts +3 -1
index 78514ab..5164b9a 100644
@@ -301,9 +301,11 @@
 	reg_sata0: pwr-sata0 {
 		compatible = "regulator-fixed";
 		regulator-name = "pwr_en_sata0";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
 		enable-active-high;
 		regulator-always-on;
-
+		gpio = <&expander0 2 GPIO_ACTIVE_HIGH>;
 	};
 
 	reg_5v_sata0: v5-sata0 {
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/3 ARM: mvebu: fix description of pwr-sata0 regulator on Armada 388 GP

Hi Thomas,

Quoted 9 lines · Gregory CLEMENT

Hi Thomas,

Quoted 6 lines · Thomas Petazzoni

This regulator was lacking the reference to the GPIO that controls it, and the regulator-min-microvolt and regulator-max-microvolt properties. Thanks to this commit, the pwr-sata0 regulator now looks more like the other pwr-sata{1,2,3} regulators in the same Device Tree, with of course the exception of a different GPIO reference.

Quoted 3 lines
Quoted 1 line

applied on mvebu/dt

Thanks,

Gregory

Quoted 30 lines

Thanks,

Gregory

Quoted 22 lines
---
 arch/arm/boot/dts/armada-388-gp.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/armada-388-gp.dts +3 -1
index 78514ab..5164b9a 100644
@@ -301,9 +301,11 @@
 	reg_sata0: pwr-sata0 {
 		compatible = "regulator-fixed";
 		regulator-name = "pwr_en_sata0";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
 		enable-active-high;
 		regulator-always-on;
-
+		gpio = <&expander0 2 GPIO_ACTIVE_HIGH>;
 	};
 
 	reg_5v_sata0: v5-sata0 {
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 2/3 ARM: mvebu: update EEPROM description of Armada 388 GP

In reply to Thomas Petazzoni

Contrary to what the Device Tree indicates, the EEPROM at 0x54 is not populated, so we get rid of this comment.

However, there is an EEPROM at 0x57, so we add support for this AT24C64 EEPROM:

$ hexdump -C /sys/bus/i2c/devices/0-0057/eeprom
00000000  0c ff f3 ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00002000
---
 arch/arm/boot/dts/armada-388-gp.dts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/armada-388-gp.dts +4 -4
index 5164b9a..fc1ee3e 100644
@@ -81,10 +81,6 @@
 				pinctrl-0 = <&i2c0_pins>;
 				status = "okay";
 				clock-frequency = <100000>;
-				/*
-				 * The EEPROM located at adresse 54 is needed
-				 * for the boot - DO NOT ERASE IT -
-				 */
 
 				expander0: pca9555 at 20 {
 					compatible = "nxp,pca9555";
@@ -111,6 +107,10 @@
 					reg = <0x21>;
 				};
 
+				eeprom at 57 {
+					compatible = "atmel,24c64";
+					reg = <0x57>;
+				};
 			};
 
 			serial at 12000 {
Signature · 1 line
2.1.0
#5 lore raw

PATCH 2/3 ARM: mvebu: update EEPROM description of Armada 388 GP

Hi Thomas,

Quoted 6 lines · Thomas Petazzoni

Contrary to what the Device Tree indicates, the EEPROM at 0x54 is not populated, so we get rid of this comment.

However, there is an EEPROM at 0x57, so we add support for this AT24C64 EEPROM:

Quoted 7 lines
$ hexdump -C /sys/bus/i2c/devices/0-0057/eeprom
00000000  0c ff f3 ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00002000

Thanks,

Gregory

Quoted 31 lines
---
 arch/arm/boot/dts/armada-388-gp.dts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/armada-388-gp.dts +4 -4
index 5164b9a..fc1ee3e 100644
@@ -81,10 +81,6 @@
 				pinctrl-0 = <&i2c0_pins>;
 				status = "okay";
 				clock-frequency = <100000>;
-				/*
-				 * The EEPROM located at adresse 54 is needed
-				 * for the boot - DO NOT ERASE IT -
-				 */
 
 				expander0: pca9555 at 20 {
 					compatible = "nxp,pca9555";
@@ -111,6 +107,10 @@
 					reg = <0x21>;
 				};
 
+				eeprom at 57 {
+					compatible = "atmel,24c64";
+					reg = <0x57>;
+				};
 			};
 
 			serial at 12000 {
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#6 lore raw

PATCH 2/3 ARM: mvebu: update EEPROM description of Armada 388 GP

Hi Thomas,

Quoted 15 lines · Gregory CLEMENT

Hi Thomas,

Quoted 12 lines · Thomas Petazzoni

Contrary to what the Device Tree indicates, the EEPROM at 0x54 is not populated, so we get rid of this comment.

However, there is an EEPROM at 0x57, so we add support for this AT24C64 EEPROM:

$ hexdump -C /sys/bus/i2c/devices/0-0057/eeprom
00000000  0c ff f3 ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00002000
Quoted 4 lines
Quoted 1 line

applied on mvebu/dt

Thanks,

Gregory

Quoted 38 lines

Thanks,

Gregory

Quoted 31 lines
---
 arch/arm/boot/dts/armada-388-gp.dts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/armada-388-gp.dts +4 -4
index 5164b9a..fc1ee3e 100644
@@ -81,10 +81,6 @@
 				pinctrl-0 = <&i2c0_pins>;
 				status = "okay";
 				clock-frequency = <100000>;
-				/*
-				 * The EEPROM located at adresse 54 is needed
-				 * for the boot - DO NOT ERASE IT -
-				 */
 
 				expander0: pca9555 at 20 {
 					compatible = "nxp,pca9555";
@@ -111,6 +107,10 @@
 					reg = <0x21>;
 				};
 
+				eeprom at 57 {
+					compatible = "atmel,24c64";
+					reg = <0x57>;
+				};
 			};
 
 			serial at 12000 {
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

PATCH 3/3 ARM: mvebu: update mvebu_v7_defconfig with features needed for Armada 388 GP

In reply to Thomas Petazzoni

The Armada 388 GP board has the following hardware features that were not enabled in mvebu_v7_defconfig:

* An AT24 I2C EEPROM (also used by armada-xp-lenovo-ix4-300d)
* A PCA9555 I2C GPIO expander
* Several fixed regulators

Therefore, this commit adds the necessary options to mvebu_v7_defconfig.

---
 arch/arm/configs/mvebu_v7_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/configs/mvebu_v7_defconfig +4 -0
index cacc9f4..13fcd02 100644
@@ -58,6 +58,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_PXA3xx=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_EEPROM_AT24=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_ATA=y
 CONFIG_AHCI_MVEBU=y
@@ -83,11 +84,14 @@ CONFIG_I2C_MV64XXX=y
 CONFIG_SPI=y
 CONFIG_SPI_ORION=y
 CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_PCA953X=y
 CONFIG_SENSORS_GPIO_FAN=y
 CONFIG_THERMAL=y
 CONFIG_ARMADA_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_ORION_WATCHDOG=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SOC=y
Signature · 1 line
2.1.0
#8 lore raw

PATCH 3/3 ARM: mvebu: update mvebu_v7_defconfig with features needed for Armada 388 GP

Hi Thomas,

Quoted 10 lines · Thomas Petazzoni

The Armada 388 GP board has the following hardware features that were not enabled in mvebu_v7_defconfig:

* An AT24 I2C EEPROM (also used by armada-xp-lenovo-ix4-300d)
* A PCA9555 I2C GPIO expander
* Several fixed regulators

Therefore, this commit adds the necessary options to mvebu_v7_defconfig.

Thanks,

Gregory

Quoted 32 lines
---
 arch/arm/configs/mvebu_v7_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/configs/mvebu_v7_defconfig +4 -0
index cacc9f4..13fcd02 100644
@@ -58,6 +58,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_PXA3xx=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_EEPROM_AT24=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_ATA=y
 CONFIG_AHCI_MVEBU=y
@@ -83,11 +84,14 @@ CONFIG_I2C_MV64XXX=y
 CONFIG_SPI=y
 CONFIG_SPI_ORION=y
 CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_PCA953X=y
 CONFIG_SENSORS_GPIO_FAN=y
 CONFIG_THERMAL=y
 CONFIG_ARMADA_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_ORION_WATCHDOG=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SOC=y
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

PATCH 3/3 ARM: mvebu: update mvebu_v7_defconfig with features needed for Armada 388 GP

Hi Thomas,

Quoted 10 lines · Gregory CLEMENT

Hi Thomas,

Quoted 7 lines · Thomas Petazzoni

The Armada 388 GP board has the following hardware features that were not enabled in mvebu_v7_defconfig:

* An AT24 I2C EEPROM (also used by armada-xp-lenovo-ix4-300d)
* A PCA9555 I2C GPIO expander
* Several fixed regulators

Quoted 7 lines
Quoted 3 lines

Therefore, this commit adds the necessary options to mvebu_v7_defconfig.

applied on mvebu/config

Thanks,

Gregory

Quoted 38 lines

Thanks,

Gregory

Quoted 32 lines
---
 arch/arm/configs/mvebu_v7_defconfig | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/configs/mvebu_v7_defconfig +4 -0
index cacc9f4..13fcd02 100644
@@ -58,6 +58,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_PXA3xx=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_EEPROM_AT24=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_ATA=y
 CONFIG_AHCI_MVEBU=y
@@ -83,11 +84,14 @@ CONFIG_I2C_MV64XXX=y
 CONFIG_SPI=y
 CONFIG_SPI_ORION=y
 CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_PCA953X=y
 CONFIG_SENSORS_GPIO_FAN=y
 CONFIG_THERMAL=y
 CONFIG_ARMADA_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_ORION_WATCHDOG=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SOC=y
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com