Skip to contentSkip to conversation

Fix USB and enable ADC on Khadas VIM

PATCH Superseded Loic Devulder 2 participants 6 messages Jul 9, 2018

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Fix USB and enable ADC on Khadas VIM

This patch series add power supply entry for P212 like meson-gx boards. It also enable ADC support for Khadas VIM board.

Based on the Neil Armstrong's patches.

Note: it's my first (small!) patch for U-Boot, I tried to add all needed and useful informations :-)

Changes since v1:
- remove duplicated lines in configs/khadas-vim_defconfig

Loic Devulder (2):
ARM64: meson: Add 'usb2_phy0' in P212 DT file
configs: Update Meson GX configs

 arch/arm/dts/meson-gxl-s905x-p212.dtsi | 8 ++++++++
 configs/khadas-vim_defconfig           | 5 +++++
 2 files changed, 13 insertions(+)
Signature · 1 line
2.13.7
#1 lore raw

PATCH v2 1/2 ARM64: meson: Add 'usb2_phy0' in P212 DT file

Enable power supply for USB Amlogic Meson GXL P212 based boards.

---
 arch/arm/dts/meson-gxl-s905x-p212.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/dts/meson-gxl-s905x-p212.dtsi +8 -0
index 0cfd701809..4e61ec8f5b 100644
@@ -189,3 +189,11 @@
 &usb0 {
 	status = "okay";
 };
+
+&usb2_phy0 {
+        /*
+         * even though the schematics don't show it:
+         * HDMI_5V is also used as supply for the USB VBUS.
+         */
+        phy-supply = <&hdmi_5v>;
+};
Signature · 1 line
2.13.7
#4 lore raw

PATCH v2 2/2 configs: Update Meson GX configs

In reply to Loic Devulder

Enable ADC support on the Khadas VIM board.

---
 configs/khadas-vim_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/khadas-vim_defconfig +3 -0
index 1eb13df4b4..fd1ec8157b 100644
@@ -13,12 +13,15 @@ CONFIG_OF_BOARD_SETUP=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_CMD_BDI is not set
 # CONFIG_CMD_IMI is not set
+CONFIG_CMD_ADC=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_REGULATOR=y
+CONFIG_ADC=y
+CONFIG_SARADC_MESON=y
 CONFIG_OF_CONTROL=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
Signature · 1 line
2.13.7
#2 lore raw

PATCH v2 1/2 ARM64: meson: Add 'usb2_phy0' in P212 DT file

In reply to Loic Devulder

Hi Loic,

Quoted 3 lines · Loic Devulder

Enable power supply for USB Amlogic Meson GXL P212 based boards.

We like to keep the u-boot and linux DTS synced, this changed was backported on Linux v4.17.5, can you instead precise you backported the last fix from the 4.17 stable branch ?

Thanks,
Neil

Quoted 21 lines
---
 arch/arm/dts/meson-gxl-s905x-p212.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/dts/meson-gxl-s905x-p212.dtsi +8 -0
index 0cfd701809..4e61ec8f5b 100644
@@ -189,3 +189,11 @@
 &usb0 {
 	status = "okay";
 };
+
+&usb2_phy0 {
+        /*
+         * even though the schematics don't show it:
+         * HDMI_5V is also used as supply for the USB VBUS.
+         */
+        phy-supply = <&hdmi_5v>;
+};
#5 lore raw

PATCH v2 2/2 configs: Update Meson GX configs

In reply to Loic Devulder
Quoted 18 lines · Loic Devulder

Enable ADC support on the Khadas VIM board.

---
 configs/khadas-vim_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/khadas-vim_defconfig +1 -0
index 1eb13df4b4..fd1ec8157b 100644
@@ -13,12 +13,15 @@ CONFIG_OF_BOARD_SETUP=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_CMD_BDI is not set
 # CONFIG_CMD_IMI is not set
+CONFIG_CMD_ADC=y
 CONFIG_CMD_GPIO=y

configs/khadas-vim_defconfig CONFIG_OF_BOARD_SETUP=y · line 27

Quoted 10 lines
configs/khadas-vim_defconfig +2 -0
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_REGULATOR=y
+CONFIG_ADC=y
+CONFIG_SARADC_MESON=y
 CONFIG_OF_CONTROL=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_DM_GPIO=y
#3 lore raw

PATCH v2 1/2 ARM64: meson: Add 'usb2_phy0' in P212 DT file

In reply to Neil Armstrong

Hi Neil,

Sure, I did not see you'd done the change on Linux DTS :)

Quoted 35 lines · Neil Armstrong

Hi Loic,

Quoted 3 lines · Loic Devulder

Enable power supply for USB Amlogic Meson GXL P212 based boards.

We like to keep the u-boot and linux DTS synced, this changed was backported on Linux v4.17.5, can you instead precise you backported the last fix from the 4.17 stable branch ?

Thanks,
Neil

Quoted 21 lines
---
 arch/arm/dts/meson-gxl-s905x-p212.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/dts/meson-gxl-s905x-p212.dtsi +8 -0
index 0cfd701809..4e61ec8f5b 100644
@@ -189,3 +189,11 @@
 &usb0 {
 	status = "okay";
 };
+
+&usb2_phy0 {
+        /*
+         * even though the schematics don't show it:
+         * HDMI_5V is also used as supply for the USB VBUS.
+         */
+        phy-supply = <&hdmi_5v>;
+};
Signature · 5 lines
Loic Devulder - Senior QA Engineer
Container & Storage Solutions Quality Assurance team (qa-css)
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB,
21284 (AG Nuernberg)