FAQ_MA35D1_Modify USB Host Over Current Pin to Normal GPIO

Post Reply
ytliu6
Posts: 62
Joined: 08 Nov 2022, 10:28

05 Dec 2022, 15:07

Modify driver source code

Linux/drivers/usb/host/ehci-ma35d1.c
Linux/drivers/usb/host/ohci-ma35d1.c

ehci-ma35d1.c

Before:

Code: Select all

    regmap_write(ma35d1_ehci->sysregmap, REG_SYS_MISCFCR0, (reg & ~(1<<12)));
After:

Code: Select all

    regmap_write(ma35d1_ehci->sysregmap, REG_SYS_MISCFCR0, (reg | (1<<12)));
ohci-ma35d1.c

Before:

regmap_write(ma35d1_ohci->sysregmap, REG_SYS_MISCFCR0, (reg & ~(1<<12)));

After:

regmap_write(ma35d1_ohci->sysregmap, REG_SYS_MISCFCR0, (reg | (1<<12)));

2. Modify Linux deice tree

Linux/arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts

Before:

Code: Select all

hsusbh {
                pinctrl_hsusbh: hsusbhgrp{
                        nuvoton,pins =
                                <SYS_GPL_MFPH_PL12MFP_HSUSBH_PWREN &pcfg_default>,
                                <SYS_GPL_MFPH_PL13MFP_HSUSBH_OVC &pcfg_default>;
                };
        };
After:

Code: Select all

hsusbh {
                pinctrl_hsusbh: hsusbhgrp{
                        nuvoton,pins =
                                < SYS_GPL_MFPH_PL12MFP_GPIO &pcfg_default>,
                                < SYS_GPL_MFPH_PL13MFP_GPIO &pcfg_default>;
                };
        };
#MA35D1 #GPIO #USB

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest