Linux-Amlogic Archive on lore.kernel.org
 help / Atom feed
* [PATCH 0/3] ARM: dts: meson8b: ec100: improvements
@ 2019-01-18 23:43 Martin Blumenstingl
  2019-01-18 23:43 ` [PATCH 1/3] ARM: dts: meson8b: ec100: enable the Ethernet PHY interrupt Martin Blumenstingl
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-01-18 23:43 UTC (permalink / raw)
  To: linux-amlogic, khilman; +Cc: Martin Blumenstingl, linux-arm-kernel

This brings various small improvements for the Endless Mini EC-100
board:
- the Ethernet PHY status is not polled anymore, instead interrupt
  support from the IP101GR PHY is used
- general update for the regulators which adds missing ones, links
  the parents correctly and adds some notes about the actual components
  on the board for anyone who is curious
- show the GPIO line names in debugfs for easier comparison of the GPIO
  definitions from the .dts and the schematics / vendor kernel sources

This applies on top of version 2 of my other patchset "ARM: dts: meson:
chip temperature (hwmon) support" from [0]


[0] https://patchwork.kernel.org/cover/10771753/


Martin Blumenstingl (3):
  ARM: dts: meson8b: ec100: enable the Ethernet PHY interrupt
  ARM: dts: meson8b: ec100: improve the description of the regulators
  ARM: dts: meson8b: ec100: add the GPIO line names

 arch/arm/boot/dts/meson8b-ec100.dts | 122 ++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)

-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ARM: dts: meson8b: ec100: enable the Ethernet PHY interrupt
  2019-01-18 23:43 [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Martin Blumenstingl
@ 2019-01-18 23:43 ` Martin Blumenstingl
  2019-01-18 23:43 ` [PATCH 2/3] ARM: dts: meson8b: ec100: improve the description of the regulators Martin Blumenstingl
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-01-18 23:43 UTC (permalink / raw)
  To: linux-amlogic, khilman; +Cc: Martin Blumenstingl, linux-arm-kernel

The INTR32 pin of the IP101GR Ethernet PHY is routed to the GPIOH_3 pad
on the SoC.
Enable the interrupt function of the PHY's INTR32 pin to switch it from
it's default "receive error" mode to "interrupt pin" mode.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8b-ec100.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/meson8b-ec100.dts b/arch/arm/boot/dts/meson8b-ec100.dts
index cba0006e2de0..1a41d89d1fa5 100644
--- a/arch/arm/boot/dts/meson8b-ec100.dts
+++ b/arch/arm/boot/dts/meson8b-ec100.dts
@@ -169,6 +169,10 @@
 		eth_phy0: ethernet-phy@0 {
 			/* IC Plus IP101A/G (0x02430c54) */
 			reg = <0>;
+			icplus,select-interrupt;
+			interrupt-parent = <&gpio_intc>;
+			/* GPIOH_3 */
+			interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
 		};
 	};
 };
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ARM: dts: meson8b: ec100: improve the description of the regulators
  2019-01-18 23:43 [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Martin Blumenstingl
  2019-01-18 23:43 ` [PATCH 1/3] ARM: dts: meson8b: ec100: enable the Ethernet PHY interrupt Martin Blumenstingl
@ 2019-01-18 23:43 ` Martin Blumenstingl
  2019-01-18 23:43 ` [PATCH 3/3] ARM: dts: meson8b: ec100: add the GPIO line names Martin Blumenstingl
  2019-02-07  3:43 ` [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-01-18 23:43 UTC (permalink / raw)
  To: linux-amlogic, khilman; +Cc: Martin Blumenstingl, linux-arm-kernel

USB_VBUS is a controlled by a Silergy SY6288CCAC-GP 2A Power
Distribution Switch. The name of it's enable GPIO signal is USB_PWR_EN.

VCC5V is supplied by the main power input called PWR_5V_STB. The name of
it's enable GPIO signal is 3V3_5V_EN.

VCC3V3, VCC_DDR3_1V5 and VCCK (the CPU power supply) each use a separate
Silergy SY8089AAC-GP 2A step down regulator. They are all supplied by the
board's main 5V. VCC3V3 and VCC_DDR3_1V5 are fixed regulators while the
voltage of VCCK can be changed by changing it's feedback voltage via
PWM_C.

VCC1V8 is an ABLIC S-1339D18-M5001-GP fixed voltage regulator which is
supplied by VCC3V3.

VCC_RTC is a Global Mixed-mode Technology Inc. G918T12U-GP LDO which. It
is supplied by either VCC3V3 (when the board is powered) or the RTC coin
cell battery.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8b-ec100.dts | 68 +++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/arch/arm/boot/dts/meson8b-ec100.dts b/arch/arm/boot/dts/meson8b-ec100.dts
index 1a41d89d1fa5..5ecd787e9265 100644
--- a/arch/arm/boot/dts/meson8b-ec100.dts
+++ b/arch/arm/boot/dts/meson8b-ec100.dts
@@ -88,6 +88,9 @@
 	};
 
 	usb_vbus: regulator-usb-vbus {
+		/*
+		 * Silergy SY6288CCAC-GP 2A Power Distribution Switch.
+		 */
 		compatible = "regulator-fixed";
 
 		regulator-name = "USB_VBUS";
@@ -95,11 +98,20 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 
+		vin-supply = <&vcc_5v>;
+
+		/*
+		 * signal name from the schematics: USB_PWR_EN
+		 */
 		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
 	};
 
 	vcc_5v: regulator-vcc5v {
+		/*
+		 * supplied by the main power input which called PWR_5V_STB
+		 * in the schematics
+		 */
 		compatible = "regulator-fixed";
 
 		regulator-name = "VCC5V";
@@ -107,6 +119,9 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 
+		/*
+		 * signal name from the schematics: 3V3_5V_EN
+		 */
 		gpio = <&gpio GPIODV_29 GPIO_ACTIVE_LOW>;
 
 		regulator-boot-on;
@@ -114,12 +129,18 @@
 	};
 
 	vcck: regulator-vcck {
+		/*
+		 * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz
+		 * Synchronous Step Down Regulator.
+		 */
 		compatible = "pwm-regulator";
 
 		regulator-name = "VCCK";
 		regulator-min-microvolt = <860000>;
 		regulator-max-microvolt = <1140000>;
 
+		vin-supply = <&vcc_5v>;
+
 		pwms = <&pwm_cd 0 1148 0>;
 		pwm-dutycycle-range = <100 0>;
 
@@ -128,19 +149,66 @@
 	};
 
 	vcc_1v8: regulator-vcc1v8 {
+		/*
+		 * ABLIC S-1339D18-M5001-GP
+		 */
 		compatible = "regulator-fixed";
 
 		regulator-name = "VCC1V8";
 		regulator-min-microvolt = <1800000>;
 		regulator-max-microvolt = <1800000>;
+
+		vin-supply = <&vcc_3v3>;
 	};
 
 	vcc_3v3: regulator-vcc3v3 {
+		/*
+		 * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz
+		 * Synchronous Step Down Regulator. Also called
+		 * VDDIO_AO3.3V in the schematics.
+		 */
 		compatible = "regulator-fixed";
 
 		regulator-name = "VCC3V3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+
+		vin-supply = <&vcc_5v>;
+	};
+
+	vcc_ddr3: regulator-vcc-ddr3 {
+		/*
+		 * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz
+		 * Synchronous Step Down Regulator. Also called
+		 * DDR3_1.5V in the schematics.
+		 */
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC_DDR3_1V5";
+		regulator-min-microvolt = <1500000>;
+		regulator-max-microvolt = <1500000>;
+
+		vin-supply = <&vcc_5v>;
+
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	vcc_rtc: regulator-vcc-rtc {
+		/*
+		 * Global Mixed-mode Technology Inc. G918T12U-GP
+		 */
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC_RTC";
+		regulator-min-microvolt = <900000>;
+		regulator-max-microvolt = <900000>;
+
+		/*
+		 * When the board is powered then the input is VCC3V3,
+		 * otherwise power is taken from the coin cell battery.
+		 */
+		vin-supply = <&vcc_3v3>;
 	};
 };
 
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ARM: dts: meson8b: ec100: add the GPIO line names
  2019-01-18 23:43 [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Martin Blumenstingl
  2019-01-18 23:43 ` [PATCH 1/3] ARM: dts: meson8b: ec100: enable the Ethernet PHY interrupt Martin Blumenstingl
  2019-01-18 23:43 ` [PATCH 2/3] ARM: dts: meson8b: ec100: improve the description of the regulators Martin Blumenstingl
@ 2019-01-18 23:43 ` Martin Blumenstingl
  2019-02-07  3:43 ` [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-01-18 23:43 UTC (permalink / raw)
  To: linux-amlogic, khilman; +Cc: Martin Blumenstingl, linux-arm-kernel

This adds the GPIO line names from the schematics to get them displayed
in the debugfs output of each GPIO controller.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8b-ec100.dts | 50 +++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm/boot/dts/meson8b-ec100.dts b/arch/arm/boot/dts/meson8b-ec100.dts
index 5ecd787e9265..b35b1c6b8fdc 100644
--- a/arch/arm/boot/dts/meson8b-ec100.dts
+++ b/arch/arm/boot/dts/meson8b-ec100.dts
@@ -288,6 +288,56 @@
 	};
 };
 
+&gpio_ao {
+	gpio-line-names = "Linux_TX", "Linux_RX",
+			  "SLP_S5_N", "USB2_OC_FLAG#",
+			  "HUB_RST", "USB_PWR_EN",
+			  "I2S_IN", "SLP_S1_N",
+			  "TCK", "TMS", "TDI", "TDO",
+			  "HDMI_CEC", "5640_IRQ",
+			  "MUTE", "S805_TEST#";
+};
+
+&gpio {
+	gpio-line-names = /* Bank GPIOX */
+			  "WIFI_SD_D0", "WIFI_SD_D1", "WIFI_SD_D2",
+			  "WIFI_SD_D3", "BTPCM_DOUT", "BTPCM_DIN",
+			  "BTPCM_SYNC", "BTPCM_CLK", "WIFI_SD_CLK",
+			  "WIFI_SD_CMD", "WIFI_32K", "WIFI_PWREN",
+			  "UART_B_TX", "UART_B_RX", "UART_B_CTS_N",
+			  "UART_B_RTS_N", "BT_EN", "WIFI_WAKE_HOST",
+			  /* Bank GPIOY */
+			  "", "", "", "", "", "", "", "", "", "",
+			  "", "",
+			  /* Bank GPIODV */
+			  "VCCK_PWM_C", "I2C_SDA_A", "I2C_SCL_A",
+			  "I2C_SDA_B", "I2C_SCL_B", "VDDEE_PWM_D",
+			  "VDDEE_PWM 3V3_5V_EN",
+			  /* Bank GPIOH */
+			  "HDMI_HPD", "HDMI_I2C_SDA", "HDMI_I2C_SCL",
+			  "RMII_IRQ", "RMII_RST#", "RMII_TXD1",
+			  "RMII_TXD0", "AV_select_1", "AV_select_2",
+			  "MCU_Control_S",
+			  /* Bank CARD */
+			  "SD_D1_B", "SD_D0_B", "SD_CLK_8726MX",
+			  "SD_CMD_8726MX", "SD_D3_B", "SD_D2_B",
+			  "CARD_EN_DET (CARD_DET)",
+			  /* Bank BOOT */
+			  "NAND_D0 (EMMC)", "NAND_D1 (EMMC)",
+			  "NAND_D2 (EMMC)", "NAND_D3 (EMMC)",
+			  "NAND_D4 (EMMC)", "NAND_D5 (EMMC)",
+			  "NAND_D6 (EMMC)", "NAND_D7 (EMMC)",
+			  "NAND_CS1 (EMMC)", "NAND_CS2 iNAND_RS1 (EMMC)",
+			  "NAND_nR/B iNAND_CMD (EMMC)", "NAND_ALE (EMMC)",
+			  "NAND_CLE (EMMC)", "nRE_S1 NAND_nRE (EMMC)",
+			  "nWE_S1 NAND_nWE (EMMC)",  "", "", "SPI_CS",
+			  /* Bank DIF */
+			  "RMII_RXD1", "RMII_RXD0", "RMII_CRS_DV",
+			  "RMII_50M_IN", "GPIODIF_4", "GPIODIF_5",
+			  "RMII_TXEN", "CPUETH_25MOUT", "RMII_MDC",
+			  "RMII_MDIO";
+};
+
 &pwm_cd {
 	status = "okay";
 	pinctrl-0 = <&pwm_c1_pins>;
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] ARM: dts: meson8b: ec100: improvements
  2019-01-18 23:43 [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Martin Blumenstingl
                   ` (2 preceding siblings ...)
  2019-01-18 23:43 ` [PATCH 3/3] ARM: dts: meson8b: ec100: add the GPIO line names Martin Blumenstingl
@ 2019-02-07  3:43 ` Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2019-02-07  3:43 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic; +Cc: Martin Blumenstingl, linux-arm-kernel

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> This brings various small improvements for the Endless Mini EC-100
> board:
> - the Ethernet PHY status is not polled anymore, instead interrupt
>   support from the IP101GR PHY is used
> - general update for the regulators which adds missing ones, links
>   the parents correctly and adds some notes about the actual components
>   on the board for anyone who is curious
> - show the GPIO line names in debugfs for easier comparison of the GPIO
>   definitions from the .dts and the schematics / vendor kernel sources
>
> This applies on top of version 2 of my other patchset "ARM: dts: meson:
> chip temperature (hwmon) support" from [0]

Queued for v5.1 (branch: v5.1/dt),

Thanks,

Kevin

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 23:43 [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Martin Blumenstingl
2019-01-18 23:43 ` [PATCH 1/3] ARM: dts: meson8b: ec100: enable the Ethernet PHY interrupt Martin Blumenstingl
2019-01-18 23:43 ` [PATCH 2/3] ARM: dts: meson8b: ec100: improve the description of the regulators Martin Blumenstingl
2019-01-18 23:43 ` [PATCH 3/3] ARM: dts: meson8b: ec100: add the GPIO line names Martin Blumenstingl
2019-02-07  3:43 ` [PATCH 0/3] ARM: dts: meson8b: ec100: improvements Kevin Hilman

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org linux-amlogic@archiver.kernel.org
	public-inbox-index linux-amlogic


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/ public-inbox