From: Anand Moon Subject: [PATCH 2/2] ARM: dts: meson8b: odroidc1: Fix usb phy regulator power failed warning Date: Sun, 13 Jan 2019 18:18:08 +0000 Message-ID: <20190113181808.5768-2-linux.amoon@gmail.com> References: <20190113181808.5768-1-linux.amoon@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20190113181808.5768-1-linux.amoon@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Rob Herring , Kevin Hilman , Martin Blumenstingl , Jerome Brunet , Neil Armstrong , Emiliano Ingrassia List-Id: devicetree@vger.kernel.org Override the dr_mode from "host" to "peripheral" for dwc2 usb_phy0->usb0 initialization of OTG Micro-B type. Changes fix the below warning for phy poweron failed --> -22 This fix the initialization of c9040000.usb phy. [ 1.639706] phy phy-c1108800.phy.0: USB ID detect failed! [ 1.643850] phy phy-c1108800.phy.0: phy poweron failed --> -22 [ 1.649706] ------------[ cut here ]------------ [ 1.654273] WARNING: CPU: 0 PID: 29 at drivers/regulator/core.c:2054 _regulator_put.part.8+0xf8/0xfc [ 1.663400] Modules linked in: [ 1.666439] CPU: 0 PID: 29 Comm: kworker/0:1 Not tainted 4.20.0-xc1ml #11 [ 1.673192] Hardware name: Amlogic Meson platform [ 1.677894] Workqueue: events deferred_probe_work_func [ 1.683027] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 1.690746] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 1.697953] [] (dump_stack) from [] (__warn.part.3+0xbc/0xd8) [ 1.705418] [] (__warn.part.3) from [] (warn_slowpath_null+0x44/0x4c) [ 1.713579] [] (warn_slowpath_null) from [] (_regulator_put.part.8+0xf8/0xfc) [ 1.722437] [] (_regulator_put.part.8) from [] (regulator_put+0x28/0x38) [ 1.730859] [] (regulator_put) from [] (regulator_bulk_free+0x28/0x38) [ 1.739112] [] (regulator_bulk_free) from [] (release_nodes+0x1bc/0x200) [ 1.747537] [] (release_nodes) from [] (really_probe+0x110/0x2cc) [ 1.755350] [] (really_probe) from [] (driver_probe_device+0x60/0x16c) [ 1.763599] [] (driver_probe_device) from [] (bus_for_each_drv+0x80/0xc4) [ 1.772110] [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x138) [ 1.780359] [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [ 1.788522] [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x8c) [ 1.797470] [] (deferred_probe_work_func) from [] (process_one_work+0x218/0x504) [ 1.806585] [] (process_one_work) from [] (worker_thread+0x2a8/0x5bc) [ 1.814748] [] (worker_thread) from [] (kthread+0x14c/0x154) [ 1.822128] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 1.829331] Exception stack(0xee0ebfb0 to 0xee0ebff8) [ 1.834369] bfa0: 00000000 00000000 00000000 00000000 [ 1.842534] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.850695] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.857311] ---[ end trace e28bbc26874282a4 ]--- [ 1.861984] ------------[ cut here ]------------ [ 1.866524] WARNING: CPU: 0 PID: 29 at drivers/regulator/core.c:2054 _regulator_put.part.8+0xf8/0xfc [ 1.875629] Modules linked in: [ 1.878658] CPU: 0 PID: 29 Comm: kworker/0:1 Tainted: GW 4.20.0-xc1ml #11 [ 1.886817] Hardware name: Amlogic Meson platform [ 1.891513] Workqueue: events deferred_probe_work_func [ 1.896641] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 1.904366] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 1.911573] [] (dump_stack) from [] (__warn.part.3+0xbc/0xd8) [ 1.919041] [] (__warn.part.3) from [] (warn_slowpath_null+0x44/0x4c) [ 1.927203] [] (warn_slowpath_null) from [] (_regulator_put.part.8+0xf8/0xfc) [ 1.936060] [] (_regulator_put.part.8) from [] (regulator_put+0x28/0x38) [ 1.944483] [] (regulator_put) from [] (regulator_bulk_free+0x28/0x38) [ 1.952734] [] (regulator_bulk_free) from [] (release_nodes+0x1bc/0x200) [ 1.961159] [] (release_nodes) from [] (really_probe+0x110/0x2cc) [ 1.968974] [] (really_probe) from [] (driver_probe_device+0x60/0x16c) [ 1.977224] [] (driver_probe_device) from [] (bus_for_each_drv+0x80/0xc4) [ 1.985734] [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x138) [ 1.993984] [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [ 2.002147] [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x8c) [ 2.011092] [] (deferred_probe_work_func) from [] (process_one_work+0x218/0x504) [ 2.020209] [] (process_one_work) from [] (worker_thread+0x2a8/0x5bc) [ 2.028371] [] (worker_thread) from [] (kthread+0x14c/0x154) [ 2.035752] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 2.042955] Exception stack(0xee0ebfb0 to 0xee0ebff8) [ 2.047993] bfa0: 00000000 00000000 00000000 00000000 [ 2.056158] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.064320] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 2.070934] ---[ end trace e28bbc26874282a5 ]--- Cc: Martin Blumenstingl Cc: Jerome Brunet Cc: Neil Armstrong Signed-off-by: Anand Moon --- Rebased on Kevin's amlogic/v5.0/fixes branch Note the warning is not getting produced on the latest kernel. --- arch/arm/boot/dts/meson8b-odroidc1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index a49a8509b288..9d7f725cfe35 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -318,6 +318,7 @@ &usb0 { status = "okay"; + dr_mode = "peripheral"; }; &usb1 { -- 2.20.1