ARM: renesas: Enable R8A66597 USB host on GR Peach
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sun, 11 Aug 2019 11:22:32 +0000 (13:22 +0200)
committerMarek Vasut <marex@denx.de>
Thu, 22 Aug 2019 16:23:37 +0000 (18:23 +0200)
Enable USB host support on GR Peach board.

To use USB host on GR Peach, it might be necessary to solder JP3 header
onto the board first and then short it. Shorting JP3 is mandatory to let
the U5 regulator to supply VBUS to the CN3 USB port.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
arch/arm/dts/r7s72100-gr-peach-u-boot.dts
configs/grpeach_defconfig

index 28247d19d73b1a3132c6fd1bff94adce4237935a..30e35e47d688986548b6c7df05d81e711921a15b 100644 (file)
                };
        };
 
+       reg_usbhs0_vbus: regulator-usbhs0-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usbhs0_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&port4 1 GPIO_ACTIVE_LOW>;
+       };
+
+
        rpc: rpc@0xee200000 {
                compatible = "renesas,rpc-r7s72100", "renesas,rpc";
                reg = <0x3fefa000 0x100>, <0x18000000 0x08000000>;
@@ -76,3 +85,8 @@
 &scif2_pins {
        u-boot,dm-pre-reloc;
 };
+
+&usbhs0 {
+       vbus-supply = <&reg_usbhs0_vbus>;
+       status = "okay";
+};
index 32254b3b0e171b5befb829a12d05caaa05d46c96..adabfbc085be3caa793c6dc865c14de50ac40b0c 100644 (file)
@@ -10,6 +10,7 @@ CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_ELF is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
@@ -30,7 +31,7 @@ CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_USE_ENV_SPI_MODE=y
 CONFIG_ENV_SPI_MODE=0x0
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_HAVE_BLOCK_DEVICE=y
+CONFIG_BLK=y
 CONFIG_DM_GPIO=y
 CONFIG_RZA1_GPIO=y
 CONFIG_LED=y
@@ -43,11 +44,17 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_DM_ETH=y
 CONFIG_SH_ETHER=y
 CONFIG_PINCTRL=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_RENESAS_RPC_SPI=y
 CONFIG_TIMER=y
 CONFIG_RENESAS_OSTM_TIMER=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_R8A66597_HCD=y
+CONFIG_USB_STORAGE=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 # CONFIG_EFI_LOADER is not set