All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: starfive: jh7110-milkv-mars: set host mode and vbus pin for on-chip USB 2.0
@ 2024-11-14 20:13 ` E Shattow
  0 siblings, 0 replies; 5+ messages in thread
From: E Shattow @ 2024-11-14 20:13 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: E Shattow, Emil Renner Berthing, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	linux-riscv, devicetree, linux-kernel

Enable host mode USB for Milk-V Mars by setting host mode and connect vbus 
pinctrl.

Note that testing this functionality depends on two features:

1.  commit e10c52e7e064038d9bd67b20bf4ce92077d7d84e "phy: starfive: 
jh7110-usb: Fix link configuration to controller"

2. Setting the USB over-current register to disable. This is done at 
bootloader phase, for example U-Boot: 
https://patchwork.ozlabs.org/project/uboot/patch/20241012031328.4268-6-minda.chen@starfivetech.com/

If the over-current register is not prepared for us then the result is no 
change in functional outcome with this patch applied; there is an error 
visible to the user and usb configuration fails (same as it is now).

Signed-off-by: E Shattow <e@freeshell.de>
---
 .../boot/dts/starfive/jh7110-milkv-mars.dts    | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
index 0d248b671d4b..bddfc7c6b00f 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
@@ -53,7 +53,23 @@ &spi0 {
 	status = "okay";
 };
 
+&sysgpio {
+	usb_pins: usb0-0 {
+		driver-vbus-pin {
+			pinmux = <GPIOMUX(25, GPOUT_SYS_USB_DRIVE_VBUS,
+					      GPOEN_ENABLE,
+					      GPI_NONE)>;
+			bias-disable;
+			input-disable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+	};
+};
+
 &usb0 {
-	dr_mode = "peripheral";
+	dr_mode = "host";
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb_pins>;
 	status = "okay";
 };
-- 
2.45.2


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

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-milkv-mars: set host mode and vbus pin for on-chip USB 2.0
@ 2024-11-17  2:32 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-11-17  2:32 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "dtcheck: binding changes may go via different trees"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20241114201805.24143-2-e@freeshell.de>
References: <20241114201805.24143-2-e@freeshell.de>
TO: E Shattow <e@freeshell.de>
TO: Jisheng Zhang <jszhang@kernel.org>
CC: E Shattow <e@freeshell.de>
CC: Emil Renner Berthing <kernel@esmil.dk>
CC: Conor Dooley <conor@kernel.org>
CC: Rob Herring <robh@kernel.org>
CC: Krzysztof Kozlowski <krzk@kernel.org>
CC: Paul Walmsley <paul.walmsley@sifive.com>
CC: Palmer Dabbelt <palmer@dabbelt.com>
CC: Albert Ou <aou@eecs.berkeley.edu>
CC: linux-riscv@lists.infradead.org
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Hi Shattow,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20241114]
[cannot apply to robh/for-next v6.12-rc7 v6.12-rc6 v6.12-rc5 linus/master v6.12-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/E-Shattow/riscv-dts-starfive-jh7110-milkv-mars-set-host-mode-and-vbus-pin-for-on-chip-USB-2-0/20241115-045845
base:   next-20241114
patch link:    https://lore.kernel.org/r/20241114201805.24143-2-e%40freeshell.de
patch subject: [PATCH] riscv: dts: starfive: jh7110-milkv-mars: set host mode and vbus pin for on-chip USB 2.0
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: riscv-randconfig-052-20241117 (https://download.01.org/0day-ci/archive/20241117/202411171031.POqLA7xw-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
dtschema version: 2024.12.dev1+gcabb5b9
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411171031.POqLA7xw-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202411171031.POqLA7xw-lkp@intel.com/

dtcheck warnings: (new ones prefixed by >>)
>> arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dtb: pinctrl@13040000: usb0-0: 'driver-vbus-pin' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
   	from schema $id: http://devicetree.org/schemas/pinctrl/starfive,jh7110-sys-pinctrl.yaml#

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2024-11-17  2:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 20:13 [PATCH] riscv: dts: starfive: jh7110-milkv-mars: set host mode and vbus pin for on-chip USB 2.0 E Shattow
2024-11-14 20:13 ` E Shattow
2024-11-15 15:13 ` Rob Herring (Arm)
2024-11-15 15:13   ` Rob Herring (Arm)
  -- strict thread matches above, loose matches on Subject: below --
2024-11-17  2:32 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.